diff --git a/LeanPool.lean b/LeanPool.lean index 78feeaa6bd..fb8c49ac85 100644 --- a/LeanPool.lean +++ b/LeanPool.lean @@ -6237,6 +6237,7 @@ import LeanPool.Sensitivity import LeanPool.Sensitivity.Basic import LeanPool.Sensitivity.Consequences import LeanPool.Sensitivity.Defs +import LeanPool.Sensitivity.Huang import LeanPool.Sensitivity.HuangBridge import LeanPool.Sensitivity.Main import LeanPool.Sensitivity.Multilinear @@ -6250,6 +6251,8 @@ import LeanPool.SetTheory.Omega import LeanPool.SetTheory.OrderTheory import LeanPool.SetTheory.Ordinals import LeanPool.SetTheory.Realize +import LeanPool.SetTheory.RealizeBuilders +import LeanPool.SetTheory.RealizeCore import LeanPool.SetTheory.SimpAttr import LeanPool.Shannon1948Formalization import LeanPool.Shannon1948Formalization.Entropy diff --git a/LeanPool/ABCExceptions.lean b/LeanPool/ABCExceptions.lean index 6498a6129b..689e57d60b 100644 --- a/LeanPool/ABCExceptions.lean +++ b/LeanPool/ABCExceptions.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Bhavik Mehta, Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Arend Mellendijk -/ +module -import LeanPool.ABCExceptions.ForMathlib -import LeanPool.ABCExceptions.Section2 -import LeanPool.ABCExceptions.Section4 +public import LeanPool.ABCExceptions.ForMathlib +public import LeanPool.ABCExceptions.Section2 +public import LeanPool.ABCExceptions.Section4 +import Mathlib.Algebra.Order.Floor.Semifield +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.RingTheory.Radical.NatInt /-! # Exceptional Set in the abc Conjecture @@ -19,6 +23,8 @@ Tags: number-theory, analytic-number-theory, abc-conjecture MSC: 11D75, 11N37 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/ABCExceptions/ForMathlib.lean b/LeanPool/ABCExceptions/ForMathlib.lean index b82c88f0c1..a93a2a009f 100644 --- a/LeanPool/ABCExceptions/ForMathlib.lean +++ b/LeanPool/ABCExceptions/ForMathlib.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Bhavik Mehta, Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Arend Mellendijk -/ +module -import LeanPool.ABCExceptions.ForMathlib.Misc -import LeanPool.ABCExceptions.ForMathlib.RingTheory +public import LeanPool.ABCExceptions.ForMathlib.Misc +public import LeanPool.ABCExceptions.ForMathlib.RingTheory +import Mathlib.RingTheory.Radical.NatInt /-! # Support lemmas for ABC exceptions @@ -13,3 +15,5 @@ import LeanPool.ABCExceptions.ForMathlib.RingTheory Import-only index for Mathlib-adjacent support files used by the ABC exceptions development. -/ + +@[expose] public section diff --git a/LeanPool/ABCExceptions/ForMathlib/Misc.lean b/LeanPool/ABCExceptions/ForMathlib/Misc.lean index 68b861ff3f..e1c00ca19f 100644 --- a/LeanPool/ABCExceptions/ForMathlib/Misc.lean +++ b/LeanPool/ABCExceptions/ForMathlib/Misc.lean @@ -3,18 +3,23 @@ Copyright (c) 2026 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ +module +public import Mathlib.Order.Interval.Finset.Nat +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Algebra.Order.SuccPred import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Algebra.Order.Ring.Nat -import Mathlib.Order.Interval.Finset.Nat import Mathlib.Algebra.Order.Interval.Finset.SuccPred -import Mathlib.Data.Nat.SuccPred +import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Data.Finset.Powerset +import Mathlib.Data.Nat.SuccPred /-! # LeanPool.ABCExceptions.ForMathlib.Misc -/ +@[expose] public section + noncomputable section open Set diff --git a/LeanPool/ABCExceptions/ForMathlib/RingTheory.lean b/LeanPool/ABCExceptions/ForMathlib/RingTheory.lean index a36bec34d8..e0c63b379c 100644 --- a/LeanPool/ABCExceptions/ForMathlib/RingTheory.lean +++ b/LeanPool/ABCExceptions/ForMathlib/RingTheory.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Bhavik Mehta, Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Arend Mellendijk -/ +module -import LeanPool.ABCExceptions.ForMathlib.RingTheory.Radical +public import LeanPool.ABCExceptions.ForMathlib.RingTheory.Radical +import Mathlib.RingTheory.Radical.NatInt /-! # Ring theory support for ABC exceptions @@ -12,3 +14,5 @@ import LeanPool.ABCExceptions.ForMathlib.RingTheory.Radical Import-only index for ring-theoretic support files used by the ABC exceptions development. -/ + +@[expose] public section diff --git a/LeanPool/ABCExceptions/ForMathlib/RingTheory/Radical.lean b/LeanPool/ABCExceptions/ForMathlib/RingTheory/Radical.lean index f3c9cb2e49..cc7f32ed77 100644 --- a/LeanPool/ABCExceptions/ForMathlib/RingTheory/Radical.lean +++ b/LeanPool/ABCExceptions/ForMathlib/RingTheory/Radical.lean @@ -3,18 +3,20 @@ Copyright (c) 2026 Bhavik Mehta, Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Arend Mellendijk -/ +module -import Mathlib.Algebra.GCDMonoid.Nat -import Mathlib.Algebra.Squarefree.Basic -import Mathlib.Data.Nat.PrimeFin -import Mathlib.RingTheory.Coprime.Lemmas +public import Mathlib.RingTheory.Radical.Basic + +public meta import Aesop.BuiltinRules +public import Mathlib.Tactic.Positivity.Core import Mathlib.RingTheory.Radical.NatInt -import Mathlib.RingTheory.UniqueFactorizationDomain.Nat /-! # LeanPool.ABCExceptions.ForMathlib.RingTheory.Radical -/ +@[expose] public section + namespace UniqueFactorizationMonoid open Qq Lean Mathlib.Meta Finset @@ -25,7 +27,7 @@ open Positivity attribute [local instance] monadLiftOptionMetaM in /-- Positivity extension for radical. Proves radicals are nonzero. -/ @[positivity UniqueFactorizationMonoid.radical _] -def evalRadical : PositivityExt where eval {u α} _ _ e := do +meta def evalRadical : PositivityExt where eval {u α} _ _ e := do match e with | ~q(@radical _ $inst $inst' $inst'' $n) => have _ := ← synthInstanceQ q(Nontrivial $α) diff --git a/LeanPool/ABCExceptions/Section2.lean b/LeanPool/ABCExceptions/Section2.lean index da48b1bf6e..b3d6ca0cac 100644 --- a/LeanPool/ABCExceptions/Section2.lean +++ b/LeanPool/ABCExceptions/Section2.lean @@ -3,21 +3,26 @@ Copyright (c) 2026 Bhavik Mehta, Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Arend Mellendijk -/ +module -import Mathlib.Analysis.SpecialFunctions.Log.Base -import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics -import Mathlib.Algebra.Order.Floor.Semifield -import Mathlib.Data.Nat.GCD.BigOperators -import Mathlib.Data.Nat.Squarefree -import Mathlib.Algebra.Order.Star.Real -import Mathlib.Order.CompletePartialOrder +public import Mathlib.Analysis.SpecialFunctions.Log.Base +public import Mathlib.Order.CompletePartialOrder +public import Mathlib.RingTheory.Radical.Basic +public import Mathlib.RingTheory.UniqueFactorizationDomain.Nat import LeanPool.ABCExceptions.ForMathlib.RingTheory.Radical +import Mathlib.Algebra.Order.Floor.Semifield +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics +import Mathlib.Data.Nat.GCD.BigOperators +import Mathlib.RingTheory.Radical.NatInt /-! # LeanPool.ABCExceptions.Section2 -/ +@[expose] public section + open Finset UniqueFactorizationMonoid section @@ -52,9 +57,8 @@ theorem Finset.mem_abcExceptionsBelow (ε : ℝ) (X : ℕ) (a b c : ℕ) : @[gcongr] lemma Finset.abcExceptionsBelow_mono_right {ε : ℝ} {X Y : ℕ} (hXY : X ≤ Y) : abcExceptionsBelow ε X ⊆ abcExceptionsBelow ε Y := by - rintro ⟨a, b, c⟩ - simp +contextual - omega + exact Finset.filter_subset_filter _ + (Finset.Icc_subset_Icc le_rfl ⟨hXY, hXY, hXY⟩) @[gcongr] lemma Finset.abcExceptionsBelow_mono_left {ε₁ ε₂ : ℝ} {X : ℕ} (hε : ε₁ ≤ ε₂) : @@ -344,7 +348,7 @@ This is $$S^*_{α,β,γ}(X)$$ in the paper and blueprint. noncomputable def refinedCountTriplesStar (α β γ : ℝ) (X : ℕ) : ℕ := #(dyadicPoints α β γ X) /-- The set over which we take the supremum in lemma 2.2. -/ -private noncomputable def indexSet (ε : ℝ) (X : ℕ) : Finset (ℕ × ℕ × ℕ × ℕ) := +noncomputable def indexSet (ε : ℝ) (X : ℕ) : Finset (ℕ × ℕ × ℕ × ℕ) := (Finset.Icc 0 (Nat.log 2 X)) ×ˢ (Finset.Icc 0 (Nat.log 2 X)) ×ˢ (Finset.Icc 0 (Nat.log 2 X)) ×ˢ (Finset.Icc 1 (Nat.log 2 X+1)) |>.filter fun ⟨i, j, k, n⟩ ↦ i + j + k ≤ (1 - ε) * n @@ -711,7 +715,7 @@ private theorem hd_pos : 0 < d := by rw [hd, Nat.floor_pos] nlinarith only [two_lt_eps_inv] -private instance hd_ne_zero : NeZero d := by +instance hd_ne_zero : NeZero d := by simp_rw [neZero_iff] apply ne_of_gt hd_pos @@ -907,7 +911,8 @@ private theorem c_le_X_pow : c ≤ (X : ℝ) ^ ε := calc · norm_cast linarith -private noncomputable def KIndex : Fin d := Fin.ofNat d (K - 1) +/-- The distinguished index `K - 1`, viewed in `Fin d`. -/ +noncomputable def KIndex : Fin d := Fin.ofNat d (K - 1) @[simp] private theorem KIndex_val_add_one : KIndex.val + 1 = K := by @@ -1177,12 +1182,12 @@ theorem exists_nice_factorization' · exact c_le_pow gcongr · norm_cast - · linarith [sq_nonneg ε] + · linarith only [sq_nonneg ε] · rw [Nat.le_floor_iff] · apply c_le_pow.trans gcongr _ ^ ?_ · norm_cast - · nlinarith + · nlinarith only [hε, hε_pos] positivity · rw [sub_eq_add_neg, Real.rpow_add, Real.rpow_neg, mul_inv_le_iff₀] · apply hsim.1.trans (rad_n_le.trans _) @@ -1359,7 +1364,7 @@ theorem B_to_triple_surjOn {α β γ : ℝ} (x : ℕ) (ε : ℝ) · simp only [Real.rpow_one] trans 2 * (c₂ *(∏ i, (w i : ℝ) ^ (i.val + 1))) · norm_cast - simp_all + rwa [← c_eq_c_mul_prod] · rw [← mul_assoc, mul_comm 2, mul_assoc] gcongr · apply Real.rpow_pos_of_pos @@ -1405,7 +1410,7 @@ theorem B_to_triple_surjOn {α β γ : ℝ} (x : ℕ) (ε : ℝ) · apply fun i ↦ (similar_pow_log (hu_pos i)) · apply fun i ↦ (similar_pow_log (hv_pos i)) · apply fun i ↦ (similar_pow_log (hw_pos i)) - · simp_all + · rwa [← a_eq_c_mul_prod, ← b_eq_c_mul_prod, ← c_eq_c_mul_prod] · apply coprime_mul_prod_aux _ _ (a_eq_c_mul_prod ▸ b_eq_c_mul_prod ▸ hab) <;> omega · apply coprime_mul_prod_aux _ _ (a_eq_c_mul_prod ▸ c_eq_c_mul_prod ▸ hac) <;> omega · apply coprime_mul_prod_aux _ _ (b_eq_c_mul_prod ▸ c_eq_c_mul_prod ▸ hbc) <;> omega diff --git a/LeanPool/ABCExceptions/Section4.lean b/LeanPool/ABCExceptions/Section4.lean index abaf4b4324..b075e02b7b 100644 --- a/LeanPool/ABCExceptions/Section4.lean +++ b/LeanPool/ABCExceptions/Section4.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ +module -import Mathlib.Analysis.RCLike.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Algebra.Order.Archimedean.Real.Basic +public import Mathlib.Order.Interval.Finset.Nat +meta import Lean.Meta.Tactic.NormCast +import LeanPool.ABCExceptions.ForMathlib.Misc +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Algebra.CharP.Defs +import Mathlib.Algebra.Order.BigOperators.Expect import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Tactic.LinearCombination import Mathlib.Tactic.NormNum.BigOperators -import LeanPool.ABCExceptions.ForMathlib.Misc /-! # Section 4 @@ -18,6 +27,8 @@ parts of the paper. -/ +@[expose] public section + noncomputable section open Finset @@ -1010,7 +1021,7 @@ lemma bound_4_point_24 (hd : 6 ≤ d) (hba : b 3 ≤ a 3) : have h4 : 0 ≤ min (a 4) (b 4) := le_min (ha.nonneg _) (hb.nonneg _) have h5 : 0 ≤ min (a 5) (b 5) := le_min (ha.nonneg _) (hb.nonneg _) have h6 : 0 ≤ min (a 6) (b 6) := le_min (ha.nonneg _) (hb.nonneg _) - norm_num [- min_add_max, ha.zero, hb.zero, hba] + simp [-min_add_max, ha.zero, hb.zero, hba] linear_combination 2 * h4 + 3 * h5 + 4 * h6 include ha hb h44 htab hg in @@ -1118,7 +1129,8 @@ lemma GeometryBound.s21_application_basic have h₁₂₃ : {1, 2, 3} ⊆ Finset.Icc 1 d := by simp [Finset.insert_subset_iff]; omega have h₁₂₄ : {1, 2, 4} ⊆ Finset.Icc 1 d := by simp [Finset.insert_subset_iff]; omega have h₁₂₃₄ : {1, 2, 3, 4} ⊆ Finset.Icc 1 d := by simp [Finset.insert_subset_iff]; omega - have : ν < ε + a 3 + b 3 + c 4 + ∑ i ∈ Icc 5 d, (b i + c i) + 0 ⊔ (∑ x ∈ Icc 1 d, x * a x + + have hbounds : + ν < ε + a 3 + b 3 + c 4 + ∑ i ∈ Icc 5 d, (b i + c i) + 0 ⊔ (∑ x ∈ Icc 1 d, x * a x + (b 1 + c 1) + 2 * (b 2 + c 2) - 3 * (a 3 - c 3) + (4 * b 4) - 1) ∧ ν < ε + a 3 + b 3 + b 4 + ∑ i ∈ Icc 5 d, (b i + c i) + 0 ⊔ (∑ x ∈ Icc 1 d, x * a x + (b 1 + c 1) + 2 * (b 2 + c 2) - 3 * (a 3 - c 3) + (4 * c 4) - 1) := by @@ -1136,10 +1148,10 @@ lemma GeometryBound.s21_application_basic simp only [Finset.sum_add_distrib] simp [sum_range, Fin.sum_univ_five, hb.zero, hc.zero] at h₁ h₂ ring_nf at h₁ h₂ ⊢ - simp_all + exact ⟨h₁, h₂⟩ obtain h4 | h4 := le_total (b 4) (c 4) - · simp_all - · simp_all + · simpa only [min_eq_left h4, max_eq_right h4] using hbounds.2 + · simpa only [min_eq_right h4, max_eq_left h4] using hbounds.1 lemma min_le_half_add {x y : ℝ} : min x y ≤ (x + y) / 2 := by linarith [min_le_left x y, min_le_right x y] diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean.lean index 95c4fe08b4..a4a08bafc8 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Undetermined +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BorelDeterminacy + +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Undetermined +import Mathlib.CategoryTheory.Category.Init /-! # A formalization of Borel determinacy in Lean @@ -18,6 +22,8 @@ Tags: descriptive-set-theory, game-theory, determinacy MSC: 03E15, 54H05, 91A44 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications.lean index e1b2db0f57..09d199305f 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.Choquet -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.General -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.Meager -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.RegularOpen +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.Choquet +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.General +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.Meager +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.RegularOpen +import Mathlib.CategoryTheory.Category.Init /-! # Applications index @@ -15,3 +17,5 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.RegularOpen Import-only index for the application modules in the Borel determinacy formalization. -/ + +@[expose] public section diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/Choquet.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/Choquet.lean index 2b0f2edfba..1ecdb49c65 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/Choquet.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/Choquet.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.Meager -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BorelDeterminacy +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Games +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.Algebra.Order.Module.Field +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Measurability.Init +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.Choquet @@ -13,6 +20,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BorelDeterminacy Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + open GaleStewartGame open Descriptive diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/General.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/General.lean index 25a11a246a..8a41364dea 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/General.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/General.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import Mathlib.Tactic.Common -import Mathlib.Tactic.TautoSet -import Mathlib.Data.Set.Disjoint -import Mathlib.Data.Set.Notation +public import Mathlib.Data.Set.BooleanAlgebra +public import Mathlib.Order.Filter.Defs import Mathlib.Order.Filter.Basic +import Mathlib.Tactic.Attr.Core +import Mathlib.Tactic.TautoSet /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.General @@ -16,6 +17,8 @@ import Mathlib.Order.Filter.Basic Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + lemma diff_subset_union {I} {A B C : Set I} : A \ C ⊆ (A \ B) ∪ (B \ C) := by tauto_set lemma projection_formula {α β} (f : α → β) (X : Set α) (Y : Set β) : diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/Meager.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/Meager.lean index 68be5bc906..d091bc08a8 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/Meager.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/Meager.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module +public import Mathlib.Topology.Baire.BaireMeasurable +public import Mathlib.Order.Heyting.Regular +public import Mathlib.Topology.Sets.Opens +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.General import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.RegularOpen -import Mathlib.Topology.Baire.BaireMeasurable -import Mathlib.Topology.Baire.Lemmas /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.Meager @@ -14,6 +17,8 @@ import Mathlib.Topology.Baire.Lemmas Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + variable {X Y : Type*} [tX : TopologicalSpace X] [tY : TopologicalSpace Y] (f : X → Y) {A B U V : Set X} diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/RegularOpen.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/RegularOpen.lean index ff006860d2..4ba4aa64b0 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/RegularOpen.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Applications/RegularOpen.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.General -import Mathlib.Order.Heyting.Regular -import Mathlib.Tactic.ApplyFun -import Mathlib.Topology.Sets.Opens +public import Mathlib.Order.Heyting.Regular +public import Mathlib.Topology.Sets.Opens /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.RegularOpen @@ -15,6 +14,8 @@ import Mathlib.Topology.Sets.Opens Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + variable {X : Type*} [tX : TopologicalSpace X] {A B : Set X} {U V : tX.Opens} diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic.lean index 736453d158..020ba7051b 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.FinLists -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.InfLists -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.InvLimitNat -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.MiscCat +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.FinLists +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.InfLists +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.InvLimitNat +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.MiscCat +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Basic index @@ -17,3 +23,5 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.MiscCat Import-only index for the basic list, stream, category, and tactic support modules in the Borel determinacy formalization. -/ + +@[expose] public section diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/FinLists.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/FinLists.lean index 5e7fadb96e..9aac96b785 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/FinLists.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/FinLists.lean @@ -3,8 +3,22 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module +public import Aesop.BuiltinRules +public import Batteries.Data.List.Basic +public import Mathlib.Data.Nat.Notation +public import Mathlib.Data.Set.Operations +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.Basic +public import Mathlib.Tactic.ToAdditive import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.FinLists @@ -12,6 +26,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + variable {α β γ : Type*} {a : α} {m n : ℕ} diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/General.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/General.lean index 6e55f92700..30667f5a23 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/General.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/General.lean @@ -3,15 +3,17 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import Mathlib.SetTheory.Cardinal.Continuum -import Mathlib.Order.CompleteSublattice -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Zify -import Aesop -import Lean.Elab.Tactic.Omega +public import Mathlib.SetTheory.Cardinal.Order import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.Data.Rat.Cast.Order +import Mathlib.SetTheory.Ordinal.Basic +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General @@ -19,6 +21,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + attribute [simp_lengths] List.length_append List.length_cons List.length_nil diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/InfLists.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/InfLists.lean index 61f6493dd3..d07697d835 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/InfLists.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/InfLists.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import Mathlib.Topology.Basic -import Mathlib.Topology.Constructions -import Mathlib.Topology.Order -import Mathlib.Order.Filter.Pi -import Mathlib.Data.Stream.Init -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.FinLists +public import Mathlib.Topology.Constructions +public import Mathlib.Data.Stream.Init +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.InfLists @@ -17,6 +21,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.FinLists Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace Stream' attribute [simp_lengths] length_take diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/InvLimitNat.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/InvLimitNat.lean index e79b6c5330..f230b6ddc4 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/InvLimitNat.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/InvLimitNat.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.MiscCat -import Mathlib.CategoryTheory.Filtered.Connected +public import Mathlib.Algebra.Group.End +public import Mathlib.CategoryTheory.Category.Preorder +public import Mathlib.CategoryTheory.Limits.IsLimit +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General import Mathlib.CategoryTheory.Limits.Constructions.EventuallyConstant +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.InvLimitNat @@ -14,6 +22,8 @@ import Mathlib.CategoryTheory.Limits.Constructions.EventuallyConstant Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + open CategoryTheory diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/Meta.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/Meta.lean index eacfff15fe..18b857cce5 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/Meta.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/Meta.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import Mathlib.Tactic.Common +public meta import Aesop.BuiltinRules +public meta import Lean.Elab.Tactic.Simp +public meta import Std.Do.Triple.SpecLemmas +import Lean.Elab.Tactic.Simp /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta @@ -12,6 +16,8 @@ import Mathlib.Tactic.Common Auxiliary declarations for the Borel determinacy formalization. -/ +public meta section + /-- Auxiliary declaration for the Borel determinacy formalization. -/ register_simp_attr simp_lengths --seemingly not usable in file where declared diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/MiscCat.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/MiscCat.lean index 0eb6d603b9..459e73e010 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/MiscCat.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Basic/MiscCat.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import Mathlib.CategoryTheory.Limits.Final -import Mathlib.CategoryTheory.Limits.Types.Coproducts -import Mathlib.CategoryTheory.ConcreteCategory.Elementwise -import Mathlib.CategoryTheory.ConcreteCategory.EpiMono -import Mathlib.CategoryTheory.Category.Preorder +public import Mathlib.CategoryTheory.Limits.Types.Colimits +public import Mathlib.Order.BourbakiWitt import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.MiscCat @@ -17,6 +20,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + open CategoryTheory diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game.lean index 294544445a..54da6099e3 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game.lean @@ -3,16 +3,24 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.BuildStrategies -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.GaleStewart -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Games -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Player -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Strategies -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Undetermined +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.BuildStrategies +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.GaleStewart +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Games +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Player +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Strategies +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Undetermined +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Game index Import-only index for Gale-Stewart game definitions, strategies, and examples. -/ + +@[expose] public section diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/BuildStrategies.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/BuildStrategies.lean index bbea4292fe..97d78c6383 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/BuildStrategies.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/BuildStrategies.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Games +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Games +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.Set.Subset +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.BuildStrategies @@ -12,6 +21,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Games Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame open Stream'.Discrete Descriptive Tree Game PreStrategy diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/GaleStewart.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/GaleStewart.lean index 0dcab73d58..a88df5825c 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/GaleStewart.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/GaleStewart.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.BuildStrategies +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.BuildStrategies +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.GaleStewart @@ -12,6 +18,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.BuildStrategies Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame open Stream'.Discrete Descriptive Tree PreStrategy diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Games.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Games.lean index e67cd39ffa..51910fa2b0 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Games.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Games.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeBody +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Strategies +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.Data.Rat.Cast.Order import Mathlib.Data.Set.Subset -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeBody -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Strategies +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Games @@ -14,6 +22,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Strategies Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame open Stream'.Discrete Descriptive Tree diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Player.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Player.lean index c35c03c3c9..3df5553012 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Player.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Player.lean @@ -3,8 +3,28 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module + +public meta import Aesop.BuiltinRules +public import Aesop.BuiltinRules +public import Mathlib.Data.Nat.Notation +public import Mathlib.Tactic.Attr.Core +public meta import Mathlib.Tactic.Basic +public import Mathlib.Tactic.Push +public meta import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToAdditive +public meta import Mathlib.Tactic.ToDual +public import Mathlib.Tactic.ToDual +public meta import Qq.Typ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ApplyFun +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Player @@ -12,6 +32,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame @@ -39,7 +61,9 @@ attribute [simp_isPosition] ite_eq_iff eq_ite_iff ite_prop_iff_or --apply_ite --maybe reduce priority to stop (apply_ite (Eq _)) -attribute [simp_isPosition] reduceCtorEq +/-- Constructor equality reduction for the position simplifier. -/ +simproc_decl playerReduceCtorEq (_ = _) := reduceCtorEq +attribute [simp_isPosition] playerReduceCtorEq /-- Tactic support used by the Borel determinacy formalization. -/ macro "synthIsPosition" : tactic => `(tactic | first | done | diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Strategies.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Strategies.lean index 162bbd421c..c14c502532 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Strategies.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Strategies.lean @@ -3,9 +3,19 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.Trees -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Player +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.Trees +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Player +public import Mathlib.Order.BourbakiWitt +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ApplyFun +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Strategies @@ -13,6 +23,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Player Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame open Descriptive Tree diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Undetermined.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Undetermined.lean index f60dd58cf4..d7e82a5789 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Undetermined.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Game/Undetermined.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Games +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Games +public import Mathlib.SetTheory.Cardinal.Continuum +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Undetermined @@ -12,6 +21,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Games Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame open Cardinal diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof.lean index 116906f2fb..8997a3fed3 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof.lean @@ -3,18 +3,21 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BorelDeterminacy -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BuildLevelwise -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Covering -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringClosedGame -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringLim -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.WinAsap +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BorelDeterminacy +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BuildLevelwise +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Covering +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringClosedGame +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringLim +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.WinAsap /-! # Proof index Import-only index for the covering and unravelling proof of Borel determinacy. -/ + +@[expose] public section diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/BorelDeterminacy.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/BorelDeterminacy.lean index 637d971394..c949739556 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/BorelDeterminacy.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/BorelDeterminacy.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic -import Mathlib.MeasureTheory.MeasurableSpace.Basic +public import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.Strat +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringLim +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.InvLimitNat +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.TreeLift import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.Strat -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.Strat -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringLim /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BorelDeterminacy @@ -16,6 +18,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringLim Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame open Descriptive Tree Covering Stream'.Discrete @@ -176,22 +180,11 @@ lemma unravelFunctor_preimage m n : let gc := (unravelFunctor G k).map (homOfLE (by simp : 0 ≤ n)).op change (ConcreteCategory.hom (bodyFunctor.map (fc.toHom ≫ gc.toHom))) ⁻¹' (G.sets m).1 = _ - have hmap : bodyFunctor.map (fc.toHom ≫ gc.toHom) = - bodyFunctor.map fc.toHom ≫ bodyFunctor.map gc.toHom := - bodyFunctor.map_comp fc.toHom gc.toHom - rw [hmap] - let f' := bodyFunctor.map fc.toHom - let g' := bodyFunctor.map gc.toHom - change (f' ≫ g')⁻¹' (G.sets m).1 = _ - have hpre : (ConcreteCategory.hom (f' ≫ g')) ⁻¹' (G.sets m).1 = - (ConcreteCategory.hom f') ⁻¹' - ((ConcreteCategory.hom g') ⁻¹' (G.sets m).1) := by - ext x - rfl - rw [hpre] - have hg : (ConcreteCategory.hom g')⁻¹' (G.sets m).1 = - ((unravelNth G k n).sets m).1 := by simpa [g', gc] using ih - exact hg ▸ (((unravelNth G k n).continue k).2.2.2 m).symm + erw [bodyFunctor.map_comp] + change (ConcreteCategory.hom (bodyFunctor.map fc.toHom)) ⁻¹' + ((ConcreteCategory.hom (bodyFunctor.map gc.toHom)) ⁻¹' (G.sets m).1) = _ + erw [ih] + exact (((unravelNth G k n).continue k).2.2.2 m).symm /-- Auxiliary declaration for the Borel determinacy formalization. -/ def unravelLim : Limits.Cone (unravelFunctor G k) := limCone (unravelFunctor_fixing G k) @@ -215,18 +208,7 @@ def unravelableAsMeasurable : MeasurableSpace (Tree.body T.1.2) where let G := (unravelLim G0 k).pt; let π := (unravelLim G0 k).π have hO : IsOpen ((Tree.bodyFunctor.map (π.app ⟨0⟩).toHom)⁻¹' ((Tree.bodyFunctor.map f.toHom)⁻¹' (⋃i, W i))) := by - let a := ConcreteCategory.hom (bodyFunctor.map (π.app ⟨0⟩).toHom) - let b := ConcreteCategory.hom (bodyFunctor.map f.toHom) - have hiUnion : a ⁻¹' b ⁻¹' (⋃ i, W i) = ⋃ i, a ⁻¹' b ⁻¹' W i := by - ext x - constructor - · intro hx - obtain ⟨i, hi⟩ := Set.mem_iUnion.mp hx - exact Set.mem_iUnion.mpr ⟨i, hi⟩ - · intro hx - obtain ⟨i, hi⟩ := Set.mem_iUnion.mp hx - exact Set.mem_iUnion.mpr ⟨i, hi⟩ - rw [hiUnion] + erw [Set.preimage_iUnion] apply isOpen_iUnion intro n change IsOpen ((ConcreteCategory.hom (bodyFunctor.map (π.app ⟨0⟩).toHom)) ⁻¹' @@ -256,7 +238,6 @@ def unravelableAsMeasurable : MeasurableSpace (Tree.body T.1.2) where toCovering := gc ≫ π.app ⟨0⟩ hpre := by rw [← g.hpre] - ext x let Gcone := ((Functor.const ℕᵒᵖ).obj (unravelLim G0 k).pt).obj (Opposite.op 0) have hcompMap : bodyFunctor.map (gc ≫ π.app ⟨0⟩).toHom = @@ -266,35 +247,10 @@ def unravelableAsMeasurable : MeasurableSpace (Tree.body T.1.2) where have hidMap : bodyFunctor.map ((𝟙 Gcone : Gcone ⟶ Gcone).toHom) = 𝟙 _ := by change bodyFunctor.map (𝟙 Gcone.1) = _ exact bodyFunctor.map_id Gcone.1 - have hcompApply : - (ConcreteCategory.hom (bodyFunctor.map (gc ≫ π.app ⟨0⟩).toHom)) x = - (ConcreteCategory.hom (bodyFunctor.map (π.app ⟨0⟩).toHom)) - ((ConcreteCategory.hom (bodyFunctor.map g.toHom)) x) := by - rw [hcompMap] - rfl - have hidApply (z : bodyFunctor.obj Gcone.1) : - (ConcreteCategory.hom - (bodyFunctor.map ((𝟙 Gcone : Gcone ⟶ Gcone).toHom))) z = z := by - rw [hidMap] - rfl simp only [extendToGame] - change (ConcreteCategory.hom (bodyFunctor.map f.toHom)) - ((ConcreteCategory.hom - (bodyFunctor.map (gc ≫ π.app ⟨0⟩).toHom)) x) ∈ ⋃ i, W i ↔ - (ConcreteCategory.hom (bodyFunctor.map f.toHom)) - ((ConcreteCategory.hom (bodyFunctor.map (π.app ⟨0⟩).toHom)) - ((ConcreteCategory.hom - (bodyFunctor.map ((𝟙 Gcone : Gcone ⟶ Gcone).toHom))) - ((ConcreteCategory.hom (bodyFunctor.map g.toHom)) x))) ∈ ⋃ i, W i - rw [hcompApply] - let u := (ConcreteCategory.hom (bodyFunctor.map g.toHom)) x - let mapπ := ConcreteCategory.hom (bodyFunctor.map (π.app ⟨0⟩).toHom) - let mapf := ConcreteCategory.hom (bodyFunctor.map f.toHom) - have hout : mapf (mapπ ((ConcreteCategory.hom - (bodyFunctor.map ((𝟙 Gcone : Gcone ⟶ Gcone).toHom))) u)) = - mapf (mapπ u) := - congrArg (fun z ↦ mapf (mapπ z)) (hidApply u) - exact iff_of_eq (congrArg (fun z ↦ z ∈ ⋃ i, W i) hout).symm + erw [hcompMap] + conv => rhs; arg 2; rw [hidMap] + rfl }, fixing_comp k gc _ hgT <| unravelLim_fixing G0 k lemma borel_unravelable : borel _ ≤ unravelableAsMeasurable T := @@ -311,32 +267,11 @@ lemma Games.borel_determinacy (G : Games.{0}) (h : MeasurableSet[borel _] G.2.1. have hmapId : bodyFunctor.map ((𝟙 G.tree : G.tree ⟶ G.tree).toHom) = 𝟙 _ := by change bodyFunctor.map (𝟙 G.tree.1) = _ exact bodyFunctor.map_id G.tree.1 - have hmapIdApply (y : bodyFunctor.obj G.tree.1) : - (ConcreteCategory.hom - (bodyFunctor.map ((𝟙 G.tree : G.tree ⟶ G.tree).toHom))) y = y := by - rw [hmapId] - rfl - ext1 - · rfl - · ext x - constructor - · rintro ⟨y, hy, rfl⟩ - refine ⟨y, ?_, rfl⟩ - change y ∈ - (⇑(ConcreteCategory.hom - (bodyFunctor.map ((𝟙 G.tree : G.tree ⟶ G.tree).toHom)))⁻¹' G.2.1.payoff) at hy - change y ∈ G.2.1.payoff - change (ConcreteCategory.hom - (bodyFunctor.map ((𝟙 G.tree : G.tree ⟶ G.tree).toHom))) y ∈ G.2.1.payoff at hy - exact Eq.mp (congrArg (fun z ↦ z ∈ G.2.1.payoff) (hmapIdApply y)) hy - · rintro ⟨y, hy, rfl⟩ - refine ⟨y, ?_, rfl⟩ - change y ∈ - (⇑(ConcreteCategory.hom - (bodyFunctor.map ((𝟙 G.tree : G.tree ⟶ G.tree).toHom)))⁻¹' G.2.1.payoff) - change (ConcreteCategory.hom - (bodyFunctor.map ((𝟙 G.tree : G.tree ⟶ G.tree).toHom))) y ∈ G.2.1.payoff - exact Eq.mpr (congrArg (fun z ↦ z ∈ G.2.1.payoff) (hmapIdApply y)) hy + change (BorelDet'.extendToGame G.tree + ((ConcreteCategory.hom (bodyFunctor.map ((𝟙 G.tree : G.tree ⟶ G.tree).toHom)))⁻¹' + G.2.1.payoff)).2.1 = G.2.1 + rw [hmapId] + rfl rw [← hgame] change Gid.2.1.IsDetermined simpa [Gid] using (BorelDet'.borel_unravelable G.tree _ h (𝟙 G.tree)).isDetermined diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/BuildLevelwise.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/BuildLevelwise.lean index 4d13f7d119..7a247495f0 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/BuildLevelwise.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/BuildLevelwise.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeExtensions -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.BodyFunctor -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Strategies +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeExtensions +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.BodyFunctor +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Strategies +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BuildLevelwise @@ -14,6 +23,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Strategies Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame open CategoryTheory Descriptive Tree @@ -294,12 +305,13 @@ lemma bodyEquivSystem_strat {x} (S : StrategySystem T p) : rw [and_iff_right x.prop] -- `congr!` needs the quantified form exposed here. change (∀ x : T, _) ↔ _ - congr! with y hp hc - · apply mem_principalOpen_iff_bodySystem_contains - · rw [← mem_principalOpen_iff_bodySystem_contains (S.str y.val.length y hp le_rfl).val' x, - ExtensionsAt.val', principalOpen_concat, - and_iff_right ((mem_principalOpen_iff_bodySystem_contains y.val x).mpr hc)] - rfl + congr! with y hp + rw [mem_principalOpen_iff_bodySystem_contains y.val x] + congr! with hc + rw [← mem_principalOpen_iff_bodySystem_contains (S.str y.val.length y hp le_rfl).val' x, + ExtensionsAt.val', principalOpen_concat, + and_iff_right ((mem_principalOpen_iff_bodySystem_contains y.val x).mpr hc)] + rfl lemma bodyEquivSystem_strat' {x} (S : StrategySystem T p) : (bodyEquivSystem.inv.app _ x).val ∈ body (strategyEquivSystem.symm S).pre.subtree ↔ consistent x S := by diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Covering.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Covering.lean index 0b81b28729..8f2b227581 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Covering.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Covering.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BuildLevelwise +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Games +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.MiscCat import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.GaleStewart -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BuildLevelwise +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Covering @@ -13,6 +21,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BuildLevelwise Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame open CategoryTheory @@ -155,7 +165,7 @@ lemma bodyLiftExists_iff_system use ⟨(bodyEquivSystem.inv.app T.1 x).val, hmem⟩ have hmap : (bodyFunctor.map toHom) (bodyEquivSystem.inv.app T.1 x) = y' := by apply ((isIso_iff_bijective (bodyEquivSystem.hom.app U.1)).mp inferInstance).1 - simp_all + simpa only [naturality_apply_types, Iso.inv_hom_id_app_apply] using hxe exact congrArg Subtype.val hmap end Covering diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/CoveringClosedGame.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/CoveringClosedGame.lean index c11356a04e..456c549dcd 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/CoveringClosedGame.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/CoveringClosedGame.lean @@ -3,8 +3,23 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Covering +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.FinLists +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.BuildStrategies +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.BodyFunctor +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.PointedTrees +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.RestrictTree +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.GaleStewart +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.Set.Subset +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Topology.Bases /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringClosedGame @@ -12,6 +27,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Covering Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame.BorelDet open Stream'.Discrete Descriptive Tree @@ -406,7 +423,10 @@ lemma gameTree_isPruned : IsPruned <| gameTree hyp := by change x ++ ([⟨a, b⟩] : List (upA hyp)) ∈ gameTree hyp refine (gameTree_concat x ⟨a, b⟩).mpr ⟨hx, (validExt_one hlen).mpr ⟨ha, Or.inr ?_⟩⟩ refine WinningCondition.concat.mpr ⟨?_, ?_⟩ - · simpa [Set.subset_def, S, b] using h + · rw [show b = subAt (getTree' hyp x) [a] from PreStrategy.top_subtree, + pullSub_body] + rintro _ ⟨z, hz, rfl⟩ + exact not_not.mp (not_exists.mp h ⟨z, hz⟩) · exact ⟨S, rfl⟩ · use (a, subAt (getTree' hyp x) [a]) by_cases hlen' : x.length = 2 * k @@ -745,7 +765,8 @@ lemma LosingCondition.not_lost_short {x : (game hyp).tree} (hxl : 2 * k + 2 ≤ rw [Game.wonPosition_iff_disjoint] simp_rw [Set.image_preimage_eq_range_inter, Set.inter_assoc, take_coe] at hW have hp : ((Player.one.residual u).swap).residual u = Player.zero := by - simp_all + rw [Player.residual_swap, Player.residual_residual] + exact Player.residual_append_both u Player.one.swap (y := []) rw [hp] rw [Player.payoff_zero] rw [Set.eq_empty_iff_forall_notMem] @@ -755,7 +776,9 @@ lemma LosingCondition.not_lost_short {x : (game hyp).tree} (hxl : 2 * k + 2 ≤ constructor · rcases hs.1 with ⟨t, rfl⟩ exact ⟨t, rfl⟩ - · simp_all + · refine ⟨?_, hs.2⟩ + rcases hs.2 with ⟨z, _, rfl⟩ + exact z.prop have hUz := Game.WonPosition.extend z (G := G) (p := Player.one.residual u) (x := u) hU rw [Player.residual_residual] at hUz rw [← hze] at hUz diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/CoveringLim.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/CoveringLim.lean index 6ac113ed6c..163f92e811 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/CoveringLim.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/CoveringLim.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Covering +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Covering +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.InvLimitNat +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.MiscCat +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringLim @@ -12,6 +22,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Covering Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame open CategoryTheory @@ -221,6 +233,29 @@ lemma limCone_body_is_lift' (S : (LvlStratHom.system p).obj ⟨limConePt hF⟩) ext1 apply congr_arg Subtype.val (limCone_body_is_lift hF S y yc k m) +lemma limConeBodySystem_project (S : (LvlStratHom.system p).obj ⟨limConePt hF⟩) + (y : bodySystem.obj (F.obj (Opposite.op (n ⊔ 0))).1) + (yc : consistent y ((LvlStratHom.system p).map (limConeStr hF (n ⊔ 0)) S)) k : + (limConeπMap hF (n ⊔ k)) (resEq.val' ((limConeBodySystem hF S y yc).res k)) = + resEq.val' ((limConeBodyLifts hF S y yc k).1.res k) := by + change + resEq.val' + (((resEq k).map (limConeπMap hF (n ⊔ k))) + ((limConeBodySystem hF S y yc).res k)) = + resEq.val' ((limConeBodyLifts hF S y yc k).1.res k) + let : Tree.Fixing k (limConeπMap hF (n ⊔ k)) := by + synthFixing + change + resEq.val' + (((resEq k).map (limConeπMap hF (n ⊔ k))) + (inv ((resEq k).map (limConeπMap hF (n ⊔ k))) + ((limConeBodyLifts hF S y yc k).1.res k))) = + resEq.val' ((limConeBodyLifts hF S y yc k).1.res k) + exact congrArg + (resEq.val' (S := (F.obj (Opposite.op (n ⊔ k))).1)) + (cancel_inv_right_types ((resEq k).map (limConeπMap hF (n ⊔ k))) + ((limConeBodyLifts hF S y yc k).1.res k)) + lemma limConeBodySystem_map_contains (S : (LvlStratHom.system p).obj ⟨limConePt hF⟩) (y : bodySystem.obj (F.obj (Opposite.op (n ⊔ 0))).1) (yc : consistent y ((LvlStratHom.system p).map (limConeStr hF (n ⊔ 0)) S)) @@ -248,46 +283,7 @@ lemma limConeBodySystem_map_contains (S : (LvlStratHom.system p).obj ⟨limConeP conv_lhs => arg 2 rw [hc] - change - resEq.val' - (((resEq x.val.length).map (limConeπMap hF (n ⊔ x.val.length))) - ((limConeBodySystem hF S y yc).res x.val.length)) = - resEq.val' ((limConeBodyLifts hF S y yc x.val.length).1.res x.val.length) - let : Tree.Fixing x.val.length (limConeπMap hF (n ⊔ x.val.length)) := by - synthFixing - change - resEq.val' - (((resEq x.val.length).map (limConeπMap hF (n ⊔ x.val.length))) - (inv ((resEq x.val.length).map (limConeπMap hF (n ⊔ x.val.length))) - ((limConeBodyLifts hF S y yc x.val.length).1.res x.val.length))) = - resEq.val' ((limConeBodyLifts hF S y yc x.val.length).1.res x.val.length) - exact congrArg - (resEq.val' (S := (F.obj (Opposite.op (n ⊔ x.val.length))).1)) - (cancel_inv_right_types ((resEq x.val.length).map (limConeπMap hF (n ⊔ x.val.length))) - ((limConeBodyLifts hF S y yc x.val.length).1.res x.val.length)) - -lemma limConeBodySystem_project (S : (LvlStratHom.system p).obj ⟨limConePt hF⟩) - (y : bodySystem.obj (F.obj (Opposite.op (n ⊔ 0))).1) - (yc : consistent y ((LvlStratHom.system p).map (limConeStr hF (n ⊔ 0)) S)) k : - (limConeπMap hF (n ⊔ k)) (resEq.val' ((limConeBodySystem hF S y yc).res k)) = - resEq.val' ((limConeBodyLifts hF S y yc k).1.res k) := by - change - resEq.val' - (((resEq k).map (limConeπMap hF (n ⊔ k))) - ((limConeBodySystem hF S y yc).res k)) = - resEq.val' ((limConeBodyLifts hF S y yc k).1.res k) - let : Tree.Fixing k (limConeπMap hF (n ⊔ k)) := by - synthFixing - change - resEq.val' - (((resEq k).map (limConeπMap hF (n ⊔ k))) - (inv ((resEq k).map (limConeπMap hF (n ⊔ k))) - ((limConeBodyLifts hF S y yc k).1.res k))) = - resEq.val' ((limConeBodyLifts hF S y yc k).1.res k) - exact congrArg - (resEq.val' (S := (F.obj (Opposite.op (n ⊔ k))).1)) - (cancel_inv_right_types ((resEq k).map (limConeπMap hF (n ⊔ k))) - ((limConeBodyLifts hF S y yc k).1.res k)) + exact limConeBodySystem_project hF S y yc x.val.length lemma limCone_body_consistent (S : (LvlStratHom.system p).obj ⟨limConePt hF⟩) (y : bodySystem.obj (F.obj (Opposite.op (n ⊔ 0))).1) diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One.lean index e62e66e770..961f087021 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One.lean @@ -3,13 +3,21 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.Lift -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.PreLift -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.Strat +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.Lift +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.PreLift +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.Strat +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Player one proof index Import-only index for the player-one lift and strategy construction modules. -/ + +@[expose] public section diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One/Lift.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One/Lift.lean index da07551170..0a5752b73b 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One/Lift.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One/Lift.lean @@ -3,8 +3,19 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.PreLift +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.PreLift +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.GaleStewart +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.Set.Subset +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.ApplyFun +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.Lift @@ -12,9 +23,11 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.PreLift Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame.BorelDet.One -open Stream'.Discrete Descriptive Tree Game PreStrategy Covering +open Stream'.Discrete Descriptive Tree Game PreStrategy open CategoryTheory variable {A : Type*} {G : Game A} {k m n : ℕ} {hyp : Hyp G k} @@ -232,7 +245,8 @@ lemma winning_condition : WinningCondition H.toLift.liftShort.val (by simp) := b (H.toLift.liftShort.val.eq_take_concat (2 * k + 1) (by simp)) rw [hconcat] erw [List.map_append, List.map_singleton] - simp_all; rfl + simp only [Lift.liftShort_val_take, Lift.liftVeryShort_val_map, toLift_toPreLift] + rfl apply Set.mem_iUnion₂_of_mem hWon change (H.toLift.liftShort.val[2 * k + 1].1 :: u) ++ₛ a.val ∈ principalOpen (H.toLift.liftShort.val[2 * k + 1].1 :: u) @@ -326,7 +340,7 @@ lemma winnable : H.Winnable := by exact congrArg principalOpen hux lemma exists_prefix : ∃ n h, (H.take n h).Won := ⟨H.x.val.length, by simpa using H.won⟩ /-- Auxiliary declaration for the Borel determinacy formalization. -/ -noncomputable def minLength := by +noncomputable def minLength : ℕ := by classical exact Nat.find H.exists_prefix @[simp] lemma minLength_le : H.minLength ≤ H.x.val.length (α := no_index _) := by diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One/PreLift.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One/PreLift.lean index 6bca3513dc..8b07bcf8bb 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One/PreLift.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One/PreLift.lean @@ -3,9 +3,20 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringClosedGame -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.WinAsap +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringClosedGame +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.WinAsap +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BuildLevelwise +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.Set.Subset +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.ApplyFun +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.PreLift @@ -13,9 +24,11 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.WinAsap Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame.BorelDet.One -open Stream'.Discrete Descriptive Tree Game PreStrategy Covering +open Stream'.Discrete Descriptive Tree Game PreStrategy open CategoryTheory variable {A : Type*} {G : Game A} {k m n : ℕ} {hyp : Hyp G k} diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One/Strat.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One/Strat.lean index b8c5ba7761..eee1dbf127 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One/Strat.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/One/Strat.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.Lift + +import all LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.Lift + +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.Lift +import Mathlib.Tactic.Linarith.Frontend /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.Strat @@ -12,9 +17,11 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.Lift Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame.BorelDet.One -open Stream'.Discrete Descriptive Tree Game PreStrategy Covering +open Stream'.Discrete Descriptive Tree Game PreStrategy open CategoryTheory variable {A : Type*} {G : Game A} {k m n : ℕ} {hyp : Hyp G k} @@ -144,25 +151,20 @@ lemma losable_or_winnable : let ⟨n, hn⟩ := le_iff_exists_add.mp H.hlvl_le induction n generalizing H with | zero => - -- TODO: explain why this stronger disjunction helps the following `tauto`. - suffices H.preLift.Losable ∨ H.preLift.Winnable ∨ H.preLift.Won by - have (h : H.preLift.Won) : H.preLift.Winnable := (PreLift.WLift.mk _ h).winnable; tauto - have := Lift.con_of_short (hyp := hyp); tauto + by_cases h : H.preLift.Winnable + · exact Or.inr h + · exact Or.inl ⟨h, Lift.con_of_short _ hn⟩ | succ n ih => let hlong' : 2 * k + 2 ≤ H.x.val.length := by synthIsPosition let Ht := H.dropLast hlong' + by_cases hWinnable : H.preLift.Winnable + · exact Or.inr hWinnable + left + have hLosable : H.preLift.Losable' := hWinnable + refine ⟨hLosable, ?_⟩ rcases ih Ht (by dsimp [Ht]; synthIsPosition) with ih | ih - · have : ¬ H.preLift.Winnable → ¬ Ht.preLift.Winnable := by - intro hw h; apply hw; exact h.winnable_of_le (by simp [Ht, dropLast]) - have : ¬ H.preLift.Won → ¬ Ht.preLift.Won := by - intro hw h; apply hw; exact h.won_of_le (by simp [Ht, dropLast]) - suffices H.preLift.Losable ∨ H.preLift.Winnable ∨ H.preLift.Won by - have (h : H.preLift.Won) : H.preLift.Winnable := (PreLift.WLift.mk _ h).winnable; tauto - suffices ¬ Ht.preLift.Winnable → ¬ Ht.preLift.Won → ¬ H.preLift.Winnable - → H.preLift.Losable' → H.preLift.Losable by tauto - intro hnW hnW' hnW'' h; use h - by_cases IsPosition H.x.val Player.one - · let HL := PreLift.LLift.mk _ h + · by_cases IsPosition H.x.val Player.one + · let HL := PreLift.LLift.mk _ hLosable by_cases hc : HL.toLift.Con · exact hc · have hlif : (PreLift.LLift.mk _ ih.1).toLift = @@ -190,7 +192,7 @@ lemma losable_or_winnable : have hcm := HL.concat_mem_tree (a := H.x.val[2 * k + 1 + n]) (by unfold HL; synthIsPosition) (by simpa [hlist, HL] using subtree_sub _ H.x.prop) hcl (by - intro h; apply hnW''; use n + 1 + intro h; apply hWinnable; use n + 1 simp_rw [WinningPosition] at h convert h using 2 · simp [hlist, hn, HL] @@ -212,7 +214,7 @@ lemma losable_or_winnable : · change (defensiveQuasi H.preLift.game Player.one (hyp.pruned.sub _)).1.subtree = _ have hG : H.preLift.game = Ht.preLift.game := by simp [Ht, dropLast] exact Game.defensiveQuasi_subtree (hG := hG) (hp := rfl) _ - · exact Or.inr (ih.winnable_of_le (by simp [Ht, dropLast])) + · exact (hWinnable (ih.winnable_of_le (by simp [Ht, dropLast]))).elim attribute [local implicit_reducible] upA oldAsTrees gameAsTrees in lemma x_mem_tree_short' (h : n < 2 * k) (hp : IsPosition (H.x.val.take n) Player.one) : @@ -266,7 +268,9 @@ lemma x_mem_tree_short (h : n < 2 * k) (hp : IsPosition (H.x.val.take n) Player. (H.R (pInv (treeHom hyp) ((stratMap' H.R).pre.subtreeIncl (Tree.take n H.x)) (H.pInv_fixing h.le)) (H.pInv_isPosition h.le hp)).val := by have hget := congr_arg (fun x ↦ x.val[n]?) (H.x_mem_tree_short' h hp) - conv at hget => simp + simp only [take_coe, List.getElem?_take_of_lt (Nat.lt_succ_self n), + ExtensionsAt.valT'_coe] at hget + erw [pInv_treeHom_val (hyp := hyp) _ (List.length_take_le _ _)] at hget apply Option.some_injective have hHlvl := H.hlvl have hnbase : diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/WinAsap.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/WinAsap.lean index a2bc490e4c..a8c71a4883 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/WinAsap.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/WinAsap.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.GaleStewart +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.BuildStrategies +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.WinAsap @@ -12,6 +19,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.GaleStewart Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + lemma choose_eq {α : Type*} {p q : α → Prop} (hpq : ∀ a, p a ↔ q a) (h : ∃ a, p a) : h.choose = (by simpa [hpq] using h : ∃ a, q a).choose := by @@ -55,12 +64,15 @@ lemma winningPrefix_of_residual {x y : List A} obtain ⟨n, hW⟩ := hW; use x.length + n convert hW using 1 · simp_rw [List.take_length_add_append, residual_append] - · synthIsPosition + · rw [List.take_length_add_append, Player.residual_residual, ← List.append_assoc, + ← Player.residual_residual] + have hcancel : p.residual (x ++ x) = p := Player.residual_append_both x p (y := []) + rw [hcancel] section «Section2» variable {x : List A} (h : WinningPrefix G p x) /-- the length of the shortest prefix of `x` that is winning for `p` -/ -noncomputable def num := by +noncomputable def num : ℕ := by classical exact Nat.find h lemma num_spec : (G.residual (x.take h.num)).ExistsWinning (p.residual (x.take h.num)) := by @@ -190,7 +202,7 @@ lemma val_cast' {T T' : tree A} {b : T} {b' : T'} (hT : T = T') cast (by subst hT h; rfl) x = y ↔ x.val = y.val := by subst h hT; symm; apply Subtype.val_inj lemma cast_val {T y} (h : x = y) (a : subAt T x) : - Subtype.val (cast (by rw [h]) a) = a.val := by + Subtype.val (cast (show ↥(subAt T x) = ↥(subAt T y) by rw [h]) a) = a.val := by symm; apply (val_cast h a (cast (by rw [h]) a)).mp; rfl lemma hEq_drop_take {y} (hy : y ∈ subAt G.tree (x.take h.num)) (hxy) : HEq (Tree.drop _ (h.shrink.extend y).num diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero.lean index 5f968dceec..c023680d47 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.Lift -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.PreLift -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.Strat -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.TreeLift +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.Lift +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.PreLift +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.Strat +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.TreeLift +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Player zero proof index Import-only index for the player-zero lift and strategy construction modules. -/ + +@[expose] public section diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/Lift.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/Lift.lean index 2a3a43f13e..1408fe0ca3 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/Lift.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/Lift.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.PreLift +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.PreLift +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.GaleStewart +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.Lift @@ -12,9 +21,11 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.PreLift Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame.BorelDet.Zero -open Stream'.Discrete Descriptive Tree Game PreStrategy Covering +open Stream'.Discrete Descriptive Tree Game PreStrategy open CategoryTheory variable {A : Type*} {G : Game A} {k : ℕ} {hyp : Hyp G k} {m n : ℕ} @@ -241,7 +252,7 @@ lemma losable (h : H.ConLong) : H.Losable := by lemma exists_prefix : ∃ n h, (H.take n h).Lost' := ⟨H.x.val.length, H.h'lvl, by simpa using H.lost'⟩ /-- Auxiliary declaration for the Borel determinacy formalization. -/ -noncomputable def minLength := by +noncomputable def minLength : ℕ := by classical exact Nat.find H.exists_prefix @[simp] lemma minLength_le : H.minLength ≤ H.x.val.length (α := no_index _) := by @@ -386,90 +397,52 @@ lemma lift_mem n : hL.1.mk.toWLLift.liftMediumVal ++ simp only [List.take_add_one, List.zipInitsMap_append, List.getElem?_drop] at ih ⊢ by_cases hn : 2 * k + 2 + n ≥ H.x.val.length · simp_all - · rw [List.getElem?_eq_getElem (by as_aux_lemma => omega)]; conv => simp [← List.append_assoc] - use ih; rw [getTree_eq' _ ih] + · rw [List.getElem?_eq_getElem (by as_aux_lemma => omega), Option.toList_some, + List.zipInitsMap_singleton, ← List.append_assoc, gameTree_concat] + refine ⟨ih, ?_⟩ + rw [validExt_long (by simp), getTree_eq' _ ih] refine ⟨?_, by rw [List.take_left' (WLLift.liftMediumVal_length _)] simp only [WLLift.getTree_liftMediumVal, WLLift.liftMediumVal_length, List.drop_left', subAt_append] congr symm - calc - List.map Prod.fst - ((List.take n (List.drop (2 * k + 2) H.x.val)).zipInitsMap fun a y ↦ - (a, subAt hL.1.mk.toWLLift.liftTree y)) = - (List.take n (List.drop (2 * k + 2) H.x.val)).zipInitsMap - (fun a _ ↦ a) := - (List.zipInitsMap_map - (x := List.take n (List.drop (2 * k + 2) H.x.val)) - (f := fun a y ↦ (a, subAt hL.1.mk.toWLLift.liftTree y)) - (g := Prod.fst)).symm - _ = List.take n (List.drop (2 * k + 2) H.x.val) := by - simp⟩ + rw [← List.zipInitsMap_map, List.zipInitsMap_eq_map, List.map_id']⟩ rw [List.take_left' (WLLift.liftMediumVal_length _)] simp only [LLift.toWLLift, Lost'.mk_toLift, LLift.takeMin_x_coe, WLLift.getTree_liftMediumVal, WLLift.liftMediumVal_length, List.drop_left', mem_subAt] - have htail_map : List.map Prod.fst - ((List.take n (List.drop (2 * k + 2) H.x.val)).zipInitsMap fun a y ↦ - (a, subAt (pullSub (subAt G.tree (List.take hL.1.mk.minLength H.x.val)) - (List.drop (2 * k + 2) (List.take hL.1.mk.minLength H.x.val))) y)) = - List.take n (List.drop (2 * k + 2) H.x.val) := by - calc - List.map Prod.fst - ((List.take n (List.drop (2 * k + 2) H.x.val)).zipInitsMap fun a y ↦ - (a, subAt - (pullSub (subAt G.tree (List.take hL.1.mk.minLength H.x.val)) - (List.drop (2 * k + 2) (List.take hL.1.mk.minLength H.x.val))) - y)) = - (List.take n (List.drop (2 * k + 2) H.x.val)).zipInitsMap - (fun a _ ↦ a) := - (List.zipInitsMap_map - (x := List.take n (List.drop (2 * k + 2) H.x.val)) - (f := fun a y ↦ - (a, subAt - (pullSub (subAt G.tree (List.take hL.1.mk.minLength H.x.val)) - (List.drop (2 * k + 2) (List.take hL.1.mk.minLength H.x.val))) - y)) - (g := Prod.fst)).symm - _ = List.take n (List.drop (2 * k + 2) H.x.val) := by - simp - have hmem : List.take n (List.drop (2 * k + 2) H.x.val) ++ - [H.x.val[2 * k + 2 + n]] ∈ - pullSub (subAt G.tree (List.take hL.1.mk.minLength H.x.val)) - (List.drop (2 * k + 2) (List.take hL.1.mk.minLength H.x.val)) := by - by_cases hshort : 2 * k + 2 + n + 1 ≤ hL.1.mk.minLength - · rw [mem_pullSub_short (by as_aux_lemma => simp; omega)] - constructor - · have hdrop : n < (List.drop (2 * k + 2) H.x.val).length := by - simp [List.length_drop] - omega - rw [(show H.x.val[2 * k + 2 + n] = - (H.x.val.drop (2 * k + 2))[n]'hdrop by - rw [List.getElem_drop'])] - rw [List.take_concat_get'] - simp [List.drop_take] - omega - · simp only [mem_subAt, List.append_nil] - exact hL.1.mk.takeMin.x.prop - · rw [mem_pullSub_long (by as_aux_lemma => simp; omega)] - use ((H.x.val.drop (2 * k + 2)).drop - (hL.1.mk.minLength - (2 * k + 2))).take - (2 * k + n + 3 - hL.1.mk.minLength), by - apply take_mem ⟨_, _⟩ - simp [mem_subAt] - have hdrop : n < (List.drop (2 * k + 2) H.x.val).length := by + rw [← List.zipInitsMap_map, List.zipInitsMap_eq_map, List.map_id'] + by_cases hshort : 2 * k + 2 + n + 1 ≤ hL.1.mk.minLength + · rw [mem_pullSub_short (by as_aux_lemma => simp; omega)] + constructor + · have hdrop : n < (List.drop (2 * k + 2) H.x.val).length := by simp [List.length_drop] omega rw [(show H.x.val[2 * k + 2 + n] = (H.x.val.drop (2 * k + 2))[n]'hdrop by rw [List.getElem_drop'])] rw [List.take_concat_get'] - erw [List.drop_take, ← List.take_add, List.take_eq_take_iff, List.length_drop] - have := hL.1.mk.le_minLength + simp [List.drop_take] omega - convert hmem using 1 - exact congrArg (fun xs => xs ++ [H.x.val[2 * k + 2 + n]]) htail_map + · simp only [mem_subAt, List.append_nil] + exact hL.1.mk.takeMin.x.prop + · rw [mem_pullSub_long (by as_aux_lemma => simp; omega)] + use ((H.x.val.drop (2 * k + 2)).drop + (hL.1.mk.minLength - (2 * k + 2))).take + (2 * k + n + 3 - hL.1.mk.minLength), by + apply take_mem ⟨_, _⟩ + simp [mem_subAt] + have hdrop : n < (List.drop (2 * k + 2) H.x.val).length := by + simp [List.length_drop] + omega + rw [(show H.x.val[2 * k + 2 + n] = + (H.x.val.drop (2 * k + 2))[n]'hdrop by + rw [List.getElem_drop'])] + rw [List.take_concat_get'] + erw [List.drop_take, ← List.take_add, List.take_eq_take_iff, List.length_drop] + have := hL.1.mk.le_minLength + omega /-- Auxiliary declaration for the Borel determinacy formalization. -/ @[simps toWLLift] def toLLift' : WLLift' hyp where toWLLift := hL.1.mk.toWLLift diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/PreLift.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/PreLift.lean index 3886541705..5549996633 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/PreLift.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/PreLift.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringClosedGame -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.WinAsap +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringClosedGame +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.WinAsap +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BuildLevelwise +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.PreLift @@ -13,9 +22,11 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.WinAsap Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame.BorelDet.Zero -open Stream'.Discrete Descriptive Tree Game PreStrategy Covering +open Stream'.Discrete Descriptive Tree Game PreStrategy open CategoryTheory variable {A : Type*} {G : Game A} {k : ℕ} {hyp : Hyp G k} {m n : ℕ} @@ -196,27 +207,15 @@ attribute [local implicit_reducible] upA oldAsTrees gameAsTrees in rw [H.liftShort.val.eq_take_concat (2 * k) (by simp)] conv => rhs; rw [(H.x.val.take (2 * k + 1)).eq_take_concat (2 * k) (by simp), List.getElem_take, H.conShort] - calc - List.map Prod.fst (List.take (2 * k) H.liftShort.val ++ [H.liftShort.val[2 * k]]) = - List.map Prod.fst (List.take (2 * k) H.liftShort.val) ++ - [H.liftShort.val[2 * k].1] := List.map_append .. - _ = List.take (2 * k) (List.take (2 * k + 1) H.x.val) ++ - [H.liftShort.val[2 * k].1] := by - congr 1 - unfold PreLift.liftShort - simp only [ExtensionsAt.valT'_coe] - have htake : List.map Prod.fst - (List.take (2 * k) - (H.R (pInv (treeHom hyp) (Tree.take (2 * k) H.x)) - H.toPreLift.pInv_take_position H.toPreLift.pInv_take_length_le).val') = - List.map Prod.fst (pInv (treeHom hyp) (Tree.take (2 * k) H.x)).val := by - congr - exact ExtensionsAt.val'_take_of_eq _ H.toPreLift.pInv_take_length.symm - rw [htake] - change (treeHom hyp (pInv (treeHom hyp) (Tree.take (2 * k) H.x))).val = - List.take (2 * k) (List.take (2 * k + 1) H.x.val) - rw [cancel_pInv_right] - simp [List.take_take] + rw [List.map_append, List.map_singleton] + congr 1 + unfold PreLift.liftShort + simp only [ExtensionsAt.valT'_coe] + erw [ExtensionsAt.val'_take_of_eq _ H.toPreLift.pInv_take_length.symm] + change (treeHom hyp (pInv (treeHom hyp) (Tree.take (2 * k) H.x))).val = + List.take (2 * k) (List.take (2 * k + 1) H.x.val) + rw [cancel_pInv_right] + simp [List.take_take] lemma liftShort_lift : treeHom hyp H.liftShort = Tree.take (2 * k + 1) H.x := tree_ext H.liftShort_val_map /-- Auxiliary declaration for the Borel determinacy formalization. -/ diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/Strat.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/Strat.lean index fac75b6336..fb02c03468 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/Strat.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/Strat.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.TreeLift +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.TreeLift +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.GaleStewart +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.Set.Subset +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.Strat @@ -12,9 +22,11 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.TreeLift Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame.BorelDet.Zero -open Stream'.Discrete Descriptive Tree Game PreStrategy Covering +open Stream'.Discrete Descriptive Tree Game PreStrategy open CategoryTheory variable {A : Type*} {G : Game A} {k : ℕ} {hyp : Hyp G k} {m n : ℕ} @@ -51,7 +63,7 @@ attribute [simp_lengths] bodyTake_x takeLift_x_coe lemma losable_of_losable_not_lost n (hL : (takeLift y n).Losable) (h' : ∀ m, ¬ (takeLift y m).Lost) m (hm : hL.2.num ≤ m + 1) : (takeLift y m).Losable := by have hc m : (takeLift y m).ConLong := by - have := (bodyTake y m).conLong_or_lost; tauto + exact (bodyTake y m).conLong_or_lost.resolve_right (fun ⟨_, hLost⟩ ↦ h' m hLost) use hc m; by_cases hW : WinningPrefix (takeLift y m).game Player.one ((body.take (2 * k + 2 + m) y).val.drop (2 * k + 1)) · exact hW @@ -232,12 +244,13 @@ lemma lost_of_body_lost (hy : ⟨y.val, body_mono (subtree_sub _) y.prop⟩ ∉ rw [← Subtype.val_injective.mem_set_image, ← (isClosed_image_payoff.mp hyp.closed).closure_eq, mem_closure_iff_nhds_basis (hasBasis_principalOpen y.val)] at hy - conv at hy => simp + simp only [Set.mem_image, Subtype.exists, exists_and_right, exists_eq_right, + not_forall, not_exists, not_and, forall_exists_index] at hy obtain ⟨x, hx1, hx2⟩ := hy; use x.length apply TreeLift.lost_of_lost'; unfold Lift.Lost' rw [wonPosition_iff_disjoint, ← Set.subset_empty_iff] intro z ⟨h1, h2⟩ - conv at h1 => simp + simp only [TreeLift.lift_toPreLift, TreeLift.preLift_x_coe, bodyTake_x, body.take_coe] at h1 conv at h2 => simp apply hx2 z · exact h2.2 diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/TreeLift.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/TreeLift.lean index 2ade463949..41a5e86918 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/TreeLift.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Proof/Zero/TreeLift.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.Lift + +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.Lift +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.TreeLift @@ -12,9 +21,11 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.Lift Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace GaleStewartGame.BorelDet.Zero -open Stream'.Discrete Descriptive Tree Game PreStrategy Covering +open Stream'.Discrete Descriptive Tree Game PreStrategy open CategoryTheory variable {A : Type*} {G : Game A} {k : ℕ} {hyp : Hyp G k} {m n : ℕ} @@ -310,25 +321,7 @@ lemma x_mem_tree_short' h' (h : n ≤ 2 * k) (hp : IsPosition (H.x.val.take n) P (h := hcancel) (a := H.R (pInv (treeHom hyp) ((stratMap' H.R).pre.subtreeIncl (Tree.take n H.x)) (H.pInv_fixing h.le)) (H.pInv_isPosition h.le hp))).symm - · have harg : - pInv (treeHom hyp) (Tree.take (2 * k) H.preLift.x) = - pInv (treeHom hyp) ((stratMap' H.R).pre.subtreeIncl (Tree.take (2 * k) H.x)) - (H.pInv_fixing h) := by - ext1 - rw [pInv_treeHom_val] - · rw [pInv_treeHom_val] - · change pInvTreeHomMap hyp (List.take (2 * k) H.x.val) = - pInvTreeHomMap hyp (List.take (2 * k) H.x.val) - rfl - · change (List.take (2 * k) H.x.val).length ≤ 2 * k - exact List.length_take_le (2 * k) H.x.val - · simp_all - have hval := Strategy.eval_val_congr H.R H.R rfl - (pInv (treeHom hyp) (Tree.take (2 * k) H.preLift.x)) - (pInv (treeHom hyp) ((stratMap' H.R).pre.subtreeIncl (Tree.take (2 * k) H.x)) - (H.pInv_fixing h)) - harg H.preLift.pInv_take_position - have hsystem := strategyEquivSystem_apply_str H.R (2 * k) + · have hsystem := strategyEquivSystem_apply_str H.R (2 * k) (pInv (treeHom hyp) (Tree.take (2 * k) H.preLift.x)) H.preLift.pInv_take_position H.preLift.pInv_take_length_le ext1 @@ -346,13 +339,9 @@ lemma x_mem_tree_short' h' (h : n ≤ 2 * k) (hp : IsPosition (H.x.val.take n) P (H.R (pInv (treeHom hyp) (Tree.take (2 * k) H.preLift.x)) H.preLift.pInv_take_position).val' = (pInv (treeHom hyp) (Tree.take (2 * k) H.preLift.x)).val := htake - _ = (pInv (treeHom hyp) - ((stratMap' H.R).pre.subtreeIncl (Tree.take (2 * k) H.x)) - (H.pInv_fixing h)).val := - congrArg Subtype.val harg _ = pInvTreeHomMap hyp (List.take (2 * k) H.x.val) := by rw [pInv_treeHom_val] - all_goals simp [subtreeIncl_coe, take_coe] + all_goals simp [take_coe] · let a := (strategyEquivSystem H.R).str (2 * k) (pInv (treeHom hyp) (Tree.take (2 * k) H.preLift.x)) H.preLift.pInv_take_position H.preLift.pInv_take_length_le @@ -370,7 +359,7 @@ lemma x_mem_tree_short' h' (h : n ≤ 2 * k) (hp : IsPosition (H.x.val.take n) P change a.val'[2 * k]'hindex = (H.R (pInv (treeHom hyp) ((stratMap' H.R).pre.subtreeIncl (Tree.take (2 * k) H.x)) (H.pInv_fixing h)) (H.pInv_isPosition h hp)).val - exact hlast.trans ((congrArg Subtype.val hsystem).trans hval) + exact hlast.trans (congrArg Subtype.val hsystem) attribute [local implicit_reducible] upA oldAsTrees gameAsTrees in lemma x_mem_tree_short h' (h : n ≤ 2 * k) (hp : IsPosition (H.x.val.take n) Player.zero) : (H.lift h').liftShort.val[n]'(by simpa [Nat.lt_iff_add_one_le]) = @@ -378,7 +367,8 @@ lemma x_mem_tree_short h' (h : n ≤ 2 * k) (hp : IsPosition (H.x.val.take n) Pl (H.pInv_fixing h)) (H.pInv_isPosition h hp)).val := by have hget := congr_arg (fun x ↦ x.val[n]?) (H.x_mem_tree_short' h' h hp) - conv at hget => simp + simp only [lift_toPreLift, take_coe, List.getElem?_take_of_lt (Nat.lt_succ_self n), + ExtensionsAt.valT'_coe] at hget apply Option.some_injective erw [← List.getElem?_eq_getElem (by simpa [Nat.lt_iff_add_one_le]), hget, List.getElem?_eq_getElem (by @@ -409,7 +399,7 @@ lemma x_mem_tree_short h' (h : n ≤ 2 * k) (hp : IsPosition (H.x.val.take n) Pl def WinnableOrLost := ∃ h, (H.lift h).Winnable ∨ (H.lift h).Lost variable (hWL : H.WinnableOrLost) /-- Auxiliary declaration for the Borel determinacy formalization. -/ -noncomputable def wLLift' := by +noncomputable def wLLift' : WLLift' hyp := by classical exact if hW : (H.lift hWL.1).Winnable then diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/QualityAliases.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/QualityAliases.lean index e313e7d87d..82aafb1792 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/QualityAliases.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/QualityAliases.lean @@ -3,28 +3,12 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.Choquet -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.FinLists -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.BuildStrategies -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.GaleStewart -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Games -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Strategies -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Undetermined -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BorelDeterminacy -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BuildLevelwise -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Covering -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.CoveringClosedGame -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.Lift -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.One.PreLift -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.Lift -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.Zero.PreLift -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.BodyFunctor -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.PointedTrees -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.RestrictTree -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeBody -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeExtensions -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.Trees +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Applications.Choquet +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.GaleStewart +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.Undetermined +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Proof.BorelDeterminacy /-! # Root aliases for dotted declarations @@ -33,6 +17,8 @@ These aliases preserve names that Lean Pool's deterministic quality audit derive from dotted declarations inside namespaces. -/ +@[expose] public section + namespace AllWinning alias residual := GaleStewartGame.Game.AllWinning.residual end AllWinning diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree.lean index 3d18ce9af2..f8905e8725 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree.lean @@ -3,18 +3,26 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.BodyFunctor -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.LenTreeHom -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.PointedTrees -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.RestrictTree -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeBody -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeExtensions -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeLim -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.Trees +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.BodyFunctor +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.LenTreeHom +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.PointedTrees +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.RestrictTree +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeBody +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeExtensions +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeLim +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.Trees +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Tree index Import-only index for tree, body, restriction, limit, and functoriality modules. -/ + +@[expose] public section diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/BodyFunctor.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/BodyFunctor.lean index abaffeabcc..1945e94a8c 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/BodyFunctor.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/BodyFunctor.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeBody -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.LenTreeHom +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeBody +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.LenTreeHom +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.BodyFunctor @@ -13,6 +22,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.LenTreeHom Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace Descriptive.Tree open CategoryTheory diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/LenTreeHom.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/LenTreeHom.lean index 45d14e9487..155e6afdcc 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/LenTreeHom.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/LenTreeHom.lean @@ -3,11 +3,21 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import Mathlib.Order.Category.PartOrd -import Mathlib.Topology.Category.TopCat.Basic -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.Trees +public import Mathlib.Order.Category.PartOrd +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.Trees +public import Mathlib.Tactic.Continuity +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.MiscCat +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.ApplyFun +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.LenTreeHom @@ -15,6 +25,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.MiscCat Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + open CategoryTheory diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/PointedTrees.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/PointedTrees.lean index 1ffd5b029c..498edcf6e0 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/PointedTrees.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/PointedTrees.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.LenTreeHom +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.LenTreeHom +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.MiscCat +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.PointedTrees @@ -12,6 +20,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.LenTreeHom Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace Descriptive.Tree open CategoryTheory Descriptive diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/RestrictTree.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/RestrictTree.lean index 889eb111d6..bfbeb46fd4 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/RestrictTree.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/RestrictTree.lean @@ -3,8 +3,22 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.LenTreeHom +public import Mathlib.Data.NNRat.Defs + +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.LenTreeHom +public import Mathlib.CategoryTheory.Limits.FunctorCategory.Basic +public meta import Mathlib.Tactic.Basic +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.MiscCat +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ApplyFun +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.RestrictTree @@ -12,6 +26,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.LenTreeHom Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace Descriptive.Tree open CategoryTheory @@ -27,8 +43,8 @@ variable {S T U : Trees} {k m n : ℕ} intro x a ⟨h1, h2⟩; use mem_of_append h1 simp_rw [List.length_append, List.length_singleton] at h2; omega }⟩ map f := { - toFun := fun x ↦ ⟨(f ⟨x.val, x.prop.1⟩).val, by - constructor <;> simp only [SetLike.coe_mem, LenHom.h_length_simp, x.prop.2]⟩ + toFun := fun x ↦ ⟨(f ⟨x.val, x.prop.1⟩).val, + ⟨(f ⟨x.val, x.prop.1⟩).prop, (f.h_length _).trans_le x.prop.2⟩⟩ monotone' := fun _ _ h ↦ f.monotone' h h_length := fun x ↦ by exact f.h_length ⟨Subtype.val x, (Subtype.prop x).1⟩ } @@ -79,7 +95,7 @@ lemma resEq_val (f : S ⟶ T) (k : ℕ) x : /-- Auxiliary declaration for the Borel determinacy formalization. -/ def resIncl {k m} (h : k ≤ m) : resEq k ⟶ res m ⋙ forget Trees where - app := fun _ ↦ TypeCat.ofHom fun x ↦ ⟨x.val, ⟨x.prop.1, by linarith [x.prop.2]⟩⟩ + app := fun _ ↦ TypeCat.ofHom fun x ↦ ⟨x.val, ⟨x.prop.1, x.prop.2.trans_le h⟩⟩ naturality _ _ _ := rfl lemma resIncl_len (h : k ≤ m) x : ((resIncl h).app S x).val.length (α := S.1) = k := x.prop.2 diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/TreeBody.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/TreeBody.lean index 482ee1e8c0..2b9e4b1669 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/TreeBody.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/TreeBody.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.InfLists -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.Trees +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.InfLists +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.Trees +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ApplyFun +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeBody @@ -13,6 +22,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.Trees Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace Descriptive.Tree open Stream'.Discrete diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/TreeExtensions.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/TreeExtensions.lean index 9afd59ee61..d9e5c6ec01 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/TreeExtensions.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/TreeExtensions.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeLim -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.PointedTrees +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeLim +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.PointedTrees +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeExtensions @@ -13,6 +22,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.PointedTrees Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace Descriptive.Tree open CategoryTheory Descriptive diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/TreeLim.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/TreeLim.lean index 115707006b..6d31349b2b 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/TreeLim.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/TreeLim.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import Mathlib.CategoryTheory.Adjunction.Limits -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.RestrictTree +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.RestrictTree +public import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.FinLists +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.InvLimitNat +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.CategoryTheory.Adjunction.Limits +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ApplyFun +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.TreeLim @@ -14,6 +24,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.InvLimitNat Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace Descriptive.Tree open CategoryTheory diff --git a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/Trees.lean b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/Trees.lean index 883c4f6745..1be69b3c8b 100644 --- a/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/Trees.lean +++ b/LeanPool/AFormalizationOfBorelDeterminacyInLean/Tree/Trees.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Sven Manthe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sven Manthe -/ +module -import Mathlib.SetTheory.Descriptive.Tree -import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.FinLists +public import Mathlib.SetTheory.Descriptive.Tree +public import Mathlib.Algebra.Group.End +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.General +import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.Meta +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.AFormalizationOfBorelDeterminacyInLean.Tree.Trees @@ -13,6 +22,8 @@ import LeanPool.AFormalizationOfBorelDeterminacyInLean.Basic.FinLists Auxiliary declarations for the Borel determinacy formalization. -/ +@[expose] public section + namespace Descriptive.Tree --TODO if continue commits, add newline between declarations before diff --git a/LeanPool/AgreeToDisagree.lean b/LeanPool/AgreeToDisagree.lean index 2c9b524c10..c62a7f54a8 100644 --- a/LeanPool/AgreeToDisagree.lean +++ b/LeanPool/AgreeToDisagree.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Axiom Math contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: AgreeToDisagree contributors -/ +module -import LeanPool.AgreeToDisagree.AgreeToDisagree -import LeanPool.AgreeToDisagree.AgreeToDisagreeBeliefs +public import LeanPool.AgreeToDisagree.AgreeToDisagree +public import LeanPool.AgreeToDisagree.AgreeToDisagreeBeliefs +import Mathlib.Analysis.Normed.Group.Basic /-! # Aumann's Agreement Theorem @@ -18,6 +20,8 @@ Tags: probability, game-theory, epistemic-logic MSC: 60A10, 91A40 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/AgreeToDisagree/AgreeToDisagree.lean b/LeanPool/AgreeToDisagree/AgreeToDisagree.lean index d3294602e0..1f8f192400 100644 --- a/LeanPool/AgreeToDisagree/AgreeToDisagree.lean +++ b/LeanPool/AgreeToDisagree/AgreeToDisagree.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Axiom Math contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: AgreeToDisagree contributors -/ -import Mathlib.Data.Setoid.Partition -import Mathlib.MeasureTheory.Measure.Typeclasses.Probability +module + +public import Mathlib.Data.Setoid.Partition +public import Mathlib.MeasureTheory.Measure.Typeclasses.Probability import Mathlib.MeasureTheory.Measure.Typeclasses.SFinite /-! @@ -14,6 +16,8 @@ This file develops information partitions and conditional probabilities needed for Aumann's agreement theorem. -/ +@[expose] public section + namespace AgreeToDisagree open Set diff --git a/LeanPool/AgreeToDisagree/AgreeToDisagreeBeliefs.lean b/LeanPool/AgreeToDisagree/AgreeToDisagreeBeliefs.lean index 1064ef41cf..5eb7ac59cf 100644 --- a/LeanPool/AgreeToDisagree/AgreeToDisagreeBeliefs.lean +++ b/LeanPool/AgreeToDisagree/AgreeToDisagreeBeliefs.lean @@ -3,12 +3,10 @@ Copyright (c) 2026 Axiom Math contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: AgreeToDisagree contributors -/ -import LeanPool.AgreeToDisagree.AgreeToDisagree +module + +public import LeanPool.AgreeToDisagree.AgreeToDisagree import Mathlib.Analysis.Normed.Group.InfiniteSum -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Push -import Mathlib.Topology.Algebra.InfiniteSum.Order /-! # Approximate agreement under common belief @@ -16,6 +14,8 @@ import Mathlib.Topology.Algebra.InfiniteSum.Order This file proves the `p`-belief version of Aumann's agreement theorem. -/ +@[expose] public section + namespace AgreeToDisagree open Set MeasureTheory diff --git a/LeanPool/AharoniKorman.lean b/LeanPool/AharoniKorman.lean index 44c39772ba..8c16ff9476 100644 --- a/LeanPool/AharoniKorman.lean +++ b/LeanPool/AharoniKorman.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ +module -import LeanPool.AharoniKorman.Counterexample +public import LeanPool.AharoniKorman.Counterexample +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! # Disproof of the Aharoni-Korman Conjecture @@ -17,6 +20,8 @@ Tags: order-theory, combinatorics, partial-orders MSC: 06A06, 06A07 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/AharoniKorman/Counterexample.lean b/LeanPool/AharoniKorman/Counterexample.lean index e4a2b009ef..2734933414 100644 --- a/LeanPool/AharoniKorman/Counterexample.lean +++ b/LeanPool/AharoniKorman/Counterexample.lean @@ -3,17 +3,23 @@ Copyright (c) 2026 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ +module +public import Mathlib.Data.Setoid.Partition + +public import Mathlib.Algebra.Group.End +public import Mathlib.Algebra.Order.Ring.Unbundled.Rat +public import Mathlib.Data.Nat.Cast.Order.Ring +public import Mathlib.Order.Filter.AtTopBot.Defs +public import Mathlib.Order.WellFoundedSet +import LeanPool.AharoniKorman.ForMathlib.Misc import Mathlib.Algebra.Order.Field.Basic -import Mathlib.Algebra.Order.Field.Rat +import Mathlib.Algebra.Order.Ring.Rat import Mathlib.Algebra.Order.Star.Basic import Mathlib.Basic.Countable.Basic -import Mathlib.Data.Setoid.Partition import Mathlib.Order.Filter.AtTopBot.Basic import Mathlib.Order.Interval.Set.Infinite -import LeanPool.AharoniKorman.ForMathlib.Misc - /-! # Disproof of the Aharoni–Korman conjecture @@ -71,6 +77,8 @@ aim of reaching a contradiction (as then, no such partition can exist). We may f we have a contradiction (`no_spinalMap`), and therefore show that no spinal map exists. -/ +@[expose] public section + attribute [aesop 2 simp] Set.subset_def Finset.subset_iff namespace LeanPool.AharoniKorman @@ -205,7 +213,7 @@ partial order. -/ def embed (n : ℕ) : ℕ × ℕ ↪o Hollom where toFun x := h(x.1, x.2, n) - inj' := embed_injective n + inj' := private embed_injective n map_rel_iff' := by simp lemma embed_apply (n : ℕ) (x y : ℕ) : embed n (x, y) = h(x, y, n) := rfl diff --git a/LeanPool/AharoniKorman/ForMathlib.lean b/LeanPool/AharoniKorman/ForMathlib.lean index 434cf22b9b..8b7fb35b2e 100644 --- a/LeanPool/AharoniKorman/ForMathlib.lean +++ b/LeanPool/AharoniKorman/ForMathlib.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ +module -import LeanPool.AharoniKorman.ForMathlib.Misc +public import LeanPool.AharoniKorman.ForMathlib.Misc +import Mathlib.Data.Finset.Attr /-! # Auxiliary order lemmas for the Aharoni-Korman import This module collects helper lemmas used by the Aharoni-Korman counterexample. -/ + +@[expose] public section diff --git a/LeanPool/AharoniKorman/ForMathlib/Misc.lean b/LeanPool/AharoniKorman/ForMathlib/Misc.lean index eaf06eb92e..d66f58a520 100644 --- a/LeanPool/AharoniKorman/ForMathlib/Misc.lean +++ b/LeanPool/AharoniKorman/ForMathlib/Misc.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ +module -import Mathlib.Order.Preorder.Chain -import Mathlib.Order.WellFoundedSet +public import Mathlib.Order.Antichain +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Attr.Core /-! # Results for mathlib @@ -14,6 +16,8 @@ A collection of results for the disproof of the Aharoni–Korman conjecture whic mathlib. -/ +@[expose] public section + namespace LeanPool.AharoniKorman lemma chain_intersect_antichain {α : Type*} [PartialOrder α] {s t : Set α} diff --git a/LeanPool/AndersonConjecture.lean b/LeanPool/AndersonConjecture.lean index 7d58814c37..6582888000 100644 --- a/LeanPool/AndersonConjecture.lean +++ b/LeanPool/AndersonConjecture.lean @@ -3,15 +3,20 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ - -import LeanPool.AndersonConjecture.AdicKerEval -import LeanPool.AndersonConjecture.AdicLocal -import LeanPool.AndersonConjecture.AdicNoetherian -import LeanPool.AndersonConjecture.Basic -import LeanPool.AndersonConjecture.CompleteDomain -import LeanPool.AndersonConjecture.Jensen -import LeanPool.AndersonConjecture.Main -import LeanPool.AndersonConjecture.QuasiCompleteRing +module + +public import LeanPool.AndersonConjecture.AdicKerEval +public import LeanPool.AndersonConjecture.AdicLocal +public import LeanPool.AndersonConjecture.AdicNoetherian +public import LeanPool.AndersonConjecture.Basic +public import LeanPool.AndersonConjecture.CompleteDomain +public import LeanPool.AndersonConjecture.Jensen +public import LeanPool.AndersonConjecture.Main +public import LeanPool.AndersonConjecture.QuasiCompleteRing +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Inv /-! # The Anderson Conjecture: A Weakly Quasi-Complete Ring Need Not Be Quasi-Complete @@ -24,6 +29,8 @@ Tags: commutative-algebra, ring-theory MSC: 13B35, 13H10 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/AndersonConjecture/AdicKerEval.lean b/LeanPool/AndersonConjecture/AdicKerEval.lean index 92826136df..c04c5af0b8 100644 --- a/LeanPool/AndersonConjecture/AdicKerEval.lean +++ b/LeanPool/AndersonConjecture/AdicKerEval.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import Mathlib.Algebra.Lie.OfAssociative -import Mathlib.RingTheory.AdicCompletion.AsTensorProduct -import Mathlib.RingTheory.PicardGroup +module + +public import Mathlib.RingTheory.AdicCompletion.Algebra +public import Mathlib.RingTheory.LocalRing.MaximalIdeal.Defs +import Mathlib.RingTheory.AdicCompletion.Completeness +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Tactic.Positivity.Finset /-! # Kernel of the Evaluation Map on Adic Completions @@ -13,10 +17,12 @@ import Mathlib.RingTheory.PicardGroup For a Noetherian local ring (R, M) and n : N, an element of the M-adic completion that maps to zero under the canonical projection to R/M^n must lie in the n-th power of the extended maximal ideal. -This uses the short exact sequence relating the completion to -successive quotients. +This follows from the kernel description for evaluation on a +finitely generated adic completion. -/ +@[expose] public section + open scoped Pointwise open AdicCompletion @@ -35,7 +41,8 @@ lemma smul_eq_zero_of_quotient (I : Ideal R) (n : ℕ) change Submodule.Quotient.mk (r • a) = 0 rw [Submodule.Quotient.mk_eq_zero] exact Submodule.smul_mem_smul hr Submodule.mem_top - · simp_all + · intro x y hx hy + rw [hx, hy, add_zero] instance quotientIsHausdorff (I : Ideal R) (n : ℕ) : IsHausdorff I (R ⧸ (I ^ n • ⊤ : Submodule R R)) where @@ -49,8 +56,7 @@ instance quotientIsPrecomplete (I : Ideal R) (n : ℕ) : rw [SModEq.sub_mem] by_cases hkn : k ≤ n · exact SModEq.sub_mem.mp (hf hkn) - · push Not at hkn - have h0 := smul_eq_zero_of_quotient I n _ (SModEq.sub_mem.mp (hf (le_of_lt hkn))) + · have h0 := smul_eq_zero_of_quotient I n _ (SModEq.sub_mem.mp (hf (le_of_not_ge hkn))) rw [← sub_eq_zero.mp h0, sub_self] exact Submodule.zero_mem _⟩ @@ -66,81 +72,8 @@ lemma ker_evalₐ_le_smul_top (I : Ideal R) [IsNoetherianRing R] (n : ℕ) (x : AdicCompletion I R) (hx : evalₐ I n x = 0) : x ∈ I ^ n • (⊤ : Submodule R (AdicCompletion I R)) := by - set p := (I ^ n • ⊤ : Submodule R R) with hp - -- Step 1: map I (mkQ p) x = 0, since R/p is I-adically complete - have h_ker : map I p.mkQ x = 0 := by - have h_eval : eval I R n x = 0 := by - simp only [evalₐ, AlgHom.coe_comp, Function.comp_apply] at hx - exact (AlgEquiv.injective _) hx - suffices key : (of I (R ⧸ p)).comp (eval I R n) = - ((map I p.mkQ).restrictScalars R : - AdicCompletion I R →ₗ[R] AdicCompletion I (R ⧸ p)) by - have := LinearMap.congr_fun key x - simp only [LinearMap.comp_apply, LinearMap.restrictScalars_apply, h_eval, - _root_.map_zero] at this - exact this.symm - apply map_ext'' - ext a k - simp only [LinearMap.comp_apply, LinearMap.restrictScalars_apply, - mk_apply_coe, map_val_apply, of_apply] - change (I ^ k • ⊤ : Submodule R (R ⧸ p)).mkQ ((eval I R n) (mk I R a)) = - (p.mkQ).reduceModIdeal (I ^ k) ((I ^ k • ⊤ : Submodule R R).mkQ (a.1 k)) - rw [show (p.mkQ).reduceModIdeal (I ^ k) ((I ^ k • ⊤ : Submodule R R).mkQ (a.1 k)) = - (I ^ k • ⊤ : Submodule R (R ⧸ p)).mkQ (p.mkQ (a.1 k)) from rfl] - rw [show (eval I R n) (mk I R a) = p.mkQ (a.1 n) from rfl] - simp only [Submodule.mkQ_apply] - rw [Submodule.Quotient.eq, ← Submodule.Quotient.mk_sub] - by_cases hkn : k ≤ n - · have hc := a.property hkn - rw [SModEq.sub_mem] at hc - rw [show a.1 n - a.1 k = -(a.1 k - a.1 n) from by ring, Submodule.Quotient.mk_neg] - exact neg_mem (Submodule.smul_top_le_comap_smul_top (I ^ k) p.mkQ hc) - · push Not at hkn - have hc := a.property (le_of_lt hkn) - rw [SModEq.sub_mem] at hc - rw [Submodule.Quotient.mk_eq_zero _ |>.mpr hc] - exact zero_mem _ - -- Step 2: exact sequence gives x ∈ range(map I subtype) - have h_exact : Function.Exact (map I p.subtype) (map I p.mkQ) := - map_exact Subtype.val_injective - (LinearMap.exact_subtype_mkQ p) - (Submodule.mkQ_surjective _) - have h_range : x ∈ LinearMap.range (map I p.subtype) := - LinearMap.mem_range.mpr ((h_exact x).mp h_ker) - -- Step 3: range(map I subtype) ⊆ I^n • ⊤ via ofTensorProduct naturality - have aux : ∀ (a : AdicCompletion I R) (r : R), r ∈ I ^ n • (⊤ : Submodule R R) → - a • of I R r ∈ I ^ n • (⊤ : Submodule R (AdicCompletion I R)) := by - intro a r hr - refine Submodule.smul_induction_on hr ?_ ?_ - · intro c hc s _ - rw [map_smul, smul_comm] - exact Submodule.smul_mem_smul hc Submodule.mem_top - · intro x y hx hy - rw [map_add, smul_add] - exact Submodule.add_mem _ hx hy - have h_smul : LinearMap.range ((map I p.subtype).restrictScalars R) ≤ - I ^ n • (⊤ : Submodule R (AdicCompletion I R)) := by - rintro z ⟨y, rfl⟩ - simp only [LinearMap.restrictScalars_apply] - set w := (ofTensorProductEquivOfFiniteNoetherian I ↥p).symm y - have key : (map I p.subtype) y = - (ofTensorProduct I R) - ((TensorProduct.AlgebraTensorModule.map - (LinearMap.id : AdicCompletion I R →ₗ[AdicCompletion I R] AdicCompletion I R) - p.subtype) w) := by - have nat := ofTensorProduct_naturality (N := R) I p.subtype - rw [(LinearEquiv.apply_symm_apply (ofTensorProductEquivOfFiniteNoetherian I ↥p) y).symm, - ofTensorProductEquivOfFiniteNoetherian_apply, ← LinearMap.comp_apply, nat, - LinearMap.comp_apply] - rw [key] - induction w using TensorProduct.inductionOn with - | tmul a m => - simp only [TensorProduct.AlgebraTensorModule.map_tmul, LinearMap.id_apply] - rw [ofTensorProduct_tmul] - exact aux a m.1 m.2 - | add x y hx hy => simp only [map_add] - exact Submodule.add_mem _ hx hy - exact h_smul (LinearMap.mem_range.mpr (LinearMap.mem_range.mp h_range)) + rw [pow_smul_top_eq_ker_eval (M := R) I.fg_of_isNoetherianRing, + LinearMap.mem_ker, ← factor_evalₐ_eq_eval I x (by simp), hx, _root_.map_zero] /-! ### Main theorem: kernel of evalₐ is contained in the power of the extended maximal ideal -/ @@ -153,5 +86,5 @@ theorem mem_map_pow_of_evalₐ_eq_zero x ∈ (Ideal.map (algebraMap R (AdicCompletion (IsLocalRing.maximalIdeal R) R)) (IsLocalRing.maximalIdeal R)) ^ n := by rw [← Ideal.map_pow] - have hmem := ker_evalₐ_le_smul_top (IsLocalRing.maximalIdeal R) n x hx - simp_all + simpa only [Ideal.smul_top_eq_map, Submodule.restrictScalars_mem] using + ker_evalₐ_le_smul_top (IsLocalRing.maximalIdeal R) n x hx diff --git a/LeanPool/AndersonConjecture/AdicLocal.lean b/LeanPool/AndersonConjecture/AdicLocal.lean index e9c2c615dd..9878047ff5 100644 --- a/LeanPool/AndersonConjecture/AdicLocal.lean +++ b/LeanPool/AndersonConjecture/AdicLocal.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import Mathlib.Algebra.Lie.OfAssociative -import Mathlib.RingTheory.AdicCompletion.Algebra +module + +public import Mathlib.RingTheory.AdicCompletion.Algebra +public import Mathlib.RingTheory.LocalRing.MaximalIdeal.Defs import Mathlib.RingTheory.Ideal.Quotient.Nilpotent import Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic @@ -16,6 +18,8 @@ a local ring. The maximal ideal of the completion is the kernel of the natural surjection onto the residue field R/M. -/ +@[expose] public section + open scoped Pointwise open AdicCompletion Ideal Finset diff --git a/LeanPool/AndersonConjecture/AdicNoetherian.lean b/LeanPool/AndersonConjecture/AdicNoetherian.lean index f8c2d478b2..748b34e852 100644 --- a/LeanPool/AndersonConjecture/AdicNoetherian.lean +++ b/LeanPool/AndersonConjecture/AdicNoetherian.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import Mathlib.RingTheory.Ideal.Quotient.Noetherian +module + +public import Mathlib.RingTheory.AdicCompletion.Algebra +public import Mathlib.RingTheory.LocalRing.MaximalIdeal.Defs import LeanPool.AndersonConjecture.AdicKerEval +import Mathlib.RingTheory.AdicCompletion.Completeness +import Mathlib.CategoryTheory.Category.Init +import Mathlib.RingTheory.Ideal.Quotient.Noetherian +import Mathlib.Tactic.Positivity.Finset /-! # Adic Completion of a Noetherian Local Ring is Noetherian @@ -16,6 +23,8 @@ M-adically complete, so the Noetherian property lifts by successive approximation (Atiyah--Macdonald, Prop. 10.11). -/ +@[expose] public section + open AdicCompletion open scoped Pointwise @@ -72,12 +81,12 @@ include R in lemma factorPow_comp_evalₐ_noeth {m n : ℕ} (hmn : m ≤ n) (x : simp only [evalₐ_mk] have hfactor : Ideal.Quotient.factorPow I hmn (Ideal.Quotient.mk (I ^ n) (a.1 n)) = Ideal.Quotient.mk (I ^ m) (a.1 n) := by - simp [Ideal.Quotient.factorPow, Ideal.Quotient.factor_mk] + simp only [Ideal.Quotient.factorPow, Ideal.Quotient.factor_mk] rw [hfactor] have hcauchy := a.2 hmn rw [SModEq.sub_mem] at hcauchy have hmem : a.1 m - a.1 n ∈ (I ^ m : Ideal R) := by - simp_all + simpa only [Ideal.smul_eq_mul, Ideal.mul_top] using hcauchy rw [Ideal.Quotient.eq] rwa [show a.1 n - a.1 m = -(a.1 m - a.1 n) from by ring, neg_mem_iff] @@ -111,47 +120,9 @@ variable [IsLocalRing R] [IsNoetherianRing R] /-- The adic completion of a Noetherian local ring is M-adically precomplete. -/ instance adicCompletion_isPrecomplete : IsPrecomplete (IsLocalRing.maximalIdeal R) - (AdicCompletion (IsLocalRing.maximalIdeal R) R) := by - set M := IsLocalRing.maximalIdeal R - constructor - intro f hf - -- For each k, pick r_k ∈ R with mkQ(M^k)(r_k) = evalₐ k (f k). - choose r hr using fun k => Ideal.Quotient.mk_surjective - (I := M ^ k) (evalₐ M k (f k)) - -- The sequence r is Cauchy: r k ≡ r (k+1) mod M^k. - have hr_cauchy : ∀ k, r k ≡ r (k + 1) [SMOD M ^ k • (⊤ : Submodule R R)] := by - intro k - rw [SModEq.sub_mem, show M ^ k • (⊤ : Submodule R R) = (M ^ k : Ideal R) by - simp_all] - have h1 : (Ideal.Quotient.mk (M ^ k)) (r k) = evalₐ M k (f k) := hr k - have h2 : (Ideal.Quotient.mk (M ^ (k + 1))) (r (k + 1)) = evalₐ M (k + 1) (f (k + 1)) := - hr (k + 1) - have h3 : Ideal.Quotient.factorPow M (Nat.le_succ k) (evalₐ M (k + 1) (f (k + 1))) = - evalₐ M k (f (k + 1)) := factorPow_comp_evalₐ_noeth M (Nat.le_succ k) (f (k + 1)) - have h4 : evalₐ M k (f (k + 1)) = evalₐ M k (f k) := - eval_cauchy_stable M f hf (Nat.le_succ k) - have h5 : (Ideal.Quotient.mk (M ^ k)) (r (k + 1)) = (Ideal.Quotient.mk (M ^ k)) (r k) := by - have hfp : Ideal.Quotient.factorPow M (Nat.le_succ k) - ((Ideal.Quotient.mk (M ^ (k + 1))) (r (k + 1))) = - (Ideal.Quotient.mk (M ^ k)) (r (k + 1)) := by - simp [Ideal.Quotient.factorPow, Ideal.Quotient.factor_mk] - rw [← hfp, h2, h3, h4, h1] - exact Ideal.Quotient.eq_zero_iff_mem.mp (by rw [map_sub, h5, sub_self]) - -- Construct the limit L ∈ R̂ from the Cauchy sequence r. - let cauchy_seq := AdicCauchySequence.mk M R r hr_cauchy - use mk M R cauchy_seq - -- Show f n ≡ L mod M^n • ⊤ for all n. - intro n - rw [SModEq.sub_mem, Ideal.smul_top_eq_map] - suffices h : f n - mk M R cauchy_seq ∈ - Ideal.map (algebraMap R (AdicCompletion M R)) (M ^ n) by exact h - have : Ideal.map (algebraMap R (AdicCompletion M R)) (M ^ n) = - Ideal.map (algebraMap R (AdicCompletion M R)) M ^ n := Ideal.map_pow _ _ _ - rw [this, ← ker_evalₐ_eq n] - rw [RingHom.mem_ker, AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom, map_sub, sub_eq_zero] - change evalₐ M n (f n) = evalₐ M n (mk M R cauchy_seq) - rw [evalₐ_mk] - exact (hr n).symm + (AdicCompletion (IsLocalRing.maximalIdeal R) R) := + (AdicCompletion.isAdicComplete (M := R) + (IsLocalRing.maximalIdeal R).fg_of_isNoetherianRing).toIsPrecomplete end Precomplete @@ -202,7 +173,7 @@ omit [IsLocalRing R] [IsNoetherianRing R] in lemma filtration_smul_le have hfp_r : Ideal.Quotient.factorPow Mi (Nat.le_succ (n + 1)) (Ideal.Quotient.mk (Mi ^ (n + 1 + 1)) r) = Ideal.Quotient.mk (Mi ^ (n + 1)) r := by - simp_all + simp only [Ideal.Quotient.factorPow, Ideal.Quotient.factor_mk] have hdiff_quot : evalₐ Mi (n + 1 + 1) y - Ideal.Quotient.mk (Mi ^ (n + 1 + 1)) r ∈ RingHom.ker (Ideal.Quotient.factorPow Mi (Nat.le_succ (n + 1))) := by rw [RingHom.mem_ker, map_sub, hfp_y, hfp_r, hyr, sub_self] @@ -353,7 +324,7 @@ omit [IsLocalRing R] [IsNoetherianRing R] in lemma extract_filtration_rep rw [hFN_def] exact ⟨hr_pow, Ideal.mem_comap.mpr (hr_eq ▸ Ideal.mem_map_of_mem _ heJ)⟩ refine ⟨r, ?_, hr_eq.symm⟩ - simp_all + simpa only [hn0_pow] using hr_FN /-- Every ideal of the adic completion of a Noetherian local ring is finitely generated. -/ private def adicCompletion_ideal_fg_proof : PLift ( @@ -378,15 +349,13 @@ private def adicCompletion_ideal_fg_proof : PLift ( (surjective_evalₐ Mi (n + 1 + 1))).mp hr2 refine (Ideal.mem_map_iff_of_surjective _ (surjective_evalₐ Mi (n + 1))).mpr ⟨y, hyJ, ?_⟩ - have heval : evalₐ Mi (n + 1) y = Ideal.Quotient.mk (Mi ^ (n + 1)) r := by - rw [← factorPow_comp_evalₐ_noeth Mi (Nat.le_succ (n + 1)) y] - simp_all - exact heval + rw [← factorPow_comp_evalₐ_noeth Mi (Nat.le_succ (n + 1)) y] + simp only [hyr, Ideal.Quotient.factorPow, Ideal.Quotient.factor_mk] have hFN_smul_sub : forall n, Mi * FN n ≤ FN (n + 1) := filtration_smul_le R Mi J FN hFN_def -- Build the Ideal.Filtration and prove stability - have hFN_smul_R : forall n, Mi • (FN n : Submodule R R) ≤ (FN (n + 1) : Submodule R R) := by - simp_all + have hFN_smul_R : forall n, Mi • (FN n : Submodule R R) ≤ (FN (n + 1) : Submodule R R) := + hFN_smul_sub set F_filt : Mi.Filtration R := { N := fun n => (FN n : Submodule R R) mono := fun n => hFN_mono_sub n @@ -417,36 +386,25 @@ private def adicCompletion_ideal_fg_proof : PLift ( classical set genJ := S_J.image (fun a => if h : a ∈ S_J then lJ a h else 0) set genF := S_F.image (fun r => if h : r ∈ S_F then lF r h else 0) - refine ⟨genJ ∪ genF, le_antisymm ?_ ?_⟩ - · -- EASY DIRECTION: Ideal.span(genJ ∪ genF) ≤ J + set I₀ := Ideal.span (↑(genJ ∪ genF) : Set (AdicCompletion Mi R)) + have hI0_le_J : I₀ ≤ J := by rw [Ideal.span_le] - intro x hx - simp only [Finset.coe_union, Set.mem_union, Finset.mem_coe] at hx - rcases hx with hx | hx - · rw [Finset.mem_image] at hx - obtain ⟨a, ha, rfl⟩ := hx - simp_all - · rw [Finset.mem_image] at hx - obtain ⟨r, hr, rfl⟩ := hx - simp_all + intro z hz + simp only [Finset.coe_union, Set.mem_union, Finset.mem_coe] at hz + rcases hz with hz | hz + · rw [Finset.mem_image] at hz + obtain ⟨a, ha, rfl⟩ := hz + simpa only [dite_eq_left ha, SetLike.mem_coe] using hlJ_mem a ha + · rw [Finset.mem_image] at hz + obtain ⟨r, hr, rfl⟩ := hz + simpa only [dite_eq_left hr, SetLike.mem_coe] using hlF_mem r hr + refine ⟨genJ ∪ genF, le_antisymm hI0_le_J ?_⟩ · -- HARD DIRECTION: J ≤ Ideal.span ↑(genJ ∪ genF) -- It suffices to show ∀ x ∈ J, ∀ N, x ∈ I₀ + M̂^N, then conclude by Hausdorff. - set I₀ := Ideal.span (↑(genJ ∪ genF) : Set (AdicCompletion Mi R)) -- Successive approximation (Atiyah-Macdonald Prop 10.11 / Matsumura Thm 8.1). set Mhat := Ideal.map (algebraMap R (AdicCompletion Mi R)) Mi have hker_eq : ∀ N, RingHom.ker (evalₐ Mi N).toRingHom = Mhat ^ N := fun N => ker_evalₐ_eq N - have hI0_le_J : I₀ ≤ J := by - rw [Ideal.span_le] - intro z hz - simp only [Finset.coe_union, Set.mem_union, Finset.mem_coe] at hz - rcases hz with hz | hz - · rw [Finset.mem_image] at hz - obtain ⟨a, ha, rfl⟩ := hz - simp_all - · rw [Finset.mem_image] at hz - obtain ⟨r, hr, rfl⟩ := hz - simp_all have hgenJ_sub : ∀ a ∈ S_J, (if h : a ∈ S_J then lJ a h else 0) ∈ I₀ := by intro a ha exact Ideal.subset_span (Finset.mem_coe.mpr @@ -473,7 +431,7 @@ private def adicCompletion_ideal_fg_proof : PLift ( have ht_fin : t ∈ S_F := Finset.mem_coe.mp ht_mem refine ⟨of Mi R c * (if h : t ∈ S_F then lF t h else 0), I₀.mul_mem_left _ (hgenF_sub t ht_fin), ?_⟩ - simp_all + simp only [map_mul, evalₐ_of, dite_eq_left ht_fin, hlF_eq, smul_eq_mul] -- Phase 1: ∀ K x ∈ J, x ∈ I₀ ⊔ Mhat^(n0 + K) suffices hphase1 : ∀ (K : ℕ) (x : AdicCompletion Mi R), x ∈ J → x ∈ I₀ ⊔ Mhat ^ (n0 + K) by @@ -608,7 +566,7 @@ private def adicCompletion_ideal_fg_proof : PLift ( simp only [sumG, zero_mul, Finset.sum_const_zero] have csd0 : { c // CSDPred 0 c } := ⟨fun _ => 0, by constructor - · simp_all + · simpa only [hsum_zero, sub_zero, Nat.add_zero] using he₀sub · show x - y₀ - sumG (fun _ => 0) ∈ _ rw [hsum_zero, sub_zero] exact J.sub_mem hx (hI0_le_J hy₀)⟩ @@ -742,7 +700,7 @@ private def adicCompletion_ideal_fg_proof : PLift ( have ha_fin : a ∈ S_J := ha exact (Ideal.mem_map_iff_of_surjective _ (surjective_evalₐ Mi n0)).mpr ⟨if h : a ∈ S_J then lJ a h else 0, hgenJ_sub a ha_fin, by - simp_all⟩ + simpa only [dite_eq_left ha_fin] using hlJ_eq a ha_fin⟩ | succ K ih => intro x hx obtain ⟨y, hy, e, he, hxye⟩ := Submodule.mem_sup.mp (ih x hx) @@ -753,7 +711,8 @@ private def adicCompletion_ideal_fg_proof : PLift ( obtain ⟨δ, hδI, hδeq⟩ := smul_lift_of_filtration R Mi n0 K (FN n0) S_F hS_F I₀ hlift_span r hr_in_smul have hsum : (y + δ) + (e - δ) = x := by - simp_all + rw [← hxye] + abel have hmem_ker : e - δ ∈ Mhat ^ (n0 + (K + 1)) := by rw [show n0 + (K + 1) = n0 + K + 1 from by omega, ← hker_eq, RingHom.mem_ker, AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom, diff --git a/LeanPool/AndersonConjecture/Basic.lean b/LeanPool/AndersonConjecture/Basic.lean index ddeabf5e83..0d13bdcd6d 100644 --- a/LeanPool/AndersonConjecture/Basic.lean +++ b/LeanPool/AndersonConjecture/Basic.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import Mathlib.Algebra.Lie.OfAssociative -import Mathlib.RingTheory.AdicCompletion.Algebra +module + +public import Mathlib.RingTheory.AdicCompletion.Algebra +public import Mathlib.RingTheory.LocalRing.MaximalIdeal.Defs import Mathlib.RingTheory.LocalRing.RingHom.Basic +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! # Quasi-Complete Local Rings @@ -18,6 +21,8 @@ chains with zero intersection. We also define analytical irreducibility (the M-adic completion is a domain). -/ +@[expose] public section + open scoped Pointwise variable (R : Type*) [CommRing R] [IsLocalRing R] diff --git a/LeanPool/AndersonConjecture/CompleteDomain.lean b/LeanPool/AndersonConjecture/CompleteDomain.lean index 6fff3937ea..a935a6b23e 100644 --- a/LeanPool/AndersonConjecture/CompleteDomain.lean +++ b/LeanPool/AndersonConjecture/CompleteDomain.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module -import LeanPool.AndersonConjecture.CompleteDomain.CompleteDomain -import LeanPool.AndersonConjecture.CompleteDomain.Domain -import LeanPool.AndersonConjecture.CompleteDomain.LocalRing +public import LeanPool.AndersonConjecture.CompleteDomain.CompleteDomain +public import LeanPool.AndersonConjecture.CompleteDomain.Domain +public import LeanPool.AndersonConjecture.CompleteDomain.LocalRing +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Inv +import Mathlib.Data.Nat.Totient /-! # Complete Local Domain `T = ℂ[[x,y,z]]/(x²-yz)` @@ -15,3 +21,5 @@ Index file for the `LeanPool.AndersonConjecture.CompleteDomain` directory: the ring `T = ℂ[[x,y,z]]/(x²-yz)` is a complete two-dimensional Cohen–Macaulay local domain with a non-principal height-one prime. -/ + +@[expose] public section diff --git a/LeanPool/AndersonConjecture/CompleteDomain/CompleteDomain.lean b/LeanPool/AndersonConjecture/CompleteDomain/CompleteDomain.lean index 4c423e898e..7434b4e5a7 100644 --- a/LeanPool/AndersonConjecture/CompleteDomain/CompleteDomain.lean +++ b/LeanPool/AndersonConjecture/CompleteDomain/CompleteDomain.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.CompleteDomain.LocalRing +public import Mathlib.RingTheory.Ideal.Height +import Mathlib.Analysis.CStarAlgebra.Classes +import Mathlib.Data.EReal.Inv import Mathlib.RingTheory.KrullDimension.Regular +import Mathlib.RingTheory.PowerSeries.NoZeroDivisors import Mathlib.RingTheory.SimpleRing.Principal -import Mathlib.LinearAlgebra.AffineSpace.Combination -import LeanPool.AndersonConjecture.CompleteDomain.LocalRing /-! # The Complete Local Domain T = C[[x,y,z]]/(x^2-yz) @@ -17,6 +22,8 @@ ideal (x^2-yz). It is a two-dimensional Noetherian complete local domain with a height-one prime Q = (x,y) that is not principal. -/ +@[expose] public section + noncomputable section open MvPowerSeries in diff --git a/LeanPool/AndersonConjecture/CompleteDomain/Domain.lean b/LeanPool/AndersonConjecture/CompleteDomain/Domain.lean index 855e688181..cd7e4d1cab 100644 --- a/LeanPool/AndersonConjecture/CompleteDomain/Domain.lean +++ b/LeanPool/AndersonConjecture/CompleteDomain/Domain.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import Mathlib.RingTheory.MvPowerSeries.Substitution +public import Mathlib.Basic.Complex.Basic +public import Mathlib.RingTheory.Ideal.Maps import Mathlib.Analysis.CStarAlgebra.Classes import Mathlib.RingTheory.Ideal.Quotient.Operations import Mathlib.RingTheory.MvPowerSeries.Inverse -import Mathlib.RingTheory.MvPowerSeries.Substitution /-! # The Complete Local Domain T @@ -15,6 +19,8 @@ Construction of T = C[[x,y,z]]/(x^2 - yz) and the proof that T is an integral domain. -/ +@[expose] public section + noncomputable section open MvPowerSeries in @@ -69,27 +75,20 @@ lemma conjI_le_ker_ψ : conjI ≤ RingHom.ker ψHom.toRingHom := by lemma anderson_gen_ne_zero : (X (0 : Fin 3) : MvPowerSeries (Fin 3) ℂ) ^ 2 - X 1 * X 2 ≠ 0 := by + have hdegrees : Finsupp.single (0 : Fin 3) 2 ≠ + Finsupp.single 1 1 + Finsupp.single 2 1 := by + intro h + have h0 := DFunLike.congr_fun h 0 + simp only [Finsupp.add_apply, Finsupp.single_eq_same, Finsupp.single_eq_of_ne + (by decide : (0 : Fin 3) ≠ 1), Finsupp.single_eq_of_ne + (by decide : (0 : Fin 3) ≠ 2), zero_add] at h0 + omega intro h - have h1 := congr_arg (MvPowerSeries.coeff (R := ℂ) (Finsupp.single (0 : Fin 3) 2)) h - simp only [map_sub, map_zero] at h1 - rw [MvPowerSeries.coeff_X_pow] at h1 - simp only [ite_true] at h1 - rw [MvPowerSeries.coeff_mul] at h1 - simp only [MvPowerSeries.coeff_X] at h1 - have : ∀ p ∈ Finset.antidiagonal (Finsupp.single (0 : Fin 3) 2), - (if p.1 = Finsupp.single 1 1 then (1 : ℂ) else 0) * - (if p.2 = Finsupp.single 2 1 then 1 else 0) = 0 := by - intro ⟨a, b⟩ hab - rw [Finset.mem_antidiagonal] at hab - by_cases ha : a = Finsupp.single 1 1 - · simp only [ha, ite_true] - by_cases hb : b = Finsupp.single 2 1 - · exfalso - have h0 := congr_fun (congr_arg DFunLike.coe hab) (0 : Fin 3) - simp [ha, hb, Finsupp.add_apply] at h0 - · simp [hb] - · simp [ha] - simp_all + have hcoeff := congrArg (coeff (R := ℂ) (Finsupp.single (0 : Fin 3) 2)) h + rw [map_sub, map_zero, coeff_X_pow] at hcoeff + simp only [ite_true, X_def, + monomial_mul_monomial, one_mul, coeff_monomial, ite_eq_right hdegrees, + sub_zero, one_ne_zero] at hcoeff /-- The factored map ψbar : T → ℂ[[u,v]]. -/ noncomputable def ψBar : T →+* MvPowerSeries (Fin 2) ℂ := @@ -118,23 +117,12 @@ def divQ (f : MvPowerSeries (Fin 3) ℂ) : MvPowerSeries (Fin 3) ℂ := fun n => ∑ k ∈ Finset.range (min (n 1) (n 2) + 1), f (mkFin3 (n 0 + 2 + 2 * k) (n 1 - k) (n 2 - k)) -/-- Key coefficient relation: the sum Σ_{k=0}^{min(m₁,m₂)} f(m₀+2k, m₁-k, m₂-k) - equals a coefficient of ψHom(f) at the monomial u^{m₀+2m₁} v^{m₀+2m₂}. -/ +/-- Substitution sends a monomial with degree `d` to +`u^(d₀ + 2d₁) * v^(d₀ + 2d₂)`. -/ lemma ψMap_prod_eq (d : Fin 3 →₀ ℕ) : d.prod (fun s n => ψMap s ^ n) = MvPowerSeries.monomial (mkFin2 (d 0 + 2 * d 1) (d 0 + 2 * d 2)) (1 : ℂ) := by - have hprod : d.prod (fun s n => ψMap s ^ n) = - (ψMap 0 ^ (d 0)) * (ψMap 1 ^ (d 1)) * (ψMap 2 ^ (d 2)) := by - rw [Finsupp.prod] - rw [Finset.prod_subset (Finset.subset_univ _) (fun i _ hi => by - simp_all)] - have huniv : (Finset.univ : Finset (Fin 3)) = {0, 1, 2} := by decide - rw [huniv] - rw [Finset.prod_insert (show (0 : Fin 3) ∉ ({1, 2} : Finset (Fin 3)) by decide)] - rw [Finset.prod_insert (show (1 : Fin 3) ∉ ({2} : Finset (Fin 3)) by decide)] - rw [Finset.prod_singleton] - ring - rw [hprod] + rw [Finsupp.prod_fintype _ _ (fun _ => pow_zero _), Fin.prod_univ_three] change ((MvPowerSeries.X 0 * MvPowerSeries.X 1 : MvPowerSeries (Fin 2) ℂ) ^ d 0 * ((MvPowerSeries.X 0) ^ 2) ^ d 1 * ((MvPowerSeries.X 1) ^ 2) ^ d 2) = _ @@ -238,14 +226,36 @@ lemma ψHom_coeff_sum rw [ite_eq_left hcond] rfl -/-- Key lemma: ψbar is injective. This is equivalent to ker ψHom = conjI. +/-- Removing the first term of a substitution fiber gives the shifted quotient coefficient. -/ +private lemma divQ_recurrence (f : MvPowerSeries (Fin 3) ℂ) (a b c : ℕ) : + f (mkFin3 a b c) = + (∑ k ∈ Finset.range (min b c + 1), f (mkFin3 (a + 2 * k) (b - k) (c - k))) - + if 1 ≤ b ∧ 1 ≤ c then divQ f (mkFin3 a (b - 1) (c - 1)) else 0 := by + by_cases h : 1 ≤ b ∧ 1 ≤ c + · rw [ite_eq_left h] + simp only [divQ, mkFin3_zero, mkFin3_one, mkFin3_two] + rw [show min (b - 1) (c - 1) + 1 = min b c from by omega, + Finset.sum_range_succ'] + simp only [mul_zero, add_zero, Nat.sub_zero] + have hterms : ∀ k ∈ Finset.range (min b c), + f (mkFin3 (a + 2 * (k + 1)) (b - (k + 1)) (c - (k + 1))) = + f (mkFin3 (a + 2 + 2 * k) (b - 1 - k) (c - 1 - k)) := by + intro k _ + congr 1 + rw [mkFin3_inj] + omega + rw [Finset.sum_congr rfl hterms] + exact eq_sub_of_add_eq (add_comm _ _) + · have hmin : min b c = 0 := by omega + simp only [ite_eq_right h, hmin, zero_add, Finset.sum_range_one, mul_zero, + add_zero, Nat.sub_zero, sub_zero] + +/-- The factored substitution is injective because `ψHom` has kernel `conjI`. -**Proof sketch:** View ℂ[[x,y,z]] ≅ ℂ[[y,z]][[x]] via the ring equiv. -Under this decomposition, every f can be written uniquely as q·(x²-yz) + (a + bx). -If ψ(f) = 0 then ψ(a + bx) = a(u²,v²) + b(u²,v²)·uv = 0. -The terms a(u²,v²) use only even-even degree monomials while b(u²,v²)·uv uses -only odd-odd degree monomials, so both must be zero. Since g ↦ g(u²,v²) is -injective, a = b = 0, hence f = q·(x²-yz) ∈ conjI. -/ +The coefficients of `divQ f` telescope along the substitution fibers. For `x`-degree +at least two, this gives the coefficient of `f` directly. For degrees zero and one, +`ψHom_coeff_sum` identifies the remaining sum with a coefficient of `ψHom f`, +which vanishes when `f` is in the kernel. -/ lemma ψBar_injective : Function.Injective ψBar := by apply RingHom.lift_injective_of_ker_le_ideal intro f hf @@ -260,127 +270,39 @@ lemma ψBar_injective : Function.Injective ψBar := by have hgen_eq : (MvPowerSeries.X (0 : Fin 3) : MvPowerSeries (Fin 3) ℂ) ^ 2 - MvPowerSeries.X 1 * MvPowerSeries.X 2 = MvPowerSeries.monomial d₀ (1 : ℂ) - MvPowerSeries.monomial d₁₂ 1 := by - congr 1 - · exact MvPowerSeries.X_pow_eq 0 2 - · rw [show (MvPowerSeries.X (1 : Fin 3) : MvPowerSeries (Fin 3) ℂ) = - MvPowerSeries.monomial (Finsupp.single 1 1) 1 from by - rw [← MvPowerSeries.X_pow_eq (1 : Fin 3) 1] - simp, - show (MvPowerSeries.X (2 : Fin 3) : MvPowerSeries (Fin 3) ℂ) = - MvPowerSeries.monomial (Finsupp.single 2 1) 1 from by - rw [← MvPowerSeries.X_pow_eq (2 : Fin 3) 1] - simp, - MvPowerSeries.monomial_mul_monomial, one_mul] + rw [X_pow_eq, X_def, X_def, monomial_mul_monomial, one_mul] ext m rw [hgen_eq, sub_mul] simp only [map_sub, MvPowerSeries.coeff_monomial_mul, one_mul] - have hd₀_iff : d₀ ≤ m ↔ 2 ≤ m 0 := by - simp only [d₀, Finsupp.le_iff, Finsupp.support_single _ (by omega : (2 : ℕ) ≠ 0), - Finset.mem_singleton, forall_eq, Finsupp.single_eq_same] + have hd₀_iff : d₀ ≤ m ↔ 2 ≤ m 0 := Finsupp.single_le_iff have hd₁₂_iff : d₁₂ ≤ m ↔ 1 ≤ m 1 ∧ 1 ≤ m 2 := by constructor · intro h - have h1 : d₁₂ 1 = 1 := by simp [d₁₂, Finsupp.add_apply] - have h2 : d₁₂ 2 = 1 := by simp [d₁₂, Finsupp.add_apply] - exact ⟨h1 ▸ h 1, h2 ▸ h 2⟩ + exact ⟨by simpa [d₁₂] using h 1, by simpa [d₁₂] using h 2⟩ · intro ⟨h1, h2⟩ i - show d₁₂ i ≤ m i - simp only [d₁₂, Finsupp.add_apply] - fin_cases i <;> simp <;> omega - -- Case on m 0 ≥ 2 + fin_cases i <;> simp [d₁₂] <;> omega + have hsub : m - d₁₂ = mkFin3 (m 0) (m 1 - 1) (m 2 - 1) := by + ext i + fin_cases i <;> simp [d₁₂, Finsupp.tsub_apply, mkFin3] + simp only [hd₀_iff, hd₁₂_iff, coeff_apply, hsub] + have hrec := divQ_recurrence f (m 0) (m 1) (m 2) + rw [← mkFin3_ext m] at hrec by_cases hm0 : 2 ≤ m 0 - · -- m 0 ≥ 2: telescoping - rw [ite_eq_left (hd₀_iff.mpr hm0)] - have sub0 : (m - d₀) 0 = m 0 - 2 := by simp [Finsupp.tsub_apply, d₀] - have sub1 : (m - d₀) 1 = m 1 := by simp [Finsupp.tsub_apply, d₀] - have sub2 : (m - d₀) 2 = m 2 := by simp [Finsupp.tsub_apply, d₀] - have hdivQ0 : MvPowerSeries.coeff (m - d₀) (divQ f) = + · rw [ite_eq_left hm0] + have hdivQ0 : divQ f (m - d₀) = ∑ k ∈ Finset.range (min (m 1) (m 2) + 1), - f (mkFin3 (m 0 + 2 * k) (m 1 - k) (m 2 - k)) := by - change divQ f (m - d₀) = _ - simp only [divQ, sub0, sub1, sub2, show m 0 - 2 + 2 = m 0 from by omega] + f (mkFin3 (m 0 + 2 * k) (m 1 - k) (m 2 - k)) := by + simp only [divQ, Finsupp.tsub_apply, d₀, Finsupp.single_eq_same, + Finsupp.single_eq_of_ne (by decide : (1 : Fin 3) ≠ 0), + Finsupp.single_eq_of_ne (by decide : (2 : Fin 3) ≠ 0), Nat.sub_zero, + Nat.sub_add_cancel hm0] rw [hdivQ0] - by_cases hm12 : 1 ≤ m 1 ∧ 1 ≤ m 2 - · rw [ite_eq_left (hd₁₂_iff.mpr hm12)] - have s0' : (m - d₁₂) 0 = m 0 := by simp [Finsupp.tsub_apply, d₁₂, Finsupp.add_apply] - have s1' : (m - d₁₂) 1 = m 1 - 1 := by simp [Finsupp.tsub_apply, d₁₂, Finsupp.add_apply] - have s2' : (m - d₁₂) 2 = m 2 - 1 := by simp [Finsupp.tsub_apply, d₁₂, Finsupp.add_apply] - have hdivQ12 : MvPowerSeries.coeff (m - d₁₂) (divQ f) = - ∑ k ∈ Finset.range (min (m 1 - 1) (m 2 - 1) + 1), - f (mkFin3 (m 0 + 2 + 2 * k) (m 1 - 1 - k) (m 2 - 1 - k)) := by - change divQ f (m - d₁₂) = _ - simp only [divQ, s0', s1', s2'] - rw [hdivQ12, show min (m 1 - 1) (m 2 - 1) = min (m 1) (m 2) - 1 from by omega] - -- Telescoping: peel off k=0 from first sum, remaining terms cancel - conv_lhs => rw [show (MvPowerSeries.coeff m) f = f m from rfl] - conv_lhs => rw [mkFin3_ext m] - set N := min (m 1) (m 2) - have hN : 1 ≤ N := by omega - rw [show N - 1 + 1 = N from by omega] - rw [show N + 1 = N.succ from rfl, Finset.sum_range_succ'] - simp only [mul_zero, add_zero, Nat.sub_zero] - have hterms : ∀ k ∈ Finset.range N, - f (mkFin3 (m 0 + 2 * (k + 1)) (m 1 - (k + 1)) (m 2 - (k + 1))) = - f (mkFin3 (m 0 + 2 + 2 * k) (m 1 - 1 - k) (m 2 - 1 - k)) := by - intro k _ - congr 1 - rw [mkFin3_inj] - refine ⟨by ring, ?_, ?_⟩ <;> omega - rw [Finset.sum_congr rfl hterms] - ring - · push Not at hm12 - rw [ite_eq_right (fun h => by - simp_all)] - simp only [sub_zero] - have hmin0 : min (m 1) (m 2) = 0 := by - by_cases h : 1 ≤ m 1 - · simp_all - · omega - rw [hmin0, show (0 : ℕ) + 1 = 1 from rfl] - simp only [Finset.sum_range_one, mul_zero, add_zero, Nat.sub_zero] - change f m = f (mkFin3 (m 0) (m 1) (m 2)) - rw [← mkFin3_ext] - · -- m 0 < 2 (m 0 ≤ 1) - have hm0' : m 0 ≤ 1 := by omega - rw [ite_eq_right (fun h => by - simp_all)] - simp only [zero_sub] + exact hrec + · rw [ite_eq_right hm0] have hψ_sum : ∑ k ∈ Finset.range (min (m 1) (m 2) + 1), f (mkFin3 (m 0 + 2 * k) (m 1 - k) (m 2 - k)) = 0 := by - rw [ψHom_coeff_sum f (m 0) (m 1) (m 2) hm0', hψ0, map_zero] - by_cases hm12 : 1 ≤ m 1 ∧ 1 ≤ m 2 - · rw [ite_eq_left (hd₁₂_iff.mpr hm12)] - change f m = -(divQ f (m - d₁₂)) - simp only [divQ] - have s0 : (m - d₁₂) 0 = m 0 := by simp [Finsupp.tsub_apply, d₁₂, Finsupp.add_apply] - have s1 : (m - d₁₂) 1 = m 1 - 1 := by simp [Finsupp.tsub_apply, d₁₂, Finsupp.add_apply] - have s2 : (m - d₁₂) 2 = m 2 - 1 := by simp [Finsupp.tsub_apply, d₁₂, Finsupp.add_apply] - rw [s0, s1, s2] - rw [show min (m 1 - 1) (m 2 - 1) + 1 = min (m 1) (m 2) from by omega] - -- From hψ_sum, peel off first term - rw [Finset.sum_range_succ'] at hψ_sum - simp only [mul_zero, add_zero, Nat.sub_zero] at hψ_sum - suffices ∀ k ∈ Finset.range (min (m 1) (m 2)), - f (mkFin3 (m 0 + 2 * (k + 1)) (m 1 - (k + 1)) (m 2 - (k + 1))) = - f (mkFin3 (m 0 + 2 + 2 * k) (m 1 - 1 - k) (m 2 - 1 - k)) by - rw [Finset.sum_congr rfl this] at hψ_sum - exact (congr_arg f (mkFin3_ext m)).trans (eq_neg_of_add_eq_zero_right hψ_sum) - intro k _ - congr 1 - rw [mkFin3_inj] - refine ⟨by ring, ?_, ?_⟩ <;> omega - · push Not at hm12 - rw [ite_eq_right (fun h => by - simp_all)] - simp only [neg_zero] - have : min (m 1) (m 2) = 0 := by - by_cases h : 1 ≤ m 1 - · simp_all - · omega - rw [this, show (0 : ℕ) + 1 = 1 from rfl] at hψ_sum - simp only [Finset.sum_range_one, mul_zero, add_zero, Nat.sub_zero] at hψ_sum - change f m = 0 - exact (congr_arg f (mkFin3_ext m)).trans hψ_sum + rw [ψHom_coeff_sum f (m 0) (m 1) (m 2) (by omega), hψ0, map_zero] + rwa [hψ_sum] at hrec end T_isDomain_proof diff --git a/LeanPool/AndersonConjecture/CompleteDomain/LocalRing.lean b/LeanPool/AndersonConjecture/CompleteDomain/LocalRing.lean index 8ad4f186a0..b43ac58f75 100644 --- a/LeanPool/AndersonConjecture/CompleteDomain/LocalRing.lean +++ b/LeanPool/AndersonConjecture/CompleteDomain/LocalRing.lean @@ -3,17 +3,21 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import Mathlib.Algebra.Lie.OfAssociative +module + +public import Mathlib.RingTheory.Henselian +public import Mathlib.RingTheory.MvPowerSeries.Rename +public import LeanPool.AndersonConjecture.CompleteDomain.Domain +public import Mathlib.RingTheory.KrullDimension.Basic +public import Mathlib.RingTheory.MvPowerSeries.Inverse +public import Mathlib.RingTheory.PowerSeries.Basic +import Mathlib.Analysis.CStarAlgebra.Classes import Mathlib.Analysis.Complex.Cardinality import Mathlib.Data.Finsupp.Encodable -import Mathlib.Order.BourbakiWitt import Mathlib.RingTheory.AdicCompletion.Noetherian -import Mathlib.RingTheory.Henselian import Mathlib.RingTheory.Ideal.KrullsHeightTheorem -import Mathlib.RingTheory.MvPowerSeries.Rename import Mathlib.RingTheory.PicardGroup import Mathlib.RingTheory.PowerSeries.Ideal -import LeanPool.AndersonConjecture.CompleteDomain.Domain /-! # The Complete Domain T -- Local Ring Properties @@ -22,6 +26,8 @@ T = C[[x,y,z]]/(x^2 - yz) is a Noetherian complete local domain whose residue field has the cardinality of C. -/ +@[expose] public section + noncomputable section -- T is local since it's a quotient of a local ring by a proper ideal @@ -267,6 +273,90 @@ lemma coeff_eq_zero_of_mem_MPS_pow omega rw [ih b hb, mul_zero] +private lemma mvPowerSeries_eq_sum_X_mul {k : Type*} [CommRing k] + (f : MvPowerSeries (Fin 3) k) (hf : MvPowerSeries.constantCoeff f = 0) : + f = X 0 * (show MvPowerSeries (Fin 3) k from fun m => coeff (m + single 0 1) f) + + X 1 * (show MvPowerSeries (Fin 3) k from fun m => + if m 0 = 0 then coeff (m + single 1 1) f else 0) + + X 2 * (show MvPowerSeries (Fin 3) k from fun m => + if m 0 = 0 ∧ m 1 = 0 then coeff (m + single 2 1) f else 0) := by + let g₀ : MvPowerSeries (Fin 3) k := fun m => coeff (m + single 0 1) f + let g₁ : MvPowerSeries (Fin 3) k := fun m => + if m 0 = 0 then coeff (m + single 1 1) f else 0 + let g₂ : MvPowerSeries (Fin 3) k := fun m => + if m 0 = 0 ∧ m 1 = 0 then coeff (m + single 2 1) f else 0 + change f = X 0 * g₀ + X 1 * g₁ + X 2 * g₂ + ext m + have step (s : Fin 3) (g : MvPowerSeries (Fin 3) k) : + coeff m (X s * g) = if single s 1 ≤ m then g (m - single s 1) else 0 := by + change coeff m (monomial (single s 1) 1 * g) = _ + rw [coeff_monomial_mul, one_mul, coeff_apply] + simp only [map_add, coeff_apply, step] + have tsub_val (s j : Fin 3) : + (m - single s 1 : Fin 3 →₀ ℕ) j = m j - (single s 1 : Fin 3 →₀ ℕ) j := + Finsupp.tsub_apply _ _ _ + have h_g1_van (d : Fin 3 →₀ ℕ) (hd : d 0 ≠ 0) : g₁ d = 0 := ite_eq_right hd + have h_g2_van_0 (d : Fin 3 →₀ ℕ) (hd : d 0 ≠ 0) : g₂ d = 0 := + ite_eq_right (not_and_of_not_left _ hd) + have h_g2_van_1 (d : Fin 3 →₀ ℕ) (hd : d 1 ≠ 0) : g₂ d = 0 := + ite_eq_right (not_and_of_not_right _ hd) + by_cases hm0 : single (0 : Fin 3) 1 ≤ m + · rw [ite_eq_left hm0] + set d₀ := m - single (0 : Fin 3) 1 + have hd₀_add : d₀ + single 0 1 = m := tsub_add_cancel_of_le hm0 + have hm0v := single_le_iff.mp hm0 + change f m = coeff (d₀ + single 0 1) f + _ + _ + rw [hd₀_add, coeff_apply] + have h0_ne (s : Fin 3) (hs : s ≠ 0) : + (m - single s 1 : Fin 3 →₀ ℕ) 0 ≠ 0 := by + rw [tsub_val s 0, single_apply, ite_eq_right hs] + simpa only [tsub_zero] using Nat.ne_of_gt hm0v + have t1 : g₁ (m - single (1 : Fin 3) 1) = 0 := h_g1_van _ (h0_ne 1 (by decide)) + have t2 : g₂ (m - single (2 : Fin 3) 1) = 0 := h_g2_van_0 _ (h0_ne 2 (by decide)) + simp only [t1, t2, ite_self, add_zero] + · rw [ite_eq_right hm0, zero_add] + have hm0v : m 0 = 0 := by simp [single_le_iff] at hm0 + omega + by_cases hm1 : single (1 : Fin 3) 1 ≤ m + · rw [ite_eq_left hm1] + set d₁ := m - single (1 : Fin 3) 1 + have hd₁_add : d₁ + single 1 1 = m := tsub_add_cancel_of_le hm1 + have hm1v := single_le_iff.mp hm1 + have hd₁_0 : d₁ 0 = 0 := by + change (m - single (1 : Fin 3) 1 : Fin 3 →₀ ℕ) 0 = 0 + rw [tsub_val 1 0, single_apply] + simpa only [Fin.isValue, one_ne_zero, ↓reduceIte, tsub_zero] using hm0v + change f m = (if d₁ 0 = 0 then coeff (d₁ + single 1 1) f else 0) + _ + rw [ite_eq_left hd₁_0, hd₁_add, coeff_apply] + have h1_ne : (m - single (2 : Fin 3) 1 : Fin 3 →₀ ℕ) 1 ≠ 0 := by + rw [tsub_val 2 1, single_apply, ite_eq_right (by decide : (2 : Fin 3) ≠ 1)] + simpa only [tsub_zero] using Nat.ne_of_gt hm1v + simp only [h_g2_van_1 _ h1_ne, ite_self, add_zero] + · rw [ite_eq_right hm1, zero_add] + have hm1v : m 1 = 0 := by simp [single_le_iff] at hm1 + omega + by_cases hm2 : single (2 : Fin 3) 1 ≤ m + · rw [ite_eq_left hm2] + set d₂ := m - single (2 : Fin 3) 1 + have hd₂_add : d₂ + single 2 1 = m := tsub_add_cancel_of_le hm2 + have hd₂_0 : d₂ 0 = 0 := by + change (m - single (2 : Fin 3) 1 : Fin 3 →₀ ℕ) 0 = 0 + rw [tsub_val 2 0, single_apply] + simpa only [Fin.isValue, Fin.reduceEq, ↓reduceIte, tsub_zero] using hm0v + have hd₂_1 : d₂ 1 = 0 := by + change (m - single (2 : Fin 3) 1 : Fin 3 →₀ ℕ) 1 = 0 + rw [tsub_val 2 1, single_apply] + simpa only [Fin.isValue, Fin.reduceEq, ↓reduceIte, tsub_zero] using hm1v + change f m = if d₂ 0 = 0 ∧ d₂ 1 = 0 then coeff (d₂ + single 2 1) f else 0 + rw [ite_eq_left ⟨hd₂_0, hd₂_1⟩, hd₂_add, coeff_apply] + · rw [ite_eq_right hm2] + have hm2v : m 2 = 0 := by simp [single_le_iff] at hm2 + omega + have : m = 0 := by ext i + fin_cases i <;> assumption + subst this + exact hf + -- Converse: vanishing coefficients at degree < n implies f ∈ MPS^n lemma mem_MPS_pow_of_coeff_vanish (f : MvPowerSeries (Fin 3) ℂ) (n : ℕ) @@ -305,9 +395,6 @@ lemma mem_MPS_pow_of_coeff_vanish simp [tdeg, Finsupp.sum_single_index] omega) · rfl - have hfM : f ∈ MPS := by - rw [IsLocalRing.mem_maximalIdeal, mem_nonunits_iff, isUnit_iff_constantCoeff, hconst] - exact not_isUnit_zero -- Decompose f = X₀g₀ + X₁g₁ + X₂g₂; each X_i*g_i ∈ MPS^(n+1) suffices hdecomp : f = X 0 * g₀ + X 1 * g₁ + X 2 * g₂ by rw [hdecomp] @@ -322,90 +409,7 @@ lemma mem_MPS_pow_of_coeff_vanish (Ideal.IsTwoSided.pow_succ (I := MPS) n).symm] at this exact Ideal.add_mem _ (Ideal.add_mem _ (key 0 g₀ hg₀) (key 1 g₁ hg₁)) (key 2 g₂ hg₂) - ext m - have step (s : Fin 3) (g : MvPowerSeries (Fin 3) ℂ) : - coeff m (X s * g) = if single s 1 ≤ m then g (m - single s 1) else 0 := by - change coeff m (monomial (single s 1) 1 * g) = _ - rw [coeff_monomial_mul, one_mul, coeff_apply] - simp only [map_add, coeff_apply, step] - have tsub_val (s j : Fin 3) (hle : single s 1 ≤ m) : - (m - single s 1 : Fin 3 →₀ ℕ) j = m j - (single s 1 : Fin 3 →₀ ℕ) j := - Finsupp.tsub_apply _ _ _ - have h_g1_van (d : Fin 3 →₀ ℕ) (hd : d 0 ≠ 0) : g₁ d = 0 := ite_eq_right hd - have h_g2_van_0 (d : Fin 3 →₀ ℕ) (hd : d 0 ≠ 0) : g₂ d = 0 := - ite_eq_right (not_and_of_not_left _ hd) - have h_g2_van_1 (d : Fin 3 →₀ ℕ) (hd : d 1 ≠ 0) : g₂ d = 0 := - ite_eq_right (not_and_of_not_right _ hd) - -- Case split on which X_i "captures" monomial m - by_cases hm0 : single (0 : Fin 3) 1 ≤ m - · rw [ite_eq_left hm0] - set d₀ := m - single (0 : Fin 3) 1 - have hd₀_add : d₀ + single 0 1 = m := tsub_add_cancel_of_le hm0 - have hm0v := single_le_iff.mp hm0 - change f m = coeff (d₀ + single 0 1) f + _ + _ - rw [hd₀_add, coeff_apply] - have h0_ne (s : Fin 3) (hs : s ≠ 0) (hle : single s 1 ≤ m) : - (m - single s 1 : Fin 3 →₀ ℕ) 0 ≠ 0 := by - rw [tsub_val s 0 hle, single_apply, ite_eq_right hs] - omega - have t1 : ∀ h1 : single (1 : Fin 3) 1 ≤ m, - g₁ (m - single (1 : Fin 3) 1) = 0 := - fun h1 => h_g1_van _ (h0_ne 1 (by decide) h1) - have t2 : ∀ h2 : single (2 : Fin 3) 1 ≤ m, - g₂ (m - single (2 : Fin 3) 1) = 0 := - fun h2 => h_g2_van_0 _ (h0_ne 2 (by decide) h2) - by_cases h1 : single (1 : Fin 3) 1 ≤ m <;> by_cases h2 : single (2 : Fin 3) 1 ≤ m - · simp only [ite_eq_left h1, ite_eq_left h2, t1 h1, t2 h2, add_zero] - · simp only [ite_eq_left h1, ite_eq_right h2, t1 h1, add_zero] - · simp only [ite_eq_right h1, ite_eq_left h2, t2 h2, add_zero] - · simp only [ite_eq_right h1, ite_eq_right h2, add_zero] - · rw [ite_eq_right hm0, zero_add] - have hm0v : m 0 = 0 := by simp [single_le_iff] at hm0 - omega - by_cases hm1 : single (1 : Fin 3) 1 ≤ m - · rw [ite_eq_left hm1] - set d₁ := m - single (1 : Fin 3) 1 - have hd₁_add : d₁ + single 1 1 = m := tsub_add_cancel_of_le hm1 - have hm1v := single_le_iff.mp hm1 - have hd₁_0 : d₁ 0 = 0 := by - change (m - single (1 : Fin 3) 1 : Fin 3 →₀ ℕ) 0 = 0 - rw [tsub_val 1 0 hm1, single_apply] - simpa only [Fin.isValue, one_ne_zero, ↓reduceIte, tsub_zero] using hm0v - change f m = (if d₁ 0 = 0 then coeff (d₁ + single 1 1) f else 0) + _ - rw [ite_eq_left hd₁_0, hd₁_add, coeff_apply] - have h1_ne : ∀ h2 : single (2 : Fin 3) 1 ≤ m, - (m - single (2 : Fin 3) 1 : Fin 3 →₀ ℕ) 1 ≠ 0 := by - intro h2 - rw [tsub_val 2 1 h2, single_apply, ite_eq_right (by decide : (2 : Fin 3) ≠ 1)] - omega - by_cases h2 : single (2 : Fin 3) 1 ≤ m - · simp only [ite_eq_left h2, h_g2_van_1 _ (h1_ne h2), add_zero] - · simp only [ite_eq_right h2, add_zero] - · rw [ite_eq_right hm1, zero_add] - have hm1v : m 1 = 0 := by simp [single_le_iff] at hm1 - omega - by_cases hm2 : single (2 : Fin 3) 1 ≤ m - · rw [ite_eq_left hm2] - set d₂ := m - single (2 : Fin 3) 1 - have hd₂_add : d₂ + single 2 1 = m := tsub_add_cancel_of_le hm2 - have hd₂_0 : d₂ 0 = 0 := by - change (m - single (2 : Fin 3) 1 : Fin 3 →₀ ℕ) 0 = 0 - rw [tsub_val 2 0 hm2, single_apply] - simpa only [Fin.isValue, Fin.reduceEq, ↓reduceIte, tsub_zero] using hm0v - have hd₂_1 : d₂ 1 = 0 := by - change (m - single (2 : Fin 3) 1 : Fin 3 →₀ ℕ) 1 = 0 - rw [tsub_val 2 1 hm2, single_apply] - simpa only [Fin.isValue, Fin.reduceEq, ↓reduceIte, tsub_zero] using hm1v - change f m = if d₂ 0 = 0 ∧ d₂ 1 = 0 then coeff (d₂ + single 2 1) f else 0 - rw [ite_eq_left ⟨hd₂_0, hd₂_1⟩, hd₂_add, coeff_apply] - · -- All exponents zero: m = 0, so coeff 0 f = constantCoeff f = 0 - rw [ite_eq_right hm2] - have hm2v : m 2 = 0 := by simp [single_le_iff] at hm2 - omega - have : m = 0 := by ext i - fin_cases i <;> simp_all - subst this - exact hconst + exact mvPowerSeries_eq_sum_X_mul f hconst -- Precompleteness: coefficients stabilize, so define limit coefficientwise lemma mvPS_isPrecomplete : IsPrecomplete MPS (MvPowerSeries (Fin 3) ℂ) := by @@ -523,85 +527,7 @@ lemma mvPS_mem_span_X_of_constantCoeff_zero {k : Type*} [CommRing k] suffices hkey : f = X 0 * g₀ + X 1 * g₁ + X 2 * g₂ by rw [hkey] exact I.add_mem (I.add_mem hX0 hX1) hX2 - ext m - have step (s : Fin 3) (g : MvPowerSeries (Fin 3) k) : - coeff m (X s * g) = if single s 1 ≤ m then g (m - single s 1) else 0 := by - change coeff m (monomial (single s 1) 1 * g) = _ - rw [coeff_monomial_mul, one_mul, coeff_apply] - simp only [map_add, coeff_apply, step] - have tsub_val (s j : Fin 3) (hle : single s 1 ≤ m) : - (m - single s 1 : Fin 3 →₀ ℕ) j = m j - (single s 1 : Fin 3 →₀ ℕ) j := - Finsupp.tsub_apply _ _ _ - have h_g1_van (d : Fin 3 →₀ ℕ) (hd : d 0 ≠ 0) : g₁ d = 0 := ite_eq_right hd - have h_g2_van_0 (d : Fin 3 →₀ ℕ) (hd : d 0 ≠ 0) : g₂ d = 0 := - ite_eq_right (not_and_of_not_left _ hd) - have h_g2_van_1 (d : Fin 3 →₀ ℕ) (hd : d 1 ≠ 0) : g₂ d = 0 := - ite_eq_right (not_and_of_not_right _ hd) - by_cases hm0 : single (0 : Fin 3) 1 ≤ m - · rw [ite_eq_left hm0] - set d₀ := m - single (0 : Fin 3) 1 - have hd₀_add : d₀ + single 0 1 = m := tsub_add_cancel_of_le hm0 - have hm0v := single_le_iff.mp hm0 - change f m = coeff (d₀ + single 0 1) f + _ + _ - rw [hd₀_add, coeff_apply] - have h0_ne (s : Fin 3) (hs : s ≠ 0) (hle : single s 1 ≤ m) : - (m - single s 1 : Fin 3 →₀ ℕ) 0 ≠ 0 := by - rw [tsub_val s 0 hle, single_apply, ite_eq_right hs] - simp - omega - have t1 : ∀ h1 : single (1 : Fin 3) 1 ≤ m, - g₁ (m - single (1 : Fin 3) 1) = 0 := fun h1 => h_g1_van _ (h0_ne 1 (by decide) h1) - have t2 : ∀ h2 : single (2 : Fin 3) 1 ≤ m, - g₂ (m - single (2 : Fin 3) 1) = 0 := fun h2 => h_g2_van_0 _ (h0_ne 2 (by decide) h2) - by_cases h1 : single (1 : Fin 3) 1 ≤ m <;> by_cases h2 : single (2 : Fin 3) 1 ≤ m <;> - simp only [h1, h2, t1, t2, ↓reduceIte, add_zero] - · rw [ite_eq_right hm0, zero_add] - have hm0v : m 0 = 0 := by simp [single_le_iff] at hm0 - omega - by_cases hm1 : single (1 : Fin 3) 1 ≤ m - · rw [ite_eq_left hm1] - set d₁ := m - single (1 : Fin 3) 1 - have hd₁_add : d₁ + single 1 1 = m := tsub_add_cancel_of_le hm1 - have hm1v := single_le_iff.mp hm1 - have hd₁_0 : d₁ 0 = 0 := by - change (m - single (1 : Fin 3) 1 : Fin 3 →₀ ℕ) 0 = 0 - rw [tsub_val 1 0 hm1, single_apply] - simpa only [Fin.isValue, one_ne_zero, ↓reduceIte, tsub_zero] using hm0v - change f m = (if d₁ 0 = 0 then coeff (d₁ + single 1 1) f else 0) + _ - rw [ite_eq_left hd₁_0, hd₁_add, coeff_apply] - have h1_ne : ∀ h2 : single (2 : Fin 3) 1 ≤ m, - (m - single (2 : Fin 3) 1 : Fin 3 →₀ ℕ) 1 ≠ 0 := by - intro h2 - rw [tsub_val 2 1 h2, single_apply] - simp - omega - by_cases h2 : single (2 : Fin 3) 1 ≤ m <;> - simp only [h2, ↓reduceIte, add_zero] - exact (h_g2_van_1 _ (h1_ne ‹_›) ▸ add_zero (f m)).symm - · rw [ite_eq_right hm1, zero_add] - have hm1v : m 1 = 0 := by simp [single_le_iff] at hm1 - omega - by_cases hm2 : single (2 : Fin 3) 1 ≤ m - · rw [ite_eq_left hm2] - set d₂ := m - single (2 : Fin 3) 1 - have hd₂_add : d₂ + single 2 1 = m := tsub_add_cancel_of_le hm2 - have hd₂_0 : d₂ 0 = 0 := by - change (m - single (2 : Fin 3) 1 : Fin 3 →₀ ℕ) 0 = 0 - rw [tsub_val 2 0 hm2, single_apply] - simpa only [Fin.isValue, Fin.reduceEq, ↓reduceIte, tsub_zero] using hm0v - have hd₂_1 : d₂ 1 = 0 := by - change (m - single (2 : Fin 3) 1 : Fin 3 →₀ ℕ) 1 = 0 - rw [tsub_val 2 1 hm2, single_apply] - simpa only [Fin.isValue, Fin.reduceEq, ↓reduceIte, tsub_zero] using hm1v - change f m = if d₂ 0 = 0 ∧ d₂ 1 = 0 then coeff (d₂ + single 2 1) f else 0 - rw [ite_eq_left ⟨hd₂_0, hd₂_1⟩, hd₂_add, coeff_apply] - · rw [ite_eq_right hm2] - have hm2v : m 2 = 0 := by simp [single_le_iff] at hm2 - omega - have : m = 0 := by ext i - fin_cases i <;> assumption - subst this - exact hf + exact mvPowerSeries_eq_sum_X_mul f hf -- maximalIdeal = span{X₀, X₁, X₂}: ⊆ by decomposition, ⊇ since each X_i has zero constant term open MvPowerSeries in @@ -640,15 +566,11 @@ lemma mvPS_ringKrullDim_le : Set _)).spanFinrank ≤ 3 := by have hfin : ({(X 0 : MvPowerSeries (Fin 3) ℂ), X 1, X 2} : Set _).Finite := Set.Finite.insert _ (Set.Finite.insert _ (Set.finite_singleton _)) - exact le_trans (Submodule.spanFinrank_span_le_ncard_of_finite hfin) (by - calc ({(X 0 : MvPowerSeries (Fin 3) ℂ), X 1, X 2} : Set _).ncard - ≤ ({X 1, X 2} : Set (MvPowerSeries (Fin 3) ℂ)).ncard + 1 := Set.ncard_insert_le _ _ - _ ≤ ({X 2} : Set (MvPowerSeries (Fin 3) ℂ)).ncard + 1 + 1 := by - gcongr - exact Set.ncard_insert_le _ _ - _ ≤ 1 + 1 + 1 := by gcongr - exact le_of_eq (Set.ncard_singleton _) - _ = 3 := by norm_num) + refine (Submodule.spanFinrank_span_le_ncard_of_finite hfin).trans ?_ + have houter := Set.ncard_insert_le (X 0 : MvPowerSeries (Fin 3) ℂ) {X 1, X 2} + have hinner := Set.ncard_insert_le (X 1 : MvPowerSeries (Fin 3) ℂ) {X 2} + simp only [Set.ncard_singleton] at hinner + omega change (↑(Ideal.span _).height : WithBot ℕ∞) ≤ 3 calc (↑(Ideal.span _).height : WithBot ℕ∞) ≤ ↑(Ideal.span _).spanFinrank := by exact_mod_cast h1 diff --git a/LeanPool/AndersonConjecture/Jensen.lean b/LeanPool/AndersonConjecture/Jensen.lean index b63f6cb4b5..ba2377b376 100644 --- a/LeanPool/AndersonConjecture/Jensen.lean +++ b/LeanPool/AndersonConjecture/Jensen.lean @@ -3,18 +3,23 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module -import LeanPool.AndersonConjecture.Jensen.Adjoin -import LeanPool.AndersonConjecture.Jensen.Application -import LeanPool.AndersonConjecture.Jensen.Avoidance -import LeanPool.AndersonConjecture.Jensen.CloseUp -import LeanPool.AndersonConjecture.Jensen.CombinedStep -import LeanPool.AndersonConjecture.Jensen.Construction -import LeanPool.AndersonConjecture.Jensen.Defs -import LeanPool.AndersonConjecture.Jensen.Jensen -import LeanPool.AndersonConjecture.Jensen.KrullDomain -import LeanPool.AndersonConjecture.Jensen.NSubring -import LeanPool.AndersonConjecture.Jensen.TransfiniteUnion +public import LeanPool.AndersonConjecture.Jensen.Adjoin +public import LeanPool.AndersonConjecture.Jensen.Application +public import LeanPool.AndersonConjecture.Jensen.Avoidance +public import LeanPool.AndersonConjecture.Jensen.CloseUp +public import LeanPool.AndersonConjecture.Jensen.CombinedStep +public import LeanPool.AndersonConjecture.Jensen.Construction +public import LeanPool.AndersonConjecture.Jensen.Defs +public import LeanPool.AndersonConjecture.Jensen.Jensen +public import LeanPool.AndersonConjecture.Jensen.KrullDomain +public import LeanPool.AndersonConjecture.Jensen.NSubring +public import LeanPool.AndersonConjecture.Jensen.TransfiniteUnion +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Inv /-! # Jensen's Corollary 2.4: UFDs with Prescribed Completion @@ -23,3 +28,5 @@ Index file for the `LeanPool.AndersonConjecture.Jensen` directory: constructing a UFD with a prescribed completion (Jensen 2006, building on Loepp 1997 and Heitmann 1993). -/ + +@[expose] public section diff --git a/LeanPool/AndersonConjecture/Jensen/Adjoin.lean b/LeanPool/AndersonConjecture/Jensen/Adjoin.lean index 0f091b54c0..f18723fe22 100644 --- a/LeanPool/AndersonConjecture/Jensen/Adjoin.lean +++ b/LeanPool/AndersonConjecture/Jensen/Adjoin.lean @@ -3,10 +3,17 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module -import LeanPool.AndersonConjecture.Jensen.Adjoin.Adjoin -import LeanPool.AndersonConjecture.Jensen.Adjoin.FromPrime -import LeanPool.AndersonConjecture.Jensen.Adjoin.Transcendental +public import LeanPool.AndersonConjecture.Jensen.Adjoin.Adjoin +public import LeanPool.AndersonConjecture.Jensen.Adjoin.FromPrime +public import LeanPool.AndersonConjecture.Jensen.Adjoin.Transcendental +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Adjoining Elements to N-subrings @@ -14,3 +21,5 @@ import LeanPool.AndersonConjecture.Jensen.Adjoin.Transcendental Index file for the `LeanPool.AndersonConjecture.Jensen.Adjoin` directory: adjoining elements to N-subrings (Loepp, Jensen, Heitmann). -/ + +@[expose] public section diff --git a/LeanPool/AndersonConjecture/Jensen/Adjoin/Adjoin.lean b/LeanPool/AndersonConjecture/Jensen/Adjoin/Adjoin.lean index 7b0b29e85b..6c3687550c 100644 --- a/LeanPool/AndersonConjecture/Jensen/Adjoin/Adjoin.lean +++ b/LeanPool/AndersonConjecture/Jensen/Adjoin/Adjoin.lean @@ -3,10 +3,21 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.AndersonConjecture.Jensen.Adjoin.FromPrime +module + +public import LeanPool.AndersonConjecture.Jensen.NSubring +public import Mathlib.RingTheory.AdicCompletion.Basic +import LeanPool.AndersonConjecture.Jensen.Adjoin.Transcendental import LeanPool.AndersonConjecture.Jensen.Avoidance +import Mathlib.Algebra.GroupWithZero.Submonoid.CancelMulZero +import Mathlib.Algebra.Polynomial.Cardinal +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations import Mathlib.Data.Finsupp.Encodable import Mathlib.RingTheory.Ideal.AssociatedPrime.Localization +import Mathlib.RingTheory.PicardGroup +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Adjoining Elements to N-Subrings @@ -17,6 +28,8 @@ adjunction from a prime ideal (Jensen), and the surjectivity step ensuring R → T/M² stays surjective (Heitmann Lemma 5). -/ +@[expose] public section + noncomputable section open Cardinal Ideal Polynomial Set Pointwise @@ -61,8 +74,9 @@ private def adjoin_surjectivity_proof have hC_mem : ∀ P ∈ C, ∃ (r : R.carrier), (r : T) ≠ 0 ∧ P ∈ associatedPrimes T (T ⧸ Ideal.span {(r : T)}) := by intro P hP - rw [mem_iUnion] at hP - simp_all + obtain ⟨r, hr⟩ := mem_iUnion.mp hP + obtain ⟨hr_ne, hP_assoc⟩ := mem_iUnion.mp hr + exact ⟨r, hr_ne, hP_assoc⟩ have hC_prime : ∀ P ∈ C, P.IsPrime := by intro P hP obtain ⟨r, _, hP_assoc⟩ := hC_mem P hP @@ -70,7 +84,7 @@ private def adjoin_surjectivity_proof have hC_ne_max : ∀ P ∈ C, P ≠ IsLocalRing.maximalIdeal T := by intro P hP hPM obtain ⟨r, hr_ne, hP_assoc⟩ := hC_mem P hP - simp_all + exact hM_not_assoc r hr_ne (hPM ▸ hP_assoc) have hM2_not_le : ∀ P ∈ C, ¬(IsLocalRing.maximalIdeal T ^ 2 ≤ P) := by intro P hP hle have hP_prime := hC_prime P hP @@ -212,7 +226,9 @@ private def adjoin_surjectivity_proof gcongr · exact Polynomial.cardinalMk_le_max.trans (max_le le_rfl hR_inf) · apply ciSup_le' - simp_all + intro f + exact Cardinal.mk_le_aleph0_iff.mpr + (Polynomial.rootSet_finite f T).countable.to_subtype _ = Cardinal.mk R.carrier := Cardinal.mul_aleph0_eq hR_inf _ = Cardinal.mk R.carrier := Cardinal.add_eq_left hR_inf le_rfl have hD_mod_shifted_le : Cardinal.mk D_mod_shifted ≤ Cardinal.mk R.carrier := by @@ -237,7 +253,7 @@ private def adjoin_surjectivity_proof Cardinal.mk_iUnion_le _ _ ≤ Cardinal.mk R.carrier * Cardinal.aleph0 := by gcongr - · simp_all + · exact Polynomial.cardinalMk_le_max.trans (max_le le_rfl hR_inf) · apply ciSup_le' intro f apply Cardinal.mk_le_aleph0_iff.mpr @@ -317,22 +333,17 @@ private def adjoin_surjectivity_proof intro Q ⟨hQ_prime, hQ_le_span⟩ hQ_le_P by_contra hPQ have hQ_ne_P : Q ≠ P := fun h => hPQ (h ▸ le_refl _) - have hQ_ne_bot : Q ≠ ⊥ := by - intro h - simp_all + have hQ_ne_bot : Q ≠ ⊥ := fun h => hr₀T_ne + (Ideal.span_singleton_eq_bot.mp (bot_unique (hQ_le_span.trans_eq h))) have hQ_lt_P : Q < P := lt_of_le_of_ne hQ_le_P hQ_ne_P have h_bot_lt_Q : (⊥ : Ideal T) < Q := bot_lt_iff_ne_bot.mpr hQ_ne_bot + have h1 := @Ideal.height_add_one_le_of_lt_of_isPrime T _ ⊥ Q + Ideal.isPrime_bot hQ_prime h_bot_lt_Q have h2 := @Ideal.height_add_one_le_of_lt_of_isPrime T _ Q P hQ_prime hP_prime hQ_lt_P - have h4 : (2 : ℕ∞) ≤ P.height := - calc (2 : ℕ∞) = 0 + 1 + 1 := by norm_num - _ ≤ (⊥ : Ideal T).height + 1 + 1 := by - simp_all - _ ≤ Q.height + 1 := by - gcongr - exact @Ideal.height_add_one_le_of_lt_of_isPrime T _ ⊥ Q - Ideal.isPrime_bot hQ_prime h_bot_lt_Q - _ ≤ P.height := h2 - exact not_lt.mpr h4 (by exact_mod_cast hP_ht.trans_lt (by norm_num)) + have h4 : (2 : ℕ∞) ≤ P.height := by + simpa only [Ideal.height_bot, zero_add, one_add_one_eq_two] using + (add_le_add_left h1 1).trans h2 + exact (by norm_num : ¬(2 : ℕ∞) ≤ 1) (h4.trans hP_ht) have hP_assoc : P ∈ associatedPrimes T (T ⧸ Ideal.span {(r₀ : T)}) := by have hsub := Module.associatedPrimes.minimalPrimes_annihilator_subset_associatedPrimes T (T ⧸ Ideal.span {(r₀ : T)}) @@ -363,7 +374,8 @@ private def adjoin_surjectivity_proof obtain ⟨S, hext, hut_mem⟩ := adjoin_transcendental_isNSubring R (u + t) hut_trans hAss_ht hut_mod_trans refine ⟨S, hext, ⟨⟨u + t, hut_mem⟩, ?_⟩⟩ - simp_all + simpa only [sub_add_eq_sub_sub, sub_self, zero_sub] using + ((IsLocalRing.maximalIdeal T ^ 2).neg_mem ht_M2) ⟩ theorem adjoin_surjectivity diff --git a/LeanPool/AndersonConjecture/Jensen/Adjoin/FromPrime.lean b/LeanPool/AndersonConjecture/Jensen/Adjoin/FromPrime.lean index 9a3501b6c1..41612a8eaa 100644 --- a/LeanPool/AndersonConjecture/Jensen/Adjoin/FromPrime.lean +++ b/LeanPool/AndersonConjecture/Jensen/Adjoin/FromPrime.lean @@ -3,10 +3,21 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.Jensen.NSubring +public import Mathlib.RingTheory.AdicCompletion.Basic import LeanPool.AndersonConjecture.Jensen.Adjoin.Transcendental import LeanPool.AndersonConjecture.Jensen.Avoidance +import Mathlib.Algebra.GroupWithZero.Submonoid.CancelMulZero +import Mathlib.Algebra.Polynomial.Cardinal +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations import Mathlib.Data.Finsupp.Encodable import Mathlib.RingTheory.Ideal.AssociatedPrime.Localization +import Mathlib.RingTheory.PicardGroup +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Adjoining from a Prime Ideal @@ -19,6 +30,8 @@ Jensen, "Completions of UFDs with semi-local formal fibers", 2006, Lemma 2.1 (case P = (0)). -/ +@[expose] public section + noncomputable section open Cardinal Ideal Polynomial Set Pointwise @@ -73,8 +86,9 @@ private def adjoin_from_prime_proof have hC_mem : ∀ P ∈ C, ∃ (r : R.carrier), (r : T) ≠ 0 ∧ P ∈ associatedPrimes T (T ⧸ Ideal.span {(r : T)}) := by intro P hP - rw [mem_iUnion] at hP - simp_all + obtain ⟨r, hr⟩ := mem_iUnion.mp hP + obtain ⟨hr_ne, hP_assoc⟩ := mem_iUnion.mp hr + exact ⟨r, hr_ne, hP_assoc⟩ have hC_prime : ∀ P ∈ C, P.IsPrime := by intro P hP obtain ⟨r, _, hP_assoc⟩ := hC_mem P hP @@ -82,7 +96,7 @@ private def adjoin_from_prime_proof have hC_ne_max : ∀ P ∈ C, P ≠ IsLocalRing.maximalIdeal T := by intro P hP hPM obtain ⟨r, hr_ne, hP_assoc⟩ := hC_mem P hP - simp_all + exact hM_not_assoc r hr_ne (hPM ▸ hP_assoc) -- q ⊄ P for P ∈ C: height argument have hq_not_le : ∀ P ∈ C, ¬(q ≤ P) := by intro P hP hle @@ -92,29 +106,20 @@ private def adjoin_from_prime_proof rcases eq_or_lt_of_le hle with rfl | hlt · -- q = P: r ∈ q via associated prime, contradicts q ∩ R = ⊥ have hr_mem_q : (r : T) ∈ q := by - obtain ⟨_, m, hann⟩ := hP_assoc - rw [hann] - apply Ideal.le_radical - rw [Submodule.mem_colon_singleton] - change (r : T) • m ∈ (⊥ : Submodule T (T ⧸ Ideal.span {(r : T)})) - rw [Submodule.mem_bot] - obtain ⟨m', rfl⟩ := Ideal.Quotient.mk_surjective m - change (Ideal.Quotient.mk (Ideal.span {(r : T)})) ((r : T) * m') = 0 - simp_all + have hann_le := hP_assoc.annihilator_le + rw [Submodule.annihilator_top, Ideal.annihilator_quotient] at hann_le + exact hann_le (Ideal.mem_span_singleton_self _) have hr_comap : r ∈ q.comap R.carrier.subtype := Ideal.mem_comap.mpr hr_mem_q - simp_all + exact hr_ne (congrArg Subtype.val (by simpa only [hqR, Ideal.mem_bot] using hr_comap)) · -- q < P: height chain ⊥ < q < P gives ht(P) ≥ 2, contradiction have h_bot_lt_q : (⊥ : Ideal T) < q := bot_lt_iff_ne_bot.mpr hq_ne_bot have h1 := @Ideal.height_add_one_le_of_lt_of_isPrime T _ ⊥ q Ideal.isPrime_bot hq_prime h_bot_lt_q have h2 := Ideal.height_add_one_le_of_lt_of_isPrime hlt - have h4 : (2 : ℕ∞) ≤ P.height := - calc (2 : ℕ∞) = 0 + 1 + 1 := by norm_num - _ ≤ (⊥ : Ideal T).height + 1 + 1 := by - simp_all - _ ≤ q.height + 1 := by gcongr - _ ≤ P.height := h2 - exact not_lt.mpr h4 (by exact_mod_cast hP_ht.trans_lt (by norm_num)) + have h4 : (2 : ℕ∞) ≤ P.height := by + simpa only [Ideal.height_bot, zero_add, one_add_one_eq_two] using + (add_le_add_left h1 1).trans h2 + exact (by norm_num : ¬(2 : ℕ∞) ≤ 1) (h4.trans hP_ht) -- Augment C with ⊥ to ensure t ≠ 0 let C' : Set (Ideal T) := C ∪ {⊥} have hC'_prime : ∀ P ∈ C', P.IsPrime := by @@ -144,7 +149,7 @@ private def adjoin_from_prime_proof intro P hP hle rcases hP with hP | hP · exact hq_not_le P hP hle - · simp_all + · exact hq_ne_bot (bot_unique (mem_singleton_iff.mp hP ▸ hle)) let φ : (P : Ideal T) → R.carrier →+* T ⧸ P := fun P => (Ideal.Quotient.mk P).comp R.carrier.subtype let liftQ : (P : Ideal T) → T ⧸ P → T := @@ -290,7 +295,9 @@ private def adjoin_from_prime_proof | zero => intro f hf_deg hf_eval rw [Polynomial.eq_C_of_natDegree_le_zero hf_deg] at hf_eval ⊢ - simp_all + apply Polynomial.C_eq_zero.mpr + exact (FaithfulSMul.algebraMap_injective R.carrier T) + (by simpa only [aeval_C, map_zero] using hf_eval) | succ n ih => intro f hf_deg hf_eval -- f.coeff 0 ∈ q ∩ R = ⊥, then f = X * f.divX, apply IH @@ -308,10 +315,9 @@ private def adjoin_from_prime_proof exact q.neg_mem (q.mul_mem_right _ ht_q) have hc_comap : f.coeff 0 ∈ q.comap R.carrier.subtype := Ideal.mem_comap.mpr hc_in_q - simp_all + simpa only [hqR, Ideal.mem_bot] using hc_comap have hf_eq : f = X * f.divX := by - have := Polynomial.X_mul_divX_add f - simp_all + simpa only [hc0, map_zero, add_zero] using (Polynomial.X_mul_divX_add f).symm have hdivX_eval : aeval t f.divX = 0 := by have : aeval t f = t * aeval t f.divX := by conv_lhs => rw [hf_eq] @@ -351,20 +357,18 @@ private def adjoin_from_prime_proof have hQ_ne_P : Q ≠ P := fun h => hPQ (h ▸ le_refl _) have hQ_ne_bot : Q ≠ ⊥ := by intro h - simp_all + exact hr₀T_ne (by simpa only [h, Ideal.mem_bot] using + (hQ_le_span (Ideal.mem_span_singleton_self _))) have hQ_lt_P : Q < P := lt_of_le_of_ne hQ_le_P hQ_ne_P have h_bot_lt_Q : (⊥ : Ideal T) < Q := bot_lt_iff_ne_bot.mpr hQ_ne_bot have h1 := @Ideal.height_add_one_le_of_lt_of_isPrime T _ ⊥ Q Ideal.isPrime_bot hQ_prime h_bot_lt_Q have h2 := @Ideal.height_add_one_le_of_lt_of_isPrime T _ Q P hQ_prime hP_prime hQ_lt_P - have h4 : (2 : ℕ∞) ≤ P.height := - calc (2 : ℕ∞) = 0 + 1 + 1 := by norm_num - _ ≤ (⊥ : Ideal T).height + 1 + 1 := by - simp_all - _ ≤ Q.height + 1 := by gcongr - _ ≤ P.height := h2 - exact not_lt.mpr h4 (by exact_mod_cast hP_ht.trans_lt (by norm_num)) + have h4 : (2 : ℕ∞) ≤ P.height := by + simpa only [Ideal.height_bot, zero_add, one_add_one_eq_two] using + (add_le_add_left h1 1).trans h2 + exact (by norm_num : ¬(2 : ℕ∞) ≤ 1) (h4.trans hP_ht) -- Minimal primes of principal ⊆ associated primes of quotient have hP_assoc : P ∈ associatedPrimes T (T ⧸ Ideal.span {(r₀ : T)}) := by have hsub := Module.associatedPrimes.minimalPrimes_annihilator_subset_associatedPrimes diff --git a/LeanPool/AndersonConjecture/Jensen/Adjoin/Transcendental.lean b/LeanPool/AndersonConjecture/Jensen/Adjoin/Transcendental.lean index db16f19605..eb0141c5e9 100644 --- a/LeanPool/AndersonConjecture/Jensen/Adjoin/Transcendental.lean +++ b/LeanPool/AndersonConjecture/Jensen/Adjoin/Transcendental.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.AndersonConjecture.Jensen.NSubring +module + +public import LeanPool.AndersonConjecture.Jensen.NSubring import Mathlib.Algebra.GroupWithZero.Submonoid.CancelMulZero import Mathlib.Algebra.Polynomial.Cardinal -import Mathlib.Order.BourbakiWitt +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient import Mathlib.RingTheory.DedekindDomain.Ideal.Lemmas import Mathlib.RingTheory.SimpleRing.Principal +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Transcendental Extension of N-subrings @@ -20,6 +27,8 @@ ideal yields a new N-subring. Loepp, "Constructing local generic formal fibers", 1997, Lemma 11. -/ +@[expose] public section + noncomputable section @@ -201,10 +210,8 @@ lemma adjoin_height_case_bot IsLocalization.isPrime_of_isPrime_disjoint M' (Polynomial K) J hJ_prime hJ_disj have : (Ideal.map (algebraMap _ (Polynomial K)) J').IsPrime := IsLocalization.isPrime_of_isPrime_disjoint M' (Polynomial K) J' hJ'_prime hJ'_disj - have hJ_map_ne : Ideal.map (algebraMap _ (Polynomial K)) J ≠ ⊥ := by - intro h - have hsat := IsLocalization.under_map_of_isPrime_disjoint M' (Polynomial K) hJ_prime hJ_disj - simp_all + have hJ_map_ne : Ideal.map (algebraMap _ (Polynomial K)) J ≠ ⊥ := + (Ideal.map_eq_bot_iff_of_injective hψ_inj).not.mpr hJ_ne -- K[X] is a PID, dim ≤ 1: nonzero prime ≤ prime implies equality have hmap_eq : Ideal.map (algebraMap _ (Polynomial K)) J = Ideal.map (algebraMap _ (Polynomial K)) J' := @@ -232,72 +239,16 @@ lemma adjoin_height_case_ne_bot (hR_bound : (P.comap R.carrier.subtype).height ≤ 1) (hPR : P.comap R.carrier.subtype ≠ ⊥) : (Ideal.comap S_sub.subtype P).height ≤ ↑(1 : ℕ) := by - -- Step 1: Extract a prime generator p₀ of P ∩ R - obtain ⟨a₀, ha₀_mem, ha₀_ne⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hPR have : UniqueFactorizationMonoid R.carrier := R.isUFD - obtain ⟨p₀, hp₀_prime_R, hp₀_dvd, hp₀_mem_PR⟩ : ∃ p₀ : R.carrier, - Prime p₀ ∧ p₀ ∣ a₀ ∧ p₀ ∈ P.comap R.carrier.subtype := by - obtain ⟨factors, hfp, hassoc⟩ := - UniqueFactorizationMonoid.exists_prime_factors a₀ ha₀_ne - have : (P.comap R.carrier.subtype).IsPrime := hP_prime.comap _ - have hprod_in : factors.prod ∈ P.comap R.carrier.subtype := by - obtain ⟨u, hu⟩ := hassoc - rw [← hu] at ha₀_mem - exact ((hP_prime.comap R.carrier.subtype).mem_or_mem ha₀_mem).elim id - (fun h => absurd - ((P.comap R.carrier.subtype).eq_top_of_isUnit_mem h u.isUnit) - (hP_prime.comap R.carrier.subtype).ne_top) - have hfactor_in_P : ∃ f ∈ factors, f ∈ P.comap R.carrier.subtype := by - suffices ∀ (m : Multiset R.carrier), (∀ b ∈ m, Prime b) → - m.prod ∈ P.comap R.carrier.subtype → - ∃ f ∈ m, f ∈ P.comap R.carrier.subtype from - this factors hfp hprod_in - intro m - induction m using Multiset.induction with - | empty => - intro _ h - simp only [Multiset.prod_zero] at h - exact absurd ((P.comap R.carrier.subtype).eq_top_iff_one.mpr h) - (hP_prime.comap R.carrier.subtype).ne_top - | cons a s ih => - intro hpr hprod - rw [Multiset.prod_cons] at hprod - rcases (hP_prime.comap R.carrier.subtype).mem_or_mem hprod with ha | hs - · exact ⟨a, Multiset.mem_cons_self a s, ha⟩ - · simp_all - obtain ⟨f, hf_mem, hf_P⟩ := hfactor_in_P - exact ⟨f, hfp f hf_mem, dvd_trans (Multiset.dvd_prod hf_mem) hassoc.dvd, hf_P⟩ - have hp₀_ne : p₀ ≠ 0 := hp₀_prime_R.ne_zero - have hp₀_ne_T : (p₀ : T) ≠ 0 := fun h => hp₀_ne (Subtype.ext h) + have : (P.comap R.carrier.subtype).IsPrime := hP_prime.comap _ + obtain ⟨p₀, hp₀_mem_PR, hp₀_prime_R⟩ := + (hP_prime.comap R.carrier.subtype).exists_mem_prime_of_ne_bot hPR have hp₀_P : (p₀ : T) ∈ P := hp₀_mem_PR - -- (p₀) = P ∩ R: height ≤ 1 forces P∩R to be generated by any nonzero prime element have hPR_eq : P.comap R.carrier.subtype = Ideal.span {p₀} := by - apply le_antisymm - · intro r hr - rw [Ideal.mem_span_singleton] - by_contra h_not_dvd - have hspan_lt : Ideal.span {p₀} < P.comap R.carrier.subtype := by - refine lt_of_le_of_ne (Ideal.span_le.mpr (Set.singleton_subset_iff.mpr hp₀_mem_PR)) ?_ - intro heq - exact h_not_dvd (heq ▸ hr |> Ideal.mem_span_singleton.mp) - have : (Ideal.span {p₀}).IsPrime := by - rw [Ideal.span_singleton_prime (show p₀ ≠ 0 from hp₀_ne)] - exact hp₀_prime_R - have : (P.comap R.carrier.subtype).IsPrime := hP_prime.comap _ - have hbot_lt_span : (⊥ : Ideal R.carrier) < Ideal.span {p₀} := by - rw [bot_lt_iff_ne_bot, ne_eq, Ideal.span_singleton_eq_bot] - exact hp₀_ne - have h2 : (2 : ℕ∞) ≤ (P.comap R.carrier.subtype).height := - calc (2 : ℕ∞) = 0 + 1 + 1 := by norm_num - _ ≤ (⊥ : Ideal R.carrier).height + 1 + 1 := by - simp_all - _ ≤ (Ideal.span {p₀}).height + 1 := by - gcongr - exact Ideal.height_add_one_le_of_lt_of_isPrime hbot_lt_span - _ ≤ (P.comap R.carrier.subtype).height := - Ideal.height_add_one_le_of_lt_of_isPrime hspan_lt - exact not_lt.mpr h2 (by exact_mod_cast hR_bound.trans_lt (by norm_num)) - · exact Ideal.span_le.mpr (Set.singleton_subset_iff.mpr hp₀_mem_PR) + apply Ideal.eq_span_singleton_of_height_eq_one + · exact le_antisymm hR_bound (by simpa [Order.one_le_iff_ne_zero] using hPR) + · exact hp₀_mem_PR + · exact hp₀_prime_R have hker : ∀ (f : Polynomial R.carrier), (aeval x f : T) ∈ (P : Set T) → ∀ i, f.coeff i ∈ P.comap R.carrier.subtype := hx_ker P hP_prime hP_ht hPR @@ -687,18 +638,11 @@ theorem adjoin_transcendental_isNSubring adjoinLoc_isUnit_of_notMem_maximalIdeal R x S_sub hS_eq -- Step 2: S is a local ring have hLocal : IsLocalRing S_sub := by - have : Nontrivial S_sub := inferInstance apply IsLocalRing.of_isUnit_or_isUnit_one_sub_self - intro ⟨a, ha⟩ - by_cases ham : (a : T) ∈ IsLocalRing.maximalIdeal T - · right - apply hinv - intro h - have h1 : (1 : T) ∈ IsLocalRing.maximalIdeal T := by - have := (IsLocalRing.maximalIdeal T).add_mem h ham - simp at this - simp_all - · simp_all + intro a + exact (IsLocalRing.isUnit_or_isUnit_one_sub_self (a : T)).imp + (fun ha => hinv a (IsLocalRing.notMem_maximalIdeal.mpr ha)) + (fun ha => hinv (1 - a) (IsLocalRing.notMem_maximalIdeal.mpr ha)) -- Step 3: Cardinality bound via injection S ↪ R[X] × R[X] have hCard_S : Cardinal.mk S_sub ≤ max Cardinal.aleph0 (Cardinal.mk R.carrier) := by have h_mem : ∀ s : S_sub, (s : T) ∈ adjoinLocSet R x := fun s => hS_eq ▸ s.2 @@ -713,7 +657,7 @@ theorem adjoin_transcendental_isNSubring have hq_unit := (h_mem s₁).choose_spec.choose_spec.1 ext apply mul_right_cancel₀ (IsUnit.ne_zero (IsLocalRing.notMem_maximalIdeal.mp hq_unit)) - simp_all + rw [heq₁, hq, heq₂, hp] calc Cardinal.mk S_sub ≤ Cardinal.mk ((R.carrier)[X] × (R.carrier)[X]) := Cardinal.mk_le_of_injective hf _ = Cardinal.mk (R.carrier)[X] * Cardinal.mk (R.carrier)[X] := @@ -741,7 +685,7 @@ theorem adjoin_transcendental_isNSubring · intro hx rw [Ideal.mem_comap] by_contra h - simp_all + exact (IsLocalRing.mem_maximalIdeal _).mp hx (hinv ⟨a, ha⟩ h) · intro hx rw [Ideal.mem_comap] at hx rw [IsLocalRing.mem_maximalIdeal] diff --git a/LeanPool/AndersonConjecture/Jensen/Application.lean b/LeanPool/AndersonConjecture/Jensen/Application.lean index a913e1c764..f13c8f26de 100644 --- a/LeanPool/AndersonConjecture/Jensen/Application.lean +++ b/LeanPool/AndersonConjecture/Jensen/Application.lean @@ -3,8 +3,19 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.AndersonConjecture.Jensen.Construction.Construction +module + +public import LeanPool.AndersonConjecture.CompleteDomain.LocalRing +public import LeanPool.AndersonConjecture.Jensen.Defs +public import Mathlib.RingTheory.Ideal.Height +public import Mathlib.RingTheory.Regular.RegularSequence import LeanPool.AndersonConjecture.CompleteDomain.CompleteDomain +import LeanPool.AndersonConjecture.Jensen.Construction.Construction +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Cardinality +import Mathlib.Analysis.Complex.Order +import Mathlib.Order.CompletePartialOrder +import Mathlib.RingTheory.PicardGroup /-! # Application to T = C[[x,y,z]]/(x^2 - yz) @@ -15,6 +26,8 @@ hypotheses (Corollary 2.4 with P = (0)) and apply the construction to produce a local UFD whose completion is T. -/ +@[expose] public section + noncomputable section open Cardinal Ideal MvPowerSeries Pointwise diff --git a/LeanPool/AndersonConjecture/Jensen/Avoidance.lean b/LeanPool/AndersonConjecture/Jensen/Avoidance.lean index 887cfffb62..961c84ba62 100644 --- a/LeanPool/AndersonConjecture/Jensen/Avoidance.lean +++ b/LeanPool/AndersonConjecture/Jensen/Avoidance.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import Mathlib.Algebra.Lie.OfAssociative -import Mathlib.RingTheory.AdicCompletion.Basic +module + +public import Mathlib.RingTheory.AdicCompletion.Basic +public import Mathlib.RingTheory.LocalRing.ResidueField.Defs +public import Mathlib.RingTheory.Noetherian.Defs import Mathlib.RingTheory.Filtration import Mathlib.RingTheory.Ideal.Quotient.Noetherian import Mathlib.RingTheory.PicardGroup @@ -21,6 +24,8 @@ the uncountable case uses a cardinality argument. Heitmann, "Characterization of completions of UFDs", 1993, Lemmas 2--3. -/ +@[expose] public section + noncomputable section open Cardinal Ideal Set Pointwise diff --git a/LeanPool/AndersonConjecture/Jensen/CloseUp.lean b/LeanPool/AndersonConjecture/Jensen/CloseUp.lean index c778a91949..05961f85f2 100644 --- a/LeanPool/AndersonConjecture/Jensen/CloseUp.lean +++ b/LeanPool/AndersonConjecture/Jensen/CloseUp.lean @@ -3,18 +3,25 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module -import LeanPool.AndersonConjecture.Jensen.CloseUp.AvoidanceStep -import LeanPool.AndersonConjecture.Jensen.CloseUp.Base -import LeanPool.AndersonConjecture.Jensen.CloseUp.CloseUp -import LeanPool.AndersonConjecture.Jensen.CloseUp.CoprimeSplit -import LeanPool.AndersonConjecture.Jensen.CloseUp.Factor -import LeanPool.AndersonConjecture.Jensen.CloseUp.FactorDivisibility -import LeanPool.AndersonConjecture.Jensen.CloseUp.GcdComplexity -import LeanPool.AndersonConjecture.Jensen.CloseUp.IntersectionHelpers -import LeanPool.AndersonConjecture.Jensen.CloseUp.IntersectionStep -import LeanPool.AndersonConjecture.Jensen.CloseUp.NoCommonFactor -import LeanPool.AndersonConjecture.Jensen.CloseUp.TwoGen +public import LeanPool.AndersonConjecture.Jensen.CloseUp.AvoidanceStep +public import LeanPool.AndersonConjecture.Jensen.CloseUp.Base +public import LeanPool.AndersonConjecture.Jensen.CloseUp.CloseUp +public import LeanPool.AndersonConjecture.Jensen.CloseUp.CoprimeSplit +public import LeanPool.AndersonConjecture.Jensen.CloseUp.Factor +public import LeanPool.AndersonConjecture.Jensen.CloseUp.FactorDivisibility +public import LeanPool.AndersonConjecture.Jensen.CloseUp.GcdComplexity +public import LeanPool.AndersonConjecture.Jensen.CloseUp.IntersectionHelpers +public import LeanPool.AndersonConjecture.Jensen.CloseUp.IntersectionStep +public import LeanPool.AndersonConjecture.Jensen.CloseUp.NoCommonFactor +public import LeanPool.AndersonConjecture.Jensen.CloseUp.TwoGen +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Closing Up Finitely Generated Ideals @@ -22,3 +29,5 @@ import LeanPool.AndersonConjecture.Jensen.CloseUp.TwoGen Index file for the `LeanPool.AndersonConjecture.Jensen.CloseUp` directory: closing up finitely generated ideals (Heitmann, Lemma 4). -/ + +@[expose] public section diff --git a/LeanPool/AndersonConjecture/Jensen/CloseUp/AvoidanceStep.lean b/LeanPool/AndersonConjecture/Jensen/CloseUp/AvoidanceStep.lean index 830c69f895..29956e12c5 100644 --- a/LeanPool/AndersonConjecture/Jensen/CloseUp/AvoidanceStep.lean +++ b/LeanPool/AndersonConjecture/Jensen/CloseUp/AvoidanceStep.lean @@ -3,9 +3,22 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.AndersonConjecture.Jensen.Adjoin.Adjoin +module + +public import LeanPool.AndersonConjecture.Jensen.NSubring +public import Mathlib.RingTheory.AdicCompletion.Basic +import LeanPool.AndersonConjecture.Jensen.Adjoin.Transcendental +import LeanPool.AndersonConjecture.Jensen.Avoidance +import LeanPool.AndersonConjecture.Jensen.CloseUp.Base import LeanPool.AndersonConjecture.Jensen.CloseUp.NoCommonFactor import LeanPool.AndersonConjecture.Jensen.CloseUp.TwoGen +import Mathlib.Algebra.Polynomial.Cardinal +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Finsupp.Encodable +import Mathlib.RingTheory.PicardGroup +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Close-up: avoidance step @@ -17,6 +30,8 @@ one obtains the required A-extension by applying prime avoidance (Heitmann, Lemma 4). -/ +@[expose] public section + noncomputable section open Cardinal Ideal diff --git a/LeanPool/AndersonConjecture/Jensen/CloseUp/Base.lean b/LeanPool/AndersonConjecture/Jensen/CloseUp/Base.lean index ca2a117e5e..d116e8917f 100644 --- a/LeanPool/AndersonConjecture/Jensen/CloseUp/Base.lean +++ b/LeanPool/AndersonConjecture/Jensen/CloseUp/Base.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.AndersonConjecture.Jensen.NSubring +module + +public import LeanPool.AndersonConjecture.Jensen.NSubring +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Close-up: base case @@ -15,6 +23,8 @@ a/p for suitable primes p. The divisibility case follows by induction on the UFD factorisation in R. -/ +@[expose] public section + noncomputable section open Cardinal Ideal diff --git a/LeanPool/AndersonConjecture/Jensen/CloseUp/CloseUp.lean b/LeanPool/AndersonConjecture/Jensen/CloseUp/CloseUp.lean index 69e8658d75..7a75d6fa4d 100644 --- a/LeanPool/AndersonConjecture/Jensen/CloseUp/CloseUp.lean +++ b/LeanPool/AndersonConjecture/Jensen/CloseUp/CloseUp.lean @@ -3,9 +3,21 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.Jensen.CloseUp.GcdComplexity +public import Mathlib.RingTheory.AdicCompletion.Basic +import LeanPool.AndersonConjecture.Jensen.CloseUp.Base import LeanPool.AndersonConjecture.Jensen.CloseUp.CoprimeSplit import LeanPool.AndersonConjecture.Jensen.CloseUp.Factor import LeanPool.AndersonConjecture.Jensen.CloseUp.NoCommonFactor +import LeanPool.AndersonConjecture.Jensen.CloseUp.TwoGen +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Heitmann's Lemma 4 — Closing Up Finitely Generated Ideals @@ -16,6 +28,8 @@ induction on generator count with GCD complexity as a well-founded measure (Heitmann, 1993, Lemma 4). -/ +@[expose] public section + noncomputable section open Cardinal Ideal diff --git a/LeanPool/AndersonConjecture/Jensen/CloseUp/CoprimeSplit.lean b/LeanPool/AndersonConjecture/Jensen/CloseUp/CoprimeSplit.lean index 8e4322cfc3..187c82fdfc 100644 --- a/LeanPool/AndersonConjecture/Jensen/CloseUp/CoprimeSplit.lean +++ b/LeanPool/AndersonConjecture/Jensen/CloseUp/CoprimeSplit.lean @@ -3,8 +3,21 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.Jensen.CloseUp.GcdComplexity +public import Mathlib.RingTheory.AdicCompletion.Basic +import LeanPool.AndersonConjecture.Jensen.CloseUp.Base import LeanPool.AndersonConjecture.Jensen.CloseUp.IntersectionHelpers import LeanPool.AndersonConjecture.Jensen.CloseUp.TwoGen +import LeanPool.AndersonConjecture.Jensen.KrullDomain.KrullDomain +import Mathlib.Algebra.GroupWithZero.Submonoid.CancelMulZero +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Close-up: B2 sub-case @@ -15,6 +28,8 @@ The argument splits on whether the ideal generated by s' is zero or not, and reduces to the factor and intersection cases. -/ +@[expose] public section + noncomputable section open Cardinal Ideal diff --git a/LeanPool/AndersonConjecture/Jensen/CloseUp/Factor.lean b/LeanPool/AndersonConjecture/Jensen/CloseUp/Factor.lean index 4b31966b55..c65db1edb6 100644 --- a/LeanPool/AndersonConjecture/Jensen/CloseUp/Factor.lean +++ b/LeanPool/AndersonConjecture/Jensen/CloseUp/Factor.lean @@ -3,8 +3,19 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.Jensen.CloseUp.GcdComplexity +public import Mathlib.RingTheory.AdicCompletion.Basic +import LeanPool.AndersonConjecture.Jensen.CloseUp.Base import LeanPool.AndersonConjecture.Jensen.CloseUp.FactorDivisibility import LeanPool.AndersonConjecture.Jensen.CloseUp.IntersectionStep +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Close-up: factor theorem @@ -14,6 +25,8 @@ sub-cases into the main factor theorem for the close-up induction (Heitmann, Lemma 4, case n >= 3). -/ +@[expose] public section + noncomputable section open Cardinal Ideal diff --git a/LeanPool/AndersonConjecture/Jensen/CloseUp/FactorDivisibility.lean b/LeanPool/AndersonConjecture/Jensen/CloseUp/FactorDivisibility.lean index b4de8dc110..af17a52974 100644 --- a/LeanPool/AndersonConjecture/Jensen/CloseUp/FactorDivisibility.lean +++ b/LeanPool/AndersonConjecture/Jensen/CloseUp/FactorDivisibility.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.AndersonConjecture.Jensen.CloseUp.GcdComplexity +module + +public import LeanPool.AndersonConjecture.Jensen.CloseUp.GcdComplexity +import LeanPool.AndersonConjecture.Jensen.CloseUp.Base +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Close-up: divisibility sub-cases @@ -14,6 +23,8 @@ s' divides either the distinguished generator a or the witness c. Dividing out p reduces the GCD complexity. -/ +@[expose] public section + noncomputable section open Cardinal Ideal diff --git a/LeanPool/AndersonConjecture/Jensen/CloseUp/GcdComplexity.lean b/LeanPool/AndersonConjecture/Jensen/CloseUp/GcdComplexity.lean index da6ff45432..f1285663c6 100644 --- a/LeanPool/AndersonConjecture/Jensen/CloseUp/GcdComplexity.lean +++ b/LeanPool/AndersonConjecture/Jensen/CloseUp/GcdComplexity.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.Jensen.NSubring import LeanPool.AndersonConjecture.Jensen.CloseUp.Base import Mathlib.Algebra.GroupWithZero.Submonoid.CancelMulZero +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations import Mathlib.RingTheory.Regular.IsSMulRegular +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # GCD complexity measure @@ -17,6 +25,8 @@ construction when n >= 3 generators. Dividing all generators by a common prime strictly decreases the complexity. -/ +@[expose] public section + noncomputable section open Cardinal Ideal diff --git a/LeanPool/AndersonConjecture/Jensen/CloseUp/IntersectionHelpers.lean b/LeanPool/AndersonConjecture/Jensen/CloseUp/IntersectionHelpers.lean index 1625cf768d..083f69f087 100644 --- a/LeanPool/AndersonConjecture/Jensen/CloseUp/IntersectionHelpers.lean +++ b/LeanPool/AndersonConjecture/Jensen/CloseUp/IntersectionHelpers.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.AndersonConjecture.Jensen.CloseUp.GcdComplexity +module + +public import LeanPool.AndersonConjecture.Jensen.CloseUp.GcdComplexity +import Mathlib.Algebra.GroupWithZero.Submonoid.CancelMulZero +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Close-up: intersection helpers @@ -15,6 +24,8 @@ the strict decrease of GCD complexity after dividing by a common prime factor. -/ +@[expose] public section + noncomputable section open Cardinal Ideal diff --git a/LeanPool/AndersonConjecture/Jensen/CloseUp/IntersectionStep.lean b/LeanPool/AndersonConjecture/Jensen/CloseUp/IntersectionStep.lean index 522e682219..904c0570b1 100644 --- a/LeanPool/AndersonConjecture/Jensen/CloseUp/IntersectionStep.lean +++ b/LeanPool/AndersonConjecture/Jensen/CloseUp/IntersectionStep.lean @@ -3,8 +3,21 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.Jensen.CloseUp.GcdComplexity +public import Mathlib.RingTheory.AdicCompletion.Basic import LeanPool.AndersonConjecture.Jensen.CloseUp.AvoidanceStep import LeanPool.AndersonConjecture.Jensen.CloseUp.IntersectionHelpers +import LeanPool.AndersonConjecture.Jensen.CloseUp.TwoGen +import LeanPool.AndersonConjecture.Jensen.KrullDomain.KrullDomain +import Mathlib.Algebra.GroupWithZero.Submonoid.CancelMulZero +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Close-up: intersection theorems @@ -17,6 +30,8 @@ is obtained by passing to an A-extension where the intersection has been resolved. -/ +@[expose] public section + noncomputable section open Cardinal Ideal diff --git a/LeanPool/AndersonConjecture/Jensen/CloseUp/NoCommonFactor.lean b/LeanPool/AndersonConjecture/Jensen/CloseUp/NoCommonFactor.lean index d6f14a10c7..54fbbd7564 100644 --- a/LeanPool/AndersonConjecture/Jensen/CloseUp/NoCommonFactor.lean +++ b/LeanPool/AndersonConjecture/Jensen/CloseUp/NoCommonFactor.lean @@ -3,8 +3,22 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.AndersonConjecture.Jensen.Adjoin.Adjoin +module + +public import LeanPool.AndersonConjecture.Jensen.NSubring +public import Mathlib.RingTheory.AdicCompletion.Basic +import LeanPool.AndersonConjecture.Jensen.Adjoin.Transcendental +import LeanPool.AndersonConjecture.Jensen.Avoidance +import LeanPool.AndersonConjecture.Jensen.CloseUp.Base import LeanPool.AndersonConjecture.Jensen.CloseUp.TwoGen +import Mathlib.Algebra.Polynomial.Cardinal +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Finsupp.Encodable +import Mathlib.RingTheory.Ideal.AssociatedPrime.Localization +import Mathlib.RingTheory.PicardGroup +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Close-up: no common factor @@ -16,6 +30,8 @@ any associated prime of height at most one, so the avoidance step applies directly. -/ +@[expose] public section + noncomputable section open Cardinal Ideal @@ -36,24 +52,10 @@ include T in theorem prime_height_le_one_mem_assoc refine ⟨⟨hP_prime, Ideal.span_le.mpr (Set.singleton_subset_iff.mpr hr₀_in_P)⟩, ?_⟩ intro Q ⟨hQ_prime, hQ_le_span⟩ hQ_le_P - by_contra hPQ - have hQ_ne_P : Q ≠ P := fun h => hPQ (h ▸ le_refl _) - have hQ_ne_bot : Q ≠ ⊥ := by - intro h - simp_all - have hQ_lt_P : Q < P := lt_of_le_of_ne hQ_le_P hQ_ne_P - have h_bot_lt_Q : (⊥ : Ideal T) < Q := bot_lt_iff_ne_bot.mpr hQ_ne_bot - have h1 := @Ideal.height_add_one_le_of_lt_of_isPrime T _ ⊥ Q - Ideal.isPrime_bot hQ_prime h_bot_lt_Q - have h2 := @Ideal.height_add_one_le_of_lt_of_isPrime T _ Q P - hQ_prime hP_prime hQ_lt_P - have h4 : (2 : ℕ∞) ≤ P.height := - calc (2 : ℕ∞) = 0 + 1 + 1 := by norm_num - _ ≤ (⊥ : Ideal T).height + 1 + 1 := by - simp_all - _ ≤ Q.height + 1 := by gcongr - _ ≤ P.height := h2 - exact not_lt.mpr h4 (by exact_mod_cast hP_ht.trans_lt (by norm_num)) + have hQ_ne_bot : Q ≠ ⊥ := fun h => hr₀T_ne + (Ideal.span_singleton_eq_bot.mp (bot_unique (hQ_le_span.trans_eq h))) + exact (@eq_of_prime_le_prime_height_le_one T _ _ Q P hQ_prime hP_prime + hQ_le_P hQ_ne_bot hP_ht).ge have hP_assoc : P ∈ associatedPrimes T (T ⧸ Ideal.span {(r₀ : T)}) := by open Module.associatedPrimes in have hsub := @@ -84,11 +86,12 @@ include T in theorem no_common_I_not_le_assoc intro x hx have h1 : x ∈ P.comap R.carrier.subtype := Ideal.mem_comap.mpr (hgens_in_P x hx) - simp_all + simpa only [hcomap, Ideal.mem_bot] using h1 have h_le_one : s'.card ≤ 1 := Finset.card_le_one.mpr fun x hx y hy => by rw [hall_zero x hx, hall_zero y hy] - simp_all + rw [hs'_def, Finset.card_erase_of_mem ha_mem, hs_eq] at h_le_one + omega · have : (P.comap R.carrier.subtype).IsPrime := hP_mem.isPrime.comap R.carrier.subtype obtain ⟨q, hq_prime, hq_Q⟩ := diff --git a/LeanPool/AndersonConjecture/Jensen/CloseUp/TwoGen.lean b/LeanPool/AndersonConjecture/Jensen/CloseUp/TwoGen.lean index 5cbc42faad..bbdcc8d25c 100644 --- a/LeanPool/AndersonConjecture/Jensen/CloseUp/TwoGen.lean +++ b/LeanPool/AndersonConjecture/Jensen/CloseUp/TwoGen.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.Jensen.NSubring +public import Mathlib.RingTheory.AdicCompletion.Basic import LeanPool.AndersonConjecture.Jensen.CloseUp.Base import LeanPool.AndersonConjecture.Jensen.KrullDomain.KrullDomain +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Close-up: two-generator ideals @@ -18,6 +28,8 @@ the general case reduces to it by extracting common factors. -/ +@[expose] public section + noncomputable section open Cardinal Ideal @@ -69,12 +81,13 @@ theorem close_up_two_gen_coprime intersection_close_up from KrullDomain.lean for the main case. -/ by_cases hy₂_zero : (↑y₂ : T) = 0 · have hc' : (c : T) ∈ Ideal.span {(y₁ : T)} := by - simp_all + simpa only [hy₂_zero, Ideal.span_pair_zero] using hc obtain ⟨c', hcc'⟩ := Ideal.mem_span_singleton.mp (close_up_dvd R y₁ c hc') refine ⟨R, ⟨le_refl _, fun r hr => hr, le_max_right _ _⟩, le_refl _, c', ?_⟩ have heq : c - c' * y₁ = 0 := by rw [hcc', mul_comm, sub_self] change c - c' * y₁ ∈ Ideal.span {y₂} - simp_all + rw [heq] + exact Ideal.zero_mem _ have hy₂_ne : (↑y₂ : T) ≠ 0 := hy₂_zero by_cases hM_bot : IsLocalRing.maximalIdeal T = ⊥ · have hR_field : IsLocalRing.maximalIdeal R.carrier = ⊥ := by @@ -83,7 +96,8 @@ theorem close_up_two_gen_coprime by_contra h have hmem : y₂ ∈ IsLocalRing.maximalIdeal R.carrier := (IsLocalRing.mem_maximalIdeal _).mpr h - simp_all + rw [hR_field, Ideal.mem_bot] at hmem + exact hy₂_ne (congrArg Subtype.val hmem) refine ⟨R, ⟨le_refl _, fun r hr => hr, le_max_right _ _⟩, le_refl _, 0, ?_⟩ change c - 0 * y₁ ∈ Ideal.span {y₂} simp only [zero_mul, sub_zero] @@ -93,7 +107,7 @@ theorem close_up_two_gen_coprime exact Submodule.mem_top by_cases hy₁_zero : (↑y₁ : T) = 0 · have hc_span_y₂ : (c : T) ∈ Ideal.span {(y₂ : T)} := by - simp_all + simpa only [hy₁_zero, Ideal.span_insert_zero] using hc have := close_up_dvd R y₂ c hc_span_y₂ obtain ⟨q, hq⟩ := Ideal.mem_span_singleton.mp this refine ⟨R, ⟨le_refl _, fun r hr => hr, le_max_right _ _⟩, le_refl _, 0, ?_⟩ @@ -150,8 +164,7 @@ theorem close_up_two_gen_key rw [Ideal.mem_span_singleton] at hc_pR obtain ⟨c', hcc'⟩ := hc_pR have hp_ne : (p : T) ≠ 0 := fun h => hp.ne_zero (Subtype.val_injective h) - have hpc : (c : T) = (p : T) * (c' : T) := by - simp_all + have hpc : (c : T) = (p : T) * (c' : T) := congrArg Subtype.val hcc' have hc'_ab : (c' : T) ∈ Ideal.span {(a : T), (b : T)} := by obtain ⟨u₁, u₂, hu⟩ := Submodule.mem_span_pair.mp hc rw [hpa, hpb, smul_eq_mul, smul_eq_mul] at hu @@ -159,22 +172,18 @@ theorem close_up_two_gen_key rw [← hpc, ← hu] ring exact Submodule.mem_span_pair.mpr ⟨u₁, u₂, by - simp_all⟩ + simpa only [smul_eq_mul] using (mul_left_cancel₀ hp_ne heq).symm⟩ by_cases ha : a = 0 · subst ha - have hc'_b : (c' : T) ∈ Ideal.span {(b : T)} := - (Ideal.span_le.mpr (fun x hx => by - rcases Set.mem_insert_iff.mp hx with rfl | h - · simp_all - · exact Ideal.subset_span h)) hc'_ab + have hc'_b : (c' : T) ∈ Ideal.span {(b : T)} := by + simpa only [ZeroMemClass.coe_zero, Ideal.span_insert_zero] using hc'_ab have hc'R := close_up_dvd R b c' hc'_b refine ⟨R, ⟨le_refl _, fun r hr => hr, le_max_right _ _⟩, le_refl _, 0, ?_⟩ simp only [zero_mul, sub_zero] rw [Ideal.mem_span_singleton] at hc'R ⊢ obtain ⟨q, hq⟩ := hc'R refine ⟨⟨(q : T), q.2⟩, Subtype.ext ?_⟩ - have hc'_val : (c' : T) = (b : T) * (q : T) := by - simp_all + have hc'_val : (c' : T) = (b : T) * (q : T) := congrArg Subtype.val hq simp only [Subring.coe_mul] rw [hpc, hc'_val, mul_assoc] · have hdvd : DvdNotUnit a (p * a) := ⟨ha, ⟨p, hp.not_isUnit, mul_comm p a⟩⟩ @@ -217,26 +226,19 @@ theorem close_up_two_gen ∃ (hle : R.carrier ≤ S.carrier), (⟨(c : T), hle c.2⟩ : S.carrier) ∈ Ideal.span {⟨(y₁ : T), hle y₁.2⟩, ⟨(y₂ : T), hle y₂.2⟩} := by - obtain ⟨t₁, t₂, hc_eq⟩ := Submodule.mem_span_pair.mp hc - -- Reduce to finding x₁ ∈ S with c - x₁·y₁ ∈ span{y₂} - suffices key : ∃ S : NSubring T, IsAExtension R S ∧ - ∃ (hle : R.carrier ≤ S.carrier) (x₁ : S.carrier), - (⟨(c : T), hle c.2⟩ : S.carrier) - x₁ * ⟨(y₁ : T), hle y₁.2⟩ ∈ - Ideal.span {⟨(y₂ : T), hle y₂.2⟩} by - obtain ⟨S, hAext, hle, x₁, hrem⟩ := key - refine ⟨S, hAext, hle, ?_⟩ - rw [Ideal.mem_span_singleton] at hrem - obtain ⟨x₂, hx₂⟩ := hrem - set y₁_S := (⟨(y₁ : T), hle y₁.2⟩ : S.carrier) - set y₂_S := (⟨(y₂ : T), hle y₂.2⟩ : S.carrier) - have hc_eq : (⟨(c : T), hle c.2⟩ : S.carrier) = x₁ * y₁_S + x₂ * y₂_S := by - linear_combination hx₂ - rw [hc_eq] - exact Ideal.add_mem _ - (Ideal.mul_mem_left _ x₁ (Ideal.subset_span (Set.mem_insert _ _))) - (Ideal.mul_mem_left _ x₂ (Ideal.subset_span (Set.mem_insert_iff.mpr (Or.inr rfl)))) - exact close_up_two_gen_key R y₁ y₂ c hc + obtain ⟨S, hAext, hle, x₁, hrem⟩ := close_up_two_gen_key R y₁ y₂ c hc hM_not_assoc hAss_ht hR_card hT_card + refine ⟨S, hAext, hle, ?_⟩ + rw [Ideal.mem_span_singleton] at hrem + obtain ⟨x₂, hx₂⟩ := hrem + set y₁_S := (⟨(y₁ : T), hle y₁.2⟩ : S.carrier) + set y₂_S := (⟨(y₂ : T), hle y₂.2⟩ : S.carrier) + have hc_eq : (⟨(c : T), hle c.2⟩ : S.carrier) = x₁ * y₁_S + x₂ * y₂_S := by + linear_combination hx₂ + rw [hc_eq] + exact Ideal.add_mem _ + (Ideal.mul_mem_left _ x₁ (Ideal.subset_span (Set.mem_insert _ _))) + (Ideal.mul_mem_left _ x₂ (Ideal.subset_span (Set.mem_insert_iff.mpr (Or.inr rfl)))) /-! ## General case: n generators (induction) @@ -263,19 +265,7 @@ lemma exists_prime_mem_of_ne_bot_closeup {S : Type*} [CommRing S] [UniqueFactorizationMonoid S] (Q : Ideal S) [hQ : Q.IsPrime] (hQ_ne_bot : Q ≠ ⊥) : ∃ q : S, Prime q ∧ q ∈ Q := by - obtain ⟨a, haQ, ha_ne⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hQ_ne_bot - have ha_nu : ¬IsUnit a := fun hu => hQ.ne_top (Ideal.eq_top_of_isUnit_mem Q haQ hu) - suffices ∀ x : S, x ≠ 0 → ¬IsUnit x → x ∈ Q → ∃ q : S, Prime q ∧ q ∈ Q from - this a ha_ne ha_nu haQ - intro x - apply wellFounded_dvdNotUnit.induction x - intro x ih hx_ne hx_nu hxQ - obtain ⟨p, hp_irr, hp_dvd⟩ := WfDvdMonoid.exists_irreducible_factor hx_nu hx_ne - obtain ⟨b, hxpb⟩ := hp_dvd - rcases hQ.mem_or_mem (show p * b ∈ Q from hxpb ▸ hxQ) with hp_Q | hb_Q - · exact ⟨p, hp_irr.prime, hp_Q⟩ - · have hb_ne : b ≠ 0 := right_ne_zero_of_mul (hxpb ▸ hx_ne) - have hb_nu : ¬IsUnit b := fun hu => hQ.ne_top (Ideal.eq_top_of_isUnit_mem Q hb_Q hu) - exact ih b ⟨hb_ne, p, hp_irr.prime.not_isUnit, by rw [hxpb, mul_comm]⟩ hb_ne hb_nu hb_Q + obtain ⟨q, hq_mem, hq_prime⟩ := hQ.exists_mem_prime_of_ne_bot hQ_ne_bot + exact ⟨q, hq_prime, hq_mem⟩ end diff --git a/LeanPool/AndersonConjecture/Jensen/CombinedStep.lean b/LeanPool/AndersonConjecture/Jensen/CombinedStep.lean index 4ef2e81db9..0fde43c393 100644 --- a/LeanPool/AndersonConjecture/Jensen/CombinedStep.lean +++ b/LeanPool/AndersonConjecture/Jensen/CombinedStep.lean @@ -3,9 +3,19 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.Jensen.TransfiniteUnion +public import Mathlib.RingTheory.AdicCompletion.Basic import LeanPool.AndersonConjecture.Jensen.Adjoin.Adjoin +import LeanPool.AndersonConjecture.Jensen.Adjoin.FromPrime import LeanPool.AndersonConjecture.Jensen.CloseUp.CloseUp -import LeanPool.AndersonConjecture.Jensen.TransfiniteUnion +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Combined Construction Step @@ -15,6 +25,8 @@ element of T/M² and meeting a given nonzero prime, while closing all finitely generated ideals (Heitmann, 1993, Lemma 7). -/ +@[expose] public section + noncomputable section open Cardinal Ideal @@ -52,102 +64,18 @@ include T in theorem build_union_isNSubring ∃ (S : NSubring T), S.carrier = chain.unionSubring ∧ (∀ (α : ι'), (chain.ring α).carrier ≤ S.carrier) := by - set U := chain.unionSubring - have hU_le : ∀ α, (chain.ring α).carrier ≤ U := chain.le_union - have hU_mem : ∀ x : U, ∃ α, (x : T) ∈ (chain.ring α).carrier := - fun x => chain.mem_union_iff.mp x.2 - -- Locality of the union: each element lives in some chain.ring α, which is local - have hU_local : IsLocalRing U := by - apply IsLocalRing.of_isUnit_or_isUnit_one_sub_self - intro a - obtain ⟨α, hα⟩ := hU_mem a - rcases IsLocalRing.isUnit_or_isUnit_one_sub_self - (⟨(a : T), hα⟩ : (chain.ring α).carrier) with hu | hu - · left - exact hu.map (Subring.inclusion (hU_le α)) - · right - exact (show Subring.inclusion (hU_le α) (1 - ⟨(a : T), hα⟩) = 1 - a - from Subtype.ext rfl) ▸ hu.map (Subring.inclusion (hU_le α)) - -- UFD, locality established; now verify card bound, maximal ideal, and height bound - refine ⟨⟨U, transfinite_union_isUFD chain U hU_le hU_mem, hU_local, ?_, ?_, ?_⟩, - rfl, hU_le⟩ - · -- Cardinality: #U ≤ #ι' · sup_α(#R_α) ≤ κ² ≤ κ + have hU_card : Cardinal.mk chain.unionSubring ≤ + max Cardinal.aleph0 (Cardinal.mk (IsLocalRing.ResidueField T)) := by set κ := max Cardinal.aleph0 (Cardinal.mk (IsLocalRing.ResidueField T)) - have hU_eq : (U : Set T) = ⋃ α, ↑(chain.ring α).carrier := + have hU_eq : (chain.unionSubring : Set T) = ⋃ α, ↑(chain.ring α).carrier := Subring.coe_iSup_of_directed chain.directed_carriers - have h1 : Cardinal.mk U ≤ Cardinal.mk ι' * - ⨆ α, Cardinal.mk ↑((chain.ring α).carrier : Set T) := by - have := Cardinal.mk_iUnion_le (fun α => ((chain.ring α).carrier : Set T)) - rwa [← hU_eq] at this - have h2 : ⨆ α, Cardinal.mk ↑((chain.ring α).carrier : Set T) ≤ κ := - ciSup_le fun α => h_card α - calc Cardinal.mk U ≤ Cardinal.mk ι' * κ := le_trans h1 (mul_le_mul_right h2 _) - _ ≤ κ * κ := mul_le_mul_left h_ι_card κ + have h1 := Cardinal.mk_iUnion_le (fun α => ((chain.ring α).carrier : Set T)) + rw [← hU_eq] at h1 + calc Cardinal.mk chain.unionSubring + ≤ Cardinal.mk ι' * ⨆ α, Cardinal.mk ↑((chain.ring α).carrier : Set T) := h1 + _ ≤ κ * κ := mul_le_mul' h_ι_card (ciSup_le fun α => h_card α) _ ≤ κ := (Cardinal.mul_le_max_of_aleph0_le_left (le_max_left ..)).trans_eq (max_self κ) - · -- Maximal ideal of U = pullback of maximal ideal of T - ext ⟨a, ha⟩ - simp only [Ideal.mem_comap, Subring.coe_subtype] - constructor - · -- (⊆) Non-unit in U implies non-unit at some stage R_α, hence in M_T - intro hx - rw [IsLocalRing.mem_maximalIdeal] - intro hu_T - obtain ⟨α, hα⟩ := hU_mem ⟨a, ha⟩ - by_contra h_nu - have : ¬IsUnit (⟨a, hα⟩ : (chain.ring α).carrier) := - fun hu => h_nu ((IsLocalRing.mem_maximalIdeal _).mp hx - (hu.map (Subring.inclusion (hU_le α)))) - have hmem := (IsLocalRing.mem_maximalIdeal _).mpr this - rw [(chain.ring α).maximal_ideal_eq] at hmem - exact (IsLocalRing.mem_maximalIdeal _).mp (Ideal.mem_comap.mp hmem) hu_T - · -- (⊇) Non-unit in T is non-unit in any subring - intro hx - rw [IsLocalRing.mem_maximalIdeal] - intro hu_S - exact (IsLocalRing.mem_maximalIdeal _).mp hx (hu_S.map U.subtype) - · -- Height bound: any prime of U lying over (t) has height ≤ 1 - intro t ht P hP - have hP_prime := hP.isPrime - have : (Ideal.comap U.subtype P).IsPrime := hP_prime.comap _ - change (Ideal.comap U.subtype P).height ≤ ↑(1 : ℕ) - -- Suffices to show every prime q ⊊ P∩U is zero - rw [Ideal.height_le_iff] - intro q hq_prime hq_lt - suffices q = ⊥ by simp_all - by_contra hq_ne - -- Pick nonzero s ∈ q and x ∈ P \ q - obtain ⟨s, hs_q, hs_ne⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hq_ne - obtain ⟨x, hx_P, hx_nq⟩ := Set.exists_of_ssubset hq_lt - -- Pull s and x back to a common stage γ = max(αs, αx) - obtain ⟨αs, hαs⟩ := hU_mem s - obtain ⟨αx, hαx⟩ := hU_mem x - set γ := max αs αx - set inclγ := Subring.inclusion (hU_le γ) - have : (Ideal.comap inclγ q).IsPrime := hq_prime.comap _ - set s' : (chain.ring γ).carrier := ⟨(s : T), chain.mono (le_max_left ..) hαs⟩ - have hs'_ne : s' ≠ 0 := fun h => hs_ne (Subtype.ext (congrArg - (fun (x : (chain.ring γ).carrier) => (x : T)) h)) - have hs'_q : s' ∈ Ideal.comap inclγ q := - show inclγ s' ∈ q from (show inclγ s' = s from Subtype.ext rfl) ▸ hs_q - have hq'_ne : Ideal.comap inclγ q ≠ ⊥ := fun h => hs'_ne (Ideal.mem_bot.mp (h ▸ hs'_q)) - set x' : (chain.ring γ).carrier := - ⟨(x : T), chain.mono (le_max_right ..) hαx⟩ - have hx'_nq : x' ∉ Ideal.comap inclγ q := fun h => - hx_nq ((show inclγ x' = x from Subtype.ext rfl) ▸ (h : inclγ x' ∈ q)) - -- At stage γ the pullback of q is a nonzero prime strictly below P∩R_γ - have hq'_lt : Ideal.comap inclγ q < - Ideal.comap (chain.ring γ).carrier.subtype P := - lt_of_le_of_ne - (fun r hr => (hq_lt.le (show inclγ r ∈ q from hr) : (inclγ r : T) ∈ P)) - (fun h => hx'_nq (h ▸ (hx_P : (x : T) ∈ P))) - have : (Ideal.comap (chain.ring γ).carrier.subtype P).IsPrime := hP_prime.comap _ - -- R_γ is an NSubring so ht(P∩R_γ) ≤ 1, forcing ht(q∩R_γ) = 0, contradicting q ≠ 0 - have hq'_ht := (Ideal.height_le_iff (n := 1)).mp - ((chain.ring γ).height_bound t ht P hP) _ inferInstance hq'_lt - have : IsDomain (chain.ring γ).carrier := inferInstance - exact absurd ((Ideal.height_le_iff (n := 0)).mp (by - simp_all - ) ⊥ Ideal.isPrime_bot (bot_lt_iff_ne_bot.mpr hq'_ne)) not_lt_bot + exact ⟨chain.unionNSubring hU_card, rfl, chain.le_union⟩ /- Process one (gens, c) pair: given NSubring Sk with R' ≤ Sk and #Sk < #T, produce an A-extension Sk1 that closes the pair if c ∈ I·T. -/ @@ -248,7 +176,10 @@ private def close_up_all_one_pass_aux_proof have hPairs_card : Cardinal.mk Pairs ≤ max Cardinal.aleph0 (Cardinal.mk R'.carrier) := by by_cases hfin : Finite R'.carrier · exact le_trans Cardinal.mk_le_aleph0 (le_max_left ..) - · simp_all + · have : Infinite R'.carrier := not_finite_iff_infinite.mp hfin + simpa only [Pairs_def, Cardinal.mk_prod, Cardinal.lift_id, + Cardinal.mk_finset_of_infinite, Cardinal.mul_eq_self (Cardinal.aleph0_le_mk R'.carrier)] + using (le_max_right Cardinal.aleph0 (Cardinal.mk R'.carrier)) have hPairs_card_res : Cardinal.mk Pairs ≤ max Cardinal.aleph0 (Cardinal.mk (IsLocalRing.ResidueField T)) := le_trans hPairs_card (max_le (le_max_left ..) R'.card_le) @@ -317,7 +248,8 @@ private def close_up_all_one_pass_aux_proof fun q hq => (IHGood q hq).1.choose have hfq_R'_primes : ∀ q (hq : q < p) (r : R'.carrier), Prime r → Prime (⟨r.1, (hfq_R'_le q hq) r.2⟩ : (f q).carrier) := by - simp_all + intro q hq r hr + exact (IHGood q hq).1.choose_spec r hr have hfq_card : ∀ q (hq : q < p), Cardinal.mk (f q).carrier ≤ max Cardinal.aleph0 (Cardinal.mk R'.carrier) := fun q hq => (IHGood q hq).2.1 @@ -522,100 +454,21 @@ include T in theorem build_union_isNSubring_nat ∃ (S : NSubring T), S.carrier = chain.unionSubring ∧ (∀ (n : ℕ), (chain.ring n).carrier ≤ S.carrier) := by - -- Same construction as build_union_isNSubring but for ℕ-indexed chains (universe 0) - set U := chain.unionSubring - have hU_le : ∀ n, (chain.ring n).carrier ≤ U := chain.le_union - have hU_mem : ∀ x : U, ∃ n, (x : T) ∈ (chain.ring n).carrier := - fun x => chain.mem_union_iff.mp x.2 - -- Locality: lift the unit/non-unit dichotomy from each stage to the union - have hU_local : IsLocalRing U := by - apply IsLocalRing.of_isUnit_or_isUnit_one_sub_self - intro a - obtain ⟨α, hα⟩ := hU_mem a - rcases IsLocalRing.isUnit_or_isUnit_one_sub_self - (⟨(a : T), hα⟩ : (chain.ring α).carrier) with hu | hu - · left - exact hu.map (Subring.inclusion (hU_le α)) - · right - exact (show Subring.inclusion (hU_le α) (1 - ⟨(a : T), hα⟩) = 1 - a - from Subtype.ext rfl) ▸ hu.map (Subring.inclusion (hU_le α)) - refine ⟨⟨U, transfinite_union_isUFD chain U hU_le hU_mem, hU_local, ?_, ?_, ?_⟩, - rfl, hU_le⟩ - · -- Card bound: #U ≤ ℵ₀ · sup_n(#R_n) ≤ κ² = κ + have hU_card : Cardinal.mk chain.unionSubring ≤ + max Cardinal.aleph0 (Cardinal.mk (IsLocalRing.ResidueField T)) := by set κ := max Cardinal.aleph0 (Cardinal.mk (IsLocalRing.ResidueField T)) - have hU_eq : (U : Set T) = ⋃ n, ↑(chain.ring n).carrier := + have hU_eq : (chain.unionSubring : Set T) = ⋃ n, ↑(chain.ring n).carrier := Subring.coe_iSup_of_directed chain.directed_carriers - have h_lift := Cardinal.mk_iUnion_le_lift - (fun n => ((chain.ring n).carrier : Set T)) + have h_lift := Cardinal.mk_iUnion_le_lift (fun n => ((chain.ring n).carrier : Set T)) rw [← hU_eq] at h_lift simp only [Cardinal.lift_id'] at h_lift rw [show Cardinal.lift #ℕ = Cardinal.aleph0 from by rw [Cardinal.mk_nat, Cardinal.lift_aleph0]] at h_lift - have hsup : ⨆ n, Cardinal.mk ((chain.ring n).carrier : Set T) ≤ κ := - ciSup_le fun n => h_card n - calc Cardinal.mk U + calc Cardinal.mk chain.unionSubring ≤ Cardinal.aleph0 * ⨆ n, Cardinal.mk ((chain.ring n).carrier : Set T) := h_lift - _ ≤ Cardinal.aleph0 * κ := by gcongr - _ ≤ κ * κ := by gcongr - exact le_max_left .. + _ ≤ κ * κ := mul_le_mul' (le_max_left ..) (ciSup_le fun n => h_card n) _ ≤ κ := (Cardinal.mul_le_max_of_aleph0_le_left (le_max_left ..)).trans_eq (max_self κ) - · -- Maximal ideal: same argument as build_union_isNSubring, adapted for ℕ index - ext ⟨a, ha⟩ - simp only [Ideal.mem_comap, Subring.coe_subtype] - constructor - · intro hx - rw [IsLocalRing.mem_maximalIdeal] - intro hu_T - obtain ⟨α, hα⟩ := hU_mem ⟨a, ha⟩ - by_contra h_nu - have : ¬IsUnit (⟨a, hα⟩ : (chain.ring α).carrier) := - fun hu => h_nu ((IsLocalRing.mem_maximalIdeal _).mp hx - (hu.map (Subring.inclusion (hU_le α)))) - have hmem := (IsLocalRing.mem_maximalIdeal _).mpr this - rw [(chain.ring α).maximal_ideal_eq] at hmem - exact (IsLocalRing.mem_maximalIdeal _).mp (Ideal.mem_comap.mp hmem) hu_T - · intro hx - rw [IsLocalRing.mem_maximalIdeal] - intro hu_S - exact (IsLocalRing.mem_maximalIdeal _).mp hx (hu_S.map U.subtype) - · -- Height bound: pull q ⊊ P back to a finite stage γ and use the NSubring property there - intro t ht P hP - have hP_prime := hP.isPrime - have : (Ideal.comap U.subtype P).IsPrime := hP_prime.comap _ - change (Ideal.comap U.subtype P).height ≤ ↑(1 : ℕ) - rw [Ideal.height_le_iff] - intro q hq_prime hq_lt - suffices q = ⊥ by simp_all - by_contra hq_ne - obtain ⟨s, hs_q, hs_ne⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hq_ne - obtain ⟨x, hx_P, hx_nq⟩ := Set.exists_of_ssubset hq_lt - obtain ⟨αs, hαs⟩ := hU_mem s - obtain ⟨αx, hαx⟩ := hU_mem x - set γ := max αs αx - set inclγ := Subring.inclusion (hU_le γ) - have : (Ideal.comap inclγ q).IsPrime := hq_prime.comap _ - set s' : (chain.ring γ).carrier := ⟨(s : T), chain.mono (le_max_left ..) hαs⟩ - have hs'_ne : s' ≠ 0 := fun h => hs_ne (Subtype.ext (congrArg - (fun (x : (chain.ring γ).carrier) => (x : T)) h)) - have hs'_q : s' ∈ Ideal.comap inclγ q := - show inclγ s' ∈ q from (show inclγ s' = s from Subtype.ext rfl) ▸ hs_q - have hq'_ne : Ideal.comap inclγ q ≠ ⊥ := fun h => hs'_ne (Ideal.mem_bot.mp (h ▸ hs'_q)) - set x' : (chain.ring γ).carrier := - ⟨(x : T), chain.mono (le_max_right ..) hαx⟩ - have hx'_nq : x' ∉ Ideal.comap inclγ q := fun h => - hx_nq ((show inclγ x' = x from Subtype.ext rfl) ▸ (h : inclγ x' ∈ q)) - have hq'_lt : Ideal.comap inclγ q < - Ideal.comap (chain.ring γ).carrier.subtype P := - lt_of_le_of_ne - (fun r hr => (hq_lt.le (show inclγ r ∈ q from hr) : (inclγ r : T) ∈ P)) - (fun h => hx'_nq (h ▸ (hx_P : (x : T) ∈ P))) - have : (Ideal.comap (chain.ring γ).carrier.subtype P).IsPrime := hP_prime.comap _ - have hq'_ht := (Ideal.height_le_iff (n := 1)).mp - ((chain.ring γ).height_bound t ht P hP) _ inferInstance hq'_lt - have : IsDomain (chain.ring γ).carrier := inferInstance - exact absurd ((Ideal.height_le_iff (n := 0)).mp (by - simp_all - ) ⊥ Ideal.isPrime_bot (bot_lt_iff_ne_bot.mpr hq'_ne)) not_lt_bot + exact ⟨chain.unionNSubring hU_card, rfl, chain.le_union⟩ /- ω-iteration: given a one-pass close-up procedure, iterate it to close all f.g. ideals. -/ include T in theorem close_up_all_omega @@ -658,7 +511,7 @@ include T in theorem close_up_all_omega Prime r → Prime (⟨r.1, hpass_mono h r.2⟩ : (pass b).carrier) := by intro a b hab induction hab with - | refl => simp_all + | refl => exact fun r hr => hr | @step m hle ih => intro r hr exact (hpass_aext m).primes_preserved ⟨r.1, hpass_mono hle r.2⟩ (ih r hr) @@ -822,9 +675,8 @@ include T in theorem combined_step intro h have ⟨r, hr_mem, hr_ne⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hq_ne_bot have hr_unit : IsUnit r := by - by_contra h_not - have := (IsLocalRing.mem_maximalIdeal _).mpr h_not - simp_all + apply IsLocalRing.notMem_maximalIdeal.mp + simpa only [h, Ideal.mem_bot] using hr_ne exact hq_prime.ne_top (q.eq_top_of_isUnit_mem hr_mem hr_unit) -- Step 1: Adjoin a nonzero element of q to R, producing A-extension R₀ that catches q obtain ⟨R₀, hAext₀, t₀, ht₀_mem, ht₀_ne⟩ := adjoin_from_prime R q hq_prime hq_ne_bot diff --git a/LeanPool/AndersonConjecture/Jensen/Construction.lean b/LeanPool/AndersonConjecture/Jensen/Construction.lean index dcd0cd3df4..7f8954148d 100644 --- a/LeanPool/AndersonConjecture/Jensen/Construction.lean +++ b/LeanPool/AndersonConjecture/Jensen/Construction.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module -import LeanPool.AndersonConjecture.Jensen.Construction.ChainHelpers -import LeanPool.AndersonConjecture.Jensen.Construction.Construction -import LeanPool.AndersonConjecture.Jensen.Construction.HeitmannProp -import LeanPool.AndersonConjecture.Jensen.Construction.Transfinite +public import LeanPool.AndersonConjecture.Jensen.Construction.ChainHelpers +public import LeanPool.AndersonConjecture.Jensen.Construction.Construction +public import LeanPool.AndersonConjecture.Jensen.Construction.HeitmannProp +public import LeanPool.AndersonConjecture.Jensen.Construction.Transfinite +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Transfinite Construction of the Final Ring @@ -15,3 +21,5 @@ import LeanPool.AndersonConjecture.Jensen.Construction.Transfinite Index file for the `LeanPool.AndersonConjecture.Jensen.Construction` directory: the transfinite construction assembling the final ring. -/ + +@[expose] public section diff --git a/LeanPool/AndersonConjecture/Jensen/Construction/ChainHelpers.lean b/LeanPool/AndersonConjecture/Jensen/Construction/ChainHelpers.lean index 0d66265da7..ac908b99dd 100644 --- a/LeanPool/AndersonConjecture/Jensen/Construction/ChainHelpers.lean +++ b/LeanPool/AndersonConjecture/Jensen/Construction/ChainHelpers.lean @@ -3,7 +3,17 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.Jensen.TransfiniteUnion +public import Mathlib.RingTheory.AdicCompletion.Basic import LeanPool.AndersonConjecture.Jensen.CombinedStep +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Chain Helpers for the Transfinite Construction @@ -16,6 +26,8 @@ Jensen, "Completions of UFDs with semi-local formal fibers", 2006, Theorem 2.2. -/ +@[expose] public section + universe u noncomputable section diff --git a/LeanPool/AndersonConjecture/Jensen/Construction/Construction.lean b/LeanPool/AndersonConjecture/Jensen/Construction/Construction.lean index a5b32295fa..06442d9b7e 100644 --- a/LeanPool/AndersonConjecture/Jensen/Construction/Construction.lean +++ b/LeanPool/AndersonConjecture/Jensen/Construction/Construction.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.Jensen.Defs +public import Mathlib.RingTheory.Ideal.Height +public import Mathlib.RingTheory.Regular.RegularSequence import LeanPool.AndersonConjecture.Jensen.Construction.HeitmannProp import LeanPool.AndersonConjecture.Jensen.Construction.Transfinite -import LeanPool.AndersonConjecture.Jensen.Defs +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The Main Transfinite Construction @@ -16,6 +25,8 @@ contraction), yielding a Noetherian local domain with prescribed completion (Jensen, 2006, Corollary 2.4). -/ +@[expose] public section + universe u noncomputable section @@ -47,258 +58,24 @@ private def jensen_construction_p0_uncountable_proof -- Run the transfinite construction to obtain A ⊆ T with surjectivity, closure, and prime data obtain ⟨A, hA_surj, hA_closed, hA_primes⟩ := transfinite_construction hdepth hcard hchar hM_not_assoc hAss_ht hT_aleph0 - have hA_noeth : IsNoetherianRing A.carrier := - (heitmann_prop1 A.carrier hA_surj hA_closed).1 - have hmap_eq := map_maxIdeal_eq_of_surj_closed A.carrier hA_surj hA_closed - have hmap_pow : ∀ n : ℕ, - Ideal.map A.carrier.subtype (IsLocalRing.maximalIdeal A.carrier ^ n) = - IsLocalRing.maximalIdeal T ^ n := by - intro n - rw [Ideal.map_pow, hmap_eq] - have hclosed_pow : ∀ n : ℕ, ∀ c : A.carrier, - (c : T) ∈ IsLocalRing.maximalIdeal T ^ n → - c ∈ IsLocalRing.maximalIdeal A.carrier ^ n := by - intro n c hc - rw [← hmap_pow] at hc - exact hA_closed _ (IsNoetherian.noetherian _) c hc - -- Build the quotient maps A/(m_A)^n → T/(m_T)^n induced by the inclusion A ↪ T - let quotMap : ∀ n : ℕ, - A.carrier ⧸ IsLocalRing.maximalIdeal A.carrier ^ n →+* - T ⧸ IsLocalRing.maximalIdeal T ^ n := fun n => - Ideal.Quotient.lift _ ((Ideal.Quotient.mk _).comp A.carrier.subtype) (by - intro r hr - change Ideal.Quotient.mk _ (A.carrier.subtype r) = 0 - rw [Ideal.Quotient.eq_zero_iff_mem, ← hmap_pow] - exact Ideal.mem_map_of_mem A.carrier.subtype hr) - let f_n : ∀ n : ℕ, - AdicCompletion (IsLocalRing.maximalIdeal A.carrier) A.carrier →+* - T ⧸ IsLocalRing.maximalIdeal T ^ n := fun n => - (quotMap n).comp (AdicCompletion.evalₐ _ n).toRingHom - have hcompat : ∀ {m n : ℕ} (hle : m ≤ n), - (Ideal.Quotient.factorPow (IsLocalRing.maximalIdeal T) hle).comp (f_n n) = - f_n m := by - intro m n hle - ext x - simp only [RingHom.comp_apply] - induction x using AdicCompletion.induction_on with - | h a => - change Ideal.Quotient.factorPow _ hle - ((quotMap n) ((AdicCompletion.evalₐ _ n).toRingHom - (AdicCompletion.mk _ _ a))) = - (quotMap m) ((AdicCompletion.evalₐ _ m).toRingHom - (AdicCompletion.mk _ _ a)) - simp only [AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom, - AdicCompletion.evalₐ_mk] - rw [show (quotMap n) ((Ideal.Quotient.mk _) (a.val n)) = - Ideal.Quotient.mk _ (A.carrier.subtype (a.val n)) from rfl, - show Ideal.Quotient.factorPow _ hle - (Ideal.Quotient.mk _ (A.carrier.subtype (a.val n))) = - Ideal.Quotient.mk _ (A.carrier.subtype (a.val n)) from rfl, - show (quotMap m) ((Ideal.Quotient.mk _) (a.val m)) = - Ideal.Quotient.mk _ (A.carrier.subtype (a.val m)) from rfl, - Ideal.Quotient.eq] - rw [← hmap_pow, ← map_sub] - apply Ideal.mem_map_of_mem A.carrier.subtype - have hmem := SModEq.sub_mem.mp (a.property hle) - rw [Ideal.smul_eq_mul, Ideal.mul_top] at hmem - rw [show a.val n - a.val m = -(a.val m - a.val n) by ring] - exact neg_mem hmem - -- Lift the compatible system f_n to the canonical map φ :  → T using completeness of T - let φ : AdicCompletion (IsLocalRing.maximalIdeal A.carrier) A.carrier →+* T := - IsAdicComplete.liftRingHom (IsLocalRing.maximalIdeal T) f_n hcompat - have hφ_compat : ∀ r : A.carrier, - φ (algebraMap A.carrier - (AdicCompletion (IsLocalRing.maximalIdeal A.carrier) A.carrier) r) = - A.carrier.subtype r := by - intro r - rw [← sub_eq_zero] - apply IsHausdorff.haus - (IsAdicComplete.toIsHausdorff (I := IsLocalRing.maximalIdeal T)) - intro n - rw [show (IsLocalRing.maximalIdeal T ^ n • ⊤ : Submodule T T) = - (IsLocalRing.maximalIdeal T ^ n : Ideal T).restrictScalars T from by simp] - rw [SModEq.sub_mem] - simp only [sub_zero] - change _ ∈ (IsLocalRing.maximalIdeal T ^ n : Ideal T) - rw [← Ideal.Quotient.eq] - have h_mk := RingHom.congr_fun - (IsAdicComplete.mk_comp_liftRingHom _ f_n hcompat n) (algebraMap _ _ r) - rw [RingHom.comp_apply] at h_mk - rw [h_mk] - change (quotMap n) ((AdicCompletion.evalₐ _ n).toRingHom (algebraMap _ _ r)) = _ - rw [AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom, - show algebraMap A.carrier - (AdicCompletion (IsLocalRing.maximalIdeal A.carrier) A.carrier) r = - AdicCompletion.of (IsLocalRing.maximalIdeal A.carrier) A.carrier r from rfl, - AdicCompletion.evalₐ_of] - exact Ideal.Quotient.lift_mk _ _ _ - -- Injectivity of φ: use that each quotMap_n is injective (from ideal closure) - have hφ_inj : Function.Injective φ := by - have hqm_inj : ∀ n, Function.Injective (quotMap n) := by - intro n - apply RingHom.lift_injective_of_ker_le_ideal - intro r hr - rw [RingHom.mem_ker] at hr - change Ideal.Quotient.mk _ (A.carrier.subtype r) = 0 at hr - rw [Ideal.Quotient.eq_zero_iff_mem] at hr - exact hclosed_pow n r hr - intro x y hxy - have h_eval_eq : ∀ n, - (AdicCompletion.evalₐ _ n) x = (AdicCompletion.evalₐ _ n) y := by - intro n - apply hqm_inj n - have h : (Ideal.Quotient.mk (IsLocalRing.maximalIdeal T ^ n)).comp φ = f_n n := - IsAdicComplete.mk_comp_liftRingHom _ f_n hcompat n - exact show f_n n x = f_n n y from by rw [← h] - simp [hxy] - exact AdicCompletion.ext_evalₐ h_eval_eq - -- Surjectivity of φ: every t ∈ T can be approximated mod M^n by elements of A - have hφ_surj : Function.Surjective φ := by - have hsurj_pow : ∀ n : ℕ, Function.Surjective (fun r : A.carrier => - Ideal.Quotient.mk (IsLocalRing.maximalIdeal T ^ n) (r : T)) := by - intro n - induction n with - | zero => - intro q - obtain ⟨y, rfl⟩ := Ideal.Quotient.mk_surjective q - exact ⟨0, by - change Ideal.Quotient.mk _ _ = Ideal.Quotient.mk _ y - rw [Ideal.Quotient.eq, show IsLocalRing.maximalIdeal T ^ 0 = ⊤ from by - simp_all] - exact Submodule.mem_top⟩ - | succ n _ih => - -- Inductive step: lift the mod-M^n approximation to mod-M^{n+1} - set M := IsLocalRing.maximalIdeal T - have hsurj1 : Function.Surjective (fun r : A.carrier => - Ideal.Quotient.mk M (r : T)) := by - intro q - obtain ⟨t, rfl⟩ := Ideal.Quotient.mk_surjective q - obtain ⟨r, hr⟩ := hA_surj (Ideal.Quotient.mk _ t) - exact ⟨r, by rw [Ideal.Quotient.eq] at hr ⊢ - exact Ideal.pow_le_self two_ne_zero hr⟩ - -- Key lemma: any element of M^n can be corrected by an element of A to land in M^{n+1} - have hkey : ∀ m : T, m ∈ M ^ n → - ∃ d : A.carrier, (d : T) + m ∈ M ^ (n + 1) := by - intro m hm - rw [← hmap_pow] at hm - induction hm using Submodule.span_induction with - | mem x hx => - obtain ⟨s, _, rfl⟩ := hx - exact ⟨-s, by simp⟩ - | zero => exact ⟨0, by simp⟩ - | add x y _ _ ihx ihy => - obtain ⟨dx, hdx⟩ := ihx - obtain ⟨dy, hdy⟩ := ihy - exact ⟨dx + dy, by - change ((dx : T) + (dy : T)) + (x + y) ∈ _ - rw [show ((dx : T) + (dy : T)) + (x + y) = - ((dx : T) + x) + ((dy : T) + y) from by ring] - exact (M ^ (n + 1)).add_mem hdx hdy⟩ - | smul a x hx_mem ihx => - obtain ⟨dx, hdx⟩ := ihx - obtain ⟨r_a, hr_a⟩ := hsurj1 (Ideal.Quotient.mk M a) - have hx_in : x ∈ M ^ n := by rw [← hmap_pow] - exact hx_mem - refine ⟨r_a * dx, ?_⟩ - change ((r_a : T) * (dx : T)) + a * x ∈ _ - rw [show ((r_a : T) * (dx : T)) + a * x = - (r_a : T) * ((dx : T) + x) + (a - (r_a : T)) * x from by ring] - refine (M ^ (n + 1)).add_mem (Ideal.mul_mem_left _ _ hdx) ?_ - have ha_sub : a - (r_a : T) ∈ M := by - have := M.neg_mem ((Ideal.Quotient.eq (I := M)).mp hr_a) - rwa [show -((r_a : T) - a) = a - (r_a : T) from by ring] at this - rw [show M ^ (n + 1) = M * M ^ n from by - rw [mul_comm] - exact (pow_succ M n).symm] - exact Ideal.mul_mem_mul ha_sub hx_in - intro q - obtain ⟨t, rfl⟩ := Ideal.Quotient.mk_surjective q - obtain ⟨r₀, hr₀⟩ := _ih (Ideal.Quotient.mk _ t) - have hm : (r₀ : T) - t ∈ M ^ n := (Ideal.Quotient.eq (I := M ^ n)).mp hr₀ - obtain ⟨d, hd⟩ := hkey _ hm - exact ⟨r₀ + d, by - change Ideal.Quotient.mk _ ((r₀ + d : A.carrier) : T) = Ideal.Quotient.mk _ t - rw [Ideal.Quotient.eq] - change ((r₀ : T) + (d : T)) - t ∈ _ - rw [show ((r₀ : T) + (d : T)) - t = (d : T) + ((r₀ : T) - t) from by ring] - exact hd⟩ - intro t - -- For each n, choose r(n) ∈ A with r(n) ≡ t mod M^n; these form a Cauchy sequence in  - choose r hr using fun n => hsurj_pow n (Ideal.Quotient.mk _ t) - have h_cauchy : ∀ n : ℕ, - r n ≡ r (n + 1) [SMOD (IsLocalRing.maximalIdeal A.carrier ^ n • ⊤ : - Submodule A.carrier A.carrier)] := by - intro n - rw [show (IsLocalRing.maximalIdeal A.carrier ^ n • ⊤ : - Submodule A.carrier A.carrier) = - (IsLocalRing.maximalIdeal A.carrier ^ n : Ideal A.carrier).restrictScalars - A.carrier from by simp] - rw [SModEq.sub_mem] - apply hclosed_pow n - have hmem_n := Ideal.Quotient.eq.mp (hr n) - have hmem_n1 := Ideal.pow_le_pow_right (Nat.le_succ n) - (Ideal.Quotient.eq.mp (hr (n + 1))) - have h1 := sub_mem hmem_n hmem_n1 - simp_all - -- Package the Cauchy sequence into an element of  and verify φ maps it to t - let seq := AdicCompletion.AdicCauchySequence.mk _ _ (fun n => r n) h_cauchy - let xhat := AdicCompletion.mkₐ (IsLocalRing.maximalIdeal A.carrier) seq - refine ⟨xhat, ?_⟩ - rw [← sub_eq_zero] - apply IsHausdorff.haus - (IsAdicComplete.toIsHausdorff (I := IsLocalRing.maximalIdeal T)) - intro n - rw [show (IsLocalRing.maximalIdeal T ^ n • ⊤ : Submodule T T) = - (IsLocalRing.maximalIdeal T ^ n : Ideal T).restrictScalars T from by simp] - rw [SModEq.sub_mem] - simp only [sub_zero] - change _ ∈ (IsLocalRing.maximalIdeal T ^ n : Ideal T) - rw [← Ideal.Quotient.eq] - have h_mk := - RingHom.congr_fun (IsAdicComplete.mk_comp_liftRingHom _ f_n hcompat n) xhat - rw [RingHom.comp_apply] at h_mk - rw [h_mk] - change (quotMap n) ((AdicCompletion.evalₐ _ n).toRingHom xhat) = _ - rw [AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom, - show (AdicCompletion.evalₐ (IsLocalRing.maximalIdeal A.carrier) n) xhat = - Ideal.Quotient.mk _ (r n) from AdicCompletion.evalₐ_mkₐ ..] - exact hr n - -- φ is a ring isomorphism  ≅ T; now verify the trivial generic formal fiber property - let φ_equiv := RingEquiv.ofBijective φ ⟨hφ_inj, hφ_surj⟩ + obtain ⟨hA_noeth, φ_equiv, hφ_compat⟩ := heitmann_prop1 A.carrier hA_surj hA_closed have hA_tgff : @HasTrivialGenericFormalFiber A.carrier _ _ := by intro P hP hP_comap - -- Suppose P is a nonzero prime in  lying over (0); - -- push forward to Q in T and derive contradiction by_contra hP_ne - set Q := P.map φ_equiv.toRingHom with hQ_def + set Q := P.map φ_equiv.toRingHom have : Q.IsPrime := Ideal.map_isPrime_of_equiv φ_equiv - have hQ_ne : Q ≠ ⊥ := by - intro h - apply hP_ne - rw [eq_bot_iff] - intro x hx - have hfx : φ_equiv x ∈ Q := Ideal.mem_map_of_mem _ hx - rw [h, Ideal.mem_bot] at hfx - simp_all - -- The transfinite construction guarantees Q ∩ A ≠ 0 for any nonzero prime Q of T + have hQ_ne : Q ≠ ⊥ := + (Ideal.map_eq_bot_iff_of_injective φ_equiv.injective).not.mpr hP_ne + -- Every nonzero prime of T meets A, so its pullback cannot lie over zero. obtain ⟨t, ht_mem, ht_ne⟩ := hA_primes Q inferInstance hQ_ne - have h_alg_eq : algebraMap A.carrier - (AdicCompletion (IsLocalRing.maximalIdeal A.carrier) A.carrier) t = - φ_equiv.symm (A.carrier.subtype t) := by - apply φ_equiv.injective - rw [RingEquiv.apply_symm_apply] - exact hφ_compat t - have h_symm_mem : φ_equiv.symm (A.carrier.subtype t) ∈ P := by - have h_in_map : φ_equiv (φ_equiv.symm (A.carrier.subtype t)) ∈ - Ideal.map φ_equiv.toRingHom P := by - simp_all - obtain ⟨y, hy_mem, hy_eq⟩ := (Ideal.mem_map_iff_of_surjective _ - φ_equiv.surjective).mp h_in_map - have := φ_equiv.injective hy_eq - rwa [this] at hy_mem - rw [← h_alg_eq] at h_symm_mem - have h_bot := hP_comap ▸ (Ideal.mem_comap.mpr h_symm_mem) - simp_all + have ht_completion : AdicCompletion.of (IsLocalRing.maximalIdeal A.carrier) + A.carrier t ∈ P := by + apply (Ideal.apply_mem_of_equiv_iff (f := φ_equiv)).mp + rw [hφ_compat] + exact ht_mem + have ht_bot : t ∈ (⊥ : Ideal A.carrier) := + hP_comap ▸ Ideal.mem_comap.mpr ht_completion + exact ht_ne (congrArg A.carrier.subtype (Ideal.mem_bot.mp ht_bot)) exact ⟨↥A.carrier, inferInstance, inferInstance, inferInstance, inferInstance, hA_noeth, ⟨φ_equiv⟩, hA_tgff⟩ ⟩ diff --git a/LeanPool/AndersonConjecture/Jensen/Construction/HeitmannProp.lean b/LeanPool/AndersonConjecture/Jensen/Construction/HeitmannProp.lean index a96d6f7ba7..bcee52fd3e 100644 --- a/LeanPool/AndersonConjecture/Jensen/Construction/HeitmannProp.lean +++ b/LeanPool/AndersonConjecture/Jensen/Construction/HeitmannProp.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import Mathlib.Algebra.Lie.OfAssociative +module + +public import Mathlib.RingTheory.Ideal.Height +public import Mathlib.RingTheory.Regular.RegularSequence +public import Mathlib.RingTheory.AdicCompletion.Algebra import Mathlib.RingTheory.AdicCompletion.RingHom -import Mathlib.RingTheory.Ideal.Height -import Mathlib.RingTheory.Regular.RegularSequence /-! # Heitmann's Proposition 1 @@ -19,6 +21,8 @@ depth T >= 2, associated primes of T have height at most 1. Heitmann, "Characterization of completions of UFDs", 1993, Prop. 1. -/ +@[expose] public section + universe u noncomputable section @@ -50,7 +54,9 @@ private lemma map_maxIdeal_le_of_closed have htop : Ideal.map R.subtype (Ideal.span ({r} : Set ↥R)) = ⊤ := Ideal.eq_top_of_isUnit_mem _ hr_map hnotM have h1 : (1 : ↥R) ∈ Ideal.span ({r} : Set ↥R) := by - simp_all + apply h_closed _ hI_fg + rw [htop] + exact Submodule.mem_top have h_le : Ideal.span ({r} : Set ↥R) ≤ IsLocalRing.maximalIdeal ↥R := Ideal.span_le.mpr (Set.singleton_subset_iff.mpr hr) rw [(Ideal.eq_top_iff_one _).mpr h1] at h_le @@ -117,51 +123,33 @@ private lemma heitmann_prop1_isNoetherian (h_closed : ∀ (I : Ideal R), I.FG → ∀ (c : R), (c : T) ∈ Ideal.map R.subtype I → c ∈ I) : IsNoetherianRing R := by + classical rw [isNoetherianRing_iff_ideal_fg] intro I - have hIT_fg : (Ideal.map R.subtype I).FG := IsNoetherian.noetherian _ - have hIT_eq : Ideal.map R.subtype I = Ideal.span (R.subtype '' (I : Set R)) := rfl - rw [hIT_eq] at hIT_fg - obtain ⟨s', hs'_sub, hs'_span⟩ := - (Submodule.fg_span_iff_fg_span_finset_subset (R.subtype '' (I : Set R))).mp hIT_fg - classical - have h_preimage : ∀ t ∈ (s' : Set T), ∃ (r : R), r ∈ I ∧ R.subtype r = t := by - intro t ht - exact hs'_sub ht - let f : (t : T) → t ∈ (s' : Set T) → R := fun t ht => (h_preimage t ht).choose - have hf_mem : ∀ t (ht : t ∈ (s' : Set T)), f t ht ∈ I := - fun t ht => (h_preimage t ht).choose_spec.1 - have hf_eq : ∀ t (ht : t ∈ (s' : Set T)), R.subtype (f t ht) = t := - fun t ht => (h_preimage t ht).choose_spec.2 - set gen_set : Finset R := - s'.attach.image (fun ⟨t, ht⟩ => f t (Finset.mem_coe.mpr ht)) - have hgen_sub : (gen_set : Set R) ⊆ (I : Set R) := by + obtain ⟨generators, hsubset, hspan⟩ := + (Submodule.fg_span_iff_fg_span_finset_subset (R.subtype '' (I : Set R))).mp + (show (Ideal.span (R.subtype '' (I : Set R))).FG from IsNoetherian.noetherian _) + let preimages : Finset R := generators.preimage R.subtype R.subtype_injective.injOn + have hpreimages : (preimages : Set R) = R.subtype ⁻¹' (generators : Set T) := + Finset.coe_preimage _ _ + have hpreimages_subset : (preimages : Set R) ⊆ (I : Set R) := by intro r hr - rw [Finset.mem_coe, Finset.mem_image] at hr - obtain ⟨⟨t, ht⟩, _, rfl⟩ := hr - exact hf_mem t (Finset.mem_coe.mpr ht) - have hJ_fg : (Ideal.span (gen_set : Set R)).FG := ⟨gen_set, rfl⟩ - have hJT_eq : Ideal.map R.subtype (Ideal.span (gen_set : Set R)) = + obtain ⟨r', hr', heq⟩ := hsubset (show R.subtype r ∈ (generators : Set T) from + Finset.mem_preimage.mp hr) + exact R.subtype_injective heq ▸ hr' + have himage : R.subtype '' (preimages : Set R) = (generators : Set T) := by + rw [hpreimages] + apply Set.image_preimage_eq_of_subset + rintro t ht + obtain ⟨r, _, rfl⟩ := hsubset ht + exact ⟨r, rfl⟩ + have hmap : Ideal.map R.subtype (Ideal.span (preimages : Set R)) = Ideal.map R.subtype I := by - apply le_antisymm - · rw [Ideal.map_span] - apply Ideal.span_le.mpr - intro t ht - obtain ⟨r, hr, rfl⟩ := ht - rw [hIT_eq] - exact Ideal.subset_span ⟨r, hgen_sub hr, rfl⟩ - · rw [hIT_eq, Ideal.map_span] - rw [show (Ideal.span (R.subtype '' (I : Set R)) : Ideal T) = - Ideal.span (↑s' : Set T) from by exact_mod_cast hs'_span] - apply Ideal.span_le.mpr - intro t ht - have ht' : t ∈ s' := Finset.mem_coe.mp ht - apply Ideal.subset_span - exact ⟨f t (Finset.mem_coe.mpr ht'), - Finset.mem_coe.mpr (Finset.mem_image.mpr ⟨⟨t, ht'⟩, Finset.mem_attach _ _, rfl⟩), - hf_eq t (Finset.mem_coe.mpr ht')⟩ - exact ⟨gen_set, le_antisymm (Ideal.span_le.mpr hgen_sub) (fun c hc => - h_closed _ hJ_fg c (hJT_eq ▸ Ideal.mem_map_of_mem R.subtype hc))⟩ + rw [Ideal.map_span, himage] + exact hspan.symm + refine ⟨preimages, le_antisymm (Ideal.span_le.mpr hpreimages_subset) ?_⟩ + intro c hc + exact h_closed _ ⟨preimages, rfl⟩ c (hmap ▸ Ideal.mem_map_of_mem R.subtype hc) omit [IsDomain T] in /-- Under the hypotheses of Proposition 1, `R → T/Mⁿ` is surjective for every `n`, @@ -188,8 +176,7 @@ private lemma heitmann_prop1_surj_pow obtain ⟨y, rfl⟩ := Ideal.Quotient.mk_surjective q exact ⟨0, by change Ideal.Quotient.mk _ _ = Ideal.Quotient.mk _ y - rw [Ideal.Quotient.eq, show IsLocalRing.maximalIdeal T ^ 0 = ⊤ from by - simp_all] + rw [Ideal.Quotient.eq, pow_zero, Ideal.one_eq_top] exact Submodule.mem_top⟩ | succ n _ih => set M := IsLocalRing.maximalIdeal T @@ -456,42 +443,22 @@ theorem maximal_not_assoc_of_depth_ge_two obtain ⟨_, x, hx_ann⟩ := hM_assoc have hx_ne : x ≠ 0 := by intro hx0 - rw [hx0] at hx_ann - have : IsLocalRing.maximalIdeal T = ⊤ := by - simp_all - exact (IsLocalRing.maximalIdeal.isMaximal T).ne_top this + rw [hx0, Submodule.colon_singleton_zero] at hx_ann + exact (IsLocalRing.maximalIdeal.isMaximal T).ne_top hx_ann obtain ⟨x_lift, rfl⟩ := Ideal.Quotient.mk_surjective x have hx_not_mem : x_lift ∉ Ideal.span ({r} : Set T) := by intro h apply hx_ne exact (Ideal.Quotient.eq_zero_iff_mem).mpr h - have ha_in_ann : a ∈ (⊥ : Submodule T (T ⧸ Ideal.span {r})).colon - {Ideal.Quotient.mk (Ideal.span {r}) x_lift} := by - simp_all - have ha_mul : a * x_lift ∈ Ideal.span ({r} : Set T) := by - rw [Submodule.mem_colon] at ha_in_ann - have := ha_in_ann (Ideal.Quotient.mk _ x_lift) (Set.mem_singleton _) - rw [Submodule.mem_bot] at this - rw [← Ideal.Quotient.eq_zero_iff_mem, map_mul] - exact this - have hb_in_ann : b ∈ (⊥ : Submodule T (T ⧸ Ideal.span {r})).colon - {Ideal.Quotient.mk (Ideal.span {r}) x_lift} := by - simp_all - have hb_mul : b * x_lift ∈ Ideal.span ({r} : Set T) := by - rw [Submodule.mem_colon] at hb_in_ann - have := hb_in_ann (Ideal.Quotient.mk _ x_lift) (Set.mem_singleton _) - rw [Submodule.mem_bot] at this + have hmul (s : T) (hs : s ∈ IsLocalRing.maximalIdeal T) : + s * x_lift ∈ Ideal.span ({r} : Set T) := by + rw [hx_ann, Submodule.mem_colon_singleton, Submodule.mem_bot] at hs rw [← Ideal.Quotient.eq_zero_iff_mem, map_mul] - exact this - rw [Ideal.mem_span_singleton] at ha_mul hb_mul - obtain ⟨y₁, hy₁⟩ := ha_mul - obtain ⟨y₂, hy₂⟩ := hb_mul + exact hs + obtain ⟨y₁, hy₁⟩ := Ideal.mem_span_singleton.mp (hmul a ha_mem) + obtain ⟨y₂, hy₂⟩ := Ideal.mem_span_singleton.mp (hmul b hb_mem) have h_eq : r * (b * y₁) = r * (a * y₂) := by - have h1 : b * (a * x_lift) = a * (b * x_lift) := by ring - rw [hy₁, hy₂] at h1 - calc r * (b * y₁) = b * (r * y₁) := by ring - _ = a * (r * y₂) := h1 - _ = r * (a * y₂) := by ring + rw [mul_left_comm r b, ← hy₁, mul_left_comm b a, hy₂, mul_left_comm a r] -- Cancel r (domain), then use b regular on T/aT to get y₁ ∈ aT have h_cancel : b * y₁ = a * y₂ := mul_left_cancel₀ hr h_eq have hby₁_mem : b * y₁ ∈ Ideal.span ({a} : Set T) := @@ -499,29 +466,16 @@ theorem maximal_not_assoc_of_depth_ge_two open Pointwise in have hy₁_in_aT : y₁ ∈ Ideal.span ({a} : Set T) := by have h_eq : (Ideal.span ({a} : Set T) : Submodule T T) = (a • ⊤ : Submodule T T) := by - ext x - constructor - · intro hx - rw [Ideal.mem_span_singleton] at hx - obtain ⟨c, rfl⟩ := hx - exact Submodule.smul_mem_pointwise_smul c a ⊤ Submodule.mem_top - · intro hx - have : x ∈ (a • (⊤ : Set T) : Set T) := SetLike.mem_coe.mpr hx - rw [Set.mem_smul_set] at this - obtain ⟨c, _, rfl⟩ := this - exact Ideal.mem_span_singleton.mpr ⟨c, by rw [smul_eq_mul]⟩ + rw [← Submodule.set_smul_top_eq_span, Submodule.singleton_set_smul] have hby₁_smul : b * y₁ ∈ (a • ⊤ : Submodule T T) := h_eq ▸ hby₁_mem have hy₁_smul : y₁ ∈ (a • ⊤ : Submodule T T) := mem_of_isSMulRegular_quotient_of_smul_mem hb_reg_mod_a (by rwa [smul_eq_mul]) - simp_all + rwa [h_eq] rw [Ideal.mem_span_singleton] at hy₁_in_aT obtain ⟨z, hz⟩ := hy₁_in_aT -- Cancel a (regular on T): x_lift = r * z, contradicting x ≠ 0 - have h_ax : a * x_lift = a * (r * z) := by rw [hy₁, hz] - ring - have h_x_eq : x_lift = r * z := by - have := ha_reg (show a • x_lift = a • (r * z) by rwa [smul_eq_mul, smul_eq_mul]) - exact this + have h_ax : a * x_lift = a * (r * z) := by rw [hy₁, hz, mul_left_comm] + have h_x_eq : x_lift = r * z := ha_reg h_ax exact hx_not_mem (Ideal.mem_span_singleton.mpr ⟨z, h_x_eq⟩) /-- In a Noetherian local domain with depth ≥ 2, if all primes P ≠ M have height ≤ 1, diff --git a/LeanPool/AndersonConjecture/Jensen/Construction/Transfinite.lean b/LeanPool/AndersonConjecture/Jensen/Construction/Transfinite.lean index 47eebac910..69ed1c3df0 100644 --- a/LeanPool/AndersonConjecture/Jensen/Construction/Transfinite.lean +++ b/LeanPool/AndersonConjecture/Jensen/Construction/Transfinite.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import Mathlib.RingTheory.Regular.RegularSequence +public import LeanPool.AndersonConjecture.Jensen.TransfiniteUnion +public import Mathlib.RingTheory.AdicCompletion.Basic import LeanPool.AndersonConjecture.Jensen.Construction.ChainHelpers -import Mathlib.RingTheory.Regular.RegularSequence +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Transfinite Construction @@ -17,6 +26,8 @@ Jensen, "Completions of UFDs with semi-local formal fibers", 2006, Theorem 2.2. -/ +@[expose] public section + universe u noncomputable section @@ -85,149 +96,9 @@ private noncomputable def mk_union_nsub_aux have hU_le := lc.le_union have hU_mem : ∀ x : ↥U, ∃ β : {β : ι // β < α}, (x : T) ∈ (lc.ring β).carrier := fun x => lc.mem_union_iff.mp x.2 - haveI hU_local : IsLocalRing U := by - apply IsLocalRing.of_isUnit_or_isUnit_one_sub_self - intro a - obtain ⟨⟨β, hβ⟩, hβm⟩ := hU_mem a - rcases IsLocalRing.isUnit_or_isUnit_one_sub_self - (⟨(a : T), hβm⟩ : (rings β hβ).carrier) with hu | hu - · left - exact hu.map (Subring.inclusion (hU_le ⟨β, hβ⟩)) - · right - exact (show Subring.inclusion (hU_le ⟨β, hβ⟩) - (1 - ⟨(a : T), hβm⟩) = 1 - a from Subtype.ext rfl) ▸ - hu.map (Subring.inclusion (hU_le ⟨β, hβ⟩)) - refine ⟨⟨U, - transfinite_union_isUFD lc U hU_le hU_mem, - hU_local, ?_, ?_, ?_⟩, ?_, ?_, fun β hβ => hU_le ⟨β, hβ⟩, ?_⟩ - · set κ' := max Cardinal.aleph0 (Cardinal.mk (IsLocalRing.ResidueField T)) - have hU_eq : (U : Set T) = ⋃ β : {β : ι // β < α}, - ↑(lc.ring β).carrier := by - rw [hU_def, NSubringChain.unionSubring] - exact Subring.coe_iSup_of_directed lc.directed_carriers - have h1 : Cardinal.mk ↥U ≤ Cardinal.mk {β : ι // β < α} * - ⨆ (β : {β : ι // β < α}), - Cardinal.mk ↑((lc.ring β).carrier : Set T) := by - have := Cardinal.mk_iUnion_le - (fun β : {β : ι // β < α} => ((lc.ring β).carrier : Set T)) - rwa [← hU_eq] at this - have h2 : ⨆ (β : {β : ι // β < α}), - Cardinal.mk ↑((lc.ring β).carrier : Set T) ≤ κ' := - ciSup_le fun ⟨β, hβ⟩ => (rings β hβ).card_le - have h3 : Cardinal.mk {β : ι // β < α} ≤ κ' := by - calc Cardinal.mk {β : ι // β < α} - ≤ Cardinal.mk T := le_of_lt h_idx_lt_T - _ = Cardinal.mk (IsLocalRing.ResidueField T) := hcard - _ ≤ max Cardinal.aleph0 _ := le_max_right _ _ - calc Cardinal.mk ↥U - ≤ Cardinal.mk {β : ι // β < α} * - ⨆ (β : {β : ι // β < α}), - Cardinal.mk ↑((lc.ring β).carrier : Set T) := h1 - _ ≤ Cardinal.mk {β : ι // β < α} * κ' := - mul_le_mul_right h2 _ - _ ≤ κ' * κ' := mul_le_mul_left h3 κ' - _ ≤ max κ' κ' := Cardinal.mul_le_max_of_aleph0_le_left (le_max_left ..) - _ = κ' := max_self κ' - · ext ⟨a, ha⟩ - simp only [Ideal.mem_comap, Subring.coe_subtype] - constructor - · intro hx - rw [IsLocalRing.mem_maximalIdeal] - intro hu_T - obtain ⟨⟨β, hβ⟩, hβm⟩ := hU_mem ⟨a, ha⟩ - by_contra h_nu - have : ¬IsUnit (⟨a, hβm⟩ : (rings β hβ).carrier) := - fun hu => h_nu ((IsLocalRing.mem_maximalIdeal _).mp hx - (hu.map (Subring.inclusion (hU_le ⟨β, hβ⟩)))) - have hmem' := (IsLocalRing.mem_maximalIdeal _).mpr this - rw [(rings β hβ).maximal_ideal_eq] at hmem' - exact (IsLocalRing.mem_maximalIdeal _).mp (Ideal.mem_comap.mp hmem') hu_T - · intro hx - rw [IsLocalRing.mem_maximalIdeal] - intro hu_S - exact (IsLocalRing.mem_maximalIdeal _).mp hx (hu_S.map U.subtype) - · -- Height ≤ 1 for primes in the chain ring - intro t ht P hP - have hP_prime := hP.isPrime - have : (Ideal.comap U.subtype P).IsPrime := hP_prime.comap _ - change (Ideal.comap U.subtype P).height ≤ ↑(1 : ℕ) - rw [Ideal.height_le_iff] - intro q hq_prime hq_lt - suffices q = ⊥ by rw [this, Ideal.height_bot] - norm_cast - by_contra hq_ne - obtain ⟨s, hs_q, hs_ne⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hq_ne - obtain ⟨x, hx_P, hx_nq⟩ := Set.exists_of_ssubset hq_lt - obtain ⟨⟨αs, hαs_lt⟩, hαs⟩ := hU_mem s - obtain ⟨⟨αx, hαx_lt⟩, hαx⟩ := hU_mem x - set γ := max αs αx - have hγ_lt : γ < α := max_lt hαs_lt hαx_lt - set inclγ := Subring.inclusion (hU_le ⟨γ, hγ_lt⟩) - have : (Ideal.comap inclγ q).IsPrime := hq_prime.comap _ - set s' : (rings γ hγ_lt).carrier := - ⟨(s : T), hmono hαs_lt hγ_lt (le_max_left ..) hαs⟩ - have hs'_ne : s' ≠ 0 := fun h => hs_ne (Subtype.ext (congrArg - (fun (x : (rings γ hγ_lt).carrier) => (x : T)) h)) - have hs'_q : s' ∈ Ideal.comap inclγ q := - show inclγ s' ∈ q from (show inclγ s' = s from Subtype.ext rfl) ▸ hs_q - have hq'_ne : Ideal.comap inclγ q ≠ ⊥ := fun h => by - rw [h] at hs'_q - exact hs'_ne (Ideal.mem_bot.mp hs'_q) - set x' : (rings γ hγ_lt).carrier := - ⟨(x : T), hmono hαx_lt hγ_lt (le_max_right ..) hαx⟩ - have hx'_nq : x' ∉ Ideal.comap inclγ q := fun h => by - have h' : inclγ x' ∈ q := h - rw [show inclγ x' = x from Subtype.ext rfl] at h' - exact hx_nq h' - have hq'_lt : Ideal.comap inclγ q < - Ideal.comap (rings γ hγ_lt).carrier.subtype P := - lt_of_le_of_ne - (fun r hr => (hq_lt.le (show inclγ r ∈ q from hr) : (inclγ r : T) ∈ P)) - (fun h => hx'_nq (h ▸ (hx_P : (x : T) ∈ P))) - have : (Ideal.comap (rings γ hγ_lt).carrier.subtype P).IsPrime := - hP_prime.comap _ - have hq'_ht := (Ideal.height_le_iff (n := 1)).mp - ((rings γ hγ_lt).height_bound t ht P hP) _ inferInstance hq'_lt - have : IsDomain (rings γ hγ_lt).carrier := inferInstance - exact absurd ((Ideal.height_le_iff (n := 0)).mp (by - lift (Ideal.comap inclγ q).height to ℕ using ne_top_of_lt hq'_ht with n hn - simp only [Nat.cast_lt] at hq'_ht - simp only [Nat.cast_le] - omega - ) ⊥ Ideal.isPrime_bot (bot_lt_iff_ne_bot.mpr hq'_ne)) not_lt_bot - · set n := Cardinal.mk {γ : ι // γ < α} - have h_each_le : ∀ (β : ι) (hβ : β < α), - Cardinal.mk (rings β hβ).carrier ≤ max Cardinal.aleph0 n := by - intro β hβ - exact le_trans (hIH_cb β hβ) - (max_le_max_left _ (Cardinal.mk_subtype_mono (fun γ hγ => lt_of_le_of_lt hγ hβ))) - have h_sup_le : ⨆ (β : {β : ι // β < α}), - Cardinal.mk ↑((lc.ring β).carrier : Set T) ≤ max Cardinal.aleph0 n := by - apply ciSup_le - intro ⟨β, hβ⟩ - exact le_trans (le_of_eq rfl) (h_each_le β hβ) - have hU_eq : (U : Set T) = ⋃ β : {β : ι // β < α}, - ↑(lc.ring β).carrier := by - rw [hU_def, NSubringChain.unionSubring] - exact Subring.coe_iSup_of_directed lc.directed_carriers - have h1 : Cardinal.mk ↥U ≤ n * - ⨆ (β : {β : ι // β < α}), - Cardinal.mk ↑((lc.ring β).carrier : Set T) := by - have := Cardinal.mk_iUnion_le - (fun β : {β : ι // β < α} => ((lc.ring β).carrier : Set T)) - rwa [← hU_eq] at this - have h_tight : Cardinal.mk ↥U ≤ max Cardinal.aleph0 n := by - calc Cardinal.mk ↥U - ≤ n * ⨆ (β : {β : ι // β < α}), - Cardinal.mk ↑((lc.ring β).carrier : Set T) := h1 - _ ≤ n * max Cardinal.aleph0 n := mul_le_mul_right h_sup_le _ - _ ≤ max Cardinal.aleph0 n * max Cardinal.aleph0 n := - mul_le_mul_left (le_max_right _ _) _ - _ ≤ max (max Cardinal.aleph0 n) (max Cardinal.aleph0 n) := - Cardinal.mul_le_max_of_aleph0_le_left (le_max_left ..) - _ = max Cardinal.aleph0 n := max_self _ - exact lt_of_le_of_lt h_tight (max_lt hT_aleph0 h_idx_lt_T) - · set n := Cardinal.mk {γ : ι // γ < α} + have h_tight : Cardinal.mk ↥U ≤ + max Cardinal.aleph0 (Cardinal.mk {γ : ι // γ < α}) := by + set n := Cardinal.mk {γ : ι // γ < α} have h_each_le : ∀ (β : ι) (hβ : β < α), Cardinal.mk (rings β hβ).carrier ≤ max Cardinal.aleph0 n := by intro β hβ @@ -257,8 +128,14 @@ private noncomputable def mk_union_nsub_aux _ ≤ max (max Cardinal.aleph0 n) (max Cardinal.aleph0 n) := Cardinal.mul_le_max_of_aleph0_le_left (le_max_left ..) _ = max Cardinal.aleph0 n := max_self _ - · intro β hβ r hr hmem - exact transfinite_union_primes_preserved lc U hU_le hU_mem ⟨β, hβ⟩ r hr + have hU_lt : Cardinal.mk ↥U < Cardinal.mk T := + lt_of_le_of_lt h_tight (max_lt hT_aleph0 h_idx_lt_T) + have hU_card : Cardinal.mk ↥U ≤ + max Cardinal.aleph0 (Cardinal.mk (IsLocalRing.ResidueField T)) := + hU_lt.le.trans (hcard.le.trans (le_max_right ..)) + refine ⟨lc.unionNSubring hU_card, hU_lt, h_tight, fun β hβ => hU_le ⟨β, hβ⟩, ?_⟩ + intro β hβ r hr hmem + exact transfinite_union_primes_preserved lc U hU_le hU_mem ⟨β, hβ⟩ r hr /-- The transfinite construction via ordinal recursion: iterate `combined_step` over all (prime, residue) pairs indexed by ordinals, building an N-subring A @@ -574,9 +451,6 @@ private def transfinite_construction_proof · convert hr using 1 · rcases eq_or_lt_of_le hle_α with heq_α | hlt_α · have hβ₁_lt_α : β₁ < α := heq_α ▸ hlt - have hmem_prevF : (r : T) ∈ (prevF α (fun γ hγ => data γ)).carrier := by - have := hring_le_prev_α β₁ hβ₁_lt_α r.2 - rwa [hprevF_eq α] at this have hmem_prev : (r : T) ∈ (data α).2.1.carrier := hring_le_prev_α β₁ hβ₁_lt_α r.2 have h_nsub_eq := hprevF_eq α @@ -585,9 +459,6 @@ private def transfinite_construction_proof intro S₁ S₂ h x hx hp cases h exact hp - have prime_transport' : ∀ (S₁ S₂ : NSubring T) (h : S₂ = S₁) (x : T) (hx : x ∈ S₁.carrier), - Prime (⟨x, hx⟩ : S₁.carrier) → Prime (⟨x, h ▸ hx⟩ : S₂.carrier) := by - simp_all have hmem_prevF_carrier : (r : T) ∈ (prevF α (fun γ hγ => data γ)).carrier := by rwa [← h_nsub_eq] have hprime_prevF : Prime (⟨(r : T), hmem_prevF_carrier⟩ : @@ -603,7 +474,7 @@ private def transfinite_construction_proof (mk_union_nsub α (fun γ hγ => data γ) (not_isMin_iff.mp hmin) hgood_α (fun β hβ => (data β).2.2.2.2.2.2.2)).1.carrier := by rwa [← h_prevF_eq] - exact prime_transport' _ _ h_prevF_eq _ hmem_u + exact prime_transport _ _ h_prevF_eq.symm _ hmem_u ((mk_union_nsub α (fun γ hγ => data γ) (not_isMin_iff.mp hmin) hgood_α (fun β hβ => (data β).2.2.2.2.2.2.2)).2.2.2.2 β₁ hβ₁_lt_α r hr hmem_u) @@ -620,8 +491,8 @@ private def transfinite_construction_proof rwa [← h_prevF_eq] rcases eq_or_lt_of_le (Order.lt_succ_iff_of_not_isMax hγ_ex.choose_spec.1 |>.mp (hγ_ex.choose_spec.2 ▸ hβ₁_lt_α)) with rfl | hlt' - · exact prime_transport' _ _ h_prevF_eq _ hmem_ring_γ hr - · exact prime_transport' _ _ h_prevF_eq _ hmem_ring_γ + · exact prime_transport _ _ h_prevF_eq.symm _ hmem_ring_γ hr + · exact prime_transport _ _ h_prevF_eq.symm _ hmem_ring_γ (hprimes_lt (le_of_lt hlt') hγ_lt r (((IH_wf hγ_ex.choose hγ_lt).1 β₁ hlt').trans (data hγ_ex.choose).2.2.1.le r.2) hr) @@ -657,20 +528,6 @@ private def transfinite_construction_proof mono := hmono primes_preserved := hprimes_pres } set U := chain.unionSubring with hU_def - have hU_le : ∀ α, (chain.ring α).carrier ≤ U := chain.le_union - have hU_mem : ∀ x : ↥U, ∃ α, (x : T) ∈ (chain.ring α).carrier := - fun x => chain.mem_union_iff.mp x.2 - have hU_local : IsLocalRing U := by - apply IsLocalRing.of_isUnit_or_isUnit_one_sub_self - intro a - obtain ⟨α, hα⟩ := hU_mem a - rcases IsLocalRing.isUnit_or_isUnit_one_sub_self - (⟨(a : T), hα⟩ : (chain.ring α).carrier) with hu | hu - · left - exact hu.map (Subring.inclusion (hU_le α)) - · right - exact (show Subring.inclusion (hU_le α) (1 - ⟨(a : T), hα⟩) = 1 - a - from Subtype.ext rfl) ▸ hu.map (Subring.inclusion (hU_le α)) have hU_card_le : Cardinal.mk ↥U ≤ max Cardinal.aleph0 (Cardinal.mk (IsLocalRing.ResidueField T)) := by have hU_eq : (U : Set T) = ⋃ α, ↑(chain.ring α).carrier := by @@ -695,82 +552,7 @@ private def transfinite_construction_proof _ ≤ κ' * κ' := mul_le_mul_left h3 κ' _ ≤ max κ' κ' := Cardinal.mul_le_max_of_aleph0_le_left (le_max_left ..) _ = κ' := max_self κ' - have hU_maximal : IsLocalRing.maximalIdeal ↥U = - (IsLocalRing.maximalIdeal T).comap U.subtype := by - ext ⟨a, ha⟩ - simp only [Ideal.mem_comap, Subring.coe_subtype] - constructor - · intro hx - rw [IsLocalRing.mem_maximalIdeal] - intro hu_T - obtain ⟨α, hα⟩ := hU_mem ⟨a, ha⟩ - by_contra h_nu - have : ¬IsUnit (⟨a, hα⟩ : (chain.ring α).carrier) := - fun hu => h_nu ((IsLocalRing.mem_maximalIdeal _).mp hx - (hu.map (Subring.inclusion (hU_le α)))) - have hmem := (IsLocalRing.mem_maximalIdeal _).mpr this - rw [(chain.ring α).maximal_ideal_eq] at hmem - exact (IsLocalRing.mem_maximalIdeal _).mp (Ideal.mem_comap.mp hmem) hu_T - · intro hx - rw [IsLocalRing.mem_maximalIdeal] - intro hu_S - exact (IsLocalRing.mem_maximalIdeal _).mp hx (hu_S.map U.subtype) - have hU_height : ∀ (t : T), t ≠ 0 → - ∀ P ∈ associatedPrimes T (T ⧸ Ideal.span {t}), - Ideal.height (P.comap U.subtype) ≤ 1 := by - intro t ht P hP - have hP_prime := hP.isPrime - have : (Ideal.comap U.subtype P).IsPrime := hP_prime.comap _ - change (Ideal.comap U.subtype P).height ≤ ↑(1 : ℕ) - rw [Ideal.height_le_iff] - intro q hq_prime hq_lt - suffices q = ⊥ by rw [this, Ideal.height_bot] - norm_cast - by_contra hq_ne - obtain ⟨s, hs_q, hs_ne⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hq_ne - obtain ⟨x, hx_P, hx_nq⟩ := Set.exists_of_ssubset hq_lt - obtain ⟨αs, hαs⟩ := hU_mem s - obtain ⟨αx, hαx⟩ := hU_mem x - set γ := max αs αx - set inclγ := Subring.inclusion (hU_le γ) - have : (Ideal.comap inclγ q).IsPrime := hq_prime.comap _ - set s' : (chain.ring γ).carrier := ⟨(s : T), chain.mono (le_max_left ..) hαs⟩ - have hs'_ne : s' ≠ 0 := fun h => hs_ne (Subtype.ext (congrArg - (fun (x : (chain.ring γ).carrier) => (x : T)) h)) - have hs'_q : s' ∈ Ideal.comap inclγ q := - show inclγ s' ∈ q from (show inclγ s' = s from Subtype.ext rfl) ▸ hs_q - have hq'_ne : Ideal.comap inclγ q ≠ ⊥ := fun h => by - rw [h] at hs'_q - exact hs'_ne (Ideal.mem_bot.mp hs'_q) - set x' : (chain.ring γ).carrier := - ⟨(x : T), chain.mono (le_max_right ..) hαx⟩ - have hx'_nq : x' ∉ Ideal.comap inclγ q := fun h => by - have h' : inclγ x' ∈ q := h - rw [show inclγ x' = x from Subtype.ext rfl] at h' - exact hx_nq h' - have hq'_lt : Ideal.comap inclγ q < - Ideal.comap (chain.ring γ).carrier.subtype P := - lt_of_le_of_ne - (fun r hr => (hq_lt.le (show inclγ r ∈ q from hr) : (inclγ r : T) ∈ P)) - (fun h => hx'_nq (h ▸ (hx_P : (x : T) ∈ P))) - have : (Ideal.comap (chain.ring γ).carrier.subtype P).IsPrime := - hP_prime.comap _ - have hq'_ht := (Ideal.height_le_iff (n := 1)).mp - ((chain.ring γ).height_bound t ht P hP) _ inferInstance hq'_lt - have : IsDomain (chain.ring γ).carrier := inferInstance - exact absurd ((Ideal.height_le_iff (n := 0)).mp (by - lift (Ideal.comap inclγ q).height to ℕ using ne_top_of_lt hq'_ht with n hn - simp only [Nat.cast_lt] at hq'_ht - simp only [Nat.cast_le] - omega - ) ⊥ Ideal.isPrime_bot (bot_lt_iff_ne_bot.mpr hq'_ne)) not_lt_bot - let A : NSubring T := - { carrier := U - isUFD := transfinite_union_isUFD chain U hU_le hU_mem - isLocalRing := hU_local - card_le := hU_card_le - maximal_ideal_eq := hU_maximal - height_bound := hU_height } + let A : NSubring T := chain.unionNSubring hU_card_le refine ⟨chain, A, chain.le_union, fun x => chain.mem_union_iff.mp x.2, ?_, ?_, ?_⟩ · intro α I hI c hc exact (data α).2.2.2.2.1 I hI c hc diff --git a/LeanPool/AndersonConjecture/Jensen/Defs.lean b/LeanPool/AndersonConjecture/Jensen/Defs.lean index 38124d2ffb..c0eaa250e1 100644 --- a/LeanPool/AndersonConjecture/Jensen/Defs.lean +++ b/LeanPool/AndersonConjecture/Jensen/Defs.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import Mathlib.Algebra.Lie.OfAssociative -import Mathlib.RingTheory.AdicCompletion.Algebra -import Mathlib.RingTheory.LocalRing.MaximalIdeal.Defs +module + +public import Mathlib.RingTheory.AdicCompletion.Algebra +public import Mathlib.RingTheory.LocalRing.MaximalIdeal.Defs +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! # Trivial Generic Formal Fiber @@ -16,6 +18,8 @@ zero. This is the key condition in Jensen's construction of UFDs with prescribed completions. -/ +@[expose] public section + /-- A local ring `R` has **trivial generic formal fiber** if every prime ideal of its `M`-adic completion that contracts to `0` in `R` is itself `0`. (This is the relevant condition for Noetherian local domains.) -/ diff --git a/LeanPool/AndersonConjecture/Jensen/Jensen.lean b/LeanPool/AndersonConjecture/Jensen/Jensen.lean index 3db4c84e19..ba4082c97d 100644 --- a/LeanPool/AndersonConjecture/Jensen/Jensen.lean +++ b/LeanPool/AndersonConjecture/Jensen/Jensen.lean @@ -3,9 +3,20 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.CompleteDomain.LocalRing +public import LeanPool.AndersonConjecture.Jensen.Defs +public import Mathlib.RingTheory.Regular.RegularSequence import LeanPool.AndersonConjecture.CompleteDomain.CompleteDomain import LeanPool.AndersonConjecture.Jensen.Construction.Construction +import LeanPool.AndersonConjecture.Jensen.Construction.HeitmannProp import Mathlib.Algebra.CharP.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Cardinality +import Mathlib.Analysis.Complex.Order +import Mathlib.RingTheory.Ideal.KrullsHeightTheorem +import Mathlib.RingTheory.PicardGroup /-! # Jensen's Theorem on Completions of UFDs @@ -15,6 +26,8 @@ constructs a local UFD A whose adic completion is T and whose generic formal fiber is trivial (Jensen, 2006, Corollary 2.4). -/ +@[expose] public section + noncomputable section /- @@ -190,73 +203,45 @@ noncomputable def divR' (f : MvPowerSeries (Fin 3) ℂ) : open MvPowerSeries in lemma coeff_lhs' (f : MvPowerSeries (Fin 3) ℂ) (d : Fin 3 →₀ ℕ) : coeff d (f - X 1 * shiftX1' f) = if d 1 = 0 then coeff d f else 0 := by - simp only [map_sub] - rw [show (X (1 : Fin 3) : MvPowerSeries (Fin 3) ℂ) = - MvPowerSeries.monomial (R := ℂ) (Finsupp.single 1 1) 1 from rfl] - rw [MvPowerSeries.coeff_monomial_mul] - by_cases hle : Finsupp.single (1 : Fin 3) 1 ≤ d - · have hd1 : d 1 ≠ 0 := by - have := hle 1 - simp [Finsupp.single_eq_same] at this - omega - simp only [hle, ite_true, one_mul, hd1, ite_false, sub_eq_zero] - change f d = shiftX1' f (d - Finsupp.single 1 1) - simp only [shiftX1'] - show f d = f (d - Finsupp.single 1 1 + Finsupp.single 1 1) - rw [tsub_add_cancel_of_le hle] - · have hd1 : d 1 = 0 := by - by_contra h - apply hle - intro i - simp only [Finsupp.single_apply] - by_cases hi : i = 1 - · subst hi - simp - omega - · simp [show (1 : Fin 3) ≠ i from fun h => hi h.symm] - simp [hle, hd1] + rw [map_sub, show (X (1 : Fin 3) : MvPowerSeries (Fin 3) ℂ) = + MvPowerSeries.monomial (Finsupp.single 1 1) 1 from rfl, + MvPowerSeries.coeff_monomial_mul] + simp only [Finsupp.single_le_iff] + by_cases hd1 : 1 ≤ d 1 + · rw [ite_eq_left hd1, one_mul, ite_eq_right (Nat.ne_of_gt hd1)] + change f d - f (d - Finsupp.single 1 1 + Finsupp.single 1 1) = 0 + rw [tsub_add_cancel_of_le (Finsupp.single_le_iff.mpr hd1), sub_self] + · have hzero : d 1 = 0 := Nat.eq_zero_of_not_pos hd1 + rw [ite_eq_right hd1, sub_zero, ite_eq_left hzero] open MvPowerSeries in lemma coeff_rhs' (f : MvPowerSeries (Fin 3) ℂ) (d : Fin 3 →₀ ℕ) : coeff d (X (0 : Fin 3) ^ 2 * divR' f) = if 2 ≤ d 0 ∧ d 1 = 0 then coeff d f else 0 := by - rw [show (X (0 : Fin 3) : MvPowerSeries (Fin 3) ℂ) ^ 2 = - MvPowerSeries.monomial (R := ℂ) (Finsupp.single 0 2) 1 from - MvPowerSeries.X_pow_eq 0 2] - rw [MvPowerSeries.coeff_monomial_mul] - by_cases hle : Finsupp.single (0 : Fin 3) 2 ≤ d - · have hd0 : 2 ≤ d 0 := by - have := hle 0 - simp only [Finsupp.single_eq_same] at this - exact this - simp only [hle, ite_true, one_mul] + rw [MvPowerSeries.X_pow_eq, MvPowerSeries.coeff_monomial_mul] + simp only [Finsupp.single_le_iff] + by_cases hd0 : 2 ≤ d 0 + · rw [ite_eq_left hd0, one_mul] + change (if (d - Finsupp.single 0 2 : Fin 3 →₀ ℕ) 1 = 0 then + f (Finsupp.update (d - Finsupp.single 0 2 : Fin 3 →₀ ℕ) 0 + ((d - Finsupp.single 0 2 : Fin 3 →₀ ℕ) 0 + 2)) + else 0) = _ + have hsub1 : (d - Finsupp.single (0 : Fin 3) 2 : Fin 3 →₀ ℕ) 1 = d 1 := by + simp only [Finsupp.tsub_apply, Finsupp.single_apply, Fin.isValue, + Fin.reduceEq, ↓reduceIte, tsub_zero] + rw [hsub1] by_cases hd1 : d 1 = 0 - · simp only [hd0, hd1, true_and, ite_true] - change divR' f (d - Finsupp.single 0 2) = f d - unfold divR' - set d' := (d - Finsupp.single (0 : Fin 3) 2 : Fin 3 →₀ ℕ) with hd'_def - have hsub1 : d' 1 = 0 := by simp [hd'_def, Finsupp.tsub_apply, hd1] - simp only [hsub1, ite_true] + · rw [ite_eq_left hd1, ite_eq_left ⟨hd0, hd1⟩, coeff_apply] congr 1 ext i - simp only [Finsupp.update_apply, hd'_def, Finsupp.tsub_apply, Finsupp.single_apply] - fin_cases i <;> simp_all - · simp only [hd1, and_false, ite_false] - change divR' f (d - Finsupp.single 0 2) = 0 - unfold divR' - set d' := (d - Finsupp.single (0 : Fin 3) 2 : Fin 3 →₀ ℕ) with hd'_def - have hsub1 : d' 1 = d 1 := by simp [hd'_def, Finsupp.tsub_apply] - simp [hsub1, hd1] - · have hd0 : ¬ (2 ≤ d 0) := by - intro h - apply hle - intro i - simp only [Finsupp.single_apply] by_cases hi : i = 0 - · subst hi - simpa only [Fin.isValue, ↓reduceIte] using h - · simp [show (0 : Fin 3) ≠ i from fun h => hi h.symm] - simp [hle, hd0] + · subst i + simp only [Finsupp.update_apply, ↓reduceIte, Finsupp.tsub_apply, + Finsupp.single_eq_same, Nat.sub_add_cancel hd0] + · simp only [Finsupp.update_apply, ite_eq_right hi, Finsupp.tsub_apply, + Finsupp.single_apply, ite_eq_right (Ne.symm hi), tsub_zero] + · rw [ite_eq_right hd1, ite_eq_right (not_and_of_not_right _ hd1)] + · rw [ite_eq_right hd0, ite_eq_right (not_and_of_not_left _ hd0)] open MvPowerSeries in lemma coeff_gen_zero' (a : Fin 3 →₀ ℕ) (ha0 : a 0 < 2) (ha1 : a 1 = 0) : @@ -411,153 +396,50 @@ The construction uses: See references/heitmann_1993.md Theorem 8 and references/jensen_2006.md Corollary 2.4. -/ --- Local copies of Construction.lean theorems (circular import workaround) - /-- In a local domain with depth ≥ 2, M is not an associated prime of T/rT -for any nonzero r. (Local copy of Construction.maximal_not_assoc_of_depth_ge_two.) -/ +for any nonzero r. -/ theorem maximal_not_assoc_local (hdepth : ∃ (a b : T), a ∈ IsLocalRing.maximalIdeal T ∧ b ∈ IsLocalRing.maximalIdeal T ∧ RingTheory.Sequence.IsRegular T [a, b]) (r : T) (hr : r ≠ 0) : IsLocalRing.maximalIdeal T ∉ associatedPrimes T (T ⧸ Ideal.span {r}) := by - intro hM_assoc - obtain ⟨a, b, ha_mem, hb_mem, hreg⟩ := hdepth - rw [RingTheory.Sequence.isRegular_cons_iff] at hreg - obtain ⟨ha_reg, hreg_b⟩ := hreg - rw [RingTheory.Sequence.isRegular_cons_iff] at hreg_b - obtain ⟨hb_reg_mod_a, _⟩ := hreg_b - rw [AssociatedPrimes.mem_iff, isAssociatedPrime_iff] at hM_assoc - obtain ⟨_, x, hx_ann⟩ := hM_assoc - have hx_ne : x ≠ 0 := by - intro hx0 - rw [hx0] at hx_ann - have : IsLocalRing.maximalIdeal T = ⊤ := by - rw [hx_ann] - ext t - simp - exact (IsLocalRing.maximalIdeal.isMaximal T).ne_top this - obtain ⟨x_lift, rfl⟩ := Ideal.Quotient.mk_surjective x - have hx_not_mem : x_lift ∉ Ideal.span ({r} : Set T) := by - intro h - apply hx_ne - exact (Ideal.Quotient.eq_zero_iff_mem).mpr h - have ha_in_ann : a ∈ (⊥ : Submodule T (T ⧸ Ideal.span {r})).colon - {Ideal.Quotient.mk (Ideal.span {r}) x_lift} := by - rw [← hx_ann] - exact ha_mem - have ha_mul : a * x_lift ∈ Ideal.span ({r} : Set T) := by - rw [Submodule.mem_colon] at ha_in_ann - have := ha_in_ann (Ideal.Quotient.mk _ x_lift) (Set.mem_singleton _) - rw [Submodule.mem_bot] at this - rw [← Ideal.Quotient.eq_zero_iff_mem, map_mul] - exact this - have hb_in_ann : b ∈ (⊥ : Submodule T (T ⧸ Ideal.span {r})).colon - {Ideal.Quotient.mk (Ideal.span {r}) x_lift} := by - rw [← hx_ann] - exact hb_mem - have hb_mul : b * x_lift ∈ Ideal.span ({r} : Set T) := by - rw [Submodule.mem_colon] at hb_in_ann - have := hb_in_ann (Ideal.Quotient.mk _ x_lift) (Set.mem_singleton _) - rw [Submodule.mem_bot] at this - rw [← Ideal.Quotient.eq_zero_iff_mem, map_mul] - exact this - rw [Ideal.mem_span_singleton] at ha_mul hb_mul - obtain ⟨y₁, hy₁⟩ := ha_mul - obtain ⟨y₂, hy₂⟩ := hb_mul - have h_eq : r * (b * y₁) = r * (a * y₂) := by - have h1 : b * (a * x_lift) = a * (b * x_lift) := by ring - rw [hy₁, hy₂] at h1 - calc r * (b * y₁) = b * (r * y₁) := by ring - _ = a * (r * y₂) := h1 - _ = r * (a * y₂) := by ring - have h_cancel : b * y₁ = a * y₂ := by - have h_sub : r * (b * y₁ - a * y₂) = 0 := by rw [mul_sub] - exact sub_eq_zero.mpr h_eq - exact sub_eq_zero.mp ((mul_eq_zero.mp h_sub).resolve_left hr) - have hby₁_mem : b * y₁ ∈ Ideal.span ({a} : Set T) := - Ideal.mem_span_singleton.mpr ⟨y₂, h_cancel⟩ - open Pointwise in - have hy₁_in_aT : y₁ ∈ Ideal.span ({a} : Set T) := by - have h_eq : (Ideal.span ({a} : Set T) : Submodule T T) = (a • ⊤ : Submodule T T) := by - ext x - constructor - · intro hx - rw [Ideal.mem_span_singleton] at hx - obtain ⟨c, rfl⟩ := hx - exact Submodule.smul_mem_pointwise_smul c a ⊤ Submodule.mem_top - · intro hx - have : x ∈ (a • (⊤ : Set T) : Set T) := SetLike.mem_coe.mpr hx - rw [Set.mem_smul_set] at this - obtain ⟨c, _, rfl⟩ := this - exact Ideal.mem_span_singleton.mpr ⟨c, by rw [smul_eq_mul]⟩ - have hby₁_smul : b * y₁ ∈ (a • ⊤ : Submodule T T) := h_eq ▸ hby₁_mem - have hy₁_smul : y₁ ∈ (a • ⊤ : Submodule T T) := - mem_of_isSMulRegular_quotient_of_smul_mem hb_reg_mod_a (by rwa [smul_eq_mul]) - rw [h_eq] - exact hy₁_smul - rw [Ideal.mem_span_singleton] at hy₁_in_aT - obtain ⟨z, hz⟩ := hy₁_in_aT - have h_ax : a * x_lift = a * (r * z) := by rw [hy₁, hz] - ring - have h_x_eq : x_lift = r * z := by - have := ha_reg (show a • x_lift = a • (r * z) by rwa [smul_eq_mul, smul_eq_mul]) - exact this - exact hx_not_mem (Ideal.mem_span_singleton.mpr ⟨z, h_x_eq⟩) - -/-- Heitmann's Proposition 1, Noetherian part: if R → T/M² is surjective and -IT ∩ R = I for all f.g. ideals, then R is Noetherian. -(Local copy of the first conjunct of Construction.heitmann_prop1.) -/ + exact maximal_not_assoc_of_depth_ge_two hdepth r hr + +/-- A subring of T is Noetherian if extension and contraction preserve each +finitely generated ideal. -/ theorem heitmann_prop1_noetherian (R : Subring T) (h_closed : ∀ (I : Ideal R), I.FG → ∀ (c : R), (c : T) ∈ Ideal.map R.subtype I → c ∈ I) : IsNoetherianRing R := by + classical rw [isNoetherianRing_iff_ideal_fg] intro I - have hIT_fg : (Ideal.map R.subtype I).FG := IsNoetherian.noetherian _ - have hIT_eq : Ideal.map R.subtype I = Ideal.span (R.subtype '' (I : Set R)) := rfl - rw [hIT_eq] at hIT_fg - obtain ⟨s', hs'_sub, hs'_span⟩ := - (Submodule.fg_span_iff_fg_span_finset_subset (R.subtype '' (I : Set R))).mp hIT_fg - classical - have h_preimage : ∀ t ∈ (s' : Set T), ∃ (r : R), r ∈ I ∧ R.subtype r = t := by - intro t ht - exact hs'_sub ht - let f : (t : T) → t ∈ (s' : Set T) → R := fun t ht => (h_preimage t ht).choose - have hf_mem : ∀ t (ht : t ∈ (s' : Set T)), f t ht ∈ I := - fun t ht => (h_preimage t ht).choose_spec.1 - have hf_eq : ∀ t (ht : t ∈ (s' : Set T)), R.subtype (f t ht) = t := - fun t ht => (h_preimage t ht).choose_spec.2 - set gen_set : Finset R := - s'.attach.image (fun ⟨t, ht⟩ => f t (Finset.mem_coe.mpr ht)) - have hgen_sub : (gen_set : Set R) ⊆ (I : Set R) := by + obtain ⟨generators, hsubset, hspan⟩ := + (Submodule.fg_span_iff_fg_span_finset_subset (R.subtype '' (I : Set R))).mp + (show (Ideal.span (R.subtype '' (I : Set R))).FG from IsNoetherian.noetherian _) + let preimages : Finset R := generators.preimage R.subtype R.subtype_injective.injOn + have hpreimages : (preimages : Set R) = R.subtype ⁻¹' (generators : Set T) := + Finset.coe_preimage _ _ + have hpreimages_subset : (preimages : Set R) ⊆ (I : Set R) := by intro r hr - rw [Finset.mem_coe, Finset.mem_image] at hr - obtain ⟨⟨t, ht⟩, _, rfl⟩ := hr - exact hf_mem t (Finset.mem_coe.mpr ht) - have hJ_fg : (Ideal.span (gen_set : Set R)).FG := ⟨gen_set, rfl⟩ - have hJT_eq : Ideal.map R.subtype (Ideal.span (gen_set : Set R)) = + obtain ⟨r', hr', heq⟩ := hsubset (show R.subtype r ∈ (generators : Set T) from + Finset.mem_preimage.mp hr) + exact R.subtype_injective heq ▸ hr' + have himage : R.subtype '' (preimages : Set R) = (generators : Set T) := by + rw [hpreimages] + apply Set.image_preimage_eq_of_subset + rintro t ht + obtain ⟨r, _, rfl⟩ := hsubset ht + exact ⟨r, rfl⟩ + have hmap : Ideal.map R.subtype (Ideal.span (preimages : Set R)) = Ideal.map R.subtype I := by - apply le_antisymm - · rw [Ideal.map_span] - apply Ideal.span_le.mpr - intro t ht - obtain ⟨r, hr, rfl⟩ := ht - rw [hIT_eq] - exact Ideal.subset_span ⟨r, hgen_sub hr, rfl⟩ - · rw [hIT_eq, Ideal.map_span] - rw [show (Ideal.span (R.subtype '' (I : Set R)) : Ideal T) = - Ideal.span (↑s' : Set T) from by exact_mod_cast hs'_span] - apply Ideal.span_le.mpr - intro t ht - have ht' : t ∈ s' := Finset.mem_coe.mp ht - apply Ideal.subset_span - exact ⟨f t (Finset.mem_coe.mpr ht'), - Finset.mem_coe.mpr (Finset.mem_image.mpr ⟨⟨t, ht'⟩, Finset.mem_attach _ _, rfl⟩), - hf_eq t (Finset.mem_coe.mpr ht')⟩ - exact ⟨gen_set, le_antisymm (Ideal.span_le.mpr hgen_sub) (fun c hc => - h_closed _ hJ_fg c (hJT_eq ▸ Ideal.mem_map_of_mem R.subtype hc))⟩ + rw [Ideal.map_span, himage] + exact hspan.symm + refine ⟨preimages, le_antisymm (Ideal.span_le.mpr hpreimages_subset) ?_⟩ + intro c hc + exact h_closed _ ⟨preimages, rfl⟩ c (hmap ▸ Ideal.mem_map_of_mem R.subtype hc) lemma jensen_map_maxIdeal_le_of_closed (R : Subring T) [IsLocalRing ↥R] diff --git a/LeanPool/AndersonConjecture/Jensen/KrullDomain.lean b/LeanPool/AndersonConjecture/Jensen/KrullDomain.lean index e640a521c2..b01414e457 100644 --- a/LeanPool/AndersonConjecture/Jensen/KrullDomain.lean +++ b/LeanPool/AndersonConjecture/Jensen/KrullDomain.lean @@ -3,14 +3,21 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module -import LeanPool.AndersonConjecture.Jensen.KrullDomain.AdjoinLocSet -import LeanPool.AndersonConjecture.Jensen.KrullDomain.HeightBound -import LeanPool.AndersonConjecture.Jensen.KrullDomain.KrullDomain -import LeanPool.AndersonConjecture.Jensen.KrullDomain.LocUFD -import LeanPool.AndersonConjecture.Jensen.KrullDomain.Nagata -import LeanPool.AndersonConjecture.Jensen.KrullDomain.Prime -import LeanPool.AndersonConjecture.Jensen.KrullDomain.UFDConstruction +public import LeanPool.AndersonConjecture.Jensen.KrullDomain.AdjoinLocSet +public import LeanPool.AndersonConjecture.Jensen.KrullDomain.HeightBound +public import LeanPool.AndersonConjecture.Jensen.KrullDomain.KrullDomain +public import LeanPool.AndersonConjecture.Jensen.KrullDomain.LocUFD +public import LeanPool.AndersonConjecture.Jensen.KrullDomain.Nagata +public import LeanPool.AndersonConjecture.Jensen.KrullDomain.Prime +public import LeanPool.AndersonConjecture.Jensen.KrullDomain.UFDConstruction +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Krull Domain Intersections for the Two-Generator Coprime Case @@ -18,3 +25,5 @@ import LeanPool.AndersonConjecture.Jensen.KrullDomain.UFDConstruction Index file for the `LeanPool.AndersonConjecture.Jensen.KrullDomain` directory: Krull domain intersection for the two-generator coprime case. -/ + +@[expose] public section diff --git a/LeanPool/AndersonConjecture/Jensen/KrullDomain/AdjoinLocSet.lean b/LeanPool/AndersonConjecture/Jensen/KrullDomain/AdjoinLocSet.lean index a8fdc8b8d0..0b959bc030 100644 --- a/LeanPool/AndersonConjecture/Jensen/KrullDomain/AdjoinLocSet.lean +++ b/LeanPool/AndersonConjecture/Jensen/KrullDomain/AdjoinLocSet.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.AndersonConjecture.Jensen.NSubring +module + +public import LeanPool.AndersonConjecture.Jensen.NSubring +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Intersection subring definitions @@ -13,6 +21,8 @@ local domain T and their intersection, used in the Krull domain construction of Anderson--Jensen. -/ +@[expose] public section + noncomputable section open Cardinal Ideal Polynomial Set Pointwise diff --git a/LeanPool/AndersonConjecture/Jensen/KrullDomain/HeightBound.lean b/LeanPool/AndersonConjecture/Jensen/KrullDomain/HeightBound.lean index 0c3b832472..2f92aa192d 100644 --- a/LeanPool/AndersonConjecture/Jensen/KrullDomain/HeightBound.lean +++ b/LeanPool/AndersonConjecture/Jensen/KrullDomain/HeightBound.lean @@ -3,10 +3,22 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import Mathlib.RingTheory.AdicCompletion.Basic + +public import LeanPool.AndersonConjecture.Jensen.KrullDomain.AdjoinLocSet +import LeanPool.AndersonConjecture.Jensen.KrullDomain.Prime import LeanPool.AndersonConjecture.Jensen.KrullDomain.UFDConstruction import Mathlib.Algebra.Polynomial.Cardinal +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient import Mathlib.RingTheory.DedekindDomain.Ideal.Lemmas import Mathlib.RingTheory.SimpleRing.Principal +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Krull domain intersection construction @@ -18,12 +30,43 @@ at most one in T, using well-founded descent on heights and the mod-principal transcendence argument. -/ +@[expose] public section + noncomputable section open Cardinal Ideal Polynomial Set Pointwise variable {T : Type*} [CommRing T] [IsLocalRing T] [IsNoetherianRing T] [IsDomain T] +private def adjoinLocalizationSubring (R : NSubring T) (x : T) (y : R.carrier) : + Subring T where + carrier := adjoinLocSetY R x y + zero_mem' := ⟨0, 0, by simp⟩ + one_mem' := ⟨C 1, 0, by simp⟩ + neg_mem' := by + rintro t ⟨f, n, hf⟩ + exact ⟨-f, n, by rw [map_neg, ← hf, neg_mul]⟩ + mul_mem' := by + rintro t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ + exact ⟨f₁ * f₂, n₁ + n₂, by + rw [map_mul, ← hf₁, ← hf₂, pow_add] + ring⟩ + add_mem' := by + rintro t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ + refine ⟨f₁ * C (y ^ n₂) + f₂ * C (y ^ n₁), n₁ + n₂, ?_⟩ + have key : (t₁ + t₂) * (↑y : T) ^ (n₁ + n₂) = + t₁ * (↑y : T) ^ n₁ * (↑y : T) ^ n₂ + + t₂ * (↑y : T) ^ n₂ * (↑y : T) ^ n₁ := by + rw [pow_add] + ring + rw [key, hf₁, hf₂, map_add, map_mul, map_mul, aeval_C, aeval_C] + simp only [show algebraMap R.carrier T = R.carrier.subtype from rfl, + Subring.coe_subtype, map_pow] + +private def intersectionLocalizationSubring + (R : NSubring T) (x₁ x₂ : T) (y₁ y₂ : R.carrier) : Subring T := + adjoinLocalizationSubring R x₁ y₂ ⊓ adjoinLocalizationSubring R x₂ y₁ + /- Derive mod-principal transcendence from the stronger mod-P version. If for every associated prime P of T/(p) with y ∉ P, the polynomial evaluation aeval x f ∈ P implies C(p) | f, then aeval x f ∈ span{p} @@ -323,38 +366,11 @@ private def build_height_bound_proof b ∉ IsLocalRing.maximalIdeal T ∧ t * b = a} have hS_sub_eq' : (S_sub : Set T) = S_carrier := hS_sub_eq have hRbar_one : (1 : T) ∈ Rbar := - ⟨⟨C 1, 0, by simp⟩, ⟨C 1, 0, by simp⟩⟩ - have hRbar_add : ∀ t₁ t₂, t₁ ∈ Rbar → t₂ ∈ Rbar → t₁ + t₂ ∈ Rbar := by - intro t₁ t₂ ⟨h₁₁, h₁₂⟩ ⟨h₂₁, h₂₂⟩ - constructor - · obtain ⟨f₁, n₁, hf₁⟩ := h₁₁ - obtain ⟨f₂, n₂, hf₂⟩ := h₂₁ - refine ⟨f₁ * C (y₂ ^ n₂) + f₂ * C (y₂ ^ n₁), n₁ + n₂, ?_⟩ - have key : (t₁ + t₂) * (↑y₂ : T) ^ (n₁ + n₂) = - t₁ * (↑y₂ : T) ^ n₁ * (↑y₂ : T) ^ n₂ + - t₂ * (↑y₂ : T) ^ n₂ * (↑y₂ : T) ^ n₁ := by rw [pow_add] - ring - rw [key, hf₁, hf₂, map_add, map_mul, map_mul, aeval_C, aeval_C] - simp only [show algebraMap R.carrier T = R.carrier.subtype from rfl, - Subring.coe_subtype, map_pow] - · obtain ⟨f₁, n₁, hf₁⟩ := h₁₂ - obtain ⟨f₂, n₂, hf₂⟩ := h₂₂ - refine ⟨f₁ * C (y₁ ^ n₂) + f₂ * C (y₁ ^ n₁), n₁ + n₂, ?_⟩ - have key : (t₁ + t₂) * (↑y₁ : T) ^ (n₁ + n₂) = - t₁ * (↑y₁ : T) ^ n₁ * (↑y₁ : T) ^ n₂ + - t₂ * (↑y₁ : T) ^ n₂ * (↑y₁ : T) ^ n₁ := by rw [pow_add] - ring - rw [key, hf₁, hf₂, map_add, map_mul, map_mul, aeval_C, aeval_C] - simp only [show algebraMap R.carrier T = R.carrier.subtype from rfl, - Subring.coe_subtype, map_pow] + (intersectionLocalizationSubring R x₁ x₂ y₁ y₂).one_mem + have hRbar_add : ∀ t₁ t₂, t₁ ∈ Rbar → t₂ ∈ Rbar → t₁ + t₂ ∈ Rbar := + fun _ _ => (intersectionLocalizationSubring R x₁ x₂ y₁ y₂).add_mem have hRbar_mul : ∀ t₁ t₂, t₁ ∈ Rbar → t₂ ∈ Rbar → t₁ * t₂ ∈ Rbar := - fun t₁ t₂ ⟨h₁₁, h₁₂⟩ ⟨h₂₁, h₂₂⟩ => - ⟨(fun x' y' t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ => - ⟨f₁ * f₂, n₁ + n₂, by rw [map_mul, ← hf₁, ← hf₂, pow_add] - ring⟩) x₁ y₂ t₁ t₂ h₁₁ h₂₁, - (fun x' y' t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ => - ⟨f₁ * f₂, n₁ + n₂, by rw [map_mul, ← hf₁, ← hf₂, pow_add] - ring⟩) x₂ y₁ t₁ t₂ h₁₂ h₂₂⟩ + fun _ _ => (intersectionLocalizationSubring R x₁ x₂ y₁ y₂).mul_mem have hS_mem_rep : ∀ s : S_sub, ∃ (a b : T), a ∈ Rbar ∧ b ∈ Rbar ∧ b ∉ IsLocalRing.maximalIdeal T ∧ (s : T) * b = a := by @@ -676,44 +692,16 @@ private def build_intersection_nsubring_proof set S_carrier : Set T := {t : T | ∃ (a : T) (b : T), a ∈ Rbar ∧ b ∈ Rbar ∧ b ∉ IsLocalRing.maximalIdeal T ∧ t * b = a} - have hALS_zero : ∀ (x' : T) (y' : R.carrier), (0 : T) ∈ adjoinLocSetY R x' y' := - fun x' y' => ⟨0, 0, by simp⟩ - have hALS_one : ∀ (x' : T) (y' : R.carrier), (1 : T) ∈ adjoinLocSetY R x' y' := - fun x' y' => ⟨C 1, 0, by simp⟩ - have hALS_neg : ∀ (x' : T) (y' : R.carrier) (t : T), - t ∈ adjoinLocSetY R x' y' → -t ∈ adjoinLocSetY R x' y' := by - intro x' y' t ⟨f, n, hf⟩ - exact ⟨-f, n, by rw [map_neg, ← hf, neg_mul]⟩ - have hALS_mul : ∀ (x' : T) (y' : R.carrier) (t₁ t₂ : T), - t₁ ∈ adjoinLocSetY R x' y' → t₂ ∈ adjoinLocSetY R x' y' → - t₁ * t₂ ∈ adjoinLocSetY R x' y' := by - intro x' y' t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ - exact ⟨f₁ * f₂, n₁ + n₂, by - rw [map_mul, ← hf₁, ← hf₂, pow_add] - ring⟩ - have hALS_add : ∀ (x' : T) (y' : R.carrier) (t₁ t₂ : T), - t₁ ∈ adjoinLocSetY R x' y' → t₂ ∈ adjoinLocSetY R x' y' → - t₁ + t₂ ∈ adjoinLocSetY R x' y' := by - intro x' y' t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ - refine ⟨f₁ * C (y' ^ n₂) + f₂ * C (y' ^ n₁), n₁ + n₂, ?_⟩ - have key : (t₁ + t₂) * (↑y' : T) ^ (n₁ + n₂) = - t₁ * (↑y' : T) ^ n₁ * (↑y' : T) ^ n₂ + - t₂ * (↑y' : T) ^ n₂ * (↑y' : T) ^ n₁ := by - rw [pow_add] - ring - rw [key, hf₁, hf₂, map_add, map_mul, map_mul, aeval_C, aeval_C] - simp only [show algebraMap R.carrier T = R.carrier.subtype from rfl, - Subring.coe_subtype, map_pow] - have hRbar_zero : (0 : T) ∈ Rbar := ⟨hALS_zero x₁ y₂, hALS_zero x₂ y₁⟩ - have hRbar_one : (1 : T) ∈ Rbar := ⟨hALS_one x₁ y₂, hALS_one x₂ y₁⟩ + have hRbar_zero : (0 : T) ∈ Rbar := + (intersectionLocalizationSubring R x₁ x₂ y₁ y₂).zero_mem + have hRbar_one : (1 : T) ∈ Rbar := + (intersectionLocalizationSubring R x₁ x₂ y₁ y₂).one_mem have hRbar_neg : ∀ t, t ∈ Rbar → -t ∈ Rbar := - fun t ⟨h₁, h₂⟩ => ⟨hALS_neg x₁ y₂ t h₁, hALS_neg x₂ y₁ t h₂⟩ + fun _ => (intersectionLocalizationSubring R x₁ x₂ y₁ y₂).neg_mem have hRbar_mul : ∀ t₁ t₂, t₁ ∈ Rbar → t₂ ∈ Rbar → t₁ * t₂ ∈ Rbar := - fun t₁ t₂ ⟨h₁₁, h₁₂⟩ ⟨h₂₁, h₂₂⟩ => - ⟨hALS_mul x₁ y₂ t₁ t₂ h₁₁ h₂₁, hALS_mul x₂ y₁ t₁ t₂ h₁₂ h₂₂⟩ + fun _ _ => (intersectionLocalizationSubring R x₁ x₂ y₁ y₂).mul_mem have hRbar_add : ∀ t₁ t₂, t₁ ∈ Rbar → t₂ ∈ Rbar → t₁ + t₂ ∈ Rbar := - fun t₁ t₂ ⟨h₁₁, h₁₂⟩ ⟨h₂₁, h₂₂⟩ => - ⟨hALS_add x₁ y₂ t₁ t₂ h₁₁ h₂₁, hALS_add x₂ y₁ t₁ t₂ h₁₂ h₂₂⟩ + fun _ _ => (intersectionLocalizationSubring R x₁ x₂ y₁ y₂).add_mem -- Verify S_carrier is closed under ring operations, hence forms a subring of T have hS_carrier_subring : ∃ S_sub : Subring T, (S_sub : Set T) = S_carrier := by refine ⟨{ diff --git a/LeanPool/AndersonConjecture/Jensen/KrullDomain/KrullDomain.lean b/LeanPool/AndersonConjecture/Jensen/KrullDomain/KrullDomain.lean index 6ea5c5e569..bb9f076793 100644 --- a/LeanPool/AndersonConjecture/Jensen/KrullDomain/KrullDomain.lean +++ b/LeanPool/AndersonConjecture/Jensen/KrullDomain/KrullDomain.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.Jensen.NSubring +public import Mathlib.RingTheory.AdicCompletion.Basic import LeanPool.AndersonConjecture.Jensen.Avoidance import LeanPool.AndersonConjecture.Jensen.KrullDomain.HeightBound +import Mathlib.Algebra.Polynomial.Cardinal +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations import Mathlib.Data.Finsupp.Encodable import Mathlib.RingTheory.Ideal.AssociatedPrime.Localization +import Mathlib.RingTheory.PicardGroup +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Krull Domain Intersection for Two-Generator Close-Up @@ -16,6 +26,8 @@ construct an A-extension S with c ∈ (y₁,y₂)S via the intersection Rbar = R[x₁, y₂⁻¹] ∩ R[x₂, y₁⁻¹] where c = x₁y₁ + x₂y₂. -/ +@[expose] public section + noncomputable section open Cardinal Ideal Polynomial Set Pointwise @@ -47,7 +59,7 @@ include T in private theorem ker_pf_span_eq have hp_Q : (↑p : T) ∈ Q := hQ_le (Ideal.mem_span_singleton_self _) have hQ_ne_bot : Q ≠ ⊥ := by intro h - simp_all + exact hp_ne (by simpa only [h, Ideal.mem_bot] using hp_Q) have hQ_ht_le : Q.height ≤ 1 := le_trans (Ideal.height_mono hQ_le_P) hP_ht have hQ_fin : Q.FiniteHeight := ⟨Or.inr (by exact ne_top_of_le_ne_top (by norm_cast) hQ_ht_le)⟩ @@ -83,7 +95,8 @@ include T in private theorem ker_pf_span_eq ⟨Or.inr (by simp [Ideal.height_bot])⟩ have h0 := @Ideal.height_strict_mono_of_isPrime R.carrier _ (⊥ : Ideal R.carrier) (Ideal.span {p}) Ideal.isPrime_bot hbot_lt hbot_fin - simp_all + rw [Ideal.height_bot, Order.lt_one_iff.mp hspan_ht] at h0 + exact lt_irrefl _ h0 omit [IsAdicComplete (IsLocalRing.maximalIdeal T) T] in /-- Helper for `intersection_close_up`: kernel proof for x₁ = t₁ + u·y₂. @@ -117,7 +130,7 @@ private def intersection_close_up_proof_ker_pf₁ have hp_ne : (↑p : T) ≠ 0 := fun h => hp.ne_zero (R.carrier.subtype_injective h) have hP_ne_bot : P ≠ ⊥ := by intro h - simp_all + exact hp_ne (by simpa only [h, Ideal.mem_bot] using hp_P) obtain ⟨hP_ass, hspan_eq⟩ := ker_pf_span_eq R P hP_prime hP_ht p hp hp_P hp_ne have hP_C : P ∈ C_ext := hC_ext_mem p hp_ne P hP_ass -- fbar ≠ 0 in (T/P)[X]: if fbar = 0 then all coefficients lie in P ∩ R = (p), so p | f @@ -128,7 +141,7 @@ private def intersection_close_up_proof_ker_pf₁ intro n have h_coeff : Polynomial.coeff (Polynomial.map ((Ideal.Quotient.mk P).comp R.carrier.subtype) f) n = 0 := by - simp_all + simp only [h_eq, Polynomial.coeff_zero] rw [Polynomial.coeff_map] at h_coeff have h_in_P : (↑(f.coeff n) : T) ∈ P := by rw [← Ideal.Quotient.eq_zero_iff_mem] @@ -163,9 +176,7 @@ private def intersection_close_up_proof_ker_pf₁ (Polynomial.map ((Ideal.Quotient.mk P).comp R.carrier.subtype) f).eval (Ideal.Quotient.mk P t₁ + v * Ideal.Quotient.mk P (↑y₂ : T)) = 0} := by simpa only [Set.mem_ofPred_eq] using heval_zero - have hf_ne : f ≠ 0 := by - intro h - simp_all + have hf_ne : f ≠ 0 := fun h => h_ndvd (h.symm ▸ dvd_zero _) have hr₀_D : r₀ ∈ D_ext := hD_ext_invFun f hf_ne P hP_C hP_ne_bot hmap_ne hy₂_ne_P v₀ hv₀_root -- u ≡ r₀ mod P, so u ∈ P + {r₀}, contradicting the avoidance hypothesis @@ -239,7 +250,7 @@ include T in theorem intersection_close_up_ker_pf₂ have hp_ne : (↑p : T) ≠ 0 := fun h => hp.ne_zero (R.carrier.subtype_injective h) have hP_ne_bot : P ≠ ⊥ := by intro h - simp_all + exact hp_ne (by simpa only [h, Ideal.mem_bot] using hp_P) obtain ⟨hP_ass, hspan_eq⟩ := ker_pf_span_eq R P hP_prime hP_ht p hp hp_P hp_ne have hP_C : P ∈ C_ext := hC_ext_mem p hp_ne P hP_ass -- fbar ≠ 0 mod P since p ∤ f and (p)R = P ∩ R @@ -250,7 +261,7 @@ include T in theorem intersection_close_up_ker_pf₂ intro n have h_coeff : Polynomial.coeff (Polynomial.map ((Ideal.Quotient.mk P).comp R.carrier.subtype) f) n = 0 := by - simp_all + simp only [h_eq, Polynomial.coeff_zero] rw [Polynomial.coeff_map] at h_coeff have h_in_P : (↑(f.coeff n) : T) ∈ P := by rw [← Ideal.Quotient.eq_zero_iff_mem] @@ -285,9 +296,7 @@ include T in theorem intersection_close_up_ker_pf₂ (Polynomial.map ((Ideal.Quotient.mk P).comp R.carrier.subtype) f).eval (Ideal.Quotient.mk P t₂ - v * Ideal.Quotient.mk P (↑y₁ : T)) = 0} := by simpa only [Set.mem_ofPred_eq] using heval_zero - have hf_ne : f ≠ 0 := by - intro h - simp_all + have hf_ne : f ≠ 0 := fun h => h_ndvd (h.symm ▸ dvd_zero _) have hr₀_D : r₀ ∈ D_ext := hD_ext_invFun f hf_ne P hP_C hP_ne_bot hmap_ne hy₁_ne_P v₀ hv₀_root have hu_r₀_P : u - r₀ ∈ (P : Set T) := by @@ -326,7 +335,7 @@ private def intersection_close_up_proof (t₂ - u * (↑y₁ : T)) * (↑y₂ : T) := by intro u have hceq : (↑c : T) = t₁ * (↑y₁ : T) + t₂ * (↑y₂ : T) := by - simp_all + simpa only [smul_eq_mul] using hc_eq.symm rw [hceq] ring -- It suffices to find x₁, x₂ transcendental over R with c = x₁·y₁ + x₂·y₂ @@ -369,7 +378,7 @@ private def intersection_close_up_proof intro f hf have h_inj : Function.Injective fun (u : T) => t₂ - u * (↑y₁ : T) := by intro u₁ u₂ h - simp_all + exact mul_right_cancel₀ hy₁ (sub_right_inj.mp h) have hmap_ne : Polynomial.map R.carrier.subtype f ≠ 0 := by rw [Ne, ← Polynomial.map_zero R.carrier.subtype] exact (Polynomial.map_injective R.carrier.subtype Subtype.val_injective).ne hf @@ -400,7 +409,9 @@ private def intersection_close_up_proof intro P hP hPM rcases hP with rfl | hP · exact hM_ne_bot hPM.symm - · simp_all + · obtain ⟨r, hr⟩ := Set.mem_iUnion.mp hP + obtain ⟨hr_ne, hP_assoc⟩ := Set.mem_iUnion.mp hr + exact hM_not_assoc r hr_ne (hPM ▸ hP_assoc) -- D_mod₁ = lifts of roots of fbar mod P for each P ∈ C_ext (values u must avoid modulo P) set D_mod₁ : Set T := ⋃ (f : Polynomial R.carrier) (_ : f ≠ 0) (P : Ideal T) (_ : P ∈ C_ext) (_ : P ≠ ⊥) @@ -431,7 +442,7 @@ private def intersection_close_up_proof have h_inj : Function.Injective fun (v : T ⧸ P) => Ideal.Quotient.mk P t₁ + v * Ideal.Quotient.mk P (↑y₂ : T) := by intro v₁ v₂ h - simp_all + exact mul_right_cancel₀ hy₂_ne (add_left_cancel h) apply Set.Finite.image exact (Polynomial.finite_setOfPred_isRoot hmap_ne).preimage (Set.InjOn.mono (Set.subset_univ _) h_inj.injOn) @@ -448,7 +459,7 @@ private def intersection_close_up_proof have h_inj : Function.Injective fun (v : T ⧸ P) => Ideal.Quotient.mk P t₂ - v * Ideal.Quotient.mk P (↑y₁ : T) := by intro v₁ v₂ h - simp_all + exact mul_right_cancel₀ hy₁_ne (sub_right_inj.mp h) apply Set.Finite.image exact (Polynomial.finite_setOfPred_isRoot hmap_ne).preimage (Set.InjOn.mono (Set.subset_univ _) h_inj.injOn) @@ -681,7 +692,7 @@ private def intersection_close_up_proof _ ≤ Cardinal.mk R.carrier * Cardinal.mk R.carrier := by gcongr - · simp_all + · exact Polynomial.cardinalMk_le_max.trans (max_le le_rfl hR_inf) · apply ciSup_le' intro f by_cases hf : f = 0 diff --git a/LeanPool/AndersonConjecture/Jensen/KrullDomain/LocUFD.lean b/LeanPool/AndersonConjecture/Jensen/KrullDomain/LocUFD.lean index 0b5e8b7e30..30566547a3 100644 --- a/LeanPool/AndersonConjecture/Jensen/KrullDomain/LocUFD.lean +++ b/LeanPool/AndersonConjecture/Jensen/KrullDomain/LocUFD.lean @@ -3,6 +3,11 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import Mathlib.GroupTheory.MonoidLocalization.Away +public import Mathlib.RingTheory.Localization.Defs +public import Mathlib.RingTheory.UniqueFactorizationDomain.Defs import Mathlib.RingTheory.Localization.Ideal import Mathlib.RingTheory.UniqueFactorizationDomain.Basic @@ -16,6 +21,8 @@ the remaining irreducibles stay prime. -/ +@[expose] public section + noncomputable section open Cardinal Ideal Set Pointwise diff --git a/LeanPool/AndersonConjecture/Jensen/KrullDomain/Nagata.lean b/LeanPool/AndersonConjecture/Jensen/KrullDomain/Nagata.lean index 7a6bfa292b..02732dfb01 100644 --- a/LeanPool/AndersonConjecture/Jensen/KrullDomain/Nagata.lean +++ b/LeanPool/AndersonConjecture/Jensen/KrullDomain/Nagata.lean @@ -3,6 +3,12 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import Mathlib.GroupTheory.MonoidLocalization.Away +public import Mathlib.GroupTheory.MonoidLocalization.MonoidWithZero +public import Mathlib.RingTheory.OreLocalization.Ring +public import Mathlib.RingTheory.UniqueFactorizationDomain.Defs import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Localization.Ideal import Mathlib.RingTheory.UniqueFactorizationDomain.Kaplansky @@ -17,6 +23,8 @@ prime ideal of R contains a prime element, obtained by lifting a prime from the localisation and cancelling powers of p. -/ +@[expose] public section + noncomputable section open Cardinal Ideal Set Pointwise diff --git a/LeanPool/AndersonConjecture/Jensen/KrullDomain/Prime.lean b/LeanPool/AndersonConjecture/Jensen/KrullDomain/Prime.lean index 6db630bb25..bd894a0fd4 100644 --- a/LeanPool/AndersonConjecture/Jensen/KrullDomain/Prime.lean +++ b/LeanPool/AndersonConjecture/Jensen/KrullDomain/Prime.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.AndersonConjecture.Jensen.KrullDomain.AdjoinLocSet +module + +public import LeanPool.AndersonConjecture.Jensen.KrullDomain.AdjoinLocSet +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations import Mathlib.RingTheory.Regular.IsSMulRegular +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Primality in R[x, y^{-1}] and coprime height bound @@ -16,6 +23,8 @@ prime of T contracting to a nonzero ideal of R can contain both y_1 and y_2. -/ +@[expose] public section + noncomputable section open Cardinal Ideal Polynomial Set Pointwise diff --git a/LeanPool/AndersonConjecture/Jensen/KrullDomain/UFDConstruction.lean b/LeanPool/AndersonConjecture/Jensen/KrullDomain/UFDConstruction.lean index 53ac3532a6..38643cc882 100644 --- a/LeanPool/AndersonConjecture/Jensen/KrullDomain/UFDConstruction.lean +++ b/LeanPool/AndersonConjecture/Jensen/KrullDomain/UFDConstruction.lean @@ -3,10 +3,21 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import Mathlib.RingTheory.AdicCompletion.Basic + +public import LeanPool.AndersonConjecture.Jensen.KrullDomain.AdjoinLocSet import LeanPool.AndersonConjecture.Jensen.KrullDomain.LocUFD import LeanPool.AndersonConjecture.Jensen.KrullDomain.Nagata import LeanPool.AndersonConjecture.Jensen.KrullDomain.Prime -import Mathlib.Order.BourbakiWitt +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.RingTheory.UniqueFactorizationDomain.Kaplansky +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Krull domain construction: UFD proof @@ -19,6 +30,8 @@ Nagata's criterion then gives that S itself is a UFD. -/ +@[expose] public section + noncomputable section open Cardinal Ideal Polynomial Set Pointwise @@ -60,22 +73,14 @@ include T in theorem build_R_prime_in_S have hS_sub_eq' : (S_sub : Set T) = S_carrier := hS_sub_eq have hunit : ∀ (a : T), a ∉ IsLocalRing.maximalIdeal T → IsUnit a := fun a ha => IsLocalRing.notMem_maximalIdeal.mp ha - have hRbar_one : (1 : T) ∈ Rbar := - ⟨⟨C 1, 0, by simp⟩, ⟨C 1, 0, by simp⟩⟩ have hRbar_mul : ∀ t₁ t₂, t₁ ∈ Rbar → t₂ ∈ Rbar → t₁ * t₂ ∈ Rbar := fun t₁ t₂ ⟨h₁₁, h₁₂⟩ ⟨h₂₁, h₂₂⟩ => ⟨(fun x' y' t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ => ⟨f₁ * f₂, n₁ + n₂, by rw [map_mul, ← hf₁, ← hf₂, pow_add] - ring⟩) x₁ y₂ t₁ t₂ h₁₁ h₂₁, + exact mul_mul_mul_comm _ _ _ _⟩) x₁ y₂ t₁ t₂ h₁₁ h₂₁, (fun x' y' t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ => ⟨f₁ * f₂, n₁ + n₂, by rw [map_mul, ← hf₁, ← hf₂, pow_add] - ring⟩) x₂ y₁ t₁ t₂ h₁₂ h₂₂⟩ - have hALS_mul : ∀ (x' : T) (y' : R.carrier) (t₁ t₂ : T), - t₁ ∈ adjoinLocSetY R x' y' → t₂ ∈ adjoinLocSetY R x' y' → - t₁ * t₂ ∈ adjoinLocSetY R x' y' := by - intro x' y' t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ - exact ⟨f₁ * f₂, n₁ + n₂, by rw [map_mul, ← hf₁, ← hf₂, pow_add] - ring⟩ + exact mul_mul_mul_comm _ _ _ _⟩) x₂ y₁ t₁ t₂ h₁₂ h₂₂⟩ have hp_ne : (⟨(↑p : T), hR_le p.2⟩ : S_sub) ≠ 0 := by intro h exact hp.ne_zero (R.carrier.subtype_injective (congrArg Subtype.val h)) @@ -95,7 +100,6 @@ include T in theorem build_R_prime_in_S have : ab * ac = (b * bb) * (c * bc) := by rw [hb_eq, hc_eq] rw [this, show (b * bb) * (c * bc) = b * c * (bb * bc) from by ring, hbc_T, show (↑p : T) * d * (bb * bc) = (↑p : T) * (d * bb * bc) from by ring] - have hab_ac_Rbar := hRbar_mul ab ac hab_Rbar hac_Rbar have hcop := hcoprime p hp suffices h : (∃ e₁ ∈ Rbar, ab = (↑p : T) * e₁) ∨ (∃ e₂ ∈ Rbar, ac = (↑p : T) * e₂) by rcases h with ⟨e₁, he₁_Rbar, hab_pe₁⟩ | ⟨e₂, he₂_Rbar, hac_pe₂⟩ @@ -110,7 +114,7 @@ include T in theorem build_R_prime_in_S have h1 : b * bb = (↑p : T) * e₁ := by rw [hb_eq, hab_pe₁] calc b = b * bb * ↑ubb⁻¹ := by rw [← hubb, mul_assoc, ubb.mul_inv, mul_one] _ = (↑p : T) * e₁ * ↑ubb⁻¹ := by rw [h1] - _ = (↑p : T) * (e₁ * ↑ubb⁻¹) := by ring + _ = (↑p : T) * (e₁ * ↑ubb⁻¹) := mul_assoc _ _ _ exact ⟨⟨e₁ * ↑ubb⁻¹, hw_mem⟩, Subtype.ext hb_pe⟩ · right have hbc_unit := hunit bc hbc_notM @@ -123,7 +127,7 @@ include T in theorem build_R_prime_in_S have h1 : c * bc = (↑p : T) * e₂ := by rw [hc_eq, hac_pe₂] calc c = c * bc * ↑ubc⁻¹ := by rw [← hubc, mul_assoc, ubc.mul_inv, mul_one] _ = (↑p : T) * e₂ * ↑ubc⁻¹ := by rw [h1] - _ = (↑p : T) * (e₂ * ↑ubc⁻¹) := by ring + _ = (↑p : T) * (e₂ * ↑ubc⁻¹) := mul_assoc _ _ _ exact ⟨⟨e₂ * ↑ubc⁻¹, hw_mem⟩, Subtype.ext hc_pe⟩ have hd_carrier : d ∈ S_carrier := hS_sub_eq' ▸ hd_mem obtain ⟨a_d, b_d, had_Rbar, hbd_Rbar, hbd_notM, hd_eq⟩ := hd_carrier @@ -135,41 +139,24 @@ include T in theorem build_R_prime_in_S have hacbd_Rbar : ac * b_d ∈ Rbar := hRbar_mul ac b_d hac_Rbar hbd_Rbar have hadbbbc_Rbar : a_d * bb * bc ∈ Rbar := hRbar_mul _ _ (hRbar_mul a_d bb had_Rbar hbb_Rbar) hbc_Rbar - push Not at hcop - by_cases hpy₂ : p ∣ y₂ - · have hpy₁ : ¬ p ∣ y₁ := fun h => hcop h hpy₂ - have := prime_in_adjoinLocSet R x₂ y₁ p hx₂_trans hp hpy₁ - ab (ac * b_d) (a_d * bb * bc) - hab_Rbar.2 (hALS_mul x₂ y₁ ac b_d hac_Rbar.2 hbd_Rbar.2) - (hALS_mul x₂ y₁ _ _ (hALS_mul x₂ y₁ a_d bb had_Rbar.2 hbb_Rbar.2) hbc_Rbar.2) - hcleared - rcases this with ⟨e, he_A₂, hab_eq⟩ | ⟨e, he_A₂, hacbd_eq⟩ - · left - exact ⟨e, hR_prime_div_Rbar p hp ab hab_Rbar e hab_eq, hab_eq⟩ - · have he_Rbar := hR_prime_div_Rbar p hp (ac * b_d) hacbd_Rbar e hacbd_eq - obtain ⟨ubd, hubd⟩ := hunit b_d hbd_notM + suffices hdiv : (∃ e : T, ab = (↑p : T) * e) ∨ + (∃ e : T, ac * b_d = (↑p : T) * e) by + rcases hdiv with ⟨e, hab_eq⟩ | ⟨e, hacbd_eq⟩ + · exact Or.inl ⟨e, hR_prime_div_Rbar p hp ab hab_Rbar e hab_eq, hab_eq⟩ + · obtain ⟨ubd, hubd⟩ := hunit b_d hbd_notM have hac_eq : ac = (↑p : T) * (e * ↑ubd⁻¹) := by calc ac = ac * b_d * ↑ubd⁻¹ := by rw [← hubd, mul_assoc, ubd.mul_inv, mul_one] _ = (↑p : T) * e * ↑ubd⁻¹ := by rw [hacbd_eq] - _ = (↑p : T) * (e * ↑ubd⁻¹) := by ring - right - exact ⟨e * ↑ubd⁻¹, hR_prime_div_Rbar p hp ac hac_Rbar _ hac_eq, hac_eq⟩ - · have := prime_in_adjoinLocSet R x₁ y₂ p hx₁_trans hp hpy₂ - ab (ac * b_d) (a_d * bb * bc) - hab_Rbar.1 (hALS_mul x₁ y₂ ac b_d hac_Rbar.1 hbd_Rbar.1) - (hALS_mul x₁ y₂ _ _ (hALS_mul x₁ y₂ a_d bb had_Rbar.1 hbb_Rbar.1) hbc_Rbar.1) - hcleared - rcases this with ⟨e, he_A₁, hab_eq⟩ | ⟨e, he_A₁, hacbd_eq⟩ - · left - exact ⟨e, hR_prime_div_Rbar p hp ab hab_Rbar e hab_eq, hab_eq⟩ - · have he_Rbar := hR_prime_div_Rbar p hp (ac * b_d) hacbd_Rbar e hacbd_eq - obtain ⟨ubd', hubd'⟩ := hunit b_d hbd_notM - have hac_eq : ac = (↑p : T) * (e * ↑ubd'⁻¹) := by - calc ac = ac * b_d * ↑ubd'⁻¹ := by rw [← hubd', mul_assoc, ubd'.mul_inv, mul_one] - _ = (↑p : T) * e * ↑ubd'⁻¹ := by rw [hacbd_eq] - _ = (↑p : T) * (e * ↑ubd'⁻¹) := by ring - right - exact ⟨e * ↑ubd'⁻¹, hR_prime_div_Rbar p hp ac hac_Rbar _ hac_eq, hac_eq⟩ + _ = (↑p : T) * (e * ↑ubd⁻¹) := mul_assoc _ _ _ + exact Or.inr ⟨e * ↑ubd⁻¹, hR_prime_div_Rbar p hp ac hac_Rbar _ hac_eq, hac_eq⟩ + by_cases hpy₂ : p ∣ y₂ + · have hpy₁ : ¬ p ∣ y₁ := fun h => hcop ⟨h, hpy₂⟩ + exact (prime_in_adjoinLocSet R x₂ y₁ p hx₂_trans hp hpy₁ + ab (ac * b_d) (a_d * bb * bc) hab_Rbar.2 hacbd_Rbar.2 hadbbbc_Rbar.2 hcleared).imp + (fun ⟨e, _, he⟩ => ⟨e, he⟩) (fun ⟨e, _, he⟩ => ⟨e, he⟩) + · exact (prime_in_adjoinLocSet R x₁ y₂ p hx₁_trans hp hpy₂ + ab (ac * b_d) (a_d * bb * bc) hab_Rbar.1 hacbd_Rbar.1 hadbbbc_Rbar.1 hcleared).imp + (fun ⟨e, _, he⟩ => ⟨e, he⟩) (fun ⟨e, _, he⟩ => ⟨e, he⟩) @@ -273,14 +260,6 @@ private def build_loc_away_ufd_proof rw [show s = ι y₁ * ι y₂ from rfl, map_mul] at this exact isUnit_of_mul_isUnit_right this - have hy₁_unit : - IsUnit (algebraMap S_sub - (Localization.Away s) (ι y₁)) := by - have := IsLocalization.Away.algebraMap_isUnit - (S := Localization.Away s) (x := s) - rw [show s = ι y₁ * ι y₂ from rfl, - map_mul] at this - exact isUnit_of_mul_isUnit_left this let : Algebra (Polynomial R.carrier) (Localization.Away s) := φ.toAlgebra let M : Submonoid (Polynomial R.carrier) := @@ -472,47 +451,6 @@ private def build_ufd_proof_proof UniqueFactorizationMonoid S_sub ) := ⟨by have : IsDomain R.carrier := NSubring.isDomain R have : UniqueFactorizationMonoid R.carrier := R.isUFD - set Rbar := intersectionSet R x₁ x₂ y₁ y₂ - have hRbar_one : (1 : T) ∈ Rbar := - ⟨⟨C 1, 0, by simp⟩, ⟨C 1, 0, by simp⟩⟩ - have hRbar_add : ∀ t₁ t₂, t₁ ∈ Rbar → t₂ ∈ Rbar → t₁ + t₂ ∈ Rbar := by - intro t₁ t₂ ⟨h₁₁, h₁₂⟩ ⟨h₂₁, h₂₂⟩ - constructor - · obtain ⟨f₁, n₁, hf₁⟩ := h₁₁ - obtain ⟨f₂, n₂, hf₂⟩ := h₂₁ - refine ⟨f₁ * C (y₂ ^ n₂) + f₂ * C (y₂ ^ n₁), n₁ + n₂, ?_⟩ - have key : (t₁ + t₂) * (↑y₂ : T) ^ (n₁ + n₂) = - t₁ * (↑y₂ : T) ^ n₁ * (↑y₂ : T) ^ n₂ + - t₂ * (↑y₂ : T) ^ n₂ * (↑y₂ : T) ^ n₁ := by rw [pow_add] - ring - rw [key, hf₁, hf₂, map_add, map_mul, map_mul, aeval_C, aeval_C] - simp only [show algebraMap R.carrier T = R.carrier.subtype - from rfl, Subring.coe_subtype, map_pow] - · obtain ⟨f₁, n₁, hf₁⟩ := h₁₂ - obtain ⟨f₂, n₂, hf₂⟩ := h₂₂ - refine ⟨f₁ * C (y₁ ^ n₂) + f₂ * C (y₁ ^ n₁), n₁ + n₂, ?_⟩ - have key : (t₁ + t₂) * (↑y₁ : T) ^ (n₁ + n₂) = - t₁ * (↑y₁ : T) ^ n₁ * (↑y₁ : T) ^ n₂ + - t₂ * (↑y₁ : T) ^ n₂ * (↑y₁ : T) ^ n₁ := by rw [pow_add] - ring - rw [key, hf₁, hf₂, map_add, map_mul, map_mul, aeval_C, aeval_C] - simp only [show algebraMap R.carrier T = R.carrier.subtype - from rfl, Subring.coe_subtype, map_pow] - have hRbar_mul : ∀ t₁ t₂, t₁ ∈ Rbar → t₂ ∈ Rbar → t₁ * t₂ ∈ Rbar := - fun t₁ t₂ ⟨h₁₁, h₁₂⟩ ⟨h₂₁, h₂₂⟩ => - ⟨(fun x' y' t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ => - ⟨f₁ * f₂, n₁ + n₂, by rw [map_mul, ← hf₁, ← hf₂, pow_add] - ring⟩) x₁ y₂ t₁ t₂ h₁₁ h₂₁, - (fun x' y' t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ => - ⟨f₁ * f₂, n₁ + n₂, by rw [map_mul, ← hf₁, ← hf₂, pow_add] - ring⟩) x₂ y₁ t₁ t₂ h₁₂ h₂₂⟩ - have hS_mem_rep : ∀ s : S_sub, ∃ (a b : T), a ∈ Rbar ∧ b ∈ Rbar ∧ - b ∉ IsLocalRing.maximalIdeal T ∧ (s : T) * b = a := by - intro s - have := s.2 - change s.1 ∈ (S_sub : Set T) at this - rw [hS_sub_eq] at this - exact this rw [UniqueFactorizationMonoid.iff_exists_prime_mem_of_isPrime] intro P hP_ne_bot hP_prime let ι : R.carrier →+* S_sub := Subring.inclusion hR_le @@ -862,29 +800,15 @@ include T in theorem build_primes_preserved {t : T | ∃ (a : T) (b : T), a ∈ Rbar ∧ b ∈ Rbar ∧ b ∉ IsLocalRing.maximalIdeal T ∧ t * b = a} have hS_sub_eq' : (S_sub : Set T) = S_carrier := hS_sub_eq - have hunit : ∀ (a : T), a ∉ IsLocalRing.maximalIdeal T → IsUnit a := - fun a ha => IsLocalRing.notMem_maximalIdeal.mp ha - have hRbar_one : (1 : T) ∈ Rbar := - ⟨⟨C 1, 0, by simp⟩, ⟨C 1, 0, by simp⟩⟩ have hRbar_mul : ∀ t₁ t₂, t₁ ∈ Rbar → t₂ ∈ Rbar → t₁ * t₂ ∈ Rbar := fun t₁ t₂ ⟨h₁₁, h₁₂⟩ ⟨h₂₁, h₂₂⟩ => ⟨(fun x' y' t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ => ⟨f₁ * f₂, n₁ + n₂, by rw [map_mul, ← hf₁, ← hf₂, pow_add] - ring⟩) x₁ y₂ t₁ t₂ h₁₁ h₂₁, + exact mul_mul_mul_comm _ _ _ _⟩) x₁ y₂ t₁ t₂ h₁₁ h₂₁, (fun x' y' t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ => ⟨f₁ * f₂, n₁ + n₂, by rw [map_mul, ← hf₁, ← hf₂, pow_add] - ring⟩) x₂ y₁ t₁ t₂ h₁₂ h₂₂⟩ - have hALS_mul : ∀ (x' : T) (y' : R.carrier) (t₁ t₂ : T), - t₁ ∈ adjoinLocSetY R x' y' → t₂ ∈ adjoinLocSetY R x' y' → - t₁ * t₂ ∈ adjoinLocSetY R x' y' := by - intro x' y' t₁ t₂ ⟨f₁, n₁, hf₁⟩ ⟨f₂, n₂, hf₂⟩ - exact ⟨f₁ * f₂, n₁ + n₂, by rw [map_mul, ← hf₁, ← hf₂, pow_add] - ring⟩ + exact mul_mul_mul_comm _ _ _ _⟩) x₂ y₁ t₁ t₂ h₁₂ h₂₂⟩ set r' : S_sub := ⟨(r : T), hR_le r.2⟩ with hr'_def - have hr'_ne : r' ≠ 0 := by - intro h - have h0 : (r : T) = (0 : T) := congrArg Subtype.val h - exact hr.ne_zero (R.carrier.subtype_injective h0) have hr'_nu : ¬IsUnit r' := by intro hu have hr_M : (r : T) ∈ IsLocalRing.maximalIdeal T := by diff --git a/LeanPool/AndersonConjecture/Jensen/NSubring.lean b/LeanPool/AndersonConjecture/Jensen/NSubring.lean index 837b8b937e..37277dcbb4 100644 --- a/LeanPool/AndersonConjecture/Jensen/NSubring.lean +++ b/LeanPool/AndersonConjecture/Jensen/NSubring.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import Mathlib.Algebra.Lie.OfAssociative +module + +public import Mathlib.RingTheory.Ideal.AssociatedPrime.Basic +public import Mathlib.RingTheory.Ideal.Height import Mathlib.Analysis.Normed.Ring.Lemmas import Mathlib.RingTheory.DedekindDomain.Dvr -import Mathlib.RingTheory.Ideal.AssociatedPrime.Basic import Mathlib.RingTheory.KrullDimension.PID import Mathlib.RingTheory.Localization.Cardinality @@ -21,6 +23,8 @@ An A-extension preserves primality and cardinality bounds. * Jensen, "Completions of UFDs with semi-local formal fibers", 2006. -/ +@[expose] public section + noncomputable section open Cardinal Ideal diff --git a/LeanPool/AndersonConjecture/Jensen/TransfiniteUnion.lean b/LeanPool/AndersonConjecture/Jensen/TransfiniteUnion.lean index 16cfb7be9e..fb67c0e7cb 100644 --- a/LeanPool/AndersonConjecture/Jensen/TransfiniteUnion.lean +++ b/LeanPool/AndersonConjecture/Jensen/TransfiniteUnion.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.AndersonConjecture.Jensen.NSubring +module + +public import LeanPool.AndersonConjecture.Jensen.NSubring +public import Mathlib.Order.CompletePartialOrder import Mathlib.Algebra.GroupWithZero.Submonoid.CancelMulZero -import Mathlib.Order.CompletePartialOrder +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Transfinite Union of A-extensions @@ -18,6 +26,8 @@ Heitmann, "Characterization of completions of UFDs", 1993, Lemma 6 Loepp, "Constructing local generic formal fibers", 1997, Lemmas 14--15. -/ +@[expose] public section + noncomputable section open Cardinal Ideal @@ -167,6 +177,101 @@ theorem transfinite_union_isUFD rw [← this] exact hf_assoc.map incl +/-- The union of a chain of N-subrings, when its carrier satisfies the +N-subring cardinality bound. -/ +def NSubringChain.unionNSubring [Nonempty ι] (chain : NSubringChain T ι) + (h_card : Cardinal.mk ↥chain.unionSubring ≤ + max Cardinal.aleph0 (Cardinal.mk (IsLocalRing.ResidueField T))) : + NSubring T := by + set U := chain.unionSubring + have hU_le : ∀ α, (chain.ring α).carrier ≤ U := chain.le_union + have hU_mem : ∀ x : ↥U, ∃ α, (x : T) ∈ (chain.ring α).carrier := + fun x => chain.mem_union_iff.mp x.2 + have hU_local : IsLocalRing U := by + apply IsLocalRing.of_isUnit_or_isUnit_one_sub_self + intro a + obtain ⟨α, hα⟩ := hU_mem a + rcases IsLocalRing.isUnit_or_isUnit_one_sub_self + (⟨(a : T), hα⟩ : (chain.ring α).carrier) with hu | hu + · left + exact hu.map (Subring.inclusion (hU_le α)) + · right + exact (show Subring.inclusion (hU_le α) (1 - ⟨(a : T), hα⟩) = 1 - a + from Subtype.ext rfl) ▸ hu.map (Subring.inclusion (hU_le α)) + have hU_maximal : IsLocalRing.maximalIdeal ↥U = + (IsLocalRing.maximalIdeal T).comap U.subtype := by + ext ⟨a, ha⟩ + simp only [Ideal.mem_comap, Subring.coe_subtype] + constructor + · intro hx + rw [IsLocalRing.mem_maximalIdeal] + intro hu_T + obtain ⟨α, hα⟩ := hU_mem ⟨a, ha⟩ + by_contra h_nu + have : ¬IsUnit (⟨a, hα⟩ : (chain.ring α).carrier) := + fun hu => h_nu ((IsLocalRing.mem_maximalIdeal _).mp hx + (hu.map (Subring.inclusion (hU_le α)))) + have hmem := (IsLocalRing.mem_maximalIdeal _).mpr this + rw [(chain.ring α).maximal_ideal_eq] at hmem + exact (IsLocalRing.mem_maximalIdeal _).mp (Ideal.mem_comap.mp hmem) hu_T + · intro hx + rw [IsLocalRing.mem_maximalIdeal] + intro hu_S + exact (IsLocalRing.mem_maximalIdeal _).mp hx (hu_S.map U.subtype) + have hU_height : ∀ (t : T), t ≠ 0 → + ∀ P ∈ associatedPrimes T (T ⧸ Ideal.span {t}), + Ideal.height (P.comap U.subtype) ≤ 1 := by + intro t ht P hP + have hP_prime := hP.isPrime + have : (Ideal.comap U.subtype P).IsPrime := hP_prime.comap _ + change (Ideal.comap U.subtype P).height ≤ ↑(1 : ℕ) + rw [Ideal.height_le_iff] + intro q hq_prime hq_lt + suffices q = ⊥ by rw [this, Ideal.height_bot] + norm_cast + by_contra hq_ne + obtain ⟨s, hs_q, hs_ne⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hq_ne + obtain ⟨x, hx_P, hx_nq⟩ := Set.exists_of_ssubset hq_lt + obtain ⟨αs, hαs⟩ := hU_mem s + obtain ⟨αx, hαx⟩ := hU_mem x + set γ := max αs αx + set inclγ := Subring.inclusion (hU_le γ) + have : (Ideal.comap inclγ q).IsPrime := hq_prime.comap _ + set s' : (chain.ring γ).carrier := ⟨(s : T), chain.mono (le_max_left ..) hαs⟩ + have hs'_ne : s' ≠ 0 := fun h => hs_ne (Subtype.ext (congrArg + (fun (x : (chain.ring γ).carrier) => (x : T)) h)) + have hs'_q : s' ∈ Ideal.comap inclγ q := + show inclγ s' ∈ q from (show inclγ s' = s from Subtype.ext rfl) ▸ hs_q + have hq'_ne : Ideal.comap inclγ q ≠ ⊥ := fun h => by + rw [h] at hs'_q + exact hs'_ne (Ideal.mem_bot.mp hs'_q) + set x' : (chain.ring γ).carrier := + ⟨(x : T), chain.mono (le_max_right ..) hαx⟩ + have hx'_nq : x' ∉ Ideal.comap inclγ q := fun h => by + have h' : inclγ x' ∈ q := h + rw [show inclγ x' = x from Subtype.ext rfl] at h' + exact hx_nq h' + have hq'_lt : Ideal.comap inclγ q < + Ideal.comap (chain.ring γ).carrier.subtype P := + lt_of_le_of_ne + (fun r hr => (hq_lt.le (show inclγ r ∈ q from hr) : (inclγ r : T) ∈ P)) + (fun h => hx'_nq (h ▸ (hx_P : (x : T) ∈ P))) + have : (Ideal.comap (chain.ring γ).carrier.subtype P).IsPrime := + hP_prime.comap _ + have hq'_ht := (Ideal.height_le_iff (n := 1)).mp + ((chain.ring γ).height_bound t ht P hP) _ inferInstance hq'_lt + have : IsDomain (chain.ring γ).carrier := inferInstance + exact absurd ((Ideal.height_le_iff (n := 0)).mp + (le_of_eq (Order.lt_one_iff.mp hq'_ht)) + ⊥ Ideal.isPrime_bot (bot_lt_iff_ne_bot.mpr hq'_ne)) not_lt_bot + exact + { carrier := U + isUFD := transfinite_union_isUFD chain U hU_le hU_mem + isLocalRing := hU_local + card_le := h_card + maximal_ideal_eq := hU_maximal + height_bound := hU_height } + /-- Heitmann Lemma 6: The union of a well-ordered ascending chain of A-extensions is an N-subring (modulo cardinality bound). @@ -188,28 +293,9 @@ theorem transfinite_union_isNSubring ∃ S : NSubring T, (∀ (α : ι'), (chain.ring α).carrier ≤ S.carrier) := by set S := chain.unionSubring with hS_def - have hS_le : ∀ α, (chain.ring α).carrier ≤ S := chain.le_union - have hS_union : ∀ x : ↥S, ∃ α, (x : T) ∈ (chain.ring α).carrier := - fun x => chain.mem_union_iff.mp x.2 - have hIsLocal : IsLocalRing S := by - apply IsLocalRing.of_isUnit_or_isUnit_one_sub_self - intro a - obtain ⟨α, hα⟩ := hS_union a - have hloc := IsLocalRing.isUnit_or_isUnit_one_sub_self - (⟨(a : T), hα⟩ : (chain.ring α).carrier) - let incl := Subring.inclusion (hS_le α) - rcases hloc with hu | hu - · left - exact hu.map incl - · right - have : incl (1 - ⟨(a : T), hα⟩) = 1 - a := - Subtype.ext rfl - rw [← this] - exact hu.map incl - refine ⟨⟨S, ?_, ?_, ?_, ?_, ?_⟩, hS_le⟩ - · exact transfinite_union_isUFD chain S hS_le hS_union - · exact hIsLocal - · have hS_eq : (S : Set T) = ⋃ α, ↑(chain.ring α).carrier := by + have hS_card : Cardinal.mk ↥S ≤ + max Cardinal.aleph0 (Cardinal.mk (IsLocalRing.ResidueField T)) := by + have hS_eq : (S : Set T) = ⋃ α, ↑(chain.ring α).carrier := by rw [hS_def, NSubringChain.unionSubring] exact Subring.coe_iSup_of_directed chain.directed_carriers set κ := max Cardinal.aleph0 (Cardinal.mk (IsLocalRing.ResidueField T)) @@ -229,99 +315,6 @@ theorem transfinite_union_isNSubring ⨆ (α : ι'), Cardinal.mk ↑((chain.ring α).carrier : Set T) := h1 _ ≤ Cardinal.mk ι' * κ := mul_le_mul_right h2 _ _ ≤ κ := h3 - · ext ⟨a, ha⟩ - simp only [Ideal.mem_comap, Subring.coe_subtype] - constructor - · intro hx - rw [IsLocalRing.mem_maximalIdeal] - intro hu_T - obtain ⟨α, hα⟩ := hS_union ⟨a, ha⟩ - have hmem_Rα : (⟨a, hα⟩ : (chain.ring α).carrier) ∉ - IsLocalRing.maximalIdeal (chain.ring α).carrier := by - intro hmem - have : (⟨a, hα⟩ : (chain.ring α).carrier) ∈ - (IsLocalRing.maximalIdeal T).comap (chain.ring α).carrier.subtype := by - rw [← (chain.ring α).maximal_ideal_eq] - exact hmem - simp_all - have hu_Rα : IsUnit (⟨a, hα⟩ : (chain.ring α).carrier) := by - simp_all - exact (IsLocalRing.mem_maximalIdeal _).mp hx - (hu_Rα.map (Subring.inclusion (hS_le α))) - · intro hx - rw [IsLocalRing.mem_maximalIdeal] - intro hu_S - exact (IsLocalRing.mem_maximalIdeal _).mp hx (hu_S.map S.subtype) - · -- height_bound: for t ≠ 0, P ∈ Ass(T/tT), ht(P ∩ S) ≤ 1 - -- If q ≠ ⊥ is prime, q < P∩S, find γ with q∩Rγ ⊊ P∩Rγ, - -- contradicting ht(P∩Rγ) ≤ 1 in Rγ. - intro t ht P hP - have hP_prime : P.IsPrime := hP.isPrime - have hPS : (Ideal.comap S.subtype P).IsPrime := - hP_prime.comap _ - change (Ideal.comap S.subtype P).height ≤ ↑(1 : ℕ) - rw [Ideal.height_le_iff] - intro q hq_prime hq_lt - suffices hq_bot : q = ⊥ by - simp_all - by_contra hq_ne - have ⟨s, hs_q, hs_ne⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hq_ne - have ⟨x, hx_PS, hx_nq⟩ := Set.exists_of_ssubset hq_lt - obtain ⟨αs, hαs⟩ := hS_union s - obtain ⟨αx, hαx⟩ := hS_union x - set γ := max αs αx - set inclγ := Subring.inclusion (hS_le γ) - have : (Ideal.comap inclγ q).IsPrime := - hq_prime.comap _ - set s' : (chain.ring γ).carrier := - ⟨(s : T), chain.mono (le_max_left ..) hαs⟩ - have hs'_q : s' ∈ Ideal.comap inclγ q := by - change inclγ s' ∈ q - have : inclγ s' = s := Subtype.ext rfl - simp_all - have hs'_ne : s' ≠ 0 := by - intro h - apply hs_ne - exact Subtype.ext (congrArg - (fun (x : (chain.ring γ).carrier) => (x : T)) h) - have hq'_ne : Ideal.comap inclγ q ≠ ⊥ := by - intro h - simp_all - -- x ∈ P ∩ Rγ but x ∉ q ∩ Rγ → strict containment - set x' : (chain.ring γ).carrier := - ⟨(x : T), chain.mono (le_max_right ..) hαx⟩ - have hx'_P : x' ∈ - Ideal.comap (chain.ring γ).carrier.subtype P := - (hx_PS : (x : T) ∈ P) - have hx'_nq : x' ∉ Ideal.comap inclγ q := by - intro h - have h' : inclγ x' ∈ q := h - have : inclγ x' = x := Subtype.ext rfl - simp_all - have hq'_lt : - Ideal.comap inclγ q < - Ideal.comap (chain.ring γ).carrier.subtype P := by - refine lt_of_le_of_ne ?_ ?_ - · intro r hr - change (r : T) ∈ P - have : inclγ r ∈ q := hr - have := hq_lt.le this - exact (this : (inclγ r : T) ∈ P) - · exact fun h => hx'_nq (h ▸ hx'_P) - -- ht(P ∩ Rγ) ≤ 1 by NSubring height bound - have hht := (chain.ring γ).height_bound t ht P hP - have : - (Ideal.comap (chain.ring γ).carrier.subtype P).IsPrime := - hP_prime.comap _ - have hq'_ht := - (Ideal.height_le_iff (n := 1)).mp hht _ inferInstance hq'_lt - -- height < 1 for nonzero prime in domain → contradiction - have : IsDomain (chain.ring γ).carrier := inferInstance - have h0 : (Ideal.comap inclγ q).height ≤ ↑(0 : ℕ) := by - simp_all - exact absurd - ((Ideal.height_le_iff (n := 0)).mp h0 ⊥ - Ideal.isPrime_bot (bot_lt_iff_ne_bot.mpr hq'_ne)) - not_lt_bot + exact ⟨chain.unionNSubring hS_card, chain.le_union⟩ end diff --git a/LeanPool/AndersonConjecture/Main.lean b/LeanPool/AndersonConjecture/Main.lean index 0f9e7eead4..32418711dc 100644 --- a/LeanPool/AndersonConjecture/Main.lean +++ b/LeanPool/AndersonConjecture/Main.lean @@ -3,8 +3,24 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.Basic +public import LeanPool.AndersonConjecture.CompleteDomain.CompleteDomain +public import LeanPool.AndersonConjecture.Jensen.Defs +public import Mathlib.RingTheory.AdicCompletion.Functoriality +import LeanPool.AndersonConjecture.AdicKerEval import LeanPool.AndersonConjecture.Jensen.Jensen import LeanPool.AndersonConjecture.QuasiCompleteRing.QuasiCompleteRing +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Data.EReal.Inv +import Mathlib.Order.CompletePartialOrder +import Mathlib.RingTheory.AdicCompletion.Completeness +import Mathlib.RingTheory.AdicCompletion.AsTensorProduct +import Mathlib.RingTheory.AdicCompletion.Noetherian +import Mathlib.RingTheory.KrullDimension.Regular +import Mathlib.RingTheory.PicardGroup /-! # Main Theorem: WQC Does Not Imply QC @@ -16,6 +32,8 @@ Anderson's theorems reduce the problem to a quotient that fails weak quasi-completeness. -/ +@[expose] public section + noncomputable section /- @@ -85,7 +103,7 @@ lemma Q_ne_bot : Q ≠ ⊥ := by have : Ideal.Quotient.mk conjI (MvPowerSeries.X 0) = 0 := by have hmem : Ideal.Quotient.mk conjI (MvPowerSeries.X 0) ∈ Q := Ideal.subset_span (Set.mem_insert _ _) - simp_all + rwa [h, Ideal.mem_bot] at hmem rw [Ideal.Quotient.eq_zero_iff_mem] at this exact X0_not_mem_conjI this @@ -95,8 +113,7 @@ lemma comap_ringEquiv_ne_bot {R S : Type*} [CommRing R] [CommRing S] Ideal.comap e.toRingHom I ≠ ⊥ := by intro h apply hI - have h1 := Ideal.map_comap_of_surjective e.toRingHom e.surjective I - simp_all + rw [← Ideal.map_comap_of_surjective e.toRingHom e.surjective I, h, Ideal.map_bot] /-- The contraction of Q through the completion isomorphism has height 1. Uses faithful flatness of adic completion: 1 ≤ ht(q) ≤ ht(Q') = ht(Q) = 1. -/ @@ -130,7 +147,7 @@ lemma contraction_height_one have : (⊥ : Ideal A).IsPrime := Ideal.isPrime_bot have h := Ideal.height_add_one_le_of_lt_of_isPrime (bot_lt_iff_ne_bot.mpr hq_ne) - simp_all + simpa only [Ideal.height_bot, zero_add] using h exact le_antisymm h_upper h_lower /-- In a UFD, a prime ideal of height 1 is principal, generated by a prime element. -/ @@ -140,7 +157,8 @@ lemma ufd_height_one_principal ∃ a : A, Prime a ∧ q = Ideal.span {a} := by have hq_ne : q ≠ ⊥ := by intro h - simp_all + rw [h, Ideal.height_bot] at hq_height + exact zero_ne_one hq_height obtain ⟨a, ha_mem, ha_prime⟩ := hq_prime.exists_mem_prime_of_ne_bot hq_ne have : (Ideal.span {a}).IsPrime := (Ideal.span_singleton_prime ha_prime.ne_zero).mpr ha_prime @@ -155,8 +173,7 @@ lemma ufd_height_one_principal have h_bot_lt : (⊥ : Ideal A) < Ideal.span {a} := bot_lt_iff_ne_bot.mpr (Ideal.span_singleton_eq_bot.not.mpr ha_prime.ne_zero) have h2 := Ideal.height_add_one_le_of_lt_of_isPrime h_bot_lt - have h3 : (⊥ : Ideal A).height = 0 := by - simp_all + have h3 : (⊥ : Ideal A).height = 0 := Ideal.height_bot rw [h3] at h2 have h4 : (1 : ℕ∞) ≤ (Ideal.span {a}).height := by simpa using h2 exact absurd (le_trans (add_le_add_right h4 1 |>.trans_eq (add_comm _ _)) h1) @@ -179,8 +196,7 @@ lemma isLocalHom_algebraMap_adicCompletion rw [AdicCompletion.algebraMap_apply] rfl] rw [AdicCompletion.evalOneₐ_of, h_mk_zero] - have h_unit := hr.map (AdicCompletion.evalOneₐ M).toRingHom - simp_all + exact (hr.map (AdicCompletion.evalOneₐ M).toRingHom).ne_zero h_eval_zero /-- dim(A) ≤ dim(Â) for Noetherian local rings via flat going-down. Proof: algebraMap A  is a local ring hom (via evalOneₐ), so maximalIdeal  lies over @@ -228,7 +244,7 @@ instance residueField_isHausdorff (A : Type*) [CommRing A] [IsLocalRing A] : IsHausdorff (IsLocalRing.maximalIdeal A) (A ⧸ IsLocalRing.maximalIdeal A) where haus' x hx := by have h1 := hx 1 - simp_all + rwa [SModEq.zero, pow_one, smul_top_eq_bot_quotient, Submodule.mem_bot] at h1 /-- A/M is M-adic precomplete (the adic topology is discrete). -/ instance residueField_isPrecomplete (A : Type*) [CommRing A] [IsLocalRing A] : @@ -240,8 +256,8 @@ instance residueField_isPrecomplete (A : Type*) [CommRing A] [IsLocalRing A] : · subst hn simpa only [pow_zero, Ideal.one_eq_top, Submodule.top_smul] using SModEq.top · rw [pow_smul_top_eq_bot_quotient n hn] - have h1 := hf (Nat.one_le_iff_ne_zero.mpr hn) - simp_all + simpa only [pow_one, smul_top_eq_bot_quotient] using + (hf (Nat.one_le_iff_ne_zero.mpr hn)).symm /-- map mkQ (mk a) = of (evalOneₐ (mk a)) — component-wise comparison. -/ lemma map_mkQ_mk_eq_of_evalOneₐ {A : Type*} [CommRing A] [IsLocalRing A] @@ -281,63 +297,40 @@ lemma map_mkQ_eq_zero_iff_evalOneₐ {A : Type*} [CommRing A] [IsLocalRing A] · intro hx rw [map_mkQ_mk_eq_of_evalOneₐ, hx, map_zero] -/-- range(map subtype) ⊆ Ideal.map algebraMap M — via tensor product description. -/ -lemma range_map_subtype_le_ideal_map {A : Type u_1} [CommRing A] [IsLocalRing A] - [IsNoetherianRing A] : - LinearMap.range (AdicCompletion.map (IsLocalRing.maximalIdeal A) - ((IsLocalRing.maximalIdeal A : Submodule A A).subtype)) ≤ - (Ideal.map (algebraMap A (AdicCompletion (IsLocalRing.maximalIdeal A) A)) - (IsLocalRing.maximalIdeal A) : Ideal _) := by - intro x hx - rw [LinearMap.mem_range] at hx - obtain ⟨z, rfl⟩ := hx +private lemma range_completion_subtype_le_map {A : Type*} [CommRing A] + [IsNoetherianRing A] (M I : Ideal A) : + LinearMap.range (AdicCompletion.map M (I : Submodule A A).subtype) ≤ + (Ideal.map (algebraMap A (AdicCompletion M A)) I : Ideal _) := by + rintro x ⟨z, rfl⟩ obtain ⟨t, rfl⟩ := - (AdicCompletion.ofTensorProductEquivOfFiniteNoetherian - (IsLocalRing.maximalIdeal A) - (↥(IsLocalRing.maximalIdeal A : Submodule A A))).surjective z + (AdicCompletion.ofTensorProductEquivOfFiniteNoetherian M (↥(I : Submodule A A))).surjective z change (AdicCompletion.map _ (Submodule.subtype _)) ((AdicCompletion.ofTensorProduct _ _) t) ∈ _ induction t using TensorProduct.inductionOn with | tmul a m => rw [AdicCompletion.ofTensorProduct_tmul, map_smul, AdicCompletion.map_of] exact Ideal.mul_mem_left _ a (Ideal.mem_map_of_mem _ m.property) - | add x y hx hy => simp only [map_add] - exact Ideal.add_mem _ hx hy + | add x y hx hy => + simp only [map_add] + exact Ideal.add_mem _ hx hy + +/-- range(map subtype) ⊆ Ideal.map algebraMap M — via tensor product description. -/ +lemma range_map_subtype_le_ideal_map {A : Type u_1} [CommRing A] [IsLocalRing A] + [IsNoetherianRing A] : + LinearMap.range (AdicCompletion.map (IsLocalRing.maximalIdeal A) + ((IsLocalRing.maximalIdeal A : Submodule A A).subtype)) ≤ + (Ideal.map (algebraMap A (AdicCompletion (IsLocalRing.maximalIdeal A) A)) + (IsLocalRing.maximalIdeal A) : Ideal _) := by + exact range_completion_subtype_le_map _ _ /-- ker(evalOneₐ M) = Ideal.map (algebraMap A Â) M for Noetherian local rings. - Uses: exact sequence of completions + tensor product description + of_bijective. -/ + Uses the evaluation-kernel theorem for finitely generated ideals. -/ lemma ker_evalOneₐ_eq_map_maximalIdeal {A : Type u_1} [CommRing A] [IsLocalRing A] [IsNoetherianRing A] : RingHom.ker (AdicCompletion.evalOneₐ (IsLocalRing.maximalIdeal A)) = Ideal.map (algebraMap A (AdicCompletion (IsLocalRing.maximalIdeal A) A)) (IsLocalRing.maximalIdeal A) := by - apply le_antisymm - · -- ker(evalOneₐ) ≤ Ideal.map algebraMap M - intro x hx - rw [RingHom.mem_ker] at hx - have hmkQ : AdicCompletion.map _ ((IsLocalRing.maximalIdeal A : Submodule A A).mkQ) x = 0 := - (map_mkQ_eq_zero_iff_evalOneₐ x).mpr hx - have hexact : Function.Exact - (AdicCompletion.map (IsLocalRing.maximalIdeal A) - ((IsLocalRing.maximalIdeal A : Submodule A A).subtype)) - (AdicCompletion.map (IsLocalRing.maximalIdeal A) - ((IsLocalRing.maximalIdeal A : Submodule A A).mkQ)) := - @AdicCompletion.map_exact A _ (IsLocalRing.maximalIdeal A) - (↥(IsLocalRing.maximalIdeal A : Submodule A A)) _ _ A _ _ - (A ⧸ (IsLocalRing.maximalIdeal A : Submodule A A)) _ _ _ _ - _ _ Subtype.val_injective - (LinearMap.exact_subtype_mkQ _) (Submodule.mkQ_surjective _) - rw [Function.Exact] at hexact - have hrange : x ∈ LinearMap.range - (AdicCompletion.map (IsLocalRing.maximalIdeal A) - ((IsLocalRing.maximalIdeal A : Submodule A A).subtype)) := by - simp_all - exact range_map_subtype_le_ideal_map hrange - · rw [Ideal.map, Ideal.span_le] - rintro x ⟨m, hm, rfl⟩ - simp only [SetLike.mem_coe, RingHom.mem_ker, AlgHom.commutes, - Ideal.Quotient.algebraMap_eq] - exact Ideal.Quotient.eq_zero_iff_mem.mpr hm + exact AdicCompletion.ker_evalOneₐ_eq_map _ (IsLocalRing.maximalIdeal A).fg_of_isNoetherianRing /-- Ideal.map (algebraMap A Â) M = maxIdeal  for Noetherian local rings. -/ lemma map_maximalIdeal_eq {A : Type u_1} [CommRing A] [IsLocalRing A] @@ -413,21 +406,7 @@ lemma range_map_subtype_pow_le {A : Type u_1} [CommRing A] [IsLocalRing A] ((IsLocalRing.maximalIdeal A ^ n : Submodule A A).subtype)) ≤ (Ideal.map (algebraMap A (AdicCompletion (IsLocalRing.maximalIdeal A) A)) (IsLocalRing.maximalIdeal A ^ n) : Ideal _) := by - set M := IsLocalRing.maximalIdeal A - intro x hx - rw [LinearMap.mem_range] at hx - obtain ⟨z, rfl⟩ := hx - obtain ⟨t, rfl⟩ := - (AdicCompletion.ofTensorProductEquivOfFiniteNoetherian M - (↥(M ^ n : Submodule A A))).surjective z - change (AdicCompletion.map _ (Submodule.subtype _)) - ((AdicCompletion.ofTensorProduct _ _) t) ∈ _ - induction t using TensorProduct.inductionOn with - | tmul a m => - rw [AdicCompletion.ofTensorProduct_tmul, map_smul, AdicCompletion.map_of] - exact Ideal.mul_mem_left _ a (Ideal.mem_map_of_mem _ m.property) - | add x y hx hy => simp only [map_add] - exact Ideal.add_mem _ hx hy + exact range_completion_subtype_le_map _ _ /-- ker(evalₐ M n) ⊆ maximalIdeal(Â)^n for Noetherian local rings. -/ lemma ker_evalₐ_le_maximalIdeal_pow @@ -437,30 +416,8 @@ lemma ker_evalₐ_le_maximalIdeal_pow (hz : (AdicCompletion.evalₐ (IsLocalRing.maximalIdeal A) n) z = 0) : z ∈ IsLocalRing.maximalIdeal (AdicCompletion (IsLocalRing.maximalIdeal A) A) ^ n := by - let M := IsLocalRing.maximalIdeal A - let Ahat := AdicCompletion M A - let Mhat := IsLocalRing.maximalIdeal Ahat - have h_map_zero : AdicCompletion.map M ((M ^ n : Submodule A A).mkQ) z = 0 := - evalₐ_zero_imp_map_mkQ_pow_zero M n z hz - -- By exact sequence, z ∈ range(map subtype (M^n)) - have hexact : Function.Exact - (AdicCompletion.map M (M ^ n : Submodule A A).subtype) - (AdicCompletion.map M (M ^ n : Submodule A A).mkQ) := - @AdicCompletion.map_exact A _ M - (↥(M ^ n : Submodule A A)) _ _ A _ _ - (A ⧸ (M ^ n : Submodule A A)) _ _ _ _ - _ _ Subtype.val_injective - (LinearMap.exact_subtype_mkQ _) (Submodule.mkQ_surjective _) - rw [Function.Exact] at hexact - have hrange : z ∈ LinearMap.range - (AdicCompletion.map M (M ^ n : Submodule A A).subtype) := by - simp_all - have hle := @range_map_subtype_pow_le A _ _ _ n - have h_map_eq : Ideal.map (algebraMap A Ahat) (M ^ n) = Mhat ^ n := by - rw [Ideal.map_pow] - exact congrArg (· ^ n) map_maximalIdeal_eq - rw [h_map_eq] at hle - exact hle hrange + rw [← map_maximalIdeal_eq] + exact mem_map_pow_of_evalₐ_eq_zero A n z hz /-- The quotient A/(a) has Krull dimension 1. Since A is a 2-dimensional UFD and a is prime, dim(A/(a)) = dim(A) - 1 = 1. @@ -558,8 +515,7 @@ lemma span_singleton_not_isPrime_of_mem_Q {b : T} (hb_ne : b ≠ 0) (hb_mem : b have : (⊥ : Ideal T).IsPrime := Ideal.isPrime_bot have h2 := Ideal.height_add_one_le_of_lt_of_isPrime (bot_lt_iff_ne_bot.mpr hne_bot) - have h3 : (⊥ : Ideal T).height = 0 := by - simp_all + have h3 : (⊥ : Ideal T).height = 0 := Ideal.height_bot rw [h3, zero_add] at h2 exact absurd (le_trans (add_le_add_right h2 1 |>.trans_eq (add_comm _ _)) h1) @@ -595,11 +551,12 @@ lemma quotient_not_analytically_irreducible rw [hq_eq, Ideal.mem_comap] at this exact this have hb_ne : b ≠ 0 := by + have : Nontrivial Ahat := φ.toEquiv.nontrivial intro h have h1 : algebraMap A Ahat a = 0 := by apply φ.injective rw [← hb_def, h, map_zero] - simp_all + exact ha.ne_zero ((FaithfulSMul.algebraMap_eq_zero_iff A Ahat).mp h1) -- span{b} ≤ Q with ht(Q)=1; if span{b} were prime then span{b}=Q, contradicting Q not principal have hb_not_prime : ¬ (Ideal.span ({b} : Set T)).IsPrime := span_singleton_not_isPrime_of_mem_Q hb_ne hb_mem diff --git a/LeanPool/AndersonConjecture/QuasiCompleteRing.lean b/LeanPool/AndersonConjecture/QuasiCompleteRing.lean index f5869ea4c5..850483a960 100644 --- a/LeanPool/AndersonConjecture/QuasiCompleteRing.lean +++ b/LeanPool/AndersonConjecture/QuasiCompleteRing.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module -import LeanPool.AndersonConjecture.QuasiCompleteRing.Complete -import LeanPool.AndersonConjecture.QuasiCompleteRing.QuasiCompleteRing +public import LeanPool.AndersonConjecture.QuasiCompleteRing.Complete +public import LeanPool.AndersonConjecture.QuasiCompleteRing.QuasiCompleteRing +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.Positivity.Finset /-! # Anderson's Theorems 3–5 on (Weak) Quasi-Completeness @@ -13,3 +17,5 @@ import LeanPool.AndersonConjecture.QuasiCompleteRing.QuasiCompleteRing Index file for the `LeanPool.AndersonConjecture.QuasiCompleteRing` directory: Anderson's Theorems 3–5 characterising (weak) quasi-completeness. -/ + +@[expose] public section diff --git a/LeanPool/AndersonConjecture/QuasiCompleteRing/Complete.lean b/LeanPool/AndersonConjecture/QuasiCompleteRing/Complete.lean index 3b745640a7..2546b28fef 100644 --- a/LeanPool/AndersonConjecture/QuasiCompleteRing/Complete.lean +++ b/LeanPool/AndersonConjecture/QuasiCompleteRing/Complete.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.AndersonConjecture.Basic +module + +public import LeanPool.AndersonConjecture.Basic import Mathlib.RingTheory.Filtration import Mathlib.RingTheory.HopkinsLevitzki import Mathlib.RingTheory.Ideal.Quotient.Noetherian @@ -15,6 +17,8 @@ A complete Noetherian local ring is quasi-complete (Anderson, 2014, Theorem 3). -/ +@[expose] public section + open scoped Pointwise section Helpers diff --git a/LeanPool/AndersonConjecture/QuasiCompleteRing/QuasiCompleteRing.lean b/LeanPool/AndersonConjecture/QuasiCompleteRing/QuasiCompleteRing.lean index faef525f11..b09dd39854 100644 --- a/LeanPool/AndersonConjecture/QuasiCompleteRing/QuasiCompleteRing.lean +++ b/LeanPool/AndersonConjecture/QuasiCompleteRing/QuasiCompleteRing.lean @@ -3,16 +3,22 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.AndersonConjecture.Basic +public import Mathlib.RingTheory.KrullDimension.Basic +import LeanPool.AndersonConjecture.AdicKerEval import LeanPool.AndersonConjecture.AdicLocal import LeanPool.AndersonConjecture.AdicNoetherian import LeanPool.AndersonConjecture.QuasiCompleteRing.Complete -import Mathlib.Order.BourbakiWitt import Mathlib.Order.CompletePartialOrder +import Mathlib.RingTheory.AdicCompletion.AsTensorProduct import Mathlib.RingTheory.AdicCompletion.Noetherian import Mathlib.RingTheory.Flat.TorsionFree import Mathlib.RingTheory.Ideal.KrullsHeightTheorem import Mathlib.RingTheory.KrullDimension.Field import Mathlib.RingTheory.KrullDimension.NonZeroDivisors +import Mathlib.RingTheory.PicardGroup /-! # LeanPool.AndersonConjecture.QuasiCompleteRing.QuasiCompleteRing @@ -20,6 +26,8 @@ import Mathlib.RingTheory.KrullDimension.NonZeroDivisors Imported Lean Pool material for `LeanPool.AndersonConjecture.QuasiCompleteRing.QuasiCompleteRing`. -/ +@[expose] public section + open scoped Pointwise /-! diff --git a/LeanPool/Apportionment.lean b/LeanPool/Apportionment.lean index d0400bc3af..84e2910c4e 100644 --- a/LeanPool/Apportionment.lean +++ b/LeanPool/Apportionment.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Michał Dobranowski. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michał Dobranowski -/ +module -import LeanPool.Apportionment.Basic -import LeanPool.Apportionment.PlausibleInstances +public import LeanPool.Apportionment.Basic +public import LeanPool.Apportionment.PlausibleInstances +import Mathlib.Tactic.Measurability.Init /-! # Apportionmentlib @@ -18,6 +20,8 @@ Tags: social-choice-theory, combinatorics MSC: 91B12, 91B14 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Apportionment/Basic.lean b/LeanPool/Apportionment/Basic.lean index f576fe81c0..65beada8e1 100644 --- a/LeanPool/Apportionment/Basic.lean +++ b/LeanPool/Apportionment/Basic.lean @@ -3,25 +3,13 @@ Copyright (c) 2025 Michał Dobranowski. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michał Dobranowski -/ -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Data.Finset.Basic -import Mathlib.Data.Nat.Dist -import Mathlib.Data.Rat.Floor -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel +module + +public import Mathlib.Data.Nat.Dist +public import Mathlib.Data.Rat.Floor +public import Mathlib.Data.Finset.Insert import LeanPool.Apportionment.Utils +import Mathlib.Tactic.Measurability.Init /-! # Basic @@ -63,7 +51,7 @@ between weak and strong exactness is added, following [PalomaresPukelsheimRamire -/ -open BigOperators +@[expose] public section /-- An apportionment is a vector of natural numbers representing the number of seats allocated to each party (at the corresponding index). -/ diff --git a/LeanPool/Apportionment/PlausibleInstances.lean b/LeanPool/Apportionment/PlausibleInstances.lean index 216d670c0c..95f5e9018e 100644 --- a/LeanPool/Apportionment/PlausibleInstances.lean +++ b/LeanPool/Apportionment/PlausibleInstances.lean @@ -3,8 +3,12 @@ Copyright (c) 2025 Michał Dobranowski. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michał Dobranowski -/ -import Plausible.Arbitrary -import LeanPool.Apportionment.Basic +module + +public import LeanPool.Apportionment.Basic +import LeanPool.Apportionment.Utils +import Mathlib.Tactic.Bound +import Mathlib.Tactic.Measurability.Init /-! # Instances for Plausible @@ -31,6 +35,8 @@ example (e : Election 4) : e.votes[0] ≤ 15 + e.votes[1] := by ``` -/ +@[expose] public section + open Plausible namespace Apportionment diff --git a/LeanPool/Apportionment/Utils.lean b/LeanPool/Apportionment/Utils.lean index c0c75516c0..eaa9872f17 100644 --- a/LeanPool/Apportionment/Utils.lean +++ b/LeanPool/Apportionment/Utils.lean @@ -3,22 +3,20 @@ Copyright (c) 2026 Michał Dobranowski. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michał Dobranowski -/ +module + +public import Aesop.BuiltinRules +public import Mathlib.Algebra.GroupWithZero.Nat +public import Mathlib.Tactic.ToDual import Mathlib.Algebra.Order.BigOperators.Group.List -import Mathlib.Data.Nat.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order import Mathlib.Tactic.Abel +import Mathlib.Tactic.Measurability.Init +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Utils @@ -27,6 +25,8 @@ Utility lemmas for the Apportionment library: a positivity criterion for the sum vector of natural numbers, and a closed form for the sum of a length-four vector. -/ +@[expose] public section + /-- A vector of natural numbers has positive sum iff at least one component is positive. -/ lemma sum_pos_iff_exists_pos {n : ℕ} {v : Vector ℕ n} : 0 < v.sum ↔ ∃ i : Fin n, 0 < v[i] := by diff --git a/LeanPool/ArchonFirstProofResults.lean b/LeanPool/ArchonFirstProofResults.lean index a284776354..dac64cc7d0 100644 --- a/LeanPool/ArchonFirstProofResults.lean +++ b/LeanPool/ArchonFirstProofResults.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module -import LeanPool.ArchonFirstProofResults.FirstProof4 -import LeanPool.ArchonFirstProofResults.FirstProof6 +public import LeanPool.ArchonFirstProofResults.FirstProof4 +public import LeanPool.ArchonFirstProofResults.FirstProof6 +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Archon-FirstProof-Results @@ -18,6 +21,8 @@ Tags: polynomials, analysis, combinatorics, linear-algebra, graph-theory MSC: 26D15, 05C50, 15A42 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4.lean b/LeanPool/ArchonFirstProofResults/FirstProof4.lean index 8943728490..9f4dac0a98 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary -import LeanPool.ArchonFirstProofResults.FirstProof4.Problem4 +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary +public import LeanPool.ArchonFirstProofResults.FirstProof4.Problem4 +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Problem 4 — Finite additive convolution and a harmonic-mean inequality @@ -20,3 +24,5 @@ are the roots. The main result `Problem4.harmonic_mean_inequality_full` states not squarefree). The proof lives in `Problem4`; supporting infrastructure is in the `Auxiliary` sub-modules. -/ + +@[expose] public section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary.lean index 5dcd3fc483..9c9e0584f6 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary.lean @@ -3,22 +3,26 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.BoxPlusRealRoots -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Continuity -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Defs -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Density -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.HarmonicBound -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.InvPhiN -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Obreschkoff -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.ObreschkoffTransport -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.PhiN -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RPoly -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RealRoots -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Residue -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RootContinuity -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.SignSquarefree -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Transport -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.TransportDecomp +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.BoxPlusRealRoots +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Continuity +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Defs +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Density +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.HarmonicBound +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.InvPhiN +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Obreschkoff +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.ObreschkoffTransport +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.PhiN +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RPoly +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RealRoots +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Residue +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RootContinuity +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.SignSquarefree +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Transport +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.TransportDecomp +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Problem 4 — auxiliary modules @@ -42,3 +46,5 @@ Re-exports all auxiliary sub-modules used by `Problem4`: - `TransportDecomp`: transport decomposition, critical value positivity - `BoxPlusRealRoots`: real-rootedness preservation, `PhiN` residue bound -/ + +@[expose] public section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/BoxPlusRealRoots.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/BoxPlusRealRoots.lean index 4602829d35..4be30c407b 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/BoxPlusRealRoots.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/BoxPlusRealRoots.lean @@ -3,8 +3,23 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.PhiN +public import Mathlib.Algebra.Squarefree.Basic +public import Mathlib.Analysis.CStarAlgebra.Classes +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.HarmonicBound import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.InvPhiN +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.ObreschkoffTransport +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RealRoots +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Residue +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.SignSquarefree +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Transport import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.TransportDecomp +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Real-Rootedness Preservation and PhiN Residue Bound @@ -22,6 +37,8 @@ and establishes the core PhiN residue bound via the transport decomposition. - Marcus, Spielman, Srivastava, *Interlacing families II* -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Continuity.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Continuity.lean index 95c8a1013b..552d3dca70 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Continuity.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Continuity.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.InvPhiN +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.InvPhiN +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RealRoots +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Continuity of invPhiNPoly at Squarefree Points @@ -24,6 +32,8 @@ with respect to coefficient perturbation. The argument proceeds in three steps: -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section @@ -184,28 +194,21 @@ lemma sorted_roots_in_disjoint_intervals (n : ℕ) (_hn : 2 ≤ n) have := Finset.card_le_card_of_injOn c (fun k hk => hc_lt k (Finset.mem_Iic.mp hk)) (fun k1 _ k2 _ h => hc_inj h) - simp_all + rw [Fin.card_Iic, Fin.card_Iio] at this + omega /-! ### Auxiliary: Inverse continuity at positive reals -/ /-- 1/x is continuous at a > 0: for any ε > 0, there exists δ > 0 such that if |y - a| < δ and y > 0, then |1/y - 1/a| < ε. - Proof: choose δ = min(a/2, ε·a²/2). Then y > a/2, so y·a > a²/2, - and |1/y - 1/a| = |y - a|/(y·a) < (ε·a²/2)/(a²/2) = ε. -/ + This is the epsilon-delta formulation of continuity of inversion away from zero. -/ lemma inv_continuous_at_pos (a : ℝ) (ha : 0 < a) (ε : ℝ) (hε : 0 < ε) : ∃ δ > 0, ∀ y : ℝ, 0 < y → |y - a| < δ → |1 / y - 1 / a| < ε := by - refine ⟨min (a / 2) (ε * a ^ 2 / 2), by positivity, fun y hy hya ↦ ?_⟩ - have hya1 : |y - a| < a / 2 := lt_of_lt_of_le hya (min_le_left _ _) - have hya2 : |y - a| < ε * a ^ 2 / 2 := lt_of_lt_of_le hya (min_le_right _ _) - have hy_lb : a / 2 < y := by have := (abs_lt.mp hya1).1; linarith - -- |1/y - 1/a| = |y - a| / (y * a) - have key : |1 / y - 1 / a| = |y - a| / (y * a) := by - rw [div_sub_div 1 1 hy.ne' ha.ne', - show (1 : ℝ) * a - y * 1 = -(y - a) from by ring, - abs_div, abs_neg, abs_of_pos (mul_pos hy ha)] - rw [key, div_lt_iff₀ (mul_pos hy ha)] - calc |y - a| < ε * a ^ 2 / 2 := hya2 - _ < ε * (y * a) := by nlinarith [mul_lt_mul_of_pos_right hy_lb (mul_pos hε ha)] + have hcont : ContinuousAt (fun y : ℝ ↦ 1 / y) a := + continuousAt_const.div continuousAt_id ha.ne' + obtain ⟨δ, hδ, hbound⟩ := Metric.continuousAt_iff.mp hcont ε hε + refine ⟨δ, hδ, fun y _ hya ↦ ?_⟩ + simpa only [Real.dist_eq] using hbound (by simpa only [Real.dist_eq] using hya) /-! ### Root perturbation for squarefree real-rooted polynomials -/ @@ -437,7 +440,9 @@ lemma roots_perturb_close (n : ℕ) (hn : 2 ≤ n) (p : ℝ[X]) have hne : (Finset.univ : Finset (Fin n)).Nonempty := ⟨⟨0, by omega⟩, Finset.mem_univ _⟩ refine ⟨Finset.univ.inf' hne (fun i => min (|p.eval (roots_p i + ε')|) (|p.eval (roots_p i - ε')|)), ?_, ?_, ?_⟩ - · simp_all + · exact (Finset.lt_inf'_iff _).2 fun i _ ↦ + lt_min (abs_pos.mpr (hp_nonzero_boundary i).1) + (abs_pos.mpr (hp_nonzero_boundary i).2) · intro i; exact le_trans (Finset.inf'_le _ (Finset.mem_univ i)) (min_le_left _ _) · intro i; exact le_trans (Finset.inf'_le _ (Finset.mem_univ i)) (min_le_right _ _) obtain ⟨min_val, hmin_val_pos, hmin_val_plus, hmin_val_minus⟩ := hp_boundary_pos @@ -535,16 +540,15 @@ lemma PhiN_continuous_at_roots (n : ℕ) (hn : 2 ≤ n) ⟨(⟨0, by omega⟩, ⟨1, by omega⟩), Finset.mem_filter.mpr ⟨Finset.mem_product.mpr ⟨Finset.mem_univ _, Finset.mem_univ _⟩, h01⟩⟩ set gap := pairSet.inf' hpair_nonempty (fun p ↦ |roots_p p.1 - roots_p p.2|) - have hgap_pos : 0 < gap := by - obtain ⟨p, hp, hpeq⟩ := Finset.exists_mem_eq_inf' hpair_nonempty - (fun p ↦ |roots_p p.1 - roots_p p.2|) - linarith [abs_pos.mpr (hne p.1 p.2 (Finset.mem_filter.mp hp).2)] + have hgap_pos : 0 < gap := + (Finset.lt_inf'_iff _).2 fun p hp ↦ + abs_pos.mpr (hne p.1 p.2 (Finset.mem_filter.mp hp).2) have hgap_le : ∀ i j : Fin n, i ≠ j → gap ≤ |roots_p i - roots_p j| := by intro i j hij have h_mem : (i, j) ∈ pairSet := by rw [Finset.mem_filter] exact ⟨Finset.mem_product.mpr ⟨Finset.mem_univ i, Finset.mem_univ j⟩, hij⟩ - exact Finset.inf'_le (fun p ↦ |roots_p p.1 - roots_p p.2|) h_mem + exact Finset.inf'_le _ h_mem -- Step 2: Upper bound M on |roots_p i - roots_p j| set R := (Finset.univ : Finset (Fin n)).sum (fun i ↦ |roots_p i|) have hR_nonneg : 0 ≤ R := Finset.sum_nonneg (fun i _ ↦ abs_nonneg _) @@ -666,7 +670,8 @@ lemma PhiN_continuous_at_roots (n : ℕ) (hn : 2 ≤ n) have hbound_half : ↑n ^ 2 * (24 * δ * M / gap ^ 4) ≤ ε / 2 := by have h1 : 24 * δ * M / gap ^ 4 ≤ 24 * (ε * gap ^ 4 / (48 * ↑n ^ 2 * M)) * M / gap ^ 4 := by apply div_le_div_of_nonneg_right _ (by positivity) - simp_all + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hδ_le_eps (by norm_num)) hM_pos.le have h2 : 24 * (ε * gap ^ 4 / (48 * ↑n ^ 2 * M)) * M / gap ^ 4 = ε / (2 * ↑n ^ 2) := by field_simp @@ -762,7 +767,8 @@ theorem invPhiN_poly_continuous_at_squarefree (n : ℕ) (hn : 2 ≤ n) PhiN n roots_p| < ε₁ := hε₂ roots_q hroots_q_strict.injective hroots_q_close -- |1/PhiN(q) - 1/PhiN(p)| < ε (from inverse continuity) - simp_all + rw [hinv_q, hinv_p] + exact hε₁ _ hPhiN_q_pos hPhiN_close end Problem4 diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Defs.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Defs.lean index 118e70ee4a..a13a2be3b9 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Defs.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Defs.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import Mathlib.Algebra.Polynomial.Degree.Defs +public import Mathlib.Algebra.Polynomial.Eval.Defs +public import Mathlib.Basic.Real.Basic +public meta import Mathlib.Tactic.ToAdditive +meta import Lean.Meta.Tactic.NormCast import Mathlib.Algebra.BigOperators.Field +import Mathlib.Algebra.Order.BigOperators.Expect import Mathlib.Algebra.Order.Ring.Star import Mathlib.Algebra.Polynomial.BigOperators -import Mathlib.Analysis.RCLike.Basic +import Mathlib.Analysis.Normed.Field.Basic +import Mathlib.Analysis.Real.Sqrt import Mathlib.Data.Int.Star /-! @@ -36,6 +45,8 @@ This file defines the core algebraic objects for the finite additive convolution - `p ⊞[n] q` is used for `polyBoxPlus n p q` -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Density.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Density.lean index 8387ed75a1..9f40c6c159 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Density.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Density.lean @@ -3,6 +3,11 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import Mathlib.Algebra.Polynomial.Splits +public import Mathlib.Algebra.Squarefree.Basic +public import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.Complex.Polynomial.Basic /-! @@ -17,6 +22,8 @@ Monic real-rooted polynomials can be approximated by squarefree ones. also all-real-rooted, with coefficients within ε. -/ +@[expose] public section + open Polynomial BigOperators Nat Finset noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/HarmonicBound.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/HarmonicBound.lean index 235d257403..382f6231bb 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/HarmonicBound.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/HarmonicBound.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Fintype.Basic +public import Mathlib.Basic.Real.Basic +meta import Lean.Meta.Tactic.NormCast import Mathlib.Algebra.BigOperators.Field -import Mathlib.Analysis.RCLike.Basic +import Mathlib.Algebra.Order.BigOperators.Expect import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Normed.Group.Basic /-! # Jensen Inequality, Cauchy-Schwarz, and Harmonic Sum Bound @@ -21,6 +28,8 @@ reciprocals and the Cauchy-Schwarz inequality for finite sums. - `harmonic_sum_bound`: ∑ 1/wConv ≤ Ap·Aq/(Ap+Aq) -/ +@[expose] public section + open BigOperators Nat noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/InvPhiN.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/InvPhiN.lean index 5a57e73afd..3ea867557a 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/InvPhiN.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/InvPhiN.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.SignSquarefree +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.PhiN +public import Mathlib.Algebra.Squarefree.Basic +public import Mathlib.Analysis.CStarAlgebra.Classes +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.SignSquarefree +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Inverse PhiN: Polynomial-Level Definition and Properties @@ -27,6 +36,8 @@ connection lemma showing it equals `1/PhiN` for any choice of root vector. - `invPhiN_poly_eq_inv_PhiN`: `invPhiNPoly n p = 1 / PhiN n roots` for any root vector -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Obreschkoff.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Obreschkoff.lean index 07be2d1903..bfd4f0e586 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Obreschkoff.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Obreschkoff.lean @@ -3,8 +3,19 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import Mathlib.Algebra.Polynomial.Derivative +public import Mathlib.Algebra.Squarefree.Basic +public import Mathlib.Analysis.CStarAlgebra.Classes +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RealRoots +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Residue import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RootContinuity import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.SignSquarefree +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Topology.Algebra.Polynomial /-! # Interlacing Sign Conditions and Obreschkoff Theorem @@ -19,6 +30,8 @@ and the backward Hermite-Kakeya theorem. - `eval_div_deriv_pos_of_pencil_real`: Positivity via pencil and GCD factoring -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section @@ -216,17 +229,10 @@ private lemma pencil_root_perturbation_contradiction (m : ℕ) (hm : 2 ≤ m) (f linarith [min_le_right ((x_star - a) / 2) ((b - x_star) / 2)] -- z_re is a real root of r + C d * f have hz_re_root : (r + C d * f).IsRoot z_re := by - have h := hz_pencil - rw [hz_eq, Polynomial.IsRoot, Polynomial.eval_map] at h - rw [Polynomial.IsRoot] - have eval_cast : ∀ (q : ℝ[X]), - (algebraMap ℝ ℂ) (eval z_re q) = eval₂ (algebraMap ℝ ℂ) (↑z_re) q := by - intro q; induction q using Polynomial.induction_on' with - | add p q hp hq => simp [eval_add, eval₂_add, map_add, hp, hq] - | monomial n a => simp [eval_monomial, eval₂_monomial, map_mul, map_pow] - have h2 := eval_cast (r + C d * f) - rw [h] at h2 - exact Complex.ofReal_eq_zero.mp h2 + apply Complex.ofReal_eq_zero.mp + change (algebraMap ℝ ℂ) (eval z_re (r + C d * f)) = 0 + rw [← eval₂_at_apply] + simpa only [hz_eq, IsRoot, eval_map, Complex.coe_algebraMap] using hz_pencil -- (L) c_star + Δ ∈ T, contradicting sSup have h_ub : c_star + Δ ≤ c_star := hcstar_ub (c_star + Δ) (by linarith) ⟨z_re, hz_re_a, hz_re_b, hz_re_root⟩ @@ -298,9 +304,9 @@ lemma pencil_root_in_interval (m : ℕ) (hm : 2 ≤ m) simp only [sgn]; split_ifs <;> simp [abs_of_pos, abs_of_nonpos] have hsgn_opp : sgn * f.eval x₀ * r.eval x₀ < 0 := by simp only [sgn]; split_ifs with h - · nlinarith - · push Not at h - linarith [lt_of_le_of_ne h (mul_ne_zero hfx₀ hrx₀)] + · simpa only [neg_one_mul, neg_mul, one_mul] using neg_neg_of_pos h + · simpa only [one_mul] using + lt_of_le_of_ne (le_of_not_gt h) (mul_ne_zero hfx₀ hrx₀) -- (F) Small-parameter IVT set t₀ := |r.eval x₀| / (2 * |f.eval x₀|) with t₀_def have ht₀_pos : 0 < t₀ := div_pos (abs_pos.mpr hrx₀) (mul_pos two_pos (abs_pos.mpr hfx₀)) @@ -315,25 +321,28 @@ lemma pencil_root_in_interval (m : ℕ) (hm : 2 ≤ m) _ < |r.eval x₀| := by linarith [abs_pos.mpr hrx₀] have hpt_x₀_pos : 0 < r.eval x₀ * (r + C (sgn * t₀) * f).eval x₀ := by simp only [eval_add, eval_mul, eval_C] - have ring_id : eval x₀ r * (eval x₀ r + sgn * t₀ * eval x₀ f) = - (eval x₀ r) ^ 2 + eval x₀ r * (sgn * t₀ * eval x₀ f) := by ring - rw [ring_id] - have h_neg_abs := neg_abs_le (eval x₀ r * (sgn * t₀ * eval x₀ f)) - have h_abs_mul : |eval x₀ r * (sgn * t₀ * eval x₀ f)| = - |eval x₀ r| * |sgn * t₀ * eval x₀ f| := abs_mul _ _ - have h_bound2 := mul_lt_mul_of_pos_left hbound (abs_pos.mpr hrx₀) - have h_sq : |eval x₀ r| * |eval x₀ r| = (eval x₀ r) ^ 2 := by rw [← sq_abs]; ring - nlinarith + rw [mul_add] + have h_bound := mul_lt_mul_of_pos_left hbound (abs_pos.mpr hrx₀) + rw [← abs_mul, ← abs_mul, abs_mul_self] at h_bound + linarith only [h_bound, neg_abs_le (eval x₀ r * (sgn * t₀ * eval x₀ f))] have hpt_opp : (r + C (sgn * t₀) * f).eval a * (r + C (sgn * t₀) * f).eval x₀ < 0 := by rw [hpt_a] - suffices h : sgn * eval a f * (r + C (sgn * t₀) * f).eval x₀ < 0 by nlinarith + suffices h : sgn * eval a f * (r + C (sgn * t₀) * f).eval x₀ < 0 by + calc sgn * t₀ * eval a f * (r + C (sgn * t₀) * f).eval x₀ + = t₀ * (sgn * eval a f * (r + C (sgn * t₀) * f).eval x₀) := by ring + _ < 0 := mul_neg_of_pos_of_neg ht₀_pos h have hfa_fx₀ := hf_same_sign x₀ hx₀_Icc have hsgn_fa_r : sgn * eval a f * eval x₀ r < 0 := by have prod_neg := mul_neg_of_neg_of_pos hsgn_opp hfa_fx₀ rw [show sgn * eval x₀ f * eval x₀ r * (eval a f * eval x₀ f) = sgn * eval a f * eval x₀ r * (eval x₀ f) ^ 2 from by ring] at prod_neg - nlinarith [sq_pos_of_ne_zero hfx₀] - nlinarith [mul_neg_of_neg_of_pos hsgn_fa_r hpt_x₀_pos, sq_pos_of_ne_zero hrx₀] + exact neg_of_mul_neg_left prod_neg (sq_nonneg _) + have prod_neg := mul_neg_of_neg_of_pos hsgn_fa_r hpt_x₀_pos + rw [show sgn * eval a f * eval x₀ r * (eval x₀ r * + (r + C (sgn * t₀) * f).eval x₀) = + (sgn * eval a f * (r + C (sgn * t₀) * f).eval x₀) * (eval x₀ r) ^ 2 from by ring] + at prod_neg + exact neg_of_mul_neg_left prod_neg (sq_nonneg _) obtain ⟨root₀, hroot₀_a, hroot₀_x₀, hroot₀_eq⟩ := poly_ivt_opp_sign (r + C (sgn * t₀) * f) a x₀ hx₀_a hpt_opp -- (G) T is nonempty @@ -350,19 +359,19 @@ lemma pencil_root_in_interval (m : ℕ) (hm : 2 ≤ m) set m_f := |f.eval xm| with m_f_def have hm_f_pos : 0 < m_f := abs_pos.mpr (hno_Icc xm hxm_mem) have hT_bdd : BddAbove T := by - refine ⟨M_r / m_f + 1, fun t ht ↦ ?_⟩ + refine ⟨M_r / m_f, fun t ht ↦ ?_⟩ obtain ⟨ht_pos, x, hax, hxb, hroot⟩ := ht - by_contra h_gt; push Not at h_gt have hx_Icc : x ∈ Set.Icc a b := ⟨le_of_lt hax, le_of_lt hxb⟩ - have h_fx : m_f ≤ |f.eval x| := hxm_min hx_Icc have hroot_eval : r.eval x + sgn * t * f.eval x = 0 := by - have := hroot; rw [IsRoot] at this; simp [eval_add, eval_mul, eval_C] at this; linarith + simpa only [IsRoot, eval_add, eval_mul, eval_C] using hroot have h_abs_eq : |r.eval x| = t * |f.eval x| := by - rw [show r.eval x = -(sgn * t * f.eval x) from by linarith, - abs_neg, abs_mul, abs_mul, abs_of_pos ht_pos, hsgn_abs, one_mul] - have h_rx : |r.eval x| ≤ M_r := hxM_max hx_Icc - have h2 : M_r < t * m_f := (div_lt_iff₀ hm_f_pos).mp (by linarith) - linarith [mul_le_mul_of_nonneg_left h_fx (le_of_lt ht_pos)] + rw [eq_neg_of_add_eq_zero_left hroot_eval, abs_neg, abs_mul, abs_mul, + abs_of_pos ht_pos, hsgn_abs, one_mul] + apply (le_div_iff₀ hm_f_pos).mpr + calc t * m_f ≤ t * |f.eval x| := + mul_le_mul_of_nonneg_left (hxm_min hx_Icc) ht_pos.le + _ = |r.eval x| := h_abs_eq.symm + _ ≤ M_r := hxM_max hx_Icc -- (I) sSup argument set c_star := sSup T with c_star_def have hcstar_pos : 0 < c_star := @@ -380,32 +389,33 @@ lemma pencil_root_in_interval (m : ℕ) (hm : 2 ≤ m) set M_f := |f.eval xMf| have hM_f_pos : 0 < M_f := lt_of_lt_of_le hm_f_pos (hxMf_max hxm_mem) set δ := ε₀ / (M_f + 1) - have hδ_pos : 0 < δ := div_pos hε₀_pos (by linarith) + have hδ_pos : 0 < δ := div_pos hε₀_pos (add_pos hM_f_pos one_pos) obtain ⟨t, ht_mem, ht_close⟩ := exists_lt_of_lt_csSup hT_ne - (by linarith : c_star - δ < c_star) + (sub_lt_self c_star hδ_pos) have ht_le : t ≤ c_star := le_csSup hT_bdd ht_mem obtain ⟨ht_pos, x_t, hx_t_a, hx_t_b, hx_t_root⟩ := ht_mem have hx_t_Icc : x_t ∈ Set.Icc a b := ⟨le_of_lt hx_t_a, le_of_lt hx_t_b⟩ have heval_t : r.eval x_t + sgn * t * f.eval x_t = 0 := by - have := hx_t_root; rw [IsRoot] at this - simp [eval_add, eval_mul, eval_C] at this; linarith + simpa only [IsRoot, eval_add, eval_mul, eval_C] using hx_t_root have hpc_xt : (r + C (sgn * c_star) * f).eval x_t = sgn * (c_star - t) * f.eval x_t := by - simp [eval_add, eval_mul, eval_C]; linarith + simp only [eval_add, eval_mul, eval_C] + linear_combination heval_t have h_ct : |c_star - t| < δ := by - rw [abs_of_nonneg (by linarith : (0 : ℝ) ≤ c_star - t)]; linarith + rw [abs_of_nonneg (sub_nonneg.mpr ht_le)] + exact sub_lt_comm.mp ht_close have h_fx_le : |f.eval x_t| ≤ M_f := hxMf_max hx_t_Icc have hpc_abs_lt : |(r + C (sgn * c_star) * f).eval x_t| < ε₀ := by rw [hpc_xt, abs_mul, abs_mul, hsgn_abs, one_mul] - rcases eq_or_lt_of_le (abs_nonneg (f.eval x_t)) with hf0 | hf_pos - · rw [hf0.symm, mul_zero]; exact hε₀_pos - · calc |c_star - t| * |f.eval x_t| - < δ * |f.eval x_t| := mul_lt_mul_of_pos_right h_ct hf_pos - _ ≤ δ * M_f := mul_le_mul_of_nonneg_left h_fx_le (le_of_lt hδ_pos) - _ = ε₀ * M_f / (M_f + 1) := by ring - _ < ε₀ := (div_lt_iff₀ (by linarith : (0 : ℝ) < M_f + 1)).mpr (by linarith) + calc |c_star - t| * |f.eval x_t| + ≤ |c_star - t| * M_f := mul_le_mul_of_nonneg_left h_fx_le (abs_nonneg _) + _ < δ * M_f := mul_lt_mul_of_pos_right h_ct hM_f_pos + _ = ε₀ * M_f / (M_f + 1) := by ring + _ < ε₀ := by + apply (div_lt_iff₀ (add_pos hM_f_pos one_pos)).mpr + simpa only [mul_add, mul_one] using lt_add_of_pos_right (ε₀ * M_f) hε₀_pos have h_min : ε₀ ≤ |(r + C (sgn * c_star) * f).eval x_t| := hxmin_min hx_t_Icc - linarith + exact hpc_abs_lt.not_ge h_min -- (J) Root is in (a,b) obtain ⟨x_star, hx_star_Icc, hx_star_root⟩ := hroot_cstar have hsgn_cstar_ne : sgn * c_star ≠ 0 := mul_ne_zero hsgn_ne (ne_of_gt hcstar_pos) diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/ObreschkoffTransport.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/ObreschkoffTransport.lean index 4f4ec25a8e..fd77d1eae9 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/ObreschkoffTransport.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/ObreschkoffTransport.lean @@ -3,8 +3,19 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.PhiN +public import Mathlib.Algebra.Squarefree.Basic +public import Mathlib.Analysis.CStarAlgebra.Classes import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Obreschkoff import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RPoly +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RealRoots +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.RingTheory.Polynomial.UniqueFactorization +import Mathlib.RingTheory.SimpleRing.Principal +import Mathlib.Tactic.Positivity.Finset /-! # Transport Matrix Nonnegativity via Obreschkoff @@ -19,6 +30,8 @@ real-rootedness of box-plus convolution. via pencil real-rootedness -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section @@ -86,8 +99,8 @@ lemma transportMatrix_entry_nonneg_of_obreschkoff exact hrq_monic.leadingCoeff have hc0 : boxPlusConv m (polyToCoeffs (lagrangeBasis rp (critPtsP j)) m) (polyToCoeffs rq m) 0 = 0 := by - unfold boxPlusConv boxPlusCoeff - simp_all + simp only [boxPlusConv, Nat.zero_le, ite_true, boxPlusCoeff, Nat.zero_add, + Finset.sum_range_one, Nat.sub_zero, ha0, zero_mul, mul_zero] have hc1 : boxPlusConv m (polyToCoeffs (lagrangeBasis rp (critPtsP j)) m) (polyToCoeffs rq m) 1 = 1 := by simp only [boxPlusConv, show (1 : ℕ) ≤ m from hm, ite_true, boxPlusCoeff] @@ -113,7 +126,8 @@ lemma transportMatrix_entry_nonneg_of_obreschkoff have hnd : f.natDegree = m := by omega have hlc_zero : f.leadingCoeff = 0 := by rw [leadingCoeff, hnd]; exact hf_coeff_m - simp_all + rw [leadingCoeff_eq_zero.mp hlc_zero, coeff_zero] at hf_coeff_m1 + exact zero_ne_one hf_coeff_m1 · exact le_natDegree_of_ne_zero (by rw [hf_coeff_m1]; exact one_ne_zero) have hf_monic : f.Monic := by rw [Monic, leadingCoeff, hf_deg, hf_coeff_m1] -- Case split: if f(μ_i) = 0, then K_{ij} = 0/r'(μ_i) = 0 ≥ 0 @@ -146,8 +160,7 @@ lemma transportMatrix_entry_nonneg_of_obreschkoff set pd := rp + Polynomial.C d * ℓ_j with pd_eq have hlin : polyBoxPlus m pd rq = r + Polynomial.C d * f := by - rw [pd_eq, polyBoxPlus_add_left, polyBoxPlus_C_mul] - simp_all + rw [pd_eq, polyBoxPlus_add_left, polyBoxPlus_C_mul, ← hConv] rw [← hlin] at hz have hrp_factor : rp = (X - C (critPtsP j)) * ℓ_j := by diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/PhiN.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/PhiN.lean index 17d9ac2c07..58f7e5fa69 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/PhiN.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/PhiN.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Defs -import Mathlib.LinearAlgebra.Lagrange +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Defs +public import Mathlib.LinearAlgebra.Lagrange +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt /-! # PhiN, Critical Values, and Partial Fractions @@ -29,6 +34,8 @@ and cross-term vanishing. - `cross_term_vanishing`: Cross terms vanish in the PhiN expansion -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/RPoly.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/RPoly.lean index 75703d8753..5706fbeec7 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/RPoly.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/RPoly.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.PhiN import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Residue +import Mathlib.Algebra.BigOperators.Field +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt /-! # RPoly Lemmas, Transport Identity, and Polar Decomposition @@ -21,6 +28,8 @@ and the polar decomposition for box-plus convolution. - `polyBoxPlus_add_left`: Additivity of polyBoxPlus in first argument -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/RealRoots.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/RealRoots.lean index c83ed93a4c..df2051fc92 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/RealRoots.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/RealRoots.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.PhiN -import Mathlib.Analysis.CStarAlgebra.Classes +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.PhiN +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Convex.Basic +import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.Complex.Convex import Mathlib.Analysis.Complex.Polynomial.GaussLucas import Mathlib.Analysis.Polynomial.Basic -import Mathlib.Algebra.Order.Star.Real import Mathlib.RingTheory.SimpleRing.Principal /-! @@ -28,6 +31,8 @@ sign conditions. - `monic_alternating_has_real_roots`: Alternating signs imply n real roots -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Residue.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Residue.lean index c5752869e2..3b6f2c296a 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Residue.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Residue.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.PhiN +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.PhiN +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.Normed.Field.Basic +import Mathlib.Analysis.Real.Sqrt /-! # Second Derivative, Residue Formula, and Linearity @@ -22,6 +28,8 @@ linearity of polyBoxPlus in its first argument. - `sum_lagrangeBasis_boxPlus_eq_deriv`: ∑ⱼ (ℓⱼ ⊞ rq) = r' (equation 2.18) -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/RootContinuity.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/RootContinuity.lean index 205f41c9d4..6cb68fc2c0 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/RootContinuity.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/RootContinuity.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import Mathlib.Analysis.CStarAlgebra.Classes +module + +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.RingTheory.SimpleRing.Principal +public import Mathlib.Algebra.Polynomial.Roots import Mathlib.Analysis.Complex.Polynomial.Basic -import Mathlib.RingTheory.SimpleRing.Principal /-! # Root Continuity: Continuous Dependence of Polynomial Roots @@ -20,6 +23,8 @@ the coefficients: if `f(a) = 0`, then for any `ε > 0`, there exists - `polynomial_root_perturbation_real`: Root perturbation theorem (real version) -/ +@[expose] public section + namespace Problem4 open Polynomial diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/SignSquarefree.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/SignSquarefree.lean index 62bc8a3dd6..5f24d0efad 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/SignSquarefree.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/SignSquarefree.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.PhiN +public import Mathlib.Algebra.Squarefree.Basic +public import Mathlib.Analysis.CStarAlgebra.Classes import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RealRoots import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Residue +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Complex.Polynomial.Basic +import Mathlib.Data.Int.Star +import Mathlib.RingTheory.SimpleRing.Principal /-! # Translation Invariance, Sign Between Roots, Squarefree Lemmas @@ -24,6 +34,8 @@ for polynomials with distinct real roots. - `squarefree_comp_X_sub_C`: Squarefree is preserved under translation -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Transport.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Transport.lean index dbf07b0ed9..9b4ca97cee 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Transport.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/Transport.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.PhiN import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RPoly +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Residue +import Mathlib.Algebra.BigOperators.Field +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt /-! # Doubly Stochastic Transport and Critical Value Decomposition @@ -18,6 +26,8 @@ interlacing, and establishes the critical value decomposition identity. via transport matrices -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/TransportDecomp.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/TransportDecomp.lean index 1f23044165..cd8e67c762 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/TransportDecomp.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Auxiliary/TransportDecomp.lean @@ -3,9 +3,20 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.PhiN +public import Mathlib.Algebra.Squarefree.Basic +public import Mathlib.Analysis.CStarAlgebra.Classes import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.HarmonicBound import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.ObreschkoffTransport +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RealRoots +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Residue +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.SignSquarefree import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Transport +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Transport Decomposition and Critical Value Positivity @@ -25,6 +36,8 @@ and the resulting critical value positivity theorems. - Marcus, Spielman, Srivastava, *Interlacing families II* -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section @@ -302,10 +315,13 @@ lemma criticalValue_boxPlus_pos (n : ℕ) (hn : 2 ≤ n) rw [rPoly_comp_X_sub_C n p ap, rPoly_comp_X_sub_C n q aq, T_def] exact boxPlus_translate (n - 1) (rPoly n p) (rPoly n q) ap aq hrp_deg_le hrq_deg_le set μ' : Fin (n - 1) → ℝ := fun j ↦ μ j + T with μ'_def - have hμ'_strict : StrictMono μ' := by - intro j k hjk; simp only [μ'_def]; linarith [hμ_strict hjk] + have hμ'_strict : StrictMono μ' := + fun j k hjk ↦ add_lt_add_of_lt_of_le (hμ_strict hjk) le_rfl have hμ'_roots : ∀ j, (polyBoxPlus (n - 1) (rPoly n pc) (rPoly n qc)).IsRoot (μ' j) := by - simp_all + intro j + rw [hconv_shift] + simpa only [IsRoot, eval_comp, eval_sub, eval_X, eval_C, μ'_def, add_sub_cancel_right] + using hμ_roots j have hpc_sf : Squarefree pc := squarefree_comp_X_sub_C p ap hp_sf have hqc_sf : Squarefree qc := squarefree_comp_X_sub_C q aq hq_sf have hpos := criticalValue_boxPlus_pos_centered n hn pc qc diff --git a/LeanPool/ArchonFirstProofResults/FirstProof4/Problem4.lean b/LeanPool/ArchonFirstProofResults/FirstProof4/Problem4.lean index d63d4d120a..497677b2b0 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof4/Problem4.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof4/Problem4.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.InvPhiN import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.BoxPlusRealRoots import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Continuity import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.Density +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RealRoots +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RootContinuity +import LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.SignSquarefree +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Complex.Polynomial.Basic /-! # Problem 4: Harmonic-Mean Inequality for Finite Additive Convolution @@ -30,6 +39,8 @@ the harmonic mean inequality for Φₙ under box-plus convolution. - Marcus, Spielman, Srivastava, *Interlacing families II* -/ +@[expose] public section + open Polynomial BigOperators Nat noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof6.lean b/LeanPool/ArchonFirstProofResults/FirstProof6.lean index 1c5cb70f82..ffaee939ae 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof6.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof6.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary -import LeanPool.ArchonFirstProofResults.FirstProof6.Problem6 +module + +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary +public import LeanPool.ArchonFirstProofResults.FirstProof6.Problem6 /-! # Problem 6 — Large `ε`-light vertex subsets @@ -18,3 +20,5 @@ Laplacian of the induced subgraph on `S`. The main result The proof lives in `Problem6`; supporting infrastructure is in the `Auxiliary` sub-modules. -/ + +@[expose] public section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary.lean b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary.lean index 07008085bd..143ebc1f15 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.BarrierPotential -import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.ColoringFramework -import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.DynamicColoring -import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.LaplacianBasics -import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.LoewnerPullback -import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.OneSidedBarrier -import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.ResolventBound +module + +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.BarrierPotential +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.ColoringFramework +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.DynamicColoring +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.LaplacianBasics +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.LoewnerPullback +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.OneSidedBarrier +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.ResolventBound /-! # Problem 6 — auxiliary modules @@ -24,3 +26,5 @@ Re-exports all auxiliary sub-modules used by `Problem6`: - `DynamicColoring`: induced-Laplacian monotonicity and positive semidefiniteness - `LoewnerPullback`: Loewner pullback to `ε`-lightness -/ + +@[expose] public section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/BarrierPotential.lean b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/BarrierPotential.lean index 504ab1c749..f943b70a27 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/BarrierPotential.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/BarrierPotential.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import Mathlib.Analysis.Matrix.PosDef +module + +public import Mathlib.Analysis.Matrix.Spectrum +public import Mathlib.LinearAlgebra.Matrix.PosDef import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Matrix.PosDef /-! # Problem 6: Large epsilon-light vertex subsets -- Barrier Potential @@ -27,6 +31,8 @@ unitary conjugation, and the Neumann-Loewner trace bound. - `Problem6.eigenvalue_le_trace_of_posSemidef`: eigenvalue-trace bound -/ +@[expose] public section + open Finset Matrix BigOperators noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/ColoringFramework.lean b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/ColoringFramework.lean index 53ce3876da..71e1481bd5 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/ColoringFramework.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/ColoringFramework.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Combinatorics.SimpleGraph.Basic +module + +public import Mathlib.LinearAlgebra.Matrix.PosDef +public import Mathlib.Algebra.Order.Archimedean.Real.Basic +import Mathlib.Algebra.Order.Algebra import Mathlib.Algebra.Order.Star.Real -import Mathlib.LinearAlgebra.Matrix.PosDef +import Mathlib.Analysis.Complex.Order +import Mathlib.Analysis.RCLike.Basic +import Mathlib.Combinatorics.SimpleGraph.Init /-! # Problem 6: Large epsilon-light vertex subsets -- Coloring Framework @@ -27,6 +32,8 @@ and `barrier_parameter_bound`. - `Problem6.barrier_parameter_bound`: final parameter bound -/ +@[expose] public section + open Finset Matrix BigOperators noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/DynamicColoring.lean b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/DynamicColoring.lean index 51dc95e185..0d0f08175c 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/DynamicColoring.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/DynamicColoring.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.ColoringFramework -import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.LoewnerPullback +module + +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.LaplacianBasics +import Mathlib.Algebra.Order.Star.Real /-! # Problem 6: Large epsilon-light vertex subsets -- Dynamic Coloring @@ -13,6 +15,8 @@ Key infrastructure for the dynamic BSS coloring: pseudo-inverse pullback, projection identity, normalized monochromatic PSD. -/ +@[expose] public section + open Finset Matrix BigOperators noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/LaplacianBasics.lean b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/LaplacianBasics.lean index c6a5058205..93a03728ba 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/LaplacianBasics.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/LaplacianBasics.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import Mathlib.Combinatorics.SimpleGraph.LapMatrix +module + +public import Mathlib.Combinatorics.SimpleGraph.LapMatrix /-! # Problem 6: Large epsilon-light vertex subsets -- Laplacian Basics @@ -28,6 +30,8 @@ with mathlib's `lapMatrix`. - `Problem6.lapMatrix_loewner_mono`: Loewner monotonicity for lapMatrix -/ +@[expose] public section + open Finset Matrix BigOperators noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/LoewnerPullback.lean b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/LoewnerPullback.lean index 8ae474b381..38c4affdda 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/LoewnerPullback.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/LoewnerPullback.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ -import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.LaplacianBasics +module + +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.LaplacianBasics +import Mathlib.Algebra.Order.Star.Real /-! # Problem 6: Large epsilon-light vertex subsets -- Loewner Pullback @@ -11,6 +14,8 @@ import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.LaplacianBasics Congruence pullbacks for Loewner order and epsilon-lightness from Loewner bound. -/ +@[expose] public section + open Finset Matrix BigOperators noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/OneSidedBarrier.lean b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/OneSidedBarrier.lean index e1c5cc33e4..94a168ffbb 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/OneSidedBarrier.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/OneSidedBarrier.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.BarrierPotential import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.ResolventBound +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Matrix.PosDef /-! # Problem 6: Large epsilon-light vertex subsets -- One-Sided Barrier @@ -11,6 +16,8 @@ import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.ResolventBound One-sided barrier machinery for the BSS coloring argument. -/ +@[expose] public section + open Finset Matrix BigOperators noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/ResolventBound.lean b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/ResolventBound.lean index fa2c48a60c..c4ded53303 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/ResolventBound.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof6/Auxiliary/ResolventBound.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import Mathlib.LinearAlgebra.Matrix.PosDef import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.BarrierPotential +import Mathlib.Analysis.Matrix.PosDef /-! # Problem 6: Large epsilon-light vertex subsets -- Resolvent Bound @@ -11,6 +15,8 @@ import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.BarrierPotential `psd_resolvent_trace_bound`: `tr((U⁻¹ - B)⁻¹) ≤ tr(U) + tr(B·U²) / (1 - tr(B·U))`. -/ +@[expose] public section + open Finset Matrix BigOperators noncomputable section diff --git a/LeanPool/ArchonFirstProofResults/FirstProof6/Problem6.lean b/LeanPool/ArchonFirstProofResults/FirstProof6/Problem6.lean index c1d6ce127d..86011b2947 100644 --- a/LeanPool/ArchonFirstProofResults/FirstProof6/Problem6.lean +++ b/LeanPool/ArchonFirstProofResults/FirstProof6/Problem6.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 FrenzyMath. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FrenzyMath -/ +module + +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.BarrierPotential +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.ColoringFramework +public import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.LaplacianBasics import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.DynamicColoring +import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.LoewnerPullback import LeanPool.ArchonFirstProofResults.FirstProof6.Auxiliary.OneSidedBarrier +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Matrix.PosDef /-! # Problem 6: Large epsilon-light vertex subsets -- Main Proof @@ -19,6 +27,8 @@ All auxiliary infrastructure is in `Problem6Aux.lean`. with `|S| >= epsilon/256 * |V|` -/ +@[expose] public section + open Finset Matrix BigOperators noncomputable section diff --git a/LeanPool/ArtinWedderburn.lean b/LeanPool/ArtinWedderburn.lean index f4f70262be..483faf7233 100644 --- a/LeanPool/ArtinWedderburn.lean +++ b/LeanPool/ArtinWedderburn.lean @@ -3,19 +3,25 @@ Copyright (c) 2026 Matevz Miščič, Maša Žaucer, Job Petrovčič. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Matevz Miščič, Maša Žaucer, Job Petrovčič -/ +module -import LeanPool.ArtinWedderburn.IdealProd -import LeanPool.ArtinWedderburn.SetProd -import LeanPool.ArtinWedderburn.Auxiliary -import LeanPool.ArtinWedderburn.NonUnitalToUnital -import LeanPool.ArtinWedderburn.PrimeRing -import LeanPool.ArtinWedderburn.CornerRing -import LeanPool.ArtinWedderburn.MinIdeals -import LeanPool.ArtinWedderburn.Idempotents -import LeanPool.ArtinWedderburn.CornerCornerLemma -import LeanPool.ArtinWedderburn.MatrixUnits -import LeanPool.ArtinWedderburn.NiceIdeals -import LeanPool.ArtinWedderburn.ArtinWedderburnTheorem +public import LeanPool.ArtinWedderburn.IdealProd +public import LeanPool.ArtinWedderburn.SetProd +public import LeanPool.ArtinWedderburn.Auxiliary +public import LeanPool.ArtinWedderburn.NonUnitalToUnital +public import LeanPool.ArtinWedderburn.PrimeRing +public import LeanPool.ArtinWedderburn.CornerRing +public import LeanPool.ArtinWedderburn.MinIdeals +public import LeanPool.ArtinWedderburn.Idempotents +public import LeanPool.ArtinWedderburn.CornerCornerLemma +public import LeanPool.ArtinWedderburn.MatrixUnits +public import LeanPool.ArtinWedderburn.NiceIdeals +public import LeanPool.ArtinWedderburn.ArtinWedderburnTheorem +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Artin-Wedderburn Theorem @@ -28,6 +34,8 @@ Tags: ring-theory, noncommutative-algebra, artinian-rings MSC: 16K20, 16P20 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/ArtinWedderburn/ArtinWedderburnTheorem.lean b/LeanPool/ArtinWedderburn/ArtinWedderburnTheorem.lean index 578895b3db..0f27a96222 100644 --- a/LeanPool/ArtinWedderburn/ArtinWedderburnTheorem.lean +++ b/LeanPool/ArtinWedderburn/ArtinWedderburnTheorem.lean @@ -3,16 +3,19 @@ Copyright (c) 2026 Matevz Miščič, Maša Žaucer, Job Petrovčič. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Matevz Miščič, Maša Žaucer, Job Petrovčič -/ -import Mathlib.RingTheory.Artinian.Ring -import Mathlib.RingTheory.SimpleRing.Basic -import Mathlib.Algebra.Ring.Idempotent -import LeanPool.ArtinWedderburn.PrimeRing -import LeanPool.ArtinWedderburn.CornerRing +module + +public import LeanPool.ArtinWedderburn.PrimeRing +public import Mathlib.Data.Matrix.Mul +public import Mathlib.RingTheory.Artinian.Defs import LeanPool.ArtinWedderburn.MatrixUnits -import LeanPool.ArtinWedderburn.Idempotents import LeanPool.ArtinWedderburn.NiceIdeals -import LeanPool.ArtinWedderburn.Auxiliary -import Mathlib.RingTheory.SimpleModule.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.RingTheory.SimpleRing.Basic +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # The Artin–Wedderburn theorem @@ -22,6 +25,8 @@ ring-isomorphic to a matrix ring over a division ring. Specialised to a simple ring it yields the same conclusion. -/ +@[expose] public section + namespace LeanPool.ArtinWedderburn variable {R : Type*} [Ring R] diff --git a/LeanPool/ArtinWedderburn/Auxiliary.lean b/LeanPool/ArtinWedderburn/Auxiliary.lean index ac9ad130d3..166c44a2df 100644 --- a/LeanPool/ArtinWedderburn/Auxiliary.lean +++ b/LeanPool/ArtinWedderburn/Auxiliary.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Matevz Miščič, Maša Žaucer, Job Petrovčič. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Matevz Miščič, Maša Žaucer, Job Petrovčič -/ -import Mathlib.RingTheory.Artinian.Ring -import Mathlib.Algebra.Field.Defs -import Mathlib.RingTheory.SimpleRing.Basic -import Mathlib.Algebra.Ring.Idempotent -import Mathlib.RingTheory.NonUnitalSubring.Defs +module + +public import Mathlib.RingTheory.NonUnitalSubring.Defs +public import Mathlib.Algebra.Field.Basic +public import Mathlib.Algebra.Ring.Equiv +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus import Mathlib.Tactic.NoncommRing +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Division subrings and division rings @@ -18,6 +25,8 @@ Mathlib's `DivisionRing`, and shows that an isomorphism of rings transports the division-ring property. -/ +@[expose] public section + namespace LeanPool.ArtinWedderburn variable {R : Type*} [Ring R] diff --git a/LeanPool/ArtinWedderburn/CornerCornerLemma.lean b/LeanPool/ArtinWedderburn/CornerCornerLemma.lean index f086d18ceb..4dea178a71 100644 --- a/LeanPool/ArtinWedderburn/CornerCornerLemma.lean +++ b/LeanPool/ArtinWedderburn/CornerCornerLemma.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Matevz Miščič, Maša Žaucer, Job Petrovčič. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Matevz Miščič, Maša Žaucer, Job Petrovčič -/ -import Mathlib.Algebra.Ring.Basic -import Mathlib.RingTheory.NonUnitalSubring.Defs -import Mathlib.Algebra.Ring.Equiv -import LeanPool.ArtinWedderburn.CornerRing -import LeanPool.ArtinWedderburn.Idempotents +module + +public import LeanPool.ArtinWedderburn.Idempotents +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Iterated corner rings @@ -17,6 +20,8 @@ corner subring of `f` inside `eRe` agrees (as a ring) with the corner subring of `f` viewed in `R`. -/ +@[expose] public section + namespace LeanPool.ArtinWedderburn variable {R : Type*} [Ring R] diff --git a/LeanPool/ArtinWedderburn/CornerRing.lean b/LeanPool/ArtinWedderburn/CornerRing.lean index eb061f8e96..a9317a2e80 100644 --- a/LeanPool/ArtinWedderburn/CornerRing.lean +++ b/LeanPool/ArtinWedderburn/CornerRing.lean @@ -3,16 +3,19 @@ Copyright (c) 2026 Matevz Miščič, Maša Žaucer, Job Petrovčič. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Matevz Miščič, Maša Žaucer, Job Petrovčič -/ -import Mathlib.RingTheory.Artinian.Ring -import Mathlib.Algebra.Field.Defs -import Mathlib.RingTheory.SimpleRing.Basic -import Mathlib.Algebra.Ring.Idempotent -import Mathlib.Algebra.Ring.MinimalAxioms -import Mathlib.RingTheory.Ideal.Span -import Mathlib.LinearAlgebra.Finsupp.LinearCombination -import LeanPool.ArtinWedderburn.PrimeRing -import LeanPool.ArtinWedderburn.NonUnitalToUnital -import LeanPool.ArtinWedderburn.Auxiliary +module + +public import LeanPool.ArtinWedderburn.PrimeRing +public import LeanPool.ArtinWedderburn.NonUnitalToUnital +public import LeanPool.ArtinWedderburn.Auxiliary +public import Mathlib.Data.Matrix.Basic +public import Mathlib.RingTheory.Artinian.Defs +public import Mathlib.Tactic.NoncommRing +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Corner subrings `eRe` @@ -24,6 +27,8 @@ artinianness, primality, lifts and pushes of ideals, and isomorphisms between corner subrings of equal idempotents. -/ +@[expose] public section + namespace LeanPool.ArtinWedderburn variable {R : Type*} [Ring R] diff --git a/LeanPool/ArtinWedderburn/IdealProd.lean b/LeanPool/ArtinWedderburn/IdealProd.lean index 9a06bc8cb5..6ff55a84e0 100644 --- a/LeanPool/ArtinWedderburn/IdealProd.lean +++ b/LeanPool/ArtinWedderburn/IdealProd.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Matevz Miščič, Maša Žaucer, Job Petrovčič. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Matevz Miščič, Maša Žaucer, Job Petrovčič -/ -import Mathlib.RingTheory.Artinian.Ring -import Mathlib.Algebra.Field.Defs -import Mathlib.RingTheory.SimpleRing.Basic -import Mathlib.Algebra.Ring.Idempotent -import Mathlib.RingTheory.TwoSidedIdeal.Operations -import Mathlib.Algebra.Group.Submonoid.Basic +module + +public import Mathlib.RingTheory.TwoSidedIdeal.Operations +public import Mathlib.RingTheory.Ideal.Span +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Products of ideals and the auxiliary set `bothMul` @@ -18,6 +21,8 @@ the monoid structure on `TwoSidedIdeal R` used throughout the Artin–Wedderburn development. -/ +@[expose] public section + namespace LeanPool.ArtinWedderburn -- bothMul a b is the set aRb diff --git a/LeanPool/ArtinWedderburn/Idempotents.lean b/LeanPool/ArtinWedderburn/Idempotents.lean index b6e4c16e37..1a76c77a97 100644 --- a/LeanPool/ArtinWedderburn/Idempotents.lean +++ b/LeanPool/ArtinWedderburn/Idempotents.lean @@ -3,15 +3,16 @@ Copyright (c) 2026 Matevz Miščič, Maša Žaucer, Job Petrovčič. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Matevz Miščič, Maša Žaucer, Job Petrovčič -/ -import Mathlib.RingTheory.Artinian.Ring -import Mathlib.Algebra.Field.Defs -import Mathlib.RingTheory.SimpleRing.Basic -import Mathlib.Algebra.Ring.Idempotent -import LeanPool.ArtinWedderburn.PrimeRing -import LeanPool.ArtinWedderburn.SetProd -import LeanPool.ArtinWedderburn.CornerRing +module + +public import LeanPool.ArtinWedderburn.CornerRing import LeanPool.ArtinWedderburn.MinIdeals -import LeanPool.ArtinWedderburn.Auxiliary +import Mathlib.Data.Rat.Cast.Order +import Mathlib.RingTheory.Ideal.Maximal +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Orthogonal idempotents and matrix units @@ -21,6 +22,8 @@ orthogonal idempotents whose corner rings are division rings, and packages the data as `OrtIdem` / `OrtIdemDiv` structures. -/ +@[expose] public section + namespace LeanPool.ArtinWedderburn variable {R : Type*} [Ring R] diff --git a/LeanPool/ArtinWedderburn/MatrixUnits.lean b/LeanPool/ArtinWedderburn/MatrixUnits.lean index 281d71e306..e9a405f742 100644 --- a/LeanPool/ArtinWedderburn/MatrixUnits.lean +++ b/LeanPool/ArtinWedderburn/MatrixUnits.lean @@ -3,14 +3,14 @@ Copyright (c) 2026 Matevz Miščič, Maša Žaucer, Job Petrovčič. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Matevz Miščič, Maša Žaucer, Job Petrovčič -/ -import Mathlib.RingTheory.Artinian.Ring -import Mathlib.Algebra.Field.Defs -import Mathlib.RingTheory.SimpleRing.Basic -import Mathlib.Algebra.Ring.Idempotent -import LeanPool.ArtinWedderburn.PrimeRing -import LeanPool.ArtinWedderburn.CornerRing -import LeanPool.ArtinWedderburn.Idempotents -import Mathlib.Algebra.BigOperators.Group.Finset.Basic +module + +public import LeanPool.ArtinWedderburn.Idempotents +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Matrix units and the matrix-ring representation @@ -21,6 +21,8 @@ construction of matrix units from `OrtIdemDiv`, and the explicit ring isomorphism `R ≃+* Matrix (Fin n) (Fin n) (e₀₀ R e₀₀)`. -/ +@[expose] public section + namespace LeanPool.ArtinWedderburn -- first we introduce the notion of rings with abstract matrix units diff --git a/LeanPool/ArtinWedderburn/MinIdeals.lean b/LeanPool/ArtinWedderburn/MinIdeals.lean index 4d98d81a78..31a572b447 100644 --- a/LeanPool/ArtinWedderburn/MinIdeals.lean +++ b/LeanPool/ArtinWedderburn/MinIdeals.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Matevz Miščič, Maša Žaucer, Job Petrovčič. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Matevz Miščič, Maša Žaucer, Job Petrovčič -/ +module + +public import LeanPool.ArtinWedderburn.CornerRing import LeanPool.ArtinWedderburn.SetProd -import LeanPool.ArtinWedderburn.CornerRing -import LeanPool.ArtinWedderburn.Auxiliary +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Minimal left ideals and idempotents @@ -15,6 +21,8 @@ idempotent generator `e` of `I` and shows that the corner subring `eRe` is a division subring. -/ +@[expose] public section + namespace LeanPool.ArtinWedderburn variable {R : Type*} [Ring R] diff --git a/LeanPool/ArtinWedderburn/NiceIdeals.lean b/LeanPool/ArtinWedderburn/NiceIdeals.lean index 108af4f65e..7881334daa 100644 --- a/LeanPool/ArtinWedderburn/NiceIdeals.lean +++ b/LeanPool/ArtinWedderburn/NiceIdeals.lean @@ -3,17 +3,15 @@ Copyright (c) 2026 Matevz Miščič, Maša Žaucer, Job Petrovčič. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Matevz Miščič, Maša Žaucer, Job Petrovčič -/ -import Mathlib.RingTheory.Artinian.Ring -import Mathlib.RingTheory.SimpleRing.Basic -import Mathlib.Algebra.Ring.Idempotent -import Mathlib.Algebra.Group.Basic -import Mathlib.RingTheory.Ideal.Span -import Mathlib.Algebra.Ring.Defs -import Mathlib.RingTheory.SimpleModule.Basic -import LeanPool.ArtinWedderburn.PrimeRing -import LeanPool.ArtinWedderburn.CornerRing -import LeanPool.ArtinWedderburn.Idempotents -import LeanPool.ArtinWedderburn.CornerCornerLemma +module + +public import LeanPool.ArtinWedderburn.CornerCornerLemma +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Nice ideals and the induction step in Artin–Wedderburn @@ -22,6 +20,8 @@ A *nice ideal* is an idempotent ideal whose corner ring is `OrtIdemDiv`. We prove that in a prime artinian ring, every ideal is nice. -/ +@[expose] public section + namespace LeanPool.ArtinWedderburn variable {R : Type*} [Ring R] diff --git a/LeanPool/ArtinWedderburn/NonUnitalToUnital.lean b/LeanPool/ArtinWedderburn/NonUnitalToUnital.lean index 128e572af6..43495ecb45 100644 --- a/LeanPool/ArtinWedderburn/NonUnitalToUnital.lean +++ b/LeanPool/ArtinWedderburn/NonUnitalToUnital.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Matevz Miščič, Maša Žaucer, Job Petrovčič. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Matevz Miščič, Maša Žaucer, Job Petrovčič -/ -import Mathlib.Algebra.Ring.Basic +module + +public import Mathlib.Algebra.Ring.Basic /-! # Promoting a non-unital ring with a unit element to a unital ring @@ -12,6 +14,8 @@ If a non-unital ring `R` has an element `e` that is both a left and a right identity, then `R` admits a (unital) ring structure with `1 = e`. -/ +@[expose] public section + namespace LeanPool.ArtinWedderburn variable {R : Type*} [NonUnitalRing R] diff --git a/LeanPool/ArtinWedderburn/PrimeRing.lean b/LeanPool/ArtinWedderburn/PrimeRing.lean index 4a35399ca5..1eebe1d5f3 100644 --- a/LeanPool/ArtinWedderburn/PrimeRing.lean +++ b/LeanPool/ArtinWedderburn/PrimeRing.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Matevz Miščič, Maša Žaucer, Job Petrovčič. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Matevz Miščič, Maša Žaucer, Job Petrovčič -/ -import LeanPool.ArtinWedderburn.IdealProd +module + +public import LeanPool.ArtinWedderburn.IdealProd +public import Mathlib.RingTheory.SimpleRing.Defs import LeanPool.ArtinWedderburn.SetProd +import Mathlib.Data.Rat.Cast.Order import Mathlib.RingTheory.SimpleRing.Basic -import Mathlib.RingTheory.Ideal.Span +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NoncommRing +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Prime rings @@ -16,6 +24,8 @@ elementwise version `aRb = 0 → a = 0 ∨ b = 0` and to the two-sided ideal ver Concludes that simple rings are prime. -/ +@[expose] public section + namespace LeanPool.ArtinWedderburn variable {R : Type*} [Ring R] diff --git a/LeanPool/ArtinWedderburn/SetProd.lean b/LeanPool/ArtinWedderburn/SetProd.lean index 34529d1ba4..fa4777bc73 100644 --- a/LeanPool/ArtinWedderburn/SetProd.lean +++ b/LeanPool/ArtinWedderburn/SetProd.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Matevz Miščič, Maša Žaucer, Job Petrovčič. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Matevz Miščič, Maša Žaucer, Job Petrovčič -/ -import Mathlib.Algebra.Ring.Basic -import Mathlib.Data.Set.Basic -import Mathlib.RingTheory.Ideal.Defs +module + +public import LeanPool.ArtinWedderburn.IdealProd +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus import Mathlib.Tactic.NoncommRing -import Mathlib.RingTheory.TwoSidedIdeal.Operations -import LeanPool.ArtinWedderburn.IdealProd +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Left and right multiplication sets @@ -18,6 +21,8 @@ the consequence that `aRb = 0` collapses these auxiliary sets to zero. Used by t characterisation. -/ +@[expose] public section + namespace LeanPool.ArtinWedderburn variable {R : Type*} [Ring R] (a b : R) diff --git a/LeanPool/BannaiBannaiStanton.lean b/LeanPool/BannaiBannaiStanton.lean index 00f27c6732..c6dbbd4135 100644 --- a/LeanPool/BannaiBannaiStanton.lean +++ b/LeanPool/BannaiBannaiStanton.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Antoine du Fresne von Hohenesche. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine du Fresne von Hohenesche -/ -import LeanPool.BannaiBannaiStanton.BoundOnDistanceSet +module + +public import LeanPool.BannaiBannaiStanton.BoundOnDistanceSet /-! # The Bannai-Bannai-Stanton Bound on Distance Sets @@ -15,3 +17,5 @@ Main declarations: `BannaiBannaiStanton.bannai_bannai_stanton_bound` Tags: combinatorics, distance-sets, polynomial-method MSC: 52C10, 05B30 -/ + +@[expose] public section diff --git a/LeanPool/BannaiBannaiStanton/BoundOnDistanceSet.lean b/LeanPool/BannaiBannaiStanton/BoundOnDistanceSet.lean index e621055eb5..1556f8265f 100644 --- a/LeanPool/BannaiBannaiStanton/BoundOnDistanceSet.lean +++ b/LeanPool/BannaiBannaiStanton/BoundOnDistanceSet.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Antoine du Fresne von Hohenesche. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine du Fresne von Hohenesche -/ +module -import Mathlib.Algebra.MvPolynomial.CommRing -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.LinearAlgebra.Matrix.Rank -import Mathlib.LinearAlgebra.Matrix.BilinearForm -import Mathlib.RingTheory.MvPolynomial.Basic +public import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.LinearAlgebra.Matrix.Rank +public import Mathlib.LinearAlgebra.Matrix.BilinearForm +public import Mathlib.RingTheory.MvPolynomial.Basic +public import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Data.Sym.Card /-! @@ -19,6 +20,8 @@ set `S` in `ℝ^d` with `s` distinct distances by `Nat.choose (d + s) s`, follow the short proof of Petrov and Pohoata via the Croot-Lev-Pach lemma. -/ +@[expose] public section + open MvPolynomial namespace BannaiBannaiStanton diff --git a/LeanPool/Basic.lean b/LeanPool/Basic.lean index fd8f596e29..d8bb822417 100644 --- a/LeanPool/Basic.lean +++ b/LeanPool/Basic.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Vasily Ilin, Justin Asher. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Justin Asher -/ +module + +@[expose] public section /-- Placeholder greeting string. -/ def hello := "world" diff --git a/LeanPool/Biswal.lean b/LeanPool/Biswal.lean index 26a3a8e2e2..087b0b8518 100644 --- a/LeanPool/Biswal.lean +++ b/LeanPool/Biswal.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 jjaassoonn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: jjaassoonn -/ +module -import LeanPool.Biswal.Theorem1 -import LeanPool.Biswal.Theorem23 +public import LeanPool.Biswal.Theorem1 +public import LeanPool.Biswal.Theorem23 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init /-! # Chebyshev Quotients and Demazure Multiplicities @@ -17,3 +21,5 @@ Main declarations: `Biswal.Theorem23.thm_manifest_coeff_nonneg` Tags: algebraic-combinatorics, chebyshev, demazure MSC: 05E10 -/ + +@[expose] public section diff --git a/LeanPool/Biswal/Theorem1.lean b/LeanPool/Biswal/Theorem1.lean index 7ecdd11537..feb807449f 100644 --- a/LeanPool/Biswal/Theorem1.lean +++ b/LeanPool/Biswal/Theorem1.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 jjaassoonn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: jjaassoonn -/ - +module + +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.Basic +public import Mathlib.RingTheory.Polynomial.HilbertPoly +public import Mathlib.Algebra.Polynomial.Splits +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +public import Mathlib.Combinatorics.Enumerative.Partition.Basic +public import Mathlib.RingTheory.MvPowerSeries.Inverse +public import Mathlib.RingTheory.Polynomial.Chebyshev import Mathlib.Algebra.Order.Ring.Star import Mathlib.Algebra.Order.Star.Real import Mathlib.Algebra.Ring.IsFormallyReal @@ -11,19 +19,10 @@ import Mathlib.Analysis.Real.Pi.Bounds import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.RootsExtrema import Mathlib.Data.Int.Star import Mathlib.RingTheory.Henselian -import Mathlib.RingTheory.Polynomial.HilbertPoly import Mathlib.RingTheory.PowerSeries.Inverse import Mathlib.RingTheory.RegularLocalRing.Defs import Mathlib.RingTheory.SimpleRing.Principal import Mathlib.Topology.Algebra.Polynomial -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring /-! # Positivity of generating-function coefficients (Theorem 1) @@ -34,6 +33,8 @@ eventually positive, built from a Chebyshev-type polynomial recurrence and a Dyck-path model. -/ +@[expose] public section + namespace Biswal.Theorem1 /-! ## Core Definitions -/ @@ -399,28 +400,15 @@ lemma polyP_natDegree_le (n : ℕ) : (polyP ℝ n).natDegree ≤ n / 2 := by lemma polyP_chebyshev_rescale (n : ℕ) (z : ℝ) (hz : z ≠ 0) : (2 * z) ^ n * Polynomial.eval (1 / (4 * z ^ 2)) (polyP ℝ n) = Polynomial.eval z (Polynomial.Chebyshev.U ℝ ↑n) := by - induction n using Nat.strong_induction_on with - | h n ih => - match n with - | 0 | 1 => norm_num [polyP] - | (n + 2) => - have h₁ := ih n - have h₂ := ih (n + 1) - have h₃ : n < n + 2 := by omega - have h₄ : n + 1 < n + 2 := by omega - simp [polyP] at * - simp_all [pow_add, pow_one, pow_two, mul_assoc] - field_simp [hz, Polynomial.eval_add, Polynomial.eval_sub, Polynomial.eval_mul, - Polynomial.eval_pow, Polynomial.eval_C, Polynomial.eval_X] at * - ring_nf at * - norm_num at * - simp_all - ring_nf at * - norm_num at * - field_simp [hz] at * - ring_nf at * - norm_num at * - linarith + induction n using Nat.twoStepInduction with + | zero | one => norm_num [polyP] + | more n ih1 ih2 => + simp only [Nat.cast_add, Nat.cast_one] at ih2 + rw [polyP_succ_succ, Nat.cast_add, Nat.cast_ofNat, Polynomial.Chebyshev.U_add_two] + simp only [Polynomial.eval_sub, Polynomial.eval_mul, Polynomial.eval_ofNat, Polynomial.eval_X] + rw [← ih1, ← ih2, pow_add, pow_succ] + field_simp + ring lemma angle_lt_pi_div_two (m k : ℕ) (_hm : 2 ≤ m) (hk_bound : 2 * k < m + 1) : ↑k * Real.pi / (↑m + 1) < Real.pi / 2 := by @@ -718,32 +706,30 @@ lemma polyP_eval_nonpos_at_bad_index (m k j₀ : ℕ) (hm : 2 ≤ m) (hr_param : 1 / (2 * Real.sqrt r) = Real.cos (↑k * Real.pi / (↑m + 1))) (h_sin : Real.sin ((↑j₀ + 1) * (↑k * Real.pi / (↑m + 1))) ≤ 0) : Polynomial.eval r (polyP ℝ j₀) ≤ 0 := by - set θ := ↑k * Real.pi / (↑m + 1) with hθ_def + let θ := ↑k * Real.pi / (↑m + 1) have h₁ : (0 : ℝ) < ↑k * Real.pi / (↑m + 1) := by positivity have h₂ := angle_lt_pi_div_two m k (by omega) hk_bound have hcos_pos : 0 < Real.cos θ := - Real.cos_pos_of_mem_Ioo ⟨by linarith, h₂⟩ + Real.cos_pos_of_mem_Ioo ⟨by linarith only [h₁, h₂], h₂⟩ have hcos_ne : Real.cos θ ≠ 0 := ne_of_gt hcos_pos - have hr_eq : r = 1 / (4 * Real.cos θ ^ 2) := by grind + have hr_eq : r = 1 / (4 * Real.cos θ ^ 2) := by + rw [← hr_param, div_pow, mul_pow, Real.sq_sqrt hr_pos.le] + field_simp + ring have hrescale := polyP_chebyshev_rescale j₀ (Real.cos θ) hcos_ne rw [hr_eq] have hU := Polynomial.Chebyshev.U_real_cos θ (↑j₀) - have hsin_pos : 0 < Real.sin θ := by - apply Real.sin_pos_of_pos_of_lt_pi (by positivity) - have : (k : ℝ) / ((m : ℝ) + 1) < 1 := by - rw [div_lt_one (by positivity)] - exact_mod_cast (show k < m + 1 by omega) - calc (k : ℝ) * Real.pi / (↑m + 1) = (k / (↑m + 1)) * Real.pi := by ring - _ < 1 * Real.pi := by gcongr - _ = Real.pi := one_mul _ + have hsin_pos : 0 < Real.sin θ := + Real.sin_pos_of_pos_of_lt_pi h₁ (h₂.trans (half_lt_self Real.pi_pos)) have h2cos_pos : 0 < (2 * Real.cos θ) ^ j₀ := by positivity - have hprod_pos : 0 < (2 * Real.cos θ) ^ j₀ * Real.sin θ := mul_pos h2cos_pos hsin_pos simp only [Int.cast_natCast] at hU have key : (2 * Real.cos θ) ^ j₀ * Polynomial.eval (1 / (4 * Real.cos θ ^ 2)) (polyP ℝ j₀) * Real.sin θ = Real.sin ((↑j₀ + 1) * θ) := by - nlinarith [hrescale, hU] - nlinarith [h_sin, key, hprod_pos] + rw [hrescale] + exact hU + exact nonpos_of_mul_nonpos_right + (nonpos_of_mul_nonpos_left (key.le.trans h_sin) hsin_pos) h2cos_pos lemma polyP_roots_pos (m : ℕ) (_hm : 2 ≤ m) (x : ℝ) (hx : Polynomial.eval x (polyP ℝ m) = 0) : 0 < x := by @@ -1719,20 +1705,16 @@ lemma multiset_prod_inv_bound hroots_ge α (Multiset.mem_cons_of_mem hα) obtain ⟨C_s, D_s, hC_s, hbound_s⟩ := ih hs_pos hs_ge have hbound_a := single_factor_inv_pow_bound a ρ₁ k ha_pos hρ₁_pos hk ha_ge - simp only at hbound_a have hbound_a' : ∀ r, |(PowerSeries.coeff r) (((↑(1 - Polynomial.C (1/a) * Polynomial.X : Polynomial ℝ) : PowerSeries ℝ) ^ k)⁻¹)| ≤ 1 * (↑r + 1) ^ (k - 1) * (1/ρ₁) ^ r := by - simp_all + simpa only [one_mul] using hbound_a have hq_pos : (0 : ℝ) < 1 / ρ₁ := by positivity obtain ⟨C', D', hC', hbound'⟩ := ps_mul_coeff_bound _ _ 1 C_s (k - 1) D_s (1/ρ₁) one_pos hC_s hq_pos hbound_a' hbound_s refine ⟨C', D', hC', ?_⟩ intro r - change |(PowerSeries.coeff r) (Multiset.map (fun α => - (((↑(1 - Polynomial.C (1/α) * Polynomial.X : Polynomial ℝ) : PowerSeries ℝ) ^ k)⁻¹)) - (a ::ₘ s)).prod| ≤ _ - simp_all + simpa only [F, Multiset.map_cons, Multiset.prod_cons] using hbound' r lemma X_sub_C_eq_neg_C_mul_L (α : ℝ) (hα : 0 < α) : Polynomial.X - Polynomial.C α = diff --git a/LeanPool/Biswal/Theorem23.lean b/LeanPool/Biswal/Theorem23.lean index 4dbe59541f..7b5b06e9e7 100644 --- a/LeanPool/Biswal/Theorem23.lean +++ b/LeanPool/Biswal/Theorem23.lean @@ -3,17 +3,20 @@ Copyright (c) 2026 jjaassoonn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: jjaassoonn -/ +module +public import Mathlib.RingTheory.PowerSeries.Inverse +public import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathlib.Algebra.Order.Ring.Star -import Mathlib.AlgebraicTopology.SimplexCategory.Basic import Mathlib.Analysis.Normed.Field.Lemmas +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Nat.Totient import Mathlib.Data.Rat.Star -import Mathlib.RingTheory.Henselian -import Mathlib.RingTheory.PowerSeries.Inverse -import Mathlib.RingTheory.RegularLocalRing.Defs +import Mathlib.LinearAlgebra.Matrix.Block +import Mathlib.Logic.Equiv.PartialEquiv import Mathlib.RingTheory.SimpleRing.Principal import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity.Finset /-! # Combinatorial coefficient formulas and nonnegativity (Theorems 2 and 3) @@ -24,6 +27,8 @@ for the generating-function coefficients and their nonnegativity via a Dyck-path counting model. -/ +@[expose] public section + namespace Biswal.Theorem23 /-! ## Definition 1: Chebyshev-type polynomials -/ diff --git a/LeanPool/BollobasNikiforov.lean b/LeanPool/BollobasNikiforov.lean index 9dc6085a9d..4bbe029962 100644 --- a/LeanPool/BollobasNikiforov.lean +++ b/LeanPool/BollobasNikiforov.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.Main -import LeanPool.BollobasNikiforov.M.Main -import LeanPool.BollobasNikiforov.Spectral.Gram -import LeanPool.BollobasNikiforov.Spectral.Conic +public import LeanPool.BollobasNikiforov.Main +public import LeanPool.BollobasNikiforov.M.Main +public import LeanPool.BollobasNikiforov.Spectral.Gram +public import LeanPool.BollobasNikiforov.Spectral.Weighted +public import LeanPool.BollobasNikiforov.Spectral.Conic /-! # The Bollobás–Nikiforov conjecture diff --git a/LeanPool/BollobasNikiforov/Basic/Graph.lean b/LeanPool/BollobasNikiforov/Basic/Graph.lean index 580d9e3429..0a2686c523 100644 --- a/LeanPool/BollobasNikiforov/Basic/Graph.lean +++ b/LeanPool/BollobasNikiforov/Basic/Graph.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import Mathlib.Combinatorics.SimpleGraph.Clique -import Mathlib.Combinatorics.SimpleGraph.Finite -import Mathlib.Basic.Real.Basic +public import Mathlib.Combinatorics.SimpleGraph.Clique +public import Mathlib.Basic.Real.Basic /-! # Elementary clique-number facts @@ -19,6 +19,8 @@ This module is copied, up to the namespace, from `SqOmega/Graph.lean` in (Liu, Tang, Zhang). -/ +@[expose] public section + namespace BollobasNikiforov variable {V : Type*} diff --git a/LeanPool/BollobasNikiforov/Basic/Inner.lean b/LeanPool/BollobasNikiforov/Basic/Inner.lean index 09ab7f656a..9987229763 100644 --- a/LeanPool/BollobasNikiforov/Basic/Inner.lean +++ b/LeanPool/BollobasNikiforov/Basic/Inner.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module +public import Mathlib.Analysis.Matrix.Spectrum +public import Mathlib.LinearAlgebra.Matrix.PosDef import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.Matrix.PosDef -import Mathlib.LinearAlgebra.Matrix.Hadamard -import Mathlib.LinearAlgebra.Matrix.Symmetric -import Mathlib.LinearAlgebra.Matrix.Trace /-! # Frobenius pairing, entrywise positive part, and the Schur product @@ -19,6 +19,8 @@ entrywise positive part of a matrix, the rank-one Laplacian positive semidefinite matrices. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix diff --git a/LeanPool/BollobasNikiforov/Basic/Spectrum.lean b/LeanPool/BollobasNikiforov/Basic/Spectrum.lean index 1f38867468..a8f4195166 100644 --- a/LeanPool/BollobasNikiforov/Basic/Spectrum.lean +++ b/LeanPool/BollobasNikiforov/Basic/Spectrum.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import Mathlib.Analysis.Matrix.Spectrum +public import LeanPool.BollobasNikiforov.Basic.Inner +public import Mathlib.Combinatorics.SimpleGraph.AdjMatrix import Mathlib.Combinatorics.SimpleGraph.DegreeSum -import Mathlib.Combinatorics.SimpleGraph.LapMatrix -import LeanPool.BollobasNikiforov.Basic.Inner /-! # Ordered spectrum of a Hermitian matrix @@ -19,6 +19,8 @@ conventions in `docs/sol.tex`. The ordered family is Mathlib's antitone terms replaced by zero. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix diff --git a/LeanPool/BollobasNikiforov/CP/Basic.lean b/LeanPool/BollobasNikiforov/CP/Basic.lean index fad7ba612b..39693b31e6 100644 --- a/LeanPool/BollobasNikiforov/CP/Basic.lean +++ b/LeanPool/BollobasNikiforov/CP/Basic.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Algebra.BigOperators.Pi +public import Mathlib.LinearAlgebra.Matrix.PosDef import Mathlib.Analysis.Real.Sqrt -import Mathlib.LinearAlgebra.Matrix.PosDef /-! # Completely positive matrices @@ -16,6 +15,8 @@ A real matrix is completely positive if it is a finite sum of rank-one matrices `vecMulVec p p` with entrywise nonnegative `p`. -/ +@[expose] public section + open Matrix namespace BollobasNikiforov diff --git a/LeanPool/BollobasNikiforov/CP/Closed.lean b/LeanPool/BollobasNikiforov/CP/Closed.lean index 0d9713c513..228b8f8387 100644 --- a/LeanPool/BollobasNikiforov/CP/Closed.lean +++ b/LeanPool/BollobasNikiforov/CP/Closed.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.CP.Basic -import Mathlib.LinearAlgebra.Dimension.Finite +public import LeanPool.BollobasNikiforov.CP.Basic +public import Mathlib.Topology.Instances.Matrix +public import Mathlib.Topology.Defs.Sequences +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import Mathlib.Analysis.Real.Sqrt import Mathlib.LinearAlgebra.Matrix.FiniteDimensional -import Mathlib.Topology.Instances.Matrix import Mathlib.Topology.Sequences /-! @@ -17,6 +20,8 @@ The rank-one generators of unit mass form a compact set `S` not containing `0`. The completely positive cone is the cone generated by `S`, and is closed. -/ +@[expose] public section + open Matrix Set Filter open scoped Topology diff --git a/LeanPool/BollobasNikiforov/Definition.lean b/LeanPool/BollobasNikiforov/Definition.lean index 4b35eb9d6a..9ba1487260 100644 --- a/LeanPool/BollobasNikiforov/Definition.lean +++ b/LeanPool/BollobasNikiforov/Definition.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import Mathlib.Analysis.Matrix.Spectrum -import Mathlib.Combinatorics.SimpleGraph.LapMatrix +public import Mathlib.Analysis.Matrix.Spectrum +public import Mathlib.Combinatorics.SimpleGraph.AdjMatrix +public import Mathlib.Combinatorics.SimpleGraph.LapMatrix /-! # Adjacency eigenvalues @@ -16,6 +18,8 @@ counted automatically. The ordered family is Mathlib's antitone `eigenvalues₀`, which is the paper's `λ₁ ≥ ⋯ ≥ λₙ` with `λ₁` at index `0`. -/ +@[expose] public section + namespace BollobasNikiforov variable {V : Type*} [Fintype V] [DecidableEq V] diff --git a/LeanPool/BollobasNikiforov/Kernel/Bilinear.lean b/LeanPool/BollobasNikiforov/Kernel/Bilinear.lean index 9e3c1b02fc..7c306262c1 100644 --- a/LeanPool/BollobasNikiforov/Kernel/Bilinear.lean +++ b/LeanPool/BollobasNikiforov/Kernel/Bilinear.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.Kernel.Data +public import LeanPool.BollobasNikiforov.Kernel.Data import LeanPool.BollobasNikiforov.Kernel.SM -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.LinearAlgebra.Matrix.Adjugate +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # Bilinear expansion of `𝒦` @@ -16,6 +18,8 @@ Completing squares in coordinates `2,1,0` yields `eq:bilinear`, and substituting `U` yields the factorization `eq:factor` of `docs/sol.tex` §3. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix diff --git a/LeanPool/BollobasNikiforov/Kernel/Data.lean b/LeanPool/BollobasNikiforov/Kernel/Data.lean index d66599aacd..2acb839589 100644 --- a/LeanPool/BollobasNikiforov/Kernel/Data.lean +++ b/LeanPool/BollobasNikiforov/Kernel/Data.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module +public import Mathlib.Analysis.Real.Sqrt +public import Mathlib.LinearAlgebra.Matrix.PosDef import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.Matrix.PosDef -import Mathlib.Data.Fin.VecNotation -import Mathlib.LinearAlgebra.Matrix.Determinant.Basic -import Mathlib.LinearAlgebra.Matrix.NonsingularInverse /-! # Three-column kernel data @@ -18,6 +18,8 @@ functions of `docs/sol.tex` §3 (`sec:kernel`, `eq:functions`). Coordinates of `ℝ³` are numbered `0,1,2`. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix diff --git a/LeanPool/BollobasNikiforov/Kernel/Main.lean b/LeanPool/BollobasNikiforov/Kernel/Main.lean index 83089a3de4..c724cfcbdb 100644 --- a/LeanPool/BollobasNikiforov/Kernel/Main.lean +++ b/LeanPool/BollobasNikiforov/Kernel/Main.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module +public import LeanPool.BollobasNikiforov.CP.Basic +public import LeanPool.BollobasNikiforov.Kernel.Data import LeanPool.BollobasNikiforov.Kernel.Bilinear -import LeanPool.BollobasNikiforov.Kernel.Signs import LeanPool.BollobasNikiforov.Kernel.N -import LeanPool.BollobasNikiforov.CP.Basic +import LeanPool.BollobasNikiforov.Kernel.SM +import LeanPool.BollobasNikiforov.Kernel.Signs +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # The three-column kernel lemma @@ -17,6 +22,8 @@ factorization of `docs/sol.tex` §3 (`lem:kernel`, `eq:factor`), and the resulting three-column completely positive Gram of `U`. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix diff --git a/LeanPool/BollobasNikiforov/Kernel/N.lean b/LeanPool/BollobasNikiforov/Kernel/N.lean index 67bacc5fdc..ce725efdc9 100644 --- a/LeanPool/BollobasNikiforov/Kernel/N.lean +++ b/LeanPool/BollobasNikiforov/Kernel/N.lean @@ -3,19 +3,16 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.Kernel.Data -import LeanPool.BollobasNikiforov.TN.Basic -import LeanPool.BollobasNikiforov.TN.Convex -import Mathlib.Algebra.BigOperators.Fin +public import LeanPool.BollobasNikiforov.Kernel.Data +public import LeanPool.BollobasNikiforov.TN.Convex +import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.Convex.Mul import Mathlib.Analysis.Convex.Slope -import Mathlib.Data.Fin.VecNotation -import Mathlib.LinearAlgebra.Matrix.Adjugate -import Mathlib.LinearAlgebra.Matrix.Block +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff -import Mathlib.LinearAlgebra.Matrix.NonsingularInverse -import Mathlib.LinearAlgebra.Matrix.SchurComplement +import Mathlib.Tactic.Positivity.Finset /-! # Nonnegativity of `N` @@ -25,6 +22,8 @@ The identity `N = det(I + Q W)` of `docs/sol.tex` §3, the factorization of for `x ≥ 0`. -/ +@[expose] public section + namespace BollobasNikiforov open Function Matrix Set diff --git a/LeanPool/BollobasNikiforov/Kernel/SM.lean b/LeanPool/BollobasNikiforov/Kernel/SM.lean index de776e5c31..416c6754dc 100644 --- a/LeanPool/BollobasNikiforov/Kernel/SM.lean +++ b/LeanPool/BollobasNikiforov/Kernel/SM.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.Kernel.Data +public import LeanPool.BollobasNikiforov.Kernel.Data +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # Sherman–Morrison formula for `𝒦` @@ -13,6 +17,8 @@ The rank-one update `𝒦 = (𝒜 + VVᵀ/γ)⁻¹` expands as `𝒜⁻¹ - e₀ e₀ᵀ / (γ + a₀)`, using `𝒜⁻¹ V = e₀` and `V 0 = a₀`. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix diff --git a/LeanPool/BollobasNikiforov/Kernel/Signs.lean b/LeanPool/BollobasNikiforov/Kernel/Signs.lean index 133557bf16..f8d1557b03 100644 --- a/LeanPool/BollobasNikiforov/Kernel/Signs.lean +++ b/LeanPool/BollobasNikiforov/Kernel/Signs.lean @@ -3,15 +3,14 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.Kernel.Data +public import LeanPool.BollobasNikiforov.Kernel.Data import LeanPool.BollobasNikiforov.Kernel.SM -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Algebra.BigOperators.Group.Finset.Sigma -import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.Algebra.Order.BigOperators.Group.Finset -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # Sign lemmas for the kernel auxiliaries `P` and `Z` @@ -20,6 +19,8 @@ The expansions and nonnegativity statements for `P` and `Z` in `docs/sol.tex` § (`eq:functions`, after `eq:factor`). -/ +@[expose] public section + namespace BollobasNikiforov open Finset diff --git a/LeanPool/BollobasNikiforov/M/Basic.lean b/LeanPool/BollobasNikiforov/M/Basic.lean index 8cec19636c..bdbedda03a 100644 --- a/LeanPool/BollobasNikiforov/M/Basic.lean +++ b/LeanPool/BollobasNikiforov/M/Basic.lean @@ -3,13 +3,11 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.Basic.Inner +public import LeanPool.BollobasNikiforov.Basic.Inner import LeanPool.BollobasNikiforov.CP.Basic -import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.Topology.Algebra.Monoid -import Mathlib.Topology.Instances.Matrix -import Mathlib.Topology.Order.Lattice +import Mathlib.Algebra.Order.Star.Real /-! # The matrix `M(X)` of `eq:matrix` @@ -19,6 +17,8 @@ For a real matrix `X`, When `X` is positive semidefinite this is PSD and entrywise nonnegative. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix Finset diff --git a/LeanPool/BollobasNikiforov/M/Config.lean b/LeanPool/BollobasNikiforov/M/Config.lean index 0e84569ae1..8b37a878cd 100644 --- a/LeanPool/BollobasNikiforov/M/Config.lean +++ b/LeanPool/BollobasNikiforov/M/Config.lean @@ -3,14 +3,10 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.M.Basic -import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.Data.Fin.VecNotation -import Mathlib.Data.Fintype.BigOperators -import Mathlib.Data.Fintype.Option -import Mathlib.Data.Fintype.Sum -import Mathlib.Logic.Equiv.Fin.Basic +public import LeanPool.BollobasNikiforov.M.Basic +import Mathlib.Algebra.Order.Star.Real /-! # Planar configuration and block entries of `M` @@ -23,6 +19,8 @@ Indices are identified with `Option (Fin k) ⊕ Fin p` via `configIdxEquiv`: `Fin (k + 1 + p)`, which supplies `LinearOrder` for `M`. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix Finset Function diff --git a/LeanPool/BollobasNikiforov/M/Elim.lean b/LeanPool/BollobasNikiforov/M/Elim.lean index 92cc5518b8..5167ee884e 100644 --- a/LeanPool/BollobasNikiforov/M/Elim.lean +++ b/LeanPool/BollobasNikiforov/M/Elim.lean @@ -3,18 +3,13 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.CP.Basic -import LeanPool.BollobasNikiforov.M.Config -import LeanPool.BollobasNikiforov.TN.Truncated +public import LeanPool.BollobasNikiforov.CP.Basic +public import LeanPool.BollobasNikiforov.M.Config +public import LeanPool.BollobasNikiforov.TN.Truncated +import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.Matrix.PosDef -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Data.Fin.Tuple.Basic -import Mathlib.Data.Fintype.BigOperators -import Mathlib.Basic.Real.Basic -import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff -import Mathlib.LinearAlgebra.Matrix.SchurComplement -import Mathlib.Logic.Equiv.Fin.Basic /-! # Ordered elimination residuals @@ -34,6 +29,8 @@ products of those columns yield a completely positive `C₀` (EL12). The remainder is the `T`-Schur complement of `E` and is PSD (EL13–EL14). -/ +@[expose] public section + open Matrix Function namespace BollobasNikiforov @@ -675,7 +672,7 @@ lemma det_smul_row_col {n : Type*} [Fintype n] [DecidableEq n] (of fun i j ↦ u i * v j * A i j) = of fun i j ↦ u i * (v j * A i j) := by ext i j - ring_nf + exact mul_assoc _ _ _ have hcol : (of fun i j ↦ v j * A i j).det = (∏ j, v j) * A.det := det_mul_row v A have hrow : diff --git a/LeanPool/BollobasNikiforov/M/GammaZero.lean b/LeanPool/BollobasNikiforov/M/GammaZero.lean index 5cd4650426..2cc12b46ea 100644 --- a/LeanPool/BollobasNikiforov/M/GammaZero.lean +++ b/LeanPool/BollobasNikiforov/M/GammaZero.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module +public import LeanPool.BollobasNikiforov.M.Schur import LeanPool.BollobasNikiforov.CP.Closed -import LeanPool.BollobasNikiforov.M.Schur -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Data.Fin.Tuple.Basic -import Mathlib.Topology.Order.Basic +import Mathlib.Algebra.Order.Star.Real /-! # The `γ = 0` perturbation @@ -23,6 +22,8 @@ Closedness of the CP cone upgrades SC18 on the enlargements to CP of the original `M`, including the case `p = 0` (SC21). -/ +@[expose] public section + namespace BollobasNikiforov open Matrix Finset Function Filter diff --git a/LeanPool/BollobasNikiforov/M/HalfPlane.lean b/LeanPool/BollobasNikiforov/M/HalfPlane.lean index bedc540b68..2f5203300c 100644 --- a/LeanPool/BollobasNikiforov/M/HalfPlane.lean +++ b/LeanPool/BollobasNikiforov/M/HalfPlane.lean @@ -3,14 +3,13 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.M.Basic -import LeanPool.BollobasNikiforov.M.Config -import LeanPool.BollobasNikiforov.M.Schur -import LeanPool.BollobasNikiforov.M.GammaZero -import LeanPool.BollobasNikiforov.CP.Basic +public import LeanPool.BollobasNikiforov.M.Config +public import LeanPool.BollobasNikiforov.CP.Basic import LeanPool.BollobasNikiforov.CP.Closed -import Mathlib.Data.Fin.Tuple.Sort +import LeanPool.BollobasNikiforov.M.GammaZero +import Mathlib.Algebra.Order.Star.Real /-! # Completely positivity of `M` on a right-angle planar cone @@ -26,6 +25,8 @@ MX06 configuration (`k ≥ 1`). Unique and tied open-half-plane configurations are completely positive (HP04–HP05), as is the closed half-plane (HP06). -/ +@[expose] public section + open Matrix Filter open scoped Matrix Topology diff --git a/LeanPool/BollobasNikiforov/M/Main.lean b/LeanPool/BollobasNikiforov/M/Main.lean index 2e0bc45ab0..9effb71582 100644 --- a/LeanPool/BollobasNikiforov/M/Main.lean +++ b/LeanPool/BollobasNikiforov/M/Main.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.M.HalfPlane +public import LeanPool.BollobasNikiforov.M.HalfPlane /-! # The planar Gram theorem for `M` @@ -13,6 +14,8 @@ If planar vectors lie in a closed half-plane, `M` of their Gram matrix is completely positive (`thm:matrix`). -/ +@[expose] public section + open Matrix namespace BollobasNikiforov diff --git a/LeanPool/BollobasNikiforov/M/Schur.lean b/LeanPool/BollobasNikiforov/M/Schur.lean index b35a12bb4a..8ccd97c72d 100644 --- a/LeanPool/BollobasNikiforov/M/Schur.lean +++ b/LeanPool/BollobasNikiforov/M/Schur.lean @@ -3,15 +3,13 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.CP.Basic -import LeanPool.BollobasNikiforov.Kernel.Data +public import LeanPool.BollobasNikiforov.Kernel.Data +public import LeanPool.BollobasNikiforov.M.Elim +public import Mathlib.Data.Matrix.ColumnRowPartitioned import LeanPool.BollobasNikiforov.Kernel.Main -import LeanPool.BollobasNikiforov.M.Config -import LeanPool.BollobasNikiforov.M.Elim -import Mathlib.Data.Matrix.ColumnRowPartitioned -import Mathlib.LinearAlgebra.Matrix.NonsingularInverse -import Mathlib.LinearAlgebra.Matrix.SchurComplement +import Mathlib.Algebra.Order.Star.Real /-! # Feature factorisation `M = FFᵀ + L` and the Schur complement of `E` @@ -27,6 +25,8 @@ rows by `(F_E, 𝒰)`, the Schur complement of the first block is (paper (eq:Schur)). -/ +@[expose] public section + open Matrix open scoped Matrix @@ -793,8 +793,7 @@ lemma configLEE_quad (v : Option (Fin k) → ℝ) : have hD : ∑ i, s i * configD t ρ x i * v (some i) ^ 2 = ∑ i, s i * v (some i) ^ 2 + ∑ i, s i * configH t ρ x i * v (some i) ^ 2 := by - simp only [configD, mul_add, add_mul, sum_add_distrib, mul_assoc] - ring_nf + simp only [configD, mul_add, add_mul, sum_add_distrib, mul_assoc, mul_one] rw [hD] ring diff --git a/LeanPool/BollobasNikiforov/MS/Basic.lean b/LeanPool/BollobasNikiforov/MS/Basic.lean index 2af99624e5..a33db5b79e 100644 --- a/LeanPool/BollobasNikiforov/MS/Basic.lean +++ b/LeanPool/BollobasNikiforov/MS/Basic.lean @@ -3,17 +3,13 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.Basic.Graph -import LeanPool.BollobasNikiforov.Basic.Inner -import LeanPool.BollobasNikiforov.CP.Basic -import Mathlib.Algebra.Order.BigOperators.Ring.Finset -import Mathlib.Combinatorics.SimpleGraph.AdjMatrix -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity -import Mathlib.Topology.Instances.Matrix -import Mathlib.Topology.Order.Compact +public import LeanPool.BollobasNikiforov.Basic.Graph +public import LeanPool.BollobasNikiforov.Basic.Inner +public import LeanPool.BollobasNikiforov.CP.Basic +public import Mathlib.Combinatorics.SimpleGraph.AdjMatrix +import Mathlib.Algebra.Order.Star.Real /-! # Motzkin–Straus @@ -23,6 +19,8 @@ nonnegative orthant by the Turán factor `1 - 1/ω(G)`, and the same bound passes to the Frobenius pairing against a completely positive matrix. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix diff --git a/LeanPool/BollobasNikiforov/Main.lean b/LeanPool/BollobasNikiforov/Main.lean index 8dde0b98e4..a98a37af9f 100644 --- a/LeanPool/BollobasNikiforov/Main.lean +++ b/LeanPool/BollobasNikiforov/Main.lean @@ -3,14 +3,12 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.Definition +public import LeanPool.BollobasNikiforov.Definition +public import Mathlib.Combinatorics.SimpleGraph.Clique import LeanPool.BollobasNikiforov.Spectral.Interlace import LeanPool.BollobasNikiforov.Spectral.Weighted -import LeanPool.BollobasNikiforov.Basic.Spectrum -import LeanPool.BollobasNikiforov.Basic.Graph -import Mathlib.Combinatorics.SimpleGraph.Clique -import Mathlib.Combinatorics.SimpleGraph.Finite /-! # The Bollobás--Nikiforov inequality @@ -21,6 +19,8 @@ multiplicity. Completeness is `G = ⊤`; the hypothesis `G ≠ ⊤` is the paper noncomplete assumption. `[Nontrivial V]` is the paper's `n ≥ 2`. -/ +@[expose] public section + namespace BollobasNikiforov noncomputable section diff --git a/LeanPool/BollobasNikiforov/Spectral/Conic.lean b/LeanPool/BollobasNikiforov/Spectral/Conic.lean index a60a4f1f31..42f29f3ed2 100644 --- a/LeanPool/BollobasNikiforov/Spectral/Conic.lean +++ b/LeanPool/BollobasNikiforov/Spectral/Conic.lean @@ -3,16 +3,14 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.Basic.Graph -import LeanPool.BollobasNikiforov.Basic.Inner +public import LeanPool.BollobasNikiforov.Basic.Graph +public import LeanPool.BollobasNikiforov.Basic.Inner +public import Mathlib.Combinatorics.SimpleGraph.AdjMatrix import LeanPool.BollobasNikiforov.Spectral.Gram -import Mathlib.Analysis.Matrix.Spectrum -import Mathlib.Analysis.Real.Sqrt -import Mathlib.Combinatorics.SimpleGraph.AdjMatrix -import Mathlib.LinearAlgebra.Matrix.Rank -import Mathlib.Topology.Instances.Matrix -import Mathlib.Topology.Order.Compact +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Matrix.PosDef /-! # The rank-two conic parameter `χ''_{vec,3}` @@ -23,6 +21,8 @@ the mass of `X ⊙ X` off those edges equals `1`. The feasible set is nonempty and compact, so the supremum is attained. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix Set Submodule diff --git a/LeanPool/BollobasNikiforov/Spectral/Gram.lean b/LeanPool/BollobasNikiforov/Spectral/Gram.lean index 28f1fb8871..fc8164b111 100644 --- a/LeanPool/BollobasNikiforov/Spectral/Gram.lean +++ b/LeanPool/BollobasNikiforov/Spectral/Gram.lean @@ -3,16 +3,13 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.Basic.Graph -import LeanPool.BollobasNikiforov.Basic.Inner -import LeanPool.BollobasNikiforov.Basic.Spectrum +public import LeanPool.BollobasNikiforov.Basic.Graph +public import LeanPool.BollobasNikiforov.Basic.Spectrum import LeanPool.BollobasNikiforov.Spectral.Weighted -import Mathlib.Algebra.Order.BigOperators.Ring.Finset -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Analysis.Real.Sqrt -import Mathlib.Combinatorics.SimpleGraph.AdjMatrix -import Mathlib.LinearAlgebra.Matrix.Rank +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Matrix.PosDef /-! # Edge-supported positive part and the Gram form @@ -29,6 +26,8 @@ with `BollobasNikiforov.MS.Basic` (pulled in by `Weighted`), and also overlaps W `GramAux`. -/ +@[expose] public section + noncomputable section namespace BollobasNikiforov diff --git a/LeanPool/BollobasNikiforov/Spectral/Interlace.lean b/LeanPool/BollobasNikiforov/Spectral/Interlace.lean index 855f0e8b3f..8bbcde6944 100644 --- a/LeanPool/BollobasNikiforov/Spectral/Interlace.lean +++ b/LeanPool/BollobasNikiforov/Spectral/Interlace.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.Basic.Spectrum -import LeanPool.BollobasNikiforov.Definition -import Mathlib.Analysis.InnerProductSpace.Rayleigh +public import LeanPool.BollobasNikiforov.Basic.Spectrum +public import LeanPool.BollobasNikiforov.Definition +public import Mathlib.Combinatorics.SimpleGraph.LapMatrix /-! # Noncomplete graphs and the two largest adjacency eigenvalues @@ -17,6 +18,8 @@ is not complete, and therefore `F(A_G) = lambda1 G ^ 2 + lambda2 G ^ 2`. The largest eigenvalue is nonnegative for every finite graph, complete or not. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix Module WithLp diff --git a/LeanPool/BollobasNikiforov/Spectral/Perron.lean b/LeanPool/BollobasNikiforov/Spectral/Perron.lean index 925a469ad3..3d0b8b1eab 100644 --- a/LeanPool/BollobasNikiforov/Spectral/Perron.lean +++ b/LeanPool/BollobasNikiforov/Spectral/Perron.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.Basic.Spectrum -import Mathlib.Analysis.InnerProductSpace.Rayleigh -import Mathlib.Topology.Instances.Matrix +public import LeanPool.BollobasNikiforov.Basic.Spectrum /-! # Nonnegative Perron vector for a symmetric nonnegative matrix @@ -15,6 +14,8 @@ A real symmetric entrywise-nonnegative matrix has a nonnegative unit maximizer o Rayleigh quotient, and that maximizer is an eigenvector for `lambdaMax`. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix Module.End Metric WithLp diff --git a/LeanPool/BollobasNikiforov/Spectral/Weighted.lean b/LeanPool/BollobasNikiforov/Spectral/Weighted.lean index c87f083ca2..3f7e355f61 100644 --- a/LeanPool/BollobasNikiforov/Spectral/Weighted.lean +++ b/LeanPool/BollobasNikiforov/Spectral/Weighted.lean @@ -3,18 +3,15 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.Spectral.Perron -import LeanPool.BollobasNikiforov.Basic.Spectrum -import LeanPool.BollobasNikiforov.Basic.Inner -import LeanPool.BollobasNikiforov.Basic.Graph +public import LeanPool.BollobasNikiforov.Spectral.Perron +public import LeanPool.BollobasNikiforov.Basic.Graph +public import LeanPool.BollobasNikiforov.CP.Basic +public import LeanPool.BollobasNikiforov.M.Basic import LeanPool.BollobasNikiforov.M.Main import LeanPool.BollobasNikiforov.MS.Basic -import Mathlib.Algebra.Order.BigOperators.Ring.Finset -import Mathlib.Analysis.Real.Sqrt -import Mathlib.Combinatorics.SimpleGraph.AdjMatrix -import Mathlib.Data.Fin.VecNotation -import Mathlib.LinearAlgebra.Matrix.Rank +import Mathlib.Algebra.Order.Star.Real /-! # Rank-at-most-two spectral slice of a symmetric nonnegative matrix @@ -27,6 +24,8 @@ the closed right half-plane. If `B` is zero-diagonal and supported on `E(G)`, the Motzkin–Straus bound on `M X` yields `F B ≤ turanFactor G * ⟨B, B⟩`. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix Module WithLp Submodule diff --git a/LeanPool/BollobasNikiforov/TN/Basic.lean b/LeanPool/BollobasNikiforov/TN/Basic.lean index d6dceb7298..951d6d6232 100644 --- a/LeanPool/BollobasNikiforov/TN/Basic.lean +++ b/LeanPool/BollobasNikiforov/TN/Basic.lean @@ -3,14 +3,10 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Data.Finset.Sort -import Mathlib.Basic.Real.Basic -import Mathlib.LinearAlgebra.Matrix.Determinant.Basic -import Mathlib.LinearAlgebra.Matrix.Rank -import Mathlib.Order.Fin.Basic -import Mathlib.Tactic.Ring +public import Mathlib.Basic.Real.Basic +public import Mathlib.LinearAlgebra.Matrix.Rank /-! # Total nonnegativity @@ -24,6 +20,8 @@ enumerating the `C(3, r)` strictly increasing maps `Fin r → Fin 3` (`r = 0,1,2,3`) and using rank for `r > 3`. -/ +@[expose] public section + open Function Matrix namespace BollobasNikiforov diff --git a/LeanPool/BollobasNikiforov/TN/Convex.lean b/LeanPool/BollobasNikiforov/TN/Convex.lean index a3746f2c78..eb20594a6e 100644 --- a/LeanPool/BollobasNikiforov/TN/Convex.lean +++ b/LeanPool/BollobasNikiforov/TN/Convex.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.TN.Basic +public import LeanPool.BollobasNikiforov.TN.Basic +public import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.Convex.Slope -import Mathlib.Data.Fin.VecNotation -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Positivity.Finset /-! # Convex vanishing at zero and total nonnegativity @@ -18,6 +18,8 @@ Lemma `lem:convex` of `docs/sol.tex`: if `f : [0, ∞) → [0, ∞)` is convex a totally nonnegative. -/ +@[expose] public section + open Function Matrix Set namespace BollobasNikiforov diff --git a/LeanPool/BollobasNikiforov/TN/Truncated.lean b/LeanPool/BollobasNikiforov/TN/Truncated.lean index b45849a890..83474c67f6 100644 --- a/LeanPool/BollobasNikiforov/TN/Truncated.lean +++ b/LeanPool/BollobasNikiforov/TN/Truncated.lean @@ -3,30 +3,14 @@ Copyright (c) 2026 Shengtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shengtong Zhang -/ +module -import LeanPool.BollobasNikiforov.TN.Basic -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Algebra.BigOperators.Ring.Finset +public import LeanPool.BollobasNikiforov.TN.Basic +public import Mathlib.Topology.MetricSpace.Pseudo.Defs import Mathlib.Analysis.SpecificLimits.Basic -import Mathlib.Data.Fin.Tuple.Basic -import Mathlib.Data.Finset.Sort -import Mathlib.Data.Fintype.Perm import Mathlib.Data.Fintype.Sort -import Mathlib.Data.Matrix.Basic -import Mathlib.Data.Matrix.Block -import Mathlib.Basic.Real.Basic -import Mathlib.LinearAlgebra.Matrix.Determinant.Basic -import Mathlib.LinearAlgebra.Matrix.Rank -import Mathlib.Logic.Equiv.Fin.Basic -import Mathlib.Order.Interval.Finset.Fin -import Mathlib.Order.Monotone.Basic -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring -import Mathlib.Order.Filter.AtTopBot.Basic +import Mathlib.Tactic.Positivity.Finset import Mathlib.Topology.Instances.Matrix -import Mathlib.Topology.Instances.Real.Lemmas -import Mathlib.Topology.Order.Basic /-! # Truncated and unrestricted square kernels @@ -36,6 +20,8 @@ This file records the elementary algebraic facts about the kernels part is `max · 0`. -/ +@[expose] public section + namespace BollobasNikiforov open Matrix diff --git a/LeanPool/BooleanIsoperimetry.lean b/LeanPool/BooleanIsoperimetry.lean index 0199625cdd..ac58e4c53c 100644 --- a/LeanPool/BooleanIsoperimetry.lean +++ b/LeanPool/BooleanIsoperimetry.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Alexey Milovanov and Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexey Milovanov, Egor Lyfar -/ +module -import LeanPool.BooleanIsoperimetry.CoherentGap -import LeanPool.BooleanIsoperimetry.ConwayGuyOrderBridge -import LeanPool.BooleanIsoperimetry.Harper -import LeanPool.BooleanIsoperimetry.MacaulayMin -import LeanPool.BooleanIsoperimetry.SetFamilyShadow +public import LeanPool.BooleanIsoperimetry.CoherentGap +public import LeanPool.BooleanIsoperimetry.ConwayGuyOrderBridge +public import LeanPool.BooleanIsoperimetry.Harper +public import LeanPool.BooleanIsoperimetry.MacaulayMin +public import LeanPool.BooleanIsoperimetry.SetFamilyShadow +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Boolean Isoperimetry and Conway--Guy Coherent Gaps @@ -21,6 +27,8 @@ Tags: additive-combinatorics, isoperimetry, boolean-cube, subset-sums, coherent- MSC: 05D05, 05C35 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/BooleanIsoperimetry/Cascade.lean b/LeanPool/BooleanIsoperimetry/Cascade.lean index ecf81aaccd..d2c750627a 100644 --- a/LeanPool/BooleanIsoperimetry/Cascade.lean +++ b/LeanPool/BooleanIsoperimetry/Cascade.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Alexey Milovanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexey Milovanov -/ +module + +public import LeanPool.BooleanIsoperimetry.Cube import Mathlib.Algebra.BigOperators.Module import Mathlib.Data.Nat.Choose.Sum -import LeanPool.BooleanIsoperimetry.Cube /-! # Binomial cascade arithmetic @@ -15,6 +17,8 @@ simplicial initial segments in the Boolean cube, including the slice recurrence for the Harper boundary function `H`. -/ +@[expose] public section + open scoped BigOperators namespace BooleanIsoperimetry diff --git a/LeanPool/BooleanIsoperimetry/CoherentGap.lean b/LeanPool/BooleanIsoperimetry/CoherentGap.lean index 3e7108893a..f8b808526e 100644 --- a/LeanPool/BooleanIsoperimetry/CoherentGap.lean +++ b/LeanPool/BooleanIsoperimetry/CoherentGap.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module + +public import Mathlib.Basic.Real.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Fintype.Basic import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Basic.Real.Basic + /-! # Coherent-gap certificates @@ -23,6 +28,8 @@ The open-problem context and the exact boundary of this formalization are recorded separately in the Construct research notes. -/ +@[expose] public section + open scoped BigOperators namespace BooleanIsoperimetry.CoherentGap diff --git a/LeanPool/BooleanIsoperimetry/Compression.lean b/LeanPool/BooleanIsoperimetry/Compression.lean index 9a89da95dd..27f291dc84 100644 --- a/LeanPool/BooleanIsoperimetry/Compression.lean +++ b/LeanPool/BooleanIsoperimetry/Compression.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Alexey Milovanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexey Milovanov -/ -import LeanPool.BooleanIsoperimetry.SimplicialCompression -import LeanPool.BooleanIsoperimetry.LayerWindows +module + +public import LeanPool.BooleanIsoperimetry.SimplicialCompression +public import LeanPool.BooleanIsoperimetry.LayerWindows +public import LeanPool.BooleanIsoperimetry.Cascade +public import Mathlib.Combinatorics.SetFamily.Compression.UV +import LeanPool.BooleanIsoperimetry.Macaulay +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # Frankl-Furedi compression layer @@ -14,6 +24,8 @@ families in the Boolean cube, connecting compressed families to canonical simplicial initial segments. -/ +@[expose] public section + open scoped BigOperators open scoped FinsetFamily open Finset diff --git a/LeanPool/BooleanIsoperimetry/ConwayGuyCoherentGap.lean b/LeanPool/BooleanIsoperimetry/ConwayGuyCoherentGap.lean index 1e1f19c30d..e1d916fcf3 100644 --- a/LeanPool/BooleanIsoperimetry/ConwayGuyCoherentGap.lean +++ b/LeanPool/BooleanIsoperimetry/ConwayGuyCoherentGap.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.BooleanIsoperimetry.CoherentGap +module + +public import LeanPool.BooleanIsoperimetry.CoherentGap +import Mathlib.Algebra.BigOperators.Fin import Mathlib.Tactic.Abel -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Ring.RingNF /-! # Conway--Guy coherent-gap data @@ -15,6 +18,8 @@ Conway--Guy distinct-subset-sum sequence. The recurrence and notation follow Section 2 of Tom Bohman's 1996 paper on the Conway--Guy sequence. -/ +@[expose] public section + open scoped BigOperators namespace BooleanIsoperimetry.CoherentGap diff --git a/LeanPool/BooleanIsoperimetry/ConwayGuyHeight.lean b/LeanPool/BooleanIsoperimetry/ConwayGuyHeight.lean index 7f6db54562..df33fb5cdf 100644 --- a/LeanPool/BooleanIsoperimetry/ConwayGuyHeight.lean +++ b/LeanPool/BooleanIsoperimetry/ConwayGuyHeight.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.BooleanIsoperimetry.ConwayGuyCoherentGap -import Mathlib.Tactic.Linarith +module + +public import LeanPool.BooleanIsoperimetry.ConwayGuyCoherentGap +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # The Conway--Guy triangular-block identity @@ -13,6 +21,8 @@ This file derives the height identity used by every Conway--Guy principal relation directly from the published difference recurrence. -/ +@[expose] public section + open scoped BigOperators namespace BooleanIsoperimetry.CoherentGap diff --git a/LeanPool/BooleanIsoperimetry/ConwayGuyOrderBridge.lean b/LeanPool/BooleanIsoperimetry/ConwayGuyOrderBridge.lean index 86f1e7f817..c1f96482b9 100644 --- a/LeanPool/BooleanIsoperimetry/ConwayGuyOrderBridge.lean +++ b/LeanPool/BooleanIsoperimetry/ConwayGuyOrderBridge.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module + +public import LeanPool.BooleanIsoperimetry.Cube +public import LeanPool.BooleanIsoperimetry.ConwayGuyCoherentGap import LeanPool.BooleanIsoperimetry.ConwayGuyRigidity -import LeanPool.BooleanIsoperimetry.Cube +import Mathlib.Algebra.BigOperators.Group.Finset.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # From unit relations to consecutive subset-sum gaps @@ -19,6 +28,8 @@ order. The bridge itself only uses integrality: two subset sums differing by one have no integer subset sum strictly between them. -/ +@[expose] public section + open scoped BigOperators namespace BooleanIsoperimetry.CoherentGap diff --git a/LeanPool/BooleanIsoperimetry/ConwayGuyRigidity.lean b/LeanPool/BooleanIsoperimetry/ConwayGuyRigidity.lean index 40721cb95e..64ef6f74cb 100644 --- a/LeanPool/BooleanIsoperimetry/ConwayGuyRigidity.lean +++ b/LeanPool/BooleanIsoperimetry/ConwayGuyRigidity.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module + +public import LeanPool.BooleanIsoperimetry.ConwayGuyCoherentGap import LeanPool.BooleanIsoperimetry.ConwayGuyHeight +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Conway--Guy normalized chamber rigidity @@ -13,6 +21,8 @@ corrections as a `FirstCoordinateRecurrence`. The separate height identity supplies the one remaining arithmetic input. -/ +@[expose] public section + namespace BooleanIsoperimetry.CoherentGap /-- The triangular-block identity needed to evaluate a Conway--Guy principal diff --git a/LeanPool/BooleanIsoperimetry/Cube.lean b/LeanPool/BooleanIsoperimetry/Cube.lean index cf90ed88ce..e65f1e9f22 100644 --- a/LeanPool/BooleanIsoperimetry/Cube.lean +++ b/LeanPool/BooleanIsoperimetry/Cube.lean @@ -3,6 +3,11 @@ Copyright (c) 2026 Alexey Milovanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexey Milovanov -/ +module + +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Finset.Max +public import Mathlib.Data.Fintype.Powerset import Mathlib.Algebra.Order.Ring.GeomSum import Mathlib.Data.Nat.Digits.Defs import Mathlib.Tactic.IntervalCases @@ -15,6 +20,8 @@ simplicial order, initial segments, slicing maps, and the Harper boundary function `H`. -/ +@[expose] public section + open scoped BigOperators namespace BooleanIsoperimetry diff --git a/LeanPool/BooleanIsoperimetry/Harper.lean b/LeanPool/BooleanIsoperimetry/Harper.lean index 5259472175..749c7812c2 100644 --- a/LeanPool/BooleanIsoperimetry/Harper.lean +++ b/LeanPool/BooleanIsoperimetry/Harper.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Alexey Milovanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexey Milovanov -/ -import Mathlib.Tactic.FinCases +module + +public import LeanPool.BooleanIsoperimetry.Macaulay import LeanPool.BooleanIsoperimetry.Shadow +import Mathlib.Algebra.BigOperators.Intervals +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # Harper's vertex-isoperimetric theorem @@ -13,6 +22,8 @@ This file assembles the compression, Macaulay, Kruskal-Katona, and scalar recurrence layers into the final sorry-free proof of Harper's theorem. -/ +@[expose] public section + open scoped BigOperators namespace BooleanIsoperimetry diff --git a/LeanPool/BooleanIsoperimetry/KruskalKatona.lean b/LeanPool/BooleanIsoperimetry/KruskalKatona.lean index d6e400c392..a7b215243b 100644 --- a/LeanPool/BooleanIsoperimetry/KruskalKatona.lean +++ b/LeanPool/BooleanIsoperimetry/KruskalKatona.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Alexey Milovanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexey Milovanov -/ -import Mathlib.Combinatorics.SetFamily.KruskalKatona +module + +public import LeanPool.BooleanIsoperimetry.Cube +public import Mathlib.Combinatorics.Colex +public import Mathlib.Combinatorics.SetFamily.Shadow import LeanPool.BooleanIsoperimetry.Macaulay +import Mathlib.Combinatorics.SetFamily.KruskalKatona +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Kruskal-Katona upper-shadow core @@ -13,6 +23,8 @@ This file proves the set-family upper-shadow minimization theorem used by the Boolean-isoperimetry argument. -/ +@[expose] public section + open scoped BigOperators open scoped FinsetFamily diff --git a/LeanPool/BooleanIsoperimetry/LayerWindows.lean b/LeanPool/BooleanIsoperimetry/LayerWindows.lean index 5f898f5317..57c7cb292f 100644 --- a/LeanPool/BooleanIsoperimetry/LayerWindows.lean +++ b/LeanPool/BooleanIsoperimetry/LayerWindows.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 Alexey Milovanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexey Milovanov -/ -import LeanPool.BooleanIsoperimetry.KruskalKatona +module + +public import LeanPool.BooleanIsoperimetry.KruskalKatona +import LeanPool.BooleanIsoperimetry.Cascade +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Layer-window accounting for the cross-slice Kruskal–Katona bridge. @@ -23,6 +31,8 @@ Kruskal–Katona core operates on — not an opaque scalar. The pair functional `initSegPairLayerWindowCost` then assembles the two slice costs exactly the way `PairShadowCost` does on simplicial initial segments. -/ +@[expose] public section + namespace BooleanIsoperimetry open Finset diff --git a/LeanPool/BooleanIsoperimetry/Macaulay.lean b/LeanPool/BooleanIsoperimetry/Macaulay.lean index a018d2f08c..cd354b4098 100644 --- a/LeanPool/BooleanIsoperimetry/Macaulay.lean +++ b/LeanPool/BooleanIsoperimetry/Macaulay.lean @@ -3,7 +3,18 @@ Copyright (c) 2026 Alexey Milovanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexey Milovanov -/ -import LeanPool.BooleanIsoperimetry.Cascade +module + +public import LeanPool.BooleanIsoperimetry.Cascade +public import Mathlib.Order.Interval.Finset.Nat +import Mathlib.Algebra.BigOperators.Intervals +import Mathlib.Algebra.Group.Action.Defs +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Macaulay increment arithmetic @@ -12,6 +23,8 @@ This file develops the increment profile of the Harper boundary function and the nested-cascade inequalities used by the final minimization argument. -/ +@[expose] public section + open scoped BigOperators namespace BooleanIsoperimetry diff --git a/LeanPool/BooleanIsoperimetry/MacaulayMin.lean b/LeanPool/BooleanIsoperimetry/MacaulayMin.lean index 2e22706967..d7350b76c0 100644 --- a/LeanPool/BooleanIsoperimetry/MacaulayMin.lean +++ b/LeanPool/BooleanIsoperimetry/MacaulayMin.lean @@ -3,7 +3,17 @@ Copyright (c) 2026 Alexey Milovanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexey Milovanov -/ +module + +public import LeanPool.BooleanIsoperimetry.Cascade +public import LeanPool.BooleanIsoperimetry.SimplicialCompression +import LeanPool.BooleanIsoperimetry.Macaulay import LeanPool.BooleanIsoperimetry.Shadow +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # Scalar Macaulay minimization @@ -12,6 +22,8 @@ This file packages the set-family compression and shadow estimates into scalar Macaulay minimization lemmas consumed by the final Harper theorem. -/ +@[expose] public section + open scoped BigOperators open Finset diff --git a/LeanPool/BooleanIsoperimetry/SetFamilyShadow.lean b/LeanPool/BooleanIsoperimetry/SetFamilyShadow.lean index 78839a5cac..0b6cb1dc68 100644 --- a/LeanPool/BooleanIsoperimetry/SetFamilyShadow.lean +++ b/LeanPool/BooleanIsoperimetry/SetFamilyShadow.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 Alexey Milovanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexey Milovanov -/ -import LeanPool.BooleanIsoperimetry.Shadow +module + +public import LeanPool.BooleanIsoperimetry.Shadow +public import LeanPool.BooleanIsoperimetry.KruskalKatona +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Set-family shadow corollaries @@ -12,6 +20,8 @@ This file exposes thin numeric corollaries of the upstream Kruskal-Katona upper-shadow theorem in the notation used by the Harper proof. -/ +@[expose] public section + open scoped BigOperators open Finset diff --git a/LeanPool/BooleanIsoperimetry/Shadow.lean b/LeanPool/BooleanIsoperimetry/Shadow.lean index c8e3bdd901..99f1c9f8be 100644 --- a/LeanPool/BooleanIsoperimetry/Shadow.lean +++ b/LeanPool/BooleanIsoperimetry/Shadow.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 Alexey Milovanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexey Milovanov -/ +module + +public import LeanPool.BooleanIsoperimetry.Cascade import LeanPool.BooleanIsoperimetry.Compression +import LeanPool.BooleanIsoperimetry.Macaulay +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Upper-shadow and Macaulay layer @@ -12,6 +21,8 @@ This file connects Kruskal-Katona upper-shadow estimates to the Macaulay exchange inequalities used in Harper's theorem. -/ +@[expose] public section + open scoped BigOperators /- diff --git a/LeanPool/BooleanIsoperimetry/SimplicialCompression.lean b/LeanPool/BooleanIsoperimetry/SimplicialCompression.lean index 320a3cc77d..42dd937d81 100644 --- a/LeanPool/BooleanIsoperimetry/SimplicialCompression.lean +++ b/LeanPool/BooleanIsoperimetry/SimplicialCompression.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 Alexey Milovanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexey Milovanov -/ -import LeanPool.BooleanIsoperimetry.Cube +module + +public import LeanPool.BooleanIsoperimetry.Cube +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Simplicial coordinate compression @@ -12,6 +20,8 @@ This file defines coordinate up/down compression operations on Boolean-cube families and proves basic neighborhood monotonicity and slice-pair facts. -/ +@[expose] public section + open scoped BigOperators open Finset diff --git a/LeanPool/BrauerGroupNew.lean b/LeanPool/BrauerGroupNew.lean index 09ee072661..f27e652cc4 100644 --- a/LeanPool/BrauerGroupNew.lean +++ b/LeanPool/BrauerGroupNew.lean @@ -3,38 +3,41 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.CentralSimple -import LeanPool.BrauerGroupNew.Centralizer -import LeanPool.BrauerGroupNew.CrossProductAlgebra -import LeanPool.BrauerGroupNew.ExtendScalar -import LeanPool.BrauerGroupNew.Azumaya.Basic -import LeanPool.BrauerGroupNew.Azumaya.Mul -import LeanPool.BrauerGroupNew.Examples.ShortComplex.LeftHomologyMapData -import LeanPool.BrauerGroupNew.FieldCat -import LeanPool.BrauerGroupNew.AlgClosedUnion -import LeanPool.BrauerGroupNew.FiniteField -import LeanPool.BrauerGroupNew.BrauerGroup -import LeanPool.BrauerGroupNew.LemmasAboutSimpleRing -import LeanPool.BrauerGroupNew.MatrixCenterEquiv -import LeanPool.BrauerGroupNew.MatrixEquivTensor -import LeanPool.BrauerGroupNew.Morita.ChangeOfRings -import LeanPool.BrauerGroupNew.Morita.TensorProduct -import LeanPool.BrauerGroupNew.MoritaEquivalence -import LeanPool.BrauerGroupNew.SplittingOfCSA -import LeanPool.BrauerGroupNew.TwoSidedIdeal -import LeanPool.BrauerGroupNew.Wedderburn -import LeanPool.BrauerGroupNew.ZeroSevenFourE -import LeanPool.BrauerGroupNew.RelativeBrauer -import LeanPool.BrauerGroupNew.SkolemNoether -import LeanPool.BrauerGroupNew.ToSecond -import LeanPool.BrauerGroupNew.IsoSecond -import LeanPool.BrauerGroupNew.AbsoluteIsoH2 -import LeanPool.BrauerGroupNew.DoubleCentralizer -import LeanPool.BrauerGroupNew.FrobeniusTheorem -import LeanPool.BrauerGroupNew.BrauerOverR -import LeanPool.BrauerGroupNew.Mathlib -import LeanPool.BrauerGroupNew.Subfield +public import LeanPool.BrauerGroupNew.CentralSimple +public import LeanPool.BrauerGroupNew.Centralizer +public import LeanPool.BrauerGroupNew.CrossProductAlgebra +public import LeanPool.BrauerGroupNew.ExtendScalar +public import LeanPool.BrauerGroupNew.Azumaya.Basic +public import LeanPool.BrauerGroupNew.Azumaya.Mul +public import LeanPool.BrauerGroupNew.Examples.ShortComplex.LeftHomologyMapData +public import LeanPool.BrauerGroupNew.FieldCat +public import LeanPool.BrauerGroupNew.AlgClosedUnion +public import LeanPool.BrauerGroupNew.FiniteField +public import LeanPool.BrauerGroupNew.BrauerGroup +public import LeanPool.BrauerGroupNew.LemmasAboutSimpleRing +public import LeanPool.BrauerGroupNew.MatrixCenterEquiv +public import LeanPool.BrauerGroupNew.MatrixEquivTensor +public import LeanPool.BrauerGroupNew.Morita.ChangeOfRings +public import LeanPool.BrauerGroupNew.Morita.TensorProduct +public import LeanPool.BrauerGroupNew.MoritaEquivalence +public import LeanPool.BrauerGroupNew.SplittingOfCSA +public import LeanPool.BrauerGroupNew.TwoSidedIdeal +public import LeanPool.BrauerGroupNew.Wedderburn +public import LeanPool.BrauerGroupNew.ZeroSevenFourE +public import LeanPool.BrauerGroupNew.RelativeBrauer +public import LeanPool.BrauerGroupNew.SkolemNoether +public import LeanPool.BrauerGroupNew.ToSecond +public import LeanPool.BrauerGroupNew.IsoSecond +public import LeanPool.BrauerGroupNew.AbsoluteIsoH2 +public import LeanPool.BrauerGroupNew.DoubleCentralizer +public import LeanPool.BrauerGroupNew.FrobeniusTheorem +public import LeanPool.BrauerGroupNew.BrauerOverR +public import LeanPool.BrauerGroupNew.Mathlib +public import LeanPool.BrauerGroupNew.Subfield +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Brauer Group Core @@ -46,3 +49,5 @@ Main declarations: `BrauerGroup.BruaerGroup`, `BrauerGroupHom.Br`, `WedderburnAr Tags: algebra, ring-theory, central-simple-algebras, brauer-groups MSC: 16K20, 16K50, 16S35 -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/AbsoluteIsoH2.lean b/LeanPool/BrauerGroupNew/AbsoluteIsoH2.lean index 4f5bd383e6..a2bd009e87 100644 --- a/LeanPool/BrauerGroupNew/AbsoluteIsoH2.lean +++ b/LeanPool/BrauerGroupNew/AbsoluteIsoH2.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.IsoSecond -import Mathlib.FieldTheory.IsSepClosed +public import Mathlib.FieldTheory.IsSepClosed + +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.BrauerGroupNew.AbsoluteIsoH2 @@ -13,4 +19,6 @@ import Mathlib.FieldTheory.IsSepClosed Imported Lean Pool material for `LeanPool.BrauerGroupNew.AbsoluteIsoH2`. -/ +@[expose] public section + variable (F F_star : Type) [Field F] [Field F_star] [Algebra F F_star] [IsSepClosure F F_star] diff --git a/LeanPool/BrauerGroupNew/AlgClosedUnion.lean b/LeanPool/BrauerGroupNew/AlgClosedUnion.lean index 1801c9af85..701ead0438 100644 --- a/LeanPool/BrauerGroupNew/AlgClosedUnion.lean +++ b/LeanPool/BrauerGroupNew/AlgClosedUnion.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ -import Mathlib.FieldTheory.IsAlgClosed.Basic +module + +public import Mathlib.FieldTheory.IsAlgClosed.Basic import Mathlib.RingTheory.Flat.Basic import Mathlib.RingTheory.TensorProduct.Free @@ -14,6 +16,8 @@ This file ports auxiliary results about finite intermediate fields inside an alg closure and tensor products over their directed union. -/ +@[expose] public section + suppress_compilation open Module TensorProduct @@ -148,11 +152,10 @@ theorem inter_tensor_union : rintro x - induction x using TensorProduct.inductionOn with |tmul x a => - have fin0: FiniteDimensional K K⟮x⟯ := IntermediateField.adjoin.finiteDimensional (by - observe : IsAlgebraic K x - exact Algebra.IsIntegral.isIntegral x) + have finite_adjoin : FiniteDimensional K K⟮x⟯ := + IntermediateField.adjoin.finiteDimensional (Algebra.IsIntegral.isIntegral x) exact Submodule.mem_sSup_of_directed (SetOfFinite_nonempty K K_bar A) (is_direct K K_bar A) |>.2 - ⟨intermediateTensor K K_bar A K⟮x⟯, ⟨⟨⟨K⟮x⟯, fin0⟩, rfl⟩, + ⟨intermediateTensor K K_bar A K⟮x⟯, ⟨⟨⟨K⟮x⟯, finite_adjoin⟩, rfl⟩, ⟨(⟨x, IntermediateField.mem_adjoin_simple_self K x⟩ ⊗ₜ a), by simp⟩⟩⟩ |add x y hx hy => apply AddMemClass.add_mem <;> assumption @@ -351,70 +354,21 @@ lemma comm_square : rfl lemma isoRestrict_map_one : isoRestrict' n k k⁻ A iso 1 = 1 := by - /- - isoRestrict - ℒ ⊗_k A -----> M_n(ℒ) - | inclusion | inclusion' - v v - k⁻ ⊗_k A -----> M_n(k⁻) - iso - - Want to show isoRestrict 1 = 1 - inclusion' ∘ isoRestrict = iso ∘ inclusion - inclusion' (isoRestrict 1) = iso (inclusion 1) = 1 = inclusion' 1 - since inclusion' is injective, isoRestrict 1 = 1 - -/ - have eq := congr($(comm_square n k k_bar A iso) 1) - conv_rhs at eq => - rw [LinearMap.comp_apply] - change (LinearMap.restrictScalars (@Subtype k_bar fun x ↦ x ∈ ℒ)) iso.toLinearEquiv.toLinearMap - (inclusion n k k_bar A iso 1) - erw [show (inclusion n k k_bar A iso 1) = 1 from rfl, map_one iso] - refine inclusion'_injective n k k_bar A iso (eq.trans ?_) - rw [_root_.map_one] + apply inclusion'_injective n k k_bar A iso + calc + _ = iso (inclusion n k k_bar A iso 1) := + LinearMap.congr_fun (comm_square n k k_bar A iso) 1 + _ = _ := by simp lemma isoRestrict_map_mul (x y : ℒ ⊗[k] A) : isoRestrict' n k k⁻ A iso (x * y) = isoRestrict' n k k⁻ A iso x * isoRestrict' n k k⁻ A iso y := by - /- - isoRestrict - ℒ ⊗_k A -----> M_n(ℒ) - | inclusion | inclusion' - v v - k⁻ ⊗_k A -----> M_n(k⁻) - iso - - Want to show isoRestrict (x * y) = isoRestrict x * isoRestrict y - inclusion' ∘ isoRestrict = iso ∘ inclusion - inclusion' (isoRestrict (x * y)) = iso (inclusion (x * y)) = iso (inclusion x) * iso (inclusion y) - = inclusion' (isoRestrict x) * inclusion' (isoRestrict y) - = inclusion' (isoRestrict x * isoRestrict y) - since inclusion' is injective, isoRestrict (x * y) = isoRestrict x * isoRestrict y - - -/ - have eq := congr($(comm_square n k k_bar A iso) (x * y)) - conv_rhs at eq => - rw [LinearMap.comp_apply] - erw [_root_.map_mul (f := inclusion n k k_bar A iso), _root_.map_mul (f := iso)] - have eq₁ := congr($(comm_square n k k_bar A iso) x) - have eq₂ := congr($(comm_square n k k_bar A iso) y) - simp only [LinearMap.coe_comp, LinearEquiv.coe_coe, Function.comp_apply, AlgHom.toLinearMap_apply, - AlgEquiv.toLinearEquiv_toLinearMap, LinearMap.coe_restrictScalars] at eq₁ eq₂ apply inclusion'_injective n k k_bar A iso - calc - (inclusion' n k k_bar A iso) ((isoRestrict' n k k_bar A iso) (x * y)) = - iso ((inclusion n k k_bar A iso) x) * iso ((inclusion n k k_bar A iso) y) := by - change - ((inclusion' n k k_bar A iso).toLinearMap ∘ₗ ↑(isoRestrict' n k k_bar A iso)) (x * y) = - iso ((inclusion n k k_bar A iso) x) * iso ((inclusion n k k_bar A iso) y) - exact eq - _ = (inclusion' n k k_bar A iso) ((isoRestrict' n k k_bar A iso) x) * - (inclusion' n k k_bar A iso) ((isoRestrict' n k k_bar A iso) y) := by - rw [eq₁, eq₂] - rfl - _ = (inclusion' n k k_bar A iso) - ((isoRestrict' n k k_bar A iso) x * (isoRestrict' n k k_bar A iso) y) := by - rw [_root_.map_mul] + have commutes (z : ℒ ⊗[k] A) : + inclusion' n k k_bar A iso (isoRestrict' n k k_bar A iso z) = + iso (inclusion n k k_bar A iso z) := + LinearMap.congr_fun (comm_square n k k_bar A iso) z + simp only [map_mul, commutes] /-- The restricted algebra equivalence over the finite intermediate field `ℒ`. -/ def isoRestrict : ℒ ⊗[k] A ≃ₐ[ℒ] Matrix (Fin n) (Fin n) ℒ := diff --git a/LeanPool/BrauerGroupNew/Azumaya/Basic.lean b/LeanPool/BrauerGroupNew/Azumaya/Basic.lean index d7bb1bb5ae..b62aaa9ae4 100644 --- a/LeanPool/BrauerGroupNew/Azumaya/Basic.lean +++ b/LeanPool/BrauerGroupNew/Azumaya/Basic.lean @@ -3,10 +3,25 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module +public import LeanPool.BrauerGroupNew.Wedderburn +public import Mathlib.Algebra.Azumaya.Defs +public import Mathlib.Algebra.BrauerGroup.Defs +public import Mathlib.RingTheory.Flat.Basic +public import Mathlib.RingTheory.Morita.Basic import LeanPool.BrauerGroupNew.BrauerGroup import LeanPool.BrauerGroupNew.LemmasAboutSimpleRing +import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Operations import LeanPool.BrauerGroupNew.Morita.ChangeOfRings +import Mathlib.Algebra.Azumaya.Basic +import Mathlib.Algebra.Central.Matrix +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.RingTheory.FiniteLength +import Mathlib.RingTheory.Flat.FaithfullyFlat.Basic +import Mathlib.RingTheory.SimpleRing.Matrix /-! # LeanPool.BrauerGroupNew.Azumaya.Basic @@ -14,6 +29,8 @@ import LeanPool.BrauerGroupNew.Morita.ChangeOfRings Imported Lean Pool material for `LeanPool.BrauerGroupNew.Azumaya.Basic`. -/ +@[expose] public section + universe u v open Module TensorProduct diff --git a/LeanPool/BrauerGroupNew/Azumaya/Mul.lean b/LeanPool/BrauerGroupNew/Azumaya/Mul.lean index 9d0231c591..348fcfbe63 100644 --- a/LeanPool/BrauerGroupNew/Azumaya/Mul.lean +++ b/LeanPool/BrauerGroupNew/Azumaya/Mul.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Azumaya.Basic -import Mathlib.Algebra.Azumaya.Matrix -import Mathlib.Algebra.Module.CharacterModule -import Mathlib.LinearAlgebra.Contraction -import Mathlib.LinearAlgebra.TensorProduct.Opposite +public import LeanPool.BrauerGroupNew.Azumaya.Basic +public import Mathlib.LinearAlgebra.Contraction +public import Mathlib.LinearAlgebra.TensorProduct.Opposite +public import Mathlib.Tactic.Continuity +public import Mathlib.Algebra.Azumaya.Matrix +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # LeanPool.BrauerGroupNew.Azumaya.Mul @@ -16,6 +19,8 @@ import Mathlib.LinearAlgebra.TensorProduct.Opposite Imported Lean Pool material for `LeanPool.BrauerGroupNew.Azumaya.Mul`. -/ +@[expose] public section + suppress_compilation open Function @@ -204,7 +209,7 @@ lemma homTensorHomMap_surj : Surjective (TensorProduct.homTensorHomMap (.id R) M apply Function.Surjective.of_comp (g := (tensorProjection1 R M N P Q ∘ₗ (homTensorHomEquiv R _ _ _ _).symm.toLinearMap ∘ₗ tensorInclusion2 R P Q)) rw [← LinearMap.coe_comp, comm_square4] - exact CharacterModule.surjective_of_dual_injective LinearMap.id fun ⦃a₁ a₂⦄ a ↦ a + exact Function.surjective_id end formathlib @@ -280,13 +285,13 @@ lemma top_square_comm'' (A B : Azumaya R) : = (AlgHom.mulLeftRight R (A ⊗[R] B)).toLinearMap ∘ₗ (e (R := R) (A := A) (B := B)).toLinearEquiv.toLinearMap := by ext a b c d a' b' - simp_all + simp lemma top_square_comm (A B : Azumaya R) : (TensorProduct.homTensorHomMap _ A B A B) ∘ (Algebra.TensorProduct.congr (AlgEquiv.ofBijective (AlgHom.mulLeftRight R A) A.isAzumaya.bij) (AlgEquiv.ofBijective (AlgHom.mulLeftRight R B) B.isAzumaya.bij)) - = (AlgHom.mulLeftRight R (A ⊗[R] B)) ∘ e := + = (AlgHom.mulLeftRight R (A ⊗[R] B)) ∘ (e (R := R) (A := A) (B := B)) := congr_arg DFunLike.coe <| top_square_comm'' R A B /-- @@ -318,9 +323,9 @@ abbrev e2 (A B : Azumaya R) := (Algebra.TensorProduct.congr (AlgEquiv.ofBijective (AlgHom.mulLeftRight R B) B.isAzumaya.bij)) lemma top_square_comm_apply (A B : Azumaya R) (x : (A ⊗[R] Aᵐᵒᵖ) ⊗[R] (B ⊗[R] Bᵐᵒᵖ)) : - (e1 R A B) (e2 R A B x) = (AlgHom.mulLeftRight R (A ⊗[R] B)) (e.toAlgHom x) := by - erw [← AlgHom.comp_apply, AlgHom.coe_comp, ← top_square_comm] - rfl + (e1 R A B) (e2 R A B x) = + (AlgHom.mulLeftRight R (A ⊗[R] B)) ((e (R := R) (A := A) (B := B)).toAlgHom x) := + congrFun (top_square_comm R A B) x lemma bij_mulLeftRight (A B : Azumaya.{u, v} R) : Function.Bijective (AlgHom.mulLeftRight R (A ⊗[R] B)) := @@ -364,13 +369,9 @@ End R A ------------> End R B lemma small_comm_square (e : A ≃ₐ[R] B) : (AlgHom.mulLeftRight R B).comp (Algebra.TensorProduct.congr e e.op).toAlgHom = (e.toLinearEquiv.conjAlgEquiv R).toAlgHom.comp (AlgHom.mulLeftRight R A) := by - apply AlgHom.ext - intro a - induction a using TensorProduct.inductionOn with - | tmul a a' => - ext - simp [AlgHom.mulLeftRight_apply, LinearEquiv.conjAlgEquiv] - | add _ _ _ _ => simp_all [map_add] + apply AlgHom.toLinearMap_injective + ext a a' b + simp [AlgHom.mulLeftRight_apply, LinearEquiv.conjAlgEquiv] lemma _root_.IsAzumaya.ofAlgEquiv (e : A ≃ₐ[R] B) (hA : IsAzumaya R A) : IsAzumaya R B := let _ : Module.Projective R B := .of_equiv e.toLinearEquiv @@ -458,13 +459,9 @@ abbrev tensorProjection1' : lemma tensor_projection_inclusion1' : tensorProjection1' R M ∘ₗ tensorInclusion1' R M = .id := by ext f g - simp only [TensorProduct.AlgebraTensorModule.curry_apply, LinearMap.restrictScalars_self, - TensorProduct.curry_apply, LinearMap.coe_comp, comp_apply, TensorProduct.map_tmul, - LinearMap.coe_mk, AddHom.coe_mk, LinearEquiv.coe_coe, coe_opLinearEquiv, - coe_opLinearEquiv_symm, unop_op, LinearMap.id_coe, id_eq] - simp only [LinearMap.comp_assoc, fg, LinearMap.comp_id] - rw [← LinearMap.comp_assoc, fg, LinearMap.id_comp] - rw [← LinearMap.comp_assoc, fg, LinearMap.id_comp, op_unop] + change (projection' R M ∘ₗ inclusion' R M) f ⊗ₜ[R] + op ((projection' R M ∘ₗ inclusion' R M) g.unop) = f ⊗ₜ[R] g + simp only [projection'_inclusion', LinearMap.id_apply, op_unop] lemma tensorInclusion1'_inj : Function.Injective (tensorInclusion1' R M) := Function.LeftInverse.injective (g := tensorProjection1' R M) @@ -485,9 +482,10 @@ abbrev projection2' : Module.End R (Module.End R (Fin (nn R M) → R)) →ₗ[R] map_smul' := by simp [LinearMap.smul_comp, LinearMap.comp_smul] lemma projection2'_inclusion2' : projection2' R M ∘ₗ inclusion2' R M = LinearMap.id := by - ext f g : 2 - simp [LinearMap.comp_assoc, fg] - simp [← LinearMap.comp_assoc, fg] + ext f : 1 + change (projection' R M ∘ₗ inclusion' R M) ∘ₗ f ∘ₗ + (projection' R M ∘ₗ inclusion' R M) = f + rw [projection'_inclusion', LinearMap.id_comp, LinearMap.comp_id] lemma projection2'_surj : Function.Surjective (projection2' R M) := Function.RightInverse.surjective <| DFunLike.congr_fun <| projection2'_inclusion2' R M diff --git a/LeanPool/BrauerGroupNew/BrauerGroup.lean b/LeanPool/BrauerGroupNew/BrauerGroup.lean index 691132fc6a..da803cd8bc 100644 --- a/LeanPool/BrauerGroupNew/BrauerGroup.lean +++ b/LeanPool/BrauerGroupNew/BrauerGroup.lean @@ -3,15 +3,24 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ -import LeanPool.BrauerGroupNew.CentralSimple -import LeanPool.BrauerGroupNew.FieldCat -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Operations -import Mathlib.Algebra.BrauerGroup.Defs -import Mathlib.Algebra.Central.Matrix +module + +public import Mathlib.Algebra.Central.Basic + +public import LeanPool.BrauerGroupNew.CentralSimple +public import LeanPool.BrauerGroupNew.FieldCat +public import Mathlib.Algebra.BrauerGroup.Defs +public import Mathlib.Algebra.Algebra.Rat +public import Mathlib.Basic.Complex.Basic +public import Mathlib.FieldTheory.IsAlgClosed.Basic +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Operations +import LeanPool.BrauerGroupNew.Wedderburn +import Mathlib.Algebra.Azumaya.Basic +public import Mathlib.Algebra.Central.Matrix import Mathlib.Analysis.Complex.Polynomial.Basic import Mathlib.LinearAlgebra.FreeModule.PID -import Mathlib.LinearAlgebra.Matrix.FiniteDimensional -import Mathlib.RingTheory.SimpleRing.Matrix +public import Mathlib.LinearAlgebra.Matrix.FiniteDimensional +public import Mathlib.RingTheory.SimpleRing.Matrix /-! # LeanPool.BrauerGroupNew.BrauerGroup @@ -19,6 +28,8 @@ import Mathlib.RingTheory.SimpleRing.Matrix Imported Lean Pool material for `LeanPool.BrauerGroupNew.BrauerGroup`. -/ +@[expose] public section + suppress_compilation universe u v v₁ v₂ w @@ -33,42 +44,14 @@ lemma bijective_of_dim_eq_of_isCentralSimple [fin_target : FiniteDimensional K B] (f : A →ₐ[K] B) (h : Module.finrank K A = Module.finrank K B) : Function.Bijective f := by - obtain hA|hA := subsingleton_or_nontrivial A - · have eq1 : Module.finrank K A = 0 := by - rw [finrank_zero_iff_forall_zero] - intro x - apply Subsingleton.elim - rw [eq1] at h - replace h : Subsingleton B := by - constructor - symm at h - rw [finrank_zero_iff_forall_zero] at h - simp_all - rw [Function.bijective_iff_existsUnique] - intro b - refine ⟨0, Subsingleton.elim _ _, fun _ _ => Subsingleton.elim _ _⟩ - · have := IsSimpleRing.iff_injective_ringHom_or_subsingleton_codomain A |>.1 csa_source - f.toRingHom - rcases this with (H|H) - · refine ⟨H, ?_⟩ - change Function.Surjective f.toLinearMap - have := f.toLinearMap.finrank_range_add_finrank_ker - rw [show Module.finrank K (LinearMap.ker f.toLinearMap) = 0 by - rw [finrank_zero_iff_forall_zero] - rintro ⟨x, hx⟩ - rw [LinearMap.ker_eq_bot (f := f.toLinearMap) |>.2 H] at hx - simp_all, add_zero, h] at this - rw [← LinearMap.range_eq_top] - apply Submodule.eq_top_of_finrank_eq - exact this - · have : (1 : A) ∈ TwoSidedIdeal.ker f.toRingHom := by - simp only [AlgHom.toRingHom_eq_coe, TwoSidedIdeal.mem_ker, map_one] - exact Subsingleton.elim _ _ - simp only [AlgHom.toRingHom_eq_coe, TwoSidedIdeal.mem_ker, map_one] at this - have hmm : Nontrivial B := by - let e := LinearEquiv.ofFinrankEq _ _ h - exact Equiv.nontrivial e.symm.toEquiv - exact one_ne_zero this |>.elim + obtain hB | hB := subsingleton_or_nontrivial B + · let equiv := LinearEquiv.ofFinrankEq _ _ h + have : Subsingleton A := ⟨fun x y ↦ equiv.injective (Subsingleton.elim _ _)⟩ + exact ⟨fun _ _ _ ↦ Subsingleton.elim _ _, fun b ↦ ⟨0, Subsingleton.elim _ _⟩⟩ + · have hf : Function.Injective f := + (IsSimpleRing.iff_injective_ringHom A).1 csa_source f.toRingHom + exact ⟨hf, (LinearMap.injective_iff_surjective_of_finrank_eq_finrank h + (f := f.toLinearMap)).1 hf⟩ lemma bijective_of_surj_of_isCentralSimple [csa_source : IsSimpleRing A] @@ -176,22 +159,7 @@ def matrixEqv' (n m : ℕ) (A : Type*) [Ring A] [Algebra K A] : { Matrix.reindexLinearEquiv K A finProdFinEquiv finProdFinEquiv with toFun := Matrix.reindex finProdFinEquiv finProdFinEquiv map_mul' := fun m n ↦ by simp only [Matrix.reindex_apply, Matrix.submatrix_mul_equiv] - commutes' := fun k ↦ by - ext i j - simp only [Matrix.reindex_apply, Matrix.submatrix_apply, finProdFinEquiv_symm_apply, - Matrix.algebraMap_matrix_apply, Prod.mk.injEq] - if h : i = j then aesop - else - simp only [h, ↓reduceIte, ite_eq_right_iff, and_imp] - intro h1 h2 - have : i = j := by - have : (⟨i.divNat, i.modNat⟩ : Fin n × Fin m) = ⟨j.divNat, j.modNat⟩ := Prod.ext h1 h2 - apply_fun finProdFinEquiv at this - rw [show ⟨i.divNat, i.modNat⟩ = finProdFinEquiv.symm i by rfl, - show ⟨j.divNat, _⟩ = finProdFinEquiv.symm j by rfl, - finProdFinEquiv.apply_symm_apply, finProdFinEquiv.apply_symm_apply] at this - exact this - tauto + commutes' := (Matrix.reindexAlgEquiv K A finProdFinEquiv).commutes } lemma iso_to_eqv (A B : CSA K) (h : A ≃ₐ[K] B) : IsBrauerEquivalent A B := @@ -307,30 +275,11 @@ lemma matrixEquivForward_surjective (n m : Type*) [Fintype m] [Fintype n] [DecidableEq m] [DecidableEq n] : Function.Surjective <| matrixEquivForward (K := K) m n := by intro x - rw [Matrix.matrix_eq_sum_single x] - suffices H : - ∀ (i j : m × n), ∃ a, (matrixEquivForward (K := K) m n) a = Matrix.single i j (x i j) by - choose a ha using H - use ∑ i : m × n, ∑ j : m × n, a i j - simp_all - intro i j - rw [show Matrix.single i j (x i j) = (x i j) • Matrix.single i j 1 by - simp_all] - use (x i j) • ((Matrix.single i.1 j.1 1) ⊗ₜ (Matrix.single i.2 j.2 1)) - rw [_root_.map_smul (f := (matrixEquivForward (K := K) m n)) (x i j)] - congr 1 - rw [matrixEquivForward_tmul] - ext a b - rw [Matrix.kroneckerMap_apply] - simp only [Matrix.single, Matrix.of_apply, mul_ite, mul_one, mul_zero] - split_ifs with h1 h2 h3 h4 h5 - · rfl - · simp only [not_and, ne_eq] at h3 - refine h3 ?_ ?_ |>.elim <;> ext <;> aesop - · simp_all - · rfl - · simp_all - · rfl + refine ⟨∑ i : m × n, ∑ j : m × n, + Matrix.single i.1 j.1 (x i j) ⊗ₜ[K] Matrix.single i.2 j.2 1, ?_⟩ + simp only [map_sum, matrixEquivForward_tmul, Matrix.single_kronecker_single, mul_one, + Prod.eta] + exact (Matrix.matrix_eq_sum_single x).symm /-- The tensor product of matrix algebras is a matrix algebra on the product index type. -/ def matrixEqv (m n : ℕ) : (Matrix (Fin m) (Fin m) K) ⊗[K] (Matrix (Fin n) (Fin n) K) ≃ₐ[K] @@ -510,57 +459,16 @@ def baseChangeTensorEquiv : (E ⊗[K] A) ⊗[E] (E ⊗[K] B) ≃ₐ[E] E ⊗[K] (A ⊗[K] B) := AlgEquiv.ofLinearEquiv (baseChangeTensorLinear (K := K) (E := E) A B) (by simp [baseChangeTensorLinear, Algebra.TensorProduct.one_def]) - (by - let f := baseChangeTensorLinear (K := K) (E := E) A B - apply LinearMap.map_mul_of_map_mul_tmul - intro x1 x2 y1 y2 - change f ((x1 * x2) ⊗ₜ[E] (y1 * y2)) = f (x1 ⊗ₜ[E] y1) * f (x2 ⊗ₜ[E] y2) - induction x1 using TensorProduct.inductionOn with - | add x1 x1' hx hx' => - simp only [add_mul, TensorProduct.add_tmul, f.map_add, hx, hx', add_mul] - | tmul e1 a1 => - induction x2 using TensorProduct.inductionOn with - | add x2 x2' hx hx' => - simp only [mul_add, TensorProduct.add_tmul, f.map_add, hx, hx', mul_add] - | tmul e2 a2 => - induction y1 using TensorProduct.inductionOn with - | add y1 y1' hy hy' => - simp only [add_mul, TensorProduct.tmul_add, f.map_add, hy, hy', add_mul] - | tmul e3 b1 => - induction y2 using TensorProduct.inductionOn with - | add y2 y2' hy hy' => - simp only [mul_add, TensorProduct.tmul_add, f.map_add, hy, hy', mul_add] - | tmul e4 b2 => - rw [Algebra.TensorProduct.tmul_mul_tmul, Algebra.TensorProduct.tmul_mul_tmul] - rw [show f (((e1 * e2) ⊗ₜ[K] (a1 * a2)) ⊗ₜ[E] - ((e3 * e4) ⊗ₜ[K] (b1 * b2))) = - ((e1 * e2) * (e3 * e4)) ⊗ₜ[K] ((a1 * a2) ⊗ₜ[K] (b1 * b2)) from - baseChangeTensorLinear_tmul (K := K) (E := E) A B (e1 * e2) (e3 * e4) - (a1 * a2) (b1 * b2)] - rw [show f ((e1 ⊗ₜ[K] a1) ⊗ₜ[E] (e3 ⊗ₜ[K] b1)) = - (e1 * e3) ⊗ₜ[K] (a1 ⊗ₜ[K] b1) from - baseChangeTensorLinear_tmul (K := K) (E := E) A B e1 e3 a1 b1] - rw [show f ((e2 ⊗ₜ[K] a2) ⊗ₜ[E] (e4 ⊗ₜ[K] b2)) = - (e2 * e4) ⊗ₜ[K] (a2 ⊗ₜ[K] b2) from - baseChangeTensorLinear_tmul (K := K) (E := E) A B e2 e4 a2 b2] - rw [Algebra.TensorProduct.tmul_mul_tmul, Algebra.TensorProduct.tmul_mul_tmul] - ring_nf) + ((LinearMap.map_mul_iff _).2 <| by + ext a1 b1 a2 b2 + simp [baseChangeTensorLinear, Algebra.TensorProduct.tmul_mul_tmul, + Algebra.smul_def]) /-- If the matrix index is empty, the scalar-extension tensor source is subsingleton. -/ lemma e3Aux3 (hm : m = 0) : Subsingleton ((E ⊗[K] A) ⊗[E] (E ⊗[K] Matrix (Fin m) (Fin m) K)) := by - suffices ∀ a : (E ⊗[K] A) ⊗[E] (E ⊗[K] Matrix (Fin m) (Fin m) K), a = 0 by - exact ⟨fun a b => by rw [this a, this b]⟩ subst hm - intro x - induction x using TensorProduct.inductionOn with - | add e a he ha => rw [he, ha, zero_add] - | tmul e a => - induction a using TensorProduct.inductionOn with - | add _ _ hx hy => rw [TensorProduct.tmul_add, hx, hy, add_zero] - | tmul e' mat => - rw [show mat = 0 from Subsingleton.elim _ _] - simp + infer_instance /-- The algebra homomorphism underlying `e3`. -/ def e3Aux4 : @@ -584,29 +492,11 @@ def e2 : Algebra.TensorProduct.congr .refl <| { __ := matrixEquivTensor (Fin m) K E commutes' e := by - simp only [AlgEquiv.toEquiv_eq_coe, Equiv.toFun_as_coe, EquivLike.coe_coe, - matrixEquivTensor_apply, Fintype.sum_prod_type, - Algebra.TensorProduct.algebraMap_apply, Algebra.algebraMap_self, RingHom.id_apply] - simp_rw [Matrix.algebraMap_eq_diagonal] - simp_rw [Matrix.diagonal_apply] - simp only [Pi.algebraMap_apply, Algebra.algebraMap_self, RingHom.id_apply] - rw [show - ∑ x : Fin m, ∑ y : Fin m, - (if x = y then e else 0) ⊗ₜ[K] Matrix.single x y (1 : K) = - ∑ x : Fin m, e ⊗ₜ[K] Matrix.single x x 1 by - refine Finset.sum_congr rfl fun x _ => ?_ - rw [show e ⊗ₜ[K] Matrix.single x x (1 : K) = - (if x = x then e else 0) ⊗ₜ Matrix.single x x (1 : K) by aesop] - apply Finset.sum_eq_single - · aesop - · aesop] - rw [← TensorProduct.tmul_sum] - congr 1 - ext i j - rw [Matrix.sum_apply] - by_cases h : i = j - · subst h; simp [Matrix.single] - · simp_all } + change matrixEquivTensor (Fin m) K E (Matrix.diagonal fun _ ↦ e) = + e ⊗ₜ[K] (1 : Matrix (Fin m) (Fin m) K) + rw [← Matrix.sum_single_eq_diagonal, map_sum] + simp only [matrixEquivTensor_apply_single] + rw [← TensorProduct.tmul_sum, Matrix.sum_single_one] } /-- Reassociates a tensor product after base change along `K → E`. -/ def e3 : @@ -767,34 +657,9 @@ def Aux' (F K E : Type u) [Field F] [Field K] [Field E] { smul_comm := fun a b c => by rw [Algebra.smul_def, Algebra.smul_def, ← _root_.mul_assoc, mul_comm (algebraMap _ _ a), Algebra.smul_def, Algebra.smul_def, _root_.mul_assoc] } - refine .ofLinearEquiv (Aux F K E A) ?_ fun x y ↦ ?_ - · simp [Algebra.TensorProduct.one_def] - induction x using TensorProduct.inductionOn with - | add => simp only [add_mul, (Aux F K E A).map_add, *] - | tmul => - induction y using TensorProduct.inductionOn with - | add => simp only [mul_add, (Aux F K E A).map_add, *] - | tmul => - rename_i x1 y1 x2 y2 - simp only [Aux, Algebra.TensorProduct.tmul_mul_tmul, LinearEquiv.trans_apply] - set f := (TensorProduct.AlgebraTensorModule.congr - (TensorProduct.AlgebraTensorModule.rid K E E) (LinearEquiv.refl F A)) - set g := (TensorProduct.AlgebraTensorModule.assoc F K E E K A.carrier).symm - change f (g _) = _ - induction y1 using TensorProduct.inductionOn with - | add => simp only [add_mul, TensorProduct.tmul_add, g.map_add, f.map_add, *] - | tmul k1 a1 => - induction y2 using TensorProduct.inductionOn with - | add => simp only [mul_add, TensorProduct.tmul_add, g.map_add, f.map_add, *] - | tmul k2 a2 => - simp only [Algebra.TensorProduct.tmul_mul_tmul, *] - simp only [TensorProduct.AlgebraTensorModule.assoc_symm_tmul, - TensorProduct.AlgebraTensorModule.congr_tmul, TensorProduct.AlgebraTensorModule.rid_tmul, - LinearEquiv.refl_apply, Algebra.TensorProduct.tmul_mul_tmul, Algebra.mul_smul_comm, - Algebra.smul_mul_assoc, f, g] - congr 1 - rw [mul_comm k1 k2] - exact mul_smul k2 k1 (x1 * x2) + let equiv := (Algebra.TensorProduct.assoc F K E E K A).symm.trans + (Algebra.TensorProduct.congr (Algebra.TensorProduct.rid K E E) (AlgEquiv.refl (R := F))) + exact .ofLinearEquiv (Aux F K E A) equiv.map_one equiv.map_mul end baseChangeIdem diff --git a/LeanPool/BrauerGroupNew/BrauerOverR.lean b/LeanPool/BrauerGroupNew/BrauerOverR.lean index 0a375d6494..d795ef631c 100644 --- a/LeanPool/BrauerGroupNew/BrauerOverR.lean +++ b/LeanPool/BrauerGroupNew/BrauerOverR.lean @@ -3,8 +3,21 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module +public import LeanPool.BrauerGroupNew.BrauerGroup +public import Mathlib.Algebra.Azumaya.Basic +public import Mathlib.Algebra.Field.ZMod +public import Mathlib.Algebra.Quaternion +public import Mathlib.Analysis.RCLike.Lemmas +public import Mathlib.LinearAlgebra.FreeModule.PID import LeanPool.BrauerGroupNew.FrobeniusTheorem +import LeanPool.BrauerGroupNew.Wedderburn +import LeanPool.BrauerGroupNew.ZeroSevenFourE +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.RingTheory.SimpleRing.Matrix /-! # LeanPool.BrauerGroupNew.BrauerOverR @@ -12,6 +25,8 @@ import LeanPool.BrauerGroupNew.FrobeniusTheorem Imported Lean Pool material for `LeanPool.BrauerGroupNew.BrauerOverR`. -/ +@[expose] public section + suppress_compilation open Quaternion BrauerGroup TensorProduct BrauerGroupNew diff --git a/LeanPool/BrauerGroupNew/CentralSimple.lean b/LeanPool/BrauerGroupNew/CentralSimple.lean index 53d65b14db..db01caefaf 100644 --- a/LeanPool/BrauerGroupNew/CentralSimple.lean +++ b/LeanPool/BrauerGroupNew/CentralSimple.lean @@ -8,10 +8,20 @@ Copyright (c) 2024 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Jujian Zhang, Kevin Buzzard -/ +module + +public import Mathlib.Algebra.Central.Defs +public import Mathlib.Data.Matrix.Basic +public import Mathlib.RingTheory.TensorProduct.Maps +public import Mathlib.RingTheory.TwoSidedIdeal.Operations import LeanPool.BrauerGroupNew.Centralizer +import LeanPool.BrauerGroupNew.TwoSidedIdeal import LeanPool.BrauerGroupNew.Wedderburn import Mathlib.Algebra.Central.Basic +import Mathlib.Data.Rat.Floor import Mathlib.RingTheory.Flat.Basic +import Mathlib.RingTheory.TwoSidedIdeal.BigOperators +import Mathlib.Tactic.Continuity.Init /-! # Characteristic predicate for central simple algebras In this file we define the predicate `IsCentralSimple K D` where `K` is a field @@ -22,6 +32,8 @@ This adds an extra layer of complication which we don't need. In fact ideals of immediately give rise to nontrivial quotients of `D` so there are no central simple algebras in this case according to our definition. -/ + +@[expose] public section universe u v w open Module variable (K : Type u) [Field K] diff --git a/LeanPool/BrauerGroupNew/Centralizer.lean b/LeanPool/BrauerGroupNew/Centralizer.lean index fadb5bb5f2..b6043761e7 100644 --- a/LeanPool/BrauerGroupNew/Centralizer.lean +++ b/LeanPool/BrauerGroupNew/Centralizer.lean @@ -9,11 +9,11 @@ Copyright (c) 2024 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang -/ -import Mathlib.Algebra.Algebra.Subalgebra.Basic -import Mathlib.RingTheory.Adjoin.Basic -import Mathlib.RingTheory.TensorProduct.Maps +module + +public import Mathlib.RingTheory.TensorProduct.Maps +public import Mathlib.LinearAlgebra.FreeModule.Basic import Mathlib.LinearAlgebra.TensorProduct.Basis -import Mathlib.LinearAlgebra.FreeModule.Basic /-! # Properties of centers and centralizers @@ -31,6 +31,8 @@ Let `R` be a commutative ring and `A` and `B` two `R`-algebras. then the centralizer of `B` in `A ⊗ B` is `A ⊗ C(B)` where `C(B)` is the center of `B`. -/ +@[expose] public section + namespace Subalgebra section CommSemiring diff --git a/LeanPool/BrauerGroupNew/CrossProductAlgebra.lean b/LeanPool/BrauerGroupNew/CrossProductAlgebra.lean index bcd4ea63eb..f9af49dbbb 100644 --- a/LeanPool/BrauerGroupNew/CrossProductAlgebra.lean +++ b/LeanPool/BrauerGroupNew/CrossProductAlgebra.lean @@ -3,15 +3,21 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, contributors -/ +module -import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Equiv +public import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Equiv +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.Congruence.Basic +public import Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree +public import Mathlib.Algebra.BrauerGroup.Defs +public import Mathlib.FieldTheory.Galois.Basic import LeanPool.BrauerGroupNew.Mathlib.Data.DFinsupp.Submonoid import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.LinearIndependent.Defs -import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Span.Basic -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.Congruence.Basic +import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Kernel import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Lattice -import LeanPool.BrauerGroupNew.Subfield.Splitting -import Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree +import LeanPool.BrauerGroupNew.TwoSidedIdeal +import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Cross product algebra @@ -24,6 +30,8 @@ This file constructs the cross product algebra associated to a 2-cocycle of a fi * [*Advanced Algebra*] -/ +@[expose] public section + open groupCohomology Function Module suppress_compilation @@ -107,7 +115,8 @@ def valAddEquiv : CrossProductAlgebra f ≃+ (Gal(K, F) →₀ K) where @[simp] lemma val_finsuppSum {α M : Type*} [AddCommMonoid M] (g : α →₀ M) (h : α → M → CrossProductAlgebra f) : - (g.sum h).val = g.sum (fun a m ↦ (h a m).val) := map_finsuppSum valAddEquiv .. + (g.sum h).val = g.sum (fun a m ↦ (h a m).val) := + map_finsuppSum (valAddEquiv (f := f)).toAddMonoidHom g h instance [Semiring R] [Module R K] : Module R (CrossProductAlgebra f) := val_injective.module _ valAddEquiv.toAddMonoidHom val_smul @@ -148,14 +157,16 @@ variable (f) in @[simp] lemma mulLinearMap_single_single (c d : K) (σ τ : Gal(K, F)) : mulLinearMap f (.single σ c) (.single τ d) = .single (σ * τ) (c * σ d * f (σ, τ)) := by - simp [mulLinearMap] + simp only [mulLinearMap, Finsupp.lsum_single, LinearMap.coe_mk, AddHom.coe_mk] variable (f) in @[simp] lemma mulLinearMap_single_left_apply (c : K) (σ : Gal(K, F)) (x : Gal(K, F) →₀ K) (τ : Gal(K, F)) : mulLinearMap f (.single σ c) x τ = c * σ (x (σ⁻¹ * τ)) * f (σ, σ⁻¹ * τ) := by - classical simp +contextual [mulLinearMap, Finsupp.single_apply, ← eq_inv_mul_iff_mul_eq] + classical + rw [mulLinearMap, Finsupp.lsum_single] + simp +contextual [Finsupp.single_apply, ← eq_inv_mul_iff_mul_eq] variable (f) in @[simp] @@ -184,21 +195,13 @@ variable [Fact <| IsMulCocycle₂ f] instance monoid : Monoid (CrossProductAlgebra f) where one_mul := by - rintro ⟨x⟩ - ext : 1 - dsimp - induction x using Finsupp.induction_linear with - | zero => simp - | add => simp [*] - | single σ a => simp [map_one_fst_of_isMulCocycle₂ Fact.out σ, mul_right_comm _ a] + intro x + ext σ + simp [map_one_fst_of_isMulCocycle₂ Fact.out σ, mul_right_comm] mul_one := by - rintro ⟨x⟩ - ext : 1 - dsimp - induction x using Finsupp.induction_linear with - | zero => simp - | add => simp [*] - | single σ a => simp [map_one_snd_of_isMulCocycle₂ Fact.out σ] + intro x + ext σ + simp [map_one_snd_of_isMulCocycle₂ Fact.out σ] mul_assoc := by rintro ⟨x⟩ ⟨y⟩ ⟨z⟩ ext : 1 @@ -274,16 +277,8 @@ def incl : K →ₐ[F] CrossProductAlgebra f where commutes' _ := by ext; simp [Algebra.algebraMap_eq_smul_one] lemma smul_eq_incl_mul (k : K) (x : CrossProductAlgebra f) : k • x = incl f k * x := by - obtain ⟨x⟩ := x - ext : 1 - dsimp - induction x using Finsupp.induction_linear with - | zero => simp - | add => simp [*] - | single σ b => simp only [Finsupp.smul_single, smul_eq_mul, incl_apply, val_smul, val_one, - mulLinearMap_single_single, one_mul, AlgEquiv.one_apply, mul_right_comm _ _ b, - map_one_fst_of_isMulCocycle₂ Fact.out σ, ne_eq, Units.ne_zero, not_false_eq_true, - inv_mul_cancel_right₀] + ext σ + simp [incl_apply, map_one_fst_of_isMulCocycle₂ Fact.out σ, mul_right_comm] instance [CommSemiring R] [Algebra R K] : IsScalarTower R (CrossProductAlgebra f) (CrossProductAlgebra f) where @@ -300,19 +295,12 @@ def of (σ : Gal(K, F)) : (CrossProductAlgebra f)ˣ where ext : 1 simp only [Units.val_inv_eq_inv_val, mk_mul_mk, mulLinearMap_single_single, mul_inv_cancel, map_mul, map_inv₀, one_mul, val_one] - congr - convert congr((σ (f (σ⁻¹, σ)))⁻¹ * (σ (f (1, 1)))⁻¹ * (f (1, 1))⁻¹ * - $((Fact.out : IsMulCocycle₂ f) σ σ⁻¹ σ)) using 1 - · simp [map_one_fst_of_isMulCocycle₂ Fact.out σ, mul_assoc] - · calc - (f (1, 1) : K)⁻¹ - _ = σ (f (1, 1)) * (σ (f (1, 1)))⁻¹ * σ (f (σ⁻¹, σ)) * - (σ (f (σ⁻¹, σ)))⁻¹ * (f (1, 1))⁻¹ := by - simp [← map_inv₀, ← map_mul] - _ = (σ (f (σ⁻¹, σ)))⁻¹ * (σ (f (1, 1)))⁻¹ * (f (1, 1))⁻¹ * - (σ (f (σ⁻¹, σ)) * σ (f (1, 1))) := by - group - _ = _ := by simp [map_one_snd_of_isMulCocycle₂ Fact.out σ] + congr 1 + rw [← mul_inv, ← div_eq_inv_mul, ← one_div (f (1, 1) : K)] + apply (div_eq_div_iff (by simp) (Units.ne_zero _)).2 + simpa [map_one_fst_of_isMulCocycle₂ Fact.out σ, + map_one_snd_of_isMulCocycle₂ Fact.out σ, mul_comm] using + congr(($((Fact.out : IsMulCocycle₂ f) σ σ⁻¹ σ)).val) inv_val := by ext : 1 simp only [Units.val_inv_eq_inv_val, mk_mul_mk, mulLinearMap_single_single, inv_mul_cancel, @@ -477,7 +465,9 @@ variable (I) in map. -/ private lemma coe_equivQuotient (hI) : (equivQuotient I hI).toLinearMap = I.ringCon.mkL K := by refine basis.ext fun σ ↦ ?_ - simp [equivQuotient, basis, CrossProductAlgebra.basis, RingCon.mkL, quotientBasis] + change (quotientBasis I hI).repr.symm (basis.repr (basis σ)) = _ + rw [Basis.repr_self, Basis.repr_symm_single_one] + simp only [quotientBasis, Basis.coe_mk, comp_apply] instance : IsSimpleRing (CrossProductAlgebra f) := by refine ⟨⟨fun I ↦ Classical.or_iff_not_imp_right.2 fun hI ↦ ?_⟩⟩ diff --git a/LeanPool/BrauerGroupNew/DoubleCentralizer.lean b/LeanPool/BrauerGroupNew/DoubleCentralizer.lean index 04ecac1f7e..e638ec519b 100644 --- a/LeanPool/BrauerGroupNew/DoubleCentralizer.lean +++ b/LeanPool/BrauerGroupNew/DoubleCentralizer.lean @@ -9,9 +9,22 @@ Copyright (c) 2024 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang -/ +module + +public import Mathlib.RingTheory.SimpleRing.Field +public import LeanPool.BrauerGroupNew.BrauerGroup +import LeanPool.BrauerGroupNew.Centralizer import LeanPool.BrauerGroupNew.LemmasAboutSimpleRing +import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Operations import LeanPool.BrauerGroupNew.SkolemNoether -import Mathlib.RingTheory.SimpleRing.Field +import Mathlib.Algebra.Azumaya.Basic +import Mathlib.Algebra.Central.Matrix +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.RingTheory.SimpleRing.Congr +import Mathlib.RingTheory.SimpleRing.Matrix /-! # LeanPool.BrauerGroupNew.DoubleCentralizer @@ -19,6 +32,8 @@ import Mathlib.RingTheory.SimpleRing.Field Imported Lean Pool material for `LeanPool.BrauerGroupNew.DoubleCentralizer`. -/ +@[expose] public section + universe u v variable {F A : Type u} @@ -222,33 +237,9 @@ lemma centralizer_mulLeft_le_of_isCentralSimple : ((Algebra.TensorProduct.includeLeft (R := F) (S := F) (A := B) (B := Bᵐᵒᵖ)).range : Set (B ⊗[F] Bᵐᵒᵖ)) = (Algebra.TensorProduct.includeRight (R := F) (A := B) (B := Bᵐᵒᵖ)).range := by - refine le_antisymm ?_ ?_ - · set ℬ := Module.finBasis F Bᵐᵒᵖ - intro z hz - obtain ⟨s, rfl⟩ := TensorProduct.eq_repr_basis_right ℬ z - refine Subalgebra.sum_mem _ fun i hi => ?_ - have : (s i) ∈ Subalgebra.center F B := by - rw [Subalgebra.mem_center_iff] - intro b' - have eq := hz (b' ⊗ₜ 1) (by simp) - simp only [Finsupp.sum, Finset.mul_sum, Algebra.TensorProduct.tmul_mul_tmul, one_mul, - Finset.sum_mul, mul_one] at eq - rw [← sub_eq_zero, ← Finset.sum_sub_distrib] at eq - simp_rw [← TensorProduct.sub_tmul] at eq - replace eq := IsCentralSimple.TensorProduct.sum_tmul_basis_right_eq_zero' (h := eq) - specialize eq i hi - rw [sub_eq_zero] at eq - exact eq - rw [Algebra.IsCentral.center_eq_bot, Algebra.mem_bot] at this - obtain ⟨x, hx⟩ := this - dsimp only - rw [← hx, Algebra.algebraMap_eq_smul_one, ← smul_tmul'] - exact Subalgebra.smul_mem _ (by simp) _ - · set ℬ := Module.finBasis F B - rintro _ ⟨z, rfl⟩ _ ⟨y, rfl⟩ - simp only [AlgHom.toRingHom_eq_coe, RingHom.coe_coe, Algebra.TensorProduct.includeLeft_apply, - Algebra.TensorProduct.includeRight_apply, Algebra.TensorProduct.tmul_mul_tmul, mul_one, - one_mul] + rw [Subalgebra.centralizer_range_includeLeft_eq_center_tensorProduct, + Algebra.TensorProduct.map_range, AlgHom.comp_id, Subalgebra.range_comp_val, + Algebra.IsCentral.center_eq_bot, Algebra.map_bot, bot_sup_eq] rw [eq] at hx' obtain ⟨y, hy⟩ := hx' simp only [AlgHom.toRingHom_eq_coe, RingHom.coe_coe, @@ -501,77 +492,8 @@ omit [FiniteDimensional F A] [Algebra.IsCentral F A] [IsSimpleRing A] in lemma Subalgebra.conj_simple_iff {B : Subalgebra F A} {x : Aˣ} : IsSimpleOrder (TwoSidedIdeal <| B.conj x) ↔ IsSimpleOrder (TwoSidedIdeal B) := by - let e : TwoSidedIdeal (B.conj x) ≃o TwoSidedIdeal B := - { toFun J := J.comap (B.toConj x) - invFun J := .mk' - (Set.image (B.toConj x) J) - (⟨0, TwoSidedIdeal.zero_mem _, by simp⟩) - (by - rintro _ _ ⟨a, ha, rfl⟩ ⟨b, hb, rfl⟩ - rw [← map_add] - refine ⟨a + b, J.add_mem ha hb, rfl⟩) - (by - rintro _ ⟨a, ha, rfl⟩ - rw [← map_neg] - refine ⟨-a, J.neg_mem ha, rfl⟩) - (by - rintro ⟨_, ⟨a, ha, rfl⟩⟩ _ ⟨b, hb, rfl⟩ - refine ⟨⟨a, ha⟩ * b, J.mul_mem_left _ _ hb, ?_⟩ - ext - simp_all) - (by - rintro ⟨_, ⟨a, ha, rfl⟩⟩ ⟨_, ⟨b, hb, rfl⟩⟩ ⟨c, hc1, hc2⟩ - refine ⟨⟨a, ha⟩ * ⟨b, hb⟩, J.mul_mem_right _ _ <| by - have h : (x : A) * (c : A) * (↑x⁻¹ : A) = (x : A) * a * (↑x⁻¹ : A) := - Subtype.ext_iff.1 hc2 - rw [Units.mul_left_inj, Units.mul_right_inj] at h - have hac : (⟨a, ha⟩ : B) = c := Subtype.ext h.symm - rw [hac] - exact hc1, ?_⟩ - ext - simp only [toConj, MulMemClass.mk_mul_mk, AlgHom.coe_mk, RingHom.coe_mk, MonoidHom.coe_mk, - OneHom.coe_mk, mul_assoc] - rw [← mul_assoc x⁻¹.1, Units.inv_mul, one_mul]) - left_inv := by - intro J - ext ⟨_, ⟨a, ha, rfl⟩⟩ - simp only [toConj, AlgHom.coe_mk, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk] - simp_all only [TwoSidedIdeal.mem_mk', Set.mem_image, SetLike.mem_coe, - TwoSidedIdeal.mem_comap, AlgHom.coe_mk, RingHom.coe_mk, MonoidHom.coe_mk, - OneHom.coe_mk, Subtype.exists] - constructor - · rintro ⟨b, _, hbJ, hbe⟩ - exact hbe ▸ hbJ - · intro h - exact ⟨a, ha, h, rfl⟩ - right_inv := by - intro J - ext ⟨a, ha⟩ - simp only [TwoSidedIdeal.mem_comap] - generalize_proofs - rw [TwoSidedIdeal.mem_mk'] - try assumption - simp only [toConj, AlgHom.coe_mk, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk, - Set.mem_image, SetLike.mem_coe, Subtype.mk.injEq, Units.mul_left_inj, Units.mul_right_inj, - Subtype.exists, exists_and_right, exists_eq_right, ha, exists_true_left] - map_rel_iff' := by - intro J K - simp only [Equiv.coe_fn_mk] - constructor - · rintro H ⟨_, ⟨a, ha1, rfl⟩⟩ ha2 - have := @H ⟨a, ha1⟩ (by - simp only [toConj, TwoSidedIdeal.mem_comap, AlgHom.coe_mk, RingHom.coe_mk, - MonoidHom.coe_mk, OneHom.coe_mk, ha2]) - simp only [toConj, TwoSidedIdeal.mem_comap, AlgHom.coe_mk, RingHom.coe_mk, MonoidHom.coe_mk, - OneHom.coe_mk] at this - exact this - · intro H ⟨a, ha1⟩ ha2 - simp only [toConj, TwoSidedIdeal.mem_comap, AlgHom.coe_mk, RingHom.coe_mk, MonoidHom.coe_mk, - OneHom.coe_mk] at ha2 - simp only [toConj, TwoSidedIdeal.mem_comap, AlgHom.coe_mk, RingHom.coe_mk, MonoidHom.coe_mk, - OneHom.coe_mk] - exact H ha2 } - rw [OrderIso.isSimpleOrder_iff e] + exact (TwoSidedIdeal.orderIsoOfRingEquiv + (Subalgebra.conjEquiv B x).symm.toRingEquiv).isSimpleOrder_iff omit [FiniteDimensional F A] [Algebra.IsCentral F A] [IsSimpleRing A] in lemma Subalgebra.conj_centralizer (B : Subalgebra F A) {x : Aˣ} : @@ -840,10 +762,10 @@ noncomputable def writeAsTensorProduct A ≃ₐ[F] B ⊗[F] Subalgebra.centralizer F (B : Set A) := haveI s1 : IsSimpleRing (Subalgebra.centralizer F (B : Set A)) := centralizerIsSimple B (Module.Free.chooseBasis _ _) - haveI s2 : IsSimpleRing (B ⊗[F] Subalgebra.centralizer F (B : Set A)) := - ⟨TwoSidedIdeal.orderIsoOfRingEquiv - (Algebra.TensorProduct.comm F B (Subalgebra.centralizer F (B : Set A))).toRingEquiv - |>.isSimpleOrder⟩ + haveI s2 : IsSimpleRing (B ⊗[F] Subalgebra.centralizer F (B : Set A)) := by + exact IsSimpleRing.of_ringEquiv + (Algebra.TensorProduct.comm F (Subalgebra.centralizer F (B : Set A)) B).toRingEquiv + (IsCentralSimple.TensorProduct.simple F (Subalgebra.centralizer F (B : Set A)) B) AlgEquiv.symm <| AlgEquiv.ofBijective (Algebra.TensorProduct.lift B.val (Subalgebra.val _) fun x y => show _ = _ by simpa using y.2 x x.2) <| bijective_of_dim_eq_of_isCentralSimple F (B ⊗[F] Subalgebra.centralizer F (B : Set A)) A diff --git a/LeanPool/BrauerGroupNew/Examples/ShortComplex/LeftHomologyMapData.lean b/LeanPool/BrauerGroupNew/Examples/ShortComplex/LeftHomologyMapData.lean index f0530adac8..d5a37d7197 100644 --- a/LeanPool/BrauerGroupNew/Examples/ShortComplex/LeftHomologyMapData.lean +++ b/LeanPool/BrauerGroupNew/Examples/ShortComplex/LeftHomologyMapData.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.Algebra.Homology.ShortComplex.ModuleCat +public import Mathlib.Algebra.Homology.ShortComplex.ModuleCat /-! # LeanPool.BrauerGroupNew.Examples.ShortComplex.LeftHomologyMapData @@ -12,6 +13,8 @@ import Mathlib.Algebra.Homology.ShortComplex.ModuleCat Imported Lean Pool material for `LeanPool.BrauerGroupNew.Examples.ShortComplex.LeftHomologyMapData`. -/ +@[expose] public section + universe v u open CategoryTheory diff --git a/LeanPool/BrauerGroupNew/ExtendScalar.lean b/LeanPool/BrauerGroupNew/ExtendScalar.lean index 284faf8469..1978502275 100644 --- a/LeanPool/BrauerGroupNew/ExtendScalar.lean +++ b/LeanPool/BrauerGroupNew/ExtendScalar.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.RingTheory.TensorProduct.Basic +public import Mathlib.RingTheory.TensorProduct.Basic /-! # LeanPool.BrauerGroupNew.ExtendScalar @@ -12,6 +13,8 @@ import Mathlib.RingTheory.TensorProduct.Basic Imported Lean Pool material for `LeanPool.BrauerGroupNew.ExtendScalar`. -/ +@[expose] public section + open scoped TensorProduct universe u diff --git a/LeanPool/BrauerGroupNew/FieldCat.lean b/LeanPool/BrauerGroupNew/FieldCat.lean index 86553c0f83..a5f9d27e4d 100644 --- a/LeanPool/BrauerGroupNew/FieldCat.lean +++ b/LeanPool/BrauerGroupNew/FieldCat.lean @@ -9,22 +9,25 @@ Copyright (c) 2024 Yunzhou Xie. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie -/ -import Mathlib.Algebra.Category.Ring.Basic -import Mathlib.Algebra.EuclideanDomain.Field -import Mathlib.Algebra.Ring.CompTypeclasses -import Mathlib.Combinatorics.Quiver.ReflQuiver +module + +public import Mathlib.Algebra.Category.Ring.Basic +public import Mathlib.Combinatorics.Quiver.ReflQuiver +public import Mathlib.Algebra.Field.Defs /-! # Category instances for `Field`. -/ +@[expose] public section + universe u v open CategoryTheory /-- The category of fields. -/ structure FieldCat where - private mk :: + mk :: /-- The underlying type. -/ carrier : Type u [field : Field carrier] @@ -52,7 +55,7 @@ variable {R} in /-- The type of morphisms in `FieldCat`. -/ @[ext] structure Hom (R S : FieldCat) where - private mk :: + mk :: /-- The underlying ring hom. -/ hom : R →+* S diff --git a/LeanPool/BrauerGroupNew/FiniteField.lean b/LeanPool/BrauerGroupNew/FiniteField.lean index a6e4478a1c..6ee7a44568 100644 --- a/LeanPool/BrauerGroupNew/FiniteField.lean +++ b/LeanPool/BrauerGroupNew/FiniteField.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ -import LeanPool.BrauerGroupNew.BrauerGroup +module + +public import LeanPool.BrauerGroupNew.BrauerGroup +import LeanPool.BrauerGroupNew.Wedderburn +import Mathlib.Algebra.Azumaya.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic import Mathlib.RingTheory.LittleWedderburn /-! @@ -12,6 +17,8 @@ import Mathlib.RingTheory.LittleWedderburn This file proves that the Brauer group of a finite field is trivial. -/ +@[expose] public section + variable (K : Type*) [Field K] [Finite K] suppress_compilation diff --git a/LeanPool/BrauerGroupNew/FrobeniusTheorem.lean b/LeanPool/BrauerGroupNew/FrobeniusTheorem.lean index d3034b6267..002c374f95 100644 --- a/LeanPool/BrauerGroupNew/FrobeniusTheorem.lean +++ b/LeanPool/BrauerGroupNew/FrobeniusTheorem.lean @@ -3,12 +3,21 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ - +module + +public import Mathlib.Algebra.QuaternionBasis +public import LeanPool.BrauerGroupNew.Subfield.Defs +public import Mathlib.Algebra.Central.Defs +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.LinearAlgebra.FiniteDimensional.Defs +import LeanPool.BrauerGroupNew.DoubleCentralizer +import LeanPool.BrauerGroupNew.SkolemNoether import LeanPool.BrauerGroupNew.Subfield.FiniteDimensional import LeanPool.BrauerGroupNew.Subfield.Subfield -import Mathlib.Algebra.QuaternionBasis -import Mathlib.Analysis.Quaternion -import Mathlib.LinearAlgebra.Complex.FiniteDimensional +import Mathlib.Analysis.Complex.Polynomial.Basic +import Mathlib.FieldTheory.PurelyInseparable.Basic +import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # LeanPool.BrauerGroupNew.FrobeniusTheorem @@ -16,6 +25,8 @@ import Mathlib.LinearAlgebra.Complex.FiniteDimensional Imported Lean Pool material for `LeanPool.BrauerGroupNew.FrobeniusTheorem`. -/ +@[expose] public section + suppress_compilation open FiniteDimensional Module TensorProduct @@ -26,11 +37,8 @@ section prerequisites theorem rank_1_D_iso_R [Algebra ℝ D] : Module.finrank ℝ D = 1 → Nonempty (D ≃ₐ[ℝ] ℝ) := fun h ↦ by - have h' := Subalgebra.finrank_eq_one_iff (F := ℝ) (S := (⊤ : Subalgebra ℝ D)) - have : Module.finrank ℝ (⊤ : Subalgebra ℝ D) = 1 := by - simp_all only [Subalgebra.finrank_eq_one_iff, Subalgebra.bot_eq_top_of_finrank_eq_one] - exact ⟨Subalgebra.topEquiv.symm.trans <| Subalgebra.equivOfEq _ _ - (h'.1 this)|>.trans <| Algebra.botEquiv ℝ D⟩ + exact ⟨(AlgEquiv.ofBijective (Algebra.ofId ℝ D) + (Algebra.finrank_eq_one_iff_bijective_algebraMap.mp h)).symm⟩ lemma RealExtension_is_RorC (K : Type) [Field K] [Algebra ℝ K] [FiniteDimensional ℝ K] : Nonempty (K ≃ₐ[ℝ] ℝ) ∨ Nonempty (K ≃ₐ[ℝ] ℂ) := by @@ -80,16 +88,7 @@ abbrev f : k →ₐ[ℝ] k where map_add' x y := by simp only [map_add] commutes' := fun r ↦ by simp only [AlgEquiv.commutes, Complex.coe_algebraMap, Complex.conj_ofReal] - rw [← mul_one (algebraMap _ _ r), ← Algebra.smul_def] - nth_rw 1 [← mul_one r] - unfold Complex.ofReal - rw [← smul_eq_mul, show (⟨r • 1, 0⟩ : ℂ) = r • ⟨1, 0⟩ by - apply Complex.ext - · simp only [smul_eq_mul, mul_one, Complex.real_smul, Complex.mul_re, Complex.ofReal_re, - Complex.ofReal_im, mul_zero, sub_zero] - · simp only [Complex.real_smul, Complex.mul_im, Complex.ofReal_re, mul_zero, - Complex.ofReal_im, mul_one, add_zero]] - rw [_root_.map_smul, show ⟨1, 0⟩ = (1 : ℂ) by rfl, _root_.map_one] + exact e.symm.commutes r omit hD' in lemma f_injective : Function.Injective (f k e) := by diff --git a/LeanPool/BrauerGroupNew/IsoSecond.lean b/LeanPool/BrauerGroupNew/IsoSecond.lean index f783bfc6e0..204dee05b9 100644 --- a/LeanPool/BrauerGroupNew/IsoSecond.lean +++ b/LeanPool/BrauerGroupNew/IsoSecond.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ - -import LeanPool.BrauerGroupNew.Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree -import LeanPool.BrauerGroupNew.ToSecond +module + +public import LeanPool.BrauerGroupNew.Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree +public import LeanPool.BrauerGroupNew.ToSecond +public import Mathlib.RingTheory.SimpleModule.Basic +import LeanPool.BrauerGroupNew.Wedderburn +import LeanPool.BrauerGroupNew.ZeroSevenFourE +import Mathlib.Algebra.Azumaya.Basic +import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.LinearAlgebra.Matrix.FiniteDimensional +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # LeanPool.BrauerGroupNew.IsoSecond @@ -13,6 +22,8 @@ import LeanPool.BrauerGroupNew.ToSecond Imported Lean Pool material for `LeanPool.BrauerGroupNew.IsoSecond`. -/ +@[expose] public section + suppress_compilation open Module @@ -575,49 +586,12 @@ lemma exists_simple_module_directSum [IsGalois F K] : Nonempty (C ≃ₗ[C] ι →₀ S) := by obtain ⟨S, _, _, _, ι, ⟨iso⟩⟩ := directSum_simple_module_over_simple_ring F C C refine ⟨S, inferInstance, inferInstance, inferInstance, ι, ?_, ⟨iso⟩⟩ - haveI infinite : Module.Finite C (ι →₀ S) := Module.Finite.equiv iso - letI : Module F S := Module.compHom S (algebraMap F C) - haveI : LinearMap.CompatibleSMul C (ι →₀ S) F C := by - constructor - intro l f x - change _ = algebraMap F C f • l x - rw [← map_smul] - congr 1 - apply val_injective - simp only [val_smul, smul_eq_mul, val_mul] - induction x.val using Finsupp.induction_linear with - | zero => simp - | add f g _ _ => simp_all [smul_add] - | single σ c => - simp only [Finsupp.smul_single, Algebra.algebraMap_eq_smul_one, val_smul, val_one, - map_one_fst_of_isMulCocycle₂ Fact.out, Pi.mul_apply, Units.val_mul, mul_inv_rev, - mulLinearMap_single_single, one_mul, AlgEquiv.one_apply, Algebra.smul_mul_assoc] - rw [mul_comm _ c, mul_assoc c, ← smul_mul_assoc, ← mul_assoc ((β (1, 1)).1⁻¹ * _), - mul_assoc (β (1, 1)).1⁻¹, inv_mul_cancel₀ (by simp), _root_.mul_one] - field_simp - let iso' : C ≃ₗ[F] (ι →₀ S) := iso.restrictScalars F - haveI : IsScalarTower F C (ι →₀ S) := by - constructor - intro f c x - change _ = algebraMap F C f • _ • x - rw [Algebra.smul_def, mul_smul] - haveI : Module.Finite F (ι →₀ S) := Module.Finite.trans C (ι →₀ S) - have eq := LinearEquiv.finrank_eq iso' - -- rw [M_F_dim, pow_three] at eq - refine (@Cardinal.lt_aleph0_iff_fintype ι).1 ?_ |>.some - apply_fun ((↑) : ℕ → Cardinal) at eq - rw [finrank_eq_rank, finrank_eq_rank, rank_finsupp F S ι] at eq - have ineq : Module.rank F C < Cardinal.aleph0 := by - rw [rank_lt_aleph0_iff]; infer_instance - rw [eq] at ineq - simp only [Cardinal.lift_id] at ineq - have : Nontrivial S := IsSimpleModule.nontrivial C S - have ineq2 := @Cardinal.le_mul_left (Cardinal.mk ι) (Module.rank F S) - (by - suffices 0 < Module.rank F S by exact Ne.symm (ne_of_lt this) - apply rank_pos) - rw [mul_comm] at ineq2 - exact lt_of_le_of_lt ineq2 ineq + haveI : Module.Finite C (ι →₀ S) := Module.Finite.equiv iso + haveI : Nontrivial S := IsSimpleModule.nontrivial C S + haveI : Finite ι := by + obtain ⟨s, hs⟩ := Module.Finite.fg_top (R := C) (M := ι →₀ S) + exact finite_of_span_finite_eq_top_finsupp s.finite_toSet hs + exact Fintype.ofFinite ι variable [IsGalois F K] @@ -724,14 +698,8 @@ lemma dim_endCSM : (finrank F K)^2 = /-- Move the matrix algebra description from the opposite algebra back to `C`. -/ def CIsoAux'' : - C ≃ₐ[F] (Matrix (Fin (Fintype.card ι)) (Fin (Fintype.card ι)) (Module.End C SM))ᵐᵒᵖ where - toFun c := op <| CIsoAux' (op c) - invFun m := (CIsoAux'.symm m.unop).unop - left_inv c := by simp only [unop_op, AlgEquiv.symm_apply_apply] - right_inv m := by simp only [op_unop, AlgEquiv.apply_symm_apply] - map_mul' c c' := by simp [op_mul, map_mul] - map_add' c c' := by simp [op_add, map_add] - commutes' f := by simp [Algebra.algebraMap_eq_smul_one] + C ≃ₐ[F] (Matrix (Fin (Fintype.card ι)) (Fin (Fintype.card ι)) (Module.End C SM))ᵐᵒᵖ := + AlgEquiv.opComm.symm CIsoAux' /-- The final matrix-algebra model for the product cross-product algebra. -/ def CIso : C ≃ₐ[F] (Matrix (Fin (Fintype.card ι)) (Fin (Fintype.card ι)) (Module.End C SM)ᵐᵒᵖ) := @@ -741,44 +709,12 @@ variable (α β) in lemma M_directSum : ∃ (ιM : Type) (_ : Fintype ιM), Nonempty (M α β ≃ₗ[C] ιM →₀ SM) := by obtain ⟨ιM, ⟨iso⟩⟩ := directSum_simple_module_over_simple_ring' F C (M α β) SM refine ⟨ιM, ?_, ⟨iso⟩⟩ - haveI : LinearMap.CompatibleSMul C (ιM →₀ SM) F C := by - constructor - intro l f x - change _ = algebraMap F C f • l x - rw [← map_smul] - congr 1 - apply val_injective - simp [Algebra.algebraMap_eq_smul_one] - let iso' : M α β ≃ₗ[F] (ιM →₀ SM) := iso.restrictScalars F - haveI : IsScalarTower F C (ιM →₀ SM) := by - constructor - intro f c x - change _ = algebraMap F C f • _ • x - rw [Algebra.smul_def, mul_smul] haveI : Module.Finite C (ιM →₀ SM) := Module.Finite.equiv iso - haveI : Module.Finite F (ιM →₀ SM) := Module.Finite.trans C (ιM →₀ SM) - have eq := LinearEquiv.finrank_eq iso' - rw [M_F_dim, pow_three] at eq - refine (@Cardinal.lt_aleph0_iff_fintype ιM).1 ?_ |>.some - apply_fun ((↑) : ℕ → Cardinal) at eq - simp only [Nat.cast_mul] at eq - rw [finrank_eq_rank, finrank_eq_rank, rank_finsupp F SM ιM] at eq - have ineq : Module.rank F K < Cardinal.aleph0 := by - rw [Module.rank_lt_aleph0_iff]; infer_instance - replace ineq : Module.rank F K * (Module.rank F K * Module.rank F K) < Cardinal.aleph0 := by - apply Cardinal.mul_lt_aleph0 - · assumption - apply Cardinal.mul_lt_aleph0 <;> - assumption - rw [eq] at ineq - simp only [Cardinal.lift_id] at ineq - have : Nontrivial SM := IsSimpleModule.nontrivial C SM - have ineq2 := @Cardinal.le_mul_left (Cardinal.mk ιM) (Module.rank F SM) - (by - suffices 0 < Module.rank F SM by exact Ne.symm (ne_of_lt this) - apply rank_pos) - rw [mul_comm] at ineq2 - exact lt_of_le_of_lt ineq2 ineq + haveI : Nontrivial SM := IsSimpleModule.nontrivial C SM + haveI : Finite ιM := by + obtain ⟨s, hs⟩ := Module.Finite.fg_top (R := C) (M := ιM →₀ SM) + exact finite_of_span_finite_eq_top_finsupp s.finite_toSet hs + exact Fintype.ofFinite ιM variable (α β) in /-- The finite index set for the simple-module decomposition of `M`. -/ @@ -835,34 +771,8 @@ def MIsoPow' : M α β ≃ₗ[F] Fin (finrank F K * Fintype.card ι) → SM := variable (α β) in /-- Conjugation by `MIsoPow` identifies endomorphism algebras over `C`. -/ def endCMIso : - Module.End C (M α β) ≃ₐ[F] Module.End C (Fin (finrank F K * Fintype.card ι) → SM) where - toFun x := (MIsoPow α β) ∘ₗ x ∘ₗ (MIsoPow α β).symm - invFun x := (MIsoPow α β).symm ∘ₗ x ∘ₗ (MIsoPow α β) - left_inv x := by - simp only [← LinearMap.comp_assoc, LinearEquiv.comp_coe, LinearEquiv.self_trans_symm, - LinearEquiv.refl_toLinearMap, LinearMap.id_comp] - simp only [LinearMap.comp_assoc, LinearEquiv.comp_coe, LinearEquiv.self_trans_symm, - LinearEquiv.refl_toLinearMap, LinearMap.comp_id] - right_inv x := by - simp only [← LinearMap.comp_assoc, LinearEquiv.comp_coe, LinearEquiv.symm_trans_self, - LinearEquiv.refl_toLinearMap, LinearMap.id_comp] - simp only [LinearMap.comp_assoc, LinearEquiv.comp_coe, LinearEquiv.symm_trans_self, - LinearEquiv.refl_toLinearMap, LinearMap.comp_id] - map_mul' x y := by - refine DFunLike.ext _ _ fun z ↦ ?_ - simp only [LinearMap.coe_comp, LinearEquiv.coe_coe, Function.comp_apply, Module.End.mul_apply, - LinearEquiv.symm_apply_apply] - map_add' x y := by - refine DFunLike.ext _ _ fun z ↦ ?_ - simp only [LinearMap.coe_comp, LinearEquiv.coe_coe, Function.comp_apply, LinearMap.add_apply, - map_add] - commutes' f := by - refine DFunLike.ext _ _ fun z ↦ ?_ - simp only [LinearMap.coe_comp, LinearEquiv.coe_coe, Function.comp_apply, - Module.algebraMap_end_apply] - change (MIsoPow' α β) (f • (MIsoPow' α β).symm z) = _ - rw [map_smul] - simp [LinearEquiv.apply_symm_apply] + Module.End C (M α β) ≃ₐ[F] Module.End C (Fin (finrank F K * Fintype.card ι) → SM) := + (MIsoPow α β).conjAlgEquiv F instance : NeZero (finrank F K * Fintype.card ι) := by constructor @@ -901,18 +811,8 @@ def φ1 : (A ⊗[F] B)ᵐᵒᵖ ≃ₐ[F] Module.End C (M α β) := open MulOpposite in /-- The tensor product algebra as the opposite of the endomorphism algebra of `M`. -/ -def φ2 : (A ⊗[F] B) ≃ₐ[F] (Module.End C (M α β))ᵐᵒᵖ where - toFun a := op <| φ1 (op a) - invFun g := (φ1.symm g.unop).unop - left_inv x := by simp - right_inv x := by simp - map_mul' := by intros; simp - map_add' := by intros; simp - commutes' f := by - simp only [Algebra.TensorProduct.algebraMap_apply, MulOpposite.algebraMap_apply, op_inj] - rw [Algebra.algebraMap_eq_smul_one, ← smul_tmul', op_smul, ← (φ0 (α := α) (β := β)).commutes f, - Algebra.algebraMap_eq_smul_one] - rfl +def φ2 : (A ⊗[F] B) ≃ₐ[F] (Module.End C (M α β))ᵐᵒᵖ := + AlgEquiv.opComm.symm φ1 /-- The tensor product algebra as an opposite matrix algebra over `End_C(SM)`. -/ def φ3 : diff --git a/LeanPool/BrauerGroupNew/LemmasAboutSimpleRing.lean b/LeanPool/BrauerGroupNew/LemmasAboutSimpleRing.lean index f35ab904fe..6f3d7c38ea 100644 --- a/LeanPool/BrauerGroupNew/LemmasAboutSimpleRing.lean +++ b/LeanPool/BrauerGroupNew/LemmasAboutSimpleRing.lean @@ -3,15 +3,28 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ -import LeanPool.BrauerGroupNew.CentralSimple +module + +public import Mathlib.RingTheory.TensorProduct.Basic import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Operations +import LeanPool.BrauerGroupNew.TwoSidedIdeal +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Rat.Floor +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.LinearAlgebra.Basis.VectorSpace import Mathlib.RingTheory.Flat.FaithfullyFlat.Basic +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.BrauerGroupNew.LemmasAboutSimpleRing Imported Lean Pool material for `LeanPool.BrauerGroupNew.LemmasAboutSimpleRing`. -/ + +@[expose] public section universe u variable (K : Type u) [Field K] open TensorProduct in diff --git a/LeanPool/BrauerGroupNew/Mathlib.lean b/LeanPool/BrauerGroupNew/Mathlib.lean index 7c4e117282..f74093f5fd 100644 --- a/LeanPool/BrauerGroupNew/Mathlib.lean +++ b/LeanPool/BrauerGroupNew/Mathlib.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.Algebra -import LeanPool.BrauerGroupNew.Mathlib.Data -import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra -import LeanPool.BrauerGroupNew.Mathlib.RepresentationTheory -import LeanPool.BrauerGroupNew.Mathlib.RingTheory +public import LeanPool.BrauerGroupNew.Mathlib.Algebra +public import LeanPool.BrauerGroupNew.Mathlib.Data +public import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra +public import LeanPool.BrauerGroupNew.Mathlib.RepresentationTheory +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory /-! # Brauer Group New Mathlib Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/Algebra.lean b/LeanPool/BrauerGroupNew/Mathlib/Algebra.lean index 8c7f718080..220c3f1cc1 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/Algebra.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/Algebra.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra +public import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra /-! # Brauer Group New Mathlib Algebra Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra.lean b/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra.lean index 00dc49e86d..5b3e4916e4 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Equiv -import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra +public import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Equiv +public import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra /-! # Brauer Group New Mathlib Algebra Algebra Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Equiv.lean b/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Equiv.lean index 514f48ba60..3debe1b249 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Equiv.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Equiv.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module + +public meta import Mathlib.Tactic.ToDual import Mathlib.Algebra.Algebra.Equiv /-! @@ -11,5 +14,7 @@ import Mathlib.Algebra.Algebra.Equiv Imported Lean Pool material for `LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Equiv`. -/ +@[expose] public section + /-- Galois-group notation as algebra equivalences. -/ notation "Gal("K ", "F")" => K ≃ₐ[F] K diff --git a/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra.lean b/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra.lean index c31c55f5da..2311971b23 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Basic -import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Directed -import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Lattice +public import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Basic +public import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Directed +public import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Lattice /-! # Brauer Group New Mathlib Algebra Algebra Subalgebra Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra/Basic.lean b/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra/Basic.lean index 4fd913efb1..108b4289b1 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra/Basic.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra/Basic.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.Algebra.Algebra.Subalgebra.Basic +public import Mathlib.Algebra.Algebra.Subalgebra.Basic /-! # LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Basic @@ -12,6 +13,8 @@ import Mathlib.Algebra.Algebra.Subalgebra.Basic Imported Lean Pool material for `LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Basic`. -/ +@[expose] public section + namespace Subalgebra variable {R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A] {L S T U : Subalgebra R A} diff --git a/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra/Directed.lean b/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra/Directed.lean index e83d6cc179..ccf5ad8321 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra/Directed.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra/Directed.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module +public import Mathlib.Algebra.Algebra.Subalgebra.Lattice import Mathlib.Algebra.Algebra.Subalgebra.Directed /-! @@ -13,6 +15,8 @@ Imported Lean Pool material for `LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Directed`. -/ +@[expose] public section + namespace Subalgebra variable {R A ι : Type*} [CommSemiring R] [Semiring A] [Algebra R A] {K : ι → Subalgebra R A} {s : Set ι} diff --git a/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra/Lattice.lean b/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra/Lattice.lean index ab9fa91bde..55d6f30af5 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra/Lattice.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/Algebra/Algebra/Subalgebra/Lattice.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.Algebra.Algebra.Subalgebra.Lattice +public import Mathlib.Algebra.Algebra.Subalgebra.Basic +import Mathlib.Tactic.Bound.Init /-! # LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Lattice @@ -13,6 +15,8 @@ Imported Lean Pool material for `LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Lattice`. -/ +@[expose] public section + variable {R A B : Type*} [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B] lemma Subalgebra.map_centralizer_le_centralizer_image (s : Set A) (f : A →ₐ[R] B) : diff --git a/LeanPool/BrauerGroupNew/Mathlib/Data.lean b/LeanPool/BrauerGroupNew/Mathlib/Data.lean index 0d8ba21a73..2ed1b5ea11 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/Data.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/Data.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.Data.DFinsupp +public import LeanPool.BrauerGroupNew.Mathlib.Data.DFinsupp +import Mathlib.Tactic.Bound.Init /-! # Brauer Group New Mathlib Data Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/Data/DFinsupp.lean b/LeanPool/BrauerGroupNew/Mathlib/Data/DFinsupp.lean index 702547cd5f..cfd92958e0 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/Data/DFinsupp.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/Data/DFinsupp.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.Data.DFinsupp.Submonoid +public import LeanPool.BrauerGroupNew.Mathlib.Data.DFinsupp.Submonoid +import Mathlib.Tactic.Bound.Init /-! # Brauer Group New Mathlib DFinsupp Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/Data/DFinsupp/Submonoid.lean b/LeanPool/BrauerGroupNew/Mathlib/Data/DFinsupp/Submonoid.lean index 14b28e009c..b400c57e71 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/Data/DFinsupp/Submonoid.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/Data/DFinsupp/Submonoid.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ -import Mathlib.Data.DFinsupp.Submonoid -import Mathlib.Data.Finsupp.Basic +module + +public import Mathlib.Algebra.BigOperators.Finsupp.Basic +import Mathlib.Tactic.Bound.Init /-! # LeanPool.BrauerGroupNew.Mathlib.Data.DFinsupp.Submonoid @@ -12,6 +14,8 @@ import Mathlib.Data.Finsupp.Basic Imported Lean Pool material for `LeanPool.BrauerGroupNew.Mathlib.Data.DFinsupp.Submonoid`. -/ +@[expose] public section + variable {ι γ β : Type*} open Finsupp diff --git a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra.lean b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra.lean index 257b8d4e33..ec84e7b46d 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.LinearIndependent -import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Matrix -import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Span +public import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.LinearIndependent +public import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Matrix +public import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Span +import Mathlib.Data.Nat.Totient /-! # Brauer Group New Mathlib LinearAlgebra Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/LinearIndependent.lean b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/LinearIndependent.lean index ddf7db8686..4a739ad06a 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/LinearIndependent.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/LinearIndependent.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.LinearIndependent.Defs +public import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.LinearIndependent.Defs /-! # Brauer Group New Mathlib LinearIndependent Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/LinearIndependent/Defs.lean b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/LinearIndependent/Defs.lean index 99dfde1b58..9515bf591c 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/LinearIndependent/Defs.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/LinearIndependent/Defs.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ -import Mathlib.LinearAlgebra.LinearIndependent.Defs +module + +public import Mathlib.LinearAlgebra.LinearIndependent.Defs /-! # LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.LinearIndependent.Defs @@ -12,6 +14,8 @@ Imported Lean Pool material for `LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.LinearIndependent.Defs`. -/ +@[expose] public section + variable {ι R M : Type*} {v : ι → M} [Semiring R] [AddCommMonoid M] [Module R M] -- TODO: Replace `linearIndependent_iff_finset_linearIndependent` diff --git a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix.lean b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix.lean index 9c88adb5e2..814509d927 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Matrix.Charpoly -import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup +public import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Matrix.Charpoly +public import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup +import Mathlib.Data.Nat.Totient /-! # Brauer Group New Mathlib LinearAlgebra Matrix Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/Charpoly.lean b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/Charpoly.lean index 4025fadf96..c892a20a7f 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/Charpoly.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/Charpoly.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Matrix.Charpoly.Basic +public import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Matrix.Charpoly.Basic /-! # Brauer Group New Mathlib LinearAlgebra Matrix Charpoly Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean index 5c774cb6e4..9a8af8b4ef 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic +public import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic /-! # Matrix characteristic polynomial helpers @@ -12,6 +13,8 @@ import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic This file restores upstream helper lemmas for block diagonal characteristic polynomials. -/ +@[expose] public section + variable {F : Type*} [Field F] /-- A subtype of a product that depends only on the second component. -/ diff --git a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/GeneralLinearGroup.lean b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/GeneralLinearGroup.lean index cb6ae8fe38..b199d3240a 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/GeneralLinearGroup.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/GeneralLinearGroup.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Basic +public import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Basic +import Mathlib.Data.Nat.Totient /-! # Brauer Group New Mathlib LinearAlgebra Matrix GeneralLinearGroup Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/GeneralLinearGroup/Basic.lean b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/GeneralLinearGroup/Basic.lean index 807d741915..8356d7e63f 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/GeneralLinearGroup/Basic.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Matrix/GeneralLinearGroup/Basic.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic -import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Defs +public import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic +import Mathlib.Data.Nat.Totient /-! # General linear group characteristic polynomial helpers @@ -13,6 +14,8 @@ import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Defs This file restores a similarity invariance lemma for matrix characteristic polynomials. -/ +@[expose] public section + variable {F : Type*} [Field F] open Matrix Polynomial in diff --git a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Span.lean b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Span.lean index 4426466c59..89b95d2f99 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Span.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Span.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Span.Basic +public import LeanPool.BrauerGroupNew.Mathlib.LinearAlgebra.Span.Basic +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # Brauer Group New Mathlib Span Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Span/Basic.lean b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Span/Basic.lean index 580745a5d9..02f9b087aa 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Span/Basic.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/LinearAlgebra/Span/Basic.lean @@ -3,10 +3,17 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ -import Mathlib.Algebra.BigOperators.GroupWithZero.Action -import Mathlib.Algebra.Module.Submodule.Basic -import Mathlib.LinearAlgebra.Finsupp.LinearCombination -import Mathlib.LinearAlgebra.Span.Defs +module + +public import Mathlib.Algebra.BigOperators.GroupWithZero.Action +public import Mathlib.Algebra.Module.Submodule.Basic +public import Mathlib.LinearAlgebra.Finsupp.LinearCombination +public import Mathlib.LinearAlgebra.Span.Defs + +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # Span compatibility imports @@ -16,3 +23,5 @@ that declaration is available in current Mathlib from `Mathlib.LinearAlgebra.Finsupp.LinearCombination`, so this file is kept as an import-compatible shim. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory.lean b/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory.lean index c2dded602b..7868aef9ca 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.RepresentationTheory.Homological +public import LeanPool.BrauerGroupNew.Mathlib.RepresentationTheory.Homological /-! # Brauer Group New Mathlib RepresentationTheory Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory/Homological.lean b/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory/Homological.lean index 1a54efc4e7..b9a98c21a2 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory/Homological.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory/Homological.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.RepresentationTheory.Homological.GroupCohomology +public import LeanPool.BrauerGroupNew.Mathlib.RepresentationTheory.Homological.GroupCohomology /-! # Brauer Group New Mathlib RepresentationTheory Homological Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory/Homological/GroupCohomology.lean b/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory/Homological/GroupCohomology.lean index 39cbfebf13..79248ee967 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory/Homological/GroupCohomology.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory/Homological/GroupCohomology.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree +public import LeanPool.BrauerGroupNew.Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree /-! # Brauer Group New Mathlib RepresentationTheory Homological GroupCohomology Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory/Homological/GroupCohomology/LowDegree.lean b/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory/Homological/GroupCohomology/LowDegree.lean index f5a10aafdc..d9d1a26c34 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory/Homological/GroupCohomology/LowDegree.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RepresentationTheory/Homological/GroupCohomology/LowDegree.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree +public import Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree /-! # Low-degree group cohomology compatibility @@ -12,6 +13,8 @@ import Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree This file restores upstream aliases and multiplicative cocycle closure lemmas. -/ +@[expose] public section + variable {G M : Type*} [Group G] [CommGroup M] [MulDistribMulAction G M] {f g : G × G → M} alias groupCohomology.IsMulCocycle₂.of_mem_cocycles₂ := diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory.lean index 4f33be9d0e..ec27da86c3 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory.lean @@ -3,16 +3,19 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubring -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubsemiring -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.Congruence -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.MatrixAlgebra -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TensorProduct -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubring +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubsemiring +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.Congruence +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.MatrixAlgebra +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TensorProduct +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal /-! # Brauer Group New Mathlib RingTheory Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/Congruence.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/Congruence.lean index 34ab729a34..dbbaeac7a1 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/Congruence.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/Congruence.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.Congruence.Basic -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.Congruence.Defs +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.Congruence.Basic +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.Congruence.Defs +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # Brauer Group New Mathlib RingTheory Congruence Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/Congruence/Basic.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/Congruence/Basic.lean index cbd268dc8b..77ca25ea69 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/Congruence/Basic.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/Congruence/Basic.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.Algebra.Algebra.Hom -import Mathlib.Algebra.RingQuot -import Mathlib.RingTheory.Congruence.Basic +public import Mathlib.RingTheory.Congruence.Basic +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.BrauerGroupNew.Mathlib.RingTheory.Congruence.Basic @@ -14,6 +15,8 @@ import Mathlib.RingTheory.Congruence.Basic Imported Lean Pool material for `LeanPool.BrauerGroupNew.Mathlib.RingTheory.Congruence.Basic`. -/ +@[expose] public section + open Function /-! diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/Congruence/Defs.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/Congruence/Defs.lean index 9e64024898..1a620af303 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/Congruence/Defs.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/Congruence/Defs.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.RingTheory.Congruence.Defs +public import Mathlib.RingTheory.Congruence.Defs /-! # Ring congruence induction compatibility @@ -12,6 +13,8 @@ import Mathlib.RingTheory.Congruence.Defs This file restores the upstream eliminator name used by the Brauer group port. -/ +@[expose] public section + namespace RingCon variable {R : Type*} [Ring R] diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/MatrixAlgebra.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/MatrixAlgebra.lean index daba699c40..dbfb8bca73 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/MatrixAlgebra.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/MatrixAlgebra.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.RingTheory.MatrixAlgebra +public import Mathlib.RingTheory.MatrixAlgebra /-! # Matrix algebra tensor compatibility @@ -12,6 +13,8 @@ import Mathlib.RingTheory.MatrixAlgebra This file restores an upstream matrix/tensor equivalence in the opposite direction. -/ +@[expose] public section + open scoped TensorProduct /-- Matrix algebras over `A` as scalar extension from matrices over `R`. -/ diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubring.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubring.lean index 0a6a2a9bd4..e3951c71e9 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubring.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubring.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubring.Defs +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubring.Defs /-! # Brauer Group New Mathlib NonUnitalSubring Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubring/Defs.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubring/Defs.lean index 66f0795701..585596f03c 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubring/Defs.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubring/Defs.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ -import Mathlib.RingTheory.NonUnitalSubring.Defs +module + +public import Mathlib.RingTheory.NonUnitalSubring.Defs /-! # LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubring.Defs @@ -11,6 +13,8 @@ import Mathlib.RingTheory.NonUnitalSubring.Defs Imported Lean Pool material for `LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubring.Defs`. -/ +@[expose] public section + variable {R : Type*} [NonUnitalRing R] @[simp] lemma NonUnitalSubring.carrier_eq_coe (S : NonUnitalSubring R) : S.carrier = S := rfl diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubsemiring.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubsemiring.lean index a72a8da112..efb7cdc2e7 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubsemiring.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubsemiring.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubsemiring.Basic -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubsemiring.Defs +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubsemiring.Basic +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubsemiring.Defs /-! # Brauer Group New Mathlib NonUnitalSubsemiring Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean index e05e0445a0..0b61cbd751 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ -import Mathlib.RingTheory.NonUnitalSubsemiring.Basic +module + +public import Mathlib.RingTheory.NonUnitalSubsemiring.Basic /-! # LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubsemiring.Basic @@ -12,4 +14,6 @@ Imported Lean Pool material for `LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubsemiring.Basic`. -/ +@[expose] public section + attribute [simp, norm_cast] NonUnitalSubsemiring.coe_center diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean index c6044353d1..ab4dd2730e 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/NonUnitalSubsemiring/Defs.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ -import Mathlib.RingTheory.NonUnitalSubsemiring.Defs +module + +public import Mathlib.RingTheory.NonUnitalSubsemiring.Defs /-! # LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubsemiring.Defs @@ -12,6 +14,8 @@ Imported Lean Pool material for `LeanPool.BrauerGroupNew.Mathlib.RingTheory.NonUnitalSubsemiring.Defs`. -/ +@[expose] public section + variable {R : Type*} [NonUnitalSemiring R] @[simp] diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TensorProduct.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TensorProduct.lean index e729ef5e10..e0b4c8e061 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TensorProduct.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TensorProduct.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TensorProduct.Basic +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TensorProduct.Basic /-! # Brauer Group New Mathlib RingTheory TensorProduct Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TensorProduct/Basic.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TensorProduct/Basic.lean index 47f53c0886..3aefb6fab1 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TensorProduct/Basic.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TensorProduct/Basic.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.RingTheory.TensorProduct.Basic +public import Mathlib.RingTheory.TensorProduct.Basic /-! # Tensor product associator compatibility @@ -12,6 +13,8 @@ import Mathlib.RingTheory.TensorProduct.Basic This file restores an upstream tensor-product associator over mixed scalar towers. -/ +@[expose] public section + open scoped TensorProduct /-- An algebra equivalence reassociating tensor products over two scalar towers. -/ diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal.lean index ba1da3e952..114913965f 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Kernel -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Basic -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Lattice -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Operations +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Kernel +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Basic +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Lattice +public import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Operations /-! # Brauer Group New Mathlib RingTheory TwoSidedIdeal Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Basic.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Basic.lean index 4f2450f201..5b55dc5422 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Basic.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Basic.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.Algebra.Ring.Opposite -import Mathlib.RingTheory.TwoSidedIdeal.Basic +public import Mathlib.RingTheory.TwoSidedIdeal.Basic /-! # Two-sided ideal compatibility helpers @@ -13,6 +13,8 @@ import Mathlib.RingTheory.TwoSidedIdeal.Basic This file restores upstream scalar-action helpers for two-sided ideals. -/ +@[expose] public section + namespace TwoSidedIdeal variable {R : Type*} diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Kernel.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Kernel.lean index d57bd547e8..2d7e1fb8ba 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Kernel.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Kernel.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.RingTheory.TwoSidedIdeal.Kernel +public import Mathlib.RingTheory.TwoSidedIdeal.Kernel /-! # LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Kernel @@ -12,6 +13,8 @@ import Mathlib.RingTheory.TwoSidedIdeal.Kernel Imported Lean Pool material for `LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Kernel`. -/ +@[expose] public section + variable {R S : Type*} [Ring R] [Ring S] namespace TwoSidedIdeal diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Lattice.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Lattice.lean index 4d519b48d2..f003374cd1 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Lattice.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Lattice.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ -import Mathlib.RingTheory.TwoSidedIdeal.Lattice +module + +public import Mathlib.RingTheory.TwoSidedIdeal.Lattice /-! # LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Lattice @@ -11,6 +13,8 @@ import Mathlib.RingTheory.TwoSidedIdeal.Lattice Imported Lean Pool material for `LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Lattice`. -/ +@[expose] public section + namespace TwoSidedIdeal variable {R : Type*} [NonUnitalNonAssocRing R] {I J : TwoSidedIdeal R} {x : R} diff --git a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Operations.lean b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Operations.lean index e6a1b744f9..ad7de9934f 100644 --- a/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Operations.lean +++ b/LeanPool/BrauerGroupNew/Mathlib/RingTheory/TwoSidedIdeal/Operations.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.RingTheory.TwoSidedIdeal.Operations +public import Mathlib.RingTheory.TwoSidedIdeal.Operations /-! # LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Operations @@ -13,6 +14,8 @@ Imported Lean Pool material for `LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Operations`. -/ +@[expose] public section + open Function namespace TwoSidedIdeal diff --git a/LeanPool/BrauerGroupNew/MatrixCenterEquiv.lean b/LeanPool/BrauerGroupNew/MatrixCenterEquiv.lean index 3f2dbdfbce..02501e0ddb 100644 --- a/LeanPool/BrauerGroupNew/MatrixCenterEquiv.lean +++ b/LeanPool/BrauerGroupNew/MatrixCenterEquiv.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.Algebra.Algebra.Subalgebra.Basic +public import Mathlib.Algebra.Algebra.Subalgebra.Basic +public import Mathlib.Data.Matrix.Basic import Mathlib.LinearAlgebra.Matrix.IsDiag /-! @@ -13,6 +15,8 @@ import Mathlib.LinearAlgebra.Matrix.IsDiag Imported Lean Pool material for `LeanPool.BrauerGroupNew.MatrixCenterEquiv`. -/ +@[expose] public section + local notation "M[" ι "," R "]" => Matrix ι ι R universe u v w diff --git a/LeanPool/BrauerGroupNew/MatrixEquivTensor.lean b/LeanPool/BrauerGroupNew/MatrixEquivTensor.lean index 8abd08f32c..aacd0e8d85 100644 --- a/LeanPool/BrauerGroupNew/MatrixEquivTensor.lean +++ b/LeanPool/BrauerGroupNew/MatrixEquivTensor.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import Mathlib.Data.Matrix.Basis -import Mathlib.RingTheory.TensorProduct.Basic +public import Mathlib.Data.Matrix.Basis +public import Mathlib.RingTheory.TensorProduct.Basic /-! # LeanPool.BrauerGroupNew.MatrixEquivTensor @@ -13,6 +14,8 @@ import Mathlib.RingTheory.TensorProduct.Basic Imported Lean Pool material for `LeanPool.BrauerGroupNew.MatrixEquivTensor`. -/ +@[expose] public section + open scoped TensorProduct variable (K F : Type*) [CommSemiring K] [CommSemiring F] [Algebra F K] diff --git a/LeanPool/BrauerGroupNew/Morita/ChangeOfRings.lean b/LeanPool/BrauerGroupNew/Morita/ChangeOfRings.lean index 9b9b3e3f79..4386b7d498 100644 --- a/LeanPool/BrauerGroupNew/Morita/ChangeOfRings.lean +++ b/LeanPool/BrauerGroupNew/Morita/ChangeOfRings.lean @@ -3,10 +3,13 @@ Copyright (c) 2022 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang -/ -import LeanPool.BrauerGroupNew.MoritaEquivalence +module + +public import LeanPool.BrauerGroupNew.MoritaEquivalence +public import Mathlib.RingTheory.Morita.Basic import Mathlib.Algebra.Category.ModuleCat.Abelian +import Mathlib.CategoryTheory.Limits.Shapes.Countable import Mathlib.RingTheory.HopkinsLevitzki -import Mathlib.RingTheory.Morita.Basic import Mathlib.RingTheory.SimpleModule.Rank /-! @@ -15,6 +18,8 @@ import Mathlib.RingTheory.SimpleModule.Rank Imported Lean Pool material for `LeanPool.BrauerGroupNew.Morita.ChangeOfRings`. -/ +@[expose] public section + open CategoryTheory Limits namespace ModuleCat diff --git a/LeanPool/BrauerGroupNew/Morita/TensorProduct.lean b/LeanPool/BrauerGroupNew/Morita/TensorProduct.lean index f187b9c35f..5758d004da 100644 --- a/LeanPool/BrauerGroupNew/Morita/TensorProduct.lean +++ b/LeanPool/BrauerGroupNew/Morita/TensorProduct.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ - -import LeanPool.BrauerGroupNew.Morita.ChangeOfRings +module + +public import LeanPool.BrauerGroupNew.Morita.ChangeOfRings +public import Mathlib.RingTheory.TensorProduct.Maps +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Rat.Floor +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.BrauerGroupNew.Morita.TensorProduct @@ -12,6 +21,8 @@ import LeanPool.BrauerGroupNew.Morita.ChangeOfRings Imported Lean Pool material for `LeanPool.BrauerGroupNew.Morita.TensorProduct`. -/ +@[expose] public section + universe u v w open scoped TensorProduct @@ -259,7 +270,7 @@ abbrev toModuleOverTensor : TensorModule R A C ⥤ ModuleCat (A ⊗[R] C) where __ := f.hom.hom map_smul' ac m := by induction ac using TensorProduct.inductionOn with - | tmul a c => simp [moduleAux_apply, TensorModule.commutes_apply] + | tmul a c => simp [TensorModule.commutes_apply] | add _ _ _ _ => simp_all [add_smul] } map_id M := by ext; simp @@ -290,7 +301,7 @@ abbrev e01 (M : TensorModule R A C) : · exact AddHom.id _ · intro a m change a • m = (moduleAux R A C M (a ⊗ₜ[R] (1 : C))) m - simp [moduleAux_apply] + simp · exact id · exact congrFun rfl · exact congrFun rfl)) fun c ↦ by diff --git a/LeanPool/BrauerGroupNew/MoritaEquivalence.lean b/LeanPool/BrauerGroupNew/MoritaEquivalence.lean index d50161d111..8a0732240d 100644 --- a/LeanPool/BrauerGroupNew/MoritaEquivalence.lean +++ b/LeanPool/BrauerGroupNew/MoritaEquivalence.lean @@ -3,16 +3,18 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module +public import Mathlib.Data.Matrix.Basis +public import Mathlib.RingTheory.SimpleModule.Basic +public import Mathlib.Algebra.Category.ModuleCat.Basic import Mathlib.Algebra.Category.ModuleCat.EpiMono import Mathlib.Algebra.Category.ModuleCat.Limits -import Mathlib.Algebra.Group.Subgroup.Finite -import Mathlib.Algebra.Homology.ShortComplex.Exact +import Mathlib.CategoryTheory.Adjunction.Limits +import Mathlib.CategoryTheory.EffectiveEpi.Basic +import Mathlib.CategoryTheory.Limits.Preserves.Creates.Finite import Mathlib.CategoryTheory.Limits.Shapes.Countable -import Mathlib.Data.Matrix.Basis import Mathlib.LinearAlgebra.Basis.VectorSpace -import Mathlib.RingTheory.SimpleModule.Basic -import Mathlib.RingTheory.SimpleRing.Basic /-! # Morita equivalence for matrix algebras @@ -21,6 +23,8 @@ This file ports the upstream BrauerGroup development proving the Morita equivalence between modules over a ring and over a matrix ring. -/ +@[expose] public section + open CategoryTheory Matrix Module universe u u' u'' v v' v'' w diff --git a/LeanPool/BrauerGroupNew/RelativeBrauer.lean b/LeanPool/BrauerGroupNew/RelativeBrauer.lean index ab4d0f9431..10a0728178 100644 --- a/LeanPool/BrauerGroupNew/RelativeBrauer.lean +++ b/LeanPool/BrauerGroupNew/RelativeBrauer.lean @@ -3,10 +3,19 @@ Copyright (c) 2024 Yunzhou Xie. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Jujian Zhang -/ +module -import LeanPool.BrauerGroupNew.BrauerGroup -import LeanPool.BrauerGroupNew.SplittingOfCSA +public import LeanPool.BrauerGroupNew.BrauerGroup +public import LeanPool.BrauerGroupNew.SplittingOfCSA +import LeanPool.BrauerGroupNew.Wedderburn import LeanPool.BrauerGroupNew.ZeroSevenFourE +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.LinearAlgebra.Matrix.FiniteDimensional +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.RingTheory.DedekindDomain.Basic +import Mathlib.RingTheory.SimpleRing.Matrix /-! # Relative Brauer Group @@ -20,6 +29,8 @@ import LeanPool.BrauerGroupNew.ZeroSevenFourE `dim_F B = (dim_F K)^2`. -/ +@[expose] public section + suppress_compilation universe u diff --git a/LeanPool/BrauerGroupNew/SkolemNoether.lean b/LeanPool/BrauerGroupNew/SkolemNoether.lean index 2bb3ffe5b8..bf300888a2 100644 --- a/LeanPool/BrauerGroupNew/SkolemNoether.lean +++ b/LeanPool/BrauerGroupNew/SkolemNoether.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module +public import LeanPool.BrauerGroupNew.ZeroSevenFourE +public import Mathlib.Algebra.Central.Defs +public import Mathlib.RingTheory.TensorProduct.Basic import LeanPool.BrauerGroupNew.BrauerGroup -import LeanPool.BrauerGroupNew.ZeroSevenFourE +import LeanPool.BrauerGroupNew.MoritaEquivalence +import LeanPool.BrauerGroupNew.Wedderburn +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # LeanPool.BrauerGroupNew.SkolemNoether @@ -13,6 +21,8 @@ import LeanPool.BrauerGroupNew.ZeroSevenFourE Imported Lean Pool material for `LeanPool.BrauerGroupNew.SkolemNoether`. -/ +@[expose] public section + suppress_compilation universe u v w diff --git a/LeanPool/BrauerGroupNew/SplittingOfCSA.lean b/LeanPool/BrauerGroupNew/SplittingOfCSA.lean index 158966fec8..38bd704dd7 100644 --- a/LeanPool/BrauerGroupNew/SplittingOfCSA.lean +++ b/LeanPool/BrauerGroupNew/SplittingOfCSA.lean @@ -3,15 +3,28 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module +public import LeanPool.BrauerGroupNew.ExtendScalar +public import Mathlib.Algebra.BrauerGroup.Defs +public import Mathlib.FieldTheory.IsAlgClosed.Basic +public import Mathlib.RingTheory.TwoSidedIdeal.Operations import LeanPool.BrauerGroupNew.AlgClosedUnion -import LeanPool.BrauerGroupNew.ExtendScalar +public import LeanPool.BrauerGroupNew.CentralSimple import LeanPool.BrauerGroupNew.LemmasAboutSimpleRing -import Mathlib.Algebra.BrauerGroup.Defs +import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Operations +import LeanPool.BrauerGroupNew.TwoSidedIdeal +public import LeanPool.BrauerGroupNew.Wedderburn +import Mathlib.Algebra.Azumaya.Basic import Mathlib.Algebra.Central.Matrix -import Mathlib.Analysis.Normed.Ring.Lemmas +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.ConditionallyCompleteOrder import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.RingTheory.Flat.FaithfullyFlat.Basic import Mathlib.RingTheory.SimpleRing.Matrix +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Splitting central simple algebras @@ -19,6 +32,8 @@ import Mathlib.RingTheory.SimpleRing.Matrix This file ports the upstream splitting-field infrastructure for central simple algebras. -/ +@[expose] public section + suppress_compilation universe u v w diff --git a/LeanPool/BrauerGroupNew/Subfield.lean b/LeanPool/BrauerGroupNew/Subfield.lean index 9b2072ac75..5af48c687f 100644 --- a/LeanPool/BrauerGroupNew/Subfield.lean +++ b/LeanPool/BrauerGroupNew/Subfield.lean @@ -3,15 +3,20 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Subfield.Defs -import LeanPool.BrauerGroupNew.Subfield.FiniteDimensional -import LeanPool.BrauerGroupNew.Subfield.Separable -import LeanPool.BrauerGroupNew.Subfield.Splitting -import LeanPool.BrauerGroupNew.Subfield.Subfield +public import LeanPool.BrauerGroupNew.Subfield.Defs +public import LeanPool.BrauerGroupNew.Subfield.FiniteDimensional +public import LeanPool.BrauerGroupNew.Subfield.Separable +public import LeanPool.BrauerGroupNew.Subfield.Splitting +public import LeanPool.BrauerGroupNew.Subfield.Subfield +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Brauer Group New Subfield Import index for the Brauer group formalization. -/ + +@[expose] public section diff --git a/LeanPool/BrauerGroupNew/Subfield/Defs.lean b/LeanPool/BrauerGroupNew/Subfield/Defs.lean index 79f2ea936a..082db8715d 100644 --- a/LeanPool/BrauerGroupNew/Subfield/Defs.lean +++ b/LeanPool/BrauerGroupNew/Subfield/Defs.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module +public import Mathlib.Algebra.Algebra.Subalgebra.Lattice import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Directed /-! @@ -12,6 +14,8 @@ import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Directed Imported Lean Pool material for `LeanPool.BrauerGroupNew.Subfield.Defs`. -/ +@[expose] public section + open Function TensorProduct MulOpposite /-- A subalgebra whose carrier is commutative and contains inverses of all nonzero elements. -/ diff --git a/LeanPool/BrauerGroupNew/Subfield/FiniteDimensional.lean b/LeanPool/BrauerGroupNew/Subfield/FiniteDimensional.lean index 98a137696c..c4098bbd65 100644 --- a/LeanPool/BrauerGroupNew/Subfield/FiniteDimensional.lean +++ b/LeanPool/BrauerGroupNew/Subfield/FiniteDimensional.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.Subfield.Defs +public import LeanPool.BrauerGroupNew.Subfield.Defs +public import Mathlib.LinearAlgebra.FiniteDimensional.Defs import Mathlib.LinearAlgebra.FiniteDimensional.Basic /-! @@ -13,6 +15,8 @@ import Mathlib.LinearAlgebra.FiniteDimensional.Basic Imported Lean Pool material for `LeanPool.BrauerGroupNew.Subfield.FiniteDimensional`. -/ +@[expose] public section + namespace SubField variable {K A : Type*} [Field K] [Ring A] [Algebra K A] {L : SubField K A} diff --git a/LeanPool/BrauerGroupNew/Subfield/Separable.lean b/LeanPool/BrauerGroupNew/Subfield/Separable.lean index 5872a42b57..2a36f3d1de 100644 --- a/LeanPool/BrauerGroupNew/Subfield/Separable.lean +++ b/LeanPool/BrauerGroupNew/Subfield/Separable.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module +public import LeanPool.BrauerGroupNew.SplittingOfCSA +public import LeanPool.BrauerGroupNew.Subfield.Defs +public import Mathlib.FieldTheory.Galois.Basic +import LeanPool.BrauerGroupNew.DoubleCentralizer import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Lattice +import LeanPool.BrauerGroupNew.Subfield.FiniteDimensional import LeanPool.BrauerGroupNew.Subfield.Splitting +import LeanPool.BrauerGroupNew.Subfield.Subfield import Mathlib.FieldTheory.JacobsonNoether +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # LeanPool.BrauerGroupNew.Subfield.Separable @@ -14,6 +23,8 @@ import Mathlib.FieldTheory.JacobsonNoether Imported Lean Pool material for `LeanPool.BrauerGroupNew.Subfield.Separable`. -/ +@[expose] public section + universe u variable (K D : Type u) [Field K] [DivisionRing D] [Algebra K D] [Algebra.IsCentral K D] @@ -25,36 +36,17 @@ lemma SubField.adjoin_centralizer_mul_comm (L : SubField K D) (a : D) (ha : a ∈ Subalgebra.centralizer K L) : ∀ (x y : D), x ∈ Algebra.adjoin K (L ∪ {a}) → y ∈ Algebra.adjoin K (L ∪ {a}) → x * y = y * x := fun x y hx hy ↦ by - rw [Algebra.mem_adjoin_iff] at hx hy - rw [Subalgebra.mem_centralizer_iff] at ha - refine Subring.closure_induction₂ (R := D) (fun x1 y1 hx1 hy1 ↦ by - simp only [Set.mem_union, SetLike.mem_coe, Set.mem_singleton_iff, Set.mem_range] at hx1 hy1 - obtain hx11 | hx12 | hx13 := hx1 - all_goals obtain hy11 | hy12 | hy13 := hy1 - · obtain ⟨b, rfl⟩ := hx11 - obtain ⟨c, rfl⟩ := hy11 - exact Algebra.commutes b ((algebraMap K D) c) - · obtain ⟨b, rfl⟩ := hx11 - exact Algebra.commutes b y1 - · obtain ⟨b, rfl⟩ := hx11 - subst hy13 - exact Algebra.commutes b y1 - · obtain ⟨b, rfl⟩ := hy11 - exact (Algebra.commutes b x1).symm - · exact L.2 hx12 hy12 - · simp_all - · subst hx13 - obtain ⟨b, rfl⟩ := hy11 - exact (Algebra.commutes b x1).symm - · simp_all - · simp_all) ?_ ?_ ?_ ?_ ?_ ?_ ?_ ?_ ?_ ?_ hx hy - all_goals try - simp_all only [Set.union_singleton, Set.union_insert, zero_mul, mul_zero, one_mul, mul_one, - neg_mul, mul_neg, add_mul, mul_add, forall_const, implies_true] - · rintro x y z - - - hxz hyz - rw [mul_assoc, hyz, ← mul_assoc, hxz, mul_assoc] - · rintro x y z - - - hxy hxz - rw [← mul_assoc, hxy, mul_assoc, hxz, ← mul_assoc] + have := Algebra.isMulCommutative_adjoin K (s := (L : Set D) ∪ {a}) <| by + intro x₁ hx₁ y₁ hy₁ _ + simp only [Set.mem_union, SetLike.mem_coe, Set.mem_singleton_iff] at hx₁ hy₁ + rcases hx₁ with hx₁ | rfl + · rcases hy₁ with hy₁ | rfl + · exact L.mul_comm hx₁ hy₁ + · exact (Subalgebra.mem_centralizer_iff K).1 ha x₁ hx₁ + · rcases hy₁ with hy₁ | rfl + · exact ((Subalgebra.mem_centralizer_iff K).1 ha y₁ hy₁).symm + · rfl + exact congrArg Subtype.val (mul_comm' (⟨x, hx⟩ : Algebra.adjoin K (L ∪ {a})) ⟨y, hy⟩) /-- The commutative ring structure on the algebra generated by adjoining a centralizing element. -/ @[reducible] @@ -403,13 +395,6 @@ theorem exists_sep_masSubfield' : ∃ (a : D), IsMax (SubField.botAdjoin K D a) (A₁ := Subalgebra.center K (Subalgebra.centralizer K (A := D) L)) (A₂ := L) (e2.trans e1.symm).toRingEquiv (RingEquiv.refl _) (by ext x - simp only [AlgEquiv.toRingEquiv_toRingHom, RingHom.coe_comp, RingHom.coe_coe, - Function.comp_apply, RingEquiv.coe_ringHom_refl, RingHomCompTriple.comp_eq, - SetLike.coe_eq_coe] - unfold e1 e2 - simp only [equivOfEq_symm] - erw [AlgEquiv.trans_apply] - apply Subtype.ext rfl) ha2 have cond1 : Algebra.IsSeparable K (SubField.adjoin K D L a.1 a.2) := by rw [Algebra.isSeparable_def] @@ -463,11 +448,7 @@ omit [DivisionRing D] [Algebra K D] [Algebra.IsCentral K D] [FiniteDimensional K private theorem algHom_fieldRange_isSeparable {L Kbar : Type u} [Field L] [Field Kbar] [Algebra K L] [Algebra K Kbar] [Algebra.IsSeparable K L] (f : L →ₐ[K] Kbar) : Algebra.IsSeparable K f.fieldRange := - Algebra.IsSeparable.of_equiv_equiv (B₁ := L) (B₂ := f.fieldRange) (RingEquiv.refl K) - (AlgEquiv.ofInjectiveField f).toRingEquiv <| by - ext - erw [AlgEquiv.ofInjective_apply _ f.injective] - simp + Algebra.IsSeparable.of_algHom K L (AlgEquiv.ofInjectiveField f).symm.toAlgHom omit [DivisionRing D] [Algebra K D] [Algebra.IsCentral K D] [FiniteDimensional K D] in private theorem normalClosure_isSeparable {Kbar : Type u} [Field Kbar] diff --git a/LeanPool/BrauerGroupNew/Subfield/Splitting.lean b/LeanPool/BrauerGroupNew/Subfield/Splitting.lean index cc6fa09184..89aeba43c6 100644 --- a/LeanPool/BrauerGroupNew/Subfield/Splitting.lean +++ b/LeanPool/BrauerGroupNew/Subfield/Splitting.lean @@ -3,11 +3,27 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module +public import LeanPool.BrauerGroupNew.BrauerGroup +public import LeanPool.BrauerGroupNew.SplittingOfCSA +public import LeanPool.BrauerGroupNew.Subfield.Defs +import LeanPool.BrauerGroupNew.DoubleCentralizer +import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Operations import LeanPool.BrauerGroupNew.MatrixEquivTensor import LeanPool.BrauerGroupNew.RelativeBrauer import LeanPool.BrauerGroupNew.Subfield.FiniteDimensional import LeanPool.BrauerGroupNew.Subfield.Subfield +import LeanPool.BrauerGroupNew.Wedderburn +import LeanPool.BrauerGroupNew.ZeroSevenFourE +import Mathlib.Algebra.Azumaya.Basic +import Mathlib.Algebra.Central.Matrix +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.LinearAlgebra.Matrix.FiniteDimensional +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.RingTheory.SimpleRing.Matrix /-! # LeanPool.BrauerGroupNew.Subfield.Splitting @@ -15,6 +31,8 @@ import LeanPool.BrauerGroupNew.Subfield.Subfield Imported Lean Pool material for `LeanPool.BrauerGroupNew.Subfield.Splitting`. -/ +@[expose] public section + universe u variable (K F : Type u) [Field K] [Field F] [Algebra F K] diff --git a/LeanPool/BrauerGroupNew/Subfield/Subfield.lean b/LeanPool/BrauerGroupNew/Subfield/Subfield.lean index ed79bbc81b..4ff96dd7ab 100644 --- a/LeanPool/BrauerGroupNew/Subfield/Subfield.lean +++ b/LeanPool/BrauerGroupNew/Subfield/Subfield.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module +public import LeanPool.BrauerGroupNew.Subfield.Defs +public import Mathlib.Algebra.Central.Defs +public import Mathlib.LinearAlgebra.FiniteDimensional.Defs import LeanPool.BrauerGroupNew.DoubleCentralizer import LeanPool.BrauerGroupNew.Mathlib.Algebra.Algebra.Subalgebra.Basic -import LeanPool.BrauerGroupNew.Subfield.Defs +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # LeanPool.BrauerGroupNew.Subfield.Subfield @@ -14,6 +20,8 @@ import LeanPool.BrauerGroupNew.Subfield.Defs Imported Lean Pool material for `LeanPool.BrauerGroupNew.Subfield.Subfield`. -/ +@[expose] public section + universe u section cors_of_DC diff --git a/LeanPool/BrauerGroupNew/ToSecond.lean b/LeanPool/BrauerGroupNew/ToSecond.lean index 7b9eda7829..5a378816ac 100644 --- a/LeanPool/BrauerGroupNew/ToSecond.lean +++ b/LeanPool/BrauerGroupNew/ToSecond.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.CrossProductAlgebra -import LeanPool.BrauerGroupNew.Mathlib.RingTheory.Congruence.Defs +public import LeanPool.BrauerGroupNew.CrossProductAlgebra +public import LeanPool.BrauerGroupNew.RelativeBrauer +public import Mathlib.Tactic.Continuity +import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Operations +public import LeanPool.BrauerGroupNew.SkolemNoether import LeanPool.BrauerGroupNew.Subfield.Splitting -import Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree +import LeanPool.BrauerGroupNew.Subfield.Subfield +import LeanPool.BrauerGroupNew.Wedderburn +import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # LeanPool.BrauerGroupNew.ToSecond @@ -15,6 +23,8 @@ import Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree Imported Lean Pool material for `LeanPool.BrauerGroupNew.ToSecond`. -/ +@[expose] public section + suppress_compilation open FiniteDimensional BrauerGroup Module groupCohomology @@ -742,7 +752,18 @@ noncomputable def fromSnd : let : Module K A := inferInstanceAs <| Module K (CrossProductAlgebra a) let : Module K B := inferInstanceAs <| Module K (CrossProductAlgebra b) let basis : Basis Gal(K, F) K B := (basis (f := b)).unitsSMul c + have basis_val (σ : Gal(K, F)) : + (basis σ : CrossProductAlgebra b).val = Finsupp.single σ (c σ : K) := by + change ((CrossProductAlgebra.basis (f := b)).unitsSMul c σ).val = _ + rw [Basis.unitsSMul_apply] + change ((c σ : K) • CrossProductAlgebra.basis σ).val = _ + rw [CrossProductAlgebra.val_smul, CrossProductAlgebra.basis_val, + Finsupp.smul_single, smul_eq_mul, _root_.mul_one] let φ0 : A ≃ₗ[K] B := CrossProductAlgebra.basis.equiv basis (.refl _) + have map_basis (σ : Gal(K, F)) : + φ0 (CrossProductAlgebra.basis σ : A) = basis σ := + Basis.equiv_apply (b := (CrossProductAlgebra.basis : Basis Gal(K, F) K A)) + (b' := basis) (e := Equiv.refl Gal(K, F)) σ have : LinearMap.CompatibleSMul A B F K := by constructor have eq (c : F) (a : A) : c • a = algebraMap F K c • a := @@ -763,10 +784,7 @@ noncomputable def fromSnd : CrossProductAlgebra.val_smul]] refine (φ0.map_smul ((↑(a (1, 1))⁻¹) : K) (CrossProductAlgebra.basis 1 : A)).trans ?_ - rw [show φ0 (CrossProductAlgebra.basis 1 : A) = - basis ((Equiv.refl Gal(K, F)) 1) by - exact Basis.equiv_apply (b := (CrossProductAlgebra.basis : Basis Gal(K, F) K A)) - (b' := basis) (e := Equiv.refl Gal(K, F)) 1] + rw [map_basis] apply val_injective change ((↑((a (1, 1))⁻¹) : K) • (basis ((Equiv.refl Gal(K, F)) 1) : CrossProductAlgebra b)).val = @@ -776,11 +794,8 @@ noncomputable def fromSnd : change ((↑(a (1, 1)))⁻¹ : K) • ((CrossProductAlgebra.basis.unitsSMul c) 1).val = Finsupp.single 1 (↑(b (1, 1)))⁻¹ - conv_lhs => enter [2, 1]; erw [Basis.unitsSMul_apply] - erw [CrossProductAlgebra.val_smul] - simp only [CrossProductAlgebra.basis, Basis.coe_ofRepr, valLinearEquiv_symm_apply, - AddEquiv.toEquiv_eq_coe, Equiv.invFun_as_coe, AddEquiv.coe_toEquiv_symm, - valAddEquiv_symm_apply_val, Finsupp.smul_single, smul_eq_mul, _root_.mul_one] + erw [basis_val] + simp only [Finsupp.smul_single, smul_eq_mul] congr 1 specialize hc 1 1 simp only [one_smul, _root_.mul_one, div_self', _root_.one_mul, Pi.div_apply, @@ -825,19 +840,7 @@ noncomputable def fromSnd : refine Eq.trans ?_ (congrArg₂ HMul.hMul (φ0.map_smul ((k1 : K)) (CrossProductAlgebra.basis σ : A)).symm (φ0.map_smul ((k2 : K)) (CrossProductAlgebra.basis τ : A)).symm) - rw [show φ0 (CrossProductAlgebra.basis (σ * τ) : A) = - basis ((Equiv.refl Gal(K, F)) (σ * τ)) by - exact Basis.equiv_apply (b := (CrossProductAlgebra.basis : Basis Gal(K, F) K A)) - (b' := basis) (e := Equiv.refl Gal(K, F)) (σ * τ), - show φ0 (CrossProductAlgebra.basis σ : A) = - basis ((Equiv.refl Gal(K, F)) σ) by - exact Basis.equiv_apply (b := (CrossProductAlgebra.basis : Basis Gal(K, F) K A)) - (b' := basis) (e := Equiv.refl Gal(K, F)) σ, - show φ0 (CrossProductAlgebra.basis τ : A) = - basis ((Equiv.refl Gal(K, F)) τ) by - exact Basis.equiv_apply (b := (CrossProductAlgebra.basis : Basis Gal(K, F) K A)) - (b' := basis) (e := Equiv.refl Gal(K, F)) τ] - simp only [Equiv.refl_apply] + erw [map_basis, map_basis, map_basis] apply val_injective change (((k1 * σ k2 * ↑(a (σ, τ))) : K) • (basis (σ * τ) : CrossProductAlgebra b)).val = @@ -846,13 +849,7 @@ noncomputable def fromSnd : change ((k1 * σ k2 * ↑(a (σ, τ))) : K) • (basis (σ * τ)).val = CrossProductAlgebra.mulLinearMap b ((k1 : K) • (basis σ).val) ((k2 : K) • (basis τ).val) - unfold basis - erw [Basis.unitsSMul_apply, Basis.unitsSMul_apply, Basis.unitsSMul_apply] - erw [CrossProductAlgebra.val_smul, CrossProductAlgebra.val_smul, - CrossProductAlgebra.val_smul] - simp only [CrossProductAlgebra.basis, Basis.coe_ofRepr, valLinearEquiv_symm_apply, - AddEquiv.toEquiv_eq_coe, Equiv.invFun_as_coe, AddEquiv.coe_toEquiv_symm, - valAddEquiv_symm_apply_val, Finsupp.smul_single, smul_eq_mul, _root_.mul_one, + simp only [basis_val, Finsupp.smul_single, smul_eq_mul, mulLinearMap_single_single, map_mul] congr 1 specialize hc σ τ diff --git a/LeanPool/BrauerGroupNew/TwoSidedIdeal.lean b/LeanPool/BrauerGroupNew/TwoSidedIdeal.lean index d6a9f02334..3a452ca2ea 100644 --- a/LeanPool/BrauerGroupNew/TwoSidedIdeal.lean +++ b/LeanPool/BrauerGroupNew/TwoSidedIdeal.lean @@ -3,14 +3,14 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module +public import Mathlib.RingTheory.SimpleRing.Defs +public import Mathlib.RingTheory.TwoSidedIdeal.Operations +public import Mathlib.RingTheory.TwoSidedIdeal.Kernel import LeanPool.BrauerGroupNew.Mathlib.RingTheory.TwoSidedIdeal.Kernel -import Mathlib.Algebra.Algebra.Hom -import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Data.Fintype.BigOperators -import Mathlib.RingTheory.SimpleRing.Defs import Mathlib.RingTheory.TwoSidedIdeal.BigOperators -import Mathlib.RingTheory.TwoSidedIdeal.Operations /-! # LeanPool.BrauerGroupNew.TwoSidedIdeal @@ -18,6 +18,8 @@ import Mathlib.RingTheory.TwoSidedIdeal.Operations Imported Lean Pool material for `LeanPool.BrauerGroupNew.TwoSidedIdeal`. -/ +@[expose] public section + variable {M : Type*} [AddCommMonoid M] (r : AddCon M) {ι : Type*} (s : Finset ι) variable {R : Type*} [Ring R] (t : TwoSidedIdeal R) diff --git a/LeanPool/BrauerGroupNew/Wedderburn.lean b/LeanPool/BrauerGroupNew/Wedderburn.lean index 2f877a99f5..cd591988d5 100644 --- a/LeanPool/BrauerGroupNew/Wedderburn.lean +++ b/LeanPool/BrauerGroupNew/Wedderburn.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module +public import Mathlib.Algebra.Module.Torsion.Basic + +public import Mathlib.Algebra.Central.Defs +public import Mathlib.FieldTheory.IsAlgClosed.Basic +public import Mathlib.RingTheory.Artinian.Defs +public import Mathlib.RingTheory.SimpleModule.Basic import LeanPool.BrauerGroupNew.MatrixCenterEquiv import LeanPool.BrauerGroupNew.TwoSidedIdeal -import Mathlib.Algebra.Azumaya.Basic -import Mathlib.Algebra.Central.Defs -import Mathlib.FieldTheory.IsAlgClosed.Basic import Mathlib.RingTheory.HopkinsLevitzki +import Mathlib.RingTheory.TwoSidedIdeal.BigOperators /-! # LeanPool.BrauerGroupNew.Wedderburn @@ -17,6 +22,8 @@ import Mathlib.RingTheory.HopkinsLevitzki Imported Lean Pool material for `LeanPool.BrauerGroupNew.Wedderburn`. -/ +@[expose] public section + variable (A : Type*) [Ring A] open Matrix MulOpposite diff --git a/LeanPool/BrauerGroupNew/ZeroSevenFourE.lean b/LeanPool/BrauerGroupNew/ZeroSevenFourE.lean index d0568bf15e..9af9296dc2 100644 --- a/LeanPool/BrauerGroupNew/ZeroSevenFourE.lean +++ b/LeanPool/BrauerGroupNew/ZeroSevenFourE.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Yunzhou Xie and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yunzhou Xie, Yichen Feng, Jujian Zhang, Yael Dillies -/ +module -import LeanPool.BrauerGroupNew.MoritaEquivalence -import LeanPool.BrauerGroupNew.Wedderburn -import Mathlib.Algebra.Category.ModuleCat.ChangeOfRings -import Mathlib.Algebra.Category.ModuleCat.Products -import Mathlib.RingTheory.LittleWedderburn +import Mathlib.CategoryTheory.Adjunction.Limits + +public import LeanPool.BrauerGroupNew.MoritaEquivalence +public import LeanPool.BrauerGroupNew.Wedderburn +public import Mathlib.Algebra.Category.ModuleCat.ChangeOfRings +public import Mathlib.Algebra.Category.ModuleCat.Products +public import Mathlib.RingTheory.LittleWedderburn /-! # The Stacks Project tag 074E @@ -17,6 +20,8 @@ This file ports the upstream Wedderburn-Artin uniqueness arguments used by the B development. -/ +@[expose] public section + open CategoryTheory DirectSum universe u v w @@ -346,7 +351,8 @@ private lemma matrixModuleEnd_apply {n : ℕ} [NeZero n] _ = v i * f (Pi.single (M := fun _ : Fin n => D) (0 : Fin n) (1 : D)) 0 := rfl omit [IsSimpleRing A] [FiniteDimensional k A] in -private noncomputable def matrixModuleEndAlgEquivMop {n : ℕ} [NeZero n] +/-- The endomorphism algebra of the standard matrix module is the opposite scalar algebra. -/ +noncomputable def matrixModuleEndAlgEquivMop {n : ℕ} [NeZero n] (D : Type v) [DivisionRing D] [Algebra k D] [IsScalarTower k (Matrix (Fin n) (Fin n) D) (Fin n → D)] [SMulCommClass (Matrix (Fin n) (Fin n) D) k (Fin n → D)] : diff --git a/LeanPool/Brouwer.lean b/LeanPool/Brouwer.lean index 24681ff9a0..22619c0b92 100644 --- a/LeanPool/Brouwer.lean +++ b/LeanPool/Brouwer.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Math_XMUM. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math_XMUM -/ +module -import LeanPool.Brouwer.Nash -import LeanPool.Brouwer.Primitive +public import LeanPool.Brouwer.Nash +public import LeanPool.Brouwer.Primitive +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # Existence of Nash equilibria via Brouwer's fixed-point theorem @@ -17,3 +20,5 @@ Main declarations: `ExistsNashEq`, `Brouwer`, `Brouwer_Product`, `IndexedLOrder. Tags: game-theory, nash-equilibrium, brouwer-fixed-point, scarf-lemma, simplex MSC: 91A06, 91A10, 47H10 -/ + +@[expose] public section diff --git a/LeanPool/Brouwer/Brouwer.lean b/LeanPool/Brouwer/Brouwer.lean index b77725cc1c..69a01b4864 100644 --- a/LeanPool/Brouwer/Brouwer.lean +++ b/LeanPool/Brouwer/Brouwer.lean @@ -3,22 +3,16 @@ Copyright (c) 2026 Math_XMUM. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math_XMUM -/ -import LeanPool.Brouwer.ScarfPath -import LeanPool.Brouwer.Simplex -import Mathlib.Data.PNat.Basic -import Mathlib.Order.PiLex +module + +public import Mathlib.Order.PiLex +public import LeanPool.Brouwer.Scarf +public import LeanPool.Brouwer.Simplex import Mathlib.Algebra.BigOperators.Field -import Mathlib.Order.Filter.AtTopBot.Archimedean -import Mathlib.Analysis.Convex.Topology -import Mathlib.Topology.MetricSpace.Bounded -import Mathlib.Topology.MetricSpace.Sequences -import Mathlib.Topology.MetricSpace.Lipschitz -import Mathlib.Topology.Sequences -import Mathlib.Topology.Algebra.Order.Field -import Mathlib.Analysis.Normed.Group.Constructions -import Mathlib.Analysis.Normed.Ring.Lemmas -import Mathlib.Analysis.SpecialFunctions.Sqrt import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.Positivity.Finset /-! # Brouwer's fixed-point theorem on a simplex @@ -30,6 +24,8 @@ finer and finer subdivisions and passing to a convergent subsequence of the resulting colorful points produces a fixed point. -/ +@[expose] public section + open Brouwer (standardSimplex) attribute [local instance] Classical.propDecidable diff --git a/LeanPool/Brouwer/BrouwerProduct.lean b/LeanPool/Brouwer/BrouwerProduct.lean index 752fad0072..dca6addc5f 100644 --- a/LeanPool/Brouwer/BrouwerProduct.lean +++ b/LeanPool/Brouwer/BrouwerProduct.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 Math_XMUM. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math_XMUM -/ +module + +public import LeanPool.Brouwer.Simplex import LeanPool.Brouwer.Brouwer +import Mathlib.Algebra.BigOperators.Field +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.Positivity.Finset /-! # Brouwer's fixed-point theorem on a product of simplices @@ -14,6 +22,8 @@ simplex onto the product, so a fixed point of a continuous self-map of the produ is obtained from the single-simplex theorem. -/ +@[expose] public section + open Brouwer (standardSimplex) open Filter diff --git a/LeanPool/Brouwer/Nash.lean b/LeanPool/Brouwer/Nash.lean index b2e079f768..a9085fda00 100644 --- a/LeanPool/Brouwer/Nash.lean +++ b/LeanPool/Brouwer/Nash.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Math_XMUM. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math_XMUM -/ +module + +public import LeanPool.Brouwer.Simplex import LeanPool.Brouwer.BrouwerProduct -import LeanPool.Brouwer.Simplex +import Mathlib.Algebra.BigOperators.Field +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.Positivity.Finset /-! # Existence of mixed Nash equilibria @@ -16,6 +23,8 @@ simplices, and `ExistsNashEq` derives the existence of a mixed Nash equilibrium every finite game from Brouwer's fixed-point theorem on a product of simplices. -/ +@[expose] public section + open Brouwer (standardSimplex) attribute [local instance] Classical.propDecidable diff --git a/LeanPool/Brouwer/Primitive.lean b/LeanPool/Brouwer/Primitive.lean index a52ae236ef..ee89ce50f1 100644 --- a/LeanPool/Brouwer/Primitive.lean +++ b/LeanPool/Brouwer/Primitive.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 Math_XMUM. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math_XMUM -/ -import LeanPool.Brouwer.Brouwer +module + +public import LeanPool.Brouwer.ScarfPath +public import Mathlib.Algebra.Group.End +public import Mathlib.Basic.Real.Basic +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.DegreeSum +import Mathlib.Tactic.Positivity.Finset /-! # Primitive sets and the slack-vector form of Scarf's lemma @@ -14,6 +22,8 @@ algorithm. It relates the room/door combinatorics developed in `Scarf` to this primitive-set picture used by the path-following termination argument. -/ +@[expose] public section + attribute [local instance] Classical.propDecidable open Finset diff --git a/LeanPool/Brouwer/Scarf.lean b/LeanPool/Brouwer/Scarf.lean index 61fdd71cd7..714d7f16f0 100644 --- a/LeanPool/Brouwer/Scarf.lean +++ b/LeanPool/Brouwer/Scarf.lean @@ -3,29 +3,20 @@ Copyright (c) 2026 Math_XMUM. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math_XMUM -/ -import Mathlib.Order.Defs.LinearOrder -import Mathlib.Order.MinMax -import Mathlib.Data.Finset.Lattice.Fold -import Mathlib.Data.Finset.Max -import Mathlib.Data.Finset.Card -import Mathlib.Data.Finset.Image -import Mathlib.Data.Fintype.Powerset -import Mathlib.Data.Fintype.Prod -import Mathlib.Data.Fintype.BigOperators -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Algebra.Order.BigOperators.Group.Finset -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Common -import Mathlib.Tactic.Tauto -import Mathlib.Tactic.Push -import Mathlib.Tactic.Cases -import Mathlib.Tactic.Choose -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Contrapose -import Mathlib.Tactic.Bound +module + +public import Mathlib.Data.Finset.Max +public import Mathlib.Data.Fintype.Powerset +public import Mathlib.Data.Fintype.Prod +public import Mathlib.Algebra.Ring.Parity +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # Scarf's combinatorial lemma @@ -38,6 +29,8 @@ machinery used in the parity (door-counting) argument that culminates in colorful room. -/ +@[expose] public section + section fiberlemma open Finset @@ -47,72 +40,24 @@ variable {α : Type u} {β : Type v} [DecidableEq α] [DecidableEq β] lemma injOn_sdiff (s : Finset α) (f : α → β) (h : s.card = (Finset.image f s).card + 1) : ∃ a b, a ∈ s ∧ b ∈ s ∧ f a = f b ∧ a ≠ b ∧ Set.InjOn f (s \ ({a, b} : Finset α)) := by - have of_card_domain_eq_card_image_succ (s : Finset α) (f : α → β) - (h : s.card = (Finset.image f s).card + 1) : - ∃ a b, a ∈ s ∧ b ∈ s ∧ f a = f b ∧ a ≠ b := by - suffices ¬ Set.InjOn f s by - contrapose! this - tauto - by_contra h1 - linarith [Finset.card_image_of_injOn h1] - obtain ⟨a, b, as, bs, h1, h2⟩ := of_card_domain_eq_card_image_succ s f h - have absub : {a, b} ⊆ s := Finset.insert_subset as (Finset.singleton_subset_iff.mpr bs) - use a, b - repeat apply And.intro;assumption - rw [←Finset.coe_sdiff] - apply Finset.injOn_of_card_image_eq - rw [Finset.card_sdiff_of_subset absub] - · have : (Finset.image f (s \ {a, b})).card = (Finset.image f s).card - 1 := by - have aux1 : ∀ c, c ∈ s → c ≠ a → c ≠ b → f c ≠ f a := by - intro c cs ca cb fcfa - have cardabc : ({a, b, c} : Finset α).card = 3 := by - rw [Finset.card_eq_three] - use a, b, c - tauto - have abcss : {a, b, c} ⊆ s := by - apply Finset.insert_subset as - apply Finset.insert_subset bs (by simp [cs]) - have : (image f s).card < s.card - 1 := - calc - _ = (image f ((s \ {a, b, c}) ∪ {a, b, c})).card := - congrArg _ (congrArg _ (Eq.symm (sdiff_union_of_subset abcss))) - _ = (image f (s \ {a, b, c}) ∪ image f {a, b, c}).card := - congrArg _ (Finset.image_union _ _) - _ ≤ (image f (s \ {a, b, c})).card + (image f {a, b, c}).card := - Finset.card_union_le _ _ - _ = (image f (s \ {a, b, c})).card + 1 := by - simp_all - _ ≤ (s \ {a, b, c}).card + 1 := by - simp [Finset.card_image_le] - _ = s.card - 3 + 1 := by - rw [Finset.card_sdiff_of_subset abcss, cardabc] - _ < _ := by - have : 2 < s.card := by - have := Finset.card_le_card abcss - omega - omega - omega - have aux2 : Finset.image f (s \ {a, b}) = Finset.image f s \ {f a} := by - ext x - constructor <;> intro h1' - · obtain ⟨c, csdiff, fcx⟩ := Finset.mem_image.1 h1' - obtain ⟨cs, cneab⟩ := Finset.mem_sdiff.1 csdiff - simp only [mem_insert, mem_singleton, not_or] at cneab - simpa only [mem_sdiff, mem_image, mem_singleton] - using ⟨⟨c, cs, fcx⟩, by simp only [← fcx]; exact aux1 c cs cneab.1 cneab.2⟩ - · simp only [mem_sdiff, mem_image, mem_singleton] at h1' - obtain ⟨c, cs, fcx⟩ := h1'.1 - simp only [← fcx, mem_image, mem_sdiff, mem_insert, mem_singleton, not_or] - use c - simp only [cs, true_and, and_true] - by_contra! hf - by_cases ceqa : c = a - · rw [ceqa] at fcx; rw [fcx] at h1'; tauto - · rw [hf ceqa, ←h1] at fcx; rw [fcx] at h1; tauto - rw [aux2, Finset.card_sdiff_of_subset (by - simpa using Finset.singleton_subset_iff.mpr (Finset.mem_image.mpr ⟨a, as, rfl⟩)), - card_singleton] - simp_all + obtain ⟨a, ha, b, hb, hne, heq⟩ := + Finset.exists_ne_map_eq_of_card_image_lt (by omega : (s.image f).card < s.card) + have h_image : (s.erase a).image f = s.image f := by + apply Finset.Subset.antisymm (Finset.image_subset_image (Finset.erase_subset a s)) + intro y hy + obtain ⟨z, hz, rfl⟩ := Finset.mem_image.mp hy + by_cases hza : z = a + · subst z + exact Finset.mem_image.mpr ⟨b, Finset.mem_erase.mpr ⟨hne.symm, hb⟩, heq.symm⟩ + · exact Finset.mem_image.mpr ⟨z, Finset.mem_erase.mpr ⟨hza, hz⟩, rfl⟩ + have hinj : Set.InjOn f (s.erase a) := by + apply Finset.injOn_of_card_image_eq + rw [h_image, Finset.card_erase_of_mem ha, h] + omega + refine ⟨a, b, ha, hb, heq, hne, hinj.mono ?_⟩ + intro z hz + rcases hz with ⟨hz, hnot⟩ + exact Finset.mem_erase.mpr ⟨fun h => hnot (Finset.mem_insert.mpr (Or.inl h)), hz⟩ end fiberlemma @@ -443,48 +388,24 @@ lemma sublemma_3_2 (τ : Finset T) (D : Finset I) (x : T) have h_inj_insert : Set.InjOn (mini h_insert_nonempty) (D : Set I) := by apply Finset.injOn_of_card_image_eq rw [h_min_eq_image, h_is_room.2] + have h_mini_eq_for_ne_i : ∀ k ∈ D, + k ≠ i → mini h_insert_nonempty k = mini h_nonempty k := by + intro k hk hk_ne_i + have hneq : mini h_insert_nonempty k ≠ x := fun h => + hk_ne_i (h_inj_insert hk hi_mem (h.trans hi_eq.symm)) + let := IST k + have hmem : mini h_insert_nonempty k ∈ τ := + (Finset.mem_insert.mp (Finset.min'_mem (insert x τ) h_insert_nonempty)).resolve_left hneq + apply le_antisymm + · exact Finset.min'_le _ _ (Finset.mem_insert_of_mem (Finset.min'_mem τ h_nonempty)) + · exact Finset.min'_le _ _ hmem have h_mini_lt_x : ∀ k ∈ D, k ≠ i → mini h_nonempty k <[k] x := by - intros k hk_mem hk_ne_i - have h_mini_cases : mini h_insert_nonempty k = mini h_nonempty k ∨ mini h_insert_nonempty k = - x := by - let := IST k - unfold mini - by_cases h : τ.min' h_nonempty ≤[k] x - · left - apply le_antisymm - · apply Finset.min'_le - exact Finset.mem_insert_of_mem (Finset.min'_mem _ h_nonempty) - · apply Finset.le_min' - intro y hy - cases Finset.mem_insert.mp hy with - | inl h_eq => rw [h_eq]; exact h - | inr h_mem => exact Finset.min'_le _ _ h_mem - · right - apply le_antisymm - · apply Finset.min'_le - exact Finset.mem_insert_self _ _ - · apply Finset.le_min' - intro y hy - cases Finset.mem_insert.mp hy with - | inl h_eq => rw [h_eq] - | inr h_mem => exact le_of_not_ge (fun h_le => h (le_trans (Finset.min'_le _ _ h_mem) - h_le)) - have h_mini_neq_x : mini h_insert_nonempty k ≠ x := by - intro h_eq - have h_inj : Set.InjOn (mini h_insert_nonempty) (D : Set I) := h_inj_insert - have hi_mem_D : i ∈ D := hi_mem - have hk_mem_D : k ∈ D := hk_mem - have h_mini_i_eq_x : mini h_insert_nonempty i = x := hi_eq - exact hk_ne_i (h_inj hi_mem_D hk_mem_D (h_mini_i_eq_x.trans h_eq.symm)).symm + intro k hk hk_ne_i let := IST k - have h_mini_eq_k : mini h_insert_nonempty k = mini h_nonempty k := by - simp_all apply lt_of_le_of_ne - · have h_le : mini h_insert_nonempty k ≤[k] x := by - apply @Finset.min'_le _ (IST k) - exact Finset.mem_insert_self x τ - simp_all - · exact fun h_eq_x => h_not_mem (h_eq_x ▸ Finset.min'_mem τ h_nonempty) + · rw [← h_mini_eq_for_ne_i k hk hk_ne_i] + exact Finset.min'_le _ _ (Finset.mem_insert_self x τ) + · exact fun h => h_not_mem (h ▸ Finset.min'_mem τ h_nonempty) have h_x_le_mini_i : x ≤[i] mini h_nonempty i := by let := IST i rw [← hi_eq] @@ -496,36 +417,6 @@ lemma sublemma_3_2 (τ : Finset T) (D : Finset I) (x : T) · simp [hik] · push Not at hik obtain ⟨hia, hib⟩ := hik - have h_mini_eq_for_ne_i : ∀ k ∈ D, - k ≠ i → mini h_insert_nonempty k = mini h_nonempty k := by - intros k hk_mem hk_ne_i - have h_cases : mini h_insert_nonempty k = mini h_nonempty k ∨ mini h_insert_nonempty k = - x := by - let := IST k - by_cases h : τ.min' h_nonempty ≤[k] x - · left - apply le_antisymm - · apply Finset.min'_le - exact Finset.mem_insert_of_mem (Finset.min'_mem _ h_nonempty) - · apply Finset.le_min' - intro y hy - cases Finset.mem_insert.mp hy with - | inl h_eq_x => rw [h_eq_x]; exact h - | inr h_mem => exact Finset.min'_le _ _ h_mem - · right - apply le_antisymm - · apply Finset.min'_le - exact Finset.mem_insert_self _ _ - · apply Finset.le_min' - intro y hy - cases Finset.mem_insert.mp hy with - | inl h_eq_x => rw [h_eq_x] - | inr h_mem => exact le_of_not_ge (fun h_le => h (le_trans (Finset.min'_le _ _ - h_mem) h_le)) - have h_mini_neq_x : mini h_insert_nonempty k ≠ x := by - intro h_eq_k_x - exact hk_ne_i (h_inj_insert hk_mem hi_mem (h_eq_k_x.trans hi_eq.symm)) - simp_all have h_mini_a_eq : mini h_insert_nonempty a = mini h_nonempty a := h_mini_eq_for_ne_i a ha (Ne.symm hia) have h_mini_b_eq : mini h_insert_nonempty b = mini h_nonempty b := h_mini_eq_for_ne_i b hb @@ -1571,36 +1462,11 @@ lemma doorsOfNCroomInjective [DecidableEq T] (h_room : isRoom σ C) ⟨Finset.mem_image_of_mem c h_x_in_σ, h_cx_notin_C⟩ rw [h_img_C_eq, Finset.mem_singleton] at h_cx_in_img_diff_D have h_c_eq : c x = c y := by rw [h_cx_in_img_diff_D] - have x_in_sigma : x ∈ σ := by - have : x ∈ insert x τ := Finset.mem_insert_self x τ - have : x ∈ σ := by - rw [←h_insert_x] - exact Finset.mem_insert_self x τ - exact this - have := h_y_unique x_in_sigma h_c_eq - exact h_x_eq_y this + exact h_x_eq_y (h_y_unique h_x_in_σ h_c_eq) exfalso have h_card_2 : (D \ (img.erase (c x))).card = 2 := by - have h_eq : D \ (img.erase (c x)) = insert (c x) (D \ img) := by - ext y - simp only [Finset.mem_sdiff, Finset.mem_erase, Finset.mem_insert] - constructor - · intro ⟨hy_D, hy_not_erase⟩ - simp only [ne_eq, not_and] at hy_not_erase - by_cases h : y = c x - · left; exact h - · simp_all - · intro h - cases h with - | inl h_eq => exact ⟨h_eq ▸ h_cx_in_D, by simp [h_eq]⟩ - | inr h_in => - exact ⟨h_in.1, by simp only [ne_eq, not_and]; intro h_neq; exact h_in.2⟩ - rw [h_eq, Finset.card_insert_of_notMem] - · rw [h_nc.2] - · intro h_mem - have := (Finset.mem_sdiff.mp h_mem).2 - have h_img_mem : c x ∈ img := Finset.mem_image_of_mem c h_x_in_σ - exact this h_img_mem + rw [Finset.sdiff_erase h_cx_in_D, Finset.card_insert_of_notMem + (fun h => (Finset.mem_sdiff.mp h).2 (Finset.mem_image_of_mem c h_x_in_σ)), h_nc.2] rw [h_card_2] at h_nc_card; linarith | odoor h0 h_door j hj_notin_C h_τ_eq_σ h_D_eq_insert => subst h_τ_eq_σ; subst h_D_eq_insert @@ -1614,22 +1480,8 @@ lemma doorsOfNCroomInjective [DecidableEq T] (h_room : isRoom σ C) hj_notin_C⟩ simp_all have h_card_2 : ((insert j C) \ img).card = 2 := by - have h_eq : (insert j C) \ img = (C \ img) ∪ {j} := by - ext x - simp only [Finset.mem_sdiff, Finset.mem_insert, Finset.mem_union, - Finset.mem_singleton] - constructor - · intro ⟨hx_in, hx_notin⟩ - cases hx_in with - | inl hx_eq_j => right; exact hx_eq_j - | inr hx_in_C => left; exact ⟨hx_in_C, hx_notin⟩ - · intro h - cases h with - | inl h => exact ⟨Or.inr h.1, h.2⟩ - | inr h => exact ⟨Or.inl h, by rw [h]; exact h_j_notin_img⟩ - rw [h_eq, Finset.card_union_of_disjoint] - · rw [h_nc.2, Finset.card_singleton] - · simp_all + rw [Finset.insert_sdiff_of_notMem _ h_j_notin_img, Finset.card_insert_of_notMem + (fun h => hj_notin_C (Finset.mem_sdiff.mp h).1), h_nc.2] rw [h_card_2] at h_nc_card; linarith · intro h simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at h @@ -1694,138 +1546,35 @@ lemma pairEqOfCollision [DecidableEq T] {x y a b : T} (h_inj : #σ = #(image c σ) + 1) : ({x, y} : Finset T) = {a, b} := by classical - by_contra h_ne_pair - by_cases h_disjoint : Disjoint ({x, y} : Finset T) {a, b} - · have h_x_notin_ab : x ∉ {a, b} := Finset.disjoint_left.mp h_disjoint (by simp) - have h_y_notin_ab : y ∉ {a, b} := Finset.disjoint_left.mp h_disjoint (by simp) - have h_x_in_sdiff : x ∈ σ \ {a, b} := Finset.mem_sdiff.mpr ⟨h_x_in_σ, h_x_notin_ab⟩ - have h_y_in_sdiff : y ∈ σ \ {a, b} := Finset.mem_sdiff.mpr ⟨h_y_in_σ, h_y_notin_ab⟩ - have h_x_in_set : x ∈ (↑σ : Set T) \ {a, b} := by - simp_all - have h_y_in_set : y ∈ (↑σ : Set T) \ {a, b} := by - simp_all - have h_inj_xy := h_inj_outside h_x_in_set h_y_in_set h_cxy_eq - exact h_xy_ne h_inj_xy - · rw [Finset.not_disjoint_iff] at h_disjoint - obtain ⟨u, hu_in_xy, hu_in_ab⟩ := h_disjoint - simp only [Finset.mem_insert, Finset.mem_singleton] at hu_in_xy hu_in_ab - cases hu_in_xy with - | inl h_u_eq_x => - rw [h_u_eq_x] at hu_in_ab - cases hu_in_ab with - | inl h_x_eq_a => - by_cases h_y_eq_b : y = b - · simp_all - · have h_y_ne_a : y ≠ a := by - rw [h_x_eq_a] at h_xy_ne - exact h_xy_ne.symm - have h_c_chain : c a = c y := by - rw [←h_x_eq_a, h_cxy_eq] - have h_y_in_complement : y ∈ σ \ {a, b} := by - simp_all - have h_y_in_set : y ∈ (↑σ : Set T) \ {a, b} := by - simp [h_y_in_σ, h_y_ne_a, h_y_eq_b] - have h_pairs_different : ({a, y} : Finset T) ≠ {a, b} := by - simp_all - exfalso - have h_all_distinct : a ≠ b ∧ a ≠ y ∧ b ≠ y := by - exact ⟨hab_ne, h_y_ne_a.symm, Ne.symm h_y_eq_b⟩ - have h_same_color : c a = c b ∧ c b = c y := by - exact ⟨hc_eq, by rw [←hc_eq, ←h_c_chain]⟩ - have h_three_in_sigma : a ∈ σ ∧ b ∈ σ ∧ y ∈ σ := by - exact ⟨ha_in_σ, hb_in_σ, h_y_in_σ⟩ - have h_card_bound : σ.card ≥ (σ.image c).card + 2 := - three_collision_card_bound σ c a b y ha_in_σ hb_in_σ h_y_in_σ - hab_ne h_all_distinct.2.1 h_all_distinct.2.2 hc_eq h_same_color.2 - linarith [h_inj, h_card_bound] - | inr h_x_eq_b => - by_cases h_y_eq_a : y = a - · rw [h_x_eq_b, h_y_eq_a] at h_ne_pair - have : ({b, a} : Finset T) = {a, b} := by simp [Finset.pair_comm] - simp_all - · have h_y_ne_b : y ≠ b := by - rw [h_x_eq_b] at h_xy_ne - exact h_xy_ne.symm - have h_c_chain : c b = c y := by - rw [←h_x_eq_b, h_cxy_eq] - have h_y_in_complement : y ∈ σ \ {a, b} := by - simp_all - have h_y_in_set : y ∈ (↑σ : Set T) \ {a, b} := by - simp [h_y_in_σ, h_y_eq_a, h_y_ne_b] - have h_pairs_different : ({b, y} : Finset T) ≠ {a, b} := by - simp_all - exfalso - have h_all_distinct : a ≠ b ∧ b ≠ y ∧ a ≠ y := by - exact ⟨hab_ne, h_y_ne_b.symm, Ne.symm h_y_eq_a⟩ - have h_same_color : c a = c b ∧ c b = c y := by - exact ⟨hc_eq, h_c_chain⟩ - have h_three_in_sigma : a ∈ σ ∧ b ∈ σ ∧ y ∈ σ := by - exact ⟨ha_in_σ, hb_in_σ, h_y_in_σ⟩ - have h_card_bound : σ.card ≥ (σ.image c).card + 2 := - three_collision_card_bound σ c a b y ha_in_σ hb_in_σ h_y_in_σ - hab_ne h_all_distinct.2.2 h_all_distinct.2.1 hc_eq h_same_color.2 - linarith [h_inj, h_card_bound] - | inr h_u_eq_y => - rw [h_u_eq_y] at hu_in_ab - cases hu_in_ab with - | inl h_y_eq_a => - by_cases h_x_eq_b : x = b - · rw [h_y_eq_a, h_x_eq_b] at h_ne_pair - have : ({a, b} : Finset T) = {b, a} := by simp [Finset.pair_comm] - simp_all - · have h_x_ne_a : x ≠ a := by - simp_all - have h_c_chain : c a = c x := by - rw [←h_y_eq_a, h_cxy_eq.symm] - have h_x_in_complement : x ∈ σ \ {a, b} := by - simp_all - have h_x_in_set : x ∈ (↑σ : Set T) \ {a, b} := by - simp [h_x_in_σ, h_x_ne_a, h_x_eq_b] - have h_pairs_different : ({a, x} : Finset T) ≠ {a, b} := by - intro h_eq - have h_x_in : x ∈ ({a, b} : Finset T) := by - rw [←h_eq] - simp - simp_all - exfalso - have h_all_distinct : a ≠ b ∧ a ≠ x ∧ b ≠ x := by - exact ⟨hab_ne, h_x_ne_a.symm, Ne.symm h_x_eq_b⟩ - have h_same_color : c a = c b ∧ c b = c x := by - exact ⟨hc_eq, by rw [←hc_eq, ←h_c_chain]⟩ - have h_three_in_sigma : a ∈ σ ∧ b ∈ σ ∧ x ∈ σ := by - exact ⟨ha_in_σ, hb_in_σ, h_x_in_σ⟩ - have h_card_bound : σ.card ≥ (σ.image c).card + 2 := - three_collision_card_bound σ c a b x ha_in_σ hb_in_σ h_x_in_σ - hab_ne h_all_distinct.2.1 h_all_distinct.2.2 hc_eq h_same_color.2 - linarith [h_inj, h_card_bound] - | inr h_y_eq_b => - by_cases h_x_eq_a : x = a - · simp_all - · have h_x_ne_b : x ≠ b := by - simp_all - have h_c_chain : c b = c x := by - rw [←h_y_eq_b, h_cxy_eq.symm] - have h_x_in_complement : x ∈ σ \ {a, b} := by - simp_all - have h_x_in_set : x ∈ (↑σ : Set T) \ {a, b} := by - simp [h_x_in_σ, h_x_eq_a, h_x_ne_b] - have h_pairs_different : ({b, x} : Finset T) ≠ {a, b} := by - intro h_eq - have h_x_in : x ∈ ({a, b} : Finset T) := by - rw [←h_eq] - simp - simp_all - exfalso - have h_all_distinct : a ≠ b ∧ b ≠ x ∧ a ≠ x := by - exact ⟨hab_ne, h_x_ne_b.symm, Ne.symm h_x_eq_a⟩ - have h_same_color : c a = c b ∧ c b = c x := by - exact ⟨hc_eq, h_c_chain⟩ - have h_three_in_sigma : a ∈ σ ∧ b ∈ σ ∧ x ∈ σ := by - exact ⟨ha_in_σ, hb_in_σ, h_x_in_σ⟩ - have h_card_bound : σ.card ≥ (σ.image c).card + 2 := - three_collision_card_bound σ c a b x ha_in_σ hb_in_σ h_x_in_σ - hab_ne h_all_distinct.2.2 h_all_distinct.2.1 hc_eq h_same_color.2 - linarith [h_inj, h_card_bound] + have h_fiber : ∀ z ∈ σ, c z = c a → z ∈ ({a, b} : Finset T) := by + intro z hz hcolor + by_contra hz_pair + have hz_ne : z ≠ a ∧ z ≠ b := by simpa only [mem_insert, mem_singleton, not_or] using hz_pair + have hcard := three_collision_card_bound σ c a b z ha_in_σ hb_in_σ hz + hab_ne hz_ne.1.symm hz_ne.2.symm hc_eq (hc_eq.symm.trans hcolor.symm) + omega + have hcolor : c x = c a := by + by_cases hx_pair : x ∈ ({a, b} : Finset T) + · rcases Finset.mem_insert.mp hx_pair with rfl | hx + · rfl + · rw [Finset.mem_singleton.mp hx] + exact hc_eq.symm + · have hy_pair : y ∈ ({a, b} : Finset T) := by + by_contra hy_pair + apply h_xy_ne + apply h_inj_outside _ _ h_cxy_eq + · exact ⟨h_x_in_σ, by simpa only [Finset.mem_insert, Finset.mem_singleton, + Set.mem_insert_iff, Set.mem_singleton_iff] using hx_pair⟩ + · exact ⟨h_y_in_σ, by simpa only [Finset.mem_insert, Finset.mem_singleton, + Set.mem_insert_iff, Set.mem_singleton_iff] using hy_pair⟩ + rcases Finset.mem_insert.mp hy_pair with rfl | hy + · exact h_cxy_eq + · rw [Finset.mem_singleton.mp hy] at h_cxy_eq + exact h_cxy_eq.trans hc_eq.symm + apply Finset.eq_of_subset_of_card_le + · exact Finset.insert_subset (h_fiber x h_x_in_σ hcolor) + (Finset.singleton_subset_iff.mpr (h_fiber y h_y_in_σ (h_cxy_eq.symm.trans hcolor))) + · rw [Finset.card_pair hab_ne, Finset.card_pair h_xy_ne] omit [DecidableEq T] [Inhabited T] IST in /-- The colliding pair `{a, b}` of a repeated coloring coincides with `{x, y}`. -/ @@ -1835,50 +1584,10 @@ lemma collisionPairEq {x y a b : T} (h_inj_outside : Set.InjOn c ((σ : Set T) \ {a, b})) (h_inj : #σ = #(image c σ) + 1) : (a = x ∧ b = y) ∨ (a = y ∧ b = x) := by - have h_pair_eq : ({x, y} : Finset T) = {a, b} := - pairEqOfCollision h_x_in_σ h_y_in_σ h_xy_ne h_cxy_eq ha_in_σ hb_in_σ hc_eq hab_ne - h_inj_outside h_inj - have h_eq_or_swap : ({x, y} : Finset T) = {a, b} ∨ ({x, y} : Finset T) = {b, a} := by - left; exact h_pair_eq - cases h_eq_or_swap with - | inl h_eq => - have : {a, b} = {x, y} := h_eq.symm - by_cases h : a = x - · left - constructor - · exact h - · have h_b_in : b ∈ ({x, y} : Finset T) := by rw [← this]; simp - simp only [mem_insert, mem_singleton] at h_b_in - cases h_b_in with - | inl h_b_eq_x => rw [h, h_b_eq_x] at hab_ne; contradiction - | inr h_b_eq_y => exact h_b_eq_y - · right - have h_a_in : a ∈ ({x, y} : Finset T) := by rw [← this]; simp - simp only [mem_insert, mem_singleton] at h_a_in - cases h_a_in with - | inl h_a_eq_x => contradiction - | inr h_a_eq_y => - constructor - · exact h_a_eq_y - · have h_b_in : b ∈ ({x, y} : Finset T) := by rw [← this]; simp - simp only [mem_insert, mem_singleton] at h_b_in - cases h_b_in with - | inl h_b_eq_x => exact h_b_eq_x - | inr h_b_eq_y => rw [h_a_eq_y, h_b_eq_y] at hab_ne; contradiction - | inr h_eq => - have : {b, a} = {x, y} := h_eq.symm - by_cases h : b = x - · have h_a_in : a ∈ ({x, y} : Finset T) := by rw [← this]; simp - simp only [mem_insert, mem_singleton] at h_a_in - simp_all - · have h_b_in : b ∈ ({x, y} : Finset T) := by rw [← this]; simp - simp only [mem_insert, mem_singleton] at h_b_in - cases h_b_in with - | inl h_b_eq_x => contradiction - | inr h_b_eq_y => - have h_a_in : a ∈ ({x, y} : Finset T) := by rw [← this]; simp - simp only [mem_insert, mem_singleton] at h_a_in - simp_all + have h_pair_eq := pairEqOfCollision h_x_in_σ h_y_in_σ h_xy_ne h_cxy_eq + ha_in_σ hb_in_σ hc_eq hab_ne h_inj_outside h_inj + apply Set.pair_eq_pair_iff.mp + simpa only [Finset.coe_pair] using congrArg (fun s : Finset T => (s : Set T)) h_pair_eq.symm omit [DecidableEq T] [Inhabited T] IST in /-- A nearly colorful room has a unique missing color in `C`. -/ @@ -1896,181 +1605,71 @@ omit [DecidableEq T] [Inhabited T] in lemma doorsOfNCroomRepeated [DecidableEq T] (h_room : isRoom σ C) (h_nc : isNearlyColorful c σ C) (h_inj : #σ = #(image c σ) + 1) : ∃ door1 door2, door1 ≠ door2 ∧ NCdoors c σ C = {door1, door2} := by - have h_card_eq : C.card = σ.card := h_room.2 - let img := image c σ - unfold isNearlyColorful at h_nc - obtain ⟨h_cell, h_missing_card⟩ := h_nc - have h_missing_exists : ∃! i₀, i₀ ∈ C ∧ i₀ ∉ σ.image c := - uniqueMissingColor h_missing_card - obtain ⟨i₀, ⟨h_i₀_in_C, h_i₀_notin_img⟩, h_i₀_unique⟩ := h_missing_exists - have h_collision_exists : ∃ x y, x ∈ σ ∧ y ∈ σ ∧ x ≠ y ∧ c x = c y := by - by_contra h_no_collision - push Not at h_no_collision - have h_inj_on_σ : Set.InjOn c σ := by - intro x h_x y h_y h_eq - by_contra h_ne - exact h_no_collision x y h_x h_y h_ne h_eq - have h_card_eq : σ.card = (σ.image c).card := by - exact (Finset.card_image_of_injOn h_inj_on_σ).symm - simp_all - obtain ⟨x, y, h_x_in_σ, h_y_in_σ, h_xy_ne, h_cxy_eq⟩ := h_collision_exists - have h_collision_structure : ∃ a b, a ∈ σ ∧ b ∈ σ ∧ c a = c b ∧ a ≠ b ∧ Set.InjOn c (σ \ {a, - b}) := by - obtain ⟨a, b, ha, hb, heq, hne, hinj⟩ := injOn_sdiff σ c h_inj - exact ⟨a, b, ha, hb, heq, hne, by convert hinj; simp⟩ - obtain ⟨a, b, ha_in_σ, hb_in_σ, hc_eq, hab_ne, h_inj_outside⟩ := h_collision_structure - have h_collision_pair : (a = x ∧ b = y) ∨ (a = y ∧ b = x) := - collisionPairEq h_x_in_σ h_y_in_σ h_xy_ne h_cxy_eq ha_in_σ hb_in_σ hc_eq hab_ne h_inj_outside - h_inj - let τ₁ := σ.erase x - let τ₂ := σ.erase y - let door1 := (τ₁, C) - let door2 := (τ₂, C) - have h_door1_valid : isDoorof τ₁ C σ C := - collision_door_valid σ C c x h_cell h_x_in_σ h_card_eq - have h_door2_valid : isDoorof τ₂ C σ C := - collision_door_valid σ C c y h_cell h_y_in_σ h_card_eq - have h_imgs_preserved := image_erase_collision_preserves σ c x y h_x_in_σ h_y_in_σ h_xy_ne - h_cxy_eq - have h_door1_nc : isNearlyColorful c τ₁ C := by - unfold isNearlyColorful - constructor - · exact Dominant_of_subset σ τ₁ C (Finset.erase_subset x σ) h_cell - · rw [h_imgs_preserved.1, h_missing_card] - have h_door2_nc : isNearlyColorful c τ₂ C := by - unfold isNearlyColorful - constructor - · exact Dominant_of_subset σ τ₂ C (Finset.erase_subset y σ) h_cell - · rw [h_imgs_preserved.2, h_missing_card] - have h_doors_distinct : door1 ≠ door2 := by - simp only [ne_eq, Prod.mk.injEq, and_true, door1, τ₁, door2, τ₂] - intro h_eq - have h_y_mem : y ∈ σ.erase x := by - rw [Finset.mem_erase] - exact ⟨h_xy_ne.symm, h_y_in_σ⟩ - simp_all - have h_exactly_two : NCdoors c σ C = {door1, door2} := by - ext ⟨τ, D⟩ + obtain ⟨x, y, hx, hy, hcolor, hxy, hinj⟩ := injOn_sdiff σ c h_inj + have hinj_outside : Set.InjOn c ((σ : Set T) \ {x, y}) := by + simpa only [Finset.coe_sdiff, Finset.coe_pair] using hinj + have h_image_subset : image c σ ⊆ C := by + apply Finset.inter_eq_right.mp + apply Finset.eq_of_subset_of_card_le Finset.inter_subset_right + have hcard := Finset.card_sdiff_add_card_inter C (image c σ) + rw [h_nc.2, h_room.2, h_inj] at hcard + omega + have h_images := image_erase_collision_preserves σ c x y hx hy hxy hcolor + have h_valid (z : T) (hz : z ∈ σ) (h_image : (σ.erase z).image c = σ.image c) : + isNearlyColorful c (σ.erase z) C ∧ isDoorof (σ.erase z) C σ C := by + refine ⟨⟨Dominant_of_subset σ (σ.erase z) C (Finset.erase_subset z σ) h_nc.1, ?_⟩, + collision_door_valid σ C c z h_nc.1 hz h_room.2⟩ + rw [h_image] + exact h_nc.2 + refine ⟨(σ.erase x, C), (σ.erase y, C), ?_, ?_⟩ + · intro h + have h_erase : σ.erase x = σ.erase y := congrArg Prod.fst h + have hy_erase : y ∈ σ.erase x := Finset.mem_erase.mpr ⟨hxy.symm, hy⟩ + rw [h_erase] at hy_erase + exact Finset.notMem_erase y σ hy_erase + · ext ⟨τ, D⟩ simp only [NCdoors, Set.mem_ofPred_eq, Set.mem_insert_iff, Set.mem_singleton_iff] constructor - · intro ⟨h_nc_τD, h_door_τD⟩ - cases h_door_τD with - | idoor h_cell_σC h_door_τD z h_z_notin_τ h_insert_eq h_D_eq_C => - rw [h_D_eq_C] - have h_τ_eq : τ = σ.erase z := by - rw [←Finset.erase_insert h_z_notin_τ, h_insert_eq] - rw [h_τ_eq] - have h_z_in_σ : z ∈ σ := by - rw [←h_insert_eq] - exact Finset.mem_insert_self z τ - by_cases h_z_cases : z = x ∨ z = y - · rcases h_z_cases with h_z_eq_x | h_z_eq_y - · left; simp [door1, τ₁, h_z_eq_x] - · right; simp [door2, τ₂, h_z_eq_y] - · exfalso - push Not at h_z_cases - have h_card_is_one : (C \ (σ.erase z).image c).card = 1 := by - rw [←h_D_eq_C, ←h_τ_eq] - exact h_nc_τD.2 - have h_card_is_two : (C \ (σ.erase z).image c).card = 2 := by - have h_uniq_z : ∀ w ∈ σ, c w = c z → w = z := by - intro w hw h_c_eq - rcases h_collision_pair with (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩) - · have h_z_ne_ab : z ≠ a ∧ z ≠ b := h_z_cases - by_cases hw_ab : w ∈ ({a, b} : Finset T) - · exfalso - have h_c_z_eq_ca : c z = c a := by - simp only [mem_insert, mem_singleton] at hw_ab; rcases hw_ab with rfl | rfl - · exact h_c_eq.symm - · exact h_c_eq.symm.trans hc_eq.symm - have h_card_ge_img_add_2 : σ.card ≥ (σ.image c).card + 2 := - three_collision_card_bound σ c a b z ha_in_σ hb_in_σ h_z_in_σ - hab_ne (Ne.symm h_z_ne_ab.1) (Ne.symm h_z_ne_ab.2) - hc_eq (h_c_z_eq_ca ▸ hc_eq.symm) - linarith [h_inj, h_card_ge_img_add_2] - · have h_w_sdiff : w ∈ σ \ {a, b} := by simp [hw, hw_ab] - have h_z_sdiff : z ∈ σ \ {a, b} := by simp [h_z_in_σ, h_z_ne_ab] - exact h_inj_outside (by simpa using h_w_sdiff) (by simpa using h_z_sdiff) h_c_eq - · have h_z_ne_ab : z ≠ a ∧ z ≠ b := h_z_cases.symm - by_cases hw_ab : w ∈ ({a, b} : Finset T) - · exfalso - have h_c_z_eq_ca : c z = c a := by - simp only [mem_insert, mem_singleton] at hw_ab; rcases hw_ab with rfl | rfl - · exact h_c_eq.symm - · exact h_c_eq.symm.trans hc_eq.symm - have h_card_ge_img_add_2 : σ.card ≥ (σ.image c).card + 2 := - three_collision_card_bound σ c a b z ha_in_σ hb_in_σ h_z_in_σ - hab_ne (Ne.symm h_z_ne_ab.1) (Ne.symm h_z_ne_ab.2) - hc_eq (h_c_z_eq_ca ▸ hc_eq.symm) - linarith [h_inj, h_card_ge_img_add_2] - · have h_w_sdiff : w ∈ σ \ {a, b} := by simp [hw, hw_ab] - have h_z_sdiff : z ∈ σ \ {a, b} := by simp [h_z_in_σ, h_z_ne_ab] - exact h_inj_outside (by simpa using h_w_sdiff) (by simpa using h_z_sdiff) h_c_eq - have h_img_erase : (σ.erase z).image c = (σ.image c).erase (c z) := - image_erase_eq_erase_image_of_unique σ c h_z_in_σ h_uniq_z - rw [h_img_erase] - have h_img_subset_C : image c σ ⊆ C := by - have h_C_card_img : C.card = (image c σ).card + 1 := by rw [h_card_eq, h_inj] - have h_C_card_form : C.card = (C \ image c σ).card + (C ∩ image c σ).card := - (card_sdiff_add_card_inter C (image c σ)).symm - rw [h_missing_card] at h_C_card_form - have h_img_eq_inter_card : (image c σ).card = (C ∩ image c σ).card := by linarith - have h_inter_eq_img : C ∩ image c σ = image c σ := - Finset.eq_of_subset_of_card_le Finset.inter_subset_right (by simp_all) - rwa [Finset.inter_eq_right] at h_inter_eq_img - have h_cz_in_C : c z ∈ C := h_img_subset_C (mem_image_of_mem c h_z_in_σ) - have h_cz_not_in_diff : c z ∉ C \ image c σ := by simp [mem_image_of_mem c h_z_in_σ] - have h_eq : C \ (image c σ).erase (c z) = (C \ image c σ) ∪ {c z} := by - ext y - simp only [Finset.mem_sdiff, Finset.mem_erase, Finset.mem_union, - Finset.mem_singleton] - constructor - · intro ⟨hy_in_C, hy_cond⟩ - by_cases h : y ∈ image c σ - · right; by_contra h'; exact hy_cond ⟨h', h⟩ - · left; exact ⟨hy_in_C, h⟩ - · intro h - cases h with - | inl h => exact ⟨h.1, fun h' => h.2 h'.2⟩ - | inr h => rw [h]; exact ⟨h_cz_in_C, fun hp => hp.1 rfl⟩ - simp_all - simp_all - | odoor h_cell_σC h_door_τD j h_j_notin_C h_τ_eq_σ h_D_eq => + · rintro ⟨h_nearly, h_door⟩ + cases h_door with + | idoor _ _ z hz_not_mem h_insert h_colors => + have hz : z ∈ σ := h_insert ▸ Finset.mem_insert_self z τ + have h_erase : τ = σ.erase z := by rw [← h_insert, Finset.erase_insert hz_not_mem] + subst D + rw [h_erase] at h_nearly ⊢ + by_cases hzx : z = x + · left; rw [hzx] + by_cases hzy : z = y + · right; rw [hzy] exfalso - have h_card_is_one : ((C ∪ {j}) \ (σ.image c)).card = 1 := by - have : D \ (τ.image c) = (C ∪ {j}) \ (σ.image c) := by - simp_all - rw [← this] - exact h_nc_τD.2 - have h_img_subset_C : image c σ ⊆ C := by - have h_C_card_img : C.card = (image c σ).card + 1 := by rw [h_card_eq, h_inj] - have h_C_card_form : C.card = (C \ image c σ).card + (C ∩ image c σ).card := - (card_sdiff_add_card_inter C (image c σ)).symm - rw [h_missing_card] at h_C_card_form - have h_img_eq_inter_card : (image c σ).card = (C ∩ image c σ).card := by linarith - have h_inter_eq_img : C ∩ image c σ = image c σ := - Finset.eq_of_subset_of_card_le Finset.inter_subset_right (by rw [h_img_eq_inter_card]) - rwa [Finset.inter_eq_right] at h_inter_eq_img - have h_j_notin_img : j ∉ image c σ := fun h => h_j_notin_C (h_img_subset_C h) - have h_card_is_two : ((C ∪ {j}) \ (σ.image c)).card = 2 := by - rw [Finset.union_sdiff_distrib, Finset.card_union_of_disjoint] - · have h_sdiff_eq : {j} \ image c σ = {j} := - Finset.sdiff_eq_self_of_disjoint (Finset.disjoint_singleton_left.mpr h_j_notin_img) - rw [h_sdiff_eq, Finset.card_singleton] - linarith [h_missing_card] - · rw [Finset.sdiff_eq_self_of_disjoint (Finset.disjoint_singleton_left.mpr - h_j_notin_img)] - simp_all - simp_all - · intro h_or - cases h_or with - | inl h_eq => - have : τ = τ₁ ∧ D = C := Prod.mk.inj h_eq - simp_all - | inr h_eq => - have : τ = τ₂ ∧ D = C := Prod.mk.inj h_eq - simp_all - use door1, door2 + have h_unique : ∀ w ∈ σ, c w = c z → w = z := by + intro w hw hcw + by_contra hwz + have h_pair := pairEqOfCollision hw hz hwz hcw hx hy hcolor hxy hinj_outside h_inj + have hz_pair : z ∈ ({x, y} : Finset T) := + h_pair ▸ Finset.mem_insert_of_mem (Finset.mem_singleton_self z) + rcases Finset.mem_insert.mp hz_pair with h | h + · exact hzx h + · exact hzy (Finset.mem_singleton.mp h) + have h_missing := h_nearly.2 + rw [image_erase_eq_erase_image_of_unique σ c hz h_unique, + Finset.sdiff_erase (h_image_subset (mem_image_of_mem c hz)), + Finset.card_insert_of_notMem (fun h => (Finset.mem_sdiff.mp h).2 + (mem_image_of_mem c hz)), h_nc.2] at h_missing + omega + | odoor _ _ j hj h_goods h_colors => + subst τ D + have hj_image : j ∉ image c σ := fun h => hj (h_image_subset h) + have hj_diff : j ∉ C \ image c σ := fun h => hj (Finset.mem_sdiff.mp h).1 + have h_missing := h_nearly.2 + rw [Finset.insert_sdiff_of_notMem _ hj_image, + Finset.card_insert_of_notMem hj_diff, h_nc.2] at h_missing + omega + · rintro (h | h) + · rcases Prod.mk.inj h with ⟨rfl, rfl⟩ + exact h_valid x hx h_images.1 + · rcases Prod.mk.inj h with ⟨rfl, rfl⟩ + exact h_valid y hy h_images.2 omit [DecidableEq T] [Inhabited T] in lemma doors_of_NCroom [DecidableEq T] (h_room : isRoom σ C) (h_nc : isNearlyColorful c σ C) : diff --git a/LeanPool/Brouwer/ScarfPath.lean b/LeanPool/Brouwer/ScarfPath.lean index 8385ba4641..ddf80300ac 100644 --- a/LeanPool/Brouwer/ScarfPath.lean +++ b/LeanPool/Brouwer/ScarfPath.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Math_XMUM. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math_XMUM -/ -import LeanPool.Brouwer.Scarf -import Mathlib.Combinatorics.SimpleGraph.Finite -import Mathlib.Combinatorics.SimpleGraph.Walk.Basic -import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected -import Mathlib.Combinatorics.SimpleGraph.DegreeSum +module + +public import LeanPool.Brouwer.Scarf +public import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # The Scarf path graph @@ -18,6 +24,8 @@ room-door incidences. Following a path in this graph between odd-degree vertices is the combinatorial heart of the path-following proof of Scarf's lemma. -/ +@[expose] public section + attribute [local instance] Classical.propDecidable open Finset diff --git a/LeanPool/Brouwer/Simplex.lean b/LeanPool/Brouwer/Simplex.lean index 70f8506ffb..a7b714b930 100644 --- a/LeanPool/Brouwer/Simplex.lean +++ b/LeanPool/Brouwer/Simplex.lean @@ -3,11 +3,9 @@ Copyright (c) 2026 Math_XMUM. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math_XMUM -/ -import Mathlib.Analysis.Convex.Topology -import Mathlib.Algebra.Order.BigOperators.Group.Finset -import Mathlib.Algebra.Order.Ring.Defs -import Mathlib.Tactic.Push -import Mathlib.Tactic.Common +module + +public import Mathlib.Analysis.Convex.Topology /-! # Mixed strategies on the standard simplex @@ -18,6 +16,8 @@ when reasoning about mixed strategies, including the key inequality `wsum_magic_ineq` relating a weighted sum to a uniform bound. -/ +@[expose] public section + namespace Brouwer /-- The standard simplex as a set of coordinate functions. Keeping this representation gives diff --git a/LeanPool/BruhatTits.lean b/LeanPool/BruhatTits.lean index b7b8946b91..a106d4910c 100644 --- a/LeanPool/BruhatTits.lean +++ b/LeanPool/BruhatTits.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ +module -import LeanPool.BruhatTits.Cartan -import LeanPool.BruhatTits.Graph -import LeanPool.BruhatTits.Harmonic -import LeanPool.BruhatTits.Lattice -import LeanPool.BruhatTits.Utils +public import LeanPool.BruhatTits.Cartan +public import LeanPool.BruhatTits.Graph +public import LeanPool.BruhatTits.Harmonic +public import LeanPool.BruhatTits.Lattice +public import LeanPool.BruhatTits.Utils /-! # Formalisation of the Bruhat-Tits Tree @@ -21,6 +22,8 @@ Tags: algebraic-geometry, graph-theory, discrete-valuation-rings MSC: 20E42, 05C25, 13H05 -/ +@[expose] public section + open Module /-! diff --git a/LeanPool/BruhatTits/Cartan.lean b/LeanPool/BruhatTits/Cartan.lean index 8d71a8963e..eb0cfc23aa 100644 --- a/LeanPool/BruhatTits/Cartan.lean +++ b/LeanPool/BruhatTits/Cartan.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ +module -import LeanPool.BruhatTits.Cartan.Existence -import LeanPool.BruhatTits.Cartan.Uniqueness +public import LeanPool.BruhatTits.Cartan.Existence +public import LeanPool.BruhatTits.Cartan.Uniqueness /-! # Cartan decomposition -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Cartan/Existence.lean b/LeanPool/BruhatTits/Cartan/Existence.lean index 07531fa220..1885b4e07f 100644 --- a/LeanPool/BruhatTits/Cartan/Existence.lean +++ b/LeanPool/BruhatTits/Cartan/Existence.lean @@ -3,13 +3,13 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Utils.RingHom -import LeanPool.BruhatTits.Utils.Matrix -import LeanPool.BruhatTits.Utils.Misc +module + +public import LeanPool.BruhatTits.Utils.RingHom +public import LeanPool.BruhatTits.Utils.Matrix +public import LeanPool.BruhatTits.Utils.Misc +public import Mathlib.RingTheory.DiscreteValuationRing.Basic import LeanPool.BruhatTits.Utils.ValuationRings -import Mathlib.LinearAlgebra.Matrix.Block -import Mathlib.LinearAlgebra.Matrix.IsDiag -import Mathlib.LinearAlgebra.Matrix.Transvection /-! @@ -26,7 +26,7 @@ There is an analogue where one uses decreasing powers instead, both versions are mathematics. We only show the "increasing" version. Most of the linear algebra preparations below are for arbitrary valuation rings. -Only from line 628 onwards we specialize to DVRs. +In the final section we specialize to DVRs. ## Implementation details @@ -34,6 +34,8 @@ This is inspired by the file https://leanprover-community.github.io/mathlib4_doc -/ +@[expose] public section + open Module @@ -446,43 +448,23 @@ lemma exists_trafo_isNormalBlock (g : Matrix (Fin k ⊕ Unit) (Fin k ⊕ Unit) K have hg' : v (g' (Sum.inr ()) (Sum.inr ())) = g'.coeffsSup v := hagb let k₁ := colEliminator g' hg' * a let k₂ := b * rowEliminator g' hg' - use k₁ - use k₂ + have hproduct : (k₁.val : Matrix _ _ K) * g * (k₂.val : Matrix _ _ K) = + (colEliminator g' hg').val.map R.subtype * g' * + (rowEliminator g' hg').val.map R.subtype := by + simp only [k₁, k₂, Units.val_mul, Matrix.map_mul, g', mul_assoc] + refine ⟨k₁, k₂, ?_⟩ + rw [hproduct] refine ⟨⟨⟨?_, ?_⟩, ?_⟩, ?_⟩ - · ext j _ - simp only [Units.val_mul, Matrix.map_mul, Matrix.zero_apply, k₁, k₂] - convert_to - ((colEliminator g' hg').val * g' * (rowEliminator g' hg').val) (Sum.inl j) - (Sum.inr ()) = 0 - · simp only [toBlocks₁₂, of_apply, g'] - group - · apply colEliminator_mul_rowEliminator_lastCol - · ext _ j - simp only [Units.val_mul, Matrix.map_mul, Matrix.zero_apply, k₁, k₂] - convert_to - ((colEliminator g' hg').val * g' * (rowEliminator g' hg').val) (Sum.inr ()) - (Sum.inl j) = 0 - · simp only [toBlocks₂₁, of_apply, g'] - group - · apply colEliminator_mul_rowEliminator_lastRow - · simp only [Units.val_mul, Matrix.map_mul, k₁, k₂] - convert_to - v (((colEliminator g' hg').val * g' * (rowEliminator g' hg').val) (Sum.inr ()) - (Sum.inr ())) = - ((colEliminator g' hg').val * g' * (rowEliminator g' hg').val).coeffsSup v - · simp only [g'] - group - · simp only [g'] - group - · rw [colEliminator_mul_rowEliminator_coeffs_sup] - rwa [colEliminator_mul_rowEliminator_last_last] - · simp only [Units.val_mul, Matrix.map_mul, k₁, k₂] - convert_to ((colEliminator g' hg').val * g' * (rowEliminator g' hg').val).coeffsSup v = - g.coeffsSup v - · simp only [g'] - group - · rw [colEliminator_mul_rowEliminator_coeffs_sup] - exact hagbv + · ext j u + cases u + exact colEliminator_mul_rowEliminator_lastCol g' hg' j + · ext u j + cases u + exact colEliminator_mul_rowEliminator_lastRow g' hg' j + · rw [colEliminator_mul_rowEliminator_coeffs_sup] + rwa [colEliminator_mul_rowEliminator_last_last] + · rw [colEliminator_mul_rowEliminator_coeffs_sup] + exact hagbv /-- A matrix is monotone diagonal if it is diagonal and the coefficients on the diagonal have monotonically increasing valuations. -/ @@ -530,50 +512,37 @@ lemma exists_trafo_isDiag_induction_step (g : Matrix (Fin k ⊕ Unit) (Fin k ⊕ rw [Matrix.ext_iff_blocks] simp only [toBlocks_fromBlocks₁₁, hh.isTwoBlockDiagonal.left, toBlocks_fromBlocks₁₂, hh.isTwoBlockDiagonal.right, toBlocks_fromBlocks₂₁, toBlocks_fromBlocks₂₂, true_and, g', h] - convert_to IsBlockMonotoneDiag (R := R) ((l₁'.val : Matrix _ _ K) * g' * (l₂'.val : Matrix _ _ K)) - ∧ ((l₁'.val : Matrix _ _ K) * g' * (l₂'.val : Matrix _ _ K)).coeffsSup v = g.coeffsSup v - · simp only [g'] - group - · simp only [g'] - group - · rw [he] - refine ⟨⟨?_, ?_, ?_⟩, ?_⟩ - · simp only [GL.val_diagonalBlocks, Units.val_one, l₁', l₂'] - rw [Matrix.fromBlocks_map, Matrix.fromBlocks_multiply, Matrix.fromBlocks_map, - Matrix.fromBlocks_multiply] - simp only [map_zero, Matrix.map_zero, Matrix.mul_zero, add_zero, Matrix.zero_mul, - _root_.map_one, Matrix.map_one, Matrix.mul_one, one_mul, zero_add, mul_one] - apply Matrix.IsDiag.fromBlocks hl.isDiag - · apply isDiag_of_subsingleton - · intro i j hij - simp only [GL.val_diagonalBlocks, Units.val_one, l₁', l₂'] - rw [Matrix.fromBlocks_map, Matrix.fromBlocks_multiply, Matrix.fromBlocks_map, - Matrix.fromBlocks_multiply] - simp only [map_zero, Matrix.map_zero, Matrix.mul_zero, add_zero, Matrix.zero_mul, - _root_.map_one, Matrix.map_one, Matrix.mul_one, one_mul, zero_add, mul_one, - fromBlocks_apply₁₁] - apply hl.monotone hij - · simp only [GL.val_diagonalBlocks, Units.val_one, l₁', l₂'] - rw [Matrix.fromBlocks_map, Matrix.fromBlocks_multiply, Matrix.fromBlocks_map, - Matrix.fromBlocks_multiply] - simp only [map_zero, Matrix.map_zero, Matrix.mul_zero, add_zero, Matrix.zero_mul, - _root_.map_one, Matrix.map_one, Matrix.mul_one, one_mul, zero_add, mul_one, - fromBlocks_apply₂₂] - simp only [g', coeffs_sup_fromBlocks, coeffs_sup_zero] - simp only [zero_le, sup_of_le_left] - rw [hv, coeffs_sup_unique (n := Unit)] - simp only [toBlocks₂₂, of_apply, hh.monotone, coeffs_sup_toBlock₁₁_le_coeffs_sup, - sup_of_le_right, h, g'] - · simp only [GL.val_diagonalBlocks, Units.val_one, l₁', l₂'] - rw [Matrix.fromBlocks_map, Matrix.fromBlocks_multiply, Matrix.fromBlocks_map, - Matrix.fromBlocks_multiply] - simp only [map_zero, Matrix.map_zero, Matrix.mul_zero, add_zero, Matrix.zero_mul, - _root_.map_one, Matrix.map_one, Matrix.mul_one, one_mul, zero_add, mul_one] - simp only [toBlocks₂₂, coeffs_sup_fromBlocks, hv, coeffs_sup_zero, zero_le, sup_of_le_left, - coeffs_sup_unique (n := Unit), PUnit.default_eq_unit, of_apply, hh.monotone, hvc, - sup_eq_right, h, g'] - rw [← hvc] - exact coeffs_sup_toBlock₁₁_le_coeffs_sup v _ + have hproduct : + l₁'.val.map R.subtype * h₁.val.map R.subtype * g * + (h₂.val.map R.subtype * l₂'.val.map R.subtype) = + l₁'.val.map R.subtype * g' * l₂'.val.map R.subtype := by + simp only [g', mul_assoc] + rw [hproduct] + have hblock : l₁'.val.map R.subtype * g' * l₂'.val.map R.subtype = + Matrix.fromBlocks (l₁.val.map R.subtype * h * l₂.val.map R.subtype) 0 0 + g'.toBlocks₂₂ := by + rw [he] + simp only [GL.val_diagonalBlocks, Units.val_one, l₁', l₂'] + rw [Matrix.fromBlocks_map, Matrix.fromBlocks_multiply, Matrix.fromBlocks_map, + Matrix.fromBlocks_multiply] + simp only [map_zero, Matrix.map_zero, Matrix.mul_zero, add_zero, Matrix.zero_mul, + _root_.map_one, Matrix.map_one, Matrix.mul_one, one_mul, zero_add, mul_one, + toBlocks_fromBlocks₂₂] + rw [hblock] + refine ⟨⟨?_, ?_, ?_⟩, ?_⟩ + · exact Matrix.IsDiag.fromBlocks hl.isDiag (isDiag_of_subsingleton _) + · intro i j hij + exact hl.monotone hij + · simp only [fromBlocks_apply₂₂, g', coeffs_sup_fromBlocks, coeffs_sup_zero] + simp only [zero_le, sup_of_le_left] + rw [hv, coeffs_sup_unique (n := Unit)] + simp only [toBlocks₂₂, of_apply, hh.monotone, coeffs_sup_toBlock₁₁_le_coeffs_sup, + sup_of_le_right, h, g'] + · simp only [toBlocks₂₂, coeffs_sup_fromBlocks, hv, coeffs_sup_zero, zero_le, sup_of_le_left, + coeffs_sup_unique (n := Unit), PUnit.default_eq_unit, of_apply, hh.monotone, hvc, + sup_eq_right, h, g'] + rw [← hvc] + exact coeffs_sup_toBlock₁₁_le_coeffs_sup v _ lemma exists_trafo_isDiag (g : Matrix (Fin k) (Fin k) K) : ∃ (k₁ k₂ : GL (Fin k) R), @@ -593,33 +562,24 @@ lemma exists_trafo_isDiag (g : Matrix (Fin k) (Fin k) K) : let g' : Matrix (Fin n ⊕ Unit) (Fin n ⊕ Unit) K := Matrix.reindex e e g obtain ⟨k₁', k₂', hk, hc⟩ := exists_trafo_isDiag_induction_step g' ih - use GL.reindex e.symm k₁' - use GL.reindex e.symm k₂' - convert_to IsMonotoneDiag (n := Fin ↑(n + 1)) (R := R) - (Matrix.reindex e.symm e.symm (k₁'.val * g' * k₂'.val)) ∧ - (Matrix.reindex e.symm e.symm - ((k₁'.val : Matrix _ _ K) * g' * (k₂'.val : Matrix _ _ K))).coeffsSup v - = g.coeffsSup v - · simp only [GL.val_reindex, reindex_apply, Equiv.symm_symm, g'] - rw [Matrix.submatrix_mul _ _ e e e e.bijective] - rw [Matrix.submatrix_mul _ _ e e e e.bijective] - rw [Matrix.submatrix_map, Matrix.submatrix_map, Matrix.submatrix_submatrix] - apply iff_of_eq - congr - rw [Equiv.symm_comp_self, Matrix.submatrix_id_id] - · simp only [GL.val_reindex, reindex_apply, Equiv.symm_symm, g'] + have hproduct : + (GL.reindex e.symm k₁').val.map R.subtype * g * + (GL.reindex e.symm k₂').val.map R.subtype = + Matrix.reindex e.symm e.symm + (k₁'.val.map R.subtype * g' * k₂'.val.map R.subtype) := by + simp only [GL.val_reindex, reindex_apply, Equiv.symm_symm, g'] rw [Matrix.submatrix_mul _ _ e e e e.bijective] rw [Matrix.submatrix_mul _ _ e e e e.bijective] - rw [Matrix.submatrix_map, Matrix.submatrix_map, Matrix.submatrix_submatrix] - apply iff_of_eq - congr - rw [Equiv.symm_comp_self, Matrix.submatrix_id_id] - · refine ⟨⟨?_, ?_⟩, ?_⟩ - · simp only [reindex_apply, Equiv.symm_symm] - apply IsDiag.submatrix hk.isDiag (Equiv.injective e) - · simp only [reindex_apply, Equiv.symm_symm, submatrix_apply] - apply monotone_of_isBlockMonotoneDiag _ hk - · simp only [g', coeffs_sup_reindex, hc] + rw [Matrix.submatrix_map, Matrix.submatrix_map, Matrix.submatrix_submatrix, + Equiv.symm_comp_self, Matrix.submatrix_id_id] + refine ⟨GL.reindex e.symm k₁', GL.reindex e.symm k₂', ?_⟩ + rw [hproduct] + refine ⟨⟨?_, ?_⟩, ?_⟩ + · simp only [reindex_apply, Equiv.symm_symm] + apply IsDiag.submatrix hk.isDiag (Equiv.injective e) + · simp only [reindex_apply, Equiv.symm_symm, submatrix_apply] + apply monotone_of_isBlockMonotoneDiag _ hk + · simp only [g', coeffs_sup_reindex, hc] -- From here onwards we work with a DVR diff --git a/LeanPool/BruhatTits/Cartan/Uniqueness.lean b/LeanPool/BruhatTits/Cartan/Uniqueness.lean index 29b5b1d050..76739296ec 100644 --- a/LeanPool/BruhatTits/Cartan/Uniqueness.lean +++ b/LeanPool/BruhatTits/Cartan/Uniqueness.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Cartan.Existence -import LeanPool.BruhatTits.Utils.Misc +module + +public import LeanPool.BruhatTits.Cartan.Existence +public import Mathlib.GroupTheory.DoubleCoset +import LeanPool.BruhatTits.Utils.ValuationRings import Mathlib.Data.Fin.Tuple.Sort -import Mathlib.GroupTheory.DoubleCoset /-! # Uniqueness of the Cartan decomposition @@ -26,6 +28,8 @@ completeness, this is stated as `iUnion₂_doset_cartanDiag_eq_univ` and `disjoint_doset_cartanDiag_of_ne` below. -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Graph.lean b/LeanPool/BruhatTits/Graph.lean index 120c587c09..0692c67656 100644 --- a/LeanPool/BruhatTits/Graph.lean +++ b/LeanPool/BruhatTits/Graph.lean @@ -3,17 +3,20 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ +module -import LeanPool.BruhatTits.Graph.Edges -import LeanPool.BruhatTits.Graph.Graph -import LeanPool.BruhatTits.Graph.GroupAction -import LeanPool.BruhatTits.Graph.Orientation -import LeanPool.BruhatTits.Graph.Regular -import LeanPool.BruhatTits.Graph.Tree -import LeanPool.BruhatTits.Graph.Vertices +public import LeanPool.BruhatTits.Graph.Edges +public import LeanPool.BruhatTits.Graph.Graph +public import LeanPool.BruhatTits.Graph.GroupAction +public import LeanPool.BruhatTits.Graph.Orientation +public import LeanPool.BruhatTits.Graph.Regular +public import LeanPool.BruhatTits.Graph.Tree +public import LeanPool.BruhatTits.Graph.Vertices /-! # Bruhat-Tits graph -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Graph/Edges.lean b/LeanPool/BruhatTits/Graph/Edges.lean index 357bbe19ad..c47a70e578 100644 --- a/LeanPool/BruhatTits/Graph/Edges.lean +++ b/LeanPool/BruhatTits/Graph/Edges.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Graph.Vertices +module + + +public import LeanPool.BruhatTits.Graph.Vertices +public import LeanPool.BruhatTits.Lattice.Transvect import LeanPool.BruhatTits.Lattice.Quotient import LeanPool.BruhatTits.Utils.GLSubmoduleAction import LeanPool.BruhatTits.Utils.List +import LeanPool.BruhatTits.Utils.ValuationRings +import Mathlib.Data.List.Enum /-! # The edges of the Bruhat-Tits graph @@ -37,6 +43,8 @@ sense of `inv`, is one. -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Graph/Graph.lean b/LeanPool/BruhatTits/Graph/Graph.lean index f724c2e6b0..a6f3723e62 100644 --- a/LeanPool/BruhatTits/Graph/Graph.lean +++ b/LeanPool/BruhatTits/Graph/Graph.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Graph.Edges -import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected +module + +public import LeanPool.BruhatTits.Graph.Edges +public import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected /-! # Definition of the Bruhat-Tits graph @@ -13,6 +15,8 @@ In this file we define the Bruhat-Tits graph as a simple graph and show it is co -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Graph/GroupAction.lean b/LeanPool/BruhatTits/Graph/GroupAction.lean index a48828f392..d7273b5061 100644 --- a/LeanPool/BruhatTits/Graph/GroupAction.lean +++ b/LeanPool/BruhatTits/Graph/GroupAction.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Graph.Graph -import LeanPool.BruhatTits.Utils.GraphAction +module + +public import LeanPool.BruhatTits.Graph.Graph +public import LeanPool.BruhatTits.Utils.GraphAction +public import LeanPool.BruhatTits.Cartan.Existence +import LeanPool.BruhatTits.Utils.ValuationRings /-! # Group actions on the Bruhat-Tits graph @@ -24,6 +28,8 @@ In this file we equip the Bruhat-Tits graph with group actions of `GL₂(K)` and -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Graph/Orientation.lean b/LeanPool/BruhatTits/Graph/Orientation.lean index a57e319588..b1f6571b88 100644 --- a/LeanPool/BruhatTits/Graph/Orientation.lean +++ b/LeanPool/BruhatTits/Graph/Orientation.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Graph.GroupAction -import Mathlib.Algebra.Ring.Int.Parity +module + +public import LeanPool.BruhatTits.Graph.GroupAction +public import LeanPool.BruhatTits.Utils.ValuationRings /-! # Orientation on the Bruhat-Tits tree @@ -29,6 +31,8 @@ evenness of vertices (see `BruhatTits.isEven_specialLinearGroup_smul_iff`). -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Graph/Regular.lean b/LeanPool/BruhatTits/Graph/Regular.lean index c7845dc66b..18af940e49 100644 --- a/LeanPool/BruhatTits/Graph/Regular.lean +++ b/LeanPool/BruhatTits/Graph/Regular.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ +module + +public import LeanPool.BruhatTits.Graph.Graph +public import LeanPool.BruhatTits.Lattice.Quotient +public import LeanPool.BruhatTits.Utils.LinearAlgebra +public import Mathlib.LinearAlgebra.Projectivization.Basic +import LeanPool.BruhatTits.Utils.ValuationRings import Mathlib.LinearAlgebra.Projectivization.Cardinality -import Mathlib.RingTheory.DiscreteValuationRing.Basic -import LeanPool.BruhatTits.Graph.Tree /-! # Proof that the Bruhat-Tits tree is regular @@ -22,6 +27,8 @@ vertex has the same finite number of neighbours. Furthermore we show that this n cardinality of `R ⧸ 𝓂 R`. -/ +@[expose] public section + open Module @@ -201,7 +208,8 @@ def linesQuotientEquiv (L : Lattice R) : left_inv M := by simp only [OrderIso.symm_apply_apply, Subtype.coe_eta] right_inv M := by simp only [ne_eq, OrderIso.apply_symm_apply, Subtype.coe_eta] -private def Lattice.submoduleNeAndNeEquivLtAndLt (L : Lattice R) : +/-- Identify nontrivial quotient submodules with lattices strictly between the two bounds. -/ +def Lattice.submoduleNeAndNeEquivLtAndLt (L : Lattice R) : { M : { M : Submodule R L.M // maximalIdeal R • ⊤ ≤ M } // M ≠ ⊥ ∧ M ≠ ⊤ } ≃ { M : Submodule R (Fin 2 → K) // maximalIdeal R • L.M < M ∧ M < L.M } where toFun M := ⟨Submodule.map L.M.subtype M.val.val, by diff --git a/LeanPool/BruhatTits/Graph/Tree.lean b/LeanPool/BruhatTits/Graph/Tree.lean index 82f771a5c8..bc8e54cba8 100644 --- a/LeanPool/BruhatTits/Graph/Tree.lean +++ b/LeanPool/BruhatTits/Graph/Tree.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Graph.GroupAction +module + +public import LeanPool.BruhatTits.Graph.GroupAction +public import Mathlib.Combinatorics.SimpleGraph.Acyclic /-! # Proof that the Bruhat-Tits graph is a tree @@ -26,6 +29,8 @@ The strategy for proving acyclicity is as follows: -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Graph/Vertices.lean b/LeanPool/BruhatTits/Graph/Vertices.lean index b94ff70a48..b96df9b33f 100644 --- a/LeanPool/BruhatTits/Graph/Vertices.lean +++ b/LeanPool/BruhatTits/Graph/Vertices.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Lattice.Distance -import LeanPool.BruhatTits.Lattice.Construction +module + +public import LeanPool.BruhatTits.Lattice.Distance +public import LeanPool.BruhatTits.Lattice.Construction /-! # Definition of vertices @@ -28,6 +30,8 @@ is later used to define the edge relations on the Bruhat-Tits graph (see `Bruhat -/ +@[expose] public section + open Module namespace BruhatTits diff --git a/LeanPool/BruhatTits/Harmonic.lean b/LeanPool/BruhatTits/Harmonic.lean index aa35777c9a..8ba7630055 100644 --- a/LeanPool/BruhatTits/Harmonic.lean +++ b/LeanPool/BruhatTits/Harmonic.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ +module -import LeanPool.BruhatTits.Harmonic.Application -import LeanPool.BruhatTits.Harmonic.Basic +public import LeanPool.BruhatTits.Harmonic.Application +public import LeanPool.BruhatTits.Harmonic.Basic /-! # Harmonic cochains -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Harmonic/Application.lean b/LeanPool/BruhatTits/Harmonic/Application.lean index c00b6661b0..062ea04f29 100644 --- a/LeanPool/BruhatTits/Harmonic/Application.lean +++ b/LeanPool/BruhatTits/Harmonic/Application.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Graph.Orientation -import LeanPool.BruhatTits.Graph.Regular -import LeanPool.BruhatTits.Harmonic.Basic +module + +public import LeanPool.BruhatTits.Graph.Orientation +public import LeanPool.BruhatTits.Graph.Regular +public import LeanPool.BruhatTits.Harmonic.Basic +import LeanPool.BruhatTits.Graph.Tree /-! # Surjectivity of the Bruhat-Tits Laplacian @@ -14,6 +17,8 @@ In this file we show that the Laplacian of the Bruhat-Tits tree is surjective. -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Harmonic/Basic.lean b/LeanPool/BruhatTits/Harmonic/Basic.lean index 33d6b34bda..616da87db6 100644 --- a/LeanPool/BruhatTits/Harmonic/Basic.lean +++ b/LeanPool/BruhatTits/Harmonic/Basic.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import Mathlib.Combinatorics.SimpleGraph.Basic -import Mathlib.Combinatorics.SimpleGraph.Finite -import Mathlib.RingTheory.DiscreteValuationRing.Basic -import Mathlib.Combinatorics.SimpleGraph.Acyclic -import Mathlib.Combinatorics.SimpleGraph.Metric -import LeanPool.BruhatTits.Utils.GraphAction +module + +public import Mathlib.Combinatorics.SimpleGraph.Acyclic +public import LeanPool.BruhatTits.Utils.GraphAction +public import Mathlib.Algebra.Module.LinearMap.Defs +public import Mathlib.Algebra.Module.Pi +import Mathlib.Algebra.BigOperators.GroupWithZero.Action +import Mathlib.Data.Nat.Totient +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.SuppressCompilation /-! # Definition and Surjectivity of Laplacian @@ -19,6 +24,8 @@ finitely many neighbours, then the Laplacian is surjective. -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Lattice.lean b/LeanPool/BruhatTits/Lattice.lean index 894d3b4d50..84ee98ec35 100644 --- a/LeanPool/BruhatTits/Lattice.lean +++ b/LeanPool/BruhatTits/Lattice.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ +module -import LeanPool.BruhatTits.Lattice.Basic -import LeanPool.BruhatTits.Lattice.Construction -import LeanPool.BruhatTits.Lattice.Distance -import LeanPool.BruhatTits.Lattice.Quotient -import LeanPool.BruhatTits.Lattice.Transvect +public import LeanPool.BruhatTits.Lattice.Basic +public import LeanPool.BruhatTits.Lattice.Construction +public import LeanPool.BruhatTits.Lattice.Distance +public import LeanPool.BruhatTits.Lattice.Quotient +public import LeanPool.BruhatTits.Lattice.Transvect /-! # Lattices -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Lattice/Basic.lean b/LeanPool/BruhatTits/Lattice/Basic.lean index a47c1fb667..170d1eb1c0 100644 --- a/LeanPool/BruhatTits/Lattice/Basic.lean +++ b/LeanPool/BruhatTits/Lattice/Basic.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Utils.Matrix +module + +public import LeanPool.BruhatTits.Utils.Matrix +public import LeanPool.BruhatTits.Utils.Subring import LeanPool.BruhatTits.Utils.Misc +import Mathlib.Algebra.Group.Action.Pointwise.Set.Finite import Mathlib.LinearAlgebra.Dimension.Localization import Mathlib.LinearAlgebra.FreeModule.PID -import Mathlib.Algebra.Group.Action.Pointwise.Set.Finite /-! # Definition of lattices @@ -19,6 +22,8 @@ If `R` is a principal ideal domain, any lattice is a free `R`-module of rank car -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Lattice/Construction.lean b/LeanPool/BruhatTits/Lattice/Construction.lean index 725ee785d0..eadc5f899a 100644 --- a/LeanPool/BruhatTits/Lattice/Construction.lean +++ b/LeanPool/BruhatTits/Lattice/Construction.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Lattice.Basic +module + +public import LeanPool.BruhatTits.Lattice.Basic +public import Mathlib.RingTheory.DiscreteValuationRing.Basic +import LeanPool.BruhatTits.Utils.Misc import LeanPool.BruhatTits.Utils.ValuationRings +import Mathlib.RingTheory.Localization.Module /-! # Basic constructions and operations on lattices @@ -33,6 +38,8 @@ Most constructions work for an arbitrary subring `R` of a field `K`. of `b.twist hϖ f` for fixed `b` and varying `f`, in order to simplify calculations. -/ +@[expose] public section + open Module @@ -599,7 +606,8 @@ lemma permMatrix_smul_toSubmodule (b : Basis ι K (ι → K)) (e : ι ≃ ι) : ext i : 1 simp [permMatrix, toLinear_symm_ofLinearEquiv_mulVec] -private def swap₂ : Fin 2 ≃ Fin 2 where +/-- The permutation exchanging the two indices of a rank-two basis. -/ +def swap₂ : Fin 2 ≃ Fin 2 where toFun | 0 => 1 | 1 => 2 diff --git a/LeanPool/BruhatTits/Lattice/Distance.lean b/LeanPool/BruhatTits/Lattice/Distance.lean index 0b41791959..37dcb539f0 100644 --- a/LeanPool/BruhatTits/Lattice/Distance.lean +++ b/LeanPool/BruhatTits/Lattice/Distance.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ +module + +public import LeanPool.BruhatTits.Lattice.Basic +public import LeanPool.BruhatTits.Utils.RingHom +public import Mathlib.RingTheory.DiscreteValuationRing.Basic import LeanPool.BruhatTits.Cartan.Uniqueness -import LeanPool.BruhatTits.Lattice.Basic -import LeanPool.BruhatTits.Utils.Matrix +import LeanPool.BruhatTits.Utils.ValuationRings /-! # Distance on lattices and vertices @@ -37,6 +41,8 @@ graph. - `BruhatTits.dist_inv_isSimilar`: The distance function is invariant under homothety. -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Lattice/Quotient.lean b/LeanPool/BruhatTits/Lattice/Quotient.lean index fdf6e56ec7..f77fabf112 100644 --- a/LeanPool/BruhatTits/Lattice/Quotient.lean +++ b/LeanPool/BruhatTits/Lattice/Quotient.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Lattice.Transvect +module + +public import LeanPool.BruhatTits.Lattice.Transvect +public import Mathlib.RingTheory.LocalRing.ResidueField.Basic +public import Mathlib.Algebra.Module.Torsion.Basic import LeanPool.BruhatTits.Utils.LinearAlgebra -import Mathlib.LinearAlgebra.TensorProduct.RightExactness -import Mathlib.RingTheory.LocalRing.ResidueField.Basic +import LeanPool.BruhatTits.Utils.ValuationRings +import Mathlib.LinearAlgebra.Dimension.OrzechProperty /-! # The `R ⧸ ϖ R`-vector space `L ⧸ ϖ L` @@ -29,6 +33,8 @@ the two-dimensional `R ⧸ ϖ R`-vector space `L ⧸ ϖ L`. -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Lattice/Transvect.lean b/LeanPool/BruhatTits/Lattice/Transvect.lean index f7b70619f9..b02212b178 100644 --- a/LeanPool/BruhatTits/Lattice/Transvect.lean +++ b/LeanPool/BruhatTits/Lattice/Transvect.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import Mathlib.LinearAlgebra.Dimension.OrzechProperty -import Mathlib.LinearAlgebra.TensorProduct.RightExactness -import LeanPool.BruhatTits.Lattice.Construction +module + +public import LeanPool.BruhatTits.Lattice.Construction import LeanPool.BruhatTits.Utils.LinearAlgebra +import Mathlib.LinearAlgebra.Dimension.OrzechProperty /-! # Transvection automorphisms and their action on lattices @@ -32,6 +33,8 @@ We call the basis representing this automorphism the unipotent matrix associated `n ≥ k`. -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Utils.lean b/LeanPool/BruhatTits/Utils.lean index 391cc42dd3..a349aad088 100644 --- a/LeanPool/BruhatTits/Utils.lean +++ b/LeanPool/BruhatTits/Utils.lean @@ -3,20 +3,23 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ +module -import LeanPool.BruhatTits.Utils.GLSubmoduleAction -import LeanPool.BruhatTits.Utils.GraphAction -import LeanPool.BruhatTits.Utils.LinearAlgebra -import LeanPool.BruhatTits.Utils.List -import LeanPool.BruhatTits.Utils.Matrix -import LeanPool.BruhatTits.Utils.Misc -import LeanPool.BruhatTits.Utils.Order -import LeanPool.BruhatTits.Utils.RingHom -import LeanPool.BruhatTits.Utils.Subring -import LeanPool.BruhatTits.Utils.ValuationRings +public import LeanPool.BruhatTits.Utils.GLSubmoduleAction +public import LeanPool.BruhatTits.Utils.GraphAction +public import LeanPool.BruhatTits.Utils.LinearAlgebra +public import LeanPool.BruhatTits.Utils.List +public import LeanPool.BruhatTits.Utils.Matrix +public import LeanPool.BruhatTits.Utils.Misc +public import LeanPool.BruhatTits.Utils.Order +public import LeanPool.BruhatTits.Utils.RingHom +public import LeanPool.BruhatTits.Utils.Subring +public import LeanPool.BruhatTits.Utils.ValuationRings /-! # Auxiliary lemmas -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Utils/GLSubmoduleAction.lean b/LeanPool/BruhatTits/Utils/GLSubmoduleAction.lean index 1a98b6ce7e..cc53720a21 100644 --- a/LeanPool/BruhatTits/Utils/GLSubmoduleAction.lean +++ b/LeanPool/BruhatTits/Utils/GLSubmoduleAction.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Utils.Matrix +module + +public import LeanPool.BruhatTits.Utils.Matrix /-! # LeanPool.BruhatTits.Utils.GLSubmoduleAction -/ +@[expose] public section + open Module variable {K : Type*} [Field K] diff --git a/LeanPool/BruhatTits/Utils/GraphAction.lean b/LeanPool/BruhatTits/Utils/GraphAction.lean index 146c3ad008..73d4b374a5 100644 --- a/LeanPool/BruhatTits/Utils/GraphAction.lean +++ b/LeanPool/BruhatTits/Utils/GraphAction.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import Mathlib.Combinatorics.SimpleGraph.Basic -import Mathlib.Combinatorics.SimpleGraph.Acyclic -import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup -import Mathlib.Tactic.Common +module + +public import Mathlib.Combinatorics.SimpleGraph.Basic +public import Mathlib.Algebra.Group.Action.Pretransitive +import Mathlib.Data.Nat.Totient +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD /-! # Definition of Graph Action @@ -19,6 +22,8 @@ We show that a graph action induces an action on the edges. -/ +@[expose] public section + open Module diff --git a/LeanPool/BruhatTits/Utils/LinearAlgebra.lean b/LeanPool/BruhatTits/Utils/LinearAlgebra.lean index ab80efa917..0ac8dfeabb 100644 --- a/LeanPool/BruhatTits/Utils/LinearAlgebra.lean +++ b/LeanPool/BruhatTits/Utils/LinearAlgebra.lean @@ -3,20 +3,20 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import Mathlib.LinearAlgebra.Dimension.Localization +module + +public import Mathlib.LinearAlgebra.TensorProduct.Pi +public import Mathlib.LinearAlgebra.TensorProduct.Quotient +public import Mathlib.Algebra.Module.Torsion.Basic +public import Mathlib.RingTheory.Ideal.Quotient.Operations +public import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Defs import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas -import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Basic -import Mathlib.LinearAlgebra.TensorProduct.Pi -import Mathlib.LinearAlgebra.TensorProduct.Quotient -import Mathlib.Algebra.Module.Torsion.Basic -import Mathlib.RingTheory.Ideal.Quotient.Operations -import Mathlib.Tactic.Common -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp /-! # LeanPool.BruhatTits.Utils.LinearAlgebra -/ +@[expose] public section + open Module section diff --git a/LeanPool/BruhatTits/Utils/List.lean b/LeanPool/BruhatTits/Utils/List.lean index e010d1977d..26e69682a6 100644 --- a/LeanPool/BruhatTits/Utils/List.lean +++ b/LeanPool/BruhatTits/Utils/List.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ +module -import Batteries.Data.List.Basic -import Mathlib.Logic.Function.Basic +public import Batteries.Data.List.Basic +import Mathlib.Tactic.TypeStar /-! # LeanPool.BruhatTits.Utils.List -/ +@[expose] public section + theorem List.zipWith₃_map {α α' β β' γ γ' δ : Type*} (f : α' → β' → γ' → δ) (fa : α → α') (fb : β → β') (fc : γ → γ') (la : List α) (lb : List β) (lc : List γ) : diff --git a/LeanPool/BruhatTits/Utils/Matrix.lean b/LeanPool/BruhatTits/Utils/Matrix.lean index f475dc743b..e146ca30b7 100644 --- a/LeanPool/BruhatTits/Utils/Matrix.lean +++ b/LeanPool/BruhatTits/Utils/Matrix.lean @@ -3,18 +3,19 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import LeanPool.BruhatTits.Utils.RingHom +module + +public import Mathlib.LinearAlgebra.Matrix.IsDiag +public import Mathlib.LinearAlgebra.Matrix.Swap +public import Mathlib.RingTheory.Valuation.Basic import LeanPool.BruhatTits.Utils.Subring -import Mathlib.LinearAlgebra.Matrix.Transvection -import Mathlib.RingTheory.Valuation.ValuationRing -import Mathlib.LinearAlgebra.Matrix.IsDiag -import Mathlib.LinearAlgebra.Matrix.Swap -import Mathlib.LinearAlgebra.Matrix.Block /-! # LeanPool.BruhatTits.Utils.Matrix -/ +@[expose] public section + open Module open BigOperators @@ -66,8 +67,9 @@ lemma coeffs_fromBlocks (A : Matrix n n' R) (B : Matrix n m R) (C : Matrix m' n' (A.fromBlocks B C D).coeffs = A.coeffs ∪ B.coeffs ∪ C.coeffs ∪ D.coeffs := by ext a - simp only [coeffs] - aesop + simp only [coeffs, Set.mem_image2, Set.mem_univ, true_and, Sum.exists, + fromBlocks_apply₁₁, fromBlocks_apply₁₂, fromBlocks_apply₂₁, fromBlocks_apply₂₂, + Set.mem_union, exists_or, or_assoc, or_left_comm] lemma coeffs_zero [Zero R] [Nonempty n] [Nonempty m] : (0 : Matrix n m R).coeffs = {0} := by classical @@ -192,10 +194,9 @@ lemma coeffs_sup_fromBlocks (A : Matrix n n' R) (B : Matrix n m R) A.coeffsSup v ⊔ B.coeffsSup v ⊔ C.coeffsSup v ⊔ D.coeffsSup v := by classical simp only [coeffsSup, ← Finset.sup'_union, coeffs_fromBlocks] - congr + congr 1 ext - simp - tauto + simp only [Set.Finite.mem_toFinset, Set.mem_union, Finset.mem_union] end «Finite» diff --git a/LeanPool/BruhatTits/Utils/Misc.lean b/LeanPool/BruhatTits/Utils/Misc.lean index 7a60322ed3..456839756c 100644 --- a/LeanPool/BruhatTits/Utils/Misc.lean +++ b/LeanPool/BruhatTits/Utils/Misc.lean @@ -3,16 +3,17 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import Mathlib.RingTheory.Valuation.Basic -import Mathlib.LinearAlgebra.StdBasis -import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Defs -import Mathlib.RingTheory.LocalRing.Defs +module + +public import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Defs +public import Mathlib.RingTheory.LocalRing.Defs import Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic -import Mathlib.Tactic.Common /-! # LeanPool.BruhatTits.Utils.Misc -/ +@[expose] public section + open Module variable {α β γ : Type*} diff --git a/LeanPool/BruhatTits/Utils/Order.lean b/LeanPool/BruhatTits/Utils/Order.lean index e658911063..d44c1a6f15 100644 --- a/LeanPool/BruhatTits/Utils/Order.lean +++ b/LeanPool/BruhatTits/Utils/Order.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ +module -import Mathlib.Order.Hom.Basic +public import Mathlib.Order.Hom.Basic /-! # LeanPool.BruhatTits.Utils.Order -/ +@[expose] public section + variable {α β : Type*} [PartialOrder α] [PartialOrder β] (f : α ≃o β) lemma OrderIso.map_top_iff [OrderTop α] [OrderTop β] (x : α) : diff --git a/LeanPool/BruhatTits/Utils/RingHom.lean b/LeanPool/BruhatTits/Utils/RingHom.lean index e3009eb6be..cb9738fb95 100644 --- a/LeanPool/BruhatTits/Utils/RingHom.lean +++ b/LeanPool/BruhatTits/Utils/RingHom.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Basic +module + +public import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Defs /-! # LeanPool.BruhatTits.Utils.RingHom -/ +@[expose] public section + open Module variable {R S : Type*} [CommRing R] [CommRing S] (f : R →+* S) diff --git a/LeanPool/BruhatTits/Utils/Subring.lean b/LeanPool/BruhatTits/Utils/Subring.lean index c15cbc5363..6d7f8256d3 100644 --- a/LeanPool/BruhatTits/Utils/Subring.lean +++ b/LeanPool/BruhatTits/Utils/Subring.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ -import Mathlib.Algebra.Ring.Subring.Basic -import Mathlib.LinearAlgebra.Basis.Basic +module + +public import Mathlib.LinearAlgebra.Basis.Defs +public import Mathlib.LinearAlgebra.LinearIndependent.Defs +public import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Localization.Module -import Mathlib.Tactic.Common /-! # LeanPool.BruhatTits.Utils.Subring -/ +@[expose] public section + open Module variable {ι : Type*} [DecidableEq ι] diff --git a/LeanPool/BruhatTits/Utils/ValuationRings.lean b/LeanPool/BruhatTits/Utils/ValuationRings.lean index fcb753ad3b..5f35c88354 100644 --- a/LeanPool/BruhatTits/Utils/ValuationRings.lean +++ b/LeanPool/BruhatTits/Utils/ValuationRings.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ +module + +public import Mathlib.RingTheory.DiscreteValuationRing.Basic import LeanPool.BruhatTits.Utils.Misc -import Mathlib.RingTheory.DiscreteValuationRing.Basic -import Mathlib.RingTheory.Valuation.ValuationRing /-! # LeanPool.BruhatTits.Utils.ValuationRings -/ +@[expose] public section + open Module section diff --git a/LeanPool/Burkholder.lean b/LeanPool/Burkholder.lean index 9fa697a04d..0f9692dc6d 100644 --- a/LeanPool/Burkholder.lean +++ b/LeanPool/Burkholder.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Daniel Smania. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Daniel Smania -/ +module -import Mathlib.Probability.Martingale.Basic -import Mathlib.MeasureTheory.Function.LpSeminorm.Basic -import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm -import Mathlib.MeasureTheory.Function.LpSpace.Basic -import LeanPool.Burkholder.Majorants -import LeanPool.Burkholder.MartingaleTransforms +public import Mathlib.Probability.Martingale.Basic +public import Mathlib.MeasureTheory.Function.LpSeminorm.Basic +public import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm +public import Mathlib.MeasureTheory.Function.LpSpace.Basic + +public import LeanPool.Burkholder.Majorants +public import LeanPool.Burkholder.MartingaleTransforms +import Mathlib.Tactic.Positivity.Finset /-! # Burkholder Martingale Transform Inequality @@ -21,3 +24,5 @@ Main declarations: `MeasureTheory.Lp_Burkholder_inequality_martingaleTransform` Tags: probability, martingales, burkholder-inequality MSC: 60G42 -/ + +@[expose] public section diff --git a/LeanPool/Burkholder/Majorants.lean b/LeanPool/Burkholder/Majorants.lean index bf358bbd35..545e6fd7a9 100644 --- a/LeanPool/Burkholder/Majorants.lean +++ b/LeanPool/Burkholder/Majorants.lean @@ -3,23 +3,17 @@ Copyright (c) 2026 Daniel Smania. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Daniel Smania -/ - -import Mathlib.Analysis.Convex.Function -import Mathlib.Analysis.Convex.Deriv -import Mathlib.Analysis.Convex.SpecificFunctions.Basic -import Mathlib.Analysis.Convex.SpecificFunctions.Pow -import Mathlib.Analysis.InnerProductSpace.NormPow -import Mathlib.Analysis.MeanInequalities -import Mathlib.Analysis.SpecialFunctions.Log.Deriv -import Mathlib.Analysis.SpecialFunctions.Pow.Deriv -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring -import LeanPool.Burkholder.Majorants.Definitions -import LeanPool.Burkholder.Majorants.MajorantPL2 -import LeanPool.Burkholder.Majorants.MajorantPG2 -import LeanPool.Burkholder.Majorants.MajorantPEq2 +module + +public import LeanPool.Burkholder.Majorants.Definitions +public import LeanPool.Burkholder.Majorants.MajorantPL2 +public import LeanPool.Burkholder.Majorants.MajorantPG2 +public import LeanPool.Burkholder.Majorants.MajorantPEq2 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Burkholder majorants: existence of the special function @@ -28,6 +22,8 @@ Assembles the regime-by-regime constructions into the existence of a Burkholder majorant for every exponent `p > 1`. -/ +@[expose] public section + noncomputable section diff --git a/LeanPool/Burkholder/Majorants/Definitions.lean b/LeanPool/Burkholder/Majorants/Definitions.lean index f98ca122a1..9379761abd 100644 --- a/LeanPool/Burkholder/Majorants/Definitions.lean +++ b/LeanPool/Burkholder/Majorants/Definitions.lean @@ -3,19 +3,14 @@ Copyright (c) 2026 Daniel Smania. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Daniel Smania -/ +module -import Mathlib.Analysis.Convex.Function -import Mathlib.Analysis.Convex.Deriv -import Mathlib.Analysis.Convex.SpecificFunctions.Basic -import Mathlib.Analysis.Convex.SpecificFunctions.Pow -import Mathlib.Analysis.InnerProductSpace.NormPow -import Mathlib.Analysis.MeanInequalities -import Mathlib.Analysis.SpecialFunctions.Log.Deriv -import Mathlib.Analysis.SpecialFunctions.Pow.Deriv -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! @@ -25,6 +20,8 @@ Defines the conjugate exponent `q`, `pStar`, the Burkholder expression `v`, and the sector parameters used to build the majorant. -/ +@[expose] public section + noncomputable section namespace Majorants diff --git a/LeanPool/Burkholder/Majorants/MajorantPEq2.lean b/LeanPool/Burkholder/Majorants/MajorantPEq2.lean index ce30d12019..08aa6db0b1 100644 --- a/LeanPool/Burkholder/Majorants/MajorantPEq2.lean +++ b/LeanPool/Burkholder/Majorants/MajorantPEq2.lean @@ -3,20 +3,14 @@ Copyright (c) 2026 Daniel Smania. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Daniel Smania -/ +module -import Mathlib.Analysis.Convex.Function -import Mathlib.Analysis.Convex.Deriv -import Mathlib.Analysis.Convex.SpecificFunctions.Basic -import Mathlib.Analysis.Convex.SpecificFunctions.Pow -import Mathlib.Analysis.InnerProductSpace.NormPow -import Mathlib.Analysis.MeanInequalities -import Mathlib.Analysis.SpecialFunctions.Log.Deriv -import Mathlib.Analysis.SpecialFunctions.Pow.Deriv -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring -import LeanPool.Burkholder.Majorants.Definitions +public import LeanPool.Burkholder.Majorants.Definitions +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! @@ -25,6 +19,8 @@ import LeanPool.Burkholder.Majorants.Definitions Constructs the Burkholder majorant in the special case `p = 2`. -/ +@[expose] public section + noncomputable section diff --git a/LeanPool/Burkholder/Majorants/MajorantPG2.lean b/LeanPool/Burkholder/Majorants/MajorantPG2.lean index 0df11e53b2..1dbff548ed 100644 --- a/LeanPool/Burkholder/Majorants/MajorantPG2.lean +++ b/LeanPool/Burkholder/Majorants/MajorantPG2.lean @@ -3,20 +3,11 @@ Copyright (c) 2026 Daniel Smania. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Daniel Smania -/ +module -import Mathlib.Analysis.Convex.Function +public import LeanPool.Burkholder.Majorants.Definitions import Mathlib.Analysis.Convex.Deriv -import Mathlib.Analysis.Convex.SpecificFunctions.Basic -import Mathlib.Analysis.Convex.SpecificFunctions.Pow import Mathlib.Analysis.InnerProductSpace.NormPow -import Mathlib.Analysis.MeanInequalities -import Mathlib.Analysis.SpecialFunctions.Log.Deriv -import Mathlib.Analysis.SpecialFunctions.Pow.Deriv -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring -import LeanPool.Burkholder.Majorants.Definitions /-! @@ -26,6 +17,8 @@ Constructs and verifies the Burkholder majorant in the regime `p > 2`, including the explicit derivatives, concavity, and tangent estimates. -/ +@[expose] public section + noncomputable section namespace Majorants @@ -63,26 +56,11 @@ bookkeeping private lemmas that move a segment through the sector decomposition private lemma pStar_eq_self_of_two_le (p : ℝ) (hp : 2 ≤ p) : pStar p = p := by - unfold pStar + unfold pStar q apply max_eq_left - unfold q - have hp_ne_one : p ≠ 1 := by linarith - simp only [hp_ne_one, ↓reduceIte, ge_iff_le] - have hden : 0 < p - 1 := by linarith - have hnonneg : 0 ≤ p := by linarith - have h1 : 1 ≤ p - 1 := by linarith - have hmul : p * 1 ≤ p * (p - 1) := mul_le_mul_of_nonneg_left h1 hnonneg - have hp_le : p ≤ p * (p - 1) := by simpa using hmul - have hden_ne : p - 1 ≠ 0 := by linarith - have h_inv_nonneg : 0 ≤ (p - 1)⁻¹ := by positivity - have hmul' : p * (p - 1)⁻¹ ≤ (p * (p - 1)) * (p - 1)⁻¹ := - mul_le_mul_of_nonneg_right hp_le h_inv_nonneg - simpa [div_eq_mul_inv, hden_ne, mul_assoc, mul_comm, mul_left_comm] using hmul' - - - - - + rw [ite_eq_right (by linarith : p ≠ 1)] + apply (div_le_iff₀ (by linarith : 0 < p - 1)).2 + nlinarith only [hp] /-- The same expression specialized to the `p ≥ 2` regime. -/ private def vGeTwo (p x y : ℝ) : ℝ := @@ -10117,11 +10095,9 @@ private lemma DyuA1_mono_x_of_pos have hpStar : pStar p = p := pStar_eq_self_of_two_le p hp have hpow : x ^ (p - 1) ≤ z ^ (p - 1) := Real.rpow_le_rpow hx.le hxz (by linarith : 0 ≤ p - 1) - have hcoef : 0 ≤ alpha p * (p / 2) := by - exact mul_nonneg (alpha_nonneg_of_two_le p hp) (by linarith : 0 ≤ p / 2) - simp [DyuA1, hx, hz, hpStar] - simpa [mul_assoc, mul_comm, mul_left_comm] using - mul_le_mul_of_nonneg_left hpow hcoef + simp only [DyuA1, ite_eq_left hx, ite_eq_left hz, hpStar] + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hpow (alpha_nonneg_of_two_le p hp)) (by linarith) private lemma DxuA1_mono_y_of_pos (p : ℝ) (hp : 2 ≤ p) {x y z : ℝ} @@ -10156,10 +10132,10 @@ private lemma DyvGeTwo_mono_x_of_pos have hcoef : 0 ≤ (p - 1) ^ p := Real.rpow_nonneg (by linarith : 0 ≤ p - 1) _ have hhalf : 0 ≤ p / 2 := by linarith have hzpos : 0 < z := lt_of_lt_of_le hxpos hxz - simp [DyvGeTwo, hxpos, hzpos, abs_of_nonneg hsum_x, abs_of_nonneg hsum_z, - abs_of_nonneg hdiff_x, abs_of_nonneg hdiff_z] - nlinarith [mul_le_mul_of_nonneg_right hA hhalf, - mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hB hcoef) hhalf] + simp only [DyvGeTwo, ite_eq_left hxpos, ite_eq_left hzpos, abs_of_nonneg hsum_x, + abs_of_nonneg hsum_z, abs_of_nonneg hdiff_x, abs_of_nonneg hdiff_z] + exact add_le_add (mul_le_mul_of_nonneg_right hA hhalf) + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hB hcoef) hhalf) private lemma DxvGeTwo_mono_y_of_pos (p : ℝ) (hp : 2 ≤ p) {x y z : ℝ} @@ -10176,10 +10152,10 @@ private lemma DxvGeTwo_mono_y_of_pos have hB := Real.rpow_le_rpow hdiff_z hdiff_le hp_exp have hcoef : 0 ≤ (p - 1) ^ p := Real.rpow_nonneg (by linarith : 0 ≤ p - 1) _ have hhalf : 0 ≤ p / 2 := by linarith - simp [DxvGeTwo, hxpos, abs_of_nonneg hsum_y, abs_of_nonneg hsum_z, + simp only [DxvGeTwo, ite_eq_left hxpos, abs_of_nonneg hsum_y, abs_of_nonneg hsum_z, abs_of_nonneg hdiff_y, abs_of_nonneg hdiff_z] - nlinarith [mul_le_mul_of_nonneg_right hA hhalf, - mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hB hcoef) hhalf] + exact sub_le_sub (mul_le_mul_of_nonneg_right hA hhalf) + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hB hcoef) hhalf) private lemma DyuCandidate_mono_x_on_Q2 (p : ℝ) (hp : 2 < p) {x z y : ℝ} diff --git a/LeanPool/Burkholder/Majorants/MajorantPL2.lean b/LeanPool/Burkholder/Majorants/MajorantPL2.lean index d0f29baa47..255fc45a25 100644 --- a/LeanPool/Burkholder/Majorants/MajorantPL2.lean +++ b/LeanPool/Burkholder/Majorants/MajorantPL2.lean @@ -3,20 +3,12 @@ Copyright (c) 2026 Daniel Smania. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Daniel Smania -/ +module -import Mathlib.Analysis.Convex.Function +public import LeanPool.Burkholder.Majorants.Definitions import Mathlib.Analysis.Convex.Deriv -import Mathlib.Analysis.Convex.SpecificFunctions.Basic import Mathlib.Analysis.Convex.SpecificFunctions.Pow import Mathlib.Analysis.InnerProductSpace.NormPow -import Mathlib.Analysis.MeanInequalities -import Mathlib.Analysis.SpecialFunctions.Log.Deriv -import Mathlib.Analysis.SpecialFunctions.Pow.Deriv -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring -import LeanPool.Burkholder.Majorants.Definitions /-! # Burkholder majorant for `1 < p < 2` @@ -25,6 +17,8 @@ Constructs and verifies the Burkholder majorant in the regime `1 < p < 2`, including the explicit derivatives, concavity, and tangent estimates. -/ +@[expose] public section + noncomputable section namespace Majorants diff --git a/LeanPool/Burkholder/MartingaleTransforms.lean b/LeanPool/Burkholder/MartingaleTransforms.lean index 714c6b8a94..4ccaeede65 100644 --- a/LeanPool/Burkholder/MartingaleTransforms.lean +++ b/LeanPool/Burkholder/MartingaleTransforms.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Daniel Smania. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Daniel Smania -/ +module -import Mathlib.Probability.Martingale.Basic -import Mathlib.MeasureTheory.Function.LpSeminorm.Basic -import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm -import Mathlib.MeasureTheory.Function.LpSpace.Basic +public import Mathlib.Probability.Martingale.Basic +public import LeanPool.Burkholder.Majorants.Definitions import LeanPool.Burkholder.Majorants +import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm +import Mathlib.Tactic.Positivity.Finset /-! # Martingale transforms and the Lp Burkholder inequality @@ -17,6 +18,8 @@ Defines the discrete martingale transform and proves the sharp `Lp` Burkholder inequality for martingale transforms by a predictable multiplier bounded by `1`. -/ +@[expose] public section + noncomputable section open MeasureTheory diff --git a/LeanPool/CencovPetz.lean b/LeanPool/CencovPetz.lean index 53e413c7df..f7e209351d 100644 --- a/LeanPool/CencovPetz.lean +++ b/LeanPool/CencovPetz.lean @@ -3,31 +3,37 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.CencovPetz.Basic -import LeanPool.CencovPetz.CencovFinite -import LeanPool.CencovPetz.CencovSplitPoint -import LeanPool.CencovPetz.ContinuousExtension -import LeanPool.CencovPetz.FisherContinuity -import LeanPool.CencovPetz.LeftInverseIsometry -import LeanPool.CencovPetz.MarkovMorphism -import LeanPool.CencovPetz.MonotoneMetric -import LeanPool.CencovPetz.PermutationInvariance -import LeanPool.CencovPetz.PermutationInvariantBilinForm -import LeanPool.CencovPetz.RationalDensity -import LeanPool.CencovPetz.RationalPoint -import LeanPool.CencovPetz.Replication -import LeanPool.CencovPetz.ReplicationInvariance -import LeanPool.CencovPetz.Simplex -import LeanPool.CencovPetz.SimplexTopology -import LeanPool.CencovPetz.Splitting -import LeanPool.CencovPetz.SplittingInvariance -import LeanPool.CencovPetz.SplittingUniform -import LeanPool.CencovPetz.SufficientStatistic -import LeanPool.CencovPetz.Uniform -import LeanPool.CencovPetz.UniformScalarConstant -import LeanPool.CencovPetz.UniformScalarMultiple -import LeanPool.CencovPetz.UniformSimplex +public import LeanPool.CencovPetz.Basic +public import LeanPool.CencovPetz.CencovFinite +public import LeanPool.CencovPetz.CencovSplitPoint +public import LeanPool.CencovPetz.ContinuousExtension +public import LeanPool.CencovPetz.FisherContinuity +public import LeanPool.CencovPetz.LeftInverseIsometry +public import LeanPool.CencovPetz.MarkovMorphism +public import LeanPool.CencovPetz.MonotoneMetric +public import LeanPool.CencovPetz.PermutationInvariance +public import LeanPool.CencovPetz.PermutationInvariantBilinForm +public import LeanPool.CencovPetz.RationalDensity +public import LeanPool.CencovPetz.RationalPoint +public import LeanPool.CencovPetz.Replication +public import LeanPool.CencovPetz.ReplicationInvariance +public import LeanPool.CencovPetz.Simplex +public import LeanPool.CencovPetz.SimplexTopology +public import LeanPool.CencovPetz.Splitting +public import LeanPool.CencovPetz.SplittingInvariance +public import LeanPool.CencovPetz.SplittingUniform +public import LeanPool.CencovPetz.SufficientStatistic +public import LeanPool.CencovPetz.Uniform +public import LeanPool.CencovPetz.UniformScalarConstant +public import LeanPool.CencovPetz.UniformScalarMultiple +public import LeanPool.CencovPetz.UniformSimplex +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! # Finite Čencov-Petz Uniqueness @@ -40,6 +46,8 @@ Tags: information-geometry, fisher-information, markov-morphisms, finite-simplex MSC: 62B10, 53C21 -/ +@[expose] public section + /-! This project formalizes the finite/discrete Čencov-Petz uniqueness theorem: every continuous monotone metric family on finite probability simplexes is a diff --git a/LeanPool/CencovPetz/Basic.lean b/LeanPool/CencovPetz/Basic.lean index 183de66dd1..56016d7f24 100644 --- a/LeanPool/CencovPetz/Basic.lean +++ b/LeanPool/CencovPetz/Basic.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module /-! # CencovPetz.Basic Root namespace and shared foundation for the Čencov–Petz uniqueness theorem package. --/ +-/@[expose] public section namespace LeanPool.CencovPetz diff --git a/LeanPool/CencovPetz/CencovFinite.lean b/LeanPool/CencovPetz/CencovFinite.lean index e65654a22f..4edb1a464d 100644 --- a/LeanPool/CencovPetz/CencovFinite.lean +++ b/LeanPool/CencovPetz/CencovFinite.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module + +public import LeanPool.CencovPetz.SimplexTopology +public import LeanPool.CencovPetz.UniformScalarConstant import LeanPool.CencovPetz.CencovSplitPoint import LeanPool.CencovPetz.ContinuousExtension import LeanPool.CencovPetz.FisherContinuity import LeanPool.CencovPetz.RationalDensity +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -27,6 +36,8 @@ multiple of Fisher. - `CencovPetz.MonotoneMetricFamily.eq_smul_fisher_of_continuous` -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/CencovSplitPoint.lean b/LeanPool/CencovPetz/CencovSplitPoint.lean index 218f28782e..2127418d6d 100644 --- a/LeanPool/CencovPetz/CencovSplitPoint.lean +++ b/LeanPool/CencovPetz/CencovSplitPoint.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module + +public import LeanPool.CencovPetz.RationalPoint +public import LeanPool.CencovPetz.UniformScalarConstant +import LeanPool.CencovPetz.PermutationInvariance import LeanPool.CencovPetz.SplittingInvariance -import LeanPool.CencovPetz.SplittingUniform -import LeanPool.CencovPetz.RationalPoint -import LeanPool.CencovPetz.UniformScalarConstant import LeanPool.CencovPetz.UniformScalarMultiple +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -26,6 +32,8 @@ scalar multiple of Fisher. - `CencovPetz.MonotoneMetricFamily.eq_smul_fisher_of_isSplitRepresentable` -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/ContinuousExtension.lean b/LeanPool/CencovPetz/ContinuousExtension.lean index 7fb05b728c..a5840a7368 100644 --- a/LeanPool/CencovPetz/ContinuousExtension.lean +++ b/LeanPool/CencovPetz/ContinuousExtension.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.SimplexTopology +module + +public import LeanPool.CencovPetz.SimplexTopology +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Topology.Metrizable.Uniformity /-! @@ -20,6 +27,8 @@ identity to all simplex points. - `CencovPetz.eq_of_eqOn_dense₂` -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/FisherContinuity.lean b/LeanPool/CencovPetz/FisherContinuity.lean index ff831809db..0d4ca360b5 100644 --- a/LeanPool/CencovPetz/FisherContinuity.lean +++ b/LeanPool/CencovPetz/FisherContinuity.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.SimplexTopology +module + +public import LeanPool.CencovPetz.SimplexTopology +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -20,6 +26,8 @@ family. - `CencovPetz.Simplex.continuous_fisherBilin_apply` -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/LeftInverseIsometry.lean b/LeanPool/CencovPetz/LeftInverseIsometry.lean index fc7261fbd2..465acabcd5 100644 --- a/LeanPool/CencovPetz/LeftInverseIsometry.lean +++ b/LeanPool/CencovPetz/LeftInverseIsometry.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.MarkovMorphism -import LeanPool.CencovPetz.MonotoneMetric +module + +public import LeanPool.CencovPetz.MonotoneMetric +public import Mathlib.LinearAlgebra.BilinearForm.Hom +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order import Mathlib.LinearAlgebra.BilinearForm.Properties @@ -21,6 +26,8 @@ is an isometry for the metric family. This is the abstract lemma behind permutation invariance and replication invariance. -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/MarkovMorphism.lean b/LeanPool/CencovPetz/MarkovMorphism.lean index 50665ce3be..26383db1c5 100644 --- a/LeanPool/CencovPetz/MarkovMorphism.lean +++ b/LeanPool/CencovPetz/MarkovMorphism.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.Simplex +module + +public import LeanPool.CencovPetz.Simplex +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Complex.Order /-! @@ -29,6 +35,8 @@ needed for the Čencov/Chentsov uniqueness story. Markov morphism. -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/MonotoneMetric.lean b/LeanPool/CencovPetz/MonotoneMetric.lean index 840b3d8a66..2f88ed65b7 100644 --- a/LeanPool/CencovPetz/MonotoneMetric.lean +++ b/LeanPool/CencovPetz/MonotoneMetric.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.MarkovMorphism +module + +public import LeanPool.CencovPetz.MarkovMorphism +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -29,6 +35,8 @@ needed for that proof. -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/PermutationInvariance.lean b/LeanPool/CencovPetz/PermutationInvariance.lean index b8d1dc329c..03e7120a95 100644 --- a/LeanPool/CencovPetz/PermutationInvariance.lean +++ b/LeanPool/CencovPetz/PermutationInvariance.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module + +public import LeanPool.CencovPetz.SufficientStatistic +public import LeanPool.CencovPetz.MonotoneMetric +public import Mathlib.LinearAlgebra.BilinearForm.Hom import LeanPool.CencovPetz.LeftInverseIsometry -import LeanPool.CencovPetz.SufficientStatistic +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -23,6 +31,8 @@ permutation/equivalence invariance consequences for monotone metric families in any monotone metric family is invariant under equivalences (permutations) of finite types. -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/PermutationInvariantBilinForm.lean b/LeanPool/CencovPetz/PermutationInvariantBilinForm.lean index 46f6aa57be..d247f802b2 100644 --- a/LeanPool/CencovPetz/PermutationInvariantBilinForm.lean +++ b/LeanPool/CencovPetz/PermutationInvariantBilinForm.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module + +public import LeanPool.CencovPetz.UniformSimplex +public import LeanPool.CencovPetz.MonotoneMetric import LeanPool.CencovPetz.PermutationInvariance -import LeanPool.CencovPetz.UniformSimplex +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -16,6 +23,8 @@ permutations (equivalences) of the underlying finite type. This is a technical step towards the finite Čencov uniqueness theorem. -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/RationalDensity.lean b/LeanPool/CencovPetz/RationalDensity.lean index 31b621e553..1b0e7ab749 100644 --- a/LeanPool/CencovPetz/RationalDensity.lean +++ b/LeanPool/CencovPetz/RationalDensity.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.RationalPoint -import LeanPool.CencovPetz.SimplexTopology -import Mathlib.Analysis.SpecificLimits.Basic +module + +public import LeanPool.CencovPetz.RationalPoint +public import LeanPool.CencovPetz.SimplexTopology +import Mathlib.Algebra.Order.Algebra import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.Complex.Order +import Mathlib.Analysis.RCLike.Basic +import Mathlib.Analysis.SpecificLimits.Basic /-! @@ -23,6 +28,8 @@ simplex points. - `CencovPetz.Simplex.dense_setOf_isRational` -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/RationalPoint.lean b/LeanPool/CencovPetz/RationalPoint.lean index 497432233e..8981dd643b 100644 --- a/LeanPool/CencovPetz/RationalPoint.lean +++ b/LeanPool/CencovPetz/RationalPoint.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.SplittingUniform +module + +public import LeanPool.CencovPetz.SplittingUniform +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -28,6 +34,8 @@ This file packages the notion of a common-denominator point and relates it to - `CencovPetz.Simplex.IsRational.isSplitRepresentable` -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/Replication.lean b/LeanPool/CencovPetz/Replication.lean index f9e7f2f1c6..516186e1fa 100644 --- a/LeanPool/CencovPetz/Replication.lean +++ b/LeanPool/CencovPetz/Replication.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.MarkovMorphism -import LeanPool.CencovPetz.UniformSimplex +module + +public import LeanPool.CencovPetz.MarkovMorphism +public import LeanPool.CencovPetz.UniformSimplex +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -13,6 +19,8 @@ import LeanPool.CencovPetz.UniformSimplex Replication Markov morphisms `α → α × Fin m` that split each outcome into `m` copies uniformly. -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/ReplicationInvariance.lean b/LeanPool/CencovPetz/ReplicationInvariance.lean index a6f2667d74..650fe6f796 100644 --- a/LeanPool/CencovPetz/ReplicationInvariance.lean +++ b/LeanPool/CencovPetz/ReplicationInvariance.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module + +public import LeanPool.CencovPetz.Replication +public import LeanPool.CencovPetz.MonotoneMetric +public import Mathlib.LinearAlgebra.BilinearForm.Hom import LeanPool.CencovPetz.LeftInverseIsometry -import LeanPool.CencovPetz.Replication +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -14,6 +22,8 @@ For a monotone metric family (Čencov setting), replication maps `α → α × F they have a deterministic left inverse (coarsening), so monotonicity holds in both directions. -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/Simplex.lean b/LeanPool/CencovPetz/Simplex.lean index 05c32d16f0..bb336a2227 100644 --- a/LeanPool/CencovPetz/Simplex.lean +++ b/LeanPool/CencovPetz/Simplex.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import Mathlib.Analysis.InnerProductSpace.Basic +module + +public import Mathlib.Algebra.Order.Archimedean.Real.Hom +public import Mathlib.LinearAlgebra.BilinearMap +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect import Mathlib.Algebra.Order.Star.Real -import Mathlib.Algebra.Order.Archimedean.Real.Hom +import Mathlib.Analysis.Complex.Order /-! @@ -29,6 +34,8 @@ This is groundwork for the finite/discrete Čencov (Chentsov) uniqueness story. - `CencovPetz.fisherBilin_pos`: positive-definiteness on nonzero tangent vectors. -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/SimplexTopology.lean b/LeanPool/CencovPetz/SimplexTopology.lean index ccbb0d1b1b..a8de49637f 100644 --- a/LeanPool/CencovPetz/SimplexTopology.lean +++ b/LeanPool/CencovPetz/SimplexTopology.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.Simplex +module + +public import LeanPool.CencovPetz.Simplex +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -20,6 +26,8 @@ proof fields of `Simplex` are propositions, this agrees with the usual subspace - `CencovPetz.Simplex.continuous_eval` -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/Splitting.lean b/LeanPool/CencovPetz/Splitting.lean index 8e56986ab8..dbe9ed6c1b 100644 --- a/LeanPool/CencovPetz/Splitting.lean +++ b/LeanPool/CencovPetz/Splitting.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.MarkovMorphism +module + +public import LeanPool.CencovPetz.MarkovMorphism +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -22,6 +28,8 @@ These are left inverses on simplex points and tangent vectors, and are standard Čencov/Chentsov uniqueness proofs. -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/SplittingInvariance.lean b/LeanPool/CencovPetz/SplittingInvariance.lean index 857c82574c..4ebd7b1217 100644 --- a/LeanPool/CencovPetz/SplittingInvariance.lean +++ b/LeanPool/CencovPetz/SplittingInvariance.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module + +public import LeanPool.CencovPetz.Splitting +public import LeanPool.CencovPetz.MonotoneMetric +public import Mathlib.LinearAlgebra.BilinearForm.Hom import LeanPool.CencovPetz.LeftInverseIsometry -import LeanPool.CencovPetz.Splitting +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -15,6 +23,8 @@ isometries: they have a deterministic left inverse (merge), so monotonicity hold directions. -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/SplittingUniform.lean b/LeanPool/CencovPetz/SplittingUniform.lean index 68b09716f4..cf0f9f7651 100644 --- a/LeanPool/CencovPetz/SplittingUniform.lean +++ b/LeanPool/CencovPetz/SplittingUniform.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.Splitting -import LeanPool.CencovPetz.UniformSimplex +module + +public import LeanPool.CencovPetz.Splitting +public import LeanPool.CencovPetz.UniformSimplex +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -21,6 +27,8 @@ This is one of the standard reduction steps in finite Čencov/Chentsov uniquenes - `CencovPetz.MarkovMorphism.split_pushforward_eq_uniform_of_apply_eq_div_card` -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/SufficientStatistic.lean b/LeanPool/CencovPetz/SufficientStatistic.lean index acf1eedf30..49dbd09aca 100644 --- a/LeanPool/CencovPetz/SufficientStatistic.lean +++ b/LeanPool/CencovPetz/SufficientStatistic.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.Simplex +module + +public import LeanPool.CencovPetz.Simplex +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Complex.Order /-! @@ -34,6 +40,8 @@ reduces to Titu's lemma / Engel form of Cauchy–Schwarz on each fiber. surjective map (finite sufficient statistic). -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/Uniform.lean b/LeanPool/CencovPetz/Uniform.lean index ccbef8bc7e..6fd3248113 100644 --- a/LeanPool/CencovPetz/Uniform.lean +++ b/LeanPool/CencovPetz/Uniform.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module + +public import Mathlib.Data.Fintype.Card +public import Mathlib.Basic.Real.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Data.Fintype.Card -import Mathlib.Basic.Real.Basic + + /-! # `CencovPetz.Uniform` @@ -21,6 +26,8 @@ calculations. - `IsUniform`: predicate asserting a function is uniform. -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/UniformScalarConstant.lean b/LeanPool/CencovPetz/UniformScalarConstant.lean index e36854b1a8..9b88e698de 100644 --- a/LeanPool/CencovPetz/UniformScalarConstant.lean +++ b/LeanPool/CencovPetz/UniformScalarConstant.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module + +public import LeanPool.CencovPetz.PermutationInvariantBilinForm +import LeanPool.CencovPetz.PermutationInvariance import LeanPool.CencovPetz.ReplicationInvariance import LeanPool.CencovPetz.UniformScalarMultiple +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -25,6 +33,8 @@ pointwise scalar multiple with a scalar depending on the point. - `CencovPetz.MonotoneMetricFamily.uniformScalar_eq_uniformScalar_two` -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators @@ -52,7 +62,8 @@ private lemma two_le_card_prod {n m : ℕ} (hn : 2 ≤ n) (hm : 0 < m) : (le_trans hn (Nat.le_mul_of_pos_right n hm)) theorem uniformScalar_eq_of_mul (G : MonotoneMetricFamily) {n m : ℕ} (hn : 2 ≤ n) (hm : 0 < m) : - uniformScalar G (Fintype.card (Fin n × Fin m)) (two_le_card_prod (n := n) (m := m) hn hm) + uniformScalar G (Fintype.card (Fin n × Fin m)) + (by exact two_le_card_prod (n := n) (m := m) hn hm) = uniformScalar G n hn := by classical @@ -159,11 +170,13 @@ theorem uniformScalar_eq_of_mul (G : MonotoneMetricFamily) {n m : ℕ} (hn : 2 have hFinN : (TangentFin.Bilin.B (G := G) (n := N)) = - (uniformScalar G N (two_le_card_prod (n := n) (m := m) hn hm)) • + (uniformScalar G N (by exact two_le_card_prod (n := n) (m := m) hn hm)) • fisherBilin (Simplex.uniform (α := Fin N)) := by -- Use `UniformScalarMultiple` at `0,1` on `Fin N`. - let j0 : Fin N := ⟨0, lt_of_lt_of_le Nat.zero_lt_two (two_le_card_prod (n := n) (m := m) hn hm)⟩ - let j1 : Fin N := ⟨1, lt_of_lt_of_le Nat.one_lt_two (two_le_card_prod (n := n) (m := m) hn hm)⟩ + let j0 : Fin N := ⟨0, lt_of_lt_of_le Nat.zero_lt_two + (by exact two_le_card_prod (n := n) (m := m) hn hm)⟩ + let j1 : Fin N := ⟨1, lt_of_lt_of_le Nat.one_lt_two + (by exact two_le_card_prod (n := n) (m := m) hn hm)⟩ have hj01 : j0 ≠ j1 := by intro h exact Nat.zero_ne_one (congrArg Fin.val h) @@ -179,7 +192,7 @@ theorem uniformScalar_eq_of_mul (G : MonotoneMetricFamily) {n m : ℕ} (hn : 2 -- Evaluate both bilinear-form identities on `v` / `u` and use the isometry equalities. have hFinN_apply : G.g (α := Fin N) (Simplex.uniform (α := Fin N)) v v - = (uniformScalar G N (two_le_card_prod (n := n) (m := m) hn hm)) * + = (uniformScalar G N (by exact two_le_card_prod (n := n) (m := m) hn hm)) * fisherBilin (Simplex.uniform (α := Fin N)) v v := by -- Unfold `B` and apply `hFinN`. simp_all @@ -190,7 +203,7 @@ theorem uniformScalar_eq_of_mul (G : MonotoneMetricFamily) {n m : ℕ} (hn : 2 simpa [TangentFin.Bilin.B, mul_assoc, α] using this -- Compare the two scalar factors using `hG` and `hF`. have : - (uniformScalar G N (two_le_card_prod (n := n) (m := m) hn hm)) * + (uniformScalar G N (by exact two_le_card_prod (n := n) (m := m) hn hm)) * fisherBilin (Simplex.uniform (α := α)) u u = (uniformScalar G n hn) * @@ -199,7 +212,8 @@ theorem uniformScalar_eq_of_mul (G : MonotoneMetricFamily) {n m : ℕ} (hn : 2 simp_all -- Cancel the positive Fisher factor. have hscalar : - uniformScalar G N (two_le_card_prod (n := n) (m := m) hn hm) = uniformScalar G n hn := + uniformScalar G N + (by exact two_le_card_prod (n := n) (m := m) hn hm) = uniformScalar G n hn := mul_right_cancel₀ hFne this simpa [β, N] using hscalar diff --git a/LeanPool/CencovPetz/UniformScalarMultiple.lean b/LeanPool/CencovPetz/UniformScalarMultiple.lean index c37cb51754..5832f4e309 100644 --- a/LeanPool/CencovPetz/UniformScalarMultiple.lean +++ b/LeanPool/CencovPetz/UniformScalarMultiple.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.PermutationInvariantBilinForm +module + +public import LeanPool.CencovPetz.PermutationInvariantBilinForm +public import Mathlib.Algebra.Algebra.Basic +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.LinearAlgebra.BilinearForm.Properties /-! @@ -17,6 +24,8 @@ plus the `dij` relations imply that (at the uniform point) the metric is determi scalar. -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/CencovPetz/UniformSimplex.lean b/LeanPool/CencovPetz/UniformSimplex.lean index 43f5cb6473..af6f1f6b26 100644 --- a/LeanPool/CencovPetz/UniformSimplex.lean +++ b/LeanPool/CencovPetz/UniformSimplex.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CencovPetz.Simplex -import LeanPool.CencovPetz.Uniform +module + +public import LeanPool.CencovPetz.Simplex +public import LeanPool.CencovPetz.Uniform +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -13,6 +19,8 @@ import LeanPool.CencovPetz.Uniform Package the uniform distribution on a finite type as a point of the open simplex. -/ +@[expose] public section + namespace LeanPool.CencovPetz open scoped BigOperators diff --git a/LeanPool/ChannelCapacity.lean b/LeanPool/ChannelCapacity.lean index b7dd5ec218..934ab1a01d 100644 --- a/LeanPool/ChannelCapacity.lean +++ b/LeanPool/ChannelCapacity.lean @@ -3,17 +3,18 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.ChannelCapacity.Basic -import LeanPool.ChannelCapacity.KernelCompositionKullbackLeibler -import LeanPool.ChannelCapacity.ChainRule -import LeanPool.ChannelCapacity.NonDegeneracy -import LeanPool.ChannelCapacity.StrictConcavity -import LeanPool.ChannelCapacity.Capacity -import LeanPool.ChannelCapacity.Finite -import LeanPool.ChannelCapacity.Discharged -import LeanPool.ChannelCapacity.DischargedExample -import LeanPool.ChannelCapacity.Counterexample +public import LeanPool.ChannelCapacity.Basic +public import LeanPool.ChannelCapacity.KernelCompositionKullbackLeibler +public import LeanPool.ChannelCapacity.ChainRule +public import LeanPool.ChannelCapacity.NonDegeneracy +public import LeanPool.ChannelCapacity.StrictConcavity +public import LeanPool.ChannelCapacity.Capacity +public import LeanPool.ChannelCapacity.Finite +public import LeanPool.ChannelCapacity.Discharged +public import LeanPool.ChannelCapacity.DischargedExample +public import LeanPool.ChannelCapacity.Counterexample /-! # Uniqueness of Shannon Capacity-Achieving Priors @@ -25,3 +26,5 @@ Main declarations: `ChannelCapacity.exists_unique_capacity_achieving_prior_of_fi Tags: information-theory, channel-capacity, mutual-information, kullback-leibler, markov-kernel MSC: 94A17, 94A15, 60A10 -/ + +@[expose] public section diff --git a/LeanPool/ChannelCapacity/Basic.lean b/LeanPool/ChannelCapacity/Basic.lean index c7deaa566d..ba61f9fb15 100644 --- a/LeanPool/ChannelCapacity/Basic.lean +++ b/LeanPool/ChannelCapacity/Basic.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import Mathlib.InformationTheory.KullbackLeibler.Basic -import Mathlib.MeasureTheory.Measure.DiracProba -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +module + +public import Mathlib.InformationTheory.KullbackLeibler.Basic +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import Mathlib.Probability.Kernel.Composition.CompNotation import Mathlib.Probability.Kernel.Composition.MeasureComp -import Mathlib.Probability.Kernel.Composition.MeasureCompProd -import Mathlib.Topology.Instances.ENNReal.Lemmas /-! # ChannelCapacity.Basic @@ -31,6 +31,8 @@ measures, so this file provides the subtype-level wrapper needed by the strict-c uniqueness arguments. -/ +@[expose] public section + open MeasureTheory open ProbabilityTheory open scoped ENNReal diff --git a/LeanPool/ChannelCapacity/Capacity.lean b/LeanPool/ChannelCapacity/Capacity.lean index e9aca03660..671db6a4f8 100644 --- a/LeanPool/ChannelCapacity/Capacity.lean +++ b/LeanPool/ChannelCapacity/Capacity.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module + +public import LeanPool.ChannelCapacity.NonDegeneracy import LeanPool.ChannelCapacity.StrictConcavity -import Mathlib.Topology.Semicontinuity.Basic /-! # ChannelCapacity.Capacity @@ -12,6 +14,8 @@ import Mathlib.Topology.Semicontinuity.Basic Capacity and generic existence/uniqueness packaging for maximizing mutual information. -/ +@[expose] public section + open MeasureTheory open ProbabilityTheory diff --git a/LeanPool/ChannelCapacity/ChainRule.lean b/LeanPool/ChannelCapacity/ChainRule.lean index f088377775..fed44823c1 100644 --- a/LeanPool/ChannelCapacity/ChainRule.lean +++ b/LeanPool/ChannelCapacity/ChainRule.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.ChannelCapacity.Basic -import LeanPool.ChannelCapacity.KernelCompositionKullbackLeibler +module + +public import LeanPool.ChannelCapacity.Basic +import LeanPool.ChannelCapacity.KernelCompositionKullbackLeibler import Mathlib.InformationTheory.KullbackLeibler.ChainRule -import Mathlib.Probability.Kernel.CompProdEqIff import Mathlib.Probability.Kernel.Posterior /-! @@ -20,6 +21,8 @@ The main theorem rewrites the KL divergence from the joint law `p ⊗ k` to the against `ν`. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory open scoped ENNReal diff --git a/LeanPool/ChannelCapacity/Counterexample.lean b/LeanPool/ChannelCapacity/Counterexample.lean index 5ee947d0b8..f4cf9bd937 100644 --- a/LeanPool/ChannelCapacity/Counterexample.lean +++ b/LeanPool/ChannelCapacity/Counterexample.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.ChannelCapacity.Capacity -import Mathlib.MeasureTheory.Measure.Dirac.Def -import Mathlib.MeasureTheory.Measure.Dirac.Basic -import Mathlib.Probability.ProbabilityMassFunction.Constructions +module + +public import Mathlib.Probability.ProbabilityMassFunction.Constructions +public import LeanPool.ChannelCapacity.NonDegeneracy /-! # ChannelCapacity.Counterexample @@ -14,6 +14,8 @@ import Mathlib.Probability.ProbabilityMassFunction.Constructions A finite counterexample showing that row separation does not imply injective prior pushforward. -/ +@[expose] public section + open MeasureTheory open ProbabilityTheory open scoped ENNReal NNReal diff --git a/LeanPool/ChannelCapacity/Discharged.lean b/LeanPool/ChannelCapacity/Discharged.lean index 1f19c3cc8a..d8ddd49ffb 100644 --- a/LeanPool/ChannelCapacity/Discharged.lean +++ b/LeanPool/ChannelCapacity/Discharged.lean @@ -3,15 +3,14 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.ChannelCapacity.Capacity -import LeanPool.ChannelCapacity.NonDegeneracy +module + +public import LeanPool.ChannelCapacity.Capacity + import LeanPool.ChannelCapacity.ChainRule import LeanPool.ChannelCapacity.KernelCompositionKullbackLeibler - -import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic -import Mathlib.MeasureTheory.Constructions.Polish.Basic import Mathlib.MeasureTheory.Measure.Prokhorov -import Mathlib.Probability.Kernel.WithDensity +import Mathlib.Probability.Kernel.Composition.MeasureComp /-! # ChannelCapacity.Discharged @@ -35,6 +34,8 @@ channel with counting-measure reference, an explicit `ContinuousPositiveDensity` concrete application of `exists_unique_capacity_achieving_prior_discharged`. -/ +@[expose] public section + open MeasureTheory open ProbabilityTheory open scoped ENNReal diff --git a/LeanPool/ChannelCapacity/DischargedExample.lean b/LeanPool/ChannelCapacity/DischargedExample.lean index 1f1ab2eadb..331816971f 100644 --- a/LeanPool/ChannelCapacity/DischargedExample.lean +++ b/LeanPool/ChannelCapacity/DischargedExample.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.ChannelCapacity.Discharged -import LeanPool.ChannelCapacity.Finite +module -import Mathlib.MeasureTheory.Measure.Count -import Mathlib.Probability.ProbabilityMassFunction.Basic -import Mathlib.Probability.ProbabilityMassFunction.Constructions +public import LeanPool.ChannelCapacity.Discharged +public import LeanPool.ChannelCapacity.Finite + +public import Mathlib.Probability.ProbabilityMassFunction.Constructions /-! # ChannelCapacity.DischargedExample @@ -20,6 +20,8 @@ reference, instantiates `Kernel.ContinuousPositiveDensity`, and applies `exists_unique_capacity_achieving_prior_discharged`. -/ +@[expose] public section + open MeasureTheory open ProbabilityTheory open scoped ENNReal NNReal diff --git a/LeanPool/ChannelCapacity/Finite.lean b/LeanPool/ChannelCapacity/Finite.lean index 97f05af61c..1750418974 100644 --- a/LeanPool/ChannelCapacity/Finite.lean +++ b/LeanPool/ChannelCapacity/Finite.lean @@ -3,15 +3,14 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.ChannelCapacity.Capacity -import Mathlib.MeasureTheory.Constructions.Polish.Basic -import Mathlib.MeasureTheory.Integral.Bochner.SumMeasure -import Mathlib.MeasureTheory.Measure.Count -import Mathlib.MeasureTheory.Measure.Decomposition.RadonNikodym +module + +public import LeanPool.ChannelCapacity.Capacity +import LeanPool.ChannelCapacity.ChainRule +import LeanPool.ChannelCapacity.KernelCompositionKullbackLeibler +import LeanPool.ChannelCapacity.StrictConcavity import Mathlib.MeasureTheory.Measure.Prokhorov -import Mathlib.Probability.ProbabilityMassFunction.Basic -import Mathlib.Topology.ContinuousMap.Bounded.Basic -import Mathlib.Analysis.SpecialFunctions.Log.NegMulLog +import Mathlib.Probability.Kernel.Composition.MeasureComp /-! # ChannelCapacity.Finite @@ -24,6 +23,8 @@ concavity can be proved internally without passing abstract topology or semicont through the public theorem statement. -/ +@[expose] public section + open MeasureTheory open ProbabilityTheory open scoped BigOperators ENNReal diff --git a/LeanPool/ChannelCapacity/KernelCompositionKullbackLeibler.lean b/LeanPool/ChannelCapacity/KernelCompositionKullbackLeibler.lean index fe38bf8843..b793696093 100644 --- a/LeanPool/ChannelCapacity/KernelCompositionKullbackLeibler.lean +++ b/LeanPool/ChannelCapacity/KernelCompositionKullbackLeibler.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import Mathlib.InformationTheory.KullbackLeibler.Basic -import Mathlib.Probability.Kernel.CompProdEqIff +module + +public import Mathlib.InformationTheory.KullbackLeibler.Basic -import Mathlib.MeasureTheory.Measure.Decomposition.RadonNikodym -import Mathlib.Probability.Kernel.RadonNikodym +public import Mathlib.Probability.Kernel.RadonNikodym +import Mathlib.Probability.Kernel.CompProdEqIff +import Mathlib.Probability.Kernel.Composition.WithDensity /-! # Kullback-Leibler divergence and kernel composition products @@ -36,6 +38,8 @@ infrastructure in Mathlib, where the mixed-left-measure and additive chain-rule already available. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory open scoped ENNReal diff --git a/LeanPool/ChannelCapacity/NonDegeneracy.lean b/LeanPool/ChannelCapacity/NonDegeneracy.lean index 1095e3a950..53cfcc9f5e 100644 --- a/LeanPool/ChannelCapacity/NonDegeneracy.lean +++ b/LeanPool/ChannelCapacity/NonDegeneracy.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.ChannelCapacity.Basic +module + +public import LeanPool.ChannelCapacity.Basic +public import Mathlib.MeasureTheory.Measure.DiracProba +import Mathlib.Probability.Kernel.Composition.MeasureComp /-! # ChannelCapacity.NonDegeneracy @@ -15,6 +19,8 @@ Correct non-degeneracy conditions for uniqueness in the prior variable. - `Kernel.RowSeparating` -/ +@[expose] public section + open MeasureTheory open ProbabilityTheory open scoped ENNReal diff --git a/LeanPool/ChannelCapacity/StrictConcavity.lean b/LeanPool/ChannelCapacity/StrictConcavity.lean index 24a9904a5b..8bdb0b9ea5 100644 --- a/LeanPool/ChannelCapacity/StrictConcavity.lean +++ b/LeanPool/ChannelCapacity/StrictConcavity.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.ChannelCapacity.ChainRule -import LeanPool.ChannelCapacity.NonDegeneracy -import Mathlib.Order.Filter.Extr +module + +public import LeanPool.ChannelCapacity.NonDegeneracy +import LeanPool.ChannelCapacity.KernelCompositionKullbackLeibler +import Mathlib.Probability.Kernel.Composition.MeasureComp /-! # ChannelCapacity.StrictConcavity @@ -17,6 +19,8 @@ strict concavity is phrased directly in terms of the explicit operation `ProbabilityMeasure.convexCombination`. -/ +@[expose] public section + open MeasureTheory open ProbabilityTheory open scoped BigOperators ENNReal diff --git a/LeanPool/Chudnovsky.lean b/LeanPool/Chudnovsky.lean index e5b88be7fa..fac10fcf58 100644 --- a/LeanPool/Chudnovsky.lean +++ b/LeanPool/Chudnovsky.lean @@ -3,26 +3,28 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.Basic -import LeanPool.Chudnovsky.Chudnovsky -import LeanPool.Chudnovsky.Clausen -import LeanPool.Chudnovsky.Coefficients -import LeanPool.Chudnovsky.ComplexMult -import LeanPool.Chudnovsky.DivisionValues -import LeanPool.Chudnovsky.Estimates -import LeanPool.Chudnovsky.Fourier -import LeanPool.Chudnovsky.Kummer -import LeanPool.Chudnovsky.Lattices -import LeanPool.Chudnovsky.Liouville -import LeanPool.Chudnovsky.MainTheorem -import LeanPool.Chudnovsky.Numerics -import LeanPool.Chudnovsky.PicardFuchs -import LeanPool.Chudnovsky.Quasiperiods -import LeanPool.Chudnovsky.Ramanujan -import LeanPool.Chudnovsky.SigmaZeta -import LeanPool.Chudnovsky.SingularModuli -import LeanPool.Chudnovsky.WeierstrassMore +public import LeanPool.Chudnovsky.Basic +public import LeanPool.Chudnovsky.Chudnovsky +public import LeanPool.Chudnovsky.Clausen +public import LeanPool.Chudnovsky.Coefficients +public import LeanPool.Chudnovsky.ComplexMult +public import LeanPool.Chudnovsky.DivisionValues +public import LeanPool.Chudnovsky.Estimates +public import LeanPool.Chudnovsky.Fourier +public import LeanPool.Chudnovsky.Kummer +public import LeanPool.Chudnovsky.Lattices +public import LeanPool.Chudnovsky.Liouville +public import LeanPool.Chudnovsky.MainTheorem +public import LeanPool.Chudnovsky.Numerics +public import LeanPool.Chudnovsky.PicardFuchs +public import LeanPool.Chudnovsky.Quasiperiods +public import LeanPool.Chudnovsky.Ramanujan +public import LeanPool.Chudnovsky.SigmaZeta +public import LeanPool.Chudnovsky.SingularModuli +public import LeanPool.Chudnovsky.WeierstrassMore +import Mathlib.Tactic.NormNum.Prime /-! # A Detailed Proof of the Chudnovsky Formula @@ -34,3 +36,5 @@ Main declarations: `Chudnovsky.chudnovskySum_eq_pi_inv` Tags: number-theory, pi, chudnovsky, modular-forms, complex-multiplication MSC: 11Y60, 11F03, 33C05 -/ + +@[expose] public section diff --git a/LeanPool/Chudnovsky/Basic.lean b/LeanPool/Chudnovsky/Basic.lean index 7af495471c..d2cdcfe305 100644 --- a/LeanPool/Chudnovsky/Basic.lean +++ b/LeanPool/Chudnovsky/Basic.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import Mathlib.Analysis.SpecialFunctions.Elliptic.Weierstrass +public import Mathlib.Analysis.SpecialFunctions.Elliptic.Weierstrass +public import Mathlib.NumberTheory.ModularForms.Discriminant import Mathlib.NumberTheory.ModularForms.LevelOne.GradedRing /-! @@ -26,6 +28,8 @@ Following the plan in `PLAN.md`, `J` is defined directly in terms of Eisenstein lattice-theoretic description `g₂³/Δ` becomes a lemma (proved in `Fourier.lean`). -/ +@[expose] public section + noncomputable section namespace Chudnovsky diff --git a/LeanPool/Chudnovsky/Chudnovsky.lean b/LeanPool/Chudnovsky/Chudnovsky.lean index eb2303051f..b95b28ccb4 100644 --- a/LeanPool/Chudnovsky/Chudnovsky.lean +++ b/LeanPool/Chudnovsky/Chudnovsky.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module +public import Mathlib.Analysis.Real.Pi.Chudnovsky +public import LeanPool.Chudnovsky.Basic import LeanPool.Chudnovsky.Coefficients -import Mathlib.Analysis.Real.Pi.Chudnovsky +import LeanPool.Chudnovsky.MainTheorem +import Mathlib.Tactic.NormNum.Prime /-! # Glue: from Milla's `theohud` to Mathlib's `chudnovskySum = π⁻¹` @@ -22,6 +26,8 @@ the Phase C inputs (`SingularModuli.lean`) as explicit hypotheses: the paper's p minus the literature citations (Silverman II.6.1, II.4.3(b), Buell, Masser Thm. A1). -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -30,40 +36,10 @@ open UpperHalfPlane Complex Nat open scoped Real -/-- Key factorial bound: `(6n)! ≤ 1728ⁿ·(3n)!·(n!)³`, the exponential growth rate of -`(6n)!/((3n)!(n!)³)` (Stirling gives exactly `1728 = 6⁶/3³`). Proved by induction: the -single-step ratio is `(6n+1)⋯(6n+6) ≤ 1728·(3n+1)(3n+2)(3n+3)(n+1)³`, whose difference -factors as `72·(n+1)(3n+1)(3n+2)(108n²+170n+67) ≥ 0`. -/ +/-- The factorial bound from the Main Theorem controls the series normalization. -/ private theorem factorial_six_bound (n : ℕ) : - (6 * n)! ≤ 1728 ^ n * ((3 * n)! * (n ! ) ^ 3) := by - induction n with - | zero => simp - | succ n ih => - have e6 : 6 * (n + 1) = 6 * n + 6 := by ring - have e3 : 3 * (n + 1) = 3 * n + 3 := by ring - have exp6 : (6 * n + 6)! = - (6*n+6)*(6*n+5)*(6*n+4)*(6*n+3)*(6*n+2)*(6*n+1) * (6*n)! := by - simp only [Nat.factorial_succ]; ring - have exp3 : (3 * n + 3)! = (3*n+3)*(3*n+2)*(3*n+1) * (3*n)! := by - simp only [Nat.factorial_succ]; ring - have expn : ((n+1) ! ) ^ 3 = (n+1)^3 * (n ! )^3 := by - rw [Nat.factorial_succ]; ring - rw [e6, e3, exp6, exp3, expn] - have hstep : (6*n+6)*(6*n+5)*(6*n+4)*(6*n+3)*(6*n+2)*(6*n+1) - ≤ 1728 * ((3*n+3)*(3*n+2)*(3*n+1)*(n+1)^3) := by - calc (6*n+6)*(6*n+5)*(6*n+4)*(6*n+3)*(6*n+2)*(6*n+1) - ≤ (6*n+6)*(6*n+5)*(6*n+4)*(6*n+3)*(6*n+2)*(6*n+1) - + (69984*n^5+250128*n^4+349272*n^3+237024*n^2+77544*n+9648) := - Nat.le_add_right _ _ - _ = 1728 * ((3*n+3)*(3*n+2)*(3*n+1)*(n+1)^3) := by ring - calc (6*n+6)*(6*n+5)*(6*n+4)*(6*n+3)*(6*n+2)*(6*n+1) * (6*n)! - ≤ (6*n+6)*(6*n+5)*(6*n+4)*(6*n+3)*(6*n+2)*(6*n+1) - * (1728^n * ((3*n)! * (n ! )^3)) := Nat.mul_le_mul_left _ ih - _ = ((6*n+6)*(6*n+5)*(6*n+4)*(6*n+3)*(6*n+2)*(6*n+1)) * 1728^n - * ((3*n)! * (n ! )^3) := by ring - _ ≤ (1728 * ((3*n+3)*(3*n+2)*(3*n+1)*(n+1)^3)) * 1728^n * ((3*n)! * (n ! )^3) := - Nat.mul_le_mul_right _ (Nat.mul_le_mul_right _ hstep) - _ = 1728 ^ (n+1) * ((3*n+3)*(3*n+2)*(3*n+1) * (3*n)! * ((n+1)^3 * (n ! )^3)) := by ring + (6 * n)! ≤ 1728 ^ n * ((3 * n)! * (n ! ) ^ 3) := + factorial_ratio_le n /-- The Chudnovsky series is (absolutely) summable — needed for `hauptformel` substitution, the series rearrangement, and the final inversion. -/ @@ -105,7 +81,7 @@ theorem summable_chudnovskyTerm : Summable fun n : ℕ ↦ (chudnovskyTerm n : * (((3*n)! : ℝ) * (n ! )^3 * 640320^(3*n)) = (545140134 * (n:ℝ) + 13591409) * (r ^ n * 640320^(3*n)) * (((3*n)! : ℝ) * (n ! )^3) from by ring, hrpow] - nlinarith [mul_le_mul_of_nonneg_left key hApos] + linear_combination mul_le_mul_of_nonneg_left key hApos /-- The glue lemma: Milla's normalization `√(640320³)/(12π) = ∑ …` implies Mathlib's `chudnovskySum = π⁻¹`. Shared by both `chudnovsky_of_singular_moduli` and the diff --git a/LeanPool/Chudnovsky/Clausen.lean b/LeanPool/Chudnovsky/Clausen.lean index 618c46a991..6e00c842ae 100644 --- a/LeanPool/Chudnovsky/Clausen.lean +++ b/LeanPool/Chudnovsky/Clausen.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ - -import LeanPool.Chudnovsky.Basic -import Mathlib.Analysis.Analytic.OfScalars -import Mathlib.Analysis.SpecialFunctions.OrdinaryHypergeometric +module + +public import Mathlib.Analysis.SpecialFunctions.OrdinaryHypergeometric +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Calculus.Deriv.Basic +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.Calculus.SmoothSeries +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # Clausen's formula and the hypergeometric differential equations @@ -40,6 +49,8 @@ This file covers chapter 6 of Milla's proof of the Chudnovsky formula (arXiv:180 `(₂F₁(1/12, 5/12; 1; z))² = ∑ (6n)!/((3n)!(n!)³) · zⁿ/12^(3n)` (paper Thm. `darst`). -/ +@[expose] public section + noncomputable section open Nat FormalMultilinearSeries @@ -402,6 +413,45 @@ private theorem ordinaryHypergeometric_discSummable (a b c : ℂ) (hc : ∀ k : exact ascPochhammer_eval_neg_coe_nat_of_lt hlt]; ring rw [hc0, zero_mul, norm_zero] +/-- The `₂F₁` coefficient recurrence `(m+a)(m+b) cₘ = (m+1)(m+c) c₍ₘ₊₁₎` +(needs `c` non-degenerate). -/ +private theorem ordinaryHypergeometric_coeff_rec (a b c : ℂ) (hc : ∀ k : ℕ, (k : ℂ) ≠ -c) (m : ℕ) : + ((m : ℂ) + a) * ((m : ℂ) + b) * ordinaryHypergeometricCoefficient a b c m + = ((m : ℂ) + 1) * ((m : ℂ) + c) * ordinaryHypergeometricCoefficient a b c (m + 1) := by + have hpc : (ascPochhammer ℂ m).eval c ≠ 0 := fun hz0 => by + rw [ascPochhammer_eval_eq_zero_iff] at hz0 + obtain ⟨k, _, hk⟩ := hz0; exact hc k hk + have hfac : ((m ! : ℂ)) ≠ 0 := Nat.cast_ne_zero.2 (Nat.factorial_ne_zero m) + have hm1 : ((m : ℂ) + 1) ≠ 0 := Nat.cast_add_one_ne_zero m + have hcadd : c + (m : ℂ) ≠ 0 := fun h => hc m (eq_neg_of_add_eq_zero_right h) + simp only [ordinaryHypergeometricCoefficient, ascPochhammer_succ_eval, Nat.factorial_succ, + Nat.cast_mul, Nat.cast_succ] + field_simp + ring + +/-- The `₃F₂` coefficient recurrence `(m+α)(m+β)(m+γ) dₘ = (m+1)(m+δ)(m+ε) d₍ₘ₊₁₎` +(needs `δ`, `ε` non-degenerate). -/ +private theorem generalizedHypergeometric_coeff_rec (α β γ δ ε : ℂ) + (hδ : ∀ k : ℕ, (k : ℂ) ≠ -δ) (hε : ∀ k : ℕ, (k : ℂ) ≠ -ε) (m : ℕ) : + ((m : ℂ) + α) * ((m : ℂ) + β) * ((m : ℂ) + γ) * + generalizedHypergeometricCoefficient α β γ δ ε m + = ((m : ℂ) + 1) * ((m : ℂ) + δ) * ((m : ℂ) + ε) * + generalizedHypergeometricCoefficient α β γ δ ε (m + 1) := by + have hpd : (ascPochhammer ℂ m).eval δ ≠ 0 := fun hz0 => by + rw [ascPochhammer_eval_eq_zero_iff] at hz0 + obtain ⟨k, _, hk⟩ := hz0; exact hδ k hk + have hpe : (ascPochhammer ℂ m).eval ε ≠ 0 := fun hz0 => by + rw [ascPochhammer_eval_eq_zero_iff] at hz0 + obtain ⟨k, _, hk⟩ := hz0; exact hε k hk + have hfac : ((m ! : ℂ)) ≠ 0 := Nat.cast_ne_zero.2 (Nat.factorial_ne_zero m) + have hm1 : ((m : ℂ) + 1) ≠ 0 := Nat.cast_add_one_ne_zero m + have hdadd : δ + (m : ℂ) ≠ 0 := fun h => hδ m (eq_neg_of_add_eq_zero_right h) + have headd : ε + (m : ℂ) ≠ 0 := fun h => hε m (eq_neg_of_add_eq_zero_right h) + simp only [generalizedHypergeometricCoefficient, ascPochhammer_succ_eval, Nat.factorial_succ, + Nat.cast_mul, Nat.cast_succ] + field_simp + ring + /-- Paper Thm. `dgl2f1`: on the unit disc, `f = ₂F₁(a, b; c; ·)` satisfies the hypergeometric differential equation `z(z-1)f'' + [(a+b+1)z - c]f' + ab·f = 0`. @@ -413,7 +463,7 @@ theorem ordinaryHypergeometric_ode (a b c : ℂ) (hc : ∀ k : ℕ, (k : ℂ) + ((a + b + 1) * z - c) * deriv (fun w : ℂ => ₂F₁ a b c w) z + a * b * ₂F₁ a b c z = 0 := by -- Coefficient sequences: `C` for `f`, `C1` for `f'`, `C2` for `f''`. - set C : ℕ → ℂ := ordinaryHypergeometricCoefficient a b c with hCdef + let C : ℕ → ℂ := ordinaryHypergeometricCoefficient a b c set C1 : ℕ → ℂ := fun n => ((n : ℂ) + 1) * C (n + 1) with hC1def set C2 : ℕ → ℂ := fun n => ((n : ℂ) + 1) * C1 (n + 1) with hC2def have hCsum : DiscSummable C := ordinaryHypergeometric_discSummable a b c hc @@ -421,20 +471,8 @@ theorem ordinaryHypergeometric_ode (a b c : ℂ) (hc : ∀ k : ℕ, (k : ℂ) have hC2sum : DiscSummable C2 := by rw [hC2def]; exact hC1sum.shift -- The coefficient recurrence `(m+a)(m+b) Cₘ = (m+1)(m+c) C₍ₘ₊₁₎` (needs only `hc`). have hrec : ∀ m : ℕ, ((m : ℂ) + a) * ((m : ℂ) + b) * C m - = ((m : ℂ) + 1) * ((m : ℂ) + c) * C (m + 1) := by - intro m - have hpc : ∀ i : ℕ, (ascPochhammer ℂ i).eval c ≠ 0 := by - intro i hz0 - rw [ascPochhammer_eval_eq_zero_iff] at hz0 - obtain ⟨k, _, hk⟩ := hz0 - exact hc k (by linear_combination hk) - have hfac : ((m ! : ℂ)) ≠ 0 := Nat.cast_ne_zero.2 (Nat.factorial_ne_zero m) - have hm1 : ((m : ℂ) + 1) ≠ 0 := Nat.cast_add_one_ne_zero m - have hcadd : c + (m : ℂ) ≠ 0 := fun h => hc m (by linear_combination h) - simp only [hCdef, ordinaryHypergeometricCoefficient, ascPochhammer_succ_eval, - Nat.factorial_succ, Nat.cast_mul, Nat.cast_succ] - field_simp - ring + = ((m : ℂ) + 1) * ((m : ℂ) + c) * C (m + 1) := + ordinaryHypergeometric_coeff_rec a b c hc -- The power-series representations of `f`, `f'`, `f''`. have hfun : (fun w : ℂ => ₂F₁ a b c w) = fun w => ∑' n : ℕ, C n * w ^ n := by funext w @@ -585,7 +623,7 @@ theorem generalizedHypergeometric_ode (α β γ δ ε : ℂ) + ((α * β + α * γ + β * γ + α + β + γ + 1) * z - δ * ε) * deriv (fun w : ℂ => ₃F₂ α β γ δ ε w) z + α * β * γ * ₃F₂ α β γ δ ε z = 0 := by - set D : ℕ → ℂ := generalizedHypergeometricCoefficient α β γ δ ε with hDdef + let D : ℕ → ℂ := generalizedHypergeometricCoefficient α β γ δ ε set D1 : ℕ → ℂ := fun n => ((n : ℂ) + 1) * D (n + 1) with hD1def set D2 : ℕ → ℂ := fun n => ((n : ℂ) + 1) * D1 (n + 1) with hD2def set D3 : ℕ → ℂ := fun n => ((n : ℂ) + 1) * D2 (n + 1) with hD3def @@ -595,22 +633,8 @@ theorem generalizedHypergeometric_ode (α β γ δ ε : ℂ) have hD3sum : DiscSummable D3 := by rw [hD3def]; exact hD2sum.shift -- Coefficient recurrence `(m+α)(m+β)(m+γ) Dₘ = (m+1)(m+δ)(m+ε) D₍ₘ₊₁₎` (needs `hδ`, `hε`). have hrec3 : ∀ m : ℕ, ((m : ℂ) + α) * ((m : ℂ) + β) * ((m : ℂ) + γ) * D m - = ((m : ℂ) + 1) * ((m : ℂ) + δ) * ((m : ℂ) + ε) * D (m + 1) := by - intro m - have hpd : ∀ i : ℕ, (ascPochhammer ℂ i).eval δ ≠ 0 := fun i hz0 => by - rw [ascPochhammer_eval_eq_zero_iff] at hz0 - obtain ⟨k, _, hk⟩ := hz0; exact hδ k (by linear_combination hk) - have hpe : ∀ i : ℕ, (ascPochhammer ℂ i).eval ε ≠ 0 := fun i hz0 => by - rw [ascPochhammer_eval_eq_zero_iff] at hz0 - obtain ⟨k, _, hk⟩ := hz0; exact hε k (by linear_combination hk) - have hfac : ((m ! : ℂ)) ≠ 0 := Nat.cast_ne_zero.2 (Nat.factorial_ne_zero m) - have hm1 : ((m : ℂ) + 1) ≠ 0 := Nat.cast_add_one_ne_zero m - have hdadd : δ + (m : ℂ) ≠ 0 := fun h => hδ m (by linear_combination h) - have headd : ε + (m : ℂ) ≠ 0 := fun h => hε m (by linear_combination h) - simp only [hDdef, generalizedHypergeometricCoefficient, ascPochhammer_succ_eval, - Nat.factorial_succ, Nat.cast_mul, Nat.cast_succ] - field_simp - ring + = ((m : ℂ) + 1) * ((m : ℂ) + δ) * ((m : ℂ) + ε) * D (m + 1) := + generalizedHypergeometric_coeff_rec α β γ δ ε hδ hε -- Power-series representations of `g` and its derivatives. have hfun : (fun w : ℂ => ₃F₂ α β γ δ ε w) = fun w => ∑' n : ℕ, D n * w ^ n := by funext w @@ -741,45 +765,6 @@ theorem generalizedHypergeometric_ode (α β γ δ ε : ℂ) /-! ## Clausen's formula (paper Thm. `satzclausen`) -/ -/-- The `₂F₁` coefficient recurrence `(m+a)(m+b) cₘ = (m+1)(m+c) c₍ₘ₊₁₎` -(needs `c` non-degenerate). -/ -private theorem ordinaryHypergeometric_coeff_rec (a b c : ℂ) (hc : ∀ k : ℕ, (k : ℂ) ≠ -c) (m : ℕ) : - ((m : ℂ) + a) * ((m : ℂ) + b) * ordinaryHypergeometricCoefficient a b c m - = ((m : ℂ) + 1) * ((m : ℂ) + c) * ordinaryHypergeometricCoefficient a b c (m + 1) := by - have hpc : ∀ i : ℕ, (ascPochhammer ℂ i).eval c ≠ 0 := fun i hz0 => by - rw [ascPochhammer_eval_eq_zero_iff] at hz0 - obtain ⟨k, _, hk⟩ := hz0; exact hc k (by linear_combination hk) - have hfac : ((m ! : ℂ)) ≠ 0 := Nat.cast_ne_zero.2 (Nat.factorial_ne_zero m) - have hm1 : ((m : ℂ) + 1) ≠ 0 := Nat.cast_add_one_ne_zero m - have hcadd : c + (m : ℂ) ≠ 0 := fun h => hc m (by linear_combination h) - simp only [ordinaryHypergeometricCoefficient, ascPochhammer_succ_eval, Nat.factorial_succ, - Nat.cast_mul, Nat.cast_succ] - field_simp - ring - -/-- The `₃F₂` coefficient recurrence `(m+α)(m+β)(m+γ) dₘ = (m+1)(m+δ)(m+ε) d₍ₘ₊₁₎` -(needs `δ`, `ε` non-degenerate). -/ -private theorem generalizedHypergeometric_coeff_rec (α β γ δ ε : ℂ) - (hδ : ∀ k : ℕ, (k : ℂ) ≠ -δ) (hε : ∀ k : ℕ, (k : ℂ) ≠ -ε) (m : ℕ) : - ((m : ℂ) + α) * ((m : ℂ) + β) * ((m : ℂ) + γ) * - generalizedHypergeometricCoefficient α β γ δ ε m - = ((m : ℂ) + 1) * ((m : ℂ) + δ) * ((m : ℂ) + ε) * - generalizedHypergeometricCoefficient α β γ δ ε (m + 1) := by - have hpd : ∀ i : ℕ, (ascPochhammer ℂ i).eval δ ≠ 0 := fun i hz0 => by - rw [ascPochhammer_eval_eq_zero_iff] at hz0 - obtain ⟨k, _, hk⟩ := hz0; exact hδ k (by linear_combination hk) - have hpe : ∀ i : ℕ, (ascPochhammer ℂ i).eval ε ≠ 0 := fun i hz0 => by - rw [ascPochhammer_eval_eq_zero_iff] at hz0 - obtain ⟨k, _, hk⟩ := hz0; exact hε k (by linear_combination hk) - have hfac : ((m ! : ℂ)) ≠ 0 := Nat.cast_ne_zero.2 (Nat.factorial_ne_zero m) - have hm1 : ((m : ℂ) + 1) ≠ 0 := Nat.cast_add_one_ne_zero m - have hdadd : δ + (m : ℂ) ≠ 0 := fun h => hδ m (by linear_combination h) - have headd : ε + (m : ℂ) ≠ 0 := fun h => hε m (by linear_combination h) - simp only [generalizedHypergeometricCoefficient, ascPochhammer_succ_eval, Nat.factorial_succ, - Nat.cast_mul, Nat.cast_succ] - field_simp - ring - /-- The general Clausen coefficient identity: the `n`-th Cauchy-product coefficient of `(₂F₁(a, b; a+b+1/2; ·))²` equals the `n`-th coefficient of `₃F₂(2a, 2b, a+b; 2a+2b, a+b+1/2; ·)`. Proved by a creative-telescoping (WZ) recurrence with the certificate diff --git a/LeanPool/Chudnovsky/Coefficients.lean b/LeanPool/Chudnovsky/Coefficients.lean index 727f1307dc..1ee0329cd4 100644 --- a/LeanPool/Chudnovsky/Coefficients.lean +++ b/LeanPool/Chudnovsky/Coefficients.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module +public import LeanPool.Chudnovsky.Estimates +import LeanPool.Chudnovsky.ComplexMult import LeanPool.Chudnovsky.MainTheorem import LeanPool.Chudnovsky.Numerics import LeanPool.Chudnovsky.SingularModuli -import LeanPool.Chudnovsky.ComplexMult +import LeanPool.Chudnovsky.SingularModuli.CMRelations +import LeanPool.Chudnovsky.SingularModuli.ModularPolynomialZ +import Mathlib.Tactic.NormNum.Prime /-! # The coefficients at `τ₁₆₃` (Milla, ch. 10) @@ -28,6 +33,8 @@ rational is an integer, and an integer within distance `< 1/2` of a certified nu approximation is determined exactly. -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -54,16 +61,18 @@ private lemma jwert_real_bound {e : ℝ} have he2nn : 0 ≤ e ^ 2 := sq_nonneg e -- enclosures for `g = 1 - 240e + 2160e²` have hGLg : (1 - 240 * 3.80898093700765233822623151648e-18 : ℝ) - ≤ 1 - 240 * e + 2160 * e ^ 2 := by linarith + ≤ 1 - 240 * e + 2160 * e ^ 2 := by linarith only [hU, he2nn] have hgGH : 1 - 240 * e + 2160 * e ^ 2 ≤ (1 - 240 * 3.80898093700765233822623151647e-18 - + 2160 * (3.80898093700765233822623151648e-18) ^ 2 : ℝ) := by linarith + + 2160 * (3.80898093700765233822623151648e-18) ^ 2 : ℝ) := by linarith only [hL, he2U] have hGLpos : (0 : ℝ) < 1 - 240 * 3.80898093700765233822623151648e-18 := by norm_num have hgpos : 0 < 1 - 240 * e + 2160 * e ^ 2 := lt_of_lt_of_le hGLpos hGLg -- enclosures for `h = 1 + e - e²` have hHLh : (1 + 3.80898093700765233822623151647e-18 - - (3.80898093700765233822623151648e-18) ^ 2 : ℝ) ≤ 1 + e - e ^ 2 := by linarith - have hhHH : 1 + e - e ^ 2 ≤ (1 + 3.80898093700765233822623151648e-18 : ℝ) := by linarith + - (3.80898093700765233822623151648e-18) ^ 2 : ℝ) ≤ 1 + e - e ^ 2 := by + linarith only [hL, he2U] + have hhHH : 1 + e - e ^ 2 ≤ (1 + 3.80898093700765233822623151648e-18 : ℝ) := by + linarith only [hU, he2nn] have hHLpos : (0 : ℝ) < 1 + 3.80898093700765233822623151647e-18 - (3.80898093700765233822623151648e-18) ^ 2 := by norm_num have hhpos : 0 < 1 + e - e ^ 2 := lt_of_lt_of_le hHLpos hHLh @@ -109,7 +118,8 @@ private lemma jwert_real_bound {e : ℝ} (1 + 3.80898093700765233822623151648e-18) ^ 24) := by norm_num rw [abs_lt] - constructor <;> [linarith [hSlower, hLoNum]; linarith [hSupper, hUpNum]] + exact ⟨by linarith only [hLoNum.trans_le hSlower], + by linarith only [hSupper.trans_lt hUpNum]⟩ /-- Milla's `jwert2` at `N = 163`, from the integrality input `1728·J(τ₁₆₃) ∈ ℤ` as an explicit hypothesis: the singular value `1728·J(τ₁₆₃) = −640320³`. -/ @@ -129,9 +139,8 @@ theorem jwert_τ₁₆₃_of (hjm : ∃ m : ℤ, 1728 * J τ₁₆₃ = (m : ℂ ring have hRreal : (1 + 240 * (-e + 9 * (-e) ^ 2)) ^ 3 / ((-e) * (1 - (-e) - (-e) ^ 2) ^ 24) = -((1 - 240 * e + 2160 * e ^ 2) ^ 3 / (e * (1 + e - e ^ 2) ^ 24)) := by - rw [show (1 + 240 * (-e + 9 * (-e) ^ 2)) ^ 3 = (1 - 240 * e + 2160 * e ^ 2) ^ 3 from by ring, - show ((-e) * (1 - (-e) - (-e) ^ 2) ^ 24) = -(e * (1 + e - e ^ 2) ^ 24) from by ring, - div_neg] + simp only [neg_sq, sub_neg_eq_add, neg_mul, div_neg, + show 1 + 240 * (-e + 9 * e ^ 2) = 1 - 240 * e + 2160 * e ^ 2 from by ring] have hJt_eq : 1728 * Jtilde τ₁₆₃ = ((-((1 - 240 * e + 2160 * e ^ 2) ^ 3 / (e * (1 + e - e ^ 2) ^ 24)) : ℝ) : ℂ) := by rw [hJt_eq0, hRreal] @@ -147,9 +156,8 @@ theorem jwert_τ₁₆₃_of (hjm : ∃ m : ℤ, 1728 * J τ₁₆₃ = (m : ℂ have hJJt : ‖1728 * J τ₁₆₃ - 1728 * Jtilde τ₁₆₃‖ < 0.2 := theonaeherJ hτ have hchain : ‖1728 * J τ₁₆₃ - (-640320 ^ 3 : ℂ)‖ < 1 := by calc ‖1728 * J τ₁₆₃ - (-640320 ^ 3 : ℂ)‖ - = ‖(1728 * J τ₁₆₃ - 1728 * Jtilde τ₁₆₃) - + (1728 * Jtilde τ₁₆₃ - (-640320 ^ 3 : ℂ))‖ := by congr 1; ring - _ ≤ _ := norm_add_le _ _ + ≤ ‖1728 * J τ₁₆₃ - 1728 * Jtilde τ₁₆₃‖ + + ‖1728 * Jtilde τ₁₆₃ - (-640320 ^ 3 : ℂ)‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ _ < 0.2 + 1 / 2 := add_lt_add hJJt hnorm_Jt _ < 1 := by norm_num -- an integer within `< 1` of `−640320³` equals it @@ -203,38 +211,38 @@ private lemma s2tilde_real_bound {e pv sv : ℝ} have he2nn : 0 ≤ e ^ 2 := sq_nonneg e -- num = 1 − 240e + 2160e² have hnumL : (1 - 240 * 3.80898093700765233822623151648e-18 : ℝ) - ≤ 1 - 240 * e + 2160 * e ^ 2 := by linarith + ≤ 1 - 240 * e + 2160 * e ^ 2 := by linarith only [heU, he2nn] have hnumH : 1 - 240 * e + 2160 * e ^ 2 ≤ (1 - 240 * 3.80898093700765233822623151647e-18 - + 2160 * (3.80898093700765233822623151648e-18) ^ 2 : ℝ) := by linarith + + 2160 * (3.80898093700765233822623151648e-18) ^ 2 : ℝ) := by linarith only [heL, he2U] have hnumpos : 0 < 1 - 240 * e + 2160 * e ^ 2 := lt_of_lt_of_le (by norm_num) hnumL -- den = 1 + 504e − 16632e² have hdenL : (1 + 504 * 3.80898093700765233822623151647e-18 - 16632 * (3.80898093700765233822623151648e-18) ^ 2 : ℝ) - ≤ 1 + 504 * e - 16632 * e ^ 2 := by linarith + ≤ 1 + 504 * e - 16632 * e ^ 2 := by linarith only [heL, he2U] have hdenH : 1 + 504 * e - 16632 * e ^ 2 ≤ (1 + 504 * 3.80898093700765233822623151648e-18 : ℝ) := by - linarith + linarith only [heU, he2nn] have hdenpos : 0 < 1 + 504 * e - 16632 * e ^ 2 := lt_of_lt_of_le (by norm_num) hdenL -- w = 3/(pv·(sv/2)); `wH` (from `πL, sL`) is the max, `wL` (from `πU, sU`) the min have hwH : 3 / (pv * (sv / 2)) ≤ (3 / (3.14159265358979323846 * (12.7671453348037046617 / 2)) : ℝ) := div_le_div_of_nonneg_left (by norm_num) (by positivity) - (mul_le_mul hpL.le (by linarith) (by norm_num) hp_pos.le) + (mul_le_mul hpL.le (by linarith only [hsL]) (by norm_num) hp_pos.le) have hwL : (3 / (3.14159265358979323847 * (12.7671453348037046618 / 2)) : ℝ) ≤ 3 / (pv * (sv / 2)) := div_le_div_of_nonneg_left (by norm_num) hpsv - (mul_le_mul hpU.le (by linarith) (by positivity) (by norm_num)) + (mul_le_mul hpU.le (by linarith only [hsU]) (by positivity) (by norm_num)) -- Z = 1 + 24e − 72e² − w : lower bound subtracts `wH`, upper bound subtracts `wL` have hZL : (1 + 24 * 3.80898093700765233822623151647e-18 - 72 * (3.80898093700765233822623151648e-18) ^ 2 - 3 / (3.14159265358979323846 * (12.7671453348037046617 / 2)) : ℝ) - ≤ 1 + 24 * e - 72 * e ^ 2 - 3 / (pv * (sv / 2)) := by linarith + ≤ 1 + 24 * e - 72 * e ^ 2 - 3 / (pv * (sv / 2)) := by linarith only [heL, he2U, hwH] have hZH : 1 + 24 * e - 72 * e ^ 2 - 3 / (pv * (sv / 2)) ≤ (1 + 24 * 3.80898093700765233822623151648e-18 - 72 * (3.80898093700765233822623151647e-18) ^ 2 - 3 / (3.14159265358979323847 * (12.7671453348037046618 / 2)) : ℝ) := by - linarith + linarith only [heU, he2L, hwL] have hZpos : 0 < 1 + 24 * e - 72 * e ^ 2 - 3 / (pv * (sv / 2)) := lt_of_lt_of_le (by norm_num) hZL -- num·Z rational enclosures @@ -269,7 +277,7 @@ private lemma s2tilde_real_bound {e pv sv : ℝ} - 72 * (3.80898093700765233822623151648e-18) ^ 2 - 3 / (3.14159265358979323846 * (12.7671453348037046617 / 2))) * 10996566783048 := by norm_num - linarith + exact hD.trans_lt (hnum.trans_le hb) have hhi : (1 - 240 * e + 2160 * e ^ 2) * (1 + 24 * e - 72 * e ^ 2 - 3 / (pv * (sv / 2))) * 10996566783048 / (1 + 504 * e - 16632 * e ^ 2) < (9351571368960 : ℝ) + 1 / 2 := by rw [div_lt_iff₀ hdenpos] @@ -284,9 +292,9 @@ private lemma s2tilde_real_bound {e pv sv : ℝ} * 10996566783048 < (9351571368960 + 1 / 2 : ℝ) * (1 + 504 * 3.80898093700765233822623151647e-18 - 16632 * (3.80898093700765233822623151648e-18) ^ 2) := by norm_num - linarith + exact hb.trans_lt (hnum.trans_le hD) rw [abs_lt] - constructor <;> linarith + exact ⟨by linarith only [hlo], by linarith only [hhi]⟩ /-- Milla's `s2nenner`/`satzhilfszahlen` at `N = 163`, from the integrality and rationality inputs as explicit hypotheses: `s₂(τ₁₆₃) = 77265280/90856689`. -/ diff --git a/LeanPool/Chudnovsky/ComplexMult.lean b/LeanPool/Chudnovsky/ComplexMult.lean index ee7228b06e..1872df590f 100644 --- a/LeanPool/Chudnovsky/ComplexMult.lean +++ b/LeanPool/Chudnovsky/ComplexMult.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module +public import LeanPool.Chudnovsky.Quasiperiods import LeanPool.Chudnovsky.DivisionValues import LeanPool.Chudnovsky.Fourier +import LeanPool.Chudnovsky.Liouville /-! # Complex multiplication and the integrality of `E₂*` (Milla, Appendix B) @@ -28,6 +31,8 @@ At `τ₁₆₃` : `41 − τ + τ² = 0`, i.e. `A = 41, B = −1, C = 1`, `D = `√D = 2τ − 1 = i√163`, `AC = 41` — the specialization used in `Coefficients.lean`. -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -454,8 +459,7 @@ private lemma cmSet_exists_add_mem {τ : ℍ} {A B C : ℤ} {M : ℕ} have hxM : x < M := Int.emod_lt_of_pos _ hM0 have hCy0 : 0 ≤ C * y := mul_nonneg hC.le hy0 have hCyM : C * y < M := by - have h1 : C * y < C * A := mul_lt_mul_of_pos_left hyA hC - nlinarith + simpa only [hMAC, mul_comm] using mul_lt_mul_of_pos_left hyA hC -- exact-division witnesses obtain ⟨k, hk⟩ : (A : ℤ) ∣ y - p := ⟨-(p / A), by rw [hydef, Int.emod_def]; ring⟩ obtain ⟨t, ht⟩ : (M : ℤ) ∣ x - (B * p - A * q) := @@ -463,12 +467,12 @@ private lemma cmSet_exists_add_mem {τ : ℍ} {A B C : ℤ} {M : ℕ} -- the arithmetic membership conditions have hAxy : (A : ℤ) ∣ x - B * y := by have d1 : (A : ℤ) ∣ x - (B * p - A * q) := dvd_trans ⟨C, hMAC⟩ ⟨t, ht⟩ - have d2 : (A : ℤ) ∣ B * (p - y) := Dvd.dvd.mul_left ⟨-k, by linarith⟩ B + have d2 : (A : ℤ) ∣ B * (p - y) := Dvd.dvd.mul_left ⟨-k, by linarith only [hk]⟩ B have hsplit : x - B * y = (x - (B * p - A * q)) + B * (p - y) + A * (-q) := by ring rw [hsplit] exact dvd_add (dvd_add d1 d2) (Dvd.intro _ rfl) - have hb1 : x.toNat < M := by omega - have hb2 : (C * y).toNat < M := by omega + have hb1 : x.toNat < M := (Int.toNat_lt hx0).mpr hxM + have hb2 : (C * y).toNat < M := (Int.toNat_lt hCy0).mpr hCyM set v : Fin M × Fin M := (⟨x.toNat, hb1⟩, ⟨(C * y).toNat, hb2⟩) with hvdef have hv1 : ((v.1 : ℕ) : ℤ) = x := by simp [hvdef, Int.toNat_of_nonneg hx0] have hv2 : ((v.2 : ℕ) : ℤ) = C * y := by simp [hvdef, Int.toNat_of_nonneg hCy0] @@ -516,8 +520,8 @@ private lemma card_cmSet {A B C : ℤ} {M : ℕ} (hA : 0 < A) (hC : 0 < C) have : (M : ℤ) = (a : ℤ) * c := by rw [haA, hcC]; exact hMAC exact_mod_cast this have hM0 : 0 < M := by rw [hM]; exact Nat.mul_pos ha0 hc0 - have hAne : (A : ℤ) ≠ 0 := by omega - have hCne : (C : ℤ) ≠ 0 := by omega + have hAne : (A : ℤ) ≠ 0 := hA.ne' + have hCne : (C : ℤ) ≠ 0 := hC.ne' -- bounds for the two maps of the bijection with `Fin a × Fin c` have hbound1 : ∀ u : Fin M, (u : ℕ) / c < a := fun u => by rw [Nat.div_lt_iff_lt_mul hc0] @@ -530,13 +534,13 @@ private lemma card_cmSet {A B C : ℤ} {M : ℕ} (hA : 0 < A) (hC : 0 < C) _ = c * a := Nat.mul_comm a c have hjb1 : ∀ w : Fin a × Fin c, ((B * ((w.1 : ℕ) : ℤ)) % A).toNat + a * (w.2 : ℕ) < M := fun w => by - have h1 : (B * ((w.1 : ℕ) : ℤ)) % A < A := Int.emod_lt_of_pos _ (by omega) - have h2 : 0 ≤ (B * ((w.1 : ℕ) : ℤ)) % A := Int.emod_nonneg _ hAne - have h3 : ((B * ((w.1 : ℕ) : ℤ)) % A).toNat < a := by omega + have h1 : (B * ((w.1 : ℕ) : ℤ)) % A < A := Int.emod_lt_of_pos _ hA + have h3 : ((B * ((w.1 : ℕ) : ℤ)) % A).toNat < a := + (Int.toNat_lt_toNat hA).mpr h1 calc ((B * ((w.1 : ℕ) : ℤ)) % A).toNat + a * (w.2 : ℕ) < a + a * (w.2 : ℕ) := Nat.add_lt_add_right h3 _ _ = a * ((w.2 : ℕ) + 1) := by ring - _ ≤ a * c := Nat.mul_le_mul_left a (by have := w.2.isLt; omega) + _ ≤ a * c := Nat.mul_le_mul_left a w.2.isLt _ = M := hM.symm have hjb2 : ∀ w : Fin a, c * (w : ℕ) < M := fun w => by calc c * (w : ℕ) < c * a := mul_lt_mul_of_pos_left w.isLt hc0 @@ -583,12 +587,10 @@ private lemma card_cmSet {A B C : ℤ} {M : ℕ} (hA : 0 < A) (hC : 0 < C) _ = C * (A * d) := by rw [hMAC]; ring exact mul_left_cancel₀ hCne hCC have hmod : (B * (y : ℤ)) % A = ((v.1 : ℕ) : ℤ) % A := by - conv_rhs => rw [show ((v.1 : ℕ) : ℤ) = B * (y : ℤ) + A * d by linarith] + conv_rhs => rw [show ((v.1 : ℕ) : ℤ) = B * (y : ℤ) + A * d by linarith only [hAd]] rw [Int.add_mul_emod_self_left] have htn : ((B * (y : ℤ)) % A).toNat = (v.1 : ℕ) % a := by - have h1 : ((v.1 : ℕ) : ℤ) % A = (((v.1 : ℕ) % a : ℕ) : ℤ) := by - rw [← haA, Int.natCast_mod] - omega + rw [hmod, ← haA, ← Int.natCast_mod, Int.toNat_natCast] refine Prod.ext (Fin.ext ?_) (Fin.ext ?_) · change ((B * (y : ℤ)) % A).toNat + a * ((v.1 : ℕ) / a) = (v.1 : ℕ) rw [htn] @@ -596,14 +598,13 @@ private lemma card_cmSet {A B C : ℤ} {M : ℕ} (hA : 0 < A) (hC : 0 < C) · exact hv2c · -- right inverse (on univ) intro w _ - have h2 : 0 ≤ (B * ((w.1 : ℕ) : ℤ)) % A := Int.emod_nonneg _ hAne - have h1 : (B * ((w.1 : ℕ) : ℤ)) % A < A := Int.emod_lt_of_pos _ (by omega) + have h1 : (B * ((w.1 : ℕ) : ℤ)) % A < A := Int.emod_lt_of_pos _ hA refine Prod.ext (Fin.ext ?_) (Fin.ext ?_) · change (c * (w.1 : ℕ)) / c = (w.1 : ℕ) exact Nat.mul_div_cancel_left _ hc0 · change (((B * ((w.1 : ℕ) : ℤ)) % A).toNat + a * (w.2 : ℕ)) / a = (w.2 : ℕ) - rw [Nat.add_mul_div_left _ _ ha0, Nat.div_eq_of_lt (by omega)] - omega + rw [Nat.add_mul_div_left _ _ ha0, + Nat.div_eq_of_lt ((Int.toNat_lt_toNat hA).mpr h1), zero_add] rw [key, Finset.card_univ] simp [hM] diff --git a/LeanPool/Chudnovsky/DivisionValues.lean b/LeanPool/Chudnovsky/DivisionValues.lean index ca464d0abb..69302f7362 100644 --- a/LeanPool/Chudnovsky/DivisionValues.lean +++ b/LeanPool/Chudnovsky/DivisionValues.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module +public import LeanPool.Chudnovsky.SigmaZeta +public import Mathlib.RingTheory.IntegralClosure.IsIntegral.Defs import LeanPool.Chudnovsky.Quasiperiods +import LeanPool.Chudnovsky.WeierstrassMore import Mathlib.Analysis.Meromorphic.TrailingCoefficient import Mathlib.NumberTheory.Real.Irrational @@ -27,6 +31,8 @@ recursion, Baker's factorization `thmbaker` structure lemmas `propindu`, from which the two theorems below follow. -/ +@[expose] public section + open scoped Topology noncomputable section diff --git a/LeanPool/Chudnovsky/Estimates.lean b/LeanPool/Chudnovsky/Estimates.lean index b776f5ca35..1bd3df6e09 100644 --- a/LeanPool/Chudnovsky/Estimates.lean +++ b/LeanPool/Chudnovsky/Estimates.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.Basic -import Mathlib.Analysis.Real.Pi.Bounds +public import LeanPool.Chudnovsky.Basic import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Analysis.Real.Pi.Bounds /-! # Estimates for `1728·J` and `s₂` (Milla, arXiv:1809.00533v6, Chapter 5) @@ -37,6 +38,8 @@ This file states the explicit estimates and `q`-series approximations of Chapter All estimates hold on `Chudnovsky.Region = {τ | Im τ > 5/4}`. -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -692,7 +695,7 @@ def lemkG : List ℤ := 1977862, -73416, -649704, -212520, 82731, 78936, 16192, -6072, -4830, -1472, -252, -24, -1] -/-- **Paper Lemma `lemk`** (the one analytic input still admitted): the difference between +/-- **Paper Lemma `lemk`**: the difference between Klein's `k = Δ/q` and its truncation `ktilde = (1-q-q²)²⁴` is `O(|q|²)`: `|k - ktilde| ≤ 365.6·|q|²`. @@ -729,13 +732,14 @@ lemma lemk {τ : ℍ} (hτ : τ ∈ Region) : ‖kfun τ - ktilde τ‖ ≤ 365. ring rw [hid, norm_div] have hden : ‖(1728 : ℂ) * q τ‖ = 1728 * ‖q τ‖ := by rw [norm_mul, Complex.norm_ofNat] - rw [hden, div_le_iff₀ (by positivity)] + rw [hden, div_le_iff₀ (mul_pos (by norm_num) hQpos)] -- (d) bound the numerator by the three pieces of the paper's proof have hp1 : ‖E₄ τ ^ 3 - E₄trunc τ ^ 3‖ ≤ 24202 * ‖q τ‖ ^ 3 := norm_sub_cube_E₄trunc_le hτ have hp2 : ‖E₆ τ ^ 2 - E₆trunc τ ^ 2‖ ≤ 296780 * ‖q τ‖ ^ 3 := norm_sub_sq_E₆trunc_le hτ have hp3 : ‖(1728 : ℂ) * q τ ^ 3 * Gval‖ ≤ 1728 * ‖q τ‖ ^ 3 * 179.8 := by rw [norm_mul, norm_mul, Complex.norm_ofNat, norm_pow] - exact mul_le_mul_of_nonneg_left hGbound (by positivity) + exact mul_le_mul_of_nonneg_left hGbound + (mul_nonneg (by norm_num) (pow_nonneg hQpos.le 3)) have hnum : ‖(E₄ τ ^ 3 - E₄trunc τ ^ 3) - (E₆ τ ^ 2 - E₆trunc τ ^ 2) + 1728 * q τ ^ 3 * Gval‖ ≤ 24202 * ‖q τ‖ ^ 3 + 296780 * ‖q τ‖ ^ 3 + 1728 * ‖q τ‖ ^ 3 * 179.8 := @@ -744,7 +748,7 @@ lemma lemk {τ : ℍ} (hτ : τ ∈ Region) : ‖kfun τ - ktilde τ‖ ≤ 365. have hR : (365.6 : ℝ) * ‖q τ‖ ^ 2 * (1728 * ‖q τ‖) = 631756.8 * ‖q τ‖ ^ 3 := by ring rw [hR] refine le_trans hnum ?_ - linarith [pow_pos hQpos 3] + linarith only [pow_pos hQpos 3] /-- `0.9907 - 365.6|q|² ≤ |k|` (paper: `|k| ≥ |ktilde| - |δktilde|`). -/ lemma norm_kfun_ge {τ : ℍ} (hτ : τ ∈ Region) : @@ -956,31 +960,15 @@ theorem theonaehers2 {τ : ℍ} (hτ : τ ∈ Region) : field_simp ring rw [hid, norm_div] - rw [div_lt_iff₀ (by linarith [hE6norm] : (0 : ℝ) < ‖E₆ τ‖)] + rw [div_lt_iff₀ (lt_trans (by norm_num) hE6norm : (0 : ℝ) < ‖E₆ τ‖)] have hnum : ‖(E₄ τ - E₄trunc τ) * E₂starTrunc τ + E₄trunc τ * (E₂star τ - E₂starTrunc τ) + (E₄ τ - E₄trunc τ) * (E₂star τ - E₂starTrunc τ) - s₂tilde τ * (E₆ τ - E₆trunc τ)‖ ≤ ‖E₄ τ - E₄trunc τ‖ * ‖E₂starTrunc τ‖ + ‖E₄trunc τ‖ * ‖E₂star τ - E₂starTrunc τ‖ + ‖E₄ τ - E₄trunc τ‖ * ‖E₂star τ - E₂starTrunc τ‖ + ‖s₂tilde τ‖ * ‖E₆ τ - E₆trunc τ‖ := by - have key : ‖(E₄ τ - E₄trunc τ) * E₂starTrunc τ + E₄trunc τ * (E₂star τ - E₂starTrunc τ) - + (E₄ τ - E₄trunc τ) * (E₂star τ - E₂starTrunc τ) - - s₂tilde τ * (E₆ τ - E₆trunc τ)‖ - ≤ ‖(E₄ τ - E₄trunc τ) * E₂starTrunc τ‖ + ‖E₄trunc τ * (E₂star τ - E₂starTrunc τ)‖ - + ‖(E₄ τ - E₄trunc τ) * (E₂star τ - E₂starTrunc τ)‖ - + ‖s₂tilde τ * (E₆ τ - E₆trunc τ)‖ := by - calc ‖_ + _ + _ - s₂tilde τ * (E₆ τ - E₆trunc τ)‖ - ≤ ‖(E₄ τ - E₄trunc τ) * E₂starTrunc τ + E₄trunc τ * (E₂star τ - E₂starTrunc τ) - + (E₄ τ - E₄trunc τ) * (E₂star τ - E₂starTrunc τ)‖ - + ‖s₂tilde τ * (E₆ τ - E₆trunc τ)‖ := norm_sub_le _ _ - _ ≤ (‖(E₄ τ - E₄trunc τ) * E₂starTrunc τ + E₄trunc τ * (E₂star τ - E₂starTrunc τ)‖ - + ‖(E₄ τ - E₄trunc τ) * (E₂star τ - E₂starTrunc τ)‖) - + ‖s₂tilde τ * (E₆ τ - E₆trunc τ)‖ := by gcongr; exact norm_add_le _ _ - _ ≤ ((‖(E₄ τ - E₄trunc τ) * E₂starTrunc τ‖ + ‖E₄trunc τ * (E₂star τ - E₂starTrunc τ)‖) - + ‖(E₄ τ - E₄trunc τ) * (E₂star τ - E₂starTrunc τ)‖) - + ‖s₂tilde τ * (E₆ τ - E₆trunc τ)‖ := by gcongr; exact norm_add_le _ _ - rw [norm_mul, norm_mul, norm_mul, norm_mul] at key - linarith [key] + simp only [← norm_mul] + exact (norm_sub_le _ _).trans (add_le_add norm_add₃_le le_rfl) have hbound : ‖E₄ τ - E₄trunc τ‖ * ‖E₂starTrunc τ‖ + ‖E₄trunc τ‖ * ‖E₂star τ - E₂starTrunc τ‖ + ‖E₄ τ - E₄trunc τ‖ * ‖E₂star τ - E₂starTrunc τ‖ + ‖s₂tilde τ‖ * ‖E₆ τ - E₆trunc τ‖ @@ -997,14 +985,14 @@ theorem theonaehers2 {τ : ℍ} (hτ : τ ∈ Region) : have hQ6 : (6744 * Q ^ 3) * (96.2 * Q ^ 3) ≤ 1 * Q ^ 3 := by have h33 : Q ^ 3 * Q ^ 3 ≤ 0.000389 ^ 3 * Q ^ 3 := mul_le_mul_of_nonneg_right hQ3.le (pow_pos hQpos 3).le - linarith [pow_pos hQpos 3] - linarith [h1, h2, h3, h4, hQ6, pow_pos hQpos 3] + linarith only [h33, pow_pos hQpos 3] + linarith only [h1, h2, h3, h4, hQ6, pow_pos hQpos 3] calc ‖(E₄ τ - E₄trunc τ) * E₂starTrunc τ + E₄trunc τ * (E₂star τ - E₂starTrunc τ) + (E₄ τ - E₄trunc τ) * (E₂star τ - E₂starTrunc τ) - s₂tilde τ * (E₆ τ - E₆trunc τ)‖ ≤ 177600 * Q ^ 3 := le_trans hnum hbound _ < 222000 * Q ^ 3 * ‖E₆ τ‖ := by - linarith [mul_lt_mul_of_pos_left hE6norm (pow_pos hQpos 3)] + linarith only [mul_lt_mul_of_pos_left hE6norm (pow_pos hQpos 3)] end Chudnovsky diff --git a/LeanPool/Chudnovsky/Fourier.lean b/LeanPool/Chudnovsky/Fourier.lean index c11d96ca6a..27a1ac1adb 100644 --- a/LeanPool/Chudnovsky/Fourier.lean +++ b/LeanPool/Chudnovsky/Fourier.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.Lattices +public import LeanPool.Chudnovsky.Lattices +import LeanPool.Chudnovsky.Liouville /-! # Fourier expansions: the lattice ↔ modular-forms bridge @@ -25,6 +27,8 @@ final product formula `fouriersigma` stated here is unaffected. All statements in this file are fully proved. -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -650,51 +654,19 @@ private lemma phi_order (τ : ℍ) (z : ℂ) : /-- `H := φ/g` is periodic under the lattice `L_τ`. -/ private lemma hfun_add_lattice (τ : ℍ) (l : ℂ) (hl : l ∈ (Lτ τ).lattice) (z : ℂ) : φfun τ (z + l) / gfun τ (z + l) = φfun τ z / gfun τ z := by - have hstep1 : ∀ w, φfun τ (w + 1) / gfun τ (w + 1) = φfun τ w / gfun τ w := - fun w => by rw [φfun_add_one, gfun_add_one] - have hstep1' : ∀ w, φfun τ (w - 1) / gfun τ (w - 1) = φfun τ w / gfun τ w := fun w => by - have := hstep1 (w - 1); rw [sub_add_cancel] at this; exact this.symm - have hstepτ : ∀ w, - φfun τ (w + (τ : ℂ)) / gfun τ (w + (τ : ℂ)) = φfun τ w / gfun τ w := fun w => by + have hstep1 : Function.Periodic (fun w => φfun τ w / gfun τ w) (1 : ℂ) := by + intro w + dsimp only + rw [φfun_add_one, gfun_add_one] + have hstepτ : Function.Periodic (fun w => φfun τ w / gfun τ w) (τ : ℂ) := by + intro w + dsimp only rw [φfun_add_tau, gfun_add_tau, mul_div_mul_left _ _ (neg_ne_zero.mpr (Complex.exp_ne_zero _))] - have hstepτ' : ∀ w, φfun τ (w - (τ : ℂ)) / gfun τ (w - (τ : ℂ)) = φfun τ w / gfun τ w := - fun w => by have := hstepτ (w - (τ : ℂ)); rw [sub_add_cancel] at this; exact this.symm - have h1 : ∀ (a : ℤ) (w : ℂ), - φfun τ (w + (a : ℂ)) / gfun τ (w + (a : ℂ)) = φfun τ w / gfun τ w := by - intro a - induction a using Int.induction_on with - | zero => intro w; simp - | succ k ih => - intro w - rw [show w + (((k : ℤ) + 1 : ℤ) : ℂ) = (w + ((k : ℤ) : ℂ)) + 1 by push_cast; ring, - hstep1] - simpa using ih w - | pred k ih => - intro w - rw [show w + ((-(k : ℤ) - 1 : ℤ) : ℂ) = (w + (-(k : ℤ) : ℂ)) - 1 by push_cast; ring, - hstep1'] - simpa using ih w - have hτ : ∀ (a : ℤ) (w : ℂ), - φfun τ (w + (a : ℂ) * (τ : ℂ)) / gfun τ (w + (a : ℂ) * (τ : ℂ)) = φfun τ w / gfun τ w := by - intro a - induction a using Int.induction_on with - | zero => intro w; simp - | succ k ih => - intro w - rw [show w + (((k : ℤ) + 1 : ℤ) : ℂ) * (τ : ℂ) = (w + ((k : ℤ) : ℂ) * (τ : ℂ)) + (τ : ℂ) by - push_cast; ring, hstepτ] - simpa using ih w - | pred k ih => - intro w - rw [show w + ((-(k : ℤ) - 1 : ℤ) : ℂ) * (τ : ℂ) - = (w + (-(k : ℤ) : ℂ) * (τ : ℂ)) - (τ : ℂ) by - push_cast; ring, hstepτ'] - simpa using ih w obtain ⟨m, n, hmn⟩ := PeriodPair.mem_lattice.mp hl simp only [Lτ_ω₁, Lτ_ω₂, mul_one] at hmn - rw [← hmn, show z + ((m : ℂ) + (n : ℂ) * (τ : ℂ)) = (z + (n : ℂ) * (τ : ℂ)) + (m : ℂ) by ring, - h1 m, hτ n] + rw [← hmn] + simpa only [mul_one] using ((hstep1.int_mul m).add_period (hstepτ.int_mul n)) z /-- The σ product formula (paper `fouriersigma`): with `q = e^{2πiτ}` and `q_z = e^{2πiz}`, diff --git a/LeanPool/Chudnovsky/Kummer.lean b/LeanPool/Chudnovsky/Kummer.lean index 14e3f17df9..7330a5b174 100644 --- a/LeanPool/Chudnovsky/Kummer.lean +++ b/LeanPool/Chudnovsky/Kummer.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.PicardFuchs +public import LeanPool.Chudnovsky.PicardFuchs +public import LeanPool.Chudnovsky.Basic +public import LeanPool.Chudnovsky.Clausen import LeanPool.Chudnovsky.Estimates import LeanPool.Chudnovsky.Ramanujan import Mathlib.Analysis.InnerProductSpace.Calculus +import Mathlib.NumberTheory.ModularForms.LevelOne.DimensionFormula /-! # Kummer's solution of the Picard–Fuchs equation @@ -50,6 +54,8 @@ what chapter 9 consumes after the PLAN A7 reformulation. TODO: if the final asse only through `F` and `dF/dJ`), add it here with an explicit principal-branch bookkeeping. -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -170,7 +176,7 @@ theorem kummerB_satisfiesPicardFuchs : have hWz := (hasDerivAt_inv h1z).comp z ((hasDerivAt_id z).const_sub (1 : ℂ)) have hGz := (hHD1 z⁻¹ huw).comp z (hasDerivAt_inv hz0) have hGdz := (hHD2 z⁻¹ huw).comp z (hasDerivAt_inv hz0) - have hSz := ((hasDerivAt_inv (pow_ne_zero 2 hz0)).comp z (hasDerivAt_pow 2 z)).neg + have hSz := ((hasDerivAt_pow 2 z).inv (pow_ne_zero 2 hz0)).neg -- Assemble `HasDerivAt D1 _ z` term by term. have hPI := hPz.mul hIz have ht1 := ((hPI.const_mul (-(1 / 4) : ℂ)).mul hQz).mul hGz @@ -187,7 +193,7 @@ theorem kummerB_satisfiesPicardFuchs : rw [Complex.cpow_sub _ _ h1z, Complex.cpow_one, div_eq_mul_inv] -- Rewrite the Picard–Fuchs expression and finish by the ODE substitution. rw [heqEv.deriv_eq, hderivKummer z ⟨hznorm, hzim⟩, hHD_D1.deriv] - simp only [hD1def, kummerB, id_eq, Pi.mul_apply, Pi.neg_apply, Function.comp_apply] + simp only [hD1def, kummerB, id_eq, Pi.mul_apply, Pi.neg_apply, Pi.inv_apply, Function.comp_apply] rw [eZ1z, eW1z, hF2] field_simp ring @@ -724,7 +730,7 @@ private lemma WrC_eq_zero {A : ℝ} (hA : 2 ≤ A) have h := (hψd t ht).norm_sq rwa [show -(2 * ↑π) * (m22 (ofComplex (z₀ + ↑t * Complex.I)) * WrC (z₀ + ↑t * Complex.I)) = (-(2 * ↑π) * m22 (ofComplex (z₀ + ↑t * Complex.I))) * WrC (z₀ + ↑t * Complex.I) - from by ring, real_inner_mul_self] at h + from (mul_assoc _ _ _).symm, real_inner_mul_self] at h -- the weighted modulus `g(t) = r(t)·e^{-2πt}` and its monotonicity have hgd : ∀ t : ℝ, 0 ≤ t → HasDerivAt (fun s : ℝ => ‖WrC (z₀ + ↑s * Complex.I)‖ ^ 2 * Real.exp (-(2 * π) * s)) @@ -760,8 +766,8 @@ private lemma WrC_eq_zero {A : ℝ} (hA : 2 ≤ A) Complex.re_ofReal_mul] rw [h3] have key : (0 : ℝ) ≤ -(4 * π * (m22 (ofComplex (z₀ + ↑s * Complex.I))).re) - 2 * π := by - nlinarith [Real.pi_pos] - nlinarith [mul_nonneg (mul_nonneg h1 h2.le) key] + nlinarith only [hre, Real.pi_pos] + linear_combination mul_nonneg (mul_nonneg h1 h2.le) key -- `ψ → 0` along the ray, so `r → 0` have hψ0 : Tendsto (fun t : ℝ => WrC (z₀ + ↑t * Complex.I)) atTop (𝓝 0) := by have h := tendsto_WrC.comp (tendsto_vertical hz₀im) @@ -780,14 +786,13 @@ private lemma WrC_eq_zero {A : ℝ} (hA : 2 ≤ A) filter_upwards [eventually_ge_atTop (0 : ℝ)] with t ht have hmt := hmono Set.self_mem_Ici (Set.mem_Ici.mpr ht) ht have hexp1 : Real.exp (-(2 * π) * t) ≤ 1 := by - rw [← Real.exp_zero] - apply Real.exp_le_exp.mpr - nlinarith [Real.pi_pos] - nlinarith [sq_nonneg ‖WrC (z₀ + ↑t * Complex.I)‖, Real.exp_pos (-(2 * π) * t), hmt] + apply Real.exp_le_one_iff.mpr + exact mul_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr (by positivity)) ht + exact hmt.trans (mul_le_of_le_one_right (sq_nonneg _) hexp1) exact ge_of_tendsto hr0 hle have hz : WrC (z₀ + ↑(0 : ℝ) * Complex.I) = WrC z₀ := by norm_num rw [hz, mul_zero, Real.exp_zero, mul_one] at hg0 - have hnorm : ‖WrC z₀‖ = 0 := by nlinarith [sq_nonneg ‖WrC z₀‖, norm_nonneg (WrC z₀)] + have hnorm : ‖WrC z₀‖ = 0 := sq_eq_zero_iff.mp (le_antisymm hg0 (sq_nonneg _)) exact norm_eq_zero.mp hnorm /-- On `{Im z > A}` the two solutions agree: the ratio `Xtilde/X` has vanishing derivative diff --git a/LeanPool/Chudnovsky/Lattices.lean b/LeanPool/Chudnovsky/Lattices.lean index 0b596e9b8f..5187501a76 100644 --- a/LeanPool/Chudnovsky/Lattices.lean +++ b/LeanPool/Chudnovsky/Lattices.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.Quasiperiods +public import LeanPool.Chudnovsky.Quasiperiods /-! # Equivalent lattices and scaling laws @@ -23,6 +24,8 @@ Statements from chapter 3 of Milla (arXiv:1809.00533v6, file `080_Lattices.tex`) All nontrivial proofs are `sorry`-ed for now; this file pins the statements. -/ +@[expose] public section + noncomputable section namespace PeriodPair diff --git a/LeanPool/Chudnovsky/Liouville.lean b/LeanPool/Chudnovsky/Liouville.lean index 818b0c7028..ff877306f8 100644 --- a/LeanPool/Chudnovsky/Liouville.lean +++ b/LeanPool/Chudnovsky/Liouville.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.SigmaZeta +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.SpecialFunctions.Elliptic.Weierstrass +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.Analysis.Meromorphic.NormalForm +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # Elliptic functions and the Liouville theorems @@ -27,6 +35,8 @@ proved via a self-contained parallelogram residue theorem built from Mathlib's r Cauchy--Goursat primitives. -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -754,29 +764,25 @@ private lemma boundaryIntegral_sub_inv_ne_zero {L : PeriodPair} {v c : ℂ} {a b have h0' : ((t - a : ℝ) : ℂ) * L.ω₁ + ((0 - b : ℝ) : ℂ) * L.ω₂ = 0 := by push_cast linear_combination h0 + hc - exact hb.1.ne ((neg_eq_zero.mp (by simpa using (coord_eq_zero_of_eq_zero h0').2)).symm) + exact hb.1.ne (sub_eq_zero.mp (coord_eq_zero_of_eq_zero h0').2) have hne2 : ∀ t ∈ Set.Icc (0 : ℝ) 1, v + L.ω₁ + (t : ℂ) * L.ω₂ - c ≠ 0 := by intro t _ h0 have h0' : ((1 - a : ℝ) : ℂ) * L.ω₁ + ((t - b : ℝ) : ℂ) * L.ω₂ = 0 := by push_cast linear_combination h0 + hc - exact ha.2.ne' (by - have := (coord_eq_zero_of_eq_zero h0').1 - linarith [this]) + exact ha.2.ne' (sub_eq_zero.mp (coord_eq_zero_of_eq_zero h0').1) have hne3 : ∀ t ∈ Set.Icc (0 : ℝ) 1, v + L.ω₂ + (t : ℂ) * L.ω₁ - c ≠ 0 := by intro t _ h0 have h0' : ((t - a : ℝ) : ℂ) * L.ω₁ + ((1 - b : ℝ) : ℂ) * L.ω₂ = 0 := by push_cast linear_combination h0 + hc - exact hb.2.ne' (by - have := (coord_eq_zero_of_eq_zero h0').2 - linarith [this]) + exact hb.2.ne' (sub_eq_zero.mp (coord_eq_zero_of_eq_zero h0').2) have hne4 : ∀ t ∈ Set.Icc (0 : ℝ) 1, v + (t : ℂ) * L.ω₂ - c ≠ 0 := by intro t _ h0 have h0' : ((0 - a : ℝ) : ℂ) * L.ω₁ + ((t - b : ℝ) : ℂ) * L.ω₂ = 0 := by push_cast linear_combination h0 + hc - exact ha.1.ne ((neg_eq_zero.mp (by simpa using (coord_eq_zero_of_eq_zero h0').1)).symm) + exact ha.1.ne (sub_eq_zero.mp (coord_eq_zero_of_eq_zero h0').1) -- the four positive edge integrals have hpos : ∀ (p ω : ℂ), (∀ t ∈ Set.Icc (0 : ℝ) 1, p + (t : ℂ) * ω - c ≠ 0) → 0 < ∫ t in (0 : ℝ)..1, (Complex.normSq (p + (t : ℂ) * ω - c))⁻¹ := by @@ -788,8 +794,7 @@ private lemma boundaryIntegral_sub_inv_ne_zero {L : PeriodPair} {v c : ℂ} {a b intro t ht exact Complex.normSq_pos.mpr (hne t ht) |>.ne' · intro t ht - have := Complex.normSq_pos.mpr (hne t (Set.mem_Icc_of_Ioo ht)) - positivity + exact inv_pos.mpr (Complex.normSq_pos.mpr (hne t (Set.mem_Icc_of_Ioo ht))) · exact zero_lt_one -- the four cross-product constants have hD1 : (L.ω₁ * (starRingEnd ℂ) (v - c)).im = b * σ := by @@ -827,18 +832,12 @@ private lemma boundaryIntegral_sub_inv_ne_zero {L : PeriodPair} {v c : ℂ} {a b have hI₂ : 0 < I₂ := hpos _ _ hne2 have hI₃ : 0 < I₃ := hpos _ _ hne3 have hI₄ : 0 < I₄ := hpos _ _ hne4 - have hS : b * I₁ + (1 - a) * I₂ + (1 - b) * I₃ + a * I₄ > 0 := by - have := hb.1 - have := ha.2 - have := hb.2 - have := ha.1 - nlinarith [mul_pos hb.1 hI₁, mul_pos (sub_pos.mpr ha.2) hI₂, - mul_pos (sub_pos.mpr hb.2) hI₃, mul_pos ha.1 hI₄] + have hS : b * I₁ + (1 - a) * I₂ + (1 - b) * I₃ + a * I₄ > 0 := + add_pos (add_pos (add_pos (mul_pos hb.1 hI₁) (mul_pos (sub_pos.mpr ha.2) hI₂)) + (mul_pos (sub_pos.mpr hb.2) hI₃)) (mul_pos ha.1 hI₄) have him' : σ * (b * I₁ + (1 - a) * I₂ + (1 - b) * I₃ + a * I₄) = 0 := by - linarith [him] - rcases mul_eq_zero.mp him' with h | h - · exact hσne h - · linarith + linear_combination him + exact mul_ne_zero hσne (ne_of_gt hS) him' /-- `starRingEnd ℂ` commutes with interval integrals. -/ private lemma intervalIntegral_conj {f : ℝ → ℂ} : diff --git a/LeanPool/Chudnovsky/MainTheorem.lean b/LeanPool/Chudnovsky/MainTheorem.lean index 97cce0b707..daaa2a57ef 100644 --- a/LeanPool/Chudnovsky/MainTheorem.lean +++ b/LeanPool/Chudnovsky/MainTheorem.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module +public import LeanPool.Chudnovsky.Basic +import LeanPool.Chudnovsky.Estimates import LeanPool.Chudnovsky.Kummer +import LeanPool.Chudnovsky.Ramanujan /-! # The Main Theorem (Milla, ch. 9) @@ -31,6 +35,8 @@ estimates), and the principal square root of `w²` is `w` on the right half-plan originally planned for this step (PLAN A8) is kept for reference/reuse. -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -49,45 +55,56 @@ def mainSummand (τ : ℍ) (n : ℕ) : ℂ := ((1 - s₂ τ) / 6 + n) * (((6 * n)! : ℂ) / (((3 * n)! : ℂ) * ((n ! : ℕ) : ℂ) ^ 3)) / (1728 * J τ) ^ n -/-- The sharp factorial bound `(6n)!/((3n)!(n!)³) ≤ 1728ⁿ`, proved by induction from -the single-step estimate `(6n+1)(6n+3)(6n+5) ≤ (6n+6)³`. -/ -private theorem factorial_ratio_le (n : ℕ) : +/-- The coefficients `(6n)!/((3n)!(n!)³1728ⁿ)` are weakly decreasing, in product form. -/ +private theorem factorial_ratio_succ (n : ℕ) : + (6 * (n + 1))! * ((3 * n)! * (n !) ^ 3 * 1728 ^ n) + ≤ (6 * n)! * ((3 * (n + 1))! * ((n + 1)!) ^ 3 * 1728 ^ (n + 1)) := by + have e6 : (6 * (n + 1))! = + ((6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) * (6 * n + 1)) + * (6 * n)! := by + rw [Nat.mul_succ] + simp only [Nat.factorial_succ] + ring + have e3 : (3 * (n + 1))! = ((3 * n + 3) * (3 * n + 2) * (3 * n + 1)) * (3 * n)! := by + rw [Nat.mul_succ] + simp only [Nat.factorial_succ] + ring + have e1 : ((n + 1)!) ^ 3 = (n + 1) ^ 3 * (n !) ^ 3 := by + rw [Nat.factorial_succ, mul_pow] + have hPQ : (6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) * (6 * n + 1) + ≤ 1728 * (((3 * n + 3) * (3 * n + 2) * (3 * n + 1)) * (n + 1) ^ 3) := by + have key : (6 * n + 1) * (6 * n + 3) * (6 * n + 5) ≤ (6 * n + 6) ^ 3 := by + rw [pow_succ, pow_two] + gcongr <;> omega + calc (6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) * (6 * n + 1) + = 24 * (n + 1) * (3 * n + 2) * (3 * n + 1) + * ((6 * n + 1) * (6 * n + 3) * (6 * n + 5)) := by ring + _ ≤ 24 * (n + 1) * (3 * n + 2) * (3 * n + 1) * (6 * n + 6) ^ 3 := + Nat.mul_le_mul le_rfl key + _ = 1728 * (((3 * n + 3) * (3 * n + 2) * (3 * n + 1)) * (n + 1) ^ 3) := by ring + calc (6 * (n + 1))! * ((3 * n)! * (n !) ^ 3 * 1728 ^ n) + = ((6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) * (6 * n + 1)) + * ((6 * n)! * ((3 * n)! * (n !) ^ 3 * 1728 ^ n)) := by rw [e6]; ring + _ ≤ (1728 * (((3 * n + 3) * (3 * n + 2) * (3 * n + 1)) * (n + 1) ^ 3)) + * ((6 * n)! * ((3 * n)! * (n !) ^ 3 * 1728 ^ n)) := Nat.mul_le_mul hPQ le_rfl + _ = (6 * n)! * ((3 * (n + 1))! * ((n + 1)!) ^ 3 * 1728 ^ (n + 1)) := by + rw [e3, e1, pow_succ]; ring + +/-- The factorial quotient `(6n)!/((3n)!(n!)³)` is bounded by `1728ⁿ`. -/ +theorem factorial_ratio_le (n : ℕ) : (6 * n)! ≤ 1728 ^ n * ((3 * n)! * (n !) ^ 3) := by induction n with | zero => simp | succ n ih => - have e6 : (6 * (n + 1))! = - ((6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) * (6 * n + 1)) - * (6 * n)! := by - have h : 6 * (n + 1) = 6 * n + 6 := by ring - rw [h]; simp only [Nat.factorial_succ]; ring - have e3 : (3 * (n + 1))! = ((3 * n + 3) * (3 * n + 2) * (3 * n + 1)) * (3 * n)! := by - have h : 3 * (n + 1) = 3 * n + 3 := by ring - rw [h]; simp only [Nat.factorial_succ]; ring - have e1 : ((n + 1)!) ^ 3 = (n + 1) ^ 3 * (n !) ^ 3 := by - rw [Nat.factorial_succ]; ring - have hPQ : (6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) * (6 * n + 1) - ≤ 1728 * (((3 * n + 3) * (3 * n + 2) * (3 * n + 1)) * (n + 1) ^ 3) := by - have key : (6 * n + 1) * (6 * n + 3) * (6 * n + 5) ≤ (6 * n + 6) ^ 3 := by - nlinarith [Nat.zero_le n] - calc (6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) * (6 * n + 1) - = 24 * (n + 1) * (3 * n + 2) * (3 * n + 1) - * ((6 * n + 1) * (6 * n + 3) * (6 * n + 5)) := by ring - _ ≤ 24 * (n + 1) * (3 * n + 2) * (3 * n + 1) * (6 * n + 6) ^ 3 := - Nat.mul_le_mul le_rfl key - _ = 1728 * (((3 * n + 3) * (3 * n + 2) * (3 * n + 1)) * (n + 1) ^ 3) := by ring - calc (6 * (n + 1))! - = ((6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) * (6 * n + 1)) - * (6 * n)! := e6 - _ ≤ ((6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) * (6 * n + 1)) - * (1728 ^ n * ((3 * n)! * (n !) ^ 3)) := Nat.mul_le_mul le_rfl ih - _ = 1728 ^ n * (3 * n)! * (n !) ^ 3 - * ((6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) - * (6 * n + 1)) := by ring - _ ≤ 1728 ^ n * (3 * n)! * (n !) ^ 3 - * (1728 * (((3 * n + 3) * (3 * n + 2) * (3 * n + 1)) * (n + 1) ^ 3)) := - Nat.mul_le_mul le_rfl hPQ - _ = 1728 ^ (n + 1) * ((3 * (n + 1))! * ((n + 1)!) ^ 3) := by rw [e3, e1, pow_succ]; ring + apply (mul_le_mul_iff_of_pos_right + (by positivity : 0 < (3 * n)! * (n !) ^ 3 * 1728 ^ n)).mp + calc (6 * (n + 1))! * ((3 * n)! * (n !) ^ 3 * 1728 ^ n) + ≤ (6 * n)! * ((3 * (n + 1))! * ((n + 1)!) ^ 3 * 1728 ^ (n + 1)) := + factorial_ratio_succ n + _ ≤ (1728 ^ n * ((3 * n)! * (n !) ^ 3)) + * ((3 * (n + 1))! * ((n + 1)!) ^ 3 * 1728 ^ (n + 1)) := Nat.mul_le_mul_right _ ih + _ = (1728 ^ (n + 1) * ((3 * (n + 1))! * ((n + 1)!) ^ 3)) + * ((3 * n)! * (n !) ^ 3 * 1728 ^ n) := by ring /-- The Main Theorem's series converges absolutely on the region `Im τ > 1.25` (ratio test: `(6n)!/((3n)!(n!)³) ≤ 1728ⁿ` and `‖1728·J‖ > 1728` on the region). -/ @@ -309,39 +326,6 @@ explicit estimates `‖G²−1‖ ≤ 0.15` (from the `Gsq` power series, `‖1/ and `‖E₆−1‖ ≤ 0.199` (from `Estimates.lean`). This replaces the paper's continuity/connectedness branch argument by a pointwise right-half-plane one. -/ -/-- One step of the ratio bound behind `factorial_ratio_le`, in product form: the -coefficients `(6n)!/((3n)!(n!)³1728ⁿ)` are (weakly) decreasing. -/ -private theorem factorial_ratio_succ (n : ℕ) : - (6 * (n + 1))! * ((3 * n)! * (n !) ^ 3 * 1728 ^ n) - ≤ (6 * n)! * ((3 * (n + 1))! * ((n + 1)!) ^ 3 * 1728 ^ (n + 1)) := by - have e6 : (6 * (n + 1))! = - ((6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) * (6 * n + 1)) - * (6 * n)! := by - have h : 6 * (n + 1) = 6 * n + 6 := by ring - rw [h]; simp only [Nat.factorial_succ]; ring - have e3 : (3 * (n + 1))! = ((3 * n + 3) * (3 * n + 2) * (3 * n + 1)) * (3 * n)! := by - have h : 3 * (n + 1) = 3 * n + 3 := by ring - rw [h]; simp only [Nat.factorial_succ]; ring - have e1 : ((n + 1)!) ^ 3 = (n + 1) ^ 3 * (n !) ^ 3 := by - rw [Nat.factorial_succ]; ring - have hPQ : (6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) * (6 * n + 1) - ≤ 1728 * (((3 * n + 3) * (3 * n + 2) * (3 * n + 1)) * (n + 1) ^ 3) := by - have key : (6 * n + 1) * (6 * n + 3) * (6 * n + 5) ≤ (6 * n + 6) ^ 3 := by - nlinarith [Nat.zero_le n] - calc (6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) * (6 * n + 1) - = 24 * (n + 1) * (3 * n + 2) * (3 * n + 1) - * ((6 * n + 1) * (6 * n + 3) * (6 * n + 5)) := by ring - _ ≤ 24 * (n + 1) * (3 * n + 2) * (3 * n + 1) * (6 * n + 6) ^ 3 := - Nat.mul_le_mul le_rfl key - _ = 1728 * (((3 * n + 3) * (3 * n + 2) * (3 * n + 1)) * (n + 1) ^ 3) := by ring - calc (6 * (n + 1))! * ((3 * n)! * (n !) ^ 3 * 1728 ^ n) - = ((6 * n + 6) * (6 * n + 5) * (6 * n + 4) * (6 * n + 3) * (6 * n + 2) * (6 * n + 1)) - * ((6 * n)! * ((3 * n)! * (n !) ^ 3 * 1728 ^ n)) := by rw [e6]; ring - _ ≤ (1728 * (((3 * n + 3) * (3 * n + 2) * (3 * n + 1)) * (n + 1) ^ 3)) - * ((6 * n)! * ((3 * n)! * (n !) ^ 3 * 1728 ^ n)) := Nat.mul_le_mul hPQ le_rfl - _ = (6 * n)! * ((3 * (n + 1))! * ((n + 1)!) ^ 3 * 1728 ^ (n + 1)) := by - rw [e3, e1, pow_succ]; ring - private lemma norm_mainCoeff_eq (n : ℕ) : ‖mainCoeff n‖ = ((6 * n)! : ℝ) / (((3 * n)! : ℝ) * ((n ! : ℕ) : ℝ) ^ 3 * 1728 ^ n) := by rw [mainCoeff, norm_div, norm_mul, norm_mul, norm_pow, norm_pow, Complex.norm_natCast, diff --git a/LeanPool/Chudnovsky/Numerics.lean b/LeanPool/Chudnovsky/Numerics.lean index e6017c71bb..3a585ea5b9 100644 --- a/LeanPool/Chudnovsky/Numerics.lean +++ b/LeanPool/Chudnovsky/Numerics.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.Basic +public import LeanPool.Chudnovsky.Basic import Mathlib.Analysis.Real.Pi.Bounds /-! @@ -31,6 +32,8 @@ Every digit string below has been verified by exact rational arithmetic * `e^{-π√163} = 3.80898093700765233822623151647 80054376196293193806…e-18` -/ +@[expose] public section + noncomputable section namespace Chudnovsky diff --git a/LeanPool/Chudnovsky/PicardFuchs.lean b/LeanPool/Chudnovsky/PicardFuchs.lean index af9378f3eb..e64a73e59e 100644 --- a/LeanPool/Chudnovsky/PicardFuchs.lean +++ b/LeanPool/Chudnovsky/PicardFuchs.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.Clausen +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Calculus.Deriv.Basic +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # The Picard–Fuchs differential equation @@ -29,6 +37,8 @@ which bypasses the Picard–Fuchs equation entirely and proves the chapter-8 out theorem for the periods is not needed on the main chain and is omitted here. -/ +@[expose] public section + noncomputable section namespace Chudnovsky diff --git a/LeanPool/Chudnovsky/Quasiperiods.lean b/LeanPool/Chudnovsky/Quasiperiods.lean index 0a9356d489..9dbe09783e 100644 --- a/LeanPool/Chudnovsky/Quasiperiods.lean +++ b/LeanPool/Chudnovsky/Quasiperiods.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.WeierstrassMore -import Mathlib.NumberTheory.ModularForms.EisensteinSeries.E2.Transform +public import LeanPool.Chudnovsky.Basic +public import LeanPool.Chudnovsky.SigmaZeta /-! # Quasiperiods and the Legendre relation @@ -26,6 +27,8 @@ Statements from chapter 2 of Milla (arXiv:1809.00533v6, file `070_Quasiperiods.t All statements in this file are fully proved. -/ +@[expose] public section + noncomputable section open scoped UpperHalfPlane @@ -258,9 +261,9 @@ private lemma bridgeEqv_coe (τ : ℍ) (p : ℤ × ℤ) : private lemma bridgeEqv_zero (τ : ℍ) : bridgeEqv τ (0 : ℤ × ℤ) = 0 := by apply Subtype.ext - have he0 : ((bridgeEqv τ (0 : ℤ × ℤ) : (Lτ τ).lattice) : ℂ) = 0 := by - simpa using bridgeEqv_coe τ (0 : ℤ × ℤ) - rw [he0]; simp + change ((bridgeEqv τ (0 : ℤ × ℤ) : (Lτ τ).lattice) : ℂ) = 0 + rw [bridgeEqv_coe] + norm_num private lemma bridgeEqv_ne (τ : ℍ) (p : ℤ × ℤ) : p ≠ 0 ↔ bridgeEqv τ p ≠ 0 := by rw [← bridgeEqv_zero τ] @@ -334,8 +337,7 @@ private lemma bridgeF_eta₁_eq_tsum (τ : ℍ) {z : ℂ} (bridgeF_summable τ hz hz1).congr (fun p => by simp only [hFdef, bridgeF, bridgeEqv_coe]) have hF0 : F 0 = 1 / (z + 1) - 1 / z := by simp only [hFdef] - rw [show ((bridgeEqv τ (0 : ℤ × ℤ) : (Lτ τ).lattice) : ℂ) = 0 from by - simpa using bridgeEqv_coe τ (0 : ℤ × ℤ)] + rw [bridgeEqv_zero, ZeroMemClass.coe_zero] simp [weierstrassZetaTerm] have hZeta : ∀ a : ℂ, (Lτ τ).weierstrassZeta a diff --git a/LeanPool/Chudnovsky/Ramanujan.lean b/LeanPool/Chudnovsky/Ramanujan.lean index f2aba2b73b..3811caaf4e 100644 --- a/LeanPool/Chudnovsky/Ramanujan.lean +++ b/LeanPool/Chudnovsky/Ramanujan.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.Basic -import Mathlib.NumberTheory.ModularForms.Derivative +public import LeanPool.Chudnovsky.Basic +public import Mathlib.NumberTheory.ModularForms.Derivative +import Mathlib.NumberTheory.ModularForms.LevelOne.DimensionFormula /-! # Ramanujan's derivative identities @@ -43,6 +45,8 @@ Byproducts stated for downstream use (Kummer/PicardFuchs and MainTheorem): * pointwise raw-derivative forms `deriv_comp_ofComplex_E2`/`_E₄`/`_E₆`. -/ +@[expose] public section + noncomputable section namespace Chudnovsky diff --git a/LeanPool/Chudnovsky/SigmaZeta.lean b/LeanPool/Chudnovsky/SigmaZeta.lean index 639ac67987..b8a8726cb5 100644 --- a/LeanPool/Chudnovsky/SigmaZeta.lean +++ b/LeanPool/Chudnovsky/SigmaZeta.lean @@ -3,8 +3,19 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ - -import LeanPool.Chudnovsky.Basic +module + +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.SpecialFunctions.Elliptic.Weierstrass +import Mathlib.Analysis.Calculus.LogDerivUniformlyOn +import Mathlib.Analysis.Complex.SummableUniformlyOn +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.Normed.Module.MultipliableUniformlyOn +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # The Weierstrass σ- and ζ-functions @@ -19,10 +30,10 @@ of a basic first year approach* (arXiv:1809.00533v6, file `060_ElliptFunct.tex`) * convergence statements (paper Rem. `bemsigma`), oddness of σ and ζ (paper `sigmaodd`), the location and simplicity of the zeros of σ (paper Rem. `bemsigma`), `ζ = σ'/σ` (paper Def. `defizeta`) and `ζ' = -℘` (paper Def. `defiwp`). - -All nontrivial proofs are `sorry`-ed for now; this file pins the statements. -/ +@[expose] public section + noncomputable section namespace PeriodPair @@ -104,18 +115,16 @@ private lemma norm_weierstrassZetaTerm_le (z w : ℂ) (hw : w ≠ 0) (h : 2 * have hwpos : 0 < ‖w‖ := norm_pos_iff.mpr hw have hznw : z ≠ w := by rintro rfl - have : ‖z‖ ≤ 0 := by linarith - exact hw (by rw [← norm_eq_zero]; linarith [norm_nonneg z]) + linarith only [h, hwpos] have hzw : z - w ≠ 0 := sub_ne_zero.mpr hznw have h1 : ‖w‖ / 2 ≤ ‖z - w‖ := by rw [norm_sub_rev] - have := norm_sub_norm_le w z - linarith + linarith only [h, norm_sub_norm_le w z] have hbound : ‖weierstrassZetaTerm z w‖ ≤ 2 * ‖z‖ ^ 2 / ‖w‖ ^ 3 := by rw [weierstrassZetaTerm_eq z w hw hznw, norm_div, norm_mul, norm_pow, norm_pow, div_le_div_iff₀ (by positivity) (by positivity)] - nlinarith [mul_le_mul_of_nonneg_left h1 (show (0:ℝ) ≤ 2 * ‖z‖ ^ 2 * ‖w‖ ^ 2 by positivity), - norm_nonneg z, hwpos, h1, sq_nonneg ‖z‖] + linear_combination mul_le_mul_of_nonneg_left h1 + (by positivity : (0 : ℝ) ≤ 2 * ‖z‖ ^ 2 * ‖w‖ ^ 2) refine hbound.trans_eq ?_ rw [show (-3 : ℝ) = -(3 : ℕ) by norm_num, Real.rpow_neg hwpos.le, Real.rpow_natCast] ring @@ -125,8 +134,10 @@ private lemma norm_weierstrassSigmaTerm_sub_one_le (z w : ℂ) (hw : w ≠ 0) (h ‖weierstrassSigmaTerm z w - 1‖ ≤ 4 / 3 * ‖z‖ ^ 3 * ‖w‖ ^ (-3 : ℝ) := by have hwpos : 0 < ‖w‖ := norm_pos_iff.mpr hw have hnorm : ‖z / w‖ ≤ 1 / 2 := by - rw [norm_div, div_le_iff₀ hwpos]; linarith - have hlt1 : ‖-(z / w)‖ < 1 := by rw [norm_neg]; linarith + rw [norm_div, div_le_iff₀ hwpos]; linarith only [h] + have hlt1 : ‖-(z / w)‖ < 1 := by + rw [norm_neg] + exact hnorm.trans_lt (by norm_num) have h1a : (1 : ℂ) - z / w ≠ 0 := by intro H rw [sub_eq_zero] at H @@ -143,8 +154,8 @@ private lemma norm_weierstrassSigmaTerm_sub_one_le (z w : ℂ) (hw : w ≠ 0) (h rw [hexp] have hubound : ‖Complex.log (1 + -(z / w)) - logTaylor 3 (-(z / w))‖ ≤ 2 / 3 * ‖z / w‖ ^ 3 := by have hinv : (1 - ‖z / w‖)⁻¹ ≤ 2 := by - rw [inv_le_comm₀ (by linarith) (by norm_num)] - rw [inv_eq_one_div]; linarith + rw [inv_le_comm₀ (by linarith only [hnorm]) (by norm_num)] + rw [inv_eq_one_div]; linarith only [hnorm] calc ‖Complex.log (1 + -(z / w)) - logTaylor 3 (-(z / w))‖ ≤ ‖-(z / w)‖ ^ (2 + 1) * (1 - ‖-(z / w)‖)⁻¹ / (2 + 1) := norm_log_sub_logTaylor_le 2 hlt1 @@ -153,7 +164,8 @@ private lemma norm_weierstrassSigmaTerm_sub_one_le (z w : ℂ) (hw : w ≠ 0) (h _ = 2 / 3 * ‖z / w‖ ^ 3 := by ring have hule1 : ‖Complex.log (1 + -(z / w)) - logTaylor 3 (-(z / w))‖ ≤ 1 := by refine hubound.trans ?_ - nlinarith [pow_le_pow_left₀ (norm_nonneg (z / w)) hnorm 3, norm_nonneg (z / w)] + calc 2 / 3 * ‖z / w‖ ^ 3 ≤ 2 / 3 * (1 / 2 : ℝ) ^ 3 := by gcongr + _ ≤ 1 := by norm_num calc ‖Complex.exp (Complex.log (1 + -(z / w)) - logTaylor 3 (-(z / w))) - 1‖ ≤ 2 * ‖Complex.log (1 + -(z / w)) - logTaylor 3 (-(z / w))‖ := norm_exp_sub_one_le hule1 _ ≤ 2 * (2 / 3 * ‖z / w‖ ^ 3) := by gcongr @@ -171,28 +183,27 @@ private lemma weierstrassSigmaTerm_ne_zero {z w : ℂ} (hw : w ≠ 0) (hzw : z rw [sub_ne_zero] exact fun H ↦ hzw ((div_eq_one_iff_eq hw).mp H.symm) +/-- The derivative of a σ-factor, before any nonvanishing assumptions. -/ +private lemma hasDerivAt_weierstrassSigmaTerm (z w : ℂ) : + HasDerivAt (fun z ↦ weierstrassSigmaTerm z w) + (-(1 / w) * Complex.exp (z / w + z ^ 2 / (2 * w ^ 2)) + + (1 - z / w) * (Complex.exp (z / w + z ^ 2 / (2 * w ^ 2)) + * (1 / w + z / w ^ 2))) z := by + have hquad : HasDerivAt (fun z : ℂ ↦ z ^ 2 / (2 * w ^ 2)) (z / w ^ 2) z := by + have h : HasDerivAt (fun z : ℂ ↦ z ^ 2 / (2 * w ^ 2)) ((2 * z) / (2 * w ^ 2)) z := by + simpa using (hasDerivAt_pow 2 z).div_const (2 * w ^ 2) + rwa [mul_div_mul_left _ _ two_ne_zero] at h + exact (((hasDerivAt_id z).div_const w).const_sub 1).mul + (((hasDerivAt_id z).div_const w).add hquad).cexp + /-- The logarithmic derivative of a σ-factor is the corresponding ζ-summand. -/ private lemma logDeriv_weierstrassSigmaTerm {z w : ℂ} (hw : w ≠ 0) (hzw : z ≠ w) : logDeriv (fun z ↦ weierstrassSigmaTerm z w) z = weierstrassZetaTerm z w := by have h1a : (1 : ℂ) - z / w ≠ 0 := by rw [sub_ne_zero]; exact fun H ↦ hzw ((div_eq_one_iff_eq hw).mp H.symm) have hzw' : z - w ≠ 0 := sub_ne_zero.mpr hzw - have hg : HasDerivAt (fun z : ℂ ↦ z / w + z ^ 2 / (2 * w ^ 2)) (1 / w + z / w ^ 2) z := by - have hA : HasDerivAt (fun z : ℂ ↦ z / w) (1 / w) z := (hasDerivAt_id z).div_const w - have hB : HasDerivAt (fun z : ℂ ↦ z ^ 2 / (2 * w ^ 2)) (z / w ^ 2) z := by - have h2 : HasDerivAt (fun z : ℂ ↦ z ^ 2 / (2 * w ^ 2)) ((2 * z) / (2 * w ^ 2)) z := by - simpa using (hasDerivAt_pow 2 z).div_const (2 * w ^ 2) - rwa [mul_div_mul_left _ _ (two_ne_zero)] at h2 - exact hA.add hB - have d1 : deriv (fun z : ℂ ↦ 1 - z / w) z = -(1 / w) := - (((hasDerivAt_id z).div_const w).const_sub 1).deriv - have hmul := logDeriv_fun_mul (f := fun z : ℂ ↦ 1 - z / w) - (g := fun z : ℂ ↦ Complex.exp (z / w + z ^ 2 / (2 * w ^ 2))) z h1a (Complex.exp_ne_zero _) - (by fun_prop) (by fun_prop) - rw [show (fun z ↦ weierstrassSigmaTerm z w) - = fun z : ℂ ↦ (1 - z / w) * Complex.exp (z / w + z ^ 2 / (2 * w ^ 2)) from rfl, hmul, - logDeriv_apply, logDeriv_apply, d1, hg.cexp.deriv, weierstrassZetaTerm] - have hwz : w - z ≠ 0 := sub_ne_zero.mpr (Ne.symm hzw) + rw [logDeriv_apply, (hasDerivAt_weierstrassSigmaTerm z w).deriv, + weierstrassSigmaTerm, weierstrassZetaTerm] field_simp ring @@ -404,7 +415,7 @@ theorem weierstrassSigma_eq_zero_iff (z : ℂ) : · intro hz rw [weierstrassSigma] by_cases hz0 : z = 0 - · simp [hz0] + · simp only [hz0, zero_mul] · apply mul_eq_zero_of_right have hlmem : (⟨z, hz⟩ : L.lattice) ≠ 0 := fun H ↦ hz0 (by simpa using congrArg Subtype.val H) refine (hasProd_zero_of_exists_eq_zero ⟨⟨⟨z, hz⟩, hlmem⟩, ?_⟩).tprod_eq @@ -511,23 +522,8 @@ private lemma deriv_weierstrassSigma_ne_zero_at (i₀ : {l : L.lattice // l ≠ -- derivative of the single factor at its own zero have hBderiv : HasDerivAt (fun z ↦ weierstrassSigmaTerm z w) (-(1 / w) * Complex.exp (w / w + w ^ 2 / (2 * w ^ 2))) w := by - unfold weierstrassSigmaTerm - have hg : HasDerivAt (fun z : ℂ ↦ z / w + z ^ 2 / (2 * w ^ 2)) (1 / w + w / w ^ 2) w := by - have hA : HasDerivAt (fun z : ℂ ↦ z / w) (1 / w) w := (hasDerivAt_id w).div_const w - have hB : HasDerivAt (fun z : ℂ ↦ z ^ 2 / (2 * w ^ 2)) (w / w ^ 2) w := by - have h2 : HasDerivAt (fun z : ℂ ↦ z ^ 2 / (2 * w ^ 2)) ((2 * w) / (2 * w ^ 2)) w := by - simpa using (hasDerivAt_pow 2 w).div_const (2 * w ^ 2) - rwa [mul_div_mul_left _ _ (two_ne_zero)] at h2 - exact hA.add hB - have hlin : HasDerivAt (fun z : ℂ ↦ 1 - z / w) (-(1 / w)) w := - ((hasDerivAt_id w).div_const w).const_sub 1 - have hmul := hlin.mul hg.cexp - have hV : (-(1 / w) * Complex.exp (w / w + w ^ 2 / (2 * w ^ 2))) - = -(1 / w) * Complex.exp (w / w + w ^ 2 / (2 * w ^ 2)) - + (1 - w / w) * (Complex.exp (w / w + w ^ 2 / (2 * w ^ 2)) * (1 / w + w / w ^ 2)) := by - rw [div_self hwne]; ring - rw [hV] - exact hmul + simpa only [div_self hwne, sub_self, zero_mul, add_zero] using + hasDerivAt_weierstrassSigmaTerm w w have hBw : weierstrassSigmaTerm w w = 0 := by rw [weierstrassSigmaTerm, div_self hwne]; simp have hdB_ne : (-(1 / w) * Complex.exp (w / w + w ^ 2 / (2 * w ^ 2))) ≠ 0 := @@ -573,7 +569,7 @@ theorem meromorphicOrderAt_weierstrassSigma (l : ℂ) (hl : l ∈ L.lattice) : have hd : HasDerivAt L.weierstrassSigma _ (0 : ℂ) := (hasDerivAt_id (0 : ℂ)).mul (hP 0).hasDerivAt rw [hd.deriv] - simp [hP0] + simpa only [hP0, id_eq, one_mul, zero_mul, add_zero] using (one_ne_zero : (1 : ℂ) ≠ 0) · -- `l ≠ 0`: reduce to the split-factor lemma at the lattice point `l`. have hmem : (⟨l, hl⟩ : L.lattice) ≠ 0 := fun H ↦ hl0 (by simpa using congrArg Subtype.val H) diff --git a/LeanPool/Chudnovsky/SingularModuli.lean b/LeanPool/Chudnovsky/SingularModuli.lean index b3679ae4e8..e9e0edf939 100644 --- a/LeanPool/Chudnovsky/SingularModuli.lean +++ b/LeanPool/Chudnovsky/SingularModuli.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.SingularModuli.MasserA1 +public import LeanPool.Chudnovsky.SingularModuli.MasserA1 +import LeanPool.Chudnovsky.SingularModuli.Kronecker +import LeanPool.Chudnovsky.SingularModuli.Rationality +import LeanPool.Chudnovsky.SingularModuli.Valence +import Mathlib.Tactic.NormNum.Prime /-! # Singular moduli at `τ₁₆₃`: the cited arithmetic inputs (Phase C) @@ -30,6 +35,8 @@ explicit hypotheses, giving the intermediate milestone `chudnovsky_of_singular_m (PLAN Phase C). -/ +@[expose] public section + /- Candidate proof routes, summarized from PLAN.md (Phase C): diff --git a/LeanPool/Chudnovsky/SingularModuli/CMRelations.lean b/LeanPool/Chudnovsky/SingularModuli/CMRelations.lean index 25adeebb78..705a7f4d57 100644 --- a/LeanPool/Chudnovsky/SingularModuli/CMRelations.lean +++ b/LeanPool/Chudnovsky/SingularModuli/CMRelations.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module +public import LeanPool.Chudnovsky.Basic +public import LeanPool.Chudnovsky.SingularModuli.QuadraticPoints import LeanPool.Chudnovsky.SingularModuli.FormReduction /-! @@ -27,6 +30,8 @@ Only elementary Möbius algebra is used; nothing here touches the modular polyno itself (that is `ModularPolynomialQ`, another track). -/ +@[expose] public section + noncomputable section namespace Chudnovsky diff --git a/LeanPool/Chudnovsky/SingularModuli/CosetOrbit.lean b/LeanPool/Chudnovsky/SingularModuli/CosetOrbit.lean index fbbf4bc7a3..32c324c0fc 100644 --- a/LeanPool/Chudnovsky/SingularModuli/CosetOrbit.lean +++ b/LeanPool/Chudnovsky/SingularModuli/CosetOrbit.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.SingularModuli.JFunction +public import LeanPool.Chudnovsky.SingularModuli.JFunction /-! # The `m`-isogeny coset orbit of `j` (Phase C, chunk B2) @@ -52,6 +53,8 @@ with `c n = jqInt.coeff n ∈ ℤ` the integer `j`-coefficients. The `b`-depende `(B3)`. -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -231,10 +234,8 @@ lemma f_S_smul [Fact m.Prime] (i : Option (ZMod m)) (τ : ℍ) : -- matrix identity AInf · S = S · Acol 0 refine j_matrix_transfer ModularGroup.S _ (Acol m ((0 : ZMod m).val)) τ ?_ apply Matrix.GeneralLinearGroup.ext - intro a c - fin_cases a <;> fin_cases c <;> - simp [val_AInf, val_Acol, Matrix.mul_apply, Fin.sum_univ_two, ModularGroup.coe_S, - ZMod.val_zero] + simp [Fin.forall_fin_two, val_AInf, val_Acol, Matrix.mul_apply, Fin.sum_univ_two, + ModularGroup.coe_S] | some b => by_cases hb : b = 0 · subst hb @@ -243,10 +244,8 @@ lemma f_S_smul [Fact m.Prime] (i : Option (ZMod m)) (τ : ℍ) : -- matrix identity Acol 0 · S = S · AInf refine j_matrix_transfer ModularGroup.S _ (AInf m) τ ?_ apply Matrix.GeneralLinearGroup.ext - intro a c - fin_cases a <;> fin_cases c <;> - simp [val_AInf, val_Acol, Matrix.mul_apply, Fin.sum_univ_two, ModularGroup.coe_S, - ZMod.val_zero] + simp [Fin.forall_fin_two, val_AInf, val_Acol, Matrix.mul_apply, Fin.sum_univ_two, + ModularGroup.coe_S] · have htarget : σS m (some b) = some (-b⁻¹) := by simp [σS, sSfun, hb] rw [f_some, j_smul_S_mul, htarget, f_some] -- integers B = b.val, B' = (-b⁻¹).val, and the quotient q with B·B' + 1 = m·q @@ -264,13 +263,12 @@ lemma f_S_smul [Fact m.Prime] (i : Option (ZMod m)) (τ : ℍ) : refine j_matrix_transfer γ' _ (Acol m B') τ ?_ have hqR : (B : ℝ) * (B' : ℝ) - (q : ℝ) * (m : ℝ) = -1 := by have h : (B : ℝ) * B' + 1 = m * q := by exact_mod_cast hq - linarith + linear_combination h -- matrix identity Acol B · S = γ' · Acol B' apply Matrix.GeneralLinearGroup.ext - intro a c - fin_cases a <;> fin_cases c <;> - simp [val_Acol, Matrix.mul_apply, Fin.sum_univ_two, ModularGroup.coe_S, hγ'coe] <;> - linarith [hqR] + simp [Fin.forall_fin_two, val_Acol, Matrix.mul_apply, Fin.sum_univ_two, + ModularGroup.coe_S, hγ'coe, mul_comm] + simpa only [sub_eq_add_neg] using hqR.symm /-! ## q-expansions in the base variable `w = exp(2πiτ/m)` diff --git a/LeanPool/Chudnovsky/SingularModuli/FormReduction.lean b/LeanPool/Chudnovsky/SingularModuli/FormReduction.lean index 390a0dcc53..46d996acde 100644 --- a/LeanPool/Chudnovsky/SingularModuli/FormReduction.lean +++ b/LeanPool/Chudnovsky/SingularModuli/FormReduction.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.SingularModuli.QuadraticPoints -import LeanPool.Chudnovsky.Basic +public import LeanPool.Chudnovsky.SingularModuli.QuadraticPoints +public import LeanPool.Chudnovsky.Basic /-! # Reduction of binary quadratic forms of discriminant `−163` (Phase C, Track 3) @@ -29,6 +30,8 @@ The bridge from these form-level facts to the statement *"every CM point of disc with `BQF.act`; that analytic bookkeeping is deferred (see the closing `TODO`). -/ +@[expose] public section + noncomputable section namespace Chudnovsky.QF @@ -177,19 +180,21 @@ box `|t| ≤ 15`, `1 ≤ λ ≤ 9` that contains every genuine solution def reprN (m d : ℕ) : Bool := decide (∃ t ∈ Finset.range 16, ∃ l ∈ Finset.Icc 1 9, 4 * m - t ^ 2 = d * l ^ 2 ∧ t ^ 2 ≤ 4 * m) -/-- `reprN` recomputed with plain `List.range` loops: the same search, but evaluated by the -kernel without going through `Finset`/`Multiset` decidability instances. -/ +/-- `reprN` recomputed with lists, checking the trace bound before searching the positive +multipliers. This evaluates in the kernel without `Finset`/`Multiset` decidability instances. -/ private def reprB (m d : ℕ) : Bool := - (List.range 16).any fun t => (List.range 10).any fun l => - decide (1 ≤ l) && (4 * m - t ^ 2 == d * l ^ 2) && decide (t ^ 2 ≤ 4 * m) + (List.range 16).any fun t => decide (t ^ 2 ≤ 4 * m) && + (List.range' 1 9).any fun l => (4 * m - t ^ 2 == d * l ^ 2) private lemma reprN_eq_reprB (m d : ℕ) : reprN m d = reprB m d := by rw [Bool.eq_iff_iff] simp only [reprN, reprB, decide_eq_true_eq, List.any_eq_true, List.mem_range, - Bool.and_eq_true, beq_iff_eq, Finset.mem_range, Finset.mem_Icc] + List.mem_range'_1, Bool.and_eq_true, beq_iff_eq, Finset.mem_range, Finset.mem_Icc] constructor - · rintro ⟨t, ht, l, ⟨hl1, hl9⟩, h1, h2⟩; exact ⟨t, ht, l, by omega, ⟨hl1, h1⟩, h2⟩ - · rintro ⟨t, ht, l, hl, ⟨hl1, h1⟩, h2⟩; exact ⟨t, ht, l, ⟨hl1, by omega⟩, h1, h2⟩ + · rintro ⟨t, ht, l, ⟨hl1, hl9⟩, h1, h2⟩ + exact ⟨t, ht, h2, l, ⟨hl1, by omega⟩, h1⟩ + · rintro ⟨t, ht, h2, l, ⟨hl1, hl9⟩, h1⟩ + exact ⟨t, ht, l, ⟨hl1, by omega⟩, h1, h2⟩ /-- **(C5), computational core.** The only `d ∈ [1, 244]` simultaneously representable at `m = 41, 43, 61` is `d = 163` (i.e. `D₀ = −163`). The `{41,43,47}` trap of §6.6 is exactly diff --git a/LeanPool/Chudnovsky/SingularModuli/JFunction.lean b/LeanPool/Chudnovsky/SingularModuli/JFunction.lean index c84e36665d..17f083616d 100644 --- a/LeanPool/Chudnovsky/SingularModuli/JFunction.lean +++ b/LeanPool/Chudnovsky/SingularModuli/JFunction.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import Mathlib.Geometry.Manifold.MFDeriv.NormedSpace +public import LeanPool.Chudnovsky.Basic import LeanPool.Chudnovsky.Ramanujan +import Mathlib.Geometry.Manifold.MFDeriv.NormedSpace /-! # The `j`-function: definition, invariance, analyticity, q-expansion (Phase C, chunk B1) @@ -47,6 +49,8 @@ harmlessly, in the *boundedness* of `j·q` at the cusp, via `tendsto_atImInfty_tprod_one_sub_eta_q_pow`.) -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -93,10 +97,9 @@ theorem J_smul (γ : SL(2, ℤ)) (τ : ℍ) : J (γ • τ) = J τ := by have hE₆ : E₆ (γ • τ) = denom γ τ ^ 6 * E₆ τ := by have h := modularForm_SL_smul E₆ γ τ rwa [zpow_ofNat] at h - have h1 : (denom γ τ ^ 4 * E₄ τ) ^ 3 = denom γ τ ^ 12 * E₄ τ ^ 3 := by ring - have h2 : (denom γ τ ^ 6 * E₆ τ) ^ 2 = denom γ τ ^ 12 * E₆ τ ^ 2 := by ring - rw [J, J, hE₄, hE₆, h1, h2, ← mul_sub, - mul_div_mul_left _ _ (pow_ne_zero 12 hd)] + rw [J, J, hE₄, hE₆, mul_pow, mul_pow, ← pow_mul, ← pow_mul] + norm_num only [Nat.reduceMul] + rw [← mul_sub, mul_div_mul_left _ _ (pow_ne_zero 12 hd)] /-- The `j`-invariant is `SL(2,ℤ)`-invariant: `j (γ • τ) = j τ`. -/ theorem j_smul (γ : SL(2, ℤ)) (τ : ℍ) : j (γ • τ) = j τ := by @@ -165,14 +168,14 @@ Mathlib's analytic `qExpansion`s. The only arithmetic input is the classical con section IntegerQExpansion /-- The formal power series `∑_{n ≥ 1} σ_k(n) Xⁿ` over `ℤ`. -/ -private def sigmaPS (k : ℕ) : PowerSeries ℤ := +def sigmaPS (k : ℕ) : PowerSeries ℤ := PowerSeries.mk fun n ↦ if n = 0 then 0 else (ArithmeticFunction.sigma k n : ℤ) /-- The integer q-expansion `1 + 240·∑ σ₃(n) qⁿ` of `E₄`. -/ -private def E4Z : PowerSeries ℤ := 1 + 240 * sigmaPS 3 +def E4Z : PowerSeries ℤ := 1 + 240 * sigmaPS 3 /-- The integer q-expansion `1 - 504·∑ σ₅(n) qⁿ` of `E₆`. -/ -private def E6Z : PowerSeries ℤ := 1 - 504 * sigmaPS 5 +def E6Z : PowerSeries ℤ := 1 - 504 * sigmaPS 5 /-- Extract a numeral factor out of a power-series coefficient. -/ private lemma coeff_ofNat_mul {a : ℕ} [a.AtLeastTwo] (φ : PowerSeries ℤ) (n : ℕ) : @@ -267,12 +270,12 @@ private lemma exists_delta_coeff (m : ℕ) : /-- The integer q-expansion of the discriminant `Δ = q·∏(1-qⁿ)²⁴ = ∑ τ(n) qⁿ` (Ramanujan-τ coefficients), obtained as `(E₄³ - E₆²)/1728` in `ℤ⟦q⟧`. -/ -def deltaInt : PowerSeries ℤ := PowerSeries.mk fun m ↦ (exists_delta_coeff m).choose +def deltaInt : PowerSeries ℤ := PowerSeries.mk fun m ↦ (private_decl% (exists_delta_coeff m)).choose private lemma deltaInt_spec (m : ℕ) : PowerSeries.coeff m (E4Z ^ 3 - E6Z ^ 2) = 1728 * PowerSeries.coeff m deltaInt := by rw [deltaInt, PowerSeries.coeff_mk] - exact (exists_delta_coeff m).choose_spec + exact (private_decl% (exists_delta_coeff m)).choose_spec /-! ### Analytic identification of `deltaInt` -/ @@ -489,12 +492,8 @@ theorem qExpansion_j_mul_q : rw [qExpansion_discriminant_int, deltaInt_eq_X_mul_deltaTail, map_mul, PowerSeries.map_X] at hkey -- cancel the factor `X` - have hX : (PowerSeries.X : PowerSeries ℂ) - * (qExpansion 1 (fun τ : ℍ ↦ j τ * q τ) - * PowerSeries.map (Int.castRingHom ℂ) deltaTail) - = PowerSeries.X * PowerSeries.map (Int.castRingHom ℂ) (E4Z ^ 3) := by - linear_combination hkey - have hcancel := mul_left_cancel₀ PowerSeries.X_ne_zero hX + rw [← mul_assoc, mul_right_comm] at hkey + have hcancel := mul_right_cancel₀ PowerSeries.X_ne_zero hkey -- multiply by the inverse of the unit `deltaTail` have hunit : PowerSeries.map (Int.castRingHom ℂ) deltaTail * PowerSeries.map (Int.castRingHom ℂ) (deltaTail.invOfUnit 1) = 1 := by @@ -507,7 +506,7 @@ theorem qExpansion_j_mul_q : rw [hunit, mul_one] _ = (qExpansion 1 (fun τ : ℍ ↦ j τ * q τ) * PowerSeries.map (Int.castRingHom ℂ) deltaTail) - * PowerSeries.map (Int.castRingHom ℂ) (deltaTail.invOfUnit 1) := by ring + * PowerSeries.map (Int.castRingHom ℂ) (deltaTail.invOfUnit 1) := (mul_assoc _ _ _).symm _ = PowerSeries.map (Int.castRingHom ℂ) (E4Z ^ 3) * PowerSeries.map (Int.castRingHom ℂ) (deltaTail.invOfUnit 1) := by rw [hcancel] _ = PowerSeries.map (Int.castRingHom ℂ) jqInt := by rw [jqInt, map_mul] diff --git a/LeanPool/Chudnovsky/SingularModuli/Kronecker.lean b/LeanPool/Chudnovsky/SingularModuli/Kronecker.lean index 97a3eefd86..548b17a931 100644 --- a/LeanPool/Chudnovsky/SingularModuli/Kronecker.lean +++ b/LeanPool/Chudnovsky/SingularModuli/Kronecker.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.SingularModuli.ModularPolynomialZ +public import LeanPool.Chudnovsky.SingularModuli.ModularPolynomialZ +import LeanPool.Chudnovsky.Ramanujan /-! # Kronecker's unit-leading-coefficient lemma for the diagonal modular polynomial (Phase C, B7) @@ -41,6 +43,8 @@ Everything downstream of `±1` is `isIntegral_of_kronecker`; `isIntegral_j_of_cm so that only the CM relation `j τ = f m i τ` and the defining identity `hPhi` are needed. -/ +@[expose] public section + noncomputable section namespace Chudnovsky diff --git a/LeanPool/Chudnovsky/SingularModuli/MasserA1.lean b/LeanPool/Chudnovsky/SingularModuli/MasserA1.lean index 006dd62cad..48032a59d7 100644 --- a/LeanPool/Chudnovsky/SingularModuli/MasserA1.lean +++ b/LeanPool/Chudnovsky/SingularModuli/MasserA1.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.SingularModuli.Rationality +public import LeanPool.Chudnovsky.SingularModuli.ModularPolynomialQ +import LeanPool.Chudnovsky.Estimates +import LeanPool.Chudnovsky.Ramanujan +import LeanPool.Chudnovsky.SingularModuli.CMRelations import LeanPool.Chudnovsky.SingularModuli.Kronecker +import LeanPool.Chudnovsky.SingularModuli.Rationality +import LeanPool.Chudnovsky.SingularModuli.Valence +import Mathlib.Tactic.NormNum.Prime /-! # Masser's Theorem A1 at `τ₁₆₃`: rationality of `s₂` (Phase C, statement 3) @@ -54,6 +61,8 @@ Everything, unconditionally: The top-level deliverable is `masser_s₂_rational : ∃ r : ℚ, s₂ τ₁₆₃ = r`. -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -703,11 +712,15 @@ classification for the primitive form `(1, −1, 41)` its norm form gives /-- The only integer solutions of `p² − pk + 41k² = 163` are `±(1, 2)`. -/ private lemma masser_norm_form_solve {p k : ℤ} (h : p * p - p * k + 41 * (k * k) = 163) : (p = 1 ∧ k = 2) ∨ (p = -1 ∧ k = -2) := by - have hk1 : -2 ≤ k := by nlinarith [sq_nonneg (2 * p - k), sq_nonneg (k + 2), sq_nonneg (k - 2)] - have hk2 : k ≤ 2 := by nlinarith [sq_nonneg (2 * p - k), sq_nonneg (k + 2), sq_nonneg (k - 2)] - have hp1 : -13 ≤ p := by nlinarith [sq_nonneg (2 * p - k), sq_nonneg k] - have hp2 : p ≤ 13 := by nlinarith [sq_nonneg (2 * p - k), sq_nonneg k] - interval_cases k <;> interval_cases p <;> omega + -- Completing the square in each variable bounds the finite search. + have hk : |k| ≤ 2 := abs_le_of_sq_le_sq + (by nlinarith only [h, sq_nonneg (2 * p - k)]) (by norm_num) + have hp : |p| ≤ 13 := abs_le_of_sq_le_sq + (by nlinarith only [h, sq_nonneg (p - 82 * k)]) (by norm_num) + have hfinite : ∀ p ∈ Finset.Icc (-13 : ℤ) 13, ∀ k ∈ Finset.Icc (-2 : ℤ) 2, + p * p - p * k + 41 * (k * k) = 163 → + (p = 1 ∧ k = 2) ∨ (p = -1 ∧ k = -2) := by decide +kernel + exact hfinite p (Finset.mem_Icc.mpr (abs_le.mp hp)) k (Finset.mem_Icc.mpr (abs_le.mp hk)) h /-- Structured version of `fixes_of_coset` retaining the matrix entries: if `γ ∈ SL(2,ℤ)` sends the coset point `Aτ = (eτ′ + f)/g` to `τ′`, the integer matrix `γ·[[e,f],[0,g]]` diff --git a/LeanPool/Chudnovsky/SingularModuli/ModularPolynomialQ.lean b/LeanPool/Chudnovsky/SingularModuli/ModularPolynomialQ.lean index 1cfcd84ce9..1ed5bc48ad 100644 --- a/LeanPool/Chudnovsky/SingularModuli/ModularPolynomialQ.lean +++ b/LeanPool/Chudnovsky/SingularModuli/ModularPolynomialQ.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.SingularModuli.CosetOrbit +public import LeanPool.Chudnovsky.SingularModuli.CosetOrbit +import LeanPool.Chudnovsky.Ramanujan import Mathlib.RingTheory.MvPolynomial.Symmetric.NewtonIdentities /-! @@ -60,6 +62,8 @@ The whole file is **sorry-free**. The gated pieces, with routes, are documented documented at `PhiQ`. -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -402,8 +406,9 @@ theorem liouvilleBaseCase (R : Subring ℂ) (h : ℍ → ℂ) · -- `Im (γ • τ) ≥ 1/2` in `𝒟`, hence `‖q (γ • τ)‖ ≤ e^{-π}` rw [mem_closedBall_zero_iff, norm_q] have him_half : (1 : ℝ) / 2 ≤ (γ • τ).im := by - nlinarith [ModularGroup.three_le_four_mul_im_sq_of_mem_fd hmem, (γ • τ).im_pos] - exact Real.exp_le_exp.mpr (by nlinarith [Real.pi_pos, him_half]) + nlinarith only [ModularGroup.three_le_four_mul_im_sq_of_mem_fd hmem, (γ • τ).im_pos] + apply Real.exp_le_exp.mpr + linear_combination 2 * mul_le_mul_of_nonneg_left him_half Real.pi_pos.le · -- moduli match: `‖H z‖ = ‖h τ‖ = ‖h (γ • τ)‖ = ‖H (q (γ • τ))‖` rw [← hqτ, heqH τ, heqH (γ • τ), hinv γ τ] -- maximum modulus principle: `H` is constant on the disc with value `H 0` diff --git a/LeanPool/Chudnovsky/SingularModuli/ModularPolynomialZ.lean b/LeanPool/Chudnovsky/SingularModuli/ModularPolynomialZ.lean index 30c8700191..4130a59f26 100644 --- a/LeanPool/Chudnovsky/SingularModuli/ModularPolynomialZ.lean +++ b/LeanPool/Chudnovsky/SingularModuli/ModularPolynomialZ.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.SingularModuli.ModularPolynomialQ +public import LeanPool.Chudnovsky.SingularModuli.ModularPolynomialQ +import LeanPool.Chudnovsky.Ramanujan import Mathlib.Algebra.GCDMonoid.IntegrallyClosed +import Mathlib.Geometry.Manifold.MFDeriv.NormedSpace /-! # The modular polynomial `Φ_m ∈ ℤ[X, Y]` and Kronecker's lemma (Phase C, chunks B6–B7) @@ -82,6 +85,8 @@ lives in `CMRelations.lean` (a two-line Möbius computation), consumed via `diag / `PhiQ_eval_j_root`. -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -559,13 +564,14 @@ lemma f_vadd_m [NeZero m] (i : Option (ZMod m)) (τ : ℍ) : have hpt : AInf m • ((m : ℝ) +ᵥ τ) = ((m^2 : ℕ) : ℝ) +ᵥ (AInf m • τ) := by apply UpperHalfPlane.ext simp only [coe_AInf_smul, UpperHalfPlane.coe_vadd]; push_cast; ring - rw [hpt]; exact_mod_cast j_vadd_int (m^2 : ℕ) (AInf m • τ) + rw [hpt] + simpa only [Int.cast_natCast] using j_vadd_int (m ^ 2 : ℕ) (AInf m • τ) | some b => simp only [f_some] - have hpt : Acol m b.val • ((m : ℝ) +ᵥ τ) = ((1:ℕ):ℝ) +ᵥ (Acol m b.val • τ) := by + have hpt : Acol m b.val • ((m : ℝ) +ᵥ τ) = (1 : ℝ) +ᵥ (Acol m b.val • τ) := by apply UpperHalfPlane.ext simp only [coe_Acol_smul, UpperHalfPlane.coe_vadd]; push_cast; field_simp; ring - rw [hpt]; exact_mod_cast j_vadd_int (1 : ℕ) (Acol m b.val • τ) + rw [hpt, j_vadd_one] lemma isBoundedAtImInfty_wParam [NeZero m] : IsBoundedAtImInfty (fun τ : ℍ ↦ wParam m τ) := by have hm : (0:ℝ) < m := by exact_mod_cast Nat.pos_of_ne_zero (NeZero.ne m) @@ -804,7 +810,8 @@ theorem orbitPoly_coeff_isCuspMeroR_bot [Fact m.Prime] (n : ℕ) : have hrat : IsCuspMeroR (fun τ : ℍ ↦ (orbitPoly m τ).coeff n) N RQ := orbitPoly_coeff_isCuspMeroR_RQ n P hP N (by omega) have hNint : m ^ 2 * (m + 1) ≤ m * N := by - rw [hNdef]; nlinarith [Nat.zero_le (m * P.natDegree)] + calc m ^ 2 * (m + 1) = m * (m ^ 2 + m) := by ring + _ ≤ m * N := Nat.mul_le_mul_left m (Nat.le_add_left _ _) have hint : GoodQ (m : ℝ) RI (fun τ : ℍ ↦ (orbitPoly m τ).coeff n * q τ ^ N) := goodQ_orbitPoly_coeff_mul_qpow n N hNint refine ⟨hrat.periodic, hrat.holo, hrat.bdd, fun p ↦ ?_⟩ diff --git a/LeanPool/Chudnovsky/SingularModuli/QuadraticPoints.lean b/LeanPool/Chudnovsky/SingularModuli/QuadraticPoints.lean index 54276fb687..0217c0375e 100644 --- a/LeanPool/Chudnovsky/SingularModuli/QuadraticPoints.lean +++ b/LeanPool/Chudnovsky/SingularModuli/QuadraticPoints.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +public import Mathlib.Analysis.Complex.UpperHalfPlane.Basic /-! # Binary quadratic forms and CM points (Phase C, Track 3) @@ -32,6 +33,8 @@ The `GL₂` action is the classical *right* action on forms, `BQF.act f p q r s` taking the four entries directly (avoiding matrix-coercion churn). -/ +@[expose] public section + noncomputable section namespace Chudnovsky.QF @@ -92,10 +95,10 @@ theorem act_act (f : BQF) (p q r s p' q' r' s' : ℤ) : theorem act_act_inv (f : BQF) {p q r s : ℤ} (hdet : p * s - q * r = 1) : act (act f p q r s) s (-q) (-r) p = f := by rw [act_act] - have h1 : p * s + q * (-r) = 1 := by ring_nf; linarith [hdet] + have h1 : p * s + q * (-r) = 1 := by simpa only [mul_neg, sub_eq_add_neg] using hdet have h2 : r * s + s * (-r) = 0 := by ring have h3 : p * (-q) + q * p = 0 := by ring - have h4 : r * (-q) + s * p = 1 := by ring_nf; linarith [hdet] + have h4 : r * (-q) + s * p = 1 := by linear_combination hdet rw [h1, h2, h3, h4, act_one] /-- A common divisor of the coefficients divides the coefficients of any `act`. -/ @@ -168,26 +171,17 @@ theorem root_unique {f : BQF} (hf : IsPosDef f) {τ τ' : ℍ} have hsq : (2 * (f.a : ℂ) * (τ : ℂ) + (f.b : ℂ)) ^ 2 = (2 * (f.a : ℂ) * (τ' : ℂ) + (f.b : ℂ)) ^ 2 := by rw [sq_two_a_root h, sq_two_a_root h'] - have hfac : (2 * (f.a : ℂ) * (τ : ℂ) - 2 * (f.a : ℂ) * (τ' : ℂ)) * - (2 * (f.a : ℂ) * (τ : ℂ) + (f.b : ℂ) + (2 * (f.a : ℂ) * (τ' : ℂ) + (f.b : ℂ))) = 0 := by - linear_combination hsq - rcases mul_eq_zero.mp hfac with h1 | h2 - · -- `2a(τ − τ') = 0` ⇒ `τ = τ'` - have : (τ : ℂ) = (τ' : ℂ) := by - have := mul_left_cancel₀ (mul_ne_zero (two_ne_zero) haC) (by linear_combination h1 : - 2 * (f.a : ℂ) * (τ : ℂ) = 2 * (f.a : ℂ) * (τ' : ℂ)) - exact this - exact UpperHalfPlane.ext this + rcases sq_eq_sq_iff_eq_or_eq_neg.mp hsq with h1 | h2 + · exact UpperHalfPlane.ext + (mul_left_cancel₀ (mul_ne_zero two_ne_zero haC) (add_right_cancel h1)) · -- `a(τ + τ') = −b` contradicts positive imaginary parts exfalso have h3 : (f.a : ℂ) * ((τ : ℂ) + (τ' : ℂ)) = -(f.b : ℂ) := by linear_combination h2 / 2 have him := congrArg Complex.im h3 simp only [Complex.mul_im, Complex.add_im, Complex.intCast_re, Complex.intCast_im, - UpperHalfPlane.coe_im, Complex.neg_im, zero_mul, add_zero, mul_add, neg_zero] at him - have hτ := τ.im_pos - have hτ' := τ'.im_pos + UpperHalfPlane.coe_im, Complex.neg_im, zero_mul, add_zero, neg_zero] at him have haR : (0 : ℝ) < (f.a : ℝ) := by exact_mod_cast ha - nlinarith [him, hτ, hτ', haR] + exact (mul_pos haR (add_pos τ.im_pos τ'.im_pos)).ne' him /-! ## The fixed-point (`ℚ[Λ]`) algebra @@ -243,8 +237,8 @@ theorem fixes_classification {f : BQF} (hf : IsPrimitive f) (hpd : IsPosDef f) linear_combination (r : ℂ) * hroot - (f.a : ℂ) * hAf obtain ⟨r1, r2⟩ := int_lin_eq_zero τ hlin -- `r1 : r*b = a*(s-p)`, `r2 : r*c = a*(-q)` - have hr1 : r * f.b = f.a * (s - p) := by linarith [r1] - have hr2 : r * f.c = f.a * (-q) := by linarith [r2] + have hr1 : r * f.b = f.a * (s - p) := sub_eq_zero.mp r1 + have hr2 : r * f.c = f.a * (-q) := sub_eq_zero.mp r2 -- primitivity ⇒ `a ∣ r` obtain ⟨u, v, w, huvw⟩ := bezout_of_primitive hf have hdvd : f.a ∣ r := by @@ -252,14 +246,11 @@ theorem fixes_classification {f : BQF} (hf : IsPrimitive f) (hpd : IsPosDef f) have hr : r * (u * f.a + v * f.b + w * f.c) = r := by rw [huvw]; ring linear_combination -hr + v * hr1 + w * hr2 obtain ⟨k, hk⟩ := hdvd - refine ⟨k, by rw [hk]; ring, ?_, ?_⟩ - · -- `s − p = k*b` from `r*b = a*(s−p)` and `r = a*k` - have : f.a * (k * f.b) = f.a * (s - p) := by rw [← hr1, hk]; ring - exact (mul_left_cancel₀ ha this).symm - · -- `q = −(k*c)` from `r*c = a*(−q)` and `r = a*k` - have : f.a * (k * f.c) = f.a * (-q) := by rw [← hr2, hk]; ring - have := mul_left_cancel₀ ha this - linarith [this] + refine ⟨k, hk.trans (mul_comm _ _), ?_, ?_⟩ + · rw [hk, mul_assoc] at hr1 + exact (mul_left_cancel₀ ha hr1).symm + · rw [hk, mul_assoc] at hr2 + exact neg_eq_iff_eq_neg.mp (mul_left_cancel₀ ha hr2).symm /-- **Determinant is the norm form.** For a fixing matrix as classified above, `det = p s − q r = p² + b p k + a c k²` — the value of the norm form of the order at diff --git a/LeanPool/Chudnovsky/SingularModuli/Rationality.lean b/LeanPool/Chudnovsky/SingularModuli/Rationality.lean index d9c867f29b..2532c520a1 100644 --- a/LeanPool/Chudnovsky/SingularModuli/Rationality.lean +++ b/LeanPool/Chudnovsky/SingularModuli/Rationality.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.SingularModuli.ModularPolynomialZ +public import LeanPool.Chudnovsky.SingularModuli.ModularPolynomialQ +public import LeanPool.Chudnovsky.SingularModuli.QuadraticPoints import LeanPool.Chudnovsky.SingularModuli.CMRelations +import LeanPool.Chudnovsky.SingularModuli.FormReduction +import LeanPool.Chudnovsky.SingularModuli.ModularPolynomialZ import LeanPool.Chudnovsky.SingularModuli.Valence +import Mathlib.Analysis.Complex.Polynomial.Basic import Mathlib.Tactic.NormNum.Prime /-! @@ -46,6 +51,8 @@ Let `j₀ := j τ₁₆₃` and `x` an arbitrary complex root of `minpoly ℚ j Vieta relation on the subleading coefficient (a rational) forces `j₀ ∈ ℚ`. -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -130,10 +137,8 @@ lemma cmGL_factor (n : ℤ) [NeZero m] (hm : (m : ℤ) = n ^ 2 + n + 41) : have hmR : (m : ℝ) = (n : ℝ) ^ 2 + (n : ℝ) + 41 := by exact_mod_cast hm have hcoe : ((cmGamma n : SL(2, ℤ)) : Matrix (Fin 2) (Fin 2) ℤ) = !![n + 1, -1; 1, 0] := rfl apply Matrix.GeneralLinearGroup.ext - intro a c - fin_cases a <;> fin_cases c <;> - simp [val_cmGL, val_Acol, hcoe, Matrix.mul_apply, Fin.sum_univ_two] - nlinarith [hmR] + simp [Fin.forall_fin_two, val_cmGL, val_Acol, hcoe, Matrix.mul_apply, Fin.sum_univ_two] + linear_combination hmR /-- **The `b`-coset value at `τ₁₆₃`.** `j (Acol m n • τ₁₆₃) = j τ₁₆₃`. -/ lemma cm_coset_val (n : ℤ) [NeZero m] (hm : (m : ℤ) = n ^ 2 + n + 41) : @@ -264,7 +269,7 @@ lemma exists_primitive_isRoot {F : BQF} {τ : ℍ} (hpd : IsPosDef F) (hroot : I simp only [disc, ha0, hb0, hc0]; ring have hdneg := hpd.2 rw [hdF] at hdneg - nlinarith [hdneg, sq_nonneg d, hdpos] + exact neg_of_mul_neg_right hdneg (sq_nonneg d) · -- root simp only [IsRoot] at hroot ⊢ rw [ha0, hb0, hc0] at hroot @@ -361,10 +366,7 @@ lemma exists_form_of_coincidence [Fact m.Prime] {τ' : ℍ} {i : Option (ZMod m) have hnat : s.natAbs * s.natAbs = m := by have h1 : (↑(s.natAbs * s.natAbs) : ℤ) = (m : ℤ) := by rw [Int.natAbs_mul_self]; exact hsq exact_mod_cast h1 - have hdvd : s.natAbs ∣ m := ⟨s.natAbs, hnat.symm⟩ - rcases hprime.eq_one_or_self_of_dvd _ hdvd with hh | hh - · rw [hh] at hnat; have := hprime.two_le; omega - · rw [hh] at hnat; nlinarith [hprime.two_le] + exact hprime.not_isSquare ⟨s.natAbs, hnat.symm⟩ -- the fixing form `(r, s−p, −q)` have hroot0 : QF.IsRoot ⟨r, s - p, -q⟩ τ' := by simp only [QF.IsRoot, QF.Fixes] at hfix ⊢; push_cast diff --git a/LeanPool/Chudnovsky/SingularModuli/Valence.lean b/LeanPool/Chudnovsky/SingularModuli/Valence.lean index c7012799ed..24372d442d 100644 --- a/LeanPool/Chudnovsky/SingularModuli/Valence.lean +++ b/LeanPool/Chudnovsky/SingularModuli/Valence.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.SingularModuli.JFunction -import LeanPool.Chudnovsky.Fourier +public import LeanPool.Chudnovsky.SingularModuli.JFunction +public import LeanPool.Chudnovsky.Lattices import LeanPool.Chudnovsky.DivisionValues -import Mathlib.Analysis.Complex.OpenMapping import LeanPool.Chudnovsky.Estimates +import LeanPool.Chudnovsky.Fourier +import Mathlib.Analysis.Complex.OpenMapping +import Mathlib.Analysis.Real.Pi.Bounds /-! # Valence theory of the `j`-function (Phase C, Track 2, §4.3) @@ -56,6 +59,8 @@ Both halves of the §4.3 valence theory (`j_injective_mod_Γ` and `j_surjective` `sorry`-free. -/ +@[expose] public section + noncomputable section namespace Chudnovsky @@ -644,10 +649,12 @@ theorem exists_sl2_of_lattice_eq {σ₁ σ₂ : ℍ} {a : ℂˣ} have eqB := orient_eq h1' h2' -- positivity of the two determinants have hdMpos : 0 < (m₁ * n₂ - n₁ * m₂ : ℤ) := by - have : (0 : ℝ) < ((m₁ * n₂ - n₁ * m₂ : ℤ) : ℝ) := by nlinarith [eqA, hy1, hy2, hna] + have : (0 : ℝ) < ((m₁ * n₂ - n₁ * m₂ : ℤ) : ℝ) := + (mul_pos_iff_of_pos_right hy1).mp (eqA.symm ▸ mul_pos hna hy2) exact_mod_cast this have hdNpos : 0 < (m₁' * n₂' - n₁' * m₂' : ℤ) := by - have : (0 : ℝ) < ((m₁' * n₂' - n₁' * m₂' : ℤ) : ℝ) := by nlinarith [eqB, hy1, hy2, hnai] + have : (0 : ℝ) < ((m₁' * n₂' - n₁' * m₂' : ℤ) : ℝ) := + (mul_pos_iff_of_pos_right hy2).mp (eqB.symm ▸ mul_pos hnai hy1) exact_mod_cast this -- product of `normSq`s is `1` have hnprod : Complex.normSq (↑a : ℂ) * Complex.normSq ((a⁻¹ : ℂˣ) : ℂ) = 1 := by @@ -659,12 +666,13 @@ theorem exists_sl2_of_lattice_eq {σ₁ σ₂ : ℍ} {a : ℂˣ} calc (((m₁ * n₂ - n₁ * m₂ : ℤ) : ℝ) * ((m₁' * n₂' - n₁' * m₂' : ℤ) : ℝ)) * ((↑σ₁ : ℂ).im * (↑σ₂ : ℂ).im) = (((m₁ * n₂ - n₁ * m₂ : ℤ) : ℝ) * (↑σ₁ : ℂ).im) - * (((m₁' * n₂' - n₁' * m₂' : ℤ) : ℝ) * (↑σ₂ : ℂ).im) := by ring + * (((m₁' * n₂' - n₁' * m₂' : ℤ) : ℝ) * (↑σ₂ : ℂ).im) := mul_mul_mul_comm _ _ _ _ _ = (Complex.normSq (↑a : ℂ) * (↑σ₂ : ℂ).im) * (Complex.normSq ((a⁻¹ : ℂˣ) : ℂ) * (↑σ₁ : ℂ).im) := by rw [eqA, eqB] _ = (Complex.normSq (↑a : ℂ) * Complex.normSq ((a⁻¹ : ℂˣ) : ℂ)) - * ((↑σ₁ : ℂ).im * (↑σ₂ : ℂ).im) := by ring - _ = (↑σ₁ : ℂ).im * (↑σ₂ : ℂ).im := by rw [hnprod]; ring + * ((↑σ₁ : ℂ).im * (↑σ₂ : ℂ).im) := by + rw [mul_mul_mul_comm, mul_comm (↑σ₂ : ℂ).im (↑σ₁ : ℂ).im] + _ = (↑σ₁ : ℂ).im * (↑σ₂ : ℂ).im := by rw [hnprod, one_mul] have hprod : (m₁ * n₂ - n₁ * m₂ : ℤ) * (m₁' * n₂' - n₁' * m₂' : ℤ) = 1 := by have hpos : 0 < (↑σ₁ : ℂ).im * (↑σ₂ : ℂ).im := mul_pos hy1 hy2 have hR := mul_right_cancel₀ (ne_of_gt hpos) (hprodR.trans (one_mul _).symm) @@ -673,7 +681,7 @@ theorem exists_sl2_of_lattice_eq {σ₁ σ₂ : ℍ} {a : ℂˣ} have hdet1 : (m₁ * n₂ - n₁ * m₂ : ℤ) = 1 := by have h1 : (1 : ℤ) ≤ m₁ * n₂ - n₁ * m₂ := hdMpos have h2 : (1 : ℤ) ≤ m₁' * n₂' - n₁' * m₂' := hdNpos - exact le_antisymm (by nlinarith [hprod, h1, h2]) h1 + exact le_antisymm ((le_mul_of_one_le_right hdMpos.le h2).trans_eq hprod) h1 -- build `γ` and check the Möbius formula set M : Matrix (Fin 2) (Fin 2) ℤ := !![n₂, m₂; n₁, m₁] with hM have hMdet : M.det = 1 := by @@ -748,13 +756,13 @@ theorem j_two_values : ∃ τ₁ τ₂ : ℍ, j τ₁ ≠ j τ₂ := by rw [← Real.exp_add]; congr 1; ring have h7 : (7 : ℝ) ≤ Real.exp (2 * π) := by have hae := Real.add_one_le_exp (2 * π) - nlinarith [Real.pi_gt_three] + linarith only [hae, Real.pi_gt_three] have hE : Real.exp (-(2 * π)) ≤ 1 / 7 := by rw [Real.exp_neg, inv_eq_one_div] exact one_div_le_one_div_of_le (by norm_num) h7 have hBpos : 0 < Real.exp (-(2 * π * 2)) := Real.exp_pos _ - rw [e1] - nlinarith [hE, hBpos, mul_nonneg hBpos.le (sub_nonneg.mpr hE)] + rw [e1, mul_left_comm, mul_comm (0.737 : ℝ)] + exact mul_le_mul_of_nonneg_left (by linarith only [hE]) hBpos.le have hja : ‖(1728 : ℂ) * J τa‖ = ‖j τa‖ := by rw [j_def] have hjb : ‖(1728 : ℂ) * J τb‖ = ‖j τb‖ := by rw [j_def] rw [hja] at hlow @@ -826,22 +834,24 @@ theorem isClosed_range_j : IsClosed (Set.range (j : ℍ → ℂ)) := by rw [show ‖(1728 : ℂ) * J (τ n)‖ = ‖y n‖ by rw [hjyn]] at hlow have hqpos := norm_q_pos (τ n) have hlt : 0.737 / ‖q (τ n)‖ < C₁ := - lt_of_lt_of_le hlow (le_trans (hnorm_le n) (by linarith)) + hlow.trans_le ((hnorm_le n).trans (le_add_of_nonneg_right zero_le_one)) rw [div_lt_iff₀ hqpos, norm_q] at hlt have hexp : 0.737 / C₁ < Real.exp (-(2 * π * (τ n).im)) := by - rw [div_lt_iff₀ hC1pos]; linarith + rw [div_lt_iff₀ hC1pos] + simpa only [mul_comm] using hlt have hlog : Real.log (0.737 / C₁) < -(2 * π * (τ n).im) := by have := Real.log_lt_log (by positivity : (0 : ℝ) < 0.737 / C₁) hexp rwa [Real.log_exp] at this have himlt : (τ n).im < (-(Real.log (0.737 / C₁))) / (2 * π) := by - rw [lt_div_iff₀ h2πpos]; nlinarith [hlog] + rw [lt_div_iff₀ h2πpos] + simpa only [neg_neg, mul_comm] using neg_lt_neg hlog exact le_trans himlt.le (le_max_right _ _) · exact le_trans (le_of_not_gt hR) (le_max_left _ _) -- lower bound on `Im (τ n)` from the fundamental domain have him_ge : ∀ n, (3 : ℝ) / 4 ≤ (τ n).im := by intro n have h3 := ModularGroup.three_le_four_mul_im_sq_of_mem_fd (hτfd n) - nlinarith [(τ n).im_pos] + nlinarith only [h3, (τ n).im_pos] -- the compact truncation of `𝒟` in `ℂ` set Kc : Set ℂ := {z | 1 ≤ Complex.normSq z ∧ |z.re| ≤ 1 / 2 ∧ (3 : ℝ) / 4 ≤ z.im ∧ z.im ≤ M} with hKc @@ -855,16 +865,16 @@ theorem isClosed_range_j : IsClosed (Set.range (j : ℍ → ℂ)) := by · exact isClosed_le Complex.continuous_im continuous_const have hKc_bdd : Bornology.IsBounded Kc := by rw [Metric.isBounded_iff_subset_closedBall 0] - refine ⟨1 / 2 + (3 / 4 + |M|), fun z hz => ?_⟩ + refine ⟨1 / 2 + |M|, fun z hz => ?_⟩ rw [Metric.mem_closedBall, dist_zero_right] have hre : |z.re| ≤ 1 / 2 := hz.2.1 have him1 : (3 : ℝ) / 4 ≤ z.im := hz.2.2.1 have him2 : z.im ≤ M := hz.2.2.2 have habs : ‖z‖ ≤ |z.re| + |z.im| := Complex.norm_le_abs_re_add_abs_im z - have himabs : |z.im| ≤ 3 / 4 + |M| := by - rw [abs_of_nonneg (by linarith : (0 : ℝ) ≤ z.im)] - nlinarith [le_abs_self M] - linarith + have himabs : |z.im| ≤ |M| := by + rw [abs_of_nonneg (le_trans (by norm_num) him1)] + exact him2.trans (le_abs_self M) + exact habs.trans (add_le_add hre himabs) have hKc_compact : IsCompact Kc := Metric.isCompact_of_isClosed_isBounded hKc_closed hKc_bdd have hmem : ∀ n, (τ n : ℂ) ∈ Kc := by diff --git a/LeanPool/Chudnovsky/WeierstrassMore.lean b/LeanPool/Chudnovsky/WeierstrassMore.lean index f7f7d70333..7017b10afc 100644 --- a/LeanPool/Chudnovsky/WeierstrassMore.lean +++ b/LeanPool/Chudnovsky/WeierstrassMore.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.Chudnovsky.Liouville +public import LeanPool.Chudnovsky.Liouville +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # The zeros of ℘′ and the factorization of ℘′² @@ -22,6 +29,8 @@ characterisation of the zeros of `℘'` use the third Liouville theorem (from `LeanPool.Chudnovsky.Liouville`) as a pinned interface. -/ +@[expose] public section + noncomputable section namespace PeriodPair diff --git a/LeanPool/CircuitComplexity.lean b/LeanPool/CircuitComplexity.lean index cdd4c02e01..1bbc6130fc 100644 --- a/LeanPool/CircuitComplexity.lean +++ b/LeanPool/CircuitComplexity.lean @@ -3,17 +3,26 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.Basic -import LeanPool.CircuitComplexity.NF -import LeanPool.CircuitComplexity.AON -import LeanPool.CircuitComplexity.XOR -import LeanPool.CircuitComplexity.EssentialInput -import LeanPool.CircuitComplexity.Shannon -import LeanPool.CircuitComplexity.LowerBound -import LeanPool.CircuitComplexity.Schnorr -import LeanPool.CircuitComplexity.AC0 -import LeanPool.CircuitComplexity.Nondeterminism -import LeanPool.CircuitComplexity.Valiant +module + +public import LeanPool.CircuitComplexity.Basic +public import LeanPool.CircuitComplexity.NF +public import LeanPool.CircuitComplexity.AON +public import LeanPool.CircuitComplexity.XOR +public import LeanPool.CircuitComplexity.EssentialInput +public import LeanPool.CircuitComplexity.Shannon +public import LeanPool.CircuitComplexity.LowerBound +public import LeanPool.CircuitComplexity.Schnorr +public import LeanPool.CircuitComplexity.AC0 +public import LeanPool.CircuitComplexity.Nondeterminism +public import LeanPool.CircuitComplexity.Valiant +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # Circuit Complexity in Lean 4 @@ -26,6 +35,8 @@ Tags: circuit-complexity, boolean-functions, lower-bounds, shannon-bound, parity MSC: 68Q06, 94C11 -/ +@[expose] public section + /-! # Circuit Complexity diff --git a/LeanPool/CircuitComplexity/AC0.lean b/LeanPool/CircuitComplexity/AC0.lean index 436ac09896..47d6c2d79a 100644 --- a/LeanPool/CircuitComplexity/AC0.lean +++ b/LeanPool/CircuitComplexity/AC0.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.AC0.Defs -import LeanPool.CircuitComplexity.XOR +module + +public import LeanPool.CircuitComplexity.AC0.Defs +public import LeanPool.CircuitComplexity.XOR /-! # AC0 — The AC0 Complexity Class @@ -16,6 +18,8 @@ This module re-exports the AC0 definitions and main results. unbounded fan-in AND/OR) -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/AC0/Defs.lean b/LeanPool/CircuitComplexity/AC0/Defs.lean index 5b3af9feb9..a2bdfb2826 100644 --- a/LeanPool/CircuitComplexity/AC0/Defs.lean +++ b/LeanPool/CircuitComplexity/AC0/Defs.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.AON.Defs +module + +public import LeanPool.CircuitComplexity.AON.Defs /-! # AC0 — Core Definitions @@ -15,6 +17,8 @@ This module defines the AC0 circuit complexity class. unbounded fan-in AND/OR) -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/AON.lean b/LeanPool/CircuitComplexity/AON.lean index 9238af701c..546ba486a1 100644 --- a/LeanPool/CircuitComplexity/AON.lean +++ b/LeanPool/CircuitComplexity/AON.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.AON.Defs -import LeanPool.CircuitComplexity.Internal.AON -import LeanPool.CircuitComplexity.Internal.Simulation +module + +public import LeanPool.CircuitComplexity.Internal.AON +public import LeanPool.CircuitComplexity.Internal.Simulation + +public import LeanPool.CircuitComplexity.AON.Defs /-! # AND/OR/NOT Basis @@ -25,6 +28,8 @@ This module provides the AND/OR basis definitions and completeness results. from `unboundedAON`, using `CompleteBasis.of_simulation` -/ +@[expose] public section + namespace CircuitComplexity end CircuitComplexity diff --git a/LeanPool/CircuitComplexity/AON/Defs.lean b/LeanPool/CircuitComplexity/AON/Defs.lean index 436f1b253d..7c211f16c5 100644 --- a/LeanPool/CircuitComplexity/AON/Defs.lean +++ b/LeanPool/CircuitComplexity/AON/Defs.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.Basic +module + +public import LeanPool.CircuitComplexity.Basic /-! # AND/OR/NOT Basis — Definitions @@ -19,6 +21,8 @@ used throughout the circuit complexity library. * `Basis.andOr2` — fan-in exactly 2 AND/OR basis (used in Shannon/Schnorr bounds) -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/Basic.lean b/LeanPool/CircuitComplexity/Basic.lean index 4ce12a0c1f..0d2d11dbb2 100644 --- a/LeanPool/CircuitComplexity/Basic.lean +++ b/LeanPool/CircuitComplexity/Basic.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import Mathlib.Order.Lattice.Nat +module + +public import Mathlib.Order.Lattice.Nat /-! # Boolean Circuit Complexity @@ -27,6 +29,8 @@ establishes the circuit size complexity measure for Boolean functions. * `Circuit.size_complexity_pos` — for complete bases, size complexity is positive -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/Digraph/Defs.lean b/LeanPool/CircuitComplexity/Digraph/Defs.lean index 5ff502b728..18fe6b6de6 100644 --- a/LeanPool/CircuitComplexity/Digraph/Defs.lean +++ b/LeanPool/CircuitComplexity/Digraph/Defs.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import Mathlib.Combinatorics.Digraph.Basic -import Mathlib.Data.Fintype.Prod -import Mathlib.Order.Lattice.Nat +module + +public import Mathlib.Combinatorics.Digraph.Basic +public import Mathlib.Data.Fintype.Prod +public import Mathlib.Order.Lattice.Nat /-! # Basic digraph definitions @@ -19,6 +21,8 @@ arguments, edge partitions by first-differing bit, etc.) lives in `Circ.Internal.Valiant`. -/ +@[expose] public section + namespace Digraph variable {V : Type*} diff --git a/LeanPool/CircuitComplexity/EssentialInput.lean b/LeanPool/CircuitComplexity/EssentialInput.lean index 077893ddb2..cfa78f5583 100644 --- a/LeanPool/CircuitComplexity/EssentialInput.lean +++ b/LeanPool/CircuitComplexity/EssentialInput.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import Mathlib.Data.Fintype.BigOperators -import LeanPool.CircuitComplexity.Basic +module + +public import LeanPool.CircuitComplexity.Basic +public import Mathlib.Data.Fintype.Pi /-! # Essential Inputs @@ -17,6 +19,8 @@ for a Boolean function. * `EssentialInputs` — the set of essential input variables -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/Internal/AON.lean b/LeanPool/CircuitComplexity/Internal/AON.lean index 469a38b940..4282e1717f 100644 --- a/LeanPool/CircuitComplexity/Internal/AON.lean +++ b/LeanPool/CircuitComplexity/Internal/AON.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.AON.Defs +module + +public import LeanPool.CircuitComplexity.AON.Defs /-! # Internal: AND/OR/NOT Completeness Proof @@ -12,6 +14,8 @@ via DNF (disjunctive normal form) construction. The basis definitions are in `Circ.AON.Defs`; this module is re-exported through `Circ.AON`. -/ +@[expose] public section + namespace CircuitComplexity @@ -34,7 +38,7 @@ For each of the `2^N` possible inputs `s` (decoded via `Nat.testBit`), internal gate `i` is the indicator AND for `s` when `f s = true`, or a trivially-false 0-input OR otherwise. The single output OR gate disjoins all internal gates. -/ -private def AONFor.mkGate {N : Nat} (f : BitString N → Bool) (i : Fin (2 ^ N)) : +def AONFor.mkGate {N : Nat} (f : BitString N → Bool) (i : Fin (2 ^ N)) : Gate Basis.unboundedAON (N + 2 ^ N) := if f (fun j => i.val.testBit j.val) then { op := .and, fanIn := N, arityOk := trivial, @@ -65,7 +69,7 @@ def AONFor {N : Nat} [NeZero N] (f : BitString N → Bool) : { op := .or, fanIn := 2 ^ N, arityOk := trivial, inputs := fun j => (j.natAdd N), negated := fun _ => false } - acyclic := AONFor.mkGate_acyclic f + acyclic := private AONFor.mkGate_acyclic f private lemma AONFor_wireValue_gate {N : Nat} [NeZero N] (f : BitString N → Bool) (x : BitString N) (i : Fin (2 ^ N)) : @@ -223,28 +227,30 @@ theorem AONFor_is_Correct {N : Nat} [NeZero N] (f : BitString N → Bool) : /-- Internal gate for the multi-output DNF circuit. Gate `idx` encodes output bit `j = idx / 2^N` and indicator index `i = idx % 2^N`. If `f(bitstring i)[j] = true`, it's an AND indicator gate; otherwise a trivially-false OR gate. -/ -private def AONForM_j {N M : Nat} (idx : Fin (M * 2 ^ N)) : Fin M := +def aonOutputIndex {N M : Nat} (idx : Fin (M * 2 ^ N)) : Fin M := ⟨idx.val / 2 ^ N, Nat.div_lt_of_lt_mul (Nat.mul_comm M (2^N) ▸ idx.isLt)⟩ -private def AONForM_i {N : Nat} {M : Nat} (idx : Fin (M * 2 ^ N)) : Fin (2 ^ N) := +/-- The input assignment index encoded by a gate position. -/ +def aonInputIndex {N : Nat} {M : Nat} (idx : Fin (M * 2 ^ N)) : Fin (2 ^ N) := ⟨idx.val % 2 ^ N, Nat.mod_lt _ (Nat.two_pow_pos N)⟩ -private def AONForM_mkGate {N M : Nat} (f : BitString N → BitString M) (idx : Fin (M * 2 ^ N)) : +/-- The conjunction gate for an output coordinate and an input assignment. -/ +def aonGate {N M : Nat} (f : BitString N → BitString M) (idx : Fin (M * 2 ^ N)) : Gate Basis.unboundedAON (N + M * 2 ^ N) := - if f (fun k => (AONForM_i idx).val.testBit k.val) (AONForM_j idx) then + if f (fun k => (aonInputIndex idx).val.testBit k.val) (aonOutputIndex idx) then { op := .and, fanIn := N, arityOk := trivial, inputs := fun k => ⟨k.val, by omega⟩, - negated := fun k => !((AONForM_i idx).val.testBit k.val) } + negated := fun k => !((aonInputIndex idx).val.testBit k.val) } else { op := .or, fanIn := 0, arityOk := trivial, inputs := Fin.elim0, negated := Fin.elim0 } private lemma AONForM_mkGate_acyclic {N M : Nat} (f : BitString N → BitString M) - (idx : Fin (M * 2 ^ N)) (k : Fin (AONForM_mkGate f idx).fanIn) : - ((AONForM_mkGate f idx).inputs k).val < N + idx.val := by - revert k; unfold AONForM_mkGate - cases f (fun k => (AONForM_i idx).val.testBit k.val) (AONForM_j idx) + (idx : Fin (M * 2 ^ N)) (k : Fin (aonGate f idx).fanIn) : + ((aonGate f idx).inputs k).val < N + idx.val := by + revert k; unfold aonGate + cases f (fun k => (aonInputIndex idx).val.testBit k.val) (aonOutputIndex idx) · intro k; exact Fin.elim0 k · intro k; simp; omega @@ -264,12 +270,12 @@ an indicator AND gate (or a trivially-false gate). Each output OR gate disjoins the `2^N` gates for its output bit. -/ def AONForM {N M : Nat} [NeZero N] [NeZero M] (f : BitString N → BitString M) : Circuit Basis.unboundedAON N M (M * 2 ^ N) where - gates := AONForM_mkGate f + gates := aonGate f outputs j := { op := .or, fanIn := 2 ^ N, arityOk := trivial, - inputs := fun k => ⟨N + j.val * 2 ^ N + k.val, AONForM_output_bound j k⟩, + inputs := fun k => ⟨N + j.val * 2 ^ N + k.val, by exact AONForM_output_bound j k⟩, negated := fun _ => false } - acyclic := AONForM_mkGate_acyclic f + acyclic := private AONForM_mkGate_acyclic f private lemma AONForM_wireValue_input {N M : Nat} [NeZero N] [NeZero M] (f : BitString N → BitString M) (x : BitString N) (k : Fin N) : @@ -280,7 +286,7 @@ private lemma AONForM_wireValue_input {N M : Nat} [NeZero N] [NeZero M] private lemma AONForM_wireValue_gate {N M : Nat} [NeZero N] [NeZero M] (f : BitString N → BitString M) (x : BitString N) (idx : Fin (M * 2 ^ N)) : (AONForM f).wireValue x ⟨N + idx.val, by omega⟩ = - (AONForM_mkGate f idx).eval ((AONForM f).wireValue x) := by + (aonGate f idx).eval ((AONForM f).wireValue x) := by have hge : ¬ ((⟨N + idx.val, by omega⟩ : Fin (N + M * 2 ^ N)).val < N) := by simp rw [Circuit.wireValue_ge _ _ _ hge] congr 1; simp only [AONForM]; congr 1; exact Fin.ext (by simp) @@ -288,37 +294,37 @@ private lemma AONForM_wireValue_gate {N M : Nat} [NeZero N] [NeZero M] private lemma AONForM_mkGate_eval_false {N M : Nat} (f : BitString N → BitString M) (idx : Fin (M * 2 ^ N)) (wv : BitString (N + M * 2 ^ N)) - (hfi : f (fun k => (AONForM_i idx).val.testBit k.val) (AONForM_j idx) = false) : - (AONForM_mkGate f idx).eval wv = false := by - unfold AONForM_mkGate Gate.eval + (hfi : f (fun k => (aonInputIndex idx).val.testBit k.val) (aonOutputIndex idx) = false) : + (aonGate f idx).eval wv = false := by + unfold aonGate Gate.eval simp [hfi, Basis.unboundedAON, AONOp.eval, Fin.foldl_zero] private lemma AONForM_mkGate_eval_true_iff {N M : Nat} (f : BitString N → BitString M) (idx : Fin (M * 2 ^ N)) (wv : BitString (N + M * 2 ^ N)) - (hfi : f (fun k => (AONForM_i idx).val.testBit k.val) (AONForM_j idx) = true) : - (AONForM_mkGate f idx).eval wv = true ↔ - ∀ k : Fin N, wv ⟨k.val, by omega⟩ = ((AONForM_i idx).val.testBit k.val) := by - have hmk : AONForM_mkGate f idx = + (hfi : f (fun k => (aonInputIndex idx).val.testBit k.val) (aonOutputIndex idx) = true) : + (aonGate f idx).eval wv = true ↔ + ∀ k : Fin N, wv ⟨k.val, by omega⟩ = ((aonInputIndex idx).val.testBit k.val) := by + have hmk : aonGate f idx = { op := .and, fanIn := N, arityOk := trivial, inputs := fun k => ⟨k.val, by omega⟩, - negated := fun k => !((AONForM_i idx).val.testBit k.val) } := by - unfold AONForM_mkGate; simp [hfi] + negated := fun k => !((aonInputIndex idx).val.testBit k.val) } := by + unfold aonGate; simp [hfi] rw [hmk]; simp only [Gate.eval, Basis.unboundedAON, AONOp.eval] rw [foldl_band_eq_true] exact ⟨fun h k => (xor_not_eq_true_iff _ _).mp (h k), fun h k => (xor_not_eq_true_iff _ _).mpr (h k)⟩ --- Helper: relate index `j * 2^N + k` to `AONForM_i` and `AONForM_j` +-- Helper: relate index `j * 2^N + k` to `aonInputIndex` and `aonOutputIndex` private lemma AONForM_i_of_add {N M : Nat} (j : Fin M) (k : Fin (2 ^ N)) (h : j.val * 2 ^ N + k.val < M * 2 ^ N) : - AONForM_i (⟨j.val * 2 ^ N + k.val, h⟩ : Fin (M * 2 ^ N)) = k := by - ext; simp [AONForM_i, Nat.mod_eq_of_lt k.isLt] + aonInputIndex (⟨j.val * 2 ^ N + k.val, h⟩ : Fin (M * 2 ^ N)) = k := by + ext; simp [aonInputIndex, Nat.mod_eq_of_lt k.isLt] private lemma AONForM_j_of_add {N M : Nat} (j : Fin M) (k : Fin (2 ^ N)) (h : j.val * 2 ^ N + k.val < M * 2 ^ N) : - AONForM_j (⟨j.val * 2 ^ N + k.val, h⟩ : Fin (M * 2 ^ N)) = j := by - ext; simp only [AONForM_j, Fin.val_mk] + aonOutputIndex (⟨j.val * 2 ^ N + k.val, h⟩ : Fin (M * 2 ^ N)) = j := by + ext; simp only [aonOutputIndex, Fin.val_mk] rw [show j.val * 2^N + k.val = k.val + 2^N * j.val from by rw [Nat.mul_comm j.val]; omega] rw [Nat.add_mul_div_left _ _ (Nat.two_pow_pos N), Nat.div_eq_of_lt k.isLt]; simp @@ -329,11 +335,11 @@ private def AONForM_idx {N M : Nat} (j : Fin M) (k : Fin (2 ^ N)) : have := AONForM_output_bound (N := N) j k; omega⟩ private lemma AONForM_idx_i {N M : Nat} (j : Fin M) (k : Fin (2 ^ N)) : - AONForM_i (AONForM_idx j k) = k := + aonInputIndex (AONForM_idx j k) = k := AONForM_i_of_add j k _ private lemma AONForM_idx_j {N M : Nat} (j : Fin M) (k : Fin (2 ^ N)) : - AONForM_j (AONForM_idx j k) = j := + aonOutputIndex (AONForM_idx j k) = j := AONForM_j_of_add j k _ /-- The multi-output DNF circuit correctly computes `f`. -/ @@ -347,8 +353,8 @@ theorem AONForM_is_Correct {N M : Nat} [NeZero N] [NeZero M] -- Now the goal involves Fin.foldl over wireValues at output wires -- We need to connect wireValue to mkGate eval have key : ∀ k : Fin (2^N), - (AONForM f).wireValue x ⟨N + j.val * 2 ^ N + k.val, AONForM_output_bound j k⟩ = - (AONForM_mkGate f (AONForM_idx j k)).eval ((AONForM f).wireValue x) := by + (AONForM f).wireValue x ⟨N + j.val * 2 ^ N + k.val, by exact AONForM_output_bound j k⟩ = + (aonGate f (AONForM_idx j k)).eval ((AONForM f).wireValue x) := by intro k have h := AONForM_wireValue_gate f x (AONForM_idx j k) simp only [AONForM_idx] at h @@ -356,23 +362,23 @@ theorem AONForM_is_Correct {N M : Nat} [NeZero N] [NeZero M] exact h -- Rewrite the foldl body suffices hsuff : Fin.foldl (2 ^ N) (fun acc k => - acc || (AONForM_mkGate f (AONForM_idx j k)).eval ((AONForM f).wireValue x)) false = f x j by + acc || (aonGate f (AONForM_idx j k)).eval ((AONForM f).wireValue x)) false = f x j by convert hsuff using 2 ext acc k congr 1; exact key k -- Now prove the suffices have h_iff : (Fin.foldl (2 ^ N) (fun acc k => - acc || (AONForM_mkGate f (AONForM_idx j k)).eval ((AONForM f).wireValue x)) false = true) ↔ + acc || (aonGate f (AONForM_idx j k)).eval ((AONForM f).wireValue x)) false = true) ↔ (f x j = true) := by rw [foldl_bor_eq_true] constructor · -- Some gate fires → f x j = true rintro ⟨k, hk⟩ -- Use AONForM_idx_i and AONForM_idx_j to simplify - have hi : AONForM_i (AONForM_idx j k) = k := AONForM_idx_i j k - have hj' : AONForM_j (AONForM_idx j k) = j := AONForM_idx_j j k - by_cases hfk : f (fun p => (AONForM_i (AONForM_idx j k)).val.testBit p.val) - (AONForM_j (AONForM_idx j k)) = true + have hi : aonInputIndex (AONForM_idx j k) = k := AONForM_idx_i j k + have hj' : aonOutputIndex (AONForM_idx j k) = j := AONForM_idx_j j k + by_cases hfk : f (fun p => (aonInputIndex (AONForM_idx j k)).val.testBit p.val) + (aonOutputIndex (AONForM_idx j k)) = true · rw [AONForM_mkGate_eval_true_iff f _ _ hfk] at hk rw [hi, hj'] at hfk have hxeq : ∀ p : Fin N, x p = k.val.testBit p.val := by @@ -381,15 +387,15 @@ theorem AONForM_is_Correct {N M : Nat} [NeZero N] [NeZero M] have : f x j = f (fun p => k.val.testBit p.val) j := congr_arg (· j) (congr_arg f (funext hxeq)) rw [this]; exact hfk - · have hfk' : f (fun p => (AONForM_i (AONForM_idx j k)).val.testBit p.val) - (AONForM_j (AONForM_idx j k)) = false := Bool.not_eq_true _ |>.mp hfk + · have hfk' : f (fun p => (aonInputIndex (AONForM_idx j k)).val.testBit p.val) + (aonOutputIndex (AONForM_idx j k)) = false := Bool.not_eq_true _ |>.mp hfk exact absurd (AONForM_mkGate_eval_false f _ _ hfk' ▸ hk) Bool.false_ne_true · -- f x j = true → some gate fires intro hfx obtain ⟨m, hm⟩ := exists_testBit_encode N x refine ⟨m, ?_⟩ - have hfm : f (fun p => (AONForM_i (AONForM_idx j m)).val.testBit p.val) - (AONForM_j (AONForM_idx j m)) = true := by + have hfm : f (fun p => (aonInputIndex (AONForM_idx j m)).val.testBit p.val) + (aonOutputIndex (AONForM_idx j m)) = true := by rw [AONForM_idx_i, AONForM_idx_j] convert hfx using 1; congr 1; funext p; exact hm p rw [AONForM_mkGate_eval_true_iff f _ _ hfm] @@ -398,7 +404,7 @@ theorem AONForM_is_Correct {N M : Nat} [NeZero N] [NeZero M] -- Close by Bool case analysis cases hfx : f x j <;> cases hfold : Fin.foldl (2 ^ N) (fun acc k => - acc || (AONForM_mkGate f (AONForM_idx j k)).eval ((AONForM f).wireValue x)) false <;> + acc || (aonGate f (AONForM_idx j k)).eval ((AONForM f).wireValue x)) false <;> simp_all instance : CompleteBasis Basis.unboundedAON where diff --git a/LeanPool/CircuitComplexity/Internal/Bridge.lean b/LeanPool/CircuitComplexity/Internal/Bridge.lean index 7dd44a88b3..9b37a09179 100644 --- a/LeanPool/CircuitComplexity/Internal/Bridge.lean +++ b/LeanPool/CircuitComplexity/Internal/Bridge.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.AON.Defs -import LeanPool.CircuitComplexity.Internal.CircDesc +module + +public import LeanPool.CircuitComplexity.AON.Defs +public import LeanPool.CircuitComplexity.Internal.CircDesc +public import LeanPool.CircuitComplexity.XOR +public import Mathlib.Algebra.GroupWithZero.Nat import LeanPool.CircuitComplexity.Internal.Schnorr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Internal: Bridge from CircDesc to Circuit Model @@ -18,6 +27,8 @@ The public theorems `shannon_lower_bound_circuit` and `Circ.Schnorr` respectively. -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/Internal/CircDesc.lean b/LeanPool/CircuitComplexity/Internal/CircDesc.lean index e7adc8fd12..31142c9864 100644 --- a/LeanPool/CircuitComplexity/Internal/CircDesc.lean +++ b/LeanPool/CircuitComplexity/Internal/CircDesc.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module + +public import LeanPool.CircuitComplexity.Basic +public import Mathlib.Data.Fintype.Pi +public import Mathlib.Data.Fintype.Prod import Mathlib.Data.Fintype.BigOperators -import Mathlib.Data.Nat.Log -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring import Mathlib.Tactic.IntervalCases -import LeanPool.CircuitComplexity.Basic +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.Ring.RingNF /-! # Internal: Circuit Descriptors and Shannon Counting Bound @@ -19,6 +21,8 @@ theorem `shannon_lower_bound_circuit` (which speaks in terms of `Circuit`) is in `Circ.Internal.Bridge`. -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/Internal/LowerBound.lean b/LeanPool/CircuitComplexity/Internal/LowerBound.lean index ec8bbb852a..36e4a0efe1 100644 --- a/LeanPool/CircuitComplexity/Internal/LowerBound.lean +++ b/LeanPool/CircuitComplexity/Internal/LowerBound.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module + +public import LeanPool.CircuitComplexity.EssentialInput +public import LeanPool.CircuitComplexity.AON.Defs import Mathlib.Algebra.Order.BigOperators.Group.Finset -import LeanPool.CircuitComplexity.EssentialInput -import LeanPool.CircuitComplexity.AON.Defs +import Mathlib.Data.Fintype.Sum /-! # Internal: Gate Elimination Lower Bound @@ -18,6 +21,8 @@ The public definitions (`IsEssentialInput`, `EssentialInputs`) are in `lower_bound_all_inputs`) are accessible through `Circ.LowerBound`. -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/Internal/NF.lean b/LeanPool/CircuitComplexity/Internal/NF.lean index 711ed67c04..19ba20acc4 100644 --- a/LeanPool/CircuitComplexity/Internal/NF.lean +++ b/LeanPool/CircuitComplexity/Internal/NF.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.NF.Defs -import LeanPool.CircuitComplexity.AON.Defs +module + +public import LeanPool.CircuitComplexity.NF.Defs +public import LeanPool.CircuitComplexity.AON.Defs +public import Mathlib.Data.Fintype.Pi import Mathlib.Data.Fintype.BigOperators /-! # Internal: Normal Form Proof Machinery @@ -23,6 +26,8 @@ This internal module contains the proof infrastructure for CNF/DNF: The public interface re-exports the main theorems from `Circ.NF`. -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/Internal/Nondeterminism.lean b/LeanPool/CircuitComplexity/Internal/Nondeterminism.lean index fc8ee356f7..d8605488ff 100644 --- a/LeanPool/CircuitComplexity/Internal/Nondeterminism.lean +++ b/LeanPool/CircuitComplexity/Internal/Nondeterminism.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.Nondeterminism.Defs -import LeanPool.CircuitComplexity.Internal.ShannonUpper +module + +public import LeanPool.CircuitComplexity.Nondeterminism.Defs +public import LeanPool.CircuitComplexity.AON.Defs +public import Mathlib.Algebra.GroupWithZero.Nat +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # Internal: Nondeterministic Quantification Circuit Constructions @@ -35,6 +45,8 @@ The OR of two Boolean functions has circuit complexity bounded by the sum of their complexities plus one, using `ShannonUpper.binopCircuit`. -/ +@[expose] public section + namespace CircuitComplexity @@ -62,7 +74,7 @@ private theorem andOr2_eval_two {W : Nat} (g : Gate Basis.andOr2 W) /-! ## Restriction gate construction -/ /-- A constant-output gate: `OR(x, ¬x) = true` or `AND(x, ¬x) = false`. -/ -private def mkConstGateP {G : Nat} [NeZero m] (val : Bool) (bound : Nat) : +def mkConstGateP {G : Nat} [NeZero m] (val : Bool) (bound : Nat) : { g : Gate Basis.andOr2 (k + m + G) // ∀ j : Fin g.fanIn, (g.inputs j).val < k + m + bound } := have hW : 0 < k + m + G := by have := NeZero.ne m; omega @@ -79,7 +91,7 @@ private def mkConstGateP {G : Nat} [NeZero m] (val : Bool) (bound : Nat) : fun _ => by dsimp; exact hB⟩ /-- An identity/passthrough gate: `OP(w, w)` with negation `neg`. -/ -private def mkIdentGateP {G : Nat} (op : AONOp) (w : Fin (k + m + G)) (neg : Bool) (bound : Nat) +def mkIdentGateP {G : Nat} (op : AONOp) (w : Fin (k + m + G)) (neg : Bool) (bound : Nat) (hw : w.val < k + m + bound) : { g : Gate Basis.andOr2 (k + m + G) // ∀ j : Fin g.fanIn, (g.inputs j).val < k + m + bound } := @@ -108,7 +120,7 @@ private theorem mkIdentGateP_eval {G : Nat} (op : AONOp) (w : Fin (k + m + G)) ( The gate's two inputs are inspected. For each input referencing wire 0, the effective constant `b ^^ negated` is computed. The gate is then simplified: identity, constant, or shifted, depending on the case. -/ -private def restrictGateP {G : Nat} [NeZero m] (b : Bool) +def restrictGateP {G : Nat} [NeZero m] (b : Bool) (g : Gate Basis.andOr2 ((k + 1) + m + G)) (hfanIn : g.fanIn = 2) (bound : Nat) diff --git a/LeanPool/CircuitComplexity/Internal/Schnorr.lean b/LeanPool/CircuitComplexity/Internal/Schnorr.lean index 6e191e933e..6f69b77869 100644 --- a/LeanPool/CircuitComplexity/Internal/Schnorr.lean +++ b/LeanPool/CircuitComplexity/Internal/Schnorr.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module + +public import LeanPool.CircuitComplexity.XOR +public import LeanPool.CircuitComplexity.Internal.CircDesc import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Tactic.IntervalCases -import LeanPool.CircuitComplexity.XOR -import LeanPool.CircuitComplexity.Internal.CircDesc /-! # Internal: Schnorr's Lower Bound for XOR Circuits @@ -17,6 +19,8 @@ The public definitions (`Schnorr.xorBool`, `Schnorr.xorBool_flip`, `schnorr_lower_bound_circuit` is accessible through `Circ.Schnorr`. -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/Internal/ShannonUpper.lean b/LeanPool/CircuitComplexity/Internal/ShannonUpper.lean index 0e8e107c8d..7d73f588ff 100644 --- a/LeanPool/CircuitComplexity/Internal/ShannonUpper.lean +++ b/LeanPool/CircuitComplexity/Internal/ShannonUpper.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.AON.Defs -import Mathlib.Data.Nat.Log +module + +public import LeanPool.CircuitComplexity.AON.Defs +public import Mathlib.Data.Nat.Log +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Algebra.GroupWithZero.Nat import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring +import Mathlib.Algebra.Order.Field.Basic import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # Internal: Shannon Upper Bound Construction @@ -33,6 +37,8 @@ for column functions, AND/OR combining layers. Total ≤ `18 · 2^N / N` gates for `N ≥ 16`. -/ +@[expose] public section + namespace CircuitComplexity @@ -49,7 +55,7 @@ def dataBits (N : Nat) : Nat := N - addrBits N /-! ## Gate Construction Helpers -/ /-- Build a fan-in-2 gate bundled with an acyclicity proof. -/ -private def mkGate2' (op : AONOp) {W : Nat} (w₀ w₁ : Fin W) (n₀ n₁ : Bool) +def mkGate2' (op : AONOp) {W : Nat} (w₀ w₁ : Fin W) (n₀ n₁ : Bool) (bound : Nat) (hw₀ : w₀.val < bound) (hw₁ : w₁.val < bound) : { g : Gate Basis.andOr2 W // ∀ k : Fin g.fanIn, (g.inputs k).val < bound } := ⟨{ op := op, fanIn := 2, arityOk := rfl, @@ -58,26 +64,29 @@ private def mkGate2' (op : AONOp) {W : Nat} (w₀ w₁ : Fin W) (n₀ n₁ : Boo fun k => by dsimp; split_ifs <;> assumption⟩ /-- Remap a wire from c₂'s space into the combined space. -/ -private def remap₂ (N G₁ G₂ : Nat) (w : Fin (N + G₂)) : Fin (N + (G₁ + G₂ + 2)) := +def remap₂ (N G₁ G₂ : Nat) (w : Fin (N + G₂)) : Fin (N + (G₁ + G₂ + 2)) := if h : w.val < N then ⟨w.val, by omega⟩ else ⟨w.val + G₁ + 1, by have := w.isLt; omega⟩ -private lemma remap₂_val_lt (N G₁ G₂ : Nat) (w : Fin (N + G₂)) +/-- Remapping a wire preserves its bound in the combined circuit. -/ +lemma remap₂_val_lt (N G₁ G₂ : Nat) (w : Fin (N + G₂)) (bound : Nat) (hb : G₁ + 1 ≤ bound) (hw : w.val < N + (bound - G₁ - 1)) : (remap₂ N G₁ G₂ w).val < N + bound := by unfold remap₂; split_ifs <;> dsimp <;> omega -private def gw (idx : Nat) {W : Nat} (g : Gate Basis.andOr2 W) +/-- The wire feeding the selected input of a binary AND/OR gate. -/ +def gw (idx : Nat) {W : Nat} (g : Gate Basis.andOr2 W) (_ : idx < 2 := by omega) : Fin W := g.inputs ⟨idx, by rw [andOr2_fanIn]; omega⟩ -private def gn (idx : Nat) {W : Nat} (g : Gate Basis.andOr2 W) +/-- Whether the selected input of a binary AND/OR gate is negated. -/ +def gn (idx : Nat) {W : Nat} (g : Gate Basis.andOr2 W) (_ : idx < 2 := by omega) : Bool := g.negated ⟨idx, by rw [andOr2_fanIn]; omega⟩ /-! ## Binary Circuit Composition -/ /-- Gate + acyclicity proof for the binary composition, bundled as a subtype. -/ -private def binopGWP {N G₁ G₂ : Nat} [NeZero N] +def binopGWP {N G₁ G₂ : Nat} [NeZero N] (c₁ : Circuit Basis.andOr2 N 1 G₁) (c₂ : Circuit Basis.andOr2 N 1 G₂) (i : Fin (G₁ + G₂ + 2)) : { g : Gate Basis.andOr2 (N + (G₁ + G₂ + 2)) // @@ -797,7 +806,8 @@ private noncomputable def shannonGateArray (N : Nat) have hi_eq : oD k q + j = i.val := by omega have hpbr_j : blkSz * p + r = j := by change blkSz * (j / blkSz) + j % blkSz = j; exact Nat.div_add_mod j blkSz - have hpbr : oD k q + p * blkSz + r = i.val := by nlinarith [mul_comm blkSz p] + have hpbr : oD k q + p * blkSz + r = i.val := by + rw [Nat.add_assoc, Nat.mul_comm p blkSz, hpbr_j, hi_eq] have hw0_lt : w0 < W := by change (if r = 0 then selIdx 0 else N + oD k q + p * blkSz + (r - 1)) < W split_ifs with hr0 @@ -1025,6 +1035,11 @@ private theorem or_andLayerSem_eq_f (N : Nat) have hfoldl := foldl_or_unique_true (dataSum N hN x) hds_lt hP_ne rw [hfoldl, dite_eq_left hds_lt, andLayerSem_eq N f hN x] +/-- Two negated-XOR literals recognize one two-bit assignment. -/ +private theorem mintermTwo_eval (a b p q : Bool) : + ((!p ^^ a) && (!q ^^ b)) = decide (a = p ∧ b = q) := by + decide +revert + /-- The OR chain accumulates AND-layer semantic values. This is the key wire-level fact: by induction on r, the OR-chain gate @@ -1112,8 +1127,7 @@ private theorem wireValue_dataLeaf (N : Nat) [NeZero N] decide_eq_decide.mpr hcast] simp only [Fin.forall_fin_two, Fin.val_zero, Fin.val_one, show addrBits N + 0 = addrBits N from by omega, Nat.testBit_zero] - cases x ⟨addrBits N, by omega⟩ <;> cases x ⟨addrBits N + 1, by omega⟩ <;> - cases j.testBit 1 <;> cases (decide (j % 2 = 1)) <;> simp_all + exact mintermTwo_eval _ _ _ _ · rw [dite_eq_right hjL1] simp only [mkG, Gate.eval, andOr2_basis_eval, AONOp.eval, Fin.foldl_succ_last, Fin.foldl_zero, Bool.true_and] @@ -1281,8 +1295,7 @@ private theorem colOutput_addrLeaf (N : Nat) [NeZero N] conv_rhs => rw [show treePos j (treeLevel j) = j from by rw [htl]; exact htp] rw [decide_eq_decide.mpr hcast] <;> [skip; exact inferInstance] simp only [Fin.forall_fin_two, Fin.val_zero, Fin.val_one, Nat.testBit_zero] - cases x ⟨0, hN2 0 (by omega)⟩ <;> cases x ⟨1, hN2 1 (by omega)⟩ <;> - cases j.testBit 1 <;> cases (decide (j % 2 = 1)) <;> simp_all + exact mintermTwo_eval _ _ _ _ · rw [dite_eq_right hjL1] simp only [mkG, Gate.eval, andOr2_basis_eval, AONOp.eval, Fin.foldl_succ_last, Fin.foldl_zero, Bool.true_and] @@ -1445,50 +1458,10 @@ private theorem wireValue_colOutput (N : Nat) [NeZero N] (List.range (r + 2)).foldl (fun acc a => acc || (Nat.testBit p a && decide (a = aSum))) false := by intro r hr hrW - have hsz_eq : szSections k q = szSections (addrBits N) (dataBits N) := rfl - have hoC_eq : oC q = oC (dataBits N) := rfl - have hW_bound : N + oC q + (2 ^ k - 4) + (2 ^ k) ≤ N + szSections k q := by - have : oD k q ≤ szSections k q := by - change oD (addrBits N) (dataBits N) ≤ szSections (addrBits N) (dataBits N) - unfold szSections oD oC; omega - have : oC q + (2 ^ k - 4) + 2 ^ k ≤ oD k q := by - change oC (dataBits N) + (2 ^ (addrBits N) - 4) + 2 ^ (addrBits N) ≤ - oD (addrBits N) (dataBits N) - unfold oD oC - have : 2 ^ (addrBits N + 1) - 4 = (2 ^ addrBits N - 4) + 2 ^ addrBits N := by - have := pow_double (addrBits N) - have := pow_ge_4 (addrBits N) (show 2 ≤ addrBits N from by omega) - omega - linarith - omega have hoE_lt : oD k q + p * (2 ^ k - 1) + (2 ^ k - 1) ≤ oE k q := by - change oD (addrBits N) (dataBits N) + - colPatIdx N f (addrBits N) (dataBits N) (addrDataSum N hN) ⟨y, hy⟩ * - (2 ^ (addrBits N) - 1) + (2 ^ (addrBits N) - 1) ≤ - oE (addrBits N) (dataBits N) - unfold oE oD - have := Nat.mul_le_mul_right (2 ^ (addrBits N) - 1) - (show colPatIdx N f (addrBits N) (dataBits N) (addrDataSum N hN) ⟨y, hy⟩ + 1 ≤ - 2 ^ (2 ^ addrBits N) from by exact hp_lt) - nlinarith - have hsel_bound (pos : Nat) (hpos : pos < 2 ^ k) : - N + oC q + (2 ^ k - 4) + pos < N + szSections k q := - lt_of_lt_of_le (show N + oC q + (2 ^ k - 4) + pos < - N + oC q + (2 ^ k - 4) + 2 ^ k from by omega) hW_bound - have selWire (pos : Nat) (hpos : pos < 2 ^ k) : - (if Nat.testBit p pos then - (shannonCircuit N f hN).wireValue x - ⟨N + oC q + (2 ^ k - 4) + pos, hsel_bound pos hpos⟩ - else - (shannonCircuit N f hN).wireValue x ⟨N, by linarith [hsel_bound pos hpos]⟩) = - (Nat.testBit p pos && decide (pos = aSum)) := by - split_ifs with htb - · have h := colOutput_addrLeaf N f hN x pos hpos (hsel_bound pos hpos) - rw [show (Nat.testBit p pos && decide (pos = aSum)) = decide (pos = aSum) from by - simp [htb]] - exact h - · have h := colOutput_constFalse N f hN x (by linarith [hsel_bound pos hpos]) - simp_all + unfold oE + rw [Nat.add_assoc, ← Nat.succ_mul] + exact Nat.add_le_add_left (Nat.mul_le_mul_right _ hp_lt) _ induction r with | zero => have h_ne0 : oD k q + p * (2 ^ k - 1) ≠ 0 := by @@ -1531,8 +1504,8 @@ private theorem wireValue_colOutput (N : Nat) [NeZero N] exact colOutput_addrLeaf N f hN x _ (hbk ▸ (show _ < 2 ^ k by omega)) _ · simp only [Bool.eq_false_iff.mpr htb, Bool.false_and]; exact colOutput_constFalse N f hN x _ | succ r' ih => - have h_ne0' : oD k q + p * (2 ^ k - 1) + (r' + 1) ≠ 0 := by - simp_all + have h_ne0' : oD k q + p * (2 ^ k - 1) + (r' + 1) ≠ 0 := + Nat.succ_ne_zero _ have h_ge_oC' : ¬(oD k q + p * (2 ^ k - 1) + (r' + 1) < oC q) := by simp only [show k = addrBits N from rfl, show q = dataBits N from rfl] at * unfold oD oC; omega @@ -1551,7 +1524,7 @@ private theorem wireValue_colOutput (N : Nat) [NeZero N] p * (2 ^ k - 1) + (r' + 1) from by omega] simp only [show (p * (2 ^ k - 1) + (r' + 1)) / (2 ^ k - 1) = p from Nat.div_eq_of_lt_le (by omega) - (show p * (2 ^ k - 1) + (r' + 1) < (p + 1) * (2 ^ k - 1) by nlinarith), + (by simpa only [Nat.succ_mul] using Nat.add_lt_add_left hr (p * (2 ^ k - 1))), show (p * (2 ^ k - 1) + (r' + 1)) % (2 ^ k - 1) = r' + 1 from by rw [show p * (2 ^ k - 1) + (r' + 1) = (r' + 1) + (2 ^ k - 1) * p from by ring, Nat.add_mul_mod_self_left]; exact Nat.mod_eq_of_lt (by omega)] diff --git a/LeanPool/CircuitComplexity/Internal/Simulation.lean b/LeanPool/CircuitComplexity/Internal/Simulation.lean index bb00a80a7b..4ba30b599d 100644 --- a/LeanPool/CircuitComplexity/Internal/Simulation.lean +++ b/LeanPool/CircuitComplexity/Internal/Simulation.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module + +public import LeanPool.CircuitComplexity.AON.Defs import LeanPool.CircuitComplexity.Internal.AON /-! # Internal: Completeness of fan-in-2 AND/OR @@ -28,6 +31,8 @@ gates followed by chains for all original output gates. The new output gates are trivial passthroughs reading the last wire of each output chain. -/ +@[expose] public section + namespace CircuitComplexity @@ -269,11 +274,11 @@ def fin2 (a b : α) : Fin 2 → α := fun i => if i.val = 0 then a else b @[simp] lemma fin2_one (a b : α) : fin2 a b 1 = b := rfl /-- Operation for the chain gate: dual-op for constants, same op otherwise. -/ -private def mkChainOp (op : AONOp) (k : Nat) : AONOp := +def mkChainOp (op : AONOp) (k : Nat) : AONOp := if k = 0 then op.dual else op /-- Input wires for the j-th chain gate. -/ -private def mkChainInputs {W : Nat} (hW : 0 < W) (k : Nat) +def mkChainInputs {W : Nat} (hW : 0 < W) (k : Nat) (ri : Fin k → Fin W) (base : Nat) (j : Nat) (hj : j < chainLen k) (hbase : base + chainLen k ≤ W) : Fin 2 → Fin W := if hk0 : k = 0 then fun _ => ⟨0, hW⟩ @@ -287,7 +292,7 @@ private def mkChainInputs {W : Nat} (hW : 0 < W) (k : Nat) fin2 ⟨base + j - 1, by omega⟩ (ri ⟨j + 1, by omega⟩) /-- Negation flags for the j-th chain gate. -/ -private def mkChainNeg (k : Nat) (rn : Fin k → Bool) (j : Nat) +def mkChainNeg (k : Nat) (rn : Fin k → Bool) (j : Nat) (hj : j < chainLen k) : Fin 2 → Bool := if hk0 : k = 0 then fin2 false true else if hk1 : k = 1 then fun _ => rn ⟨0, by omega⟩ @@ -328,7 +333,7 @@ private lemma mkChainInputs_lt {W : Nat} (hW : 0 < W) (k : Nat) /-! ## Compiled circuit -/ /-- Input wires for the compiled gate at flat index `idx`. -/ -private def compileGateInputs (c : Circuit Basis.unboundedAON N M G) (idx : Fin (G' c)) : +def compileGateInputs (c : Circuit Basis.unboundedAON N M G) (idx : Fin (G' c)) : Fin 2 → Fin (N + G' c) := if h : idx.val < iTotal c then let seg := segLookup G (iChainF c) idx.val h @@ -352,7 +357,7 @@ private def compileGateInputs (c : Circuit Basis.unboundedAON N M G) (idx : Fin (by have := oOffset_chain_le_G' c hj; omega) /-- Operation for the compiled gate at flat index `idx`. -/ -private def compileGateOp (c : Circuit Basis.unboundedAON N M G) (idx : Fin (G' c)) : AONOp := +def compileGateOp (c : Circuit Basis.unboundedAON N M G) (idx : Fin (G' c)) : AONOp := if h : idx.val < iTotal c then let seg := segLookup G (iChainF c) idx.val h have hi : seg.1 < G := segLookup_fst_lt G _ _ h @@ -365,7 +370,7 @@ private def compileGateOp (c : Circuit Basis.unboundedAON N M G) (idx : Fin (G' mkChainOp (c.outputs ⟨seg.1, hj⟩).op (c.outputs ⟨seg.1, hj⟩).fanIn /-- Negation flags for the compiled gate at flat index `idx`. -/ -private def compileGateNeg (c : Circuit Basis.unboundedAON N M G) (idx : Fin (G' c)) : +def compileGateNeg (c : Circuit Basis.unboundedAON N M G) (idx : Fin (G' c)) : Fin 2 → Bool := if h : idx.val < iTotal c then let seg := segLookup G (iChainF c) idx.val h diff --git a/LeanPool/CircuitComplexity/Internal/Valiant.lean b/LeanPool/CircuitComplexity/Internal/Valiant.lean index ec55dfb79d..5f680a3d01 100644 --- a/LeanPool/CircuitComplexity/Internal/Valiant.lean +++ b/LeanPool/CircuitComplexity/Internal/Valiant.lean @@ -3,16 +3,16 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.Digraph.Defs -import Mathlib.Algebra.BigOperators.Group.Finset.Basic +module + +public import LeanPool.CircuitComplexity.Digraph.Defs +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import Mathlib.Algebra.Order.BigOperators.Group.Finset -import Mathlib.Data.Finset.Card -import Mathlib.Data.Finset.Max +import Mathlib.Algebra.Order.Ring.Nat +import Mathlib.Algebra.Order.Sub.Basic import Mathlib.Data.Fintype.BigOperators -import Mathlib.Data.Fintype.Prod import Mathlib.Data.Nat.Bitwise -import Mathlib.Data.Nat.Log -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Ring.RingNF /-! # Internal helpers for Valiant's Depth Reduction Lemma @@ -25,6 +25,8 @@ labeling argument, the edge partition by first-differing bit, the averaging step, and the relabeling-after-removal bound. -/ +@[expose] public section + namespace Digraph /-- The **canonical labeling** of `G`: the length — node count — of a diff --git a/LeanPool/CircuitComplexity/LowerBound.lean b/LeanPool/CircuitComplexity/LowerBound.lean index 5bbf709dd4..df4de71eee 100644 --- a/LeanPool/CircuitComplexity/LowerBound.lean +++ b/LeanPool/CircuitComplexity/LowerBound.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.EssentialInput -import LeanPool.CircuitComplexity.Internal.LowerBound +module + +public import LeanPool.CircuitComplexity.EssentialInput +public import LeanPool.CircuitComplexity.Internal.LowerBound + +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # Gate Elimination Lower Bound @@ -42,6 +49,8 @@ And its corollary for functions that depend on all inputs: N ≤ k * c.size -/ +@[expose] public section + namespace CircuitComplexity end CircuitComplexity diff --git a/LeanPool/CircuitComplexity/NF.lean b/LeanPool/CircuitComplexity/NF.lean index f5d5a13660..3e0b25439b 100644 --- a/LeanPool/CircuitComplexity/NF.lean +++ b/LeanPool/CircuitComplexity/NF.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.NF.Defs +module + +public import LeanPool.CircuitComplexity.NF.Defs +public import LeanPool.CircuitComplexity.XOR import LeanPool.CircuitComplexity.Internal.NF -import LeanPool.CircuitComplexity.XOR /-! # Normal Forms: CNF/DNF Lower Bound for XOR @@ -31,6 +33,8 @@ De Morgan duality (`CNF.neg`). * `CNF.xorBool_complexity_lb` — any CNF computing XOR has `≥ 2^{N-1}` clauses -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/NF/Defs.lean b/LeanPool/CircuitComplexity/NF/Defs.lean index 158d3d3024..53ace4e507 100644 --- a/LeanPool/CircuitComplexity/NF/Defs.lean +++ b/LeanPool/CircuitComplexity/NF/Defs.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.Basic +module + +public import LeanPool.CircuitComplexity.Basic /-! # Normal Forms — Core Definitions @@ -21,6 +23,8 @@ complexity measures, and De Morgan negation duality. * `CNF.neg` / `DNF.neg` — De Morgan negation (CNF ↔ DNF) -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/Nondeterminism.lean b/LeanPool/CircuitComplexity/Nondeterminism.lean index a2f6f2b3c7..a2e764a5d8 100644 --- a/LeanPool/CircuitComplexity/Nondeterminism.lean +++ b/LeanPool/CircuitComplexity/Nondeterminism.lean @@ -3,9 +3,21 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.Nondeterminism.Defs +module + +public import LeanPool.CircuitComplexity.Nondeterminism.Defs +public import LeanPool.CircuitComplexity.AON.Defs +public import Mathlib.Algebra.GroupWithZero.Nat import LeanPool.CircuitComplexity.Internal.Nondeterminism +import LeanPool.CircuitComplexity.Internal.ShannonUpper import LeanPool.CircuitComplexity.Shannon +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # Nondeterministic Circuit Complexity Bounds @@ -46,6 +58,8 @@ The naive bound is tighter when `k` is small and `f` has low complexity; the Shannon bound wins when `k` is large, regardless of `f`'s complexity. -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/Nondeterminism/Defs.lean b/LeanPool/CircuitComplexity/Nondeterminism/Defs.lean index 32be3eaa81..c8c2128896 100644 --- a/LeanPool/CircuitComplexity/Nondeterminism/Defs.lean +++ b/LeanPool/CircuitComplexity/Nondeterminism/Defs.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.Basic -import Mathlib.Data.Fin.Tuple.Basic -import Mathlib.Data.Fintype.BigOperators +module + +public import LeanPool.CircuitComplexity.Basic +public import Mathlib.Data.Fintype.Pi /-! # Nondeterministic Quantification of Boolean Functions @@ -32,6 +33,8 @@ guesses the first `k` input bits. * `existQuantify_mono` — monotonicity under pointwise implication -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/Schnorr.lean b/LeanPool/CircuitComplexity/Schnorr.lean index 599878290c..04fe681373 100644 --- a/LeanPool/CircuitComplexity/Schnorr.lean +++ b/LeanPool/CircuitComplexity/Schnorr.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.XOR +module + +public import LeanPool.CircuitComplexity.XOR +public import LeanPool.CircuitComplexity.AON.Defs +public import Mathlib.Algebra.GroupWithZero.Nat import LeanPool.CircuitComplexity.Internal.Bridge +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Schnorr's Lower Bound for XOR Circuits @@ -39,6 +48,8 @@ When `Basis.andOr2` is known to be complete, this yields a `sizeComplexity` bound via `schnorr_size_complexity`. -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/Shannon.lean b/LeanPool/CircuitComplexity/Shannon.lean index 6ece3fad06..7577e0f7ed 100644 --- a/LeanPool/CircuitComplexity/Shannon.lean +++ b/LeanPool/CircuitComplexity/Shannon.lean @@ -3,8 +3,19 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module + +public import LeanPool.CircuitComplexity.AON.Defs +public import Mathlib.Algebra.GroupWithZero.Nat import LeanPool.CircuitComplexity.Internal.Bridge import LeanPool.CircuitComplexity.Internal.ShannonUpper +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # Shannon Bounds @@ -37,6 +48,8 @@ When `Basis.andOr2` is known to be complete, this yields a Together these establish that worst-case circuit complexity is `Θ(2^N / N)`. -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/CircuitComplexity/Valiant.lean b/LeanPool/CircuitComplexity/Valiant.lean index 491ac58dc6..45caf539be 100644 --- a/LeanPool/CircuitComplexity/Valiant.lean +++ b/LeanPool/CircuitComplexity/Valiant.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module + +public import LeanPool.CircuitComplexity.Digraph.Defs import LeanPool.CircuitComplexity.Internal.Valiant +import Mathlib.Algebra.BigOperators.Group.Finset.Basic +import Mathlib.Algebra.Order.Ring.Nat +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # Valiant's Depth Reduction Lemma @@ -33,6 +40,8 @@ first-differing bit, averaging, and the relabeling-after-removal bound — lives in `Circ.Internal.Valiant`. -/ +@[expose] public section + namespace CircuitComplexity.Valiant open Digraph diff --git a/LeanPool/CircuitComplexity/XOR.lean b/LeanPool/CircuitComplexity/XOR.lean index 777cc2db7b..9df6ffda8b 100644 --- a/LeanPool/CircuitComplexity/XOR.lean +++ b/LeanPool/CircuitComplexity/XOR.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.CircuitComplexity.Basic +module + +public import LeanPool.CircuitComplexity.Basic /-! # XOR (Parity) Function @@ -19,6 +21,8 @@ This module defines the N-input XOR function and its key properties. * `Schnorr.xorBool_essential` — XOR depends on all inputs -/ +@[expose] public section + namespace CircuitComplexity diff --git a/LeanPool/Circuitlib.lean b/LeanPool/Circuitlib.lean index d2d17eeefd..91bf29a855 100644 --- a/LeanPool/Circuitlib.lean +++ b/LeanPool/Circuitlib.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Matt Hunzinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matt Hunzinger -/ +module -import LeanPool.Circuitlib.Circuit.Combinational -import LeanPool.Circuitlib.Circuit.Category.Sequential +public import LeanPool.Circuitlib.Circuit.Combinational +public import LeanPool.Circuitlib.Circuit.Category.Sequential /-! # circuitlib: a circuit verification library for Lean 4 @@ -17,3 +18,5 @@ Main declarations: `Circuit.SequentialCircuitCategory.instSymmetricCategory` Tags: circuits, hardware, category-theory, combinational, sequential MSC: 18M05, 68Q60, 94C11 -/ + +@[expose] public section diff --git a/LeanPool/Circuitlib/Circuit/Basic.lean b/LeanPool/Circuitlib/Circuit/Basic.lean index 1d2622dd7b..0c252bef40 100644 --- a/LeanPool/Circuitlib/Circuit/Basic.lean +++ b/LeanPool/Circuitlib/Circuit/Basic.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Matt Hunzinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matt Hunzinger -/ +module -import LeanPool.Circuitlib.Circuit.Category.Basic -import LeanPool.Circuitlib.Circuit.Belnap.Gate -import Mathlib.CategoryTheory.Monoidal.Category +public import Mathlib.CategoryTheory.Monoidal.Category + +public import LeanPool.Circuitlib.Circuit.Category.Basic +public import LeanPool.Circuitlib.Circuit.Belnap.Gate /-! # Circuits @@ -17,6 +19,8 @@ import Mathlib.CategoryTheory.Monoidal.Category -/ +@[expose] public section + namespace Circuit open CategoryTheory diff --git a/LeanPool/Circuitlib/Circuit/Belnap/Basic.lean b/LeanPool/Circuitlib/Circuit/Belnap/Basic.lean index 408d30466c..0e4207c71a 100644 --- a/LeanPool/Circuitlib/Circuit/Belnap/Basic.lean +++ b/LeanPool/Circuitlib/Circuit/Belnap/Basic.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Matt Hunzinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matt Hunzinger -/ +module -import LeanPool.Circuitlib.Circuit.Belnap.Level -import LeanPool.Circuitlib.Circuit.Wires +public import LeanPool.Circuitlib.Circuit.Belnap.Level +public import LeanPool.Circuitlib.Circuit.Wires /-! # Belnap circuits @@ -16,6 +17,8 @@ import LeanPool.Circuitlib.Circuit.Wires -/ +@[expose] public section + namespace Circuit namespace Belnap diff --git a/LeanPool/Circuitlib/Circuit/Belnap/Gate.lean b/LeanPool/Circuitlib/Circuit/Belnap/Gate.lean index 65563ac05f..bfc5fe9f6a 100644 --- a/LeanPool/Circuitlib/Circuit/Belnap/Gate.lean +++ b/LeanPool/Circuitlib/Circuit/Belnap/Gate.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Matt Hunzinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matt Hunzinger -/ +module -import LeanPool.Circuitlib.Circuit.Belnap.Basic -import LeanPool.Circuitlib.Circuit.Gate +public import LeanPool.Circuitlib.Circuit.Belnap.Basic +public import LeanPool.Circuitlib.Circuit.Gate /-! # Belnap gates @@ -16,6 +17,8 @@ import LeanPool.Circuitlib.Circuit.Gate -/ +@[expose] public section + namespace Circuit /-- The gate set for Belnap circuits: the logical AND, OR and NOT gates. -/ diff --git a/LeanPool/Circuitlib/Circuit/Belnap/Level.lean b/LeanPool/Circuitlib/Circuit/Belnap/Level.lean index 1220868712..9abaaae169 100644 --- a/LeanPool/Circuitlib/Circuit/Belnap/Level.lean +++ b/LeanPool/Circuitlib/Circuit/Belnap/Level.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Matt Hunzinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matt Hunzinger -/ +module -import Mathlib.Order.WithBotTop +public import Mathlib.Order.WithBotTop /-! # Belnap levels @@ -15,6 +16,8 @@ import Mathlib.Order.WithBotTop -/ +@[expose] public section + namespace Circuit /-- The Belnap four-valued logic lattice on `Bool`, with a bottom (no information) and a diff --git a/LeanPool/Circuitlib/Circuit/Category/Basic.lean b/LeanPool/Circuitlib/Circuit/Category/Basic.lean index 9a65bdbeaf..d27db8f7fc 100644 --- a/LeanPool/Circuitlib/Circuit/Category/Basic.lean +++ b/LeanPool/Circuitlib/Circuit/Category/Basic.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Matt Hunzinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matt Hunzinger -/ +module -import LeanPool.Circuitlib.Circuit.Gate -import Mathlib.CategoryTheory.Category.Basic +public import LeanPool.Circuitlib.Circuit.Gate +public import Mathlib.CategoryTheory.Category.Basic /-! # Circuit category @@ -15,6 +16,8 @@ import Mathlib.CategoryTheory.Category.Basic -/ +@[expose] public section + namespace Circuit open CategoryTheory diff --git a/LeanPool/Circuitlib/Circuit/Category/Combinational.lean b/LeanPool/Circuitlib/Circuit/Category/Combinational.lean index d91ad9c49f..bb7366cf07 100644 --- a/LeanPool/Circuitlib/Circuit/Category/Combinational.lean +++ b/LeanPool/Circuitlib/Circuit/Category/Combinational.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Matt Hunzinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matt Hunzinger -/ +module -import LeanPool.Circuitlib.Circuit.Category.Basic -import Mathlib.CategoryTheory.Monoidal.Braided.Basic +public import LeanPool.Circuitlib.Circuit.Category.Basic +public import Mathlib.CategoryTheory.Monoidal.Braided.Basic +import Mathlib.Tactic.Attr.Core /-! # Combinational circuit category @@ -15,6 +17,8 @@ import Mathlib.CategoryTheory.Monoidal.Braided.Basic -/ +@[expose] public section + namespace Circuit /-- Category of combinational circuits. -/ diff --git a/LeanPool/Circuitlib/Circuit/Category/Sequential.lean b/LeanPool/Circuitlib/Circuit/Category/Sequential.lean index 5033096f42..b853b5e6a4 100644 --- a/LeanPool/Circuitlib/Circuit/Category/Sequential.lean +++ b/LeanPool/Circuitlib/Circuit/Category/Sequential.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Matt Hunzinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matt Hunzinger -/ +module -import LeanPool.Circuitlib.Circuit.Category.Combinational -import Mathlib.Data.Stream.Init +public import LeanPool.Circuitlib.Circuit.Wires +public import Mathlib.CategoryTheory.Monoidal.Braided.Basic +public import Mathlib.Data.Stream.Defs +import Mathlib.Tactic.Attr.Core /-! # Sequential circuit category @@ -15,6 +18,8 @@ import Mathlib.Data.Stream.Init -/ +@[expose] public section + namespace Circuit /-- Category of sequential circuits. -/ diff --git a/LeanPool/Circuitlib/Circuit/Combinational.lean b/LeanPool/Circuitlib/Circuit/Combinational.lean index 4e02cf32aa..e9eb084400 100644 --- a/LeanPool/Circuitlib/Circuit/Combinational.lean +++ b/LeanPool/Circuitlib/Circuit/Combinational.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Matt Hunzinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matt Hunzinger -/ +module -import LeanPool.Circuitlib.Circuit.Category.Combinational -import LeanPool.Circuitlib.Circuit.Basic +public import LeanPool.Circuitlib.Circuit.Category.Combinational +public import LeanPool.Circuitlib.Circuit.Basic /-! # Combinational circuits @@ -16,6 +17,8 @@ import LeanPool.Circuitlib.Circuit.Basic -/ +@[expose] public section + namespace Circuit open CategoryTheory diff --git a/LeanPool/Circuitlib/Circuit/Gate.lean b/LeanPool/Circuitlib/Circuit/Gate.lean index 6bebdcd3da..ac80530d7c 100644 --- a/LeanPool/Circuitlib/Circuit/Gate.lean +++ b/LeanPool/Circuitlib/Circuit/Gate.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Matt Hunzinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matt Hunzinger -/ +module -import LeanPool.Circuitlib.Circuit.Wires -import Mathlib.Tactic.TypeStar -import Mathlib.Order.Monotone.Defs +public import LeanPool.Circuitlib.Circuit.Wires +public import Mathlib.Order.Monotone.Defs /-! # Gates @@ -16,6 +16,8 @@ import Mathlib.Order.Monotone.Defs -/ +@[expose] public section + namespace Circuit /-- Logic gate. -/ diff --git a/LeanPool/Circuitlib/Circuit/Wires.lean b/LeanPool/Circuitlib/Circuit/Wires.lean index fd17d1867b..6cff166016 100644 --- a/LeanPool/Circuitlib/Circuit/Wires.lean +++ b/LeanPool/Circuitlib/Circuit/Wires.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Matt Hunzinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matt Hunzinger -/ +module -import Mathlib.Data.Nat.Notation -import Mathlib.Order.Defs.PartialOrder +public import Mathlib.Data.Nat.Notation +public import Mathlib.Order.Defs.PartialOrder /-! # Wires @@ -15,6 +16,8 @@ import Mathlib.Order.Defs.PartialOrder -/ +@[expose] public section + namespace Circuit /-- A bundle of `I` wires, each carrying a value of type `V`. -/ diff --git a/LeanPool/ClassificationOfSurfaces.lean b/LeanPool/ClassificationOfSurfaces.lean index a18179af6c..1fba4961b6 100644 --- a/LeanPool/ClassificationOfSurfaces.lean +++ b/LeanPool/ClassificationOfSurfaces.lean @@ -3,137 +3,141 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module -import LeanPool.ClassificationOfSurfaces.API -import LeanPool.ClassificationOfSurfaces.Basic -import LeanPool.ClassificationOfSurfaces.CanonicalCoordinates -import LeanPool.ClassificationOfSurfaces.CanonicalGeneratorMaps -import LeanPool.ClassificationOfSurfaces.CanonicalPairings -import LeanPool.ClassificationOfSurfaces.CanonicalWords -import LeanPool.ClassificationOfSurfaces.CellComplex -import LeanPool.ClassificationOfSurfaces.CellComplexQuotient -import LeanPool.ClassificationOfSurfaces.DiskSquare -import LeanPool.ClassificationOfSurfaces.EvalStatement -import LeanPool.ClassificationOfSurfaces.Examples -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCancellation -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonical -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonicalRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCrosscap -import LeanPool.ClassificationOfSurfaces.FiniteCyclicDerivedRewrites -import LeanPool.ClassificationOfSurfaces.FiniteCyclicDyck -import LeanPool.ClassificationOfSurfaces.FiniteCyclicFaceMerge -import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoveRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoves -import LeanPool.ClassificationOfSurfaces.FiniteCyclicNormalization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicNormalizationResult -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP1 -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP1Realization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2 -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2DegenerateRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2Realization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicPresentation -import LeanPool.ClassificationOfSurfaces.FiniteCyclicRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicReduction -import LeanPool.ClassificationOfSurfaces.FiniteCyclicSignedRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicSphereRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicTerminalNormalization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicTriangulation -import LeanPool.ClassificationOfSurfaces.FiniteCyclicUnorientedRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicWordReduction -import LeanPool.ClassificationOfSurfaces.GeometricTriangulationRealization -import LeanPool.ClassificationOfSurfaces.LeanEval.ChallengeDeps -import LeanPool.ClassificationOfSurfaces.LeanEval.RepresentativeSanity -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveControlledApproximation -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveFanAffine -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveFanComplex -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveOpenComplex -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveOpenCover -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveTileComplex -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveTriangulation -import LeanPool.ClassificationOfSurfaces.Moise.AmbientHomeomorph -import LeanPool.ClassificationOfSurfaces.Moise.Anchors -import LeanPool.ClassificationOfSurfaces.Moise.BoundaryInvariant -import LeanPool.ClassificationOfSurfaces.Moise.BrokenLine -import LeanPool.ClassificationOfSurfaces.Moise.Brouwer -import LeanPool.ClassificationOfSurfaces.Moise.ChartExtraction -import LeanPool.ClassificationOfSurfaces.Moise.ChartInduction -import LeanPool.ClassificationOfSurfaces.Moise.ChartPatch -import LeanPool.ClassificationOfSurfaces.Moise.CommonSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension -import LeanPool.ClassificationOfSurfaces.Moise.Countermodels -import LeanPool.ClassificationOfSurfaces.Moise.DualConnectivity -import LeanPool.ClassificationOfSurfaces.Moise.ElementaryMove -import LeanPool.ClassificationOfSurfaces.Moise.EmbeddedComplexValence -import LeanPool.ClassificationOfSurfaces.Moise.FacewiseComparison -import LeanPool.ClassificationOfSurfaces.Moise.FineSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.FinitePLHomeomorph -import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangle -import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangleMove -import LeanPool.ClassificationOfSurfaces.Moise.FrontierGlue -import LeanPool.ClassificationOfSurfaces.Moise.GeometricTriangulation -import LeanPool.ClassificationOfSurfaces.Moise.GraphPolygonalization -import LeanPool.ClassificationOfSurfaces.Moise.GraphRefinement -import LeanPool.ClassificationOfSurfaces.Moise.GraphSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.HalfPlanePolygon -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicCellwiseExtension -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicCloseCellwiseExtension -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicCloseGraphApproximation -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicComplex -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceBoundary -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceExtension -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceFilling -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFineSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphApproximation -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphModel -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphPL -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicMarkedFan -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicMidpointSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.LineSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteCellwiseExtension -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteControlledApproximation -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceBoundary -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceExtension -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceFilling -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceModel -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteGraphApproximation -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteGraphPL -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFinitePLApproximation -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteSidePreservation -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteTriangulation -import LeanPool.ClassificationOfSurfaces.Moise.NoRetraction -import LeanPool.ClassificationOfSurfaces.Moise.OpenMidpointComplex -import LeanPool.ClassificationOfSurfaces.Moise.PLApproximation -import LeanPool.ClassificationOfSurfaces.Moise.PLMoves -import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex -import LeanPool.ClassificationOfSurfaces.Moise.PlaneCycle -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArc -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArcModel -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalCrosscut -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalFamilyPolyhedron -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalJordan -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalPolyhedron -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalSchoenflies -import LeanPool.ClassificationOfSurfaces.Moise.PuncturedSurface -import LeanPool.ClassificationOfSurfaces.Moise.RelativeSynchronizedArrangement -import LeanPool.ClassificationOfSurfaces.Moise.ThinKiteMove -import LeanPool.ClassificationOfSurfaces.NormalForm -import LeanPool.ClassificationOfSurfaces.P2DegenerateDisk -import LeanPool.ClassificationOfSurfaces.PolygonCellRadial -import LeanPool.ClassificationOfSurfaces.PolygonalQuotient -import LeanPool.ClassificationOfSurfaces.RepresentativeCarrier -import LeanPool.ClassificationOfSurfaces.Representatives -import LeanPool.ClassificationOfSurfaces.SignedPresentation -import LeanPool.ClassificationOfSurfaces.SphereCarrierGeometry -import LeanPool.ClassificationOfSurfaces.SphereHemisphere -import LeanPool.ClassificationOfSurfaces.SphereQuotientHomeomorph -import LeanPool.ClassificationOfSurfaces.StrongVertexStar -import LeanPool.ClassificationOfSurfaces.Surface -import LeanPool.ClassificationOfSurfaces.Topology.InvarianceOfDomain -import LeanPool.ClassificationOfSurfaces.TriangleCell -import LeanPool.ClassificationOfSurfaces.Triangulation -import LeanPool.ClassificationOfSurfaces.WeightedCircle +public import LeanPool.ClassificationOfSurfaces.API +public import LeanPool.ClassificationOfSurfaces.Basic +public import LeanPool.ClassificationOfSurfaces.CanonicalCoordinates +public import LeanPool.ClassificationOfSurfaces.CanonicalGeneratorMaps +public import LeanPool.ClassificationOfSurfaces.CanonicalPairings +public import LeanPool.ClassificationOfSurfaces.CanonicalWords +public import LeanPool.ClassificationOfSurfaces.CellComplex +public import LeanPool.ClassificationOfSurfaces.CellComplexQuotient +public import LeanPool.ClassificationOfSurfaces.DiskSquare +public import LeanPool.ClassificationOfSurfaces.EvalStatement +public import LeanPool.ClassificationOfSurfaces.Examples +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCancellation +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonical +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonicalRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCrosscap +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicDerivedRewrites +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicDyck +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicFaceMerge +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoveRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoves +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicNormalization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicNormalizationResult +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicP1 +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicP1Realization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2 +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2DegenerateRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2Realization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicPresentation +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicReduction +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicSignedRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicSphereRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicTerminalNormalization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicTriangulation +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicUnorientedRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicWordReduction +public import LeanPool.ClassificationOfSurfaces.GeometricTriangulationRealization +public import LeanPool.ClassificationOfSurfaces.LeanEval.ChallengeDeps +public import LeanPool.ClassificationOfSurfaces.LeanEval.RepresentativeSanity +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveControlledApproximation +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveFanAffine +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveFanComplex +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveOpenComplex +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveOpenCover +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveTileComplex +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveTriangulation +public import LeanPool.ClassificationOfSurfaces.Moise.AmbientHomeomorph +public import LeanPool.ClassificationOfSurfaces.Moise.Anchors +public import LeanPool.ClassificationOfSurfaces.Moise.BoundaryInvariant +public import LeanPool.ClassificationOfSurfaces.Moise.BrokenLine +public import LeanPool.ClassificationOfSurfaces.Moise.Brouwer +public import LeanPool.ClassificationOfSurfaces.Moise.ChartExtraction +public import LeanPool.ClassificationOfSurfaces.Moise.ChartInduction +public import LeanPool.ClassificationOfSurfaces.Moise.ChartPatch +public import LeanPool.ClassificationOfSurfaces.Moise.CommonSubdivision +public import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension +public import LeanPool.ClassificationOfSurfaces.Moise.Countermodels +public import LeanPool.ClassificationOfSurfaces.Moise.DualConnectivity +public import LeanPool.ClassificationOfSurfaces.Moise.ElementaryMove +public import LeanPool.ClassificationOfSurfaces.Moise.EmbeddedComplexValence +public import LeanPool.ClassificationOfSurfaces.Moise.FacewiseComparison +public import LeanPool.ClassificationOfSurfaces.Moise.FineSubdivision +public import LeanPool.ClassificationOfSurfaces.Moise.FinitePLHomeomorph +public import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangle +public import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangleMove +public import LeanPool.ClassificationOfSurfaces.Moise.FrontierGlue +public import LeanPool.ClassificationOfSurfaces.Moise.GeometricTriangulation +public import LeanPool.ClassificationOfSurfaces.Moise.GraphPolygonalization +public import LeanPool.ClassificationOfSurfaces.Moise.GraphRefinement +public import LeanPool.ClassificationOfSurfaces.Moise.GraphSubdivision +public import LeanPool.ClassificationOfSurfaces.Moise.HalfPlanePolygon +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicCellwiseExtension +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicCloseCellwiseExtension +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicCloseGraphApproximation +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicComplex +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceBoundary +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceExtension +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceFilling +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFineSubdivision +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphApproximation +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphModel +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphPL +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicMarkedFan +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicMidpointSubdivision +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicSubdivision +public import LeanPool.ClassificationOfSurfaces.Moise.LineSubdivision +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteCellwiseExtension +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteControlledApproximation +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceBoundary +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceExtension +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceFilling +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceModel +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteGraphApproximation +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteGraphPL +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFinitePLApproximation +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteSidePreservation +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteTriangulation +public import LeanPool.ClassificationOfSurfaces.Moise.NoRetraction +public import LeanPool.ClassificationOfSurfaces.Moise.OpenMidpointComplex +public import LeanPool.ClassificationOfSurfaces.Moise.PLApproximation +public import LeanPool.ClassificationOfSurfaces.Moise.PLMoves +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneCycle +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArc +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArcModel +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalCrosscut +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalFamilyPolyhedron +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalJordan +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalPolyhedron +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalSchoenflies +public import LeanPool.ClassificationOfSurfaces.Moise.PuncturedSurface +public import LeanPool.ClassificationOfSurfaces.Moise.RelativeSynchronizedArrangement +public import LeanPool.ClassificationOfSurfaces.Moise.ThinKiteMove +public import LeanPool.ClassificationOfSurfaces.NormalForm +public import LeanPool.ClassificationOfSurfaces.P2DegenerateDisk +public import LeanPool.ClassificationOfSurfaces.PolygonCellRadial +public import LeanPool.ClassificationOfSurfaces.PolygonalQuotient +public import LeanPool.ClassificationOfSurfaces.RepresentativeCarrier +public import LeanPool.ClassificationOfSurfaces.Representatives +public import LeanPool.ClassificationOfSurfaces.SignedPresentation +public import LeanPool.ClassificationOfSurfaces.SphereCarrierGeometry +public import LeanPool.ClassificationOfSurfaces.SphereHemisphere +public import LeanPool.ClassificationOfSurfaces.SphereQuotientHomeomorph +public import LeanPool.ClassificationOfSurfaces.StrongVertexStar +public import LeanPool.ClassificationOfSurfaces.Surface +public import LeanPool.ClassificationOfSurfaces.Topology.InvarianceOfDomain +public import LeanPool.ClassificationOfSurfaces.TriangleCell +public import LeanPool.ClassificationOfSurfaces.Triangulation +public import LeanPool.ClassificationOfSurfaces.WeightedCircle +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Classification of Compact Surfaces @@ -145,3 +149,5 @@ Main declarations: `LeanEval.Topology.ClassificationOfSurfaces.classification_of Tags: geometric-topology, low-dimensional-topology, surfaces, manifolds, triangulation MSC: 57K20, 57N05 -/ + +@[expose] public section diff --git a/LeanPool/ClassificationOfSurfaces/API.lean b/LeanPool/ClassificationOfSurfaces/API.lean index 1eabad805c..11b79a6cf4 100644 --- a/LeanPool/ClassificationOfSurfaces/API.lean +++ b/LeanPool/ClassificationOfSurfaces/API.lean @@ -3,58 +3,65 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.CellComplexQuotient -import LeanPool.ClassificationOfSurfaces.CanonicalCoordinates -import LeanPool.ClassificationOfSurfaces.CanonicalGeneratorMaps -import LeanPool.ClassificationOfSurfaces.CanonicalPairings -import LeanPool.ClassificationOfSurfaces.CanonicalWords -import LeanPool.ClassificationOfSurfaces.EvalStatement -import LeanPool.ClassificationOfSurfaces.Examples -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonical -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonicalRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCancellation -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCrosscap -import LeanPool.ClassificationOfSurfaces.FiniteCyclicDerivedRewrites -import LeanPool.ClassificationOfSurfaces.FiniteCyclicDyck -import LeanPool.ClassificationOfSurfaces.FiniteCyclicFaceMerge -import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoveRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoves -import LeanPool.ClassificationOfSurfaces.FiniteCyclicNormalization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicNormalizationResult -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP1 -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP1Realization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2 -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2DegenerateRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2Realization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicPresentation -import LeanPool.ClassificationOfSurfaces.FiniteCyclicRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicReduction -import LeanPool.ClassificationOfSurfaces.FiniteCyclicSignedRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicSphereRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicTerminalNormalization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicTriangulation -import LeanPool.ClassificationOfSurfaces.FiniteCyclicUnorientedRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicWordReduction -import LeanPool.ClassificationOfSurfaces.GeometricTriangulationRealization -import LeanPool.ClassificationOfSurfaces.LeanEval.RepresentativeSanity -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphApproximation -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphPL -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceBoundary -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceExtension -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceFilling -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFineSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.FrontierGlue -import LeanPool.ClassificationOfSurfaces.Moise.PlaneCycle -import LeanPool.ClassificationOfSurfaces.PolygonalQuotient -import LeanPool.ClassificationOfSurfaces.PolygonCellRadial -import LeanPool.ClassificationOfSurfaces.RepresentativeCarrier -import LeanPool.ClassificationOfSurfaces.SignedPresentation -import LeanPool.ClassificationOfSurfaces.SphereCarrierGeometry -import LeanPool.ClassificationOfSurfaces.SphereHemisphere -import LeanPool.ClassificationOfSurfaces.SphereQuotientHomeomorph -import LeanPool.ClassificationOfSurfaces.StrongVertexStar -import LeanPool.ClassificationOfSurfaces.TriangleCell +module + +public import LeanPool.ClassificationOfSurfaces.CellComplexQuotient +public import LeanPool.ClassificationOfSurfaces.CanonicalCoordinates +public import LeanPool.ClassificationOfSurfaces.CanonicalGeneratorMaps +public import LeanPool.ClassificationOfSurfaces.CanonicalPairings +public import LeanPool.ClassificationOfSurfaces.CanonicalWords +public import LeanPool.ClassificationOfSurfaces.EvalStatement +public import LeanPool.ClassificationOfSurfaces.Examples +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonical +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonicalRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCancellation +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCrosscap +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicDerivedRewrites +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicDyck +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicFaceMerge +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoveRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoves +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicNormalization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicNormalizationResult +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicP1 +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicP1Realization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2 +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2DegenerateRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2Realization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicPresentation +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicReduction +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicSignedRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicSphereRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicTerminalNormalization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicTriangulation +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicUnorientedRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicWordReduction +public import LeanPool.ClassificationOfSurfaces.GeometricTriangulationRealization +public import LeanPool.ClassificationOfSurfaces.LeanEval.RepresentativeSanity +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphApproximation +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphPL +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceBoundary +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceExtension +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceFilling +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFineSubdivision +public import LeanPool.ClassificationOfSurfaces.Moise.FrontierGlue +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneCycle +public import LeanPool.ClassificationOfSurfaces.PolygonalQuotient +public import LeanPool.ClassificationOfSurfaces.PolygonCellRadial +public import LeanPool.ClassificationOfSurfaces.RepresentativeCarrier +public import LeanPool.ClassificationOfSurfaces.SignedPresentation +public import LeanPool.ClassificationOfSurfaces.SphereCarrierGeometry +public import LeanPool.ClassificationOfSurfaces.SphereHemisphere +public import LeanPool.ClassificationOfSurfaces.SphereQuotientHomeomorph +public import LeanPool.ClassificationOfSurfaces.StrongVertexStar +public import LeanPool.ClassificationOfSurfaces.TriangleCell + +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Public API map @@ -513,6 +520,8 @@ invariance of domain. `LeanEval/SpecAudit.lean` checks that the current public t is the exact published Lean-Eval type over the vendored disc relations. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Basic.lean b/LeanPool/ClassificationOfSurfaces/Basic.lean index 4705d1f804..4ff847aa00 100644 --- a/LeanPool/ClassificationOfSurfaces/Basic.lean +++ b/LeanPool/ClassificationOfSurfaces/Basic.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.EvalStatement -import LeanPool.ClassificationOfSurfaces.Examples +module + +public import LeanPool.ClassificationOfSurfaces.EvalStatement +public import LeanPool.ClassificationOfSurfaces.Examples + +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Classification of compact surfaces @@ -12,3 +19,5 @@ import LeanPool.ClassificationOfSurfaces.Examples This module re-exports the current project skeleton for the Lean Eval challenge `topological_classification_of_surfaces`. -/ + +@[expose] public section diff --git a/LeanPool/ClassificationOfSurfaces/CanonicalCoordinates.lean b/LeanPool/ClassificationOfSurfaces/CanonicalCoordinates.lean index 5716b68893..ff2543f53c 100644 --- a/LeanPool/ClassificationOfSurfaces/CanonicalCoordinates.lean +++ b/LeanPool/ClassificationOfSurfaces/CanonicalCoordinates.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.CanonicalPairings -import LeanPool.ClassificationOfSurfaces.RepresentativeCarrier +module + +public import LeanPool.ClassificationOfSurfaces.RepresentativeCarrier +public import LeanPool.ClassificationOfSurfaces.CanonicalWords +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Carrier coordinates for canonical normal-form words @@ -15,6 +21,8 @@ negative angles using `Fin.rev` and integral periodicity. The resulting theorems five canonical pairing families into the corresponding trusted equivalence closure. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces.NormalForm open Complex diff --git a/LeanPool/ClassificationOfSurfaces/CanonicalGeneratorMaps.lean b/LeanPool/ClassificationOfSurfaces/CanonicalGeneratorMaps.lean index 1deb9a9e47..a3492c8e8f 100644 --- a/LeanPool/ClassificationOfSurfaces/CanonicalGeneratorMaps.lean +++ b/LeanPool/ClassificationOfSurfaces/CanonicalGeneratorMaps.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.CanonicalWords +public import LeanPool.ClassificationOfSurfaces.RepresentativeCarrier import LeanPool.ClassificationOfSurfaces.CanonicalCoordinates +import LeanPool.ClassificationOfSurfaces.CanonicalPairings +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Generator maps for the canonical Eval representatives @@ -14,6 +23,8 @@ maps identify the generated equivalence relations and descend the one-face carri to the canonical quotient spaces. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces.NormalForm open Complex diff --git a/LeanPool/ClassificationOfSurfaces/CanonicalPairings.lean b/LeanPool/ClassificationOfSurfaces/CanonicalPairings.lean index 11b6ce9241..4f54f3d9d9 100644 --- a/LeanPool/ClassificationOfSurfaces/CanonicalPairings.lean +++ b/LeanPool/ClassificationOfSurfaces/CanonicalPairings.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.CanonicalWords +module + +public import LeanPool.ClassificationOfSurfaces.CanonicalWords +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Pairings in canonical normal-form words @@ -15,6 +21,8 @@ opposite-parameter boundary-seam pairings. The orientable generators are opposit orders. The free `h` dart in each boundary block occurs only once and contributes no gluing. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/CanonicalWords.lean b/LeanPool/ClassificationOfSurfaces/CanonicalWords.lean index 432c42bdf9..b1ecbedc56 100644 --- a/LeanPool/ClassificationOfSurfaces/CanonicalWords.lean +++ b/LeanPool/ClassificationOfSurfaces/CanonicalWords.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.CellComplexQuotient -import LeanPool.ClassificationOfSurfaces.Representatives +module + +public import LeanPool.ClassificationOfSurfaces.CellComplexQuotient +public import LeanPool.ClassificationOfSurfaces.Representatives +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Canonical normal-form boundary words @@ -20,6 +26,8 @@ certificates. Their faithful polygonal realizations are compared with the closed defined in `LeanEval/ChallengeDeps.lean` by the canonical realization layer. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/CellComplex.lean b/LeanPool/ClassificationOfSurfaces/CellComplex.lean index 2d085ce9f3..6d771403e8 100644 --- a/LeanPool/ClassificationOfSurfaces/CellComplex.lean +++ b/LeanPool/ClassificationOfSurfaces/CellComplex.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Triangulation -import Mathlib.Data.Fintype.Sigma -import Mathlib.Data.List.Rotate +module + +public import LeanPool.ClassificationOfSurfaces.Triangulation +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Finite surface cell complexes @@ -15,6 +19,8 @@ Gallier-Xu normal-form route. The definitions are still intentionally light, but and theorem boundaries match the Moise/PL blueprint. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/CellComplexQuotient.lean b/LeanPool/ClassificationOfSurfaces/CellComplexQuotient.lean index 6a16d7d8c1..eea331b711 100644 --- a/LeanPool/ClassificationOfSurfaces/CellComplexQuotient.lean +++ b/LeanPool/ClassificationOfSurfaces/CellComplexQuotient.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.CellComplex -import LeanPool.ClassificationOfSurfaces.PolygonalQuotient +module + +public import LeanPool.ClassificationOfSurfaces.CellComplex +public import LeanPool.ClassificationOfSurfaces.PolygonalQuotient +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Polygonal realization of surface cell-complex data @@ -23,6 +29,8 @@ realization, and the standard one-face examples have occurrence-validity witness derives its orbit conditions from `IsSurfaceValid`. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/DiskSquare.lean b/LeanPool/ClassificationOfSurfaces/DiskSquare.lean index 4943bc43ac..5a961b3f7f 100644 --- a/LeanPool/ClassificationOfSurfaces/DiskSquare.lean +++ b/LeanPool/ClassificationOfSurfaces/DiskSquare.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.RepresentativeCarrier -import LeanPool.ClassificationOfSurfaces.WeightedCircle +module + +public import LeanPool.ClassificationOfSurfaces.WeightedCircle +public import LeanPool.ClassificationOfSurfaces.PolygonCellRadial import Mathlib.Analysis.Convex.GaugeRescale +import Mathlib.Analysis.InnerProductSpace.Basic +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # A square model for polygon cells @@ -16,6 +23,8 @@ projection of the Euclidean circle, and an arbitrary homeomorphism from the circ frontier of a bounded convex disk is extended across `PolygonCell`. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces open Complex diff --git a/LeanPool/ClassificationOfSurfaces/EvalStatement.lean b/LeanPool/ClassificationOfSurfaces/EvalStatement.lean index 20e73bf86e..03ad200e77 100644 --- a/LeanPool/ClassificationOfSurfaces/EvalStatement.lean +++ b/LeanPool/ClassificationOfSurfaces/EvalStatement.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.NormalForm +module + +public import LeanPool.ClassificationOfSurfaces.LeanEval.ChallengeDeps +public import LeanPool.ClassificationOfSurfaces.Representatives +public import Mathlib.Geometry.Manifold.Instances.Real import LeanPool.ClassificationOfSurfaces.GeometricTriangulationRealization +import LeanPool.ClassificationOfSurfaces.NormalForm +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Lean Eval target theorem @@ -12,6 +20,8 @@ import LeanPool.ClassificationOfSurfaces.GeometricTriangulationRealization This file contains the public theorem matching the Lean Eval problem statement. -/ +@[expose] public section + open scoped Manifold namespace LeanEval diff --git a/LeanPool/ClassificationOfSurfaces/Examples.lean b/LeanPool/ClassificationOfSurfaces/Examples.lean index 9b31e5b31a..def0e8e799 100644 --- a/LeanPool/ClassificationOfSurfaces/Examples.lean +++ b/LeanPool/ClassificationOfSurfaces/Examples.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.CellComplexQuotient -import LeanPool.ClassificationOfSurfaces.NormalForm +module + +public import LeanPool.ClassificationOfSurfaces.CellComplexQuotient +public import LeanPool.ClassificationOfSurfaces.Representatives +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Standard combinatorial examples @@ -14,6 +20,8 @@ The examples are concrete one-face boundary-word presentations in the shared `Su API. Their topology is supplied by the faithful polygonal quotient layer. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicCancellation.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicCancellation.lean index 2ea802e474..d15253a57c 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicCancellation.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicCancellation.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicDerivedRewrites +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicDerivedRewrites +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Cancellation chains for finite cyclic presentations @@ -14,6 +20,8 @@ the P1 expansion of the one-sided split of the word with the pair removed. Thus one P1 contraction, and one one-sided P2 merge cancel the pair. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicCanonical.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicCanonical.lean index 79f05dc0d6..d79f298ee3 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicCanonical.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicCanonical.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.CanonicalWords -import LeanPool.ClassificationOfSurfaces.FiniteCyclicPresentation +module + +public import LeanPool.ClassificationOfSurfaces.CanonicalWords +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicPresentation +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Canonical finite cyclic presentations @@ -19,6 +25,8 @@ and `NormalForm.nonOrientableBoundaryWord`; this file does not introduce another the Lean-Eval representatives. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces open SurfaceCellComplex diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicCanonicalRealization.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicCanonicalRealization.lean index c7d4c58006..b8c12996b5 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicCanonicalRealization.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicCanonicalRealization.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.CanonicalGeneratorMaps -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonical -import LeanPool.ClassificationOfSurfaces.FiniteCyclicSignedRealization -import LeanPool.ClassificationOfSurfaces.SphereQuotientHomeomorph +module + +public import LeanPool.ClassificationOfSurfaces.CanonicalGeneratorMaps +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonical +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicSignedRealization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Realization of canonical finite-cyclic presentations @@ -18,6 +23,8 @@ already-certified canonical polygonal quotients; in particular, it does not rest Lean-Eval relation. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces open SurfaceCellComplex diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicCrosscap.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicCrosscap.lean index 2cde9da6e3..3073df1372 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicCrosscap.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicCrosscap.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicDyck -import LeanPool.ClassificationOfSurfaces.FiniteCyclicUnorientedRealization +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicDyck +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicUnorientedRealization +import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2Realization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The Gallier--Xu cross-cap rewrite @@ -19,6 +26,8 @@ backwards, exactly as in Gallier--Xu's derivation. The broader ordinary signed edge relabeling. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicDerivedRewrites.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicDerivedRewrites.lean index 503018f66f..61c0ff15f7 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicDerivedRewrites.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicDerivedRewrites.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicNormalization +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicNormalization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Derived Gallier--Xu word rewrites @@ -18,6 +24,8 @@ normalization proof. It starts with proof-producing infrastructure for one-face These lemmas keep intermediate validity witnesses out of the public derived-chain APIs. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation @@ -803,12 +811,9 @@ private theorem first_rewriteCertificate {n : ℕ} (a b c : Fin n) a ∉ ([SignedDart.neg b, SignedDart.neg c] ++ Y).map edgeOfDart := by simp [edgeOfDart, hab, hac, haY] constructor - · exact Crosscap.adjacentTarget_isSurfaceValid a - (X ++ [.pos b, .pos c]) ([.neg b, .neg c] ++ Y) + · exact Crosscap.adjacentTarget_isSurfaceValid a _ _ · intro validP validQ - exact Crosscap.adjacentNormalizationEquivalent a - (X ++ [.pos b, .pos c]) ([.neg b, .neg c] ++ Y) - haFirstX haFirstY validP validQ + exact Crosscap.adjacentNormalizationEquivalent a _ _ haFirstX haFirstY validP validQ -- Rotation after the first rewrite is independent of the chosen validity witnesses. private theorem first_rotationCertificate {n : ℕ} (a b c : Fin n) @@ -883,19 +888,13 @@ theorem normalizationEquivalent {n : ℕ} (a b c : Fin n) (first_rewriteCertificate a b c X Y hab hac haX haY).trans (first_rotationCertificate a b c X Y) let chain₂ := chain₁.trans - (negativeCrosscap_rewriteCertificate b - ([.neg c] ++ Y ++ [.pos a] ++ [.neg c]) - (inverseWord X ++ [.pos a]) hbSecondX hbSecondY) + (negativeCrosscap_rewriteCertificate b _ _ hbSecondX hbSecondY) let chain₃ := chain₂.trans (second_rotationCertificate a b c X Y) let chain₄ := chain₃.trans - (negativeCrosscap_rewriteCertificate c - (Y ++ [.pos a]) ([.neg b, .neg b, .neg a] ++ X) - hcThirdX hcThirdY) + (negativeCrosscap_rewriteCertificate c _ _ hcThirdX hcThirdY) let chain₅ := chain₄.trans (third_rotationCertificate a b c X Y) let chain := chain₅.trans - (crosscap_rewriteCertificate a - ([.pos b, .pos b] ++ Y) ([.neg c, .neg c] ++ inverseWord X) - haFourthX haFourthY) + (crosscap_rewriteCertificate a _ _ haFourthX haFourthY) exact chain.normalizationEquivalent validSource validTarget end HandleToCrosscaps diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicDyck.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicDyck.lean index 0cc935ef3c..2857d6d925 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicDyck.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicDyck.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoves import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoveRealization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The Gallier--Xu Dyck rewrite @@ -19,6 +26,8 @@ reverses the former. The side words `U`, `V`, and `X` must not use `a`; this is side-condition available when the displayed two darts are the two occurrences of an inner edge. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicFaceMerge.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicFaceMerge.lean index dc705324ee..1a83cfe869 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicFaceMerge.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicFaceMerge.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCancellation +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCancellation +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Exact two-face merging for finite cyclic presentations @@ -14,6 +20,8 @@ local merge used to reduce a connected presentation to one face. It covers both nondegenerate cuts and the one-sided monogon case. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicMoveRealization.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicMoveRealization.lean index 659eed05d8..2e1e04208b 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicMoveRealization.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicMoveRealization.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoves import LeanPool.ClassificationOfSurfaces.FiniteCyclicP1Realization import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2Realization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Realization invariance for finite cyclic move closures @@ -15,6 +22,8 @@ faithful polygonal quotient. Consequently, clients of directed chains and common certificates do not need to pass the primitive invariance proofs explicitly. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicMoves.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicMoves.lean index 40d7079ed1..83d3a6f081 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicMoves.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicMoves.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP1 -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2 +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2 +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicRealization import LeanPool.ClassificationOfSurfaces.FiniteCyclicSignedRealization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Finite cyclic move closures @@ -24,6 +30,8 @@ move chain, which may pass through the exceptional empty-word sphere where subdivision implies move equivalence, but no converse or confluence theorem is asserted here. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicNormalization.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicNormalization.lean index 3608b95c6e..cd93b8c734 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicNormalization.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicNormalization.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCrosscap +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCrosscap +import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoveRealization import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2DegenerateRealization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Stable closure for Gallier--Xu normalization chains @@ -24,6 +31,8 @@ intermediate validity arguments. This is the stable target for the remaining der normalization chains. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicNormalizationResult.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicNormalizationResult.lean index 166f022802..1404606ea6 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicNormalizationResult.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicNormalizationResult.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonical -import LeanPool.ClassificationOfSurfaces.FiniteCyclicFaceMerge +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonical +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCancellation +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Canonical output of finite-cyclic normalization @@ -14,6 +20,8 @@ A result lands only at the existing `NormalForm.canonicalPresentation`; it canno second project-owned spelling of the Eval representatives. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicP1.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicP1.lean index 29ef8d039b..b2d85bf4e5 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicP1.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicP1.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicPresentation +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicPresentation +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Gallier--Xu P1 edge subdivision @@ -28,6 +34,8 @@ both subdivided edges, and preserves ordinary validity, face-incidence connectiv isomorphism. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicP1Realization.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicP1Realization.lean index 3124105a5d..01d96297d7 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicP1Realization.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicP1Realization.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoves -import LeanPool.ClassificationOfSurfaces.WeightedCircle +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoves +public import LeanPool.ClassificationOfSurfaces.WeightedCircle +public import LeanPool.ClassificationOfSurfaces.PolygonCellRadial +import LeanPool.ClassificationOfSurfaces.FiniteCyclicSignedRealization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Polygonal realization of Gallier--Xu P1 @@ -14,6 +22,8 @@ and weight one everywhere else. `WeightedCircle` turns those weights into the e homeomorphism required by P1, and radial extension gives the corresponding disk homeomorphism. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicP2.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicP2.lean index 4f2d88b06c..a167655149 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicP2.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicP2.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP1 +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicP1 +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Gallier--Xu P2 face subdivision @@ -27,6 +33,8 @@ it does not claim to preserve the old positive stored orientation. This conventi reversing a cut exchange the two children exactly. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicP2DegenerateRealization.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicP2DegenerateRealization.lean index a5332ef29a..26d4725a44 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicP2DegenerateRealization.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicP2DegenerateRealization.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2Realization -import LeanPool.ClassificationOfSurfaces.P2DegenerateDisk +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicP2Realization +public import LeanPool.ClassificationOfSurfaces.P2DegenerateDisk +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Polygonal realization of one-sided-degenerate Gallier--Xu P2 @@ -14,6 +20,8 @@ positive base case has an empty left cut word and a nonempty right cut word. Re swap transport that case to every ordinary-valid one-sided-degenerate cut. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicP2Realization.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicP2Realization.lean index 0718c517c0..5d25b54bb3 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicP2Realization.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicP2Realization.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.DiskSquare -import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoves +module + +public import LeanPool.ClassificationOfSurfaces.DiskSquare +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicMoves +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicSignedRealization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Polygonal realization of Gallier--Xu P2 @@ -16,6 +23,8 @@ terms of the existing `P2Cut` data, so the presentation-level quotient compariso same side indices and no second formulation of P2 is introduced. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicPresentation.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicPresentation.lean index 15ee1da3f0..6bef5d6c54 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicPresentation.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicPresentation.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.SignedPresentation -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Data.Bool.Basic -import Mathlib.Data.List.Count +module + +public import LeanPool.ClassificationOfSurfaces.SignedPresentation +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Finite cyclic surface presentations @@ -35,6 +38,8 @@ isomorphism class and `IsGallierValid` adds it as an explicit disjunct. The pres `twoMonogonSphere` is the nonexceptional two-face model obtained by the book's P2 refinement. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicRealization.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicRealization.lean index 087d04f222..97fc8eace9 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicRealization.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicRealization.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicPresentation -import LeanPool.ClassificationOfSurfaces.PolygonalQuotient -import Mathlib.Algebra.BigOperators.Group.Finset.Sigma -import Mathlib.Data.Fintype.Fin +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicPresentation +public import LeanPool.ClassificationOfSurfaces.PolygonalQuotient +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Polygonal realization of finite cyclic presentations @@ -25,6 +29,8 @@ legacy cell-complex predicate. It therefore supplies the complete occurrence-pai needed by this construction. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicReduction.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicReduction.lean index ae16c84f38..ea5e2976b7 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicReduction.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicReduction.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicNormalizationResult +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicFaceMerge +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Combinatorial selections for finite-cyclic reduction @@ -14,6 +20,8 @@ a genuinely adjacent pair, and either occurrence of their common edge can be pla of a suitably oriented cyclic boundary. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicSignedRealization.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicSignedRealization.lean index cdefdbe4f8..7af4f98ef5 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicSignedRealization.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicSignedRealization.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicRealization -import Mathlib.Topology.Homeomorph.Lemmas +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicRealization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Complex.Circle +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Polygonal realization under signed presentation isomorphism @@ -19,6 +25,8 @@ generators and their equivalence closures. It therefore descends to a homeomorph polygonal quotients. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces open Complex diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicSphereRealization.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicSphereRealization.lean index 7d16f3057d..2536470197 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicSphereRealization.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicSphereRealization.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonical -import LeanPool.ClassificationOfSurfaces.FiniteCyclicRealization -import LeanPool.ClassificationOfSurfaces.SphereQuotientHomeomorph +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonical +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicRealization +public import LeanPool.ClassificationOfSurfaces.SphereQuotientHomeomorph +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The canonical finite-cyclic sphere realization @@ -15,6 +21,8 @@ two-monogon presentation and transports the already established sphere homeomorp comparison. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicTerminalNormalization.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicTerminalNormalization.lean index 226e371a58..e68dfb6dd3 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicTerminalNormalization.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicTerminalNormalization.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicWordReduction +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicWordReduction +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Terminal finite-cyclic word normalization @@ -14,6 +20,8 @@ when a crosscap is present, and the resulting ordered word is signed-relabelled project-owned `NormalForm.canonicalPresentation`. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicTriangulation.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicTriangulation.lean index 9e92acbf2d..cba2e70568 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicTriangulation.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicTriangulation.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicPresentation -import LeanPool.ClassificationOfSurfaces.Triangulation -import Mathlib.Algebra.BigOperators.Group.Finset.Sigma -import Mathlib.Data.Fintype.Fin +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicPresentation +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Finite cyclic presentations of triangulations @@ -17,6 +20,8 @@ Incidence validity and dual connectivity then pass to the resulting `FiniteCyclicPresentation`. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -24,7 +29,7 @@ namespace ClassificationOfSurfaces namespace SurfaceCellComplex /-- Oriented triangulation edges and signed cell-complex darts carry the same data. -/ -private def orientedEdgeSignedDartEquiv {Edge : Type*} : +def orientedEdgeSignedDartEquiv {Edge : Type*} : OrientedEdge Edge ≃ SignedDart Edge where toFun := signedDartOfOrientedEdge invFun diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicUnorientedRealization.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicUnorientedRealization.lean index cc8bd8091b..aea7d058b9 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicUnorientedRealization.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicUnorientedRealization.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicSignedRealization -import Mathlib.Data.Fin.Rev +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicSignedRealization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Complex.Circle +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Polygonal realization under independently reoriented faces @@ -20,6 +26,8 @@ does preserve their faithful polygonal realizations. This is the exact extra com the cross-cap pseudo-rewrite, whose common P2 refinement reads one of its two faces backwards. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces open Complex diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicWordReduction.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicWordReduction.lean index a1edfee64d..dacd8000ac 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicWordReduction.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicWordReduction.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicWordReductionCore +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicWordReductionCore +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Marked finite cyclic word reduction @@ -13,6 +19,8 @@ This file completes the recursive reduction developed in normalization and the connected-presentation result. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation @@ -3134,7 +3142,8 @@ private theorem not_mem_inside_and_outside_of_count_eq_two {n : ℕ} have hpositive : 0 < outside.count edge := List.count_pos_iff.mpr hmem omega -private structure BoundaryBlockCommuteConditions {n : ℕ} +/-- Disjointness conditions needed to commute a boundary block past a cancellable pair. -/ +structure BoundaryBlockCommuteConditions {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (carrier hole : Fin (n + 1)) @@ -3146,7 +3155,7 @@ private structure BoundaryBlockCommuteConditions {n : ℕ} carrier_not_mem_outside : carrier ∉ (ReductionToken.expand pair.tailTokens).map edgeOfDart -private theorem boundaryBlockCommuteConditions_of_valid {n : ℕ} +theorem boundaryBlockCommuteConditions_of_valid {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (carrier hole : Fin (n + 1)) @@ -3220,7 +3229,7 @@ noncomputable def toBoundaryBlockCommuteOfValid {n : ℕ} conditions.carrier_not_mem_outside @[simp] -private theorem toBoundaryBlockCommuteOfValid_insideTokens {n : ℕ} +theorem toBoundaryBlockCommuteOfValid_insideTokens {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (carrier hole : Fin (n + 1)) (carrierNegative holeNegative : Bool) @@ -3233,7 +3242,7 @@ private theorem toBoundaryBlockCommuteOfValid_insideTokens {n : ℕ} hbetween valid).insideTokens = insideTokens := rfl @[simp] -private theorem toBoundaryBlockCommuteOfValid_outsideTokens {n : ℕ} +theorem toBoundaryBlockCommuteOfValid_outsideTokens {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (carrier hole : Fin (n + 1)) (carrierNegative holeNegative : Bool) @@ -3290,7 +3299,8 @@ def toCrosscapBlockCommute {n : ℕ} outer_not_mem_inside := houterInside outer_not_mem_outside := houterOutside -private structure CrosscapBlockCommuteConditions {n : ℕ} +/-- Disjointness conditions needed to commute a crosscap block past a cancellable pair. -/ +structure CrosscapBlockCommuteConditions {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (carrier : Fin (n + 1)) @@ -3305,7 +3315,7 @@ private structure CrosscapBlockCommuteConditions {n : ℕ} outer_not_mem_outside : pair.edge ∉ (ReductionToken.expand pair.tailTokens).map edgeOfDart -private theorem crosscapBlockCommuteConditions_of_valid {n : ℕ} +theorem crosscapBlockCommuteConditions_of_valid {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (carrier : Fin (n + 1)) (carrierNegative : Bool) @@ -3392,7 +3402,7 @@ noncomputable def toCrosscapBlockCommuteOfValid {n : ℕ} conditions.outer_not_mem_outside @[simp] -private theorem toCrosscapBlockCommuteOfValid_insideTokens {n : ℕ} +theorem toCrosscapBlockCommuteOfValid_insideTokens {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (carrier : Fin (n + 1)) (carrierNegative : Bool) @@ -3404,7 +3414,7 @@ private theorem toCrosscapBlockCommuteOfValid_insideTokens {n : ℕ} ).insideTokens = insideTokens := rfl @[simp] -private theorem toCrosscapBlockCommuteOfValid_outsideTokens {n : ℕ} +theorem toCrosscapBlockCommuteOfValid_outsideTokens {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (carrier : Fin (n + 1)) (carrierNegative : Bool) @@ -3472,7 +3482,8 @@ def toHandleBlockCommute {n : ℕ} outer_not_mem_inside := houterInside outer_not_mem_outside := houterOutside -private structure HandleBlockCommuteConditions {n : ℕ} +/-- Disjointness conditions needed to commute a handle block past a cancellable pair. -/ +structure HandleBlockCommuteConditions {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (first second : Fin (n + 1)) @@ -3487,7 +3498,7 @@ private structure HandleBlockCommuteConditions {n : ℕ} outer_not_mem_inside : pair.edge ∉ (ReductionToken.expand insideTokens).map edgeOfDart outer_not_mem_outside : pair.edge ∉ (ReductionToken.expand pair.tailTokens).map edgeOfDart -private theorem handleBlockCommuteConditions_of_valid {n : ℕ} +theorem handleBlockCommuteConditions_of_valid {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (first second : Fin (n + 1)) @@ -3596,7 +3607,7 @@ noncomputable def toHandleBlockCommuteOfValid {n : ℕ} conditions.outer_not_mem_outside @[simp] -private theorem toHandleBlockCommuteOfValid_insideTokens {n : ℕ} +theorem toHandleBlockCommuteOfValid_insideTokens {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (first second : Fin (n + 1)) @@ -3607,7 +3618,7 @@ private theorem toHandleBlockCommuteOfValid_insideTokens {n : ℕ} insideTokens := rfl @[simp] -private theorem toHandleBlockCommuteOfValid_outsideTokens {n : ℕ} +theorem toHandleBlockCommuteOfValid_outsideTokens {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (first second : Fin (n + 1)) @@ -6177,7 +6188,8 @@ private theorem shortenBoundaryPair_targetPair_betweenTokens {n : ℕ} loweredInside := by rfl -private noncomputable def shortenCompletedBlock {n : ℕ} +/-- Shorten a residual pair by commuting its leading completed block. -/ +noncomputable def shortenCompletedBlock {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (state : MarkedExecutionState tokens) @@ -6195,7 +6207,8 @@ private noncomputable def shortenCompletedBlock {n : ℕ} | handle first second => exact pair.shortenHandleBlock state protectedNonempty first second insideTokens hbetween -private noncomputable def shortenBoundaryThenCompletedBlock {n : ℕ} +/-- Shorten a residual pair past a boundary followed by a completed block. -/ +noncomputable def shortenBoundaryThenCompletedBlock {n : ℕ} {tokens : List (ReductionToken (n + 1))} (pair : MarkedResidualCancellablePair tokens) (state : MarkedExecutionState tokens) @@ -6522,14 +6535,16 @@ private theorem resolveBoundary_rawBoundaryCount_eq_tail {n : ℕ} ReductionToken.rawBoundaryCount pair.tailTokens := resolution_rawBoundaryCount_eq_tail (pair.resolveBoundary state hole holeNegative hbetween) -private inductive CertifiedResolutionStep {n : ℕ} +/-- A completed resolution or a certified shortening that permits another recursive step. -/ +inductive CertifiedResolutionStep {n : ℕ} {tokens : List (ReductionToken n)} (pair : MarkedResidualCancellablePair tokens) (state : MarkedExecutionState tokens) : Type | resolved (resolution : MarkedResidualPairResolution pair state) | shortened (shortening : MarkedResidualPairShortening pair state) -private noncomputable def nextResolutionStep {n : ℕ} +/-- Choose the next certified step in resolving a marked residual pair. -/ +noncomputable def nextResolutionStep {n : ℕ} {tokens : List (ReductionToken n)} (pair : MarkedResidualCancellablePair tokens) (state : MarkedExecutionState tokens) @@ -6592,7 +6607,8 @@ private theorem nextResolutionStep_shortening_decreases {n : ℕ} | resolved => trivial | shortened shortening => exact shortening.betweenLengthLt -private def finishShorteningResolution {n : ℕ} +/-- Transport a resolution back across its preceding shortening step. -/ +def finishShorteningResolution {n : ℕ} {tokens : List (ReductionToken n)} {pair : MarkedResidualCancellablePair tokens} {state : MarkedExecutionState tokens} diff --git a/LeanPool/ClassificationOfSurfaces/FiniteCyclicWordReductionCore.lean b/LeanPool/ClassificationOfSurfaces/FiniteCyclicWordReductionCore.lean index c8de910a09..1ff5c8c62e 100644 --- a/LeanPool/ClassificationOfSurfaces/FiniteCyclicWordReductionCore.lean +++ b/LeanPool/ClassificationOfSurfaces/FiniteCyclicWordReductionCore.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicCancellation -import LeanPool.ClassificationOfSurfaces.FiniteCyclicReduction -import LeanPool.ClassificationOfSurfaces.FiniteCyclicNormalizationResult +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicReduction +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicNormalizationResult +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Recursive reduction of finite cyclic one-face words @@ -16,6 +21,8 @@ while preserving a validity-bundled normalization chain. If the final pair is t the result is the agreed ordinary-valid two-monogon sphere presentation. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace FiniteCyclicPresentation @@ -338,7 +345,7 @@ noncomputable def finish {P : ValidPresentation} end CancellationResult /-- If cancelling a displayed inverse pair leaves no tail, the source normalizes to the sphere. -/ -private noncomputable def cancellationResult_sphere_of_lowerTail_eq_nil {n : ℕ} +noncomputable def cancellationResultSphereOfLowerTailEqNil {n : ℕ} {word : List (SignedDart (Fin (n + 1)))} (pair : CancellablePair word) (ha : pair.edge ∉ pair.tail.map edgeOfDart) (hlower : Cancellation.lowerTail pair.edge pair.tail = []) @@ -427,7 +434,7 @@ private noncomputable def cancellationResult_sphere_of_lowerTail_eq_nil {n : ℕ (hToBase.trans (Cancellation.sphereNormalizationEquivalent validEmpty)) /-- A displayed inverse pair with nonempty lower tail gives one certified cancellation step. -/ -private theorem exists_cancellationStep_of_lowerTail_ne_nil {n : ℕ} +theorem exists_cancellationStep_of_lowerTail_ne_nil {n : ℕ} {word : List (SignedDart (Fin (n + 1)))} (pair : CancellablePair word) (ha : pair.edge ∉ pair.tail.map edgeOfDart) (hlower : Cancellation.lowerTail pair.edge pair.tail ≠ []) @@ -537,7 +544,7 @@ noncomputable def cancelInversePairsFuel (fuel : ℕ) {n : ℕ} have hlowerBound : lower.length ≤ fuel - 1 := by omega by_cases hlower : lower = [] - · exact cancellationResult_sphere_of_lowerTail_eq_nil pair ha hlower valid + · exact cancellationResultSphereOfLowerTailEqNil pair ha hlower valid · let stepWitness := exists_cancellationStep_of_lowerTail_ne_nil pair ha hlower valid let validLower := Classical.choose stepWitness @@ -992,10 +999,7 @@ noncomputable def reduceResidualPairsFuel (fuel : ℕ) {n : ℕ} rfl length_le := le_refl _ } termination_by fuel -decreasing_by - apply Nat.sub_lt - · exact hfuelPositive - · omega +decreasing_by all_goals exact Nat.sub_lt hfuelPositive (by omega) /-- Repeatedly delete every adjacent inverse pair from a residual word while retaining its ambient edge namespace and the surface multiplicities of all surviving names. -/ @@ -3176,7 +3180,7 @@ def positiveTargetWord {n : ℕ} (outer carrier : Fin n) (insideTail outsideTail : List (SignedDart (Fin n))) : List (SignedDart (Fin n)) := - [.pos outer, .pos outer, .neg carrier] ++ + .pos outer :: .pos outer :: .neg carrier :: insideTail ++ .pos carrier :: inverseWord outsideTail /-- Contextual crosscap source with arbitrary orientations on both distinguished edges. -/ @@ -3667,8 +3671,7 @@ def positiveSourceWord {n : ℕ} (outer first second : Fin n) (insideTail outsideTail : List (SignedDart (Fin n))) : List (SignedDart (Fin n)) := - [.pos outer, .pos first, .pos second, - .neg first, .neg second] ++ + .pos outer :: .pos first :: .pos second :: .neg first :: .neg second :: insideTail ++ .neg outer :: outsideTail /-- The same completed handle commuted outside the residual pair. -/ @@ -3676,8 +3679,7 @@ def positiveTargetWord {n : ℕ} (outer first second : Fin n) (insideTail outsideTail : List (SignedDart (Fin n))) : List (SignedDart (Fin n)) := - [.pos first, .pos second, .neg first, - .neg second, .pos outer] ++ + .pos first :: .pos second :: .neg first :: .neg second :: .pos outer :: insideTail ++ .neg outer :: outsideTail /-- The contextual handle source with its residual carrier displayed negative first. -/ @@ -3685,8 +3687,7 @@ def negativeSourceWord {n : ℕ} (outer first second : Fin n) (insideTail outsideTail : List (SignedDart (Fin n))) : List (SignedDart (Fin n)) := - [.neg outer, .pos first, .pos second, - .neg first, .neg second] ++ + .neg outer :: .pos first :: .pos second :: .neg first :: .neg second :: insideTail ++ .pos outer :: outsideTail /-- Negative-residual-carrier target spelling. -/ @@ -3694,8 +3695,7 @@ def negativeTargetWord {n : ℕ} (outer first second : Fin n) (insideTail outsideTail : List (SignedDart (Fin n))) : List (SignedDart (Fin n)) := - [.pos first, .pos second, .neg first, - .neg second, .neg outer] ++ + .pos first :: .pos second :: .neg first :: .neg second :: .neg outer :: insideTail ++ .pos outer :: outsideTail /-- Contextual handle source with arbitrary residual-carrier orientation. -/ @@ -3798,7 +3798,7 @@ def negativeSourceSignedIso {n : ℕ} hfirstPos, hsecondPos, hfirstNeg, hsecondNeg] simp only [Dyck.reverseEdgeRelabeling_neg, - Dyck.reverseEdgeRelabeling_pos, List.map_nil] + Dyck.reverseEdgeRelabeling_pos] exact List.IsRotated.refl _ /-- Reversing only the residual carrier identifies negative and positive handle targets. -/ @@ -3861,7 +3861,7 @@ def negativeTargetSignedIso {n : ℕ} hfirstPos, hsecondPos, hfirstNeg, hsecondNeg] simp only [Dyck.reverseEdgeRelabeling_neg, - Dyck.reverseEdgeRelabeling_pos, List.map_nil] + Dyck.reverseEdgeRelabeling_pos] exact List.IsRotated.refl _ private theorem exists_positiveTarget_of_thirdTarget {n : ℕ} diff --git a/LeanPool/ClassificationOfSurfaces/GeometricTriangulationRealization.lean b/LeanPool/ClassificationOfSurfaces/GeometricTriangulationRealization.lean index 6bc9f41994..0422c0f5f6 100644 --- a/LeanPool/ClassificationOfSurfaces/GeometricTriangulationRealization.lean +++ b/LeanPool/ClassificationOfSurfaces/GeometricTriangulationRealization.lean @@ -3,10 +3,17 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.FiniteCyclicRealization -import LeanPool.ClassificationOfSurfaces.FiniteCyclicTriangulation +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicRealization +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicTriangulation +public import LeanPool.ClassificationOfSurfaces.TriangleCell +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicCellwiseExtension +import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicMidpointSubdivision import LeanPool.ClassificationOfSurfaces.StrongVertexStar -import LeanPool.ClassificationOfSurfaces.TriangleCell +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Faithful polygonal realization of a geometric triangulation @@ -16,6 +23,8 @@ barycentric face. Its side formula uses the cyclic face order exactly, so adjac agree under the signed occurrence pairing. -/ +@[expose] public section + open Set Topology namespace LeanEval diff --git a/LeanPool/ClassificationOfSurfaces/LeanEval/ChallengeDeps.lean b/LeanPool/ClassificationOfSurfaces/LeanEval/ChallengeDeps.lean index 6db832411f..5aad94a37f 100644 --- a/LeanPool/ClassificationOfSurfaces/LeanEval/ChallengeDeps.lean +++ b/LeanPool/ClassificationOfSurfaces/LeanEval/ChallengeDeps.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import Mathlib.Analysis.Complex.Circle +module + +public import Mathlib.Analysis.Complex.Circle /-! DO NOT EDIT OR MODIFY @@ -21,6 +23,8 @@ leanprover/lean-eval/generated/topological_classification_of_surfaces -/ +@[expose] public section + /-! Benchmark statements for topological classification of compact connected surfaces with boundary. diff --git a/LeanPool/ClassificationOfSurfaces/LeanEval/RepresentativeSanity.lean b/LeanPool/ClassificationOfSurfaces/LeanEval/RepresentativeSanity.lean index 996eefaeed..830275e013 100644 --- a/LeanPool/ClassificationOfSurfaces/LeanEval/RepresentativeSanity.lean +++ b/LeanPool/ClassificationOfSurfaces/LeanEval/RepresentativeSanity.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.LeanEval.ChallengeDeps +module + +public import LeanPool.ClassificationOfSurfaces.LeanEval.ChallengeDeps /-! # Sanity checks for the Lean-Eval representatives @@ -14,6 +16,8 @@ radius is constant across every generating identification, so it descends to bot families and distinguishes the disk center from its boundary. -/ +@[expose] public section + namespace Complex /-- Every point produced by `bdyPtOfReal` lies on the unit circle. -/ diff --git a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveControlledApproximation.lean b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveControlledApproximation.lean index 35f8a90818..36ce98f7fd 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveControlledApproximation.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveControlledApproximation.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveOpenCover -import LeanPool.ClassificationOfSurfaces.Moise.HalfPlanePolygon -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteControlledApproximation +module + +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveOpenCover +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteControlledApproximation import LeanPool.ClassificationOfSurfaces.Moise.FacewiseComparison +import LeanPool.ClassificationOfSurfaces.Moise.HalfPlanePolygon +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Adaptive meshes for strongly-positive metric controls @@ -19,6 +24,8 @@ diameter. Subordination to the resulting open cover converts the existing setwi graph replacement into a pointwise controlled approximation. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -247,7 +254,8 @@ namespace ControlledAdaptiveComplex variable (hU : IsOpen U) (f : U → Plane) (hf : Continuous f) (phi : U → ℝ) (hphi : StronglyPositiveOn Set.univ phi) -private noncomputable abbrev L : LocallyFiniteTriangleComplex U := +/-- The locally finite complex obtained from the controlled adaptive construction. -/ +noncomputable abbrev L : LocallyFiniteTriangleComplex U := K.controlledAdaptiveComplex U hU f hf phi hphi /-- Each adaptive face inherits one quantitative scale from the cover member containing it. -/ @@ -447,7 +455,8 @@ variable (hU : IsOpen U) (V : Set Plane) (hV : IsOpen V) (f : U → Plane) (hf : Continuous f) (hmem : ∀ x, f x ∈ V) (phi : U → ℝ) (hphi : StronglyPositiveOn Set.univ phi) -private noncomputable abbrev R : LocallyFiniteTriangleComplex U := +/-- The locally finite complex obtained from the region-controlled adaptive construction. -/ +noncomputable abbrev R : LocallyFiniteTriangleComplex U := K.regionControlledAdaptiveComplex U hU V hV f hf hmem phi hphi /-- The adaptive face-boundary estimate for the frontier-reduced tolerance. -/ diff --git a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveFanAffine.lean b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveFanAffine.lean index dc7bf20418..e153742f7f 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveFanAffine.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveFanAffine.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveTriangulation -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceModel +module + +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveTriangulation +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceModel /-! # Affine standard-coordinate formulas for adaptive fan faces @@ -17,6 +18,8 @@ relative Radó weld uses this formula after composing with the inverse-affine pi polygonal filling certificates. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -145,9 +148,8 @@ theorem adaptiveGlobalFanFaceMap_standardAffine_point aQ (b (R.facePlaneInverseAffineLF f (R.facePlaneHomeomorph f x).1)) rw [haQ _ hyCarrier] apply congrArg aQ - rw [← hxPlane] + rw [← hxPlane, K.adaptiveFanSourcePoint_val] funext v - change (∑ p, y p * (K.adaptiveFanVertexSource U hU f p).1 v) = b x.1 v rw [hb] exact K.adaptiveFanRelabel_source_sum_apply hU f x v @@ -203,20 +205,11 @@ theorem adaptiveGlobalFanMapStandardAffine_apply z ((K.adaptiveFanFaceVertexEquiv U hU f).symm p) * (K.adaptiveFanVertexSource U hU f p).1 v := by intro z v - simp only [adaptiveGlobalFanLinearPiece, LinearMap.sum_apply, - LinearMap.smulRight_apply, LinearMap.proj_apply, Finset.sum_apply, - Pi.smul_apply, smul_eq_mul] + rw [adaptiveGlobalFanLinearPiece, LinearMap.sum_apply, Finset.sum_apply] + rfl have hpoint := K.adaptiveGlobalFanFaceMap_standardAffine_point hU f (K.adaptiveGlobalFanAffinePiece hU f) haQ (K.adaptiveGlobalFanLinearPiece hU f) hb x - change ((K.safeSubdivision f.1.1).homeo - (K.adaptiveFanSourcePoint U hU f - (K.adaptiveFanRelabelSimplex U hU f x))).1 = _ - change _ = - (((K.adaptiveGlobalFanAffinePiece hU f).comp - (K.adaptiveGlobalFanLinearPiece hU f).toAffineMap).comp - ((K.adaptiveLocallyFiniteTriangleComplex U hU).facePlaneInverseAffineLF f)) - ((K.adaptiveLocallyFiniteTriangleComplex U hU).facePlaneHomeomorph f x).1 exact hpoint /- One adaptive global fan face is affine, in original intrinsic barycentric coordinates, as a @@ -256,13 +249,13 @@ theorem adaptiveFanFaceMap_val_eq_vertex_sum ).affineCombination ℝ point weight have hzfun : zfun = (K.adaptiveFanSourcePoint U hU f x).1 := by + rw [K.adaptiveFanSourcePoint_val] rw [show zfun = ∑ p, weight p • point p by exact Finset.affineCombination_eq_linear_combination Finset.univ point weight hweight] funext v - simp only [weight, point, adaptiveFanSourcePoint, - Finset.sum_apply, Pi.smul_apply, smul_eq_mul] + simp only [weight, point, Finset.sum_apply, Pi.smul_apply, smul_eq_mul] have hsourceCarrier : K.adaptiveFanSourcePoint U hU f x ∈ Q.refined.faceCarrier f.1.2.1.1 := diff --git a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveFanComplex.lean b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveFanComplex.lean index 2a294d2c4e..5a5164a696 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveFanComplex.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveFanComplex.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveTileComplex +module + +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveTileComplex /-! # Conforming fan maps on adaptive midpoint tiles @@ -14,6 +16,8 @@ of parametrized triangles in the open subpolyhedron. This file constructs those proving the global face-to-face intersection theorem. -/ +@[expose] public section + open scoped BigOperators namespace LeanEval @@ -983,9 +987,7 @@ theorem adaptiveFanNormalizedBaseFaceMap_eq_of_same_tile (K.adaptiveFanNormalizedBasePoint U hU ⟨t, i, a⟩ x hxCenter) = K.adaptiveFanFaceMap U hU ⟨t, j, b⟩ (K.adaptiveFanNormalizedBasePoint U hU ⟨t, j, b⟩ y hyCenter) := by - let cx := x.1 (K.adaptiveFanCenterVertex U hU ⟨t, i, a⟩) - let cy := y.1 (K.adaptiveFanCenterVertex U hU ⟨t, j, b⟩) - have hc : cx = cy := + have hc := K.adaptiveFanCenterWeight_eq_of_faceMap_eq_of_tile_eq U hU t i j a b hxy have hsource : K.adaptiveFanSourcePoint U hU ⟨t, i, a⟩ x = @@ -1001,35 +1003,19 @@ theorem adaptiveFanNormalizedBaseFaceMap_eq_of_same_tile (K.adaptiveFanCenterVertex U hU ⟨t, i, a⟩)).1 = (K.adaptiveFanVertexSource U hU ⟨t, j, b⟩ (K.adaptiveFanCenterVertex U hU ⟨t, j, b⟩)).1 := by + -- Use the shared center to keep the subdivision homeomorphism folded. + change ((K.safeSubdivision t.1).homeo.symm (K.adaptiveFaceCenter U t)).1 = + ((K.safeSubdivision t.1).homeo.symm (K.adaptiveFaceCenter U t)).1 rfl have hbaseVal : (K.adaptiveFanSourcePoint U hU ⟨t, i, a⟩ (K.adaptiveFanNormalizedBasePoint U hU ⟨t, i, a⟩ x hxCenter)).1 = (K.adaptiveFanSourcePoint U hU ⟨t, j, b⟩ (K.adaptiveFanNormalizedBasePoint U hU ⟨t, j, b⟩ y hyCenter)).1 := by - funext v - have hline : - AffineMap.lineMap - (K.adaptiveFanVertexSource U hU ⟨t, i, a⟩ - (K.adaptiveFanCenterVertex U hU ⟨t, i, a⟩)).1 - (K.adaptiveFanSourcePoint U hU ⟨t, i, a⟩ - (K.adaptiveFanNormalizedBasePoint U hU ⟨t, i, a⟩ x hxCenter)).1 - (1 - cx) = - AffineMap.lineMap - (K.adaptiveFanVertexSource U hU ⟨t, j, b⟩ - (K.adaptiveFanCenterVertex U hU ⟨t, j, b⟩)).1 - (K.adaptiveFanSourcePoint U hU ⟨t, j, b⟩ - (K.adaptiveFanNormalizedBasePoint U hU ⟨t, j, b⟩ y hyCenter)).1 - (1 - cy) := by - rw [← hxLine, ← hyLine] - exact congrArg Subtype.val hsource - have hcoord := congrFun hline v + have hline := hxLine.symm.trans ((congrArg Subtype.val hsource).trans hyLine) rw [AffineMap.lineMap_apply_module, AffineMap.lineMap_apply_module, - ← hc, ← hcenterSource] at hcoord - simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul] at hcoord - have hd : 1 - cx ≠ 0 := (sub_pos.mpr hxCenter).ne' - apply mul_left_cancel₀ hd - nlinarith + ← hc, ← hcenterSource] at hline + exact (smul_right_inj (sub_pos.mpr hxCenter).ne').mp (add_left_cancel hline) apply Subtype.ext change (K.safeSubdivision t.1).homeo (K.adaptiveFanSourcePoint U hU ⟨t, i, a⟩ diff --git a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveOpenComplex.lean b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveOpenComplex.lean index d0b2ad555a..f3e40234ac 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveOpenComplex.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveOpenComplex.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.OpenMidpointComplex -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteTriangulation +module + +public import LeanPool.ClassificationOfSurfaces.Moise.OpenMidpointComplex +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteTriangulation /-! # Adaptive midpoint tiles in an open polyhedron @@ -15,6 +17,8 @@ Their edges need not yet form a conforming simplicial complex: a coarse edge may edges of finer adjacent tiles. The next layer resolves precisely those hanging vertices. -/ +@[expose] public section + open scoped BigOperators namespace LeanEval diff --git a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveOpenCover.lean b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveOpenCover.lean index 084c4be438..d78e3a8815 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveOpenCover.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveOpenCover.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveTriangulation +module + +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveTriangulation /-! # Adaptive triangulations subordinate to an open cover @@ -15,6 +17,8 @@ one prescribed control neighborhood. Quantitative chart approximation can there the neighborhoods first and reuse the conforming triangulation unchanged. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveTileComplex.lean b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveTileComplex.lean index 1e09983ae3..5cfef46c86 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveTileComplex.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveTileComplex.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveOpenComplex -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel -import LeanPool.ClassificationOfSurfaces.Moise.GraphRefinement -import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension +module + +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveOpenComplex +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel +public import LeanPool.ClassificationOfSurfaces.Moise.GraphRefinement +public import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension /-! # Finite conforming meshes on adaptive open-complex tiles @@ -20,6 +22,8 @@ plane complex for one tile. The next layer proves that the transported tile com overlaps and takes their locally finite union. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveTriangulation.lean b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveTriangulation.lean index 76e01b4e18..efb0cc0693 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveTriangulation.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/AdaptiveTriangulation.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveFanComplex +module + +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveFanComplex /-! # The locally finite adaptive fan triangulation @@ -14,6 +16,8 @@ in a fan face. This no-junk representation is what lets compactness turn local finite intrinsic triangulation. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/AmbientHomeomorph.lean b/LeanPool/ClassificationOfSurfaces/Moise/AmbientHomeomorph.lean index 928f8dd4b2..81288de203 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/AmbientHomeomorph.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/AmbientHomeomorph.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex -import Mathlib.Topology.Piecewise +module + +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex /-! # Extending a homeomorphism of a closed planar patch @@ -14,6 +15,8 @@ the move fixes the patch frontier, it extends to an ambient homeomorphism by the file proves that pasting step independently of the particular triangulated patch. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/Anchors.lean b/LeanPool/ClassificationOfSurfaces/Moise/Anchors.lean index 5f65a70dfb..b091b9fa40 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/Anchors.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/Anchors.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalJordan -import Mathlib.Analysis.Convex.Combination -import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional +module + +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalJordan +public import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional +import Mathlib.Analysis.Normed.Affine.AddTorsor /-! # Positive anchors for the Moise plane structures @@ -26,6 +28,8 @@ affine independence of the three vertices, proved from non-collinearity by coord computation. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/BoundaryInvariant.lean b/LeanPool/ClassificationOfSurfaces/Moise/BoundaryInvariant.lean index a85fb8148f..f755a58919 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/BoundaryInvariant.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/BoundaryInvariant.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.Surface +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex import LeanPool.ClassificationOfSurfaces.Moise.Brouwer -import LeanPool.ClassificationOfSurfaces.Surface +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Boundary invariance for C0 surface charts @@ -17,6 +23,8 @@ The frontier of the chart's extended target follows because its interior is cont interior of the model range. -/ +@[expose] public section + open scoped Manifold namespace LeanEval diff --git a/LeanPool/ClassificationOfSurfaces/Moise/BrokenLine.lean b/LeanPool/ClassificationOfSurfaces/Moise/BrokenLine.lean index 7a830561ba..a86628545e 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/BrokenLine.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/BrokenLine.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import Mathlib.Analysis.Normed.Module.Convex -import Mathlib.Topology.Connected.Clopen -import Mathlib.Topology.MetricSpace.Thickening -import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex +module + +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex /-! # Broken-line connectivity of open connected sets in the plane @@ -27,6 +26,8 @@ points extends or truncates a broken line by one segment. Preconnectedness of ` the complement to be empty. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/Brouwer.lean b/LeanPool/ClassificationOfSurfaces/Moise/Brouwer.lean index b94e13eaa3..793be143b9 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/Brouwer.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/Brouwer.lean @@ -3,17 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.Topology.InvarianceOfDomain +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex import LeanPool.ClassificationOfSurfaces.Moise.NoRetraction -import LeanPool.ClassificationOfSurfaces.Topology.InvarianceOfDomain -import Mathlib.Analysis.InnerProductSpace.Continuous -import Mathlib.Analysis.Real.Sqrt +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init import Mathlib.Geometry.Euclidean.Sphere.Basic -import Mathlib.Tactic.Abel -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Brouwer's fixed-point theorem for the plane disk @@ -28,6 +26,8 @@ sphere that root is `1`, so the construction would be a retraction of the disk o contradicting `no_retraction_planeClosedUnitBall`. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/ChartExtraction.lean b/LeanPool/ClassificationOfSurfaces/Moise/ChartExtraction.lean index aa21954a6f..72cb5c358e 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/ChartExtraction.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/ChartExtraction.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex +module + +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex +public import Mathlib.Geometry.Manifold.Instances.Real import LeanPool.ClassificationOfSurfaces.Moise.BoundaryInvariant +import LeanPool.ClassificationOfSurfaces.Moise.Brouwer +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Extraction of Moise charts from the mathlib atlas @@ -24,6 +31,8 @@ boundary-faithfulness: manifold-boundary points in the chart land on the frontie target, hence on the model edge line. -/ +@[expose] public section + open scoped Manifold open Topology diff --git a/LeanPool/ClassificationOfSurfaces/Moise/ChartInduction.lean b/LeanPool/ClassificationOfSurfaces/Moise/ChartInduction.lean index e81bf0d635..5b80fe71a7 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/ChartInduction.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/ChartInduction.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.ChartInductionCore +module + +public import LeanPool.ClassificationOfSurfaces.Moise.ChartInductionCore +import LeanPool.ClassificationOfSurfaces.Moise.FineSubdivision +import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicMarkedFan +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The Radó crossing weld and chart induction @@ -12,6 +19,8 @@ This file completes the chart-induction framework developed in `ChartInductionCo the crossing weld, packages the one-chart induction step, and assembles the final triangulation. -/ +@[expose] public section + open scoped Manifold namespace LeanEval @@ -914,34 +923,63 @@ private theorem MixedLocalFanData.localMixedFaceMap_eq_iff_of_local rw [extendFaceCoordinates_of_notMem _ _ hvt, extendFaceCoordinates_of_notMem _ _ hvu] -/-- The local facts needed by the chart-independent local/fan compatibility argument. -/ -private structure MixedLocalFanCertificate (M : MixedLocalFanData) where - parentFace : M.localComplex.Face → M.ambient.Face - outside_parent_ne : ∀ (f : M.OutsideFanFace) (t : M.localComplex.Face), - f.1.1 ≠ parentFace t - mixedOldFaceVertices_card : ∀ f : M.MixedOldFace, - (M.mixedOldFaceVertices f).card = 3 - continuous_mixedOldFaceMap : ∀ f : M.MixedOldFace, - Continuous (M.mixedOldFaceMap f) - mixedOldFaceMap_val : - ∀ (f : M.MixedOldFace) +/-- The map laws shared by the construction and the full compatibility certificate. -/ +private structure MixedMapCertificate (M : MixedLocalFanData) where + mixedOldFaceVertices_card : ∀ f : M.MixedOldFace, (M.mixedOldFaceVertices f).card = 3 + continuous_mixedOldFaceMap : ∀ f : M.MixedOldFace, Continuous (M.mixedOldFaceMap f) + mixedOldFaceMap_val : ∀ (f : M.MixedOldFace) (x : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices f}), - (M.mixedOldFaceMap f x).1 = fun k ↦ ∑ v : M.OldVertex, - extendFaceCoordinates (M.mixedOldFaceVertices f) x v * v.1.1 k - localMixedFaceMap_eq_iff : - ∀ {t u : M.localComplex.Face} + (M.mixedOldFaceMap f x).1 = fun k ↦ ∑ v : M.OldVertex, + extendFaceCoordinates (M.mixedOldFaceVertices f) x v * v.1.1 k + localMixedFaceMap_eq_iff : ∀ {t u : M.localComplex.Face} {x : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices (Sum.inl t)}} {y : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices (Sum.inl u)}}, - M.mixedOldFaceMap (Sum.inl t) x = M.mixedOldFaceMap (Sum.inl u) y ↔ - extendFaceCoordinates (M.mixedOldFaceVertices (Sum.inl t)) x = - extendFaceCoordinates (M.mixedOldFaceVertices (Sum.inl u)) y - fanMixedFaceMap_eq_iff : - ∀ {f g : M.OutsideFanFace} + M.mixedOldFaceMap (Sum.inl t) x = M.mixedOldFaceMap (Sum.inl u) y ↔ + extendFaceCoordinates (M.mixedOldFaceVertices (Sum.inl t)) x = + extendFaceCoordinates (M.mixedOldFaceVertices (Sum.inl u)) y + fanMixedFaceMap_eq_iff : ∀ {f g : M.OutsideFanFace} {x : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices (Sum.inr f)}} {y : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices (Sum.inr g)}}, - M.mixedOldFaceMap (Sum.inr f) x = M.mixedOldFaceMap (Sum.inr g) y ↔ - extendFaceCoordinates (M.mixedOldFaceVertices (Sum.inr f)) x = - extendFaceCoordinates (M.mixedOldFaceVertices (Sum.inr g)) y + M.mixedOldFaceMap (Sum.inr f) x = M.mixedOldFaceMap (Sum.inr g) y ↔ + extendFaceCoordinates (M.mixedOldFaceVertices (Sum.inr f)) x = + extendFaceCoordinates (M.mixedOldFaceVertices (Sum.inr g)) y + mixedOldFaceMap_simplexLineMap : ∀ (f : M.MixedOldFace) + (x y : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices f}) + (r : Set.Icc (0 : ℝ) 1), + (M.mixedOldFaceMap f (simplexLineMap x y r)).1 = + AffineMap.lineMap (M.mixedOldFaceMap f x).1 (M.mixedOldFaceMap f y).1 r.1 + mixedOldFaceMap_vertex : ∀ (f : M.MixedOldFace) + (v : {v // v ∈ M.mixedOldFaceVertices f}), + M.mixedOldFaceMap f (stdSimplex.vertex v) = v.1.1 + +/-- The local interpolation laws shared by construction and compatibility. -/ +private structure MixedLocalInterpolationCertificate (M : MixedLocalFanData) where + localUsedVertex_mem_face_of_map_eq : ∀ (t : M.localComplex.Face) + (z : stdSimplex ℝ {v // v ∈ t.1}) (u : M.localComplex.UsedVertex), + M.localFaceMap t z = M.localVertexPoint u → u.1 ∈ t.1 + exists_localFacePoint_eq_of_edgeParameter_between : ∀ + (t : M.localComplex.Face) (e : M.ambient.Edge) (a b : {v // v ∈ t.1}) + (p : M.ambient.realization), + M.localVertexPoint ⟨a.1, ⟨t.1, t.2, a.2⟩⟩ ∈ M.ambient.faceCarrier e.1 → + M.localVertexPoint ⟨b.1, ⟨t.1, t.2, b.2⟩⟩ ∈ M.ambient.faceCarrier e.1 → + p ∈ M.ambient.faceCarrier e.1 → + M.marking.edgeParameterValue e + (M.localVertexPoint ⟨a.1, ⟨t.1, t.2, a.2⟩⟩) ≤ + M.marking.edgeParameterValue e p → + M.marking.edgeParameterValue e p ≤ M.marking.edgeParameterValue e + (M.localVertexPoint ⟨b.1, ⟨t.1, t.2, b.2⟩⟩) → + M.marking.edgeParameterValue e + (M.localVertexPoint ⟨a.1, ⟨t.1, t.2, a.2⟩⟩) < + M.marking.edgeParameterValue e + (M.localVertexPoint ⟨b.1, ⟨t.1, t.2, b.2⟩⟩) → + ∃ z : stdSimplex ℝ {v // v ∈ t.1}, M.localFaceMap t z = p + +/-- The local facts needed by the chart-independent local/fan compatibility argument. -/ +private structure MixedLocalFanCertificate (M : MixedLocalFanData) + extends MixedMapCertificate M, MixedLocalInterpolationCertificate M where + parentFace : M.localComplex.Face → M.ambient.Face + outside_parent_ne : ∀ (f : M.OutsideFanFace) (t : M.localComplex.Face), + f.1.1 ≠ parentFace t mixedOldFaceMap_eq_of_extendedCoordinates : ∀ {f g : M.MixedOldFace} {x : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices f}} @@ -984,36 +1022,6 @@ private structure MixedLocalFanCertificate (M : MixedLocalFanData) where ∀ (t : M.localComplex.Face) p, p ∈ M.marking.points → p ∈ M.ambient.faceCarrier (parentFace t).1 → ∃ u : M.localComplex.UsedVertex, M.localVertexPoint u = p - localUsedVertex_mem_face_of_map_eq : - ∀ (t : M.localComplex.Face) (z : stdSimplex ℝ {v // v ∈ t.1}) - (u : M.localComplex.UsedVertex), - M.localFaceMap t z = M.localVertexPoint u → u.1 ∈ t.1 - exists_localFacePoint_eq_of_edgeParameter_between : - ∀ (t : M.localComplex.Face) (e : M.ambient.Edge) (a b : {v // v ∈ t.1}) - (p : M.ambient.realization), - M.localVertexPoint ⟨a.1, ⟨t.1, t.2, a.2⟩⟩ ∈ M.ambient.faceCarrier e.1 → - M.localVertexPoint ⟨b.1, ⟨t.1, t.2, b.2⟩⟩ ∈ M.ambient.faceCarrier e.1 → - p ∈ M.ambient.faceCarrier e.1 → - M.marking.edgeParameterValue e - (M.localVertexPoint ⟨a.1, ⟨t.1, t.2, a.2⟩⟩) ≤ - M.marking.edgeParameterValue e p → - M.marking.edgeParameterValue e p ≤ - M.marking.edgeParameterValue e - (M.localVertexPoint ⟨b.1, ⟨t.1, t.2, b.2⟩⟩) → - M.marking.edgeParameterValue e - (M.localVertexPoint ⟨a.1, ⟨t.1, t.2, a.2⟩⟩) < - M.marking.edgeParameterValue e - (M.localVertexPoint ⟨b.1, ⟨t.1, t.2, b.2⟩⟩) → - ∃ z : stdSimplex ℝ {v // v ∈ t.1}, M.localFaceMap t z = p - mixedOldFaceMap_simplexLineMap : - ∀ (f : M.MixedOldFace) - (x y : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices f}) - (r : Set.Icc (0 : ℝ) 1), - (M.mixedOldFaceMap f (simplexLineMap x y r)).1 = - AffineMap.lineMap (M.mixedOldFaceMap f x).1 (M.mixedOldFaceMap f y).1 r.1 - mixedOldFaceMap_vertex : - ∀ (f : M.MixedOldFace) (v : {v // v ∈ M.mixedOldFaceVertices f}), - M.mixedOldFaceMap f (stdSimplex.vertex v) = v.1.1 mixedLocalExtended_eq_single_of_map_eq_localVertex : ∀ (t : M.localComplex.Face) (x : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices (Sum.inl t)}) @@ -1599,7 +1607,10 @@ private noncomputable def MixedLocalFanCertificate.mixedSubdivision have barycentricAffine_apply (z : M.UsedOldVertex → ℝ) : barycentricAffine z = fun k ↦ ∑ v : M.UsedOldVertex, z v * v.1.1.1 k := by funext k - simp [barycentricAffine, Finset.sum_apply, Pi.smul_apply, smul_eq_mul] + -- These evaluation rules avoid testing whether the dependent vertex type is empty. + simp only [barycentricAffine, LinearMap.coe_toAffineMap, LinearMap.sum_apply, + LinearMap.smulRight_apply, LinearMap.proj_apply, Finset.sum_apply, Pi.smul_apply, + smul_eq_mul] letI : Fintype K.Vertex := K.compactIntrinsic.vertexFintype exact { refined := K.compactIntrinsic @@ -5047,33 +5058,6 @@ private theorem ChartInductionGeometry.canonicalSelectedFace_of_fanInterval_endp · exact False.elim (G.marking.edgeIntervalFirst_ne_second e f.1.2.2 (hp₀Second.trans hp₁Second.symm)) -private structure MixedMapCertificate (M : MixedLocalFanData) where - mixedOldFaceVertices_card : ∀ f : M.MixedOldFace, (M.mixedOldFaceVertices f).card = 3 - continuous_mixedOldFaceMap : ∀ f : M.MixedOldFace, Continuous (M.mixedOldFaceMap f) - mixedOldFaceMap_val : ∀ (f : M.MixedOldFace) - (x : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices f}), - (M.mixedOldFaceMap f x).1 = fun k ↦ ∑ v : M.OldVertex, - extendFaceCoordinates (M.mixedOldFaceVertices f) x v * v.1.1 k - localMixedFaceMap_eq_iff : ∀ {t u : M.localComplex.Face} - {x : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices (Sum.inl t)}} - {y : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices (Sum.inl u)}}, - M.mixedOldFaceMap (Sum.inl t) x = M.mixedOldFaceMap (Sum.inl u) y ↔ - extendFaceCoordinates (M.mixedOldFaceVertices (Sum.inl t)) x = - extendFaceCoordinates (M.mixedOldFaceVertices (Sum.inl u)) y - fanMixedFaceMap_eq_iff : ∀ {f g : M.OutsideFanFace} - {x : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices (Sum.inr f)}} - {y : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices (Sum.inr g)}}, - M.mixedOldFaceMap (Sum.inr f) x = M.mixedOldFaceMap (Sum.inr g) y ↔ - extendFaceCoordinates (M.mixedOldFaceVertices (Sum.inr f)) x = - extendFaceCoordinates (M.mixedOldFaceVertices (Sum.inr g)) y - mixedOldFaceMap_simplexLineMap : ∀ (f : M.MixedOldFace) - (x y : stdSimplex ℝ {v // v ∈ M.mixedOldFaceVertices f}) - (r : Set.Icc (0 : ℝ) 1), - (M.mixedOldFaceMap f (simplexLineMap x y r)).1 = - AffineMap.lineMap (M.mixedOldFaceMap f x).1 (M.mixedOldFaceMap f y).1 r.1 - mixedOldFaceMap_vertex : ∀ (f : M.MixedOldFace) - (v : {v // v ∈ M.mixedOldFaceVertices f}), - M.mixedOldFaceMap f (stdSimplex.vertex v) = v.1.1 private theorem exists_canonicalMixedMapCertificate {S : Type*} [TopologicalSpace S] @@ -5465,26 +5449,6 @@ private theorem exists_canonicalMixedLocalBarycentricCertificate R.refined.edgeParameter_eq_secondCoordinate] exact ⟨⟨hmemParent, hmemMarking, hpositive, hparameter⟩⟩ -private structure MixedLocalInterpolationCertificate (M : MixedLocalFanData) where - localUsedVertex_mem_face_of_map_eq : ∀ (t : M.localComplex.Face) - (z : stdSimplex ℝ {v // v ∈ t.1}) (u : M.localComplex.UsedVertex), - M.localFaceMap t z = M.localVertexPoint u → u.1 ∈ t.1 - exists_localFacePoint_eq_of_edgeParameter_between : ∀ - (t : M.localComplex.Face) (e : M.ambient.Edge) (a b : {v // v ∈ t.1}) - (p : M.ambient.realization), - M.localVertexPoint ⟨a.1, ⟨t.1, t.2, a.2⟩⟩ ∈ M.ambient.faceCarrier e.1 → - M.localVertexPoint ⟨b.1, ⟨t.1, t.2, b.2⟩⟩ ∈ M.ambient.faceCarrier e.1 → - p ∈ M.ambient.faceCarrier e.1 → - M.marking.edgeParameterValue e - (M.localVertexPoint ⟨a.1, ⟨t.1, t.2, a.2⟩⟩) ≤ - M.marking.edgeParameterValue e p → - M.marking.edgeParameterValue e p ≤ M.marking.edgeParameterValue e - (M.localVertexPoint ⟨b.1, ⟨t.1, t.2, b.2⟩⟩) → - M.marking.edgeParameterValue e - (M.localVertexPoint ⟨a.1, ⟨t.1, t.2, a.2⟩⟩) < - M.marking.edgeParameterValue e - (M.localVertexPoint ⟨b.1, ⟨t.1, t.2, b.2⟩⟩) → - ∃ z : stdSimplex ℝ {v // v ∈ t.1}, M.localFaceMap t z = p private theorem exists_canonicalMixedLocalInterpolationCertificate {S : Type*} [TopologicalSpace S] @@ -5576,17 +5540,14 @@ private theorem exists_canonicalMixedLocalFanCertificate exists_canonicalMixedLocalInterpolationCertificate P hT obtain ⟨mixedCertificate, -⟩ := exists_sealed_copy (X := MixedLocalFanCertificate mixedData) - { parentFace := fun t ↦ (localFaceLevelFace t).1 + { toMixedMapCertificate := mapCertificate + toMixedLocalInterpolationCertificate := interpolationCertificate + parentFace := fun t ↦ (localFaceLevelFace t).1 outside_parent_ne := by intro f t h apply f.2 rw [h] exact (localFaceLevelFace t).2 - mixedOldFaceVertices_card := mapCertificate.mixedOldFaceVertices_card - continuous_mixedOldFaceMap := mapCertificate.continuous_mixedOldFaceMap - mixedOldFaceMap_val := mapCertificate.mixedOldFaceMap_val - localMixedFaceMap_eq_iff := mapCertificate.localMixedFaceMap_eq_iff - fanMixedFaceMap_eq_iff := mapCertificate.fanMixedFaceMap_eq_iff mixedOldFaceMap_eq_of_extendedCoordinates := mapCertificate.map_eq_of_extendedCoordinates localMixedFaceMap_mem_parent := @@ -5612,12 +5573,6 @@ private theorem exists_canonicalMixedLocalFanCertificate (localFaceLevelFace t) p hpMark hpFace obtain ⟨u, -, hu⟩ := Finset.mem_image.mp hpLocal exact ⟨u, hu⟩ - localUsedVertex_mem_face_of_map_eq := - interpolationCertificate.localUsedVertex_mem_face_of_map_eq - exists_localFacePoint_eq_of_edgeParameter_between := - interpolationCertificate.exists_localFacePoint_eq_of_edgeParameter_between - mixedOldFaceMap_simplexLineMap := mapCertificate.mixedOldFaceMap_simplexLineMap - mixedOldFaceMap_vertex := mapCertificate.mixedOldFaceMap_vertex mixedLocalExtended_eq_single_of_map_eq_localVertex := mapCertificate.localExtended_eq_single mixedFanExtended_eq_single_of_map_eq_fanVertex := diff --git a/LeanPool/ClassificationOfSurfaces/Moise/ChartInductionCore.lean b/LeanPool/ClassificationOfSurfaces/Moise/ChartInductionCore.lean index 33da22e128..255dd7aeb7 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/ChartInductionCore.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/ChartInductionCore.lean @@ -3,22 +3,18 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import Mathlib.Topology.Metrizable.Urysohn -import LeanPool.ClassificationOfSurfaces.Moise.ChartPatch -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicComplex -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFineSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicCellwiseExtension -import LeanPool.ClassificationOfSurfaces.Moise.FineSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.PLApproximation -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveTriangulation +module + +public import LeanPool.ClassificationOfSurfaces.Moise.ChartPatch +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveControlledApproximation +public import LeanPool.ClassificationOfSurfaces.Moise.RelativeSynchronizedArrangement import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveFanAffine +import LeanPool.ClassificationOfSurfaces.Moise.Brouwer import LeanPool.ClassificationOfSurfaces.Moise.EmbeddedComplexValence -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicMarkedFan -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveControlledApproximation -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteControlledApproximation -import LeanPool.ClassificationOfSurfaces.Moise.FrontierGlue -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalFamilyPolyhedron -import LeanPool.ClassificationOfSurfaces.Moise.RelativeSynchronizedArrangement +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Topology.Metrizable.Urysohn /-! # The Radó chart induction @@ -44,6 +40,8 @@ This file provides the honest objects for that induction: * `moise_triangulation_of_boundaries` — the finite induction and final geometric realization. -/ +@[expose] public section + open scoped Manifold namespace LeanEval @@ -53,6 +51,25 @@ namespace Moise open InvarianceOfDomain +-- Compare subcomplexes in their shared ambient mesh before specializing to each arrangement. +private theorem TriangleMesh.baryEval_eq_iff_of_triangles_subset (R : TriangleMesh) + {F G : Finset (Finset R.Vertex)} (hF : F ⊆ R.triangles) (hG : G ⊆ R.triangles) + (x : GeometricRealization R.Vertex F) (y : GeometricRealization R.Vertex G) : + R.toPlaneComplex.baryEval x.1 = R.toPlaneComplex.baryEval y.1 ↔ x.1 = y.1 := by + let xR : GeometricRealization R.Vertex R.triangles := + ⟨x.1, x.2.1, by + obtain ⟨t, ht, hxt⟩ := x.2.2 + exact ⟨t, hF ht, hxt⟩⟩ + let yR : GeometricRealization R.Vertex R.triangles := + ⟨y.1, y.2.1, by + obtain ⟨t, ht, hyt⟩ := y.2.2 + exact ⟨t, hG ht, hyt⟩⟩ + constructor + · intro hxy + exact congrArg Subtype.val (R.isEmbedding_coordinateEmbed.injective + (show R.coordinateEmbed xR = R.coordinateEmbed yR from hxy)) + · exact congrArg R.toPlaneComplex.baryEval + /-- A finite two-dimensional complex embedded in `S`, not necessarily covering it. The realization is computed from the combinatorial data (as in `GeometricTriangulation`), so the support of a partial triangulation is a genuine finite polyhedron sitting inside `S`. -/ @@ -2546,26 +2563,15 @@ theorem patchMeshes_coordinateEmbed_eq_iff (k : ChartKind) (Q.patchNewMesh k).coordinateEmbed y ↔ (x : (Q.patchOldMesh k).Vertex → ℝ) = (y : (Q.patchNewMesh k).Vertex → ℝ) := by - let R := PolygonalFamily.synchronizedArrangement (Q.patchFacePolygon k) - (patchTriangleMesh k) - let xR : GeometricRealization R.Vertex R.triangles := - ⟨x.1, x.2.1, by - obtain ⟨t, ht, hxt⟩ := x.2.2 - refine ⟨t, ?_, hxt⟩ - exact (PolygonalFamily.selectedSynchronizedMesh_triangle_mem - (Q.patchFacePolygon k) (patchTriangleMesh k) (fun _ ↦ True)).mp ht |>.1⟩ - let yR : GeometricRealization R.Vertex R.triangles := - ⟨y.1, y.2.1, by - obtain ⟨t, ht, hyt⟩ := y.2.2 - refine ⟨t, ?_, hyt⟩ - exact (PolygonalFamily.targetSynchronizedMesh_triangle_mem - (Q.patchFacePolygon k) (patchTriangleMesh k)).mp ht |>.1⟩ - constructor - · intro hxy - have hR : R.coordinateEmbed xR = R.coordinateEmbed yR := hxy - exact congrArg Subtype.val (R.isEmbedding_coordinateEmbed.injective hR) - · intro hxy - exact congrArg (fun z ↦ R.toPlaneComplex.baryEval z) hxy + refine TriangleMesh.baryEval_eq_iff_of_triangles_subset + (PolygonalFamily.synchronizedArrangement (Q.patchFacePolygon k) (patchTriangleMesh k)) + ?_ ?_ x y + · intro t ht + exact ((PolygonalFamily.selectedSynchronizedMesh_triangle_mem + (Q.patchFacePolygon k) (patchTriangleMesh k) (fun _ ↦ True)).mp ht).1 + · intro t ht + exact ((PolygonalFamily.targetSynchronizedMesh_triangle_mem + (Q.patchFacePolygon k) (patchTriangleMesh k)).mp ht).1 /-- If the retained source coordinates land in a closed model region, the whole replacement support does too. -/ @@ -2837,26 +2843,14 @@ theorem synchronizedPatchMeshes_coordinateEmbed_eq_iff (k : ChartKind) (synchronizedPatchNewMesh k J).coordinateEmbed y ↔ (x : (synchronizedPatchOldMesh k J).Vertex → ℝ) = (y : (synchronizedPatchNewMesh k J).Vertex → ℝ) := by - let R := PolygonalFamily.synchronizedArrangement J k.patchComplex.toTriangleMesh - let xR : GeometricRealization R.Vertex R.triangles := - ⟨x.1, x.2.1, by - obtain ⟨t, ht, hxt⟩ := x.2.2 - refine ⟨t, ?_, hxt⟩ - exact (PolygonalFamily.selectedSynchronizedMesh_triangle_mem J - k.patchComplex.toTriangleMesh - (fun _ ↦ True)).mp ht |>.1⟩ - let yR : GeometricRealization R.Vertex R.triangles := - ⟨y.1, y.2.1, by - obtain ⟨t, ht, hyt⟩ := y.2.2 - refine ⟨t, ?_, hyt⟩ - exact (PolygonalFamily.targetSynchronizedMesh_triangle_mem J - k.patchComplex.toTriangleMesh).mp ht |>.1⟩ - constructor - · intro hxy - have hR : R.coordinateEmbed xR = R.coordinateEmbed yR := hxy - exact congrArg Subtype.val (R.isEmbedding_coordinateEmbed.injective hR) - · intro hxy - exact congrArg (fun z ↦ R.toPlaneComplex.baryEval z) hxy + refine TriangleMesh.baryEval_eq_iff_of_triangles_subset + (PolygonalFamily.synchronizedArrangement J k.patchComplex.toTriangleMesh) ?_ ?_ x y + · intro t ht + exact ((PolygonalFamily.selectedSynchronizedMesh_triangle_mem J + k.patchComplex.toTriangleMesh (fun _ ↦ True)).mp ht).1 + · intro t ht + exact ((PolygonalFamily.targetSynchronizedMesh_triangle_mem J + k.patchComplex.toTriangleMesh).mp ht).1 /-- Transport the finite polygonal member of a synchronized patch weld to the surface. -/ noncomputable def synchronizedPatchOldSurfaceEmbed @@ -3036,24 +3030,13 @@ theorem meshes_coordinateEmbed_eq_iff (J : ι → PolygonalCircle) (N : Triangle (oldMesh J N).coordinateEmbed x = (newMesh J N).coordinateEmbed y ↔ (x : (oldMesh J N).Vertex → ℝ) = (y : (newMesh J N).Vertex → ℝ) := by - let R := PolygonalFamily.synchronizedArrangement J N - let xR : GeometricRealization R.Vertex R.triangles := - ⟨x.1, x.2.1, by - obtain ⟨t, ht, hxt⟩ := x.2.2 - refine ⟨t, ?_, hxt⟩ - exact (PolygonalFamily.selectedSynchronizedMesh_triangle_mem J N - (fun _ ↦ True)).mp ht |>.1⟩ - let yR : GeometricRealization R.Vertex R.triangles := - ⟨y.1, y.2.1, by - obtain ⟨t, ht, hyt⟩ := y.2.2 - refine ⟨t, ?_, hyt⟩ - exact (PolygonalFamily.targetSynchronizedMesh_triangle_mem J N).mp ht |>.1⟩ - constructor - · intro hxy - have hR : R.coordinateEmbed xR = R.coordinateEmbed yR := hxy - exact congrArg Subtype.val (R.isEmbedding_coordinateEmbed.injective hR) - · intro hxy - exact congrArg (fun z ↦ R.toPlaneComplex.baryEval z) hxy + refine TriangleMesh.baryEval_eq_iff_of_triangles_subset + (PolygonalFamily.synchronizedArrangement J N) ?_ ?_ x y + · intro t ht + exact ((PolygonalFamily.selectedSynchronizedMesh_triangle_mem J N + (fun _ ↦ True)).mp ht).1 + · intro t ht + exact ((PolygonalFamily.targetSynchronizedMesh_triangle_mem J N).mp ht).1 /-- Transport the selected polygonal member of an arbitrary synchronized weld to the surface. -/ noncomputable def oldSurfaceEmbed @@ -3370,27 +3353,13 @@ theorem meshes_coordinateEmbed_eq_iff (newMesh J N lines).coordinateEmbed y ↔ (x : (oldMesh J N lines).Vertex → ℝ) = (y : (newMesh J N lines).Vertex → ℝ) := by - let R := PolygonalFamily.relativeSynchronizedArrangement J N lines - let xR : GeometricRealization R.Vertex R.triangles := - ⟨x.1, x.2.1, by - obtain ⟨t, ht, hxt⟩ := x.2.2 - refine ⟨t, ?_, hxt⟩ - exact - (PolygonalFamily.selectedRelativeSynchronizedMesh_triangle_mem - J N lines (fun _ ↦ True)).mp ht |>.1⟩ - let yR : GeometricRealization R.Vertex R.triangles := - ⟨y.1, y.2.1, by - obtain ⟨t, ht, hyt⟩ := y.2.2 - refine ⟨t, ?_, hyt⟩ - exact - (PolygonalFamily.targetRelativeSynchronizedMesh_triangle_mem - J N lines).mp ht |>.1⟩ - constructor - · intro hxy - have hR : R.coordinateEmbed xR = R.coordinateEmbed yR := hxy - exact congrArg Subtype.val (R.isEmbedding_coordinateEmbed.injective hR) - · intro hxy - exact congrArg (fun z ↦ R.toPlaneComplex.baryEval z) hxy + refine TriangleMesh.baryEval_eq_iff_of_triangles_subset + (PolygonalFamily.relativeSynchronizedArrangement J N lines) ?_ ?_ x y + · intro t ht + exact ((PolygonalFamily.selectedRelativeSynchronizedMesh_triangle_mem + J N lines (fun _ ↦ True)).mp ht).1 + · intro t ht + exact ((PolygonalFamily.targetRelativeSynchronizedMesh_triangle_mem J N lines).mp ht).1 /-- The `oldSurfaceEmbed` declaration. -/ noncomputable def oldSurfaceEmbed diff --git a/LeanPool/ClassificationOfSurfaces/Moise/ChartPatch.lean b/LeanPool/ClassificationOfSurfaces/Moise/ChartPatch.lean index 0f21afc3e9..d04c220fac 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/ChartPatch.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/ChartPatch.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.ChartExtraction -import LeanPool.ClassificationOfSurfaces.Moise.ElementaryMove +module + +public import LeanPool.ClassificationOfSurfaces.Moise.ChartExtraction +public import LeanPool.ClassificationOfSurfaces.Moise.ElementaryMove +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # A fixed polygonal patch inside the Rado chart models @@ -15,6 +20,8 @@ corresponding half-disk patch. These strict margins are the concrete base geome Rado induction. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/CommonSubdivision.lean b/LeanPool/ClassificationOfSurfaces/Moise/CommonSubdivision.lean index 487ef47069..a6c482986a 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/CommonSubdivision.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/CommonSubdivision.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangle +module + +public import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangle +import Mathlib.Analysis.Normed.Affine.AddTorsorBases /-! # Common subdivisions of finite plane triangle meshes @@ -13,6 +16,8 @@ subordinate to a target mesh with the same support, cut it by every barycentric- hyperplane of every target triangle. The resulting chambers lie in target triangles. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/ConeExtension.lean b/LeanPool/ClassificationOfSurfaces/Moise/ConeExtension.lean index 55ba4d2140..a586f227ea 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/ConeExtension.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/ConeExtension.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangleMove +module + +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex +public import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional import Mathlib.Analysis.Convex.Between -import Mathlib.Analysis.Convex.Join -import Mathlib.Analysis.Convex.Topology +import Mathlib.Analysis.Convex.Contractible import Mathlib.Analysis.Convex.Gauge +import Mathlib.Analysis.Convex.Join import Mathlib.Analysis.Normed.Affine.AddTorsorBases -import Mathlib.LinearAlgebra.Basis.Basic import Mathlib.Topology.Separation.Connected /-! @@ -21,6 +23,8 @@ endpoints on the frontier. It is the face-to-face lemma behind the cone extensi on a triangle boundary. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/Countermodels.lean b/LeanPool/ClassificationOfSurfaces/Moise/Countermodels.lean index 7b998947a3..cdb1ce98cc 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/Countermodels.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/Countermodels.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.Anchors -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicCloseCellwiseExtension -import LeanPool.ClassificationOfSurfaces.Moise.ChartInduction -import LeanPool.ClassificationOfSurfaces.CellComplex -import Mathlib.Topology.Instances.Rat +module + +public import LeanPool.ClassificationOfSurfaces.CellComplex +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Countermodels and semantic anchors @@ -34,6 +36,8 @@ Contents: documentation of why `GeometricTriangulation` replaces it. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/DualConnectivity.lean b/LeanPool/ClassificationOfSurfaces/Moise/DualConnectivity.lean index f43820dbdb..b05ade0df4 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/DualConnectivity.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/DualConnectivity.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.ChartInduction +module + +public import LeanPool.ClassificationOfSurfaces.Moise.ChartInductionCore +import LeanPool.ClassificationOfSurfaces.Moise.EmbeddedComplexValence +import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicMarkedFan import LeanPool.ClassificationOfSurfaces.Moise.PuncturedSurface +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Dual connectivity of completed surface triangulations @@ -15,6 +22,8 @@ their closed carriers can meet only at triangulation vertices. Deleting that fi locus would therefore disconnect the surface, contradicting finite-puncture connectivity. -/ +@[expose] public section + open scoped Manifold namespace LeanEval diff --git a/LeanPool/ClassificationOfSurfaces/Moise/ElementaryMove.lean b/LeanPool/ClassificationOfSurfaces/Moise/ElementaryMove.lean index d8125e41ca..a4157e7ce8 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/ElementaryMove.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/ElementaryMove.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.AmbientHomeomorph -import LeanPool.ClassificationOfSurfaces.Moise.LineSubdivision +module + +public import LeanPool.ClassificationOfSurfaces.Moise.AmbientHomeomorph +public import LeanPool.ClassificationOfSurfaces.Moise.LineSubdivision /-! # The elementary supported move in polygonal Schoenflies @@ -14,6 +16,8 @@ inside a fixed diamond. Repositioning the fan point while fixing the four diamo a PL homeomorphism of the diamond, and hence an ambient homeomorphism by identity extension. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -385,257 +389,30 @@ private theorem diamondFan_inter_12_13 {a : ℝ} (ha0 : -2 < a) (ha1 : a < 2) : intro v hv fin_cases v <;> simp [diamondRightAffine_apply] at hv ⊢ ; linarith +-- Diagonals of slope ±2 through the fan point separate the opposite triangle pairs. private theorem diamondFan_inter_02_13 {a : ℝ} (ha0 : -2 < a) (ha1 : a < 2) : convexHull ℝ (diamondFanPosition a '' (({0, 4, 2} : Finset (Fin 5)) : Set _)) ∩ convexHull ℝ (diamondFanPosition a '' (({1, 4, 3} : Finset (Fin 5)) : Set _)) = convexHull ℝ (diamondFanPosition a '' ((({0, 4, 2} : Finset (Fin 5)) ∩ {1, 4, 3} : Finset (Fin 5)) : Set _)) := by - let s : Finset (Fin 5) := {0, 4, 2} - let t : Finset (Fin 5) := {1, 4, 3} - let upperEdge : Finset (Fin 5) := {4, 2} - let lowerEdge : Finset (Fin 5) := {4, 3} - have hUpper : - convexHull ℝ (diamondFanPosition a '' (s : Set (Fin 5))) ∩ - {p | (-diamondVerticalAffine) p = 0} = - convexHull ℝ (diamondFanPosition a '' (upperEdge : Set (Fin 5))) := by - have h := convexHull_inter_affine_zero_of_nonneg - (s.image (diamondFanPosition a)) (-diamondVerticalAffine) (by - intro p hp - obtain ⟨v, hv, rfl⟩ := Finset.mem_image.mp hp - fin_cases v <;> simp [s] at hv ⊢) - have hfilter : (s.image (diamondFanPosition a)).filter - (fun p => (-diamondVerticalAffine) p = 0) = - upperEdge.image (diamondFanPosition a) := by - ext p - simp only [Finset.mem_filter, Finset.mem_image] - constructor - · rintro ⟨⟨v, hv, rfl⟩, hz⟩ - refine ⟨v, ?_, rfl⟩ - fin_cases v <;> simp [s, upperEdge] at hv hz ⊢ - · rintro ⟨v, hv, rfl⟩ - refine ⟨⟨v, ?_, rfl⟩, ?_⟩ - · fin_cases v <;> simp [s, upperEdge] at hv ⊢ - · fin_cases v <;> simp [upperEdge] at hv ⊢ - rw [hfilter] at h - simpa only [Finset.coe_image] using h - have hLower : - convexHull ℝ (diamondFanPosition a '' (t : Set (Fin 5))) ∩ - {p | diamondVerticalAffine p = 0} = - convexHull ℝ (diamondFanPosition a '' (lowerEdge : Set (Fin 5))) := by - have h := convexHull_inter_affine_zero_of_nonneg - (t.image (diamondFanPosition a)) diamondVerticalAffine (by - intro p hp - obtain ⟨v, hv, rfl⟩ := Finset.mem_image.mp hp - fin_cases v <;> simp [t] at hv ⊢) - have hfilter : (t.image (diamondFanPosition a)).filter - (fun p => diamondVerticalAffine p = 0) = - lowerEdge.image (diamondFanPosition a) := by - ext p - simp only [Finset.mem_filter, Finset.mem_image] - constructor - · rintro ⟨⟨v, hv, rfl⟩, hz⟩ - refine ⟨v, ?_, rfl⟩ - fin_cases v <;> simp [t, lowerEdge] at hv hz ⊢ - · rintro ⟨v, hv, rfl⟩ - refine ⟨⟨v, ?_, rfl⟩, ?_⟩ - · fin_cases v <;> simp [t, lowerEdge] at hv ⊢ - · fin_cases v <;> simp [lowerEdge] at hv ⊢ - rw [hfilter] at h - simpa only [Finset.coe_image] using h - let horizontal : Plane →ᵃ[ℝ] ℝ := cartesianY - AffineMap.const ℝ Plane a - have hEdges : - convexHull ℝ (diamondFanPosition a '' (upperEdge : Set (Fin 5))) ∩ - convexHull ℝ (diamondFanPosition a '' (lowerEdge : Set (Fin 5))) = - {diamondFanPosition a 4} := by - have h := convexHull_inter_of_affine_separation - (upperEdge.image (diamondFanPosition a)) - (lowerEdge.image (diamondFanPosition a)) - ({diamondFanPosition a 4} : Finset Plane) horizontal - (by - intro p hp - obtain ⟨v, hv, rfl⟩ := Finset.mem_image.mp hp - fin_cases v <;> simp [upperEdge, horizontal] at hv ⊢ ; linarith) - (by - intro p hp - obtain ⟨v, hv, rfl⟩ := Finset.mem_image.mp hp - fin_cases v <;> simp [lowerEdge, horizontal] at hv ⊢ ; linarith) - (by - ext p - simp only [Finset.mem_filter, Finset.mem_image, Finset.mem_singleton] - constructor - · rintro ⟨⟨v, hv, rfl⟩, hz⟩ - fin_cases v <;> simp [upperEdge, horizontal] at hv hz ⊢ ; linarith - · rintro rfl - exact ⟨⟨4, by simp [upperEdge]⟩, by simp [horizontal]⟩) - (by - ext p - simp only [Finset.mem_filter, Finset.mem_image, Finset.mem_singleton] - constructor - · rintro ⟨⟨v, hv, rfl⟩, hz⟩ - fin_cases v <;> simp [lowerEdge, horizontal] at hv hz ⊢ ; linarith - · rintro rfl - exact ⟨⟨4, by simp [lowerEdge]⟩, by simp [horizontal]⟩) - simpa only [Finset.coe_image, Finset.coe_singleton, convexHull_singleton] using h - change convexHull ℝ (diamondFanPosition a '' (s : Set (Fin 5))) ∩ - convexHull ℝ (diamondFanPosition a '' (t : Set (Fin 5))) = _ - apply Set.Subset.antisymm - · intro p hp - have hxle : p 0 ≤ 0 := by - apply convexHull_min _ ((convex_Iic (0 : ℝ)).affine_preimage diamondVerticalAffine) hp.1 - rintro q ⟨v, hv, rfl⟩ - fin_cases v <;> simp [s] at hv ⊢ - have hxge : 0 ≤ p 0 := by - apply convexHull_min _ ((convex_Ici (0 : ℝ)).affine_preimage diamondVerticalAffine) hp.2 - rintro q ⟨v, hv, rfl⟩ - fin_cases v <;> simp [t] at hv ⊢ - have hxzero : diamondVerticalAffine p = 0 := by - change p 0 = 0 - linarith - have hpUpper : p ∈ convexHull ℝ - (diamondFanPosition a '' (upperEdge : Set (Fin 5))) := by - rw [← hUpper] - exact ⟨hp.1, by simpa using hxzero⟩ - have hpLower : p ∈ convexHull ℝ - (diamondFanPosition a '' (lowerEdge : Set (Fin 5))) := by - rw [← hLower] - exact ⟨hp.2, hxzero⟩ - have hpBoth : p ∈ convexHull ℝ - (diamondFanPosition a '' (upperEdge : Set (Fin 5))) ∩ - convexHull ℝ (diamondFanPosition a '' (lowerEdge : Set (Fin 5))) := - ⟨hpUpper, hpLower⟩ - rw [hEdges] at hpBoth - have hp4 : p = diamondFanPosition a 4 := Set.mem_singleton_iff.mp hpBoth - subst p - exact subset_convexHull ℝ _ ⟨4, by simp [], rfl⟩ - · intro p hp - exact ⟨convexHull_mono (Set.image_mono Finset.inter_subset_left) hp, - convexHull_mono (Set.image_mono Finset.inter_subset_right) hp⟩ + apply convexHull_image_inter_of_affine_separation (diamondFanPosition a) + (diamondFanPosition_injective ha0 ha1) {0, 4, 2} {1, 4, 3} + (cartesianY - (2 : ℝ) • cartesianX - AffineMap.const ℝ Plane a) + all_goals + intro v hv + fin_cases v <;> simp at hv ⊢ <;> linarith private theorem diamondFan_inter_12_03 {a : ℝ} (ha0 : -2 < a) (ha1 : a < 2) : convexHull ℝ (diamondFanPosition a '' (({1, 2, 4} : Finset (Fin 5)) : Set _)) ∩ convexHull ℝ (diamondFanPosition a '' (({0, 3, 4} : Finset (Fin 5)) : Set _)) = convexHull ℝ (diamondFanPosition a '' ((({1, 2, 4} : Finset (Fin 5)) ∩ {0, 3, 4} : Finset (Fin 5)) : Set _)) := by - let s : Finset (Fin 5) := {1, 2, 4} - let t : Finset (Fin 5) := {0, 3, 4} - let upperEdge : Finset (Fin 5) := {2, 4} - let lowerEdge : Finset (Fin 5) := {3, 4} - have hUpper : - convexHull ℝ (diamondFanPosition a '' (s : Set (Fin 5))) ∩ - {p | diamondVerticalAffine p = 0} = - convexHull ℝ (diamondFanPosition a '' (upperEdge : Set (Fin 5))) := by - have h := convexHull_inter_affine_zero_of_nonneg - (s.image (diamondFanPosition a)) diamondVerticalAffine (by - intro p hp - obtain ⟨v, hv, rfl⟩ := Finset.mem_image.mp hp - fin_cases v <;> simp [s] at hv ⊢) - have hfilter : (s.image (diamondFanPosition a)).filter - (fun p => diamondVerticalAffine p = 0) = - upperEdge.image (diamondFanPosition a) := by - ext p - simp only [Finset.mem_filter, Finset.mem_image] - constructor - · rintro ⟨⟨v, hv, rfl⟩, hz⟩ - refine ⟨v, ?_, rfl⟩ - fin_cases v <;> simp [s, upperEdge] at hv hz ⊢ - · rintro ⟨v, hv, rfl⟩ - refine ⟨⟨v, ?_, rfl⟩, ?_⟩ - · fin_cases v <;> simp [s, upperEdge] at hv ⊢ - · fin_cases v <;> simp [upperEdge] at hv ⊢ - rw [hfilter] at h - simpa only [Finset.coe_image] using h - have hLower : - convexHull ℝ (diamondFanPosition a '' (t : Set (Fin 5))) ∩ - {p | (-diamondVerticalAffine) p = 0} = - convexHull ℝ (diamondFanPosition a '' (lowerEdge : Set (Fin 5))) := by - have h := convexHull_inter_affine_zero_of_nonneg - (t.image (diamondFanPosition a)) (-diamondVerticalAffine) (by - intro p hp - obtain ⟨v, hv, rfl⟩ := Finset.mem_image.mp hp - fin_cases v <;> simp [t] at hv ⊢) - have hfilter : (t.image (diamondFanPosition a)).filter - (fun p => (-diamondVerticalAffine) p = 0) = - lowerEdge.image (diamondFanPosition a) := by - ext p - simp only [Finset.mem_filter, Finset.mem_image] - constructor - · rintro ⟨⟨v, hv, rfl⟩, hz⟩ - refine ⟨v, ?_, rfl⟩ - fin_cases v <;> simp [t, lowerEdge] at hv hz ⊢ - · rintro ⟨v, hv, rfl⟩ - refine ⟨⟨v, ?_, rfl⟩, ?_⟩ - · fin_cases v <;> simp [t, lowerEdge] at hv ⊢ - · fin_cases v <;> simp [lowerEdge] at hv ⊢ - rw [hfilter] at h - simpa only [Finset.coe_image] using h - let horizontal : Plane →ᵃ[ℝ] ℝ := cartesianY - AffineMap.const ℝ Plane a - have hEdges : - convexHull ℝ (diamondFanPosition a '' (upperEdge : Set (Fin 5))) ∩ - convexHull ℝ (diamondFanPosition a '' (lowerEdge : Set (Fin 5))) = - {diamondFanPosition a 4} := by - have h := convexHull_inter_of_affine_separation - (upperEdge.image (diamondFanPosition a)) - (lowerEdge.image (diamondFanPosition a)) - ({diamondFanPosition a 4} : Finset Plane) horizontal - (by - intro p hp - obtain ⟨v, hv, rfl⟩ := Finset.mem_image.mp hp - fin_cases v <;> simp [upperEdge, horizontal] at hv ⊢ ; linarith) - (by - intro p hp - obtain ⟨v, hv, rfl⟩ := Finset.mem_image.mp hp - fin_cases v <;> simp [lowerEdge, horizontal] at hv ⊢ ; linarith) - (by - ext p - simp only [Finset.mem_filter, Finset.mem_image, Finset.mem_singleton] - constructor - · rintro ⟨⟨v, hv, rfl⟩, hz⟩ - fin_cases v <;> simp [upperEdge, horizontal] at hv hz ⊢ ; linarith - · rintro rfl - exact ⟨⟨4, by simp [upperEdge]⟩, by simp [horizontal]⟩) - (by - ext p - simp only [Finset.mem_filter, Finset.mem_image, Finset.mem_singleton] - constructor - · rintro ⟨⟨v, hv, rfl⟩, hz⟩ - fin_cases v <;> simp [lowerEdge, horizontal] at hv hz ⊢ ; linarith - · rintro rfl - exact ⟨⟨4, by simp [lowerEdge]⟩, by simp [horizontal]⟩) - simpa only [Finset.coe_image, Finset.coe_singleton, convexHull_singleton] using h - change convexHull ℝ (diamondFanPosition a '' (s : Set (Fin 5))) ∩ - convexHull ℝ (diamondFanPosition a '' (t : Set (Fin 5))) = _ - apply Set.Subset.antisymm - · intro p hp - have hxge : 0 ≤ p 0 := by - apply convexHull_min _ ((convex_Ici (0 : ℝ)).affine_preimage diamondVerticalAffine) hp.1 - rintro q ⟨v, hv, rfl⟩ - fin_cases v <;> simp [s] at hv ⊢ - have hxle : p 0 ≤ 0 := by - apply convexHull_min _ ((convex_Iic (0 : ℝ)).affine_preimage diamondVerticalAffine) hp.2 - rintro q ⟨v, hv, rfl⟩ - fin_cases v <;> simp [t] at hv ⊢ - have hxzero : diamondVerticalAffine p = 0 := by - change p 0 = 0 - linarith - have hpUpper : p ∈ convexHull ℝ - (diamondFanPosition a '' (upperEdge : Set (Fin 5))) := by - rw [← hUpper] - exact ⟨hp.1, hxzero⟩ - have hpLower : p ∈ convexHull ℝ - (diamondFanPosition a '' (lowerEdge : Set (Fin 5))) := by - rw [← hLower] - exact ⟨hp.2, by simpa using hxzero⟩ - have hpBoth : p ∈ convexHull ℝ - (diamondFanPosition a '' (upperEdge : Set (Fin 5))) ∩ - convexHull ℝ (diamondFanPosition a '' (lowerEdge : Set (Fin 5))) := - ⟨hpUpper, hpLower⟩ - rw [hEdges] at hpBoth - have hp4 : p = diamondFanPosition a 4 := Set.mem_singleton_iff.mp hpBoth - subst p - exact subset_convexHull ℝ _ ⟨4, by simp [], rfl⟩ - · intro p hp - exact ⟨convexHull_mono (Set.image_mono Finset.inter_subset_left) hp, - convexHull_mono (Set.image_mono Finset.inter_subset_right) hp⟩ + apply convexHull_image_inter_of_affine_separation (diamondFanPosition a) + (diamondFanPosition_injective ha0 ha1) {1, 2, 4} {0, 3, 4} + (cartesianY + (2 : ℝ) • cartesianX - AffineMap.const ℝ Plane a) + all_goals + intro v hv + fin_cases v <;> simp at hv ⊢ <;> linarith /-- The four-triangle fan of a fixed diamond, with fan point `(0,a)`. -/ noncomputable abbrev diamondFanMesh (a : ℝ) (ha0 : -2 < a) (ha1 : a < 2) : TriangleMesh where @@ -657,17 +434,17 @@ noncomputable abbrev diamondFanMesh (a : ℝ) (ha0 : -2 < a) (ha1 : a < 2) : Tri · exact diamondFan_inter_02_12 ha0 ha1 · exact diamondFan_inter_02_03 ha0 ha1 · exact diamondFan_inter_02_13 ha0 ha1 - · simpa [Set.inter_comm, Finset.pair_comm] using diamondFan_inter_02_12 ha0 ha1 + · simpa only [Set.inter_comm, Finset.inter_comm] using diamondFan_inter_02_12 ha0 ha1 · simp · exact diamondFan_inter_12_03 ha0 ha1 · exact diamondFan_inter_12_13 ha0 ha1 - · simpa [Set.inter_comm] using diamondFan_inter_02_03 ha0 ha1 - · simpa [Set.inter_comm] using diamondFan_inter_12_03 ha0 ha1 + · simpa only [Set.inter_comm, Finset.inter_comm] using diamondFan_inter_02_03 ha0 ha1 + · simpa only [Set.inter_comm, Finset.inter_comm] using diamondFan_inter_12_03 ha0 ha1 · simp · exact diamondFan_inter_03_13 ha0 ha1 - · simpa [Set.inter_comm] using diamondFan_inter_02_13 ha0 ha1 - · simpa [Set.inter_comm] using diamondFan_inter_12_13 ha0 ha1 - · simpa [Set.inter_comm, Finset.pair_comm] using diamondFan_inter_03_13 ha0 ha1 + · simpa only [Set.inter_comm, Finset.inter_comm] using diamondFan_inter_02_13 ha0 ha1 + · simpa only [Set.inter_comm, Finset.inter_comm] using diamondFan_inter_12_13 ha0 ha1 + · simpa only [Set.inter_comm, Finset.inter_comm] using diamondFan_inter_03_13 ha0 ha1 · simp theorem diamondFanMesh_support (a : ℝ) (ha0 : -2 < a) (ha1 : a < 2) : diff --git a/LeanPool/ClassificationOfSurfaces/Moise/EmbeddedComplexValence.lean b/LeanPool/ClassificationOfSurfaces/Moise/EmbeddedComplexValence.lean index f8b18b92d1..53f9b47452 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/EmbeddedComplexValence.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/EmbeddedComplexValence.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.Moise.GeometricTriangulation +public import Mathlib.Geometry.Manifold.Instances.Real import LeanPool.ClassificationOfSurfaces.Moise.Brouwer -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteTriangulation -import LeanPool.ClassificationOfSurfaces.Surface -import LeanPool.ClassificationOfSurfaces.Topology.InvarianceOfDomain +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Edge valence of a triangle complex embedded in a surface @@ -17,6 +21,8 @@ used implicitly in Moise's gluing theorem: two pages around an edge already form neighborhood, so a third page approaching the same edge would have to enter their open image. -/ +@[expose] public section + open scoped Manifold namespace LeanEval diff --git a/LeanPool/ClassificationOfSurfaces/Moise/FacewiseComparison.lean b/LeanPool/ClassificationOfSurfaces/Moise/FacewiseComparison.lean index 7414374e84..98132c7045 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/FacewiseComparison.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/FacewiseComparison.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteControlledApproximation +module + +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFinitePLApproximation +import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteSidePreservation +import Mathlib.Analysis.Normed.Affine.AddTorsor +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The per-face comparison map for locally finite side preservation @@ -35,6 +42,8 @@ Everything is arranged for a realization with shrunken approximation controls radii; the resulting entry point is `exists_controlled_polygonalReplacement_of_comparison`. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/FineSubdivision.lean b/LeanPool/ClassificationOfSurfaces/Moise/FineSubdivision.lean index ecf44a1aee..4094cd1f2e 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/FineSubdivision.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/FineSubdivision.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension +module + +public import LeanPool.ClassificationOfSurfaces.Moise.LineSubdivision import LeanPool.ClassificationOfSurfaces.Moise.CommonSubdivision /-! @@ -15,6 +17,8 @@ support by small balls and, around every center, cut by two vertical and two hor Every chamber meeting the corresponding smaller ball is trapped in the resulting rectangle. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/FinitePLHomeomorph.lean b/LeanPool/ClassificationOfSurfaces/Moise/FinitePLHomeomorph.lean index 0719d7f744..8c7fdac518 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/FinitePLHomeomorph.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/FinitePLHomeomorph.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.CommonSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension +module + +public import LeanPool.ClassificationOfSurfaces.Moise.CommonSubdivision +public import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension +import Mathlib.Analysis.Normed.Affine.AddTorsorBases /-! # Finite PL homeomorphisms on compact plane polyhedra @@ -14,6 +17,8 @@ finite source complex on which an ambient homeomorphism is affine facewise. Com and pullback make these witnesses closed under symmetry and composition. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/FreeTriangle.lean b/LeanPool/ClassificationOfSurfaces/Moise/FreeTriangle.lean index 83ca349ef0..f8512c5d47 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/FreeTriangle.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/FreeTriangle.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.ElementaryMove +module + +public import LeanPool.ClassificationOfSurfaces.Moise.LineSubdivision import Mathlib.Analysis.Normed.Affine.AddTorsorBases import Mathlib.Analysis.Normed.Module.Connected -import Mathlib.LinearAlgebra.Dimension.Finrank -import Mathlib.Order.Interval.Set.Infinite /-! # Free triangles in finite planar meshes @@ -17,6 +17,8 @@ Schoenflies induction. A finite planar triangle mesh with infinite frontier has to exactly one triangle, hence a free triangle that can be removed by a supported ambient move. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/FreeTriangleMove.lean b/LeanPool/ClassificationOfSurfaces/Moise/FreeTriangleMove.lean index 49a6980608..0ad4cdee9d 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/FreeTriangleMove.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/FreeTriangleMove.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangle -import LeanPool.ClassificationOfSurfaces.Moise.ThinKiteMove +module + +public import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangle +public import LeanPool.ClassificationOfSurfaces.Moise.ThinKiteMove /-! # The supported move at a free triangle @@ -13,6 +15,8 @@ This file transports the normalized thin-kite move to an arbitrary plane triangl supplies the small positive thickness required by the relative polygonal Schoenflies theorem. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/FrontierGlue.lean b/LeanPool/ClassificationOfSurfaces/Moise/FrontierGlue.lean index f0a8b811a4..a842673786 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/FrontierGlue.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/FrontierGlue.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import Mathlib.Topology.MetricSpace.HausdorffDistance -import Mathlib.Topology.Order.Compact +module + +public import Mathlib.Topology.MetricSpace.HausdorffDistance /-! # Gluing a vanishing approximation across an open frontier @@ -15,6 +16,8 @@ continuously with the unchanged map outside the open set. This file isolates th argument from the later complex bookkeeping. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/GeometricTriangulation.lean b/LeanPool/ClassificationOfSurfaces/Moise/GeometricTriangulation.lean index 25c5738f2e..bd7c3c17f1 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/GeometricTriangulation.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/GeometricTriangulation.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import Mathlib.Analysis.Convex.StdSimplex -import Mathlib.Topology.Homeomorph.Lemmas -import Mathlib.Topology.Separation.Hausdorff +module + +public import Mathlib.Analysis.Convex.StdSimplex /-! # Geometric triangulations @@ -29,6 +29,8 @@ Semantic anchors (see `Moise/Countermodels.lean` and the Definition Faithfulness * non-example: `ℝ` and `ℚ` admit no geometric triangulation (they are not compact). -/ +@[expose] public section + /-- A finite closed cover of a preconnected set has a connected intersection graph. This is the closed-cover counterpart of `IsPreconnected.transGen_of_iUnion`, whose open-cover diff --git a/LeanPool/ClassificationOfSurfaces/Moise/GraphPolygonalization.lean b/LeanPool/ClassificationOfSurfaces/Moise/GraphPolygonalization.lean index 55d19111aa..d912978192 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/GraphPolygonalization.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/GraphPolygonalization.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.GraphRefinement +module + +public import LeanPool.ClassificationOfSurfaces.Moise.GraphRefinement import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArcModel +import Mathlib.Analysis.Normed.Affine.AddTorsor /-! # Simultaneous polygonalization of finite embedded plane graphs @@ -15,6 +18,8 @@ constructions trim each embedded edge at the last exits from those regions and p remaining pairwise-disjoint compact arcs. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -636,6 +641,7 @@ theorem exists_vertexDiskControl (hinj : Set.InjOn h K.support) : Nonempty (K.VertexDiskControl h) := by classical let I := Option ((K.Vertex × K.Vertex) ⊕ (K.Vertex × K.EdgeFace)) + have : Nonempty I := ⟨none⟩ let P : I → ℝ → Prop | none, _ => True | some (Sum.inl (v, w)), δ => v = w ∨ @@ -2522,25 +2528,24 @@ theorem graphReplacementMap_affineOn_middle {h : Plane → Plane} linarith have hmul := mul_le_mul_of_nonneg_left hr hdelta linarith - have hzBounds {x : Plane} (hx : x ∈ R.cellCarrier u) : z x ∈ Set.Icc 0 n := by - have ht0 := hmid0 x hx - have ht1 := hmid1 x hx - have hr0 : 0 ≤ 4 * K.edgeParameter i x - 2 := by linarith - have hr1 : 4 * K.edgeParameter i x - 2 ≤ 1 := by linarith + have hzExitBounds {x : Plane} (hx : x ∈ R.cellCarrier u) : + z x ∈ Set.Icc (n * A.exitData.left) (n * A.exitData.right) := by + have hr0 : 0 ≤ 4 * K.edgeParameter i x - 2 := by linarith only [hmid0 x hx] + have hr1 : 4 * K.edgeParameter i x - 2 ≤ 1 := by linarith only [hmid1 x hx] constructor - · apply mul_nonneg hn.le - exact add_nonneg A.exitData.left_nonneg (mul_nonneg hdelta hr0) - · calc - n * (A.exitData.left + (A.exitData.right - A.exitData.left) * - (4 * K.edgeParameter i x - 2)) ≤ n * 1 := by - apply mul_le_mul_of_nonneg_left _ hn.le - calc - A.exitData.left + (A.exitData.right - A.exitData.left) * - (4 * K.edgeParameter i x - 2) ≤ A.exitData.right := by - have := mul_le_mul_of_nonneg_left hr1 hdelta - linarith - _ ≤ 1 := A.exitData.right_le_one - _ = n := mul_one n + · apply mul_le_mul_of_nonneg_left _ hn.le + exact le_add_of_nonneg_right (mul_nonneg hdelta hr0) + · apply mul_le_mul_of_nonneg_left _ hn.le + calc + A.exitData.left + (A.exitData.right - A.exitData.left) * + (4 * K.edgeParameter i x - 2) ≤ + A.exitData.left + (A.exitData.right - A.exitData.left) := + add_le_add le_rfl (mul_le_of_le_one_right hdelta hr1) + _ = A.exitData.right := add_sub_cancel _ _ + have hzBounds {x : Plane} (hx : x ∈ R.cellCarrier u) : z x ∈ Set.Icc 0 n := + ⟨(mul_nonneg hn.le A.exitData.left_nonneg).trans (hzExitBounds hx).1, + (hzExitBounds hx).2.trans (by + simpa only [mul_one] using mul_le_mul_of_nonneg_left A.exitData.right_le_one hn.le)⟩ have hucard : u.card ≤ 2 := card_le_two_of_cellCarrier_subset_face hu (K.edgeAt_mem_simplexes i) (by rw [K.edgeAt_card]) hui @@ -2579,21 +2584,7 @@ theorem graphReplacementMap_affineOn_middle {h : Plane → Plane} have hcn : c < n * A.exitData.left := by rw [div_lt_iff₀ hn] at hv0 simpa [mul_comm] using hv0 - have hpLower : n * A.exitData.left ≤ z (R.position p) := by - dsimp [z] - have hr := hmid0 (R.position p) hp - have : 0 ≤ (A.exitData.right - A.exitData.left) * - (4 * K.edgeParameter i (R.position p) - 2) := - mul_nonneg hdelta (by linarith) - nlinarith - have hqLower : n * A.exitData.left ≤ z (R.position q) := by - dsimp [z] - have hr := hmid0 (R.position q) hq - have : 0 ≤ (A.exitData.right - A.exitData.left) * - (4 * K.edgeParameter i (R.position q) - 2) := - mul_nonneg hdelta (by linarith) - nlinarith - exact hcn.le.trans (le_min hpLower hqLower) + exact hcn.le.trans (le_min (hzExitBounds hp).1 (hzExitBounds hq).1) · have hv0' : A.exitData.left ≤ c / n := le_of_not_gt hv0 by_cases hv1 : c / n ≤ A.exitData.right · have hbreak := K.graphReplacementFace_parameter_side hcont D C i @@ -2649,19 +2640,7 @@ theorem graphReplacementMap_affineOn_middle {h : Plane → Plane} have : A.exitData.right < c / n := lt_of_not_ge hv1 rw [lt_div_iff₀ hn] at this simpa [mul_comm] using this - have hpUpper : z (R.position p) ≤ n * A.exitData.right := by - dsimp [z] - have hr := hmid1 (R.position p) hp - have hmul := mul_le_mul_of_nonneg_left - (show 4 * K.edgeParameter i (R.position p) - 2 ≤ 1 by linarith) hdelta - nlinarith - have hqUpper : z (R.position q) ≤ n * A.exitData.right := by - dsimp [z] - have hr := hmid1 (R.position q) hq - have hmul := mul_le_mul_of_nonneg_left - (show 4 * K.edgeParameter i (R.position q) - 2 ≤ 1 by linarith) hdelta - nlinarith - exact (max_le hpUpper hqUpper).trans hcn.le + exact (max_le (hzExitBounds hp).2 (hzExitBounds hq).2).trans hcn.le obtain ⟨s, hs, hssegment⟩ := exists_face_containing_axis_segment_of_no_vertex A.parameterization.source hn.le hab ha hb A.parameterization.source_support A.parameterization.source_card_le_two havoid diff --git a/LeanPool/ClassificationOfSurfaces/Moise/GraphRefinement.lean b/LeanPool/ClassificationOfSurfaces/Moise/GraphRefinement.lean index 001cc67571..26b2181dd5 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/GraphRefinement.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/GraphRefinement.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.GraphSubdivision +module + +public import LeanPool.ClassificationOfSurfaces.Moise.GraphSubdivision +import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional /-! # Finite marked refinements of plane graphs @@ -13,6 +16,8 @@ points. When the marks lie in the graph support, the subordinate arrangement is of the graph and every mark is a vertex of that subdivision. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/GraphSubdivision.lean b/LeanPool/ClassificationOfSurfaces/Moise/GraphSubdivision.lean index 8326b48492..5728846421 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/GraphSubdivision.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/GraphSubdivision.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArc +module + +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArc +import Mathlib.Analysis.Normed.Affine.AddTorsor /-! # Finite line-arrangement subdivisions of plane graphs @@ -15,6 +18,8 @@ source edge. Keeping only arrangement faces subordinate to an original face pro subdivision of the graph. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/HalfPlanePolygon.lean b/LeanPool/ClassificationOfSurfaces/Moise/HalfPlanePolygon.lean index 9205e0fc27..a75ad59439 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/HalfPlanePolygon.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/HalfPlanePolygon.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.ChartExtraction -import LeanPool.ClassificationOfSurfaces.Moise.PLApproximation +module + +public import LeanPool.ClassificationOfSurfaces.Moise.ChartExtraction +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalJordan +import LeanPool.ClassificationOfSurfaces.Moise.LineSubdivision +import Mathlib.Analysis.Normed.Affine.AddTorsor +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Polygonal disks in a half-plane @@ -14,6 +22,8 @@ file records the elementary but important consequence: once the replacement poly that half-plane, its bounded Schoenflies filling stays there as well. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicCellwiseExtension.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicCellwiseExtension.lean index 45d113b279..d1483fc4c0 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicCellwiseExtension.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicCellwiseExtension.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceFilling +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceFilling import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicMidpointSubdivision +import LeanPool.ClassificationOfSurfaces.Moise.PLApproximation import LeanPool.ClassificationOfSurfaces.Moise.PolygonalFamilyPolyhedron +import Mathlib.CategoryTheory.Category.Init /-! # Cellwise assembly of intrinsic PL face fillings @@ -16,6 +20,8 @@ glues the finite family. Coherence is proved from the common global one-skeleto it is not stored as an extra compatibility assumption. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicCloseCellwiseExtension.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicCloseCellwiseExtension.lean index 267cd86461..f914336568 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicCloseCellwiseExtension.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicCloseCellwiseExtension.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicCloseGraphApproximation -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicCellwiseExtension +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicCloseGraphApproximation +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicCellwiseExtension import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFineSubdivision +import LeanPool.ClassificationOfSurfaces.Moise.PLApproximation +import LeanPool.ClassificationOfSurfaces.Moise.PolygonalFamilyPolyhedron +import Mathlib.CategoryTheory.Category.Init /-! # Cellwise extension of a close intrinsic graph approximation @@ -15,6 +20,8 @@ from `IntrinsicCloseGraphApproximation`. The proofs parallel the first intrinsi construction, but the boundary map is now the second, metrically controlled graph replacement. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicCloseGraphApproximation.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicCloseGraphApproximation.lean index d59046c168..9fd995e12d 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicCloseGraphApproximation.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicCloseGraphApproximation.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphModel +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphModel +import Mathlib.CategoryTheory.Category.Init /-! # Arbitrarily close intrinsic graph approximation @@ -15,6 +18,8 @@ embedding to this model and applying the plane graph approximation theorem gives arbitrarily close second replacement. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicComplex.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicComplex.lean index 541f2a3de6..010cad2412 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicComplex.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicComplex.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex +module + +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex /-! # Intrinsic finite PL complexes @@ -18,6 +20,8 @@ facewise affine formulas and subordination to old faces. Thus an arbitrary home be installed as a subdivision by bookkeeping alone. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceBoundary.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceBoundary.lean index cc0e8e2a52..9162493e71 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceBoundary.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceBoundary.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphPL -import LeanPool.ClassificationOfSurfaces.Moise.PlaneCycle +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphPL +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneCycle /-! # Polygonal boundaries of intrinsic two-simplexes @@ -16,6 +18,8 @@ actually carry those three edges, resolves all their segments simultaneously, an resulting simple polygonal cycle. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceExtension.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceExtension.lean index edc19a220d..c84e1f08a9 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceExtension.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceExtension.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceBoundary -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceBoundary +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel /-! # Relative polygonal boundary maps for intrinsic faces @@ -16,6 +18,8 @@ edge. The construction below is topological; the finite conforming subdivision that it is PL is kept as a separate obligation. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceFilling.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceFilling.lean index 21ddf03342..e079f53d19 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceFilling.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceFilling.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceExtension +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceExtension +public import LeanPool.ClassificationOfSurfaces.Moise.FinitePLHomeomorph import LeanPool.ClassificationOfSurfaces.Moise.PLApproximation +import Mathlib.CategoryTheory.Category.Init /-! # PL fillings of intrinsic polygonal face boundaries @@ -15,6 +19,8 @@ that this map is genuinely PL on one named finite subdivision. Polygonal Schoen it by a finite PL homeomorphism, without changing any shared-edge boundary values. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceModel.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceModel.lean index 2d2ee487ee..f63339d4a5 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceModel.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFaceModel.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.Anchors +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicSubdivision +public import LeanPool.ClassificationOfSurfaces.Moise.Anchors /-! # Standard plane models for intrinsic faces @@ -14,6 +16,8 @@ the explicit coordinate reindexing homeomorphism to the standard plane triangle. source-side bridge used to apply the already proved polygonal Schoenflies extension cellwise. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFineSubdivision.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFineSubdivision.lean index 5799a4f6e8..c343597a3a 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFineSubdivision.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicFineSubdivision.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicMidpointSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.FrontierGlue +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicMidpointSubdivision +public import LeanPool.ClassificationOfSurfaces.Moise.FrontierGlue +import Mathlib.Analysis.Normed.Affine.AddTorsor /-! # Fine subdivisions of intrinsic two-complexes @@ -14,6 +17,8 @@ each new face is at most half that of its parent. This supplies the finite fine open-subcomplex extraction used in the compact form of Moise Chapter 8, Theorem 2. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicGraphApproximation.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicGraphApproximation.lean index 808c14446b..11061e49e4 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicGraphApproximation.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicGraphApproximation.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicComplex -import LeanPool.ClassificationOfSurfaces.Moise.GraphPolygonalization +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicComplex +public import LeanPool.ClassificationOfSurfaces.Moise.GraphPolygonalization +import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArcModel /-! # Polygonal approximation of intrinsic finite graphs @@ -14,6 +17,8 @@ to canonical barycentric realizations. The target geometry is unchanged: finite embedded arcs admit uniform disjoint vertex disks and nonincident edge tubes. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicGraphModel.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicGraphModel.lean index 86368d53fc..284a69e8bc 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicGraphModel.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicGraphModel.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphPL -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceBoundary -import LeanPool.ClassificationOfSurfaces.Moise.PLApproximation +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceBoundary +import Mathlib.CategoryTheory.Category.Init /-! # A conforming plane model of an intrinsic replacement graph @@ -17,6 +18,8 @@ transferred to that plane complex and the ordinary plane one-skeleton approximat be applied at an arbitrary tolerance. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -73,13 +76,14 @@ private theorem replacementSegmentFace_has_endpoints noncomputable def replacementSegmentLeft (q : K.ReplacementSegmentFace (hcont := hcont) (hinj := hinj) (D := D) (C := C)) : Plane := - Classical.choose (K.replacementSegmentFace_has_endpoints q) + Classical.choose (private_decl% (K.replacementSegmentFace_has_endpoints q)) /-- Second endpoint of a selected replacement segment. -/ noncomputable def replacementSegmentRight (q : K.ReplacementSegmentFace (hcont := hcont) (hinj := hinj) (D := D) (C := C)) : Plane := - Classical.choose (Classical.choose_spec (K.replacementSegmentFace_has_endpoints q)) + Classical.choose + (Classical.choose_spec (private_decl% (K.replacementSegmentFace_has_endpoints q))) theorem replacementSegment_eq_cellCarrier (q : K.ReplacementSegmentFace @@ -87,7 +91,7 @@ theorem replacementSegment_eq_cellCarrier segment ℝ (K.replacementSegmentLeft q) (K.replacementSegmentRight q) = (K.replacementArc hcont hinj D C q.1).completeTarget.cellCarrier q.2.1 := by exact (Classical.choose_spec - (Classical.choose_spec (K.replacementSegmentFace_has_endpoints q))).symm + (Classical.choose_spec (private_decl% (K.replacementSegmentFace_has_endpoints q)))).symm /-- Union of all selected segment faces over all complete replacement edges. -/ def replacementGraphCarrier : Set Plane := diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicGraphPL.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicGraphPL.lean index 81dc00d7d9..e0b6a89aa2 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicGraphPL.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicGraphPL.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphApproximation +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphApproximation +public import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension /-! # Finite PL models for intrinsic graph replacements @@ -14,6 +17,8 @@ of the middle PL segment model between its two last-exit parameters. Marking th in the source arrangement makes the closed subsegment an exact finite subcomplex. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -724,11 +729,11 @@ private theorem exists_trimActive_vertex (i : Fin 2) : /-- The `leftTrimVertex` declaration. -/ noncomputable def leftTrimVertex : A.trimTarget.Vertex := - Classical.choose (A.exists_trimActive_vertex 0) + Classical.choose (private_decl% (A.exists_trimActive_vertex 0)) /-- The `rightTrimVertex` declaration. -/ noncomputable def rightTrimVertex : A.trimTarget.Vertex := - Classical.choose (A.exists_trimActive_vertex 1) + Classical.choose (private_decl% (A.exists_trimActive_vertex 1)) theorem leftTrimVertex_face : ({A.leftTrimVertex} : Finset A.trimTarget.Vertex) ∈ A.trimTarget.simplexes := @@ -741,13 +746,13 @@ theorem rightTrimVertex_face : theorem leftTrimVertex_sourcePosition : A.trimActive.position A.leftTrimVertex = A.leftSourcePoint := by change A.trimActive.position - (Classical.choose (A.exists_trimActive_vertex 0)) = A.leftSourcePoint + (Classical.choose (private_decl% (A.exists_trimActive_vertex 0))) = A.leftSourcePoint exact (Classical.choose_spec (A.exists_trimActive_vertex 0)).2.trans A.trimMark_zero theorem rightTrimVertex_sourcePosition : A.trimActive.position A.rightTrimVertex = A.rightSourcePoint := by change A.trimActive.position - (Classical.choose (A.exists_trimActive_vertex 1)) = A.rightSourcePoint + (Classical.choose (private_decl% (A.exists_trimActive_vertex 1))) = A.rightSourcePoint exact (Classical.choose_spec (A.exists_trimActive_vertex 1)).2.trans A.trimMark_one theorem map_leftSourcePoint : diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicMarkedFan.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicMarkedFan.lean index 40673872ad..571b287696 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicMarkedFan.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicMarkedFan.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveOpenComplex -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphApproximation +module + +public import LeanPool.ClassificationOfSurfaces.Moise.AdaptiveOpenComplex +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicGraphApproximation +import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension /-! # Finite marked-edge fans on intrinsic two-complexes @@ -16,6 +19,8 @@ the two incident face charts can introduce incompatible auxiliary points. This that global finite edge order and its consecutive intervals. -/ +@[expose] public section + open scoped BigOperators namespace LeanEval diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicMidpointSubdivision.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicMidpointSubdivision.lean index ea649f1291..f2fba8d74f 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicMidpointSubdivision.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicMidpointSubdivision.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicComplex +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicComplex /-! # Midpoint subdivision of an intrinsic two-complex @@ -15,6 +17,8 @@ indexed by the old edge itself, the construction is automatically coherent acros faces. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicSubdivision.lean b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicSubdivision.lean index d3b9782c5d..ea865a1760 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicSubdivision.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/IntrinsicSubdivision.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.CommonSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicComplex +module + +public import LeanPool.ClassificationOfSurfaces.Moise.CommonSubdivision +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicComplex /-! # Plane subdivisions as intrinsic subdivisions @@ -16,6 +18,8 @@ subdivision induces a faithful intrinsic subdivision through the barycentric rea homeomorphisms. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/LineSubdivision.lean b/LeanPool/ClassificationOfSurfaces/Moise/LineSubdivision.lean index d4984cb759..ca9309822b 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/LineSubdivision.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/LineSubdivision.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex -import Mathlib.Analysis.Convex.Segment -import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional -import Mathlib.LinearAlgebra.AffineSpace.Combination +module + +public import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional + +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex import Mathlib.Order.Fin.Finset /-! @@ -17,6 +18,8 @@ file develops that construction from its local primitive: when an affine functio signs at the endpoints of an edge, its zero gives the new subdivision vertex on that edge. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -2064,7 +2067,6 @@ theorem strictMeshFor_triangles (v : Fin 3 → M.Vertex) simp [strictMeshFor, strictPatternTriangles, referenceSplitMesh, referenceSplitTriangles, TriangleMesh.reindex, TriangleMesh.mapAffineEquiv, strictVerticesEmbedding] - rfl theorem edgeMeshFor_triangles (v : Fin 3 → M.Vertex) (hv : AffineIndependent ℝ (M.position ∘ v)) @@ -2074,7 +2076,6 @@ theorem edgeMeshFor_triangles (v : Fin 3 → M.Vertex) simp [edgeMeshFor, edgePatternTriangles, referenceEdgeSplitMesh, referenceEdgeSplitTriangles, TriangleMesh.reindex, TriangleMesh.mapAffineEquiv, edgeVerticesEmbedding] - rfl theorem strictNegativeMeshFor_monochromatic (v : Fin 3 → M.Vertex) (hv : AffineIndependent ℝ (M.position ∘ v)) @@ -2555,60 +2556,100 @@ noncomputable def localMeshTriangles (t : M.Triangle) : M.refinedMeshTriangles f (M.unchangedMeshFor f (M.orderedVertex t) (M.orderedVertex_affineIndependent t)) rfl +/-- Eliminate the local model choice once, without unfolding the certified meshes. -/ +@[elab_as_elim] private theorem localMeshTriangles_cases (t : M.Triangle) + {P : Finset (Finset (M.RefinedVertex f)) → Prop} + (positiveStrict : ∀ o : M.PositiveStrictOrdering f t, + P (M.strictMeshFor f (M.orderedVertex t ∘ o.perm) + (M.orderedVertex_perm_affineIndependent t o.perm) + o.positive o.negative_one o.negative_two).triangles) + (negativeStrict : ∀ o : M.NegativeStrictOrdering f t, + P (M.strictNegativeMeshFor f (M.orderedVertex t ∘ o.perm) + (M.orderedVertex_perm_affineIndependent t o.perm) + o.negative o.positive_one o.positive_two).triangles) + (positiveEdge : ∀ o : M.PositiveEdgeOrdering f t, + P (M.edgeMeshFor f (M.orderedVertex t ∘ o.perm) + (M.orderedVertex_perm_affineIndependent t o.perm) o.positive o.negative).triangles) + (negativeEdge : ∀ o : M.NegativeEdgeOrdering f t, + P (M.edgeNegativeMeshFor f (M.orderedVertex t ∘ o.perm) + (M.orderedVertex_perm_affineIndependent t o.perm) o.negative o.positive).triangles) + (unchanged : ¬Nonempty (M.PositiveStrictOrdering f t) → + ¬Nonempty (M.NegativeStrictOrdering f t) → + ¬Nonempty (M.PositiveEdgeOrdering f t) → + ¬Nonempty (M.NegativeEdgeOrdering f t) → + P (M.unchangedMeshFor f (M.orderedVertex t) + (M.orderedVertex_affineIndependent t)).triangles) : + P (M.localMeshTriangles f t) := by + classical + unfold localMeshTriangles + split_ifs with hp hn hep hen + · exact positiveStrict (Classical.choice hp) + · exact negativeStrict (Classical.choice hn) + · exact positiveEdge (Classical.choice hep) + · exact negativeEdge (Classical.choice hen) + · exact unchanged hp hn hep hen + theorem card_of_mem_localMeshTriangles (t : M.Triangle) {s : Finset (M.RefinedVertex f)} (hs : s ∈ M.localMeshTriangles f t) : s.card = 3 := by - classical - unfold localMeshTriangles at hs - split_ifs at hs with hp hn hep hen - · exact (M.strictMeshFor f _ _ _ _ _).card_triangle s hs - · exact (M.strictNegativeMeshFor f _ _ _ _ _).card_triangle s hs - · exact (M.edgeMeshFor f _ _ _ _).card_triangle s hs - · exact (M.edgeNegativeMeshFor f _ _ _ _).card_triangle s hs - · exact (M.unchangedMeshFor f _ _).card_triangle s hs + revert hs + refine M.localMeshTriangles_cases f t ?_ ?_ ?_ ?_ ?_ + · intro o hs + exact (M.strictMeshFor f _ _ _ _ _).card_triangle s hs + · intro o hs + exact (M.strictNegativeMeshFor f _ _ _ _ _).card_triangle s hs + · intro o hs + exact (M.edgeMeshFor f _ _ _ _).card_triangle s hs + · intro o hs + exact (M.edgeNegativeMeshFor f _ _ _ _).card_triangle s hs + · intro _ _ _ _ hs + exact (M.unchangedMeshFor f _ _).card_triangle s hs theorem affineIndependent_of_mem_localMeshTriangles (t : M.Triangle) {s : Finset (M.RefinedVertex f)} (hs : s ∈ M.localMeshTriangles f t) : AffineIndependent ℝ fun v : s => (v.1 : Plane) := by - classical - unfold localMeshTriangles at hs - split_ifs at hs with hp hn hep hen - · exact (M.strictMeshFor f _ _ _ _ _).affineIndependent_triangle s hs - · exact (M.strictNegativeMeshFor f _ _ _ _ _).affineIndependent_triangle s hs - · exact (M.edgeMeshFor f _ _ _ _).affineIndependent_triangle s hs - · exact (M.edgeNegativeMeshFor f _ _ _ _).affineIndependent_triangle s hs - · exact (M.unchangedMeshFor f _ _).affineIndependent_triangle s hs + revert hs + refine M.localMeshTriangles_cases f t ?_ ?_ ?_ ?_ ?_ + · intro o hs + exact (M.strictMeshFor f _ _ _ _ _).affineIndependent_triangle s hs + · intro o hs + exact (M.strictNegativeMeshFor f _ _ _ _ _).affineIndependent_triangle s hs + · intro o hs + exact (M.edgeMeshFor f _ _ _ _).affineIndependent_triangle s hs + · intro o hs + exact (M.edgeNegativeMeshFor f _ _ _ _).affineIndependent_triangle s hs + · intro _ _ _ _ hs + exact (M.unchangedMeshFor f _ _).affineIndependent_triangle s hs theorem localMeshTriangles_monochromatic (t : M.Triangle) : M.RefinedTrianglesMonochromatic f (M.localMeshTriangles f t) := by classical - unfold localMeshTriangles - split_ifs with hp hn hep hen - all_goals simp only [refinedMeshTriangles] - · let o := Classical.choice hp + refine M.localMeshTriangles_cases f t ?_ ?_ ?_ ?_ ?_ + · intro o rw [M.strictMeshFor_triangles] apply M.strictPattern_monochromatic_positive - · simpa [o, strictVertices, Function.comp_apply] using o.positive.le - · simpa [o, strictVertices, Function.comp_apply] using o.negative_one.le - · simpa [o, strictVertices, Function.comp_apply] using o.negative_two.le + · simpa [strictVertices, Function.comp_apply] using o.positive.le + · simpa [strictVertices, Function.comp_apply] using o.negative_one.le + · simpa [strictVertices, Function.comp_apply] using o.negative_two.le · rw [M.strictVertices_f] simp · rw [M.strictVertices_f] simp - · let o := Classical.choice hn + · intro o exact M.strictNegativeMeshFor_monochromatic f _ _ o.negative o.positive_one o.positive_two - · let o := Classical.choice hep + · intro o rw [M.edgeMeshFor_triangles] apply M.edgePattern_monochromatic_positive - · simpa [o, edgeVertices, Function.comp_apply] using o.positive.le - · simpa [o, edgeVertices, Function.comp_apply] using o.negative.le + · simpa [edgeVertices, Function.comp_apply] using o.positive.le + · simpa [edgeVertices, Function.comp_apply] using o.negative.le · rw [M.edgeVertices_f f _ o.positive o.negative o.zero] rfl · rw [M.edgeVertices_f f _ o.positive o.negative o.zero] rfl - · let o := Classical.choice hen + · intro o exact M.edgeNegativeMeshFor_monochromatic f _ _ o.negative o.positive o.zero - · have hpair := pairwise_nonnegative_of_no_orderings M f t hp hn hep hen + · intro hp hn hep hen + have hpair := pairwise_nonnegative_of_no_orderings M f t hp hn hep hen have hsign := same_closed_side_of_pairwise_products hpair.1 hpair.2.1 hpair.2.2 intro s hs unfold unchangedMeshFor at hs @@ -2638,10 +2679,9 @@ theorem local_child_vertex_old_or_zero (t : M.Triangle) {x : M.RefinedVertex f} (hx : x ∈ s) : (∃ v ∈ t.1, (x : Plane) = M.position v) ∨ f (x : Plane) = 0 := by classical - unfold localMeshTriangles at hs - split_ifs at hs with hp hn hep hen - all_goals simp only [refinedMeshTriangles] at hs - · let o := Classical.choice hp + revert hs + refine M.localMeshTriangles_cases f t ?_ ?_ ?_ ?_ ?_ + · intro o hs rw [M.strictMeshFor_triangles] at hs obtain ⟨i, rfl⟩ := exists_index_of_mem_strictPattern _ hs hx fin_cases i @@ -2654,7 +2694,7 @@ theorem local_child_vertex_old_or_zero (t : M.Triangle) · right rw [M.strictVertices_f] rfl - · let o := Classical.choice hn + · intro o hs unfold strictNegativeMeshFor at hs obtain ⟨r, hr, rfl⟩ := Finset.mem_image.mp hs obtain ⟨y, hy, rfl⟩ := Finset.mem_map.mp hx @@ -2680,7 +2720,7 @@ theorem local_child_vertex_old_or_zero (t : M.Triangle) (by simpa using o.negative) (by simpa using o.positive_one) (by simpa using o.positive_two) 4 simpa using h - · let o := Classical.choice hep + · intro o hs rw [M.edgeMeshFor_triangles] at hs obtain ⟨i, rfl⟩ := exists_index_of_mem_edgePattern _ hs hx fin_cases i @@ -2690,7 +2730,7 @@ theorem local_child_vertex_old_or_zero (t : M.Triangle) · right rw [M.edgeVertices_f f _ o.positive o.negative o.zero] rfl - · let o := Classical.choice hen + · intro o hs unfold edgeNegativeMeshFor at hs obtain ⟨r, hr, rfl⟩ := Finset.mem_image.mp hs obtain ⟨y, hy, rfl⟩ := Finset.mem_map.mp hx @@ -2706,7 +2746,8 @@ theorem local_child_vertex_old_or_zero (t : M.Triangle) have h := M.edgeVertices_f (-f) (M.orderedVertex t ∘ o.perm) (by simpa using o.negative) (by simpa using o.positive) (by simpa using o.zero) 3 simpa using h - · unfold unchangedMeshFor at hs + · intro _ _ _ _ hs + unfold unchangedMeshFor at hs obtain ⟨r, hr, rfl⟩ := Finset.mem_image.mp hs have hr : r = Finset.univ := Finset.mem_singleton.mp hr subst r @@ -2719,10 +2760,8 @@ theorem localMeshTriangles_support (t : M.Triangle) : convexHull ℝ (((↑) : M.RefinedVertex f → Plane) '' (s : Set (M.RefinedVertex f)))) = convexHull ℝ (M.position '' (t.1 : Set M.Vertex)) := by classical - unfold localMeshTriangles - split_ifs with hp hn hep hen - · let o := Classical.choice hp - dsimp only [Function.comp_apply] + refine M.localMeshTriangles_cases f t ?_ ?_ ?_ ?_ ?_ + · intro o have h := M.strictMeshFor_support f (M.orderedVertex t ∘ o.perm) (M.orderedVertex_perm_affineIndependent t o.perm) o.positive o.negative_one o.negative_two @@ -2730,8 +2769,7 @@ theorem localMeshTriangles_support (t : M.Triangle) : o.positive o.negative_one o.negative_two).toPlaneComplex_support] at h rw [M.range_orderedVertex_perm t o.perm] at h exact h - · let o := Classical.choice hn - dsimp only [Function.comp_apply] + · intro o have h := M.strictNegativeMeshFor_support f (M.orderedVertex t ∘ o.perm) (M.orderedVertex_perm_affineIndependent t o.perm) o.negative o.positive_one o.positive_two @@ -2739,23 +2777,22 @@ theorem localMeshTriangles_support (t : M.Triangle) : o.negative o.positive_one o.positive_two).toPlaneComplex_support] at h rw [M.range_orderedVertex_perm t o.perm] at h exact h - · let o := Classical.choice hep - dsimp only [Function.comp_apply] + · intro o have h := M.edgeMeshFor_support f (M.orderedVertex t ∘ o.perm) (M.orderedVertex_perm_affineIndependent t o.perm) o.positive o.negative rw [(M.edgeMeshFor f (M.orderedVertex t ∘ o.perm) _ o.positive o.negative).toPlaneComplex_support] at h rw [M.range_orderedVertex_perm t o.perm] at h exact h - · let o := Classical.choice hen - dsimp only [Function.comp_apply] + · intro o have h := M.edgeNegativeMeshFor_support f (M.orderedVertex t ∘ o.perm) (M.orderedVertex_perm_affineIndependent t o.perm) o.negative o.positive rw [(M.edgeNegativeMeshFor f (M.orderedVertex t ∘ o.perm) _ o.negative o.positive).toPlaneComplex_support] at h rw [M.range_orderedVertex_perm t o.perm] at h exact h - · simp only [unchangedMeshFor, TriangleMesh.reindex, TriangleMesh.single, + · intro _ _ _ _ + simp only [unchangedMeshFor, TriangleMesh.reindex, TriangleMesh.single, oldVerticesEmbedding] have h := M.unchangedMeshFor_support f (M.orderedVertex t) (M.orderedVertex_affineIndependent t) @@ -2770,14 +2807,18 @@ theorem localMeshTriangles_inter (t : M.Triangle) convexHull ℝ (((↑) : M.RefinedVertex f → Plane) '' (u : Set (M.RefinedVertex f))) = convexHull ℝ (((↑) : M.RefinedVertex f → Plane) '' ((s ∩ u : Finset (M.RefinedVertex f)) : Set (M.RefinedVertex f))) := by - classical - unfold localMeshTriangles at hs hu - split_ifs at hs hu with hp hn hep hen - · exact (M.strictMeshFor f _ _ _ _ _).triangle_inter s hs u hu - · exact (M.strictNegativeMeshFor f _ _ _ _ _).triangle_inter s hs u hu - · exact (M.edgeMeshFor f _ _ _ _).triangle_inter s hs u hu - · exact (M.edgeNegativeMeshFor f _ _ _ _).triangle_inter s hs u hu - · exact (M.unchangedMeshFor f _ _).triangle_inter s hs u hu + revert hs hu + refine M.localMeshTriangles_cases f t ?_ ?_ ?_ ?_ ?_ + · intro o hs hu + exact (M.strictMeshFor f _ _ _ _ _).triangle_inter s hs u hu + · intro o hs hu + exact (M.strictNegativeMeshFor f _ _ _ _ _).triangle_inter s hs u hu + · intro o hs hu + exact (M.edgeMeshFor f _ _ _ _).triangle_inter s hs u hu + · intro o hs hu + exact (M.edgeNegativeMeshFor f _ _ _ _).triangle_inter s hs u hu + · intro _ _ _ _ hs hu + exact (M.unchangedMeshFor f _ _).triangle_inter s hs u hu theorem convexHull_child_subset_parent (t : M.Triangle) {s : Finset (M.RefinedVertex f)} (hs : s ∈ M.localMeshTriangles f t) : diff --git a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteCellwiseExtension.lean b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteCellwiseExtension.lean index f4331a4cd8..84ed5723b8 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteCellwiseExtension.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteCellwiseExtension.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceFilling +module + +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceFilling +import Mathlib.CategoryTheory.Category.Init /-! # Cellwise assembly for locally finite PL face fillings @@ -15,6 +18,8 @@ the family of filled closed regions is locally finite. Under these conditions t maps form a genuine locally finite triangle complex in the plane. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteControlledApproximation.lean b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteControlledApproximation.lean index bfddfbb2de..8929c8abf1 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteControlledApproximation.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteControlledApproximation.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.Moise.ChartExtraction +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFinitePLApproximation import LeanPool.ClassificationOfSurfaces.Moise.HalfPlanePolygon import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteSidePreservation +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Controlled locally finite PL replacement @@ -14,6 +21,8 @@ construction supplies quantitative face control and separation. Polygonal Schoe fills every face, and local finiteness glues the fillings into a homeomorphism of supports. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceBoundary.lean b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceBoundary.lean index e90a94eca6..427b8f6271 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceBoundary.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceBoundary.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteGraphPL -import LeanPool.ClassificationOfSurfaces.Moise.PlaneCycle +module + +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteGraphPL +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneCycle /-! # Polygonal boundaries of locally finite two-simplexes @@ -15,6 +17,8 @@ line arrangement and extracts the resulting simple polygonal cycle. Shared abstr literally the same replacement arc, so adjacent face fillings will have identical boundaries. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceExtension.lean b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceExtension.lean index 37eff18fa7..31b1d0b994 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceExtension.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceExtension.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceModel -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceExtension -import LeanPool.ClassificationOfSurfaces.Moise.PLApproximation +module + +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceModel +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceExtension +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceBoundary +import Mathlib.CategoryTheory.Category.Init /-! # Coherent polygonal boundary maps for locally finite faces @@ -16,6 +19,8 @@ resulting boundary maps agree literally on overlaps. This is the compatibility applying polygonal Schoenflies face by face. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceFilling.lean b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceFilling.lean index ad444de8a1..709ffc0f07 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceFilling.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceFilling.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceExtension +module + +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceExtension +public import LeanPool.ClassificationOfSurfaces.Moise.FinitePLHomeomorph +import LeanPool.ClassificationOfSurfaces.Moise.PLApproximation +import Mathlib.CategoryTheory.Category.Init /-! # PL fillings of locally finite polygonal face boundaries @@ -13,6 +18,8 @@ triangular frontier onto a simple polygonal circle. Polygonal Schoenflies fills finite PL homeomorphism without changing its shared-edge boundary values. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceModel.lean b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceModel.lean index 5b57ef5d5c..e0c53fac43 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceModel.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteFaceModel.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteFaceBoundary -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteTriangulation +import Mathlib.Combinatorics.SimpleGraph.Init /-! # Standard plane models for locally finite faces @@ -15,6 +18,8 @@ chosen cyclic `Fin 3` ordering and identifies the result with the standard close triangle. The cyclic sides are carried exactly to the corresponding standard polygon sides. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteGraphApproximation.lean b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteGraphApproximation.lean index b7c23e3ba3..7feb3010a5 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteGraphApproximation.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteGraphApproximation.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteTriangulation -import LeanPool.ClassificationOfSurfaces.Moise.BrokenLine -import LeanPool.ClassificationOfSurfaces.Moise.FrontierGlue -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArc +module + +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteTriangulation +public import LeanPool.ClassificationOfSurfaces.Moise.FrontierGlue +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArc import LeanPool.ClassificationOfSurfaces.Moise.GraphPolygonalization +import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArcModel /-! # Locally finite graph approximation controls @@ -19,6 +21,8 @@ nonincident edges and all other vertices. Local finiteness makes the two obstac closed, which is the only compactness input needed for this pointwise construction. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteGraphPL.lean b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteGraphPL.lean index 66c47e5cc9..e2094d38f7 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteGraphPL.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteGraphPL.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteGraphApproximation +module + +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteGraphApproximation +public import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension +public import LeanPool.ClassificationOfSurfaces.Moise.GraphRefinement /-! # Finite PL models for locally finite graph replacements @@ -15,6 +19,8 @@ replacement edge as support. It is the edge-level input for assembling polygonal boundaries in a common arrangement. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -562,11 +568,11 @@ private theorem exists_trimActive_vertex (i : Fin 2) : /-- The `leftTrimVertex` declaration. -/ noncomputable def leftTrimVertex : A.trimTarget.Vertex := - Classical.choose (A.exists_trimActive_vertex 0) + Classical.choose (private_decl% (A.exists_trimActive_vertex 0)) /-- The `rightTrimVertex` declaration. -/ noncomputable def rightTrimVertex : A.trimTarget.Vertex := - Classical.choose (A.exists_trimActive_vertex 1) + Classical.choose (private_decl% (A.exists_trimActive_vertex 1)) theorem leftTrimVertex_face : ({A.leftTrimVertex} : Finset A.trimTarget.Vertex) ∈ A.trimTarget.simplexes := @@ -579,13 +585,13 @@ theorem rightTrimVertex_face : theorem leftTrimVertex_sourcePosition : A.trimActive.position A.leftTrimVertex = A.leftSourcePoint := by change A.trimActive.position - (Classical.choose (A.exists_trimActive_vertex 0)) = A.leftSourcePoint + (Classical.choose (private_decl% (A.exists_trimActive_vertex 0))) = A.leftSourcePoint exact (Classical.choose_spec (A.exists_trimActive_vertex 0)).2.trans A.trimMark_zero theorem rightTrimVertex_sourcePosition : A.trimActive.position A.rightTrimVertex = A.rightSourcePoint := by change A.trimActive.position - (Classical.choose (A.exists_trimActive_vertex 1)) = A.rightSourcePoint + (Classical.choose (private_decl% (A.exists_trimActive_vertex 1))) = A.rightSourcePoint exact (Classical.choose_spec (A.exists_trimActive_vertex 1)).2.trans A.trimMark_one theorem map_leftSourcePoint : diff --git a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFinitePLApproximation.lean b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFinitePLApproximation.lean index 6012aad6f3..956b4f5ae1 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFinitePLApproximation.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFinitePLApproximation.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteCellwiseExtension +module + +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFiniteCellwiseExtension +import LeanPool.ClassificationOfSurfaces.Moise.PLApproximation +import Mathlib.CategoryTheory.Category.Init /-! # Quantitative locally finite PL approximation @@ -13,6 +17,8 @@ deliberately pointwise: on a noncompact open complex no uniform positive toleran strongly positive tolerance has a positive lower bound on every compact face. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteSidePreservation.lean b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteSidePreservation.lean index 34fec019b7..9ef6a6ca95 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteSidePreservation.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteSidePreservation.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.LocallyFinitePLApproximation +module + +public import LeanPool.ClassificationOfSurfaces.Moise.LocallyFinitePLApproximation +import LeanPool.ClassificationOfSurfaces.Moise.PLApproximation +import Mathlib.CategoryTheory.Category.Init /-! # Side preservation for locally finite face fillings @@ -14,6 +18,8 @@ argument is the same connected-side argument used in Moise Chapter 6: an edge ca polygonal boundary only where the corresponding abstract edge meets the face. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteTriangulation.lean b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteTriangulation.lean index 7f77299bd3..9177b0a8ca 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteTriangulation.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/LocallyFiniteTriangulation.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicComplex -import Mathlib.Topology.Compactness.LocallyFinite +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicComplex /-! # Locally finite triangle complexes @@ -26,6 +27,8 @@ makes the vertex type finite, and finite closed pasting produces the required ho the canonical barycentric realization. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -1456,11 +1459,13 @@ theorem locallyFinite_oneSkeleton_cover : LocallyFinite K.edgeCarrier := /-- The canonical interval parameter of a point known to lie on an edge carrier. -/ noncomputable def edgeParameter (e : K.Edge) (p : S) (hp : p ∈ K.edgeCarrier e) : Set.Icc (0 : ℝ) 1 := - Classical.choose (by rw [← K.range_edgePath e] at hp; exact hp) + Classical.choose (show ∃ r, K.edgePath e r = p from by + rw [← K.range_edgePath e] at hp; exact hp) theorem edgePath_edgeParameter (e : K.Edge) (p : S) (hp : p ∈ K.edgeCarrier e) : K.edgePath e (K.edgeParameter e p hp) = p := - Classical.choose_spec (by rw [← K.range_edgePath e] at hp; exact hp) + Classical.choose_spec (show ∃ r, K.edgePath e r = p from by + rw [← K.range_edgePath e] at hp; exact hp) theorem edgeParameter_unique (e : K.Edge) (p : S) (hp : p ∈ K.edgeCarrier e) (r : Set.Icc (0 : ℝ) 1) (hr : K.edgePath e r = p) : diff --git a/LeanPool/ClassificationOfSurfaces/Moise/NoRetraction.lean b/LeanPool/ClassificationOfSurfaces/Moise/NoRetraction.lean index 4dc78bcec0..708ed62ebb 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/NoRetraction.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/NoRetraction.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension +module + +public import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension +public import Mathlib.Analysis.Complex.Circle +import Mathlib.Analysis.Convex.Contractible import Mathlib.Analysis.Convex.GaugeRescale -import Mathlib.Analysis.Normed.Module.Connected -import Mathlib.Analysis.LocallyConvex.WithSeminorms import Mathlib.Analysis.SpecialFunctions.Complex.Circle -import Mathlib.Topology.Algebra.Module.LocallyConvex import Mathlib.Topology.Homotopy.Lifting /-! @@ -20,6 +21,8 @@ lifts to `ℝ`, whereas its restriction to the boundary cannot be the identity b standard boundary loop has lifts whose endpoints differ by `2π`. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/OpenMidpointComplex.lean b/LeanPool/ClassificationOfSurfaces/Moise/OpenMidpointComplex.lean index db343f1462..036a461796 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/OpenMidpointComplex.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/OpenMidpointComplex.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFineSubdivision +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFineSubdivision /-! # Nested safe midpoint stages of an open polyhedron @@ -14,6 +16,8 @@ triangle whose whole carrier is contained in `U`. These finite stages are neste subdivisions are reconciled by coning. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/PLApproximation.lean b/LeanPool/ClassificationOfSurfaces/Moise/PLApproximation.lean index c73237ff29..2271de60d6 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/PLApproximation.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/PLApproximation.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension +module + +public import LeanPool.ClassificationOfSurfaces.Moise.GraphPolygonalization +public import LeanPool.ClassificationOfSurfaces.Moise.FinitePLHomeomorph +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalCrosscut +import LeanPool.ClassificationOfSurfaces.Moise.Anchors import LeanPool.ClassificationOfSurfaces.Moise.FineSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.GraphPolygonalization import LeanPool.ClassificationOfSurfaces.Moise.NoRetraction -import LeanPool.ClassificationOfSurfaces.Moise.Anchors -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArc import LeanPool.ClassificationOfSurfaces.Moise.PolygonalSchoenflies import Mathlib.Analysis.Complex.Tietze +import Mathlib.CategoryTheory.Category.Init /-! # PL approximation of homeomorphisms @@ -35,6 +38,8 @@ broken-line connectivity (Ch. 1), and Thm. 6.3 needs the polygonal theorems of C the combinatorial Schoenflies theorem. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/PLMoves.lean b/LeanPool/ClassificationOfSurfaces/Moise/PLMoves.lean index 6063f01fb3..1300f58d4d 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/PLMoves.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/PLMoves.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.FinitePLHomeomorph -import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension -import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangleMove +module + +public import LeanPool.ClassificationOfSurfaces.Moise.FinitePLHomeomorph +public import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangleMove /-! # PL certificates for the elementary Schoenflies moves @@ -14,6 +15,8 @@ The topological homeomorphisms used by the Chapter 3 ear shelling were construct barycentric repositioning. This file records the missing PL certificates used in Chapter 5. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/PlaneComplex.lean b/LeanPool/ClassificationOfSurfaces/Moise/PlaneComplex.lean index 5ddfdfdf4b..ad13e238d9 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/PlaneComplex.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/PlaneComplex.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import Mathlib.Analysis.Convex.Topology +module + +public import Mathlib.Analysis.InnerProductSpace.PiL2 +public import LeanPool.ClassificationOfSurfaces.Moise.GeometricTriangulation import Mathlib.Analysis.Convex.Between -import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.Analysis.Normed.Affine.AddTorsor -import Mathlib.LinearAlgebra.AffineSpace.Independent -import Mathlib.Topology.LocallyFinite -import LeanPool.ClassificationOfSurfaces.Moise.GeometricTriangulation /-! # Finite simplicial complexes in the plane @@ -29,6 +28,8 @@ it is affine on every face of some subdivision. A generic continuous map is *no complex with a 2-face, in contrast to the vacuous `IsPLOnSimplexes` this replaces. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -242,7 +243,7 @@ theorem segment_subset_of_midpoint_mem_openSegment mul_nonneg hu.1.le (sub_nonneg.mpr hb1) exfalso norm_num at hparam - nlinarith + nlinarith only [hleft, hright, hparam] have endpoints_mem (h : a ≤ 0 ∧ 1 ≤ b) : P ∈ segment ℝ A B ∧ Q ∈ segment ℝ A B := by have hab : a ≤ b := (h.1.trans (by norm_num : (0 : ℝ) ≤ 1)).trans h.2 @@ -292,12 +293,12 @@ theorem endpoint_secondCoords_eq_zero_of_two_axis_points {a b x y : Plane} simp only [Fin.isValue, AffineMap.lineMap_apply_module, PiLp.add_apply, PiLp.smul_apply, smul_eq_mul, hy0] at htCoord have hprod : (s - t) * (b 1 - a 1) = 0 := by - nlinarith + nlinarith only [hsCoord, htCoord] have hba : b 1 = a 1 := by exact sub_eq_zero.mp ((mul_eq_zero.mp hprod).resolve_left (sub_ne_zero.mpr hst)) have ha : a 1 = 0 := by rw [hba] at hsCoord - nlinarith + nlinarith only [hsCoord] exact ⟨ha, hba.trans ha⟩ /-- A finite simplicial complex of affine simplexes in the plane: finitely many vertices at @@ -574,32 +575,16 @@ noncomputable abbrev toPlaneComplex : PlaneComplex where rw [hparent] at hxparent have hSI : AffineIndependent ℝ ((↑) : (S.image M.position) → Plane) := by - let e : S ≃ S.image M.position := Equiv.ofBijective - (fun v => ⟨M.position v, Finset.mem_image.mpr ⟨v, v.2, rfl⟩⟩) - ⟨fun a b hab => Subtype.ext (M.position_injective (congrArg Subtype.val hab)), by - rintro ⟨p, hp⟩ - obtain ⟨v, hv, rfl⟩ := Finset.mem_image.mp hp - exact ⟨⟨v, hv⟩, rfl⟩⟩ - have heq : ((↑) : (S.image M.position) → Plane) ∘ e = - (fun v : S => M.position v) := by rfl - have hmono : AffineIndependent ℝ (((↑) : (S.image M.position) → Plane) ∘ e) := by - rw [heq] - exact M.affineIndependent_triangle S hS - exact (affineIndependent_equiv e).mp hmono + refine affineIndependent_finset_coe (M.affineIndependent_triangle S hS) ?_ + intro p hp + obtain ⟨v, hv, rfl⟩ := Finset.mem_image.mp hp + exact ⟨⟨v, hv⟩, rfl⟩ have hTI : AffineIndependent ℝ ((↑) : (T.image M.position) → Plane) := by - let e : T ≃ T.image M.position := Equiv.ofBijective - (fun v => ⟨M.position v, Finset.mem_image.mpr ⟨v, v.2, rfl⟩⟩) - ⟨fun a b hab => Subtype.ext (M.position_injective (congrArg Subtype.val hab)), by - rintro ⟨p, hp⟩ - obtain ⟨v, hv, rfl⟩ := Finset.mem_image.mp hp - exact ⟨⟨v, hv⟩, rfl⟩⟩ - have heq : ((↑) : (T.image M.position) → Plane) ∘ e = - (fun v : T => M.position v) := by rfl - have hmono : AffineIndependent ℝ (((↑) : (T.image M.position) → Plane) ∘ e) := by - rw [heq] - exact M.affineIndependent_triangle T hT - exact (affineIndependent_equiv e).mp hmono + refine affineIndependent_finset_coe (M.affineIndependent_triangle T hT) ?_ + intro p hp + obtain ⟨v, hv, rfl⟩ := Finset.mem_image.mp hp + exact ⟨⟨v, hv⟩, rfl⟩ have hsImage : s.image M.position ⊆ S.image M.position := Finset.image_subset_image hsS have hSTImage : (S ∩ T).image M.position ⊆ S.image M.position := @@ -612,9 +597,7 @@ noncomputable abbrev toPlaneComplex : PlaneComplex where · simpa only [Finset.coe_image] using hx.1 · simpa only [Finset.coe_image] using hxparent have hsST : s ∩ (S ∩ T) = s ∩ T := by - ext v - simp only [Finset.mem_inter] - aesop + rw [← Finset.inter_assoc, Finset.inter_eq_left.mpr hsS] rw [hsST] at hxfirst have hsTImage : (s ∩ T).image M.position ⊆ T.image M.position := Finset.image_subset_image Finset.inter_subset_right @@ -626,9 +609,7 @@ noncomputable abbrev toPlaneComplex : PlaneComplex where rw [Finset.image_inter _ _ M.position_injective, hsecond] exact ⟨hxfirst, by simpa only [Finset.coe_image] using hx.2⟩ have hinter : (s ∩ T) ∩ t = s ∩ t := by - ext v - simp only [Finset.mem_inter] - aesop + rw [Finset.inter_assoc, Finset.inter_eq_right.mpr htT] rw [hinter] at hxsecond simpa only [Finset.coe_image] using hxsecond · intro x hx diff --git a/LeanPool/ClassificationOfSurfaces/Moise/PlaneCycle.lean b/LeanPool/ClassificationOfSurfaces/Moise/PlaneCycle.lean index 9447292546..b3730f0525 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/PlaneCycle.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/PlaneCycle.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArc +module + +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArc /-! # Polygonal circles from cycles in finite plane complexes @@ -13,6 +15,8 @@ polygonal circle. The exact segment-intersection axioms follow from the complex law and the fact that a simple cycle has no repeated cyclic vertex. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -383,22 +387,22 @@ noncomputable def polygonalCircleOfCycle (p : K.vertexGraph.Walk v v) (hp : p.Is consecutive_inter := ?_ nonadjacent_disjoint := ?_ } · intro i hpos - exact (cycle_adj K p hp i).ne (K.position_injective hpos) + exact (private_decl% (cycle_adj K p hp i)).ne (K.position_injective hpos) · intro i change segment ℝ (K.position (p.getVert i.val)) (K.position (p.getVert (i + 1).val)) ∩ segment ℝ (K.position (p.getVert (i + 1).val)) (K.position (p.getVert (i + 2).val)) = {K.position (p.getVert (i + 1).val)} - rw [← cycle_edge_carrier K p hp i] - have hnextCarrier := cycle_edge_carrier K p hp (i + 1) + rw [← private_decl% (cycle_edge_carrier K p hp i)] + have hnextCarrier := (private_decl% (cycle_edge_carrier K p hp (i + 1))) rw [show i + 1 + 1 = i + 2 by ring] at hnextCarrier rw [← hnextCarrier] - have hface := K.face_inter _ (cycle_edge_face K p hp i) _ - (cycle_edge_face K p hp (i + 1)) + have hface := K.face_inter _ ((private_decl% (cycle_edge_face K p hp i))) _ + (private_decl% (cycle_edge_face K p hp (i + 1))) rw [show i + 1 + 1 = i + 2 by ring] at hface change K.cellCarrier _ ∩ K.cellCarrier _ = K.cellCarrier _ at hface - rw [cycle_edge_inter_next K p hp i] at hface + rw [private_decl% (cycle_edge_inter_next K p hp i)] at hface rw [hface, PlaneComplex.cellCarrier] have himage : K.position '' (({p.getVert (i + 1).val} : Finset K.Vertex) : Set K.Vertex) = @@ -407,21 +411,22 @@ noncomputable def polygonalCircleOfCycle (p : K.vertexGraph.Walk v v) (hp : p.Is simp [point] rw [himage, convexHull_singleton] · intro i j hij hiprev hjnext - rw [← cycle_edge_carrier K p hp i, ← cycle_edge_carrier K p hp j] + rw [← private_decl% (cycle_edge_carrier K p hp i), + ← private_decl% (cycle_edge_carrier K p hp j)] have hdis : Disjoint ({p.getVert i.val, p.getVert (i + 1).val} : Finset K.Vertex) {p.getVert j.val, p.getVert (j + 1).val} := by rw [Finset.disjoint_left] intro w hwI hwJ simp only [Finset.mem_insert, Finset.mem_singleton] at hwI hwJ - have hinj := cycle_index_injective K p hp + have hinj := (private_decl% (cycle_index_injective K p hp)) rcases hwI with hwi | hwi <;> rcases hwJ with hwj | hwj · exact hij (hinj (hwi.symm.trans hwj)) · exact hiprev (hinj (hwi.symm.trans hwj)) · exact hjnext (hinj (hwi.symm.trans hwj)).symm · exact hij (add_right_cancel (hinj (hwi.symm.trans hwj))) - have hface := K.face_inter _ (cycle_edge_face K p hp i) _ - (cycle_edge_face K p hp j) + have hface := K.face_inter _ ((private_decl% (cycle_edge_face K p hp i))) _ + ((private_decl% (cycle_edge_face K p hp j))) rw [Finset.disjoint_iff_inter_eq_empty.mp hdis] at hface simpa [PlaneComplex.cellCarrier] using hface diff --git a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalArc.lean b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalArc.lean index 56ba300b5e..4950395476 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalArc.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalArc.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.BrokenLine -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalPolyhedron -import Mathlib.Algebra.Order.Floor.Semiring -import Mathlib.Combinatorics.SimpleGraph.Paths -import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected +module + +public import LeanPool.ClassificationOfSurfaces.Moise.BrokenLine +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalPolyhedron +public import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected +import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional /-! # Polygonal arcs from broken lines @@ -19,6 +20,8 @@ chain vertex, turns all crossings and all chain vertices into vertices of one fi mesh. A simple graph path in the resulting one-skeleton is then a loop-free polygonal arc. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -1343,7 +1346,8 @@ theorem resolvedCarrier_subset (hstart : B.start ∈ U) : B.resolvedCarrier ⊆ · obtain ⟨i, hxi⟩ := Set.mem_iUnion.mp hx exact B.resolvedSegment_subset i hxi -private def IsResolvedFace (s : Finset B.arrangementMesh.toPlaneComplex.Vertex) : Prop := +/-- A nonempty face supported on one vertex or one segment of the resolved walk. -/ +def IsResolvedFace (s : Finset B.arrangementMesh.toPlaneComplex.Vertex) : Prop := s.Nonempty ∧ ((B.resolvedWalk.length = 0 ∧ s ⊆ {B.resolvedWalk.getVert 0}) ∨ ∃ i : Fin B.resolvedWalk.length, diff --git a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalArcModel.lean b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalArcModel.lean index eed33b9441..31ced94180 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalArcModel.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalArcModel.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArc +module + +public import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalArc /-! # PL segment models for polygonal arcs -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalCrosscut.lean b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalCrosscut.lean index 5c498e07b5..44c0ae148c 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalCrosscut.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalCrosscut.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangle +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalJordan import LeanPool.ClassificationOfSurfaces.Moise.PolygonalPolyhedron -import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangle /-! # Polygonal crosscuts @@ -15,6 +18,8 @@ polygons containing the chord lie inside the first polygon. This is the cutting the free-triangle induction of Chapter 3. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalFamilyPolyhedron.lean b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalFamilyPolyhedron.lean index a088961748..8aa4df6ff5 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalFamilyPolyhedron.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalFamilyPolyhedron.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalPolyhedron -import LeanPool.ClassificationOfSurfaces.Moise.CommonSubdivision +module + +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalPolyhedron +public import LeanPool.ClassificationOfSurfaces.Moise.CommonSubdivision +import Mathlib.Analysis.Normed.Affine.AddTorsorBases /-! # Finite unions of polygonal disks @@ -16,6 +19,8 @@ the family and retains precisely the chambers lying inside at least one polygon. single triangle mesh has support equal to the union. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalJordan.lean b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalJordan.lean index bbe8badef1..aad9e3114e 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalJordan.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalJordan.lean @@ -3,13 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex -import Mathlib.Topology.MetricSpace.Bounded -import Mathlib.Analysis.Normed.Module.Connected +module + +public import LeanPool.ClassificationOfSurfaces.Moise.PlaneComplex +public import Mathlib.Analysis.SpecialFunctions.Complex.Circle import Mathlib.Analysis.Convex.Visible import Mathlib.Analysis.Normed.Affine.AddTorsorBases -import Mathlib.Analysis.SpecialFunctions.Complex.Circle -import Mathlib.Topology.MetricSpace.Thickening +import Mathlib.Analysis.Normed.Module.Connected /-! # The Jordan curve theorem for polygons @@ -25,6 +25,8 @@ with adjacent segments meeting exactly at their shared vertex and non-adjacent s A junk witness cannot satisfy these fields: they force the carrier to be a topological circle. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -2241,11 +2243,7 @@ theorem StripScales.isPathConnected_stripForwardPieces (S : J.StripScales) : convert hwalk (j - i).val using 1 rw [ZMod.natCast_zmod_val] ring - have heq : (⋃ i : ZMod J.n, J.forwardEdgePatch S i) = J.stripForwardPieces S := by - ext x - simp only [forwardEdgePatch, stripForwardPieces, Set.mem_iUnion, Set.mem_union] - aesop - rwa [heq] at hconnected + simpa only [forwardEdgePatch, Set.iUnion_union_distrib, stripForwardPieces] using hconnected theorem StripScales.isPathConnected_stripBackwardPieces (S : J.StripScales) : IsPathConnected (J.stripBackwardPieces S) := by @@ -2277,11 +2275,7 @@ theorem StripScales.isPathConnected_stripBackwardPieces (S : J.StripScales) : convert hwalk (j - i).val using 1 rw [ZMod.natCast_zmod_val] ring - have heq : (⋃ i : ZMod J.n, J.backwardEdgePatch S i) = J.stripBackwardPieces S := by - ext x - simp only [backwardEdgePatch, stripBackwardPieces, Set.mem_iUnion, Set.mem_union] - aesop - rwa [heq] at hconnected + simpa only [backwardEdgePatch, Set.iUnion_union_distrib, stripBackwardPieces] using hconnected /-- Every point of the polygon is approached from both of the explicit strip bands. -/ theorem StripScales.carrier_subset_closure_stripPieces (S : J.StripScales) : @@ -2364,44 +2358,10 @@ theorem interior_edgeSegment (i : ZMod J.n) : interior (J.edgeSegment i) = ∅ : have hpair : affineSpan ℝ ({J.vertex i, J.vertex (i + 1)} : Set Plane) = ⊤ := by rw [← affineSpan_convexHull, convexHull_pair] exact hspan - set dx : ℝ := (J.vertex (i + 1)) 0 - (J.vertex i) 0 with hdx - set dy : ℝ := (J.vertex (i + 1)) 1 - (J.vertex i) 1 with hdy - set q : Plane := - (WithLp.toLp 2 ![(J.vertex i) 0 - dy, (J.vertex i) 1 + dx] : Plane) with hq - have hqline : q ∈ affineSpan ℝ ({J.vertex i, J.vertex (i + 1)} : Set Plane) := by - rw [hpair] - trivial - rw [mem_affineSpan_pair_iff_exists_lineMap_eq] at hqline - obtain ⟨t, ht⟩ := hqline - have ht0 := congrArg (fun p : Plane => p 0) ht - have ht1 := congrArg (fun p : Plane => p 1) ht - simp only [AffineMap.lineMap_apply, vsub_eq_sub, vadd_eq_add, PiLp.add_apply, - PiLp.sub_apply, PiLp.smul_apply, smul_eq_mul] at ht0 ht1 - change t * ((J.vertex (i + 1)) 0 - (J.vertex i) 0) + (J.vertex i) 0 = - (J.vertex i) 0 - dy at ht0 - change t * ((J.vertex (i + 1)) 1 - (J.vertex i) 1) + (J.vertex i) 1 = - (J.vertex i) 1 + dx at ht1 - have ht0' := congrArg (fun x : ℝ => x * dy) ht0 - have ht1' := congrArg (fun x : ℝ => x * dx) ht1 - rw [hdy] at ht0 ht0' - rw [hdx] at ht1 ht1' - have hdx0 : dx = 0 := by - rw [hdx] - nlinarith [sq_nonneg ((J.vertex (i + 1)) 0 - (J.vertex i) 0), - sq_nonneg ((J.vertex (i + 1)) 1 - (J.vertex i) 1)] - have hdy0 : dy = 0 := by - rw [hdy] - nlinarith [sq_nonneg ((J.vertex (i + 1)) 0 - (J.vertex i) 0), - sq_nonneg ((J.vertex (i + 1)) 1 - (J.vertex i) 1)] - apply J.adjacent_ne i - ext j - fin_cases j - · change (J.vertex i) 0 = (J.vertex (i + 1)) 0 - rw [hdx] at hdx0 - linarith - · change (J.vertex i) 1 = (J.vertex (i + 1)) 1 - rw [hdy] at hdy0 - linarith + have hdim := (collinear_pair ℝ (J.vertex i) (J.vertex (i + 1))).finrank_le_one + rw [AffineSubspace.vectorSpan_eq_top_of_affineSpan_eq_top ℝ Plane Plane hpair, + finrank_top] at hdim + norm_num [Plane, finrank_euclideanSpace] at hdim /-- A finite polygonal carrier has empty interior in the plane. -/ theorem interior_carrier : interior J.carrier = ∅ := by diff --git a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalPolyhedron.lean b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalPolyhedron.lean index 8f15f33e47..b4a0abd79c 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalPolyhedron.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalPolyhedron.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.LineSubdivision -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalJordan +module + +public import LeanPool.ClassificationOfSurfaces.Moise.LineSubdivision +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalJordan +import Mathlib.Analysis.Normed.Affine.AddTorsorBases /-! # Polygonal Jordan regions as finite plane complexes @@ -14,6 +17,8 @@ edges of a polygon cut an enclosing triangle into a finite triangle mesh. The t bounded side of polygonal Jordan form the required finite complex. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalSchoenflies.lean b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalSchoenflies.lean index 156c9b1371..460a0d4c7b 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/PolygonalSchoenflies.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/PolygonalSchoenflies.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalPolyhedron +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalCrosscut +public import LeanPool.ClassificationOfSurfaces.Moise.FinitePLHomeomorph +public import LeanPool.ClassificationOfSurfaces.Moise.FreeTriangleMove import LeanPool.ClassificationOfSurfaces.Moise.PLMoves -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalPolyhedron -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalCrosscut import Mathlib.Analysis.LocallyConvex.Separation +import Mathlib.Topology.Algebra.Module.Cardinality /-! # The Schoenflies theorem for polygons @@ -23,6 +28,8 @@ Only the polygonal case is stated. The full Schoenflies theorem (Moise Ch. 9) c triangulation theorem in Moise and is not on this route's critical path. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/PuncturedSurface.lean b/LeanPool/ClassificationOfSurfaces/Moise/PuncturedSurface.lean index 09ad4b7a19..57b1fde891 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/PuncturedSurface.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/PuncturedSurface.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.ChartExtraction -import Mathlib.Analysis.Normed.Module.Connected +module + +public import LeanPool.ClassificationOfSurfaces.Moise.ChartExtraction +public import LeanPool.ClassificationOfSurfaces.Moise.BoundaryInvariant import Mathlib.Analysis.Normed.Module.Ball.Homeomorph +import Mathlib.Analysis.Normed.Module.Connected +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Punctured surface charts @@ -20,6 +26,8 @@ deleting a finite set. That theorem, in turn, rules out multiple dual component surface triangulation. -/ +@[expose] public section + open Set Topology namespace LeanEval diff --git a/LeanPool/ClassificationOfSurfaces/Moise/RelativeSynchronizedArrangement.lean b/LeanPool/ClassificationOfSurfaces/Moise/RelativeSynchronizedArrangement.lean index 3e96141af0..1837a39761 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/RelativeSynchronizedArrangement.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/RelativeSynchronizedArrangement.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.PolygonalFamilyPolyhedron +module + +public import LeanPool.ClassificationOfSurfaces.Moise.PolygonalFamilyPolyhedron /-! # Synchronized polygonal arrangements with additional finite cuts @@ -14,6 +16,8 @@ submeshes of one ambient triangle mesh. This file records that harmless extra-l generalization of `PolygonalFamily.synchronizedArrangement`. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/Moise/ThinKiteMove.lean b/LeanPool/ClassificationOfSurfaces/Moise/ThinKiteMove.lean index 7714644aa5..7096cf0efb 100644 --- a/LeanPool/ClassificationOfSurfaces/Moise/ThinKiteMove.lean +++ b/LeanPool/ClassificationOfSurfaces/Moise/ThinKiteMove.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.Moise.ElementaryMove +module + +public import LeanPool.ClassificationOfSurfaces.Moise.ElementaryMove /-! # Transporting the elementary move to a thin kite @@ -14,6 +16,8 @@ upper margins are an arbitrary positive `δ`. The two halves of the outer kite two-triangle mesh, so the transport is supplied by the canonical realization homeomorphism. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/NormalForm.lean b/LeanPool/ClassificationOfSurfaces/NormalForm.lean index 3a5b3ee71b..c08123993a 100644 --- a/LeanPool/ClassificationOfSurfaces/NormalForm.lean +++ b/LeanPool/ClassificationOfSurfaces/NormalForm.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.FiniteCyclicRealization +public import LeanPool.ClassificationOfSurfaces.LeanEval.ChallengeDeps +public import LeanPool.ClassificationOfSurfaces.Representatives import LeanPool.ClassificationOfSurfaces.FiniteCyclicCanonicalRealization import LeanPool.ClassificationOfSurfaces.FiniteCyclicSphereRealization import LeanPool.ClassificationOfSurfaces.FiniteCyclicTerminalNormalization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Faithful normal-form classification @@ -15,6 +24,8 @@ with the exact realization homeomorphisms for the three canonical endpoints. Ev chain is a faithful polygonal quotient. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/P2DegenerateDisk.lean b/LeanPool/ClassificationOfSurfaces/P2DegenerateDisk.lean index b185e7c5d8..213d93c879 100644 --- a/LeanPool/ClassificationOfSurfaces/P2DegenerateDisk.lean +++ b/LeanPool/ClassificationOfSurfaces/P2DegenerateDisk.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.DiskSquare -import LeanPool.ClassificationOfSurfaces.SphereCarrierGeometry -import LeanPool.ClassificationOfSurfaces.WeightedCircle +module + +public import LeanPool.ClassificationOfSurfaces.DiskSquare +public import LeanPool.ClassificationOfSurfaces.SphereCarrierGeometry +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The one-sided-degenerate P2 disk model @@ -24,6 +29,8 @@ scaled copy receives the monogon, while the other child fills the collar between the full teardrop. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace P2DegenerateDisk diff --git a/LeanPool/ClassificationOfSurfaces/PolygonCellRadial.lean b/LeanPool/ClassificationOfSurfaces/PolygonCellRadial.lean index 20d97c18b5..fb79863a96 100644 --- a/LeanPool/ClassificationOfSurfaces/PolygonCellRadial.lean +++ b/LeanPool/ClassificationOfSurfaces/PolygonCellRadial.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.PolygonalQuotient -import Mathlib.Topology.Homeomorph.Lemmas +module + +public import LeanPool.ClassificationOfSurfaces.PolygonalQuotient +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Data.Nat.Totient /-! # Radial extension of circle homeomorphisms @@ -19,6 +23,8 @@ later boundary reparameterization only needs to construct a circle homeomorphism action on marked arcs; `PolygonCell.radialHomeomorph` then supplies the disk homeomorphism. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces open Complex diff --git a/LeanPool/ClassificationOfSurfaces/PolygonalQuotient.lean b/LeanPool/ClassificationOfSurfaces/PolygonalQuotient.lean index 32f519087d..61929b878d 100644 --- a/LeanPool/ClassificationOfSurfaces/PolygonalQuotient.lean +++ b/LeanPool/ClassificationOfSurfaces/PolygonalQuotient.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import Mathlib.Analysis.Complex.Circle +module + +public import Mathlib.Analysis.Complex.Circle +public import Mathlib.Topology.Homeomorph.Quotient +public import Mathlib.Topology.UnitInterval import Mathlib.Analysis.SpecialFunctions.Complex.Circle -import Mathlib.Data.Setoid.Basic -import Mathlib.Topology.Homeomorph.Quotient -import Mathlib.Topology.UnitInterval /-! # Polygonal quotient spaces @@ -29,6 +30,8 @@ oriented monogons instead of using `PolygonCell 0`. Keeping that choice out of t prevents a side-free disk from silently acquiring the wrong topology. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/RepresentativeCarrier.lean b/LeanPool/ClassificationOfSurfaces/RepresentativeCarrier.lean index 51b1ab546e..3b4cdad4bf 100644 --- a/LeanPool/ClassificationOfSurfaces/RepresentativeCarrier.lean +++ b/LeanPool/ClassificationOfSurfaces/RepresentativeCarrier.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.CellComplexQuotient -import LeanPool.ClassificationOfSurfaces.LeanEval.ChallengeDeps +module + +public import LeanPool.ClassificationOfSurfaces.CellComplexQuotient +public import LeanPool.ClassificationOfSurfaces.LeanEval.ChallengeDeps +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Complex.Circle +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Carrier bridge to the Eval quotient representatives @@ -24,6 +31,8 @@ canonical polygonal generators transports to the equivalence closure of `Orienta `NonOrientableRel`. -/ +@[expose] public section + namespace Complex /-- The benchmark boundary parameter is periodic with integral period one. -/ diff --git a/LeanPool/ClassificationOfSurfaces/Representatives.lean b/LeanPool/ClassificationOfSurfaces/Representatives.lean index d60b020517..916b7f1dec 100644 --- a/LeanPool/ClassificationOfSurfaces/Representatives.lean +++ b/LeanPool/ClassificationOfSurfaces/Representatives.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.LeanEval.ChallengeDeps -import Mathlib.Geometry.Manifold.Instances.Sphere +module + +public import Mathlib.Analysis.InnerProductSpace.PiL2 +import Mathlib.Tactic.Positivity.Finset /-! # Eval representatives and normal-form indices @@ -14,7 +16,7 @@ The Lean-Eval challenge owns `Complex.ClosedUnitDisc`, `OrientableRel`, and only the project-owned sphere abbreviation and the index type used by the normal-form reduction. -/ -open scoped Manifold +@[expose] public section namespace LeanEval namespace Topology diff --git a/LeanPool/ClassificationOfSurfaces/SignedPresentation.lean b/LeanPool/ClassificationOfSurfaces/SignedPresentation.lean index 7937e234ac..7a89a7dfcb 100644 --- a/LeanPool/ClassificationOfSurfaces/SignedPresentation.lean +++ b/LeanPool/ClassificationOfSurfaces/SignedPresentation.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.CellComplex -import Mathlib.Data.Fintype.EquivFin +module + +public import LeanPool.ClassificationOfSurfaces.CellComplex +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Finite signed-dart presentations @@ -19,6 +24,8 @@ does not trust the stored vertex endpoints. This is the combinatorial input need boundary-word moves can be stated independently of a presentation's original edge names. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces @@ -100,7 +107,8 @@ theorem edgeOrbit_inv (K : SurfaceCellComplex) (d : K.Dart) : noncomputable instance edgeOrbitFintype (K : SurfaceCellComplex) : Fintype K.EdgeOrbit := Fintype.ofFinite _ -private noncomputable def edgeRepresentative +/-- Choose a dart representing an unoriented edge orbit. -/ +noncomputable def edgeRepresentative (K : SurfaceCellComplex) (e : K.EdgeOrbit) : K.Dart := Quotient.out e @@ -110,7 +118,8 @@ private theorem edgeOrbit_representative K.edgeOrbit (K.edgeRepresentative e) = e := Quotient.out_eq e -private noncomputable def signedDartToDart (K : SurfaceCellComplex) : +/-- Realize a signed edge orbit by its chosen dart or the inverse dart. -/ +noncomputable def signedDartToDart (K : SurfaceCellComplex) : SignedDart K.EdgeOrbit → K.Dart | .pos e => K.edgeRepresentative e | .neg e => K.inv (K.edgeRepresentative e) @@ -179,7 +188,7 @@ noncomputable def signedDartEquiv (K : SurfaceCellComplex) (hinv : ∀ d, K.inv d ≠ d) : SignedDart K.EdgeOrbit ≃ K.Dart := Equiv.ofBijective K.signedDartToDart - ⟨K.signedDartToDart_injective hinv, K.signedDartToDart_surjective⟩ + (by exact ⟨K.signedDartToDart_injective hinv, K.signedDartToDart_surjective⟩) @[simp] theorem signedDartEquiv_symm_inv diff --git a/LeanPool/ClassificationOfSurfaces/SphereCarrierGeometry.lean b/LeanPool/ClassificationOfSurfaces/SphereCarrierGeometry.lean index 6da63e54c1..32dc87d3b8 100644 --- a/LeanPool/ClassificationOfSurfaces/SphereCarrierGeometry.lean +++ b/LeanPool/ClassificationOfSurfaces/SphereCarrierGeometry.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.PolygonalQuotient import LeanPool.ClassificationOfSurfaces.RepresentativeCarrier +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Complex.Circle +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Disk geometry for the sphere carrier @@ -17,6 +25,8 @@ The indexed cells are also compact. The instance is transported through the exis homeomorphism with the closed unit disk, keeping this fact tied to the actual polygon carrier. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/SphereHemisphere.lean b/LeanPool/ClassificationOfSurfaces/SphereHemisphere.lean index 36c1eaa4f3..72c3f952e4 100644 --- a/LeanPool/ClassificationOfSurfaces/SphereHemisphere.lean +++ b/LeanPool/ClassificationOfSurfaces/SphereHemisphere.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.Representatives +public import LeanPool.ClassificationOfSurfaces.CellComplexQuotient import LeanPool.ClassificationOfSurfaces.SphereCarrierGeometry -import LeanPool.ClassificationOfSurfaces.Representatives +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Hemisphere maps for the two-monogon sphere @@ -18,6 +25,8 @@ continuous facewise map on the polygonal pre-realization respects every raw glui `SphereQuotientHomeomorph` descends this map and proves that it is a homeomorphism. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/SphereQuotientHomeomorph.lean b/LeanPool/ClassificationOfSurfaces/SphereQuotientHomeomorph.lean index b598cf7e47..7411504d74 100644 --- a/LeanPool/ClassificationOfSurfaces/SphereQuotientHomeomorph.lean +++ b/LeanPool/ClassificationOfSurfaces/SphereQuotientHomeomorph.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.SphereHemisphere +module + +public import LeanPool.ClassificationOfSurfaces.SphereHemisphere +public import LeanPool.ClassificationOfSurfaces.SphereCarrierGeometry +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The two-monogon quotient is the standard sphere @@ -14,6 +21,8 @@ the descended map is bijective and hence, by compactness of the source and the H of the target, a homeomorphism with `SphereRepresentative`. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/StrongVertexStar.lean b/LeanPool/ClassificationOfSurfaces/StrongVertexStar.lean index 1f5b20874d..b027598933 100644 --- a/LeanPool/ClassificationOfSurfaces/StrongVertexStar.lean +++ b/LeanPool/ClassificationOfSurfaces/StrongVertexStar.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.Moise.GeometricTriangulation +public import Mathlib.Geometry.Manifold.Instances.Real +import LeanPool.ClassificationOfSurfaces.Moise.PuncturedSurface import LeanPool.ClassificationOfSurfaces.Triangulation +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Fixed-vertex stars in a surface triangulation @@ -14,6 +23,8 @@ had two adjacency components, their finite closed face unions would separate tha chart. -/ +@[expose] public section + open Set Topology open scoped Manifold diff --git a/LeanPool/ClassificationOfSurfaces/Surface.lean b/LeanPool/ClassificationOfSurfaces/Surface.lean index 7b2a7f2cab..71cfe939ee 100644 --- a/LeanPool/ClassificationOfSurfaces/Surface.lean +++ b/LeanPool/ClassificationOfSurfaces/Surface.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import Mathlib.Geometry.Manifold.Instances.Real +module + +public import Mathlib.Geometry.Manifold.Instances.Real /-! # Surface hypotheses and boundary interface @@ -11,6 +13,8 @@ import Mathlib.Geometry.Manifold.Instances.Real This file records the manifold assumptions used by the Lean Eval target. -/ +@[expose] public section + open scoped Manifold namespace LeanEval diff --git a/LeanPool/ClassificationOfSurfaces/Topology/InvarianceOfDomain.lean b/LeanPool/ClassificationOfSurfaces/Topology/InvarianceOfDomain.lean index c3818b4d90..1788f219ac 100644 --- a/LeanPool/ClassificationOfSurfaces/Topology/InvarianceOfDomain.lean +++ b/LeanPool/ClassificationOfSurfaces/Topology/InvarianceOfDomain.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module +public import Mathlib.Geometry.Manifold.IsManifold.InteriorBoundary +public import Mathlib.Analysis.InnerProductSpace.Defs import Mathlib.Analysis.Complex.Tietze -import Mathlib.Analysis.InnerProductSpace.Calculus -import Mathlib.Geometry.Manifold.IsManifold.InteriorBoundary import Mathlib.MeasureTheory.Function.Jacobian import Mathlib.Topology.ContinuousMap.StoneWeierstrass @@ -45,6 +46,8 @@ Stone-Weierstrass approximation, and a measure-theoretic perturbation argument. problem", 2011. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces.InvarianceOfDomain @@ -103,21 +106,8 @@ theorem differentiable_approx_of_continuous {δ : ℝ} (hδ : 0 < δ) {U : Set E let G_i (i : Fin n) : C(E, ℝ) := {toFun := fun y => basis.toBasis.equivFunL (G y) i, continuous_toFun := by fun_prop} let coordEquiv := basis.toBasis.equivFunL - have hpos_symm : 0 < ‖(coordEquiv.symm : ((Fin n) → ℝ) →L[ℝ] E)‖ := by - refine lt_of_le_of_ne (norm_nonneg _) fun h_eq => ?_ - let w : Fin n → ℝ := fun _ => 1 - have hw : w ≠ 0 := by - have : Nonempty (Fin n) := Fin.pos_iff_nonempty.mp Module.finrank_pos - obtain ⟨i⟩ := (inferInstance : Nonempty (Fin n)) - intro h - have : w i = 0 := congr_fun h i - linarith - have hw0 : (coordEquiv.symm : (Fin n → ℝ) →L[ℝ] E) w = 0 := by - rw [norm_eq_zero.1 h_eq.symm] - rfl - have hfalse : coordEquiv (coordEquiv.symm w) = coordEquiv 0 := congrArg coordEquiv hw0 - rw [coordEquiv.apply_symm_apply w, map_zero] at hfalse - exact hw hfalse + have hpos_symm : 0 < ‖(coordEquiv.symm : ((Fin n) → ℝ) →L[ℝ] E)‖ := + coordEquiv.norm_symm_pos -- Define `C` as the operator norm for l.symm let C := ‖(coordEquiv.symm : (Fin n → ℝ) →L[ℝ] E)‖ let ε' := δ / (2 * C) @@ -136,7 +126,7 @@ theorem differentiable_approx_of_continuous {δ : ℝ} (hδ : 0 < δ) {U : Set E intro y hy let v : Fin n → ℝ := fun i => (p_i i : C(E, ℝ)) y - (basis.toBasis.equivFunL (G y)) i have hv i : |v i| < ε' := by - grind only [ContinuousMap.coe_mk, Real.norm_eq_abs, (hp_i i).2 y hy] + simpa only [v, G_i, ContinuousMap.coe_mk, Real.norm_eq_abs] using (hp_i i).2 y hy have hnorm_v : ‖v‖ < ε' := by rw [pi_norm_lt_iff hε']; exact fun i => hv i have hP_eq : P y - G y = coordEquiv.symm v := by apply coordEquiv.injective @@ -194,7 +184,8 @@ private theorem radialProjection_mem_sep_union_sphere (c : E) {epsilon : ℝ} {z ∈ s | ‖z - c‖ ≥ epsilon} ∪ sphere c epsilon := by by_cases h : epsilon < ‖y - c‖ · have hyc : 0 < ‖y - c‖ := hepsilon.trans h - grind [max_eq_right_of_lt, one_smul, add_sub_cancel, div_lt_one hyc] + rw [max_eq_right_of_lt ((div_lt_one hyc).mpr h), one_smul, add_sub_cancel] + exact Or.inl ⟨hy, h.le⟩ · right simp only [not_lt] at h have hy_neq_c : c ≠ y := fun hcy ↦ hc (hcy ▸ hy) @@ -238,7 +229,8 @@ theorem invariance_of_domain_interior (f : E → E) let G' : C(E, E) := ⟨fun x => (G x : E), continuous_subtype_val.comp (ContinuousMap.continuous G)⟩ -- Prove that `G` restricted to the image equals `FInvCmap` have hG_eq : ∀ y (hy : y ∈ f '' closedBall 0 1), G y = FInvCmap ⟨y, hy⟩ := by - grind [ContinuousMap.restrict_apply] + intro y hy + exact congr($hG ⟨y, hy⟩) -- Now prove the left‑inverse property for `G'` have hG'_left_inv : ∀ x ∈ closedBall 0 1, G' (f x) = x := fun x hx => (congr_arg Subtype.val (hG_eq (f x) (mem_image_of_mem f hx))).trans @@ -279,7 +271,8 @@ theorem invariance_of_domain_interior (f : E → E) have hdist : ‖y - f 0‖ < 2 * ε := by have hineq := norm_add_le (y - c) (c - f 0) simp only [sub_add_sub_cancel] at hineq; linarith - grind [dist_zero_right, dist_eq_norm] + rw [← h2εeq, ← dist_eq_norm] at hdist + simpa only [hG0, dist_zero_right] using (h2ε1 hdist).le -- Let `Σ₁ := {y ∈ f(B^n): ‖y - c‖ ≥ ε}`. let sigma1 : Set (E) := {y ∈ f '' closedBall 0 1 | ‖y - c‖ ≥ ε} -- Let `Σ₂ := {y ∈ ℝ^n : ‖y - c‖ = ε}`. @@ -326,8 +319,8 @@ theorem invariance_of_domain_interior (f : E → E) by_contra hGeq have hG_inj_on_image : Set.InjOn G (f '' closedBall 0 1) := by intro x hx y hy h - have hx_eq : G x = FInvCmap ⟨x, hx⟩ := by grind - have hy_eq : G y = FInvCmap ⟨y, hy⟩ := by grind + have hx_eq := hG_eq x hx + have hy_eq := hG_eq y hy rw [hx_eq, hy_eq] at h exact congr_arg Subtype.val (FEquiv.symm.injective h) have hyeq : y = f 0 := by @@ -383,15 +376,16 @@ theorem invariance_of_domain_interior (f : E → E) exact ⟨v, mem_ball_zero_iff.mp hv_in_ball, by simp [hsigma1empty], hv_notin_sigma2⟩ have hP_cont : ContinuousOn (fun v => ‖P v‖) sigma1 := by fun_prop -- Let `d` be a point of `Σ₁` such that `‖P(d)‖` takes its minimum value. - let ⟨d, _, hd⟩ := IsCompact.exists_isMinOn hsigma1compact hsigma1nonempty hP_cont + let ⟨d, hd_mem, hd⟩ := IsCompact.exists_isMinOn hsigma1compact hsigma1nonempty hP_cont -- Let `k` be the minimum of these two, to ensure both properties. let k := min ‖P d‖ δ + have hkpos : 0 < k := lt_min_iff.mpr + ⟨norm_pos_iff.mpr (fun h ↦ h0_notin_image ⟨d, hd_mem, h⟩), hδ1⟩ obtain ⟨v, hvnorm, hv1⟩ : ∃ a ∈ ball 0 k, a ∉ P '' sphere c ε := by rw [← Set.not_subset] intro hsub have : volume (ball (0 : E) k) ≤ 0 := by rw [← hP_image_null]; exact measure_mono hsub - exact LT.lt.false (lt_of_lt_of_le (measure_ball_pos volume (0 : E) - (lt_min_iff.mpr ⟨by simp only [norm_pos_iff, ne_eq]; grind, hδ1⟩)) this) + exact LT.lt.false (lt_of_lt_of_le (measure_ball_pos volume (0 : E) hkpos) this) refine ⟨v, ⟨by linarith [mem_ball_zero_iff.mp hvnorm, min_le_right ‖P d‖ δ], ⟨fun hin1 => ?_, fun hin2 ↦ hv1 hin2⟩⟩⟩ rcases hin1 with ⟨x, hx, rfl⟩ @@ -399,7 +393,8 @@ theorem invariance_of_domain_interior (f : E → E) -- Let `P'` be the perturbation of `P` such that `P'(y) = P(y) - v`. let P' : C(E, E) := {toFun := fun y => P y - v, continuous_toFun:= by fun_prop} -- `v` is not in `Σ`. - have hv_notin_sigma : v ∉ P '' sigma := by grind + have hv_notin_sigma : v ∉ P '' sigma := by + simpa only [sigma, image_union, mem_union, not_or] using And.intro hv1 hv2 -- Define `Gtilde : f(B^n) → ℝ^n` as `Gtilde(y) = P'(Φ(y))`. let Gtilde : E → E := fun y => P' (Phi y) -- `Gtilde` is continuous. @@ -429,25 +424,19 @@ theorem invariance_of_domain_interior (f : E → E) _ ≤ _ := by linarith · -- If `‖y - c‖ ≤ ε`, then `Φ y ∈ Σ₂`. simp only [not_lt] at hP - have hy_neq_c : c ≠ y := by grind + have hy_neq_c : c ≠ y := fun hcy ↦ hc2 (hcy ▸ hy) have hleft : 1 ≤ ε / ‖y - c‖ := (one_le_div (norm_pos_iff.mpr (sub_ne_zero.mpr (Ne.symm hy_neq_c)))).mpr hP - have hPhi : Phi y = c + (ε / ‖y - c‖) • (y - c) := by grind [max_eq_left] + have hPhi : Phi y = c + (ε / ‖y - c‖) • (y - c) := by + simp only [Phi, max_eq_left hleft] have hyimg : Phi y ∈ sphere c ε := by simp [hPhi, mem_sphere_iff_norm, add_sub_cancel_left, norm_smul, (sub_ne_zero_of_ne (Ne.symm hy_neq_c)), hε1.le] have hP_approx_le : ‖P (Phi y)‖ ≤ ‖(G (Phi y) : E)‖ + δ := by linarith [norm_sub_rev (P (Phi y)) (G (Phi y) : E), hP_bound (Phi y) (Or.inr hyimg), norm_le_norm_add_norm_sub' (P (Phi y)) (G (Phi y))] - have hG_phi_small : ‖(G (Phi y) : E)‖ ≤ 0.1 := by - rw [dist_eq_norm] at hc1 - have hdist : ‖Phi y - f 0‖ < 2 * ε := calc - ‖Phi y - f 0‖ ≤ ‖Phi y - c‖ + ‖c - f 0‖ := by grw [← sub_add_sub_cancel,norm_add_le] - _ = ε + ‖c - f 0‖ := by rw [mem_sphere_iff_norm.mp hyimg] - _ < ε + ε := add_lt_add_right hc1 ε - _ = 2 * ε := by ring - rw [← h2εeq, ← dist_eq_norm] at hdist - grind [h2ε1 hdist, dist_zero_right] + have hG_phi_small : ‖(G (Phi y) : E)‖ ≤ 0.1 := + hG_small (Phi y) (mem_sphere_iff_norm.mp hyimg).le specialize hG_small y hP calc ‖G y - P' (Phi y)‖ diff --git a/LeanPool/ClassificationOfSurfaces/TriangleCell.lean b/LeanPool/ClassificationOfSurfaces/TriangleCell.lean index a54fe36522..b85d914118 100644 --- a/LeanPool/ClassificationOfSurfaces/TriangleCell.lean +++ b/LeanPool/ClassificationOfSurfaces/TriangleCell.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.PolygonCellRadial +public import LeanPool.ClassificationOfSurfaces.Moise.Anchors import LeanPool.ClassificationOfSurfaces.Moise.ConeExtension import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicFaceModel -import LeanPool.ClassificationOfSurfaces.PolygonCellRadial import Mathlib.Analysis.Convex.GaugeRescale -import Mathlib.Topology.Instances.AddCircle.Real /-! # A side-parameter-compatible polygon cell model for a triangle @@ -17,6 +19,8 @@ boundary calibration is exact: circular side `i` at parameter `t` is sent to the parameter `t` on standard triangle edge `i`. -/ +@[expose] public section + open Set Topology namespace LeanEval diff --git a/LeanPool/ClassificationOfSurfaces/Triangulation.lean b/LeanPool/ClassificationOfSurfaces/Triangulation.lean index 0936f99061..9ac47574d2 100644 --- a/LeanPool/ClassificationOfSurfaces/Triangulation.lean +++ b/LeanPool/ClassificationOfSurfaces/Triangulation.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ +module + +public import LeanPool.ClassificationOfSurfaces.Moise.IntrinsicComplex +public import Mathlib.Geometry.Manifold.Instances.Real import LeanPool.ClassificationOfSurfaces.Moise.ChartInduction import LeanPool.ClassificationOfSurfaces.Moise.DualConnectivity -import LeanPool.ClassificationOfSurfaces.Moise.GeometricTriangulation -import Mathlib.Data.List.OfFn -import Mathlib.Data.List.Rotate +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Finite surface triangulations @@ -22,6 +26,8 @@ its stored realization. The classification proof therefore starts from `Geometri and uses the incidence certificate constructed by its bridge. -/ +@[expose] public section + namespace LeanEval namespace Topology namespace ClassificationOfSurfaces diff --git a/LeanPool/ClassificationOfSurfaces/WeightedCircle.lean b/LeanPool/ClassificationOfSurfaces/WeightedCircle.lean index 05b4265860..b898243d3d 100644 --- a/LeanPool/ClassificationOfSurfaces/WeightedCircle.lean +++ b/LeanPool/ClassificationOfSurfaces/WeightedCircle.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 ClassificationOfSurfaces contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ryan McCorvie, Jack McCarthy -/ -import LeanPool.ClassificationOfSurfaces.PolygonCellRadial -import Mathlib.Topology.Instances.AddCircle.Real +module + +public import Mathlib.Analysis.SpecialFunctions.Complex.Circle /-! # Weighted subdivisions of the circle @@ -15,6 +16,8 @@ packages that map as a homeomorphism of intervals and, after identifying endpoin homeomorphism of circles. It is the geometric core of Gallier--Xu P1 edge subdivision. -/ +@[expose] public section + namespace LeanEval.Topology.ClassificationOfSurfaces namespace WeightedCircle @@ -555,14 +558,18 @@ theorem circleHomeomorph_exp_of_mem_Ico exact_mod_cast (List.length_pos_of_ne_nil hne).ne' have hsum : (weights.sum : ℝ) ≠ 0 := by exact_mod_cast (List.sum_pos weights h hne).ne' - rw [show Circle.exp (2 * Real.pi / weights.length * x) = - AddCircle.homeomorphCircle hlength - (x : AddCircle (weights.length : ℝ)) by - rw [AddCircle.homeomorphCircle_apply, AddCircle.toCircle_apply_mk]] - unfold circleHomeomorph - simp only [Homeomorph.trans_apply, Homeomorph.symm_apply_apply] - rw [addCircleHomeomorph_apply_of_mem_Ico weights h hne x hx] - rw [AddCircle.homeomorphCircle_apply, AddCircle.toCircle_apply_mk] + -- Keep the component homeomorphisms folded when passing to angular coordinates. + change (AddCircle.homeomorphCircle hsum) + (addCircleHomeomorph weights h hne + ((AddCircle.homeomorphCircle hlength).symm + (Circle.exp (2 * Real.pi / weights.length * x)))) = _ + have hsource : (AddCircle.homeomorphCircle hlength).symm + (Circle.exp (2 * Real.pi / weights.length * x)) = + (x : AddCircle (weights.length : ℝ)) := by + apply (AddCircle.homeomorphCircle hlength).symm_apply_eq.mpr + rw [AddCircle.homeomorphCircle_apply, AddCircle.toCircle_apply_mk] + rw [hsource, addCircleHomeomorph_apply_of_mem_Ico weights h hne x hx, + AddCircle.homeomorphCircle_apply, AddCircle.toCircle_apply_mk] /-- On the `i`th unit interval, stretching is affine with slope equal to the `i`th weight. -/ theorem stretch_index_add diff --git a/LeanPool/Clawristotle.lean b/LeanPool/Clawristotle.lean index bc41ed57aa..9de9bdfdb6 100644 --- a/LeanPool/Clawristotle.lean +++ b/LeanPool/Clawristotle.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module -import LeanPool.Clawristotle.Theorem42 -import LeanPool.Clawristotle.CoulombConcreteTheorem42 -import LeanPool.Clawristotle.CoulombNonvacuous +public import LeanPool.Clawristotle.Theorem42 +public import LeanPool.Clawristotle.CoulombConcreteTheorem42 +public import LeanPool.Clawristotle.CoulombNonvacuous +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # Clawristotle: Vlasov-Maxwell-Landau steady-state classification @@ -19,6 +22,8 @@ Tags: pde, kinetic-theory, mathematical-physics MSC: 35Q83, 82C40, 35Q61 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Clawristotle/CoulombConcreteTheorem42.lean b/LeanPool/Clawristotle/CoulombConcreteTheorem42.lean index a868479ae9..8b9a4f3b27 100644 --- a/LeanPool/Clawristotle/CoulombConcreteTheorem42.lean +++ b/LeanPool/Clawristotle/CoulombConcreteTheorem42.lean @@ -3,12 +3,22 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.CoulombSpatialTransport +module + +public import LeanPool.Clawristotle.CoulombKernel +import LeanPool.Clawristotle.CoulombFlux import LeanPool.Clawristotle.CoulombFluxBound -import LeanPool.Clawristotle.CoulombPSD +import LeanPool.Clawristotle.CoulombFluxConv import LeanPool.Clawristotle.CoulombFluxDiff -import LeanPool.Clawristotle.IteratedDerivHelpers +import LeanPool.Clawristotle.CoulombForceTransport +import LeanPool.Clawristotle.CoulombPSD +import LeanPool.Clawristotle.CoulombPSDHelpers +import LeanPool.Clawristotle.CoulombSpatialTransport import LeanPool.Clawristotle.LogBoundHelpers +import LeanPool.Clawristotle.Theorem42 +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.MeasureTheory.SpecificCodomains.Pi /-! # Concrete Theorem 4.2 for Coulomb Collisions on T^3 @@ -20,6 +30,8 @@ steady state of the VML system with Coulomb collisions is a global Maxwellian with E = 0 and B = const. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real noncomputable section diff --git a/LeanPool/Clawristotle/CoulombFlux.lean b/LeanPool/Clawristotle/CoulombFlux.lean index bb1e3941da..eca9d816cd 100644 --- a/LeanPool/Clawristotle/CoulombFlux.lean +++ b/LeanPool/Clawristotle/CoulombFlux.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module + +public import LeanPool.Clawristotle.CoulombKernel +import LeanPool.Clawristotle.IteratedDerivHelpers import LeanPool.Clawristotle.NewtonianPotential +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial import Mathlib.MeasureTheory.SpecificCodomains.Pi /-! @@ -13,6 +19,8 @@ Proves integrability of the Landau collision flux, Schwartz partial decay, and AEStronglyMeasurability of flux components for the Coulomb kernel. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real noncomputable section diff --git a/LeanPool/Clawristotle/CoulombFluxBound.lean b/LeanPool/Clawristotle/CoulombFluxBound.lean index 906ce29052..2af634484d 100644 --- a/LeanPool/Clawristotle/CoulombFluxBound.lean +++ b/LeanPool/Clawristotle/CoulombFluxBound.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module + +public import LeanPool.Clawristotle.CoulombKernel import LeanPool.Clawristotle.CoulombFlux +import LeanPool.Clawristotle.IteratedDerivHelpers +import LeanPool.Clawristotle.NewtonianPotential +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.MeasureTheory.SpecificCodomains.Pi /-! # Flux Component Bounds and Flux × Log Integrability for Coulomb @@ -13,6 +22,8 @@ Proves: - `coulomb_flux_component_bound`: Pointwise |flux_i(v)| ≤ Cf * g(v) * (1+‖v‖)^Kg. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real noncomputable section diff --git a/LeanPool/Clawristotle/CoulombFluxConv.lean b/LeanPool/Clawristotle/CoulombFluxConv.lean index 8d9804a1d3..b894411edb 100644 --- a/LeanPool/Clawristotle/CoulombFluxConv.lean +++ b/LeanPool/Clawristotle/CoulombFluxConv.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module + +public import LeanPool.Clawristotle.CoulombKernel import LeanPool.Clawristotle.CoulombFlux +import LeanPool.Clawristotle.IteratedDerivHelpers +import LeanPool.Clawristotle.NewtonianPotential +import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.Calculus.ParametricIntegral +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.MeasureTheory.SpecificCodomains.Pi /-! # Coulomb Entry Convolution: Differentiability and Bounds @@ -14,6 +23,8 @@ Coulomb kernel entry convolutions are differentiable with uniform derivative bou and the full Coulomb flux component is differentiable with a decomposition formula. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real noncomputable section diff --git a/LeanPool/Clawristotle/CoulombFluxDiff.lean b/LeanPool/Clawristotle/CoulombFluxDiff.lean index 45f11a6479..0c683639ba 100644 --- a/LeanPool/Clawristotle/CoulombFluxDiff.lean +++ b/LeanPool/Clawristotle/CoulombFluxDiff.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module + +public import LeanPool.Clawristotle.CoulombKernel import LeanPool.Clawristotle.CoulombFluxConv +import LeanPool.Clawristotle.IteratedDerivHelpers +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # Flux Derivative Decay and IBP Integrability for Coulomb @@ -13,6 +19,8 @@ decomposition) and the IBP integrability condition for the flux derivative times Depends on differentiability and decomposition results from CoulombFluxConv. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real noncomputable section diff --git a/LeanPool/Clawristotle/CoulombForceTransport.lean b/LeanPool/Clawristotle/CoulombForceTransport.lean index 91a7399b4e..79505d0607 100644 --- a/LeanPool/Clawristotle/CoulombForceTransport.lean +++ b/LeanPool/Clawristotle/CoulombForceTransport.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module + +public import LeanPool.Clawristotle.SchwartzDecayDefs +public import LeanPool.Clawristotle.TorusInstance import LeanPool.Clawristotle.CoulombKernel +import LeanPool.Clawristotle.IteratedDerivHelpers import LeanPool.Clawristotle.VelocityDecayInstance +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # Force Transport and IBP Integrability for Coulomb @@ -14,6 +21,8 @@ term ((E + v × B) · ∇ᵥf · log f), and force IBP terms for the Coulomb ker Uses Schwartz decay, log growth bounds, and the Lorentz force component bound. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real noncomputable section diff --git a/LeanPool/Clawristotle/CoulombKernel.lean b/LeanPool/Clawristotle/CoulombKernel.lean index 1ac6a8bd0b..82fce760a7 100644 --- a/LeanPool/Clawristotle/CoulombKernel.lean +++ b/LeanPool/Clawristotle/CoulombKernel.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.SchwartzDecayDefs +module + +public import LeanPool.Clawristotle.SchwartzDecayDefs +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # Coulomb Kernel Definition and Schwartz Helpers @@ -12,6 +16,8 @@ Defines `coulombKernel` (Psi(r) = r^{-3} for r > 0) and proves basic properties: strict positivity, Schwartz uniform bounds, and `inv_norm_schwartz_integrable`. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real noncomputable section diff --git a/LeanPool/Clawristotle/CoulombNonvacuous.lean b/LeanPool/Clawristotle/CoulombNonvacuous.lean index bf027b035e..7d27c46cba 100644 --- a/LeanPool/Clawristotle/CoulombNonvacuous.lean +++ b/LeanPool/Clawristotle/CoulombNonvacuous.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module + +public import LeanPool.Clawristotle.CoulombKernel import LeanPool.Clawristotle.CoulombConcreteTheorem42 +import LeanPool.Clawristotle.IteratedDerivHelpers +import LeanPool.Clawristotle.Section2 +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Calculus.ContDiff.Bounds +import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral +import Mathlib.MeasureTheory.Integral.Pi /-! # Non-vacuousness of the Coulomb Concrete Theorem @@ -17,6 +26,8 @@ Also provides helper lemmas about the equilibrium Maxwellian: - `equilibriumMaxwellian_log_bound`: polynomial log growth -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real noncomputable section diff --git a/LeanPool/Clawristotle/CoulombPSD.lean b/LeanPool/Clawristotle/CoulombPSD.lean index 2de80f74d0..f745a82e51 100644 --- a/LeanPool/Clawristotle/CoulombPSD.lean +++ b/LeanPool/Clawristotle/CoulombPSD.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module + +public import LeanPool.Clawristotle.CoulombKernel +import LeanPool.Clawristotle.CoulombFlux import LeanPool.Clawristotle.CoulombPSDHelpers +import LeanPool.Clawristotle.NewtonianPotential +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.MeasureTheory.SpecificCodomains.Pi /-! # PSD Integrability and Fubini Symmetrization for Coulomb @@ -13,6 +22,8 @@ symmetrization needed for the H-theorem entropy dissipation identity. Depends on continuity and pointwise bounds from CoulombPSDHelpers. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real noncomputable section diff --git a/LeanPool/Clawristotle/CoulombPSDHelpers.lean b/LeanPool/Clawristotle/CoulombPSDHelpers.lean index 02b9793748..ad985fa80e 100644 --- a/LeanPool/Clawristotle/CoulombPSDHelpers.lean +++ b/LeanPool/Clawristotle/CoulombPSDHelpers.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.CoulombFlux +module + +public import LeanPool.Clawristotle.CoulombKernel +import LeanPool.Clawristotle.NewtonianPotential +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # PSD Helpers: Continuity and Pointwise Bounds for Coulomb @@ -13,6 +19,8 @@ Proves the Landau quadratic form bound, continuity of the PSD integrand These are building blocks for the integrability and Fubini results in CoulombPSD. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real noncomputable section diff --git a/LeanPool/Clawristotle/CoulombSpatialTransport.lean b/LeanPool/Clawristotle/CoulombSpatialTransport.lean index 86e5951d1d..94fe2f3949 100644 --- a/LeanPool/Clawristotle/CoulombSpatialTransport.lean +++ b/LeanPool/Clawristotle/CoulombSpatialTransport.lean @@ -3,12 +3,22 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module + +public import LeanPool.Clawristotle.CoulombKernel +public import LeanPool.Clawristotle.TorusInstance import LeanPool.Clawristotle.CoulombForceTransport +import LeanPool.Clawristotle.Section4 +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # LeanPool.Clawristotle.CoulombSpatialTransport -/ +@[expose] public section + /-\! # Spatial Transport: Measurability, Joint Integrability, and Continuity diff --git a/LeanPool/Clawristotle/Defs.lean b/LeanPool/Clawristotle/Defs.lean index b80ee4e092..3b8a01625b 100644 --- a/LeanPool/Clawristotle/Defs.lean +++ b/LeanPool/Clawristotle/Defs.lean @@ -3,6 +3,11 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module + +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.Calculus.LineDeriv.IntegrationByParts @@ -15,6 +20,8 @@ small auxiliary lemmas about the definitions. Derived FlatTorus3 lemmas are in `FlatTorus3Lemmas.lean`. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section diff --git a/LeanPool/Clawristotle/FlatTorus3Lemmas.lean b/LeanPool/Clawristotle/FlatTorus3Lemmas.lean index e002ce8844..ede8600e71 100644 --- a/LeanPool/Clawristotle/FlatTorus3Lemmas.lean +++ b/LeanPool/Clawristotle/FlatTorus3Lemmas.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.Defs +module + +public import LeanPool.Clawristotle.Defs +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Derived Lemmas for the FlatTorus3 Typeclass @@ -13,6 +16,8 @@ chain rules for log, integration by parts consequences, Laplacian sign at extrem and Maxwellian parameter regularity. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section diff --git a/LeanPool/Clawristotle/GaussianHelpers.lean b/LeanPool/Clawristotle/GaussianHelpers.lean index 5fbabb0c8e..836a29454c 100644 --- a/LeanPool/Clawristotle/GaussianHelpers.lean +++ b/LeanPool/Clawristotle/GaussianHelpers.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.Defs -import Mathlib.MeasureTheory.Integral.Pi +module + +public import LeanPool.Clawristotle.Defs +import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral -import Mathlib.Analysis.Calculus.FDeriv.Symmetric -import Mathlib.Analysis.Calculus.ContDiff.Bounds +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.MeasureTheory.Integral.Pi /-! # Gaussian Helper Lemmas @@ -16,6 +18,8 @@ Gaussian normalization, gradient of exponential-quadratic functions, integrability, and related analysis lemmas used in Section 3. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section diff --git a/LeanPool/Clawristotle/IteratedDerivHelpers.lean b/LeanPool/Clawristotle/IteratedDerivHelpers.lean index 1dd49e07bd..1110096538 100644 --- a/LeanPool/Clawristotle/IteratedDerivHelpers.lean +++ b/LeanPool/Clawristotle/IteratedDerivHelpers.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.Defs +module + +public import LeanPool.Clawristotle.Defs +import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.Calculus.ContDiff.Bounds +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Iterated Derivative Helpers @@ -13,6 +17,8 @@ Bounds on iterated derivatives of continuous linear maps and quadratic forms, used in the Schwartz decay proof for the equilibrium Maxwellian. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section diff --git a/LeanPool/Clawristotle/LogBoundHelpers.lean b/LeanPool/Clawristotle/LogBoundHelpers.lean index fc63352843..e0d1324d1a 100644 --- a/LeanPool/Clawristotle/LogBoundHelpers.lean +++ b/LeanPool/Clawristotle/LogBoundHelpers.lean @@ -3,17 +3,20 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.Defs -import LeanPool.Clawristotle.TorusDefs +module + +public import LeanPool.Clawristotle.TorusDefs import LeanPool.Clawristotle.TorusInstance -import Mathlib.Analysis.Calculus.MeanValue +import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.SpecialFunctions.Log.Deriv -import Mathlib.Topology.Order.Compact +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # LeanPool.Clawristotle.LogBoundHelpers -/ +@[expose] public section + open ContinuousLinearMap Real Set VML -- ============================================================================ diff --git a/LeanPool/Clawristotle/NewtonianPotential.lean b/LeanPool/Clawristotle/NewtonianPotential.lean index bc59b34f19..bfb5d2b3fa 100644 --- a/LeanPool/Clawristotle/NewtonianPotential.lean +++ b/LeanPool/Clawristotle/NewtonianPotential.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.CoulombKernel +module + +public import LeanPool.Clawristotle.CoulombKernel +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic import Mathlib.Analysis.SpecialFunctions.Log.Base +import Mathlib.Data.Nat.Choose.Multinomial /-! # Newtonian Potential Bounds and Inverse-Norm Integrability @@ -14,6 +19,8 @@ integrability of ||z||^{-1} against Schwartz functions, the key estimates for handling the Coulomb singularity in collision integrals. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real noncomputable section diff --git a/LeanPool/Clawristotle/SchwartzDecayDefs.lean b/LeanPool/Clawristotle/SchwartzDecayDefs.lean index e90bdbcfed..4f602adb99 100644 --- a/LeanPool/Clawristotle/SchwartzDecayDefs.lean +++ b/LeanPool/Clawristotle/SchwartzDecayDefs.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.Theorem42 -import LeanPool.Clawristotle.TorusInstance +module + +public import LeanPool.Clawristotle.Defs +public import LeanPool.Clawristotle.TorusDefs import LeanPool.Clawristotle.IteratedDerivHelpers +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # Schwartz Decay Definitions and Integrability Helpers @@ -15,6 +20,8 @@ and proves basic integrability lemmas. This is the standard regularity assumptio for kinetic theory used throughout the Coulomb concrete theorem files. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real noncomputable section diff --git a/LeanPool/Clawristotle/Section2.lean b/LeanPool/Clawristotle/Section2.lean index 4cc1abc8e1..90c07a119b 100644 --- a/LeanPool/Clawristotle/Section2.lean +++ b/LeanPool/Clawristotle/Section2.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.Defs +module + +public import LeanPool.Clawristotle.Defs +import Mathlib.Algebra.Order.Star.Real +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Entropy Dissipation Identity (Section 2) @@ -12,6 +16,8 @@ Properties of the Landau collision matrix: evenness, positive semidefiniteness, the symmetrized weak form, and the entropy dissipation identity D(f) as a double integral. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section namespace VML diff --git a/LeanPool/Clawristotle/Section3.lean b/LeanPool/Clawristotle/Section3.lean index df517db3ce..bbe68b51fd 100644 --- a/LeanPool/Clawristotle/Section3.lean +++ b/LeanPool/Clawristotle/Section3.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module + +public import LeanPool.Clawristotle.Defs +import LeanPool.Clawristotle.Section2 import LeanPool.Clawristotle.Section3Helpers import LeanPool.Clawristotle.Section3Helpers2 +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # Nullspace of the Landau Operator (Section 3) @@ -14,6 +20,8 @@ as f being a Maxwellian, and Corollary 1: if entropy dissipation vanishes then f is a local Maxwellian at each spatial point. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section diff --git a/LeanPool/Clawristotle/Section3Helpers.lean b/LeanPool/Clawristotle/Section3Helpers.lean index ea8bf61ec9..3c41fd5cac 100644 --- a/LeanPool/Clawristotle/Section3Helpers.lean +++ b/LeanPool/Clawristotle/Section3Helpers.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.Defs +module + +public import LeanPool.Clawristotle.Defs import LeanPool.Clawristotle.Section2 -import LeanPool.Clawristotle.GaussianHelpers -import Mathlib.MeasureTheory.Integral.Pi -import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral +import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.Calculus.FDeriv.Symmetric -import Mathlib.Analysis.Calculus.ContDiff.Bounds +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # Helper Lemmas for Section 3 @@ -19,6 +20,8 @@ characterization, and derivative bounds used in the nullspace analysis of the Landau operator. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section diff --git a/LeanPool/Clawristotle/Section3Helpers2.lean b/LeanPool/Clawristotle/Section3Helpers2.lean index a106d9b23c..921ccc6574 100644 --- a/LeanPool/Clawristotle/Section3Helpers2.lean +++ b/LeanPool/Clawristotle/Section3Helpers2.lean @@ -3,12 +3,21 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module + +public import LeanPool.Clawristotle.Defs +import LeanPool.Clawristotle.GaussianHelpers +import LeanPool.Clawristotle.Section2 import LeanPool.Clawristotle.Section3Helpers +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # LeanPool.Clawristotle.Section3Helpers2 -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real noncomputable section diff --git a/LeanPool/Clawristotle/Section4.lean b/LeanPool/Clawristotle/Section4.lean index 630118ec39..1fc1df4dd9 100644 --- a/LeanPool/Clawristotle/Section4.lean +++ b/LeanPool/Clawristotle/Section4.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.Defs +module + +public import LeanPool.Clawristotle.Defs import LeanPool.Clawristotle.FlatTorus3Lemmas -import LeanPool.Clawristotle.Section3 +import LeanPool.Clawristotle.Section3Helpers2 +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # Transport Constraints (Section 4) @@ -15,6 +19,8 @@ and D(f) = 0 at each spatial point, applies Corollary 1 to conclude f(x, .) is Maxwellian for each x. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section namespace VML diff --git a/LeanPool/Clawristotle/Section5.lean b/LeanPool/Clawristotle/Section5.lean index 5eb41dd075..3ae3bda094 100644 --- a/LeanPool/Clawristotle/Section5.lean +++ b/LeanPool/Clawristotle/Section5.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.Defs +module + +public import LeanPool.Clawristotle.Defs +import LeanPool.Clawristotle.GaussianHelpers import LeanPool.Clawristotle.Section3 +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # Polynomial Matching (Section 5) @@ -14,6 +19,8 @@ identity matching that constrains the Maxwellian parameters (a, b, c) from the Vlasov transport equation. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section namespace VML diff --git a/LeanPool/Clawristotle/Section6.lean b/LeanPool/Clawristotle/Section6.lean index 49c27cb248..0b9df62d84 100644 --- a/LeanPool/Clawristotle/Section6.lean +++ b/LeanPool/Clawristotle/Section6.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.VMLStructures +module + +public import LeanPool.Clawristotle.VMLStructures import LeanPool.Clawristotle.FlatTorus3Lemmas +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Bulk Velocity Vanishes (Section 6) @@ -13,6 +16,8 @@ Proves that the drift velocity u_inf = 0 using Ampere's law, Stokes' theorem on the torus, and positivity of the charge density. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section namespace VML diff --git a/LeanPool/Clawristotle/Section7.lean b/LeanPool/Clawristotle/Section7.lean index 41635a9d33..3d05e81465 100644 --- a/LeanPool/Clawristotle/Section7.lean +++ b/LeanPool/Clawristotle/Section7.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.VMLStructures +module + +public import LeanPool.Clawristotle.VMLStructures +import LeanPool.Clawristotle.FlatTorus3Lemmas +import LeanPool.Clawristotle.GaussianHelpers import LeanPool.Clawristotle.Section3 +import LeanPool.Clawristotle.Section3Helpers import LeanPool.Clawristotle.Section6 +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # Poisson-Boltzmann and Electric Field (Section 7) @@ -15,6 +23,8 @@ then proves the electric field vanishes (E = 0) and the magnetic field is spatially constant using harmonic function theory on the torus. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section namespace VML diff --git a/LeanPool/Clawristotle/Section8.lean b/LeanPool/Clawristotle/Section8.lean index d1e2306b70..e7b55a6eb0 100644 --- a/LeanPool/Clawristotle/Section8.lean +++ b/LeanPool/Clawristotle/Section8.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.VMLStructures +module + +public import LeanPool.Clawristotle.VMLStructures +import LeanPool.Clawristotle.FlatTorus3Lemmas import LeanPool.Clawristotle.Section6 +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Magnetic Field and Final Assembly (Section 8) @@ -14,6 +18,8 @@ derives E = 0 from the Poisson-Boltzmann equation, and assembles the abstract `ConcreteTheorem42` combining all sections. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section namespace VML diff --git a/LeanPool/Clawristotle/Theorem42.lean b/LeanPool/Clawristotle/Theorem42.lean index 2398f3dca9..8a891677db 100644 --- a/LeanPool/Clawristotle/Theorem42.lean +++ b/LeanPool/Clawristotle/Theorem42.lean @@ -3,7 +3,19 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module + +public import LeanPool.Clawristotle.Defs +import LeanPool.Clawristotle.FlatTorus3Lemmas +import LeanPool.Clawristotle.GaussianHelpers +import LeanPool.Clawristotle.Section3 +import LeanPool.Clawristotle.Section3Helpers +import LeanPool.Clawristotle.Section4 +import LeanPool.Clawristotle.Section5 +import LeanPool.Clawristotle.Section7 import LeanPool.Clawristotle.VMLInputDerive +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # Abstract Theorem 4.2: Steady State Implies Maxwellian @@ -18,6 +30,8 @@ velocities $v \in \mathbb{R}^3$ are unbounded. This admits superluminal particle but is the standard mathematical setting for the classical Landau equation. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section namespace VML diff --git a/LeanPool/Clawristotle/TorusDefs.lean b/LeanPool/Clawristotle/TorusDefs.lean index 0662767be2..87c8f0ecbe 100644 --- a/LeanPool/Clawristotle/TorusDefs.lean +++ b/LeanPool/Clawristotle/TorusDefs.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.Defs -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Periodic +module + +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Periodic +public import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Symmetric +import Mathlib.Analysis.SpecialFunctions.Log.Deriv +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.MeasureTheory.Integral.Prod /-! # Torus Type Definitions and Differential Operators @@ -15,6 +20,8 @@ and differential operators (`torusGradX`, `torusDivX`, `torusCurlX`) via the periodic lift. The `FlatTorus3` instance is assembled in `TorusInstance.lean`. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real Filter noncomputable section diff --git a/LeanPool/Clawristotle/TorusInstance.lean b/LeanPool/Clawristotle/TorusInstance.lean index 3912fa1c3f..bde79c127d 100644 --- a/LeanPool/Clawristotle/TorusInstance.lean +++ b/LeanPool/Clawristotle/TorusInstance.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.TorusIntegration +module + +public import LeanPool.Clawristotle.TorusIntegration +public import LeanPool.Clawristotle.Defs +import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.Calculus.ContDiff.FiniteDimension +import Mathlib.Analysis.SpecialFunctions.Log.Deriv +import Mathlib.MeasureTheory.Covering.Besicovitch +public import Mathlib.MeasureTheory.Integral.Prod /-! # FlatTorus3 Instance for T^3 @@ -14,6 +21,8 @@ implies harmonic, curl-div implies harmonic) and assembles the full `FlatTorus3` instance on `Fin 3 -> AddCircle 1`. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real Filter noncomputable section diff --git a/LeanPool/Clawristotle/TorusIntegration.lean b/LeanPool/Clawristotle/TorusIntegration.lean index 1bab0b131b..d0ce7872a1 100644 --- a/LeanPool/Clawristotle/TorusIntegration.lean +++ b/LeanPool/Clawristotle/TorusIntegration.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.TorusDefs +module + +public import LeanPool.Clawristotle.TorusDefs +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Calculus.ContDiff.Operations +import Mathlib.Analysis.Calculus.MeanValue +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus +import Mathlib.MeasureTheory.Integral.Prod /-! # Torus Integration Lemmas @@ -12,6 +20,8 @@ Box integral machinery, integration by parts on T³, curl integral vanishing, and the energy method proof that harmonic functions on T³ are constant. -/ +@[expose] public section + open MeasureTheory Matrix Finset BigOperators Real Filter noncomputable section diff --git a/LeanPool/Clawristotle/VMLInputDerive.lean b/LeanPool/Clawristotle/VMLInputDerive.lean index c2b10af257..0ea0c9cef5 100644 --- a/LeanPool/Clawristotle/VMLInputDerive.lean +++ b/LeanPool/Clawristotle/VMLInputDerive.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.VMLStructures -import LeanPool.Clawristotle.Section3 +module + +public import LeanPool.Clawristotle.VMLStructures +import LeanPool.Clawristotle.FlatTorus3Lemmas +import LeanPool.Clawristotle.GaussianHelpers +import LeanPool.Clawristotle.Section3Helpers import LeanPool.Clawristotle.Section4 import LeanPool.Clawristotle.Section5 import LeanPool.Clawristotle.Section6 import LeanPool.Clawristotle.Section7 import LeanPool.Clawristotle.Section8 +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # Deriving VMLInput from Concrete Hypotheses @@ -19,6 +25,8 @@ then applies the abstract proof chain (Sections 2-8) to derive the main theorem `ConcreteTheorem42` with minimal physical hypotheses. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section namespace VML @@ -81,23 +89,23 @@ private theorem VMLInput.isMaxwellian_at (p : VMLInput X) (x : X) : IsMaxwellian /-- The local log-density parameter `a(x)` extracted from the Maxwellian form of `p.f`. -/ noncomputable def _root_.VML.VMLInput.aLoc (p : VMLInput X) : X → ℝ := - fun x => (p.isMaxwellian_at x).choose + fun x => (private_decl% (p.isMaxwellian_at x)).choose /-- The local drift parameter `b(x)` extracted from the Maxwellian form of `p.f`. -/ noncomputable def _root_.VML.VMLInput.bLoc (p : VMLInput X) : X → (Fin 3 → ℝ) := - fun x => (p.isMaxwellian_at x).choose_spec.choose + fun x => (private_decl% (p.isMaxwellian_at x)).choose_spec.choose /-- The local inverse-temperature parameter `c(x)` extracted from the Maxwellian form of `p.f`. -/ noncomputable def _root_.VML.VMLInput.cLoc (p : VMLInput X) : X → ℝ := - fun x => (p.isMaxwellian_at x).choose_spec.choose_spec.choose + fun x => (private_decl% (p.isMaxwellian_at x)).choose_spec.choose_spec.choose lemma _root_.VML.VMLInput.hc_neg (p : VMLInput X) : ∀ x, p.cLoc x < 0 := - fun x => (p.isMaxwellian_at x).choose_spec.choose_spec.choose_spec.1 + fun x => (private_decl% (p.isMaxwellian_at x)).choose_spec.choose_spec.choose_spec.1 lemma _root_.VML.VMLInput.hMaxwellianForm (p : VMLInput X) : ∀ x v, p.f x v = Real.exp (p.aLoc x + dotProduct (p.bLoc x) v + p.cLoc x * normSq v) := - fun x => (p.isMaxwellian_at x).choose_spec.choose_spec.choose_spec.2 + fun x => (private_decl% (p.isMaxwellian_at x)).choose_spec.choose_spec.choose_spec.2 /-- IsSpatiallySmooth 2 for the Maxwellian parameters aLoc, bLoc, cLoc. -/ lemma _root_.VML.VMLInput.hDiff_abc (p : VMLInput X) : diff --git a/LeanPool/Clawristotle/VMLStructures.lean b/LeanPool/Clawristotle/VMLStructures.lean index 9395731a30..393d6525bc 100644 --- a/LeanPool/Clawristotle/VMLStructures.lean +++ b/LeanPool/Clawristotle/VMLStructures.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.Defs +module + +public import LeanPool.Clawristotle.Defs +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # VML Data Structures @@ -14,6 +17,8 @@ Defines the core data structures for the VML steady state problem: - `VMLInput`: minimal physical input for the steady state problem -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section diff --git a/LeanPool/Clawristotle/VelocityDecayInstance.lean b/LeanPool/Clawristotle/VelocityDecayInstance.lean index af32f91a6d..adb7f0b42b 100644 --- a/LeanPool/Clawristotle/VelocityDecayInstance.lean +++ b/LeanPool/Clawristotle/VelocityDecayInstance.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Vasily Ilin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ -import LeanPool.Clawristotle.Defs +module + +public import LeanPool.Clawristotle.Defs +import Mathlib.Algebra.Order.Star.Real +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Lorentz Force Component Bound @@ -13,6 +17,8 @@ is bounded by C * (1 + ||v||). Used by `CoulombSpatialTransport` for bounding spatial transport integrands. -/ +@[expose] public section + open Matrix Finset BigOperators Real MeasureTheory noncomputable section diff --git a/LeanPool/CommonNeighbourConjecture.lean b/LeanPool/CommonNeighbourConjecture.lean index 626207e7ae..5f0337a203 100644 --- a/LeanPool/CommonNeighbourConjecture.lean +++ b/LeanPool/CommonNeighbourConjecture.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import LeanPool.CommonNeighbourConjecture.Examples.MainTheorems +public import LeanPool.CommonNeighbourConjecture.Examples.MainTheorems +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Rat.Floor +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Common-neighbour counterexamples for Saxl graphs @@ -16,3 +23,5 @@ Main declarations: `SaxlCounterexamples.MainTheorems.mainTheorem` Tags: permutation-groups, group-actions, algebraic-graph-theory, saxl-graphs, counterexamples MSC: 20B15, 05C25 -/ + +@[expose] public section diff --git a/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/AbstractSeed.lean b/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/AbstractSeed.lean index 4501a7ccbb..e628ab3985 100644 --- a/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/AbstractSeed.lean +++ b/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/AbstractSeed.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import Mathlib.Algebra.Module.ZMod -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Data.Fintype.Card -import LeanPool.CommonNeighbourConjecture.Saxl.Affine -import LeanPool.CommonNeighbourConjecture.Saxl.PermWreath.Action -import LeanPool.CommonNeighbourConjecture.Saxl.PermWreath.Symmetric +public import LeanPool.CommonNeighbourConjecture.Saxl.Affine +public import LeanPool.CommonNeighbourConjecture.Saxl.PermWreath.Action +public import LeanPool.CommonNeighbourConjecture.Saxl.PermWreath.Symmetric +import Mathlib.Data.Rat.Floor /-! # Abstract data for counterexamples at every base size @@ -24,6 +23,8 @@ Faithfulness and irreducibility are intentionally absent from needed for the obstruction. -/ +@[expose] public section + namespace SaxlCounterexamples.EveryBase open scoped BigOperators Pointwise diff --git a/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/DeletedModule.lean b/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/DeletedModule.lean index b829c604f5..f8d059b5b4 100644 --- a/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/DeletedModule.lean +++ b/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/DeletedModule.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import Mathlib.LinearAlgebra.Dual.Lemmas -import Mathlib.LinearAlgebra.StdBasis -import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.FrobeniusGroup +public import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.FrobeniusGroup +import Mathlib.Data.Rat.Floor /-! # The binary deleted permutation module @@ -17,6 +17,8 @@ irreducibility proof: every endomorphism of the deleted module extends to the full permutation module, while the all-ones operator restricts to zero. -/ +@[expose] public section + noncomputable section namespace SaxlCounterexamples.EveryBase diff --git a/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/FrobeniusGroup.lean b/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/FrobeniusGroup.lean index b27de18c64..c396e2a67c 100644 --- a/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/FrobeniusGroup.lean +++ b/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/FrobeniusGroup.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import Mathlib.Algebra.Group.Subgroup.Even -import Mathlib.FieldTheory.Finite.GaloisField +public import Mathlib.Algebra.Group.Subgroup.Even +public import Mathlib.FieldTheory.Finite.GaloisField +public import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.AbstractSeed +import Mathlib.Data.Rat.Floor import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.Basic -import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.AbstractSeed /-! # The odd affine Frobenius groups used by the every-base-size construction @@ -23,6 +25,8 @@ the later files of the construction. Here we prove the elementary finite-field facts and the two-point support calculation needed there. -/ +@[expose] public section + namespace SaxlCounterexamples.EveryBase open scoped BigOperators diff --git a/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/GeneralConstruction.lean b/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/GeneralConstruction.lean index d0aa912356..a5ed09bc1e 100644 --- a/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/GeneralConstruction.lean +++ b/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/GeneralConstruction.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.AbstractSeed +public import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.AbstractSeed +import Mathlib.Data.Rat.Floor /-! # The abstract every-base-size construction @@ -14,6 +16,8 @@ sumset obstruction, and the abstract exact-base-size counterexample theorem. All seed and finite-colour hypotheses are exposed by the imported structures. -/ +@[expose] public section + namespace SaxlCounterexamples.EveryBase open scoped Pointwise diff --git a/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/Irreducible.lean b/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/Irreducible.lean index 713045b90a..50b811ea7a 100644 --- a/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/Irreducible.lean +++ b/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/Irreducible.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.LinearAlgebra.Projection +public import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.DeletedModule +import Mathlib.Data.Rat.Floor import Mathlib.RepresentationTheory.Maschke -import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.DeletedModule /-! # Irreducibility of the odd deleted modules @@ -20,6 +20,8 @@ adjacency operator. A two-point vector proves that neither `A` nor `I + A` is idempotent. Maschke's theorem then proves irreducibility. -/ +@[expose] public section + noncomputable section namespace SaxlCounterexamples.EveryBase diff --git a/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/Main.lean b/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/Main.lean index 7f2f41a0bc..10fa797463 100644 --- a/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/Main.lean +++ b/LeanPool/CommonNeighbourConjecture/Examples/EveryBase/Main.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module +public import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.GeneralConstruction +public import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.DeletedModule import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.Irreducible -import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.GeneralConstruction import LeanPool.CommonNeighbourConjecture.Saxl.PermWreath.Irreducible +import Mathlib.Data.Rat.Floor /-! # Counterexamples at every base size @@ -15,6 +18,8 @@ This module instantiates the abstract obstruction construction with the affine Frobenius groups and their deleted binary permutation modules. -/ +@[expose] public section + noncomputable section namespace SaxlCounterexamples.EveryBase diff --git a/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems.lean b/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems.lean index 0707b3a2fb..a973258910 100644 --- a/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems.lean +++ b/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import LeanPool.CommonNeighbourConjecture.Examples.MainTheorems.ProofAliases +public import LeanPool.CommonNeighbourConjecture.Examples.MainTheorems.ProofAliases +public import LeanPool.CommonNeighbourConjecture.Examples.MainTheorems.Definitions +public import Mathlib.GroupTheory.GroupAction.Primitive +import LeanPool.CommonNeighbourConjecture.Examples.MainTheorems.Internal +import Mathlib.Data.Rat.Floor /-! # Main theorem @@ -13,6 +18,8 @@ The complete reader-facing interface: the four non-Mathlib definitions needed to read the result, followed by one theorem. -/ +@[expose] public section + namespace SaxlCounterexamples.MainTheorems /-- For every base size `B ≥ 2` and every prescribed bound there is a primitive diff --git a/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems/Definitions.lean b/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems/Definitions.lean index 5a79db2ccc..469df4e18f 100644 --- a/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems/Definitions.lean +++ b/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems/Definitions.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import Mathlib.Combinatorics.SimpleGraph.Basic -import Mathlib.GroupTheory.GroupAction.Basic -import Mathlib.Order.Lattice.Nat +public import Mathlib.Combinatorics.SimpleGraph.Basic +public import Mathlib.Order.Lattice.Nat /-! # Definitions for the main theorem @@ -14,6 +14,8 @@ import Mathlib.Order.Lattice.Nat The complete non-Mathlib vocabulary used in the public statement. -/ +@[expose] public section + noncomputable section namespace SaxlCounterexamples.MainTheorems diff --git a/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems/Internal.lean b/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems/Internal.lean index 0c2629defd..179a434af4 100644 --- a/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems/Internal.lean +++ b/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems/Internal.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.Main -import LeanPool.CommonNeighbourConjecture.Examples.MainTheorems.Definitions +import Mathlib.Algebra.Order.Ring.Pow + +public import LeanPool.CommonNeighbourConjecture.Examples.EveryBase.Main +public import LeanPool.CommonNeighbourConjecture.Examples.MainTheorems.Definitions import LeanPool.CommonNeighbourConjecture.Saxl.Generalized +import Mathlib.Data.Rat.Floor /-! # Internal implementation of the main theorem @@ -15,6 +19,8 @@ Construction parameters, bridge lemmas, and proof machinery used by the minimal public module `Examples.MainTheorems`. -/ +@[expose] public section + noncomputable section namespace SaxlCounterexamples.MainTheorems.Internal diff --git a/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems/ProofAliases.lean b/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems/ProofAliases.lean index 8871117fef..fd5b2b9f63 100644 --- a/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems/ProofAliases.lean +++ b/LeanPool/CommonNeighbourConjecture/Examples/MainTheorems/ProofAliases.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import LeanPool.CommonNeighbourConjecture.Examples.MainTheorems.Internal +public import LeanPool.CommonNeighbourConjecture.Examples.MainTheorems.Internal + +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Rat.Floor +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Compatibility import for the main-theorem proof @@ -12,3 +22,5 @@ import LeanPool.CommonNeighbourConjecture.Examples.MainTheorems.Internal The definitions and internal proof now share one API. This module remains as a compatibility import for downstream users of the original file layout. -/ + +@[expose] public section diff --git a/LeanPool/CommonNeighbourConjecture/Saxl/Affine.lean b/LeanPool/CommonNeighbourConjecture/Saxl/Affine.lean index ecdefc79dd..0b082c994c 100644 --- a/LeanPool/CommonNeighbourConjecture/Saxl/Affine.lean +++ b/LeanPool/CommonNeighbourConjecture/Saxl/Affine.lean @@ -3,17 +3,14 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import Mathlib.GroupTheory.SemidirectProduct -import Mathlib.GroupTheory.GroupAction.Primitive -import Mathlib.Algebra.Group.Action.Faithful -import Mathlib.Algebra.Group.Pointwise.Set.Card -import Mathlib.RepresentationTheory.Irreducible -import Mathlib.Algebra.Field.ZMod +public import Mathlib.GroupTheory.SemidirectProduct +public import Mathlib.GroupTheory.GroupAction.Primitive +public import Mathlib.RepresentationTheory.Irreducible +public import Mathlib.Algebra.Field.ZMod +public import LeanPool.CommonNeighbourConjecture.Saxl.Basic import Mathlib.Algebra.Module.ZMod -import Mathlib.Tactic.Abel -import Mathlib.Tactic.FinCases -import LeanPool.CommonNeighbourConjecture.Saxl.Basic /-! # Affine actions and the regular-difference criterion @@ -23,6 +20,8 @@ semidirect product of the additive translation group by a distributive action. It proves the part of paper Lemma 3.1 used by every affine construction. -/ +@[expose] public section + namespace Saxl open scoped Pointwise diff --git a/LeanPool/CommonNeighbourConjecture/Saxl/Basic.lean b/LeanPool/CommonNeighbourConjecture/Saxl/Basic.lean index 7c496285df..5d9e099b1c 100644 --- a/LeanPool/CommonNeighbourConjecture/Saxl/Basic.lean +++ b/LeanPool/CommonNeighbourConjecture/Saxl/Basic.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import Mathlib.Data.Fin.Tuple.Basic -import Mathlib.GroupTheory.GroupAction.Basic +public import Mathlib.Data.Fin.Tuple.Basic +public import Mathlib.Algebra.Group.Subgroup.Lattice +public import Mathlib.GroupTheory.GroupAction.Defs +import Mathlib.Algebra.Ring.Nat +import Mathlib.Data.Finset.Attr /-! # Bases and Saxl adjacency @@ -14,6 +18,8 @@ Foundational definitions for ordered tuple bases, ordinary and generalized Saxl adjacency, exact base size, and common neighbours. -/ +@[expose] public section + namespace Saxl variable (G Ω : Type*) [Group G] [MulAction G Ω] diff --git a/LeanPool/CommonNeighbourConjecture/Saxl/Generalized.lean b/LeanPool/CommonNeighbourConjecture/Saxl/Generalized.lean index c70fe737f7..f9c0521dc9 100644 --- a/LeanPool/CommonNeighbourConjecture/Saxl/Generalized.lean +++ b/LeanPool/CommonNeighbourConjecture/Saxl/Generalized.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import LeanPool.CommonNeighbourConjecture.Saxl.Basic +public import LeanPool.CommonNeighbourConjecture.Saxl.Basic +import Mathlib.Algebra.GroupWithZero.Nat +import Mathlib.Algebra.NeZero +import Mathlib.Data.Finset.Attr /-! # Generalized Saxl adjacency @@ -15,6 +19,8 @@ irrelevant: generalized adjacency is exactly membership of two distinct vertices in a common set-like base of the required size. -/ +@[expose] public section + namespace Saxl variable (G Ω : Type*) [Group G] [MulAction G Ω] diff --git a/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Action.lean b/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Action.lean index 2bc2267614..0e99928d8b 100644 --- a/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Action.lean +++ b/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Action.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import LeanPool.CommonNeighbourConjecture.Saxl.PermWreath.Defs +public import LeanPool.CommonNeighbourConjecture.Saxl.PermWreath.Defs /-! # The product action of a permutation wreath product @@ -14,6 +15,8 @@ For `g = (f, q)` the action on `ι → Δ` is `(g • x) i = f i • x (q⁻¹ • i)`. -/ +@[expose] public section + namespace Saxl variable (X Q ι Δ : Type*) diff --git a/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Defs.lean b/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Defs.lean index 12ba91eb45..9045664421 100644 --- a/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Defs.lean +++ b/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Defs.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import Mathlib.GroupTheory.SemidirectProduct +public import Mathlib.GroupTheory.SemidirectProduct /-! # Permutation wreath products @@ -18,6 +19,8 @@ reindexing, so that Unlike `RegularWreathProduct`, the action of `Q` on `ι` need not be regular. -/ +@[expose] public section + namespace Saxl variable (X Q ι : Type*) [Group X] [Group Q] [MulAction Q ι] diff --git a/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Irreducible.lean b/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Irreducible.lean index 6c8ae59d2a..e97e2fd423 100644 --- a/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Irreducible.lean +++ b/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Irreducible.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module -import LeanPool.CommonNeighbourConjecture.Saxl.PermWreath.Action -import Mathlib.RepresentationTheory.Irreducible -import Mathlib.LinearAlgebra.Pi +public import LeanPool.CommonNeighbourConjecture.Saxl.PermWreath.Action +public import Mathlib.RepresentationTheory.Irreducible /-! # Irreducibility of permutation-wreath product actions @@ -28,6 +28,8 @@ to every coordinate, and the finite sum of coordinate vectors fills the whole product module. -/ +@[expose] public section + namespace Saxl variable {F H Q ι V : Type*} diff --git a/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Symmetric.lean b/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Symmetric.lean index 68a6f0e347..c944ff05d3 100644 --- a/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Symmetric.lean +++ b/LeanPool/CommonNeighbourConjecture/Saxl/PermWreath/Symmetric.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Aluna Rizzoli and Adam R. Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aluna Rizzoli, Adam R. Thomas -/ +module +public import Mathlib.Algebra.Group.Action.End +public import Mathlib.Basic.Finite.Defs import Mathlib.Data.Fintype.Card -import Mathlib.GroupTheory.GroupAction.Basic /-! # Words for a full symmetric top group @@ -14,6 +16,8 @@ Only the distinguishing-word facts used by the every-base construction are included here. -/ +@[expose] public section + namespace Saxl /-- A colour word has trivial stabilizer under contravariant reindexing. -/ diff --git a/LeanPool/CompactSpectral.lean b/LeanPool/CompactSpectral.lean index 9ca859c81d..cba36e8ea1 100644 --- a/LeanPool/CompactSpectral.lean +++ b/LeanPool/CompactSpectral.lean @@ -3,16 +3,17 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactOperatorOrthonormal -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.Approximation -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.CutoffProjector -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.OpNormEigenvalue -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.SpectralFiniteness -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.SpectralTheorem -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.RayleighCompact -import LeanPool.CompactSpectral.Topology.WeakHilbertCompact +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactOperatorOrthonormal +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.Approximation +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.CutoffProjector +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.OpNormEigenvalue +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.SpectralFiniteness +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.SpectralTheorem +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.RayleighCompact +public import LeanPool.CompactSpectral.Topology.WeakHilbertCompact /-! # Spectral theorem for compact self-adjoint operators @@ -25,6 +26,8 @@ Tags: spectral-theory, functional-analysis, compact-operators MSC: 47A75, 47B07 -/ +@[expose] public section + /-! # Compact self-adjoint spectral theory diff --git a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactOperatorOrthonormal.lean b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactOperatorOrthonormal.lean index 0dd4086774..10e7bc8525 100644 --- a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactOperatorOrthonormal.lean +++ b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactOperatorOrthonormal.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import Mathlib.Analysis.InnerProductSpace.Orthonormal -import Mathlib.Order.Filter.AtTopBot.Basic -import Mathlib.Order.Filter.Cofinite +module + +public import Mathlib.Analysis.InnerProductSpace.Orthonormal +public import Mathlib.Analysis.Normed.Operator.Compact.Basic +public import Mathlib.Topology.Algebra.Module.Spaces.WeakDual import LeanPool.CompactSpectral.Analysis.InnerProductSpace.RayleighCompact /-! @@ -25,6 +27,8 @@ operators such as Laplace–Beltrami). - `CompactSpectral.tendsto_norm_apply_of_isCompactOperator_of_orthonormal` -/ +@[expose] public section + namespace CompactSpectral open Filter Topology Metric diff --git a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint.lean b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint.lean index b093c71673..6697d2a8e3 100644 --- a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint.lean +++ b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint.lean @@ -3,15 +3,20 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.Basic -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.SpectralFiniteness -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.CutoffProjector -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.OpNormEigenvalue -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.Approximation -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.SpectralTheorem +module + +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.Basic +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.SpectralFiniteness +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.CutoffProjector +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.OpNormEigenvalue +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.Approximation +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.SpectralTheorem +import Mathlib.Tactic.Positivity.Finset /-! # Compact self-adjoint operators on Hilbert spaces This module bundles the spectral theory of compact self-adjoint operators. -/ + +@[expose] public section diff --git a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/Approximation.lean b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/Approximation.lean index f82f383b1a..b8c374f479 100644 --- a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/Approximation.lean +++ b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/Approximation.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import Mathlib.Analysis.InnerProductSpace.Projection.Basic -import Mathlib.Algebra.Module.Submodule.Invariant +module + +public import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.CutoffProjector import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.Basic -import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.CutoffProjector import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.OpNormEigenvalue +import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.SpectralFiniteness +import Mathlib.Analysis.InnerProductSpace.Semisimple /-! # Compact self-adjoint operators: large-eigenspace approximation in operator norm @@ -19,6 +21,8 @@ For a compact self-adjoint operator `T` and `ε > 0`, the “large-eigenvalue” * `‖T - T ∘ largeEigenspaceProjector T ε‖ ≤ ε`. -/ +@[expose] public section + namespace CompactSelfAdjoint open Filter Topology Metric diff --git a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/Basic.lean b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/Basic.lean index 00fd1fb5c7..d0b58d2f86 100644 --- a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/Basic.lean +++ b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/Basic.lean @@ -3,6 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module + +public import Mathlib.Analysis.InnerProductSpace.Adjoint +public import Mathlib.Analysis.Normed.Operator.Compact.Basic +public import Mathlib.LinearAlgebra.Eigenspace.Basic import Mathlib.Analysis.InnerProductSpace.Spectrum /-! @@ -27,6 +32,8 @@ agrees with the naive restriction and eigenvectors lift back to eigenvectors of - `CompactSelfAdjoint.invariant_orthogonalComplement_eigenspace_of_isSelfAdjoint` -/ +@[expose] public section + namespace CompactSelfAdjoint open scoped InnerProduct diff --git a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/CutoffProjector.lean b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/CutoffProjector.lean index 3f4d0abddd..277cf5a2e9 100644 --- a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/CutoffProjector.lean +++ b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/CutoffProjector.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import Mathlib.Analysis.InnerProductSpace.Adjoint -import Mathlib.Analysis.InnerProductSpace.Projection.Basic -import Mathlib.Algebra.Module.Submodule.Invariant -import Mathlib.Analysis.InnerProductSpace.Semisimple -import Mathlib.Data.Fintype.Lattice +module + +public import Mathlib.Analysis.InnerProductSpace.Adjoint +public import Mathlib.Analysis.Normed.Operator.Compact.Basic +public import Mathlib.LinearAlgebra.Eigenspace.Basic import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.SpectralFiniteness +import Mathlib.Analysis.InnerProductSpace.Semisimple /-! # Compact self-adjoint operators: large-eigenspace cutoff projectors @@ -32,6 +33,8 @@ enable spectral iteration by compressing to invariant orthogonal complements. - `CompactSelfAdjoint.largeEigenspaceProjector_comp` -/ +@[expose] public section + namespace CompactSelfAdjoint open Filter Topology Metric diff --git a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/OpNormEigenvalue.lean b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/OpNormEigenvalue.lean index 614b715fef..165b11cf28 100644 --- a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/OpNormEigenvalue.lean +++ b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/OpNormEigenvalue.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import Mathlib.Analysis.InnerProductSpace.Rayleigh -import Mathlib.Analysis.InnerProductSpace.Adjoint -import Mathlib.Analysis.Normed.Operator.NNNorm +module + +public import Mathlib.Analysis.InnerProductSpace.Adjoint +public import LeanPool.CompactSpectral.Topology.WeakHilbertCompact +public import Mathlib.Analysis.Normed.Operator.Compact.Basic +public import Mathlib.LinearAlgebra.Eigenspace.Basic import LeanPool.CompactSpectral.Analysis.InnerProductSpace.RayleighCompact /-! @@ -19,6 +22,8 @@ This file provides two Hilbert-space facts about compact operators: These are used downstream to turn “no eigenvalues above `ε`” into an operator-norm estimate. -/ +@[expose] public section + namespace CompactSelfAdjoint open CompactSpectral diff --git a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/SpectralFiniteness.lean b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/SpectralFiniteness.lean index 70fa2dd93d..b8d5822935 100644 --- a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/SpectralFiniteness.lean +++ b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/SpectralFiniteness.lean @@ -3,16 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import Mathlib.Analysis.InnerProductSpace.Spectrum -import Mathlib.Analysis.Normed.Module.FiniteDimension -import Mathlib.Algebra.Order.Archimedean.Basic -import Mathlib.Data.Set.Finite.Basic -import Mathlib.Data.Finset.Max -import Mathlib.LinearAlgebra.FiniteDimensional.Basic -import Mathlib.Order.Filter.AtTopBot.Basic -import Mathlib.Order.Filter.Cofinite -import Mathlib.LinearAlgebra.Eigenspace.Basic +module + +public import Mathlib.LinearAlgebra.Eigenspace.Basic +public import Mathlib.Analysis.InnerProductSpace.Adjoint +public import Mathlib.Analysis.Normed.Operator.Compact.Basic import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactOperatorOrthonormal +import Mathlib.Analysis.InnerProductSpace.Spectrum /-! # Compact self-adjoint operators: spectral finiteness toolkit @@ -35,6 +32,8 @@ These are standard ingredients for spectral-iteration proofs and compact-resolve - `CompactSelfAdjoint.tendsto_norm_of_injective_hasEigenvalue_of_isCompactOperator_of_isSelfAdjoint` -/ +@[expose] public section + namespace CompactSelfAdjoint open Filter Topology Metric diff --git a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/SpectralTheorem.lean b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/SpectralTheorem.lean index 1485d487fd..3e1ad88ea1 100644 --- a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/SpectralTheorem.lean +++ b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/CompactSelfAdjoint/SpectralTheorem.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import Mathlib.Analysis.InnerProductSpace.l2Space +module + +public import Mathlib.Analysis.InnerProductSpace.l2Space +public import Mathlib.Analysis.InnerProductSpace.Adjoint +public import Mathlib.Analysis.Normed.Operator.Compact.Basic +public import Mathlib.LinearAlgebra.Eigenspace.Basic import LeanPool.CompactSpectral.Analysis.InnerProductSpace.CompactSelfAdjoint.Approximation +import Mathlib.Analysis.InnerProductSpace.Spectrum /-! # Compact self-adjoint operators: spectral theorem (Hilbert basis of eigenvectors) @@ -20,6 +26,8 @@ Hilbert space. a compact self-adjoint operator admits a `HilbertBasis` consisting of eigenvectors. -/ +@[expose] public section + namespace CompactSelfAdjoint open scoped Topology diff --git a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/RayleighCompact.lean b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/RayleighCompact.lean index a4bdb9972f..07f56f370f 100644 --- a/LeanPool/CompactSpectral/Analysis/InnerProductSpace/RayleighCompact.lean +++ b/LeanPool/CompactSpectral/Analysis/InnerProductSpace/RayleighCompact.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ -import Mathlib.Analysis.InnerProductSpace.Rayleigh -import Mathlib.Analysis.Normed.Operator.Compact.Basic -import LeanPool.CompactSpectral.Topology.WeakHilbertCompact +module + +public import Mathlib.Analysis.InnerProductSpace.Rayleigh +public import Mathlib.Analysis.Normed.Operator.Compact.Basic +public import LeanPool.CompactSpectral.Topology.WeakHilbertCompact /-! # Rayleigh quotient for compact self-adjoint operators @@ -28,6 +30,8 @@ compact operator the quadratic form is continuous on that weakly compact set. - `CompactSelfAdjoint.continuousOn_weakClosedBall_reApplyInnerSelf_of_isCompactOperator` - `CompactSelfAdjoint.exists_hasEigenvector_iSup_or_iInf_of_isCompactOperator` -/ + +@[expose] public section namespace CompactSelfAdjoint open CompactSpectral diff --git a/LeanPool/CompactSpectral/Topology/WeakHilbertCompact.lean b/LeanPool/CompactSpectral/Topology/WeakHilbertCompact.lean index 26c99f3e5f..a4b46425ae 100644 --- a/LeanPool/CompactSpectral/Topology/WeakHilbertCompact.lean +++ b/LeanPool/CompactSpectral/Topology/WeakHilbertCompact.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module + +public import Mathlib.Topology.Algebra.Module.Spaces.WeakDual +public import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.Normed.Module.WeakDual -import Mathlib.Topology.Algebra.Module.Spaces.WeakDual -import Mathlib.Analysis.InnerProductSpace.Dual /-! # Weak compactness of Hilbert closed balls @@ -22,6 +24,8 @@ This lemma is a key building block for developing compact/self-adjoint spectral Hilbert setting while keeping `packages/mathlib_extensions/` mathlib-only. -/ +@[expose] public section + namespace CompactSpectral open scoped Topology diff --git a/LeanPool/CompactnessAndDegeneracy.lean b/LeanPool/CompactnessAndDegeneracy.lean index d2b01b76a6..7d6504370d 100644 --- a/LeanPool/CompactnessAndDegeneracy.lean +++ b/LeanPool/CompactnessAndDegeneracy.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.CompactnessAndDegeneracy.Compactness -import LeanPool.CompactnessAndDegeneracy.Degeneracy +public import LeanPool.CompactnessAndDegeneracy.Compactness +public import LeanPool.CompactnessAndDegeneracy.Degeneracy /-! # Counterexamples to graph compactness and two-degenerate extremal bounds @@ -18,6 +19,8 @@ Tags: extremal-combinatorics, extremal-graph-theory, degenerate-graphs, countere MSC: 05C35, 05C75 -/ +@[expose] public section + /-! # Counterexamples in extremal graph theory diff --git a/LeanPool/CompactnessAndDegeneracy/Compactness.lean b/LeanPool/CompactnessAndDegeneracy/Compactness.lean index 76a5c7698a..013110faad 100644 --- a/LeanPool/CompactnessAndDegeneracy/Compactness.lean +++ b/LeanPool/CompactnessAndDegeneracy/Compactness.lean @@ -3138,9 +3138,11 @@ private theorem common_neighbor_unique_of_four_cycle_free let f : Fin 4 → V := ![u, x, v, y] refine ⟨⟨⟨f, ?_⟩, ?_⟩⟩ · intro i j hij - fin_cases i <;> fin_cases j <;> - simp only [f, Fin.isValue, Fin.zero_eta, - Matrix.cons_val_zero] <;> + have hj : j = i - 1 ∨ j = i + 1 := by + simpa only [SimpleGraph.cycleGraph_neighborSet, Set.mem_insert_iff, + Set.mem_singleton_iff] using + (show j ∈ (SimpleGraph.cycleGraph 4).neighborSet i from hij) + rcases hj with rfl | rfl <;> fin_cases i <;> first | exact hux | exact hux.symm @@ -3150,12 +3152,9 @@ private theorem common_neighbor_unique_of_four_cycle_free | exact huy.symm | exact hvy | exact hvy.symm - | exact False.elim ((of_decide_eq_false rfl) hij) - · intro i j hij - fin_cases i <;> fin_cases j <;> - simp [f, huv, huv.symm, hxy, Ne.symm hxy, - hux.ne, hux.symm.ne, hvx.ne, hvx.symm.ne, - huy.ne, huy.symm.ne, hvy.ne, hvy.symm.ne] at hij ⊢ + · change Function.Injective f + simp only [f, Matrix.vecCons, Fin.cons_injective_iff] + simp [huv, hxy, hux.ne, huy.ne, hvx.symm.ne, hvy.ne, Function.Injective] private def CommonNeighborRelated {V : Type*} (G : SimpleGraph V) (u v : V) : Prop := @@ -3228,9 +3227,11 @@ private theorem common_neighbors_triangle_eq_of_cycle_free let f : Fin 6 → V := ![u, a, v, b, w, c] refine ⟨⟨⟨f, ?_⟩, ?_⟩⟩ · intro i j hij - fin_cases i <;> fin_cases j <;> - simp only [f, Fin.isValue, Fin.zero_eta, - Matrix.cons_val_zero] <;> + have hj : j = i - 1 ∨ j = i + 1 := by + simpa only [SimpleGraph.cycleGraph_neighborSet, Set.mem_insert_iff, + Set.mem_singleton_iff] using + (show j ∈ (SimpleGraph.cycleGraph 6).neighborSet i from hij) + rcases hj with rfl | rfl <;> fin_cases i <;> first | exact hua | exact hua.symm @@ -3244,15 +3245,10 @@ private theorem common_neighbors_triangle_eq_of_cycle_free | exact hwc.symm | exact huc | exact huc.symm - | exact False.elim ((of_decide_eq_false rfl) hij) - · intro i j hij - fin_cases i <;> fin_cases j <;> - simp [f, huv, huv.symm, hvw, hvw.symm, huw, huw.symm, - hab, Ne.symm hab, hbc, Ne.symm hbc, hac, Ne.symm hac, - hua.ne, hua.symm.ne, hva.ne, hva.symm.ne, - hvb.ne, hvb.symm.ne, hwb.ne, hwb.symm.ne, - hwc.ne, hwc.symm.ne, huc.ne, huc.symm.ne, - hub, hub.symm, hvc, hvc.symm, hwa, hwa.symm] at hij ⊢ + · change Function.Injective f + simp only [f, Matrix.vecCons, Fin.cons_injective_iff] + simp [huv, hvw, huw, hab, hbc, hac, hua.ne, hva.symm.ne, hvb.ne, + hwb.symm.ne, hwc.ne, huc.ne, hub, hvc, hwa.symm, Function.Injective] private theorem common_second_neighbors_pairwise_unrelated {V : Type*} {G : SimpleGraph V} diff --git a/LeanPool/CompactnessAndDegeneracy/Degeneracy.lean b/LeanPool/CompactnessAndDegeneracy/Degeneracy.lean index bac63dcd05..c7e1693291 100644 --- a/LeanPool/CompactnessAndDegeneracy/Degeneracy.lean +++ b/LeanPool/CompactnessAndDegeneracy/Degeneracy.lean @@ -8061,8 +8061,8 @@ private theorem pairGraphCopy_parent_child_hammingDist_le ((pairLayerFinEquiv baseSize layer.val).symm parent))).val at hedge have hdist := ((hammingHost_adj_iff dimension radius _ _).mp hedge).2 - simpa only [pairGraphCopyParentWords, pairGraphCopyChildWords, ge_iff_le, - hammingDist_comm] using hdist + rw [hammingDist_comm] + exact hdist private theorem pairGraphCopy_averageDisagreement_le_radius {baseSize depth dimension radius : ℕ} diff --git a/LeanPool/CompositionAlgebras.lean b/LeanPool/CompositionAlgebras.lean index f6220379f5..d9d4a47887 100644 --- a/LeanPool/CompositionAlgebras.lean +++ b/LeanPool/CompositionAlgebras.lean @@ -3,18 +3,25 @@ Copyright (c) 2026 Bryan Ehrlich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Ehrlich -/ +module -import LeanPool.CompositionAlgebras.Octonions -import LeanPool.CompositionAlgebras.OctonionTrace -import LeanPool.CompositionAlgebras.OctonionNucleus -import LeanPool.CompositionAlgebras.OctonionModule -import LeanPool.CompositionAlgebras.Composition.Defs -import LeanPool.CompositionAlgebras.Composition.Instances -import LeanPool.CompositionAlgebras.Composition.Doubling -import LeanPool.CompositionAlgebras.Composition.CayleyDickson -import LeanPool.CompositionAlgebras.Composition.Hurwitz -import LeanPool.CompositionAlgebras.Composition.Isomorphisms -import LeanPool.CompositionAlgebras.Composition.Classification +public import LeanPool.CompositionAlgebras.Octonions +public import LeanPool.CompositionAlgebras.OctonionTrace +public import LeanPool.CompositionAlgebras.OctonionNucleus +public import LeanPool.CompositionAlgebras.OctonionModule +public import LeanPool.CompositionAlgebras.Composition.Defs +public import LeanPool.CompositionAlgebras.Composition.Instances +public import LeanPool.CompositionAlgebras.Composition.Doubling +public import LeanPool.CompositionAlgebras.Composition.CayleyDickson +public import LeanPool.CompositionAlgebras.Composition.Hurwitz +public import LeanPool.CompositionAlgebras.Composition.Isomorphisms +public import LeanPool.CompositionAlgebras.Composition.Classification +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Positivity.Finset /-! # Hurwitz's Classification of Euclidean Composition Algebras @@ -27,6 +34,8 @@ Tags: nonassociative-algebra, composition-algebras, octonions, hurwitz-theorem, MSC: 17A75, 17A35, 11E88 -/ +@[expose] public section + /-! # Euclidean composition algebras over `ℝ` diff --git a/LeanPool/CompositionAlgebras/Composition/CayleyDickson.lean b/LeanPool/CompositionAlgebras/Composition/CayleyDickson.lean index ed7aa17862..8832729728 100644 --- a/LeanPool/CompositionAlgebras/Composition/CayleyDickson.lean +++ b/LeanPool/CompositionAlgebras/Composition/CayleyDickson.lean @@ -3,7 +3,17 @@ Copyright (c) 2026 Bryan Ehrlich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Ehrlich -/ -import LeanPool.CompositionAlgebras.Composition.Doubling +module + +public import LeanPool.CompositionAlgebras.Composition.Defs +public import Mathlib.LinearAlgebra.BilinearMap +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset /-! @@ -54,6 +64,8 @@ Substrate for the classification. The headline declaration is the instance `Composition/Classification.lean`. -/ +@[expose] public section + namespace CompositionAlgebra universe u diff --git a/LeanPool/CompositionAlgebras/Composition/Classification.lean b/LeanPool/CompositionAlgebras/Composition/Classification.lean index fc3176f8d6..f1d2614a49 100644 --- a/LeanPool/CompositionAlgebras/Composition/Classification.lean +++ b/LeanPool/CompositionAlgebras/Composition/Classification.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Bryan Ehrlich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Ehrlich -/ -import LeanPool.CompositionAlgebras.Composition.Isomorphisms -import LeanPool.CompositionAlgebras.Composition.Hurwitz +module + +public import LeanPool.CompositionAlgebras.Composition.Isomorphisms +public import LeanPool.CompositionAlgebras.Composition.Hurwitz +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Data.EReal.Inv +import Mathlib.LinearAlgebra.FiniteDimensional.Basic +import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition +import Mathlib.Tactic.Positivity.Finset /-! # Hurwitz's theorem, classification form @@ -48,6 +58,8 @@ proof is what makes that true, and it is not repeated. This file carries `hurwitz_classification`, the headline theorem of the development. -/ +@[expose] public section + open scoped Quaternion namespace CompositionAlgebra diff --git a/LeanPool/CompositionAlgebras/Composition/Defs.lean b/LeanPool/CompositionAlgebras/Composition/Defs.lean index b54e425e30..59a21274f4 100644 --- a/LeanPool/CompositionAlgebras/Composition/Defs.lean +++ b/LeanPool/CompositionAlgebras/Composition/Defs.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Bryan Ehrlich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Ehrlich -/ -import Mathlib.Analysis.SpecialFunctions.Sqrt -import Mathlib.LinearAlgebra.BilinearMap -import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas +module + +public import Mathlib.Algebra.Algebra.Basic +public import Mathlib.Basic.Real.Basic +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.ContinuousFunctionalCalculus import Mathlib.Tactic.LinearCombination import Mathlib.Tactic.Module +import Mathlib.Tactic.Positivity.Finset /-! @@ -56,6 +64,8 @@ Everything below is derived from the four class fields alone. Substrate for the two Hurwitz theorems. It states neither of them. -/ +@[expose] public section + universe u /-- A **Euclidean composition algebra**: a unital, `ℝ`-bilinear, not necessarily associative diff --git a/LeanPool/CompositionAlgebras/Composition/Doubling.lean b/LeanPool/CompositionAlgebras/Composition/Doubling.lean index 82538f3ac5..2a2576a018 100644 --- a/LeanPool/CompositionAlgebras/Composition/Doubling.lean +++ b/LeanPool/CompositionAlgebras/Composition/Doubling.lean @@ -3,7 +3,18 @@ Copyright (c) 2026 Bryan Ehrlich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Ehrlich -/ -import LeanPool.CompositionAlgebras.Composition.Defs +module + +public import LeanPool.CompositionAlgebras.Composition.Defs +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.LinearCombination +import Mathlib.Tactic.Module +import Mathlib.Tactic.Positivity.Finset /-! @@ -51,6 +62,8 @@ The named results are the four listed above plus their inputs: `cstar_mul_mul` Substrate for the two Hurwitz theorems. It states neither of them. -/ +@[expose] public section + namespace CompositionAlgebra universe u diff --git a/LeanPool/CompositionAlgebras/Composition/Hurwitz.lean b/LeanPool/CompositionAlgebras/Composition/Hurwitz.lean index 4430be3900..528912d606 100644 --- a/LeanPool/CompositionAlgebras/Composition/Hurwitz.lean +++ b/LeanPool/CompositionAlgebras/Composition/Hurwitz.lean @@ -3,9 +3,20 @@ Copyright (c) 2026 Bryan Ehrlich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Ehrlich -/ -import LeanPool.CompositionAlgebras.Composition.Doubling -import Mathlib.LinearAlgebra.FreeModule.Finite.Matrix +module + +public import LeanPool.CompositionAlgebras.Composition.Doubling +public import Mathlib.LinearAlgebra.FiniteDimensional.Defs +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Data.EReal.Inv import Mathlib.LinearAlgebra.Dual.Lemmas +import Mathlib.LinearAlgebra.FreeModule.Finite.Matrix +import Mathlib.Logic.Equiv.PartialEquiv +import Mathlib.Tactic.LinearCombination +import Mathlib.Tactic.Positivity.Finset /-! @@ -65,6 +76,8 @@ This file carries `finrank_eq_one_or_two_or_four_or_eight`, Hurwitz's theorem in dimension form. -/ +@[expose] public section + namespace CompositionAlgebra universe u diff --git a/LeanPool/CompositionAlgebras/Composition/Instances.lean b/LeanPool/CompositionAlgebras/Composition/Instances.lean index 917b54a87f..3f28550b26 100644 --- a/LeanPool/CompositionAlgebras/Composition/Instances.lean +++ b/LeanPool/CompositionAlgebras/Composition/Instances.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Bryan Ehrlich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Ehrlich -/ -import LeanPool.CompositionAlgebras.Composition.Defs -import LeanPool.CompositionAlgebras.OctonionModule -import Mathlib.Algebra.Quaternion +module + +public import LeanPool.CompositionAlgebras.Composition.Defs +public import LeanPool.CompositionAlgebras.OctonionModule +public import Mathlib.Algebra.Quaternion +public import Mathlib.LinearAlgebra.Complex.Module +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt import Mathlib.LinearAlgebra.Complex.FiniteDimensional +import Mathlib.Tactic.Positivity.Finset /-! @@ -49,6 +57,8 @@ They are assembled here from the distributivity and unit lemmas already proved t Substrate, and the non-vacuity witness for `Composition/Defs.lean`'s class. -/ +@[expose] public section + noncomputable section open CompositionAlgebra diff --git a/LeanPool/CompositionAlgebras/Composition/Isomorphisms.lean b/LeanPool/CompositionAlgebras/Composition/Isomorphisms.lean index 519e433a3a..492e473817 100644 --- a/LeanPool/CompositionAlgebras/Composition/Isomorphisms.lean +++ b/LeanPool/CompositionAlgebras/Composition/Isomorphisms.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Bryan Ehrlich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Ehrlich -/ -import LeanPool.CompositionAlgebras.Composition.CayleyDickson -import LeanPool.CompositionAlgebras.Composition.Instances +module + +public import LeanPool.CompositionAlgebras.Composition.CayleyDickson +public import LeanPool.CompositionAlgebras.Composition.Instances +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Positivity.Finset /-! @@ -61,6 +69,8 @@ Substrate for the classification: it supplies the three base identifications the doubling chain is renamed along. -/ +@[expose] public section + open CompositionAlgebra open scoped Quaternion diff --git a/LeanPool/CompositionAlgebras/OctonionModule.lean b/LeanPool/CompositionAlgebras/OctonionModule.lean index ea2225e13a..2dec769133 100644 --- a/LeanPool/CompositionAlgebras/OctonionModule.lean +++ b/LeanPool/CompositionAlgebras/OctonionModule.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Bryan Ehrlich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Ehrlich -/ +module + +public import LeanPool.CompositionAlgebras.Octonions +public import Mathlib.LinearAlgebra.FiniteDimensional.Defs import LeanPool.CompositionAlgebras.OctonionTrace import Mathlib.LinearAlgebra.Dimension.Constructions -import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! @@ -35,6 +39,8 @@ is no `Module ℝ Octonion` for `CompositionAlgebra Octonion` to be stated over. * `Octonion.finrank_eq_eight` -- `finrank ℝ 𝕆 = 8` -/ +@[expose] public section + noncomputable section /-! ## `Octonion` as an `ℝ`-module -/ diff --git a/LeanPool/CompositionAlgebras/OctonionNucleus.lean b/LeanPool/CompositionAlgebras/OctonionNucleus.lean index af86c6a5e1..f456c21b26 100644 --- a/LeanPool/CompositionAlgebras/OctonionNucleus.lean +++ b/LeanPool/CompositionAlgebras/OctonionNucleus.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 Bryan Ehrlich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Ehrlich -/ -import LeanPool.CompositionAlgebras.Octonions +module + +public import LeanPool.CompositionAlgebras.Octonions +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.ZMod.Defs +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific -- Only seven coordinate equations from three associators are needed below. @@ -26,6 +35,8 @@ relation `c.coords m = -c.coords m`. Three triples cover all seven imaginary ind `decide` handles the `Fin 8` guards. Nothing here or anywhere in this development is discharged by kernel-external evaluation, so nothing below rests on the compiler. -/ + +@[expose] public section namespace Octonion theorem coord_eq {a b : Octonion} (hab : a = b) (k : Fin 8) : a.coords k = b.coords k := by diff --git a/LeanPool/CompositionAlgebras/OctonionTrace.lean b/LeanPool/CompositionAlgebras/OctonionTrace.lean index 65d87d4908..996bd631f8 100644 --- a/LeanPool/CompositionAlgebras/OctonionTrace.lean +++ b/LeanPool/CompositionAlgebras/OctonionTrace.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Bryan Ehrlich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Ehrlich -/ -import LeanPool.CompositionAlgebras.Octonions +module + +public import LeanPool.CompositionAlgebras.Octonions +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # The octonionic trace form @@ -48,6 +55,8 @@ maxHeartbeats` is needed anywhere in this file. octonionic matrices is built over. -/ +@[expose] public section + namespace Octonion /-- The `Mul` instance is the explicit `Octonion.mul`. Bridges the `*`-notation diff --git a/LeanPool/CompositionAlgebras/Octonions.lean b/LeanPool/CompositionAlgebras/Octonions.lean index a222e33ab8..e5ee6efa99 100644 --- a/LeanPool/CompositionAlgebras/Octonions.lean +++ b/LeanPool/CompositionAlgebras/Octonions.lean @@ -3,9 +3,21 @@ Copyright (c) 2026 Bryan Ehrlich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Ehrlich -/ -import Mathlib.Basic.Real.Basic -import Mathlib.LinearAlgebra.FiniteDimensional.Defs -import Mathlib.Tactic.NormNum +module + +public import Mathlib.Basic.Real.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Fintype.Basic +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.ZMod.Defs +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! @@ -52,6 +64,8 @@ dropped axiom. The other two remain unstated. * Hurwitz, "Uber die Composition der quadratischen Formen von beliebig vielen Variablen," 1898 -/ +@[expose] public section + noncomputable section /-- The octonion algebra, represented as R^8. diff --git a/LeanPool/Computability.lean b/LeanPool/Computability.lean index c2dff6ccec..02c80ffd85 100644 --- a/LeanPool/Computability.lean +++ b/LeanPool/Computability.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Tanner Duve, Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tanner Duve, Elan Roth -/ -import LeanPool.Computability.Oracle -import LeanPool.Computability.TuringDegree -import LeanPool.Computability.Encoding -import LeanPool.Computability.Jump -import LeanPool.Computability.ArithHierarchy -import LeanPool.Computability.AutGrp +module + +public import LeanPool.Computability.Oracle +public import LeanPool.Computability.TuringDegree +public import LeanPool.Computability.Encoding +public import LeanPool.Computability.Jump +public import LeanPool.Computability.ArithHierarchy +public import LeanPool.Computability.AutGrp +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Oracle Computability and Turing Degrees @@ -21,6 +28,8 @@ Tags: computability, oracle-computability, turing-degrees, recursion-theory, ari MSC: 03D30, 03D28 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Computability/ArithHierarchy.lean b/LeanPool/Computability/ArithHierarchy.lean index cc0c530d16..f09b8dc1f7 100644 --- a/LeanPool/Computability/ArithHierarchy.lean +++ b/LeanPool/Computability/ArithHierarchy.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Tanner Duve, Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tanner Duve, Elan Roth -/ -import LeanPool.Computability.Jump +module + +public import LeanPool.Computability.Jump +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # The Arithmetical Hierarchy @@ -12,6 +19,8 @@ This file develops the iterated jump operator, the sets `∅⁽ⁿ⁾`, and the `Δ⁰ₙ` of the arithmetical hierarchy relative to oracle computability. -/ +@[expose] public section + namespace Computability /-- The iterated Turing jump: `TuringJump n f` is the `n`-fold jump of `f`. -/ diff --git a/LeanPool/Computability/AutGrp.lean b/LeanPool/Computability/AutGrp.lean index 97902b6121..3bcdf88560 100644 --- a/LeanPool/Computability/AutGrp.lean +++ b/LeanPool/Computability/AutGrp.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Tanner Duve, Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tanner Duve, Elan Roth -/ -import LeanPool.Computability.TuringDegree -import Mathlib.GroupTheory.Perm.Basic -import Mathlib.Order.Hom.Basic +module + +public import LeanPool.Computability.TuringDegree +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Automorphism Group of the Turing Degrees @@ -14,6 +19,8 @@ This file sets up the automorphism group of the Turing degrees as the group of o isomorphisms of `TuringDegree`. -/ +@[expose] public section + namespace Computability /-- The order automorphisms of a type `α`, namely the order isomorphisms `α ≃o α`. -/ diff --git a/LeanPool/Computability/Encoding.lean b/LeanPool/Computability/Encoding.lean index 63b2b8d69e..b2eafbb740 100644 --- a/LeanPool/Computability/Encoding.lean +++ b/LeanPool/Computability/Encoding.lean @@ -3,15 +3,14 @@ Copyright (c) 2026 Tanner Duve, Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tanner Duve, Elan Roth -/ -import LeanPool.Computability.TuringDegree -import Mathlib.Data.Option.Basic -import Mathlib.Tactic.Linarith -import Mathlib.Basic.Denumerable -import Mathlib.Logic.Encodable.Basic -import Mathlib.Data.Nat.PSub -import Mathlib.Data.PFun -import Mathlib.Data.Part -import Mathlib.Tactic.Cases +module + +public import LeanPool.Computability.Oracle +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! @@ -21,6 +20,8 @@ This file provides an encoding for oracle partial recursive functions and a defi universal partial recursive function relative to an oracle, along with a proof that it is universal. -/ +@[expose] public section + open Denumerable Encodable namespace Computability diff --git a/LeanPool/Computability/Jump.lean b/LeanPool/Computability/Jump.lean index 75ecd89a9c..beed6478e4 100644 --- a/LeanPool/Computability/Jump.lean +++ b/LeanPool/Computability/Jump.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Tanner Duve, Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tanner Duve, Elan Roth -/ -import LeanPool.Computability.Encoding -import Mathlib.Computability.Reduce -import Mathlib.Computability.Halting +module + +public import LeanPool.Computability.Encoding +public import LeanPool.Computability.TuringDegree +public import Mathlib.Computability.RE +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # The Jump Operator @@ -19,6 +26,8 @@ if `f : ℕ →. ℕ`, then `dom f : Set ℕ` is `{n | n ∈ f.Dom}`. These are theorems are stated. -/ +@[expose] public section + open scoped Computability namespace Computability diff --git a/LeanPool/Computability/Oracle.lean b/LeanPool/Computability/Oracle.lean index 01667ef747..4b1cdbcf40 100644 --- a/LeanPool/Computability/Oracle.lean +++ b/LeanPool/Computability/Oracle.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Tanner Duve, Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tanner Duve, Elan Roth -/ -import Mathlib.Computability.Partrec -import Mathlib.Order.Antisymmetrization -import Mathlib.Logic.Encodable.Basic -import Mathlib.Tactic.Cases +module + +public import Mathlib.Computability.Partrec /-! # Oracle Computability @@ -39,6 +38,8 @@ the inductive structure of `Nat.Partrec`. Computability, Oracle, Recursion, Primitive Recursion -/ +@[expose] public section + open Primrec Nat.Partrec Part Encodable namespace Computability diff --git a/LeanPool/Computability/TuringDegree.lean b/LeanPool/Computability/TuringDegree.lean index b304529858..e9605431da 100644 --- a/LeanPool/Computability/TuringDegree.lean +++ b/LeanPool/Computability/TuringDegree.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Tanner Duve, Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tanner Duve, Elan Roth -/ -import LeanPool.Computability.Oracle -import Mathlib.Tactic.Cases -import Mathlib.Tactic.NormNum -import Aesop -import Mathlib.Computability.Halting +module + +public import LeanPool.Computability.Oracle +public meta import Mathlib.Tactic.ToAdditive +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Turing Reducibility and Turing Degrees @@ -44,6 +48,8 @@ Turing reducibility. This gives a concrete representation of degrees as equivale Computability, Turing Degrees, Reducibility, Equivalence Relation -/ +@[expose] public section + namespace Computability @@ -126,11 +132,14 @@ Turing degrees are the equivalence classes of partial functions under Turing equ abbrev TuringDegree := Antisymmetrization _ TuringReducible -private instance : Preorder (ℕ →. ℕ) where +/-- The preorder on partial functions induced by Turing reducibility. -/ +@[instance_reducible] def turingPreorder : Preorder (ℕ →. ℕ) where le := TuringReducible le_refl := .refl le_trans _ _ _ := TuringReducible.trans +attribute [local instance] turingPreorder + instance TuringDegree.instPartialOrder : PartialOrder TuringDegree := instPartialOrderAntisymmetrization diff --git a/LeanPool/ComputableReal.lean b/LeanPool/ComputableReal.lean index 94c3aa76f3..e3bc4559cc 100644 --- a/LeanPool/ComputableReal.lean +++ b/LeanPool/ComputableReal.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import LeanPool.ComputableReal.ComputableRSeq -import LeanPool.ComputableReal.ComputableReal -import LeanPool.ComputableReal.IsComputable -import LeanPool.ComputableReal.IsComputableC -import LeanPool.ComputableReal.SpecialFunctions +public import LeanPool.ComputableReal.ComputableRSeq +public import LeanPool.ComputableReal.ComputableReal +public import LeanPool.ComputableReal.IsComputable +public import LeanPool.ComputableReal.IsComputableC +public import LeanPool.ComputableReal.SpecialFunctions +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.Tactic.Positivity.Finset /-! # Verified interval-Cauchy real arithmetic @@ -21,6 +24,8 @@ Tags: interval-arithmetic, real-numbers, cauchy-sequences, special-functions MSC: 65G40, 68V20 -/ +@[expose] public section + /-! A framework for verified interval-Cauchy real arithmetic, after Russell O'Connor, *Certified exact transcendental real number computation in Coq*, TPHOLs 2008 diff --git a/LeanPool/ComputableReal/AuxLemmas.lean b/LeanPool/ComputableReal/AuxLemmas.lean index 637446edf7..79aedc41fa 100644 --- a/LeanPool/ComputableReal/AuxLemmas.lean +++ b/LeanPool/ComputableReal/AuxLemmas.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module + +public import Mathlib.Basic.Real.Basic import Mathlib.Algebra.Order.Archimedean.Real.Basic /-! @@ -12,6 +15,8 @@ Small helper lemmas about `CauSeq` suprema/infima and about Cauchy sequences converging to a real number, used in the construction of computable reals. -/ +@[expose] public section + theorem abs_ite_le [AddCommGroup α] [LinearOrder α] [IsOrderedAddMonoid α] (x : α) : abs x = if 0 ≤ x then x else -x := by split_ifs <;> simp_all only [abs_eq_self, not_le, abs_eq_neg_self, le_of_lt] diff --git a/LeanPool/ComputableReal/ComputableRSeq.lean b/LeanPool/ComputableReal/ComputableRSeq.lean index 67d656d62d..636d183526 100644 --- a/LeanPool/ComputableReal/ComputableRSeq.lean +++ b/LeanPool/ComputableReal/ComputableRSeq.lean @@ -3,12 +3,20 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ -import Mathlib.Algebra.Order.Interval.Basic -import Mathlib.Algebra.Order.Archimedean.Real.Basic -import Mathlib.Basic.Sign.Defs -import Mathlib.Tactic.Rify +module + +public import Mathlib.Algebra.Order.Archimedean.Real.Basic + +public import Mathlib.Data.Rat.Cast.Order + +public import Mathlib.Algebra.Order.Archimedean.Basic -import LeanPool.ComputableReal.AuxLemmas +public import Mathlib.Algebra.Order.Interval.Basic +public import Mathlib.Basic.Sign.Defs + +public import LeanPool.ComputableReal.AuxLemmas +public import Mathlib.Tactic.Ring.RingNF +import Mathlib.Tactic.Rify /-! # Interval-Cauchy real sequences @@ -27,6 +35,8 @@ sense. Addition, negation, and multiplication are executable interval arithmetic classically and is `noncomputable`. -/ +@[expose] public section + namespace QInterval /-- Notation `ℚInterval` for a nonempty rational interval. -/ @@ -64,34 +74,36 @@ scoped instance instHMulQIntervalQ : HMul (ℚInterval) ℚ (ℚInterval) := scoped instance instHDivQIntervalQ : HDiv (ℚInterval) ℚ (ℚInterval) := ⟨fun x y ↦ x * y⁻¹⟩ -section slow -theorem mulPair_lb_is_lb {x y : ℚInterval} : ∀ xv ∈ x, ∀ yv ∈ y, - (mulPair x y).fst ≤ xv * yv := by - intro xv ⟨hxl,hxu⟩ yv ⟨hyl,hyu⟩ +private theorem multiplication_bounds {a x b : ℝ} (c : ℝ) (hax : a ≤ x) (hxb : x ≤ b) : + min (a * c) (b * c) ≤ x * c ∧ x * c ≤ max (a * c) (b * c) := by + rcases le_total 0 c with hc | hc + · exact ⟨(min_le_left _ _).trans (mul_le_mul_of_nonneg_right hax hc), + (mul_le_mul_of_nonneg_right hxb hc).trans (le_max_right _ _)⟩ + · exact ⟨(min_le_right _ _).trans (mul_le_mul_of_nonpos_right hxb hc), + (mul_le_mul_of_nonpos_right hax hc).trans (le_max_left _ _)⟩ + +private theorem mulPair_bounds {x y : ℚInterval} {xv yv : ℝ} (hx : xv ∈ x) (hy : yv ∈ y) : + (mulPair x y).fst ≤ xv * yv ∧ xv * yv ≤ (mulPair x y).snd := by + obtain ⟨hxl, hxu⟩ := hx + obtain ⟨hyl, hyu⟩ := hy + have hl := multiplication_bounds (x.fst : ℝ) hyl hyu + have hu := multiplication_bounds (x.snd : ℝ) hyl hyu + have h := multiplication_bounds yv hxl hxu dsimp [mulPair] push_cast - rcases le_or_gt xv 0 with hxn|hxp - all_goals rcases le_or_gt (y.fst:ℝ) 0 with hyln|hylp - all_goals rcases le_or_gt (y.snd:ℝ) 0 with hyun|hyup - all_goals try linarith - all_goals repeat rw [min_def] - all_goals split_ifs with h₁ h₂ h₃ h₃ h₂ h₃ h₃ - all_goals try nlinarith + rw [min_min_min_comm, max_max_max_comm] + simp only [mul_comm] at hl hu h ⊢ + exact ⟨(min_le_min hl.1 hu.1).trans h.1, h.2.trans (max_le_max hl.2 hu.2)⟩ + +theorem mulPair_lb_is_lb {x y : ℚInterval} : ∀ xv ∈ x, ∀ yv ∈ y, + (mulPair x y).fst ≤ xv * yv := by + intro xv hx yv hy + exact (mulPair_bounds hx hy).1 theorem mulPair_ub_is_ub {x y : ℚInterval} : ∀ xv ∈ x, ∀ yv ∈ y, (mulPair x y).snd ≥ xv * yv := by - intro xv ⟨hxl,hxu⟩ yv ⟨hyl,hyu⟩ - dsimp [mulPair] - push_cast - rcases le_or_gt xv 0 with hxn|hxp - all_goals rcases le_or_gt (y.1.1:ℝ) 0 with hyln|hylp - all_goals rcases le_or_gt (y.1.2:ℝ) 0 with hyun|hyup - all_goals try linarith - all_goals repeat rw [max_def] - all_goals split_ifs with h₁ h₂ h₃ h₃ h₂ h₃ h₃ - all_goals try nlinarith - -end slow + intro xv hx yv hy + exact (mulPair_bounds hx hy).2 theorem mem_mulPair {x y : ℚInterval} : ∀ xv ∈ x, ∀ yv ∈ y, xv * yv ∈ mulPair x y := fun _ hx _ hy ↦ ⟨mulPair_lb_is_lb _ hx _ hy, mulPair_ub_is_ub _ hx _ hy⟩ @@ -292,20 +304,17 @@ theorem mul'_snd_iscau : IsCauSeq abs ((fun i ↦ i.snd) ∘ (mul' x y)) := theorem lb_ub_mul_equiv (x : ComputableℝSeq) (y : ComputableℝSeq) : mulLb x y ≈ mulUb x y := by - have : x.lb ≈ x.lb := by rfl - have : x.ub ≈ x.ub := by rfl - have : y.lb ≈ y.lb := by rfl - have : y.ub ≈ y.ub := by rfl - have := x.heq - have := Setoid.symm x.heq - have := y.heq - have := Setoid.symm y.heq - dsimp [mulLb, mulUb] - apply CauSeq.inf_equiv_of_equivs - <;> apply CauSeq.inf_equiv_of_equivs - <;> apply CauSeq.equiv_sup_of_equivs - <;> apply CauSeq.equiv_sup_of_equivs - <;> exact CauSeq.mul_equiv_mul ‹_› ‹_› + have hll : x.lb * y.lb ≈ x.lb * y.lb := Setoid.refl _ + have hul := CauSeq.mul_equiv_mul (Setoid.symm x.heq) (Setoid.refl y.lb) + have hlu := CauSeq.mul_equiv_mul (Setoid.refl x.lb) (Setoid.symm y.heq) + have huu := CauSeq.mul_equiv_mul (Setoid.symm x.heq) (Setoid.symm y.heq) + have hl : mulLb x y ≈ x.lb * y.lb := + CauSeq.inf_equiv_of_equivs (CauSeq.inf_equiv_of_equivs hll hul) + (CauSeq.inf_equiv_of_equivs hlu huu) + have hu : mulUb x y ≈ x.lb * y.lb := + CauSeq.sup_equiv_of_equivs (CauSeq.sup_equiv_of_equivs hll hul) + (CauSeq.sup_equiv_of_equivs hlu huu) + exact Setoid.trans hl (Setoid.symm hu) theorem mulLb_is_lb (x : ComputableℝSeq) (y : ComputableℝSeq) (n : ℕ) : (mulLb x y).1 n ≤ x.val * y.val := diff --git a/LeanPool/ComputableReal/ComputableReal.lean b/LeanPool/ComputableReal/ComputableReal.lean index c11d44e972..29c37b01c6 100644 --- a/LeanPool/ComputableReal/ComputableReal.lean +++ b/LeanPool/ComputableReal/ComputableReal.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ -import LeanPool.ComputableReal.ComputableRSeq +module + +public import LeanPool.ComputableReal.ComputableRSeq +import Mathlib.Algebra.Order.Archimedean.Real.Basic /-! # The quotient field of interval-Cauchy sequences @@ -15,6 +18,8 @@ arithmetic; inversion and the comparison `Decidable` instances go through the classical `ComputableℝSeq.sign` and are `noncomputable`. -/ +@[expose] public section + /-- Computable reals, defined as the quotient of ComputableℝSeq sequences -- sequences with Cauchy sequences of lower and upper bounds that converge to the same value -- by the equivalence relation of having the same converged value. This is similar to how reals are quotients of Cauchy @@ -194,7 +199,8 @@ theorem val_nsmul (x : Computableℝ) (n : ℕ) : (n • x).val = n • x.val := section safeInv -private def nz_quot_equiv := Equiv.subtypeQuotientEquivQuotientSubtype +/-- Identify nonzero computable reals with the quotient of their nonzero representatives. -/ +def nzQuotEquiv := Equiv.subtypeQuotientEquivQuotientSubtype (fun x : ComputableℝSeq ↦ x.val ≠ 0) (fun x : Computableℝ ↦ x ≠ 0) (fun _ ↦ ⟨ @@ -208,10 +214,10 @@ private def nz_quot_equiv := Equiv.subtypeQuotientEquivQuotientSubtype /-- Auxiliary inverse definition that operates on the nonzero Computableℝ values. -/ noncomputable def safeInv' : { x : Computableℝ // x ≠ 0 } → { x : Computableℝ // x ≠ 0 } := - fun v ↦ nz_quot_equiv.invFun <| Quotient.map _ fun x y h₁ ↦ by + fun v ↦ nzQuotEquiv.invFun <| Quotient.map ComputableℝSeq.invNz fun x y h₁ ↦ by change (ComputableℝSeq.invNz x).val.val = (ComputableℝSeq.invNz y).val.val rw [ComputableℝSeq.val_invNz x, ComputableℝSeq.val_invNz y, h₁] - (nz_quot_equiv.toFun v) + (nzQuotEquiv.toFun v) /-- Inverse of a nonzero Computableℝ, safe (terminating) as long as x is nonzero. -/ noncomputable irreducible_def safeInv (hnz : x ≠ 0) : Computableℝ := safeInv' ⟨x, hnz⟩ @@ -220,7 +226,7 @@ noncomputable irreducible_def safeInv (hnz : x ≠ 0) : Computableℝ := safeInv theorem safeInv_val (hnz : x ≠ 0) : (x.safeInv hnz).val = x.val⁻¹ := by let ⟨x',hx'⟩ := Quotient.exists_rep x subst hx' - have : (nz_quot_equiv { val := ⟦x'⟧, property := hnz : { x : Computableℝ // x ≠ 0 } }) = + have : (nzQuotEquiv { val := ⟦x'⟧, property := hnz : { x : Computableℝ // x ≠ 0 } }) = ⟦{ val := x', property := (by rw [show (0 : Computableℝ) = ⟦0⟧ by rfl] at hnz contrapose! hnz @@ -228,7 +234,7 @@ theorem safeInv_val (hnz : x ≠ 0) : (x.safeInv hnz).val = x.val⁻¹ := by )}⟧ := by apply Equiv.subtypeQuotientEquivQuotientSubtype_mk rw [safeInv, safeInv', val, Equiv.toFun_as_coe, Equiv.invFun_as_coe, Quotient.lift_mk, this, - Quotient.map_mk, nz_quot_equiv, Equiv.subtypeQuotientEquivQuotientSubtype_symm_mk, + Quotient.map_mk, nzQuotEquiv, Equiv.subtypeQuotientEquivQuotientSubtype_symm_mk, Quotient.lift_mk, ComputableℝSeq.val_invNz] end safeInv diff --git a/LeanPool/ComputableReal/IsComputable.lean b/LeanPool/ComputableReal/IsComputable.lean index 72a07f087c..5351689826 100644 --- a/LeanPool/ComputableReal/IsComputable.lean +++ b/LeanPool/ComputableReal/IsComputable.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ -import LeanPool.ComputableReal.ComputableReal -import Mathlib.Analysis.RCLike.Basic -import Mathlib.Tactic.Peel +module + +public import Mathlib.Data.String.Defs + +public import LeanPool.ComputableReal.ComputableReal +public import Mathlib.Algebra.Algebra.Rat +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +meta import Lean.Meta.Tactic.NormCast +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! # The `IsComputable` typeclass @@ -20,6 +29,8 @@ rather than recursive data, this is not computability in the computable-analysis comparison instances below are classical (`noncomputable`, via sign information on the limit). -/ +@[expose] public section + /-- Type class stating that `x : ℝ` carries a `ComputableℝSeq`: an explicit sequence of rational interval approximations converging to `x`. Like `Decidable`, it carries data with it, and classically every real number admits such a sequence; its value lies in the explicit diff --git a/LeanPool/ComputableReal/IsComputableC.lean b/LeanPool/ComputableReal/IsComputableC.lean index e1ddeddf0a..54d026229b 100644 --- a/LeanPool/ComputableReal/IsComputableC.lean +++ b/LeanPool/ComputableReal/IsComputableC.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ -import LeanPool.ComputableReal.IsComputable -import LeanPool.ComputableReal.SpecialFunctions.Sqrt -import Mathlib.Analysis.InnerProductSpace.Basic +module + +public import LeanPool.ComputableReal.SpecialFunctions.Sqrt +public import Mathlib.Analysis.InnerProductSpace.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Interval approximations for complex numbers @@ -17,6 +19,8 @@ instances; like their real counterparts, these comparison instances are classica `noncomputable`. -/ +@[expose] public section + /-- Type class stating that `x : ℂ` has a `ComputableℝSeq` for its real and imaginary parts. Note that we can't define this as `IsComputable x.re` + `IsComputable x.im`, because then (if `x` is a noncomputable expression) this will be a noncomputable expression. -/ @@ -158,7 +162,8 @@ noncomputable instance instComputableInner : IsComputable (inner ℝ x y) := (inferInstanceAs (IsComputable (Complex.re (y * conj x)))) noncomputable instance instComputableNorm : IsComputable ‖x‖ := - inferInstanceAs (IsComputable (√(Complex.normSq x))) + IsComputable.liftEq RCLike.sqrt_normSq_eq_norm + (inferInstanceAs (IsComputable (√(Complex.normSq x)))) noncomputable instance instComputableNNNorm : IsComputable ‖x‖₊ := instComputableNorm x diff --git a/LeanPool/ComputableReal/SpecialFunctions.lean b/LeanPool/ComputableReal/SpecialFunctions.lean index deb91d3da4..92d1e68b89 100644 --- a/LeanPool/ComputableReal/SpecialFunctions.lean +++ b/LeanPool/ComputableReal/SpecialFunctions.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ -import LeanPool.ComputableReal.SpecialFunctions.Basic -import LeanPool.ComputableReal.SpecialFunctions.Sqrt -import LeanPool.ComputableReal.SpecialFunctions.Pi -import LeanPool.ComputableReal.SpecialFunctions.Exp +module + +public import LeanPool.ComputableReal.SpecialFunctions.Basic +public import LeanPool.ComputableReal.SpecialFunctions.Sqrt +public import LeanPool.ComputableReal.SpecialFunctions.Pi +public import LeanPool.ComputableReal.SpecialFunctions.Exp +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.Tactic.Positivity.Finset diff --git a/LeanPool/ComputableReal/SpecialFunctions/Basic.lean b/LeanPool/ComputableReal/SpecialFunctions/Basic.lean index 1c6244331f..db3ea945ca 100644 --- a/LeanPool/ComputableReal/SpecialFunctions/Basic.lean +++ b/LeanPool/ComputableReal/SpecialFunctions/Basic.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ -import LeanPool.ComputableReal.IsComputable -import Mathlib.Basic.Real.Sign -import Mathlib.Basic.Real.ConjExponents +module + +public import LeanPool.ComputableReal.IsComputable +public import Mathlib.Basic.Real.Sign +public import Mathlib.Basic.Real.ConjExponents +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Tactic.ContinuousFunctionalCalculus + /-! # `IsComputable` instances for basic real operations @@ -15,6 +22,8 @@ under the basic operations on real numbers. The instances that branch on a compa (`Real.sign`, `max`, `min`, `abs`) inherit its classical sign test and are `noncomputable`. -/ +@[expose] public section + namespace IsComputable instance instComputableOfScientific (m : ℕ) (b : Bool) (e : ℕ) : @@ -49,11 +58,11 @@ noncomputable instance instComputableSign (x : ℝ) [hx : IsComputable x] : IsCo --with this implementation. noncomputable instance instComputableMax (x y : ℝ) [hx : IsComputable x] [hy : IsComputable y] : IsComputable (max x y) := - liftEq (x := ite (x ≤ y) ..) (by rw [max_def]; congr) inferInstance + liftEq (x := ite (x ≤ y) y x) (by rw [max_def]; congr) inferInstance noncomputable instance instComputableMin (x y : ℝ) [hx : IsComputable x] [hy : IsComputable y] : IsComputable (min x y) := - liftEq (x := ite (x ≤ y) ..) (by rw [min_def]; congr) inferInstance + liftEq (x := ite (x ≤ y) x y) (by rw [min_def]; congr) inferInstance --This ends up calling the same sequence twice (which leads to an exponential --slowdown when many nested `abs` are present); would be good to write one that diff --git a/LeanPool/ComputableReal/SpecialFunctions/Exp.lean b/LeanPool/ComputableReal/SpecialFunctions/Exp.lean index 04ba7d41a7..3d1d323d4e 100644 --- a/LeanPool/ComputableReal/SpecialFunctions/Exp.lean +++ b/LeanPool/ComputableReal/SpecialFunctions/Exp.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ -import LeanPool.ComputableReal.IsComputable -import Mathlib.Analysis.Complex.Exponential -import Mathlib.Analysis.SpecialFunctions.Exp -import Mathlib.Analysis.SpecialFunctions.Pow.Real +module + +public import LeanPool.ComputableReal.IsComputable +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.Rify /-! # Verified rational bounds for the exponential @@ -18,6 +19,8 @@ functions are executable; the packaged sequence mentions `Real.exp` itself as it value, so `exp` and the instances are `noncomputable` Lean terms. -/ +@[expose] public section + namespace ComputableℝSeq namespace Exp diff --git a/LeanPool/ComputableReal/SpecialFunctions/Pi.lean b/LeanPool/ComputableReal/SpecialFunctions/Pi.lean index 630ca195e6..93266adb21 100644 --- a/LeanPool/ComputableReal/SpecialFunctions/Pi.lean +++ b/LeanPool/ComputableReal/SpecialFunctions/Pi.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ -import LeanPool.ComputableReal.SpecialFunctions.Sqrt +module + +public import LeanPool.ComputableReal.SpecialFunctions.Sqrt +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Analysis.Real.Pi.Bounds -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.Rify /-! # Verified rational bounds for pi @@ -17,6 +21,8 @@ go through the `noncomputable` square-root sequences, so `Pi` and the derived bounds `piLb`/`piUb` are `noncomputable` Lean terms. -/ +@[expose] public section + open scoped QInterval namespace ComputableℝSeq diff --git a/LeanPool/ComputableReal/SpecialFunctions/Sqrt.lean b/LeanPool/ComputableReal/SpecialFunctions/Sqrt.lean index a562bdc44c..3b0ac057cc 100644 --- a/LeanPool/ComputableReal/SpecialFunctions/Sqrt.lean +++ b/LeanPool/ComputableReal/SpecialFunctions/Sqrt.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ -import LeanPool.ComputableReal.IsComputable -import Mathlib.Analysis.Real.Sqrt -import Mathlib.Analysis.SpecialFunctions.Log.Base -import Mathlib.NumberTheory.Real.GoldenRatio +module + +public import LeanPool.ComputableReal.IsComputable +public import Mathlib.NumberTheory.Real.GoldenRatio +public import Mathlib.Tactic.Bound +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Int.Log +import Mathlib.Tactic.Rify /-! # Verified rational bounds for square roots @@ -18,6 +22,8 @@ functions are executable; the packaged sequence mentions `Real.sqrt` itself as i value, so `sqrt` and the instances are `noncomputable` Lean terms. -/ +@[expose] public section + namespace ComputableℝSeq open scoped QInterval diff --git a/LeanPool/ConnesKreimer.lean b/LeanPool/ConnesKreimer.lean index 11b898daa6..516d2ab695 100644 --- a/LeanPool/ConnesKreimer.lean +++ b/LeanPool/ConnesKreimer.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Carles Marín. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Carles Marín -/ +module -import LeanPool.ConnesKreimer.Coassoc -import LeanPool.ConnesKreimer.Core -import LeanPool.ConnesKreimer.PowerSeriesLogMul +public import LeanPool.ConnesKreimer.Coassoc +public import LeanPool.ConnesKreimer.Core +public import LeanPool.ConnesKreimer.PowerSeriesLogMul /-! # Connes-Kreimer Hopf algebra of rooted trees @@ -19,6 +20,8 @@ Tags: hopf-algebras, rooted-trees, renormalization, combinatorics MSC: 16T05, 05C05, 81T15 -/ +@[expose] public section + /-! Top-level import for the Connes-Kreimer / Foissy Hopf algebra development. diff --git a/LeanPool/ConnesKreimer/Coassoc.lean b/LeanPool/ConnesKreimer/Coassoc.lean index 96b2ae43ba..302e140dad 100644 --- a/LeanPool/ConnesKreimer/Coassoc.lean +++ b/LeanPool/ConnesKreimer/Coassoc.lean @@ -9,6 +9,9 @@ Authors: Carles Marín The element of H⊗H is a formal sum = `List (Forest × Forest)`; equality of formal sums = `List.Perm` (multiset equality). Empirically (probe 2026-06-18) coassoc holds up to Perm, not literal list equality. WIP, LOCAL only. -/ +module + +@[expose] public section namespace CK.Coassoc diff --git a/LeanPool/ConnesKreimer/Core.lean b/LeanPool/ConnesKreimer/Core.lean index 86ca7757a2..a4babcd3b0 100644 --- a/LeanPool/ConnesKreimer/Core.lean +++ b/LeanPool/ConnesKreimer/Core.lean @@ -3,21 +3,20 @@ Copyright (c) 2026 Carles Marín. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Carles Marín -/ +module +public import Mathlib.Algebra.RingQuot +public import Mathlib.RingTheory.HopfAlgebra.Basic +public import Mathlib.RingTheory.PowerSeries.Log import LeanPool.ConnesKreimer.PowerSeriesLogMul -import Mathlib.Algebra.FreeMonoid.Basic -import Mathlib.Algebra.MonoidAlgebra.Basic -import Mathlib.Algebra.RingQuot -import Mathlib.RingTheory.HopfAlgebra.Basic import Mathlib.RingTheory.HopfAlgebra.Convolution -import Mathlib.Tactic.Abel -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring /-! Connes–Kreimer / Foissy (planar, R1) coproduct as a genuine Mathlib `Coalgebra` instance. Combinatorial core (List.Perm) proven below verbatim from `Coassoc.lean`; the Mathlib bridge lifts it to equality of linear maps. LOCAL — not part of the published godsil tree. -/ +@[expose] public section + open scoped TensorProduct namespace CK diff --git a/LeanPool/ConnesKreimer/PowerSeriesLogMul.lean b/LeanPool/ConnesKreimer/PowerSeriesLogMul.lean index b37f0f0765..858a70b119 100644 --- a/LeanPool/ConnesKreimer/PowerSeriesLogMul.lean +++ b/LeanPool/ConnesKreimer/PowerSeriesLogMul.lean @@ -3,11 +3,9 @@ Copyright (c) 2026 Carles Marín. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Carles Marín -/ +module -import Mathlib.RingTheory.PowerSeries.Log -import Mathlib.RingTheory.PowerSeries.Derivative -import Mathlib.RingTheory.PowerSeries.Exp -import Mathlib.RingTheory.PowerSeries.Inverse +public import Mathlib.RingTheory.PowerSeries.Log /-! # Power-series logarithm lemmas @@ -16,6 +14,8 @@ This module proves the power-series logarithm additivity and coefficient identit transport the Connes-Kreimer Eulerian idempotent calculation to convolution algebras. -/ +@[expose] public section + namespace PowerSeries variable {A : Type*} [CommRing A] [Algebra ℚ A] diff --git a/LeanPool/ConnesRigidity.lean b/LeanPool/ConnesRigidity.lean index e4a3b33a48..bbb832ad31 100644 --- a/LeanPool/ConnesRigidity.lean +++ b/LeanPool/ConnesRigidity.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ +module -import LeanPool.ConnesRigidity.Main +public import LeanPool.ConnesRigidity.Main +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Conditional formalization of Zhou's Connes-rigidity counterexample @@ -16,3 +20,5 @@ Main declarations: `Connes.theoremA` Tags: operator-algebras, von-neumann-algebras, property-t, group-theory, connes-rigidity MSC: 46L10, 20F65, 22D10 -/ + +@[expose] public section diff --git a/LeanPool/ConnesRigidity/Construction.lean b/LeanPool/ConnesRigidity/Construction.lean index 287a1c73ad..2930a3e3af 100644 --- a/LeanPool/ConnesRigidity/Construction.lean +++ b/LeanPool/ConnesRigidity/Construction.lean @@ -5,11 +5,13 @@ Authors: Utensil Song -/ /- -/ +module + +public import Mathlib.GroupTheory.SemidirectProduct +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.SpecialLinear.Basic +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4Basic import Mathlib.FieldTheory.Finite.Basic -import Mathlib.GroupTheory.SemidirectProduct import Mathlib.SetTheory.Cardinal.Free -import LeanPool.ConnesRigidity.Foundation.GroupTheory.SpecialLinear.Basic -import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4Basic /-! Zhou's construction of the two groups in §2. The concrete tensor kernel, @@ -18,6 +20,8 @@ This file contains no declaration block recorded as a code transfer; its public code dependencies are attributed in their defining modules. -/ +@[expose] public section + namespace Connes namespace Construction diff --git a/LeanPool/ConnesRigidity/Construction/PaperActionInstances.lean b/LeanPool/ConnesRigidity/Construction/PaperActionInstances.lean index bb7a420a1f..9ab05182e7 100644 --- a/LeanPool/ConnesRigidity/Construction/PaperActionInstances.lean +++ b/LeanPool/ConnesRigidity/Construction/PaperActionInstances.lean @@ -7,12 +7,18 @@ Authors: Utensil Song Concrete Zhou action instances on the paper kernel. Paper: §§2--4. -/ +module + +public import LeanPool.ConnesRigidity.Construction.PaperActions import LeanPool.ConnesRigidity.Construction.SquareSpan +import Mathlib.Algebra.Algebra.ZMod /-! The paper action instances component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace Construction namespace PaperKernel diff --git a/LeanPool/ConnesRigidity/Construction/PaperActions.lean b/LeanPool/ConnesRigidity/Construction/PaperActions.lean index ee85e64d81..9cde66b1b2 100644 --- a/LeanPool/ConnesRigidity/Construction/PaperActions.lean +++ b/LeanPool/ConnesRigidity/Construction/PaperActions.lean @@ -8,13 +8,17 @@ Authors: Utensil Song SL₃ action interfaces for the Zhou tensor carrier. Paper: §2. The file keeps the linear action and quadratic Sp₄ correction as separate reusable layers. -/ -import LeanPool.ConnesRigidity.Construction -import LeanPool.ConnesRigidity.Foundation.LinearAlgebra.QuadraticCocycle +module + +public import LeanPool.ConnesRigidity.Construction +public import LeanPool.ConnesRigidity.Foundation.LinearAlgebra.QuadraticCocycle /-! The paper actions component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace Construction namespace PaperKernel diff --git a/LeanPool/ConnesRigidity/Construction/SquareSpan.lean b/LeanPool/ConnesRigidity/Construction/SquareSpan.lean index fc4fe59c98..6e76b41dac 100644 --- a/LeanPool/ConnesRigidity/Construction/SquareSpan.lean +++ b/LeanPool/ConnesRigidity/Construction/SquareSpan.lean @@ -7,14 +7,18 @@ Authors: Utensil Song Concrete coefficient proof for the Zhou square-span boundary. Paper: §2. -/ +module + +public import Mathlib.Algebra.Polynomial.Basis +public import LeanPool.ConnesRigidity.Construction.PaperActions import Mathlib.Algebra.Algebra.ZMod -import Mathlib.Algebra.Polynomial.Basis -import LeanPool.ConnesRigidity.Construction.PaperActions /-! The square span component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace Construction namespace PaperKernel @@ -94,7 +98,8 @@ theorem pair_mem_squareSpan (i j : OrderedBasisIndex) : Submodule.subset_span ⟨orderedBasis j, rfl⟩ have A_add_self (x : A) : x + x = 0 := by ext n m - exact CharTwo.add_self_eq_zero ((x n).coeff m) + simpa only [Pi.add_apply, Pi.zero_apply, Polynomial.coeff_add, Polynomial.coeff_zero] using + CharTwo.add_self_eq_zero ((x n).coeff m) have tensor_add_self (x : TensorAA) : x + x = 0 := by refine TensorProduct.inductionOn x ?_ ?_ · intro x y diff --git a/LeanPool/ConnesRigidity/Core.lean b/LeanPool/ConnesRigidity/Core.lean index 3c3dbb6b53..bfe6d61d95 100644 --- a/LeanPool/ConnesRigidity/Core.lean +++ b/LeanPool/ConnesRigidity/Core.lean @@ -11,17 +11,20 @@ Modifications: extracted the minimal group, representation, regular-factor, and tracial-equivalence vocabulary; changed namespace and narrowed the interface to arXiv:2608.02327. See the upstream PORT_MAP.md. -/ -import Mathlib.Analysis.CStarAlgebra.ContinuousLinearMap -import Mathlib.Analysis.CStarAlgebra.Module.Constructions -import Mathlib.Analysis.InnerProductSpace.Positive -import Mathlib.Analysis.InnerProductSpace.l2Space -import Mathlib.Analysis.VonNeumannAlgebra.Basic -import Mathlib.Dynamics.Flow +module + +public import Mathlib.Analysis.CStarAlgebra.ContinuousLinearMap +public import Mathlib.Analysis.CStarAlgebra.Module.Constructions +public import Mathlib.Analysis.InnerProductSpace.Positive +public import Mathlib.Analysis.InnerProductSpace.l2Space +public import Mathlib.Analysis.VonNeumannAlgebra.Basic /-! The core component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes universe u v w diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4Basic.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4Basic.lean index bde7d0d819..5ed423a43a 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4Basic.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4Basic.lean @@ -8,9 +8,12 @@ Authors: Utensil Song Conceptual finite proofs for the natural Sp₄(F₂) action in Zhou §§2 and 6. Mathlib supplies the symplectic-matrix carrier and its standard module action. -/ -import Mathlib.Algebra.CharP.Pi -import Mathlib.Algebra.Field.ZMod +module + +public import Mathlib.Algebra.Field.ZMod +public import LeanPool.ConnesRigidity.Foundation.LinearAlgebra.ArithmeticSymplectic import LeanPool.ConnesRigidity.Foundation.LinearAlgebra.QuadraticCocycle +import Mathlib.Algebra.CharP.Pi /-! # The natural `Sp₄(𝔽₂)` action @@ -20,6 +23,8 @@ transitively on nonzero vectors. It realizes the action with symplectic transvections and keeps the exhaustive normal-subgroup certificate separate. -/ +@[expose] public section + namespace Connes namespace Sp4 @@ -28,11 +33,14 @@ abbrev F := ZMod 2 /-- Symplectic group carrier. Paper: §§2, 6. -/ abbrev Group := Matrix.symplecticGroup (Fin 2) F -private abbrev Matrix4 := Matrix (Fin 2 ⊕ Fin 2) (Fin 2 ⊕ Fin 2) F +/-- Four-by-four matrices with the symplectic block indexing. -/ +abbrev Matrix4 := Matrix (Fin 2 ⊕ Fin 2) (Fin 2 ⊕ Fin 2) F -private def allMatrices : Finset Matrix4 := Finset.univ +/-- The finite set of all four-by-four matrices over the coefficient field. -/ +def allMatrices : Finset Matrix4 := Finset.univ -private def symplecticMatrices : Finset Matrix4 := +/-- Matrices preserving the standard symplectic form. -/ +def symplecticMatrices : Finset Matrix4 := allMatrices.filter (fun A => A * Matrix.J (Fin 2) F * A.transpose = Matrix.J (Fin 2) F) diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificate.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificate.lean index 2efea211dc..a86a5f49a0 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificate.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificate.lean @@ -9,6 +9,9 @@ Kernel-checked finite certificate for the Sp₄(F₂) normal-subgroup argument i Zhou §6. The exhaustive Boolean matrix search is isolated here from the conceptual action and transvection lemmas. -/ +module + +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4Basic import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelCertificateShard0 import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelCertificateShard1 import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelCertificateShard2 @@ -17,6 +20,8 @@ import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelCertificateShard4 import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelCertificateShard5 import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelCertificateShard6 import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelCertificateShard7 +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Kernel-checked `Sp₄(𝔽₂)` normal-subgroup certificate @@ -25,6 +30,8 @@ The 65,536 Boolean matrices are checked in independent shards so Lake can compile the certificate in parallel. The public theorem is unchanged. -/ +@[expose] public section + namespace Connes namespace Sp4 diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard0.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard0.lean index b8bd2154f0..70b7c70ae3 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard0.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard0.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +module + +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Positivity.Finset /-! Kernel-checked shard 1 of 8 for the exhaustive Sp₄(𝔽₂) detector. -/ +@[expose] public section + namespace Connes namespace Sp4 @@ -16,25 +22,25 @@ namespace Sp4 theorem kernelDetectorBlock0 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 0 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 1 (with indices 0 through 31). -/ theorem kernelDetectorBlock1 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 1 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 2 (with indices 0 through 31). -/ theorem kernelDetectorBlock2 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 2 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 3 (with indices 0 through 31). -/ theorem kernelDetectorBlock3 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 3 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel end Sp4 end Connes diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard1.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard1.lean index c07b622502..807d5e3435 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard1.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard1.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +module + +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Positivity.Finset /-! Kernel-checked shard 2 of 8 for the exhaustive Sp₄(𝔽₂) detector. -/ +@[expose] public section + namespace Connes namespace Sp4 @@ -16,25 +22,25 @@ namespace Sp4 theorem kernelDetectorBlock4 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 4 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 5 (with indices 0 through 31). -/ theorem kernelDetectorBlock5 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 5 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 6 (with indices 0 through 31). -/ theorem kernelDetectorBlock6 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 6 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 7 (with indices 0 through 31). -/ theorem kernelDetectorBlock7 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 7 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel end Sp4 end Connes diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard2.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard2.lean index 257023825d..e7cd5c408e 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard2.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard2.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +module + +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Positivity.Finset /-! Kernel-checked shard 3 of 8 for the exhaustive Sp₄(𝔽₂) detector. -/ +@[expose] public section + namespace Connes namespace Sp4 @@ -16,25 +22,25 @@ namespace Sp4 theorem kernelDetectorBlock8 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 8 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 9 (with indices 0 through 31). -/ theorem kernelDetectorBlock9 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 9 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 10 (with indices 0 through 31). -/ theorem kernelDetectorBlock10 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 10 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 11 (with indices 0 through 31). -/ theorem kernelDetectorBlock11 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 11 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel end Sp4 end Connes diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard3.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard3.lean index 5825fd4764..c654d24925 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard3.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard3.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +module + +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Positivity.Finset /-! Kernel-checked shard 4 of 8 for the exhaustive Sp₄(𝔽₂) detector. -/ +@[expose] public section + namespace Connes namespace Sp4 @@ -16,25 +22,25 @@ namespace Sp4 theorem kernelDetectorBlock12 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 12 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 13 (with indices 0 through 31). -/ theorem kernelDetectorBlock13 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 13 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 14 (with indices 0 through 31). -/ theorem kernelDetectorBlock14 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 14 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 15 (with indices 0 through 31). -/ theorem kernelDetectorBlock15 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 15 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel end Sp4 end Connes diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard4.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard4.lean index 122fa9b939..2826c6c864 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard4.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard4.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +module + +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Positivity.Finset /-! Kernel-checked shard 5 of 8 for the exhaustive Sp₄(𝔽₂) detector. -/ +@[expose] public section + namespace Connes namespace Sp4 @@ -16,25 +22,25 @@ namespace Sp4 theorem kernelDetectorBlock16 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 16 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 17 (with indices 0 through 31). -/ theorem kernelDetectorBlock17 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 17 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 18 (with indices 0 through 31). -/ theorem kernelDetectorBlock18 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 18 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 19 (with indices 0 through 31). -/ theorem kernelDetectorBlock19 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 19 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel end Sp4 end Connes diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard5.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard5.lean index c3f0ac946c..d7a75d6929 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard5.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard5.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +module + +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Positivity.Finset /-! Kernel-checked shard 6 of 8 for the exhaustive Sp₄(𝔽₂) detector. -/ +@[expose] public section + namespace Connes namespace Sp4 @@ -16,25 +22,25 @@ namespace Sp4 theorem kernelDetectorBlock20 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 20 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 21 (with indices 0 through 31). -/ theorem kernelDetectorBlock21 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 21 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 22 (with indices 0 through 31). -/ theorem kernelDetectorBlock22 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 22 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 23 (with indices 0 through 31). -/ theorem kernelDetectorBlock23 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 23 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel end Sp4 end Connes diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard6.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard6.lean index 3d8e2cee2a..a9d0afe174 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard6.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard6.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +module + +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Positivity.Finset /-! Kernel-checked shard 7 of 8 for the exhaustive Sp₄(𝔽₂) detector. -/ +@[expose] public section + namespace Connes namespace Sp4 @@ -16,25 +22,25 @@ namespace Sp4 theorem kernelDetectorBlock24 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 24 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 25 (with indices 0 through 31). -/ theorem kernelDetectorBlock25 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 25 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 26 (with indices 0 through 31). -/ theorem kernelDetectorBlock26 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 26 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 27 (with indices 0 through 31). -/ theorem kernelDetectorBlock27 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 27 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel end Sp4 end Connes diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard7.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard7.lean index 25efd1326a..d9410ebadd 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard7.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelCertificateShard7.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +module + +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelDetector +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Positivity.Finset /-! Kernel-checked shard 8 of 8 for the exhaustive Sp₄(𝔽₂) detector. -/ +@[expose] public section + namespace Connes namespace Sp4 @@ -16,25 +22,25 @@ namespace Sp4 theorem kernelDetectorBlock28 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 28 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 29 (with indices 0 through 31). -/ theorem kernelDetectorBlock29 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 29 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 30 (with indices 0 through 31). -/ theorem kernelDetectorBlock30 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 30 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel /-- The detector succeeds on 16-bit matrix block 31 (with indices 0 through 31). -/ theorem kernelDetectorBlock31 : ∀ high : Fin 8, ∀ middle low : Fin 16, kernelDetectorCheck (BitVec.ofNat 16 (2048 * 31 + 256 * high.val + 16 * middle.val + low.val)) = true := by - decide + decide +kernel end Sp4 end Connes diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelDetector.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelDetector.lean index 5bcb4e9d22..71809f64d6 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelDetector.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/Sp4KernelDetector.lean @@ -9,7 +9,11 @@ Kernel-checked finite certificate for the Sp₄(F₂) normal-subgroup argument i Zhou §6. The exhaustive Boolean matrix search is isolated here from the conceptual action and transvection lemmas. -/ -import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4Basic +module + +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4Basic +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Kernel-checked `Sp₄(𝔽₂)` normal-subgroup certificate @@ -20,22 +24,29 @@ search is split into kernel-checked chunks and decoded back to Mathlib's symplectic-matrix carrier for the public theorem used in Zhou §6. -/ +@[expose] public section + namespace Connes namespace Sp4 -private abbrev Matrix4 := Matrix (Fin 2 ⊕ Fin 2) (Fin 2 ⊕ Fin 2) F -private abbrev BVMatrix := BitVec 16 -private abbrev BMatrix := Fin 4 → Fin 4 → Bool +/-- A four-by-four Boolean matrix packed into sixteen bits. -/ +abbrev BVMatrix := BitVec 16 +/-- A four-by-four matrix with Boolean entries. -/ +abbrev BMatrix := Fin 4 → Fin 4 → Bool -private def bvEntry (x : BVMatrix) : BMatrix := fun i j => +/-- Decode a packed matrix in row-major order. -/ +def bvEntry (x : BVMatrix) : BMatrix := fun i j => x.getLsbD (4 * i.val + j.val) -private def boolDot (a b : BMatrix) (i j : Fin 4) : Bool := +/-- The row-column dot product over the field with two elements. -/ +def boolDot (a b : BMatrix) (i j : Fin 4) : Bool := (a i 0 && b 0 j) ^^ (a i 1 && b 1 j) ^^ (a i 2 && b 2 j) ^^ (a i 3 && b 3 j) -private def boolMul (a b : BMatrix) : BMatrix := boolDot a b -private def boolTranspose (a : BMatrix) : BMatrix := fun i j => a j i +/-- Multiply Boolean matrices over the field with two elements. -/ +def boolMul (a b : BMatrix) : BMatrix := boolDot a b +/-- Transpose a Boolean matrix. -/ +def boolTranspose (a : BMatrix) : BMatrix := fun i j => a j i private def boolMatrixEq (a b : BMatrix) : Prop := a 0 0 = b 0 0 ∧ a 0 1 = b 0 1 ∧ a 0 2 = b 0 2 ∧ a 0 3 = b 0 3 ∧ @@ -43,7 +54,8 @@ private def boolMatrixEq (a b : BMatrix) : Prop := a 2 0 = b 2 0 ∧ a 2 1 = b 2 1 ∧ a 2 2 = b 2 2 ∧ a 2 3 = b 2 3 ∧ a 3 0 = b 3 0 ∧ a 3 1 = b 3 1 ∧ a 3 2 = b 3 2 ∧ a 3 3 = b 3 3 -private def boolMatrixEqB (a b : BMatrix) : Bool := +/-- Decide entrywise equality of Boolean matrices. -/ +def boolMatrixEqB (a b : BMatrix) : Bool := (a 0 0 == b 0 0) && (a 0 1 == b 0 1) && (a 0 2 == b 0 2) && (a 0 3 == b 0 3) && (a 1 0 == b 1 0) && (a 1 1 == b 1 1) && @@ -58,27 +70,62 @@ private theorem boolMatrixEqB_eq_true_iff (a b : BMatrix) : simp only [boolMatrixEqB, Bool.and_eq_true, beq_iff_eq, boolMatrixEq] tauto -private def boolOne : BMatrix := bvEntry (BitVec.ofNat 16 0x8421) -private def boolJ : BMatrix := bvEntry (BitVec.ofNat 16 0x2184) -private def boolG1 : BMatrix := bvEntry (BitVec.ofNat 16 0x13DB) -private def boolG1Inv : BMatrix := bvEntry (BitVec.ofNat 16 0x5FC8) -private def boolG2 : BMatrix := bvEntry (BitVec.ofNat 16 0x21B7) -private def boolG2Inv : BMatrix := bvEntry (BitVec.ofNat 16 0xED84) +/-- The identity matrix in the Boolean representation. -/ +def boolOne : BMatrix := bvEntry (BitVec.ofNat 16 0x8421) +/-- The standard symplectic form in the Boolean representation. -/ +def boolJ : BMatrix := bvEntry (BitVec.ofNat 16 0x2184) +/-- The first chosen symplectic generator in the Boolean representation. -/ +def boolG1 : BMatrix := bvEntry (BitVec.ofNat 16 0x13DB) +/-- The inverse of the first chosen symplectic generator. -/ +def boolG1Inv : BMatrix := bvEntry (BitVec.ofNat 16 0x5FC8) +/-- The second chosen symplectic generator in the Boolean representation. -/ +def boolG2 : BMatrix := bvEntry (BitVec.ofNat 16 0x21B7) +/-- The inverse of the second chosen symplectic generator. -/ +def boolG2Inv : BMatrix := bvEntry (BitVec.ofNat 16 0xED84) private def boolSymplectic (x : BMatrix) : Prop := boolMatrixEq (boolMul (boolMul x boolJ) (boolTranspose x)) boolJ -private def boolConj (g gi x : BMatrix) : BMatrix := boolMul (boolMul g x) gi +/-- Conjugate a Boolean matrix using a supplied matrix and its inverse. -/ +def boolConj (g gi x : BMatrix) : BMatrix := boolMul (boolMul g x) gi private def boolCommutes (a b : BMatrix) : Prop := boolMatrixEq (boolMul a b) (boolMul b a) -private def boolCommutesB (a b : BMatrix) : Bool := +/-- Decide whether two Boolean matrices commute. -/ +def boolCommutesB (a b : BMatrix) : Bool := boolMatrixEqB (boolMul a b) (boolMul b a) +/-- The standard alternating pairing of Boolean four-vectors. -/ +def boolPairing (a b : Fin 4 → Bool) : Bool := + (a 2 && b 0) ^^ (a 3 && b 1) ^^ (a 0 && b 2) ^^ (a 1 && b 3) + +private theorem boolPairing_comm (a b : Fin 4 → Bool) : boolPairing a b = boolPairing b a := by + simp only [boolPairing, Bool.and_comm, Bool.xor_assoc, Bool.xor_left_comm, Bool.xor_comm] + +private theorem boolPairing_self (a : Fin 4 → Bool) : boolPairing a a = false := by + simp [boolPairing, Bool.and_comm, Bool.xor_left_comm] + +private theorem boolMul_symplectic_apply (x : BMatrix) (i j : Fin 4) : + boolMul (boolMul x boolJ) (boolTranspose x) i j = boolPairing (x i) (x j) := by + simp [boolMul, boolDot, boolTranspose, boolJ, bvEntry, boolPairing] + +/-- Check preservation of the symplectic form using its six independent row pairings. -/ +def boolSymplecticB (x : BMatrix) : Bool := + -- The unit pairings reject zero rows before checking orthogonality. + boolPairing (x 0) (x 2) && boolPairing (x 1) (x 3) && + !(boolPairing (x 0) (x 1)) && !(boolPairing (x 0) (x 3)) && + !(boolPairing (x 1) (x 2)) && !(boolPairing (x 2) (x 3)) + +/-- The six-pairing test agrees with the full symplectic matrix equation. -/ +theorem boolSymplecticB_eq (x : BMatrix) : + boolSymplecticB x = boolMatrixEqB (boolMul (boolMul x boolJ) (boolTranspose x)) boolJ := by + simp only [boolMatrixEqB, boolMul_symplectic_apply, boolPairing_self] + simp [boolJ, bvEntry, boolSymplecticB, boolPairing_comm, Bool.and_assoc, + Bool.and_left_comm, Bool.and_comm] + /-- Boolean certificate predicate used by the kernel-checked finite search. -/ def kernelDetectorCheck (x : BitVec 16) : Bool := - !(boolMatrixEqB (boolMul (boolMul (bvEntry x) boolJ) - (boolTranspose (bvEntry x))) boolJ) || + !(boolSymplecticB (bvEntry x)) || boolMatrixEqB (bvEntry x) boolOne || !(boolCommutesB (boolConj boolG1 boolG1Inv (bvEntry x)) (bvEntry x)) || !(boolCommutesB (boolConj boolG2 boolG2Inv (bvEntry x)) (bvEntry x)) @@ -92,10 +139,9 @@ private theorem boolean_detector_cover ¬boolCommutes (boolConj boolG2 boolG2Inv (bvEntry x)) (bvEntry x) := by intro x hs hn have hc := hcertificate x - have hsB : - boolMatrixEqB (boolMul (boolMul (bvEntry x) boolJ) - (boolTranspose (bvEntry x))) boolJ = true := - (boolMatrixEqB_eq_true_iff _ _).2 hs + have hsB : boolSymplecticB (bvEntry x) = true := by + rw [boolSymplecticB_eq] + exact (boolMatrixEqB_eq_true_iff _ _).2 hs have hnB : boolMatrixEqB (bvEntry x) boolOne = false := by cases h : boolMatrixEqB (bvEntry x) boolOne · rfl diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/SpecialLinear/Basic.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/SpecialLinear/Basic.lean index 85d499f8b7..d0c08e862c 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/SpecialLinear/Basic.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/SpecialLinear/Basic.lean @@ -5,14 +5,18 @@ Authors: Utensil Song -/ /- -/ -import Mathlib.Algebra.Field.ZMod +module + +public import Mathlib.Algebra.Field.ZMod +public import LeanPool.ConnesRigidity.Core import Mathlib.Data.Finsupp.Encodable -import LeanPool.ConnesRigidity.Core /-! # The special-linear carrier in Zhou's construction -/ +@[expose] public section + namespace Connes namespace SpecialLinear diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/SpecialLinear/ElementaryGeneration.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/SpecialLinear/ElementaryGeneration.lean index 5e80c0608f..3563cfde65 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/SpecialLinear/ElementaryGeneration.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/SpecialLinear/ElementaryGeneration.lean @@ -10,13 +10,17 @@ Derived in part from Apache-2.0 `openai/ten-proofs`, `ConnesRigidity.lean` at Modifications: extracted the binary-polynomial row-reduction proof and adapted the index model, namespaces, and Mathlib APIs. See the upstream PORT_MAP.md. -/ +module + +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.SpecialLinear.Basic import Mathlib.FieldTheory.Finite.Basic -import LeanPool.ConnesRigidity.Foundation.GroupTheory.SpecialLinear.Basic /-! # Elementary generation for Zhou §4 -/ +@[expose] public section + namespace Connes namespace SpecialLinear diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/SpecialLinear/ICC.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/SpecialLinear/ICC.lean index 51d752dc05..c74fa3280c 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/SpecialLinear/ICC.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/SpecialLinear/ICC.lean @@ -10,12 +10,16 @@ Derived in part from Apache-2.0 `openai/ten-proofs`, `ConnesRigidity.lean` at Modifications: extracted the generic transvection conjugacy lemmas and specialized the later ICC endpoint locally. See the upstream PORT_MAP.md. -/ -import LeanPool.ConnesRigidity.Foundation.GroupTheory.SpecialLinear.Basic +module + +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.SpecialLinear.Basic /-! # Special-linear conjugacy and ICC for Zhou §5 -/ +@[expose] public section + namespace Connes namespace SpecialLinear diff --git a/LeanPool/ConnesRigidity/Foundation/GroupTheory/SplitAbelianExtension.lean b/LeanPool/ConnesRigidity/Foundation/GroupTheory/SplitAbelianExtension.lean index 7ba10c01e9..1e46a55b4a 100644 --- a/LeanPool/ConnesRigidity/Foundation/GroupTheory/SplitAbelianExtension.lean +++ b/LeanPool/ConnesRigidity/Foundation/GroupTheory/SplitAbelianExtension.lean @@ -11,12 +11,16 @@ Modifications: extracted the generic extension interface and invariant-vector calculation and split later spectral declarations into separate files. See the upstream PORT_MAP.md. -/ -import LeanPool.ConnesRigidity.Core +module + +public import LeanPool.ConnesRigidity.Core /-! The split abelian extension component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes universe u v diff --git a/LeanPool/ConnesRigidity/Foundation/LinearAlgebra/ArithmeticSymplectic.lean b/LeanPool/ConnesRigidity/Foundation/LinearAlgebra/ArithmeticSymplectic.lean index 6f1044d396..e487aad486 100644 --- a/LeanPool/ConnesRigidity/Foundation/LinearAlgebra/ArithmeticSymplectic.lean +++ b/LeanPool/ConnesRigidity/Foundation/LinearAlgebra/ArithmeticSymplectic.lean @@ -11,14 +11,16 @@ Derived in part from Apache-2.0 `deancureton/ten-proofs`, Modifications: isolated the arithmetic carriers, narrowed imports, and changed the namespace for the Zhou §2 and §5 interfaces. See the upstream PORT_MAP.md. -/ -import Mathlib.Data.ZMod.Basic -import Mathlib.LinearAlgebra.Matrix.Integer -import Mathlib.LinearAlgebra.SymplecticGroup +module + +public import Mathlib.LinearAlgebra.SymplecticGroup /-! The arithmetic symplectic component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace OpenAIPort diff --git a/LeanPool/ConnesRigidity/Foundation/LinearAlgebra/BooleanPolynomial.lean b/LeanPool/ConnesRigidity/Foundation/LinearAlgebra/BooleanPolynomial.lean index 8e8e6b4b1c..e551592cde 100644 --- a/LeanPool/ConnesRigidity/Foundation/LinearAlgebra/BooleanPolynomial.lean +++ b/LeanPool/ConnesRigidity/Foundation/LinearAlgebra/BooleanPolynomial.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Utensil Song, OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song, OpenAI -/ -import Mathlib.Algebra.Field.ZMod +module + +public import Mathlib.Algebra.Field.ZMod import Mathlib.Algebra.Module.Pi import Mathlib.Algebra.Order.Ring.Star import Mathlib.Tactic.Abel @@ -18,6 +20,8 @@ local Boolean-polynomial namespace. The remaining finite-coordinate support and weight development is local. See the upstream PORT_MAP.md. -/ +@[expose] public section + namespace Connes namespace BooleanPolynomial diff --git a/LeanPool/ConnesRigidity/Foundation/LinearAlgebra/QuadraticCocycle.lean b/LeanPool/ConnesRigidity/Foundation/LinearAlgebra/QuadraticCocycle.lean index 2d7bf6bc6c..2b76f7f7e3 100644 --- a/LeanPool/ConnesRigidity/Foundation/LinearAlgebra/QuadraticCocycle.lean +++ b/LeanPool/ConnesRigidity/Foundation/LinearAlgebra/QuadraticCocycle.lean @@ -11,13 +11,17 @@ Derived in part from Apache-2.0 `deancureton/ten-proofs`, Modifications: isolated the finite and integral cocycle calculations, narrowed imports, and changed the namespace. See the upstream PORT_MAP.md. -/ -import LeanPool.ConnesRigidity.Foundation.LinearAlgebra.ArithmeticSymplectic -import Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree +module + +public import LeanPool.ConnesRigidity.Foundation.LinearAlgebra.ArithmeticSymplectic +public import Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree /-! The quadratic cocycle component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace OpenAIPort diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/BinaryPontryaginDual.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/BinaryPontryaginDual.lean index 7237c8547a..847aa647a7 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/BinaryPontryaginDual.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/BinaryPontryaginDual.lean @@ -10,15 +10,19 @@ Derived in part from Apache-2.0 `openai/ten-proofs`, `ConnesRigidity.lean` at Modifications: extracted the binary character-coordinate layer and changed carrier names and namespace for Zhou §§3-4. See the upstream PORT_MAP.md. -/ +module + +public import Mathlib.Analysis.SpecialFunctions.Complex.CircleAddChar +public import Mathlib.Topology.Algebra.PontryaginDual +public import Mathlib.Topology.Instances.ZMod import Mathlib.Algebra.Module.StablyFree.Basic -import Mathlib.Analysis.SpecialFunctions.Complex.CircleAddChar -import Mathlib.Topology.Algebra.PontryaginDual -import Mathlib.Topology.Instances.ZMod /-! The binary pontryagin dual component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace BinaryPontryaginDual diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/CrossedProduct.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/CrossedProduct.lean index 6249b87d1b..e62fdb79ef 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/CrossedProduct.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/CrossedProduct.lean @@ -11,14 +11,18 @@ Modifications: extracted the generic crossed-product Hilbert model, removed paper-specific instances, and changed local vocabulary. Paper: §3. See the upstream PORT_MAP.md. -/ -import Mathlib.MeasureTheory.Function.Holder -import Mathlib.MeasureTheory.Function.L2Space -import LeanPool.ConnesRigidity.Core +module + +public import Mathlib.MeasureTheory.Function.Holder +public import Mathlib.MeasureTheory.Function.L2Space +public import LeanPool.ConnesRigidity.Core /-! The crossed product component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace CrossedProduct diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/CrossedProductFactorTransport.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/CrossedProductFactorTransport.lean index 9bf102675a..be2a01656e 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/CrossedProductFactorTransport.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/CrossedProductFactorTransport.lean @@ -11,7 +11,9 @@ Modifications: split crossed-product transport into a reusable module, added continuous-coefficient closure and nonadditive homeomorphic transport, and changed imports and namespace. Paper: §3. See the upstream PORT_MAP.md. -/ -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.CrossedProductTransport +module + +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.CrossedProductTransport import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.SemidirectClosure /-! @@ -25,6 +27,8 @@ measure-preserving homeomorphism transports that closure. The homeomorphism is not required to preserve the addition on either compact group. -/ +@[expose] public section + namespace Connes namespace CrossedProduct @@ -177,7 +181,8 @@ local instance haarProbabilityTarget (Y : HaarProbabilityAction K Ξ) : IsProbabilityMeasure Y.measure := Y.probability -private def crossedFiberwiseOperatorContinuousLinearMap +/-- Apply a bounded operator to each fibre of a square-summable family. -/ +def crossedFiberwiseOperatorContinuousLinearMap {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] : (E →L[ℂ] E) →L[ℂ] (lp (fun _ : K ↦ E) 2 →L[ℂ] lp (fun _ : K ↦ E) 2) := by diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/CrossedProductTransport.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/CrossedProductTransport.lean index 88fc582530..ebaa6be6d1 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/CrossedProductTransport.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/CrossedProductTransport.lean @@ -10,12 +10,16 @@ Derived in part from Apache-2.0 `openai/ten-proofs`, `ConnesRigidity.lean` at Modifications: split generic Haar transport into its own module and changed imports and namespace. Paper: §3. See the upstream PORT_MAP.md. -/ -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.CrossedProduct +module + +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.CrossedProduct /-! The crossed product transport component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace CrossedProduct diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/FactorWitness.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/FactorWitness.lean index 9e41da0f46..a83ef1df2b 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/FactorWitness.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/FactorWitness.lean @@ -10,12 +10,18 @@ Derived in part from Apache-2.0 `openai/ten-proofs`, `ConnesRigidity.lean` at Modifications: renamed and generalized the spatial witness while preserving the spatial-to-tracial argument. Paper: §3. See the upstream PORT_MAP.md. -/ -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.Projection.Supremum +module + +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.Projection.Supremum + +public import LeanPool.ConnesRigidity.Core /-! The factor witness component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace FactorWitness diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/FiniteIndex.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/FiniteIndex.lean index 7517991caa..24d218519f 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/FiniteIndex.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/FiniteIndex.lean @@ -10,12 +10,16 @@ Derived in part from Apache-2.0 `openai/ten-proofs`, `ConnesRigidity.lean` at Modifications: extracted finite-index induction into a small namespace and adapted imports and local group vocabulary. See the upstream PORT_MAP.md. -/ -import LeanPool.ConnesRigidity.Core +module + +public import LeanPool.ConnesRigidity.Core /-! The finite index component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace OpenAIPort diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/FinitePropertyT.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/FinitePropertyT.lean index 081fb9a7ec..a8f09aaaf7 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/FinitePropertyT.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/FinitePropertyT.lean @@ -9,13 +9,17 @@ Finite-group Property-(T) lemmas for the Zhou §4 transfer chain. This is a local proof of the finite quotient step and does not supply Zhou's spectral or EJZK input. -/ -import LeanPool.ConnesRigidity.Core -import Mathlib.RepresentationTheory.Invariants +module + +public import LeanPool.ConnesRigidity.Core +public import Mathlib.RepresentationTheory.Invariants /-! The finite property t component of the Connes rigidity formalization. -/ +@[expose] public section + open scoped BigOperators namespace Connes diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/NormalFixed.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/NormalFixed.lean index 3959b11076..da438e8874 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/NormalFixed.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/NormalFixed.lean @@ -10,12 +10,16 @@ Derived in part from Apache-2.0 `openai/ten-proofs`, `ConnesRigidity.lean` at Modifications: extracted the normal-fixed and orthogonal representations and changed carrier names and namespace for Zhou §4. See the upstream PORT_MAP.md. -/ -import LeanPool.ConnesRigidity.Core +module + +public import LeanPool.ConnesRigidity.Core /-! The normal fixed component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes universe u v diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/NormalizedHaar.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/NormalizedHaar.lean index e4910bd89c..fd62676776 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/NormalizedHaar.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/NormalizedHaar.lean @@ -11,12 +11,16 @@ Modifications: generalized the compact additive Haar lemmas from the paper carriers to arbitrary compact groups and updated simplification proofs. Paper: §3. See the upstream PORT_MAP.md. -/ -import Mathlib.MeasureTheory.Measure.Haar.Basic +module + +public import Mathlib.MeasureTheory.Measure.Haar.Basic /-! The normalized haar component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace NormalizedHaar diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/PositiveSpectralMeasure.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/PositiveSpectralMeasure.lean index 0b1c46caa2..aadf06da5c 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/PositiveSpectralMeasure.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/PositiveSpectralMeasure.lean @@ -21,18 +21,23 @@ energy guards to their first consumer, and added the later Zhou-specific extensions in this file. See the upstream PORT_MAP.md. -/ +module + +public import Mathlib.MeasureTheory.Integral.RieszMarkovKakutani.Real +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.Projection.ValuedSpectralMeasure +public import Mathlib.Analysis.CStarAlgebra.GelfandDuality import Mathlib.Analysis.CStarAlgebra.PositiveLinearMap import Mathlib.Analysis.InnerProductSpace.StarOrder import Mathlib.Analysis.Normed.Operator.ContinuousAlgEquiv -import Mathlib.MeasureTheory.Integral.RieszMarkovKakutani.Real import Mathlib.Order.CompletePartialOrder import Mathlib.Topology.Order.Hom.Esakia -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.Projection.ValuedSpectralMeasure /-! The positive spectral measure component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes noncomputable diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/Projection/Supremum.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/Projection/Supremum.lean index 19ea992dd1..4505ce3ff2 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/Projection/Supremum.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/Projection/Supremum.lean @@ -12,9 +12,11 @@ witness, replaced the local multiplication relation by inherited operator order, and separated the abstract specification from its concrete proof. Paper: §3. See the upstream PORT_MAP.md. -/ +module + +public import LeanPool.ConnesRigidity.Core import Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Order import Mathlib.Analysis.InnerProductSpace.StarOrder -import LeanPool.ConnesRigidity.Core /-! # Projection-supremum transport @@ -25,6 +27,8 @@ star-algebra equivalences. It supplies the normality witness consumed by the spatial factor equivalence in Zhou §3. -/ +@[expose] public section + namespace Connes noncomputable section diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/Projection/ValuedSpectralMeasure.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/Projection/ValuedSpectralMeasure.lean index 5297e7d2b3..13ee069271 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/Projection/ValuedSpectralMeasure.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/Projection/ValuedSpectralMeasure.lean @@ -11,13 +11,17 @@ Modifications: extracted the projection-valued spectral interface and positive-atom argument, adapted namespace and local spectral interfaces, and added the later quotient-approximation bridge. Paper: §4. See the upstream PORT_MAP.md. -/ -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.SpectralCriterion -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.NormalFixed +module + +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.SpectralCriterion +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.NormalFixed /-! The valued spectral measure component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes noncomputable section diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/PropertyTTransfer.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/PropertyTTransfer.lean index dd141746dc..e48d94b78e 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/PropertyTTransfer.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/PropertyTTransfer.lean @@ -10,15 +10,18 @@ data records the subgroup, normality, finite index, and the two quotient identifications used in Proposition 4.8. It does not encode the conclusion as an implication field. -/ -import LeanPool.ConnesRigidity.Core +module + +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.FiniteIndex +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.NormalFixed import LeanPool.ConnesRigidity.Porting.CoreTransfer -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.FiniteIndex -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.NormalFixed /-! The property t transfer component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes universe u v diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SemidirectClosure.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SemidirectClosure.lean index b380669e41..d87c2b349f 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SemidirectClosure.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SemidirectClosure.lean @@ -10,13 +10,17 @@ Derived in part from Apache-2.0 `openai/ten-proofs`, `ConnesRigidity.lean` at Modifications: extracted the double-centralizer generator reduction, added a local conjugacy helper, and changed namespace. Paper: §3. See the upstream PORT_MAP.md. -/ -import Mathlib.GroupTheory.SemidirectProduct -import LeanPool.ConnesRigidity.Core +module + +public import Mathlib.GroupTheory.SemidirectProduct +public import LeanPool.ConnesRigidity.Core /-! The semidirect closure component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes noncomputable section diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SemidirectFubini.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SemidirectFubini.lean index ed35e12909..8a9f76c747 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SemidirectFubini.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SemidirectFubini.lean @@ -10,14 +10,19 @@ Derived in part from Apache-2.0 `openai/ten-proofs`, `ConnesRigidity.lean` at Modifications: extracted the semidirect-product coordinate unitary and changed imports and namespace. Paper: §3. See the upstream PORT_MAP.md. -/ -import Mathlib.GroupTheory.SemidirectProduct -import Mathlib.Topology.Separation.CompletelyRegular +module + +public import Mathlib.GroupTheory.SemidirectProduct +public import LeanPool.ConnesRigidity.Core import LeanPool.ConnesRigidity.Porting.CoreTransfer +import Mathlib.Topology.Separation.CompletelyRegular /-! The semidirect fubini component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace SemidirectFubini @@ -29,7 +34,8 @@ universe u v /- The curry map is the discrete ℓ² Fubini equivalence used for the fibres. Paper: §3. -/ -private def l2CurryFiber {ι : Type u} {κ : Type v} +/-- Restrict a square-summable family on a product to one fibre. -/ +def l2CurryFiber {ι : Type u} {κ : Type v} (ξ : GroupL2 (ι × κ)) (i : ι) : GroupL2 κ := ⟨fun k => ξ (i, k), by change Memℓp (fun k => ξ (i, k)) 2 @@ -78,8 +84,8 @@ The `l2Curry` construction used in the Connes rigidity formalization. def l2Curry (ι : Type u) (κ : Type v) : GroupL2 (ι × κ) ≃ₗᵢ[ℂ] lp (fun _ : ι => GroupL2 κ) 2 where toLinearEquiv := - { toFun := fun ξ => ⟨fun i => l2CurryFiber ξ i, l2Curry_mem ξ⟩ - invFun := fun ξ => ⟨fun p => ξ p.1 p.2, l2Uncurry_mem ξ⟩ + { toFun := fun ξ => ⟨fun i => l2CurryFiber ξ i, by exact l2Curry_mem ξ⟩ + invFun := fun ξ => ⟨fun p => ξ p.1 p.2, by exact l2Uncurry_mem ξ⟩ left_inv := by intro ξ ext p diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SemidirectGeneratorTransport.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SemidirectGeneratorTransport.lean index 729643160e..e0d33e39f0 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SemidirectGeneratorTransport.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SemidirectGeneratorTransport.lean @@ -10,12 +10,18 @@ crossed-product construction is reduced to the kernel, quotient, and vacuum transport equations used by the regular factor. Paper: §3. -/ +module + +public import LeanPool.ConnesRigidity.Core +public import Mathlib.GroupTheory.SemidirectProduct import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.SemidirectClosure /-! The semidirect generator transport component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace SemidirectGeneratorTransport diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SpectralCriterion.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SpectralCriterion.lean index 67dafce7dc..825cdef388 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SpectralCriterion.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SpectralCriterion.lean @@ -12,15 +12,19 @@ Modifications: extracted the generic measure-to-invariant-vector spine and made the Zhou detector and spectral construction explicit inputs; moved the dual-action and energy guards to their first consumers. See the upstream PORT_MAP.md. -/ -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.Topology.Algebra.PontryaginDual -import Mathlib.Topology.ContinuousMap.CompactlySupported -import LeanPool.ConnesRigidity.Foundation.GroupTheory.SplitAbelianExtension +module + +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import Mathlib.Topology.Algebra.PontryaginDual +public import Mathlib.Topology.ContinuousMap.CompactlySupported +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.SplitAbelianExtension /-! The spectral criterion component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes noncomputable section diff --git a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SpectralDetection.lean b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SpectralDetection.lean index 473108e403..5ea859d08e 100644 --- a/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SpectralDetection.lean +++ b/LeanPool/ConnesRigidity/Foundation/OperatorAlgebra/SpectralDetection.lean @@ -10,14 +10,18 @@ Derived in part from Apache-2.0 `openai/ten-proofs`, `ConnesRigidity.lean` at Modifications: extracted the measure-counting lemmas and made the paper-specific exhaustion an input. See the upstream PORT_MAP.md. -/ +module + +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import Mathlib.Order.CompletePartialOrder import Mathlib.Algebra.Order.Ring.Star -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.Order.CompletePartialOrder /-! The spectral detection component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes noncomputable section diff --git a/LeanPool/ConnesRigidity/Main.lean b/LeanPool/ConnesRigidity/Main.lean index 3d46044d4b..a185bb0aa9 100644 --- a/LeanPool/ConnesRigidity/Main.lean +++ b/LeanPool/ConnesRigidity/Main.lean @@ -5,13 +5,20 @@ Authors: Utensil Song -/ /- -/ -import LeanPool.ConnesRigidity.Core -import LeanPool.ConnesRigidity.Paper.Section7 +module + +public import LeanPool.ConnesRigidity.Paper.Section4.PropertyT +import LeanPool.ConnesRigidity.Paper.Section7.TheoremACompletion +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! Completion boundary for Zhou's Theorem A. -/ +@[expose] public section + namespace Connes universe v diff --git a/LeanPool/ConnesRigidity/Paper/Section3.lean b/LeanPool/ConnesRigidity/Paper/Section3.lean index e20baa1a31..76cbf2cc3b 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3.lean @@ -5,7 +5,9 @@ Authors: Utensil Song -/ /- -/ -import LeanPool.ConnesRigidity.Paper.Section3.FactorClosure +module + +public import LeanPool.ConnesRigidity.Paper.Section3.FactorClosure /-! # Zhou §3: isomorphic group factors @@ -13,3 +15,5 @@ import LeanPool.ConnesRigidity.Paper.Section3.FactorClosure The section endpoint constructs the compact-dual shear, its crossed-product implementation, and the resulting trace-preserving factor equivalence. -/ + +@[expose] public section diff --git a/LeanPool/ConnesRigidity/Paper/Section3/CrossedAction.lean b/LeanPool/ConnesRigidity/Paper/Section3/CrossedAction.lean index 34b44ce97e..7aad1c599d 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/CrossedAction.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/CrossedAction.lean @@ -9,14 +9,17 @@ Concrete Haar-action inputs for Zhou's dual-coordinate crossed products. The topology is the transported compact-dual topology already developed in the paper-facing layer. Paper: §3. -/ -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.CrossedProductFactorTransport -import LeanPool.ConnesRigidity.Paper.Section3.DualAutomorphism -import LeanPool.ConnesRigidity.Paper.Section3.DualShearMeasure +module + +public import LeanPool.ConnesRigidity.Paper.Section3.DualAutomorphism +public import LeanPool.ConnesRigidity.Paper.Section3.DualActions /-! The crossed action component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperCrossedAction @@ -28,7 +31,6 @@ open PaperDualHaar open PaperDualTopology open PaperDualAutomorphism open PaperFactorIsomorphism -open CrossedProduct noncomputable section diff --git a/LeanPool/ConnesRigidity/Paper/Section3/CrossedHaar.lean b/LeanPool/ConnesRigidity/Paper/Section3/CrossedHaar.lean index 5158b6015c..f51020004d 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/CrossedHaar.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/CrossedHaar.lean @@ -8,14 +8,20 @@ Authors: Utensil Song Concrete normalized-Haar actions and the Zhou fiber-shear equivalence for the crossed-product model. Paper: §3. -/ +module + +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.CrossedProductFactorTransport +public import LeanPool.ConnesRigidity.Paper.Section3.DualActions +public import LeanPool.ConnesRigidity.Paper.Section3.DualShearMeasure import LeanPool.ConnesRigidity.Paper.Section3.CrossedAction import LeanPool.ConnesRigidity.Paper.Section3.DualActionConjugacy -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.CrossedProductFactorTransport /-! The crossed haar component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperCrossedHaar diff --git a/LeanPool/ConnesRigidity/Paper/Section3/CrossedKernel.lean b/LeanPool/ConnesRigidity/Paper/Section3/CrossedKernel.lean index 0a9f727c5f..7fb0dd4e94 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/CrossedKernel.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/CrossedKernel.lean @@ -8,13 +8,17 @@ Authors: Utensil Song The proved kernel slice of Zhou's crossed-product model. The discrete kernel Fourier transform is lifted fiberwise over the acting group. Paper: §3. -/ -import LeanPool.ConnesRigidity.Paper.Section3.FourierCoordinates -import LeanPool.ConnesRigidity.Paper.Section3.CrossedHaar +module + +public import LeanPool.ConnesRigidity.Paper.Section3.FourierCoordinates +public import LeanPool.ConnesRigidity.Paper.Section3.CrossedHaar /-! The crossed kernel component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperCrossedKernel diff --git a/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacy.lean b/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacy.lean index c5d4fafa47..e22844e021 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacy.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacy.lean @@ -7,13 +7,23 @@ Authors: Utensil Song The Zhou fiber shear conjugates the two dual actions. Paper: §3. -/ +module + +public import LeanPool.ConnesRigidity.Paper.Section3.DualActionConjugacyAlgebra +public import LeanPool.ConnesRigidity.Paper.Section3.DualActions import LeanPool.ConnesRigidity.Paper.Section3.DualActionConjugacyCoordinates +import LeanPool.ConnesRigidity.Paper.Section3.DualActionConjugacyFirst import LeanPool.ConnesRigidity.Paper.Section3.DualActionConjugacyQuadratic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! The dual action conjugacy component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperDualActionConjugacy diff --git a/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyAlgebra.lean b/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyAlgebra.lean index 4835df0f20..181a3f1a05 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyAlgebra.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyAlgebra.lean @@ -7,18 +7,27 @@ Authors: Utensil Song Algebraic covariance lemmas for Zhou's dual fiber shear. Paper: §3. -/ -import LeanPool.ConnesRigidity.Paper.Section3.DualTopology +module + +public import LeanPool.ConnesRigidity.Construction.PaperActionInstances +public import LeanPool.ConnesRigidity.Paper.Section3.DualCoordinates +import Mathlib.Algebra.Module.StablyFree.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! The dual action conjugacy algebra component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperDualActionConjugacyAlgebra open Construction open Construction.PaperKernel -open PaperDualActions open PaperDualCoordinates open PaperFactorIsomorphism diff --git a/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyCoordinates.lean b/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyCoordinates.lean index 3e581b5575..726fa8fe85 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyCoordinates.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyCoordinates.lean @@ -7,12 +7,22 @@ Authors: Utensil Song Coordinate formulas used by the Zhou fiber-shear conjugacy. Paper: §3. -/ -import LeanPool.ConnesRigidity.Paper.Section3.DualActionConjugacyFirst +module + +public import LeanPool.ConnesRigidity.Paper.Section3.DualActions +import LeanPool.ConnesRigidity.Paper.Section3.DualActionConjugacyAlgebra +import Mathlib.Algebra.Module.StablyFree.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! The dual action conjugacy coordinates component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperDualActionConjugacyCoordinates @@ -22,7 +32,6 @@ open PaperDualActions open PaperDualCoordinates open PaperFactorIsomorphism open PaperDualActionConjugacyAlgebra -open PaperDualActionConjugacyFirst noncomputable section diff --git a/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyFirst.lean b/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyFirst.lean index eb0658f644..bcac5679b2 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyFirst.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyFirst.lean @@ -7,18 +7,26 @@ Authors: Utensil Song The first-coordinate formula for Zhou's contragredient action. Paper: §3. -/ -import LeanPool.ConnesRigidity.Paper.Section3.DualActionConjugacyAlgebra +module + +public import LeanPool.ConnesRigidity.Paper.Section3.DualActionConjugacyAlgebra +import Mathlib.Algebra.Module.StablyFree.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! The dual action conjugacy first component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperDualActionConjugacyFirst open Construction open Construction.PaperKernel -open PaperDualActions open PaperDualCoordinates open PaperFactorIsomorphism open PaperDualActionConjugacyAlgebra diff --git a/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyQuadratic.lean b/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyQuadratic.lean index 566ad3446e..253d070d8a 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyQuadratic.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/DualActionConjugacyQuadratic.lean @@ -7,18 +7,25 @@ Authors: Utensil Song Quadratic covariance on Zhou's symmetric tensor carrier. Paper: §3. -/ -import LeanPool.ConnesRigidity.Paper.Section3.DualActionConjugacyAlgebra +module + +public import LeanPool.ConnesRigidity.Paper.Section3.DualActionConjugacyAlgebra +import LeanPool.ConnesRigidity.Construction.SquareSpan +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! The dual action conjugacy quadratic component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperDualActionConjugacyQuadratic open Construction open Construction.PaperKernel -open PaperDualActions open PaperDualCoordinates open PaperFactorIsomorphism open PaperDualActionConjugacyAlgebra diff --git a/LeanPool/ConnesRigidity/Paper/Section3/DualActions.lean b/LeanPool/ConnesRigidity/Paper/Section3/DualActions.lean index 6cae4fd849..fc560d01a0 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/DualActions.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/DualActions.lean @@ -10,12 +10,20 @@ algebraic action layer behind the Fourier model in §§3--4; analytic measurability is kept in the companion files. Paper: §§3--4. -/ -import LeanPool.ConnesRigidity.Paper.Section3.DualHaar +module + +public import LeanPool.ConnesRigidity.Construction.PaperActionInstances +public import LeanPool.ConnesRigidity.Paper.Section3.DualCoordinates +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! The dual actions component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperDualActions diff --git a/LeanPool/ConnesRigidity/Paper/Section3/DualAutomorphism.lean b/LeanPool/ConnesRigidity/Paper/Section3/DualAutomorphism.lean index 7cd23b005e..54313a0ec3 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/DualAutomorphism.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/DualAutomorphism.lean @@ -5,7 +5,9 @@ Authors: Utensil Song -/ /- -/ -import LeanPool.ConnesRigidity.Paper.Section3.DualTopology +module + +public import LeanPool.ConnesRigidity.Paper.Section3.DualTopology /-! # Dual automorphisms of Zhou's compact kernel @@ -15,6 +17,8 @@ and proves continuity and Haar preservation. It is the common §3 input for the crossed-action conjugacy and the §4 spectral detector. -/ +@[expose] public section + namespace Connes namespace PaperDualAutomorphism diff --git a/LeanPool/ConnesRigidity/Paper/Section3/DualCoordinates.lean b/LeanPool/ConnesRigidity/Paper/Section3/DualCoordinates.lean index 6d77c5470d..e7bafa2c03 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/DualCoordinates.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/DualCoordinates.lean @@ -7,13 +7,17 @@ Authors: Utensil Song Algebraic identification of Zhou's actual dual coordinates. Paper: §3. -/ -import LeanPool.ConnesRigidity.Construction.PaperActionInstances -import LeanPool.ConnesRigidity.Paper.Section3.FactorIsomorphism +module + +public import LeanPool.ConnesRigidity.Paper.Section3.FactorIsomorphism +import Mathlib.Algebra.Algebra.ZMod /-! The dual coordinates component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperDualCoordinates diff --git a/LeanPool/ConnesRigidity/Paper/Section3/DualHaar.lean b/LeanPool/ConnesRigidity/Paper/Section3/DualHaar.lean index d3bec223cb..07e869024a 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/DualHaar.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/DualHaar.lean @@ -8,14 +8,18 @@ Authors: Utensil Song The actual compact dual and normalized Haar measure for Zhou's kernel. Paper: §§3--4. -/ -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.BinaryPontryaginDual -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.NormalizedHaar -import LeanPool.ConnesRigidity.Paper.Section3.DualCoordinates +module + +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.BinaryPontryaginDual +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.NormalizedHaar +public import LeanPool.ConnesRigidity.Paper.Section3.DualCoordinates /-! The dual haar component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperDualHaar diff --git a/LeanPool/ConnesRigidity/Paper/Section3/DualShearMeasure.lean b/LeanPool/ConnesRigidity/Paper/Section3/DualShearMeasure.lean index 6f74e11630..0a6d04697b 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/DualShearMeasure.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/DualShearMeasure.lean @@ -10,12 +10,16 @@ splits the actual compact dual into its two kernel summands, applies the fiber-translation theorem to the product Haar measure, and transports the result back to Zhou's coordinates. Paper: §3. -/ -import LeanPool.ConnesRigidity.Paper.Section3.DualTopology +module + +public import LeanPool.ConnesRigidity.Paper.Section3.DualTopology /-! The dual shear measure component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperDualShearMeasure diff --git a/LeanPool/ConnesRigidity/Paper/Section3/DualTopology.lean b/LeanPool/ConnesRigidity/Paper/Section3/DualTopology.lean index d7e0714ceb..c44bd46fa9 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/DualTopology.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/DualTopology.lean @@ -10,12 +10,16 @@ topology is transported from the actual compact character group, so the coordinate model is not an unrelated product placeholder. Paper: §§3--4. -/ -import LeanPool.ConnesRigidity.Paper.Section3.DualActions +module + +public import LeanPool.ConnesRigidity.Paper.Section3.DualHaar /-! The dual topology component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperDualTopology diff --git a/LeanPool/ConnesRigidity/Paper/Section3/FactorClosure.lean b/LeanPool/ConnesRigidity/Paper/Section3/FactorClosure.lean index 5e55a73cb9..b6796449f8 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/FactorClosure.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/FactorClosure.lean @@ -10,17 +10,22 @@ multipliers generate the continuous-coefficient crossed closure by uniform Stone--Weierstrass density; the fiber shear transports that closure and hence the two regular group factors. -/ -import LeanPool.ConnesRigidity.Paper.Section3.GroupQuotient +module + +public import LeanPool.ConnesRigidity.Paper.Section3.GroupVacuum +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.SemidirectGeneratorTransport +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.FactorWitness +public import Mathlib.Analysis.CStarAlgebra.ContinuousMap import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.SemidirectClosure -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.CrossedProductFactorTransport -import LeanPool.ConnesRigidity.Paper.Section3.GroupVacuum -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.SemidirectGeneratorTransport -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.FactorWitness +import LeanPool.ConnesRigidity.Paper.Section3.GroupQuotient +import Mathlib.Topology.ContinuousMap.StoneWeierstrass /-! The factor closure component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperFactorClosure diff --git a/LeanPool/ConnesRigidity/Paper/Section3/FactorIsomorphism.lean b/LeanPool/ConnesRigidity/Paper/Section3/FactorIsomorphism.lean index 7a538a248d..83c25a7bea 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/FactorIsomorphism.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/FactorIsomorphism.lean @@ -5,18 +5,20 @@ Authors: Utensil Song -/ /- -/ -import LeanPool.ConnesRigidity.Construction.PaperActionInstances +module + +public import LeanPool.ConnesRigidity.Construction /-! Algebraic part of Zhou §3 for the concrete tensor kernel, including the quadratic fiber shear and its characteristic-two involutivity. -/ +@[expose] public section + namespace Connes namespace PaperFactorIsomorphism -open MeasureTheory - noncomputable section /-- diff --git a/LeanPool/ConnesRigidity/Paper/Section3/Fourier.lean b/LeanPool/ConnesRigidity/Paper/Section3/Fourier.lean index 5d80f406d2..ddbaa2acc8 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/Fourier.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/Fourier.lean @@ -10,19 +10,23 @@ proves the compact-dual character basis used by the spatial implementation; the crossed-product generator calculation is kept in the factor layer. Paper: §3. -/ -import Mathlib.Analysis.Fourier.Notation +module + +public import Mathlib.MeasureTheory.Function.L2Space +public import LeanPool.ConnesRigidity.Paper.Section3.DualHaar +import Mathlib.Algebra.Module.StablyFree.Basic import Mathlib.MeasureTheory.Function.ContinuousMapDense -import Mathlib.MeasureTheory.Function.L2Space import Mathlib.MeasureTheory.Group.Integral import Mathlib.RingTheory.PicardGroup -import Mathlib.RingTheory.TotallySplit +import Mathlib.Topology.ContinuousMap.StoneWeierstrass import Mathlib.Topology.Metrizable.Urysohn -import LeanPool.ConnesRigidity.Paper.Section3.DualHaar /-! The fourier component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperFourier diff --git a/LeanPool/ConnesRigidity/Paper/Section3/FourierAction.lean b/LeanPool/ConnesRigidity/Paper/Section3/FourierAction.lean index 5f9bbafdf9..3aa762a0ad 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/FourierAction.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/FourierAction.lean @@ -10,14 +10,18 @@ Derived in part from Apache-2.0 `openai/ten-proofs`, `ConnesRigidity.lean` at Modifications: specialized the generic Fourier conjugacy block to Zhou's kernel and local Fourier unitary. Paper: §3. See the upstream PORT_MAP.md. -/ -import Mathlib.MeasureTheory.Function.Holder +module + +public import Mathlib.MeasureTheory.Function.Holder +public import LeanPool.ConnesRigidity.Paper.Section3.Fourier import LeanPool.ConnesRigidity.Porting.CoreTransfer -import LeanPool.ConnesRigidity.Paper.Section3.Fourier /-! The fourier action component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperFourierAction diff --git a/LeanPool/ConnesRigidity/Paper/Section3/FourierCoordinates.lean b/LeanPool/ConnesRigidity/Paper/Section3/FourierCoordinates.lean index 50ee4360df..84e9a098fe 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/FourierCoordinates.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/FourierCoordinates.lean @@ -8,13 +8,18 @@ Authors: Utensil Song Fourier transport from Zhou's actual compact dual to the raw coordinate Haar model. This is the kernel part of the §3 crossed-product bridge. Paper: §3. -/ -import LeanPool.ConnesRigidity.Paper.Section3.FourierAction +module + +public import LeanPool.ConnesRigidity.Paper.Section3.FourierAction +public import LeanPool.ConnesRigidity.Paper.Section3.DualTopology import LeanPool.ConnesRigidity.Paper.Section3.DualShearMeasure /-! The fourier coordinates component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperFourierCoordinates diff --git a/LeanPool/ConnesRigidity/Paper/Section3/GroupFactor.lean b/LeanPool/ConnesRigidity/Paper/Section3/GroupFactor.lean index 4d5fb82783..3c283afb02 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/GroupFactor.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/GroupFactor.lean @@ -8,14 +8,17 @@ Authors: Utensil Song Concrete Zhou group-factor Hilbert models. The carrier is the semidirect product from §2 and the base is the Fourier crossed-product model from §3. -/ -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.SemidirectFubini -import LeanPool.ConnesRigidity.Paper.Section3.CrossedKernel -import LeanPool.ConnesRigidity.Paper.Section3.QuotientAction +module + +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.SemidirectFubini +public import LeanPool.ConnesRigidity.Paper.Section3.CrossedKernel /-! The group factor component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperGroupFactor diff --git a/LeanPool/ConnesRigidity/Paper/Section3/GroupQuotient.lean b/LeanPool/ConnesRigidity/Paper/Section3/GroupQuotient.lean index 681ed29964..45961424a2 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/GroupQuotient.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/GroupQuotient.lean @@ -8,12 +8,18 @@ Authors: Utensil Song The acting-group generators of the two concrete Zhou crossed-product models. Paper: §3. -/ -import LeanPool.ConnesRigidity.Paper.Section3.GroupFactor +module + +public import LeanPool.ConnesRigidity.Paper.Section3.GroupFactor +import LeanPool.ConnesRigidity.Paper.Section3.QuotientAction +import LeanPool.ConnesRigidity.Porting.CoreTransfer /-! The group quotient component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperGroupQuotient diff --git a/LeanPool/ConnesRigidity/Paper/Section3/GroupVacuum.lean b/LeanPool/ConnesRigidity/Paper/Section3/GroupVacuum.lean index 7d2f3de6f7..080045789e 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/GroupVacuum.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/GroupVacuum.lean @@ -9,12 +9,17 @@ Vacuum transport for the two concrete Zhou group-factor models. The identity fibre is the zero Fourier coefficient, and all other fibres vanish. Paper: §3. -/ -import LeanPool.ConnesRigidity.Paper.Section3.GroupQuotient +module + +public import LeanPool.ConnesRigidity.Paper.Section3.GroupFactor +import LeanPool.ConnesRigidity.Paper.Section3.QuotientAction /-! The group vacuum component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperGroupVacuum diff --git a/LeanPool/ConnesRigidity/Paper/Section3/QuotientAction.lean b/LeanPool/ConnesRigidity/Paper/Section3/QuotientAction.lean index 48465c1690..a247543749 100644 --- a/LeanPool/ConnesRigidity/Paper/Section3/QuotientAction.lean +++ b/LeanPool/ConnesRigidity/Paper/Section3/QuotientAction.lean @@ -9,13 +9,18 @@ Fourier covariance for the actual Zhou quotient actions. The algebraic action is transported from the kernel to its compact dual and then to the coordinate Haar model. Paper: §§3--4. -/ -import LeanPool.ConnesRigidity.Paper.Section3.CrossedKernel -import LeanPool.ConnesRigidity.Paper.Section3.FourierCoordinates +module + +public import LeanPool.ConnesRigidity.Paper.Section3.CrossedKernel +import LeanPool.ConnesRigidity.Paper.Section3.CrossedAction +import LeanPool.ConnesRigidity.Porting.CoreTransfer /-! The quotient action component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperQuotientAction diff --git a/LeanPool/ConnesRigidity/Paper/Section4.lean b/LeanPool/ConnesRigidity/Paper/Section4.lean index 16da6f3f8f..e0c9bf0090 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4.lean @@ -5,8 +5,10 @@ Authors: Utensil Song -/ /- -/ -import LeanPool.ConnesRigidity.Paper.Section4.SpectralPropertyT -import LeanPool.ConnesRigidity.Paper.Section4.SpectralFiniteDetection +module + +public import LeanPool.ConnesRigidity.Paper.Section4.SpectralPropertyT +public import LeanPool.ConnesRigidity.Paper.Section4.SpectralFiniteDetection /-! # Zhou §4: property (T) @@ -14,3 +16,5 @@ import LeanPool.ConnesRigidity.Paper.Section4.SpectralFiniteDetection The section endpoint combines the `EL₃ = SL₃` bridge, finite extensions, spectral measures, and the concrete finite detector certificates. -/ + +@[expose] public section diff --git a/LeanPool/ConnesRigidity/Paper/Section4/AChartDetectorMeasure.lean b/LeanPool/ConnesRigidity/Paper/Section4/AChartDetectorMeasure.lean index d7d7b5bde6..9bf2e96371 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/AChartDetectorMeasure.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/AChartDetectorMeasure.lean @@ -3,13 +3,20 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Paper.Section4.ChartDetectorMeasure +module + +public import LeanPool.ConnesRigidity.Paper.Section4.ChartDetectorMeasure +import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.SpectralDetection +import LeanPool.ConnesRigidity.Paper.Section4.ChartOrbits +import LeanPool.ConnesRigidity.Paper.Section4.ChartSpan /-! Concrete §4 A-coordinate detector transport and invariant-measure bound for Zhou's dual kernel. Paper: §4. -/ +@[expose] public section + namespace Connes namespace PaperAChartDetectorMeasure diff --git a/LeanPool/ConnesRigidity/Paper/Section4/ChartDetector.lean b/LeanPool/ConnesRigidity/Paper/Section4/ChartDetector.lean index 524b1186b4..3361f89c9d 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/ChartDetector.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/ChartDetector.lean @@ -3,14 +3,19 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import Mathlib.LinearAlgebra.CrossProduct -import LeanPool.ConnesRigidity.Foundation.LinearAlgebra.BooleanPolynomial -import LeanPool.ConnesRigidity.Paper.Section4.FiniteCharts +module + +public import LeanPool.ConnesRigidity.Foundation.LinearAlgebra.BooleanPolynomial +public import LeanPool.ConnesRigidity.Paper.Section4.FiniteCharts +import Mathlib.Algebra.Algebra.ZMod +import Mathlib.FieldTheory.Finite.Basic /-! Algebraic finite-chart detector spine for Zhou's §4. Paper: §4. -/ +@[expose] public section + namespace Connes namespace PaperChartDetector diff --git a/LeanPool/ConnesRigidity/Paper/Section4/ChartDetectorMeasure.lean b/LeanPool/ConnesRigidity/Paper/Section4/ChartDetectorMeasure.lean index fc593bdde4..4c90630ce5 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/ChartDetectorMeasure.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/ChartDetectorMeasure.lean @@ -3,17 +3,22 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Paper.Section4.ChartMeasure -import LeanPool.ConnesRigidity.Paper.Section4.ChartSpan -import LeanPool.ConnesRigidity.Paper.Section4.ChartOrbits -import LeanPool.ConnesRigidity.Construction.PaperActionInstances +module + +public import LeanPool.ConnesRigidity.Paper.Section4.ChartMeasure +public import LeanPool.ConnesRigidity.Construction.PaperActionInstances +public import LeanPool.ConnesRigidity.Paper.Section4.ChartDetector import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.SpectralDetection +import LeanPool.ConnesRigidity.Paper.Section4.ChartOrbits +import LeanPool.ConnesRigidity.Paper.Section4.ChartSpan /-! Concrete §4 chart detector transport and the invariant-measure bound for Zhou's dual kernel. Paper: §4. -/ +@[expose] public section + namespace Connes namespace PaperChartDetectorMeasure diff --git a/LeanPool/ConnesRigidity/Paper/Section4/ChartMeasure.lean b/LeanPool/ConnesRigidity/Paper/Section4/ChartMeasure.lean index 04c3fd0477..afd70a16ad 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/ChartMeasure.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/ChartMeasure.lean @@ -3,18 +3,17 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Paper.Section4.ChartDetector -import LeanPool.ConnesRigidity.Paper.Section4.ChartOrbits -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.NormalizedHaar -import LeanPool.ConnesRigidity.Paper.Section3.DualTopology -import LeanPool.ConnesRigidity.Paper.Section3.DualShearMeasure -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.SpectralCriterion -import LeanPool.ConnesRigidity.Paper.Section3.DualAutomorphism +module + +public import LeanPool.ConnesRigidity.Paper.Section3.DualAutomorphism +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure /-! Invariant dual-measure transport for Zhou's finite chart detector. Paper: §4. -/ +@[expose] public section + namespace Connes namespace PaperChartMeasure diff --git a/LeanPool/ConnesRigidity/Paper/Section4/ChartOrbits.lean b/LeanPool/ConnesRigidity/Paper/Section4/ChartOrbits.lean index bfde8d0ba2..2c8cd05136 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/ChartOrbits.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/ChartOrbits.lean @@ -7,13 +7,18 @@ Authors: Utensil Song Concrete SL₃ orbit witnesses for the finite polynomial charts. Paper: §4. -/ +module + +public import LeanPool.ConnesRigidity.Paper.Section4.FiniteCharts +public import LeanPool.ConnesRigidity.Construction.PaperActions import LeanPool.ConnesRigidity.Construction.PaperActionInstances -import LeanPool.ConnesRigidity.Paper.Section4.FiniteCharts /-! The chart orbits component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperChartOrbits diff --git a/LeanPool/ConnesRigidity/Paper/Section4/ChartSpan.lean b/LeanPool/ConnesRigidity/Paper/Section4/ChartSpan.lean index 68ef5eae3f..c40bb5f975 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/ChartSpan.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/ChartSpan.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Paper.Section4.ChartOrbits -import LeanPool.ConnesRigidity.Paper.Section4.ChartDetector +module + +public import LeanPool.ConnesRigidity.Paper.Section4.ChartDetector +public import LeanPool.ConnesRigidity.Construction.PaperActions import LeanPool.ConnesRigidity.Construction.SquareSpan /-! Finite chart span and exhaustion for Zhou's §4 detector. Paper: §4. -/ +@[expose] public section + namespace Connes namespace PaperChartSpan diff --git a/LeanPool/ConnesRigidity/Paper/Section4/FiniteCharts.lean b/LeanPool/ConnesRigidity/Paper/Section4/FiniteCharts.lean index 4c12ef9079..bbf28dd564 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/FiniteCharts.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/FiniteCharts.lean @@ -7,14 +7,18 @@ Authors: Utensil Song Finite polynomial charts for Zhou's property-(T) detector. Paper: §4. -/ +module + +public import Mathlib.Algebra.Polynomial.OfFn +public import LeanPool.ConnesRigidity.Construction import Mathlib.Algebra.Algebra.ZMod -import Mathlib.Algebra.Polynomial.OfFn -import LeanPool.ConnesRigidity.Construction /-! The finite charts component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperFiniteCharts diff --git a/LeanPool/ConnesRigidity/Paper/Section4/FiniteExtensions.lean b/LeanPool/ConnesRigidity/Paper/Section4/FiniteExtensions.lean index 0056ef6ab4..092d03a741 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/FiniteExtensions.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/FiniteExtensions.lean @@ -8,12 +8,17 @@ Authors: Utensil Song Action-indexed finite-extension data for the Zhou semidirect products. Paper: §4. -/ -import LeanPool.ConnesRigidity.Paper.Section4.SplitExtensions +module + +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.PropertyTTransfer +public import LeanPool.ConnesRigidity.Paper.Section4.PropertyT /-! The finite extensions component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperFiniteExtensions diff --git a/LeanPool/ConnesRigidity/Paper/Section4/FullDetectorMeasure.lean b/LeanPool/ConnesRigidity/Paper/Section4/FullDetectorMeasure.lean index c12eda4835..6d35842bbf 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/FullDetectorMeasure.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/FullDetectorMeasure.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Paper.Section4.AChartDetectorMeasure +module + +public import LeanPool.ConnesRigidity.Paper.Section4.AChartDetectorMeasure /-! Full §4 detector union for Zhou's compact dual. Paper: §4. -/ +@[expose] public section + namespace Connes namespace PaperFullDetectorMeasure diff --git a/LeanPool/ConnesRigidity/Paper/Section4/PropertyT.lean b/LeanPool/ConnesRigidity/Paper/Section4/PropertyT.lean index 83b96fb7fe..cc90185dd5 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/PropertyT.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/PropertyT.lean @@ -5,16 +5,19 @@ Authors: Utensil Song -/ /- -/ -import LeanPool.ConnesRigidity.Construction.PaperActionInstances -import LeanPool.ConnesRigidity.Foundation.GroupTheory.SpecialLinear.ElementaryGeneration -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.PropertyTTransfer -import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.FiniteIndex +module + +public import LeanPool.ConnesRigidity.Construction.PaperActionInstances +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.SpecialLinear.ElementaryGeneration import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.FinitePropertyT +import LeanPool.ConnesRigidity.Porting.CoreTransfer /-! Property-(T) transfer for Zhou §4 on the concrete tensor-kernel groups. -/ +@[expose] public section + namespace Connes namespace PaperPropertyT diff --git a/LeanPool/ConnesRigidity/Paper/Section4/SpectralDetector.lean b/LeanPool/ConnesRigidity/Paper/Section4/SpectralDetector.lean index 0a6440b0f5..21de71d8d9 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/SpectralDetector.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/SpectralDetector.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Paper.Section4.FullDetectorMeasure +module + +public import LeanPool.ConnesRigidity.Paper.Section4.FullDetectorMeasure /-! The paper-facing spectral-energy form of Zhou's five-detector estimate. Paper: §4. -/ +@[expose] public section + namespace Connes namespace PaperSpectralDetector diff --git a/LeanPool/ConnesRigidity/Paper/Section4/SpectralDetectorBridge.lean b/LeanPool/ConnesRigidity/Paper/Section4/SpectralDetectorBridge.lean index 8aa6073ad6..366b0539b0 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/SpectralDetectorBridge.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/SpectralDetectorBridge.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Paper.Section4.SpectralDetector -import LeanPool.ConnesRigidity.Paper.Section4.SpectralPropertyT +module + +public import LeanPool.ConnesRigidity.Paper.Section4.SpectralDetector +public import LeanPool.ConnesRigidity.Paper.Section4.SpectralPropertyT /-! Transport of Zhou's compact-dual detector estimate to the raw Pontryagin-dual carrier used by the generic split-extension criterion. Paper: §4. -/ +@[expose] public section + namespace Connes namespace PaperSpectralDetectorBridge diff --git a/LeanPool/ConnesRigidity/Paper/Section4/SpectralFiniteDetection.lean b/LeanPool/ConnesRigidity/Paper/Section4/SpectralFiniteDetection.lean index 5cf84030c0..4d805423e5 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/SpectralFiniteDetection.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/SpectralFiniteDetection.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ +module + +public import LeanPool.ConnesRigidity.Paper.Section4.AChartDetectorMeasure +public import LeanPool.ConnesRigidity.Paper.Section4.SpectralPropertyT import LeanPool.ConnesRigidity.Paper.Section4.SpectralDetectorBridge /-! Finite detector sets for the raw Zhou split extensions. Paper: §4. -/ +@[expose] public section + namespace Connes namespace PaperSpectralFiniteDetection diff --git a/LeanPool/ConnesRigidity/Paper/Section4/SpectralPropertyT.lean b/LeanPool/ConnesRigidity/Paper/Section4/SpectralPropertyT.lean index b8d8a68d7f..0e838c46cd 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/SpectralPropertyT.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/SpectralPropertyT.lean @@ -9,16 +9,20 @@ The action-indexed positive scalar spectral bridge for Zhou §4. The analytic spectral measures are constructed by joint functional calculus, so the only paper-specific input is finite spectral detection. Paper: §4. -/ -import LeanPool.ConnesRigidity.Paper.Section4.PropertyT -import LeanPool.ConnesRigidity.Paper.Section4.SplitExtensions -import LeanPool.ConnesRigidity.Paper.Section4.FiniteExtensions +module + +public import LeanPool.ConnesRigidity.Paper.Section4.SplitExtensions +public import LeanPool.ConnesRigidity.Paper.Section3.DualHaar +public import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.SpectralCriterion import LeanPool.ConnesRigidity.Foundation.OperatorAlgebra.PositiveSpectralMeasure -import LeanPool.ConnesRigidity.Paper.Section3.DualHaar +import LeanPool.ConnesRigidity.Paper.Section4.FiniteExtensions /-! The spectral property t component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperSpectralPropertyT diff --git a/LeanPool/ConnesRigidity/Paper/Section4/SplitExtensions.lean b/LeanPool/ConnesRigidity/Paper/Section4/SplitExtensions.lean index b91e585276..8952d00141 100644 --- a/LeanPool/ConnesRigidity/Paper/Section4/SplitExtensions.lean +++ b/LeanPool/ConnesRigidity/Paper/Section4/SplitExtensions.lean @@ -9,13 +9,17 @@ Action-indexed split-extension presentations for Zhou §4. These expose the semidirect-product inclusion, quotient, section, and conjugation used by the spectral criterion; they do not prove the paper-specific spectral input. -/ -import LeanPool.ConnesRigidity.Paper.Section4.PropertyT -import LeanPool.ConnesRigidity.Foundation.GroupTheory.SplitAbelianExtension +module + +public import LeanPool.ConnesRigidity.Paper.Section4.PropertyT +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.SplitAbelianExtension /-! The split extensions component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperSplitExtensions diff --git a/LeanPool/ConnesRigidity/Paper/Section5.lean b/LeanPool/ConnesRigidity/Paper/Section5.lean index 70e216193c..0204841ad8 100644 --- a/LeanPool/ConnesRigidity/Paper/Section5.lean +++ b/LeanPool/ConnesRigidity/Paper/Section5.lean @@ -5,7 +5,9 @@ Authors: Utensil Song -/ /- -/ -import LeanPool.ConnesRigidity.Paper.Section5.ICCOrbits +module + +public import LeanPool.ConnesRigidity.Paper.Section5.ICCOrbits /-! # Zhou §5: ICC @@ -13,3 +15,5 @@ import LeanPool.ConnesRigidity.Paper.Section5.ICCOrbits The section endpoint supplies the concrete orbit and displacement certificates for the two semidirect products. -/ + +@[expose] public section diff --git a/LeanPool/ConnesRigidity/Paper/Section5/ICC.lean b/LeanPool/ConnesRigidity/Paper/Section5/ICC.lean index 1b9d813672..ef49f28384 100644 --- a/LeanPool/ConnesRigidity/Paper/Section5/ICC.lean +++ b/LeanPool/ConnesRigidity/Paper/Section5/ICC.lean @@ -5,7 +5,9 @@ Authors: Utensil Song -/ /- -/ -import LeanPool.ConnesRigidity.Construction.PaperActions +module + +public import LeanPool.ConnesRigidity.Construction.PaperActions import LeanPool.ConnesRigidity.Foundation.GroupTheory.SpecialLinear.ICC /-! @@ -14,6 +16,8 @@ ICC transfer for Zhou §5. Since the acting group is concrete product quotient. -/ +@[expose] public section + namespace Connes namespace PaperICC diff --git a/LeanPool/ConnesRigidity/Paper/Section5/ICCOrbits.lean b/LeanPool/ConnesRigidity/Paper/Section5/ICCOrbits.lean index 42c07e2131..ffc465e384 100644 --- a/LeanPool/ConnesRigidity/Paper/Section5/ICCOrbits.lean +++ b/LeanPool/ConnesRigidity/Paper/Section5/ICCOrbits.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Construction.PaperActionInstances -import LeanPool.ConnesRigidity.Construction.SquareSpan -import LeanPool.ConnesRigidity.Paper.Section5.ICC +module + +public import LeanPool.ConnesRigidity.Construction.PaperActionInstances +public import LeanPool.ConnesRigidity.Construction.SquareSpan +public import LeanPool.ConnesRigidity.Paper.Section5.ICC /-! Concrete orbit and displacement proofs for Zhou's semidirect products. The @@ -13,6 +15,8 @@ finite quotient detector is checked by kernel computation over the public finite carrier. Paper: §5. -/ +@[expose] public section + namespace Connes namespace PaperICC diff --git a/LeanPool/ConnesRigidity/Paper/Section6.lean b/LeanPool/ConnesRigidity/Paper/Section6.lean index c9e3416aa2..68e415fa93 100644 --- a/LeanPool/ConnesRigidity/Paper/Section6.lean +++ b/LeanPool/ConnesRigidity/Paper/Section6.lean @@ -5,7 +5,9 @@ Authors: Utensil Song -/ /- -/ -import LeanPool.ConnesRigidity.Paper.Section6.ModuleSemisimpleTransport +module + +public import LeanPool.ConnesRigidity.Paper.Section6.ModuleSemisimpleTransport /-! # Zhou §6: non-isomorphism @@ -13,3 +15,5 @@ import LeanPool.ConnesRigidity.Paper.Section6.ModuleSemisimpleTransport The section endpoint combines characteristic-kernel transport with the concrete nonsplit module obstruction. -/ + +@[expose] public section diff --git a/LeanPool/ConnesRigidity/Paper/Section6/Characteristic.lean b/LeanPool/ConnesRigidity/Paper/Section6/Characteristic.lean index b03cdc49a4..791414db91 100644 --- a/LeanPool/ConnesRigidity/Paper/Section6/Characteristic.lean +++ b/LeanPool/ConnesRigidity/Paper/Section6/Characteristic.lean @@ -9,18 +9,20 @@ This file contains the concrete algebraic characteristic-subgroup input for the Zhou-shaped construction. The proof is independently written from the paper's cited public mathematical argument in Section 6. -/ +module -import LeanPool.ConnesRigidity.Construction.PaperActionInstances +public import LeanPool.ConnesRigidity.Foundation.GroupTheory.SpecialLinear.Basic +import Mathlib.CategoryTheory.Category.Init /-! The characteristic component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperCharacteristic -open Construction -open Construction.PaperKernel noncomputable section @@ -52,8 +54,9 @@ theorem paperTransvection_square (i j : I) (hij : i ≠ j) (f : R) : paperTransvection i j hij f * paperTransvection i j hij f = 1 := by apply Subtype.ext have hself : Matrix.single i j f + Matrix.single i j f = 0 := by - ext r s - exact CharTwo.add_self_eq_zero _ + apply Matrix.ext + intro r s + exact CharTwo.add_self_eq_zero (Matrix.single i j f r s) change ((1 : M) + Matrix.single i j f) * ((1 : M) + Matrix.single i j f) = 1 simp only [Matrix.mul_add, Matrix.add_mul, diff --git a/LeanPool/ConnesRigidity/Paper/Section6/CharacteristicTransport.lean b/LeanPool/ConnesRigidity/Paper/Section6/CharacteristicTransport.lean index 7a8bc3454b..ef2dd0f2a2 100644 --- a/LeanPool/ConnesRigidity/Paper/Section6/CharacteristicTransport.lean +++ b/LeanPool/ConnesRigidity/Paper/Section6/CharacteristicTransport.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Paper.Section6.Characteristic +module + +public import LeanPool.ConnesRigidity.Construction.PaperActions import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4KernelCertificate +import LeanPool.ConnesRigidity.Paper.Section6.Characteristic /-! This file proves the concrete characteristic-kernel transport needed by the @@ -12,6 +15,8 @@ Zhou-shaped nonisomorphism argument. It is independently written from the cited public mathematical source. -/ +@[expose] public section + namespace Connes namespace PaperCharacteristicTransport diff --git a/LeanPool/ConnesRigidity/Paper/Section6/ModuleSemisimple.lean b/LeanPool/ConnesRigidity/Paper/Section6/ModuleSemisimple.lean index 7e9cc5c6d9..d39b5975ea 100644 --- a/LeanPool/ConnesRigidity/Paper/Section6/ModuleSemisimple.lean +++ b/LeanPool/ConnesRigidity/Paper/Section6/ModuleSemisimple.lean @@ -9,15 +9,19 @@ Concrete semisimplicity of the first quotient module in Zhou §6. The proof decomposes the actual action into the tensor summand and the trivial `C` summand, rather than treating the paper input as an opaque field. -/ -import Mathlib.Data.FunLike.Fintype -import Mathlib.LinearAlgebra.Matrix.FiniteDimensional +module + +public import Mathlib.Data.FunLike.Fintype +public import LeanPool.ConnesRigidity.Paper.Section6.Nonisomorphism +public import LeanPool.ConnesRigidity.Construction.SquareSpan import Mathlib.RingTheory.PicardGroup -import LeanPool.ConnesRigidity.Paper.Section6.Nonisomorphism /-! The module semisimple component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperModuleSemisimple diff --git a/LeanPool/ConnesRigidity/Paper/Section6/ModuleSemisimpleTransport.lean b/LeanPool/ConnesRigidity/Paper/Section6/ModuleSemisimpleTransport.lean index 05d0ea74d1..ad3aedf3ba 100644 --- a/LeanPool/ConnesRigidity/Paper/Section6/ModuleSemisimpleTransport.lean +++ b/LeanPool/ConnesRigidity/Paper/Section6/ModuleSemisimpleTransport.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Paper.Section6.ModuleSemisimple +module + +public import LeanPool.ConnesRigidity.Paper.Section6.ModuleSemisimple import LeanPool.ConnesRigidity.Paper.Section6.NonisomorphismTransport /-! @@ -11,6 +13,8 @@ Transport the concrete first-module semisimplicity proof into the paper-facing predicate and expose the resulting Section 6 nonisomorphism theorem. -/ +@[expose] public section + namespace Connes namespace PaperModuleSemisimpleTransport diff --git a/LeanPool/ConnesRigidity/Paper/Section6/Nonisomorphism.lean b/LeanPool/ConnesRigidity/Paper/Section6/Nonisomorphism.lean index fd2eacdd71..991d2d5dfe 100644 --- a/LeanPool/ConnesRigidity/Paper/Section6/Nonisomorphism.lean +++ b/LeanPool/ConnesRigidity/Paper/Section6/Nonisomorphism.lean @@ -5,9 +5,9 @@ Authors: Utensil Song -/ /- -/ -import LeanPool.ConnesRigidity.Construction.PaperActionInstances -import LeanPool.ConnesRigidity.Foundation.GroupTheory.Sp4Basic -import Mathlib.RingTheory.SimpleModule.Basic +module + +public import LeanPool.ConnesRigidity.Construction.PaperActionInstances /-! Nonisomorphism foundations for Zhou §6. The quotient representations and @@ -15,6 +15,8 @@ semisimplicity predicates are the concrete `k[Sp₄(F₂)]` modules attached to the two actions from §2. -/ +@[expose] public section + namespace Connes namespace PaperNonisomorphism diff --git a/LeanPool/ConnesRigidity/Paper/Section6/NonisomorphismEmbedding.lean b/LeanPool/ConnesRigidity/Paper/Section6/NonisomorphismEmbedding.lean index 3d1e6fc2c6..ce5bb67dd5 100644 --- a/LeanPool/ConnesRigidity/Paper/Section6/NonisomorphismEmbedding.lean +++ b/LeanPool/ConnesRigidity/Paper/Section6/NonisomorphismEmbedding.lean @@ -9,13 +9,17 @@ Concrete §6 embedding of Zhou's nonsplit finite correction into the full second kernel. This closes the semisimplicity obstruction for every quotient automorphism. Paper: §6. -/ -import LeanPool.ConnesRigidity.Paper.Section6.NonisomorphismProofs -import LeanPool.ConnesRigidity.Construction.PaperActionInstances +module + +public import LeanPool.ConnesRigidity.Paper.Section6.NonisomorphismProofs +import Mathlib.Algebra.Algebra.ZMod /-! The nonisomorphism embedding component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperNonisomorphism diff --git a/LeanPool/ConnesRigidity/Paper/Section6/NonisomorphismProofs.lean b/LeanPool/ConnesRigidity/Paper/Section6/NonisomorphismProofs.lean index 133ddb88ac..3f9a71e548 100644 --- a/LeanPool/ConnesRigidity/Paper/Section6/NonisomorphismProofs.lean +++ b/LeanPool/ConnesRigidity/Paper/Section6/NonisomorphismProofs.lean @@ -10,13 +10,16 @@ extension is proved over the actual finite group algebra; the remaining embedding into the full second kernel is handled in the companion action file. The construction follows the paper's E_ell argument. -/ -import LeanPool.ConnesRigidity.Paper.Section6.Nonisomorphism -import Mathlib.Algebra.Exact.Basic +module + +public import LeanPool.ConnesRigidity.Paper.Section6.Nonisomorphism /-! The nonisomorphism proofs component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace PaperNonisomorphism diff --git a/LeanPool/ConnesRigidity/Paper/Section6/NonisomorphismTransport.lean b/LeanPool/ConnesRigidity/Paper/Section6/NonisomorphismTransport.lean index 52772e6347..7a82a3f72e 100644 --- a/LeanPool/ConnesRigidity/Paper/Section6/NonisomorphismTransport.lean +++ b/LeanPool/ConnesRigidity/Paper/Section6/NonisomorphismTransport.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Paper.Section6.QuotientModuleTransport +module + +public import LeanPool.ConnesRigidity.Paper.Section6.Nonisomorphism import LeanPool.ConnesRigidity.Paper.Section6.NonisomorphismEmbedding +import LeanPool.ConnesRigidity.Paper.Section6.QuotientModuleTransport /-! This file exposes the concrete Section 6 module-equivalence conclusion for @@ -12,6 +15,8 @@ the actual Zhou carriers. The proof uses the public characteristic-kernel and quotient transport files in this project. -/ +@[expose] public section + namespace Connes namespace PaperNonisomorphism diff --git a/LeanPool/ConnesRigidity/Paper/Section6/QuotientModuleTransport.lean b/LeanPool/ConnesRigidity/Paper/Section6/QuotientModuleTransport.lean index 47c2b09271..ef276797ae 100644 --- a/LeanPool/ConnesRigidity/Paper/Section6/QuotientModuleTransport.lean +++ b/LeanPool/ConnesRigidity/Paper/Section6/QuotientModuleTransport.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Utensil Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Utensil Song -/ -import LeanPool.ConnesRigidity.Paper.Section6.CharacteristicTransport -import LeanPool.ConnesRigidity.Paper.Section6.Nonisomorphism +module + +public import LeanPool.ConnesRigidity.Paper.Section6.CharacteristicTransport +public import LeanPool.ConnesRigidity.Paper.Section6.Nonisomorphism import LeanPool.ConnesRigidity.Foundation.GroupTheory.SpecialLinear.ICC /-! @@ -12,6 +14,8 @@ This file proves the concrete quotient and module transport in Zhou's Section 6 argument. It uses public project statements only. -/ +@[expose] public section + namespace Connes namespace PaperCharacteristicTransport diff --git a/LeanPool/ConnesRigidity/Paper/Section7.lean b/LeanPool/ConnesRigidity/Paper/Section7.lean index 73a925665a..65ec1c81eb 100644 --- a/LeanPool/ConnesRigidity/Paper/Section7.lean +++ b/LeanPool/ConnesRigidity/Paper/Section7.lean @@ -5,7 +5,12 @@ Authors: Utensil Song -/ /- -/ -import LeanPool.ConnesRigidity.Paper.Section7.TheoremACompletion +module + +public import LeanPool.ConnesRigidity.Paper.Section7.TheoremACompletion +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Zhou §7: completion of Theorem A @@ -13,3 +18,5 @@ import LeanPool.ConnesRigidity.Paper.Section7.TheoremACompletion This facade exposes the assembled paper endpoint relative to the cited EJZK property-(T) input. -/ + +@[expose] public section diff --git a/LeanPool/ConnesRigidity/Paper/Section7/TheoremACompletion.lean b/LeanPool/ConnesRigidity/Paper/Section7/TheoremACompletion.lean index 710bc53895..c6e1a21eff 100644 --- a/LeanPool/ConnesRigidity/Paper/Section7/TheoremACompletion.lean +++ b/LeanPool/ConnesRigidity/Paper/Section7/TheoremACompletion.lean @@ -5,9 +5,11 @@ Authors: Utensil Song -/ /- -/ -import LeanPool.ConnesRigidity.Paper.Section4.SpectralPropertyT -import LeanPool.ConnesRigidity.Paper.Section4.SpectralFiniteDetection +module + +public import LeanPool.ConnesRigidity.Paper.Section4.PropertyT import LeanPool.ConnesRigidity.Paper.Section3.FactorClosure +import LeanPool.ConnesRigidity.Paper.Section4.SpectralFiniteDetection import LeanPool.ConnesRigidity.Paper.Section5.ICCOrbits import LeanPool.ConnesRigidity.Paper.Section6.ModuleSemisimpleTransport @@ -15,6 +17,8 @@ import LeanPool.ConnesRigidity.Paper.Section6.ModuleSemisimpleTransport Concrete completion boundary for Zhou's Theorem A. Paper: §§3--7. -/ +@[expose] public section + namespace Connes namespace PaperTheoremACompletion diff --git a/LeanPool/ConnesRigidity/Porting/CoreTransfer.lean b/LeanPool/ConnesRigidity/Porting/CoreTransfer.lean index bed0bfd5bb..63bdaeb18d 100644 --- a/LeanPool/ConnesRigidity/Porting/CoreTransfer.lean +++ b/LeanPool/ConnesRigidity/Porting/CoreTransfer.lean @@ -10,12 +10,16 @@ Derived in part from Apache-2.0 `openai/ten-proofs`, `ConnesRigidity.lean` at Modifications: extracted into a separate namespace and changed source-module imports and namespace qualifications. See the upstream PORT_MAP.md. -/ -import LeanPool.ConnesRigidity.Core +module + +public import LeanPool.ConnesRigidity.Core /-! The core transfer component of the Connes rigidity formalization. -/ +@[expose] public section + namespace Connes namespace OpenAIPort diff --git a/LeanPool/CramerWold.lean b/LeanPool/CramerWold.lean index 066334a1c3..7fbe8234f9 100644 --- a/LeanPool/CramerWold.lean +++ b/LeanPool/CramerWold.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Lazar Milikic. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lazar Milikic -/ +module -import Mathlib.MeasureTheory.Measure.CharacteristicFunction.Basic -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.Probability.IdentDistrib +public import Mathlib.MeasureTheory.Measure.CharacteristicFunction.Basic +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import Mathlib.Probability.IdentDistrib /-! # The Cramer-Wold theorem @@ -19,6 +20,8 @@ Tags: probability, measure-theory, characteristic-functions, cramer-wold MSC: 60B11, 60E10, 28A33 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/CriticalPortraits.lean b/LeanPool/CriticalPortraits.lean index f1fd13d6e3..ac9b9d7017 100644 --- a/LeanPool/CriticalPortraits.lean +++ b/LeanPool/CriticalPortraits.lean @@ -3,15 +3,23 @@ Copyright (c) 2026 Keston Aquino-Michaels. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Keston Aquino-Michaels -/ +module -import LeanPool.CriticalPortraits.CycleLemma -import LeanPool.CriticalPortraits.Core -import LeanPool.CriticalPortraits.Denominator -import LeanPool.CriticalPortraits.Portraits -import LeanPool.CriticalPortraits.Forward -import LeanPool.CriticalPortraits.Injectivity -import LeanPool.CriticalPortraits.Surjectivity -import LeanPool.CriticalPortraits.Census +public import LeanPool.CriticalPortraits.CycleLemma +public import LeanPool.CriticalPortraits.Core +public import LeanPool.CriticalPortraits.Denominator +public import LeanPool.CriticalPortraits.Portraits +public import LeanPool.CriticalPortraits.Forward +public import LeanPool.CriticalPortraits.Injectivity +public import LeanPool.CriticalPortraits.Surjectivity +public import LeanPool.CriticalPortraits.Census +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # Counting Critical Portraits @@ -24,6 +32,8 @@ Tags: combinatorics, cycle-lemma, critical-portraits, enumeration MSC: 05A15, 37F20 -/ +@[expose] public section + /-! # Full all-`d` proof of `census = C(N,d−1)/d` (Mathlib) diff --git a/LeanPool/CriticalPortraits/Census.lean b/LeanPool/CriticalPortraits/Census.lean index 3738d1ddd1..055248f840 100644 --- a/LeanPool/CriticalPortraits/Census.lean +++ b/LeanPool/CriticalPortraits/Census.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Keston Aquino-Michaels. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Keston Aquino-Michaels -/ +module -import LeanPool.CriticalPortraits.Surjectivity -import LeanPool.CriticalPortraits.Injectivity -import LeanPool.CriticalPortraits.Forward +public import LeanPool.CriticalPortraits.Portraits import LeanPool.CriticalPortraits.Denominator +import LeanPool.CriticalPortraits.Surjectivity +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # The headline census theorem: `#{portraits} = C(N, d−1) / d` for all `d` @@ -22,6 +29,8 @@ With positions in `ZMod N` (`N = d*m`) and the delete-min map `T`: agree; composing with the **denominator** count `card_levelCanonical_mul` yields the result. -/ +@[expose] public section + namespace CriticalPortraits open Finset diff --git a/LeanPool/CriticalPortraits/Core.lean b/LeanPool/CriticalPortraits/Core.lean index 31a477ad1c..73417ae90c 100644 --- a/LeanPool/CriticalPortraits/Core.lean +++ b/LeanPool/CriticalPortraits/Core.lean @@ -3,19 +3,16 @@ Copyright (c) 2026 Keston Aquino-Michaels. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Keston Aquino-Michaels -/ +module -import Mathlib.Data.ZMod.Basic -import Mathlib.Data.Finset.Max -import Mathlib.Data.Fintype.Powerset -import Mathlib.Data.Fintype.BigOperators -import Mathlib.Data.Fintype.EquivFin -import Mathlib.Data.Nat.Choose.Basic -import Mathlib.Algebra.BigOperators.Intervals -import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.Algebra.Group.PUnit -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.NormNum -import LeanPool.CriticalPortraits.CycleLemma -- the cycle lemma (Raney, sum=1), PROVED sorry-free +public import Mathlib.Data.ZMod.Basic +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # Core definitions + the count numerator (Mathlib) @@ -27,6 +24,8 @@ Proved here (sorry-free): the count **numerator** `#{(d−1)-subsets of Z_N} = C Mathlib's `Fintype.card_finset_len` + `ZMod.card`. -/ +@[expose] public section + namespace CriticalPortraits open Finset diff --git a/LeanPool/CriticalPortraits/CycleLemma.lean b/LeanPool/CriticalPortraits/CycleLemma.lean index 9ff6347088..83ca814fb2 100644 --- a/LeanPool/CriticalPortraits/CycleLemma.lean +++ b/LeanPool/CriticalPortraits/CycleLemma.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Keston Aquino-Michaels. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Keston Aquino-Michaels -/ +module +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import Mathlib.Algebra.BigOperators.Group.Finset.Basic import Mathlib.Data.Finset.Max -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # The cycle lemma (Raney / Dvoretzky–Motzkin), sum = 1 case — PROVED @@ -21,6 +27,8 @@ partial sums `Q k = ∑_{j s.sup (·.val)) : diff --git a/LeanPool/DeadEnds/RelevantPrimes.lean b/LeanPool/DeadEnds/RelevantPrimes.lean index c2f0a61206..ea0b6892e9 100644 --- a/LeanPool/DeadEnds/RelevantPrimes.lean +++ b/LeanPool/DeadEnds/RelevantPrimes.lean @@ -3,13 +3,22 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Seewoo Lee, Ken Ono, Jujian Zhang. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Seewoo Lee, Ken Ono, Jujian Zhang -/ +module +public import LeanPool.DeadEnds.Basic +public import Mathlib.NumberTheory.PrimeCounting import LeanPool.DeadEnds.PrimeTail +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! Bounding the finite set of primes relevant to square-divisibility violations. -/ +@[expose] public section + namespace LeanPool.DeadEnds /-- Convert `Nat.primesBelow` to a finset of bundled primes. -/ diff --git a/LeanPool/DeadEnds/Solution.lean b/LeanPool/DeadEnds/Solution.lean index 93f0f3b19f..17f24de504 100644 --- a/LeanPool/DeadEnds/Solution.lean +++ b/LeanPool/DeadEnds/Solution.lean @@ -3,18 +3,25 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Seewoo Lee, Ken Ono, Jujian Zhang. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Seewoo Lee, Ken Ono, Jujian Zhang -/ +module -import LeanPool.DeadEnds.Basic -import LeanPool.DeadEnds.CRT -import LeanPool.DeadEnds.Counting -import LeanPool.DeadEnds.CountingBlocks -import LeanPool.DeadEnds.PrimeTail -import LeanPool.DeadEnds.RelevantPrimes -import LeanPool.DeadEnds.TailEstimates -import LeanPool.DeadEnds.InclusionExclusion +public import LeanPool.DeadEnds.Basic +public import LeanPool.DeadEnds.CRT +public import LeanPool.DeadEnds.Counting +public import LeanPool.DeadEnds.CountingBlocks +public import LeanPool.DeadEnds.PrimeTail +public import LeanPool.DeadEnds.RelevantPrimes +public import LeanPool.DeadEnds.TailEstimates +public import LeanPool.DeadEnds.InclusionExclusion + +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.DeadEnds.Solution Imported Lean Pool material for `LeanPool.DeadEnds.Solution`. -/ + +@[expose] public section diff --git a/LeanPool/DeadEnds/TailEstimates.lean b/LeanPool/DeadEnds/TailEstimates.lean index a6827b127d..9638772e7f 100644 --- a/LeanPool/DeadEnds/TailEstimates.lean +++ b/LeanPool/DeadEnds/TailEstimates.lean @@ -3,13 +3,24 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Seewoo Lee, Ken Ono, Jujian Zhang. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Seewoo Lee, Ken Ono, Jujian Zhang -/ +module +public import LeanPool.DeadEnds.Basic +import LeanPool.DeadEnds.Counting +import LeanPool.DeadEnds.PrimeTail import LeanPool.DeadEnds.RelevantPrimes +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! Asymptotic tail estimates that turn finite-prime counts into density bounds. -/ +@[expose] public section + namespace LeanPool.DeadEnds lemma sqrt_bXb_div_X_small (b : ℕ) (_hb : 2 ≤ b) (ε : ℝ) (hε : 0 < ε) : diff --git a/LeanPool/DemazureOperatorsLean.lean b/LeanPool/DemazureOperatorsLean.lean index 8fde8f460a..2eee1dbb65 100644 --- a/LeanPool/DemazureOperatorsLean.lean +++ b/LeanPool/DemazureOperatorsLean.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Óscar Álvarez Sánchez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Óscar Álvarez Sánchez -/ +module -import LeanPool.DemazureOperatorsLean.Demazure -import LeanPool.DemazureOperatorsLean.DemazureAux -import LeanPool.DemazureOperatorsLean.DemazureRelations -import LeanPool.DemazureOperatorsLean.DemazureAuxRelations -import LeanPool.DemazureOperatorsLean.StrongExchange -import LeanPool.DemazureOperatorsLean.Matsumoto +public import LeanPool.DemazureOperatorsLean.Demazure +public import LeanPool.DemazureOperatorsLean.DemazureAux +public import LeanPool.DemazureOperatorsLean.DemazureRelations +public import LeanPool.DemazureOperatorsLean.DemazureAuxRelations +public import LeanPool.DemazureOperatorsLean.StrongExchange +public import LeanPool.DemazureOperatorsLean.Matsumoto +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Demazure Operators and Lean @@ -22,6 +26,8 @@ Tags: algebraic-combinatorics, demazure-operators, polynomials, representation-t MSC: 05E05, 13P10, 20F55 -/ +@[expose] public section + /-! The Demazure-operator declarations are sourced to the BGG Schubert-cells paper listed in the project card. The strong-exchange declaration is included as diff --git a/LeanPool/DemazureOperatorsLean/Demazure.lean b/LeanPool/DemazureOperatorsLean/Demazure.lean index 2c33ecb08e..86c4284b29 100644 --- a/LeanPool/DemazureOperatorsLean/Demazure.lean +++ b/LeanPool/DemazureOperatorsLean/Demazure.lean @@ -3,30 +3,27 @@ Copyright (c) 2026 Óscar Álvarez Sánchez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Óscar Álvarez Sánchez -/ +module -import Mathlib.Data.Set.Lattice.Bounded -import Mathlib.Data.Set.Lattice.Disjoint -import Mathlib.Data.Set.Lattice.Image -import Mathlib.Data.Set.Lattice.Indexed -import Mathlib.Data.Set.Lattice.Order -import Mathlib.Data.Set.Function -import Mathlib.Analysis.Complex.Polynomial.Basic -import Init.System.IO - -import Mathlib.Basic.Complex.Basic -import Mathlib.Algebra.Polynomial.Basic -import Mathlib.Algebra.MvPolynomial.Basic -import Mathlib.Algebra.MvPolynomial.CommRing -import Mathlib.Algebra.MvPolynomial.Rename + +public import Mathlib.Basic.Complex.Basic + + +public import Mathlib.Algebra.MvPolynomial.Equiv +public import Mathlib.Algebra.Polynomial.Div import Mathlib.Algebra.MvPolynomial.Polynomial +import Mathlib.Algebra.MvPolynomial.CommRing +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic import Mathlib.RingTheory.MvPolynomial.Basic - -import Mathlib.Data.Finsupp.Defs +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.DemazureOperatorsLean.Demazure -/ +@[expose] public section + noncomputable section open MvPolynomial diff --git a/LeanPool/DemazureOperatorsLean/DemazureAux.lean b/LeanPool/DemazureOperatorsLean/DemazureAux.lean index 25e254a461..4f8f663abb 100644 --- a/LeanPool/DemazureOperatorsLean/DemazureAux.lean +++ b/LeanPool/DemazureOperatorsLean/DemazureAux.lean @@ -3,13 +3,21 @@ Copyright (c) 2026 Óscar Álvarez Sánchez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Óscar Álvarez Sánchez -/ +module -import LeanPool.DemazureOperatorsLean.Demazure +public import LeanPool.DemazureOperatorsLean.Demazure +public import Mathlib.Analysis.Complex.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.RingTheory.MvPolynomial.Basic +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.DemazureOperatorsLean.DemazureAux -/ +@[expose] public section + noncomputable section open MvPolynomial diff --git a/LeanPool/DemazureOperatorsLean/DemazureAuxRelations.lean b/LeanPool/DemazureOperatorsLean/DemazureAuxRelations.lean index a3e5244c17..eed1497fa2 100644 --- a/LeanPool/DemazureOperatorsLean/DemazureAuxRelations.lean +++ b/LeanPool/DemazureOperatorsLean/DemazureAuxRelations.lean @@ -3,14 +3,20 @@ Copyright (c) 2026 Óscar Álvarez Sánchez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Óscar Álvarez Sánchez -/ +module -import LeanPool.DemazureOperatorsLean.Demazure -import LeanPool.DemazureOperatorsLean.DemazureAux +public import LeanPool.DemazureOperatorsLean.DemazureAux +public import Mathlib.RingTheory.MvPolynomial.Symmetric.Defs +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.DemazureOperatorsLean.DemazureAuxRelations -/ +@[expose] public section + noncomputable section namespace Demazure diff --git a/LeanPool/DemazureOperatorsLean/DemazureRelations.lean b/LeanPool/DemazureOperatorsLean/DemazureRelations.lean index 2135c32f7f..454bdfce23 100644 --- a/LeanPool/DemazureOperatorsLean/DemazureRelations.lean +++ b/LeanPool/DemazureOperatorsLean/DemazureRelations.lean @@ -3,15 +3,19 @@ Copyright (c) 2026 Óscar Álvarez Sánchez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Óscar Álvarez Sánchez -/ +module -import LeanPool.DemazureOperatorsLean.Demazure -import LeanPool.DemazureOperatorsLean.DemazureAux -import LeanPool.DemazureOperatorsLean.DemazureAuxRelations +public import LeanPool.DemazureOperatorsLean.DemazureAuxRelations +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.DemazureOperatorsLean.DemazureRelations -/ +@[expose] public section + noncomputable section open MvPolynomial diff --git a/LeanPool/DemazureOperatorsLean/Matsumoto.lean b/LeanPool/DemazureOperatorsLean/Matsumoto.lean index 2a2c3f3f97..bcf9b7ce46 100644 --- a/LeanPool/DemazureOperatorsLean/Matsumoto.lean +++ b/LeanPool/DemazureOperatorsLean/Matsumoto.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Óscar Álvarez Sánchez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Óscar Álvarez Sánchez -/ +module +public import Mathlib.GroupTheory.Coxeter.Inversion import LeanPool.DemazureOperatorsLean.StrongExchange -import Init.Data.List.Erase /-! # LeanPool.DemazureOperatorsLean.Matsumoto -/ +@[expose] public section + namespace CoxeterSystem noncomputable section diff --git a/LeanPool/DemazureOperatorsLean/StrongExchange.lean b/LeanPool/DemazureOperatorsLean/StrongExchange.lean index 1780c52d20..f4de4aa36b 100644 --- a/LeanPool/DemazureOperatorsLean/StrongExchange.lean +++ b/LeanPool/DemazureOperatorsLean/StrongExchange.lean @@ -3,15 +3,17 @@ Copyright (c) 2026 Óscar Álvarez Sánchez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Óscar Álvarez Sánchez -/ +module -import Mathlib.GroupTheory.Coxeter.Inversion +public import Mathlib.GroupTheory.Coxeter.Inversion import Mathlib.Algebra.Group.NatPowAssoc -import Init.Data.List.Lemmas /-! # LeanPool.DemazureOperatorsLean.StrongExchange -/ +@[expose] public section + namespace CoxeterSystem noncomputable section diff --git a/LeanPool/DemazureProduct.lean b/LeanPool/DemazureProduct.lean index fde5338be7..43014fc251 100644 --- a/LeanPool/DemazureProduct.lean +++ b/LeanPool/DemazureProduct.lean @@ -3,17 +3,24 @@ Copyright (c) 2026 Nathan Pflueger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathan Pflueger -/ -import LeanPool.DemazureProduct.Utils -import LeanPool.DemazureProduct.Valley -import LeanPool.DemazureProduct.SlipFace -import LeanPool.DemazureProduct.AspPerm -import LeanPool.DemazureProduct.Submodular -import LeanPool.DemazureProduct.ReducedProducts -import LeanPool.DemazureProduct.Reduction -import LeanPool.DemazureProduct.Transpositions -import LeanPool.DemazureProduct.InvSet -import LeanPool.DemazureProduct.Avoiding321 -import LeanPool.DemazureProduct.Tableaux +module + +public import LeanPool.DemazureProduct.Utils +public import LeanPool.DemazureProduct.Valley +public import LeanPool.DemazureProduct.SlipFace +public import LeanPool.DemazureProduct.AspPerm +public import LeanPool.DemazureProduct.Submodular +public import LeanPool.DemazureProduct.ReducedProducts +public import LeanPool.DemazureProduct.Reduction +public import LeanPool.DemazureProduct.Transpositions +public import LeanPool.DemazureProduct.InvSet +public import LeanPool.DemazureProduct.Avoiding321 +public import LeanPool.DemazureProduct.Tableaux +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Extended Demazure Product on ASP Permutations @@ -26,6 +33,8 @@ Tags: algebraic-combinatorics, demazure-product, bruhat-order, permutations MSC: 05E05, 20F55 -/ +@[expose] public section + /-! This project formalizes the extended Demazure product on almost-sign-preserving integer permutations via min-plus matrix multiplication. The imported upstream diff --git a/LeanPool/DemazureProduct/AspPerm.lean b/LeanPool/DemazureProduct/AspPerm.lean index 316b559279..e3f9657792 100644 --- a/LeanPool/DemazureProduct/AspPerm.lean +++ b/LeanPool/DemazureProduct/AspPerm.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Nathan Pflueger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathan Pflueger -/ +module + +public import Mathlib.Data.Int.LeastGreatest + +public import LeanPool.DemazureProduct.SlipFace +public import Mathlib.Data.Set.Card import LeanPool.DemazureProduct.Utils -import LeanPool.DemazureProduct.SlipFace -import Mathlib.Data.Int.LeastGreatest -import Mathlib.Data.Set.Card -import Mathlib.Tactic.Ring +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # Almost-sign-preserving permutations @@ -21,6 +29,8 @@ bounded-difference material from Section 7, of [An extended Demazure product](https://arxiv.org/abs/2206.14227). -/ +@[expose] public section + namespace LeanPool.DemazureProduct @@ -336,19 +346,19 @@ def revMap : ℤ × ℤ → ℤ × ℤ := fun ⟨i, j⟩ => ⟨τ j, τ i⟩ /-- The slipface associated to an ASP permutation is defined by $s_\tau(a,b) = \#\{n \geq b : \tau(n) < a\}$, in the notation of *Equation (4)* (`eq:sa`) in [An extended Demazure product](https://arxiv.org/abs/2206.14227). -In the repository, this is denoted as `τ.s_raw a b`. -/ -private noncomputable def s_raw (a b : ℤ) : ℤ := ↑(southeastSet τ a b).ncard +In the repository, this is denoted as `τ.sRaw a b`. -/ +noncomputable def sRaw (a b : ℤ) : ℤ := ↑(southeastSet τ a b).ncard /-- The companion counting function $s_{\tau^{-1}}(b,a)$. -In Lean this is written `τ.s'_raw b a`; later `dual_inverse_raw` identifies it with -`(τ⁻¹).s_raw`. -/ -private noncomputable def s'_raw (b a : ℤ) : ℤ := ↑(northwestSet τ a b).ncard +In Lean this is written `τ.sRaw' b a`; later `dual_inverse_raw` identifies it with +`(τ⁻¹).sRaw`. -/ +noncomputable def sRaw' (b a : ℤ) : ℤ := ↑(northwestSet τ a b).ncard -private lemma dual_inverse_raw : τ.s'_raw = (τ⁻¹).s_raw := by +private lemma dual_inverse_raw : τ.sRaw' = (τ⁻¹).sRaw := by funext b a calc - τ.s'_raw b a = (northwestSet τ a b).ncard := by rfl + τ.sRaw' b a = (northwestSet τ a b).ncard := by rfl _ = ( τ.func '' (northwestSet τ a b)).ncard := by rw [Set.ncard_image_of_injective (northwestSet τ a b) τ.injective] _ = (southeastSet τ⁻¹.func b a).ncard := by @@ -362,7 +372,7 @@ private lemma dual_inverse_raw : τ.s'_raw = (τ⁻¹).s_raw := by use τ⁻¹ n unfold northwestSet; unfold southeastSet at h simp_all - _ = (τ⁻¹).s_raw b a := by rfl + _ = (τ⁻¹).sRaw b a := by rfl private lemma flip_bij (τ : AspPerm) : Function.Bijective (flipFunc τ.func) := by constructor @@ -419,8 +429,8 @@ private lemma flip_flip : τ.flip.flip = τ := by intro n simp only [flip, Int.reduceNeg, sub_sub_cancel] -private lemma flip_s (a b : ℤ) : τ.flip.s_raw a b = τ.s'_raw (-b) (-a) := by - unfold AspPerm.s_raw AspPerm.s'_raw +private lemma flip_s (a b : ℤ) : τ.flip.sRaw a b = τ.sRaw' (-b) (-a) := by + unfold AspPerm.sRaw AspPerm.sRaw' let A := southeastSet τ.flip a b let B := northwestSet τ (-a) (-b) suffices A.ncard = B.ncard by congr @@ -438,18 +448,18 @@ private lemma flip_s (a b : ℤ) : τ.flip.s_raw a b = τ.s'_raw (-b) (-a) := by [An extended Demazure product](https://arxiv.org/abs/2206.14227) writes this as $\chi_\tau$; Lean writes it as `τ.χ`. -/ -noncomputable def χ : ℤ := τ.s_raw 0 0 - τ.s'_raw 0 0 +noncomputable def χ : ℤ := τ.sRaw 0 0 - τ.sRaw' 0 0 -private lemma s_eq_se_card_raw (a b : ℤ) : τ.s_raw a b = (τ.seFinset a b).card := by - unfold AspPerm.s_raw seFinset +private lemma s_eq_se_card_raw (a b : ℤ) : τ.sRaw a b = (τ.seFinset a b).card := by + unfold AspPerm.sRaw seFinset rw [Set.ncard_eq_toFinset_card _ (τ.se_finite a b)] -private lemma s_nonneg_raw (a b : ℤ) : τ.s_raw a b ≥ 0 := by - unfold s_raw +private lemma s_nonneg_raw (a b : ℤ) : τ.sRaw a b ≥ 0 := by + unfold sRaw exact Nat.cast_nonneg _ -private lemma s'_eq_nw_card_raw (b a : ℤ) : τ.s'_raw b a = (τ.nwFinset a b).card := by - unfold AspPerm.s'_raw nwFinset +private lemma s'_eq_nw_card_raw (b a : ℤ) : τ.sRaw' b a = (τ.nwFinset a b).card := by + unfold AspPerm.sRaw' nwFinset rw [Set.ncard_eq_toFinset_card _ (τ.nw_finite a b)] -- Helper: the number of elements of se(a',b) \ se(a,b) equals the number of @@ -467,7 +477,7 @@ private lemma se_diff_card (a a' b : ℤ) : simp_all private lemma a_move_up_raw (a a' b : ℤ) (a_le_a' : a ≤ a') : - τ.s_raw a' b = τ.s_raw a b + ((Finset.Ico a a').filter (τ⁻¹ · ≥ b)).card := by + τ.sRaw a' b = τ.sRaw a b + ((Finset.Ico a a').filter (τ⁻¹ · ≥ b)).card := by have h_sub : τ.seFinset a b ⊆ τ.seFinset a' b := fun k hk => by simp only [mem_se] at *; exact ⟨hk.1, lt_of_lt_of_le hk.2 a_le_a'⟩ suffices (τ.seFinset a' b).card @@ -487,7 +497,7 @@ private lemma a_move_up_raw (a a' b : ℤ) (a_le_a' : a ≤ a') : omega private lemma b_move_up_raw (a b b' : ℤ) (b_le_b' : b ≤ b') : - τ.s_raw a b' = τ.s_raw a b - ((Finset.Ico b b').filter (τ · < a)).card := by + τ.sRaw a b' = τ.sRaw a b - ((Finset.Ico b b').filter (τ · < a)).card := by let A := τ.seFinset a b' let B := τ.seFinset a b let C := (Finset.Ico b b').filter (τ · < a) @@ -522,7 +532,7 @@ private lemma b_move_up_raw (a b b' : ℤ) (b_le_b' : b ≤ b') : /-- We have $s_\alpha(a+1,b) = s_\alpha(a,b) + \delta(\alpha^{-1}(a) \ge b)$. This is Equation (13) (`eq:a+1`) of [An extended Demazure product](https://arxiv.org/abs/2206.14227). -/ -private lemma a_step_raw (a b : ℤ) : τ.s_raw (a + 1) b = τ.s_raw a b + (if τ⁻¹ a ≥ b then 1 else 0) +private lemma a_step_raw (a b : ℤ) : τ.sRaw (a + 1) b = τ.sRaw a b + (if τ⁻¹ a ≥ b then 1 else 0) := by rw [a_move_up_raw τ a (a + 1) b (by omega)] by_cases h : τ⁻¹ a ≥ b @@ -544,7 +554,7 @@ private lemma a_step_raw (a b : ℤ) : τ.s_raw (a + 1) b = τ.s_raw a b + (if /-- We have $s_\alpha(a,b+1) = s_\alpha(a,b) - \delta(\alpha(b) simp [h] - nonneg := τ.s_nonneg_raw - ge_diff := τ.s_ge_raw + nonneg := by exact τ.s_nonneg_raw + ge_diff := by exact τ.s_ge_raw small_a := by intro b obtain ⟨A, hA⟩ := τ.tend_zero_a_raw b @@ -741,7 +751,7 @@ noncomputable def s : SlipFace := { intro b obtain ⟨A, hA⟩ := τ⁻¹.tend_zero_b_raw b use A; intro a a_ge_A - have ha : τ⁻¹.s_raw b a = 0 := by + have ha : τ⁻¹.sRaw b a = 0 := by apply le_antisymm · have := (τ⁻¹.s_noninc_raw b a_ge_A).1 rwa [hA] at this @@ -752,7 +762,7 @@ noncomputable def s : SlipFace := { intro a obtain ⟨B, hB⟩ := τ⁻¹.tend_zero_a_raw a use B; intro b b_le_B - have hb : τ⁻¹.s_raw b a = 0 := by + have hb : τ⁻¹.sRaw b a = 0 := by apply le_antisymm · have := (τ⁻¹.s_nondec_raw b_le_B a).1 rwa [hB] at this @@ -773,7 +783,7 @@ noncomputable def s : SlipFace := { lemma s_eq_ncard (a b : ℤ) : τ.s a b = ↑(southeastSet τ a b).ncard := by rfl lemma s'_eq_ncard (b a : ℤ) : (τ⁻¹).s b a = ↑(northwestSet τ a b).ncard := by - change (τ⁻¹).s_raw b a = _ + change (τ⁻¹).sRaw b a = _ rw [← dual_inverse_raw] rfl lemma s_eq_se_card (a b : ℤ) : τ.s a b = (τ.seFinset a b).card := τ.s_eq_se_card_raw a b @@ -1333,18 +1343,21 @@ end Wings /-- The rightmost index whose image is the last value with `s` below `m` in row `b`. -/ noncomputable def v (b : ℤ) {m : ℤ} (m_pos : m > 0) : ℤ := τ⁻¹ ( Classical.choose <| Int.exists_greatest_of_bdd - (Wings.R_bddAbove τ b m) (Wings.R_nonempty τ b m m_pos) ) + (private_decl% (Wings.R_bddAbove τ b m)) + (private_decl% (Wings.R_nonempty τ b m m_pos)) ) private lemma v_spec (b : ℤ) {m : ℤ} (m_pos : m > 0) : τ.s (τ (τ.v b m_pos)) b < m ∧ ∀ a : ℤ, τ.s a b < m → a ≤ τ (τ.v b m_pos) := by let v := τ.v b m_pos let τv := Classical.choose <| Int.exists_greatest_of_bdd - (Wings.R_bddAbove τ b m) (Wings.R_nonempty τ b m m_pos) + (private_decl% (Wings.R_bddAbove τ b m)) + (private_decl% (Wings.R_nonempty τ b m m_pos)) have τ_vs: τ v = τv := by simp only [AspPerm.v, mul_inv_cancel_eval, v, τv] let R := Wings.R τ b m have : τv ∈ R ∧ ∀ n : ℤ, n ∈ R → n ≤ τv := Classical.choose_spec - (Int.exists_greatest_of_bdd (Wings.R_bddAbove τ b m) (Wings.R_nonempty τ b m m_pos)) + (Int.exists_greatest_of_bdd (private_decl% (Wings.R_bddAbove τ b m)) + (private_decl% (Wings.R_nonempty τ b m m_pos))) rw [← τ_vs] at this simpa [v, R, Wings.R] using this @@ -1405,18 +1418,21 @@ lemma τv_lt (b : ℤ) {m : ℤ} (m_pos : m > 0) /-- The rightmost index witnessing the dual lower bound `n` in row `b`. -/ noncomputable def u (b : ℤ) {n : ℤ} (n_pos : n > 0) : ℤ := τ⁻¹ <|Classical.choose <| Int.exists_greatest_of_bdd - (Wings.L_bddAbove τ b n n_pos) (Wings.L_nonnempty τ b n) + (private_decl% (Wings.L_bddAbove τ b n n_pos)) + (private_decl% (Wings.L_nonnempty τ b n)) private lemma u_spec (b : ℤ) {n : ℤ} (n_pos : n > 0) : τ⁻¹.s b (τ (τ.u b n_pos)) ≥ n ∧ ∀ a : ℤ, τ⁻¹.s b a ≥ n → a ≤ τ (τ.u b n_pos) := by let u := τ.u b n_pos let τu := Classical.choose <| Int.exists_greatest_of_bdd - (Wings.L_bddAbove τ b n n_pos) (Wings.L_nonnempty τ b n) + (private_decl% (Wings.L_bddAbove τ b n n_pos)) + (private_decl% (Wings.L_nonnempty τ b n)) have τ_us: τ u = τu := by simp only [AspPerm.u, mul_inv_cancel_eval, u, τu] let L := Wings.L τ b n have : τu ∈ L ∧ ∀ n : ℤ, n ∈ L → τu ≥ n := Classical.choose_spec - (Int.exists_greatest_of_bdd (Wings.L_bddAbove τ b n n_pos) (Wings.L_nonnempty τ b n)) + (Int.exists_greatest_of_bdd (private_decl% (Wings.L_bddAbove τ b n n_pos)) + (private_decl% (Wings.L_nonnempty τ b n))) rw [← τ_us] at this simpa [L, Wings.L] using this @@ -1837,16 +1853,17 @@ lemma ess_asp_eq_ess_sf (τ : AspPerm) : τ.ess = τ.s.ess := by /-- The bounded-difference condition for an ASP permutation. -/ def isBdiff : Prop := ∃ (M : ℤ), ∀ (n : ℤ), abs (n - τ n) ≤ M -private def width_bound (N : ℤ) : Prop := +/-- The rank function agrees with its linear tail outside a strip of width `N`. -/ +def widthBound (N : ℤ) : Prop := ∀ (a b : ℤ), N ≤ abs (a - b) → τ.s a b = max 0 (a - b + τ.χ) -private lemma width_sides : (∃ (N : ℤ), τ.width_bound N) ↔ (∃ (M N : ℤ), ∀ (a b : ℤ), +private lemma width_sides : (∃ (N : ℤ), τ.widthBound N) ↔ (∃ (M N : ℤ), ∀ (a b : ℤ), (a - b ≤ M → τ.s a b = 0) ∧ (a - b ≥ N → τ⁻¹.s b a = 0)) := by constructor · rintro ⟨N0, hN0⟩ let N := max (abs N0) (abs τ.χ) - have hN : τ.width_bound N := by + have hN : τ.widthBound N := by intro a b hab exact hN0 a b <| (le_abs_self N0).trans <| (le_max_left _ _).trans hab have Npos : 0 ≤ N := (abs_nonneg N0).trans (le_max_left _ _) @@ -1991,7 +2008,7 @@ private lemma bdiff_width_helper (M : ℤ) : $\max\{0, a-b+\chi(\tau)\}$ for all $|a-b| \gg 0$. *Proposition 7.7* (`prop:cliffordPerms`) of [An extended Demazure product](https://arxiv.org/abs/2206.14227), part 1/2.* -/ -theorem bdiff_iff_width : τ.isBdiff ↔ ∃ N, τ.width_bound N := by +theorem bdiff_iff_width : τ.isBdiff ↔ ∃ N, τ.widthBound N := by constructor · intro bdiff rcases bdiff with ⟨M, hM⟩ diff --git a/LeanPool/DemazureProduct/Avoiding321.lean b/LeanPool/DemazureProduct/Avoiding321.lean index 19c9aa0cf7..739fb4aafb 100644 --- a/LeanPool/DemazureProduct/Avoiding321.lean +++ b/LeanPool/DemazureProduct/Avoiding321.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Nathan Pflueger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathan Pflueger -/ -import LeanPool.DemazureProduct.InvSet -import LeanPool.DemazureProduct.Submodular +module + +public import LeanPool.DemazureProduct.InvSet +public import LeanPool.DemazureProduct.Submodular +import LeanPool.DemazureProduct.Utils +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # 321-avoiding permutations @@ -15,6 +24,8 @@ permutations (not necessarily of finite length), which are all automatically in This material is not present in [An extended Demazure product](https://arxiv.org/abs/2206.14227). -/ +@[expose] public section + namespace LeanPool.DemazureProduct diff --git a/LeanPool/DemazureProduct/InvSet.lean b/LeanPool/DemazureProduct/InvSet.lean index f4dde20ebf..e60d519f49 100644 --- a/LeanPool/DemazureProduct/InvSet.lean +++ b/LeanPool/DemazureProduct/InvSet.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Nathan Pflueger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathan Pflueger -/ -import LeanPool.DemazureProduct.AspPerm +module + +public import LeanPool.DemazureProduct.AspPerm +import LeanPool.DemazureProduct.Utils import Mathlib.Algebra.BigOperators.Finprod +import Mathlib.Data.Rat.Cast.Order import Mathlib.Order.Interval.Set.Infinite +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # Inversion sets @@ -15,6 +24,8 @@ It corresponds to Theorem 2.13 of [An extended Demazure product](https://arxiv.org/abs/2206.14227). -/ +@[expose] public section + namespace LeanPool.DemazureProduct @@ -89,25 +100,25 @@ private lemma not_mem_of_ge (asps : AspSet) {m n : ℤ} (n_le_m : n ≤ m) : ⟨ asps.not_mem_of_ge (le_refl n) /-- The order on indices after the inversions in `asps` are applied. -/ -private def post_lt (asps : AspSet) (m n : ℤ) : Prop := +def postLt (asps : AspSet) (m n : ℤ) : Prop := (m < n ∧ ⟨m, n⟩ ∉ asps) ∨ (n < m ∧ ⟨n, m⟩ ∈ asps) -@[simp] private lemma not_post_lt_self (asps : AspSet) (n : ℤ) : ¬ asps.post_lt n n := by - simp only [post_lt, lt_self_iff_false, mem_AspSet, false_and, or_self, not_false_eq_true] +@[simp] private lemma not_post_lt_self (asps : AspSet) (n : ℤ) : ¬ asps.postLt n n := by + simp only [postLt, lt_self_iff_false, mem_AspSet, false_and, or_self, not_false_eq_true] private lemma post_lt_iff_not_mem (asps : AspSet) {m n : ℤ} (m_lt_n : m < n) : - asps.post_lt m n ↔ ⟨m, n⟩ ∉ asps := by - simp only [post_lt, m_lt_n, mem_AspSet, true_and, not_lt_of_gt m_lt_n, false_and, or_false] + asps.postLt m n ↔ ⟨m, n⟩ ∉ asps := by + simp only [postLt, m_lt_n, mem_AspSet, true_and, not_lt_of_gt m_lt_n, false_and, or_false] private lemma post_lt_swap_iff_mem (asps : AspSet) {m n : ℤ} (m_le_n : m ≤ n) : - asps.post_lt n m ↔ ⟨m, n⟩ ∈ asps := by + asps.postLt n m ↔ ⟨m, n⟩ ∈ asps := by rcases lt_or_eq_of_le m_le_n with m_lt_n | rfl - · simp only [post_lt, not_lt_of_gt m_lt_n, mem_AspSet, false_and, m_lt_n, true_and, false_or] + · simp only [postLt, not_lt_of_gt m_lt_n, mem_AspSet, false_and, m_lt_n, true_and, false_or] · exact iff_of_false (not_post_lt_self asps m) (not_mem_self asps m) private lemma post_lt_trans (asps : AspSet) {l m n : ℤ} - (hlm : asps.post_lt l m) (hmn : asps.post_lt m n) : - asps.post_lt l n := by + (hlm : asps.postLt l m) (hmn : asps.postLt m n) : + asps.postLt l n := by rcases hlm with (⟨l_lt_m, lm_nI⟩ | ⟨m_lt_l, ml_I⟩) · rcases hmn with (⟨m_lt_n, mn_nI⟩ | ⟨n_lt_m, nm_I⟩) · left @@ -138,7 +149,7 @@ private lemma post_lt_trans (asps : AspSet) {l m n : ℤ} refine ⟨lt_trans n_lt_m m_lt_l, ?_⟩ apply asps.closed n m l <;> assumption -private theorem post_lt_trichotomous (asps : AspSet) : Std.Trichotomous asps.post_lt := by +private theorem post_lt_trichotomous (asps : AspSet) : Std.Trichotomous asps.postLt := by -- Proof written by Codex. exact Std.trichotomous_of_rel_or_eq_or_rel_swap fun {m n} => by rcases lt_trichotomy m n with m_lt_n | rfl | n_lt_m @@ -150,7 +161,7 @@ private theorem post_lt_trichotomous (asps : AspSet) : Std.Trichotomous asps.pos · exact Or.inl <| (post_lt_swap_iff_mem asps (le_of_lt n_lt_m)).mpr nm_I · exact Or.inr <| Or.inr <| (post_lt_iff_not_mem asps n_lt_m).mpr nm_I -instance (asps : AspSet) : IsStrictTotalOrder ℤ asps.post_lt where +instance (asps : AspSet) : IsStrictTotalOrder ℤ asps.postLt where toTrichotomous := post_lt_trichotomous asps irrefl := not_post_lt_self asps trans _ _ _ := post_lt_trans asps @@ -198,10 +209,10 @@ lemma mem_outset (asps : AspSet) (n x : ℤ) : x ∈ asps.outset n ↔ ⟨n, x⟩ ∈ asps := by simp only [outset, Set.Finite.mem_toFinset, Set.mem_ofPred_eq, mem_AspSet] -/-- The half-open interval for the order `post_lt`. These are the elements +/-- The half-open interval for the order `postLt`. These are the elements `l` with `m ≤ l < n` in the post-inversion order. -/ private lemma post_Ico_set_finite (asps : AspSet) (m n : ℤ) : - ({l : ℤ | asps.post_lt l n ∧ ¬ asps.post_lt l m} : Set ℤ).Finite := by + ({l : ℤ | asps.postLt l n ∧ ¬ asps.postLt l m} : Set ℤ).Finite := by -- Proof written by GPT 5.5. refine (Finset.finite_toSet (Finset.Ico m n ∪ (asps.inset m ∪ asps.outset n))).subset ?_ intro l hl @@ -221,10 +232,10 @@ private noncomputable def post_Ico (asps : AspSet) (m n : ℤ) : Finset ℤ := (asps.post_Ico_set_finite m n).toFinset @[simp] private lemma mem_post_Ico (asps : AspSet) (m n l : ℤ) : - l ∈ asps.post_Ico m n ↔ asps.post_lt l n ∧ ¬ asps.post_lt l m := by + l ∈ asps.post_Ico m n ↔ asps.postLt l n ∧ ¬ asps.postLt l m := by simp only [post_Ico, Set.Finite.mem_toFinset, Set.mem_ofPred_eq] -private lemma post_Ico_swap_eq_empty_of_post_lt (asps : AspSet) {m n : ℤ} (hmn : asps.post_lt m n) : +private lemma post_Ico_swap_eq_empty_of_post_lt (asps : AspSet) {m n : ℤ} (hmn : asps.postLt m n) : asps.post_Ico n m = ∅ := by -- Proof written by GPT 5.5. apply Finset.eq_empty_iff_forall_notMem.mpr @@ -246,7 +257,7 @@ open Utils private lemma endpointIndicator_eq_post_lt (a k : ℤ) : oneIf (k < a) - oneIf (k ∈ asps.inset a) + oneIf (k ∈ asps.outset a) = - oneIf (asps.post_lt k a) := by + oneIf (asps.postLt k a) := by classical rcases lt_trichotomy k a with k_lt_a | rfl | a_lt_k · have not_out : k ∉ asps.outset a := fun hk => @@ -367,7 +378,7 @@ private lemma finsum_postIndicator : · simpa [U] using postIndicator_support_subset asps m n private lemma sigmaIndicator_eq_post_lt_sub (m_le_n : m ≤ n) (k : ℤ) : - sigmaIndicator asps m n k = oneIf (asps.post_lt k n) - oneIf (asps.post_lt k m) := by + sigmaIndicator asps m n k = oneIf (asps.postLt k n) - oneIf (asps.postLt k m) := by -- Proof written by GPT 5.5. classical calc @@ -381,14 +392,14 @@ private lemma sigmaIndicator_eq_post_lt_sub (m_le_n : m ≤ n) (k : ℤ) : _ = (oneIf (k < n) - oneIf (k ∈ asps.inset n) + oneIf (k ∈ asps.outset n)) - (oneIf (k < m) - oneIf (k ∈ asps.inset m) + oneIf (k ∈ asps.outset m)) := by ring - _ = oneIf (asps.post_lt k n) - oneIf (asps.post_lt k m) := by + _ = oneIf (asps.postLt k n) - oneIf (asps.postLt k m) := by rw [endpointIndicator_eq_post_lt asps n k, endpointIndicator_eq_post_lt asps m k] private lemma postIndicator_eq_post_lt_sub (k : ℤ) : - postIndicator asps m n k = oneIf (asps.post_lt k n) - oneIf (asps.post_lt k m) := by + postIndicator asps m n k = oneIf (asps.postLt k n) - oneIf (asps.postLt k m) := by -- Proof written by GPT 5.5. classical - by_cases hn : asps.post_lt k n <;> by_cases hm : asps.post_lt k m <;> + by_cases hn : asps.postLt k n <;> by_cases hm : asps.postLt k m <;> simp only [postIndicator, mem_post_Ico, oneIf, hn, hm, ite_true, ite_false, true_and, false_and, not_true_eq_false, not_false_eq_true, sub_self, sub_zero, zero_sub] @@ -411,7 +422,7 @@ private lemma σ_diff_post (m_le_n : m ≤ n) : asps.σ χ n - asps.σ χ m = _ = ((asps.post_Ico m n).card : ℤ) - (asps.post_Ico n m).card := finsum_postIndicator asps m n -private lemma σ_diff_of_post_lt (hmn : asps.post_lt m n) : +private lemma σ_diff_of_post_lt (hmn : asps.postLt m n) : asps.σ χ n - asps.σ χ m = (asps.post_Ico m n).card := by rcases hmn with ⟨m_lt_n, mn_nI⟩ | ⟨n_lt_m, nm_I⟩ · simpa [post_Ico_swap_eq_empty_of_post_lt asps ((post_lt_iff_not_mem asps m_lt_n).mpr mn_nI)] @@ -422,7 +433,7 @@ private lemma σ_diff_of_post_lt (hmn : asps.post_lt m n) : simp only [h_swap, Finset.card_empty, Nat.cast_zero, zero_sub] at key omega -private lemma σ_lt_of_post_lt (hmn : asps.post_lt m n) : asps.σ χ m < asps.σ χ n := by +private lemma σ_lt_of_post_lt (hmn : asps.postLt m n) : asps.σ χ m < asps.σ χ n := by -- Proof written by GPT 5.5. have diff := σ_diff_of_post_lt asps m n χ hmn suffices (asps.post_Ico m n).card > 0 by linarith @@ -438,18 +449,18 @@ private lemma σ_dec (m_lt_n : m < n) (mn_I : ⟨m, n⟩ ∈ asps) : asps.σ χ -- Proof written by GPT 5.5. exact σ_lt_of_post_lt asps n m χ ((post_lt_swap_iff_mem asps (le_of_lt m_lt_n)).mpr mn_I) -private lemma post_lt_iff_σ_lt : asps.post_lt m n ↔ asps.σ χ m < asps.σ χ n := by +private lemma post_lt_iff_σ_lt : asps.postLt m n ↔ asps.σ χ m < asps.σ χ n := by -- Proof written by GPT 5.5. constructor · exact σ_lt_of_post_lt asps m n χ · intro hσ - rcases trichotomous_of asps.post_lt m n with hmn | rfl | hnm + rcases trichotomous_of asps.postLt m n with hmn | rfl | hnm · exact hmn · exact (lt_irrefl _ hσ).elim · exact ((not_lt_of_gt (σ_lt_of_post_lt asps n m χ hnm)) hσ).elim private lemma not_post_lt_iff_σ_le : - ¬ asps.post_lt m n ↔ asps.σ χ n ≤ asps.σ χ m := by + ¬ asps.postLt m n ↔ asps.σ χ n ≤ asps.σ χ m := by rw [post_lt_iff_σ_lt] exact not_lt @@ -460,7 +471,7 @@ private lemma mem_iff_lt (m_le_n : m ≤ n) : ⟨m, n⟩ ∈ asps ↔ asps.σ χ private theorem func_injective (asps : AspSet) : Function.Injective (asps.recon χ) := by -- Proof written by GPT 5.5. intro m n hσ - rcases trichotomous_of asps.post_lt m n with hmn | rfl | hnm + rcases trichotomous_of asps.postLt m n with hmn | rfl | hnm · have hlt := σ_lt_of_post_lt asps m n χ hmn exact ((ne_of_lt hlt) hσ).elim · rfl @@ -648,7 +659,7 @@ theorem func_asp : isAsp (asps.recon χ) := by /-- Package the function reconstructed from an ASP set and a shift as an `AspPerm`. -/ noncomputable def toAspPerm : AspPerm := - ⟨asps.recon χ, func_bijective asps χ, func_asp asps χ⟩ + ⟨asps.recon χ, (by exact func_bijective asps χ), (by exact func_asp asps χ)⟩ lemma invSet_of_toAspPerm : invSet (toAspPerm asps χ)= asps := invSet_func asps χ diff --git a/LeanPool/DemazureProduct/ReducedProducts.lean b/LeanPool/DemazureProduct/ReducedProducts.lean index c614b891ab..3c5688f7e4 100644 --- a/LeanPool/DemazureProduct/ReducedProducts.lean +++ b/LeanPool/DemazureProduct/ReducedProducts.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Nathan Pflueger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathan Pflueger -/ -import LeanPool.DemazureProduct.Submodular +module + +public import LeanPool.DemazureProduct.Submodular +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Reduced products @@ -13,6 +20,8 @@ permutations. It corresponds roughly to Section 5 of [An extended Demazure product](https://arxiv.org/abs/2206.14227). -/ +@[expose] public section + namespace LeanPool.DemazureProduct diff --git a/LeanPool/DemazureProduct/Reduction.lean b/LeanPool/DemazureProduct/Reduction.lean index 343157ece4..17c4b2ae86 100644 --- a/LeanPool/DemazureProduct/Reduction.lean +++ b/LeanPool/DemazureProduct/Reduction.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 Nathan Pflueger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathan Pflueger -/ +module + +public import LeanPool.DemazureProduct.Submodular import LeanPool.DemazureProduct.ReducedProducts +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Reduction theorems @@ -13,6 +22,8 @@ This file formalizes the main theorems from the introduction of (`thm:reduce`) reduces inequalities `α ⋆ β ≥ γ` to equalities of reduced products. It corresponds roughly to Section 6 of the paper. -/ +@[expose] public section + namespace LeanPool.DemazureProduct diff --git a/LeanPool/DemazureProduct/SlipFace.lean b/LeanPool/DemazureProduct/SlipFace.lean index a3d5028e30..26221372c0 100644 --- a/LeanPool/DemazureProduct/SlipFace.lean +++ b/LeanPool/DemazureProduct/SlipFace.lean @@ -3,9 +3,19 @@ Copyright (c) 2026 Nathan Pflueger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathan Pflueger -/ -import LeanPool.DemazureProduct.Valley -import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.Data.Int.Interval +module + +public import LeanPool.DemazureProduct.Valley +public import Mathlib.Data.Int.Interval +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.ToAdditive +import Mathlib.Algebra.BigOperators.Group.Finset.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Slipfaces @@ -16,6 +26,8 @@ Section 3, with some essential-set material from Section 7.1, of [An extended Demazure product](https://arxiv.org/abs/2206.14227). -/ +@[expose] public section + namespace LeanPool.DemazureProduct @@ -462,7 +474,7 @@ private lemma star_exists (s t : SlipFace) : ∃ p : SlipFace, See *Definition 3.7* (`defn:sfAlgebra`) of [An extended Demazure product](https://arxiv.org/abs/2206.14227).* -/ noncomputable def star (s t : SlipFace) : SlipFace := - Classical.choose (star_exists s t) + Classical.choose (private_decl% (star_exists s t)) noncomputable instance : Mul SlipFace := ⟨star⟩ @@ -959,7 +971,7 @@ private lemma rres_exists (s t : SlipFace) (a b : ℤ) : ∃ m, ∀ l, /-- The argmax witnessing the right residual value $s \triangleright t (a,b)$. -/ noncomputable def rresWit (s t : SlipFace) (a b : ℤ) : ℤ := - Classical.choose (rres_exists s t a b) + Classical.choose (private_decl% (rres_exists s t a b)) /-- The right residual function $$ @@ -1158,7 +1170,7 @@ private lemma lres_exists (s t : SlipFace) : ∃ p : SlipFace, `lresFunc`. See *Definition 3.7* (`defn:sfAlgebra`) of [An extended Demazure product](https://arxiv.org/abs/2206.14227). -/ noncomputable def lres (s t : SlipFace) : SlipFace := - Classical.choose (lres_exists s t) + Classical.choose (private_decl% (lres_exists s t)) /-- Infix notation for the slipface left residual. -/ infixl:70 " ◃ " => lres diff --git a/LeanPool/DemazureProduct/Submodular.lean b/LeanPool/DemazureProduct/Submodular.lean index fbc0f5209b..9720003ca1 100644 --- a/LeanPool/DemazureProduct/Submodular.lean +++ b/LeanPool/DemazureProduct/Submodular.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Nathan Pflueger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathan Pflueger -/ -import LeanPool.DemazureProduct.AspPerm -import LeanPool.DemazureProduct.Valley +module + +public import LeanPool.DemazureProduct.AspPerm import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Submodular slipfaces @@ -16,6 +22,8 @@ It corresponds roughly to Section 4 of [An extended Demazure product](https://arxiv.org/abs/2206.14227). -/ +@[expose] public section + namespace LeanPool.DemazureProduct @@ -191,8 +199,8 @@ private lemma asp_bijective {s : SlipFace} (hsub : s.submodular) : /-- The ASP permutation associated to a submodular slipface. It can be reconstructed from the set $\Gamma$ in the manner described in Section 4 of [An extended Demazure product](https://arxiv.org/abs/2206.14227). -/ noncomputable def asp {s : SlipFace} (hsub : s.submodular) : AspPerm where - func := fun b => (unique_a hsub b).choose - bijective := asp_bijective hsub + func := fun b => (private_decl% (unique_a hsub b)).choose + bijective := by exact asp_bijective hsub asp := by let S := {b : ℤ | b * (asp_func hsub b) < 0} suffices S.Finite by exact this @@ -375,7 +383,7 @@ the $M_{\alpha \star \beta}(a,b)$ of [An extended Demazure product](https://arxiv.org/abs/2206.14227). In Lean that rightmost minimizer is `(AspValley α β a b).M`. *Definition 4.6 of [An extended Demazure product](https://arxiv.org/abs/2206.14227), unlabeled in source.* -/ -private noncomputable def AspValley (α β : AspPerm) (a b : ℤ) : Valley where +noncomputable def AspValley (α β : AspPerm) (a b : ℤ) : Valley where f := fun l => α.s a l + β.s l b rises := by intro m @@ -1053,7 +1061,7 @@ $$ In Lean this operation is written `α ⋆ β`. -/ noncomputable def star (α β : AspPerm) : AspPerm := - Classical.choose (star_exists α β) + Classical.choose (private_decl% (star_exists α β)) /-- The Demazure product on ASP is characterized by the equation $s_{\alpha \star \beta} = s_\alpha \star s_\beta$. @@ -1070,7 +1078,7 @@ $s_{\alpha \triangleleft \beta} = s_\alpha \triangleleft s_\beta$. In Lean this operation is written `α ◃ β`. -/ noncomputable def lres (α β : AspPerm) : AspPerm := - Classical.choose (lres_exists α β) + Classical.choose (private_decl% (lres_exists α β)) /-- Left residual on ASP permutations is characterized by $s_{\alpha \triangleleft \beta} = s_\alpha \triangleleft s_\beta$. @@ -1088,7 +1096,7 @@ $s_{\alpha \triangleright \beta} = s_\alpha \triangleright s_\beta$. In Lean this operation is written `α ▹ β`. -/ noncomputable def rres (α β : AspPerm) : AspPerm := - Classical.choose (rres_exists α β) + Classical.choose (private_decl% (rres_exists α β)) /-- Right residual on ASP permutations is characterized by $s_{\alpha \triangleright \beta} = s_\alpha \triangleright s_\beta$. diff --git a/LeanPool/DemazureProduct/Tableaux.lean b/LeanPool/DemazureProduct/Tableaux.lean index 70adcc3210..5674db4876 100644 --- a/LeanPool/DemazureProduct/Tableaux.lean +++ b/LeanPool/DemazureProduct/Tableaux.lean @@ -3,7 +3,17 @@ Copyright (c) 2026 Nathan Pflueger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathan Pflueger -/ -import LeanPool.DemazureProduct.Avoiding321 +module + +public import Mathlib.Data.NNRat.Defs + +public import LeanPool.DemazureProduct.Avoiding321 +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Tableaux @@ -16,6 +26,8 @@ it gives an additional formal correspondence between fixed-shift set-valued tabl Hecke factorizations for the 321-avoiding case. -/ +@[expose] public section + namespace LeanPool.DemazureProduct diff --git a/LeanPool/DemazureProduct/Transpositions.lean b/LeanPool/DemazureProduct/Transpositions.lean index a0c0a59e1c..7606582818 100644 --- a/LeanPool/DemazureProduct/Transpositions.lean +++ b/LeanPool/DemazureProduct/Transpositions.lean @@ -3,7 +3,17 @@ Copyright (c) 2026 Nathan Pflueger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathan Pflueger -/ -import LeanPool.DemazureProduct.Reduction +module + +public import LeanPool.DemazureProduct.Submodular +public import LeanPool.DemazureProduct.Utils +import LeanPool.DemazureProduct.ReducedProducts +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Transpositions @@ -15,6 +25,8 @@ Theorem A and the theorem labeled `thm:resL`, which describe the special case of $S = \{n\}$ a singleton. -/ +@[expose] public section + namespace LeanPool.DemazureProduct @@ -103,8 +115,8 @@ private lemma sigmaFun_asp (S : Set ℤ) : isAsp (sigmaFun S) := by for $n \in S$. -/ noncomputable def sigma (S : Set ℤ) (hS : NoConsecutive S) : AspPerm where func := sigmaFun S - bijective := ⟨sigmaFun_injective hS, sigmaFun_surjective hS⟩ - asp := sigmaFun_asp S + bijective := by exact ⟨sigmaFun_injective hS, sigmaFun_surjective hS⟩ + asp := by exact sigmaFun_asp S @[simp] private lemma sigma_apply (S : Set ℤ) (hS : NoConsecutive S) (n : ℤ) : sigma S hS n = sigmaFun S n := rfl @@ -848,7 +860,7 @@ private lemma residual_sigma_eq_self (α : AspPerm) (S : Set ℤ) (hS : NoConsec [An extended Demazure product](https://arxiv.org/abs/2206.14227), part 1/4.* -/ theorem starSigma (α : AspPerm) (S : Set ℤ) (hS : NoConsecutive S) : α ⋆ sigma S hS = - α * sigma (risingSet α S) (noConsecutive_risingSet α hS) := by + α * sigma (risingSet α S) (by exact noConsecutive_risingSet α hS) := by -- Proof written by GPT 5.5. let R := risingSet α S let F := fallingSet α S @@ -887,7 +899,7 @@ theorem starSigma (α : AspPerm) (S : Set ℤ) (hS : NoConsecutive S) : [An extended Demazure product](https://arxiv.org/abs/2206.14227), part 2/4.* -/ theorem residualSigma (α : AspPerm) (S : Set ℤ) (hS : NoConsecutive S) : α ◃ sigma S hS = - α * sigma (fallingSet α S) (noConsecutive_fallingSet α hS) := by + α * sigma (fallingSet α S) (by exact noConsecutive_fallingSet α hS) := by -- Proof written by GPT 5.5. let R := risingSet α S let F := fallingSet α S diff --git a/LeanPool/DemazureProduct/Utils.lean b/LeanPool/DemazureProduct/Utils.lean index 63ed6d0645..26202cb09f 100644 --- a/LeanPool/DemazureProduct/Utils.lean +++ b/LeanPool/DemazureProduct/Utils.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Nathan Pflueger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathan Pflueger -/ +module + +public import Mathlib.Data.Int.Interval +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.Data.Finset.Card -import Mathlib.Data.Int.Basic -import Mathlib.Data.Int.Interval -import Mathlib.Tactic.Linarith +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Auxiliary utilities @@ -16,6 +21,8 @@ This file contains small helper lemmas. These are all generic -- they are not sp repository's main objects, so they are collected separately here. -/ +@[expose] public section + namespace LeanPool.DemazureProduct diff --git a/LeanPool/DemazureProduct/Valley.lean b/LeanPool/DemazureProduct/Valley.lean index 4f39b5c3fc..e525629134 100644 --- a/LeanPool/DemazureProduct/Valley.lean +++ b/LeanPool/DemazureProduct/Valley.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Nathan Pflueger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathan Pflueger -/ -import Mathlib.Data.Finset.Max -import Mathlib.Data.Int.Basic -import Mathlib.Data.Set.Finite.Basic -import Mathlib.Tactic.Linarith +module + +public import Mathlib.Data.Finset.Max +public import Mathlib.Data.Set.Finite.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Valleys @@ -19,6 +24,8 @@ to keep track of the set where the minimum value is achieved, and some facts abo changes when the valley is modified in simple ways. -/ +@[expose] public section + namespace LeanPool.DemazureProduct diff --git a/LeanPool/Desargues.lean b/LeanPool/Desargues.lean index 45f66eeb57..edc573bd32 100644 --- a/LeanPool/Desargues.lean +++ b/LeanPool/Desargues.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Abdullah Uyu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Abdullah Uyu -/ +module -import LeanPool.Desargues.Basic -import LeanPool.Desargues.Morphism -import LeanPool.Desargues.PV -import LeanPool.Desargues.Structure +public import LeanPool.Desargues.Basic +public import LeanPool.Desargues.Morphism +public import LeanPool.Desargues.PV +public import LeanPool.Desargues.Structure /-! # Axiomatic projective geometry (Faure–Frölicher) @@ -20,6 +21,8 @@ Tags: projective-geometry, incidence-geometry, geometry MSC: 51A05, 51A30 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Desargues/Basic.lean b/LeanPool/Desargues/Basic.lean index 5f9a5e2030..e3d42e7398 100644 --- a/LeanPool/Desargues/Basic.lean +++ b/LeanPool/Desargues/Basic.lean @@ -3,8 +3,19 @@ Copyright (c) 2026 Abdullah Uyu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Abdullah Uyu -/ - -import Mathlib.Data.Set.Card +module + +public import Aesop.BuiltinRules +public import Mathlib.Data.Set.Basic +public import Mathlib.Tactic.ToAdditive +public meta import Mathlib.Tactic.ToDual +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Set.Image +import Mathlib.Tactic.ApplyAt +import Mathlib.Tactic.Attr.Core +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.Set +import Mathlib.Tactic.SetLike /-! # Basic projective geometry @@ -13,6 +24,8 @@ Defines the projective-geometry axioms, the line operator, and central projection between lines in an axiomatic projective geometry. -/ +@[expose] public section + open Set namespace Basic diff --git a/LeanPool/Desargues/Morphism.lean b/LeanPool/Desargues/Morphism.lean index 8335afbcbd..34e98c6233 100644 --- a/LeanPool/Desargues/Morphism.lean +++ b/LeanPool/Desargues/Morphism.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Abdullah Uyu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Abdullah Uyu -/ +module -import LeanPool.Desargues.Basic +public import LeanPool.Desargues.Basic +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.SetLike /-! # Morphisms of projective geometries @@ -13,6 +17,8 @@ Defines isomorphisms of projective geometries as bijections preserving the collinearity relation. -/ +@[expose] public section + open Basic /-- An isomorphism of projective geometries is a bijective map `f : G₁ → G₂` diff --git a/LeanPool/Desargues/PV.lean b/LeanPool/Desargues/PV.lean index 4491647590..72822c535d 100644 --- a/LeanPool/Desargues/PV.lean +++ b/LeanPool/Desargues/PV.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Abdullah Uyu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Abdullah Uyu -/ +module -import Mathlib.LinearAlgebra.Projectivization.Basic -import Mathlib.LinearAlgebra.Projectivization.Independence -import Mathlib.LinearAlgebra.Dimension.Constructions +public import Mathlib.LinearAlgebra.Projectivization.Independence +public import LeanPool.Desargues.Basic import Mathlib.LinearAlgebra.Dimension.OrzechProperty import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas -import LeanPool.Desargues.Basic /-! # Projectivizations as projective geometries @@ -18,6 +17,8 @@ Proves that Mathlib projectivizations satisfy the projective-geometry axioms for the dependence-based collinearity relation. -/ +@[expose] public section + open Finset Set Submodule FiniteDimensional Projectivization open scoped LinearAlgebra.Projectivization diff --git a/LeanPool/Desargues/Structure.lean b/LeanPool/Desargues/Structure.lean index 34250307ce..5d3e35d327 100644 --- a/LeanPool/Desargues/Structure.lean +++ b/LeanPool/Desargues/Structure.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Abdullah Uyu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Abdullah Uyu -/ +module -import LeanPool.Desargues.Basic +public import LeanPool.Desargues.Basic +public import Mathlib.Data.Set.Restrict +public import Mathlib.Order.SetNotation +public import Mathlib.Tactic.Attr.Core +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.ApplyAt +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.SetLike /-! # Subspaces and subgeometries @@ -13,6 +21,8 @@ Defines subspaces of an axiomatic projective geometry and the induced projective subgeometry structure on a closed subset. -/ +@[expose] public section + open Set open Basic diff --git a/LeanPool/DirectedTopologyLean4.lean b/LeanPool/DirectedTopologyLean4.lean index 8217aef6cf..efbd02d4ed 100644 --- a/LeanPool/DirectedTopologyLean4.lean +++ b/LeanPool/DirectedTopologyLean4.lean @@ -3,34 +3,35 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ +module -import LeanPool.DirectedTopologyLean4.Constructions -import LeanPool.DirectedTopologyLean4.CoverLemma -import LeanPool.DirectedTopologyLean4.DihomotopyCover -import LeanPool.DirectedTopologyLean4.DihomotopyFlip -import LeanPool.DirectedTopologyLean4.DihomotopyToPathDihomotopy -import LeanPool.DirectedTopologyLean4.Dipath -import LeanPool.DirectedTopologyLean4.DipathSubtype -import LeanPool.DirectedTopologyLean4.DirectedHomotopy -import LeanPool.DirectedTopologyLean4.DirectedMap -import LeanPool.DirectedTopologyLean4.DirectedPathHomotopy -import LeanPool.DirectedTopologyLean4.DirectedSpace -import LeanPool.DirectedTopologyLean4.DirectedUnitInterval -import LeanPool.DirectedTopologyLean4.DirectedVanKampen -import LeanPool.DirectedTopologyLean4.DTop -import LeanPool.DirectedTopologyLean4.Fraction -import LeanPool.DirectedTopologyLean4.FractionEqualities -import LeanPool.DirectedTopologyLean4.FundamentalCategory -import LeanPool.DirectedTopologyLean4.Interpolate -import LeanPool.DirectedTopologyLean4.MonotonePath -import LeanPool.DirectedTopologyLean4.MorphismAux -import LeanPool.DirectedTopologyLean4.PathCover -import LeanPool.DirectedTopologyLean4.PushoutAlternative -import LeanPool.DirectedTopologyLean4.SplitDihomotopy -import LeanPool.DirectedTopologyLean4.SplitPath -import LeanPool.DirectedTopologyLean4.StretchPath -import LeanPool.DirectedTopologyLean4.TransRefl -import LeanPool.DirectedTopologyLean4.UnitIntervalAux +public import LeanPool.DirectedTopologyLean4.Constructions +public import LeanPool.DirectedTopologyLean4.CoverLemma +public import LeanPool.DirectedTopologyLean4.DihomotopyCover +public import LeanPool.DirectedTopologyLean4.DihomotopyFlip +public import LeanPool.DirectedTopologyLean4.DihomotopyToPathDihomotopy +public import LeanPool.DirectedTopologyLean4.Dipath +public import LeanPool.DirectedTopologyLean4.DipathSubtype +public import LeanPool.DirectedTopologyLean4.DirectedHomotopy +public import LeanPool.DirectedTopologyLean4.DirectedMap +public import LeanPool.DirectedTopologyLean4.DirectedPathHomotopy +public import LeanPool.DirectedTopologyLean4.DirectedSpace +public import LeanPool.DirectedTopologyLean4.DirectedUnitInterval +public import LeanPool.DirectedTopologyLean4.DirectedVanKampen +public import LeanPool.DirectedTopologyLean4.DTop +public import LeanPool.DirectedTopologyLean4.Fraction +public import LeanPool.DirectedTopologyLean4.FractionEqualities +public import LeanPool.DirectedTopologyLean4.FundamentalCategory +public import LeanPool.DirectedTopologyLean4.Interpolate +public import LeanPool.DirectedTopologyLean4.MonotonePath +public import LeanPool.DirectedTopologyLean4.MorphismAux +public import LeanPool.DirectedTopologyLean4.PathCover +public import LeanPool.DirectedTopologyLean4.PushoutAlternative +public import LeanPool.DirectedTopologyLean4.SplitDihomotopy +public import LeanPool.DirectedTopologyLean4.SplitPath +public import LeanPool.DirectedTopologyLean4.StretchPath +public import LeanPool.DirectedTopologyLean4.TransRefl +public import LeanPool.DirectedTopologyLean4.UnitIntervalAux /-! # Directed Topology in Lean 4 @@ -42,3 +43,5 @@ Main declarations: `DirectedSpace`, `Dipath`, `DirectedVanKampen.directed_van_ka Tags: directed-topology, algebraic-topology, category-theory MSC: 55U40, 55Q05, 18A30 -/ + +@[expose] public section diff --git a/LeanPool/DirectedTopologyLean4/Constructions.lean b/LeanPool/DirectedTopologyLean4/Constructions.lean index 6f0dd9dac7..a5e2242845 100644 --- a/LeanPool/DirectedTopologyLean4/Constructions.lean +++ b/LeanPool/DirectedTopologyLean4/Constructions.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.DirectedMap +module + +public import LeanPool.DirectedTopologyLean4.DirectedMap import LeanPool.DirectedTopologyLean4.MonotonePath /-! # LeanPool.DirectedTopologyLean4.Constructions -/ +@[expose] public section + /- This file contains constructions of directed spaces such as: * The directed space induced by a preorder on a topological space. diff --git a/LeanPool/DirectedTopologyLean4/CoverLemma.lean b/LeanPool/DirectedTopologyLean4/CoverLemma.lean index b715e92d5a..44ab419829 100644 --- a/LeanPool/DirectedTopologyLean4/CoverLemma.lean +++ b/LeanPool/DirectedTopologyLean4/CoverLemma.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import Mathlib.Topology.MetricSpace.Basic +module + +public import LeanPool.DirectedTopologyLean4.Fraction import Mathlib.Topology.MetricSpace.Pseudo.Real -import Mathlib.Topology.UnitInterval -import LeanPool.DirectedTopologyLean4.Fraction /-! ### Auxiliary lemmas -/ +@[expose] public section + /- This file contains two applications of the Lebesgue Number Lemma: One concerns the unit interval and the other concerns the unit square. diff --git a/LeanPool/DirectedTopologyLean4/DTop.lean b/LeanPool/DirectedTopologyLean4/DTop.lean index af0de66129..8096b18200 100644 --- a/LeanPool/DirectedTopologyLean4/DTop.lean +++ b/LeanPool/DirectedTopologyLean4/DTop.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.Constructions -import Mathlib.CategoryTheory.ConcreteCategory.Basic -import Mathlib.CategoryTheory.Elementwise +module + +public import LeanPool.DirectedTopologyLean4.Constructions +public import Mathlib.CategoryTheory.ConcreteCategory.Basic /-! # LeanPool.DirectedTopologyLean4.DTop -/ +@[expose] public section + /- This file contains the definition of `dTopCat`, the category of directed spaces. The structure of this file is based on the approach for the undirected version in Mathlib: diff --git a/LeanPool/DirectedTopologyLean4/DihomotopyCover.lean b/LeanPool/DirectedTopologyLean4/DihomotopyCover.lean index cc5658c96b..813b31d4da 100644 --- a/LeanPool/DirectedTopologyLean4/DihomotopyCover.lean +++ b/LeanPool/DirectedTopologyLean4/DihomotopyCover.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.PathCover -import LeanPool.DirectedTopologyLean4.SplitDihomotopy +module + +public import LeanPool.DirectedTopologyLean4.PathCover +public import LeanPool.DirectedTopologyLean4.SplitDihomotopy +public import LeanPool.DirectedTopologyLean4.CoverLemma /-! # LeanPool.DirectedTopologyLean4.DihomotopyCover -/ +@[expose] public section + /- This file contains the definition of a (n, m)-covered (dipath) dihomotopy, covered by X₁ and X₂: It maps all subrectangles [i/n, (i+1)/n] × [j/m, (j+1)/m] into either X₁ or X₂ diff --git a/LeanPool/DirectedTopologyLean4/DihomotopyFlip.lean b/LeanPool/DirectedTopologyLean4/DihomotopyFlip.lean index 44f6c88f99..34404819c3 100644 --- a/LeanPool/DirectedTopologyLean4/DihomotopyFlip.lean +++ b/LeanPool/DirectedTopologyLean4/DihomotopyFlip.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.DirectedHomotopy +module + +public import LeanPool.DirectedTopologyLean4.DirectedHomotopy +public import LeanPool.DirectedTopologyLean4.DTop /-! # LeanPool.DirectedTopologyLean4.DihomotopyFlip -/ +@[expose] public section + /- If we have a dihomotopy `F` from `f : D(I,X)` to `g : D(I,X)`: C----- g -----D diff --git a/LeanPool/DirectedTopologyLean4/DihomotopyToPathDihomotopy.lean b/LeanPool/DirectedTopologyLean4/DihomotopyToPathDihomotopy.lean index 46a70356ec..409d9dcd54 100644 --- a/LeanPool/DirectedTopologyLean4/DihomotopyToPathDihomotopy.lean +++ b/LeanPool/DirectedTopologyLean4/DihomotopyToPathDihomotopy.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.FundamentalCategory -import LeanPool.DirectedTopologyLean4.DihomotopyFlip +module + +public import LeanPool.DirectedTopologyLean4.DihomotopyFlip +public import LeanPool.DirectedTopologyLean4.DirectedPathHomotopy /-! # LeanPool.DirectedTopologyLean4.DihomotopyToPathDihomotopy -/ +@[expose] public section + /- This file contains the construction of the following statement: diff --git a/LeanPool/DirectedTopologyLean4/Dipath.lean b/LeanPool/DirectedTopologyLean4/Dipath.lean index 21c2a55668..6d46238a1f 100644 --- a/LeanPool/DirectedTopologyLean4/Dipath.lean +++ b/LeanPool/DirectedTopologyLean4/Dipath.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.DirectedUnitInterval -import LeanPool.DirectedTopologyLean4.UnitIntervalAux -import LeanPool.DirectedTopologyLean4.Fraction +module + +public import LeanPool.DirectedTopologyLean4.DirectedUnitInterval +public import LeanPool.DirectedTopologyLean4.Fraction /-! # LeanPool.DirectedTopologyLean4.Dipath -/ +@[expose] public section + /- This file contains the definition of a dipath in a directed space: A path between two points paired with the proof that it is a dipath. diff --git a/LeanPool/DirectedTopologyLean4/DipathSubtype.lean b/LeanPool/DirectedTopologyLean4/DipathSubtype.lean index 3f784ab502..c233148edd 100644 --- a/LeanPool/DirectedTopologyLean4/DipathSubtype.lean +++ b/LeanPool/DirectedTopologyLean4/DipathSubtype.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.FundamentalCategory +module + +public import LeanPool.DirectedTopologyLean4.FundamentalCategory /-! # LeanPool.DirectedTopologyLean4.DipathSubtype -/ +@[expose] public section + /- This file contains properties of dipaths contained in directed subspaces of a directed space. In particular, properties about their equivalence classes in the fundamental category. diff --git a/LeanPool/DirectedTopologyLean4/DirectedHomotopy.lean b/LeanPool/DirectedTopologyLean4/DirectedHomotopy.lean index ad57458227..ee0b024a11 100644 --- a/LeanPool/DirectedTopologyLean4/DirectedHomotopy.lean +++ b/LeanPool/DirectedTopologyLean4/DirectedHomotopy.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.SplitPath.SplitDipath -import LeanPool.DirectedTopologyLean4.StretchPath +module + +public import LeanPool.DirectedTopologyLean4.SplitPath.SplitDipath +public import LeanPool.DirectedTopologyLean4.StretchPath +public import Mathlib.Topology.Homotopy.Basic +import Mathlib.CategoryTheory.Category.Init /-! # LeanPool.DirectedTopologyLean4.DirectedHomotopy -/ +@[expose] public section + /- This file contains the definitions of three type of directed homotopies: * `Dihomotopy f g` : the type of homotopies between two directed maps `f g : D(X,Y)`. @@ -394,7 +400,7 @@ def cast {f₀ f₁ g₀ g₁ : D(X,Y)} (F : Dihomotopy f₀ f₁) (h₀ : f₀ map_one_left := by simp [←h₁] /-- Horizontal composition for `ContinuousMap.Homotopy`. -/ -private def Homotopy.hcomp' {f₀ f₁ : C(X, Y)} {g₀ g₁ : C(Y, Z)} +def Homotopy.hcomp' {f₀ f₁ : C(X, Y)} {g₀ g₁ : C(Y, Z)} (F : ContinuousMap.Homotopy f₀ f₁) (G : ContinuousMap.Homotopy g₀ g₁) : ContinuousMap.Homotopy (g₀.comp f₀) (g₁.comp f₁) where toFun := fun p => G (p.1, F p) diff --git a/LeanPool/DirectedTopologyLean4/DirectedMap.lean b/LeanPool/DirectedTopologyLean4/DirectedMap.lean index af3dc1fd01..8795d6047e 100644 --- a/LeanPool/DirectedTopologyLean4/DirectedMap.lean +++ b/LeanPool/DirectedTopologyLean4/DirectedMap.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.DirectedSpace +module + +public import LeanPool.DirectedTopologyLean4.DirectedSpace /-! # LeanPool.DirectedTopologyLean4.DirectedMap -/ +@[expose] public section + /- # Definition of directed maps This file defines the directed map between two directed spaces `X` and `Y` : diff --git a/LeanPool/DirectedTopologyLean4/DirectedPathHomotopy.lean b/LeanPool/DirectedTopologyLean4/DirectedPathHomotopy.lean index 1d26811173..c8a5c1c451 100644 --- a/LeanPool/DirectedTopologyLean4/DirectedPathHomotopy.lean +++ b/LeanPool/DirectedTopologyLean4/DirectedPathHomotopy.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.DirectedHomotopy -import LeanPool.DirectedTopologyLean4.TransRefl -import Mathlib.Topology.Homotopy.Path +module + +public import LeanPool.DirectedTopologyLean4.DirectedHomotopy +public import LeanPool.DirectedTopologyLean4.TransRefl /-! # LeanPool.DirectedTopologyLean4.DirectedPathHomotopy -/ +@[expose] public section + /- This file contains the definition of a directed path homotopy, or `Dipath.Dihomotopy`: It is a dihomotopy between two paths that keeps the endpoints fixed. diff --git a/LeanPool/DirectedTopologyLean4/DirectedSpace.lean b/LeanPool/DirectedTopologyLean4/DirectedSpace.lean index 45bfefef9a..09b3a88b2b 100644 --- a/LeanPool/DirectedTopologyLean4/DirectedSpace.lean +++ b/LeanPool/DirectedTopologyLean4/DirectedSpace.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import Mathlib.Topology.Connected.PathConnected +module + +public import Mathlib.Topology.Path /-! # LeanPool.DirectedTopologyLean4.DirectedSpace -/ +@[expose] public section + /- # Definition of directed spaces This file defines the directed space, an extension of a topological space where diff --git a/LeanPool/DirectedTopologyLean4/DirectedUnitInterval.lean b/LeanPool/DirectedTopologyLean4/DirectedUnitInterval.lean index e8a37d2972..a4c47b40b3 100644 --- a/LeanPool/DirectedTopologyLean4/DirectedUnitInterval.lean +++ b/LeanPool/DirectedTopologyLean4/DirectedUnitInterval.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.Constructions +module + +public import LeanPool.DirectedTopologyLean4.Constructions +import LeanPool.DirectedTopologyLean4.MonotonePath /-! # LeanPool.DirectedTopologyLean4.DirectedUnitInterval -/ +@[expose] public section + /- This file contains the definition of the directed unit interval. The directedness is induced by the preorder it inherits from ℝ. diff --git a/LeanPool/DirectedTopologyLean4/DirectedVanKampen.lean b/LeanPool/DirectedTopologyLean4/DirectedVanKampen.lean index 7f2f6b4629..827c92d102 100644 --- a/LeanPool/DirectedTopologyLean4/DirectedVanKampen.lean +++ b/LeanPool/DirectedTopologyLean4/DirectedVanKampen.lean @@ -3,16 +3,23 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.IsPullback.Basic -import LeanPool.DirectedTopologyLean4.DihomotopyCover -import LeanPool.DirectedTopologyLean4.PushoutAlternative +module + +public import LeanPool.DirectedTopologyLean4.DihomotopyCover +public import LeanPool.DirectedTopologyLean4.DipathSubtype +public import Mathlib.CategoryTheory.Limits.Shapes.Pullback.IsPullback.Defs import LeanPool.DirectedTopologyLean4.DihomotopyToPathDihomotopy +import LeanPool.DirectedTopologyLean4.FractionEqualities import LeanPool.DirectedTopologyLean4.MorphismAux +import LeanPool.DirectedTopologyLean4.PushoutAlternative +import LeanPool.DirectedTopologyLean4.SplitPath.SplitProperties /-! # LeanPool.DirectedTopologyLean4.DirectedVanKampen -/ +@[expose] public section + /- This file contains the directed version of the Van Kampen Theorem. The statement is as follows: diff --git a/LeanPool/DirectedTopologyLean4/Fraction.lean b/LeanPool/DirectedTopologyLean4/Fraction.lean index bb73026bea..c8840a23e9 100644 --- a/LeanPool/DirectedTopologyLean4/Fraction.lean +++ b/LeanPool/DirectedTopologyLean4/Fraction.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import Mathlib.Topology.Connected.PathConnected +module + +public import Mathlib.Topology.UnitInterval /-! # LeanPool.DirectedTopologyLean4.Fraction -/ +@[expose] public section + open scoped unitInterval noncomputable section diff --git a/LeanPool/DirectedTopologyLean4/FractionEqualities.lean b/LeanPool/DirectedTopologyLean4/FractionEqualities.lean index 85450d7447..e7c2394b57 100644 --- a/LeanPool/DirectedTopologyLean4/FractionEqualities.lean +++ b/LeanPool/DirectedTopologyLean4/FractionEqualities.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.Fraction +module + +public import LeanPool.DirectedTopologyLean4.Fraction /-! # LeanPool.DirectedTopologyLean4.FractionEqualities -/ +@[expose] public section + namespace FractionEqualities lemma one_sub_inverse_of_add_one {n : ℝ} (hn : n + 1 ≠ 0) : diff --git a/LeanPool/DirectedTopologyLean4/FundamentalCategory.lean b/LeanPool/DirectedTopologyLean4/FundamentalCategory.lean index aa7be23206..2acfe01d4c 100644 --- a/LeanPool/DirectedTopologyLean4/FundamentalCategory.lean +++ b/LeanPool/DirectedTopologyLean4/FundamentalCategory.lean @@ -3,15 +3,17 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import Mathlib.CategoryTheory.Category.Basic -import Mathlib.CategoryTheory.Category.Cat -import LeanPool.DirectedTopologyLean4.DirectedPathHomotopy -import Mathlib.AlgebraicTopology.FundamentalGroupoid.Basic +module + +public import LeanPool.DirectedTopologyLean4.DirectedPathHomotopy +public import LeanPool.DirectedTopologyLean4.DTop /-! # LeanPool.DirectedTopologyLean4.FundamentalCategory -/ +@[expose] public section + /- This file contains the definition of the fundamental category of a directed space. We follow the structure of the undirected version found at: diff --git a/LeanPool/DirectedTopologyLean4/Interpolate.lean b/LeanPool/DirectedTopologyLean4/Interpolate.lean index ee8373df2d..68a18cf246 100644 --- a/LeanPool/DirectedTopologyLean4/Interpolate.lean +++ b/LeanPool/DirectedTopologyLean4/Interpolate.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.Dipath -import LeanPool.DirectedTopologyLean4.DTop +module + +public import LeanPool.DirectedTopologyLean4.DirectedUnitInterval +import Mathlib.CategoryTheory.Category.Init /-! # LeanPool.DirectedTopologyLean4.Interpolate -/ +@[expose] public section + /- This file contains definitions about interpolating points in the directed unit interval and contains conditions about when interpolating gives directed maps. diff --git a/LeanPool/DirectedTopologyLean4/MonotonePath.lean b/LeanPool/DirectedTopologyLean4/MonotonePath.lean index 5a9faec60f..be57c08b2b 100644 --- a/LeanPool/DirectedTopologyLean4/MonotonePath.lean +++ b/LeanPool/DirectedTopologyLean4/MonotonePath.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import Mathlib.Topology.Connected.PathConnected -import Mathlib.Topology.Homotopy.Basic +module + +public import Mathlib.Topology.Path /-! # LeanPool.DirectedTopologyLean4.MonotonePath -/ +@[expose] public section + /- This file contains lemmas about monotone paths in a preordered topological space -/ diff --git a/LeanPool/DirectedTopologyLean4/MorphismAux.lean b/LeanPool/DirectedTopologyLean4/MorphismAux.lean index 3faf1b517e..bdc6f64123 100644 --- a/LeanPool/DirectedTopologyLean4/MorphismAux.lean +++ b/LeanPool/DirectedTopologyLean4/MorphismAux.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import Mathlib.CategoryTheory.EqToHom -import Mathlib.CategoryTheory.Category.Cat +module + +public import Mathlib.CategoryTheory.Category.Cat +import Mathlib.Tactic.Attr.Core /-! # LeanPool.DirectedTopologyLean4.MorphismAux -/ +@[expose] public section + /- This file contains auxiliary equalities of objects morphisms in a category. These are used in the proof of the Van Kampen Theorem in directed_van_kampen.lean diff --git a/LeanPool/DirectedTopologyLean4/PathCover.lean b/LeanPool/DirectedTopologyLean4/PathCover.lean index 9ac2d89656..4dadfc5e95 100644 --- a/LeanPool/DirectedTopologyLean4/PathCover.lean +++ b/LeanPool/DirectedTopologyLean4/PathCover.lean @@ -3,6 +3,10 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ +module + +public import LeanPool.DirectedTopologyLean4.DTop +public import LeanPool.DirectedTopologyLean4.SplitPath.SplitDipath import LeanPool.DirectedTopologyLean4.CoverLemma import LeanPool.DirectedTopologyLean4.DipathSubtype import LeanPool.DirectedTopologyLean4.SplitPath.SplitProperties @@ -11,6 +15,8 @@ import LeanPool.DirectedTopologyLean4.SplitPath.SplitProperties # LeanPool.DirectedTopologyLean4.PathCover -/ +@[expose] public section + /- This file contains the definition of a directed path being n-covered by two subspaces X₁ and X₂: It maps any subinterval [i/n, (i+1)/n] into either X₁ or X₂. diff --git a/LeanPool/DirectedTopologyLean4/PushoutAlternative.lean b/LeanPool/DirectedTopologyLean4/PushoutAlternative.lean index 6285da6ce0..0794ab7762 100644 --- a/LeanPool/DirectedTopologyLean4/PushoutAlternative.lean +++ b/LeanPool/DirectedTopologyLean4/PushoutAlternative.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import Mathlib.CategoryTheory.Category.Cat -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.IsPullback.Basic +module + +public import Mathlib.CategoryTheory.Limits.Shapes.Pullback.IsPullback.Defs /-! # LeanPool.DirectedTopologyLean4.PushoutAlternative -/ +@[expose] public section + /- This file contains an alternative way for proving a commutative square in a category is a pushout. -/ diff --git a/LeanPool/DirectedTopologyLean4/SplitDihomotopy.lean b/LeanPool/DirectedTopologyLean4/SplitDihomotopy.lean index e6c9849325..80113b5a73 100644 --- a/LeanPool/DirectedTopologyLean4/SplitDihomotopy.lean +++ b/LeanPool/DirectedTopologyLean4/SplitDihomotopy.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.DirectedPathHomotopy +module + +public import LeanPool.DirectedTopologyLean4.DirectedPathHomotopy +public import LeanPool.DirectedTopologyLean4.DTop /-! # LeanPool.DirectedTopologyLean4.SplitDihomotopy -/ +@[expose] public section + /- This file contains the definitions of splitting a (dipath) dihomotopy both vertically and horizontally. diff --git a/LeanPool/DirectedTopologyLean4/SplitPath.lean b/LeanPool/DirectedTopologyLean4/SplitPath.lean index 00cd528945..203c78531d 100644 --- a/LeanPool/DirectedTopologyLean4/SplitPath.lean +++ b/LeanPool/DirectedTopologyLean4/SplitPath.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.SplitPath.SplitDipath -import LeanPool.DirectedTopologyLean4.SplitPath.SplitPath -import LeanPool.DirectedTopologyLean4.SplitPath.SplitProperties +module + +public import LeanPool.DirectedTopologyLean4.SplitPath.SplitDipath +public import LeanPool.DirectedTopologyLean4.SplitPath.SplitPath +public import LeanPool.DirectedTopologyLean4.SplitPath.SplitProperties +import Mathlib.CategoryTheory.Category.Init /-! # Index file for the SplitPath subdirectory. @@ -13,3 +16,5 @@ import LeanPool.DirectedTopologyLean4.SplitPath.SplitProperties Bundles the directed-path splitting modules used by the Van Kampen theorem development. -/ + +@[expose] public section diff --git a/LeanPool/DirectedTopologyLean4/SplitPath/SplitDipath.lean b/LeanPool/DirectedTopologyLean4/SplitPath/SplitDipath.lean index 360ebb1cd0..53f893b7ef 100644 --- a/LeanPool/DirectedTopologyLean4/SplitPath/SplitDipath.lean +++ b/LeanPool/DirectedTopologyLean4/SplitPath/SplitDipath.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.SplitPath.SplitPath +module + +public import LeanPool.DirectedTopologyLean4.SplitPath.SplitPath +public import LeanPool.DirectedTopologyLean4.Dipath +import Mathlib.CategoryTheory.Category.Init /-! # LeanPool.DirectedTopologyLean4.SplitPath.SplitDipath -/ +@[expose] public section + /- This file contains definitions for splitting a directed path `γ : Dipath x y` at some point `T : I` yielding two different directed paths: * Its first part, from `x` to `γ T`, given by evaluating `γ` on `[0, T]`. diff --git a/LeanPool/DirectedTopologyLean4/SplitPath/SplitPath.lean b/LeanPool/DirectedTopologyLean4/SplitPath/SplitPath.lean index 24520d2538..05eae30e3f 100644 --- a/LeanPool/DirectedTopologyLean4/SplitPath/SplitPath.lean +++ b/LeanPool/DirectedTopologyLean4/SplitPath/SplitPath.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.Interpolate +module + +public import LeanPool.DirectedTopologyLean4.Interpolate import LeanPool.DirectedTopologyLean4.UnitIntervalAux +import Mathlib.CategoryTheory.Category.Init /-! # LeanPool.DirectedTopologyLean4.SplitPath.SplitPath -/ +@[expose] public section + /- This file contains definitions for splitting a path `γ : Path x y` at some point `T : I` yielding two different paths: * Its first part, from `x` to `γ T`, given by evaluating `γ` on `[0, T]`. diff --git a/LeanPool/DirectedTopologyLean4/SplitPath/SplitProperties.lean b/LeanPool/DirectedTopologyLean4/SplitPath/SplitProperties.lean index 61fc35ea67..9930e654cd 100644 --- a/LeanPool/DirectedTopologyLean4/SplitPath/SplitProperties.lean +++ b/LeanPool/DirectedTopologyLean4/SplitPath/SplitProperties.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.SplitPath.SplitDipath -import LeanPool.DirectedTopologyLean4.Fraction +module + +public import LeanPool.DirectedTopologyLean4.SplitPath.SplitDipath import LeanPool.DirectedTopologyLean4.FractionEqualities +import LeanPool.DirectedTopologyLean4.UnitIntervalAux +import Mathlib.CategoryTheory.Category.Init /-! ### General -/ +@[expose] public section + /- This file contains many lemmas about relations that the parts of a split path satisfy. -/ diff --git a/LeanPool/DirectedTopologyLean4/StretchPath.lean b/LeanPool/DirectedTopologyLean4/StretchPath.lean index 4bb496b9b8..256f774b78 100644 --- a/LeanPool/DirectedTopologyLean4/StretchPath.lean +++ b/LeanPool/DirectedTopologyLean4/StretchPath.lean @@ -3,14 +3,19 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import LeanPool.DirectedTopologyLean4.Dipath -import LeanPool.DirectedTopologyLean4.DTop -import LeanPool.DirectedTopologyLean4.UnitIntervalAux +module + +public import LeanPool.DirectedTopologyLean4.Dipath +public import LeanPool.DirectedTopologyLean4.UnitIntervalAux +import LeanPool.DirectedTopologyLean4.MonotonePath +import Mathlib.CategoryTheory.Category.Init /-! # LeanPool.DirectedTopologyLean4.StretchPath -/ +@[expose] public section + /- This file contains definitions about stretching a (directed) path in `I` in two ways: If its image is contained in `[0, 1/2]`, it can be stretched upwards diff --git a/LeanPool/DirectedTopologyLean4/TransRefl.lean b/LeanPool/DirectedTopologyLean4/TransRefl.lean index 126ebf6786..92b6a746de 100644 --- a/LeanPool/DirectedTopologyLean4/TransRefl.lean +++ b/LeanPool/DirectedTopologyLean4/TransRefl.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import Mathlib.AlgebraicTopology.FundamentalGroupoid.Basic -import LeanPool.DirectedTopologyLean4.DirectedHomotopy +module + +public import Mathlib.AlgebraicTopology.FundamentalGroupoid.Basic +public import LeanPool.DirectedTopologyLean4.Dipath /-! # LeanPool.DirectedTopologyLean4.TransRefl -/ +@[expose] public section + /- Auxiliary lemmas for the reflTrans and transRefl definitions in directed_path_homotopy.lean. These two are definitions are dihomotopies related to a `p : Dipath x₀ x₁`: diff --git a/LeanPool/DirectedTopologyLean4/UnitIntervalAux.lean b/LeanPool/DirectedTopologyLean4/UnitIntervalAux.lean index 6141c0351e..f953f54ff6 100644 --- a/LeanPool/DirectedTopologyLean4/UnitIntervalAux.lean +++ b/LeanPool/DirectedTopologyLean4/UnitIntervalAux.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Dominique Lawson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dominique Lawson, Henning Basold, Peter Bruin -/ -import Mathlib.Topology.Connected.PathConnected +module + +public import Mathlib.Topology.Path /-! # LeanPool.DirectedTopologyLean4.UnitIntervalAux -/ +@[expose] public section + /- This file contains lemmas about * elements being contained in the unit interval. diff --git a/LeanPool/DistanceGeometry.lean b/LeanPool/DistanceGeometry.lean index ab95847790..e1482280c8 100644 --- a/LeanPool/DistanceGeometry.lean +++ b/LeanPool/DistanceGeometry.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.DistanceGeometry.Defs -import LeanPool.DistanceGeometry.Schoenberg -import LeanPool.DistanceGeometry.SchoenbergHard -import LeanPool.DistanceGeometry.Trilateration -import LeanPool.DistanceGeometry.CayleyMengerVolume +public import LeanPool.DistanceGeometry.Defs +public import LeanPool.DistanceGeometry.Schoenberg +public import LeanPool.DistanceGeometry.SchoenbergHard +public import LeanPool.DistanceGeometry.Trilateration +public import LeanPool.DistanceGeometry.CayleyMengerVolume +import Mathlib.Tactic.Positivity.Finset /-! # Euclidean Distance Geometry @@ -21,6 +23,8 @@ Tags: distance-geometry, euclidean-geometry, linear-algebra, cayley-menger MSC: 51K05, 52C99, 15A18 -/ +@[expose] public section + /-! This project develops three parts of finite Euclidean distance geometry: both directions of Schoenberg's basepoint-centered Gram characterization with a rank-controlled diff --git a/LeanPool/DistanceGeometry/CayleyMengerVolume.lean b/LeanPool/DistanceGeometry/CayleyMengerVolume.lean index d1a20a1e97..a78311847e 100644 --- a/LeanPool/DistanceGeometry/CayleyMengerVolume.lean +++ b/LeanPool/DistanceGeometry/CayleyMengerVolume.lean @@ -6,8 +6,7 @@ Authors: Egor Lyfar module public import LeanPool.DistanceGeometry.Defs -public import LeanPool.DistanceGeometry.Schoenberg -public import Mathlib.LinearAlgebra.Matrix.Determinant.Basic +import LeanPool.DistanceGeometry.Schoenberg /-! # The Cayley–Menger determinant and simplex volume diff --git a/LeanPool/DistanceGeometry/Defs.lean b/LeanPool/DistanceGeometry/Defs.lean index f7bb3e7dcf..ba0bc8a867 100644 --- a/LeanPool/DistanceGeometry/Defs.lean +++ b/LeanPool/DistanceGeometry/Defs.lean @@ -6,7 +6,6 @@ Authors: Egor Lyfar module public import Mathlib.Analysis.InnerProductSpace.PiL2 -public import Mathlib.Analysis.InnerProductSpace.GramMatrix /-! # Distance geometry: core definitions diff --git a/LeanPool/DistanceGeometry/Schoenberg.lean b/LeanPool/DistanceGeometry/Schoenberg.lean index 72dee55714..fc6e317fb3 100644 --- a/LeanPool/DistanceGeometry/Schoenberg.lean +++ b/LeanPool/DistanceGeometry/Schoenberg.lean @@ -7,7 +7,8 @@ module public import LeanPool.DistanceGeometry.Defs public import Mathlib.LinearAlgebra.Matrix.Rank -public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Analysis.InnerProductSpace.GramMatrix +import Mathlib.Algebra.Order.Star.Real /-! # Schoenberg's characterization: the easy direction diff --git a/LeanPool/DistanceGeometry/SchoenbergHard.lean b/LeanPool/DistanceGeometry/SchoenbergHard.lean index f98a7ae7d4..8b74ab28c0 100644 --- a/LeanPool/DistanceGeometry/SchoenbergHard.lean +++ b/LeanPool/DistanceGeometry/SchoenbergHard.lean @@ -6,10 +6,10 @@ Authors: Egor Lyfar module public import LeanPool.DistanceGeometry.Defs -public import LeanPool.DistanceGeometry.Schoenberg -public import Mathlib.Analysis.Matrix.Spectrum -public import Mathlib.Analysis.Matrix.PosDef -public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.LinearAlgebra.Matrix.PosDef +public import Mathlib.LinearAlgebra.Matrix.Rank +import LeanPool.DistanceGeometry.Schoenberg +import Mathlib.Analysis.Matrix.PosDef /-! # Schoenberg's characterization: the sufficiency direction diff --git a/LeanPool/DistanceGeometry/Trilateration.lean b/LeanPool/DistanceGeometry/Trilateration.lean index 6048c0e8df..21c5f27bb2 100644 --- a/LeanPool/DistanceGeometry/Trilateration.lean +++ b/LeanPool/DistanceGeometry/Trilateration.lean @@ -5,12 +5,8 @@ Authors: Egor Lyfar -/ module -public import LeanPool.DistanceGeometry.Defs -public import Mathlib.Geometry.Euclidean.Basic -public import Mathlib.Geometry.Euclidean.PerpBisector -public import Mathlib.Analysis.InnerProductSpace.Projection.FiniteDimensional -public import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional -public import Mathlib.Data.Set.Card +public import Mathlib.Analysis.InnerProductSpace.PiL2 +import Mathlib.Geometry.Euclidean.Basic /-! # Trilateration: sphere intersections of codimension-one center families diff --git a/LeanPool/DomainTheory.lean b/LeanPool/DomainTheory.lean index 569cd8ddc6..f8a4c53fa6 100644 --- a/LeanPool/DomainTheory.lean +++ b/LeanPool/DomainTheory.lean @@ -3,155 +3,157 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Constructive -import LeanPool.DomainTheory.InfoSys -import LeanPool.DomainTheory.ContinuousLattice.Injective -import LeanPool.DomainTheory.ContinuousLattice.WayBelow -import LeanPool.DomainTheory.ContinuousLattice.Specialization -import LeanPool.DomainTheory.ContinuousLattice.ScottMaps -import LeanPool.DomainTheory.ContinuousLattice.MilnerCorrection -import LeanPool.DomainTheory.ContinuousLattice.Constructions -import LeanPool.DomainTheory.ContinuousLattice.FunctionSpaces -import LeanPool.DomainTheory.ContinuousLattice.Theorem212 -import LeanPool.DomainTheory.ContinuousLattice.InverseLimits -import LeanPool.DomainTheory.ContinuousLattice.FunctionSpaceTower -import LeanPool.DomainTheory.Neighborhood.Basic -import LeanPool.DomainTheory.Neighborhood.Example12 -import LeanPool.DomainTheory.Neighborhood.Example13 -import LeanPool.DomainTheory.Neighborhood.Example14 -import LeanPool.DomainTheory.Neighborhood.Example15 -import LeanPool.DomainTheory.Neighborhood.ExampleB -import LeanPool.DomainTheory.Neighborhood.Theorem110 -import LeanPool.DomainTheory.Neighborhood.Theorem111 -import LeanPool.DomainTheory.Neighborhood.Exercise112 -import LeanPool.DomainTheory.Neighborhood.Exercise113 -import LeanPool.DomainTheory.Neighborhood.Exercise114 -import LeanPool.DomainTheory.Neighborhood.Exercise115 -import LeanPool.DomainTheory.Neighborhood.Exercise116 -import LeanPool.DomainTheory.Neighborhood.Exercise117 -import LeanPool.DomainTheory.Neighborhood.Exercise118 -import LeanPool.DomainTheory.Neighborhood.Exercise119 -import LeanPool.DomainTheory.Neighborhood.Exercise120 -import LeanPool.DomainTheory.Neighborhood.Exercise121 -import LeanPool.DomainTheory.Neighborhood.Exercise122 -import LeanPool.DomainTheory.Neighborhood.Exercise123 -import LeanPool.DomainTheory.Neighborhood.Exercise124 -import LeanPool.DomainTheory.Neighborhood.Exercise125 -import LeanPool.DomainTheory.Neighborhood.Exercise126 -import LeanPool.DomainTheory.Neighborhood.Exercise127 -import LeanPool.DomainTheory.Neighborhood.Approximable -import LeanPool.DomainTheory.Neighborhood.ApproximableExercises -import LeanPool.DomainTheory.Neighborhood.Example23 -import LeanPool.DomainTheory.Neighborhood.Example24 -import LeanPool.DomainTheory.Neighborhood.Exercise213 -import LeanPool.DomainTheory.Neighborhood.Exercise214 -import LeanPool.DomainTheory.Neighborhood.Exercise215 -import LeanPool.DomainTheory.Neighborhood.Exercise216 -import LeanPool.DomainTheory.Neighborhood.Exercise218 -import LeanPool.DomainTheory.Neighborhood.Exercise220 -import LeanPool.DomainTheory.Neighborhood.Exercise221 -import LeanPool.DomainTheory.Neighborhood.Exercise222 -import LeanPool.DomainTheory.Neighborhood.Product -import LeanPool.DomainTheory.Neighborhood.FunctionSpace -import LeanPool.DomainTheory.Neighborhood.Exercise314 -import LeanPool.DomainTheory.Neighborhood.Exercise315 -import LeanPool.DomainTheory.Neighborhood.Exercise318 -import LeanPool.DomainTheory.Neighborhood.Exercise319 -import LeanPool.DomainTheory.Neighborhood.Exercise319Sum -import LeanPool.DomainTheory.Neighborhood.Exercise321 -import LeanPool.DomainTheory.Neighborhood.Exercise322 -import LeanPool.DomainTheory.Neighborhood.Exercise323 -import LeanPool.DomainTheory.Neighborhood.Exercise324 -import LeanPool.DomainTheory.Neighborhood.Exercise316 -import LeanPool.DomainTheory.Neighborhood.Exercise317 -import LeanPool.DomainTheory.Neighborhood.Exercise324Iter -import LeanPool.DomainTheory.Neighborhood.Exercise324Distrib -import LeanPool.DomainTheory.Neighborhood.Exercise325 -import LeanPool.DomainTheory.Neighborhood.Exercise327 -import LeanPool.DomainTheory.Neighborhood.Exercise326 -import LeanPool.DomainTheory.Neighborhood.Exercise326Sum -import LeanPool.DomainTheory.Neighborhood.Exercise328 -import LeanPool.DomainTheory.Neighborhood.Theorem41 -import LeanPool.DomainTheory.Neighborhood.Example43 -import LeanPool.DomainTheory.Neighborhood.Example44 -import LeanPool.DomainTheory.Neighborhood.Theorem46 -import LeanPool.DomainTheory.Neighborhood.Exercise407 -import LeanPool.DomainTheory.Neighborhood.Exercise408 -import LeanPool.DomainTheory.Neighborhood.Exercise409 -import LeanPool.DomainTheory.Neighborhood.Exercise410 -import LeanPool.DomainTheory.Neighborhood.Exercise411 -import LeanPool.DomainTheory.Neighborhood.Exercise412 -import LeanPool.DomainTheory.Neighborhood.Exercise413 -import LeanPool.DomainTheory.Neighborhood.Exercise414 -import LeanPool.DomainTheory.Neighborhood.Exercise415 -import LeanPool.DomainTheory.Neighborhood.Exercise416 -import LeanPool.DomainTheory.Neighborhood.Exercise417 -import LeanPool.DomainTheory.Neighborhood.Exercise418 -import LeanPool.DomainTheory.Neighborhood.Exercise419 -import LeanPool.DomainTheory.Neighborhood.Exercise420 -import LeanPool.DomainTheory.Neighborhood.Exercise421 -import LeanPool.DomainTheory.Neighborhood.Exercise422 -import LeanPool.DomainTheory.Neighborhood.Exercise423 -import LeanPool.DomainTheory.Neighborhood.Exercise424 -import LeanPool.DomainTheory.Neighborhood.Exercise425 -import LeanPool.DomainTheory.Neighborhood.Table55 -import LeanPool.DomainTheory.Neighborhood.Theorem51 -import LeanPool.DomainTheory.Neighborhood.Theorem52 -import LeanPool.DomainTheory.Neighborhood.Proposition53 -import LeanPool.DomainTheory.Neighborhood.Proposition54 -import LeanPool.DomainTheory.Neighborhood.Theorem56 -import LeanPool.DomainTheory.Neighborhood.Theorem56Full -import LeanPool.DomainTheory.Neighborhood.Exercise507 -import LeanPool.DomainTheory.Neighborhood.Exercise508 -import LeanPool.DomainTheory.Neighborhood.Exercise509 -import LeanPool.DomainTheory.Neighborhood.Exercise510 -import LeanPool.DomainTheory.Neighborhood.Exercise511 -import LeanPool.DomainTheory.Neighborhood.Exercise512 -import LeanPool.DomainTheory.Neighborhood.Exercise513 -import LeanPool.DomainTheory.Neighborhood.Exercise514 -import LeanPool.DomainTheory.Neighborhood.Exercise515 -import LeanPool.DomainTheory.Neighborhood.Exercise516 -import LeanPool.DomainTheory.Neighborhood.Exercise516ThueMorse -import LeanPool.DomainTheory.Neighborhood.Exercise516Overlap -import LeanPool.DomainTheory.Neighborhood.Example61 -import LeanPool.DomainTheory.Neighborhood.Example62 -import LeanPool.DomainTheory.Neighborhood.Example62C -import LeanPool.DomainTheory.Neighborhood.Example62A -import LeanPool.DomainTheory.Neighborhood.Example62Regular -import LeanPool.DomainTheory.Neighborhood.Definition63 -import LeanPool.DomainTheory.Neighborhood.Proposition66 -import LeanPool.DomainTheory.Neighborhood.Proposition67 -import LeanPool.DomainTheory.Neighborhood.Definition68 -import LeanPool.DomainTheory.Neighborhood.Theorem69 -import LeanPool.DomainTheory.Neighborhood.Definition610 -import LeanPool.DomainTheory.Neighborhood.Proposition611 -import LeanPool.DomainTheory.Neighborhood.Proposition612 -import LeanPool.DomainTheory.Neighborhood.Definition613 -import LeanPool.DomainTheory.Neighborhood.Theorem614 -import LeanPool.DomainTheory.Neighborhood.Lemma615 -import LeanPool.DomainTheory.Neighborhood.Theorem616 -import LeanPool.DomainTheory.Neighborhood.Exercise617 -import LeanPool.DomainTheory.Neighborhood.Exercise617Gen -import LeanPool.DomainTheory.Neighborhood.Exercise618 -import LeanPool.DomainTheory.Neighborhood.Exercise619 -import LeanPool.DomainTheory.Neighborhood.Exercise619PartB -import LeanPool.DomainTheory.Neighborhood.Exercise621 -import LeanPool.DomainTheory.Neighborhood.Exercise622 -import LeanPool.DomainTheory.Neighborhood.Exercise623 -import LeanPool.DomainTheory.Neighborhood.Exercise624 -import LeanPool.DomainTheory.Neighborhood.Exercise625 -import LeanPool.DomainTheory.Neighborhood.Exercise626 -import LeanPool.DomainTheory.Neighborhood.Exercise627 -import LeanPool.DomainTheory.Neighborhood.Exercise628 -import LeanPool.DomainTheory.Neighborhood.Exercise629 -import LeanPool.DomainTheory.Neighborhood.Recursive -import LeanPool.DomainTheory.Neighborhood.Definition71 -import LeanPool.DomainTheory.Neighborhood.Definition72 -import LeanPool.DomainTheory.Neighborhood.Theorem74 -import LeanPool.DomainTheory.Neighborhood.Theorem75 -import LeanPool.DomainTheory.Neighborhood.Theorem76 -import LeanPool.DomainTheory.Neighborhood.Proposition77 +public import LeanPool.DomainTheory.Constructive +public import LeanPool.DomainTheory.InfoSys +public import LeanPool.DomainTheory.ContinuousLattice.Injective +public import LeanPool.DomainTheory.ContinuousLattice.WayBelow +public import LeanPool.DomainTheory.ContinuousLattice.Specialization +public import LeanPool.DomainTheory.ContinuousLattice.ScottMaps +public import LeanPool.DomainTheory.ContinuousLattice.MilnerCorrection +public import LeanPool.DomainTheory.ContinuousLattice.Constructions +public import LeanPool.DomainTheory.ContinuousLattice.FunctionSpaces +public import LeanPool.DomainTheory.ContinuousLattice.Theorem212 +public import LeanPool.DomainTheory.ContinuousLattice.InverseLimits +public import LeanPool.DomainTheory.ContinuousLattice.FunctionSpaceTower +public import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Example12 +public import LeanPool.DomainTheory.Neighborhood.Example13 +public import LeanPool.DomainTheory.Neighborhood.Example14 +public import LeanPool.DomainTheory.Neighborhood.Example15 +public import LeanPool.DomainTheory.Neighborhood.ExampleB +public import LeanPool.DomainTheory.Neighborhood.Theorem110 +public import LeanPool.DomainTheory.Neighborhood.Theorem111 +public import LeanPool.DomainTheory.Neighborhood.Exercise112 +public import LeanPool.DomainTheory.Neighborhood.Exercise113 +public import LeanPool.DomainTheory.Neighborhood.Exercise114 +public import LeanPool.DomainTheory.Neighborhood.Exercise115 +public import LeanPool.DomainTheory.Neighborhood.Exercise116 +public import LeanPool.DomainTheory.Neighborhood.Exercise117 +public import LeanPool.DomainTheory.Neighborhood.Exercise118 +public import LeanPool.DomainTheory.Neighborhood.Exercise119 +public import LeanPool.DomainTheory.Neighborhood.Exercise120 +public import LeanPool.DomainTheory.Neighborhood.Exercise121 +public import LeanPool.DomainTheory.Neighborhood.Exercise122 +public import LeanPool.DomainTheory.Neighborhood.Exercise123 +public import LeanPool.DomainTheory.Neighborhood.Exercise124 +public import LeanPool.DomainTheory.Neighborhood.Exercise125 +public import LeanPool.DomainTheory.Neighborhood.Exercise126 +public import LeanPool.DomainTheory.Neighborhood.Exercise127 +public import LeanPool.DomainTheory.Neighborhood.Approximable +public import LeanPool.DomainTheory.Neighborhood.ApproximableExercises +public import LeanPool.DomainTheory.Neighborhood.Example23 +public import LeanPool.DomainTheory.Neighborhood.Example24 +public import LeanPool.DomainTheory.Neighborhood.Exercise213 +public import LeanPool.DomainTheory.Neighborhood.Exercise214 +public import LeanPool.DomainTheory.Neighborhood.Exercise215 +public import LeanPool.DomainTheory.Neighborhood.Exercise216 +public import LeanPool.DomainTheory.Neighborhood.Exercise218 +public import LeanPool.DomainTheory.Neighborhood.Exercise220 +public import LeanPool.DomainTheory.Neighborhood.Exercise221 +public import LeanPool.DomainTheory.Neighborhood.Exercise222 +public import LeanPool.DomainTheory.Neighborhood.Product +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import LeanPool.DomainTheory.Neighborhood.Exercise314 +public import LeanPool.DomainTheory.Neighborhood.Exercise315 +public import LeanPool.DomainTheory.Neighborhood.Exercise318 +public import LeanPool.DomainTheory.Neighborhood.Exercise319 +public import LeanPool.DomainTheory.Neighborhood.Exercise319Sum +public import LeanPool.DomainTheory.Neighborhood.Exercise321 +public import LeanPool.DomainTheory.Neighborhood.Exercise322 +public import LeanPool.DomainTheory.Neighborhood.Exercise323 +public import LeanPool.DomainTheory.Neighborhood.Exercise324 +public import LeanPool.DomainTheory.Neighborhood.Exercise316 +public import LeanPool.DomainTheory.Neighborhood.Exercise317 +public import LeanPool.DomainTheory.Neighborhood.Exercise324Iter +public import LeanPool.DomainTheory.Neighborhood.Exercise324Distrib +public import LeanPool.DomainTheory.Neighborhood.Exercise325 +public import LeanPool.DomainTheory.Neighborhood.Exercise327 +public import LeanPool.DomainTheory.Neighborhood.Exercise326 +public import LeanPool.DomainTheory.Neighborhood.Exercise326Sum +public import LeanPool.DomainTheory.Neighborhood.Exercise328 +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.Example43 +public import LeanPool.DomainTheory.Neighborhood.Example44 +public import LeanPool.DomainTheory.Neighborhood.Theorem46 +public import LeanPool.DomainTheory.Neighborhood.Exercise407 +public import LeanPool.DomainTheory.Neighborhood.Exercise408 +public import LeanPool.DomainTheory.Neighborhood.Exercise409 +public import LeanPool.DomainTheory.Neighborhood.Exercise410 +public import LeanPool.DomainTheory.Neighborhood.Exercise411 +public import LeanPool.DomainTheory.Neighborhood.Exercise412 +public import LeanPool.DomainTheory.Neighborhood.Exercise413 +public import LeanPool.DomainTheory.Neighborhood.Exercise414 +public import LeanPool.DomainTheory.Neighborhood.Exercise415 +public import LeanPool.DomainTheory.Neighborhood.Exercise416 +public import LeanPool.DomainTheory.Neighborhood.Exercise417 +public import LeanPool.DomainTheory.Neighborhood.Exercise418 +public import LeanPool.DomainTheory.Neighborhood.Exercise419 +public import LeanPool.DomainTheory.Neighborhood.Exercise420 +public import LeanPool.DomainTheory.Neighborhood.Exercise421 +public import LeanPool.DomainTheory.Neighborhood.Exercise422 +public import LeanPool.DomainTheory.Neighborhood.Exercise423 +public import LeanPool.DomainTheory.Neighborhood.Exercise424 +public import LeanPool.DomainTheory.Neighborhood.Exercise425 +public import LeanPool.DomainTheory.Neighborhood.Table55 +public import LeanPool.DomainTheory.Neighborhood.Theorem51 +public import LeanPool.DomainTheory.Neighborhood.Theorem52 +public import LeanPool.DomainTheory.Neighborhood.Proposition53 +public import LeanPool.DomainTheory.Neighborhood.Proposition54 +public import LeanPool.DomainTheory.Neighborhood.Theorem56 +public import LeanPool.DomainTheory.Neighborhood.Theorem56Full +public import LeanPool.DomainTheory.Neighborhood.Exercise507 +public import LeanPool.DomainTheory.Neighborhood.Exercise508 +public import LeanPool.DomainTheory.Neighborhood.Exercise509 +public import LeanPool.DomainTheory.Neighborhood.Exercise510 +public import LeanPool.DomainTheory.Neighborhood.Exercise511 +public import LeanPool.DomainTheory.Neighborhood.Exercise512 +public import LeanPool.DomainTheory.Neighborhood.Exercise513 +public import LeanPool.DomainTheory.Neighborhood.Exercise514 +public import LeanPool.DomainTheory.Neighborhood.Exercise515 +public import LeanPool.DomainTheory.Neighborhood.Exercise516 +public import LeanPool.DomainTheory.Neighborhood.Exercise516ThueMorse +public import LeanPool.DomainTheory.Neighborhood.Exercise516Overlap +public import LeanPool.DomainTheory.Neighborhood.Example61 +public import LeanPool.DomainTheory.Neighborhood.Example62 +public import LeanPool.DomainTheory.Neighborhood.Example62C +public import LeanPool.DomainTheory.Neighborhood.Example62A +public import LeanPool.DomainTheory.Neighborhood.Example62Regular +public import LeanPool.DomainTheory.Neighborhood.Definition63 +public import LeanPool.DomainTheory.Neighborhood.Proposition66 +public import LeanPool.DomainTheory.Neighborhood.Proposition67 +public import LeanPool.DomainTheory.Neighborhood.Definition68 +public import LeanPool.DomainTheory.Neighborhood.Theorem69 +public import LeanPool.DomainTheory.Neighborhood.Definition610 +public import LeanPool.DomainTheory.Neighborhood.Proposition611 +public import LeanPool.DomainTheory.Neighborhood.Proposition612 +public import LeanPool.DomainTheory.Neighborhood.Definition613 +public import LeanPool.DomainTheory.Neighborhood.Theorem614 +public import LeanPool.DomainTheory.Neighborhood.Lemma615 +public import LeanPool.DomainTheory.Neighborhood.Theorem616 +public import LeanPool.DomainTheory.Neighborhood.Exercise617 +public import LeanPool.DomainTheory.Neighborhood.Exercise617Gen +public import LeanPool.DomainTheory.Neighborhood.Exercise618 +public import LeanPool.DomainTheory.Neighborhood.Exercise619 +public import LeanPool.DomainTheory.Neighborhood.Exercise619PartB +public import LeanPool.DomainTheory.Neighborhood.Exercise621 +public import LeanPool.DomainTheory.Neighborhood.Exercise622 +public import LeanPool.DomainTheory.Neighborhood.Exercise623 +public import LeanPool.DomainTheory.Neighborhood.Exercise624 +public import LeanPool.DomainTheory.Neighborhood.Exercise625 +public import LeanPool.DomainTheory.Neighborhood.Exercise626 +public import LeanPool.DomainTheory.Neighborhood.Exercise627 +public import LeanPool.DomainTheory.Neighborhood.Exercise628 +public import LeanPool.DomainTheory.Neighborhood.Exercise629 +public import LeanPool.DomainTheory.Neighborhood.Recursive +public import LeanPool.DomainTheory.Neighborhood.Definition71 +public import LeanPool.DomainTheory.Neighborhood.Definition72 +public import LeanPool.DomainTheory.Neighborhood.Theorem74 +public import LeanPool.DomainTheory.Neighborhood.Theorem75 +public import LeanPool.DomainTheory.Neighborhood.Theorem76 +public import LeanPool.DomainTheory.Neighborhood.Proposition77 +import Mathlib.Data.Rat.Floor /-! # DomainTheory @@ -163,3 +165,5 @@ Main declarations: `InfoSys`, `Domain.Neighborhood.NeighborhoodSystem` Tags: domain-theory, denotational-semantics, information-systems MSC: 03B70, 06B35, 68Q55 -/ + +@[expose] public section diff --git a/LeanPool/DomainTheory/Constructive.lean b/LeanPool/DomainTheory/Constructive.lean index 5a22ce0562..ac11ca036c 100644 --- a/LeanPool/DomainTheory/Constructive.lean +++ b/LeanPool/DomainTheory/Constructive.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import Mathlib.Data.Finset.Basic +public import Mathlib.Data.Finset.Insert /-! # A choice-free `Finset` prelude @@ -44,6 +45,8 @@ folding `insert`. Every declaration here is audited to depend only on `[propext, Quot.sound]`. -/ +@[expose] public section + namespace Domain.Constructive variable {α : Type*} [DecidableEq α] diff --git a/LeanPool/DomainTheory/ContinuousLattice/Constructions.lean b/LeanPool/DomainTheory/ContinuousLattice/Constructions.lean index afd4075844..9f97451dab 100644 --- a/LeanPool/DomainTheory/ContinuousLattice/Constructions.lean +++ b/LeanPool/DomainTheory/ContinuousLattice/Constructions.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.ContinuousLattice.MilnerCorrection -import LeanPool.DomainTheory.ContinuousLattice.ScottMaps -import LeanPool.DomainTheory.ContinuousLattice.Injective -import Mathlib.Order.Preorder.Finite +public import LeanPool.DomainTheory.ContinuousLattice.ScottMaps +public import LeanPool.DomainTheory.ContinuousLattice.Injective /-! # Continuous lattice constructions (Scott 1972, §2.8–2.12) @@ -29,6 +28,8 @@ the Milner correction and remain open. -/ +@[expose] public section + namespace Domain.ContinuousLattice open Topology Set diff --git a/LeanPool/DomainTheory/ContinuousLattice/FunctionSpaceTower.lean b/LeanPool/DomainTheory/ContinuousLattice/FunctionSpaceTower.lean index 7ebc7362f4..dc987bd546 100644 --- a/LeanPool/DomainTheory/ContinuousLattice/FunctionSpaceTower.lean +++ b/LeanPool/DomainTheory/ContinuousLattice/FunctionSpaceTower.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.ContinuousLattice.InverseLimits -import Mathlib.Order.Hom.Basic +public import LeanPool.DomainTheory.ContinuousLattice.InverseLimits /-! # The function-space tower and Scott's `D_∞ ≅ [D_∞ → D_∞]` (Scott 1972, §4, @@ -23,6 +23,8 @@ its own function space* `[D_∞ → D_∞]`. -/ +@[expose] public section + namespace Domain.ContinuousLattice universe u diff --git a/LeanPool/DomainTheory/ContinuousLattice/FunctionSpaces.lean b/LeanPool/DomainTheory/ContinuousLattice/FunctionSpaces.lean index 4c1f67148f..dc49d2e8a4 100644 --- a/LeanPool/DomainTheory/ContinuousLattice/FunctionSpaces.lean +++ b/LeanPool/DomainTheory/ContinuousLattice/FunctionSpaces.lean @@ -3,13 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.ContinuousLattice.ScottMaps -import Mathlib.Data.Finset.Lattice.Fold -import Mathlib.Topology.ContinuousMap.Basic -import Mathlib.Topology.Order -import Mathlib.Order.CompleteLattice.Basic -import Mathlib.Order.FixedPoints +public import LeanPool.DomainTheory.ContinuousLattice.ScottMaps +public import Mathlib.Order.FixedPoints /-! # Function spaces on continuous lattices (Scott 1972, §3) @@ -42,6 +39,8 @@ while `⊔S` is the supremum in the subspace `D`; the retraction identity is `j( = ⊔S`. -/ +@[expose] public section + namespace Domain.ContinuousLattice open Set Topology TopologicalSpace diff --git a/LeanPool/DomainTheory/ContinuousLattice/Injective.lean b/LeanPool/DomainTheory/ContinuousLattice/Injective.lean index 8712a981ac..9778ac999f 100644 --- a/LeanPool/DomainTheory/ContinuousLattice/Injective.lean +++ b/LeanPool/DomainTheory/ContinuousLattice/Injective.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import Mathlib.Topology.ContinuousMap.T0Sierpinski -import Mathlib.Topology.ContinuousMap.Basic -import Mathlib.Topology.Sets.Opens +public import Mathlib.Topology.ContinuousMap.T0Sierpinski /-! # Injective spaces (Scott 1972, §1) @@ -26,6 +25,8 @@ theorem) that every `T₀`-space embeds in a power of the Sierpiński space. * `corollary_1_6`, `corollary_1_7` — Scott's Corollaries 1.6 and 1.7. -/ +@[expose] public section + /-- Scott's two-point Sierpiński space 𝕆: `Prop` with the Sierpiński topology. -/ abbrev Sierpinski := Prop diff --git a/LeanPool/DomainTheory/ContinuousLattice/InverseLimits.lean b/LeanPool/DomainTheory/ContinuousLattice/InverseLimits.lean index bb5c35dfe7..282e3c05f2 100644 --- a/LeanPool/DomainTheory/ContinuousLattice/InverseLimits.lean +++ b/LeanPool/DomainTheory/ContinuousLattice/InverseLimits.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module +public import LeanPool.DomainTheory.ContinuousLattice.FunctionSpaces import LeanPool.DomainTheory.ContinuousLattice.Constructions -import LeanPool.DomainTheory.ContinuousLattice.FunctionSpaces -import Mathlib.Order.GaloisConnection.Basic /-! # Inverse limits of continuous lattices (Scott 1972, §4) @@ -44,6 +44,8 @@ via injectivity, obtained here as the adjoint of the inclusion. -/ +@[expose] public section + namespace Domain.ContinuousLattice open Set diff --git a/LeanPool/DomainTheory/ContinuousLattice/MilnerCorrection.lean b/LeanPool/DomainTheory/ContinuousLattice/MilnerCorrection.lean index 296b461f61..28b554c390 100644 --- a/LeanPool/DomainTheory/ContinuousLattice/MilnerCorrection.lean +++ b/LeanPool/DomainTheory/ContinuousLattice/MilnerCorrection.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.ContinuousLattice.Specialization +public import LeanPool.DomainTheory.ContinuousLattice.Specialization /-! # March 1972 correction (Scott, pp. 135–136) @@ -40,6 +41,8 @@ topology once the Milner hypothesis is in place. -/ +@[expose] public section + namespace Domain.ContinuousLattice open Set Topology diff --git a/LeanPool/DomainTheory/ContinuousLattice/ScottMaps.lean b/LeanPool/DomainTheory/ContinuousLattice/ScottMaps.lean index 8bfe55d79f..d329142ca7 100644 --- a/LeanPool/DomainTheory/ContinuousLattice/ScottMaps.lean +++ b/LeanPool/DomainTheory/ContinuousLattice/ScottMaps.lean @@ -3,15 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.ContinuousLattice.Specialization -import Mathlib.Order.ScottContinuity -import Mathlib.Topology.Order.ScottTopology +public import LeanPool.DomainTheory.ContinuousLattice.Specialization /-! # Scott-continuous maps (Scott 1972, §2.5–2.7) -/ +@[expose] public section + namespace Domain.ContinuousLattice open Set Topology diff --git a/LeanPool/DomainTheory/ContinuousLattice/Specialization.lean b/LeanPool/DomainTheory/ContinuousLattice/Specialization.lean index 9568652795..569c2b42d3 100644 --- a/LeanPool/DomainTheory/ContinuousLattice/Specialization.lean +++ b/LeanPool/DomainTheory/ContinuousLattice/Specialization.lean @@ -3,12 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.ContinuousLattice.WayBelow -import Mathlib.Topology.Inseparable -import Mathlib.Topology.Separation.Basic -import Mathlib.Topology.Order.ScottTopology -import Mathlib.Order.DirSupClosed +public import LeanPool.DomainTheory.ContinuousLattice.WayBelow +public import Mathlib.Topology.Order.ScottTopology /-! # Specialization order and Scott topology (Scott 1972, §2 opening) @@ -22,6 +20,8 @@ mathematically heavier half and is recorded as `proposition_2_1_of_le`. -/ +@[expose] public section + namespace Domain.ContinuousLattice open Topology Set diff --git a/LeanPool/DomainTheory/ContinuousLattice/Theorem212.lean b/LeanPool/DomainTheory/ContinuousLattice/Theorem212.lean index 6ecef2bf36..f799bcfa46 100644 --- a/LeanPool/DomainTheory/ContinuousLattice/Theorem212.lean +++ b/LeanPool/DomainTheory/ContinuousLattice/Theorem212.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.ContinuousLattice.Constructions -import LeanPool.DomainTheory.ContinuousLattice.FunctionSpaces +public import LeanPool.DomainTheory.ContinuousLattice.Constructions +public import LeanPool.DomainTheory.ContinuousLattice.FunctionSpaces /-! # Theorem 2.12: injective spaces are exactly the continuous lattices @@ -38,6 +39,8 @@ idempotent on a complete lattice form a complete lattice (`IdemFix.completeLattice`). -/ +@[expose] public section + namespace Domain.ContinuousLattice open Topology Set diff --git a/LeanPool/DomainTheory/ContinuousLattice/WayBelow.lean b/LeanPool/DomainTheory/ContinuousLattice/WayBelow.lean index f728b1d7a9..88dcfe8fec 100644 --- a/LeanPool/DomainTheory/ContinuousLattice/WayBelow.lean +++ b/LeanPool/DomainTheory/ContinuousLattice/WayBelow.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import Mathlib.Order.CompleteLattice.Basic -import Mathlib.Order.UpperLower.Basic -import Mathlib.Order.Directed +public import Mathlib.Order.UpperLower.Basic +public import Mathlib.Order.CompleteLattice.Defs /-! # The induced (Scott) topology and the way-below relation (Scott 1972, §2) @@ -42,6 +42,8 @@ Proposition 2.2 (vi) and (vii) fall straight out of the open-set axioms. This is the classical/topological version of the theory, so we reason classically. -/ +@[expose] public section + namespace Domain.ContinuousLattice variable {D : Type*} [CompleteLattice D] diff --git a/LeanPool/DomainTheory/InfoSys.lean b/LeanPool/DomainTheory/InfoSys.lean index 80ef062a07..8265c1b18f 100644 --- a/LeanPool/DomainTheory/InfoSys.lean +++ b/LeanPool/DomainTheory/InfoSys.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import Mathlib.Data.Finset.Basic -import Mathlib.Data.Set.Basic +public import Mathlib.Data.Finset.Insert /-! # Scott Information Systems @@ -43,6 +43,8 @@ This is the **1982** presentation; the development is kept choice-free matching Scott's emphasis on the constructive nature of the definitions. -/ +@[expose] public section + /-- A Scott information system on a type of tokens `α`, following Scott's Definition 2.1 in *"Domains for Denotational Semantics"* (ICALP 1982). diff --git a/LeanPool/DomainTheory/Neighborhood/Approximable.lean b/LeanPool/DomainTheory/Neighborhood/Approximable.lean index f7b4e5c222..65b034fe48 100644 --- a/LeanPool/DomainTheory/Neighborhood/Approximable.lean +++ b/LeanPool/DomainTheory/Neighborhood/Approximable.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +import Mathlib.Data.Set.Basic import Mathlib.Tactic.Set /-! @@ -63,6 +65,8 @@ classical lemma is `ext_of_toElementMap`, which decides neighbourhood membership by `by_cases` (`Classical.em`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem @@ -350,8 +354,8 @@ sharpening `X' ⊆ X` means `↑X ⊑ ↑X'`, so `e(↑X) ⊑ e(↑X')` and the output transports along, then widens by `up_mem`. -/ def ofIso (e : V₀.Element ≃o V₁.Element) : ApproximableMap V₀ V₁ where - rel X Y := ∃ _ : V₀.mem X, (e (V₀.principal ‹V₀.mem X›)).mem Y - rel_dom := fun ⟨hX, _⟩ => hX + rel X Y := ∃ hX : V₀.mem X, (e (V₀.principal hX)).mem Y + rel_dom := by rintro X Y ⟨hX, _⟩; exact hX rel_cod := fun ⟨_, hY⟩ => (e _).sub hY master_rel := ⟨V₀.master_mem, (e _).master_mem⟩ inter_right := by diff --git a/LeanPool/DomainTheory/Neighborhood/ApproximableExercises.lean b/LeanPool/DomainTheory/Neighborhood/ApproximableExercises.lean index 7baacee335..d334974dae 100644 --- a/LeanPool/DomainTheory/Neighborhood/ApproximableExercises.lean +++ b/LeanPool/DomainTheory/Neighborhood/ApproximableExercises.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Approximable +public import LeanPool.DomainTheory.Neighborhood.Approximable import Mathlib.Data.Set.Image /-! @@ -43,6 +44,8 @@ the two classical, exactly like `ext_of_toElementMap`. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Basic.lean b/LeanPool/DomainTheory/Neighborhood/Basic.lean index 2d574a101d..41969e8550 100644 --- a/LeanPool/DomainTheory/Neighborhood/Basic.lean +++ b/LeanPool/DomainTheory/Neighborhood/Basic.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import Mathlib.Data.Set.Basic -import Mathlib.Order.Hom.Basic +public import Mathlib.Data.Set.Lattice.Bounded +public import Mathlib.Data.Set.Lattice.Disjoint +public import Mathlib.Data.Set.Lattice.Image +public import Mathlib.Data.Set.Lattice.Indexed +public import Mathlib.Data.Set.Lattice.Order + +public import Mathlib.Order.Hom.Basic +public import Mathlib.Data.Set.Basic /-! # Neighborhood systems (Scott 1981, PRG-19, §1) — foundations @@ -47,6 +54,8 @@ depends only on `propext`/`Quot.sound` (no `Classical.choice`). -/ +@[expose] public section + namespace Domain.Neighborhood /-- **Definition 1.1 (Scott 1981, PRG-19).** A *neighbourhood system* over a token diff --git a/LeanPool/DomainTheory/Neighborhood/Definition610.lean b/LeanPool/DomainTheory/Neighborhood/Definition610.lean index e6964085e4..eadc8258ee 100644 --- a/LeanPool/DomainTheory/Neighborhood/Definition610.lean +++ b/LeanPool/DomainTheory/Neighborhood/Definition610.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic /-! # Lecture VI — Definition 6.10 (Scott 1981, PRG-19): the subsystem relation `D ◁ @@ -46,6 +47,8 @@ a projection pair `i, j`) build on this relation and are formalized separately. -/ +@[expose] public section + namespace Domain.Neighborhood variable {α : Type*} diff --git a/LeanPool/DomainTheory/Neighborhood/Definition613.lean b/LeanPool/DomainTheory/Neighborhood/Definition613.lean index cd5069f8da..254219dfce 100644 --- a/LeanPool/DomainTheory/Neighborhood/Definition613.lean +++ b/LeanPool/DomainTheory/Neighborhood/Definition613.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Definition68 -import LeanPool.DomainTheory.Neighborhood.Proposition611 -import LeanPool.DomainTheory.Neighborhood.Proposition612 +module + +public import LeanPool.DomainTheory.Neighborhood.Definition68 +public import LeanPool.DomainTheory.Neighborhood.Proposition612 +public import Mathlib.Order.Directed +public import Mathlib.Order.SetNotation +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture VI — Definition 6.13 (Scott 1981, PRG-19): functors *monotone / @@ -77,6 +85,8 @@ The identity functor is monotone and continuous on domains (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Definition63.lean b/LeanPool/DomainTheory/Neighborhood/Definition63.lean index 46ad3f920b..5801a7f020 100644 --- a/LeanPool/DomainTheory/Neighborhood/Definition63.lean +++ b/LeanPool/DomainTheory/Neighborhood/Definition63.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Approximable +public import LeanPool.DomainTheory.Neighborhood.Approximable /-! # Lecture VI — Definitions 6.3–6.5 (Scott 1981, PRG-19): functors, `T`-algebras, @@ -100,6 +101,8 @@ counterproductive* for this development, and is deliberately not used. -/ +@[expose] public section + namespace Domain.Neighborhood universe u v w diff --git a/LeanPool/DomainTheory/Neighborhood/Definition68.lean b/LeanPool/DomainTheory/Neighborhood/Definition68.lean index 881a28b3f0..cd56dc1f2f 100644 --- a/LeanPool/DomainTheory/Neighborhood/Definition68.lean +++ b/LeanPool/DomainTheory/Neighborhood/Definition68.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Definition63 -import LeanPool.DomainTheory.Neighborhood.Exercise510 +public import LeanPool.DomainTheory.Neighborhood.Definition63 +public import LeanPool.DomainTheory.Neighborhood.Exercise510 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture VI — Definition 6.8 (Scott 1981, PRG-19): functors *continuous on maps* @@ -85,6 +92,8 @@ representing `Φ` is the identity on the function space. Everything here is (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Domain.Neighborhood.Exercise510 diff --git a/LeanPool/DomainTheory/Neighborhood/Definition71.lean b/LeanPool/DomainTheory/Neighborhood/Definition71.lean index cf71b3c0f9..cc3d35b871 100644 --- a/LeanPool/DomainTheory/Neighborhood/Definition71.lean +++ b/LeanPool/DomainTheory/Neighborhood/Definition71.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic -import LeanPool.DomainTheory.Neighborhood.Exercise315 -import LeanPool.DomainTheory.Neighborhood.Recursive +public import LeanPool.DomainTheory.Neighborhood.Exercise315 +public import LeanPool.DomainTheory.Neighborhood.Recursive /-! # Definition 7.1 (Scott 1981, PRG-19, §7) — computable presentations / effectively @@ -75,6 +75,8 @@ inhabitant (`unitSys_isEffectivelyGiven`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem Domain.Recursive diff --git a/LeanPool/DomainTheory/Neighborhood/Definition72.lean b/LeanPool/DomainTheory/Neighborhood/Definition72.lean index 69b00d424b..c99e651363 100644 --- a/LeanPool/DomainTheory/Neighborhood/Definition72.lean +++ b/LeanPool/DomainTheory/Neighborhood/Definition72.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Definition71 -import LeanPool.DomainTheory.Neighborhood.Approximable +public import LeanPool.DomainTheory.Neighborhood.Definition71 /-! # Definition 7.2 (Scott 1981, PRG-19, §7) — computable maps and computable @@ -70,6 +70,8 @@ the choice-free deciders of Definition 7.1 and the choice-free r.e. layer of `Recursive.lean`. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem Domain.Recursive ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Example12.lean b/LeanPool/DomainTheory/Neighborhood/Example12.lean index a019d2b586..c856b2bc51 100644 --- a/LeanPool/DomainTheory/Neighborhood/Example12.lean +++ b/LeanPool/DomainTheory/Neighborhood/Example12.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Data.Set.Basic import Mathlib.Data.Fintype.Basic import Mathlib.Tactic.FinCases @@ -21,6 +23,8 @@ one partial element — the bottom filter `{Δ}`. -/ +@[expose] public section + namespace Domain.Neighborhood.Example12 /-- Tokens for Example 1.2: `Δ = {0, 1}`. -/ diff --git a/LeanPool/DomainTheory/Neighborhood/Example13.lean b/LeanPool/DomainTheory/Neighborhood/Example13.lean index 803906c70e..7dfb1a00a4 100644 --- a/LeanPool/DomainTheory/Neighborhood/Example13.lean +++ b/LeanPool/DomainTheory/Neighborhood/Example13.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Data.Set.Basic import Mathlib.Data.Fintype.Basic import Mathlib.Tactic.FinCases @@ -24,6 +26,8 @@ This is a concrete finite computation (`fin_cases`/`simp`); footprint `[propext, Classical.choice, Quot.sound]` — same as Example 1.2. -/ +@[expose] public section + namespace Domain.Neighborhood.Example13 /-- Tokens for Example 1.3: `Δ = {0, 1, 2}`. -/ diff --git a/LeanPool/DomainTheory/Neighborhood/Example14.lean b/LeanPool/DomainTheory/Neighborhood/Example14.lean index d933883e61..c469526d97 100644 --- a/LeanPool/DomainTheory/Neighborhood/Example14.lean +++ b/LeanPool/DomainTheory/Neighborhood/Example14.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Data.Set.Basic import Mathlib.Data.Fintype.Basic import Mathlib.Tactic.FinCases @@ -41,6 +43,8 @@ This is a concrete finite computation (`fin_cases`/`simp`); footprint `[propext, Classical.choice, Quot.sound]` — same as Examples 1.2/1.3. -/ +@[expose] public section + namespace Domain.Neighborhood.Example14 /-- Tokens for Example 1.4: the binary tree `Δ = {Λ,0,1,00,01,10,11}`, encoded as diff --git a/LeanPool/DomainTheory/Neighborhood/Example15.lean b/LeanPool/DomainTheory/Neighborhood/Example15.lean index c06a6b9dc4..83a4d27c9a 100644 --- a/LeanPool/DomainTheory/Neighborhood/Example15.lean +++ b/LeanPool/DomainTheory/Neighborhood/Example15.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic -import Mathlib.Data.Fintype.Basic -import Mathlib.Tactic.FinCases +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Data.Set.Basic +import Mathlib.Data.Finset.Attr +import Mathlib.Order.BooleanAlgebra.Set +import Mathlib.Tactic.SetLike /-! # Example 1.5 (Scott 1981, PRG-19, §1) @@ -37,6 +40,8 @@ Unlike Examples 1.2–1.4 this construction needs no `fin_cases`/`decide`: it is bookkeeping, so it audits **constructive** (`[propext, Quot.sound]`). -/ +@[expose] public section + namespace Domain.Neighborhood.Example15 open NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Example23.lean b/LeanPool/DomainTheory/Neighborhood/Example23.lean index 279216e7fc..6b4c031836 100644 --- a/LeanPool/DomainTheory/Neighborhood/Example23.lean +++ b/LeanPool/DomainTheory/Neighborhood/Example23.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Approximable -import LeanPool.DomainTheory.Neighborhood.Example12 -import LeanPool.DomainTheory.Neighborhood.ExampleB +public import LeanPool.DomainTheory.Neighborhood.Approximable +public import LeanPool.DomainTheory.Neighborhood.Example12 +public import LeanPool.DomainTheory.Neighborhood.ExampleB +public import Mathlib.Tactic.ToAdditive +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Attr.Core +import Mathlib.Tactic.SetLike /-! # Example 2.3 (Scott 1981, PRG-19, §2) — the parity map `f : B → T` @@ -46,6 +51,8 @@ codomain `T` of Example 1.2, whose `simp`/`fin_cases` proofs already do — pre-existing and harmless.) -/ +@[expose] public section + namespace Domain.Neighborhood.Example23 open Domain.Neighborhood NeighborhoodSystem ExampleB diff --git a/LeanPool/DomainTheory/Neighborhood/Example24.lean b/LeanPool/DomainTheory/Neighborhood/Example24.lean index 538095ffea..072dd83192 100644 --- a/LeanPool/DomainTheory/Neighborhood/Example24.lean +++ b/LeanPool/DomainTheory/Neighborhood/Example24.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Approximable -import LeanPool.DomainTheory.Neighborhood.ExampleB +public import LeanPool.DomainTheory.Neighborhood.Approximable +public import LeanPool.DomainTheory.Neighborhood.ExampleB +import Mathlib.Tactic.Attr.Core /-! # Example 2.4 (Scott 1981, PRG-19, §2) — eliminating the first run of `1`'s, `g : @@ -36,6 +38,8 @@ Definition 2.1(iii); (i) and (ii) are the principal-filter facts for the cone `(out σ)Σ*`. Constructive. -/ +@[expose] public section + namespace Domain.Neighborhood.Example24 open Domain.Neighborhood NeighborhoodSystem ExampleB diff --git a/LeanPool/DomainTheory/Neighborhood/Example43.lean b/LeanPool/DomainTheory/Neighborhood/Example43.lean index fc48abca41..c71d4f8667 100644 --- a/LeanPool/DomainTheory/Neighborhood/Example43.lean +++ b/LeanPool/DomainTheory/Neighborhood/Example43.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Example23 -import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.Example23 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Example 4.3 (Scott 1981, PRG-19, §4) — the natural-number domain `N` @@ -52,6 +58,8 @@ structurally from the truth domain `T` of Example 1.2 exactly as `Example23.parityMap` does. -/ +@[expose] public section + namespace Domain.Neighborhood.Example43 open Domain.Neighborhood NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Example44.lean b/LeanPool/DomainTheory/Neighborhood/Example44.lean index 76480aebf7..5cd97af96d 100644 --- a/LeanPool/DomainTheory/Neighborhood/Example44.lean +++ b/LeanPool/DomainTheory/Neighborhood/Example44.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Example23 -import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.ExampleB +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Example 4.4 (Scott 1981, PRG-19, §4) — the domain `C` of binary sequences @@ -51,6 +58,8 @@ The data constructions (`C`, `consMap`) are **choice-free** (`#print axioms ⊆ Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood.Example44 open Domain.Neighborhood NeighborhoodSystem ApproximableMap ExampleB diff --git a/LeanPool/DomainTheory/Neighborhood/Example61.lean b/LeanPool/DomainTheory/Neighborhood/Example61.lean index 0a8d7a0e84..4a59ade913 100644 --- a/LeanPool/DomainTheory/Neighborhood/Example61.lean +++ b/LeanPool/DomainTheory/Neighborhood/Example61.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Product +public import LeanPool.DomainTheory.Neighborhood.Product +public import LeanPool.DomainTheory.Neighborhood.Exercise318 import LeanPool.DomainTheory.Neighborhood.Exercise319Sum +import Mathlib.Order.BooleanAlgebra.Set /-! # Example 6.1 (Scott 1981, PRG-19, §6) — the tree algebra `D^§` and the domain @@ -49,6 +52,8 @@ All *data* is choice-free (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Example62.lean b/LeanPool/DomainTheory/Neighborhood/Example62.lean index 1e0341d138..e1c1f163dd 100644 --- a/LeanPool/DomainTheory/Neighborhood/Example62.lean +++ b/LeanPool/DomainTheory/Neighborhood/Example62.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.ExampleB +public import LeanPool.DomainTheory.Neighborhood.ExampleB +public import LeanPool.DomainTheory.Neighborhood.Exercise318 import LeanPool.DomainTheory.Neighborhood.Exercise319Sum +import Mathlib.Data.List.Monad +import Mathlib.Order.BooleanAlgebra.Set +import Mathlib.Tactic.Attr.Core /-! # Example 6.2 (Scott 1981, PRG-19, §6) — `B` and `C` as solutions of domain @@ -44,6 +49,8 @@ filter maps `toBB` (forward) / `fromBB` (inverse), mirroring All *data* is choice-free (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap ExampleB diff --git a/LeanPool/DomainTheory/Neighborhood/Example62A.lean b/LeanPool/DomainTheory/Neighborhood/Example62A.lean index 915594c0a0..5cfc9390f5 100644 --- a/LeanPool/DomainTheory/Neighborhood/Example62A.lean +++ b/LeanPool/DomainTheory/Neighborhood/Example62A.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.ExampleB +public import LeanPool.DomainTheory.Neighborhood.ExampleB +public import LeanPool.DomainTheory.Neighborhood.Exercise318 import LeanPool.DomainTheory.Neighborhood.Exercise319Sum +import Mathlib.Order.BooleanAlgebra.Set +import Mathlib.Tactic.Attr.Core /-! # Example 6.2 (Scott 1981, PRG-19, §6) — the generalisation `A ≅ Aⁿ + Aⁿ` @@ -56,6 +60,8 @@ aside (eventually-periodic trees ↔ regular events) are formalised in All *data* is choice-free (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood namespace Example62A diff --git a/LeanPool/DomainTheory/Neighborhood/Example62C.lean b/LeanPool/DomainTheory/Neighborhood/Example62C.lean index 4f623ee7b3..97619320e9 100644 --- a/LeanPool/DomainTheory/Neighborhood/Example62C.lean +++ b/LeanPool/DomainTheory/Neighborhood/Example62C.lean @@ -3,10 +3,17 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Example62 -import LeanPool.DomainTheory.Neighborhood.Example44 -import LeanPool.DomainTheory.Neighborhood.Exercise315 +module + +public import LeanPool.DomainTheory.Neighborhood.Example62 +public import LeanPool.DomainTheory.Neighborhood.Example44 +public import LeanPool.DomainTheory.Neighborhood.Exercise315 +import Mathlib.Data.Fintype.EquivFin +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Example 6.2 (Scott 1981, PRG-19, §6) — `C ≅ {{Λ}} + C + C` @@ -43,6 +50,8 @@ order-isomorphism All *data* is choice-free (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap ExampleB Example44 Example62 diff --git a/LeanPool/DomainTheory/Neighborhood/Example62Regular.lean b/LeanPool/DomainTheory/Neighborhood/Example62Regular.lean index 360cb2f32f..cc7ad7360e 100644 --- a/LeanPool/DomainTheory/Neighborhood/Example62Regular.lean +++ b/LeanPool/DomainTheory/Neighborhood/Example62Regular.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import Mathlib.Computability.MyhillNerode +public import Mathlib.Computability.MyhillNerode /-! # Example 6.2 (Scott 1981, PRG-19, §6) — eventually-periodic trees and regular @@ -55,6 +56,8 @@ orthogonal to the neighbourhood-system machinery. -/ +@[expose] public section + namespace Domain.Neighborhood namespace Example62Regular diff --git a/LeanPool/DomainTheory/Neighborhood/ExampleB.lean b/LeanPool/DomainTheory/Neighborhood/ExampleB.lean index 64303fc8c6..5c358cdc64 100644 --- a/LeanPool/DomainTheory/Neighborhood/ExampleB.lean +++ b/LeanPool/DomainTheory/Neighborhood/ExampleB.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic -import Mathlib.Data.List.Infix +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Data.Set.Basic +import Mathlib.Tactic.Attr.Core /-! # Example 1.B (Scott 1981, PRG-19, §1) — binary sequences @@ -51,6 +53,8 @@ list-prefix is decidable, so the trichotomy is choice-free. -/ +@[expose] public section + namespace Domain.Neighborhood.ExampleB open Domain.Neighborhood NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise112.lean b/LeanPool/DomainTheory/Neighborhood/Exercise112.lean index e0e9c14e5e..7c3bdd1ae2 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise112.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise112.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic import Mathlib.Data.Nat.Find +import Mathlib.Data.Set.Basic /-! # Exercise 1.12 (Scott 1981, PRG-19, §1) — the final-segment system on `ℕ` @@ -38,6 +40,8 @@ a finite `fin n` is constructive. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise112 open Domain.Neighborhood NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise113.lean b/LeanPool/DomainTheory/Neighborhood/Exercise113.lean index 2a3384b81f..2b01062d25 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise113.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise113.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.ExampleB -import LeanPool.DomainTheory.Neighborhood.Theorem111 +public import LeanPool.DomainTheory.Neighborhood.ExampleB +public import LeanPool.DomainTheory.Neighborhood.Theorem111 +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.Basic /-! # Exercise 1.13 (Scott 1981, PRG-19, §1) — the infinite binary system `B`, @@ -38,6 +41,8 @@ Constructive except `branch_isTotal`'s use of `B`'s structure (still `[propext, Quot.sound]`). -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise113 open Domain.Neighborhood NeighborhoodSystem ExampleB @@ -121,6 +126,6 @@ theorem branch_isTotal (p : ℕ → Bool) : B.IsTotal (branch p) := by · exact (branch_mem_iff p).mpr ⟨σ.length, h⟩ · have hlen : (prefixSeq p σ.length).length = σ.length := prefixSeq_length p σ.length have hσ : prefixSeq p σ.length = σ := h.eq_of_length hlen - exact (branch_mem_iff p).mpr ⟨σ.length, by rw [hσ]⟩ + exact (branch_mem_iff p).mpr ⟨σ.length, by rw [hσ]; exact List.prefix_rfl⟩ end Domain.Neighborhood.Exercise113 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise114.lean b/LeanPool/DomainTheory/Neighborhood/Exercise114.lean index be8b09464d..eafe98b2d0 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise114.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise114.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Basic.Finite.Defs +public import Mathlib.Data.Set.Basic import Mathlib.Data.Set.Finite.Basic /-! @@ -34,6 +37,8 @@ exactly the principals Constructive (`[propext, Quot.sound]`). -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise114 open Domain.Neighborhood NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise115.lean b/LeanPool/DomainTheory/Neighborhood/Exercise115.lean index 924c0cb8c8..709cbb444f 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise115.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise115.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic -import Mathlib.Tactic.NormNum +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Data.Set.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 1.15 (Scott 1981, PRG-19, §1) — non-isomorphic "finite-only" domains @@ -45,6 +51,8 @@ contains some atom); the constructions and the non-isomorphism argument are otherwise elementary. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise115 open Domain.Neighborhood NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise116.lean b/LeanPool/DomainTheory/Neighborhood/Exercise116.lean index e3da70ddca..e1fd9f8c09 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise116.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise116.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Basic.Finite.Defs +public import Mathlib.Data.Set.Basic import Mathlib.Data.Set.Finite.Basic /-! @@ -37,6 +40,8 @@ classification lemmas are not choice-free; the *constructions* (`ofExcluded`, are `[propext, Quot.sound]`. -/ +@[expose] public section + namespace Domain.Neighborhood namespace Cofinite diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise117.lean b/LeanPool/DomainTheory/Neighborhood/Exercise117.lean index d1148fd370..adf78989d8 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise117.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise117.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Basic.Real.Basic import Mathlib.Algebra.Order.Archimedean.Real.Basic -import Mathlib.Basic.Real.Basic -import Mathlib.Data.Rat.Cast.Order /-! # Exercise 1.17 (Scott 1981, PRG-19, §1) — rational open intervals on `ℝ` @@ -38,6 +38,8 @@ The constructions are `[propext, Quot.sound]`; injectivity uses `exists_rat_btwn classical). -/ +@[expose] public section + namespace Domain.Neighborhood namespace RatInterval diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise118.lean b/LeanPool/DomainTheory/Neighborhood/Exercise118.lean index 362b0510f5..7f590dc439 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise118.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise118.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic import Mathlib.Data.Fintype.Basic import Mathlib.Tactic.FinCases import Mathlib.Tactic.IntervalCases @@ -36,6 +37,8 @@ Constructive (`[propext, Quot.sound]`) except the counterexample's finite case-analysis. -/ +@[expose] public section + namespace Domain.Neighborhood /-- Concatenation of two finite sequences: the first `n1` entries are `X1 0, …, X1 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise119.lean b/LeanPool/DomainTheory/Neighborhood/Exercise119.lean index 56460e8c69..cdcf9d7968 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise119.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise119.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Data.Set.Basic import Mathlib.Data.Fintype.Basic import Mathlib.Tactic.FinCases @@ -37,6 +39,8 @@ with Everything is `[propext, Quot.sound]`. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise119 open Domain.Neighborhood diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise120.lean b/LeanPool/DomainTheory/Neighborhood/Exercise120.lean index d5444eb9b5..c7f29b0cce 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise120.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise120.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +import Mathlib.Data.Set.Basic import Mathlib.Tactic.Tauto /-! @@ -37,6 +39,8 @@ unlike Def 1.7's `principal`. Everything is `[propext, Quot.sound]`. -/ +@[expose] public section + namespace Domain.Neighborhood namespace NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise121.lean b/LeanPool/DomainTheory/Neighborhood/Exercise121.lean index 2cc81a2553..d9ab5fe11d 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise121.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise121.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Theorem110 +public import LeanPool.DomainTheory.Neighborhood.Theorem110 /-! # Exercise 1.21 (Scott 1981, PRG-19, §1) — Theorem 1.10 in greater detail @@ -34,6 +35,8 @@ proofs of Theorem 1.10 / Theorem 1.1c). -/ +@[expose] public section + namespace Domain.Neighborhood namespace NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise122.lean b/LeanPool/DomainTheory/Neighborhood/Exercise122.lean index 5385f40d77..aa8969c404 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise122.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise122.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Topology.Defs.Filter import Mathlib.Topology.Inseparable /-! @@ -56,6 +58,8 @@ questions of the exercise need Definition 1.7 (`↑X`) and are deferred. -/ +@[expose] public section + namespace Domain.Neighborhood namespace NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise123.lean b/LeanPool/DomainTheory/Neighborhood/Exercise123.lean index 12a3f02c79..58861a5431 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise123.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise123.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +import Mathlib.Data.Set.Basic /-! # Exercise 1.23 (Scott 1981, PRG-19, §1) — the greedy total element of a countable @@ -44,6 +46,8 @@ maximal: any `W` The construction is `[propext, Quot.sound]` given the supplied `DecidablePred`. -/ +@[expose] public section + namespace Domain.Neighborhood namespace NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise124.lean b/LeanPool/DomainTheory/Neighborhood/Exercise124.lean index ddaac4e9e4..69cb7bf98f 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise124.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise124.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Order.Preorder.Chain import Mathlib.Order.Zorn /-! @@ -40,6 +42,8 @@ legitimately uses *construction* is choice-free (`[propext, Quot.sound]`). -/ +@[expose] public section + namespace Domain.Neighborhood namespace NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise125.lean b/LeanPool/DomainTheory/Neighborhood/Exercise125.lean index 5557d1dc90..5c2189e00c 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise125.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise125.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic -import Mathlib.Order.UpperLower.Basic -import Mathlib.Order.Bounds.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Order.UpperLower.Basic /-! # Exercise 1.25 (Scott 1981, PRG-19, §1) — final segments of an ordinal @@ -50,6 +50,8 @@ The system and `Ici` lemmas are `[propext, Quot.sound]`; the classification's surjectivity uses the well-ordering (`WellFounded.has_min`), so it is classical. -/ +@[expose] public section + namespace Domain.Neighborhood namespace FinalSegment diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise126.lean b/LeanPool/DomainTheory/Neighborhood/Exercise126.lean index b1ea1dc866..d2b83d5085 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise126.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise126.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic -import Mathlib.RingTheory.Ideal.Span -import Mathlib.Tactic.Ring +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.RingTheory.Ideal.Span /-! # Exercise 1.26 (Scott 1981, PRG-19, §1) — ideals of a commutative ring @@ -41,6 +41,8 @@ Constructive (`[propext, Quot.sound]`): the round trips are equational, the only inputs being mathlib's `Ideal.span` API. -/ +@[expose] public section + namespace Domain.Neighborhood namespace Ring diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise127.lean b/LeanPool/DomainTheory/Neighborhood/Exercise127.lean index 2f3fd4aa4c..9a66ef36ea 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise127.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise127.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise118 +public import LeanPool.DomainTheory.Neighborhood.Exercise118 +public import Mathlib.Basic.Finite.Defs +import Mathlib.Data.Rat.Cast.Order import Mathlib.Data.Set.Finite.Range -import Mathlib.Tactic.NormNum +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 1.27 (Scott 1981, PRG-19, §1) — bounded sets and least upper bounds @@ -42,6 +48,8 @@ this is a *proof*, so the construction stays choice-free. -/ +@[expose] public section + namespace Domain.Neighborhood namespace NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise213.lean b/LeanPool/DomainTheory/Neighborhood/Exercise213.lean index b77448f24c..0530bafdc6 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise213.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise213.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.ApproximableExercises -import LeanPool.DomainTheory.Neighborhood.Exercise122 +public import LeanPool.DomainTheory.Neighborhood.ApproximableExercises +public import LeanPool.DomainTheory.Neighborhood.Exercise122 +import Mathlib.Topology.Continuous /-! # Exercise 2.13 (Scott 1981, PRG-19, §2) — approximable maps **are** the @@ -51,6 +53,8 @@ Choice-free apart from the `ofMono`/Exercise-2.9 ingredients (whose uniqueness companions are the only classical pieces). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise214.lean b/LeanPool/DomainTheory/Neighborhood/Exercise214.lean index 3c2c8cb072..d5fde454b2 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise214.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise214.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Approximable +public import LeanPool.DomainTheory.Neighborhood.Approximable +import Mathlib.Data.Set.Basic /-! # Exercise 2.14 (Scott 1981, PRG-19, §2) — the neighbourhood correspondence `φ` of @@ -46,6 +48,8 @@ X' ∈ 𝒟₀`). order-theoretic proofs of `rel_ofIso_iff`/`phi_inter` are otherwise choice-free (`propext`, `Quot.sound`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise215.lean b/LeanPool/DomainTheory/Neighborhood/Exercise215.lean index e5738a1349..cb7a800717 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise215.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise215.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module +public import LeanPool.DomainTheory.Neighborhood.Approximable +public import LeanPool.DomainTheory.Neighborhood.Exercise122 import LeanPool.DomainTheory.Neighborhood.Exercise213 +import Mathlib.Topology.Continuous /-! # Exercise 2.15 (Scott 1981, PRG-19, §2) — the one-token system `𝒪` (Sierpiński @@ -57,6 +61,8 @@ Choice-free (`#print axioms ⊆ {propext, Quot.sound}`) apart from the `eq_of_toElementMap_principal` uniqueness step inherited from Exercise 2.8. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise215 open Domain.Neighborhood NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise216.lean b/LeanPool/DomainTheory/Neighborhood/Exercise216.lean index a8b1973a8e..f05d9bc7ff 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise216.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise216.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Approximable -import LeanPool.DomainTheory.Neighborhood.ExampleB +public import LeanPool.DomainTheory.Neighborhood.Approximable +public import LeanPool.DomainTheory.Neighborhood.ExampleB /-! # Exercise 2.16 (Scott 1981, PRG-19, §2) — the prefixing map `x ↦ σx` is @@ -30,6 +31,8 @@ map satisfying `f(1x)=true`, `f(01x)=false`, `f(00x)=f(x)` — is an equational-uniqueness statement left to a later pass.) Constructive (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise216 open Domain.Neighborhood NeighborhoodSystem ExampleB diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise218.lean b/LeanPool/DomainTheory/Neighborhood/Exercise218.lean index 8e6c783e77..23dbda4a6f 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise218.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise218.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Example24 -import LeanPool.DomainTheory.Neighborhood.ApproximableExercises +public import LeanPool.DomainTheory.Neighborhood.Approximable +public import LeanPool.DomainTheory.Neighborhood.ExampleB +public import Mathlib.Tactic.Attr.Core +import Mathlib.Order.BooleanAlgebra.Set +import Mathlib.Tactic.Widget.Calc /-! # Exercise 2.18 (Scott 1981, PRG-19, §2) — the "spacing" map `h : 𝔹 → 𝔹` @@ -44,6 +48,8 @@ to `⊥` (the first Choice-free (`#print axioms ⊆ {propext, Quot.sound}`): everything is decidable list surgery. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise218 open Domain.Neighborhood NeighborhoodSystem ExampleB ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise220.lean b/LeanPool/DomainTheory/Neighborhood/Exercise220.lean index a025893451..c285c3e8a9 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise220.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise220.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.ApproximableExercises +public import LeanPool.DomainTheory.Neighborhood.ApproximableExercises +public import Mathlib.Basic.Finite.Defs +public import Mathlib.Data.Set.Basic import Mathlib.Data.Set.Finite.Basic /-! @@ -50,6 +53,8 @@ Choice-free (`#print axioms ⊆ {propext, Quot.sound}`); the `mem_compl_of_finite` is structural recursion on a finiteness proof, not `Classical.choice`. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise220 open Domain.Neighborhood NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise221.lean b/LeanPool/DomainTheory/Neighborhood/Exercise221.lean index 947be975e3..f75aa6f6d8 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise221.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise221.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.ApproximableExercises -import LeanPool.DomainTheory.Neighborhood.ExampleB +public import LeanPool.DomainTheory.Neighborhood.ApproximableExercises +public import LeanPool.DomainTheory.Neighborhood.ExampleB +import Mathlib.Order.BooleanAlgebra.Set +import Mathlib.Tactic.Attr.Core /-! # Exercise 2.21 (Scott 1981, PRG-19) — the system `𝒞`, total finite sequences, @@ -56,6 +59,8 @@ after `x` is known to have terminated. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise221 open Domain.Neighborhood NeighborhoodSystem ExampleB diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise222.lean b/LeanPool/DomainTheory/Neighborhood/Exercise222.lean index 2d9be9d8c6..f890abbfd2 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise222.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise222.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Approximable -import Mathlib.Data.Set.Finite.Basic -import Mathlib.Data.Set.Lattice.Bounded -import Mathlib.Data.Set.Lattice.Disjoint -import Mathlib.Data.Set.Lattice.Image -import Mathlib.Order.Directed +public import Mathlib.Order.Directed +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Basic.Finite.Defs +public import Mathlib.Order.SetNotation +public import Mathlib.Tactic.ToAdditive +import Mathlib.Data.Set.BooleanAlgebra +public import Mathlib.Data.Set.Finite.Basic /-! # Exercise 2.22 (Scott 1981, PRG-19) — the abstract representation theorem @@ -51,6 +53,8 @@ exercise's framing ("for set theorists"). -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise222 open Domain.Neighborhood NeighborhoodSystem Set diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise314.lean b/LeanPool/DomainTheory/Neighborhood/Exercise314.lean index 51808d4ae4..5013a83081 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise314.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise314.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Product +public import LeanPool.DomainTheory.Neighborhood.Product /-! # Exercise 3.14 (Scott 1981, PRG-19, §3) — the diagonal map @@ -38,6 +39,8 @@ here is the Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise315.lean b/LeanPool/DomainTheory/Neighborhood/Exercise315.lean index 21a6826bdd..b28c2528a2 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise315.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise315.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Product +public import LeanPool.DomainTheory.Neighborhood.Product +import Mathlib.Order.BooleanAlgebra.Set /-! # Exercise 3.15 (Scott 1981, PRG-19, §3) — the usual product isomorphisms @@ -30,6 +32,8 @@ it is a two-sided Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise316.lean b/LeanPool/DomainTheory/Neighborhood/Exercise316.lean index 6fa9c0f9e1..d2be68f42c 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise316.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise316.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise315 +public import LeanPool.DomainTheory.Neighborhood.Exercise315 +import Mathlib.Order.BooleanAlgebra.Set /-! # Exercise 3.16 (Scott 1981, PRG-19, §3) — the infinite iterate `𝒟^∞` @@ -50,6 +52,8 @@ inherited from the project's `Element.ext`/`prodEquiv` machinery, as elsewhere in §3. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise317.lean b/LeanPool/DomainTheory/Neighborhood/Exercise317.lean index 950177ad76..fb2ba574dd 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise317.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise317.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Example23 -import LeanPool.DomainTheory.Neighborhood.Exercise316 -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +module + +public import LeanPool.DomainTheory.Neighborhood.Exercise316 +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import LeanPool.DomainTheory.Neighborhood.Example12 +public import LeanPool.DomainTheory.Neighborhood.ExampleB +public import Mathlib.Tactic.ToAdditive +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 3.17 (Scott 1981, PRG-19, §3) — `B` is a retract of `T^∞` @@ -43,6 +52,8 @@ element can only lose the post-gap information. Hence `f` is one-one (`f_injective`). -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise317 open Domain.Neighborhood NeighborhoodSystem ExampleB ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise318.lean b/LeanPool/DomainTheory/Neighborhood/Exercise318.lean index 7ce597b84d..de2be68ad4 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise318.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise318.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Approximable +public import LeanPool.DomainTheory.Neighborhood.Approximable import Mathlib.Data.Set.Image -import Mathlib.Data.Set.Insert /-! # Exercise 3.18 (Scott 1981, PRG-19, §3) — the sum (coproduct) system @@ -37,6 +37,8 @@ maps.) Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise319.lean b/LeanPool/DomainTheory/Neighborhood/Exercise319.lean index 842f1da0c4..b721674bbf 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise319.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise319.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Product +public import LeanPool.DomainTheory.Neighborhood.Product /-! # Exercise 3.19 / 3.20 (Scott 1981, PRG-19, §3) — the product functor `f × g` @@ -33,6 +34,8 @@ is built. Everything here is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise319Sum.lean b/LeanPool/DomainTheory/Neighborhood/Exercise319Sum.lean index f4c0c238a1..fe81562a61 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise319Sum.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise319Sum.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise318 +public import LeanPool.DomainTheory.Neighborhood.Exercise318 +import Mathlib.Order.BooleanAlgebra.Set /-! # Exercise 3.19 (Scott 1981, PRG-19, §3) — the sum functor `f + g` @@ -35,6 +37,8 @@ on the basepoint `Λ` (i.e. `(f + g)(⊥)`) is unconstrained; our choice sends ` Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise321.lean b/LeanPool/DomainTheory/Neighborhood/Exercise321.lean index b184b5d066..3a2ccb4f05 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise321.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise321.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 3.21 (Scott 1981, PRG-19, §3) — when does `[Y, Z]` determine `Y` and @@ -33,6 +40,8 @@ outputs are `Δ₂`, or Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise322.lean b/LeanPool/DomainTheory/Neighborhood/Exercise322.lean index 59537bb1dd..ae9ce768b5 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise322.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise322.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 3.22 (Scott 1981, PRG-19, §3) — composition is approximable @@ -28,6 +35,8 @@ Definition 3.3, and then Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise323.lean b/LeanPool/DomainTheory/Neighborhood/Exercise323.lean index e854c21101..2559389f94 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise323.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise323.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Exercise315 -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +module + +public import LeanPool.DomainTheory.Neighborhood.Exercise315 +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import Mathlib.Tactic.ToAdditive +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 3.23 (Scott 1981, PRG-19, §3) — the category of domains is cartesian @@ -38,6 +46,8 @@ right adjoint to `- × 𝒟₀`. Everything is **choice-free** (`#print axioms {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise324.lean b/LeanPool/DomainTheory/Neighborhood/Exercise324.lean index 8a1dcb87fe..2e6ec590d1 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise324.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise324.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise315 -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import LeanPool.DomainTheory.Neighborhood.Exercise315 +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 3.24 (Scott 1981, PRG-19, §3) — function-space isomorphisms @@ -25,6 +32,8 @@ and Proposition 3.2's `prodEquiv` gives the domain isomorphism `funProdIso`. Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise324Distrib.lean b/LeanPool/DomainTheory/Neighborhood/Exercise324Distrib.lean index 95281063e1..accfe24cd2 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise324Distrib.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise324Distrib.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module +public import LeanPool.DomainTheory.Neighborhood.Product +public import LeanPool.DomainTheory.Neighborhood.Exercise318 import LeanPool.DomainTheory.Neighborhood.Exercise319Sum -import LeanPool.DomainTheory.Neighborhood.Product +import Mathlib.Order.BooleanAlgebra.Set /-! # Exercise 3.24(iii)(iv) (Scott 1981, PRG-19, §3) — sum/product "isomorphisms" @@ -46,6 +49,8 @@ extraction lemmas of Exercise 3.19. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise324Iter.lean b/LeanPool/DomainTheory/Neighborhood/Exercise324Iter.lean index bb4e46a4a9..9835a8f4c9 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise324Iter.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise324Iter.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise316 -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import LeanPool.DomainTheory.Neighborhood.Exercise316 +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 3.24(ii) (Scott 1981, PRG-19, §3) — `(𝒟₀ → 𝒟₁^∞) ≅ (𝒟₀ → 𝒟₁)^∞` @@ -34,6 +41,8 @@ from `Element.ext`, §3. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise325.lean b/LeanPool/DomainTheory/Neighborhood/Exercise325.lean index 9b98af83fa..d3c6d04d00 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise325.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise325.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise122 -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import LeanPool.DomainTheory.Neighborhood.Exercise122 +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 3.25 (Scott 1981, PRG-19, §3) — the open sets of `|𝒟|` form a domain @@ -40,6 +47,8 @@ recovered from its basic neighbourhoods. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise325 open Domain.Neighborhood NeighborhoodSystem Set diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise326.lean b/LeanPool/DomainTheory/Neighborhood/Exercise326.lean index 85c2edfb3b..73dfe78ef6 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise326.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise326.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Product -import LeanPool.DomainTheory.Neighborhood.Example23 +public import LeanPool.DomainTheory.Neighborhood.Product +public import LeanPool.DomainTheory.Neighborhood.Example23 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Set.Image +import Mathlib.Tactic.Attr.Core +import Mathlib.Tactic.SetLike /-! # Exercise 3.26 (Scott 1981, PRG-19, §3) — the conditional operator `cond` @@ -55,6 +60,8 @@ and from the project's `ext_of_toElementMap`/`Element.ext` machinery, as elsewhe in §3. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise326 open Domain.Neighborhood NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise326Sum.lean b/LeanPool/DomainTheory/Neighborhood/Exercise326Sum.lean index 7a9e60e60f..52f9621627 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise326Sum.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise326Sum.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise326 +public import LeanPool.DomainTheory.Neighborhood.Exercise326 +public import LeanPool.DomainTheory.Neighborhood.Exercise318 import LeanPool.DomainTheory.Neighborhood.Exercise319Sum +import Mathlib.Data.Finset.Attr +import Mathlib.Order.BooleanAlgebra.Set +import Mathlib.Tactic.Attr.Core +import Mathlib.Tactic.SetLike /-! # Exercise 3.26, continued (Scott 1981, PRG-19, §3) — the sum-valued conditional @@ -36,6 +42,8 @@ component are mutually exclusive because the three forms of a sum-neighbourhood copy, right copy) are mutually exclusive (Exercise 3.18, using non-emptiness). -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise326 open Domain.Neighborhood NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise327.lean b/LeanPool/DomainTheory/Neighborhood/Exercise327.lean index a55cfe8ef5..fecf233419 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise327.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise327.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise222 -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import LeanPool.DomainTheory.Neighborhood.Exercise222 +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 3.27 (Scott 1981, PRG-19, §3) — `(𝒟₀ → 𝒟₁)` is a domain, via Exercise @@ -47,6 +54,8 @@ Scott's "compare with Exercise 2.22 and from the `graph`-inversion. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise327 open Domain.Neighborhood NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise328.lean b/LeanPool/DomainTheory/Neighborhood/Exercise328.lean index 9ac25ca834..3a97bb8774 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise328.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise328.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.FunctionSpace -import LeanPool.DomainTheory.Neighborhood.Exercise127 +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 3.28 (Scott 1981, PRG-19, §3) — the elementwise formula for the least @@ -36,6 +42,8 @@ antisymmetry. Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise407.lean b/LeanPool/DomainTheory/Neighborhood/Exercise407.lean index 1f4a227e30..2f321cc4db 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise407.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise407.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Theorem41 -import LeanPool.DomainTheory.Neighborhood.ApproximableExercises +public import LeanPool.DomainTheory.Neighborhood.ApproximableExercises +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 4.7 (Scott 1981, PRG-19, Lecture IV) @@ -30,6 +36,8 @@ filters, Exercise 2.11 / All constructions are **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise408.lean b/LeanPool/DomainTheory/Neighborhood/Exercise408.lean index bfe0327668..67086a5f21 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise408.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise408.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Theorem41 -import LeanPool.DomainTheory.Neighborhood.ApproximableExercises +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 4.8 (Scott 1981, PRG-19, Lecture IV) — the principle of fixed-point @@ -39,6 +45,8 @@ used to compare the two directed unions. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise409.lean b/LeanPool/DomainTheory/Neighborhood/Exercise409.lean index 1dfaaeb04c..1cac0a56fd 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise409.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise409.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 4.9 (Scott 1981, PRG-19, Lecture IV) — the operator `Ψ` and `fix = @@ -45,6 +52,8 @@ through the project's permitted `Element.ext` / `ext_of_toElementMap`. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise410.lean b/LeanPool/DomainTheory/Neighborhood/Exercise410.lean index 247e48ca21..922648774c 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise410.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise410.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 4.10 (Scott 1981, PRG-19, Lecture IV) — the relativized domain `Dₐ` @@ -48,6 +55,8 @@ project's permitted `Element.ext`. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise411.lean b/LeanPool/DomainTheory/Neighborhood/Exercise411.lean index 34b2842dc6..8fc17ebef4 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise411.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise411.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise407 -import LeanPool.DomainTheory.Neighborhood.Exercise410 +public import LeanPool.DomainTheory.Neighborhood.Exercise410 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 4.11 (Scott 1981, PRG-19, Lecture IV) — Plotkin's uniqueness of `fix` @@ -46,6 +52,8 @@ the project's permitted `Element.ext`; the inclusion data `inclMap` is **choice-free**. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise412.lean b/LeanPool/DomainTheory/Neighborhood/Exercise412.lean index 9a2992ae4d..907f114cb7 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise412.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise412.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Approximable -import LeanPool.DomainTheory.Neighborhood.Example12 +public import LeanPool.DomainTheory.Neighborhood.Approximable +public import LeanPool.DomainTheory.Neighborhood.Example12 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Set.Insert +import Mathlib.Tactic.Attr.Core +import Mathlib.Tactic.SetLike /-! # Exercise 4.12 (Scott 1981, PRG-19, Lecture IV) @@ -31,6 +36,8 @@ classification, exactly as that file does. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise412 open NeighborhoodSystem ApproximableMap Example12 Example12.neighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise413.lean b/LeanPool/DomainTheory/Neighborhood/Exercise413.lean index 6039a937f4..65f70c06b9 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise413.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise413.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise118 -import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.Exercise118 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 4.13 (Scott 1981, PRG-19, Lecture IV) — eliminating the circularity @@ -54,6 +60,8 @@ used in 4.1 (`nat_iterate_unique`), closing the loop without circularity. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise414.lean b/LeanPool/DomainTheory/Neighborhood/Exercise414.lean index 314c813d2f..db9dcfbf21 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise414.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise414.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import Mathlib.Data.Set.Basic -import Mathlib.Order.Monotone.Basic +public import Mathlib.Data.Set.Basic /-! # Exercise 4.14 (Scott 1981, PRG-19, Lecture IV) — `P A` has a maximum fixed point @@ -42,6 +42,8 @@ Both constructions use **only monotonicity** and the complete-lattice structure entirely **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise414 variable {A : Type*} diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise415.lean b/LeanPool/DomainTheory/Neighborhood/Exercise415.lean index 57bbc5553c..444ffee287 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise415.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise415.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise124 +public import LeanPool.DomainTheory.Neighborhood.Exercise124 import LeanPool.DomainTheory.Neighborhood.Exercise413 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Order.Zorn +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 4.15 (Scott 1981, PRG-19, Lecture IV) — a maximal (and a least) fixed @@ -41,6 +49,8 @@ like Exercise 1.24; the `chainUnion` construction itself is choice-free. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise416.lean b/LeanPool/DomainTheory/Neighborhood/Exercise416.lean index 4f9b5508db..d3aa4d9a34 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise416.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise416.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise413 -import LeanPool.DomainTheory.Neighborhood.Exercise415 +public import LeanPool.DomainTheory.Neighborhood.Exercise413 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 4.16 (Scott 1981, PRG-19, Lecture IV) — the *optimal* fixed point @@ -37,6 +43,8 @@ the supply of maximal fixed points is classical. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise417.lean b/LeanPool/DomainTheory/Neighborhood/Exercise417.lean index dd50ea7a05..bf124723a4 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise417.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise417.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise414 -import Mathlib.Algebra.Group.Submonoid.Basic -import Mathlib.Algebra.Group.Pointwise.Set.Basic -import Mathlib.Algebra.Group.Nat.Defs +public import LeanPool.DomainTheory.Neighborhood.Exercise414 +public import Mathlib.Algebra.Group.Submonoid.Basic +public import Mathlib.Algebra.Group.Pointwise.Set.Basic +public import Mathlib.Algebra.Group.Nat.Defs /-! # Exercise 4.17 (Scott 1981, PRG-19, Lecture IV) — least solution in a monoid @@ -48,6 +49,8 @@ inheriting `lfpSet` from Exercise 4.14. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise417 open Pointwise diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise418.lean b/LeanPool/DomainTheory/Neighborhood/Exercise418.lean index aa880daec8..bb83c67506 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise418.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise418.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Example43 +public import LeanPool.DomainTheory.Neighborhood.Example43 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 4.18 (Scott 1981, PRG-19, Lecture IV) @@ -37,6 +44,8 @@ exactly as Example 4.3's **choice-free**. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise418 open Domain.Neighborhood NeighborhoodSystem ApproximableMap Example43 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise419.lean b/LeanPool/DomainTheory/Neighborhood/Exercise419.lean index 7086bb756b..99553e5bba 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise419.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise419.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Example44 -import LeanPool.DomainTheory.Neighborhood.Exercise326 +public import LeanPool.DomainTheory.Neighborhood.Example44 +public import LeanPool.DomainTheory.Neighborhood.Exercise326 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 4.19 (Scott 1981, PRG-19, Lecture IV) — verifying Example 4.4 @@ -57,6 +64,8 @@ structurally from `T` (Example 1.2), exactly as `Example23.parityMap` and `Example43.zeroMap` do. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise419 open Domain.Neighborhood NeighborhoodSystem ApproximableMap ExampleB Example44 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise420.lean b/LeanPool/DomainTheory/Neighborhood/Exercise420.lean index 52199a835e..aad40d4895 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise420.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise420.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 4.20 (Scott 1981, PRG-19, Lecture IV) @@ -29,6 +36,8 @@ whole file is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise421.lean b/LeanPool/DomainTheory/Neighborhood/Exercise421.lean index 2effc1eb29..bcbf08e1a5 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise421.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise421.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise414 -import Mathlib.Tactic.Ring +public import LeanPool.DomainTheory.Neighborhood.Exercise414 +public import Mathlib.Order.BooleanAlgebra.Set +public import Mathlib.Tactic.ToAdditive +import Mathlib.Algebra.Order.Ring.Nat +import Mathlib.Algebra.Order.Sub.Unbundled.Basic +import Mathlib.Tactic.Ring.RingNF /-! # Exercise 4.21 (Scott 1981, PRG-19, Lecture IV) — `≤` as a unique fixed point; @@ -52,6 +57,8 @@ All set-level constructions are **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise421 open Domain.Neighborhood.Exercise414 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise422.lean b/LeanPool/DomainTheory/Neighborhood/Exercise422.lean index d55506d227..e667fdb2fa 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise422.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise422.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise414 -import LeanPool.DomainTheory.Neighborhood.Theorem46 +public import LeanPool.DomainTheory.Neighborhood.Exercise414 +public import LeanPool.DomainTheory.Neighborhood.Theorem46 /-! # Exercise 4.22 (Scott 1981, PRG-19, Lecture IV) — carving a Peano model out of a @@ -50,6 +51,8 @@ existence statement live over `Classical.choice` exactly as Theorem 4.6's bijection does. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise422 open Domain.Neighborhood Domain.Neighborhood.Exercise414 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise423.lean b/LeanPool/DomainTheory/Neighborhood/Exercise423.lean index a610843eb2..ef121a5b03 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise423.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise423.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module +public import LeanPool.DomainTheory.Neighborhood.Approximable +public import Mathlib.Order.Bounds.Defs import LeanPool.DomainTheory.Neighborhood.Theorem41 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 4.23 (Scott 1981, PRG-19, Lecture IV) — Eilenberg's uniqueness @@ -47,6 +56,8 @@ The argument uses only the project's permitted element-extensionality through `Theorem41`. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise424.lean b/LeanPool/DomainTheory/Neighborhood/Exercise424.lean index d6f61dd5be..149c98109d 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise424.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise424.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise414 +public import LeanPool.DomainTheory.Neighborhood.Exercise414 /-! # Exercise 4.24 (Scott 1981, PRG-19, Lecture IV) — Schröder–Bernstein via a fixed @@ -47,6 +48,8 @@ inherently classical; the construction of `h` uses `Classical.choice` (the the statement demands. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise424 open Domain.Neighborhood.Exercise414 Function diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise425.lean b/LeanPool/DomainTheory/Neighborhood/Exercise425.lean index e8f04f2a6b..2fdc6f38a4 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise425.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise425.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Example43 +public import LeanPool.DomainTheory.Neighborhood.Example43 +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 4.25 (Scott 1981, PRG-19, Lecture IV) — the unary sequence domain `C₁` @@ -51,6 +59,8 @@ The data (`C₁`, `consMap`, `relateNToC1`) is **choice-free** (`#print axioms Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise425 open Domain.Neighborhood NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise507.lean b/LeanPool/DomainTheory/Neighborhood/Exercise507.lean index a12e617426..a4ec940d85 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise507.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise507.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 5.7 (Scott 1981, PRG-19, §5) — multi-variable `λ` and application from @@ -50,6 +57,8 @@ No new axioms are introduced beyond the project's `Element.ext` / already used by `curry`/`uncurry`. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise507 open Domain.Neighborhood NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise508.lean b/LeanPool/DomainTheory/Neighborhood/Exercise508.lean index 9328837f40..e11ceaa94c 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise508.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise508.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +module + +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.Basic +public import Mathlib.Tactic.ToAdditive +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 5.8 (Scott 1981, PRG-19, §5) — combinatory completeness @@ -71,6 +81,8 @@ Everything is **data**; the combinators are built from `idMap`, `curry`, `proj`, choice-free. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise508 open Domain.Neighborhood NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise509.lean b/LeanPool/DomainTheory/Neighborhood/Exercise509.lean index 065c010e58..218c79fa3d 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise509.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise509.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Exercise407 -import Mathlib.Tactic.Ring +module + +public import LeanPool.DomainTheory.Neighborhood.Exercise407 +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.Exercise408 +public import LeanPool.DomainTheory.Neighborhood.Exercise411 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # Exercise 5.9 (Scott 1981, PRG-19, Lecture V) @@ -37,6 +46,8 @@ leastness. All maps and elements are choice-free; the equalities use only the order on `|𝒟|`. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap @@ -88,10 +99,7 @@ theorem commuting_least_common_fixed {f g : ApproximableMap V V} (hcomm : f.comp have haw : a ≤ w := fixElement_le_of_toElementMap_le f (le_of_eq hfw) exact fixAbove_least g ha_le haw (le_of_eq hgw) -/-- `f.iterElem (n+1) = f(fⁿ(⊥))`. -/ -theorem iterElem_succ (f : ApproximableMap V V) (n : ℕ) : - f.iterElem (n + 1) = f.toElementMap (f.iterElem n) := by - rw [iterElem_eq_iterate, iterElem_eq_iterate, Function.iterate_succ', Function.comp_apply] + theorem iterElem_zero' (f : ApproximableMap V V) : f.iterElem 0 = V.bot := by rw [iterElem_eq_iterate, Function.iterate_zero_apply] @@ -149,11 +157,7 @@ theorem fixElement_eq_of_commuting_bot {f g : ApproximableMap V V} (hcomm : f.co · exact fixElement_le_of_toElementMap_le f (le_of_eq hffixg) · exact fixElement_le_of_toElementMap_le g (le_of_eq hgfixf) -/-- `fⁿ(⊥) ⊑ fix(f)`. -/ -theorem iterElem_le_fixElement (f : ApproximableMap V V) (n : ℕ) : - f.iterElem n ≤ f.fixElement := by - rw [fixElement_eq_iSupDirected f] - exact NeighborhoodSystem.le_iSupDirected f.iterElem _ n + /-- `(f²)ⁿ(⊥) = f^{2n}(⊥)`. -/ theorem comp_self_iterElem (f : ApproximableMap V V) (n : ℕ) : diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise510.lean b/LeanPool/DomainTheory/Neighborhood/Exercise510.lean index 6c33c7204d..5a892c8579 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise510.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise510.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import Mathlib.Tactic.ToAdditive +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 5.10 (Scott 1981, PRG-19, §5) — the smash product and the strict @@ -68,6 +76,8 @@ enters only the `smashCurryEquiv` *proof*, through the genuinely-classical `X = boundary case analysis. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise510 open Domain.Neighborhood NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise511.lean b/LeanPool/DomainTheory/Neighborhood/Exercise511.lean index 525327eae5..6a499e121b 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise511.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise511.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise316 -import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.Exercise316 +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 5.11 (Scott 1981, PRG-19, §5) — `D^∞` as stacks; stack combinators @@ -49,6 +56,8 @@ the project's `Element.ext` machinery. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise511 open Domain.Neighborhood NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise512.lean b/LeanPool/DomainTheory/Neighborhood/Exercise512.lean index 48ec9be1a5..05d75cb174 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise512.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise512.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Theorem41 -import LeanPool.DomainTheory.Neighborhood.Exercise326 +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.Exercise326 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 5.12 (Scott 1981, PRG-19, §5) — the `while` combinator @@ -55,6 +62,8 @@ Everything is choice-free in spirit; the only classical input is inherited from (Example 1.2) and the project's `Element.ext` / `ext_of_toElementMap` machinery. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise512 open Domain.Neighborhood NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise513.lean b/LeanPool/DomainTheory/Neighborhood/Exercise513.lean index f2346d9a86..9d353890fa 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise513.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise513.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import Mathlib.Logic.Equiv.Nat -import Mathlib.Order.Hom.Set -import Mathlib.Data.Set.Image -import Mathlib.Algebra.Ring.Parity -import Mathlib.Tactic.Ring +public import Mathlib.Logic.Equiv.Nat +import Mathlib.Algebra.Order.Group.Nat +import Mathlib.Algebra.Order.Monoid.NatCast +import Mathlib.Tactic.Ring.RingNF /-! # Exercise 5.13 (Scott 1981, PRG-19, Lecture V) — a one-one pairing `num : N × N → @@ -76,6 +76,8 @@ Everything (including `numEquiv` and the order-isomorphisms) is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise513 /-! ### Triangular numbers -/ diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise514.lean b/LeanPool/DomainTheory/Neighborhood/Exercise514.lean index 5ea3da8cea..05fcbd151b 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise514.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise514.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise513 -import Mathlib.Data.List.Basic +public import LeanPool.DomainTheory.Neighborhood.Exercise513 +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 5.14 (Scott 1981, PRG-19, Lecture V) — the graph model `Pω` @@ -61,6 +63,8 @@ continuous maps. Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise514 open Domain.Neighborhood.Exercise513 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise515.lean b/LeanPool/DomainTheory/Neighborhood/Exercise515.lean index fbda4ad86b..b7a8d3cbe6 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise515.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise515.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise414 -import Mathlib.Algebra.Group.Pointwise.Set.Basic -import Mathlib.Algebra.FreeMonoid.Basic +public import LeanPool.DomainTheory.Neighborhood.Exercise414 +public import Mathlib.Algebra.Group.Pointwise.Set.Basic +public import Mathlib.Algebra.FreeMonoid.Basic /-! # Exercise 5.15 (Scott 1981, PRG-19, Lecture V) — free-semigroup powerset and @@ -51,6 +52,8 @@ recursion (`kpow`) rather than `⋃ₙ zⁿ`, and phrase Arden's lemma without everything **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise515 open Pointwise diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise516.lean b/LeanPool/DomainTheory/Neighborhood/Exercise516.lean index 7d08a7ceee..c5e0b9cb6d 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise516.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise516.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Exercise419 -import LeanPool.DomainTheory.Neighborhood.Product +module + +public import LeanPool.DomainTheory.Neighborhood.Exercise419 +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.Basic +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 5.16 (Scott 1981, PRG-19, Lecture V) — `neg`, `merge` and `d` on `C` @@ -57,6 +65,8 @@ overlap-freeness) are real combinatorics-on-words and are left as a separate follow-up. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise516 open Domain.Neighborhood NeighborhoodSystem ApproximableMap ExampleB Example44 Exercise419 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise516Overlap.lean b/LeanPool/DomainTheory/Neighborhood/Exercise516Overlap.lean index ef9b85791c..2c1c225d95 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise516Overlap.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise516Overlap.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise516ThueMorse +public import LeanPool.DomainTheory.Neighborhood.Exercise516ThueMorse +public import Mathlib.Algebra.Ring.Parity +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 5.16 follow-up (Scott 1981, PRG-19, Lecture V) — overlap-freeness of @@ -37,6 +45,8 @@ period `≥ 5` forces a run of three equal symbols. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise516 open Domain.Neighborhood diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise516ThueMorse.lean b/LeanPool/DomainTheory/Neighborhood/Exercise516ThueMorse.lean index 814d29d08d..456dda2429 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise516ThueMorse.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise516ThueMorse.lean @@ -3,10 +3,17 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Exercise516 -import Mathlib.Data.Nat.Bits -import Mathlib.Tactic.Ring +module + +public import LeanPool.DomainTheory.Neighborhood.Exercise516 +public import Mathlib.Data.Nat.Bits +public import Mathlib.Algebra.Group.Nat.Defs +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # Exercise 5.16 follow-up (Scott 1981, PRG-19, Lecture V) — the Thue–Morse @@ -57,6 +64,8 @@ word-combinatorics theorem and lives in its own module. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise516 open Domain.Neighborhood NeighborhoodSystem ApproximableMap ExampleB Example44 Exercise419 @@ -208,7 +217,7 @@ theorem tmList_length (n : ℕ) : (tmList n).length = n := by /-- Thue–Morse prefixes are nested in the prefix order. -/ theorem tmList_prefix {n m : ℕ} (h : n ≤ m) : tmList n <+: tmList m := by induction m with - | zero => rw [Nat.le_zero.mp h] + | zero => rw [Nat.le_zero.mp h]; exact List.prefix_rfl | succ m ih => rcases Nat.lt_succ_iff_lt_or_eq.mp (Nat.lt_succ_of_le h) with hlt | rfl · exact (ih (Nat.lt_succ_iff.mp hlt)).trans (by rw [tmList_succ]; exact List.prefix_append _ _) diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise617.lean b/LeanPool/DomainTheory/Neighborhood/Exercise617.lean index 00c8d0aa0e..c7920df486 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise617.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise617.lean @@ -3,11 +3,21 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Definition63 -import LeanPool.DomainTheory.Neighborhood.Theorem69 -import LeanPool.DomainTheory.Neighborhood.Example62C +public import LeanPool.DomainTheory.Neighborhood.Definition63 +public import LeanPool.DomainTheory.Neighborhood.Example62C +public import LeanPool.DomainTheory.Neighborhood.Exercise419 +public import LeanPool.DomainTheory.Neighborhood.Exercise510 +public import Mathlib.Tactic.Attr.Core import LeanPool.DomainTheory.Neighborhood.Exercise516 +public import LeanPool.DomainTheory.Neighborhood.Theorem69 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 6.17 (Scott 1981, PRG-19, §6) — the algebras for which `C` is initial @@ -72,6 +82,8 @@ reuses the project's established machinery. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Domain.Neighborhood.Exercise510 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise617Gen.lean b/LeanPool/DomainTheory/Neighborhood/Exercise617Gen.lean index 84d1cf8f58..cda2a834ee 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise617Gen.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise617Gen.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise617 +public import LeanPool.DomainTheory.Neighborhood.Exercise617 +import Mathlib.Data.Fintype.EquivFin +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 6.17 part 2 (Scott 1981, PRG-19) — the generalization `Cₐ ≅ 𝟙 + Σₐ Cₐ` @@ -36,6 +43,8 @@ and the data (`Cn`, `consMapN`) stays choice-free. -/ +@[expose] public section + namespace Domain.Neighborhood.Exercise617Gen open Domain.Neighborhood NeighborhoodSystem ApproximableMap Domain.Neighborhood.Exercise510 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise618.lean b/LeanPool/DomainTheory/Neighborhood/Exercise618.lean index 37fde58f0c..196f58284c 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise618.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise618.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Exercise316 -import LeanPool.DomainTheory.Neighborhood.Exercise319 -import LeanPool.DomainTheory.Neighborhood.Exercise617 +module + +public import LeanPool.DomainTheory.Neighborhood.Exercise316 +public import LeanPool.DomainTheory.Neighborhood.Exercise319 +public import LeanPool.DomainTheory.Neighborhood.Exercise617 +import LeanPool.DomainTheory.Neighborhood.Theorem69 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 6.18 (Scott 1981, PRG-19, §6) — `𝒟^∞` as an initial algebra @@ -63,6 +71,8 @@ T(ρₙ) ∘ j`, Everything is choice-free where it is data. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Domain.Neighborhood.Exercise510 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise619.lean b/LeanPool/DomainTheory/Neighborhood/Exercise619.lean index ec609a3f92..1487f7a3c8 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise619.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise619.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Example62 -import LeanPool.DomainTheory.Neighborhood.Product +public import LeanPool.DomainTheory.Neighborhood.Example62 +public import LeanPool.DomainTheory.Neighborhood.Product +import LeanPool.DomainTheory.Neighborhood.Exercise319Sum +import Mathlib.Data.List.Monad +import Mathlib.Order.BooleanAlgebra.Set +import Mathlib.Tactic.Attr.Core /-! # Exercise 6.19 (Scott 1981, PRG-19, §6) — sum and product on the category of @@ -50,6 +55,8 @@ continuous on maps, monotone and continuous on domains) is **Part B**, deferred. Everything here is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Example62 ExampleB diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise619PartB.lean b/LeanPool/DomainTheory/Neighborhood/Exercise619PartB.lean index f4766afd8a..456276b5d3 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise619PartB.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise619PartB.lean @@ -3,11 +3,23 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Exercise619 -import LeanPool.DomainTheory.Neighborhood.Definition613 -import LeanPool.DomainTheory.Neighborhood.Exercise213 -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +module + +public import LeanPool.DomainTheory.Neighborhood.Exercise619 +public import LeanPool.DomainTheory.Neighborhood.Definition610 +public import LeanPool.DomainTheory.Neighborhood.Exercise510 +public import Mathlib.Order.Directed +public import Mathlib.Order.SetNotation +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.Basic +import Mathlib.Data.Finset.Attr +import Mathlib.Data.List.Monad +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 6.19 (Scott 1981, PRG-19, §6) — Part B: the functor algebra @@ -82,6 +94,8 @@ needs. Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Domain.Neighborhood.Exercise619 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise621.lean b/LeanPool/DomainTheory/Neighborhood/Exercise621.lean index 25414237ef..fbebf27ec7 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise621.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise621.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise619PartB +public import LeanPool.DomainTheory.Neighborhood.Exercise619PartB +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 6.21 (Scott 1981, PRG-19, §6) — the *separated* sum `⊕` and product `⊗` @@ -39,6 +47,8 @@ category. Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Domain.Neighborhood.Exercise619 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise622.lean b/LeanPool/DomainTheory/Neighborhood/Exercise622.lean index 37f4c5fac4..f68f65f529 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise622.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise622.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise621 +public import LeanPool.DomainTheory.Neighborhood.Exercise621 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 6.22 (Scott 1981, PRG-19, §6) — commenting on three domain equations @@ -62,6 +70,8 @@ Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Domain.Neighborhood.Exercise619 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise623.lean b/LeanPool/DomainTheory/Neighborhood/Exercise623.lean index d0ade7f911..60843ca728 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise623.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise623.lean @@ -3,9 +3,19 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Exercise621 -import LeanPool.DomainTheory.Neighborhood.Theorem69 +module + +public import LeanPool.DomainTheory.Neighborhood.Exercise621 +public import LeanPool.DomainTheory.Neighborhood.Definition63 +public import LeanPool.DomainTheory.Neighborhood.Proposition612 +public import LeanPool.DomainTheory.Neighborhood.Theorem69 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 6.23 (Scott 1981, PRG-19, §6) — the syntactic domain of expressions @@ -77,6 +87,8 @@ union, not an existential witness). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Domain.Neighborhood.Exercise619 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise624.lean b/LeanPool/DomainTheory/Neighborhood/Exercise624.lean index b3ddc11ba5..b23b89dc1e 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise624.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise624.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise619PartB +public import LeanPool.DomainTheory.Neighborhood.Exercise619PartB +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 6.24 (Scott 1981, PRG-19, §6) — a **double fixed point** for a system @@ -79,6 +87,8 @@ of the simultaneous Theorem 6.14, which then yields the required isomorphisms Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem Domain.Neighborhood.Exercise619 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise625.lean b/LeanPool/DomainTheory/Neighborhood/Exercise625.lean index 13b407e5fa..1eba16677d 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise625.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise625.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Proposition612 +public import LeanPool.DomainTheory.Neighborhood.Proposition612 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture VI — Exercise 6.25 (Scott 1981, PRG-19): the Galois connection of a @@ -62,6 +69,8 @@ Exercises 1.18/1.27 are the only constructions used and are themselves choice-free. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Subsystem diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise626.lean b/LeanPool/DomainTheory/Neighborhood/Exercise626.lean index 1bfea8e79b..c854b87f1f 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise626.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise626.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Exercise621 +public import LeanPool.DomainTheory.Neighborhood.Exercise621 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 6.26 (Scott 1981, PRG-19, §6) — the lifting `𝒟_⊥` over `{0,1}*` @@ -51,6 +59,8 @@ to decide whether an element lies above the fresh bottom — unavoidable and cal out there. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Domain.Neighborhood.Exercise619 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise627.lean b/LeanPool/DomainTheory/Neighborhood/Exercise627.lean index 134b65100b..eae830046e 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise627.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise627.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Exercise621 -import LeanPool.DomainTheory.Neighborhood.Lemma615 +module + +public import LeanPool.DomainTheory.Neighborhood.Exercise621 +public import LeanPool.DomainTheory.Neighborhood.Lemma615 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 6.27 (Scott 1981, PRG-19, §6) — which subsystem relations hold @@ -48,6 +56,8 @@ genuinely-undecidable test `X = Δ₀` over an arbitrary system and so depends on `Classical.choice`. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Domain.Neighborhood.Exercise619 diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise628.lean b/LeanPool/DomainTheory/Neighborhood/Exercise628.lean index aa70f4747d..805d23fbbb 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise628.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise628.lean @@ -3,10 +3,17 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Lemma615 +public import LeanPool.DomainTheory.Neighborhood.Lemma615 +public import Mathlib.Tactic.ToAdditive import LeanPool.DomainTheory.Neighborhood.Proposition612 import Mathlib.Data.Fintype.Powerset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exercise 6.28 (Scott 1981, PRG-19, §6) — Plotkin's finite @@ -68,6 +75,8 @@ genuinely unavoidable, as it extracts a `Fintype` from `Finite` and a surjection's section. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Exercise629.lean b/LeanPool/DomainTheory/Neighborhood/Exercise629.lean index 69c43c77b9..6785dcc5eb 100644 --- a/LeanPool/DomainTheory/Neighborhood/Exercise629.lean +++ b/LeanPool/DomainTheory/Neighborhood/Exercise629.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Product +public import LeanPool.DomainTheory.Neighborhood.Basic +public import Mathlib.Basic.Finite.Defs import Mathlib.Data.Set.Finite.Basic -import Mathlib.Data.Finset.Basic /-! # Exercise 6.29 (Scott 1981, PRG-19, §6) — infinitary sum and product @@ -75,6 +76,8 @@ argument through Mathlib's classical `Set.Finite`). Both are flagged in their docstrings. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/FunctionSpace.lean b/LeanPool/DomainTheory/Neighborhood/FunctionSpace.lean index 55b670109f..cb3f523be6 100644 --- a/LeanPool/DomainTheory/Neighborhood/FunctionSpace.lean +++ b/LeanPool/DomainTheory/Neighborhood/FunctionSpace.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Product -import LeanPool.DomainTheory.Neighborhood.Exercise127 +public import LeanPool.DomainTheory.Neighborhood.Product +public import LeanPool.DomainTheory.Neighborhood.Exercise127 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture III (§3) — the function space `(𝒟₀ → 𝒟₁)`: Definitions 3.8, Propositions @@ -53,6 +60,8 @@ neighbourhood, condition `sSupMaps` with `toElementMap_sSupMaps` (iii). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Lemma615.lean b/LeanPool/DomainTheory/Neighborhood/Lemma615.lean index 4e0211079c..286bddaef0 100644 --- a/LeanPool/DomainTheory/Neighborhood/Lemma615.lean +++ b/LeanPool/DomainTheory/Neighborhood/Lemma615.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Definition610 -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +module + +public import LeanPool.DomainTheory.Neighborhood.Definition610 +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public meta import Mathlib.Tactic.ToAdditive +public meta import Mathlib.Tactic.ToDual +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture VI — Lemma 6.15 (Scott 1981, PRG-19): the converse of Proposition 6.12 @@ -66,6 +75,8 @@ development is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Product.lean b/LeanPool/DomainTheory/Neighborhood/Product.lean index 49fdd4e06d..b4454f392f 100644 --- a/LeanPool/DomainTheory/Neighborhood/Product.lean +++ b/LeanPool/DomainTheory/Neighborhood/Product.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Approximable -import LeanPool.DomainTheory.Neighborhood.ApproximableExercises +public import LeanPool.DomainTheory.Neighborhood.ApproximableExercises +import Mathlib.Data.Set.Image /-! # Lecture III (§3) — the product system: Definitions 3.1, 3.3, Propositions 3.2, @@ -54,6 +55,8 @@ substitution Everything is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Proposition53.lean b/LeanPool/DomainTheory/Neighborhood/Proposition53.lean index 35189fb6a5..5b3037f3cf 100644 --- a/LeanPool/DomainTheory/Neighborhood/Proposition53.lean +++ b/LeanPool/DomainTheory/Neighborhood/Proposition53.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Table55 +public import LeanPool.DomainTheory.Neighborhood.Table55 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture V (§5) — Proposition 5.3 (Scott 1981, PRG-19) @@ -40,6 +47,8 @@ solution `⟨a, b⟩` one derives `!x.τ(x,b) ⊑ a`, hence `outerOp(b) ⊑ b`, universal properties of `fixElement`. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Proposition54.lean b/LeanPool/DomainTheory/Neighborhood/Proposition54.lean index 6175522e13..04046e46fe 100644 --- a/LeanPool/DomainTheory/Neighborhood/Proposition54.lean +++ b/LeanPool/DomainTheory/Neighborhood/Proposition54.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture V (§5) — Proposition 5.4 (Scott 1981, PRG-19) @@ -44,6 +51,8 @@ permitted `ext_of_toElementMap`. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Proposition611.lean b/LeanPool/DomainTheory/Neighborhood/Proposition611.lean index aceb2eed76..be82e865a0 100644 --- a/LeanPool/DomainTheory/Neighborhood/Proposition611.lean +++ b/LeanPool/DomainTheory/Neighborhood/Proposition611.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Definition610 -import LeanPool.DomainTheory.Neighborhood.Exercise222 +public import LeanPool.DomainTheory.Neighborhood.Definition610 +public import LeanPool.DomainTheory.Neighborhood.Exercise222 +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.SetLike /-! # Lecture VI — Proposition 6.11 (Scott 1981, PRG-19): the subsystems of `E` form a @@ -69,6 +72,8 @@ picks witnesses of non-emptiness and uses finite-set induction), exactly as Exercise 3.27 does. -/ +@[expose] public section + namespace Domain.Neighborhood.Proposition611 open Domain.Neighborhood NeighborhoodSystem Set Domain.Neighborhood.Exercise222 diff --git a/LeanPool/DomainTheory/Neighborhood/Proposition612.lean b/LeanPool/DomainTheory/Neighborhood/Proposition612.lean index b1910d05ef..51602eb545 100644 --- a/LeanPool/DomainTheory/Neighborhood/Proposition612.lean +++ b/LeanPool/DomainTheory/Neighborhood/Proposition612.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Definition610 -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +module + +public import LeanPool.DomainTheory.Neighborhood.Definition610 +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import Mathlib.Tactic.Attr.Core +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture VI — Proposition 6.12 (Scott 1981, PRG-19): a subdomain yields a @@ -52,6 +60,8 @@ The element-wise descriptions Scott records are `Subsystem.toElementMap_inj` and Everything here is **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Proposition66.lean b/LeanPool/DomainTheory/Neighborhood/Proposition66.lean index d6dc1c4d61..a8172aa6c2 100644 --- a/LeanPool/DomainTheory/Neighborhood/Proposition66.lean +++ b/LeanPool/DomainTheory/Neighborhood/Proposition66.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Definition63 +public import LeanPool.DomainTheory.Neighborhood.Definition63 /-! # Lecture VI — Proposition 6.6 (Scott 1981, PRG-19): initial algebras are uniquely @@ -27,6 +28,8 @@ realising it is the only one (`iso_hom_unique`). Choice-free (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood universe u diff --git a/LeanPool/DomainTheory/Neighborhood/Proposition67.lean b/LeanPool/DomainTheory/Neighborhood/Proposition67.lean index ba3a6c408c..4e6c5b546b 100644 --- a/LeanPool/DomainTheory/Neighborhood/Proposition67.lean +++ b/LeanPool/DomainTheory/Neighborhood/Proposition67.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Definition63 +public import LeanPool.DomainTheory.Neighborhood.Definition63 /-! # Lecture VI — Proposition 6.7 (Scott 1981, PRG-19): Lambek's lemma @@ -34,6 +35,8 @@ satisfy the domain equation `D ≅ T(D)`". Choice-free (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood universe u diff --git a/LeanPool/DomainTheory/Neighborhood/Proposition77.lean b/LeanPool/DomainTheory/Neighborhood/Proposition77.lean index 0967cc4fbf..2a5b72fec7 100644 --- a/LeanPool/DomainTheory/Neighborhood/Proposition77.lean +++ b/LeanPool/DomainTheory/Neighborhood/Proposition77.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Example61 -import LeanPool.DomainTheory.Neighborhood.Definition72 +public import LeanPool.DomainTheory.Neighborhood.Example61 +public import LeanPool.DomainTheory.Neighborhood.Definition71 /-! # Proposition 7.7 (Scott 1981, PRG-19, §7) — `D^§` is effectively given @@ -42,6 +43,8 @@ This file builds the construction in milestones: `surj` (every `𝒟^§`-neighbourhood is some `V k`), nonemptiness. All choice-free. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem Domain.Recursive Example61 diff --git a/LeanPool/DomainTheory/Neighborhood/Recursive.lean b/LeanPool/DomainTheory/Neighborhood/Recursive.lean index d8d30b047c..f3a2c10e48 100644 --- a/LeanPool/DomainTheory/Neighborhood/Recursive.lean +++ b/LeanPool/DomainTheory/Neighborhood/Recursive.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import Mathlib.Data.Nat.Sqrt -import Mathlib.Data.Nat.Pairing -import Mathlib.Computability.Partrec +public import Mathlib.Computability.Primrec.Basic /-! # A choice-free recursion theory for Lecture VII (Scott 1981, PRG-19) @@ -48,6 +47,8 @@ pairing round-trips (`unpair_pair'`, `pair_unpair'`) choice-free here. Everything in this file is `⊆ {propext, Quot.sound}`. -/ +@[expose] public section + namespace Domain.Recursive /-! ## Choice-free `Nat.sqrt` correctness diff --git a/LeanPool/DomainTheory/Neighborhood/Table55.lean b/LeanPool/DomainTheory/Neighborhood/Table55.lean index 3e98f7bada..51724cccc9 100644 --- a/LeanPool/DomainTheory/Neighborhood/Table55.lean +++ b/LeanPool/DomainTheory/Neighborhood/Table55.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture V (§5) — Table 5.5: a table of combinators @@ -54,6 +61,8 @@ established `ofIso`/`fixMap` API. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem110.lean b/LeanPool/DomainTheory/Neighborhood/Theorem110.lean index 20be1793c8..768ea483f5 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem110.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem110.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic +import Mathlib.Data.Set.Basic /-! # Theorem 1.10 (Scott 1981, PRG-19, §1) — the element-token system `{[X]}` @@ -40,6 +42,8 @@ Everything is constructive (`[propext, Quot.sound]`): `[X]`-membership is just filter laws mirror the constructive proofs for `principal`. -/ +@[expose] public section + namespace Domain.Neighborhood namespace NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem111.lean b/LeanPool/DomainTheory/Neighborhood/Theorem111.lean index 99de99bc74..691baaf6ed 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem111.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem111.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Basic -import Mathlib.Order.Monotone.Basic +public import LeanPool.DomainTheory.Neighborhood.Basic /-! # Theorem 1.11 (Scott 1981, PRG-19, §1) — closure of `|𝒟|` under sequential `⋂` @@ -34,6 +34,8 @@ filter law (ii) Everything is constructive (`[propext, Quot.sound]`). -/ +@[expose] public section + namespace Domain.Neighborhood namespace NeighborhoodSystem diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem41.lean b/LeanPool/DomainTheory/Neighborhood/Theorem41.lean index dcbf52cc8a..34e31289e0 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem41.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem41.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.FunctionSpace -import LeanPool.DomainTheory.Neighborhood.ApproximableExercises +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import Mathlib.Tactic.ToAdditive +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture IV (§4) — fixed points and recursion: Theorems 4.1 and 4.2 @@ -53,6 +60,8 @@ pulls `Classical.choice` only through the project's `ext_of_toElementMap`, as permitted. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem46.lean b/LeanPool/DomainTheory/Neighborhood/Theorem46.lean index 0b34d5e6dc..c1f2833759 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem46.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem46.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import Mathlib.Data.Set.Basic +public import Mathlib.Logic.Equiv.Defs +import Mathlib.Tactic.Finiteness.Attr /-! # Lecture IV (§4) — Definition 4.5 and Theorem 4.6: models of Peano's Axioms @@ -58,6 +60,8 @@ Dedekind/recursion theorem must. -/ +@[expose] public section + namespace Domain.Neighborhood universe u v diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem51.lean b/LeanPool/DomainTheory/Neighborhood/Theorem51.lean index f64240acb6..ce1471d368 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem51.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem51.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Table55 +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture V (§5) — Theorem 5.1 (Scott 1981, PRG-19) @@ -44,6 +51,8 @@ This module collects the five closure facts as concrete lemmas; everything is **choice-free**. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem52.lean b/LeanPool/DomainTheory/Neighborhood/Theorem52.lean index af6bd6134c..e81093d9bf 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem52.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem52.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Table55 +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture V (§5) — Theorem 5.2 (Scott 1981, PRG-19) @@ -39,6 +46,8 @@ uses the permitted `ext_of_toElementMap`, the *value* equations are choice-free. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem56.lean b/LeanPool/DomainTheory/Neighborhood/Theorem56.lean index e79645ee63..95915c72ec 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem56.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem56.lean @@ -3,10 +3,17 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Example43 -import LeanPool.DomainTheory.Neighborhood.Exercise326 -import LeanPool.DomainTheory.Neighborhood.FunctionSpace +module + +public import LeanPool.DomainTheory.Neighborhood.Example43 +public import LeanPool.DomainTheory.Neighborhood.Exercise326 +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Theorem 5.6 (Scott 1981, PRG-19, §5) — recursive functions are λ-definable @@ -60,6 +67,8 @@ domain `T` Theorem 4.1. -/ +@[expose] public section + namespace Domain.Neighborhood.Theorem56 open Domain.Neighborhood NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem56Full.lean b/LeanPool/DomainTheory/Neighborhood/Theorem56Full.lean index 89770ce885..0c1b34ec94 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem56Full.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem56Full.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ - -import LeanPool.DomainTheory.Neighborhood.Example43 -import LeanPool.DomainTheory.Neighborhood.Exercise326 -import LeanPool.DomainTheory.Neighborhood.Exercise511 -import LeanPool.DomainTheory.Neighborhood.Theorem41 -import LeanPool.DomainTheory.Neighborhood.ApproximableExercises -import Mathlib.Computability.PartrecBasis +module + +public import LeanPool.DomainTheory.Neighborhood.Example43 +public import LeanPool.DomainTheory.Neighborhood.Exercise326 +public import LeanPool.DomainTheory.Neighborhood.Exercise511 +public import Mathlib.Computability.PartrecBasis +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Theorem 5.6 (Scott 1981, PRG-19, §5) — the FULL closure: partial recursive ⟹ @@ -39,6 +43,8 @@ minimisation compose. The capstone is `partrec_lamDef` and the 1-ary corollary `partrec_one`. -/ +@[expose] public section + namespace Domain.Neighborhood.Theorem56Full open Domain.Neighborhood NeighborhoodSystem ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem614.lean b/LeanPool/DomainTheory/Neighborhood/Theorem614.lean index 9ff575dac4..182ff720d1 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem614.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem614.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Definition613 +public import LeanPool.DomainTheory.Neighborhood.Definition613 import LeanPool.DomainTheory.Neighborhood.Theorem69 -import LeanPool.DomainTheory.Neighborhood.ApproximableExercises +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture VI — Theorem 6.14 (Scott 1981, PRG-19): existence of initial @@ -77,6 +83,8 @@ concrete `DomainObj`s g.hom` — the `have` unifies by defeq), then `rw [← e]`. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Domain.Neighborhood.Exercise510 diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem616.lean b/LeanPool/DomainTheory/Neighborhood/Theorem616.lean index dbcef86a7b..6a770c1dbe 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem616.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem616.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Theorem69 -import LeanPool.DomainTheory.Neighborhood.Proposition67 -import LeanPool.DomainTheory.Neighborhood.Lemma615 +public import LeanPool.DomainTheory.Neighborhood.Theorem69 +public import LeanPool.DomainTheory.Neighborhood.Lemma615 import LeanPool.DomainTheory.Neighborhood.Exercise408 +import LeanPool.DomainTheory.Neighborhood.Proposition67 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture VI — Theorem 6.16 (Scott 1981, PRG-19): an initial algebra embeds in @@ -53,6 +60,8 @@ approximant chains `H`, `G`, `K` (for `h`, `g`, `k`) and the ladder identity `H point. Lemma 6.15 (`trianglelefteq_of_projectionPair`) then closes `D ⊴ E`. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Domain.Neighborhood.Exercise510 diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem69.lean b/LeanPool/DomainTheory/Neighborhood/Theorem69.lean index a411718cd8..bf31a1fbe7 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem69.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem69.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Definition68 +public import LeanPool.DomainTheory.Neighborhood.Definition68 import LeanPool.DomainTheory.Neighborhood.Theorem41 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lecture VI — Theorem 6.9 (Scott 1981, PRG-19): homomorphisms out of a fixed @@ -75,6 +82,8 @@ is done by `Exists.elim` while proving a `Prop`, so it stays **choice-free** (`#print axioms ⊆ {propext, Quot.sound}`). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem ApproximableMap Domain.Neighborhood.Exercise510 diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem74.lean b/LeanPool/DomainTheory/Neighborhood/Theorem74.lean index 81becddea6..260bd6487f 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem74.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem74.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Definition72 -import LeanPool.DomainTheory.Neighborhood.Exercise319 -import LeanPool.DomainTheory.Neighborhood.Exercise319Sum +public import LeanPool.DomainTheory.Neighborhood.Definition72 +public import LeanPool.DomainTheory.Neighborhood.Exercise319 +public import LeanPool.DomainTheory.Neighborhood.Exercise319Sum /-! # Theorem 7.4 (Scott 1981, PRG-19, §7) — `+` and `×` preserve effective givenness @@ -52,6 +53,8 @@ development. Everything here is `⊆ {propext, Quot.sound}` (choice-free). -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem Domain.Recursive ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem75.lean b/LeanPool/DomainTheory/Neighborhood/Theorem75.lean index e34edeea45..1ad2b683b2 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem75.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem75.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.FunctionSpace -import LeanPool.DomainTheory.Neighborhood.Definition72 -import LeanPool.DomainTheory.Neighborhood.Theorem74 +public import LeanPool.DomainTheory.Neighborhood.FunctionSpace +public import LeanPool.DomainTheory.Neighborhood.Theorem74 +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Theorem 7.5 (Scott 1981, PRG-19, §7) — `(𝒟₀ → 𝒟₁)` is effectively given @@ -51,6 +56,8 @@ it needs with the decider.) -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem Domain.Recursive ApproximableMap diff --git a/LeanPool/DomainTheory/Neighborhood/Theorem76.lean b/LeanPool/DomainTheory/Neighborhood/Theorem76.lean index 8ac48154a5..d7a03fa284 100644 --- a/LeanPool/DomainTheory/Neighborhood/Theorem76.lean +++ b/LeanPool/DomainTheory/Neighborhood/Theorem76.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Catskills Research Company. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Catskills Research Company -/ +module -import LeanPool.DomainTheory.Neighborhood.Theorem75 -import LeanPool.DomainTheory.Neighborhood.Theorem41 +public import LeanPool.DomainTheory.Neighborhood.Theorem75 +public import LeanPool.DomainTheory.Neighborhood.Theorem41 +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Theorem 7.6 (Scott 1981, PRG-19, §7) — `fix : (𝒟 → 𝒟) → 𝒟` is computable @@ -65,6 +71,8 @@ the flag together with the final inclusion `X_{last} ⊆ X_ℓ`. Everything audi `⊆ {propext, Quot.sound}`. -/ +@[expose] public section + namespace Domain.Neighborhood open NeighborhoodSystem Domain.Recursive ApproximableMap diff --git a/LeanPool/Duality.lean b/LeanPool/Duality.lean index 160d0c9082..8c8cd28820 100644 --- a/LeanPool/Duality.lean +++ b/LeanPool/Duality.lean @@ -3,14 +3,21 @@ Copyright (c) 2026 Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Martin Dvorak -/ - -import LeanPool.Duality.Common -import LeanPool.Duality.ExtendedFields -import LeanPool.Duality.FarkasBartl -import LeanPool.Duality.FarkasBasic -import LeanPool.Duality.FarkasSpecial -import LeanPool.Duality.LinearProgramming -import LeanPool.Duality.LinearProgrammingB +module + +public import LeanPool.Duality.Common +public import LeanPool.Duality.ExtendedFields +public import LeanPool.Duality.FarkasBartl +public import LeanPool.Duality.FarkasBasic +public import LeanPool.Duality.FarkasSpecial +public import LeanPool.Duality.LinearProgramming +public import LeanPool.Duality.LinearProgrammingB +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Duality theory in linear optimization and its extensions @@ -23,6 +30,8 @@ Tags: linear-programming, optimization, farkas-lemma MSC: 90C05, 90C46 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Duality/Common.lean b/LeanPool/Duality/Common.lean index 63bc6b0a2e..189b21a891 100644 --- a/LeanPool/Duality/Common.lean +++ b/LeanPool/Duality/Common.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Martin Dvorak -/ -import Mathlib.Algebra.BigOperators.Fin +module + +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Algebra.Order.Monoid.Defs +import Mathlib.Algebra.BigOperators.Group.Finset.Basic import Mathlib.Algebra.Order.Group.Defs /-! # LeanPool.Duality.Common -/ +@[expose] public section + section finset_sums variable {α β : Type*} diff --git a/LeanPool/Duality/ExtendedFields.lean b/LeanPool/Duality/ExtendedFields.lean index f57fd05f06..85880bb701 100644 --- a/LeanPool/Duality/ExtendedFields.lean +++ b/LeanPool/Duality/ExtendedFields.lean @@ -3,15 +3,21 @@ Copyright (c) 2026 Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Martin Dvorak -/ -import Mathlib.Algebra.Order.Monoid.WithTop -import Mathlib.Algebra.Order.Field.Basic +module + +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Algebra.Order.Monoid.Unbundled.WithTop +public import Mathlib.Algebra.Order.Ring.Defs import LeanPool.Duality.Common +import Mathlib.Algebra.Order.Field.Basic /-! This entire file is inspired by: https://github.com/leanprover-community/mathlib4/blob/333e2d79fdaee86489af73dee919bc4b66957a52/Mathlib/Data/Real/EReal.lean -/ +@[expose] public section + /-- `Extend F` is the type of values in `F ∪ {⊥, ⊤}` where, informally speaking, `⊥` (negative infinity) is stronger than `⊤` (positive infinity). -/ def Extend (F : Type*) := WithBot (WithTop F) diff --git a/LeanPool/Duality/FarkasBartl.lean b/LeanPool/Duality/FarkasBartl.lean index 359d114ca9..e2bd5ff9ed 100644 --- a/LeanPool/Duality/FarkasBartl.lean +++ b/LeanPool/Duality/FarkasBartl.lean @@ -3,17 +3,26 @@ Copyright (c) 2026 Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Martin Dvorak -/ -import Mathlib.Algebra.Order.Module.Defs -import Mathlib.Algebra.Module.LinearMap.Basic +module + +import Mathlib.Algebra.Order.BigOperators.Group.Finset + +public import Mathlib.Algebra.Order.Module.Defs +public import Mathlib.Algebra.Module.Pi +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Algebra.Module.LinearMap.Defs +public import Mathlib.Data.Fintype.Basic +import LeanPool.Duality.Common import Mathlib.Algebra.BigOperators.GroupWithZero.Action -import Mathlib.Algebra.Module.Pi import Mathlib.Tactic.Abel -import LeanPool.Duality.Common /-! # LeanPool.Duality.FarkasBartl -/ +@[expose] public section + private def withoutLastMap {m : ℕ} {R W : Type*} [Semiring R] [AddCommMonoid W] [Module R W] (A : W →ₗ[R] Fin m.succ → R) : W →ₗ[R] Fin m → R := @@ -137,7 +146,7 @@ lemma industepFarkasBartl {m : ℕ} [DivisionRing R] [LinearOrder R] [IsStrictOr else push Not at is_easy obtain ⟨y', hay', hby'⟩ := is_easy - let M : Fin m.succ := ⟨m, lt_add_one m⟩ -- the last (new) index + let M : Fin m.succ := ⟨m, Nat.lt_succ_self m⟩ -- the last (new) index let y : W := (A y' M)⁻¹ • y' -- rescaled `y'` have hAy' : A y' M < 0 := by by_contra! contr diff --git a/LeanPool/Duality/FarkasBasic.lean b/LeanPool/Duality/FarkasBasic.lean index 779b1ced37..54802e1759 100644 --- a/LeanPool/Duality/FarkasBasic.lean +++ b/LeanPool/Duality/FarkasBasic.lean @@ -3,17 +3,26 @@ Copyright (c) 2026 Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Martin Dvorak -/ -import Mathlib.Algebra.Order.Sum +module + +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Data.Matrix.Mul +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.ToAdditive +import LeanPool.Duality.Common +import LeanPool.Duality.FarkasBartl import Mathlib.Algebra.Order.Group.PosPart -import Mathlib.LinearAlgebra.Matrix.DotProduct +import Mathlib.Algebra.Order.Sum import Mathlib.Data.Matrix.ColumnRowPartitioned +import Mathlib.LinearAlgebra.Matrix.DotProduct import Mathlib.LinearAlgebra.Matrix.ToLin -import LeanPool.Duality.FarkasBartl /-! # LeanPool.Duality.FarkasBasic -/ +@[expose] public section + /- Let's move from linear maps to matrices, which give more familiar (albeit less general) formulations of the theorems of alternative. -/ diff --git a/LeanPool/Duality/FarkasSpecial.lean b/LeanPool/Duality/FarkasSpecial.lean index de0ad85c51..d2a4cb72bb 100644 --- a/LeanPool/Duality/FarkasSpecial.lean +++ b/LeanPool/Duality/FarkasSpecial.lean @@ -3,13 +3,26 @@ Copyright (c) 2026 Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Martin Dvorak -/ -import LeanPool.Duality.ExtendedFields +module + +public import LeanPool.Duality.ExtendedFields +public import LeanPool.Duality.Common +public import Mathlib.Algebra.Order.Nonneg.Basic +public import Mathlib.LinearAlgebra.Matrix.Defs +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.ToAdditive import LeanPool.Duality.FarkasBasic +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.Ineq +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.Duality.FarkasSpecial -/ +@[expose] public section + section notation_EF /-- `F∞` is sugar for `Extend F`, the type of values in `F ∪ {⊥, ⊤}`. -/ @@ -20,7 +33,7 @@ macro_rules /-- Pretty-print `Extend F` back as `F∞`. -/ @[app_unexpander Extend] -def unexpandExtend : Lean.PrettyPrinter.Unexpander +meta def unexpandExtend : Lean.PrettyPrinter.Unexpander | `($(_) $F:ident) => `($F:ident∞) | _ => throw () @@ -41,7 +54,7 @@ macro_rules /-- Pretty-print `NNeg F` back as `F≥0`. -/ @[app_unexpander NNeg] -def unexpandNNeg : Lean.PrettyPrinter.Unexpander +meta def unexpandNNeg : Lean.PrettyPrinter.Unexpander | `($(_) $F:ident) => `($F:ident≥0) | _ => throw () diff --git a/LeanPool/Duality/LinearProgramming.lean b/LeanPool/Duality/LinearProgramming.lean index ef2103808a..fdb455acf9 100644 --- a/LeanPool/Duality/LinearProgramming.lean +++ b/LeanPool/Duality/LinearProgramming.lean @@ -3,13 +3,25 @@ Copyright (c) 2026 Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Martin Dvorak -/ -import Mathlib.Tactic.Linarith -import LeanPool.Duality.FarkasSpecial +module + +public import LeanPool.Duality.FarkasSpecial +public import Mathlib.Data.Matrix.ColumnRowPartitioned +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Algebra.Order.Sum +import Mathlib.Data.Rat.Cast.Order +import Mathlib.LinearAlgebra.Matrix.RowCol +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # LeanPool.Duality.LinearProgramming -/ +@[expose] public section + /-- Linear program over `F∞` in the standard form (i.e., a system of linear inequalities with nonnegative variables). Variables are of type `J`. Conditions are indexed by type `I`. diff --git a/LeanPool/Duality/LinearProgrammingB.lean b/LeanPool/Duality/LinearProgrammingB.lean index 45a37ef0c3..e6e4282bd0 100644 --- a/LeanPool/Duality/LinearProgrammingB.lean +++ b/LeanPool/Duality/LinearProgrammingB.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Martin Dvorak -/ +module + +public import LeanPool.Duality.LinearProgramming +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.LinearAlgebra.Matrix.DotProduct +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow import Mathlib.Tactic.Peel -import LeanPool.Duality.LinearProgramming /-! We prove properties of "normal" linear programs as a corollary of properties of extended @@ -12,6 +21,8 @@ linear programs. The only exception is the weak duality theorem, which is proved to allow weaker assumptions. -/ +@[expose] public section + /-- Linear program in the standard form. Variables are of type `J`. Conditions are indexed by type `I`. The objective function is intended to be minimized. -/ diff --git a/LeanPool/EcTateLean.lean b/LeanPool/EcTateLean.lean index 599368c05a..488997ad0d 100644 --- a/LeanPool/EcTateLean.lean +++ b/LeanPool/EcTateLean.lean @@ -3,15 +3,22 @@ Copyright (c) 2023 Alex J. Best and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best -/ +module -import LeanPool.EcTateLean.Algebra.CharP.Basic -import LeanPool.EcTateLean.Algebra.EllipticCurve.AuxRingLemmas -import LeanPool.EcTateLean.Algebra.EllipticCurve.KodairaTypes -import LeanPool.EcTateLean.Algebra.EllipticCurve.Kronecker -import LeanPool.EcTateLean.Algebra.EllipticCurve.Model -import LeanPool.EcTateLean.Algebra.Ring.Basic -import LeanPool.EcTateLean.FieldTheory.PerfectClosure -import LeanPool.EcTateLean.Init.Data.Int.Lemmas +public import LeanPool.EcTateLean.Algebra.CharP.Basic +public import LeanPool.EcTateLean.Algebra.EllipticCurve.AuxRingLemmas +public import LeanPool.EcTateLean.Algebra.EllipticCurve.KodairaTypes +public import LeanPool.EcTateLean.Algebra.EllipticCurve.Kronecker +public import LeanPool.EcTateLean.Algebra.EllipticCurve.Model +public import LeanPool.EcTateLean.Algebra.Ring.Basic +public import LeanPool.EcTateLean.FieldTheory.PerfectClosure +public import LeanPool.EcTateLean.Init.Data.Int.Lemmas +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Weierstrass models and singular points for Tate's algorithm @@ -24,6 +31,8 @@ Tags: number-theory, elliptic-curves, algebraic-geometry MSC: 11G05, 11G07, 14H52 -/ +@[expose] public section + /-! This is the foundational layer of the `ec-tate-lean` formalization of Tate's algorithm. It defines Weierstrass `Model`s over a commutative ring, their diff --git a/LeanPool/EcTateLean/Algebra/CharP/Basic.lean b/LeanPool/EcTateLean/Algebra/CharP/Basic.lean index 0fd8b84449..f6c08be2d3 100644 --- a/LeanPool/EcTateLean/Algebra/CharP/Basic.lean +++ b/LeanPool/EcTateLean/Algebra/CharP/Basic.lean @@ -3,8 +3,9 @@ Copyright (c) 2023 Alex J. Best and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best -/ +module -import LeanPool.EcTateLean.Algebra.Ring.Basic +public import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.CharP.Lemmas /-! @@ -13,6 +14,8 @@ import Mathlib.Algebra.CharP.Lemmas Imported Lean Pool material for `LeanPool.EcTateLean.Algebra.CharP.Basic`. -/ +@[expose] public section + lemma ringChar_is_zero_or_prime (R : Type _) [NonAssocSemiring R] [NoZeroDivisors R] [Nontrivial R] : ringChar R = 0 ∨ Nat.Prime (ringChar R) := (CharP.char_is_prime_or_zero R (ringChar R)).symm diff --git a/LeanPool/EcTateLean/Algebra/EllipticCurve/AuxRingLemmas.lean b/LeanPool/EcTateLean/Algebra/EllipticCurve/AuxRingLemmas.lean index 54082d4c55..0f77bb7adf 100644 --- a/LeanPool/EcTateLean/Algebra/EllipticCurve/AuxRingLemmas.lean +++ b/LeanPool/EcTateLean/Algebra/EllipticCurve/AuxRingLemmas.lean @@ -3,9 +3,11 @@ Copyright (c) 2023 Alex J. Best and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best -/ +module -import Mathlib.Data.Int.Basic -import Mathlib.Tactic.Ring +public import Mathlib.Algebra.Group.Basic +public import Mathlib.Algebra.Ring.Defs +import Mathlib.Tactic.Ring.RingNF /-! # LeanPool.EcTateLean.Algebra.EllipticCurve.AuxRingLemmas @@ -13,6 +15,8 @@ import Mathlib.Tactic.Ring Imported Lean Pool material for `LeanPool.EcTateLean.Algebra.EllipticCurve.AuxRingLemmas`. -/ +@[expose] public section + section ring_lemmas diff --git a/LeanPool/EcTateLean/Algebra/EllipticCurve/KodairaTypes.lean b/LeanPool/EcTateLean/Algebra/EllipticCurve/KodairaTypes.lean index ed9ef71e00..07cd5aaf60 100644 --- a/LeanPool/EcTateLean/Algebra/EllipticCurve/KodairaTypes.lean +++ b/LeanPool/EcTateLean/Algebra/EllipticCurve/KodairaTypes.lean @@ -3,8 +3,9 @@ Copyright (c) 2023 Alex J. Best and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best -/ +module -import Mathlib.Tactic.Basic +import Mathlib.Tactic.Lemma /-! # LeanPool.EcTateLean.Algebra.EllipticCurve.KodairaTypes @@ -12,6 +13,8 @@ import Mathlib.Tactic.Basic Imported Lean Pool material for `LeanPool.EcTateLean.Algebra.EllipticCurve.KodairaTypes`. -/ +@[expose] public section + -- For imperfect residue fields of characteristic 2 or 3 there are new types: -- Z1, Z2, X1, X2, Y1, Y2, Y3, K n (n ≥ 2), K' n (even n ≥ 2), T n (n ≥ 1) diff --git a/LeanPool/EcTateLean/Algebra/EllipticCurve/Kronecker.lean b/LeanPool/EcTateLean/Algebra/EllipticCurve/Kronecker.lean index ec3babea69..aaeecbf0c1 100644 --- a/LeanPool/EcTateLean/Algebra/EllipticCurve/Kronecker.lean +++ b/LeanPool/EcTateLean/Algebra/EllipticCurve/Kronecker.lean @@ -3,13 +3,21 @@ Copyright (c) 2023 Alex J. Best and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best -/ - -import Mathlib.Data.Int.Basic +module + +public import Aesop.BuiltinRules +public import Mathlib.Data.Int.Notation +public import Mathlib.Data.Nat.Notation +public import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToDual +import Mathlib.Algebra.GroupWithZero.Nat +import Mathlib.Algebra.NeZero +import Mathlib.Algebra.Order.ZeroLEOne import Mathlib.Data.Nat.Basic -import Mathlib.Basic.Logic.Basic -import Mathlib.Tactic.Common -import Mathlib.Data.Nat.Order.Lemmas -import Mathlib.Data.Nat.ModEq +import Mathlib.Order.RelClasses +import Mathlib.Tactic.Attr.Core +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.Push /-! # LeanPool.EcTateLean.Algebra.EllipticCurve.Kronecker @@ -17,6 +25,8 @@ import Mathlib.Data.Nat.ModEq Imported Lean Pool material for `LeanPool.EcTateLean.Algebra.EllipticCurve.Kronecker`. -/ +@[expose] public section + open Nat section Obvious diff --git a/LeanPool/EcTateLean/Algebra/EllipticCurve/Model.lean b/LeanPool/EcTateLean/Algebra/EllipticCurve/Model.lean index 1d2f583cd1..1dc1d81d0a 100644 --- a/LeanPool/EcTateLean/Algebra/EllipticCurve/Model.lean +++ b/LeanPool/EcTateLean/Algebra/EllipticCurve/Model.lean @@ -3,20 +3,31 @@ Copyright (c) 2023 Alex J. Best and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best -/ +module +public import Mathlib.Algebra.Order.Sub.Basic + +public import LeanPool.EcTateLean.FieldTheory.PerfectClosure +public import Mathlib.Algebra.Field.Defs import LeanPool.EcTateLean.Algebra.Ring.Basic -import Mathlib.Algebra.CharP.Basic -import LeanPool.EcTateLean.FieldTheory.PerfectClosure -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.NormNum +import Mathlib.Algebra.Field.IsField +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.RingTheory.LocalRing.Basic +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.FieldSimp import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Common +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.EcTateLean.Algebra.EllipticCurve.Model Imported Lean Pool material for `LeanPool.EcTateLean.Algebra.EllipticCurve.Model`. -/ + +@[expose] public section -- import Aesop @@ -598,106 +609,40 @@ lemma isSingularPoint_singularPoint [PerfectRing K] (e : Model K) (h : e.discr = rw [show (12 : K) = 2 * 2 * 3 by norm_num] simp_all refine ⟨?_, ?_, ?_⟩ - · apply nzero_mul_left_cancel (12 ^ 3) _ _ (pow_ne_zero _ h12) - simp only [weierstrass, div_eq_mul_inv, mul_zero] - rw [show - 12 ^ 3 * ((-(-e.a1 * b2 e * 12⁻¹ + e.a3) * 2⁻¹) ^ 2 + - e.a1 * (-b2 e * 12⁻¹) * (-(-e.a1 * b2 e * 12⁻¹ + e.a3) * 2⁻¹) + - e.a3 * (-(-e.a1 * b2 e * 12⁻¹ + e.a3) * 2⁻¹) - - ((-b2 e * 12⁻¹) ^ 3 + e.a2 * (-b2 e * 12⁻¹) ^ 2 + e.a4 * (-b2 e * 12⁻¹) - + e.a6)) = - 3*(-(-e.a1 * b2 e * (12 * 12⁻¹) + 12 * e.a3) * (2 * 2⁻¹)) ^ 2 + - e.a1 * (-b2 e * (12 * 12⁻¹)) * (-(-e.a1 * b2 e * (12 * 12⁻¹) - + 12 * e.a3) * (6 * (2 * 2⁻¹))) + - 12 * e.a3 * (-(-e.a1 * b2 e * (12 * 12⁻¹) + 12 * e.a3) * (6 * (2 * 2⁻¹))) - - ((-b2 e * (12 * 12⁻¹)) ^ 3 + 12 * e.a2 * (-b2 e * (12 * 12⁻¹)) ^ 2 - + 12 ^ 2 * e.a4 * (-b2 e * (12 * 12⁻¹)) + 12 ^ 3 * e.a6) by ring] - simp only [mul_inv_cancel₀ h2, mul_inv_cancel₀ h12, mul_one] - -- This is 2*c6 - rw [← mul_zero (2 : K), ← hc6] + · simp only [weierstrass] + field_simp + simp only [mul_zero] + rw [← mul_zero (8 : K), ← hc6] simp only [c6, b2, b4, b6] ring - · apply nzero_mul_left_cancel (12 ^ 2) _ _ (pow_ne_zero _ h12) - simp only [dweierstrassDx, div_eq_mul_inv, mul_zero] - rw [show - 12 ^ 2 * (e.a1 * (-(-e.a1 * b2 e * 12⁻¹ + e.a3) * 2⁻¹) - (3 * (-b2 e * 12⁻¹) ^ 2 - + 2 * e.a2 * (-b2 e * 12⁻¹) + e.a4)) - = - e.a1 * (-(-e.a1 * b2 e * (12 * 12⁻¹) + 12* e.a3) * 6 * (2 * 2⁻¹)) - - (3 * (-b2 e * (12 * 12⁻¹)) ^ 2 + 24 * e.a2 * (-b2 e * (12 * 12⁻¹)) - + 144 * e.a4) - by ring] - simp only [mul_inv_cancel₀ h2, mul_inv_cancel₀ h12, mul_one] - -- This is 2*c6 - rw [← mul_zero (3 : K), ← hc4] + · simp only [dweierstrassDx] + field_simp + simp only [mul_zero] + rw [← mul_zero (6 : K), ← hc4] simp only [c4, b2, b4] ring - · apply nzero_mul_left_cancel 12 _ _ h12 - simp only [dweierstrassDy, div_eq_mul_inv, mul_zero] - rw [show - 12 * (2 * (-(-e.a1 * b2 e * 12⁻¹ + e.a3) * 2⁻¹) + e.a1 * (-b2 e * 12⁻¹) + e.a3) - = - (-(-e.a1 * b2 e * (12 * 12⁻¹) + 12 * e.a3) * (2 * 2⁻¹)) - + e.a1 * (-b2 e * (12 * 12⁻¹)) - + 12 * e.a3 - by ring] - simp_all + · simp only [dweierstrassDy] + field_simp + ring · rw [isSingularPoint] refine ⟨?_, ?_, ?_⟩ - · rw [weierstrass] - -- simp [b2, b5, b7] - apply nzero_mul_left_cancel (e.c4 ^ 3) _ _ (pow_ne_zero _ hc4) - rw [mul_zero] - simp only [div_eq_mul_inv] - rw [show c4 e ^ 3 * (((b2 e * b5 e + 3 * b7 e) * (c4 e)⁻¹) ^ 2 + - e.a1 * ((18 * b6 e - b2 e * b4 e) * (c4 e)⁻¹) - * ((b2 e * b5 e + 3 * b7 e) * (c4 e)⁻¹) + - e.a3 * ((b2 e * b5 e + 3 * b7 e) * (c4 e)⁻¹) - - (((18 * b6 e - b2 e * b4 e) * (c4 e)⁻¹) ^ 3 + e.a2 * ((18 * b6 e - - b2 e * b4 e) * (c4 e)⁻¹) ^ 2 + - e.a4 * ((18 * b6 e - b2 e * b4 e) * (c4 e)⁻¹) + e.a6)) = - (c4 e * (c4 e)⁻¹ * c4 e * (c4 e)⁻¹ * c4 e * ((b2 e * b5 e + 3 * b7 e)) ^ 2 + - c4 e * (c4 e)⁻¹ * c4 e * (c4 e)⁻¹ * c4 e * e.a1 * ((18 * b6 e - - b2 e * b4 e)) * ((b2 e * b5 e + 3 * b7 e)) + - c4 e * (c4 e)⁻¹ * c4 e * c4 e * e.a3 * ((b2 e * b5 e + 3 * b7 e)) - - (c4 e * (c4 e)⁻¹ * c4 e * (c4 e)⁻¹ * c4 e * (c4 e)⁻¹ - * ((18 * b6 e - b2 e * b4 e)) ^ 3 + - c4 e * (c4 e)⁻¹ * c4 e * (c4 e)⁻¹ * c4 e * e.a2 * ((18 * b6 e - b2 e * b4 e)) ^ 2 + - c4 e * (c4 e)⁻¹ * c4 e * c4 e * e.a4 * ((18 * b6 e - b2 e * b4 e)) + - c4 e * c4 e * c4 e * e.a6)) by ring] - simp only [mul_inv_cancel₀ hc4, one_mul] + · simp only [weierstrass] + field_simp + simp only [mul_zero] rw [b5, b7, c4, b2, b4, b6] - -- what remains factors the discriminant (up to sign) rw [← mul_zero (e.a1^6 + 12*e.a1^4*e.a2 + 48*e.a1^2*e.a2^2 - 36*e.a1^3*e.a3 + 64*e.a2^3 - 144*e.a1*e.a2*e.a3 - 72*e.a1^2*e.a4 + 216*e.a3^2 - 288*e.a2*e.a4 + 864*e.a6), ← h, discr_eq_neg_singular] ring - · rw [dweierstrassDx] - apply nzero_mul_left_cancel (e.c4 ^ 2) _ _ (pow_ne_zero _ hc4) - rw [mul_zero, pow_two] - simp only [div_eq_mul_inv] - rw [show c4 e * c4 e * - (e.a1 * ((b2 e * b5 e + 3 * b7 e) * (c4 e)⁻¹) - - (3 * ((18 * b6 e - b2 e * b4 e) * (c4 e)⁻¹) ^ 2 - + 2 * e.a2 * ((18 * b6 e - b2 e * b4 e) * (c4 e)⁻¹) + e.a4)) = - c4 e * (c4 e)⁻¹ * c4 e * (e.a1 * (b2 e * b5 e + 3 * b7 e) - - 2 * e.a2 * ((18 * b6 e - b2 e * b4 e))) - - c4 e * (c4 e)⁻¹ * c4 e * (c4 e)⁻¹ * - 3 * (18 * b6 e - b2 e * b4 e) ^ 2 - e.a4 * c4 e * c4 e - by ring] - simp only [mul_inv_cancel₀ hc4, one_mul] + · simp only [dweierstrassDx] + field_simp + simp only [mul_zero] rw [b5, b7, c4, b2, b4, b6] - -- what remains is just 36 times the discriminant (up to sign) rw [← mul_zero (36 : K), ← h, discr_eq_neg_singular] ring - · rw [dweierstrassDy] - apply nzero_mul_left_cancel e.c4 _ _ hc4 - simp only [div_eq_mul_inv, mul_zero] - rw [show c4 e * (2 * ((b2 e * b5 e + 3 * b7 e) * (c4 e)⁻¹) - + e.a1 * ((18 * b6 e - b2 e * b4 e) * (c4 e)⁻¹) + e.a3) = - c4 e * (c4 e)⁻¹ * (2 * (b2 e * b5 e + 3 * b7 e) - + e.a1 * ((18 * b6 e - b2 e * b4 e))) + c4 e * e.a3 by ring] - simp only [mul_inv_cancel₀ hc4, one_mul] + · simp only [dweierstrassDy] + field_simp + simp only [mul_zero] rw [b5, b7, c4, b2, b4, b6] ring diff --git a/LeanPool/EcTateLean/Algebra/Ring/Basic.lean b/LeanPool/EcTateLean/Algebra/Ring/Basic.lean index a184029864..1e928b9d47 100644 --- a/LeanPool/EcTateLean/Algebra/Ring/Basic.lean +++ b/LeanPool/EcTateLean/Algebra/Ring/Basic.lean @@ -3,11 +3,12 @@ Copyright (c) 2023 Alex J. Best and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best -/ +module -import Mathlib.Algebra.Ring.Basic -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Common -import Mathlib.Tactic.Contrapose +public import Mathlib.Algebra.Group.Basic +public import Mathlib.Algebra.Ring.Defs +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.EcTateLean.Algebra.Ring.Basic @@ -15,6 +16,8 @@ import Mathlib.Tactic.Contrapose Imported Lean Pool material for `LeanPool.EcTateLean.Algebra.Ring.Basic`. -/ +@[expose] public section + variable {R : Type _} diff --git a/LeanPool/EcTateLean/FieldTheory/PerfectClosure.lean b/LeanPool/EcTateLean/FieldTheory/PerfectClosure.lean index 88678ffe95..889e1a5fbf 100644 --- a/LeanPool/EcTateLean/FieldTheory/PerfectClosure.lean +++ b/LeanPool/EcTateLean/FieldTheory/PerfectClosure.lean @@ -3,12 +3,16 @@ Copyright (c) 2023 Alex J. Best and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best -/ +module -import Mathlib.Algebra.Ring.Basic -import Mathlib.Algebra.CharP.Basic -import Mathlib.Tactic.Common -import Mathlib.FieldTheory.PerfectClosure +public import Mathlib.Algebra.CharP.Defs +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.EcTateLean.FieldTheory.PerfectClosure @@ -16,6 +20,8 @@ import Mathlib.FieldTheory.PerfectClosure Imported Lean Pool material for `LeanPool.EcTateLean.FieldTheory.PerfectClosure`. -/ +@[expose] public section + namespace ECTate /-- A perfect ring is one where raising to the power of the ring characteristic is a bijection or a ring of char zero. diff --git a/LeanPool/EcTateLean/Init/Data/Int/Lemmas.lean b/LeanPool/EcTateLean/Init/Data/Int/Lemmas.lean index c91cff237f..365c192f00 100644 --- a/LeanPool/EcTateLean/Init/Data/Int/Lemmas.lean +++ b/LeanPool/EcTateLean/Init/Data/Int/Lemmas.lean @@ -3,9 +3,10 @@ Copyright (c) 2023 Alex J. Best and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best -/ +module -import Mathlib.Data.Int.Basic -import Mathlib.Tactic.Common +import Mathlib.Tactic.Attr.Core +import Mathlib.Tactic.Lemma /-! # LeanPool.EcTateLean.Init.Data.Int.Lemmas @@ -13,6 +14,8 @@ import Mathlib.Tactic.Common Imported Lean Pool material for `LeanPool.EcTateLean.Init.Data.Int.Lemmas`. -/ +@[expose] public section + lemma mod_neg_right (m k : Int) : m % (-k) = m % k := by simp lemma div_neg_right (m k : Int) : m / (-k) = -(m / k) := by simp diff --git a/LeanPool/Egrs75.lean b/LeanPool/Egrs75.lean index 3445c3f1e9..047712cadb 100644 --- a/LeanPool/Egrs75.lean +++ b/LeanPool/Egrs75.lean @@ -3,25 +3,28 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.KummerValuation -import LeanPool.Egrs75.CentralBinomialDigits -import LeanPool.Egrs75.Defs -import LeanPool.Egrs75.RoundUp -import LeanPool.Egrs75.LeafInduction -import LeanPool.Egrs75.DigitVector -import LeanPool.Egrs75.DigitAtToolkit -import LeanPool.Egrs75.AddBranch -import LeanPool.Egrs75.SubtractBranch -import LeanPool.Egrs75.ConditionThreeWindow -import LeanPool.Egrs75.LogIrrationality -import LeanPool.Egrs75.ClearingHigh -import LeanPool.Egrs75.Reduction -import LeanPool.Egrs75.BadPrefixRoute -import LeanPool.Egrs75.SeedWindow -import LeanPool.Egrs75.MoveDigits -import LeanPool.Egrs75.MuFinish -import LeanPool.Egrs75.Instances +public import LeanPool.Egrs75.KummerValuation +public import LeanPool.Egrs75.CentralBinomialDigits +public import LeanPool.Egrs75.Defs +public import LeanPool.Egrs75.RoundUp +public import LeanPool.Egrs75.LeafInduction +public import LeanPool.Egrs75.DigitVector +public import LeanPool.Egrs75.DigitAtToolkit +public import LeanPool.Egrs75.AddBranch +public import LeanPool.Egrs75.SubtractBranch +public import LeanPool.Egrs75.ConditionThreeWindow +public import LeanPool.Egrs75.LogIrrationality +public import LeanPool.Egrs75.ClearingHigh +public import LeanPool.Egrs75.Reduction +public import LeanPool.Egrs75.BadPrefixRoute +public import LeanPool.Egrs75.SeedWindow +public import LeanPool.Egrs75.MoveDigits +public import LeanPool.Egrs75.MuFinish +public import LeanPool.Egrs75.Instances +import Mathlib.Data.Nat.Totient +import Mathlib.Tactic.NormNum.Prime /-! # The Erdős–Graham–Ruzsa–Straus two-prime theorem @@ -33,3 +36,5 @@ Main declarations: `Egrs75.MuFinish.egrs_two_prime_mu`, `Egrs75.Finish.egrs_two_ Tags: number-theory, central-binomial-coefficients, digit-representations, erdos-problems MSC: 11A63, 11B65 -/ + +@[expose] public section diff --git a/LeanPool/Egrs75/AddBranch.lean b/LeanPool/Egrs75/AddBranch.lean index 4e98edbb25..c456b6f625 100644 --- a/LeanPool/Egrs75/AddBranch.lean +++ b/LeanPool/Egrs75/AddBranch.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.Defs -import LeanPool.Egrs75.RoundUp -import LeanPool.Egrs75.LeafInduction -import LeanPool.Egrs75.DigitVector +public import LeanPool.Egrs75.Defs import LeanPool.Egrs75.DigitAtToolkit -import Mathlib.Data.Nat.Digits.Lemmas +import LeanPool.Egrs75.DigitVector +import LeanPool.Egrs75.RoundUp /-! EGRS75 two-prime clearing — PRIMITIVE P2: the ADD branch (`add_clears`). @@ -58,6 +57,8 @@ not attempted. Recon: ~/Knowledge/Construct/recon/erdos_376.md. Imports only the pre-existing kernel-clean files; modifies none of them. -/ +@[expose] public section + namespace Egrs75.ClearingP2 open Nat diff --git a/LeanPool/Egrs75/BadPrefixRoute.lean b/LeanPool/Egrs75/BadPrefixRoute.lean index 6b168a489b..f944608782 100644 --- a/LeanPool/Egrs75/BadPrefixRoute.lean +++ b/LeanPool/Egrs75/BadPrefixRoute.lean @@ -3,17 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.Defs -import LeanPool.Egrs75.RoundUp -import LeanPool.Egrs75.LeafInduction -import LeanPool.Egrs75.DigitVector -import LeanPool.Egrs75.DigitAtToolkit +public import LeanPool.Egrs75.DigitVector +public import LeanPool.Egrs75.DigitAtToolkit +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import LeanPool.Egrs75.ClearingHigh -import LeanPool.Egrs75.Reduction import LeanPool.Egrs75.MuFinish +import LeanPool.Egrs75.Reduction import Mathlib.Algebra.Order.Ring.GeomSum -import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Data.List.GetD +import Mathlib.Data.Nat.Digits.Lemmas +import Mathlib.Data.Nat.Totient /-! EGRS75 two-prime ALIGN leaf — FINISH route (2026-06-08). @@ -78,6 +80,8 @@ existing clean file. Formalizes the KNOWN theorem EGRS75 (1975); three primes i Erdős #376 (OPEN) — not attempted. -/ +@[expose] public section + namespace Egrs75.Finish open Nat diff --git a/LeanPool/Egrs75/CentralBinomialDigits.lean b/LeanPool/Egrs75/CentralBinomialDigits.lean index c4cec0a3ad..3f2e333639 100644 --- a/LeanPool/Egrs75/CentralBinomialDigits.lean +++ b/LeanPool/Egrs75/CentralBinomialDigits.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import Mathlib.Data.Nat.Choose.Central +public import Mathlib.Data.Nat.Digits.Defs +public import Mathlib.Data.Nat.Prime.Defs import LeanPool.Egrs75.KummerValuation +import Mathlib.NumberTheory.Padics.PadicVal.Basic /-! Erdős Problem #376 — first Lean target (the Kummer digit *bridge*, NOT the @@ -33,6 +38,8 @@ The carry machinery below is the general-base-`p` analogue of the base-3 doubling transducer already proven in ConcreteMath/CarryTransducerCorrectness.lean. -/ +@[expose] public section + namespace Egrs75.Erdos376 open Nat diff --git a/LeanPool/Egrs75/ClearingHigh.lean b/LeanPool/Egrs75/ClearingHigh.lean index 6d5623f594..f7b5f5c8e4 100644 --- a/LeanPool/Egrs75/ClearingHigh.lean +++ b/LeanPool/Egrs75/ClearingHigh.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.Defs +public import LeanPool.Egrs75.DigitAtToolkit import LeanPool.Egrs75.RoundUp -import LeanPool.Egrs75.DigitVector -import LeanPool.Egrs75.DigitAtToolkit -import Mathlib.Data.Nat.Digits.Lemmas +import Mathlib.Data.Finset.Attr /-! The HIGH-case clearing: when the floor `N` lies below `q^j` (the scale of the @@ -18,11 +17,12 @@ top oversized base-`q` digit), a fresh `LowDigits p` window number drawn from clearing dichotomy; the low case is the μ-measure machine in `MuFinish`. -/ +@[expose] public section + namespace Egrs75.Probe open Nat open Egrs75 -open Egrs75.RepairDV open Egrs75.RepairPaperfaithful /-- Goodness of the high block: if `q^j ≤ m < 2*q^j` and `q ≥ 3`, then every base-`q` diff --git a/LeanPool/Egrs75/ConditionThreeWindow.lean b/LeanPool/Egrs75/ConditionThreeWindow.lean index d4ea928077..addbd91aab 100644 --- a/LeanPool/Egrs75/ConditionThreeWindow.lean +++ b/LeanPool/Egrs75/ConditionThreeWindow.lean @@ -3,14 +3,13 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.Defs -import LeanPool.Egrs75.RoundUp -import LeanPool.Egrs75.LeafInduction -import LeanPool.Egrs75.DigitVector -import LeanPool.Egrs75.DigitAtToolkit -import Mathlib.Algebra.Order.Ring.GeomSum -import Mathlib.Algebra.BigOperators.Intervals +public import LeanPool.Egrs75.DigitVector +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Order.Interval.Finset.Nat +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Algebra.Ring.GeomSum /-! EGRS75 LOW-case clearing — PRIMITIVE P4: condition-(3) window producer (2026-06-08). @@ -55,6 +54,8 @@ Reuses (does not reprove) the imported base-`q` digit machinery. Formalizes the theorem EGRS75 (1975). Three primes is Erdős #376 (OPEN) — not attempted. -/ +@[expose] public section + namespace Egrs75.P4 open Nat @@ -62,7 +63,6 @@ open Finset open Egrs75 open Egrs75.LeafInduction open Egrs75.RepairDV -open Egrs75.RepairPaperfaithful /-! ## The base-`q` geometric sum and the GOLDEN place-value identity -/ @@ -233,7 +233,7 @@ theorem mod_pow_succ (n q t : ℕ) : /-- The partial tail lower bound `LB q n j t = b_j·q^j + B·(q^{j+1} + … + q^{t-1})`, expressed as `(n/q^j%q)·q^j + B·∑_{j < s < t} q^s`. (Only used internally.) -/ -private def tailLB (q n j t : ℕ) : ℕ := +def tailLB (q n j t : ℕ) : ℕ := (n / q ^ j % q) * q ^ j + ((q - 1) / 2) * ∑ s ∈ Finset.Ico (j + 1) t, q ^ s /-- **Inductive tail bound (KERNEL-CLEAN).** For `j = topBadIndex q n`, `i = leastGoodAbove`, diff --git a/LeanPool/Egrs75/Defs.lean b/LeanPool/Egrs75/Defs.lean index e8bcc67385..03af7a29a5 100644 --- a/LeanPool/Egrs75/Defs.lean +++ b/LeanPool/Egrs75/Defs.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.CentralBinomialDigits -import Mathlib.Data.Set.Finite.Basic +public import LeanPool.Egrs75.CentralBinomialDigits +import Mathlib.Data.Finset.Attr /-! EGRS75 two-prime infinitude — strategy + defs scaffold. @@ -34,6 +35,8 @@ Recon / context: MATH CONTEXT block in the run prompt; #376 recon at DO NOT reprove Kummer — reuse the imports below. -/ +@[expose] public section + namespace Egrs75 open Nat diff --git a/LeanPool/Egrs75/DigitAtToolkit.lean b/LeanPool/Egrs75/DigitAtToolkit.lean index 7e2bbfbb29..80bf4d6dc9 100644 --- a/LeanPool/Egrs75/DigitAtToolkit.lean +++ b/LeanPool/Egrs75/DigitAtToolkit.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.Defs -import LeanPool.Egrs75.RoundUp -import LeanPool.Egrs75.LeafInduction -import Mathlib.Data.Nat.Digits.Lemmas +public import LeanPool.Egrs75.LeafInduction import Mathlib.Data.List.GetD +import Mathlib.Data.Nat.Digits.Lemmas /-! EGRS75 repair step — route "paperfaithful". @@ -46,6 +45,8 @@ no circularity. This formalizes the KNOWN 1975 theorem; it is not an open proble Imports only kernel-clean material; does NOT modify any existing clean file. -/ +@[expose] public section + namespace Egrs75.RepairPaperfaithful open Nat diff --git a/LeanPool/Egrs75/DigitVector.lean b/LeanPool/Egrs75/DigitVector.lean index 714198f9c2..b7cd54a012 100644 --- a/LeanPool/Egrs75/DigitVector.lean +++ b/LeanPool/Egrs75/DigitVector.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.Defs -import LeanPool.Egrs75.RoundUp -import LeanPool.Egrs75.LeafInduction -import Mathlib.Data.Nat.Digits.Lemmas -import Mathlib.Data.List.Count +public import LeanPool.Egrs75.LeafInduction +public import Mathlib.Data.Finset.Max import Mathlib.Data.List.GetD +import Mathlib.Data.Nat.Digits.Lemmas /-! EGRS75 two-prime ALIGN leaf — route `digitvector`: the carry-controlled repair step. @@ -41,6 +40,8 @@ hypothesis. Formalizes the KNOWN theorem EGRS75 (Math. Comp. 29 (1975), the rep Lemma p.84, case `κ₁ = κ₂ = 1/2`). Three primes is Erdős #376 (OPEN); not attempted. -/ +@[expose] public section + namespace Egrs75.RepairDV open Nat diff --git a/LeanPool/Egrs75/Instances.lean b/LeanPool/Egrs75/Instances.lean index 75672b08b6..874a104c2d 100644 --- a/LeanPool/Egrs75/Instances.lean +++ b/LeanPool/Egrs75/Instances.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import Mathlib.Basic.Finite.Defs +public import Mathlib.Data.Nat.Choose.Central +public import Mathlib.Data.Nat.Prime.Defs import LeanPool.Egrs75.MuFinish +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Data.Nat.Totient import Mathlib.Tactic.NormNum.Prime /-! @@ -16,6 +22,8 @@ satisfiable (no hidden vacuity) and that the closure is usable downstream. All three MUST be kernel-clean. -/ +@[expose] public section + namespace Egrs75.SmokeProbe open Egrs75.MuFinish diff --git a/LeanPool/Egrs75/KummerValuation.lean b/LeanPool/Egrs75/KummerValuation.lean index 57a7284210..c01c795517 100644 --- a/LeanPool/Egrs75/KummerValuation.lean +++ b/LeanPool/Egrs75/KummerValuation.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import Mathlib.Data.Nat.Choose.Central +public import Mathlib.Data.Nat.Digits.Defs +public import Mathlib.Data.Nat.MaxPowDiv +public import Mathlib.Data.Nat.PadicValNat +public import Mathlib.Data.Nat.Prime.Defs import Mathlib.NumberTheory.Padics.PadicVal.Basic /-! @@ -15,6 +21,8 @@ Erdos117 squarefree-central-binomial scaffold. Keeping them here makes the ConcreteMath module self-contained around its actual open target. -/ +@[expose] public section + namespace Egrs75.ConcreteMath open Nat diff --git a/LeanPool/Egrs75/LeafInduction.lean b/LeanPool/Egrs75/LeafInduction.lean index cdbbaff5f2..fb4a0fbec3 100644 --- a/LeanPool/Egrs75/LeafInduction.lean +++ b/LeanPool/Egrs75/LeafInduction.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.Defs -import LeanPool.Egrs75.RoundUp -import Mathlib.Data.Nat.Digits.Lemmas -import Mathlib.Order.Preorder.Finite +public import LeanPool.Egrs75.Defs +import Mathlib.Data.Finset.Attr /-! EGRS75 two-prime ALIGN leaf — route "induction": isolate the single irreducible @@ -73,6 +72,8 @@ clean files are NOT modified. This formalizes the KNOWN theorem EGRS75 not attempted here. -/ +@[expose] public section + namespace Egrs75.LeafInduction open Nat diff --git a/LeanPool/Egrs75/LogIrrationality.lean b/LeanPool/Egrs75/LogIrrationality.lean index 98a7fd5334..a0b45be801 100644 --- a/LeanPool/Egrs75/LogIrrationality.lean +++ b/LeanPool/Egrs75/LogIrrationality.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.Defs -import LeanPool.Egrs75.RoundUp +public import Mathlib.Topology.Instances.AddCircle.Defs + +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +public import Mathlib.NumberTheory.Real.Irrational import Mathlib.Topology.Instances.AddCircle.DenseSubgroup -import Mathlib.Analysis.SpecialFunctions.Log.Basic /-! EGRS75 two-prime crux — route `mathlib-api`: the equidistribution INPUT. @@ -56,6 +58,8 @@ DO NOT frame this as solving an open Erdős problem: this formalises EGRS75 (Math. Comp. 1975, Theorem 1/2), a KNOWN theorem. Three primes is Erdős #376 (open). -/ +@[expose] public section + namespace Egrs75.MathlibAPI open Nat diff --git a/LeanPool/Egrs75/MoveDigits.lean b/LeanPool/Egrs75/MoveDigits.lean index 7ac569332e..d7ab81215e 100644 --- a/LeanPool/Egrs75/MoveDigits.lean +++ b/LeanPool/Egrs75/MoveDigits.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.Defs -import LeanPool.Egrs75.RoundUp -import LeanPool.Egrs75.LeafInduction -import LeanPool.Egrs75.DigitVector -import LeanPool.Egrs75.DigitAtToolkit +public import LeanPool.Egrs75.DigitVector +public import LeanPool.Egrs75.DigitAtToolkit +import Mathlib.Data.List.GetD import Mathlib.Data.Nat.Digits.Lemmas /-! @@ -37,6 +36,8 @@ Formalizes part of the KNOWN theorem EGRS75 (1975); three primes is Erdős #376 (OPEN) — not attempted. Recon: ~/Knowledge/Construct/recon/erdos_376.md. -/ +@[expose] public section + namespace Egrs75.MoveDigits open Nat diff --git a/LeanPool/Egrs75/MuFinish.lean b/LeanPool/Egrs75/MuFinish.lean index 2f7a0d5281..09480a8872 100644 --- a/LeanPool/Egrs75/MuFinish.lean +++ b/LeanPool/Egrs75/MuFinish.lean @@ -3,19 +3,17 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.Defs -import LeanPool.Egrs75.RoundUp -import LeanPool.Egrs75.LeafInduction -import LeanPool.Egrs75.DigitVector -import LeanPool.Egrs75.DigitAtToolkit +public import LeanPool.Egrs75.DigitAtToolkit +public import LeanPool.Egrs75.ConditionThreeWindow import LeanPool.Egrs75.AddBranch -import LeanPool.Egrs75.SubtractBranch -import LeanPool.Egrs75.ConditionThreeWindow import LeanPool.Egrs75.MoveDigits -import LeanPool.Egrs75.SeedWindow import LeanPool.Egrs75.Reduction -import Mathlib.Data.Nat.Digits.Lemmas +import LeanPool.Egrs75.RoundUp +import LeanPool.Egrs75.SeedWindow +import LeanPool.Egrs75.SubtractBranch +import Mathlib.Data.Nat.Totient /-! EGRS75 two-prime — the μ-MEASURE CLOSURE (2026-06-12). @@ -66,6 +64,8 @@ NOT an open-problem solve: the r ≥ 3 generalization is Erdős #376 (OPEN) and not attempted. Recon: ~/Knowledge/Construct/recon/erdos_376.md. -/ +@[expose] public section + namespace Egrs75.MuFinish open Nat diff --git a/LeanPool/Egrs75/Reduction.lean b/LeanPool/Egrs75/Reduction.lean index 9f398c041a..09ae12959f 100644 --- a/LeanPool/Egrs75/Reduction.lean +++ b/LeanPool/Egrs75/Reduction.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.Defs +public import LeanPool.Egrs75.Defs +public import Mathlib.Basic.Finite.Defs +import Mathlib.Data.Finset.Attr /-! EGRS75 two-prime infinitude — ASSEMBLY. @@ -65,6 +68,8 @@ Recon / context: MATH CONTEXT block in the run prompt; #376 recon at ~/Knowledge/Construct/recon/erdos_376.md. -/ +@[expose] public section + namespace Egrs75 open Nat diff --git a/LeanPool/Egrs75/RoundUp.lean b/LeanPool/Egrs75/RoundUp.lean index c0f88ddcaa..76455dcdc8 100644 --- a/LeanPool/Egrs75/RoundUp.lean +++ b/LeanPool/Egrs75/RoundUp.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.Defs -import Mathlib.Data.Nat.Digits.Lemmas +public import LeanPool.Egrs75.Defs +import Mathlib.Algebra.Order.SuccPred +import Mathlib.Data.Finset.Attr /-! EGRS75 — the single-base density "Fact" (kernel-clean). @@ -36,6 +38,8 @@ low-digit number in both bases is the EGRS Diophantine "iterative digit repair" step (their eq. (2) + the repair Lemma), which is the genuine remaining gap. -/ +@[expose] public section + namespace Egrs75.RoundUp open Nat diff --git a/LeanPool/Egrs75/SeedWindow.lean b/LeanPool/Egrs75/SeedWindow.lean index 62268bd3af..d88bfc6db0 100644 --- a/LeanPool/Egrs75/SeedWindow.lean +++ b/LeanPool/Egrs75/SeedWindow.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import Mathlib.Analysis.SpecialFunctions.Log.Basic import LeanPool.Egrs75.LogIrrationality +import Mathlib.Data.Nat.Totient import Mathlib.NumberTheory.DiophantineApproximation.Basic -import Mathlib.Analysis.SpecialFunctions.Log.Basic /-! EGRS75 two-prime — THE DIOPHANTINE SEED (paper condition (2)), 2026-06-12. @@ -39,6 +41,8 @@ theorem EGRS75 (1975); three primes is Erdős #376 (OPEN) — not attempted. Recon: ~/Knowledge/Construct/recon/erdos_376.md. -/ +@[expose] public section + namespace Egrs75.SeedWindow open Nat diff --git a/LeanPool/Egrs75/SubtractBranch.lean b/LeanPool/Egrs75/SubtractBranch.lean index 7b40ee758a..69144ff5db 100644 --- a/LeanPool/Egrs75/SubtractBranch.lean +++ b/LeanPool/Egrs75/SubtractBranch.lean @@ -3,14 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Egrs75.Defs +public import LeanPool.Egrs75.DigitVector +public import LeanPool.Egrs75.DigitAtToolkit +public import Mathlib.Data.Nat.Factorization.Defs import LeanPool.Egrs75.RoundUp -import LeanPool.Egrs75.LeafInduction -import LeanPool.Egrs75.DigitVector -import LeanPool.Egrs75.DigitAtToolkit -import Mathlib.Data.Nat.Digits.Lemmas -import Mathlib.Data.List.GetD /-! EGRS75 two-prime ALIGN leaf — LOW case, PRIMITIVE P3 (SUBTRACT branch). @@ -72,6 +70,8 @@ and the high/low base-`q` machinery; does NOT modify any existing clean file. F the KNOWN 1975 theorem; three primes is Erdős #376 (OPEN) — not attempted. -/ +@[expose] public section + namespace Egrs75.ClearingP3 open Nat diff --git a/LeanPool/Erdos1196.lean b/LeanPool/Erdos1196.lean index 5c3110fc23..e8be46e0d5 100644 --- a/LeanPool/Erdos1196.lean +++ b/LeanPool/Erdos1196.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ - -import LeanPool.Erdos1196.Basic -import LeanPool.Erdos1196.Preliminaries -import LeanPool.Erdos1196.Markov -import LeanPool.Erdos1196.PrimitiveWeight -import LeanPool.Erdos1196.HitMass -import LeanPool.Erdos1196.Main -import LeanPool.Erdos1196.FormalConjecturesErdos1196 +module + +public import LeanPool.Erdos1196.Basic +public import LeanPool.Erdos1196.Preliminaries +public import LeanPool.Erdos1196.Markov +public import LeanPool.Erdos1196.PrimitiveWeight +public import LeanPool.Erdos1196.HitMass +public import LeanPool.Erdos1196.Main +public import LeanPool.Erdos1196.FormalConjecturesErdos1196 +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.NumberTheory.Chebyshev /-! # Primitive Sets Above x (Erdos Problem 1196) @@ -23,6 +26,8 @@ Tags: number-theory, combinatorics, analysis MSC: 11N25, 05D05 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Erdos1196/Basic.lean b/LeanPool/Erdos1196/Basic.lean index 2f1c351b97..9ae9a3a2ee 100644 --- a/LeanPool/Erdos1196/Basic.lean +++ b/LeanPool/Erdos1196/Basic.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ -import Mathlib.Algebra.Notation.Indicator +module + +public import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt import Mathlib.NumberTheory.Chebyshev -import Mathlib.Topology.Algebra.InfiniteSum.Real /-! # Basic definitions for primitive sets above `x` @@ -26,6 +27,8 @@ and `μ_x`, and the abstract Markov-layer interface used for the visit-probabili * `MarkovLayer` -/ +@[expose] public section + open scoped ArithmeticFunction BigOperators namespace PrimitiveSetsAboveX diff --git a/LeanPool/Erdos1196/FirstEntryRowTerm.lean b/LeanPool/Erdos1196/FirstEntryRowTerm.lean index 4e2d3dac2e..0acfac7db1 100644 --- a/LeanPool/Erdos1196/FirstEntryRowTerm.lean +++ b/LeanPool/Erdos1196/FirstEntryRowTerm.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ -import LeanPool.Erdos1196.Basic -import Mathlib.Algebra.Order.Floor.Div +module + +public import Mathlib.Algebra.Order.Floor.Div +public import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt +import Mathlib.NumberTheory.Chebyshev /-! # First-entry row data @@ -21,6 +24,8 @@ the resulting tail sum, and the pairwise weights used later in the fiberwise rei * `firstEntryPairWeight` -/ +@[expose] public section + open scoped ArithmeticFunction BigOperators namespace PrimitiveSetsAboveX diff --git a/LeanPool/Erdos1196/FormalConjecturesErdos1196.lean b/LeanPool/Erdos1196/FormalConjecturesErdos1196.lean index 56a4cfda68..e75a02ea2b 100644 --- a/LeanPool/Erdos1196/FormalConjecturesErdos1196.lean +++ b/LeanPool/Erdos1196/FormalConjecturesErdos1196.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ +module + +public import LeanPool.Erdos1196.Basic import LeanPool.Erdos1196.Main -import Mathlib.Algebra.GCDMonoid.Nat -import Mathlib.Analysis.Asymptotics.Lemmas -import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.NumberTheory.Chebyshev /-! # The formal-conjectures statement of Erdős Problem 1196 @@ -21,6 +23,8 @@ definition, but omit the repository-specific metadata attribute and `answer(...) * `Erdos1196.erdos_1196` -/ +@[expose] public section + open Filter open scoped Asymptotics BigOperators diff --git a/LeanPool/Erdos1196/HitMass.lean b/LeanPool/Erdos1196/HitMass.lean index 7f9ae582ae..44adb56672 100644 --- a/LeanPool/Erdos1196/HitMass.lean +++ b/LeanPool/Erdos1196/HitMass.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ +module + +public import LeanPool.Erdos1196.Basic import LeanPool.Erdos1196.Markov -import Mathlib.Topology.Algebra.InfiniteSum.ENNReal +import LeanPool.Erdos1196.NormalizationCore +import LeanPool.Erdos1196.Preliminaries +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.NumberTheory.Chebyshev /-! # Hit mass and final reductions @@ -35,6 +41,8 @@ paths in the multiplicative chain can meet `A` at most once. * `PrimitiveSet.summable_indicator_visitProbability_and_tsum_le_one_of_visitMass_le_one` -/ +@[expose] public section + open scoped ArithmeticFunction BigOperators namespace PrimitiveSetsAboveX diff --git a/LeanPool/Erdos1196/Main.lean b/LeanPool/Erdos1196/Main.lean index be5e0ce829..3d84412994 100644 --- a/LeanPool/Erdos1196/Main.lean +++ b/LeanPool/Erdos1196/Main.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ -import LeanPool.Erdos1196.Markov +module + +public import LeanPool.Erdos1196.Basic import LeanPool.Erdos1196.HitMass +import LeanPool.Erdos1196.Markov import LeanPool.Erdos1196.PrimitiveWeight +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.NumberTheory.Chebyshev /-! # Main theorem for primitive sets above `x` @@ -20,6 +25,8 @@ normalization estimates into the final logarithmic-series bound. * `mainTheorem` -/ +@[expose] public section + open scoped ArithmeticFunction BigOperators namespace PrimitiveSetsAboveX diff --git a/LeanPool/Erdos1196/Markov.lean b/LeanPool/Erdos1196/Markov.lean index 40acd9be17..1eb7fcdbd9 100644 --- a/LeanPool/Erdos1196/Markov.lean +++ b/LeanPool/Erdos1196/Markov.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ +module + +public import LeanPool.Erdos1196.Basic import LeanPool.Erdos1196.Normalization +import LeanPool.Erdos1196.NormalizationSmallPrime import LeanPool.Erdos1196.Preliminaries +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.NumberTheory.Chebyshev /-! # Markov-chain lemmas for primitive sets above `x` @@ -21,6 +27,8 @@ probabilities. * `visitProbabilityFormula` -/ +@[expose] public section + /- ! Markov-chain identities and row-sum bounds used in the proof. -/ open scoped ArithmeticFunction BigOperators diff --git a/LeanPool/Erdos1196/Normalization.lean b/LeanPool/Erdos1196/Normalization.lean index 1aff04555d..5c4712fd2a 100644 --- a/LeanPool/Erdos1196/Normalization.lean +++ b/LeanPool/Erdos1196/Normalization.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ -import LeanPool.Erdos1196.NormalizationCore -import LeanPool.Erdos1196.NormalizationSmallPrime +module + +public import LeanPool.Erdos1196.NormalizationCore +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.NumberTheory.Chebyshev /-! # First-entry bounds for the normalization constant @@ -17,6 +20,8 @@ proving the final estimate for the first-entry contribution to `B_x`. * `normalizationFirstEntryPart_estimate` -/ +@[expose] public section + open scoped ArithmeticFunction BigOperators Topology namespace PrimitiveSetsAboveX diff --git a/LeanPool/Erdos1196/NormalizationCore.lean b/LeanPool/Erdos1196/NormalizationCore.lean index 2c2842f573..22747c45c0 100644 --- a/LeanPool/Erdos1196/NormalizationCore.lean +++ b/LeanPool/Erdos1196/NormalizationCore.lean @@ -3,15 +3,13 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ +module + +public import LeanPool.Erdos1196.FirstEntryRowTerm +public import LeanPool.Erdos1196.Basic import LeanPool.Erdos1196.Preliminaries -import LeanPool.Erdos1196.FirstEntryRowTerm -import Mathlib.Algebra.Order.Floor.Div -import Mathlib.Analysis.SumIntegralComparisons -import Mathlib.MeasureTheory.Integral.IntegralEqImproper -import Mathlib.Topology.Instances.Real.Lemmas -import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.NumberTheory.Chebyshev import Mathlib.NumberTheory.Harmonic.Bounds -import Mathlib.NumberTheory.TsumDivisorsAntidiagonal /-! # Core definitions for the normalization constant @@ -29,6 +27,8 @@ the two separate estimate files. * `normalizationFirstEntryPart` -/ +@[expose] public section + open scoped ArithmeticFunction BigOperators Topology namespace PrimitiveSetsAboveX diff --git a/LeanPool/Erdos1196/NormalizationSmallPrime.lean b/LeanPool/Erdos1196/NormalizationSmallPrime.lean index 1e3bf65ea7..21dd2e3545 100644 --- a/LeanPool/Erdos1196/NormalizationSmallPrime.lean +++ b/LeanPool/Erdos1196/NormalizationSmallPrime.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ -import LeanPool.Erdos1196.NormalizationCore -import Mathlib.Order.Filter.AtTopBot.Field +module + +public import LeanPool.Erdos1196.NormalizationCore +import LeanPool.Erdos1196.PreliminariesTailAux +import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.Analysis.SumIntegralComparisons +import Mathlib.NumberTheory.Chebyshev /-! # Small-prime bounds for the normalization constant @@ -18,6 +24,8 @@ Its main theorem shows that this part is summable and contributes only `O(1 / lo * `summable_normalizationSmallPrimePart_and_tsum_le` -/ +@[expose] public section + open scoped ArithmeticFunction BigOperators Topology namespace PrimitiveSetsAboveX diff --git a/LeanPool/Erdos1196/Preliminaries.lean b/LeanPool/Erdos1196/Preliminaries.lean index 714fe16e95..175169b45c 100644 --- a/LeanPool/Erdos1196/Preliminaries.lean +++ b/LeanPool/Erdos1196/Preliminaries.lean @@ -3,14 +3,13 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ -import LeanPool.Erdos1196.Basic +module + +public import LeanPool.Erdos1196.Basic import LeanPool.Erdos1196.PreliminariesMertens import LeanPool.Erdos1196.PreliminariesTailAux -import Mathlib.Analysis.SpecialFunctions.Log.InvLog -import Mathlib.Analysis.SpecialFunctions.Integrals.Basic -import Mathlib.Analysis.SumIntegralComparisons -import Mathlib.MeasureTheory.Integral.IntervalIntegral.IntegrationByParts -import Mathlib.NumberTheory.AbelSummation +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.NumberTheory.Chebyshev /-! # Tail estimates for primitive sets above `x` @@ -26,6 +25,8 @@ The arithmetic input for the Mertens partial sums lives in * `tailEstimate` -/ +@[expose] public section + open scoped ArithmeticFunction BigOperators Topology open Filter MeasureTheory diff --git a/LeanPool/Erdos1196/PreliminariesMertens.lean b/LeanPool/Erdos1196/PreliminariesMertens.lean index 8d71b3ac1e..e00d6fc9a7 100644 --- a/LeanPool/Erdos1196/PreliminariesMertens.lean +++ b/LeanPool/Erdos1196/PreliminariesMertens.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ -import LeanPool.Erdos1196.Basic +module + +public import LeanPool.Erdos1196.Basic import Mathlib.Analysis.SpecialFunctions.Integrals.Basic import Mathlib.Analysis.SumIntegralComparisons -import Mathlib.NumberTheory.AbelSummation +import Mathlib.NumberTheory.Chebyshev /-! # Arithmetic preliminaries for primitive sets above `x` @@ -19,6 +21,8 @@ Mertens estimate used later in the normalization and tail-sum arguments. * `mertensEstimate` -/ +@[expose] public section + open scoped ArithmeticFunction BigOperators namespace PrimitiveSetsAboveX diff --git a/LeanPool/Erdos1196/PreliminariesTailAux.lean b/LeanPool/Erdos1196/PreliminariesTailAux.lean index 0430f41a88..e0f088c5b4 100644 --- a/LeanPool/Erdos1196/PreliminariesTailAux.lean +++ b/LeanPool/Erdos1196/PreliminariesTailAux.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ -import LeanPool.Erdos1196.Basic -import Mathlib.Analysis.SpecialFunctions.Log.InvLog -import Mathlib.Analysis.SpecialFunctions.Integrals.Basic -import Mathlib.Analysis.SumIntegralComparisons -import Mathlib.MeasureTheory.Integral.IntervalIntegral.IntegrationByParts -import Mathlib.NumberTheory.AbelSummation +module + +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.NumberTheory.Chebyshev /-! # Auxiliary tail lemmas for primitive sets above `x` @@ -26,6 +28,8 @@ be computed exactly. * `integral_Ioi_two_inv_log_cube` -/ +@[expose] public section + open scoped ArithmeticFunction BigOperators Topology open Filter MeasureTheory diff --git a/LeanPool/Erdos1196/PrimitiveWeight.lean b/LeanPool/Erdos1196/PrimitiveWeight.lean index fde8168fa8..80364eb647 100644 --- a/LeanPool/Erdos1196/PrimitiveWeight.lean +++ b/LeanPool/Erdos1196/PrimitiveWeight.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Math Inc. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Math Inc -/ +module + +public import LeanPool.Erdos1196.Basic import LeanPool.Erdos1196.Markov +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.NumberTheory.Chebyshev /-! # Rewriting the primitive weight using visit probabilities @@ -18,6 +23,8 @@ summable hit series to the logarithmic-series bound. * `summable_indicatorLogSeries_and_tsum_le_of_hitMass` -/ +@[expose] public section + open scoped BigOperators namespace PrimitiveSetsAboveX diff --git a/LeanPool/Erdos132ConvexK3.lean b/LeanPool/Erdos132ConvexK3.lean index b225e2d8d4..7e2945d41e 100644 --- a/LeanPool/Erdos132ConvexK3.lean +++ b/LeanPool/Erdos132ConvexK3.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos132ConvexK3.Assembly -import LeanPool.Erdos132ConvexK3.GlobalClosure -import LeanPool.Erdos132ConvexK3.RegressionWitnesses -import LeanPool.Erdos132ConvexK3.UseSite -import LeanPool.Erdos132ConvexK3.Witnesses +public import LeanPool.Erdos132ConvexK3.Assembly +public import LeanPool.Erdos132ConvexK3.GlobalClosure +public import LeanPool.Erdos132ConvexK3.RegressionWitnesses +public import LeanPool.Erdos132ConvexK3.UseSite +public import LeanPool.Erdos132ConvexK3.Witnesses +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset /-! # Convex Three-Distance Degree-Six Theorem and Exceptional-Word Closures @@ -21,6 +28,8 @@ Tags: discrete-geometry, distance-graphs, erdos-problems, convexity MSC: 52C10, 05C12 -/ +@[expose] public section + /-! # Exceptional-Word Closures for the Convex Three-Distance Case of Erdős Problem 132 diff --git a/LeanPool/Erdos132ConvexK3/Assembly.lean b/LeanPool/Erdos132ConvexK3/Assembly.lean index 94844407b5..59c6c9cb0d 100644 --- a/LeanPool/Erdos132ConvexK3/Assembly.lean +++ b/LeanPool/Erdos132ConvexK3/Assembly.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.WordClosures -import Lean.Elab.Tactic.Omega +module + +public import LeanPool.Erdos132ConvexK3.WordClosures +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset /-! # Thirteen-word assembly @@ -16,6 +23,8 @@ final section separately records the stronger global reduction still needed to obtain the source-facing convex theorem. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 /-- The five exceptional rows of draft table (3.5). -/ @@ -31,7 +40,7 @@ instance : Fintype ExceptionalRow where elems := {.row1, .row2, .row3, .row4, .row5} complete := by intro row - cases row <;> simp + cases row <;> decide +kernel /-- The thirteen and only thirteen row/cover words in draft Section 7. -/ inductive ExceptionalCoverWord where @@ -57,7 +66,7 @@ instance : Fintype ExceptionalCoverWord where } complete := by intro word - cases word <;> simp + cases word <;> decide +kernel /-- The four local kernels named in the Section 7 destination column. -/ inductive WordClosureRoute where @@ -71,7 +80,7 @@ instance : Fintype WordClosureRoute where elems := {.fullTwoRung, .antiSaturation, .terminalCage, .fourEdgeCage} complete := by intro route - cases route <;> simp + cases route <;> decide +kernel /-- Row projection for the thirteen-word audit. -/ def ExceptionalCoverWord.row : ExceptionalCoverWord → ExceptionalRow diff --git a/LeanPool/Erdos132ConvexK3/Basic.lean b/LeanPool/Erdos132ConvexK3/Basic.lean index 27877c0176..f2653289cc 100644 --- a/LeanPool/Erdos132ConvexK3/Basic.lean +++ b/LeanPool/Erdos132ConvexK3/Basic.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import Mathlib.Combinatorics.SimpleGraph.Basic -import Mathlib.Data.Finset.Card -import Mathlib.Data.List.FinRange -import Mathlib.Basic.Real.Basic -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring +module + +public import Mathlib.Combinatorics.SimpleGraph.Basic +public import Mathlib.Basic.Real.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # The convex three-largest-distance graph @@ -21,6 +25,8 @@ The open Erdős 132 conjecture is not asserted here. Recon: `~/Knowledge/Construct/recon/erdos_132.md`. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 /-- A Cartesian point over an ordered coordinate ring. -/ @@ -115,21 +121,11 @@ theorem sqDist_nonneg (a b : Point ℝ) : 0 ≤ sqDist a b := by /-- Distinct real points have positive squared distance. -/ theorem sqDist_pos_of_ne {a b : Point ℝ} (h : a ≠ b) : 0 < sqDist a b := by by_contra hn - have hle : sqDist a b ≤ 0 := le_of_not_gt hn - have h1 : (b.1 - a.1) ^ 2 = 0 := by - have hsq1 : 0 ≤ (b.1 - a.1) ^ 2 := sq_nonneg _ - have hsq2 : 0 ≤ (b.2 - a.2) ^ 2 := sq_nonneg _ - unfold sqDist at hle - nlinarith - have h2 : (b.2 - a.2) ^ 2 = 0 := by - have hsq1 : 0 ≤ (b.1 - a.1) ^ 2 := sq_nonneg _ - have hsq2 : 0 ≤ (b.2 - a.2) ^ 2 := sq_nonneg _ - unfold sqDist at hle - nlinarith - apply h - apply Prod.ext - · exact (sub_eq_zero.mp (sq_eq_zero_iff.mp h1)).symm - · exact (sub_eq_zero.mp (sq_eq_zero_iff.mp h2)).symm + have hz : sqDist a b = 0 := le_antisymm (le_of_not_gt hn) (sqDist_nonneg a b) + have hcoords := (add_eq_zero_iff_of_nonneg (sq_nonneg _) (sq_nonneg _)).mp hz + exact h (Prod.ext + (sub_eq_zero.mp (sq_eq_zero_iff.mp hcoords.1)).symm + (sub_eq_zero.mp (sq_eq_zero_iff.mp hcoords.2)).symm) /-- The top-three predicate supplies its global distance bound for every ordered pair of distinct labels, not only for the increasing representative diff --git a/LeanPool/Erdos132ConvexK3/CoordinatedMajorants.lean b/LeanPool/Erdos132ConvexK3/CoordinatedMajorants.lean index 51097b8086..d571927af8 100644 --- a/LeanPool/Erdos132ConvexK3/CoordinatedMajorants.lean +++ b/LeanPool/Erdos132ConvexK3/CoordinatedMajorants.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.MajorantArcNesting -import Lean.Elab.Tactic.Omega -import Mathlib.Tactic.Linarith +module + +public import LeanPool.Erdos132ConvexK3.MajorantArcNesting +import LeanPool.Erdos132ConvexK3.Geometry +import Mathlib.Algebra.Order.Algebra +import Mathlib.Data.EReal.Inv /-! # Coordinated ErLV majorants @@ -16,6 +19,8 @@ jointly to minimize the moves made by their facing endpoints. The finite minimum exists. The remaining exchange statement is isolated exactly. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 namespace K3CoverSequence @@ -225,16 +230,8 @@ theorem right_right_cover_rank_ladder have hGrow₂ : sqDist (P i) (P (cyclicAdvance j 1)) < sqDist (P i) (P (cyclicAdvance j 2)) := by simpa only [IsRightCover, cyclicAdvance_add, Nat.reduceAdd] using hCovers.2 - have hFinal : sqDist (P i) (P (cyclicAdvance j 2)) = d₁ := by - exact two_covers_end_at_d₁ hClasses hStart hMid hEnd hGrow₁ hGrow₂ - have hd₃d₂ := hClasses.1 - have hd₂d₁ := hClasses.2.1 - have hStartRank : sqDist (P i) (P j) = d₃ := by - rcases hStart.2 with h₁ | h₂ | h₃ <;> - rcases hMid.2 with hm₁ | hm₂ | hm₃ <;> linarith - have hMidRank : sqDist (P i) (P (cyclicAdvance j 1)) = d₂ := by - rcases hMid.2 with hm₁ | hm₂ | hm₃ <;> linarith - exact ⟨hStartRank, hMidRank, hFinal⟩ + exact strict_three_rank_chain hClasses.1 hClasses.2.1 + hStart.2 hMid.2 hEnd.2 hGrow₁ hGrow₂ /-- Two successive left covers exhaust the three ranks exactly. -/ theorem left_left_cover_rank_ladder @@ -255,16 +252,8 @@ theorem left_left_cover_rank_ladder have hGrow₂ : sqDist (P (cyclicRetreat i 1)) (P j) < sqDist (P (cyclicRetreat i 2)) (P j) := by simpa only [IsLeftCover, cyclicRetreat_add, Nat.reduceAdd] using hCovers.2 - have hFinal : sqDist (P (cyclicRetreat i 2)) (P j) = d₁ := by - exact two_covers_end_at_d₁ hClasses hStart hMid hEnd hGrow₁ hGrow₂ - have hd₃d₂ := hClasses.1 - have hd₂d₁ := hClasses.2.1 - have hStartRank : sqDist (P i) (P j) = d₃ := by - rcases hStart.2 with h₁ | h₂ | h₃ <;> - rcases hMid.2 with hm₁ | hm₂ | hm₃ <;> linarith - have hMidRank : sqDist (P (cyclicRetreat i 1)) (P j) = d₂ := by - rcases hMid.2 with hm₁ | hm₂ | hm₃ <;> linarith - exact ⟨hStartRank, hMidRank, hFinal⟩ + exact strict_three_rank_chain hClasses.1 hClasses.2.1 + hStart.2 hMid.2 hEnd.2 hGrow₁ hGrow₂ /-- The intermediate edge of a forced two-right-move chain is not a majorant: the second move is still a strict right cover. Thus this edge @@ -417,26 +406,21 @@ theorem equal_avoiding_edges_force_cross_top_three TopThreeAdjacent P d₁ d₂ d₃ a c ∨ TopThreeAdjacent P d₁ d₂ d₃ b d := by have hEdge := edge_diagonal_inequality hquad - have habSq := euclideanDist_sq (P a) (P b) - have hcdSq := euclideanDist_sq (P c) (P d) - have hacSq := euclideanDist_sq (P a) (P c) - have hbdSq := euclideanDist_sq (P b) (P d) - have habNonneg : 0 ≤ euclideanDist (P a) (P b) := dist_nonneg - have hcdNonneg : 0 ≤ euclideanDist (P c) (P d) := dist_nonneg - have hacNonneg : 0 ≤ euclideanDist (P a) (P c) := dist_nonneg - have hbdNonneg : 0 ≤ euclideanDist (P b) (P d) := dist_nonneg have hSideEq : euclideanDist (P a) (P b) = euclideanDist (P c) (P d) := by - nlinarith + rw [← euclideanDist_sq, ← euclideanDist_sq] at hEqual + exact (sq_eq_sq₀ dist_nonneg dist_nonneg).mp hEqual by_cases hacLong : euclideanDist (P a) (P b) < euclideanDist (P a) (P c) · left apply top_three_adjacent_of_strictly_longer hClasses hab - nlinarith + rw [← euclideanDist_sq, ← euclideanDist_sq] + exact (sq_lt_sq₀ dist_nonneg dist_nonneg).mpr hacLong · right have hbdLong : euclideanDist (P c) (P d) < euclideanDist (P b) (P d) := by have hacLe := le_of_not_gt hacLong - linarith + linarith only [hEdge, hSideEq, hacLe] apply top_three_adjacent_of_strictly_longer hClasses hcd - nlinarith + rw [← euclideanDist_sq, ← euclideanDist_sq] + exact (sq_lt_sq₀ dist_nonneg dist_nonneg).mpr hbdLong /-- In the maximal-gap setup the two starting edges `tu` and `zx` occur as opposite sides of the strict convex quadrilateral `t,u,z,x`. This is the diff --git a/LeanPool/Erdos132ConvexK3/Geometry.lean b/LeanPool/Erdos132ConvexK3/Geometry.lean index 7cf87dc136..29cb292fb0 100644 --- a/LeanPool/Erdos132ConvexK3/Geometry.lean +++ b/LeanPool/Erdos132ConvexK3/Geometry.lean @@ -3,13 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.Basic -import Mathlib.Analysis.Complex.Basic -import Mathlib.Analysis.Convex.StrictConvexSpace +module + +public import LeanPool.Erdos132ConvexK3.Basic +public import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.InnerProductSpace.Convex -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring /-! # Geometric inputs for the convex three-distance argument @@ -19,9 +17,12 @@ red--blue consequences, chord half-plane separation, and same-half-plane uniqueness for two-circle intersections. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 -private def toComplex (p : Point ℝ) : ℂ := ⟨p.1, p.2⟩ +/-- Regard a Cartesian point as a complex number. -/ +def toComplex (p : Point ℝ) : ℂ := ⟨p.1, p.2⟩ /-- Ordinary Euclidean distance between real Cartesian points. -/ noncomputable def euclideanDist (a b : Point ℝ) : ℝ := @@ -447,7 +448,7 @@ theorem same_half_plane_two_circle_unique have hdot : dp = dq := by dsimp [sqDist, ac, bc, pc, qc, toComplex, vx, vy, px, py, qx, qy, dp, dq] at hap hbp ⊢ - nlinarith + linear_combination (hap - hbp) / 2 have hlagP : dp ^ 2 + cp ^ 2 = (vx ^ 2 + vy ^ 2) * (px ^ 2 + py ^ 2) := by dsimp [dp, cp] ring @@ -455,8 +456,8 @@ theorem same_half_plane_two_circle_unique dsimp [dq, cq] ring have hcrossSq : cp ^ 2 = cq ^ 2 := by - rw [hdot] at hlagP - nlinarith [hlagP, hlagQ, hnorm] + rw [hdot, hnorm, ← hlagQ] at hlagP + exact add_left_cancel hlagP have hcp : 0 < cp := by simpa [InLeftOpenHalfPlane, turn, ac, bc, pc, toComplex, vx, vy, px, py, cp] using hp @@ -490,11 +491,7 @@ theorem same_half_plane_two_circle_unique rw [hid, hdot, hcross] ring exact sub_eq_zero.mp ((mul_eq_zero.mp hmul).resolve_left hv.ne') - apply Prod.ext - · dsimp [px, qx, pc, qc, ac, toComplex] at hx - linarith - · dsimp [py, qy, pc, qc, ac, toComplex] at hy - linarith + exact Prod.ext (sub_left_inj.mp hx) (sub_left_inj.mp hy) /-- A point distinct from both endpoints and contained in both closed disks whose common diameter is the endpoint segment has abscissa strictly between diff --git a/LeanPool/Erdos132ConvexK3/GlobalAssembly.lean b/LeanPool/Erdos132ConvexK3/GlobalAssembly.lean index 767e1664a3..0794f5aa4c 100644 --- a/LeanPool/Erdos132ConvexK3/GlobalAssembly.lean +++ b/LeanPool/Erdos132ConvexK3/GlobalAssembly.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.Assembly +module + +public import LeanPool.Erdos132ConvexK3.Assembly +public import LeanPool.Erdos132ConvexK3.UseSite +import LeanPool.Erdos132ConvexK3.TailClosure import LeanPool.Erdos132ConvexK3.TerminalColorClosure -import Lean.Elab.Tactic.Omega -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring +import Mathlib.Algebra.Order.Algebra +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Positivity.Finset /-! # Global convex k = 3 assembly @@ -19,6 +22,8 @@ jointly selected majorants and their outer-endpoint localization. The first stage below packages that data and instantiates the five-row enumeration. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 namespace K3CoverSequence @@ -484,13 +489,13 @@ theorem localized_offset_span_eq_yzSides have htdeg : 0 < vertexDegree P d₁ d₂ d₃ (cyclicAdvance F.x 3) := by have := F.highDegree (cyclicAdvance F.x 3) omega - have hhxpos : 0 < hx := by - simpa [hx] using firstClockwiseNeighborOffset_pos_of_degree_pos hxdeg - have hbudget : gx + hx + 6 ≤ n := by - simpa [gx, hx] using first_neighbor_gap_cw_budget (v := F.x) + have hhxpos : 0 < hx := + firstClockwiseNeighborOffset_pos_of_degree_pos hxdeg + have hbudget : gx + hx + 6 ≤ n := + first_neighbor_gap_cw_budget (v := F.x) (F.highDegree F.x) - have hgtgx : gt ≤ gx := by - simpa [gt, gx] using F.maximalGap (cyclicAdvance F.x 3) + have hgtgx : gt ≤ gx := + F.maximalGap (cyclicAdvance F.x 3) have hb : b ≤ 2 := by have h := F.pair.first.coverBudget dsimp [b] @@ -570,10 +575,10 @@ theorem degree_le_six_of_short_arc have hxdeg : 0 < vertexDegree P d₁ d₂ d₃ F.x := by have := F.highDegree F.x omega - have hhxpos : 0 < hx := by - simpa [hx] using firstClockwiseNeighborOffset_pos_of_degree_pos hxdeg - have hbudget : gx + hx + 6 ≤ n := by - simpa [gx, hx] using first_neighbor_gap_cw_budget (v := F.x) + have hhxpos : 0 < hx := + firstClockwiseNeighborOffset_pos_of_degree_pos hxdeg + have hbudget : gx + hx + 6 ≤ n := + first_neighbor_gap_cw_budget (v := F.x) (F.highDegree F.x) have hzoffn : zoff < n := by dsimp [zoff] @@ -596,15 +601,15 @@ theorem degree_le_six_of_short_arc have hzg : gx ≤ zoff := by dsimp [zoff] omega - have hspanEq : (zoff : ℤ) - (gx : ℤ) = F.setup.yzSides := by - simpa [zoff, hx, gx] using F.localized_offset_span_eq_yzSides + have hspanEq : (zoff : ℤ) - (gx : ℤ) = F.setup.yzSides := + F.localized_offset_span_eq_yzSides have hspanInt : ((zoff - gx : ℕ) : ℤ) ≤ 5 := by rw [Nat.cast_sub hzg, hspanEq] exact hShort have hspan : zoff - gx ≤ 5 := by exact_mod_cast hspanInt - have hdegreeEq : N.card = vertexDegree P d₁ d₂ d₃ F.x := by - simpa [N] using ccwNeighborOffsets_card_eq_vertexDegree P d₁ d₂ d₃ F.x + have hdegreeEq : N.card = vertexDegree P d₁ d₂ d₃ F.x := + ccwNeighborOffsets_card_eq_vertexDegree P d₁ d₂ d₃ F.x rw [← hdegreeEq] omega diff --git a/LeanPool/Erdos132ConvexK3/GlobalClosure.lean b/LeanPool/Erdos132ConvexK3/GlobalClosure.lean index dd61a7ec61..d44cfb14aa 100644 --- a/LeanPool/Erdos132ConvexK3/GlobalClosure.lean +++ b/LeanPool/Erdos132ConvexK3/GlobalClosure.lean @@ -3,14 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.GlobalAssembly -import LeanPool.Erdos132ConvexK3.WordClosures -import Lean.Elab.Tactic.Omega -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +module + +public import LeanPool.Erdos132ConvexK3.GlobalAssembly +import LeanPool.Erdos132ConvexK3.Penultimate +import LeanPool.Erdos132ConvexK3.TailClosure +import Mathlib.Algebra.Order.Algebra +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Positivity.Finset /-! # Geometric closure of the thirteen global cover words @@ -23,6 +23,8 @@ reflected row-4 routes use the orientation-reversing isometry the original labelling. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 /-- Reflection in the horizontal axis. This preserves squared distances and @@ -105,14 +107,14 @@ private theorem chordDot_shared_tip (hes : sqDist e s = d) (hts : sqDist t s = d) : 2 * chordDot e t s = sqDist e t := by simp only [chordDot, sqDist] at * - nlinarith + linear_combination hes - hts private theorem chordDot_penultimate {e t w : Point ℝ} {d₁ d₂ : ℝ} (hew : sqDist e w = d₁) (htw : sqDist t w = d₂) : d₁ - d₂ = 2 * chordDot e t w - sqDist e t := by simp only [chordDot, sqDist] at * - nlinarith + linear_combination htw - hew private theorem chordDot_turn_identity (e t p : Point ℝ) : chordDot e t p ^ 2 + turn e t p ^ 2 = @@ -135,15 +137,15 @@ theorem penultimate_turn_lt_shared_tip have hdotW := chordDot_penultimate hew htw have hdotSPos : 0 < chordDot e t s := by linarith have hdotSLtW : chordDot e t s < chordDot e t w := by linarith - have hdotSq : chordDot e t s ^ 2 < chordDot e t w ^ 2 := by - nlinarith [sq_nonneg (chordDot e t w - chordDot e t s)] + have hdotSq : chordDot e t s ^ 2 < chordDot e t w ^ 2 := + (sq_lt_sq₀ hdotSPos.le (hdotSPos.trans hdotSLtW).le).mpr hdotSLtW have hlagrangeS := chordDot_turn_identity e t s have hlagrangeW := chordDot_turn_identity e t w have hturnSq : turn e t w ^ 2 < turn e t s ^ 2 := by rw [hes] at hlagrangeS rw [hew] at hlagrangeW - nlinarith - nlinarith [sq_nonneg (turn e t s - turn e t w)] + linarith only [hlagrangeS, hlagrangeW, hdotSq] + exact (sq_lt_sq₀ hw.le hs.le).mp hturnSq private theorem euclideanDist_eq_sqrt_of_sqDist_eq_global {a b : Point ℝ} {d : ℝ} (h : sqDist a b = d) : @@ -1423,10 +1425,9 @@ theorem two_cover_rank_endpoints sqDist (P (cyclicRetreat i (leftMoves + 1))) (P (cyclicAdvance j rightMoves)) := by simpa [cyclicRetreat_add, Nat.add_comm] using hTailGrow - rcases hStart.2 with hs₁ | hs₂ | hs₃ <;> - rcases hMid.2 with hm₁ | hm₂ | hm₃ <;> - rcases hEnd'.2 with he₁ | he₂ | he₃ <;> - constructor <;> linarith + have ranks := strict_three_rank_chain hd₃d₂ hd₂d₁ + hStart.2 hMid.2 hEnd'.2 hCover hTailGrow' + exact ⟨ranks.1, ranks.2.2⟩ | @right i' j' leftMoves rightMoves hCover tail => unfold IsRightCover at hCover have hd₃d₂ := hClasses.1 @@ -1443,10 +1444,9 @@ theorem two_cover_rank_endpoints sqDist (P (cyclicRetreat i leftMoves)) (P (cyclicAdvance j (rightMoves + 1))) := by simpa [cyclicAdvance_add, Nat.add_comm] using hTailGrow - rcases hStart.2 with hs₁ | hs₂ | hs₃ <;> - rcases hMid.2 with hm₁ | hm₂ | hm₃ <;> - rcases hEnd'.2 with he₁ | he₂ | he₃ <;> - constructor <;> linarith + have ranks := strict_three_rank_chain hd₃d₂ hd₂d₁ + hStart.2 hMid.2 hEnd'.2 hCover hTailGrow' + exact ⟨ranks.1, ranks.2.2⟩ end K3CoverSequence @@ -1472,19 +1472,8 @@ theorem right_left_cover_rank_ladder unfold IsLeftCover at h₁ have hMid := right_cover_top_three_adjacent hClasses hStart h₀ have hEnd := left_cover_top_three_adjacent hClasses hMid h₁ - have hd₃d₂ := hClasses.1 - have hd₂d₁ := hClasses.2.1 - have hEndRank : sqDist (P (cyclicRetreat i 1)) - (P (cyclicAdvance j 1)) = d₁ := - two_covers_end_at_d₁ hClasses hStart hMid hEnd h₀ h₁ - have hMidRank : sqDist (P i) (P (cyclicAdvance j 1)) = d₂ := by - rcases hMid.2 with hm₁ | hm₂ | hm₃ - · linarith - · exact hm₂ - · rcases hStart.2 with hs₁ | hs₂ | hs₃ <;> linarith - have hStartRank : sqDist (P i) (P j) = d₃ := by - rcases hStart.2 with hs₁ | hs₂ | hs₃ <;> linarith - exact ⟨hStartRank, hMidRank, hEndRank⟩ + exact strict_three_rank_chain hClasses.1 hClasses.2.1 + hStart.2 hMid.2 hEnd.2 h₀ h₁ /-- The opposite one-left/one-right order has the same rank ladder, with the middle edge obtained by retreating the left endpoint. -/ @@ -1506,19 +1495,8 @@ theorem left_right_cover_rank_ladder unfold IsRightCover at h₁ have hMid := left_cover_top_three_adjacent hClasses hStart h₀ have hEnd := right_cover_top_three_adjacent hClasses hMid h₁ - have hd₃d₂ := hClasses.1 - have hd₂d₁ := hClasses.2.1 - have hEndRank : sqDist (P (cyclicRetreat i 1)) - (P (cyclicAdvance j 1)) = d₁ := - two_covers_end_at_d₁ hClasses hStart hMid hEnd h₀ h₁ - have hMidRank : sqDist (P (cyclicRetreat i 1)) (P j) = d₂ := by - rcases hMid.2 with hm₁ | hm₂ | hm₃ - · linarith - · exact hm₂ - · rcases hStart.2 with hs₁ | hs₂ | hs₃ <;> linarith - have hStartRank : sqDist (P i) (P j) = d₃ := by - rcases hStart.2 with hs₁ | hs₂ | hs₃ <;> linarith - exact ⟨hStartRank, hMidRank, hEndRank⟩ + exact strict_three_rank_chain hClasses.1 hClasses.2.1 + hStart.2 hMid.2 hEnd.2 h₀ h₁ end K3CoverSequence diff --git a/LeanPool/Erdos132ConvexK3/GlobalReduction.lean b/LeanPool/Erdos132ConvexK3/GlobalReduction.lean index 1b3d9e898d..00503cd908 100644 --- a/LeanPool/Erdos132ConvexK3/GlobalReduction.lean +++ b/LeanPool/Erdos132ConvexK3/GlobalReduction.lean @@ -3,16 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.Basic -import LeanPool.Erdos132ConvexK3.Majorants -import LeanPool.Erdos132ConvexK3.RegressionWitnesses -import Lean.Elab.Tactic.Omega +module + +public import LeanPool.Erdos132ConvexK3.Majorants +public import LeanPool.Erdos132ConvexK3.RegressionWitnesses +public import Mathlib.Data.Finset.Max import Mathlib.Algebra.Group.Fin.Basic -import Mathlib.Data.Finset.Max +import Mathlib.Data.Rat.Cast.Order import Mathlib.Tactic.Abel -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Tauto +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Global ErLV reduction interface @@ -28,6 +30,8 @@ The number of such moves is therefore exactly the side-count convention used by `K3Majorant.leftMoves/rightMoves`. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 /-- Advance by `k` polygon sides in the fixed cyclic labelling. -/ @@ -364,6 +368,40 @@ theorem right_cover_top_three_adjacent TopThreeAdjacent P d₁ d₂ d₃ i (cyclicAdvance j 1) := top_three_adjacent_of_strictly_longer hClasses hAdj hCover +/-- Three increasing values drawn from three ordered ranks exhaust the ranks in order. -/ +theorem strict_three_rank_chain + {K : Type*} [LinearOrder K] {x y z d₁ d₂ d₃ : K} + (hd₃d₂ : d₃ < d₂) (hd₂d₁ : d₂ < d₁) + (hx : x = d₁ ∨ x = d₂ ∨ x = d₃) + (hy : y = d₁ ∨ y = d₂ ∨ y = d₃) + (hz : z = d₁ ∨ z = d₂ ∨ z = d₃) + (hxy : x < y) (hyz : y < z) : x = d₃ ∧ y = d₂ ∧ z = d₁ := by + have hxLower : d₃ ≤ x := by + rcases hx with rfl | rfl | rfl + · exact (hd₃d₂.trans hd₂d₁).le + · exact hd₃d₂.le + · exact le_rfl + have hzUpper : z ≤ d₁ := by + rcases hz with rfl | rfl | rfl + · exact le_rfl + · exact hd₂d₁.le + · exact (hd₃d₂.trans hd₂d₁).le + have hyEq : y = d₂ := by + rcases hy with rfl | hy | rfl + · exact (hyz.not_ge hzUpper).elim + · exact hy + · exact (hxy.not_ge hxLower).elim + subst y + refine ⟨?_, rfl, ?_⟩ + · rcases hx with rfl | rfl | hx + · exact (hd₂d₁.asymm hxy).elim + · exact (lt_irrefl _ hxy).elim + · exact hx + · rcases hz with hz | rfl | rfl + · exact hz + · exact (lt_irrefl _ hyz).elim + · exact (hd₃d₂.asymm hyz).elim + /-- Two strict cover moves among exactly three distance ranks must end in the largest class. -/ theorem two_covers_end_at_d₁ @@ -376,10 +414,8 @@ theorem two_covers_end_at_d₁ (hgrow₁ : sqDist (P i₀) (P j₀) < sqDist (P i₁) (P j₁)) (hgrow₂ : sqDist (P i₁) (P j₁) < sqDist (P i₂) (P j₂)) : sqDist (P i₂) (P j₂) = d₁ := by - rcases hClasses with ⟨hd₃d₂, hd₂d₁, _, _, _, _⟩ - rcases h₀.2 with h₀ | h₀ | h₀ <;> - rcases h₁.2 with h₁ | h₁ | h₁ <;> - rcases h₂.2 with h₂ | h₂ | h₂ <;> linarith + exact (strict_three_rank_chain hClasses.1 hClasses.2.1 + h₀.2 h₁.2 h₂.2 hgrow₁ hgrow₂).2.2 /-- A diameter-class edge is terminal for the cover process because every interpoint squared distance is at most `d₁`. -/ diff --git a/LeanPool/Erdos132ConvexK3/Lens.lean b/LeanPool/Erdos132ConvexK3/Lens.lean index b243a41307..630d12b150 100644 --- a/LeanPool/Erdos132ConvexK3/Lens.lean +++ b/LeanPool/Erdos132ConvexK3/Lens.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.Geometry -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring +module + +public import LeanPool.Erdos132ConvexK3.Basic +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! # The shared-diameter lens @@ -20,6 +25,8 @@ The P5-1 correction is explicit in the theorem statement: the lower point does not by itself supply `0 < X < 2c`; the diameter bound does. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 /-- The intersection of the two closed radius-`d₁` disks centered at @@ -37,11 +44,12 @@ theorem diameter_partner_abscissa 0 < X ∧ X < 2 * c := by have hHY : H * Y < 0 := mul_neg_of_pos_of_neg hH hY have hvertical : H ^ 2 < (H - Y) ^ 2 := by - nlinarith [sq_nonneg Y] + nlinarith only [hHY, sq_nonneg Y] have hxSq : (X - c) ^ 2 < c ^ 2 := by simp only [sqDist] at hdiameter - nlinarith - constructor <;> nlinarith [sq_nonneg X, sq_nonneg (X - 2 * c)] + nlinarith only [hdiameter, hvertical] + obtain ⟨hlower, hupper⟩ := abs_lt_of_sq_lt_sq' hxSq hc.le + constructor <;> linarith only [hlower, hupper] /-- Every point of the shared-diameter lens has ordinate at most that of the upper tip `(c,H)`. -/ @@ -51,13 +59,8 @@ theorem shared_diameter_lens_ordinate_le rcases hv with ⟨hleft, hright⟩ simp only [sqDist] at hleft hright have hradial : (x - c) ^ 2 + y ^ 2 ≤ H ^ 2 := by - nlinarith - by_contra hnot - have hy : H < y := lt_of_not_ge hnot - have hsum : 0 < y + H := by linarith - have hprod : 0 < (y - H) * (y + H) := - mul_pos (sub_pos.mpr hy) hsum - nlinarith [sq_nonneg (x - c)] + nlinarith only [hleft, hright] + exact le_of_sq_le_sq ((le_add_of_nonneg_left (sq_nonneg _)).trans hradial) hH /-- **Diameter-lens unique farthest point.** Let `P=(X,Y)` be below the center line and no farther than the diameter from the upper tip `s`. Then @@ -78,26 +81,27 @@ theorem diameter_lens_unique_farthest rcases hv with ⟨hleft, hright⟩ simp only [sqDist] at hleft hright ⊢ have hradial : (x - c) ^ 2 + y ^ 2 ≤ H ^ 2 := by - nlinarith + nlinarith only [hleft, hright] have hyNe : y ≠ H := by intro hy apply hne have hx : x = c := by - nlinarith [sq_nonneg (x - c)] + rw [hy, add_le_iff_nonpos_left] at hradial + exact sub_eq_zero.mp ((sq_nonpos_iff _).mp hradial) exact Prod.ext hx hy have hyLt : y < H := lt_of_le_of_ne hyLe hyNe have hA : 0 ≤ c ^ 2 + H ^ 2 - (x ^ 2 + y ^ 2) := by - nlinarith + simpa only [sub_zero] using sub_nonneg.mpr hleft have hB : 0 ≤ c ^ 2 + H ^ 2 - ((x - 2 * c) ^ 2 + y ^ 2) := by - nlinarith + simpa only [sub_zero] using sub_nonneg.mpr hright have htermA : 0 ≤ (2 * c - X) * (c ^ 2 + H ^ 2 - (x ^ 2 + y ^ 2)) := - mul_nonneg (by linarith) hA + mul_nonneg (sub_pos.mpr hX2).le hA have htermB : 0 ≤ X * (c ^ 2 + H ^ 2 - ((x - 2 * c) ^ 2 + y ^ 2)) := mul_nonneg hX0.le hB - have hcY : 0 < -4 * c * Y := by - nlinarith [mul_neg_of_pos_of_neg hc hY] + have hcY : 0 < -4 * c * Y := + mul_pos_of_neg_of_neg (mul_neg_of_neg_of_pos (by norm_num) hc) hY have htermY : 0 < (-4 * c * Y) * (H - y) := mul_pos hcY (sub_pos.mpr hyLt) have hidentity : @@ -113,7 +117,7 @@ theorem diameter_lens_unique_farthest (((c - X) ^ 2 + (H - Y) ^ 2) - ((x - X) ^ 2 + (y - Y) ^ 2)) := by rw [hidentity] - nlinarith - nlinarith + exact add_pos_of_nonneg_of_pos (add_nonneg htermA htermB) htermY + exact sub_pos.mp ((mul_pos_iff_of_pos_left (by positivity)).mp hscaled) end LeanPool.Erdos132ConvexK3 diff --git a/LeanPool/Erdos132ConvexK3/MajorantArcNesting.lean b/LeanPool/Erdos132ConvexK3/MajorantArcNesting.lean index 61ca68adfb..65d074cca2 100644 --- a/LeanPool/Erdos132ConvexK3/MajorantArcNesting.lean +++ b/LeanPool/Erdos132ConvexK3/MajorantArcNesting.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.GlobalReduction +module + +public import LeanPool.Erdos132ConvexK3.GlobalReduction import LeanPool.Erdos132ConvexK3.Geometry -import Lean.Elab.Tactic.Omega -import Mathlib.Order.Interval.Finset.Fin -import Mathlib.Tactic.Abel -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring +import Mathlib.Algebra.Order.Algebra +import Mathlib.Data.EReal.Inv /-! # ErLV majorant arc nesting @@ -21,6 +20,8 @@ convexity propagates those local inequalities to all four angles of their quadrilateral, contradicting `strict_convex_quad_not_all_acute`. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 theorem dot_comm (u v : Point ℝ) : dot u v = dot v u := by @@ -42,17 +43,10 @@ theorem dot_pos_of_sqDist_le theorem dot_self_pos_of_cross_pos_left {u v : Point ℝ} (hcross : 0 < cross u v) : 0 < dot u u := by - have h1 : 0 ≤ u.1 ^ 2 := sq_nonneg _ - have h2 : 0 ≤ u.2 ^ 2 := sq_nonneg _ - by_contra hn - have hle : dot u u ≤ 0 := le_of_not_gt hn - have hu1 : u.1 = 0 := by - simp [dot] at hle - nlinarith - have hu2 : u.2 = 0 := by - simp [dot] at hle - nlinarith - simp [cross, hu1, hu2] at hcross + have hu : (0, 0) ≠ u := by + rintro rfl + simp [cross] at hcross + simpa [dot, sqDist, pow_two] using sqDist_pos_of_ne hu theorem dot_self_pos_of_cross_pos_right {u v : Point ℝ} (hcross : 0 < cross u v) : 0 < dot v v := by @@ -76,9 +70,7 @@ theorem dot_pos_of_cross_between_left simp [cross, dot] ring rw [← hid] at hsum - rcases mul_pos_iff.mp hsum with hpos | hneg - · exact hpos.2 - · linarith + exact (mul_pos_iff_of_pos_left huv).mp hsum theorem dot_pos_of_cross_between_right {u w v : Point ℝ} @@ -94,9 +86,7 @@ theorem dot_pos_of_cross_between_right simp [cross, dot] ring rw [← hid] at hsum - rcases mul_pos_iff.mp hsum with hpos | hneg - · exact hpos.2 - · linarith + exact (mul_pos_iff_of_pos_left huv).mp hsum theorem cross_trans_of_common_half_plane {e u v w : Point ℝ} @@ -109,9 +99,7 @@ theorem cross_trans_of_common_half_plane simp [cross] ring rw [← hid] at hsum - rcases mul_pos_iff.mp hsum with hpos | hneg - · exact hpos.2 - · linarith + exact (mul_pos_iff_of_pos_left hev).mp hsum /-- Positive consecutive turns are transitive while the whole chain stays in one open half-plane. -/ @@ -642,15 +630,15 @@ theorem erlv_terminal_majorants_not_avoiding_of_offsets · have h := cyclic_strict_convex_turn_unwrapped hConvex base (a := vp) (b := sp) (c := v + n) hvsp (by omega) (by omega) rw [hperiodV] at h - simpa [turn, cross] using h + exact h · have h := cyclic_strict_convex_turn_unwrapped hConvex base (a := vp) (b := v + n) (c := vp - 1 + n) (by omega) (by omega) (by omega) rw [hperiodV, cyclicAdvance_period base (vp - 1)] at h - simpa [turn, cross] using h + exact h · have h := cyclic_strict_convex_turn_unwrapped hConvex base (a := vp) (b := sp) (c := vp - 1 + n) hvsp (by omega) (by omega) rw [cyclicAdvance_period base (vp - 1)] at h - simpa [turn, cross] using h + exact h · exact hSecondLeft have hb : 0 < dot (P (cyclicAdvance base vp) - P (cyclicAdvance base sp)) @@ -664,15 +652,15 @@ theorem erlv_terminal_majorants_not_avoiding_of_offsets (v := P (cyclicAdvance base vp) - P (cyclicAdvance base sp)) · have h := cyclic_strict_convex_turn_unwrapped hConvex base (a := sp) (b := sp + 1) (c := s) (by omega) hnextlt (by omega) - simpa [turn, cross] using h + exact h · have h := cyclic_strict_convex_turn_unwrapped hConvex base (a := sp) (b := s) (c := vp + n) hsps (by omega) (by omega) rw [hperiodVp] at h - simpa [turn, cross] using h + exact h · have h := cyclic_strict_convex_turn_unwrapped hConvex base (a := sp) (b := sp + 1) (c := vp + n) (by omega) (by omega) (by omega) rw [hperiodVp] at h - simpa [turn, cross] using h + exact h · rw [dot_comm] exact hSecondRight have hc : 0 < dot @@ -690,17 +678,17 @@ theorem erlv_terminal_majorants_not_avoiding_of_offsets have ht := cyclic_strict_convex_turn_unwrapped hConvex base (a := s) (b := v + n) (c := sp + n) (by omega) (by omega) (by omega) rw [hperiodV, hperiodSp] at ht - simpa [turn, cross] using ht) + exact ht) (by have ht := cyclic_strict_convex_turn_unwrapped hConvex base (a := s) (b := sp + n) (c := s - 1 + n) (by omega) (by omega) (by omega) rw [hperiodSp, cyclicAdvance_period base (s - 1)] at ht - simpa [turn, cross] using ht) + exact ht) (by have ht := cyclic_strict_convex_turn_unwrapped hConvex base (a := s) (b := v + n) (c := s - 1 + n) (by omega) (by omega) (by omega) rw [hperiodV, cyclicAdvance_period base (s - 1)] at ht - simpa [turn, cross] using ht) + exact ht) hFirstLeft rw [dot_comm] exact h @@ -716,13 +704,13 @@ theorem erlv_terminal_majorants_not_avoiding_of_offsets (v := P (cyclicAdvance base s) - P (cyclicAdvance base v)) · have h := cyclic_strict_convex_turn_unwrapped hConvex base (a := v) (b := v + 1) (c := vp) (by omega) hnextlt (by omega) - simpa [turn, cross] using h + exact h · have h := cyclic_strict_convex_turn_unwrapped hConvex base (a := v) (b := vp) (c := s) hvv (by omega) (by omega) - simpa [turn, cross] using h + exact h · have h := cyclic_strict_convex_turn_unwrapped hConvex base (a := v) (b := v + 1) (c := s) (by omega) (by omega) (by omega) - simpa [turn, cross] using h + exact h · rw [dot_comm] exact hFirstRight exact strict_convex_quad_not_all_acute hquad ha hb hc hd @@ -912,28 +900,20 @@ theorem erlv_terminal_majorants_not_avoiding (hdLocal : 0 < dot (c - d) (nd - d)) : False := by have ha : 0 < dot (b - a) (d - a) := dot_pos_of_cross_between_left (u := b - a) (w := d - a) (v := pa - a) - (by simpa [turn, cross] using haCone.1) - (by simpa [turn, cross] using haCone.2.1) - (by simpa [turn, cross] using haCone.2.2) haLocal + haCone.1 haCone.2.1 haCone.2.2 haLocal have hb : 0 < dot (a - b) (c - b) := dot_pos_of_cross_between_right (u := nb - b) (w := c - b) (v := a - b) - (by simpa [turn, cross] using hbCone.1) - (by simpa [turn, cross] using hbCone.2.1) - (by simpa [turn, cross] using hbCone.2.2) + hbCone.1 hbCone.2.1 hbCone.2.2 (by rw [dot_comm]; exact hbLocal) have hc : 0 < dot (b - c) (d - c) := by have h := dot_pos_of_cross_between_left (u := d - c) (w := b - c) (v := pc - c) - (by simpa [turn, cross] using hcCone.1) - (by simpa [turn, cross] using hcCone.2.1) - (by simpa [turn, cross] using hcCone.2.2) hcLocal + hcCone.1 hcCone.2.1 hcCone.2.2 hcLocal rw [dot_comm] exact h have hd : 0 < dot (c - d) (a - d) := dot_pos_of_cross_between_right (u := nd - d) (w := a - d) (v := c - d) - (by simpa [turn, cross] using hdCone.1) - (by simpa [turn, cross] using hdCone.2.1) - (by simpa [turn, cross] using hdCone.2.2) + hdCone.1 hdCone.2.1 hdCone.2.2 (by rw [dot_comm]; exact hdLocal) exact strict_convex_quad_not_all_acute hquad ha hb hc hd diff --git a/LeanPool/Erdos132ConvexK3/Majorants.lean b/LeanPool/Erdos132ConvexK3/Majorants.lean index d7a7baaf43..0480ee4ec4 100644 --- a/LeanPool/Erdos132ConvexK3/Majorants.lean +++ b/LeanPool/Erdos132ConvexK3/Majorants.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import Lean.Elab.Tactic.Omega +module + +public import Aesop.BuiltinRules +public import Mathlib.Data.Int.Notation +public import Mathlib.Data.Nat.Notation +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.ToDual +import Mathlib.Algebra.Order.Group.Unbundled.Basic import Mathlib.Algebra.Ring.Int.Defs -import Mathlib.Data.Nat.Cast.Order.Ring +import Mathlib.Data.Nat.Cast.Order.Basic +import Mathlib.Tactic.Bound.Init /-! # ErLV maximal-gap arithmetic for the convex three-distance argument @@ -20,6 +28,8 @@ Signed integers are used for arc differences. Thus the case `L < 0`, where `u` precedes `y` in unwrapped order, is represented rather than discarded. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 /-- Cover moves at the two ends of a `k = 3` majorant. diff --git a/LeanPool/Erdos132ConvexK3/MetricDichotomy.lean b/LeanPool/Erdos132ConvexK3/MetricDichotomy.lean index 71bebc49ca..954a6925b9 100644 --- a/LeanPool/Erdos132ConvexK3/MetricDichotomy.lean +++ b/LeanPool/Erdos132ConvexK3/MetricDichotomy.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.Penultimate -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +module + +public import Mathlib.Analysis.Real.Sqrt +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.EReal.Inv +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.LinearCombination +import Mathlib.Tactic.Positivity.Finset /-! # Metric/sign dichotomy @@ -18,6 +25,8 @@ applies uniformly to all four cross-color pairs. The two boundary radicals are retained as exact kernel inequalities. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 private lemma sqrt_three_sq : (Real.sqrt 3) ^ 2 = 3 := by @@ -125,20 +134,20 @@ theorem metric_dichotomy_range_one have hT : 1 < 2 * r + p := amgm_two_r_add_p_gt_one hr hβlo hβhi hβsq have hh_lt_one : h < 1 := by - nlinarith [sq_pos_of_pos hr] + nlinarith only [hhsq, sq_pos_of_pos hr] have hrp : 0 < r + p := by linarith have hk_lt_one : k < 1 := by - nlinarith [sq_pos_of_pos hrp] + nlinarith only [hksq, sq_pos_of_pos hrp] have hsum_lt : h + k < 2 := by linarith have hδproduct : δ * (h + k) = p * (2 * r + p) := by rw [hδdef] - nlinarith + linear_combination hhsq - hksq have hp_lt_twoδ : p < 2 * δ := by have hleft : 0 < δ * (2 - (h + k)) := mul_pos hδ (by linarith) have hright : 0 < p * ((2 * r + p) - 1) := mul_pos hp (by linarith) - nlinarith + linear_combination hleft + hright - hδproduct have hMpos : 0 < (1 - β) * (3 - 5 * β) := by exact mul_pos (by linarith) (by linarith) have hdenδ : 0 < 4 * δ := by positivity @@ -153,10 +162,10 @@ theorem metric_dichotomy_range_one apply div_lt_div_of_pos_left hMpos hdenp linarith have hfactor : (1 - β) * (1 + β) = 4 * r * p := by - nlinarith + linear_combination -hβsq have hfactor_div : (1 - β) / (2 * p) = (2 * r) / (1 + β) := by apply (div_eq_div_iff (by positivity) (by linarith)).2 - nlinarith [hfactor] + linear_combination hfactor have hidentity : ((1 - β) * (3 - 5 * β)) / (2 * p) = (2 * r) * ((3 - 5 * β) / (1 + β)) := by @@ -170,7 +179,7 @@ theorem metric_dichotomy_range_one have hscale : (2 * r) * ((3 - 5 * β) / (1 + β)) ≤ (3 - 5 * β) / (1 + β) := by - nlinarith [mul_nonneg (by linarith : 0 ≤ 1 - 2 * r) (le_of_lt hratio_pos)] + exact mul_le_of_le_one_left hratio_pos.le (by linarith only [hrhi]) have hradical := range_one_exact_radical_bound hβlo hβhi have hheight := normalized_height_lower hr hrhi hh hhsq calc @@ -250,7 +259,7 @@ private lemma normalized_height_plus_k_gt have hβhprod : 0 < (β - h) * (β + h) := mul_pos (sub_pos.mpr hβh) (by linarith) have hpquarter : p < r / 4 := by - nlinarith + nlinarith only [hβsq, hhsq, hβhprod, hr] have hkbound := normalized_k_lower hrhi hp hpquarter hk hksq have hTlt : 2 * r + p < (9 : ℝ) / 8 := by linarith @@ -272,15 +281,10 @@ private lemma normalized_delta_lt_p normalized_height_plus_k_gt hr hrhi hp hβsq hh hhsq hk hksq hβh have hδproduct : δ * (h + k) = p * (2 * r + p) := by rw [hδdef] - nlinarith - have hsumpos : 0 < h + k := by linarith - by_contra hnot - have hpδ : p ≤ δ := le_of_not_gt hnot - have hgap1 : 0 < p * ((h + k) - (2 * r + p)) := - mul_pos hp (by linarith) - have hgap2 : 0 ≤ (δ - p) * (h + k) := - mul_nonneg (sub_nonneg.mpr hpδ) (le_of_lt hsumpos) - nlinarith + linear_combination hhsq - hksq + apply (mul_lt_mul_iff_of_pos_right (add_pos hh hk)).mp + rw [hδproduct] + exact mul_lt_mul_of_pos_left hTsum hp private lemma normalized_ratio_lt_five_beta_sub_three {r β h : ℝ} @@ -326,8 +330,9 @@ private lemma normalized_range_three_core 4 * δ * (β - h) < -((1 - β) * (3 - 5 * β)) := by have hdiffDiv := normalized_beta_height_difference hβsq hh hhsq hβh have hden : 0 < β + h := by linarith - have hfirstCore : 4 * δ * (β - h) < 4 * p * (β - h) := by - nlinarith [mul_pos (sub_pos.mpr hδltp) (sub_pos.mpr hβh)] + have hfirstCore : 4 * δ * (β - h) < 4 * p * (β - h) := + mul_lt_mul_of_pos_right (mul_lt_mul_of_pos_left hδltp (by norm_num)) + (sub_pos.mpr hβh) have hinner : r * (r - 4 * p) / (β + h) < r * r / (β + h) := by apply (div_lt_div_iff_of_pos_right hden).2 @@ -392,7 +397,7 @@ theorem metric_dichotomy_range_three have hcore := normalized_range_three_core hr hp hβsq hh hhsq hβh hβlt1 hδltp hratio apply (div_lt_iff₀ (by positivity : 0 < 4 * δ)).2 - nlinarith + nlinarith only [hNltM, hcore] /-- Metric/sign dichotomy for one arbitrary full two-rung normalization. Equality belongs to the length branch; only strict failure enters the three diff --git a/LeanPool/Erdos132ConvexK3/Penultimate.lean b/LeanPool/Erdos132ConvexK3/Penultimate.lean index cc00727d89..f0d587773f 100644 --- a/LeanPool/Erdos132ConvexK3/Penultimate.lean +++ b/LeanPool/Erdos132ConvexK3/Penultimate.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.Lens -import Lean.Elab.Tactic.Omega -import Mathlib.Tactic.Linarith +module + +public import LeanPool.Erdos132ConvexK3.Basic +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Analysis.Normed.Field.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.ContinuousFunctionalCalculus import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Positivity.Finset /-! # Forced penultimate coordinates @@ -19,6 +24,8 @@ assumed. The previously implicit P5-4 height constraint is named and used explicitly in every distance-subtraction identity. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 /-- The two penultimate circle systems force `W+R=2c`, equal positive @@ -32,21 +39,18 @@ theorem forced_penultimate_mirror (hKw : 0 < K_w) (hKr : 0 < K_r) : W + R = 2 * c ∧ K_w = K_r ∧ A - B = 4 * c * (W - c) := by have hW : A - B = 4 * c * (W - c) := by - nlinarith + linear_combination hwB - hwA have hR : A - B = 4 * c * (c - R) := by - nlinarith + linear_combination hrB - hrA have hmul : 4 * c * (W + R - 2 * c) = 0 := by - nlinarith + linear_combination hR - hW have hc4 : 4 * c ≠ 0 := by positivity have hsum : W + R = 2 * c := by have hz : W + R - 2 * c = 0 := (mul_eq_zero.mp hmul).resolve_left hc4 - linarith + exact sub_eq_zero.mp hz have hsq : K_w ^ 2 = K_r ^ 2 := by - nlinarith - have hK : K_w = K_r := by - rcases sq_eq_sq_iff_eq_or_eq_neg.mp hsq with heq | heq - · exact heq - · nlinarith + linear_combination hwB - hrB - (W - 2 * c - R) * hsum + have hK : K_w = K_r := (sq_eq_sq₀ hKw.le hKr.le).mp hsq exact ⟨hsum, hK, hW⟩ /-- Canonical mirror-coordinate form with `d>0` when `A>B`. -/ @@ -62,13 +66,9 @@ theorem forced_penultimate_coordinates obtain ⟨hsum, hK, hclass⟩ := forced_penultimate_mirror hc hwA hwB hrB hrA hKw hKr let d := W - c - have hd : 0 < d := by - by_contra hnot - have hdle : d ≤ 0 := le_of_not_gt hnot - have hprod : 4 * c * d ≤ 0 := - mul_nonpos_of_nonneg_of_nonpos (by positivity) hdle - dsimp [d] at hprod - linarith + have hd : 0 < d := + (mul_pos_iff_of_pos_left (mul_pos (by norm_num) hc)).mp + (hclass ▸ sub_pos.mpr hBA) refine ⟨d, K_w, hd, ?_, ?_, rfl, hK.symm, ?_⟩ · simp [d] · dsimp [d] @@ -83,14 +83,14 @@ theorem forced_penultimate_height_constraint (hΔ : Δ = H - K) : 2 * c * d + d ^ 2 = Δ * (H + K) := by rw [hΔ] - nlinarith + linear_combination hradius /-- The exact P5-4 constraint in the draft parameterization `K=H-Δ`. -/ theorem forced_penultimate_height_constraint_reparam {c d H Δ : ℝ} (hradius : (c + d) ^ 2 + (H - Δ) ^ 2 = c ^ 2 + H ^ 2) : 2 * c * d + d ^ 2 = Δ * (H + (H - Δ)) := by - nlinarith + linear_combination hradius /-- Left penultimate subtraction identity, with P5-4 explicit. -/ theorem left_penultimate_distance_difference @@ -99,7 +99,7 @@ theorem left_penultimate_distance_difference sqDist (X, Y) (c + d, H - Δ) - sqDist (X, Y) (c, H) = -2 * d * X + 2 * Δ * Y := by simp only [sqDist] - nlinarith + linear_combination hconstraint /-- Right penultimate subtraction identity, with P5-4 explicit. -/ theorem right_penultimate_distance_difference @@ -108,7 +108,7 @@ theorem right_penultimate_distance_difference sqDist (X, Y) (c - d, H - Δ) - sqDist (X, Y) (c, H) = -2 * d * (2 * c - X) + 2 * Δ * Y := by simp only [sqDist] - nlinarith + linear_combination hconstraint /-- Ordinate of the nontrivial reflection of `(2c,0)` across the line through `(c,H)` and `(c+d,H-Δ)`. -/ @@ -120,8 +120,8 @@ above the lower chord. -/ theorem penultimate_reflection_ordinate_pos {c d H Δ : ℝ} (hd : 0 < d) (hconvex : c * Δ < H * d) : 0 < penultimateReflectionOrdinate c d H Δ := by - have hden : 0 < d ^ 2 + Δ ^ 2 := by - nlinarith [sq_pos_of_pos hd, sq_nonneg Δ] + have hden : 0 < d ^ 2 + Δ ^ 2 := + add_pos_of_pos_of_nonneg (sq_pos_of_pos hd) (sq_nonneg Δ) exact div_pos (mul_pos (mul_pos (by norm_num) hd) (sub_pos.mpr hconvex)) hden /-- The two circle equations have the known intersection `(2c,0)`; every @@ -137,10 +137,10 @@ theorem penultimate_nontrivial_intersection_ordinate Y = penultimateReflectionOrdinate c d H Δ := by have hS : X ^ 2 + Y ^ 2 - 2 * c * X - 2 * H * Y = 0 := by simp only [sqDist] at hcircleS - nlinarith + linear_combination hcircleS have hline : d * (X - 2 * c) = Δ * Y := by - simp only [sqDist] at hcircleW - nlinarith [hcircleS] + simp only [sqDist] at hcircleS hcircleW + linear_combination (hcircleS - hcircleW) / 2 have hY : Y ≠ 0 := by intro hYzero have hX : X = 2 * c := by @@ -156,10 +156,10 @@ theorem penultimate_nontrivial_intersection_ordinate have hlinear : (d ^ 2 + Δ ^ 2) * Y = 2 * d * (H * d - c * Δ) := by exact sub_eq_zero.mp ((mul_eq_zero.mp hfactor).resolve_left hY) - have hden : d ^ 2 + Δ ^ 2 ≠ 0 := by - nlinarith [sq_pos_of_pos hd, sq_nonneg Δ] + have hden : d ^ 2 + Δ ^ 2 ≠ 0 := + ne_of_gt (add_pos_of_pos_of_nonneg (sq_pos_of_pos hd) (sq_nonneg Δ)) rw [penultimateReflectionOrdinate] - exact (eq_div_iff hden).2 (by nlinarith) + exact (eq_div_iff hden).2 (by rwa [mul_comm]) /-- With the polygon-order sign `Hd>cΔ`, the nontrivial circle intersection is above the lower chord; the known intersection is `(2c,0)`. -/ diff --git a/LeanPool/Erdos132ConvexK3/RegressionWitnesses.lean b/LeanPool/Erdos132ConvexK3/RegressionWitnesses.lean index 2ad1ec8db5..6b7e9a1100 100644 --- a/LeanPool/Erdos132ConvexK3/RegressionWitnesses.lean +++ b/LeanPool/Erdos132ConvexK3/RegressionWitnesses.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.Basic -import Mathlib.Data.Fin.VecNotation -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.NormNum +module + +public import LeanPool.Erdos132ConvexK3.Basic +public import Mathlib.Data.Fin.VecNotation /-! # Exact rational regression witnesses @@ -16,6 +16,8 @@ Kernel-reduced checks for the three configurations used during the convex regressions use them without importing the closure stack. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3.Witnesses open LeanPool.Erdos132ConvexK3 @@ -25,25 +27,13 @@ def heptagon : Fin 7 → Point ℚ := ![(0, 0), (72, 0), (45, 68), (40, 75), (36, 77), (32, 75), (27, 68)] theorem heptagon_strict_convex : CyclicStrictConvex heptagon := by - intro i j hji hjnext - fin_cases i <;> fin_cases j - all_goals norm_num [cyclicNext, Fin.add_def, heptagon, turn] at * + unfold CyclicStrictConvex + decide +kernel theorem heptagon_top_three : HasTopThreeDistanceClasses heptagon 7225 6649 5353 := by - refine ⟨by norm_num, by norm_num, ?_, ?_, ?_, ?_⟩ - · refine ⟨(0, 3), by decide, ?_⟩ - change ((40 : ℚ) - 0) ^ 2 + (75 - 0) ^ 2 = 7225 - norm_num - · refine ⟨(0, 2), by decide, ?_⟩ - change ((45 : ℚ) - 0) ^ 2 + (68 - 0) ^ 2 = 6649 - norm_num - · refine ⟨(0, 6), by decide, ?_⟩ - change ((27 : ℚ) - 0) ^ 2 + (68 - 0) ^ 2 = 5353 - norm_num - · rintro ⟨i, j⟩ hij - fin_cases i <;> fin_cases j - all_goals norm_num [unorderedPairList, heptagon, sqDist] at * + unfold HasTopThreeDistanceClasses + decide +kernel theorem heptagon_double_ladder : sqDist (heptagon 0) (heptagon 6) = 5353 ∧ @@ -52,23 +42,10 @@ theorem heptagon_double_ladder : sqDist (heptagon 1) (heptagon 2) = 5353 ∧ sqDist (heptagon 1) (heptagon 3) = 6649 ∧ sqDist (heptagon 1) (heptagon 4) = 7225 := by - change - ((27 : ℚ) - 0) ^ 2 + (68 - 0) ^ 2 = 5353 ∧ - ((32 : ℚ) - 0) ^ 2 + (75 - 0) ^ 2 = 6649 ∧ - ((36 : ℚ) - 0) ^ 2 + (77 - 0) ^ 2 = 7225 ∧ - ((45 : ℚ) - 72) ^ 2 + (68 - 0) ^ 2 = 5353 ∧ - ((40 : ℚ) - 72) ^ 2 + (75 - 0) ^ 2 = 6649 ∧ - ((36 : ℚ) - 72) ^ 2 + (77 - 0) ^ 2 = 7225 - norm_num + decide +kernel theorem heptagon_x_degree : vertexDegree heptagon 7225 6649 5353 0 = 5 := by - calc - vertexDegree heptagon 7225 6649 5353 0 = - ({2, 3, 4, 5, 6} : Finset (Fin 7)).card := by - apply vertexDegree_eq_of_neighbors - intro j - fin_cases j <;> norm_num [heptagon, sqDist] - _ = 5 := by decide + decide +kernel /-- Attempt 3's exact nine-point low-altitude insertion witness. -/ def ninePoint : Fin 9 → Point ℚ := @@ -76,44 +53,18 @@ def ninePoint : Fin 9 → Point ℚ := (300, 875), (285, 880), (270, 875), (261, 862)] theorem ninePoint_strict_convex : CyclicStrictConvex ninePoint := by - intro i j hji hjnext - fin_cases i <;> fin_cases j - all_goals norm_num [cyclicNext, Fin.add_def, ninePoint, turn] at * + unfold CyclicStrictConvex + decide +kernel theorem ninePoint_top_three : HasTopThreeDistanceClasses ninePoint 855625 838525 811165 := by - refine ⟨by norm_num, by norm_num, ?_, ?_, ?_, ?_⟩ - · refine ⟨(0, 6), by decide, ?_⟩ - change ((285 : ℚ) - 0) ^ 2 + (880 - 0) ^ 2 = 855625 - norm_num - · refine ⟨(0, 7), by decide, ?_⟩ - change ((270 : ℚ) - 0) ^ 2 + (875 - 0) ^ 2 = 838525 - norm_num - · refine ⟨(0, 8), by decide, ?_⟩ - change ((261 : ℚ) - 0) ^ 2 + (862 - 0) ^ 2 = 811165 - norm_num - · rintro ⟨i, j⟩ hij - fin_cases i <;> fin_cases j - all_goals norm_num [unorderedPairList, ninePoint, sqDist] at * + unfold HasTopThreeDistanceClasses + decide +kernel theorem ninePoint_insertions_isolated : vertexDegree ninePoint 855625 838525 811165 1 = 0 ∧ vertexDegree ninePoint 855625 838525 811165 2 = 0 := by - constructor - · calc - vertexDegree ninePoint 855625 838525 811165 1 = - (∅ : Finset (Fin 9)).card := by - apply vertexDegree_eq_of_neighbors - intro j - fin_cases j <;> simp [ninePoint, sqDist] <;> norm_num - _ = 0 := rfl - · calc - vertexDegree ninePoint 855625 838525 811165 2 = - (∅ : Finset (Fin 9)).card := by - apply vertexDegree_eq_of_neighbors - intro j - fin_cases j <;> simp [ninePoint, sqDist] <;> norm_num - _ = 0 := rfl + decide +kernel /-- A second exact rational hexagon, in positive cyclic order. -/ def rationalHexagon : Fin 6 → Point ℚ := @@ -125,27 +76,14 @@ def rationalHexagon : Fin 6 → Point ℚ := (-1, 0)] theorem rationalHexagon_strict_convex : CyclicStrictConvex rationalHexagon := by - intro i j hji hjnext - fin_cases i <;> fin_cases j - all_goals norm_num [cyclicNext, Fin.add_def, rationalHexagon, turn] at * + unfold CyclicStrictConvex + decide +kernel theorem rationalHexagon_top_three : HasTopThreeDistanceClasses rationalHexagon (96661 / 229) 401 (2776265163521 / 6927250000) := by - refine ⟨by norm_num, by norm_num, ?_, ?_, ?_, ?_⟩ - · refine ⟨(3, 5), by decide, ?_⟩ - change ((-1 : ℚ) - 1208 / 229) ^ 2 + (0 - (-(4480 / 229))) ^ 2 = 96661 / 229 - norm_num - · refine ⟨(0, 5), by decide, ?_⟩ - change ((-1 : ℚ) - 0) ^ 2 + (0 - (-20)) ^ 2 = 401 - norm_num - · refine ⟨(2, 5), by decide, ?_⟩ - change ((-1 : ℚ) - 48331 / 50380) ^ 2 + - (0 - (-(12546661 / 629750))) ^ 2 = 2776265163521 / 6927250000 - norm_num - · rintro ⟨i, j⟩ hij - fin_cases i <;> fin_cases j - all_goals norm_num [unorderedPairList, rationalHexagon, sqDist] at * + unfold HasTopThreeDistanceClasses + decide +kernel theorem rationalHexagon_key_edges : sqDist (rationalHexagon 3) (rationalHexagon 5) = 96661 / 229 ∧ @@ -154,36 +92,13 @@ theorem rationalHexagon_key_edges : sqDist (rationalHexagon 0) (rationalHexagon 4) = 401 ∧ sqDist (rationalHexagon 2) (rationalHexagon 5) = 2776265163521 / 6927250000 := by - change - ((-1 : ℚ) - 1208 / 229) ^ 2 + (0 - (-(4480 / 229))) ^ 2 = 96661 / 229 ∧ - ((-1 : ℚ) - 0) ^ 2 + (0 - (-20)) ^ 2 = 401 ∧ - ((1 : ℚ) - 1208 / 229) ^ 2 + (0 - (-(4480 / 229))) ^ 2 = 401 ∧ - ((1 : ℚ) - 0) ^ 2 + (0 - (-20)) ^ 2 = 401 ∧ - ((-1 : ℚ) - 48331 / 50380) ^ 2 + - (0 - (-(12546661 / 629750))) ^ 2 = 2776265163521 / 6927250000 - norm_num + decide +kernel theorem rationalHexagon_lower_degrees : vertexDegree rationalHexagon (96661 / 229) 401 (2776265163521 / 6927250000) 1 = 0 ∧ vertexDegree rationalHexagon (96661 / 229) 401 (2776265163521 / 6927250000) 2 = 1 := by - constructor - · calc - vertexDegree rationalHexagon - (96661 / 229) 401 (2776265163521 / 6927250000) 1 = - (∅ : Finset (Fin 6)).card := by - apply vertexDegree_eq_of_neighbors - intro j - fin_cases j <;> simp [rationalHexagon, sqDist] <;> norm_num - _ = 0 := rfl - · calc - vertexDegree rationalHexagon - (96661 / 229) 401 (2776265163521 / 6927250000) 2 = - ({5} : Finset (Fin 6)).card := by - apply vertexDegree_eq_of_neighbors - intro j - fin_cases j <;> simp [rationalHexagon, sqDist] <;> norm_num - _ = 1 := by decide + decide +kernel end LeanPool.Erdos132ConvexK3.Witnesses diff --git a/LeanPool/Erdos132ConvexK3/ResidualBounds.lean b/LeanPool/Erdos132ConvexK3/ResidualBounds.lean index 44bcce3ce5..5afe7eeff2 100644 --- a/LeanPool/Erdos132ConvexK3/ResidualBounds.lean +++ b/LeanPool/Erdos132ConvexK3/ResidualBounds.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.MetricDichotomy -import Lean.Elab.Tactic.Omega -import Mathlib.Tactic.Linarith +module + +public import LeanPool.Erdos132ConvexK3.Basic +import LeanPool.Erdos132ConvexK3.Geometry +import Mathlib.Algebra.Order.Algebra +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Positivity.Finset /-! # Residual one-sided and four-edge bounds @@ -17,6 +21,8 @@ penultimate anti-saturation step, and the two metric regimes of the conditional four-edge cage. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 /-- A fixed pair of radii contributes at most one point in one open diff --git a/LeanPool/Erdos132ConvexK3/TailClosure.lean b/LeanPool/Erdos132ConvexK3/TailClosure.lean index 6ab0caf1c2..9fc39a9fd4 100644 --- a/LeanPool/Erdos132ConvexK3/TailClosure.lean +++ b/LeanPool/Erdos132ConvexK3/TailClosure.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.UseSite -import Lean.Elab.Tactic.Omega -import Mathlib.Tactic.Linarith +module + +public import LeanPool.Erdos132ConvexK3.UseSite +public import LeanPool.Erdos132ConvexK3.Geometry +import Mathlib.Algebra.Order.Algebra +import Mathlib.Data.EReal.Inv /-! # Maximal-gap tail closure @@ -18,6 +21,8 @@ and same-half-plane two-circle uniqueness leave at most two tail slots (one under the strict anchor). -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 /-- Strict cyclic convexity makes the labelled boundary map injective. -/ @@ -144,11 +149,8 @@ distances. -/ theorem euclideanDist_eq_of_sqDist_eq {a b c d : Point ℝ} (h : sqDist a b = sqDist c d) : euclideanDist a b = euclideanDist c d := by - have habSq := euclideanDist_sq a b - have hcdSq := euclideanDist_sq c d - have habNonneg : 0 ≤ euclideanDist a b := dist_nonneg - have hcdNonneg : 0 ≤ euclideanDist c d := dist_nonneg - nlinarith + rw [← euclideanDist_sq, ← euclideanDist_sq] at h + exact (sq_eq_sq₀ dist_nonneg dist_nonneg).mp h /-- The second strict edge--diagonal inequality, obtained by rotating the four cyclic vertices once. -/ @@ -174,18 +176,13 @@ theorem far_arc_strict_center_comparison {x p u r : Point ℝ} (hquad : StrictConvexQuad x p u r) (hanchor : sqDist x u ≤ sqDist p u) : sqDist x r < sqDist p r := by have hed := edge_diagonal_inequality_rotated hquad - have hxuSq := euclideanDist_sq x u - have hpuSq := euclideanDist_sq p u - have hxrSq := euclideanDist_sq x r - have hprSq := euclideanDist_sq p r - have hxuNonneg : 0 ≤ euclideanDist x u := dist_nonneg - have hpuNonneg : 0 ≤ euclideanDist p u := dist_nonneg - have hxrNonneg : 0 ≤ euclideanDist x r := dist_nonneg - have hprNonneg : 0 ≤ euclideanDist p r := dist_nonneg have hxuLe : euclideanDist x u ≤ euclideanDist p u := by - nlinarith - have hdist : euclideanDist x r < euclideanDist p r := by linarith - nlinarith + rw [← euclideanDist_sq, ← euclideanDist_sq] at hanchor + exact (sq_le_sq₀ dist_nonneg dist_nonneg).mp hanchor + have hdist : euclideanDist x r < euclideanDist p r := by + linarith only [hed, hxuLe] + rw [← euclideanDist_sq, ← euclideanDist_sq] + exact (sq_lt_sq₀ dist_nonneg dist_nonneg).mpr hdist /-- With exactly three ranked distances, a strict comparison has only the three ordered radius slots used in the project proof draft. -/ @@ -243,7 +240,7 @@ private theorem d3_d1_tail_slot_empty d₁ = sqDist (P p) (P (cyclicAdvance S.x k.val)) := hkSlot.2.2.symm _ = sqDist (P p) (P z) := by rw [hrz] _ = d₂ := hpz - linarith [S.classes.2.1] + exact (ne_of_gt S.classes.2.1) hd₁d₂ · have hkltz : k.val < zoff := by omega have hquad := cyclic_strict_convex_quad_zero_offsets S.convex S.x (b := 1) (c := k.val) (d := zoff) (by omega) @@ -259,16 +256,15 @@ private theorem d3_d1_tail_slot_empty euclideanDist (P S.x) (P (cyclicAdvance S.x k.val)) := euclideanDist_eq_of_sqDist_eq (hxz.trans hkSlot.2.1.symm) have hdist : euclideanDist (P p) (P (cyclicAdvance S.x k.val)) < - euclideanDist (P p) (P z) := by linarith - have hprSq := euclideanDist_sq (P p) (P (cyclicAdvance S.x k.val)) - have hpzSq := euclideanDist_sq (P p) (P z) - have hprNonneg : 0 ≤ euclideanDist (P p) - (P (cyclicAdvance S.x k.val)) := dist_nonneg - have hpzNonneg : 0 ≤ euclideanDist (P p) (P z) := dist_nonneg + euclideanDist (P p) (P z) := by + rw [hsameD₃] at hed' + exact (add_lt_add_iff_right _).mp hed' have hsquared : sqDist (P p) (P (cyclicAdvance S.x k.val)) < - sqDist (P p) (P z) := by nlinarith + sqDist (P p) (P z) := by + rw [← euclideanDist_sq, ← euclideanDist_sq] + exact (sq_lt_sq₀ dist_nonneg dist_nonneg).mpr hdist rw [hkSlot.2.2, hpz] at hsquared - linarith [S.classes.2.1] + exact (not_lt_of_gt S.classes.2.1) hsquared /-- **Maximal-gap tail lemma (project proof-draft Lemma 4.1).** Suppose `p = x + 1`, `u` is the first counterclockwise neighbor of `x + 3`, and `z` is the first @@ -553,24 +549,20 @@ theorem d1_d3_opposite_sides_force_xu_top_two (hpz : sqDist (P p) (P z) = d₂) : sqDist (P x) (P u) = d₁ ∨ sqDist (P x) (P u) = d₂ := by have hed := edge_diagonal_inequality_rotated hquad - have hpuSq := euclideanDist_sq (P p) (P u) - have hpzSq := euclideanDist_sq (P p) (P z) - have hpuNonneg : 0 ≤ euclideanDist (P p) (P u) := dist_nonneg - have hpzNonneg : 0 ≤ euclideanDist (P p) (P z) := dist_nonneg have hpzLtPu : euclideanDist (P p) (P z) < euclideanDist (P p) (P u) := by - nlinarith [hClasses.2.1] + rw [← sq_lt_sq₀ (show 0 ≤ euclideanDist (P p) (P z) from dist_nonneg) + (show 0 ≤ euclideanDist (P p) (P u) from dist_nonneg)] + simpa only [euclideanDist_sq, hpz, hpu] using hClasses.2.1 have hxzLtXu : euclideanDist (P x) (P z) < euclideanDist (P x) (P u) := by - linarith - have hxzSq := euclideanDist_sq (P x) (P z) - have hxuSq := euclideanDist_sq (P x) (P u) - have hxzNonneg : 0 ≤ euclideanDist (P x) (P z) := dist_nonneg - have hxuNonneg : 0 ≤ euclideanDist (P x) (P u) := dist_nonneg - have hsqGrow : sqDist (P x) (P z) < sqDist (P x) (P u) := by nlinarith + linarith only [hed, hpzLtPu] + have hsqGrow : sqDist (P x) (P z) < sqDist (P x) (P u) := by + rw [← euclideanDist_sq, ← euclideanDist_sq] + exact (sq_lt_sq₀ dist_nonneg dist_nonneg).mpr hxzLtXu have hxuAdj := top_three_adjacent_of_strictly_longer hClasses hxzAdj hsqGrow rcases hxuAdj.2 with h₁ | h₂ | h₃ · exact Or.inl h₁ · exact Or.inr h₂ - · linarith + · exact (ne_of_lt hsqGrow (hxz.trans h₃.symm)).elim /-- The rigid `(2,2)` ladders supply every hypothesis of the tail lemma and force `xu` into one of its two clauses. -/ diff --git a/LeanPool/Erdos132ConvexK3/TerminalCage.lean b/LeanPool/Erdos132ConvexK3/TerminalCage.lean index c1307ed799..d87cd7e5ff 100644 --- a/LeanPool/Erdos132ConvexK3/TerminalCage.lean +++ b/LeanPool/Erdos132ConvexK3/TerminalCage.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132ConvexK3.ResidualBounds -import Lean.Elab.Tactic.Omega -import Mathlib.Tactic.Linarith +module + +public import Mathlib.Basic.Real.Basic +import LeanPool.Erdos132ConvexK3.MetricDichotomy +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.EReal.Inv +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset /-! # Terminal d2-cage @@ -16,6 +25,8 @@ The finite branch counts are kept explicit, so the equality and `q=d₃` boundaries cannot disappear inside prose. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 /-- The first inequality in (6.10), together with `q≤d₂`, gives `Vw fin_cases j - all_goals norm_num [unorderedPairList, terminalWordPoints, sqDist] at * + all_goals norm_num [terminalWordPoints, sqDist] at * private def terminalWordGeometry : Row1B32WordRealization terminalWordPoints @@ -156,8 +166,9 @@ private theorem sharedTipPoints_top_three : · refine ⟨(1, 4), by decide, ?_⟩ norm_num [sharedTipPoints, sqDist] · rintro ⟨i, j⟩ hij + rw [mem_unorderedPairList_iff] at hij fin_cases i <;> fin_cases j - all_goals norm_num [unorderedPairList, sharedTipPoints, sqDist] at * + all_goals norm_num [sharedTipPoints, sqDist] at * private def onePenultimateGeometry : OnePenultimateWordGeometry sharedTipPoints 2112500 1748500 1732250 := { @@ -389,8 +400,9 @@ private theorem fourEdgePoints_top_three : · refine ⟨(0, 3), by decide, ?_⟩ norm_num [fourEdgePoints, sqDist] · rintro ⟨i, j⟩ hij + rw [mem_unorderedPairList_iff] at hij fin_cases i <;> fin_cases j - all_goals norm_num [unorderedPairList, fourEdgePoints, sqDist] at * + all_goals norm_num [fourEdgePoints, sqDist] at * private def fourEdgeFirstLeft : FourEdgeBranchGeometry fourEdgePoints 2112500 1 0 4 := { diff --git a/LeanPool/Erdos132ConvexK3/WordClosures.lean b/LeanPool/Erdos132ConvexK3/WordClosures.lean index 5ac4e681d6..855850cff0 100644 --- a/LeanPool/Erdos132ConvexK3/WordClosures.lean +++ b/LeanPool/Erdos132ConvexK3/WordClosures.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module + +public import LeanPool.Erdos132ConvexK3.Basic +public import Mathlib.Analysis.Real.Sqrt +import LeanPool.Erdos132ConvexK3.Geometry +import LeanPool.Erdos132ConvexK3.Lens +import LeanPool.Erdos132ConvexK3.MetricDichotomy +import LeanPool.Erdos132ConvexK3.Penultimate +import LeanPool.Erdos132ConvexK3.ResidualBounds import LeanPool.Erdos132ConvexK3.TerminalCage -import Lean.Elab.Tactic.Omega -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +import Mathlib.Algebra.Order.Algebra +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Positivity.Finset /-! # Raw geometric exceptional-word closures @@ -20,6 +26,8 @@ quadrilateral and half-plane facts, and pointwise arc partitions. All degree and cardinality bounds are conclusions of the theorems below. -/ +@[expose] public section + namespace LeanPool.Erdos132ConvexK3 /-- Translate the first center to the origin and rotate the directed center @@ -55,27 +63,12 @@ private theorem normalizeAlong_snd_sub theorem normalizeAlong_sqDist {a b : Point ℝ} (hab : a ≠ b) (p q : Point ℝ) : sqDist (normalizeAlong a b p) (normalizeAlong a b q) = sqDist p q := by - have hscale := normalizeAlong_scale_pos hab - have hscaleSq := Real.sq_sqrt (sqDist_nonneg a b) change ((normalizeAlong a b q).1 - (normalizeAlong a b p).1) ^ 2 + ((normalizeAlong a b q).2 - (normalizeAlong a b p).2) ^ 2 = sqDist p q - rw [normalizeAlong_fst_sub, normalizeAlong_snd_sub] - have hid : - (((q.1 - p.1) * (b.1 - a.1) + (q.2 - p.2) * (b.2 - a.2)) ^ 2 + - ((b.1 - a.1) * (q.2 - p.2) - (b.2 - a.2) * (q.1 - p.1)) ^ 2) = - sqDist a b * ((q.1 - p.1) ^ 2 + (q.2 - p.2) ^ 2) := by - simp only [sqDist] - ring - calc - _ = ((((q.1 - p.1) * (b.1 - a.1) + (q.2 - p.2) * (b.2 - a.2)) ^ 2 + - ((b.1 - a.1) * (q.2 - p.2) - (b.2 - a.2) * (q.1 - p.1)) ^ 2) / - Real.sqrt (sqDist a b) ^ 2) := by ring - _ = (sqDist a b * ((q.1 - p.1) ^ 2 + (q.2 - p.2) ^ 2)) / - Real.sqrt (sqDist a b) ^ 2 := by rw [hid] - _ = (q.1 - p.1) ^ 2 + (q.2 - p.2) ^ 2 := by - rw [hscaleSq] - field_simp [ne_of_gt (sqDist_pos_of_ne hab)] - _ = sqDist p q := by simp only [sqDist] + rw [normalizeAlong_fst_sub, normalizeAlong_snd_sub, div_pow, div_pow, ← add_div, + Real.sq_sqrt (sqDist_nonneg a b), div_eq_iff (sqDist_pos_of_ne hab).ne'] + dsimp only [sqDist] + ring private theorem normalizeAlong_injective {a b : Point ℝ} (hab : a ≠ b) : Function.Injective (normalizeAlong a b) := by @@ -93,37 +86,16 @@ theorem normalizeAlong_turn {a b : Point ℝ} (hab : a ≠ b) (p q r : Point ℝ) : turn (normalizeAlong a b p) (normalizeAlong a b q) (normalizeAlong a b r) = turn p q r := by - have hscale := normalizeAlong_scale_pos hab - have hscaleSq := Real.sq_sqrt (sqDist_nonneg a b) change ((normalizeAlong a b q).1 - (normalizeAlong a b p).1) * ((normalizeAlong a b r).2 - (normalizeAlong a b p).2) - ((normalizeAlong a b q).2 - (normalizeAlong a b p).2) * ((normalizeAlong a b r).1 - (normalizeAlong a b p).1) = turn p q r rw [normalizeAlong_fst_sub, normalizeAlong_snd_sub, - normalizeAlong_fst_sub, normalizeAlong_snd_sub] - have hid : - (((q.1 - p.1) * (b.1 - a.1) + (q.2 - p.2) * (b.2 - a.2)) * - ((b.1 - a.1) * (r.2 - p.2) - (b.2 - a.2) * (r.1 - p.1)) - - ((b.1 - a.1) * (q.2 - p.2) - (b.2 - a.2) * (q.1 - p.1)) * - ((r.1 - p.1) * (b.1 - a.1) + (r.2 - p.2) * (b.2 - a.2))) = - sqDist a b * ((q.1 - p.1) * (r.2 - p.2) - - (q.2 - p.2) * (r.1 - p.1)) := by - simp only [sqDist] - ring - calc - _ = ((((q.1 - p.1) * (b.1 - a.1) + (q.2 - p.2) * (b.2 - a.2)) * - ((b.1 - a.1) * (r.2 - p.2) - (b.2 - a.2) * (r.1 - p.1)) - - ((b.1 - a.1) * (q.2 - p.2) - (b.2 - a.2) * (q.1 - p.1)) * - ((r.1 - p.1) * (b.1 - a.1) + (r.2 - p.2) * (b.2 - a.2))) / - Real.sqrt (sqDist a b) ^ 2) := by ring - _ = (sqDist a b * ((q.1 - p.1) * (r.2 - p.2) - - (q.2 - p.2) * (r.1 - p.1))) / Real.sqrt (sqDist a b) ^ 2 := by - rw [hid] - _ = (q.1 - p.1) * (r.2 - p.2) - - (q.2 - p.2) * (r.1 - p.1) := by - rw [hscaleSq] - field_simp [ne_of_gt (sqDist_pos_of_ne hab)] - _ = turn p q r := by simp only [turn] + normalizeAlong_fst_sub, normalizeAlong_snd_sub, + div_mul_div_comm, div_mul_div_comm, ← sub_div, ← pow_two, + Real.sq_sqrt (sqDist_nonneg a b), div_eq_iff (sqDist_pos_of_ne hab).ne'] + dsimp only [sqDist, turn] + ring private theorem normalizeAlong_first_center {a b : Point ℝ} (hab : a ≠ b) : @@ -965,7 +937,7 @@ private theorem shared_tip_unique_farthest rw [he] at hesN rw [ht] at htsN simp only [sqDist] at hesN htsN - nlinarith + nlinarith only [hc, hesN, htsN] have hs : N s = (c, H) := Prod.ext hsFirst rfl have hH : 0 < H := by have hsecond := normalizeAlong_second_coordinate hcenters (P s) @@ -1885,7 +1857,7 @@ private theorem fullTwoRungCanonicalFrame_exists rw [he] at hesN rw [ht] at htsN simp only [sqDist] at hesN htsN - nlinarith + nlinarith only [hc, hesN, htsN] have hs : N G.s = (c, H) := Prod.ext hsFirst rfl have hH : 0 < H := by have hsecond := normalizeAlong_second_coordinate hcenters (P G.s) @@ -1975,10 +1947,8 @@ private theorem fullTwoRungCanonicalFrame_exists rw [hscaleSq] exact hbaseLeRaw have hradius : (c + offset) ^ 2 + K ^ 2 = c ^ 2 + H ^ 2 := by - rw [hw] at hewN - rw [he] at hewN - simp only [sqDist] at hewN - nlinarith [hd₁Radius] + rw [hw, he] at hewN + simpa only [sqDist, sub_zero] using hewN.trans hd₁Radius have hconstraint : 2 * c * offset + offset ^ 2 = heightDrop * (H + (H - heightDrop)) := by @@ -2283,75 +2253,56 @@ private theorem fullTwoRung_metric_split let normalizedK := F.K / D let normalizedDrop := F.heightDrop / D have hC : 0 < normalizedC := div_pos F.c_pos hD - have hbaseLength : 2 * F.c ≤ D := by - by_contra hnot - have hlt : D < 2 * F.c := lt_of_not_ge hnot - have hsum : 0 < 2 * F.c + D := by linarith [F.c_pos, hD] - have hproduct : 0 < (2 * F.c - D) * (2 * F.c + D) := - mul_pos (sub_pos.mpr hlt) hsum - nlinarith [F.base_le_d₁, hDsq] + have hbaseLength : 2 * F.c ≤ D := + (sq_le_sq₀ (mul_nonneg (by norm_num) F.c_pos.le) hD.le).mp + (F.base_le_d₁.trans_eq hDsq.symm) have hChi : normalizedC ≤ (1 : ℝ) / 2 := by rw [div_le_iff₀ hD] - linarith + linarith only [hbaseLength] have hOffset : 0 < normalizedOffset := div_pos F.offset_pos hD have hBetaSq : beta ^ 2 = 1 - 4 * normalizedC * normalizedOffset := by have hd₂sq := Real.sq_sqrt hd₂.le dsimp [beta, normalizedC, normalizedOffset] field_simp [ne_of_gt hD] - nlinarith [hDsq, hd₂sq, F.classDifference] + nlinarith only [hDsq, hd₂sq, F.classDifference] have hGamma : 0 < gamma := div_pos (Real.sqrt_pos.2 hd₃) hD have hH : 0 < normalizedH := div_pos F.H_pos hD have hHSq : normalizedH ^ 2 = 1 - normalizedC ^ 2 := by dsimp [normalizedH, normalizedC] field_simp [ne_of_gt hD] - nlinarith [hDsq, F.d₁_radius] + nlinarith only [hDsq, F.d₁_radius] have hK : 0 < normalizedK := div_pos F.K_pos hD have hKRadius : d₁ = (F.c + F.offset) ^ 2 + F.K ^ 2 := by have hconstraint := F.heightConstraint rw [F.heightDrop_eq] at hconstraint - nlinarith [F.d₁_radius] + nlinarith only [hconstraint, F.d₁_radius] have hKSq : normalizedK ^ 2 = 1 - (normalizedC + normalizedOffset) ^ 2 := by dsimp [normalizedK, normalizedC, normalizedOffset] field_simp [ne_of_gt hD] - nlinarith [hDsq, hKRadius] + nlinarith only [hDsq, hKRadius] have hDrop : 0 < normalizedDrop := div_pos F.heightDrop_pos hD have hDropDef : normalizedDrop = normalizedH - normalizedK := by dsimp [normalizedDrop, normalizedH, normalizedK] - rw [F.heightDrop_eq] - field_simp [ne_of_gt hD] + rw [F.heightDrop_eq, sub_div] rcases metric_sign_dichotomy hC hChi hOffset hBetaSq hGamma hH hHSq hK hKSq hDrop hDropDef with hlong | hshort · left have hscaled := mul_le_mul_of_nonneg_right hlong hD.le - have hbetaD : beta * D = Real.sqrt d₂ := by - dsimp [beta] - field_simp [ne_of_gt hD] - have hgammaD : gamma * D = Real.sqrt d₃ := by - dsimp [gamma] - field_simp [ne_of_gt hD] - nlinarith + have hbetaD : beta * D = Real.sqrt d₂ := div_mul_cancel₀ _ hD.ne' + have hgammaD : gamma * D = Real.sqrt d₃ := div_mul_cancel₀ _ hD.ne' + simpa only [add_mul, one_mul, mul_assoc, hbetaD, hgammaD] using hscaled · right have hcleared := (div_lt_iff₀ (by positivity : 0 < 4 * normalizedDrop)).mp hshort have hscaled := mul_lt_mul_of_pos_left hcleared (sq_pos_of_pos hD) have hbetaSqD : beta ^ 2 * D ^ 2 = d₂ := by - have hd₂sq := Real.sq_sqrt hd₂.le - dsimp [beta] - field_simp [ne_of_gt hD] - nlinarith + dsimp only [beta] + rw [div_pow, div_mul_cancel₀ _ (pow_ne_zero _ hD.ne'), Real.sq_sqrt hd₂.le] have hgammaSqD : gamma ^ 2 * D ^ 2 = d₃ := by - have hd₃sq := Real.sq_sqrt hd₃.le - dsimp [gamma] - field_simp [ne_of_gt hD] - nlinarith - have hdropD : normalizedDrop * D = F.heightDrop := by - dsimp [normalizedDrop] - field_simp [ne_of_gt hD] - have hHD : normalizedH * D = F.H := by - dsimp [normalizedH] - field_simp [ne_of_gt hD] - have hbetaD : beta * D = Real.sqrt d₂ := by - dsimp [beta] - field_simp [ne_of_gt hD] + dsimp only [gamma] + rw [div_pow, div_mul_cancel₀ _ (pow_ne_zero _ hD.ne'), Real.sq_sqrt hd₃.le] + have hdropD : normalizedDrop * D = F.heightDrop := div_mul_cancel₀ _ hD.ne' + have hHD : normalizedH * D = F.H := div_mul_cancel₀ _ hD.ne' + have hbetaD : beta * D = Real.sqrt d₂ := div_mul_cancel₀ _ hD.ne' have hleft : D ^ 2 * (1 + 2 * gamma ^ 2 - 3 * beta ^ 2) = d₁ + 2 * d₃ - 3 * d₂ := by calc @@ -2393,7 +2344,7 @@ private theorem fullTwoRung_second_class_short_impossible have hVrLe : sqDist (P G.vertex) (P G.r) ≤ d₃ := (top_three_class_bounds_of_ne G.classes G.vertex_ne_r).2.2 hVrLt have hclassNeg : d₂ - d₁ = -4 * F.c * F.offset := by - linarith [F.classDifference] + linarith only [F.classDifference] have hsum := two_rung_sum_identity_with_classes (c := F.c) (d := F.offset) (H := F.H) (Δ := F.heightDrop) (X := F.X) (Y := F.Y) (A := d₁) (B := d₂) @@ -2411,9 +2362,10 @@ private theorem fullTwoRung_second_class_short_impossible simpa only [N, FullTwoRungGeometry.normalized, normalizeAlong_sqDist hcenters] using hsum have hYUpper : 4 * F.heightDrop * F.Y ≤ d₁ + 2 * d₃ - 3 * d₂ := by - nlinarith + linarith only [hsumRaw, hVwLe, hVrLe, hVs] have hY : F.Y < F.H - Real.sqrt d₂ := by - nlinarith [F.heightDrop_pos] + exact (mul_lt_mul_iff_right₀ (mul_pos (by norm_num) F.heightDrop_pos)).mp + (hYUpper.trans_lt hshort) have hVsN : sqDist (N G.vertex) (N G.s) = d₂ := by simpa only [N, FullTwoRungGeometry.normalized, normalizeAlong_sqDist hcenters] using hVs @@ -2423,7 +2375,7 @@ private theorem fullTwoRung_second_class_short_impossible have hsqrtSq := Real.sq_sqrt hd₂ have hsqrtNonneg := Real.sqrt_nonneg d₂ simp only [sqDist] at hVsN - nlinarith [sq_nonneg (F.c - F.X)] + nlinarith only [hVsN, hsqrtSq, hsqrtNonneg, hY, sq_nonneg (F.c - F.X)] private theorem fullTwoRung_second_class_degree_le_six {n : ℕ} {P : Fin n → Point ℝ} {d₁ d₂ d₃ : ℝ} diff --git a/LeanPool/Erdos132N14.lean b/LeanPool/Erdos132N14.lean index 344054e309..6b94e967b1 100644 --- a/LeanPool/Erdos132N14.lean +++ b/LeanPool/Erdos132N14.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos132N14.Main +public import LeanPool.Erdos132N14.Main +import Mathlib.Analysis.SpecialFunctions.Log.Basic /-! # A Conditional Fourteen-Point Case of Erdős Problem 132 @@ -17,6 +19,8 @@ Tags: discrete-geometry, few-distance-sets, erdos-problems, planar-configuration MSC: 52C10, 05D99 -/ +@[expose] public section + /-! # A conditional fourteen-point case of Erdős Problem 132 diff --git a/LeanPool/Erdos132N14/Basic.lean b/LeanPool/Erdos132N14/Basic.lean index d9d485be7d..3953e24389 100644 --- a/LeanPool/Erdos132N14/Basic.lean +++ b/LeanPool/Erdos132N14/Basic.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import Mathlib.Analysis.Complex.Basic -import Mathlib.Data.Finset.Card +module + +public import Mathlib.Analysis.Complex.Basic /-! # Finite planar distance configurations @@ -15,6 +16,8 @@ The definitions work on a selected finite subset of a labelled configuration, which makes deletion and insertion statements literal finset identities. -/ +@[expose] public section + namespace LeanPool.Erdos132N14 open scoped BigOperators diff --git a/LeanPool/Erdos132N14/DiameterDescent.lean b/LeanPool/Erdos132N14/DiameterDescent.lean index 8754969a5d..0f2a2c9780 100644 --- a/LeanPool/Erdos132N14/DiameterDescent.lean +++ b/LeanPool/Erdos132N14/DiameterDescent.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132N14.PublishedInputs +module + +public import LeanPool.Erdos132N14.PublishedInputs +public import LeanPool.Erdos132N14.HopfPannwitz +import Mathlib.Analysis.SpecialFunctions.Log.Basic /-! # Pair budget and endpoint deletion at fourteen points @@ -14,6 +18,8 @@ It then deletes one endpoint of the unique pair in the first class and proves that the realized-distance set is exactly the old set with that class erased. -/ +@[expose] public section + namespace LeanPool.Erdos132N14 open scoped BigOperators diff --git a/LeanPool/Erdos132N14/HopfPannwitz.lean b/LeanPool/Erdos132N14/HopfPannwitz.lean index 75d0756fe0..408efb7a95 100644 --- a/LeanPool/Erdos132N14/HopfPannwitz.lean +++ b/LeanPool/Erdos132N14/HopfPannwitz.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132N14.HopfPannwitzGeometry -import Mathlib.Data.Finset.Max +module + +public import LeanPool.Erdos132N14.HopfPannwitzGeometry +public import LeanPool.Erdos132N14.Basic /-! # The planar diameter bound @@ -15,6 +17,8 @@ is assigned to a clockwise-extreme endpoint, and the signed-area lemmas show that no endpoint can receive two different edges. -/ +@[expose] public section + namespace LeanPool.Erdos132N14 noncomputable section diff --git a/LeanPool/Erdos132N14/HopfPannwitzGeometry.lean b/LeanPool/Erdos132N14/HopfPannwitzGeometry.lean index ab376a9653..8c1eec8559 100644 --- a/LeanPool/Erdos132N14/HopfPannwitzGeometry.lean +++ b/LeanPool/Erdos132N14/HopfPannwitzGeometry.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132N14.Basic +module + +public import Mathlib.Analysis.Complex.Basic /-! # Coordinate geometry for the planar diameter bound @@ -13,6 +15,8 @@ of the planar diameter bound. Working with dot products and signed areas keeps all collinear cases explicit and avoids a general-position assumption. -/ +@[expose] public section + namespace LeanPool.Erdos132N14 noncomputable section diff --git a/LeanPool/Erdos132N14/Main.lean b/LeanPool/Erdos132N14/Main.lean index 80edef3e20..928072fe20 100644 --- a/LeanPool/Erdos132N14/Main.lean +++ b/LeanPool/Erdos132N14/Main.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132N14.DiameterDescent +module + +public import LeanPool.Erdos132N14.DiameterDescent +import Mathlib.Analysis.SpecialFunctions.Log.Basic /-! # Conditional fourteen-point theorem for Erdős Problem 132 @@ -19,6 +22,8 @@ The planar diameter bound is proved internally. It does not settle Erdős Problem 132 in general. -/ +@[expose] public section + namespace LeanPool.Erdos132N14 open scoped BigOperators diff --git a/LeanPool/Erdos132N14/PublishedInputs.lean b/LeanPool/Erdos132N14/PublishedInputs.lean index 6dec4ddccb..e7e6133771 100644 --- a/LeanPool/Erdos132N14/PublishedInputs.lean +++ b/LeanPool/Erdos132N14/PublishedInputs.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132N14.HopfPannwitz -import LeanPool.Erdos132N14.RegularTridecagon +module + +public import LeanPool.Erdos132N14.RegularTridecagon +import Mathlib.Analysis.SpecialFunctions.Log.Basic /-! # Published inputs for the conditional fourteen-point theorem @@ -22,6 +24,8 @@ paper and returns only a genuine Euclidean distance-scaling similarity to one of the three explicit coordinate templates. -/ +@[expose] public section + namespace LeanPool.Erdos132N14 noncomputable section diff --git a/LeanPool/Erdos132N14/RegularTridecagon.lean b/LeanPool/Erdos132N14/RegularTridecagon.lean index 460e5cc983..a69c26b915 100644 --- a/LeanPool/Erdos132N14/RegularTridecagon.lean +++ b/LeanPool/Erdos132N14/RegularTridecagon.lean @@ -3,14 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.Erdos132N14.Basic -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +module + +public import LeanPool.Erdos132N14.Basic +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +public import Mathlib.RingTheory.RootsOfUnity.PrimitiveRoots import Mathlib.RingTheory.RootsOfUnity.Complex -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Lean.Elab.Tactic.Omega /-! # The three classified thirteen-point templates @@ -22,6 +20,8 @@ and centered regular hexagram are also given by explicit complex coordinates; their high-multiplicity classes are checked inside Lean. -/ +@[expose] public section + namespace LeanPool.Erdos132N14 open scoped BigOperators ComplexConjugate @@ -478,7 +478,9 @@ theorem regularTridecagon_chord_multiplicity (k : Fin 6) : exact regularTridecagon_pairDistance_eq_chord_iff (Finset.mem_filter.mp he).2 k rw [hfilter] - fin_cases k <;> decide + clear hfilter + revert k + decide +kernel /-- Explicit coordinates for the regular dodecagon and its center. -/ def dodecagonWithCenterPoint (i : Fin 13) : ℂ := @@ -499,11 +501,12 @@ def dodecagonWithCenterPoint (i : Fin 13) : ℂ := theorem dodecagonWithCenterPoint_injective : Function.Injective dodecagonWithCenterPoint := by - intro i j hij - fin_cases i <;> fin_cases j <;> - simp [dodecagonWithCenterPoint, Complex.ext_iff] at hij ⊢ <;> - nlinarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 3), - Real.sqrt_pos.2 (by norm_num : (0 : ℝ) < 3)] + have hroot : (1 : ℝ) < Real.sqrt 3 := by + nlinarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 3), Real.sqrt_nonneg (3 : ℝ)] + apply List.nodup_ofFn.mp + norm_num [List.ofFn_succ, dodecagonWithCenterPoint, Complex.ext_iff] + repeat' apply And.intro + all_goals (intros; linarith [hroot]) /-- The centered regular dodecagon template in the published classification. -/ def dodecagonWithCenter : Configuration (Fin 13) where @@ -530,11 +533,11 @@ def hexagramWithCenterPoint (i : Fin 13) : ℂ := theorem hexagramWithCenterPoint_injective : Function.Injective hexagramWithCenterPoint := by - intro i j hij - fin_cases i <;> fin_cases j <;> - simp [hexagramWithCenterPoint, Complex.ext_iff] at hij ⊢ <;> - nlinarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 3), - Real.sqrt_pos.2 (by norm_num : (0 : ℝ) < 3)] + have hroot : (0 : ℝ) < Real.sqrt 3 := Real.sqrt_pos.2 (by norm_num) + apply List.nodup_ofFn.mp + norm_num [List.ofFn_succ, hexagramWithCenterPoint, Complex.ext_iff] + repeat' apply And.intro + all_goals linarith [hroot] /-- The centered regular-hexagram template in the published classification. -/ def hexagramWithCenter : Configuration (Fin 13) where @@ -560,7 +563,7 @@ theorem dodecagonWithCenter_unit_distance_multiplicity : nlinarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 3), Real.sqrt_pos.2 (by norm_num : (0 : ℝ) < 3)] rw [hfilter] - decide + decide +kernel /-- Enumeration of twenty-four unit pairs in the centered hexagram. -/ def hexagramUnitPair (k : Fin 24) : Fin 13 × Fin 13 := @@ -591,11 +594,12 @@ def hexagramUnitPair (k : Fin 24) : Fin 13 × Fin 13 := | _ => (11, 12) theorem hexagramUnitPair_injective : Function.Injective hexagramUnitPair := by - decide + decide +kernel theorem hexagramUnitPair_mem_pairs (k : Fin 24) : hexagramUnitPair k ∈ pairs (Finset.univ : Finset (Fin 13)) := by - fin_cases k <;> decide + revert k + decide +kernel theorem hexagramUnitPair_distance (k : Fin 24) : hexagramWithCenter.pairDistance (hexagramUnitPair k) = 1 := by diff --git a/LeanPool/Erdos132ThreeChain.lean b/LeanPool/Erdos132ThreeChain.lean index d79852355e..cd92473d95 100644 --- a/LeanPool/Erdos132ThreeChain.lean +++ b/LeanPool/Erdos132ThreeChain.lean @@ -3,10 +3,17 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos132ThreeChain.HopfPannwitz -import LeanPool.Erdos132ThreeChain.Statement -import LeanPool.Erdos132ThreeChain.Witnesses +public import LeanPool.Erdos132ThreeChain.HopfPannwitz +public import LeanPool.Erdos132ThreeChain.Statement +public import LeanPool.Erdos132ThreeChain.Witnesses +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Positivity.Finset /-! # Planar Point Sets Whose Non-Diameter Distances Form a Geometric 3-Chain @@ -18,3 +25,5 @@ Main declarations: `Erdos132ThreeChain.nonDiameterSqDists_ne_chain` Tags: discrete-geometry, distance-geometry, erdos-problems MSC: 52C10, 52C35, 05C69 -/ + +@[expose] public section diff --git a/LeanPool/Erdos132ThreeChain/Basic.lean b/LeanPool/Erdos132ThreeChain/Basic.lean index f0c2e2b6e6..b6d2ae7af4 100644 --- a/LeanPool/Erdos132ThreeChain/Basic.lean +++ b/LeanPool/Erdos132ThreeChain/Basic.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ - -import Mathlib.Basic.Real.Basic -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +module + +public import Mathlib.Basic.Real.Basic +public import Mathlib.Data.Finset.Defs +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # Planar squared distances and geometric 3-chains @@ -25,6 +31,8 @@ Everything is deliberately self-contained and coordinate-based: `Point` is `ℝ (Heron, the anchored Gram determinant) is provable by `ring` from coordinates. -/ +@[expose] public section + namespace Erdos132ThreeChain /-- A point of the Euclidean plane. -/ diff --git a/LeanPool/Erdos132ThreeChain/CaroWei.lean b/LeanPool/Erdos132ThreeChain/CaroWei.lean index 95a0eafce8..d7f2a89c69 100644 --- a/LeanPool/Erdos132ThreeChain/CaroWei.lean +++ b/LeanPool/Erdos132ThreeChain/CaroWei.lean @@ -3,16 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import Mathlib.Basic.Real.Basic -import Mathlib.Data.Finset.Max -import Mathlib.Algebra.Order.BigOperators.Group.Finset +public import Mathlib.Basic.Real.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Finset.Card import Mathlib.Algebra.BigOperators.Field -import Mathlib.Algebra.Order.Field.Basic -import Mathlib.Tactic.Positivity +import Mathlib.Data.Rat.Cast.Order import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # The Caro--Wei independence bound @@ -27,6 +31,8 @@ bound into a lower bound on the independence number, and integrality upgrades `n independent set of size `5` once `n ≥ 13`. -/ +@[expose] public section + namespace Erdos132ThreeChain open Finset diff --git a/LeanPool/Erdos132ThreeChain/FivePoints.lean b/LeanPool/Erdos132ThreeChain/FivePoints.lean index def828b378..605512e4d1 100644 --- a/LeanPool/Erdos132ThreeChain/FivePoints.lean +++ b/LeanPool/Erdos132ThreeChain/FivePoints.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos132ThreeChain.Plane import LeanPool.Erdos132ThreeChain.FourPoints +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.LinearCombination +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # The five-point obstruction @@ -22,6 +32,8 @@ every three-vector Gram matrix in the plane forces each triple product `⟪u i, This is the five-point Gram obstruction in its scale-free form. -/ +@[expose] public section + namespace Erdos132ThreeChain /-- Two points on the circle of squared radius `c` about `o`, at squared distance `c` or diff --git a/LeanPool/Erdos132ThreeChain/FourPoints.lean b/LeanPool/Erdos132ThreeChain/FourPoints.lean index 4d989129d2..ec8012e6fd 100644 --- a/LeanPool/Erdos132ThreeChain/FourPoints.lean +++ b/LeanPool/Erdos132ThreeChain/FourPoints.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos132ThreeChain.Plane +public import LeanPool.Erdos132ThreeChain.Plane import LeanPool.Erdos132ThreeChain.PowerThree +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.LinearCombination +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # The four-point catalogue relative to a shortest edge @@ -26,6 +35,8 @@ distances lie in the single adjacent pair `{c, 3 * c}`: no planar chain quadrupl steps of the chain. -/ +@[expose] public section + namespace Erdos132ThreeChain /-- Relative to a shortest edge `A B`, every further point is isoceles or spanning. -/ diff --git a/LeanPool/Erdos132ThreeChain/HopfPannwitz.lean b/LeanPool/Erdos132ThreeChain/HopfPannwitz.lean index ab46d78785..b57be051c9 100644 --- a/LeanPool/Erdos132ThreeChain/HopfPannwitz.lean +++ b/LeanPool/Erdos132ThreeChain/HopfPannwitz.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos132ThreeChain.Plane -import LeanPool.Erdos132ThreeChain.CaroWei +public import LeanPool.Erdos132ThreeChain.Plane +public import LeanPool.Erdos132ThreeChain.CaroWei +import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # The Hopf--Pannwitz diameter bound @@ -33,6 +42,8 @@ satisfies `⟪B, w - v⟫ = |w - v|² / 2` while `⟪A, w - v⟫` and `⟪C, w - pairing Cramer's identity with `w - v` forces `|w - v|² ≤ 0`, i.e. `w = v`. -/ +@[expose] public section + namespace Erdos132ThreeChain open Finset diff --git a/LeanPool/Erdos132ThreeChain/Plane.lean b/LeanPool/Erdos132ThreeChain/Plane.lean index a42ef141f2..457bfefbcb 100644 --- a/LeanPool/Erdos132ThreeChain/Plane.lean +++ b/LeanPool/Erdos132ThreeChain/Plane.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos132ThreeChain.Basic +public import LeanPool.Erdos132ThreeChain.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # Planarity constraints on squared distances @@ -22,6 +30,8 @@ identity in the coordinates of the points involved, so each is proved by `ring`. with `sq_nonneg_combo` it supplies the five-point obstruction. -/ +@[expose] public section + namespace Erdos132ThreeChain /-- Twice the signed area of the triangle `p q r`; equivalently the two-dimensional cross diff --git a/LeanPool/Erdos132ThreeChain/PowerThree.lean b/LeanPool/Erdos132ThreeChain/PowerThree.lean index 3debbf3635..d3d5d4def6 100644 --- a/LeanPool/Erdos132ThreeChain/PowerThree.lean +++ b/LeanPool/Erdos132ThreeChain/PowerThree.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos132ThreeChain.Basic -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Data.Int.GCD +public import Mathlib.Basic.Real.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend import Mathlib.Tactic.LinearCombination +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # Arithmetic of powers of three @@ -18,6 +23,8 @@ This file isolates them. Everything is stated over `ℤ`; the geometric files p corresponding real equations and transfer them by `exact_mod_cast`. -/ +@[expose] public section + namespace Erdos132ThreeChain theorem one_le_pow3 (n : ℕ) : (1 : ℤ) ≤ 3 ^ n := one_le_pow₀ (by norm_num) diff --git a/LeanPool/Erdos132ThreeChain/Statement.lean b/LeanPool/Erdos132ThreeChain/Statement.lean index f9ec76e6ca..202235d7bc 100644 --- a/LeanPool/Erdos132ThreeChain/Statement.lean +++ b/LeanPool/Erdos132ThreeChain/Statement.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos132ThreeChain.Support +public import LeanPool.Erdos132ThreeChain.Basic +public import Mathlib.Data.Finset.Card import LeanPool.Erdos132ThreeChain.HopfPannwitz +import LeanPool.Erdos132ThreeChain.Support +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # The 3-chain support theorem @@ -34,6 +43,8 @@ numbered result anywhere else. Hopf--Pannwitz (1934) and Caro--Wei are classica but their Lean proofs here are written from scratch. -/ +@[expose] public section + namespace Erdos132ThreeChain open Finset diff --git a/LeanPool/Erdos132ThreeChain/Support.lean b/LeanPool/Erdos132ThreeChain/Support.lean index ac417b3e98..500103c93f 100644 --- a/LeanPool/Erdos132ThreeChain/Support.lean +++ b/LeanPool/Erdos132ThreeChain/Support.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import Mathlib.Data.Finset.Card +public import LeanPool.Erdos132ThreeChain.Basic import LeanPool.Erdos132ThreeChain.FivePoints -import Mathlib.Data.Finset.Card -import Mathlib.Data.Finset.Lattice.Fold +import LeanPool.Erdos132ThreeChain.FourPoints import Mathlib.Data.Finset.Max -import Mathlib.Data.Finset.Prod +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset /-! # From five labelled points to five-element sets @@ -19,6 +26,8 @@ whose pairwise squared distances lie in a geometric 3-chain, selects a shortest and rescales the chain so that the shortest edge has squared length exactly the new base. -/ +@[expose] public section + namespace Erdos132ThreeChain open Finset diff --git a/LeanPool/Erdos132ThreeChain/Witnesses.lean b/LeanPool/Erdos132ThreeChain/Witnesses.lean index 5509c944fb..e0452d1a2c 100644 --- a/LeanPool/Erdos132ThreeChain/Witnesses.lean +++ b/LeanPool/Erdos132ThreeChain/Witnesses.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos132ThreeChain.Basic -import Mathlib.Analysis.SpecialFunctions.Sqrt +public import LeanPool.Erdos132ThreeChain.Basic +public import Mathlib.Data.Finset.Card +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Positivity.Finset /-! # Witnesses for the chain configurations @@ -17,6 +24,8 @@ one) and the equilateral triangle together with its centroid (three short edges ones). Both have all six squared distances inside the adjacent pair `{1, 3}`. -/ +@[expose] public section + namespace Erdos132ThreeChain /-- The rhombus of two equilateral triangles glued along an edge: five squared distances equal diff --git a/LeanPool/Erdos137.lean b/LeanPool/Erdos137.lean index 7d1c412c99..abdb103d1d 100644 --- a/LeanPool/Erdos137.lean +++ b/LeanPool/Erdos137.lean @@ -3,21 +3,25 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.Finiteness -import LeanPool.Erdos137.Base -import LeanPool.Erdos137.BlockFramework -import LeanPool.Erdos137.RefinedOverlap -import LeanPool.Erdos137.JointFiniteness -import LeanPool.Erdos137.SmoothRefinement -import LeanPool.Erdos137.TaoPoint -import LeanPool.Erdos137.RoughPartStructure -import LeanPool.Erdos137.SpliceFiniteness -import LeanPool.Erdos137.QuarticCrude -import LeanPool.Erdos137.SexticCrude -import LeanPool.Erdos137.SquarefreeCapacity -import LeanPool.Erdos137.CombinedSplice -import LeanPool.Erdos137.AxiomAudit +public import LeanPool.Erdos137.Finiteness +public import LeanPool.Erdos137.Base +public import LeanPool.Erdos137.BlockFramework +public import LeanPool.Erdos137.RefinedOverlap +public import LeanPool.Erdos137.JointFiniteness +public import LeanPool.Erdos137.SmoothRefinement +public import LeanPool.Erdos137.TaoPoint +public import LeanPool.Erdos137.RoughPartStructure +public import LeanPool.Erdos137.SpliceFiniteness +public import LeanPool.Erdos137.QuarticCrude +public import LeanPool.Erdos137.SexticCrude +public import LeanPool.Erdos137.SquarefreeCapacity +public import LeanPool.Erdos137.CombinedSplice +public import LeanPool.Erdos137.AxiomAudit +import Mathlib.Algebra.Order.Algebra +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #137: powerful products of consecutive integers @@ -29,3 +33,5 @@ Main declarations: `Erdos137.erdos137_finite`, `Erdos137.erdos137_eventually_not Tags: number-theory, powerful-numbers, erdos-problems MSC: 11A51, 11N25 -/ + +@[expose] public section diff --git a/LeanPool/Erdos137/AxiomAudit.lean b/LeanPool/Erdos137/AxiomAudit.lean index 81d505a904..85dfe7234f 100644 --- a/LeanPool/Erdos137/AxiomAudit.lean +++ b/LeanPool/Erdos137/AxiomAudit.lean @@ -3,20 +3,26 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.Finiteness -import LeanPool.Erdos137.Base -import LeanPool.Erdos137.BlockFramework -import LeanPool.Erdos137.RefinedOverlap -import LeanPool.Erdos137.JointFiniteness -import LeanPool.Erdos137.SmoothRefinement -import LeanPool.Erdos137.TaoPoint -import LeanPool.Erdos137.RoughPartStructure -import LeanPool.Erdos137.SpliceFiniteness -import LeanPool.Erdos137.QuarticCrude -import LeanPool.Erdos137.SexticCrude -import LeanPool.Erdos137.SquarefreeCapacity -import LeanPool.Erdos137.CombinedSplice +public import LeanPool.Erdos137.Finiteness +public import LeanPool.Erdos137.Base +public import LeanPool.Erdos137.BlockFramework +public import LeanPool.Erdos137.RefinedOverlap +public import LeanPool.Erdos137.JointFiniteness +public import LeanPool.Erdos137.SmoothRefinement +public import LeanPool.Erdos137.TaoPoint +public import LeanPool.Erdos137.RoughPartStructure +public import LeanPool.Erdos137.SpliceFiniteness +public import LeanPool.Erdos137.QuarticCrude +public import LeanPool.Erdos137.SexticCrude +public import LeanPool.Erdos137.SquarefreeCapacity +public import LeanPool.Erdos137.CombinedSplice + +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Axiom audit @@ -39,3 +45,5 @@ The routes assembled here are: * the combined four-range splice (`CombinedSplice`); * the term-level rough-part anatomy (`RoughPartStructure`). -/ + +@[expose] public section diff --git a/LeanPool/Erdos137/Base.lean b/LeanPool/Erdos137/Base.lean index 5b704dbf29..810bc53490 100644 --- a/LeanPool/Erdos137/Base.lean +++ b/LeanPool/Erdos137/Base.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.Finiteness +public import LeanPool.Erdos137.Finiteness +public import Mathlib.NumberTheory.PrimeCounting +import Mathlib.Algebra.Order.Algebra +import Mathlib.Data.Nat.Choose.Factorization +import Mathlib.NumberTheory.Primorial +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #137: shared `g`-independent base layer @@ -29,6 +36,8 @@ None of these mentions any block length `g` (or the concrete `B`/`W`/`overlap` o are proved once here and reused verbatim downstream. -/ +@[expose] public section + namespace Erdos137 open scoped BigOperators diff --git a/LeanPool/Erdos137/BlockFramework.lean b/LeanPool/Erdos137/BlockFramework.lean index f0a536508e..c1fbda8d51 100644 --- a/LeanPool/Erdos137/BlockFramework.lean +++ b/LeanPool/Erdos137/BlockFramework.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.Finiteness -import LeanPool.Erdos137.Base +public import LeanPool.Erdos137.Base +import Mathlib.Algebra.BigOperators.Associated +import Mathlib.Algebra.Order.Algebra +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #137: the parametric `g`-block framework (unifying `g = 3` and `g = 5`) @@ -93,6 +97,8 @@ sharper exponent only via the unformalized Mertens reading. The crude `g = 3` in recorded `not_powerful_of_large` threshold `n > k^6` exactly. -/ +@[expose] public section + namespace Erdos137 open scoped BigOperators diff --git a/LeanPool/Erdos137/CombinedSplice.lean b/LeanPool/Erdos137/CombinedSplice.lean index 767015050e..3402d34781 100644 --- a/LeanPool/Erdos137/CombinedSplice.lean +++ b/LeanPool/Erdos137/CombinedSplice.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.SpliceFiniteness -import LeanPool.Erdos137.SquarefreeCapacity +public import LeanPool.Erdos137.SpliceFiniteness +public import LeanPool.Erdos137.SquarefreeCapacity +import Mathlib.Algebra.Order.Algebra +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #137: the combined four-range splice @@ -33,6 +37,8 @@ BHP, Pandey, Mertens, or abc. This is the four-range analogue of range and the high range. -/ +@[expose] public section + namespace Erdos137 noncomputable section diff --git a/LeanPool/Erdos137/Finiteness.lean b/LeanPool/Erdos137/Finiteness.lean index fe9607ec2b..f0a189072f 100644 --- a/LeanPool/Erdos137/Finiteness.lean +++ b/LeanPool/Erdos137/Finiteness.lean @@ -3,28 +3,12 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import Mathlib.NumberTheory.Primorial -import Mathlib.NumberTheory.PrimeCounting -import Mathlib.NumberTheory.Bertrand -import Mathlib.NumberTheory.Padics.PadicVal.Basic -import Mathlib.NumberTheory.SmoothNumbers -import Mathlib.RingTheory.UniqueFactorizationDomain.Basic -import Mathlib.Algebra.Squarefree.Basic -import Mathlib.Data.Nat.Squarefree -import Mathlib.Data.Nat.Factorization.Basic -import Mathlib.Data.Nat.Factorization.PrimePow -import Mathlib.Data.Nat.Prime.Factorial -import Mathlib.Data.Nat.Factorial.Basic -import Mathlib.Algebra.BigOperators.Associated -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.Common +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Algebra.Order.Algebra +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #137: powerful products of consecutive integers (conditional finiteness) @@ -47,6 +31,8 @@ and Langevin / Granville; this is a formalization of the deduction, not a new re The radical bound `RadLB` is the only nonelementary input and appears as a hypothesis. -/ +@[expose] public section + namespace Erdos137 open scoped BigOperators diff --git a/LeanPool/Erdos137/JointFiniteness.lean b/LeanPool/Erdos137/JointFiniteness.lean index 9cb8468fc5..d30979d666 100644 --- a/LeanPool/Erdos137/JointFiniteness.lean +++ b/LeanPool/Erdos137/JointFiniteness.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.Finiteness -import LeanPool.Erdos137.Base -import LeanPool.Erdos137.BlockFramework +public import LeanPool.Erdos137.BlockFramework +import Mathlib.Algebra.Order.Algebra +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #137: per-`k` non-powerfulness via the triple tiling (g = 3 instance) @@ -79,6 +81,8 @@ unconditional squarefree-value count for `n < k^{5+δ}` would give full joint `( That last unconditional input (Pandey) is not formalized here. -/ +@[expose] public section + namespace Erdos137 open scoped BigOperators diff --git a/LeanPool/Erdos137/QuarticCrude.lean b/LeanPool/Erdos137/QuarticCrude.lean index ec2ea23562..1ad92a3714 100644 --- a/LeanPool/Erdos137/QuarticCrude.lean +++ b/LeanPool/Erdos137/QuarticCrude.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.BlockFramework +public import LeanPool.Erdos137.BlockFramework +import Mathlib.Algebra.Order.Algebra +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #137: the quartic (`g = 4`) crude block route — sharp threshold `n > k^4` @@ -39,6 +43,8 @@ The ONLY hypothesis is `BlockRadLB4` (the `g = 4` instance of `BlockRadLBg`); it an `axiom`, so it does not appear in any axiom footprint. -/ +@[expose] public section + namespace Erdos137 open scoped BigOperators diff --git a/LeanPool/Erdos137/RefinedOverlap.lean b/LeanPool/Erdos137/RefinedOverlap.lean index e7633736e1..965e890673 100644 --- a/LeanPool/Erdos137/RefinedOverlap.lean +++ b/LeanPool/Erdos137/RefinedOverlap.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.BlockFramework +public import LeanPool.Erdos137.BlockFramework +import Mathlib.Algebra.Order.Algebra +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #137: a refined deterministic overlap bound @@ -70,6 +74,8 @@ logarithm `k log(k/g) + O(k)`. inequalities of `BlockFramework`, restated with `WgRefinedCap g k` in place of `k^k`. -/ +@[expose] public section + namespace Erdos137 open scoped BigOperators diff --git a/LeanPool/Erdos137/RoughPartStructure.lean b/LeanPool/Erdos137/RoughPartStructure.lean index 7cb1f07792..3a6d998d4c 100644 --- a/LeanPool/Erdos137/RoughPartStructure.lean +++ b/LeanPool/Erdos137/RoughPartStructure.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.Base +public import LeanPool.Erdos137.Finiteness +public import Mathlib.Algebra.Squarefree.Basic import LeanPool.Erdos137.TaoPoint +import Mathlib.Algebra.Order.Algebra +import Mathlib.Data.Nat.Squarefree +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #137: term-level rough-part structure in a very bad interval @@ -17,6 +23,8 @@ anatomy behind Tao's "very bad interval" language. No abc, no radical lower boun number theory. -/ +@[expose] public section + namespace Erdos137 open scoped BigOperators diff --git a/LeanPool/Erdos137/SexticCrude.lean b/LeanPool/Erdos137/SexticCrude.lean index ac4e855d1a..4cb442400d 100644 --- a/LeanPool/Erdos137/SexticCrude.lean +++ b/LeanPool/Erdos137/SexticCrude.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.BlockFramework +public import LeanPool.Erdos137.BlockFramework +import Mathlib.Algebra.Order.Algebra +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #137: the sextic (`g = 6`) crude block route — sharp threshold `n > k^3` @@ -39,6 +43,8 @@ The ONLY hypothesis is `BlockRadLB6` (the `g = 6` instance of `BlockRadLBg`); it an `axiom`, so it does not appear in any axiom footprint. -/ +@[expose] public section + namespace Erdos137 open scoped BigOperators diff --git a/LeanPool/Erdos137/SmoothRefinement.lean b/LeanPool/Erdos137/SmoothRefinement.lean index c71ee3806d..14e43940d0 100644 --- a/LeanPool/Erdos137/SmoothRefinement.lean +++ b/LeanPool/Erdos137/SmoothRefinement.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.JointFiniteness +public import LeanPool.Erdos137.JointFiniteness +import Mathlib.Algebra.Order.Algebra +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #137: the smooth-part radical refinement and the sharpened threshold (g = 3) @@ -32,6 +36,8 @@ The smooth-refined master inequality `master_ineq` is the `g = 3` instance of th (via `blockRadLB_iff`). -/ +@[expose] public section + namespace Erdos137 open scoped BigOperators diff --git a/LeanPool/Erdos137/SpliceFiniteness.lean b/LeanPool/Erdos137/SpliceFiniteness.lean index cf72cc4522..c01df1c840 100644 --- a/LeanPool/Erdos137/SpliceFiniteness.lean +++ b/LeanPool/Erdos137/SpliceFiniteness.lean @@ -3,13 +3,11 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.Finiteness -import LeanPool.Erdos137.Base -import LeanPool.Erdos137.BlockFramework -import LeanPool.Erdos137.JointFiniteness -import LeanPool.Erdos137.SmoothRefinement +public import LeanPool.Erdos137.BlockFramework import LeanPool.Erdos137.TaoPoint +import Mathlib.NumberTheory.Bertrand /-! # Erdős Problem #137: the honest `g = 5` per-`k` bound and the abstract splice machine @@ -68,6 +66,8 @@ faithful instantiation would carry a finite-exception clause. abc remain open. -/ +@[expose] public section + namespace Erdos137 open scoped BigOperators diff --git a/LeanPool/Erdos137/SquarefreeCapacity.lean b/LeanPool/Erdos137/SquarefreeCapacity.lean index 9d960ee3c6..55c9d82635 100644 --- a/LeanPool/Erdos137/SquarefreeCapacity.lean +++ b/LeanPool/Erdos137/SquarefreeCapacity.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.Base +public import LeanPool.Erdos137.Base +public import Mathlib.Data.Nat.Squarefree import LeanPool.Erdos137.TaoPoint +import Mathlib.Algebra.Order.Algebra +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #137: the deterministic squarefree-capacity reduction @@ -70,6 +75,8 @@ powerful. * `not_powerful_of_sqfree_count_beats_fourk` : explicit count ⟹ non-powerful obstruction. -/ +@[expose] public section + namespace Erdos137 open scoped BigOperators diff --git a/LeanPool/Erdos137/TaoPoint.lean b/LeanPool/Erdos137/TaoPoint.lean index 6c4e41a9a4..1b5b40805e 100644 --- a/LeanPool/Erdos137/TaoPoint.lean +++ b/LeanPool/Erdos137/TaoPoint.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos137.Finiteness -import LeanPool.Erdos137.JointFiniteness +public import LeanPool.Erdos137.Finiteness +import Mathlib.Algebra.Order.Algebra +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #137: the elementary structure of a "very bad interval" @@ -42,6 +45,8 @@ relation extraction that is Tao's next step is likewise not formalized. factor and exceeds the block length prevents powerfulness. -/ +@[expose] public section + namespace Erdos137 open scoped BigOperators diff --git a/LeanPool/Erdos346.lean b/LeanPool/Erdos346.lean index 6165a1081c..f54b57019b 100644 --- a/LeanPool/Erdos346.lean +++ b/LeanPool/Erdos346.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 KitaKen1. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: KitaKen1 -/ +module -import LeanPool.Erdos346.LimitExistsVariant +public import LeanPool.Erdos346.LimitExistsVariant +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem 346: Ratio Limit Forces the Golden Ratio @@ -16,3 +21,5 @@ Main declarations: `Erdos346.intended_problem_if_limit_exists` Tags: number-theory, golden-ratio, erdos-problems MSC: 11B05, 11J70 -/ + +@[expose] public section diff --git a/LeanPool/Erdos346/LimitExistsVariant.lean b/LeanPool/Erdos346/LimitExistsVariant.lean index 57cb4844f5..bfcfca05ad 100644 --- a/LeanPool/Erdos346/LimitExistsVariant.lean +++ b/LeanPool/Erdos346/LimitExistsVariant.lean @@ -3,16 +3,13 @@ Copyright (c) 2026 KitaKen1. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: KitaKen1 -/ +module +public import Mathlib.NumberTheory.Real.GoldenRatio import Mathlib.Algebra.Order.Star.Basic import Mathlib.Analysis.Normed.Order.Lattice -import Mathlib.Analysis.Normed.Ring.Basic import Mathlib.Analysis.SpecificLimits.Basic -import Mathlib.NumberTheory.Real.GoldenRatio -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem 346, limit-exists interpretation @@ -48,6 +45,8 @@ from Codex and ChatGPT. The final mathematical claims and public presentation remain the author's responsibility. -/ +@[expose] public section + open scoped BigOperators Topology goldenRatio open Filter Set diff --git a/LeanPool/Erdos367.lean b/LeanPool/Erdos367.lean index b73fb36b7f..cae87ffeba 100644 --- a/LeanPool/Erdos367.lean +++ b/LeanPool/Erdos367.lean @@ -3,13 +3,20 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import LeanPool.Erdos367.K3AbcUpperBound -import LeanPool.Erdos367.GeneralKUpperBound -import LeanPool.Erdos367.RFullLowerBound -import LeanPool.Erdos367.PellLimsup -import LeanPool.Erdos367.Core139 -import LeanPool.Erdos367.Core4027 +public import LeanPool.Erdos367.K3AbcUpperBound +public import LeanPool.Erdos367.GeneralKUpperBound +public import LeanPool.Erdos367.RFullLowerBound +public import LeanPool.Erdos367.PellLimsup +public import LeanPool.Erdos367.Core139 +public import LeanPool.Erdos367.Core4027 +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # Erdős Problem #367 @@ -21,3 +28,5 @@ Main declarations: `Erdos367.erdos_367_k3`, `RFullOdd.erdos367_iv`, `Erdos367.er Tags: number-theory, erdos-problems, powerful-numbers, abc-conjecture, pell-equations MSC: 11D09, 11N25, 11D45 -/ + +@[expose] public section diff --git a/LeanPool/Erdos367/Core139.lean b/LeanPool/Erdos367/Core139.lean index 6b546d48bb..12c7a0a3b2 100644 --- a/LeanPool/Erdos367/Core139.lean +++ b/LeanPool/Erdos367/Core139.lean @@ -3,20 +3,16 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import Mathlib.Algebra.Order.BigOperators.Group.Finset -import Mathlib.Data.Nat.Factorization.Defs +public import Mathlib.Data.Nat.Factorization.Defs +import Mathlib.Algebra.Order.Field.Basic import Mathlib.Data.ZMod.Basic -import Mathlib.Tactic.GCongr import Mathlib.Tactic.IntervalCases +import Mathlib.Tactic.Linarith.Frontend import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Zify -import Aesop +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # The r = 3 case of the "13/9 theorem" (Erdős #367 r-full extension) @@ -38,6 +34,8 @@ The "prime supply" (the existence of infinitely many suitable pairs `(s, t₀)`) hypothesis and is *not* part of this development. -/ +@[expose] public section + open scoped BigOperators namespace Core139 diff --git a/LeanPool/Erdos367/Core4027.lean b/LeanPool/Erdos367/Core4027.lean index 5b652d3fc4..8c674a2ca4 100644 --- a/LeanPool/Erdos367/Core4027.lean +++ b/LeanPool/Erdos367/Core4027.lean @@ -3,22 +3,21 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import Mathlib.Algebra.Order.BigOperators.GroupWithZero.Finset -import Mathlib.Algebra.Ring.GrindInstances -import Mathlib.Data.Nat.Factorization.Defs -import Mathlib.Data.Nat.ModEq +public import Mathlib.Data.Nat.Factorization.Defs +public import Mathlib.Data.Nat.ModEq +import Mathlib.Algebra.Order.Field.Basic import Mathlib.Data.ZMod.Basic -import Mathlib.Tactic.GCongr import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring -import Aesop +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! ## Definitions -/ +@[expose] public section + open scoped BigOperators namespace Core4027 diff --git a/LeanPool/Erdos367/GeneralKUpperBound.lean b/LeanPool/Erdos367/GeneralKUpperBound.lean index 84ca01e515..8f9364e696 100644 --- a/LeanPool/Erdos367/GeneralKUpperBound.lean +++ b/LeanPool/Erdos367/GeneralKUpperBound.lean @@ -3,16 +3,10 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import Mathlib.Algebra.Order.BigOperators.Group.Finset -import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Data.Nat.Factorization.Defs -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.Positivity.Finset /-! # Conditional upper bound on B₂ via a radical lower bound (Erdős #367) @@ -34,6 +28,8 @@ consecutive integers — as an **explicit hypothesis** (`RadLB`). `B2 (F k n) ≤ C' * n ^ (2 + ε)` for all `n ≥ 1`. -/ +@[expose] public section + namespace GeneralK open scoped BigOperators diff --git a/LeanPool/Erdos367/K3AbcUpperBound.lean b/LeanPool/Erdos367/K3AbcUpperBound.lean index e1f56d7d63..0a5fe7cec1 100644 --- a/LeanPool/Erdos367/K3AbcUpperBound.lean +++ b/LeanPool/Erdos367/K3AbcUpperBound.lean @@ -3,20 +3,11 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module -import Mathlib.Algebra.Order.Ring.Nat -import Mathlib.Algebra.Order.BigOperators.GroupWithZero.Finset -import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Basic.Real.Basic -import Mathlib.Data.Nat.Factorization.Defs -import Mathlib.Data.Nat.PrimeFin -import Mathlib.Tactic.Convert -import Mathlib.Tactic.GCongr +public import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity.Finset /-! # Erdős Problem #367 (k = 3 case), conditional on abc @@ -30,6 +21,8 @@ We formalize: 6. The main theorem: B₂(n) · B₂(n+1) · B₂(n+2) ≤ C'_ε · n^{2+ε} -/ +@[expose] public section + open Finset BigOperators Nat noncomputable section diff --git a/LeanPool/Erdos367/PellLimsup.lean b/LeanPool/Erdos367/PellLimsup.lean index 0663afccc8..35d4b96eda 100644 --- a/LeanPool/Erdos367/PellLimsup.lean +++ b/LeanPool/Erdos367/PellLimsup.lean @@ -3,21 +3,12 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module +public import Mathlib.NumberTheory.Zsqrtd.Basic +public import Mathlib.Analysis.SpecialFunctions.Log.Basic import Mathlib.NumberTheory.LSeries.PrimesInAP import Mathlib.NumberTheory.LegendreSymbol.JacobiSymbol -import Mathlib.NumberTheory.Zsqrtd.Basic -import Mathlib.Tactic.Convert -import Mathlib.Tactic.Cases -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Zify -import Aesop /-! # Erdős Problem #367: Consecutive Powerful Parts @@ -42,6 +33,8 @@ All lemmas and theorems are fully proved with no `sorry` statements. `propext`, `Classical.choice`, `Quot.sound`. -/ +@[expose] public section + noncomputable section namespace Erdos367 diff --git a/LeanPool/Erdos367/RFullLowerBound.lean b/LeanPool/Erdos367/RFullLowerBound.lean index 54bed1ed36..6562e0bf79 100644 --- a/LeanPool/Erdos367/RFullLowerBound.lean +++ b/LeanPool/Erdos367/RFullLowerBound.lean @@ -3,20 +3,19 @@ Copyright (c) 2026 Scott D. Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott D. Hughes -/ +module +public import Mathlib.Data.Nat.Factorization.Defs import Mathlib.Algebra.Order.BigOperators.GroupWithZero.Finset +import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Ring.GeomSum import Mathlib.Data.Finsupp.SMul -import Mathlib.Data.Nat.Factorization.Defs -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Zify -import Aesop +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset /-! # Erdős #367: r-full part and the odd-r extension @@ -31,6 +30,8 @@ Main theorem: for odd r ≥ 1 and q ≥ 2, with n = (q^r - 1)^r, (iv) (B_r(n) · B_r(n+1))^r > n^{r+1}. -/ +@[expose] public section + namespace RFullOdd open Finset Finsupp Nat diff --git a/LeanPool/Erdos403.lean b/LeanPool/Erdos403.lean index ebb952e038..ad6597e791 100644 --- a/LeanPool/Erdos403.lean +++ b/LeanPool/Erdos403.lean @@ -3,10 +3,17 @@ Copyright (c) 2026 Trevor Morris. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Trevor Morris -/ +module -import LeanPool.Erdos403.Basic -import LeanPool.Erdos403.FactBase -import LeanPool.Erdos403.Sharp +public import LeanPool.Erdos403.Basic +public import LeanPool.Erdos403.FactBase +public import LeanPool.Erdos403.Sharp +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Sums of Distinct Factorials That Are Powers of Two (Erdos Problem 403) @@ -18,3 +25,5 @@ Main declarations: `Erdos403.erdos_403_sharp`, `Erdos403.erdos_403_finite` Tags: number-theory, factorials, erdos-problems MSC: 11B83 -/ + +@[expose] public section diff --git a/LeanPool/Erdos403/Basic.lean b/LeanPool/Erdos403/Basic.lean index 31817d5571..16ef53b635 100644 --- a/LeanPool/Erdos403/Basic.lean +++ b/LeanPool/Erdos403/Basic.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Trevor Morris. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Trevor Morris -/ +module +public import Mathlib.Data.Finset.Max +public import Mathlib.Data.Nat.Factorial.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Algebra.Order.Ring.Nat -import Mathlib.Data.Finset.Max -import Mathlib.Data.Nat.Factorial.Basic -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Ring.RingNF /-! # Erdős Problem #403 — sums of distinct factorials that are powers of 2 @@ -35,6 +37,8 @@ A "sum of distinct factorials" is modelled by a `Finset ℕ` of indices (distinc automatic). Note `0! = 1! = 1`, so e.g. `{0,1}` sums to `2`. -/ +@[expose] public section + namespace Erdos403 open scoped Nat diff --git a/LeanPool/Erdos403/FactBase.lean b/LeanPool/Erdos403/FactBase.lean index 486d59c65e..c6a8e710c7 100644 --- a/LeanPool/Erdos403/FactBase.lean +++ b/LeanPool/Erdos403/FactBase.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Trevor Morris. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Trevor Morris -/ +module +public import LeanPool.Erdos403.Basic import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Data.Nat.SuccPred import Mathlib.Order.Interval.Finset.Nat -import LeanPool.Erdos403.Basic +import Mathlib.Tactic.Ring.RingNF /-! # The factorial number system (for Erdős #403) @@ -26,6 +30,8 @@ This file builds the infrastructure the sharp endgame needs: `Erdos403.Superseded`.) -/ +@[expose] public section + namespace Erdos403 open Finset diff --git a/LeanPool/Erdos403/Sharp.lean b/LeanPool/Erdos403/Sharp.lean index eff8ca0e0d..a086ddf22c 100644 --- a/LeanPool/Erdos403/Sharp.lean +++ b/LeanPool/Erdos403/Sharp.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Trevor Morris. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Trevor Morris -/ +module +public import LeanPool.Erdos403.FactBase +public import Mathlib.Algebra.Group.Even import Mathlib.Algebra.Order.Star.Basic +import Mathlib.Data.Finset.Powerset import Mathlib.Data.Nat.ModEq +import Mathlib.Data.Nat.SuccPred +import Mathlib.Order.Interval.Finset.Nat import Mathlib.Tactic.IntervalCases -import LeanPool.Erdos403.Basic -import LeanPool.Erdos403.FactBase +import Mathlib.Tactic.Ring.RingNF /-! # Erdős #403 — the sharp bound `m ≤ 7` (Phases B–D) @@ -26,6 +31,8 @@ Using the factorial number system (`FactBase`), `factSum S = 2^m` is impossible small `m`). Both are `sorry`-free and depend only on `[propext, Classical.choice, Quot.sound]`. -/ +@[expose] public section + namespace Erdos403 open scoped Nat diff --git a/LeanPool/Erdos81PaperIContrib.lean b/LeanPool/Erdos81PaperIContrib.lean index 743b246d74..0493196dbc 100644 --- a/LeanPool/Erdos81PaperIContrib.lean +++ b/LeanPool/Erdos81PaperIContrib.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Juan Pablo Traverso Gianini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Juan Pablo Traverso Gianini -/ +module -import LeanPool.Erdos81PaperIContrib.FarkasLP -import LeanPool.Erdos81PaperIContrib.FgConeClosed +public import LeanPool.Erdos81PaperIContrib.FarkasLP +public import LeanPool.Erdos81PaperIContrib.FgConeClosed +import Mathlib.Tactic.Positivity.Finset /-! # Finitely generated cones and finite LP duality @@ -18,6 +20,8 @@ Tags: convex-geometry, linear-programming, duality, farkas-lemma MSC: 52A20, 90C05 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Erdos81PaperIContrib/FarkasLP.lean b/LeanPool/Erdos81PaperIContrib/FarkasLP.lean index 36e4fcb62d..bfc65e28ae 100644 --- a/LeanPool/Erdos81PaperIContrib/FarkasLP.lean +++ b/LeanPool/Erdos81PaperIContrib/FarkasLP.lean @@ -3,14 +3,12 @@ Copyright (c) 2026 Juan Pablo Traverso Gianini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Juan Pablo Traverso Gianini -/ +module -import Mathlib.Analysis.Convex.Cone.InnerDual -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +public import Mathlib.Analysis.InnerProductSpace.PiL2 import LeanPool.Erdos81PaperIContrib.FgConeClosed +import Mathlib.Analysis.Convex.Cone.InnerDual +import Mathlib.Tactic.Positivity.Finset /-! @@ -33,6 +31,8 @@ specialization built directly from the finitely generated cone closedness theore -/ +@[expose] public section + open scoped BigOperators namespace LeanPool.Erdos81PaperIContrib diff --git a/LeanPool/Erdos81PaperIContrib/FgConeClosed.lean b/LeanPool/Erdos81PaperIContrib/FgConeClosed.lean index 4370cfde23..48085794b1 100644 --- a/LeanPool/Erdos81PaperIContrib/FgConeClosed.lean +++ b/LeanPool/Erdos81PaperIContrib/FgConeClosed.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Juan Pablo Traverso Gianini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Juan Pablo Traverso Gianini -/ +module -import Mathlib.Analysis.Convex.Cone.Dual -import Mathlib.Geometry.Convex.Cone.Simplicial -import Mathlib.LinearAlgebra.Dimension.Constructions -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring +public import Mathlib.Geometry.Convex.Cone.Simplicial +public import Mathlib.Analysis.Normed.Module.Basic +public import Mathlib.RingTheory.Finiteness.Defs +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Topology.Algebra.Module.FiniteDimension /-! @@ -35,6 +36,8 @@ inner product; they are ported here to an arbitrary real normed space `E` -/ +@[expose] public section + open scoped BigOperators namespace LeanPool.Erdos81PaperIContrib diff --git a/LeanPool/Erdos81PaperIIContrib.lean b/LeanPool/Erdos81PaperIIContrib.lean index 50d0d06f1e..3a96c0babb 100644 --- a/LeanPool/Erdos81PaperIIContrib.lean +++ b/LeanPool/Erdos81PaperIIContrib.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Juan Pablo Traverso Gianini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Juan Pablo Traverso Gianini -/ +module -import LeanPool.Erdos81PaperIIContrib.Chordal +public import LeanPool.Erdos81PaperIIContrib.Chordal /-! # Chordal graphs: minimal separators and simplicial vertices @@ -17,6 +18,8 @@ Tags: graph-theory, chordal-graphs, induced-subgraphs, minimal-separators, simpl MSC: 05C75 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Erdos81PaperIIContrib/Chordal.lean b/LeanPool/Erdos81PaperIIContrib/Chordal.lean index 7dca48f97c..80f6db0f31 100644 --- a/LeanPool/Erdos81PaperIIContrib/Chordal.lean +++ b/LeanPool/Erdos81PaperIIContrib/Chordal.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Juan Pablo Traverso Gianini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Juan Pablo Traverso Gianini -/ -import Mathlib.Combinatorics.SimpleGraph.Clique +module + +public import Mathlib.Combinatorics.SimpleGraph.Clique +public import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected import Mathlib.Combinatorics.SimpleGraph.Metric -import Mathlib.Combinatorics.SimpleGraph.Paths -import Mathlib.Data.Set.Finite.Lemmas -import Mathlib.Tactic.Push /-! # Chordal graphs @@ -34,6 +34,8 @@ self-contained and depends only on Mathlib. graph has two non-adjacent simplicial vertices -/ +@[expose] public section + namespace SimpleGraph variable {V : Type*} {G : SimpleGraph V} diff --git a/LeanPool/Erdos81PaperIIIContrib.lean b/LeanPool/Erdos81PaperIIIContrib.lean index 53b6b4e841..57b69c227c 100644 --- a/LeanPool/Erdos81PaperIIIContrib.lean +++ b/LeanPool/Erdos81PaperIIIContrib.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Juan Pablo Traverso Gianini and Aristotle contributors. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Juan Pablo Traverso Gianini, Aristotle, Vasily Ilin -/ +module -import LeanPool.Erdos81PaperIIIContrib.SimpleGraph +public import LeanPool.Erdos81PaperIIIContrib.SimpleGraph +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Near-perfect triangle packings from sum-zero triples @@ -17,6 +23,8 @@ Tags: extremal-combinatorics, triangle-packing, cyclic-groups MSC: 05B07, 05C70 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Erdos81PaperIIIContrib/SimpleGraph.lean b/LeanPool/Erdos81PaperIIIContrib/SimpleGraph.lean index 2442d4f4ee..1aa27fb5fd 100644 --- a/LeanPool/Erdos81PaperIIIContrib/SimpleGraph.lean +++ b/LeanPool/Erdos81PaperIIIContrib/SimpleGraph.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin -/ +module -import LeanPool.Erdos81PaperIIIContrib.SumZeroTriangles -import Mathlib.Combinatorics.SimpleGraph.Clique -import Mathlib.Combinatorics.SimpleGraph.Finite +public import LeanPool.Erdos81PaperIIIContrib.SumZeroTriangles +public import Mathlib.Combinatorics.SimpleGraph.Clique +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Simple graph interface for the sum-zero triangle packing @@ -17,6 +22,8 @@ providing graph-valued triangles, their union, and a complete-graph corollary st disjointness and degree. -/ +@[expose] public section + open Finset namespace SumZeroTriangles diff --git a/LeanPool/Erdos81PaperIIIContrib/SumZeroTriangles.lean b/LeanPool/Erdos81PaperIIIContrib/SumZeroTriangles.lean index be594e4bb7..3a1fe16d37 100644 --- a/LeanPool/Erdos81PaperIIIContrib/SumZeroTriangles.lean +++ b/LeanPool/Erdos81PaperIIIContrib/SumZeroTriangles.lean @@ -3,18 +3,15 @@ Copyright (c) 2026 Aristotle contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aristotle -/ +module -import Mathlib.Data.Finset.Card -import Mathlib.Data.Finset.Sym -import Mathlib.Data.Fintype.EquivFin -import Mathlib.Data.Sym.Sym2 +public import Mathlib.Data.Finset.Sym +public import Mathlib.Data.Finset.Powerset +public import Mathlib.Data.ZMod.Defs import Mathlib.Data.ZMod.Basic import Mathlib.Tactic.IntervalCases import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Order -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Ring.RingNF /-! # The sum-zero triple system: a near-perfect triangle packing of a complete graph @@ -57,6 +54,8 @@ edge sets. -/ +@[expose] public section + open Finset namespace ZMod diff --git a/LeanPool/Erdos865.lean b/LeanPool/Erdos865.lean index cc9088c26f..939204ea32 100644 --- a/LeanPool/Erdos865.lean +++ b/LeanPool/Erdos865.lean @@ -3,14 +3,20 @@ Copyright (c) 2026 Ricky Cipollini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ricky Cipollini -/ +module -import LeanPool.Erdos865.Defs -import LeanPool.Erdos865.FoldedAux -import LeanPool.Erdos865.FoldedMain -import LeanPool.Erdos865.Folding -import LeanPool.Erdos865.Sharpness -import LeanPool.Erdos865.UpperBound -import LeanPool.Erdos865.Main +public import LeanPool.Erdos865.Defs +public import LeanPool.Erdos865.FoldedAux +public import LeanPool.Erdos865.FoldedMain +public import LeanPool.Erdos865.Folding +public import LeanPool.Erdos865.Sharpness +public import LeanPool.Erdos865.UpperBound +public import LeanPool.Erdos865.Main +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # A sharp 5/8 bound for Erdős Problem 865 @@ -22,3 +28,5 @@ Main declarations: `Erdos865.erdos865_upper_bound`, `Erdos865.sharpness` Tags: additive-combinatorics, erdos-problems, sum-free-sets, combinatorics MSC: 11B75, 11B13 -/ + +@[expose] public section diff --git a/LeanPool/Erdos865/Defs.lean b/LeanPool/Erdos865/Defs.lean index 14ea29c168..c58b65f460 100644 --- a/LeanPool/Erdos865/Defs.lean +++ b/LeanPool/Erdos865/Defs.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Ricky Cipollini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ricky Cipollini -/ -import Mathlib.Order.Interval.Finset.Nat +module + +public import Mathlib.Order.Interval.Finset.Nat /-! # Definitions for the sharp 5/8 bound (Erdős 865) @@ -13,6 +15,8 @@ Basic objects for the pairwise-sums problem: pairwise-sum triples and triple-fre hypothesis `FoldedOK`, and the folding sets `Xset`/`Yset`/`Bset`/`Eset`. -/ +@[expose] public section + open Finset namespace Erdos865 diff --git a/LeanPool/Erdos865/FoldedAux.lean b/LeanPool/Erdos865/FoldedAux.lean index 1187fa9894..fac07c8bf9 100644 --- a/LeanPool/Erdos865/FoldedAux.lean +++ b/LeanPool/Erdos865/FoldedAux.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Ricky Cipollini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ricky Cipollini -/ -import LeanPool.Erdos865.Defs +module + +public import LeanPool.Erdos865.Defs +public import Mathlib.Data.ZMod.Defs import Mathlib.Data.ZMod.Basic import Mathlib.Tactic.IntervalCases +import Mathlib.Tactic.Linarith.Frontend import Mathlib.Tactic.LinearCombinationPrime -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring /-! # The four sets `T₁,…,T₄` and their pairwise intersections @@ -19,6 +20,8 @@ Supporting material for the folded additive lemma: the images `T₁,…,T₄` of four-set union bound `case2_bound`. -/ +@[expose] public section + open Finset namespace Erdos865 diff --git a/LeanPool/Erdos865/FoldedMain.lean b/LeanPool/Erdos865/FoldedMain.lean index d5bf6069a3..6d5302b04e 100644 --- a/LeanPool/Erdos865/FoldedMain.lean +++ b/LeanPool/Erdos865/FoldedMain.lean @@ -3,7 +3,17 @@ Copyright (c) 2026 Ricky Cipollini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ricky Cipollini -/ +module + +public import LeanPool.Erdos865.Defs import LeanPool.Erdos865.FoldedAux +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.ZMod.Basic +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # The folded additive lemma @@ -13,6 +23,8 @@ Monotonicity of the sum sets, the reflection `-B = {m - b}` and its effect on additive lemma `folded_additive`. -/ +@[expose] public section + open Finset namespace Erdos865 diff --git a/LeanPool/Erdos865/Folding.lean b/LeanPool/Erdos865/Folding.lean index 4bbdcc49e9..dccfc76b54 100644 --- a/LeanPool/Erdos865/Folding.lean +++ b/LeanPool/Erdos865/Folding.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Ricky Cipollini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ricky Cipollini -/ +module + +public import LeanPool.Erdos865.Defs import LeanPool.Erdos865.FoldedMain +import Mathlib.Tactic.IntervalCases +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.Ring.RingNF /-! # The folding lemma (Erdős 865, §3) @@ -12,6 +18,8 @@ Folds a triple-free set `A ⊆ [1,N]` onto a `FoldedOK` set `B_h` and controls t collisions via the exceptional set, giving the folding lemma `folding_lemma`. -/ +@[expose] public section + open Finset namespace Erdos865 diff --git a/LeanPool/Erdos865/Main.lean b/LeanPool/Erdos865/Main.lean index ce5267863b..44d87cc0da 100644 --- a/LeanPool/Erdos865/Main.lean +++ b/LeanPool/Erdos865/Main.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Ricky Cipollini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ricky Cipollini -/ +module + +public import LeanPool.Erdos865.Defs import LeanPool.Erdos865.UpperBound -import LeanPool.Erdos865.Sharpness +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # A sharp `5/8` bound for Erdős Problem 865 @@ -23,6 +30,8 @@ size forcing such a triple. This file assembles the proof that `8|A| = 5N + 16`, so the constant `5/8` is optimal. -/ +@[expose] public section + open Finset namespace Erdos865 diff --git a/LeanPool/Erdos865/Sharpness.lean b/LeanPool/Erdos865/Sharpness.lean index 4c51a0af91..1b8f01845d 100644 --- a/LeanPool/Erdos865/Sharpness.lean +++ b/LeanPool/Erdos865/Sharpness.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Ricky Cipollini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ricky Cipollini -/ -import LeanPool.Erdos865.Defs -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring +module + +public import LeanPool.Erdos865.Defs +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # Sharpness of the 5/8 bound (Erdős 865, §5) @@ -15,6 +20,8 @@ The construction `A = [M,2M] ∪ [4M,8M]` is triple-free of size `5M + 2`, so fo one has `8·|A| = 5·N + 16`, showing the constant `5/8` is optimal. -/ +@[expose] public section + open Finset namespace Erdos865 diff --git a/LeanPool/Erdos865/UpperBound.lean b/LeanPool/Erdos865/UpperBound.lean index b8ca95defd..95d5abd383 100644 --- a/LeanPool/Erdos865/UpperBound.lean +++ b/LeanPool/Erdos865/UpperBound.lean @@ -3,7 +3,17 @@ Copyright (c) 2026 Ricky Cipollini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ricky Cipollini -/ +module + +public import LeanPool.Erdos865.Defs import LeanPool.Erdos865.Folding +import Mathlib.Data.Finset.Max +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # The even-`N` upper bound (Erdős 865, §4) @@ -12,6 +22,8 @@ Strong induction on `N` proving `even_bound`: every triple-free `A ⊆ [1, 2e]` `5/8` counting bound, split into the cases `even_bound_case1` and `even_bound_case2`. -/ +@[expose] public section + open Finset namespace Erdos865 diff --git a/LeanPool/Erdos97ConvexOctagon.lean b/LeanPool/Erdos97ConvexOctagon.lean index 52e0a59e60..ae95fac876 100644 --- a/LeanPool/Erdos97ConvexOctagon.lean +++ b/LeanPool/Erdos97ConvexOctagon.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.Main +public import LeanPool.Erdos97ConvexOctagon.Classification + +public import LeanPool.Erdos97ConvexOctagon.Main +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # The Convex-Octagon Case of Erdős Problem 97 @@ -16,3 +23,5 @@ Main declarations: `Erdos97Octagon.erdos97_convex_octagon` Tags: discrete-geometry, distance-geometry, erdos-problems, convexity MSC: 51K05, 52A10 -/ + +@[expose] public section diff --git a/LeanPool/Erdos97ConvexOctagon/Basic.lean b/LeanPool/Erdos97ConvexOctagon/Basic.lean index 1cab0edcc7..2ef51cee1a 100644 --- a/LeanPool/Erdos97ConvexOctagon/Basic.lean +++ b/LeanPool/Erdos97ConvexOctagon/Basic.lean @@ -3,14 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.LinearAlgebra.Dimension.Finite -import Mathlib.LinearAlgebra.LinearIndependent.Defs +public import Mathlib.Analysis.InnerProductSpace.PiL2 /-! # Erdős 97 convex-octagon formalization: Basic -/ +@[expose] public section + namespace Erdos97Octagon open scoped InnerProductSpace diff --git a/LeanPool/Erdos97ConvexOctagon/CayleyMenger.lean b/LeanPool/Erdos97ConvexOctagon/CayleyMenger.lean index bc9d18cc8a..9b1f5e45c6 100644 --- a/LeanPool/Erdos97ConvexOctagon/CayleyMenger.lean +++ b/LeanPool/Erdos97ConvexOctagon/CayleyMenger.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.Basic import LeanPool.Erdos97ConvexOctagon.Gram /-! # Erdős 97 convex-octagon formalization: Cayley Menger -/ +@[expose] public section + namespace Erdos97Octagon open scoped InnerProductSpace diff --git a/LeanPool/Erdos97ConvexOctagon/Certificates.lean b/LeanPool/Erdos97ConvexOctagon/Certificates.lean index 550200d426..cbbfd2a03a 100644 --- a/LeanPool/Erdos97ConvexOctagon/Certificates.lean +++ b/LeanPool/Erdos97ConvexOctagon/Certificates.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.FiniteModel +public import LeanPool.Erdos97ConvexOctagon.FiniteModel +public import LeanPool.Erdos97ConvexOctagon.Radius +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives import LeanPool.Erdos97ConvexOctagon.Obstructions +import LeanPool.Erdos97ConvexOctagon.Relabelling import LeanPool.Erdos97ConvexOctagon.ResidualObstructions /-! # Erdős 97 convex-octagon formalization: Certificates -/ +@[expose] public section + namespace Erdos97Octagon namespace RawIncidence @@ -52,7 +58,8 @@ def componentTreeB (R : RawIncidence) (root : Vertex) : List Vertex → Bool def TreeLabelledEdge (R : RawIncidence) (component : List Vertex) (a b : Vertex) : Prop := (a ∈ component ∧ b ∈ R a) ∨ (b ∈ component ∧ a ∈ R b) -private def treeLabelledEdgeB +/-- Boolean test for a selected edge incident to the validated tree. -/ +def treeLabelledEdgeB (R : RawIncidence) (component : List Vertex) (a b : Vertex) : Bool := (decide (a ∈ component) && decide (b ∈ R a)) || (decide (b ∈ component) && decide (a ∈ R b)) @@ -105,7 +112,8 @@ def Certificate.Valid (R : RawIncidence) : Certificate → Prop ∀ v w, w ∈ R v ↔ forward w ∈ (residualRepresentative (Fin.ofNat 13 classIndex)).targets (forward v) -private def residualValidB (R : RawIncidence) (payload : UInt64) : Bool := +/-- Check the residual class and its encoded incidence isomorphism. -/ +def residualValidB (R : RawIncidence) (payload : UInt64) : Bool := let classIndex := payloadClass payload let forward := decodeMap (payloadForwardCode payload) let inverse := decodeMap (payloadInverseCode payload) diff --git a/LeanPool/Erdos97ConvexOctagon/Classification.lean b/LeanPool/Erdos97ConvexOctagon/Classification.lean index 50cb0f177a..bfb75b63e0 100644 --- a/LeanPool/Erdos97ConvexOctagon/Classification.lean +++ b/LeanPool/Erdos97ConvexOctagon/Classification.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.Relabelling import LeanPool.Erdos97ConvexOctagon.CoverageBranches +import LeanPool.Erdos97ConvexOctagon.RowSymmetry /-! # Exhaustive normalized-incidence classification @@ -14,6 +17,8 @@ finite search excludes every completion of those canonical rows using checked geometric obstruction witnesses. -/ +@[expose] public section + namespace Erdos97Octagon open RawIncidence diff --git a/LeanPool/Erdos97ConvexOctagon/CodeStateExactness.lean b/LeanPool/Erdos97ConvexOctagon/CodeStateExactness.lean index cb8f7e8eb2..edcefc231b 100644 --- a/LeanPool/Erdos97ConvexOctagon/CodeStateExactness.lean +++ b/LeanPool/Erdos97ConvexOctagon/CodeStateExactness.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.Certificates -import LeanPool.Erdos97ConvexOctagon.CoverageSearchCore +public import LeanPool.Erdos97ConvexOctagon.Certificates +public import LeanPool.Erdos97ConvexOctagon.CoverageSearchCore /-! # Exactness of packed incidence-table prefixes -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage private theorem bitSetB_eq_getLsbD (code : UInt64) (index : Fin 64) : diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageBranches.lean b/LeanPool/Erdos97ConvexOctagon/CoverageBranches.lean index 42ab308e08..3c77af2dbd 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageBranches.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageBranches.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.FiniteModel +public import LeanPool.Erdos97ConvexOctagon.Relabelling +public import LeanPool.Erdos97ConvexOctagon.RowMasks import LeanPool.Erdos97ConvexOctagon.CoverageCertificateSoundness /-! @@ -13,6 +17,8 @@ The compact kernel-checked coverage certificate excludes all seven canonical first rows. -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Every normalized counterexample with a canonical first row contradicts diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificate.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificate.lean index ca1f2af0c2..396f4e6301 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificate.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificate.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateSoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateSoundness + +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Audited flat coverage certificates -/ + +@[expose] public section diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateChecker.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateChecker.lean index 291bf9fb9b..d5e6da1f52 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateChecker.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateChecker.lean @@ -3,16 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ - -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateSummaries -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers -import LeanPool.Erdos97ConvexOctagon.CoveragePairRowIndexMasks -import LeanPool.Erdos97ConvexOctagon.CoverageSearchRowChoices -import LeanPool.Erdos97ConvexOctagon.CoverageSearchCore -import LeanPool.Erdos97ConvexOctagon.RowMasks +module + +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateSummaries +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers +public import LeanPool.Erdos97ConvexOctagon.CoverageSearchRowChoices +public import LeanPool.Erdos97ConvexOctagon.CoverageSearchCore +public import LeanPool.Erdos97ConvexOctagon.RowMasks +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Flat local checker for coverage certificates -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Witness streams for one nonempty five-row word of a node claim. -/ @@ -67,13 +73,16 @@ inductive BranchClaim where /-- The five remaining rows are covered by postorder local claims. -/ | search (claims : BranchClaims) -private def defaultNodeClaim : NodeClaim := +/-- The empty node claim used when a lookup has no matching entry. -/ +def defaultNodeClaim : NodeClaim := ⟨0, 0, 0, 0, 0, 0, 0, 0, #[]⟩ -private def emptyNodeWordClaim (wordIndex : Nat) : NodeWordClaim := +/-- An empty word claim retaining the requested word index. -/ +def emptyNodeWordClaim (wordIndex : Nat) : NodeWordClaim := ⟨wordIndex, [], [], [], []⟩ -private def nodeWordClaimAtAux +/-- Search a bounded suffix of the word-claim array for the requested index. -/ +def nodeWordClaimAtAux (wordClaims : Array NodeWordClaim) (wordIndex position : Nat) : Nat → NodeWordClaim | 0 => emptyNodeWordClaim wordIndex @@ -114,14 +123,22 @@ def pairStateFromAssignments (assignments : List RowAssignment) : PairState := def columnStateFromAssignments (assignments : List RowAssignment) : ColumnState := assignments.foldl (fun state assignment => state.add assignment.2) ColumnState.empty -private structure LocalCursor where +/-- Accumulated verification status and outgoing references for a node claim. -/ +structure LocalCursor where + /-- Whether every processed row has passed its checks. -/ ok : Bool + /-- Pattern origins collected from the processed rows. -/ patternOrigins : List Nat + /-- Child claim identifiers collected from the processed rows. -/ childIds : List Nat + /-- Hard-case origins collected from the processed rows. -/ hardOrigins : List Nat -private structure RejectionCursor where +/-- Accumulated verification status and targets for rejected rows. -/ +structure RejectionCursor where + /-- Whether every processed rejection has passed its checks. -/ ok : Bool + /-- Targets collected from the processed rejected rows. -/ targets : List Nat private theorem foldl_fixed_of_false @@ -195,7 +212,8 @@ def conflictCoverLookup (identifier : Nat) : Option ConflictCover := | none => none | some group => group[identifier % 64]? -private def processRow +/-- Check one certificate row and update its accumulated references. -/ +def processRow (claims : BranchClaims) (identifier : Nat) (claim : NodeClaim) (centre : Vertex) (remaining : List Vertex) (pairState : PairState) (cursor : LocalCursor) (index : Nat) : LocalCursor := @@ -229,7 +247,7 @@ private def processRow ⟨childValid, cursor.patternOrigins, childIds, cursor.hardOrigins⟩ /-- Process at most five compatible rows while threading the local witness streams. -/ -private def processFiveRows +def processFiveRows (claims : BranchClaims) (identifier : Nat) (claim : NodeClaim) (centre : Vertex) (remaining : List Vertex) (pairState : PairState) (indices : List Nat) (initial : LocalCursor) : LocalCursor := @@ -345,7 +363,8 @@ def rejectedRowValidB decide (count + remainingColumnCapacity remaining targetVertex < 4) else false -private def processRejectedRow +/-- Check one rejected row and record its target. -/ +def processRejectedRow (claim : NodeClaim) (centre : Vertex) (remaining : List Vertex) (cursor : RejectionCursor) (index : Nat) : RejectionCursor := if !cursor.ok then cursor diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCoverSoundness.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCoverSoundness.lean index 03c2a920c1..8af36a6464 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCoverSoundness.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCoverSoundness.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateSupportSoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateSupportSoundness +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.IntervalCases +import Mathlib.Tactic.NormNum.GCD /-! # Global validity of the generated conflict covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage private theorem conflictCoverGroup_valid diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCoverTypes.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCoverTypes.lean index 08b935f4c1..60e877b555 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCoverTypes.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCoverTypes.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoveragePairRowIndexMasks +public import LeanPool.Erdos97ConvexOctagon.CoveragePairRowIndexMasks +public import LeanPool.Erdos97ConvexOctagon.FiniteModel +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Types and local audit for repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Repeated pairs and legal rows that they soundly reject at one search centre. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers.lean index dd4627dbfa..2d931938ef 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers.lean @@ -3,32 +3,39 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers00 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers01 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers02 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers03 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers04 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers05 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers06 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers07 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers08 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers09 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers10 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers11 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers12 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers13 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers14 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers15 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers16 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers17 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers18 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers19 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers20 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers21 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers00 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers01 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers02 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers03 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers04 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers05 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers06 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers07 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers08 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers09 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers10 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers11 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers12 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers13 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers14 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers15 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers16 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers17 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers18 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers19 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers20 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCovers21 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Deduplicated repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict covers in shallow 64-entry groups. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers00.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers00.lean index 036aafcfe6..cde001b990 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers00.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers00.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 0. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers01.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers01.lean index 78731b191b..919ddac109 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers01.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers01.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 4. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers02.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers02.lean index 25566655cc..0a769fe98f 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers02.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers02.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 8. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers03.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers03.lean index 8c0cc424d3..4cf2fdfa0d 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers03.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers03.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 12. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers04.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers04.lean index 13daae8925..3e0d8d44c4 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers04.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers04.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 16. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers05.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers05.lean index ae6835cda6..129416e0e5 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers05.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers05.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 20. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers06.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers06.lean index 73e44f1b76..18de33782f 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers06.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers06.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 24. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers07.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers07.lean index 62749d7ea2..18f8aa1a61 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers07.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers07.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 28. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers08.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers08.lean index 5116ba2188..27ac408f81 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers08.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers08.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 32. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers09.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers09.lean index 77833005da..623aea54c4 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers09.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers09.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 36. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers10.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers10.lean index d937e5fe40..d091c2327e 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers10.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers10.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 40. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers11.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers11.lean index f2ef796f76..5f497b2f56 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers11.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers11.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 44. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers12.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers12.lean index 748fbf9fd1..89d64a0f52 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers12.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers12.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 48. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers13.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers13.lean index f9c2d1854b..3d81dc5b64 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers13.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers13.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 52. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers14.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers14.lean index 5b0bd46957..991ae2d8f5 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers14.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers14.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 56. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers15.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers15.lean index ef9c6c5414..13ca2fe6b1 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers15.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers15.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 60. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers16.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers16.lean index f51d2ccc4a..f97ec87cb2 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers16.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers16.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 64. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers17.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers17.lean index f3b1aa1ac1..95df8b23c8 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers17.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers17.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 68. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers18.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers18.lean index f979c6f030..818e33e761 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers18.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers18.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 72. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers19.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers19.lean index a40111cdbc..b2e83b5ea5 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers19.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers19.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 76. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers20.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers20.lean index 0d66266405..3f462d656a 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers20.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers20.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 80. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers21.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers21.lean index dfeebaefbe..e8c62a5789 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers21.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateConflictCovers21.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded repeated-pair row-mask covers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Conflict-cover data group 84. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData00.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData00.lean index 01efccdb66..7d6477d21f 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData00.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData00.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_1_4_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 4), group 00. -/ +def branchClaims1And4Group00 : Array NodeClaim := #[⟨4, 7401666836966878494, 36240593415372030, 36028935270069478, 4, 0, 0, 0, #[]⟩, ⟨3, 7349875441252117790, 36099304023719166, 36028797025809638, @@ -174,7 +182,8 @@ private def branchClaims_1_4_group_00 : Array NodeClaim := ⟨4, 5166755539584232734, 36240594489113854, 36169671949972590, 37, 0, 0, 0, #[]⟩] -private def branchClaims_1_4_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 4), group 01. -/ +def branchClaims1And4Group01 : Array NodeClaim := #[⟨3, 5116090043776314654, 36240044724911358, 36028797019518062, 36, 25769803776, 0, 17179869184, #[⟨6, [], [354], [63], []⟩]⟩, ⟨3, 6124896360307305758, 36240319602818302, 36028797020549244, @@ -311,9 +320,10 @@ private def branchClaims_1_4_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (1, 4). -/ def branchClaims1Row4 : BranchClaims := - ⟨#[branchClaims_1_4_group_00, branchClaims_1_4_group_01], 102, 101⟩ + ⟨#[branchClaims1And4Group00, branchClaims1And4Group01], 102, 101⟩ -private def branchClaims_1_5_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 5), group 00. -/ +def branchClaims1And5Group00 : Array NodeClaim := #[⟨4, 7401666836432104734, 36240868293278974, 140738300507366, 70, 0, 0, 0, #[]⟩, ⟨3, 7349875440717344030, 36240178951027966, 6845670, @@ -511,7 +521,8 @@ private def branchClaims_1_5_group_00 : Array NodeClaim := ⟨4, 8692792576363932958, 36240869362826494, 141151687989282, 119, 32768, 0, 0, #[⟨3, [], [], [], [6]⟩]⟩] -private def branchClaims_1_5_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 5), group 01. -/ +def branchClaims1And5Group01 : Array NodeClaim := #[⟨3, 8646912155160096030, 36240869362818174, 414199601152, 118, 512, 8, 0, #[⟨0, [5], [], [], []⟩, ⟨1, [], [], [63], []⟩]⟩, @@ -665,9 +676,10 @@ private def branchClaims_1_5_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (1, 5). -/ def branchClaims1Row5 : BranchClaims := - ⟨#[branchClaims_1_5_group_00, branchClaims_1_5_group_01], 101, 100⟩ + ⟨#[branchClaims1And5Group00, branchClaims1And5Group01], 101, 100⟩ -private def branchClaims_1_6_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 6), group 00. -/ +def branchClaims1And6Group00 : Array NodeClaim := #[⟨4, 8410473151893548318, 36240868293278974, 71056752120038, 149, 268435456, 0, 0, #[⟨5, [], [], [], [38]⟩]⟩, ⟨3, 8358681756178787614, 36100128657439998, 70368752046310, @@ -859,7 +871,8 @@ private def branchClaims_1_6_group_00 : Array NodeClaim := ⟨5, [], [], [62], []⟩, ⟨6, [], [177], [], []⟩]⟩] -private def branchClaims_1_6_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 6), group 01. -/ +def branchClaims1And6Group01 : Array NodeClaim := #[⟨4, 5456111916882799902, 36240869358623998, 211794236283114, 166, 33554432, 0, 33554432, #[⟨5, [], [370], [], []⟩]⟩, ⟨3, 5404320521168039198, 36240867211140350, 70368747854058, @@ -1062,9 +1075,10 @@ private def branchClaims_1_6_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (1, 6). -/ def branchClaims1Row6 : BranchClaims := - ⟨#[branchClaims_1_6_group_00, branchClaims_1_6_group_01], 121, 120⟩ + ⟨#[branchClaims1And6Group00, branchClaims1And6Group01], 121, 120⟩ -private def branchClaims_1_7_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 7), group 00. -/ +def branchClaims1And7Group00 : Array NodeClaim := #[⟨3, 8358681756980948254, 36100128657439998, 70368752046310, 73, 17448304640, 0, 17448304640, #[⟨5, [], [1302], [], []⟩, ⟨6, [], [883], [], []⟩]⟩, @@ -1263,7 +1277,8 @@ private def branchClaims_1_7_group_00 : Array NodeClaim := ⟨5, [], [498], [], []⟩, ⟨6, [], [], [61, 62], []⟩]⟩] -private def branchClaims_1_7_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 7), group 01. -/ +def branchClaims1And7Group01 : Array NodeClaim := #[⟨2, 849134955806, 36240591267855598, 12058724, 257, 18119393280, 67108880, 18119393280, #[⟨0, [6], [], [], []⟩, ⟨5, [6], [900, 171, 171], [], []⟩, @@ -1461,9 +1476,10 @@ private def branchClaims_1_7_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (1, 7). -/ def branchClaims1Row7 : BranchClaims := - ⟨#[branchClaims_1_7_group_00, branchClaims_1_7_group_01], 115, 114⟩ + ⟨#[branchClaims1And7Group00, branchClaims1And7Group01], 115, 114⟩ -private def branchClaims_1_8_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 8), group 00. -/ +def branchClaims1And8Group00 : Array NodeClaim := #[⟨3, 7638105815532121374, 36240180024769790, 537426150, 5, 8589934592, 0, 8589934592, #[⟨6, [], [880], [], []⟩]⟩, ⟨4, 8410473151626161438, 36240868293278974, 141150618390758, @@ -1667,7 +1683,8 @@ private def branchClaims_1_8_group_00 : Array NodeClaim := ⟨3, [], [], [61], []⟩, ⟨6, [], [], [62], []⟩]⟩] -private def branchClaims_1_8_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 8), group 01. -/ +def branchClaims1And8Group01 : Array NodeClaim := #[⟨3, 5404320535631047966, 36240729780583662, 36169534509996074, 316, 0, 16384, 0, #[⟨2, [5], [], [], []⟩]⟩, ⟨3, 6124896476010327326, 36240728706841854, 36169809393127460, @@ -1890,7 +1907,8 @@ private def branchClaims_1_8_group_01 : Array NodeClaim := ⟨5, [6], [391, 144, 438, 449], [], []⟩, ⟨6, [], [449, 438], [], []⟩]⟩] -private def branchClaims_1_8_group_02 : Array NodeClaim := +/-- Coverage claims for branch (1, 8), group 02. -/ +def branchClaims1And8Group02 : Array NodeClaim := #[⟨4, 5446259766498372894, 36240867219537150, 211655992044718, 366, 0, 0, 0, #[]⟩, ⟨3, 5404319994968485150, 36240867211148526, 211106235182122, @@ -1968,9 +1986,10 @@ private def branchClaims_1_8_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (1, 8). -/ def branchClaims1Row8 : BranchClaims := - ⟨#[branchClaims_1_8_group_00, branchClaims_1_8_group_01, branchClaims_1_8_group_02], 146, 145⟩ + ⟨#[branchClaims1And8Group00, branchClaims1And8Group01, branchClaims1And8Group02], 146, 145⟩ -private def branchClaims_1_9_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 9), group 00. -/ +def branchClaims1And9Group00 : Array NodeClaim := #[⟨4, 6460977595537370398, 36240319611206910, 36169535315294330, 12, 0, 0, 0, #[]⟩, ⟨3, 6413126849496558878, 36240317463723262, 36028797290025082, @@ -2193,7 +2212,8 @@ private def branchClaims_1_9_group_00 : Array NodeClaim := ⟨4, 3718003965762415902, 36240869358632190, 36099306158559418, 12, 0, 0, 0, #[]⟩] -private def branchClaims_1_9_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 9), group 01. -/ +def branchClaims1And9Group01 : Array NodeClaim := #[⟨3, 3674938294325685534, 36240319602818302, 36099303742640162, 18, 131072, 0, 0, #[⟨3, [], [], [63], []⟩]⟩, ⟨2, 998391360798, 36240319602810094, 36099166303682560, @@ -2415,7 +2435,8 @@ private def branchClaims_1_9_group_01 : Array NodeClaim := ⟨4, 7680045456554143006, 36240867215342846, 36240453556300932, 327, 65536, 0, 65536, #[⟨3, [], [473], [], []⟩]⟩] -private def branchClaims_1_9_group_02 : Array NodeClaim := +/-- Coverage claims for branch (1, 9), group 02. -/ +def branchClaims1And9Group02 : Array NodeClaim := #[⟨4, 7681171356460985630, 36240869362826494, 36240453815299208, 444, 8192, 0, 0, #[⟨2, [], [], [], [78]⟩]⟩, ⟨3, 7638105685024255262, 36240867215342830, 36239903791049728, @@ -2486,9 +2507,10 @@ private def branchClaims_1_9_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (1, 9). -/ def branchClaims1Row9 : BranchClaims := - ⟨#[branchClaims_1_9_group_00, branchClaims_1_9_group_01, branchClaims_1_9_group_02], 144, 143⟩ + ⟨#[branchClaims1And9Group00, branchClaims1And9Group01, branchClaims1And9Group02], 144, 143⟩ -private def branchClaims_1_16_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 16), group 00. -/ +def branchClaims1And16Group00 : Array NodeClaim := #[⟨4, 7397726186491686174, 36240868293278974, 70369287912692, 449, 17179869184, 0, 0, #[⟨6, [], [], [], [16]⟩]⟩, ⟨3, 7349875440450874654, 36100128657439998, 70368750998772, @@ -2702,7 +2724,8 @@ private def branchClaims_1_16_group_00 : Array NodeClaim := ⟨3, [], [168], [], []⟩, ⟨5, [], [144], [], []⟩]⟩] -private def branchClaims_1_16_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 16), group 01. -/ +def branchClaims1And16Group01 : Array NodeClaim := #[⟨4, 5155215197915393310, 36240869367012606, 211246359514222, 473, 536870912, 0, 536870912, #[⟨5, [], [264], [], []⟩]⟩, ⟨4, 5157466997729078558, 36240869367012606, 211793967846518, @@ -2822,9 +2845,10 @@ private def branchClaims_1_16_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (1, 16). -/ def branchClaims1Row16 : BranchClaims := - ⟨#[branchClaims_1_16_group_00, branchClaims_1_16_group_01], 92, 91⟩ + ⟨#[branchClaims1And16Group00, branchClaims1And16Group01], 92, 91⟩ -private def branchClaims_1_17_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 17), group 00. -/ +def branchClaims1And17Group00 : Array NodeClaim := #[⟨4, 7397726185422138654, 36240868293278974, 140738032073972, 83, 17179869184, 0, 17179869184, #[⟨6, [], [708], [], []⟩]⟩, ⟨3, 7349875439381327134, 36240866145762558, 6837492, @@ -3021,7 +3045,8 @@ private def branchClaims_1_17_group_00 : Array NodeClaim := ⟨3, 5116090159480253726, 36240866145787134, 36170084269970468, 506, 0, 64, 0, #[⟨1, [5], [], [], []⟩]⟩] -private def branchClaims_1_17_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 17), group 01. -/ +def branchClaims1And17Group01 : Array NodeClaim := #[⟨3, 5404320535631965470, 36240867219528958, 36170084265777192, 507, 0, 8, 0, #[⟨0, [5], [], [], []⟩]⟩, ⟨3, 7638105950807731486, 36240867219537084, 36240453546825760, @@ -3239,7 +3264,8 @@ private def branchClaims_1_17_group_01 : Array NodeClaim := ⟨4, 6018779886107307294, 36240867219537150, 211106780437686, 298, 17179869184, 0, 17179869184, #[⟨6, [], [249], [], []⟩]⟩] -private def branchClaims_1_17_group_02 : Array NodeClaim := +/-- Coverage claims for branch (1, 17), group 02. -/ +def branchClaims1And17Group02 : Array NodeClaim := #[⟨3, 5980780764251368734, 36240867219504382, 211106772047920, 98, 8, 0, 0, #[⟨0, [], [], [127], []⟩]⟩, ⟨4, 6451125450334874910, 36240867219537150, 211108122594492, @@ -3286,9 +3312,10 @@ private def branchClaims_1_17_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (1, 17). -/ def branchClaims1Row17 : BranchClaims := - ⟨#[branchClaims_1_17_group_00, branchClaims_1_17_group_01, branchClaims_1_17_group_02], 138, 137⟩ + ⟨#[branchClaims1And17Group00, branchClaims1And17Group01, branchClaims1And17Group02], 138, 137⟩ -private def branchClaims_1_18_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 18), group 00. -/ +def branchClaims1And18Group00 : Array NodeClaim := #[⟨4, 5167881543939599646, 36240868284890366, 36170222507947126, 165, 0, 0, 0, #[]⟩, ⟨3, 5116090148224838942, 36240866137406718, 36028797019518070, @@ -3544,7 +3571,8 @@ private def branchClaims_1_18_group_00 : Array NodeClaim := ⟨5, [], [136], [], []⟩, ⟨6, [], [], [62], []⟩]⟩] -private def branchClaims_1_18_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 18), group 01. -/ +def branchClaims1And18Group01 : Array NodeClaim := #[⟨4, 3714063290319580446, 36240868284890366, 36099578083719354, 97, 0, 0, 0, #[]⟩, ⟨3, 3674938268556799262, 36240866137406718, 36099578083684400, @@ -3703,9 +3731,10 @@ private def branchClaims_1_18_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (1, 18). -/ def branchClaims1Row18 : BranchClaims := - ⟨#[branchClaims_1_18_group_00, branchClaims_1_18_group_01], 106, 105⟩ + ⟨#[branchClaims1And18Group00, branchClaims1And18Group01], 106, 105⟩ -private def branchClaims_1_19_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 19), group 00. -/ +def branchClaims1And19Group00 : Array NodeClaim := #[⟨3, 7638105682392198430, 36240180020575486, 211106772057184, 102, 147456, 0, 147456, #[⟨2, [], [1209], [], []⟩, ⟨3, [], [850], [], []⟩]⟩, @@ -3914,7 +3943,8 @@ private def branchClaims_1_19_group_00 : Array NodeClaim := ⟨4, 7681171492895272222, 36240594489113852, 36240453824695464, 616, 0, 0, 0, #[]⟩] -private def branchClaims_1_19_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 19), group 01. -/ +def branchClaims1And19Group01 : Array NodeClaim := #[⟨3, 7638105821458541854, 36240592341630188, 36239903800445984, 615, 131328, 0, 256, #[⟨1, [], [425], [], []⟩, ⟨3, [], [], [63], []⟩]⟩, @@ -4086,9 +4116,10 @@ private def branchClaims_1_19_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (1, 19). -/ def branchClaims1Row19 : BranchClaims := - ⟨#[branchClaims_1_19_group_00, branchClaims_1_19_group_01], 117, 116⟩ + ⟨#[branchClaims1And19Group00, branchClaims1And19Group01], 117, 116⟩ -private def branchClaims_1_26_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 26), group 00. -/ +def branchClaims1And26Group00 : Array NodeClaim := #[⟨4, 6463792214034230558, 36240867219537150, 141150085722348, 627, 268435456, 0, 0, #[⟨5, [], [], [], [20]⟩]⟩, ⟨3, 6413126718226312478, 36240317463723262, 275146879212, @@ -4302,7 +4333,8 @@ private def branchClaims_1_26_group_00 : Array NodeClaim := ⟨2, 867070782750, 36240319598591212, 36099165763670248, 634, 0, 0, 0, #[]⟩] -private def branchClaims_1_26_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 26), group 01. -/ +def branchClaims1And26Group01 : Array NodeClaim := #[⟨3, 5116089910619680030, 36240318529076462, 211106769960036, 641, 131072, 0, 131072, #[⟨3, [], [1215], [], []⟩]⟩, ⟨3, 6124896227150671134, 36240318529076476, 211381648898148, @@ -4473,6 +4505,6 @@ private def branchClaims_1_26_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (1, 26). -/ def branchClaims1Row26 : BranchClaims := - ⟨#[branchClaims_1_26_group_00, branchClaims_1_26_group_01], 117, 116⟩ + ⟨#[branchClaims1And26Group00, branchClaims1And26Group01], 117, 116⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData01.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData01.lean index c5dce949a2..edfa906a78 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData01.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData01.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_1_27_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 27), group 00. -/ +def branchClaims1And27Group00 : Array NodeClaim := #[⟨4, 8401747427617549598, 36240868293278974, 71056215257324, 245, 268435456, 0, 0, #[⟨5, [], [], [], [58]⟩]⟩, ⟨3, 8358681756180819230, 36240866145795310, 70506191007844, @@ -200,7 +208,8 @@ private def branchClaims_1_27_group_00 : Array NodeClaim := 249, 16392, 0, 16384, #[⟨0, [], [], [62], []⟩, ⟨2, [], [636], [], []⟩]⟩] -private def branchClaims_1_27_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 27), group 01. -/ +def branchClaims1And27Group01 : Array NodeClaim := #[⟨2, 998339915038, 36240869354421372, 211244208885792, 242, 147528, 0, 147456, #[⟨0, [], [], [61], []⟩, ⟨1, [], [], [63], []⟩, @@ -398,7 +407,8 @@ private def branchClaims_1_27_group_01 : Array NodeClaim := ⟨3, 5116089635527863582, 36240867219537006, 550298483716, 682, 0, 0, 0, #[]⟩] -private def branchClaims_1_27_group_02 : Array NodeClaim := +/-- Coverage claims for branch (1, 27), group 02. -/ +def branchClaims1And27Group02 : Array NodeClaim := #[⟨4, 8180507706976775454, 36240867219537150, 71331363732516, 700, 262144, 0, 262144, #[⟨3, [], [467], [], []⟩]⟩, ⟨3, 8142508585120836894, 36240867219537020, 71331355310112, @@ -515,9 +525,10 @@ private def branchClaims_1_27_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (1, 27). -/ def branchClaims1Row27 : BranchClaims := - ⟨#[branchClaims_1_27_group_00, branchClaims_1_27_group_01, branchClaims_1_27_group_02], 164, 163⟩ + ⟨#[branchClaims1And27Group00, branchClaims1And27Group01, branchClaims1And27Group02], 164, 163⟩ -private def branchClaims_1_28_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 28), group 00. -/ +def branchClaims1And28Group00 : Array NodeClaim := #[⟨2, 847783275806, 36099991218486510, 36028797019508836, 104, 25769803776, 0, 25769803776, #[⟨6, [], [428, 448], [], []⟩]⟩, ⟨3, 8646912149514497310, 36100131866082542, 36099442520641640, @@ -743,7 +754,8 @@ private def branchClaims_1_28_group_00 : Array NodeClaim := ⟨4, 7181553403864165662, 36240868293278958, 36099441185847396, 292, 131072, 0, 0, #[⟨3, [], [], [], [80]⟩]⟩] -private def branchClaims_1_28_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 28), group 01. -/ +def branchClaims1And28Group01 : Array NodeClaim := #[⟨3, 7133702657823354142, 36100128657439982, 36099440648933476, 252, 17448304640, 131136, 17179869184, #[⟨1, [5], [], [], []⟩, ⟨3, [5], [], [], []⟩, @@ -914,9 +926,10 @@ private def branchClaims_1_28_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (1, 28). -/ def branchClaims1Row28 : BranchClaims := - ⟨#[branchClaims_1_28_group_00, branchClaims_1_28_group_01], 120, 119⟩ + ⟨#[branchClaims1And28Group00, branchClaims1And28Group01], 120, 119⟩ -private def branchClaims_1_29_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 29), group 00. -/ +def branchClaims1And29Group00 : Array NodeClaim := #[⟨4, 5456111795538373918, 36240594489113854, 36169672752134254, 37, 0, 0, 0, #[]⟩, ⟨3, 5404320399823613214, 36240042585816318, 36028797019519086, @@ -1139,7 +1152,8 @@ private def branchClaims_1_29_group_00 : Array NodeClaim := ⟨5, [6], [900, 171, 171], [], []⟩, ⟨6, [], [900], [], []⟩]⟩] -private def branchClaims_1_29_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 29), group 01. -/ +def branchClaims1And29Group01 : Array NodeClaim := #[⟨1, 3034721566, 36240591263693868, 140737492025344, 704, 369459876, 88, 369427108, #[⟨0, [6, 6], [199], [], []⟩, ⟨1, [6], [204, 43, 61], [], []⟩, @@ -1163,9 +1177,10 @@ private def branchClaims_1_29_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (1, 29). -/ def branchClaims1Row29 : BranchClaims := - ⟨#[branchClaims_1_29_group_00, branchClaims_1_29_group_01], 67, 66⟩ + ⟨#[branchClaims1And29Group00, branchClaims1And29Group01], 67, 66⟩ -private def branchClaims_1_30_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 30), group 00. -/ +def branchClaims1And30Group00 : Array NodeClaim := #[⟨4, 7180427521651387678, 36240869362826494, 70370625893610, 152, 8589934592, 0, 0, #[⟨6, [], [], [], [25]⟩]⟩, ⟨4, 7184368171325336862, 36240869362826494, 71057821667562, @@ -1369,7 +1384,8 @@ private def branchClaims_1_30_group_00 : Array NodeClaim := 794, 16704, 0, 16384, #[⟨1, [], [], [61, 62], []⟩, ⟨2, [], [456], [], []⟩]⟩] -private def branchClaims_1_30_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 30), group 01. -/ +def branchClaims1And30Group01 : Array NodeClaim := #[⟨4, 5155215172095716638, 36240869358632190, 211244477369518, 799, 8589934592, 0, 8589934592, #[⟨6, [], [243], [], []⟩]⟩, ⟨3, 5116090150332935454, 36240867211148542, 211244477334564, @@ -1577,7 +1593,8 @@ private def branchClaims_1_30_group_01 : Array NodeClaim := ⟨4, 6171621210723986718, 36240319611206908, 36240180012158052, 829, 0, 0, 0, #[]⟩] -private def branchClaims_1_30_group_02 : Array NodeClaim := +/-- Coverage claims for branch (1, 30), group 02. -/ +def branchClaims1And30Group02 : Array NodeClaim := #[⟨4, 6174998910444514590, 36240869358632188, 36240317449017444, 829, 0, 0, 0, #[]⟩, ⟨3, 6124896364590017822, 36240319602810108, 36099442521671780, @@ -1782,7 +1799,8 @@ private def branchClaims_1_30_group_02 : Array NodeClaim := ⟨3, 5116090146088299806, 36240867219496174, 211244480463972, 798, 320, 0, 0, #[⟨1, [], [], [189, 190], []⟩]⟩] -private def branchClaims_1_30_group_03 : Array NodeClaim := +/-- Coverage claims for branch (1, 30), group 03. -/ +def branchClaims1And30Group03 : Array NodeClaim := #[⟨4, 5442319644095950110, 36240867215334638, 211245562596590, 860, 536870912, 0, 0, #[⟨5, [], [], [], [30]⟩]⟩, ⟨4, 5445697343816477982, 36240867215334654, 211795310024938, @@ -1962,7 +1980,8 @@ private def branchClaims_1_30_group_03 : Array NodeClaim := ⟨3, [1], [], [], []⟩, ⟨5, [], [], [254], []⟩]⟩] -private def branchClaims_1_30_group_04 : Array NodeClaim := +/-- Coverage claims for branch (1, 30), group 04. -/ +def branchClaims1And30Group04 : Array NodeClaim := #[⟨2, 841351703838, 36240317463715054, 36099166571069440, 792, 16794058, 0, 16777674, #[⟨0, [], [377, 160], [], []⟩, ⟨1, [], [160, 377, 377], [], []⟩, @@ -2036,10 +2055,11 @@ private def branchClaims_1_30_group_04 : Array NodeClaim := /-- Flat postorder claims for branch (1, 30). -/ def branchClaims1Row30 : BranchClaims := - ⟨#[branchClaims_1_30_group_00, branchClaims_1_30_group_01, branchClaims_1_30_group_02, - branchClaims_1_30_group_03, branchClaims_1_30_group_04], 275, 274⟩ + ⟨#[branchClaims1And30Group00, branchClaims1And30Group01, branchClaims1And30Group02, + branchClaims1And30Group03, branchClaims1And30Group04], 275, 274⟩ -private def branchClaims_1_31_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 31), group 00. -/ +def branchClaims1And31Group00 : Array NodeClaim := #[⟨4, 7395755877765491998, 36240869358632190, 140740443796714, 909, 8589934592, 0, 0, #[⟨6, [], [], [], [63]⟩]⟩, ⟨3, 7349875456561655070, 36240869358599422, 2955433032, @@ -2264,7 +2284,8 @@ private def branchClaims_1_31_group_00 : Array NodeClaim := ⟨3, 5404319994449767710, 36240869358599422, 550563761224, 933, 512, 128, 512, #[⟨1, [7], [1079], [], []⟩]⟩] -private def branchClaims_1_31_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 31), group 01. -/ +def branchClaims1And31Group01 : Array NodeClaim := #[⟨2, 441605172510, 36240868284857596, 550563742720, 790, 537412416, 128, 537412352, #[⟨1, [6], [169, 173], [63], []⟩, ⟨2, [], [169], [], []⟩, @@ -2461,7 +2482,8 @@ private def branchClaims_1_31_group_01 : Array NodeClaim := 246, 16392, 0, 16384, #[⟨0, [], [], [126], []⟩, ⟨2, [], [349], [], []⟩]⟩] -private def branchClaims_1_31_group_02 : Array NodeClaim := +/-- Coverage claims for branch (1, 31), group 02. -/ +def branchClaims1And31Group02 : Array NodeClaim := #[⟨3, 6124896474401090846, 36240868293246076, 211519362568196, 834, 64, 0, 64, #[⟨1, [], [620], [], []⟩]⟩, ⟨2, 981177216286, 36240868293245996, 211244479418368, @@ -2652,7 +2674,8 @@ private def branchClaims_1_31_group_02 : Array NodeClaim := ⟨3, 7349875432956112158, 36240868293278958, 36029347587965952, 982, 640, 64, 640, #[⟨1, [5], [282, 119], [], []⟩]⟩] -private def branchClaims_1_31_group_03 : Array NodeClaim := +/-- Coverage claims for branch (1, 31), group 03. -/ +def branchClaims1And31Group03 : Array NodeClaim := #[⟨3, 8214566561411247390, 36240868293278958, 36029759898537984, 983, 33284, 33554504, 33284, #[⟨0, [5], [111], [], []⟩, ⟨1, [5], [119], [], []⟩, @@ -2844,10 +2867,11 @@ private def branchClaims_1_31_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (1, 31). -/ def branchClaims1Row31 : BranchClaims := - ⟨#[branchClaims_1_31_group_00, branchClaims_1_31_group_01, branchClaims_1_31_group_02, - branchClaims_1_31_group_03], 250, 249⟩ + ⟨#[branchClaims1And31Group00, branchClaims1And31Group01, branchClaims1And31Group02, + branchClaims1And31Group03], 250, 249⟩ -private def branchClaims_1_32_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 32), group 00. -/ +def branchClaims1And32Group00 : Array NodeClaim := #[⟨3, 7638105819293691166, 36100131878665278, 36028798898568224, 1013, 0, 8589950976, 0, #[⟨2, [5], [], [], []⟩, ⟨6, [0], [], [], []⟩]⟩, @@ -3079,7 +3103,8 @@ private def branchClaims_1_32_group_00 : Array NodeClaim := ⟨4, 7687926755148442910, 36240869362826494, 36170086144863392, 541, 8192, 0, 8192, #[⟨2, [], [1296], [], []⟩]⟩] -private def branchClaims_1_32_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 32), group 01. -/ +def branchClaims1And32Group01 : Array NodeClaim := #[⟨3, 7638105684270656798, 36240731923873006, 36028798900694016, 1058, 524288, 16384, 0, #[⟨2, [5], [], [], []⟩, ⟨3, [], [], [63], []⟩]⟩, @@ -3316,7 +3341,8 @@ private def branchClaims_1_32_group_01 : Array NodeClaim := 949, 0, 16392, 0, #[⟨0, [5], [], [], []⟩, ⟨2, [5], [], [], []⟩]⟩] -private def branchClaims_1_32_group_02 : Array NodeClaim := +/-- Coverage claims for branch (1, 32), group 02. -/ +def branchClaims1And32Group02 : Array NodeClaim := #[⟨3, 6124896227157355806, 36240731919662332, 36169812339591268, 950, 0, 256, 0, #[⟨1, [5], [], [], []⟩]⟩, ⟨4, 7391252147378597150, 36240731919678718, 36240455962770592, @@ -3525,7 +3551,8 @@ private def branchClaims_1_32_group_02 : Array NodeClaim := ⟨4, 3712937390413196574, 36240869367020734, 36099578352153638, 848, 0, 0, 0, #[]⟩] -private def branchClaims_1_32_group_03 : Array NodeClaim := +/-- Coverage claims for branch (1, 32), group 03. -/ +def branchClaims1And32Group03 : Array NodeClaim := #[⟨4, 3714063290320039198, 36240869358632126, 36099580499638314, 733, 0, 0, 0, #[]⟩, ⟨3, 3674938268557258014, 36240869358631998, 36099578352119840, @@ -3712,10 +3739,11 @@ private def branchClaims_1_32_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (1, 32). -/ def branchClaims1Row32 : BranchClaims := - ⟨#[branchClaims_1_32_group_00, branchClaims_1_32_group_01, branchClaims_1_32_group_02, - branchClaims_1_32_group_03], 246, 245⟩ + ⟨#[branchClaims1And32Group00, branchClaims1And32Group01, branchClaims1And32Group02, + branchClaims1And32Group03], 246, 245⟩ -private def branchClaims_1_33_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 33), group 00. -/ +def branchClaims1And33Group00 : Array NodeClaim := #[⟨3, 5404320399824006430, 36240044733267198, 36028798630107246, 1130, 8589934592, 33554432, 8589934592, #[⟨5, [4], [], [], []⟩, ⟨6, [], [350], [], []⟩]⟩, @@ -3944,7 +3972,8 @@ private def branchClaims_1_33_group_00 : Array NodeClaim := ⟨4, 6139251433287462174, 36240319611206910, 36169535047906422, 12, 0, 0, 0, #[]⟩] -private def branchClaims_1_33_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 33), group 01. -/ +def branchClaims1And33Group01 : Array NodeClaim := #[⟨3, 6124896209475218718, 36240182172253438, 36169535047894084, 1165, 128, 131088, 0, #[⟨0, [5], [], [], []⟩, ⟨1, [], [], [63], []⟩, @@ -4170,7 +4199,8 @@ private def branchClaims_1_33_group_01 : Array NodeClaim := ⟨3, 6413126718485703966, 36240869367004412, 36169536386895948, 705, 0, 0, 0, #[]⟩] -private def branchClaims_1_33_group_02 : Array NodeClaim := +/-- Coverage claims for branch (1, 33), group 02. -/ +def branchClaims1And33Group02 : Array NodeClaim := #[⟨4, 8181633997158755614, 36240869367004414, 36240043375368428, 37, 0, 0, 0, #[]⟩, ⟨3, 8142508975395974430, 36240869367004412, 36240041227849828, @@ -4364,7 +4394,8 @@ private def branchClaims_1_33_group_02 : Array NodeClaim := 406, 128, 264, 128, #[⟨0, [5], [], [], []⟩, ⟨1, [5], [282], [], []⟩]⟩] -private def branchClaims_1_33_group_03 : Array NodeClaim := +/-- Coverage claims for branch (1, 33), group 03. -/ +def branchClaims1And33Group03 : Array NodeClaim := #[⟨3, 8142508966839594270, 36240869362818302, 36240041230991456, 1208, 134218072, 131072, 134218072, #[⟨0, [], [119, 106], [], []⟩, ⟨1, [], [119, 119], [], []⟩, @@ -4509,7 +4540,7 @@ private def branchClaims_1_33_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (1, 33). -/ def branchClaims1Row33 : BranchClaims := - ⟨#[branchClaims_1_33_group_00, branchClaims_1_33_group_01, branchClaims_1_33_group_02, - branchClaims_1_33_group_03], 232, 231⟩ + ⟨#[branchClaims1And33Group00, branchClaims1And33Group01, branchClaims1And33Group02, + branchClaims1And33Group03], 232, 231⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData02.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData02.lean index 98bc910b05..261b89d839 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData02.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData02.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_1_34_group_00 : Array NodeClaim := +/-- Coverage claims for branch (1, 34), group 00. -/ +def branchClaims1And34Group00 : Array NodeClaim := #[⟨3, 5404320399824530718, 36240867219504382, 36028934458447982, 61, 33554432, 0, 33554432, #[⟨5, [], [331], [], []⟩]⟩, ⟨3, 7638105815000296734, 36240867219504382, 36099303739504676, @@ -250,7 +258,8 @@ private def branchClaims_1_34_group_00 : Array NodeClaim := 79, 131072, 16384, 0, #[⟨2, [3], [], [], []⟩, ⟨3, [], [], [62], []⟩]⟩] -private def branchClaims_1_34_group_01 : Array NodeClaim := +/-- Coverage claims for branch (1, 34), group 01. -/ +def branchClaims1And34Group01 : Array NodeClaim := #[⟨3, 6413126310212676894, 36240867211148542, 211381381506088, 290, 16640, 0, 16640, #[⟨1, [], [118], [], []⟩, ⟨2, [], [450], [], []⟩]⟩, @@ -417,9 +426,10 @@ private def branchClaims_1_34_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (1, 34). -/ def branchClaims1Row34 : BranchClaims := - ⟨#[branchClaims_1_34_group_00, branchClaims_1_34_group_01], 105, 104⟩ + ⟨#[branchClaims1And34Group00, branchClaims1And34Group01], 105, 104⟩ -private def branchClaims_2_1_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 1), group 00. -/ +def branchClaims2And1Group00 : Array NodeClaim := #[⟨3, 8214566560345056542, 36100128657439998, 70368745257190, 1241, 21474836480, 0, 21474836480, #[⟨6, [], [1303, 883], [], []⟩]⟩, ⟨4, 8697014670427120926, 36240867219537150, 71056745347302, @@ -629,7 +639,8 @@ private def branchClaims_2_1_group_00 : Array NodeClaim := ⟨4, 8686600096808920350, 36240869367020782, 70507000498414, 1289, 536870912, 0, 536870912, #[⟨5, [], [792], [], []⟩]⟩] -private def branchClaims_2_1_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 1), group 01. -/ +def branchClaims2And1Group01 : Array NodeClaim := #[⟨3, 8646912125092717854, 36240867219537134, 70506991585378, 1288, 4096, 0, 0, #[⟨2, [], [], [63], []⟩]⟩, ⟨2, 840541365534, 36240591267888366, 3147874, @@ -802,9 +813,10 @@ private def branchClaims_2_1_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 1). -/ def branchClaims2Row1 : BranchClaims := - ⟨#[branchClaims_2_1_group_00, branchClaims_2_1_group_01], 110, 109⟩ + ⟨#[branchClaims2And1Group00, branchClaims2And1Group01], 110, 109⟩ -private def branchClaims_2_2_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 2), group 00. -/ +def branchClaims2And2Group00 : Array NodeClaim := #[⟨4, 8262980118902433054, 212072348056830, 211106244622566, 115, 17179869184, 0, 17179869184, #[⟨6, [], [818], [], []⟩]⟩, ⟨4, 8266357818622960926, 212072348056830, 211793696815334, @@ -1029,7 +1041,8 @@ private def branchClaims_2_2_group_00 : Array NodeClaim := ⟨4, 8257632094865024286, 212071811185918, 211793698912490, 1296, 4294967296, 0, 4294967296, #[⟨6, [], [1176], [], []⟩]⟩] -private def branchClaims_2_2_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 2), group 01. -/ +def branchClaims2And2Group01 : Array NodeClaim := #[⟨3, 8214566423428293918, 212069663702254, 211243674663010, 1295, 135168, 0, 4096, #[⟨2, [], [279], [], []⟩, ⟨3, [], [], [63], []⟩]⟩, @@ -1226,9 +1239,10 @@ private def branchClaims_2_2_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 2). -/ def branchClaims2Row2 : BranchClaims := - ⟨#[branchClaims_2_2_group_00, branchClaims_2_2_group_01], 115, 114⟩ + ⟨#[branchClaims2And2Group00, branchClaims2And2Group01], 115, 114⟩ -private def branchClaims_2_3_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 3), group 00. -/ +def branchClaims2And3Group00 : Array NodeClaim := #[⟨2, 973171549470, 36240455439547646, 70368745261188, 1383, 0, 196992, 0, #[⟨1, [6, 5], [], [], []⟩, ⟨3, [6, 5], [], [], []⟩]⟩, @@ -1475,7 +1489,8 @@ private def branchClaims_2_3_group_00 : Array NodeClaim := 1434, 17179869184, 131072, 17179869184, #[⟨3, [5], [], [], []⟩, ⟨6, [], [141], [], []⟩]⟩] -private def branchClaims_2_3_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 3), group 01. -/ +def branchClaims2And3Group01 : Array NodeClaim := #[⟨3, 7566048227414992158, 36240594489105646, 70368759942248, 1435, 17179869184, 0, 17179869184, #[⟨6, [], [141], [], []⟩]⟩, ⟨3, 8142508979718415646, 36240867756399870, 70506198895712, @@ -1654,9 +1669,10 @@ private def branchClaims_2_3_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 3). -/ def branchClaims2Row3 : BranchClaims := - ⟨#[branchClaims_2_3_group_00, branchClaims_2_3_group_01], 112, 111⟩ + ⟨#[branchClaims2And3Group00, branchClaims2And3Group01], 112, 111⟩ -private def branchClaims_2_4_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 4), group 00. -/ +def branchClaims2And4Group00 : Array NodeClaim := #[⟨3, 7638105576885675294, 36099307244944638, 70368744732902, 305, 25769803776, 0, 25769803776, #[⟨6, [], [1297, 882], [], []⟩]⟩, ⟨4, 8694762639457477918, 36240319611206910, 70509136492774, @@ -1854,7 +1870,8 @@ private def branchClaims_2_4_group_00 : Array NodeClaim := ⟨4, 5454985658037921054, 36240593952242942, 211243683575918, 493, 17179869184, 0, 17179869184, #[⟨6, [], [357], [], []⟩]⟩] -private def branchClaims_2_4_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 4), group 01. -/ +def branchClaims2And4Group01 : Array NodeClaim := #[⟨4, 5456111557944763678, 36240594489113854, 211246087960686, 1498, 8589934592, 0, 8589934592, #[⟨6, [], [366], [], []⟩]⟩, ⟨3, 5404320162230002974, 36240044196429054, 70368744732782, @@ -2048,9 +2065,10 @@ private def branchClaims_2_4_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 4). -/ def branchClaims2Row4 : BranchClaims := - ⟨#[branchClaims_2_4_group_00, branchClaims_2_4_group_01], 114, 113⟩ + ⟨#[branchClaims2And4Group00, branchClaims2And4Group01], 114, 113⟩ -private def branchClaims_2_5_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 5), group 00. -/ +def branchClaims2And5Group00 : Array NodeClaim := #[⟨4, 7688771072158819614, 212072348056830, 211106244622566, 115, 17179869184, 0, 17179869184, #[⟨6, [], [816], [], []⟩]⟩, ⟨4, 7689896972065662238, 212072348056830, 211109185878246, @@ -2251,7 +2269,8 @@ private def branchClaims_2_5_group_00 : Array NodeClaim := ⟨3, [], [111], [62], []⟩, ⟨6, [0], [], [], []⟩]⟩] -private def branchClaims_2_5_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 5), group 01. -/ +def branchClaims2And5Group01 : Array NodeClaim := #[⟨2, 733471794462, 36240181098511478, 4250688, 1336, 18253686784, 1024, 1073752064, #[⟨2, [5], [150, 150], [], []⟩, ⟨3, [], [], [61], []⟩, @@ -2499,9 +2518,10 @@ private def branchClaims_2_5_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 5). -/ def branchClaims2Row5 : BranchClaims := - ⟨#[branchClaims_2_5_group_00, branchClaims_2_5_group_01], 125, 124⟩ + ⟨#[branchClaims2And5Group00, branchClaims2And5Group01], 125, 124⟩ -private def branchClaims_2_6_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 6), group 00. -/ +def branchClaims2And6Group00 : Array NodeClaim := #[⟨3, 7638105834103465246, 36240457050160382, 70369820064960, 1395, 17179934720, 2147484672, 17179934720, #[⟨2, [5], [], [], []⟩, ⟨3, [], [286], [], []⟩, @@ -2717,7 +2737,8 @@ private def branchClaims_2_6_group_00 : Array NodeClaim := ⟨4, 6425230267066311966, 36240867219537150, 211656259975290, 1639, 4294967296, 0, 4294967296, #[⟨6, [], [1270], [], []⟩]⟩] -private def branchClaims_2_6_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 6), group 01. -/ +def branchClaims2And6Group01 : Array NodeClaim := #[⟨3, 6413126843067753758, 36240866682666238, 211656259965008, 1638, 32, 4097, 0, #[⟨0, [5], [], [], []⟩, ⟨1, [], [], [63], []⟩, @@ -2907,9 +2928,10 @@ private def branchClaims_2_6_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 6). -/ def branchClaims2Row6 : BranchClaims := - ⟨#[branchClaims_2_6_group_00, branchClaims_2_6_group_01], 109, 108⟩ + ⟨#[branchClaims2And6Group00, branchClaims2And6Group01], 109, 108⟩ -private def branchClaims_2_8_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 8), group 00. -/ +def branchClaims2And8Group00 : Array NodeClaim := #[⟨4, 7688771070821885214, 212072348056830, 211106244622566, 115, 17179869184, 0, 0, #[⟨6, [], [], [], [184]⟩]⟩, ⟨4, 7689896970728727838, 212072348056830, 211109185878246, @@ -3109,7 +3131,8 @@ private def branchClaims_2_8_group_00 : Array NodeClaim := ⟨3, 8646912026618324254, 36240319611206886, 211107053077536, 1669, 0, 0, 0, #[]⟩] -private def branchClaims_2_8_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 8), group 01. -/ +def branchClaims2And8Group01 : Array NodeClaim := #[⟨2, 742066971934, 36239906220604646, 140737503593504, 1686, 17851089152, 335544400, 134217728, #[⟨0, [6], [], [], []⟩, ⟨1, [4], [], [59], []⟩, @@ -3327,7 +3350,8 @@ private def branchClaims_2_8_group_01 : Array NodeClaim := ⟨3, 8646912155165353246, 36240869367020774, 211245016844320, 1712, 4096, 0, 4096, #[⟨2, [], [464], [], []⟩]⟩] -private def branchClaims_2_8_group_02 : Array NodeClaim := +/-- Coverage claims for branch (2, 8), group 02. -/ +def branchClaims2And8Group02 : Array NodeClaim := #[⟨2, 870614000926, 36240593952242918, 140737491535904, 1711, 17716875528, 0, 4104, #[⟨0, [], [373], [], []⟩, ⟨1, [], [], [123], []⟩, @@ -3486,9 +3510,10 @@ private def branchClaims_2_8_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (2, 8). -/ def branchClaims2Row8 : BranchClaims := - ⟨#[branchClaims_2_8_group_00, branchClaims_2_8_group_01, branchClaims_2_8_group_02], 164, 163⟩ + ⟨#[branchClaims2And8Group00, branchClaims2And8Group01, branchClaims2And8Group02], 164, 163⟩ -private def branchClaims_2_9_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 9), group 00. -/ +def branchClaims2And9Group00 : Array NodeClaim := #[⟨4, 7689896970193954078, 36240594489113854, 70509136476390, 1498, 8589934592, 0, 0, #[⟨6, [], [], [], [214]⟩]⟩, ⟨3, 7638105574479193374, 36099307244944638, 70368744732902, @@ -3692,7 +3717,8 @@ private def branchClaims_2_9_group_00 : Array NodeClaim := ⟨4, 3726729570620237086, 36240594489113846, 36169674377442402, 1727, 0, 0, 0, #[]⟩] -private def branchClaims_2_9_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 9), group 01. -/ +def branchClaims2And9Group01 : Array NodeClaim := #[⟨3, 3674938174905476382, 36240044196429046, 36028797034214498, 1596, 17179869184, 131072, 0, #[⟨3, [5], [], [], []⟩, ⟨6, [], [], [63], []⟩]⟩, @@ -3934,7 +3960,8 @@ private def branchClaims_2_9_group_01 : Array NodeClaim := ⟨5, [], [61, 61, 61], [113, 114], []⟩, ⟨6, [], [], [125, 126], []⟩]⟩] -private def branchClaims_2_9_group_02 : Array NodeClaim := +/-- Coverage claims for branch (2, 9), group 02. -/ +def branchClaims2And9Group02 : Array NodeClaim := #[⟨3, 8214565908576953630, 36100128657439982, 36099440646322274, 1303, 21474836480, 135168, 21474836480, #[⟨2, [5], [], [], []⟩, ⟨3, [5], [], [], []⟩, @@ -4146,9 +4173,10 @@ private def branchClaims_2_9_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (2, 9). -/ def branchClaims2Row9 : BranchClaims := - ⟨#[branchClaims_2_9_group_00, branchClaims_2_9_group_01, branchClaims_2_9_group_02], 182, 181⟩ + ⟨#[branchClaims2And9Group00, branchClaims2And9Group01, branchClaims2And9Group02], 182, 181⟩ -private def branchClaims_2_10_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 10), group 00. -/ +def branchClaims2And10Group00 : Array NodeClaim := #[⟨2, 870573499678, 36240594480725116, 137707427872, 1803, 4328542216, 0, 4328542216, #[⟨0, [], [162], [], []⟩, ⟨2, [], [162, 162], [], []⟩, @@ -4232,9 +4260,10 @@ private def branchClaims_2_10_group_00 : Array NodeClaim := /-- Flat postorder claims for branch (2, 10). -/ def branchClaims2Row10 : BranchClaims := - ⟨#[branchClaims_2_10_group_00], 15, 14⟩ + ⟨#[branchClaims2And10Group00], 15, 14⟩ -private def branchClaims_2_11_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 11), group 00. -/ +def branchClaims2And11Group00 : Array NodeClaim := #[⟨2, 870575596830, 36240868821761148, 1342216256, 1808, 8623499268, 0, 8623499268, #[⟨0, [], [150], [], []⟩, ⟨2, [], [150, 150], [], []⟩, @@ -4322,9 +4351,10 @@ private def branchClaims_2_11_group_00 : Array NodeClaim := /-- Flat postorder claims for branch (2, 11). -/ def branchClaims2Row11 : BranchClaims := - ⟨#[branchClaims_2_11_group_00], 15, 14⟩ + ⟨#[branchClaims2And11Group00], 15, 14⟩ -private def branchClaims_2_12_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 12), group 00. -/ +def branchClaims2And12Group00 : Array NodeClaim := #[⟨2, 732067095838, 212071265926396, 70371160111104, 1814, 20488, 10240, 20488, #[⟨0, [], [162], [], []⟩, ⟨2, [6, 6], [375, 378], [], []⟩]⟩, @@ -4450,9 +4480,10 @@ private def branchClaims_2_12_group_00 : Array NodeClaim := /-- Flat postorder claims for branch (2, 12). -/ def branchClaims2Row12 : BranchClaims := - ⟨#[branchClaims_2_12_group_00], 28, 27⟩ + ⟨#[branchClaims2And12Group00], 28, 27⟩ -private def branchClaims_2_14_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 14), group 00. -/ +def branchClaims2And14Group00 : Array NodeClaim := #[⟨3, 8214566044957238558, 212072348024062, 70368745249004, 1320, 21508390912, 0, 21508390912, #[⟨5, [], [855], [], []⟩, ⟨6, [], [138, 138], [], []⟩]⟩, @@ -4676,7 +4707,8 @@ private def branchClaims_2_14_group_00 : Array NodeClaim := ⟨5, [], [], [61], []⟩, ⟨6, [], [], [62], []⟩]⟩] -private def branchClaims_2_14_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 14), group 01. -/ +def branchClaims2And14Group01 : Array NodeClaim := #[⟨1, 2997445918, 211796388003052, 140737488359456, 1845, 5748591140, 5247049, 1084524580, #[⟨0, [6, 6], [199], [], []⟩, ⟨1, [6], [206], [44], []⟩, @@ -4933,6 +4965,6 @@ private def branchClaims_2_14_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 14). -/ def branchClaims2Row14 : BranchClaims := - ⟨#[branchClaims_2_14_group_00, branchClaims_2_14_group_01], 120, 119⟩ + ⟨#[branchClaims2And14Group00, branchClaims2And14Group01], 120, 119⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData03.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData03.lean index e87af6dbf6..5c358a508d 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData03.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData03.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_2_15_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 15), group 00. -/ +def branchClaims2And15Group00 : Array NodeClaim := #[⟨4, 8266357303235142942, 36240869366988030, 71058892798188, 1868, 33554432, 0, 33554432, #[⟨5, [], [785], [], []⟩]⟩, ⟨3, 8214565907520382238, 36100131878632702, 70368745240812, @@ -236,7 +244,8 @@ private def branchClaims_2_15_group_00 : Array NodeClaim := 1895, 17179869184, 2147500032, 0, #[⟨2, [5], [], [], []⟩, ⟨6, [5], [], [62], []⟩]⟩] -private def branchClaims_2_15_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 15), group 01. -/ +def branchClaims2And15Group01 : Array NodeClaim := #[⟨3, 4107283576662877470, 36240869367020796, 36028797289534568, 254, 0, 16384, 0, #[⟨2, [5], [], [], []⟩]⟩, ⟨4, 7654149758193853726, 36240869367020796, 36099167644351592, @@ -505,7 +514,8 @@ private def branchClaims_2_15_group_01 : Array NodeClaim := ⟨5, [], [417, 144], [], []⟩, ⟨6, [], [417, 145], [], []⟩]⟩] -private def branchClaims_2_15_group_02 : Array NodeClaim := +/-- Coverage claims for branch (2, 15), group 02. -/ +def branchClaims2And15Group02 : Array NodeClaim := #[⟨3, 3098477260635202846, 36240869367004398, 36239903253605480, 1919, 2147500288, 0, 2147500288, #[⟨1, [], [576], [], []⟩, ⟨2, [], [583], [], []⟩, @@ -554,9 +564,10 @@ private def branchClaims_2_15_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (2, 15). -/ def branchClaims2Row15 : BranchClaims := - ⟨#[branchClaims_2_15_group_00, branchClaims_2_15_group_01, branchClaims_2_15_group_02], 135, 134⟩ + ⟨#[branchClaims2And15Group00, branchClaims2And15Group01, branchClaims2And15Group02], 135, 134⟩ -private def branchClaims_2_17_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 17), group 00. -/ +def branchClaims2And17Group00 : Array NodeClaim := #[⟨3, 7638105575014884638, 212072348024062, 70368744724724, 1528, 25803358208, 0, 25803358208, #[⟨5, [], [855], [], []⟩, ⟨6, [], [140, 140], [], []⟩]⟩, @@ -777,7 +788,8 @@ private def branchClaims_2_17_group_00 : Array NodeClaim := ⟨3, 5980781047215908126, 36240868293270774, 140737503581296, 1929, 0, 64, 0, #[⟨1, [5], [], [], []⟩]⟩] -private def branchClaims_2_17_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 17), group 01. -/ +def branchClaims2And17Group01 : Array NodeClaim := #[⟨3, 6413126611443475742, 36240869367012604, 140737771996272, 1930, 0, 64, 0, #[⟨1, [5], [], [], []⟩]⟩, ⟨3, 7638105710088250654, 36240594489113844, 211106784627744, @@ -1037,9 +1049,10 @@ private def branchClaims_2_17_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 17). -/ def branchClaims2Row17 : BranchClaims := - ⟨#[branchClaims_2_17_group_00, branchClaims_2_17_group_01], 124, 123⟩ + ⟨#[branchClaims2And17Group00, branchClaims2And17Group01], 124, 123⟩ -private def branchClaims_2_18_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 18), group 00. -/ +def branchClaims2And18Group00 : Array NodeClaim := #[⟨4, 7689896970194871582, 36240869366988030, 71058892273908, 1951, 33554432, 0, 33554432, #[⟨5, [], [785], [], []⟩]⟩, ⟨3, 7638105574480110878, 36100131878632702, 70368744716532, @@ -1267,7 +1280,8 @@ private def branchClaims_2_18_group_00 : Array NodeClaim := ⟨5, [], [318], [], []⟩, ⟨6, [], [998], [], []⟩]⟩] -private def branchClaims_2_18_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 18), group 01. -/ +def branchClaims2And18Group01 : Array NodeClaim := #[⟨2, 458602145054, 36099992292228340, 36099165767355456, 1373, 1073817728, 1024, 1073752064, #[⟨1, [], [], [62], []⟩, ⟨2, [5], [150, 378], [], []⟩, @@ -1530,7 +1544,8 @@ private def branchClaims_2_18_group_01 : Array NodeClaim := 1358, 65664, 0, 65536, #[⟨1, [], [], [126], []⟩, ⟨3, [], [416], [], []⟩]⟩] -private def branchClaims_2_18_group_02 : Array NodeClaim := +/-- Coverage claims for branch (2, 18), group 02. -/ +def branchClaims2And18Group02 : Array NodeClaim := #[⟨2, 733178062110, 36240868293262580, 141287247317056, 1322, 17716740096, 65664, 17716740096, #[⟨1, [6], [], [], []⟩, ⟨3, [6], [], [], []⟩, @@ -1593,9 +1608,10 @@ private def branchClaims_2_18_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (2, 18). -/ def branchClaims2Row18 : BranchClaims := - ⟨#[branchClaims_2_18_group_00, branchClaims_2_18_group_01, branchClaims_2_18_group_02], 140, 139⟩ + ⟨#[branchClaims2And18Group00, branchClaims2And18Group01, branchClaims2And18Group02], 140, 139⟩ -private def branchClaims_2_23_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 23), group 00. -/ +def branchClaims2And23Group00 : Array NodeClaim := #[⟨2, 702586447134, 211657883712758, 70368745236644, 1249, 131328, 0, 131328, #[⟨1, [], [377], [], []⟩, ⟨3, [], [380], [], []⟩]⟩, @@ -1829,7 +1845,8 @@ private def branchClaims_2_23_group_00 : Array NodeClaim := ⟨2, [], [162], [], []⟩, ⟨3, [], [], [62], []⟩]⟩] -private def branchClaims_2_23_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 23), group 01. -/ +def branchClaims2And23Group01 : Array NodeClaim := #[⟨3, 4107283739328537886, 36240594489113724, 70508066912288, 1269, 16392, 0, 16392, #[⟨0, [], [600], [], []⟩, ⟨2, [], [584], [], []⟩]⟩, @@ -2041,9 +2058,10 @@ private def branchClaims_2_23_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 23). -/ def branchClaims2Row23 : BranchClaims := - ⟨#[branchClaims_2_23_group_00, branchClaims_2_23_group_01], 120, 119⟩ + ⟨#[branchClaims2And23Group00, branchClaims2And23Group01], 120, 119⟩ -private def branchClaims_2_24_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 24), group 00. -/ +def branchClaims2And24Group00 : Array NodeClaim := #[⟨3, 8214566560353379614, 36240868293278966, 70368745289924, 1735, 21474902016, 0, 21474902016, #[⟨3, [], [632], [], []⟩, ⟨6, [], [1303, 883], [], []⟩]⟩, @@ -2283,7 +2301,8 @@ private def branchClaims_2_24_group_00 : Array NodeClaim := ⟨4, 8254254532589675806, 36240868293278958, 211245831092420, 919, 0, 0, 0, #[]⟩] -private def branchClaims_2_24_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 24), group 01. -/ +def branchClaims2And24Group01 : Array NodeClaim := #[⟨3, 8214566560873473310, 36240868293278950, 211243674695744, 2065, 135168, 0, 131072, #[⟨2, [], [], [63], []⟩, ⟨3, [], [632], [], []⟩]⟩, @@ -2453,9 +2472,10 @@ private def branchClaims_2_24_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 24). -/ def branchClaims2Row24 : BranchClaims := - ⟨#[branchClaims_2_24_group_00, branchClaims_2_24_group_01], 110, 109⟩ + ⟨#[branchClaims2And24Group00, branchClaims2And24Group01], 110, 109⟩ -private def branchClaims_2_25_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 25), group 00. -/ +def branchClaims2And25Group00 : Array NodeClaim := #[⟨4, 8266357818631283998, 36240869367020790, 211795844331684, 1007, 0, 0, 0, #[]⟩, ⟨3, 8214566422916523294, 36240868830149878, 70368745289892, @@ -2692,7 +2712,8 @@ private def branchClaims_2_25_group_00 : Array NodeClaim := ⟨5, [], [433], [], []⟩, ⟨6, [6], [145, 395, 406, 395], [], []⟩]⟩] -private def branchClaims_2_25_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 25), group 01. -/ +def branchClaims2And25Group01 : Array NodeClaim := #[⟨3, 7133702551488849182, 36240594489113702, 211108382701664, 2102, 16384, 0, 16384, #[⟨2, [], [584], [], []⟩]⟩, ⟨3, 6413126611109569822, 36240869367020668, 140740980676672, @@ -2871,9 +2892,10 @@ private def branchClaims_2_25_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 25). -/ def branchClaims2Row25 : BranchClaims := - ⟨#[branchClaims_2_25_group_00, branchClaims_2_25_group_01], 105, 104⟩ + ⟨#[branchClaims2And25Group00, branchClaims2And25Group01], 105, 104⟩ -private def branchClaims_2_26_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 26), group 00. -/ +def branchClaims2And26Group00 : Array NodeClaim := #[⟨2, 608332571934, 211520981630190, 70368744714404, 1497, 131136, 0, 131136, #[⟨1, [], [374], [], []⟩, ⟨3, [], [738], [], []⟩]⟩, @@ -3122,7 +3144,8 @@ private def branchClaims_2_26_group_00 : Array NodeClaim := ⟨3, 3098477285694661918, 36240318537464942, 70369296284704, 1491, 131072, 0, 0, #[⟨3, [], [], [62], []⟩]⟩] -private def branchClaims_2_26_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 26), group 01. -/ +def branchClaims2And26Group01 : Array NodeClaim := #[⟨3, 4107283602225653022, 36240318537464956, 70507003663392, 1493, 64, 0, 64, #[⟨1, [], [621], [], []⟩]⟩, ⟨4, 6462947682317133086, 36240869367020796, 211518833054832, @@ -3256,9 +3279,10 @@ private def branchClaims_2_26_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 26). -/ def branchClaims2Row26 : BranchClaims := - ⟨#[branchClaims_2_26_group_00, branchClaims_2_26_group_01], 98, 97⟩ + ⟨#[branchClaims2And26Group00, branchClaims2And26Group01], 98, 97⟩ -private def branchClaims_2_27_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 27), group 00. -/ +def branchClaims2And27Group00 : Array NodeClaim := #[⟨3, 7638105576893998366, 36240594489113838, 70368744765636, 1761, 25769869312, 0, 25769869312, #[⟨3, [], [603], [], []⟩, ⟨6, [], [1297, 140], [], []⟩]⟩, @@ -3483,7 +3507,8 @@ private def branchClaims_2_27_group_00 : Array NodeClaim := ⟨5, [0], [], [], []⟩, ⟨6, [0], [], [], []⟩]⟩] -private def branchClaims_2_27_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 27), group 01. -/ +def branchClaims2And27Group01 : Array NodeClaim := #[⟨4, 3140417314926781726, 36240594489113854, 36240453557861412, 2159, 65536, 0, 0, #[⟨3, [], [], [], [202]⟩]⟩, ⟨3, 3098477543396893982, 36240594489113710, 36239903792610336, @@ -3595,9 +3620,10 @@ private def branchClaims_2_27_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 27). -/ def branchClaims2Row27 : BranchClaims := - ⟨#[branchClaims_2_27_group_00, branchClaims_2_27_group_01], 90, 89⟩ + ⟨#[branchClaims2And27Group00, branchClaims2And27Group01], 90, 89⟩ -private def branchClaims_2_28_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 28), group 00. -/ +def branchClaims2And28Group00 : Array NodeClaim := #[⟨4, 7689896972073985310, 36240869367020782, 211658941724836, 952, 0, 0, 0, #[]⟩, ⟨3, 7638105576359224606, 36240731928067310, 70368744765604, @@ -3827,7 +3853,8 @@ private def branchClaims_2_28_group_00 : Array NodeClaim := ⟨4, 6462947398318712094, 36240867219537148, 211932210592880, 2184, 4096, 0, 4096, #[⟨2, [], [936], [], []⟩]⟩] -private def branchClaims_2_28_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 28), group 01. -/ +def branchClaims2And28Group01 : Array NodeClaim := #[⟨3, 6413126327440925982, 36240729780583548, 70644966423616, 2019, 786432, 20480, 0, #[⟨2, [5, 5], [], [], []⟩, ⟨3, [], [], [62, 63], []⟩]⟩, @@ -3965,9 +3992,10 @@ private def branchClaims_2_28_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 28). -/ def branchClaims2Row28 : BranchClaims := - ⟨#[branchClaims_2_28_group_00, branchClaims_2_28_group_01], 96, 95⟩ + ⟨#[branchClaims2And28Group00, branchClaims2And28Group01], 96, 95⟩ -private def branchClaims_2_29_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 29), group 00. -/ +def branchClaims2And29Group00 : Array NodeClaim := #[⟨4, 5456111555020219678, 36240594489113854, 211246087960686, 1498, 8589934592, 0, 8589934592, #[⟨6, [], [356], [], []⟩]⟩, ⟨3, 5404320159305458974, 36240044196429054, 70368744732782, @@ -4244,7 +4272,8 @@ private def branchClaims_2_29_group_00 : Array NodeClaim := ⟨2, [], [162], [], []⟩, ⟨3, [], [], [62], []⟩]⟩] -private def branchClaims_2_29_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 29), group 01. -/ +def branchClaims2And29Group01 : Array NodeClaim := #[⟨3, 3674937621091607838, 36240591804759166, 211243674663010, 1295, 135168, 0, 135168, #[⟨2, [], [584], [], []⟩, ⟨3, [], [632], [], []⟩]⟩, @@ -4398,9 +4427,10 @@ private def branchClaims_2_29_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (2, 29). -/ def branchClaims2Row29 : BranchClaims := - ⟨#[branchClaims_2_29_group_00, branchClaims_2_29_group_01], 103, 102⟩ + ⟨#[branchClaims2And29Group00, branchClaims2And29Group01], 103, 102⟩ -private def branchClaims_2_30_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 30), group 00. -/ +def branchClaims2And30Group00 : Array NodeClaim := #[⟨2, 728323613982, 212072339643646, 70369549488288, 1804, 4214856, 1, 4214856, #[⟨0, [6], [162], [], []⟩, ⟨1, [], [888], [], []⟩, @@ -4624,7 +4654,8 @@ private def branchClaims_2_30_group_00 : Array NodeClaim := ⟨2, [], [150, 150], [], []⟩, ⟨4, [], [143], [], []⟩]⟩] -private def branchClaims_2_30_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 30), group 01. -/ +def branchClaims2And30Group01 : Array NodeClaim := #[⟨1, 3514328350, 36100129722735860, 70643890520128, 1583, 6899781960, 3146771, 6446665736, #[⟨0, [7, 7, 7], [488], [], []⟩, ⟨1, [], [], [50, 51], []⟩, @@ -4809,7 +4840,8 @@ private def branchClaims_2_30_group_01 : Array NodeClaim := ⟨3, 3098477397028660510, 36240867219537006, 70506992679968, 1264, 20480, 0, 0, #[⟨2, [], [], [125, 126], []⟩]⟩] -private def branchClaims_2_30_group_02 : Array NodeClaim := +/-- Coverage claims for branch (2, 30), group 02. -/ +def branchClaims2And30Group02 : Array NodeClaim := #[⟨4, 5451889677306455326, 36240869367020782, 211245554785384, 1339, 16384, 0, 0, #[⟨2, [], [], [], [160]⟩]⟩, ⟨3, 5404320406242354462, 36240867219537006, 70507529559104, @@ -5013,7 +5045,8 @@ private def branchClaims_2_30_group_02 : Array NodeClaim := ⟨4, 5454141340251612446, 36240867219537150, 212069663116384, 2234, 0, 0, 0, #[]⟩] -private def branchClaims_2_30_group_03 : Array NodeClaim := +/-- Coverage claims for branch (2, 30), group 03. -/ +def branchClaims2And30Group03 : Array NodeClaim := #[⟨3, 5404320269373826334, 36240867219537006, 70644979993664, 2025, 786944, 536871296, 512, #[⟨1, [7, 5], [136], [], []⟩, ⟨3, [], [], [190, 191], []⟩, @@ -5068,7 +5101,7 @@ private def branchClaims_2_30_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (2, 30). -/ def branchClaims2Row30 : BranchClaims := - ⟨#[branchClaims_2_30_group_00, branchClaims_2_30_group_01, branchClaims_2_30_group_02, - branchClaims_2_30_group_03], 206, 205⟩ + ⟨#[branchClaims2And30Group00, branchClaims2And30Group01, branchClaims2And30Group02, + branchClaims2And30Group03], 206, 205⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData04.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData04.lean index 2646883ba6..d6109e0c5c 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData04.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData04.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_2_31_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 31), group 00. -/ +def branchClaims2And31Group00 : Array NodeClaim := #[⟨3, 7638105832176510238, 36240594480692478, 70510209677408, 2282, 16392, 0, 16392, #[⟨0, [], [276], [], []⟩, ⟨2, [], [843], [], []⟩]⟩, @@ -241,7 +249,8 @@ private def branchClaims_2_31_group_00 : Array NodeClaim := 2318, 4104, 0, 4104, #[⟨0, [], [276], [], []⟩, ⟨2, [], [830], [], []⟩]⟩] -private def branchClaims_2_31_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 31), group 01. -/ +def branchClaims2And31Group01 : Array NodeClaim := #[⟨2, 188202116382, 36240868284841214, 550561122400, 2317, 9177137152, 8388610, 8640266240, #[⟨0, [6], [], [], []⟩, ⟨4, [6], [143], [], []⟩, @@ -444,7 +453,8 @@ private def branchClaims_2_31_group_01 : Array NodeClaim := 2304, 805306688, 0, 256, #[⟨1, [], [377], [123], []⟩, ⟨5, [], [], [125, 126], []⟩]⟩] -private def branchClaims_2_31_group_02 : Array NodeClaim := +/-- Coverage claims for branch (2, 31), group 02. -/ +def branchClaims2And31Group02 : Array NodeClaim := #[⟨3, 3098477410253301022, 36240594489113838, 36028799975951464, 822, 9126805504, 16640, 9126805504, #[⟨1, [5], [], [], []⟩, ⟨2, [5], [], [], []⟩, @@ -667,7 +677,8 @@ private def branchClaims_2_31_group_02 : Array NodeClaim := ⟨1, [], [308], [], []⟩, ⟨2, [5], [111], [], []⟩]⟩] -private def branchClaims_2_31_group_03 : Array NodeClaim := +/-- Coverage claims for branch (2, 31), group 03. -/ +def branchClaims2And31Group03 : Array NodeClaim := #[⟨2, 879977063710, 36240594489113700, 36239905672134656, 2378, 8678, 8388608, 8198, #[⟨0, [], [143, 150], [], []⟩, ⟨1, [], [], [188, 189, 190, 191], []⟩, @@ -802,10 +813,11 @@ private def branchClaims_2_31_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (2, 31). -/ def branchClaims2Row31 : BranchClaims := - ⟨#[branchClaims_2_31_group_00, branchClaims_2_31_group_01, branchClaims_2_31_group_02, - branchClaims_2_31_group_03], 223, 222⟩ + ⟨#[branchClaims2And31Group00, branchClaims2And31Group01, branchClaims2And31Group02, + branchClaims2And31Group03], 223, 222⟩ -private def branchClaims_2_32_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 32), group 00. -/ +def branchClaims2And32Group00 : Array NodeClaim := #[⟨3, 5404320266678986014, 36240868830149758, 1344289890, 2398, 0, 20480, 0, #[⟨2, [5, 5], [], [], []⟩]⟩, ⟨2, 713834390814, 36240868830133366, 270545952, @@ -1051,7 +1063,8 @@ private def branchClaims_2_32_group_00 : Array NodeClaim := ⟨3, 8214566320307987742, 36240868821761278, 71333232777376, 2419, 33554432, 0, 33554432, #[⟨5, [], [988], [], []⟩]⟩] -private def branchClaims_2_32_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 32), group 01. -/ +def branchClaims2And32Group01 : Array NodeClaim := #[⟨2, 599984203038, 36240868821736702, 552171735200, 2307, 13455327232, 25186570, 12918456320, #[⟨0, [5, 5], [], [], []⟩, ⟨1, [5], [], [], []⟩, @@ -1261,7 +1274,8 @@ private def branchClaims_2_32_group_01 : Array NodeClaim := ⟨3, [], [437], [126], []⟩, ⟨5, [0], [], [], []⟩]⟩] -private def branchClaims_2_32_group_02 : Array NodeClaim := +/-- Coverage claims for branch (2, 32), group 02. -/ +def branchClaims2And32Group02 : Array NodeClaim := #[⟨3, 3098477285701346590, 36240731928067182, 36028799986961440, 2439, 0, 536871168, 0, #[⟨1, [5], [], [], []⟩, ⟨5, [0], [], [], []⟩]⟩, @@ -1506,7 +1520,8 @@ private def branchClaims_2_32_group_02 : Array NodeClaim := ⟨3, 3098477384183604510, 36240869367020782, 36029347046361186, 1632, 0, 4096, 0, #[⟨2, [5], [], [], []⟩]⟩] -private def branchClaims_2_32_group_03 : Array NodeClaim := +/-- Coverage claims for branch (2, 32), group 03. -/ +def branchClaims2And32Group03 : Array NodeClaim := #[⟨4, 7685675079637165342, 36240869367020782, 36240457037007072, 756, 0, 0, 0, #[]⟩, ⟨3, 7638105808573064478, 36240869367020774, 36099716864297024, @@ -1613,10 +1628,11 @@ private def branchClaims_2_32_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (2, 32). -/ def branchClaims2Row32 : BranchClaims := - ⟨#[branchClaims_2_32_group_00, branchClaims_2_32_group_01, branchClaims_2_32_group_02, - branchClaims_2_32_group_03], 219, 218⟩ + ⟨#[branchClaims2And32Group00, branchClaims2And32Group01, branchClaims2And32Group02, + branchClaims2And32Group03], 219, 218⟩ -private def branchClaims_2_33_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 33), group 00. -/ +def branchClaims2And33Group00 : Array NodeClaim := #[⟨4, 5454985655113770270, 36240594489081086, 211246904776814, 1299, 0, 0, 0, #[]⟩, ⟨3, 5404320159305852190, 36240044733267198, 70371965933678, @@ -1884,7 +1900,8 @@ private def branchClaims_2_33_group_00 : Array NodeClaim := ⟨3, [5], [], [], []⟩, ⟨6, [5], [107], [], []⟩]⟩] -private def branchClaims_2_33_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 33), group 01. -/ +def branchClaims2And33Group01 : Array NodeClaim := #[⟨3, 5980781158536340766, 36240869367012598, 36239903255712880, 1940, 1073741824, 2147487808, 1073741824, #[⟨1, [5], [], [], []⟩, ⟨2, [5], [], [], []⟩, @@ -2159,7 +2176,8 @@ private def branchClaims_2_33_group_01 : Array NodeClaim := ⟨5, [], [58], [], []⟩, ⟨6, [], [58], [], []⟩]⟩] -private def branchClaims_2_33_group_02 : Array NodeClaim := +/-- Coverage claims for branch (2, 33), group 02. -/ +def branchClaims2And33Group02 : Array NodeClaim := #[⟨4, 6023846164303471902, 36240869366988030, 211658944288890, 2492, 33554432, 0, 33554432, #[⟨5, [], [230], [], []⟩]⟩, ⟨3, 5980780492866741534, 36240869366987902, 211106772555874, @@ -2301,9 +2319,10 @@ private def branchClaims_2_33_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (2, 33). -/ def branchClaims2Row33 : BranchClaims := - ⟨#[branchClaims_2_33_group_00, branchClaims_2_33_group_01, branchClaims_2_33_group_02], 166, 165⟩ + ⟨#[branchClaims2And33Group00, branchClaims2And33Group01, branchClaims2And33Group02], 166, 165⟩ -private def branchClaims_2_34_group_00 : Array NodeClaim := +/-- Coverage claims for branch (2, 34), group 00. -/ +def branchClaims2And34Group00 : Array NodeClaim := #[⟨3, 5404320159306376478, 36240868830117118, 70506183661678, 61, 33554432, 0, 33554432, #[⟨5, [], [297], [], []⟩]⟩, ⟨2, 606461781278, 36240867756358910, 70506183659556, @@ -2586,7 +2605,8 @@ private def branchClaims_2_34_group_00 : Array NodeClaim := 2503, 4294967296, 33554432, 0, #[⟨5, [3], [], [], []⟩, ⟨6, [], [], [62], []⟩]⟩] -private def branchClaims_2_34_group_01 : Array NodeClaim := +/-- Coverage claims for branch (2, 34), group 01. -/ +def branchClaims2And34Group01 : Array NodeClaim := #[⟨2, 324638106910, 36240866682625278, 70918501042244, 1325, 65664, 0, 65536, #[⟨1, [], [], [63], []⟩, ⟨3, [], [380], [], []⟩]⟩, @@ -2817,7 +2837,8 @@ private def branchClaims_2_34_group_01 : Array NodeClaim := ⟨2, [5], [], [], []⟩, ⟨6, [], [342], [], []⟩]⟩] -private def branchClaims_2_34_group_02 : Array NodeClaim := +/-- Coverage claims for branch (2, 34), group 02. -/ +def branchClaims2And34Group02 : Array NodeClaim := #[⟨2, 325460190494, 36240866682657902, 36099165767355456, 1373, 1073817728, 1024, 1073752064, #[⟨1, [], [], [126], []⟩, ⟨2, [5], [150, 150], [], []⟩, @@ -2944,9 +2965,10 @@ private def branchClaims_2_34_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (2, 34). -/ def branchClaims2Row34 : BranchClaims := - ⟨#[branchClaims_2_34_group_00, branchClaims_2_34_group_01, branchClaims_2_34_group_02], 162, 161⟩ + ⟨#[branchClaims2And34Group00, branchClaims2And34Group01, branchClaims2And34Group02], 162, 161⟩ -private def branchClaims_3_1_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 1), group 00. -/ +def branchClaims3And1Group00 : Array NodeClaim := #[⟨3, 7782220870489727262, 36240180024753406, 211106777279584, 615, 131328, 0, 131328, #[⟨1, [], [1204], [], []⟩, ⟨3, [], [851], [], []⟩]⟩, @@ -3143,7 +3165,8 @@ private def branchClaims_3_1_group_00 : Array NodeClaim := ⟨4, 6461540006982574366, 36240731928067322, 36240178937363560, 548, 16384, 0, 16384, #[⟨2, [], [515], [], []⟩]⟩] -private def branchClaims_3_1_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 1), group 01. -/ +def branchClaims3And1Group01 : Array NodeClaim := #[⟨3, 6413126310988341534, 36240729772195066, 36099440909515880, 2526, 12884901888, 16384, 8589934592, #[⟨2, [5], [], [], []⟩, ⟨6, [], [465], [63], []⟩]⟩, @@ -3309,9 +3332,10 @@ private def branchClaims_3_1_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (3, 1). -/ def branchClaims3Row1 : BranchClaims := - ⟨#[branchClaims_3_1_group_00, branchClaims_3_1_group_01], 111, 110⟩ + ⟨#[branchClaims3And1Group00, branchClaims3And1Group01], 111, 110⟩ -private def branchClaims_3_2_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 2), group 00. -/ +def branchClaims3And2Group00 : Array NodeClaim := #[⟨3, 8646911998410088734, 36240317459528958, 211245016812640, 2517, 4352, 0, 4352, #[⟨1, [], [979], [], []⟩, ⟨2, [], [629], [], []⟩]⟩, @@ -3509,7 +3533,8 @@ private def branchClaims_3_2_group_00 : Array NodeClaim := ⟨4, 7798264946261483806, 36240867219537146, 36239905133223016, 1151, 16384, 0, 16384, #[⟨2, [], [388], [], []⟩]⟩] -private def branchClaims_3_2_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 2), group 01. -/ +def branchClaims3And2Group01 : Array NodeClaim := #[⟨3, 7782220872588976414, 36240729780583658, 36239904327916608, 2565, 65536, 147456, 0, #[⟨2, [5], [], [], []⟩, ⟨3, [5], [], [63], []⟩]⟩, @@ -3690,9 +3715,10 @@ private def branchClaims_3_2_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (3, 2). -/ def branchClaims3Row2 : BranchClaims := - ⟨#[branchClaims_3_2_group_00, branchClaims_3_2_group_01], 116, 115⟩ + ⟨#[branchClaims3And2Group00, branchClaims3And2Group01], 116, 115⟩ -private def branchClaims_3_3_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 3), group 00. -/ +def branchClaims3And3Group00 : Array NodeClaim := #[⟨3, 6413126308360610078, 36240319065947390, 70369015762168, 2580, 536870912, 0, 536870912, #[⟨5, [], [318], [], []⟩]⟩, ⟨2, 438985023774, 36240043114298622, 70368747326624, @@ -3881,7 +3907,8 @@ private def branchClaims_3_3_group_00 : Array NodeClaim := ⟨4, 7365919407807914270, 36240868293278970, 36239906206964904, 1159, 8192, 0, 0, #[⟨2, [], [], [], [715]⟩]⟩] -private def branchClaims_3_3_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 3), group 01. -/ +def branchClaims3And3Group01 : Array NodeClaim := #[⟨3, 7349875334135406878, 36240730854325482, 36239905401658496, 2613, 65536, 0, 0, #[⟨3, [], [], [63], []⟩]⟩, ⟨4, 8374725724338905374, 36240868293270778, 36240318524856488, @@ -3998,9 +4025,10 @@ private def branchClaims_3_3_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (3, 3). -/ def branchClaims3Row3 : BranchClaims := - ⟨#[branchClaims_3_3_group_00, branchClaims_3_3_group_01], 95, 94⟩ + ⟨#[branchClaims3And3Group00, branchClaims3And3Group01], 95, 94⟩ -private def branchClaims_3_4_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 4), group 00. -/ +def branchClaims3And4Group00 : Array NodeClaim := #[⟨4, 5454985655957578014, 36240593952210174, 211243683577066, 493, 17179869184, 0, 17179869184, #[⟨6, [], [1320], [], []⟩]⟩, ⟨3, 5404320160149659934, 36240044196396286, 70368744733930, @@ -4183,7 +4211,8 @@ private def branchClaims_3_4_group_00 : Array NodeClaim := 2531, 135168, 0, 4096, #[⟨2, [], [430], [], []⟩, ⟨3, [], [], [62], []⟩]⟩] -private def branchClaims_3_4_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 4), group 01. -/ +def branchClaims3And4Group01 : Array NodeClaim := #[⟨4, 8686599989737283870, 36240319609109758, 36240043652201632, 1030, 8192, 0, 8192, #[⟨2, [], [515], [], []⟩]⟩, ⟨4, 8688851789550969118, 36240869364923638, 36240041505242288, @@ -4361,9 +4390,10 @@ private def branchClaims_3_4_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (3, 4). -/ def branchClaims3Row4 : BranchClaims := - ⟨#[branchClaims_3_4_group_00, branchClaims_3_4_group_01], 114, 113⟩ + ⟨#[branchClaims3And4Group00, branchClaims3And4Group01], 114, 113⟩ -private def branchClaims_3_5_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 5), group 00. -/ +def branchClaims3And5Group00 : Array NodeClaim := #[⟨4, 3149142646745981214, 36240868293246206, 211106244623594, 493, 17179869184, 0, 17179869184, #[⟨6, [], [904], [], []⟩]⟩, ⟨4, 3150268546652823838, 36240868293246206, 211109185879274, @@ -4553,7 +4583,8 @@ private def branchClaims_3_5_group_00 : Array NodeClaim := ⟨4, 4157948823153664286, 36240867219528954, 36240041512031344, 1980, 64, 0, 64, #[⟨1, [], [1168], [], []⟩]⟩] -private def branchClaims_3_5_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 5), group 01. -/ +def branchClaims3And5Group01 : Array NodeClaim := #[⟨3, 4107283327345746206, 36240317463715066, 36099166573188208, 2666, 8589934592, 64, 0, #[⟨1, [5], [], [], []⟩, ⟨6, [], [], [63], []⟩]⟩, @@ -4739,6 +4770,6 @@ private def branchClaims_3_5_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (3, 5). -/ def branchClaims3Row5 : BranchClaims := - ⟨#[branchClaims_3_5_group_00, branchClaims_3_5_group_01], 116, 115⟩ + ⟨#[branchClaims3And5Group00, branchClaims3And5Group01], 116, 115⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData05.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData05.lean index 1a6fa64bda..27360d31dc 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData05.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData05.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_3_6_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 6), group 00. -/ +def branchClaims3And6Group00 : Array NodeClaim := #[⟨3, 6413126064370082078, 36240729772195070, 70369015239928, 2682, 268435456, 0, 268435456, #[⟨5, [], [308], [], []⟩]⟩, ⟨2, 194994495774, 36240453820546302, 70368746804384, @@ -202,7 +210,8 @@ private def branchClaims_3_6_group_00 : Array NodeClaim := ⟨3, 3242592601245999390, 36240869358623998, 36099165766850720, 172, 17179869184, 0, 0, #[⟨6, [], [], [62], []⟩]⟩] -private def branchClaims_3_6_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 6), group 01. -/ +def branchClaims3And6Group01 : Array NodeClaim := #[⟨4, 4155697425695367454, 36240869367012602, 36240043646949552, 2701, 4, 0, 4, #[⟨0, [], [312], [], []⟩]⟩, ⟨3, 4107283729701134622, 36240869358623994, 36099303471618224, @@ -315,9 +324,10 @@ private def branchClaims_3_6_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (3, 6). -/ def branchClaims3Row6 : BranchClaims := - ⟨#[branchClaims_3_6_group_00, branchClaims_3_6_group_01], 97, 96⟩ + ⟨#[branchClaims3And6Group00, branchClaims3And6Group01], 97, 96⟩ -private def branchClaims_3_10_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 10), group 00. -/ +def branchClaims3And10Group00 : Array NodeClaim := #[⟨3, 8358681639739056414, 36240318529076478, 211244482038880, 2517, 4352, 0, 4352, #[⟨1, [], [580], [], []⟩, ⟨2, [], [603], [], []⟩]⟩, @@ -502,7 +512,8 @@ private def branchClaims_3_10_group_00 : Array NodeClaim := 249, 16392, 0, 0, #[⟨0, [], [], [61], []⟩, ⟨2, [], [], [62], []⟩]⟩] -private def branchClaims_3_10_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 10), group 01. -/ +def branchClaims3And10Group01 : Array NodeClaim := #[⟨4, 6162895347140649246, 36240318535367934, 211519355796724, 2738, 4294967296, 0, 4294967296, #[⟨6, [], [761], [], []⟩]⟩, ⟨4, 6164584197000913182, 36240318535367932, 211521503770876, @@ -680,7 +691,8 @@ private def branchClaims_3_10_group_01 : Array NodeClaim := ⟨5, [], [442], [], []⟩, ⟨6, [], [413], [126], []⟩]⟩] -private def branchClaims_3_10_group_02 : Array NodeClaim := +/-- Coverage claims for branch (3, 10), group 02. -/ +def branchClaims3And10Group02 : Array NodeClaim := #[⟨4, 5595160045847961886, 36240867219537148, 36239905131134056, 1151, 16384, 0, 16384, #[⟨2, [], [222], [], []⟩]⟩, ⟨4, 5599100695521911070, 36240867219537148, 36240592326908008, @@ -737,9 +749,10 @@ private def branchClaims_3_10_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (3, 10). -/ def branchClaims3Row10 : BranchClaims := - ⟨#[branchClaims_3_10_group_00, branchClaims_3_10_group_01, branchClaims_3_10_group_02], 145, 144⟩ + ⟨#[branchClaims3And10Group00, branchClaims3And10Group01, branchClaims3And10Group02], 145, 144⟩ -private def branchClaims_3_11_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 11), group 00. -/ +def branchClaims3And11Group00 : Array NodeClaim := #[⟨3, 7782220886900859166, 36240182163848446, 211108114213984, 1086, 16640, 0, 16640, #[⟨1, [], [1203], [], []⟩, ⟨2, [], [283], [], []⟩]⟩, @@ -949,7 +962,8 @@ private def branchClaims_3_11_group_00 : Array NodeClaim := ⟨2, 170495959326, 36240866670066942, 140737756804192, 2753, 12884901888, 0, 0, #[⟨6, [], [], [61, 62], []⟩]⟩] -private def branchClaims_3_11_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 11), group 01. -/ +def branchClaims3And11Group01 : Array NodeClaim := #[⟨3, 7782220738909036830, 36240867219520766, 211107575272640, 2658, 8224, 0, 8224, #[⟨1, [], [1193], [], []⟩, ⟨2, [], [654], [], []⟩]⟩, @@ -1108,9 +1122,10 @@ private def branchClaims_3_11_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (3, 11). -/ def branchClaims3Row11 : BranchClaims := - ⟨#[branchClaims_3_11_group_00, branchClaims_3_11_group_01], 113, 112⟩ + ⟨#[branchClaims3And11Group00, branchClaims3And11Group01], 113, 112⟩ -private def branchClaims_3_12_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 12), group 00. -/ +def branchClaims3And12Group00 : Array NodeClaim := #[⟨4, 6029194457073180958, 36240731923840254, 211109187976434, 450, 8589934592, 0, 8589934592, #[⟨6, [], [1323], [], []⟩]⟩, ⟨3, 5980780761078948126, 36240731915451646, 70369012645106, @@ -1299,7 +1314,8 @@ private def branchClaims_3_12_group_00 : Array NodeClaim := 2797, 20544, 10240, 20480, #[⟨1, [], [], [62], []⟩, ⟨2, [6, 6], [892, 378], [], []⟩]⟩] -private def branchClaims_3_12_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 12), group 01. -/ +def branchClaims3And12Group01 : Array NodeClaim := #[⟨3, 7277817851230675230, 36240592878501116, 36240453279978720, 923, 0, 0, 0, #[]⟩, ⟨3, 7566048227382386974, 36240594487016696, 36240453275784424, @@ -1434,9 +1450,10 @@ private def branchClaims_3_12_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (3, 12). -/ def branchClaims3Row12 : BranchClaims := - ⟨#[branchClaims_3_12_group_00, branchClaims_3_12_group_01], 107, 106⟩ + ⟨#[branchClaims3And12Group00, branchClaims3And12Group01], 107, 106⟩ -private def branchClaims_3_23_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 23), group 00. -/ +def branchClaims3And23Group00 : Array NodeClaim := #[⟨4, 5167881178860675358, 36240594486983934, 211246624832742, 457, 8589934592, 0, 8589934592, #[⟨6, [], [1318], [], []⟩]⟩, ⟨3, 5116089783145914654, 36240044731170046, 70368744733926, @@ -1626,7 +1643,8 @@ private def branchClaims_3_23_group_00 : Array NodeClaim := ⟨3, 6413126583236354334, 36240317459528956, 211107577867376, 2633, 4096, 0, 4096, #[⟨2, [], [629], [], []⟩]⟩] -private def branchClaims_3_23_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 23), group 01. -/ +def branchClaims3And23Group01 : Array NodeClaim := #[⟨2, 713860768030, 36240042581622004, 211106235690016, 2519, 135424, 0, 256, #[⟨1, [], [1282], [], []⟩, ⟨2, [], [], [62], []⟩, @@ -1828,7 +1846,8 @@ private def branchClaims_3_23_group_01 : Array NodeClaim := ⟨3, 3674938037997592862, 36240044733299954, 36239903797312544, 2844, 131072, 0, 0, #[⟨3, [], [], [126], []⟩]⟩] -private def branchClaims_3_23_group_02 : Array NodeClaim := +/-- Coverage claims for branch (3, 23), group 02. -/ +def branchClaims3And23Group02 : Array NodeClaim := #[⟨4, 3860430047649915166, 36240594489113846, 36239903800482992, 2817, 0, 0, 0, #[]⟩, ⟨4, 3862118897510179102, 36240594489113852, 36239906216365232, @@ -1999,7 +2018,8 @@ private def branchClaims_3_23_group_02 : Array NodeClaim := ⟨3, [], [], [190], []⟩, ⟨6, [], [145, 145], [], []⟩]⟩] -private def branchClaims_3_23_group_03 : Array NodeClaim := +/-- Coverage claims for branch (3, 23), group 03. -/ +def branchClaims3And23Group03 : Array NodeClaim := #[⟨4, 3293257810865479966, 36240867215342830, 36240453556296868, 327, 65536, 0, 0, #[⟨3, [], [], [], [652]⟩]⟩, ⟨3, 3242592315057561886, 36240729776389358, 36099166300593316, @@ -2180,7 +2200,8 @@ private def branchClaims_3_23_group_03 : Array NodeClaim := ⟨3, 3674938175134556446, 36240594489081074, 36240041774168096, 1293, 131072, 0, 131072, #[⟨3, [], [353], [], []⟩]⟩] -private def branchClaims_3_23_group_04 : Array NodeClaim := +/-- Coverage claims for branch (3, 23), group 04. -/ +def branchClaims3And23Group04 : Array NodeClaim := #[⟨3, 5980781184348250398, 36240869366988018, 36239904335222848, 2869, 65540, 131072, 65540, #[⟨0, [], [601], [], []⟩, ⟨3, [5], [661], [], []⟩]⟩, @@ -2312,10 +2333,11 @@ private def branchClaims_3_23_group_04 : Array NodeClaim := /-- Flat postorder claims for branch (3, 23). -/ def branchClaims3Row23 : BranchClaims := - ⟨#[branchClaims_3_23_group_00, branchClaims_3_23_group_01, branchClaims_3_23_group_02, - branchClaims_3_23_group_03, branchClaims_3_23_group_04], 297, 296⟩ + ⟨#[branchClaims3And23Group00, branchClaims3And23Group01, branchClaims3And23Group02, + branchClaims3And23Group03, branchClaims3And23Group04], 297, 296⟩ -private def branchClaims_3_24_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 24), group 00. -/ +def branchClaims3And24Group00 : Array NodeClaim := #[⟨3, 8358681239978959134, 36240319602801918, 211243677268064, 103, 131080, 0, 131080, #[⟨0, [], [1191], [], []⟩, ⟨3, [], [668], [], []⟩]⟩, @@ -2501,7 +2523,8 @@ private def branchClaims_3_24_group_00 : Array NodeClaim := 2592, 65540, 0, 65540, #[⟨0, [], [1191], [], []⟩, ⟨3, [], [670], [], []⟩]⟩] -private def branchClaims_3_24_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 24), group 01. -/ +def branchClaims3And24Group01 : Array NodeClaim := #[⟨3, 8646912163202130206, 36240869364907250, 36239907278592128, 2615, 8196, 0, 8196, #[⟨0, [], [1191], [], []⟩, ⟨2, [], [844], [], []⟩]⟩, @@ -2698,7 +2721,8 @@ private def branchClaims_3_24_group_01 : Array NodeClaim := ⟨3, 6413126065982202142, 36240182172253436, 36169535313185896, 1158, 0, 16384, 0, #[⟨2, [5], [], [], []⟩]⟩] -private def branchClaims_3_24_group_02 : Array NodeClaim := +/-- Coverage claims for branch (3, 24), group 02. -/ +def branchClaims3And24Group02 : Array NodeClaim := #[⟨4, 8256505688460288286, 36240868293278972, 36239903798394020, 359, 65536, 0, 65536, #[⟨3, [], [225], [], []⟩]⟩, ⟨4, 8257631588367130910, 36240868293278972, 36239906204875944, @@ -2868,7 +2892,8 @@ private def branchClaims_3_24_group_02 : Array NodeClaim := ⟨4, 3862119007774236958, 36240868293278972, 36240043107482800, 2792, 2048, 0, 2048, #[⟨2, [], [1211], [], []⟩]⟩] -private def branchClaims_3_24_group_03 : Array NodeClaim := +/-- Coverage claims for branch (3, 24), group 03. -/ +def branchClaims3And24Group03 : Array NodeClaim := #[⟨3, 3819053336337506590, 36240318537465076, 36240040691563552, 2531, 135168, 0, 0, #[⟨2, [], [], [190], []⟩, ⟨3, [], [], [191], []⟩]⟩, @@ -3037,7 +3062,8 @@ private def branchClaims_3_24_group_03 : Array NodeClaim := ⟨4, 5564479256214036766, 36240869358632188, 36239904061586536, 1151, 16384, 0, 16384, #[⟨2, [], [1213], [], []⟩]⟩] -private def branchClaims_3_24_group_04 : Array NodeClaim := +/-- Coverage claims for branch (3, 24), group 04. -/ +def branchClaims3And24Group04 : Array NodeClaim := #[⟨3, 5548435182541529374, 36240731919678700, 36239903256280128, 2559, 73728, 147456, 0, #[⟨2, [5], [], [254], []⟩, ⟨3, [5], [], [255], []⟩]⟩, @@ -3218,7 +3244,8 @@ private def branchClaims_3_24_group_04 : Array NodeClaim := 2517, 0, 4352, 0, #[⟨1, [5], [], [], []⟩, ⟨2, [5], [], [], []⟩]⟩] -private def branchClaims_3_24_group_05 : Array NodeClaim := +/-- Coverage claims for branch (3, 24), group 05. -/ +def branchClaims3And24Group05 : Array NodeClaim := #[⟨4, 8227232402786410782, 36240868293278958, 36240178672073828, 140, 131072, 0, 131072, #[⟨3, [], [1048], [], []⟩]⟩, ⟨3, 8214566028834431262, 36240868291181798, 36240178134678592, @@ -3312,7 +3339,7 @@ private def branchClaims_3_24_group_05 : Array NodeClaim := /-- Flat postorder claims for branch (3, 24). -/ def branchClaims3Row24 : BranchClaims := - ⟨#[branchClaims_3_24_group_00, branchClaims_3_24_group_01, branchClaims_3_24_group_02, - branchClaims_3_24_group_03, branchClaims_3_24_group_04, branchClaims_3_24_group_05], 349, 348⟩ + ⟨#[branchClaims3And24Group00, branchClaims3And24Group01, branchClaims3And24Group02, + branchClaims3And24Group03, branchClaims3And24Group04, branchClaims3And24Group05], 349, 348⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData06.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData06.lean index c3258ddf08..d9c483d36b 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData06.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData06.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_3_25_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 25), group 00. -/ +def branchClaims3And25Group00 : Array NodeClaim := #[⟨3, 8358681239981056286, 36240319065947390, 36099304281610336, 2553, 33554432, 131080, 33554432, #[⟨0, [5], [], [], []⟩, ⟨3, [5], [], [], []⟩, @@ -199,7 +207,8 @@ private def branchClaims_3_25_group_00 : Array NodeClaim := ⟨4, 3870844320291152158, 36240594480725238, 36240592865385648, 2792, 2048, 0, 0, #[⟨2, [], [], [], [831]⟩]⟩] -private def branchClaims_3_25_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 25), group 01. -/ +def branchClaims3And25Group01 : Array NodeClaim := #[⟨3, 3819052924576391454, 36240593943854326, 36099165766343856, 2923, 17179869184, 0, 0, #[⟨6, [], [], [63], []⟩]⟩, ⟨2, 440566210846, 36240456504900850, 36099165763198080, @@ -407,7 +416,8 @@ private def branchClaims_3_25_group_01 : Array NodeClaim := 2932, 128, 16640, 0, #[⟨1, [5], [], [126], []⟩, ⟨2, [5], [], [], []⟩]⟩] -private def branchClaims_3_25_group_02 : Array NodeClaim := +/-- Coverage claims for branch (3, 25), group 02. -/ +def branchClaims3And25Group02 : Array NodeClaim := #[⟨2, 740458946846, 36239907294346464, 36239905401621504, 2928, 213120, 0, 0, #[⟨1, [], [], [119], []⟩, ⟨2, [], [], [122], []⟩, @@ -590,7 +600,8 @@ private def branchClaims_3_25_group_02 : Array NodeClaim := ⟨4, 3284532218127114526, 36240869362826492, 36239903263620260, 359, 65536, 0, 0, #[⟨3, [], [], [], [822]⟩]⟩] -private def branchClaims_3_25_group_03 : Array NodeClaim := +/-- Coverage claims for branch (3, 25), group 03. -/ +def branchClaims3And25Group03 : Array NodeClaim := #[⟨4, 3285658118033957150, 36240869362826492, 36239905670102184, 1159, 8192, 0, 0, #[⟨2, [], [], [], [821]⟩]⟩, ⟨3, 3242592446597226782, 36240319607012588, 36239903254182944, @@ -758,7 +769,8 @@ private def branchClaims_3_25_group_03 : Array NodeClaim := ⟨4, 5563353355772420382, 36240593943854332, 36240041772121188, 283, 131072, 0, 131072, #[⟨3, [], [1207], [], []⟩]⟩] -private def branchClaims_3_25_group_04 : Array NodeClaim := +/-- Coverage claims for branch (3, 25), group 04. -/ +def branchClaims3And25Group04 : Array NodeClaim := #[⟨4, 5564479255679263006, 36240594480725244, 36240042037410920, 1151, 16384, 0, 0, #[⟨2, [], [], [], [845]⟩]⟩, ⟨3, 5548435182006755614, 36240593943854316, 36239904330021952, @@ -946,7 +958,8 @@ private def branchClaims_3_25_group_04 : Array NodeClaim := 2949, 2048, 4352, 0, #[⟨1, [5], [], [], []⟩, ⟨2, [5], [], [318], []⟩]⟩] -private def branchClaims_3_25_group_05 : Array NodeClaim := +/-- Coverage claims for branch (3, 25), group 05. -/ +def branchClaims3And25Group05 : Array NodeClaim := #[⟨2, 307975872798, 36240593952234726, 36169534508387392, 2577, 21474904192, 0, 0, #[⟨1, [], [], [314], []⟩, ⟨2, [], [], [315], []⟩, @@ -1021,10 +1034,11 @@ private def branchClaims_3_25_group_05 : Array NodeClaim := /-- Flat postorder claims for branch (3, 25). -/ def branchClaims3Row25 : BranchClaims := - ⟨#[branchClaims_3_25_group_00, branchClaims_3_25_group_01, branchClaims_3_25_group_02, - branchClaims_3_25_group_03, branchClaims_3_25_group_04, branchClaims_3_25_group_05], 341, 340⟩ + ⟨#[branchClaims3And25Group00, branchClaims3And25Group01, branchClaims3And25Group02, + branchClaims3And25Group03, branchClaims3And25Group04, branchClaims3And25Group05], 341, 340⟩ -private def branchClaims_3_26_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 26), group 00. -/ +def branchClaims3And26Group00 : Array NodeClaim := #[⟨4, 5599101104973603102, 36240868830149870, 36240041767894116, 283, 131072, 0, 131072, #[⟨3, [], [527], [], []⟩]⟩, ⟨3, 5548435609165685022, 36240319065947374, 36099166837439588, @@ -1214,7 +1228,8 @@ private def branchClaims_3_26_group_00 : Array NodeClaim := ⟨2, [], [], [59], []⟩, ⟨3, [], [], [62], []⟩]⟩] -private def branchClaims_3_26_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 26), group 01. -/ +def branchClaims3And26Group01 : Array NodeClaim := #[⟨4, 5596286338261508382, 36240319611206908, 36240040696282212, 283, 131072, 0, 131072, #[⟨3, [], [224], [], []⟩]⟩, ⟨3, 5548435592220696862, 36240316926852348, 36099303207883876, @@ -1417,7 +1432,8 @@ private def branchClaims_3_26_group_01 : Array NodeClaim := 2597, 67584, 0, 0, #[⟨2, [], [], [125], []⟩, ⟨3, [], [], [126], []⟩]⟩] -private def branchClaims_3_26_group_02 : Array NodeClaim := +/-- Coverage claims for branch (3, 26), group 02. -/ +def branchClaims3And26Group02 : Array NodeClaim := #[⟨2, 599793000734, 36240317996399850, 211106232581248, 2587, 2147635200, 1073818624, 2147614720, #[⟨2, [6, 6, 6], [], [124, 127], []⟩, ⟨3, [6], [381], [], []⟩, @@ -1592,7 +1608,8 @@ private def branchClaims_3_26_group_02 : Array NodeClaim := ⟨4, 3285658136617345310, 36240868293278972, 36239906204875944, 1159, 8192, 0, 0, #[⟨2, [], [], [], [694]⟩]⟩] -private def branchClaims_3_26_group_03 : Array NodeClaim := +/-- Coverage claims for branch (3, 26), group 03. -/ +def branchClaims3And26Group03 : Array NodeClaim := #[⟨3, 3242592465180614942, 36240318537465068, 36239903788956704, 102, 147456, 0, 0, #[⟨2, [], [], [190], []⟩, ⟨3, [], [], [191], []⟩]⟩, @@ -1770,7 +1787,8 @@ private def branchClaims_3_26_group_03 : Array NodeClaim := 2994, 17179869184, 8, 17179869184, #[⟨0, [5], [], [], []⟩, ⟨6, [], [1239], [], []⟩]⟩] -private def branchClaims_3_26_group_04 : Array NodeClaim := +/-- Coverage claims for branch (3, 26), group 04. -/ +def branchClaims3And26Group04 : Array NodeClaim := #[⟨2, 188247892254, 36240866143665386, 36099440642111520, 2993, 4104, 0, 0, #[⟨0, [], [], [254], []⟩, ⟨2, [], [], [255], []⟩]⟩, @@ -1898,10 +1916,11 @@ private def branchClaims_3_26_group_04 : Array NodeClaim := /-- Flat postorder claims for branch (3, 26). -/ def branchClaims3Row26 : BranchClaims := - ⟨#[branchClaims_3_26_group_00, branchClaims_3_26_group_01, branchClaims_3_26_group_02, - branchClaims_3_26_group_03, branchClaims_3_26_group_04], 298, 297⟩ + ⟨#[branchClaims3And26Group00, branchClaims3And26Group01, branchClaims3And26Group02, + branchClaims3And26Group03, branchClaims3And26Group04], 298, 297⟩ -private def branchClaims_3_27_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 27), group 00. -/ +def branchClaims3And27Group00 : Array NodeClaim := #[⟨3, 5548435609169879326, 36240593943854318, 36169535581633636, 641, 0, 131072, 0, #[⟨3, [5], [], [], []⟩]⟩, ⟨3, 6124896361473302814, 36240868821761270, 36169534508416100, @@ -2081,7 +2100,8 @@ private def branchClaims_3_27_group_00 : Array NodeClaim := ⟨3, 7566048252432408862, 36240594487000302, 36239904334189792, 309, 0, 0, 0, #[]⟩] -private def branchClaims_3_27_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 27), group 01. -/ +def branchClaims3And27Group01 : Array NodeClaim := #[⟨3, 8142509004735832350, 36240868828036342, 36240040699401440, 2601, 0, 0, 0, #[]⟩, ⟨4, 7653024020236001566, 36240594489113846, 36240041774202020, @@ -2277,7 +2297,8 @@ private def branchClaims_3_27_group_01 : Array NodeClaim := ⟨5, [], [], [119, 122, 126], []⟩, ⟨6, [], [208, 208], [], []⟩]⟩] -private def branchClaims_3_27_group_02 : Array NodeClaim := +/-- Coverage claims for branch (3, 27), group 02. -/ +def branchClaims3And27Group02 : Array NodeClaim := #[⟨3, 7782220480730292510, 36240592341630206, 211657063667904, 2592, 65540, 0, 65540, #[⟨0, [], [983], [], []⟩, ⟨3, [], [632], [], []⟩]⟩, @@ -2456,7 +2477,8 @@ private def branchClaims_3_27_group_02 : Array NodeClaim := ⟨3, [], [], [187, 190], []⟩, ⟨6, [0, 0], [], [], []⟩]⟩] -private def branchClaims_3_27_group_03 : Array NodeClaim := +/-- Coverage claims for branch (3, 27), group 03. -/ +def branchClaims3And27Group03 : Array NodeClaim := #[⟨4, 5419238604506587422, 36240593952242942, 36240041772088416, 2554, 131072, 0, 0, #[⟨3, [], [], [], [785]⟩]⟩, ⟨4, 5420364504413430046, 36240594489113850, 36240042037378152, @@ -2625,7 +2647,8 @@ private def branchClaims_3_27_group_03 : Array NodeClaim := ⟨3, [], [], [251, 254], []⟩, ⟨6, [0, 0], [], [], []⟩]⟩] -private def branchClaims_3_27_group_04 : Array NodeClaim := +/-- Coverage claims for branch (3, 27), group 04. -/ +def branchClaims3And27Group04 : Array NodeClaim := #[⟨4, 3140416782350868766, 36240592341630206, 36240453558385824, 195, 65536, 0, 65536, #[⟨3, [], [653], [], []⟩]⟩, ⟨3, 3098477010820981022, 36240592341630186, 36239903793134624, @@ -2807,7 +2830,8 @@ private def branchClaims_3_27_group_04 : Array NodeClaim := 2423, 4160, 0, 0, #[⟨1, [], [], [317], []⟩, ⟨2, [], [], [318], []⟩]⟩] -private def branchClaims_3_27_group_05 : Array NodeClaim := +/-- Coverage claims for branch (3, 27), group 05. -/ +def branchClaims3And27Group05 : Array NodeClaim := #[⟨4, 6425792684982722846, 36240867219537148, 36240728161530984, 2781, 0, 0, 0, #[]⟩, ⟨3, 6413126311030743326, 36240866682666232, 36240728158909504, @@ -2885,10 +2909,11 @@ private def branchClaims_3_27_group_05 : Array NodeClaim := /-- Flat postorder claims for branch (3, 27). -/ def branchClaims3Row27 : BranchClaims := - ⟨#[branchClaims_3_27_group_00, branchClaims_3_27_group_01, branchClaims_3_27_group_02, - branchClaims_3_27_group_03, branchClaims_3_27_group_04, branchClaims_3_27_group_05], 345, 344⟩ + ⟨#[branchClaims3And27Group00, branchClaims3And27Group01, branchClaims3And27Group02, + branchClaims3And27Group03, branchClaims3And27Group04, branchClaims3And27Group05], 345, 344⟩ -private def branchClaims_3_28_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 28), group 00. -/ +def branchClaims3And28Group00 : Array NodeClaim := #[⟨4, 5599100692663034142, 36240867219537134, 36240454084754532, 620, 0, 0, 0, #[]⟩, ⟨4, 5600226592569876766, 36240869358632174, 36240454886915172, @@ -3073,7 +3098,8 @@ private def branchClaims_3_28_group_00 : Array NodeClaim := ⟨3, 4107283326297104670, 36240867219528958, 36099166569010336, 596, 8589934592, 0, 0, #[⟨6, [], [], [62], []⟩]⟩] -private def branchClaims_3_28_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 28), group 01. -/ +def branchClaims3And28Group01 : Array NodeClaim := #[⟨2, 466135212318, 36240729780575462, 36099165763703936, 2959, 73760, 147520, 32, #[⟨1, [5], [734], [], []⟩, ⟨2, [5], [], [61], []⟩, @@ -3274,7 +3300,8 @@ private def branchClaims_3_28_group_01 : Array NodeClaim := ⟨2, [5], [], [], []⟩, ⟨5, [], [334], [], []⟩]⟩] -private def branchClaims_3_28_group_02 : Array NodeClaim := +/-- Coverage claims for branch (3, 28), group 02. -/ +def branchClaims3And28Group02 : Array NodeClaim := #[⟨2, 456706416926, 36240729770097908, 36099440642119744, 2670, 67588, 0, 4, #[⟨0, [], [1280], [], []⟩, ⟨2, [], [], [126], []⟩, @@ -3469,7 +3496,8 @@ private def branchClaims_3_28_group_02 : Array NodeClaim := ⟨3, 4107283592031428894, 36240868284890360, 36239904056867872, 1850, 20480, 0, 0, #[⟨2, [], [], [189, 190], []⟩]⟩] -private def branchClaims_3_28_group_03 : Array NodeClaim := +/-- Coverage claims for branch (3, 28), group 03. -/ +def branchClaims3And28Group03 : Array NodeClaim := #[⟨4, 6425792975197102366, 36240731919678716, 36240178937396328, 440, 16384, 0, 0, #[⟨2, [], [], [], [866]⟩]⟩, ⟨4, 6428044775010787614, 36240869358632188, 36240178401049712, @@ -3641,7 +3669,8 @@ private def branchClaims_3_28_group_03 : Array NodeClaim := ⟨3, 6413126327440957726, 36240729776389368, 36240179471645760, 2568, 10240, 20480, 0, #[⟨2, [5, 5], [], [253, 254], []⟩]⟩] -private def branchClaims_3_28_group_04 : Array NodeClaim := +/-- Coverage claims for branch (3, 28), group 04. -/ +def branchClaims3And28Group04 : Array NodeClaim := #[⟨2, 458065371422, 36240729776389344, 36239903251561472, 2587, 228352, 3221225472, 1024, #[⟨2, [], [145], [240, 243, 246, 249], []⟩, ⟨3, [], [], [252, 255], []⟩, @@ -3828,7 +3857,8 @@ private def branchClaims_3_28_group_04 : Array NodeClaim := ⟨4, 5560538606039392542, 36240867219537134, 36240453015207016, 620, 0, 0, 0, #[]⟩] -private def branchClaims_3_28_group_05 : Array NodeClaim := +/-- Coverage claims for branch (3, 28), group 05. -/ +def branchClaims3And28Group05 : Array NodeClaim := #[⟨4, 5564479255713341726, 36240867219537148, 36240590722585704, 388, 0, 0, 0, #[]⟩, ⟨3, 5548435182040834334, 36240866682666220, 36240453015196736, @@ -3898,7 +3928,7 @@ private def branchClaims_3_28_group_05 : Array NodeClaim := /-- Flat postorder claims for branch (3, 28). -/ def branchClaims3Row28 : BranchClaims := - ⟨#[branchClaims_3_28_group_00, branchClaims_3_28_group_01, branchClaims_3_28_group_02, - branchClaims_3_28_group_03, branchClaims_3_28_group_04, branchClaims_3_28_group_05], 341, 340⟩ + ⟨#[branchClaims3And28Group00, branchClaims3And28Group01, branchClaims3And28Group02, + branchClaims3And28Group03, branchClaims3And28Group04, branchClaims3And28Group05], 341, 340⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData07.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData07.lean index 7d41607113..1325cc8d3f 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData07.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData07.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_3_30_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 30), group 00. -/ +def branchClaims3And30Group00 : Array NodeClaim := #[⟨3, 5980781035954692382, 36240319598623990, 211381915761762, 2305, 20480, 0, 20480, #[⟨2, [], [629, 842], [], []⟩]⟩, ⟨3, 5548435471727124766, 36240319602801902, 211108112116836, @@ -205,7 +213,8 @@ private def branchClaims_3_30_group_00 : Array NodeClaim := 2715, 20736, 0, 0, #[⟨1, [], [], [58], []⟩, ⟨2, [], [], [60, 62], []⟩]⟩] -private def branchClaims_3_30_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 30), group 01. -/ +def branchClaims3And30Group01 : Array NodeClaim := #[⟨4, 3714625592566014238, 36240319607012606, 211245022592234, 1536, 0, 0, 0, #[]⟩, ⟨3, 3674937620849811742, 36240317459528954, 211245013679202, @@ -373,7 +382,8 @@ private def branchClaims_3_30_group_01 : Array NodeClaim := ⟨4, 3284532356634435870, 36240867219537148, 36240591261570212, 176, 32, 0, 32, #[⟨1, [], [539], [], []⟩]⟩] -private def branchClaims_3_30_group_02 : Array NodeClaim := +/-- Coverage claims for branch (3, 30), group 02. -/ +def branchClaims3And30Group02 : Array NodeClaim := #[⟨3, 3242592585104548126, 36240867219537132, 36240041496319008, 241, 16384, 0, 0, #[⟨2, [], [], [127], []⟩]⟩, ⟨4, 5560539018316800286, 36240867217439982, 36240042574265448, @@ -546,7 +556,8 @@ private def branchClaims_3_30_group_02 : Array NodeClaim := ⟨3, 2810247046680338718, 36240869366971622, 36240042044687392, 617, 320, 0, 256, #[⟨1, [], [1145], [190], []⟩]⟩] -private def branchClaims_3_30_group_03 : Array NodeClaim := +/-- Coverage claims for branch (3, 30), group 03. -/ +def branchClaims3And30Group03 : Array NodeClaim := #[⟨4, 5128193479892590878, 36240869366988014, 36240042583657570, 3096, 0, 0, 0, #[]⟩, ⟨3, 5116090055894032670, 36240869366979814, 36240042046784576, @@ -640,10 +651,11 @@ private def branchClaims_3_30_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (3, 30). -/ def branchClaims3Row30 : BranchClaims := - ⟨#[branchClaims_3_30_group_00, branchClaims_3_30_group_01, branchClaims_3_30_group_02, - branchClaims_3_30_group_03], 223, 222⟩ + ⟨#[branchClaims3And30Group00, branchClaims3And30Group01, branchClaims3And30Group02, + branchClaims3And30Group03], 223, 222⟩ -private def branchClaims_3_31_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 31), group 00. -/ +def branchClaims3And31Group00 : Array NodeClaim := #[⟨3, 5980780761080979742, 36240869354405110, 211107037871202, 2305, 20480, 0, 20480, #[⟨2, [], [1071, 1257], [], []⟩]⟩, ⟨3, 5548435196853412126, 36240594480692462, 211108112116836, @@ -831,7 +843,8 @@ private def branchClaims_3_31_group_00 : Array NodeClaim := ⟨3, 7782221008978108702, 36240594489105650, 36240453817373824, 3107, 8192, 0, 0, #[⟨2, [], [], [62], []⟩]⟩] -private def branchClaims_3_31_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 31), group 01. -/ +def branchClaims3And31Group01 : Array NodeClaim := #[⟨4, 8371348135233511710, 36240868293270782, 36240591259473056, 947, 32, 0, 32, #[⟨1, [], [536], [], []⟩]⟩, ⟨3, 8358681761281532190, 36240868293270770, 36240590719980672, @@ -1020,7 +1033,8 @@ private def branchClaims_3_31_group_01 : Array NodeClaim := ⟨5, [], [], [123], []⟩, ⟨6, [], [], [126], []⟩]⟩] -private def branchClaims_3_31_group_02 : Array NodeClaim := +/-- Coverage claims for branch (3, 31), group 02. -/ +def branchClaims3And31Group02 : Array NodeClaim := #[⟨3, 5404319722273038622, 36240869354405102, 211243939953762, 2305, 20480, 0, 20480, #[⟨2, [], [1255, 1072], [], []⟩]⟩, ⟨3, 6124895662652317982, 36240868284857590, 211518818890852, @@ -1189,7 +1203,8 @@ private def branchClaims_3_31_group_02 : Array NodeClaim := ⟨4, 3857052064667984158, 36240869362826486, 36240591252675748, 3045, 0, 0, 0, #[]⟩] -private def branchClaims_3_31_group_03 : Array NodeClaim := +/-- Coverage claims for branch (3, 31), group 03. -/ +def branchClaims3And31Group03 : Array NodeClaim := #[⟨4, 3858740914528248094, 36240869362826492, 36240593400649892, 952, 0, 0, 0, #[]⟩, ⟨3, 3819052942812045598, 36240869354437876, 36240591252641824, @@ -1355,10 +1370,11 @@ private def branchClaims_3_31_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (3, 31). -/ def branchClaims3Row31 : BranchClaims := - ⟨#[branchClaims_3_31_group_00, branchClaims_3_31_group_01, branchClaims_3_31_group_02, - branchClaims_3_31_group_03], 245, 244⟩ + ⟨#[branchClaims3And31Group00, branchClaims3And31Group01, branchClaims3And31Group02, + branchClaims3And31Group03], 245, 244⟩ -private def branchClaims_3_32_group_00 : Array NodeClaim := +/-- Coverage claims for branch (3, 32), group 00. -/ +def branchClaims3And32Group00 : Array NodeClaim := #[⟨3, 5980780761083076894, 36240731915451638, 36099441983257698, 3141, 12884901888, 20480, 12884901888, #[⟨2, [5, 5], [], [], []⟩, ⟨6, [], [1226, 1257], [], []⟩]⟩, @@ -1561,7 +1577,8 @@ private def branchClaims_3_32_group_00 : Array NodeClaim := ⟨5, [], [], [60], []⟩, ⟨6, [], [], [61, 62], []⟩]⟩] -private def branchClaims_3_32_group_01 : Array NodeClaim := +/-- Coverage claims for branch (3, 32), group 01. -/ +def branchClaims3And32Group01 : Array NodeClaim := #[⟨1, 2480464158, 36240731376491762, 36029347043217536, 2707, 3448841362, 6293541, 3423675538, #[⟨0, [5, 5], [196, 196], [], []⟩, ⟨1, [5], [196], [], []⟩, @@ -1738,7 +1755,8 @@ private def branchClaims_3_32_group_01 : Array NodeClaim := ⟨4, 6137562325241618718, 36240731928067324, 36240180012133476, 1087, 256, 0, 256, #[⟨1, [], [558], [], []⟩]⟩] -private def branchClaims_3_32_group_02 : Array NodeClaim := +/-- Coverage claims for branch (3, 32), group 02. -/ +def branchClaims3And32Group02 : Array NodeClaim := #[⟨3, 6124895951289639198, 36240731928067316, 36240179472641088, 2915, 2048, 4352, 0, #[⟨1, [5], [], [], []⟩, ⟨2, [5], [], [127], []⟩]⟩, @@ -1916,7 +1934,8 @@ private def branchClaims_3_32_group_02 : Array NodeClaim := ⟨4, 3281717194556760350, 36240869358632174, 36240455425899688, 1098, 8192, 0, 8192, #[⟨2, [], [244], [], []⟩]⟩] -private def branchClaims_3_32_group_03 : Array NodeClaim := +/-- Coverage claims for branch (3, 32), group 03. -/ +def branchClaims3And32Group03 : Array NodeClaim := #[⟨3, 3242592172793979166, 36240869358632172, 36240453278381088, 1097, 64, 0, 0, #[⟨1, [], [], [191], []⟩]⟩, ⟨4, 5563353355773337886, 36240868821761276, 36240591796319332, @@ -2085,7 +2104,8 @@ private def branchClaims_3_32_group_03 : Array NodeClaim := 2677, 2052, 4104, 2052, #[⟨0, [5], [1137], [], []⟩, ⟨2, [5], [625], [], []⟩]⟩] -private def branchClaims_3_32_group_04 : Array NodeClaim := +/-- Coverage claims for branch (3, 32), group 04. -/ +def branchClaims3And32Group04 : Array NodeClaim := #[⟨3, 3242592190007402782, 36240869362793708, 36240454890031136, 573, 8, 0, 8, #[⟨0, [], [1137], [], []⟩]⟩, ⟨2, 458300645662, 36240869362793696, 36240454350538752, @@ -2130,10 +2150,11 @@ private def branchClaims_3_32_group_04 : Array NodeClaim := /-- Flat postorder claims for branch (3, 32). -/ def branchClaims3Row32 : BranchClaims := - ⟨#[branchClaims_3_32_group_00, branchClaims_3_32_group_01, branchClaims_3_32_group_02, - branchClaims_3_32_group_03, branchClaims_3_32_group_04], 268, 267⟩ + ⟨#[branchClaims3And32Group00, branchClaims3And32Group01, branchClaims3And32Group02, + branchClaims3And32Group03, branchClaims3And32Group04], 268, 267⟩ -private def branchClaims_5_4_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 4), group 00. -/ +def branchClaims5And4Group00 : Array NodeClaim := #[⟨4, 6460977327360928798, 36240319611206910, 140739370072306, 3187, 8589934592, 0, 0, #[⟨6, [], [], [], [264]⟩]⟩, ⟨3, 6413126581320117278, 36240317463723262, 1344803058, @@ -2345,7 +2366,8 @@ private def branchClaims_5_4_group_00 : Array NodeClaim := ⟨3, 5116090047299546142, 36240594489113718, 138520583170, 3209, 262144, 131072, 0, #[⟨3, [5], [], [62], []⟩]⟩] -private def branchClaims_5_4_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 4), group 01. -/ +def branchClaims5And4Group01 : Array NodeClaim := #[⟨2, 870606662686, 36240594489113650, 138516371456, 3208, 520, 0, 512, #[⟨0, [], [], [63], []⟩, ⟨1, [], [146], [], []⟩]⟩, @@ -2509,9 +2531,10 @@ private def branchClaims_5_4_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (5, 4). -/ def branchClaims5Row4 : BranchClaims := - ⟨#[branchClaims_5_4_group_00, branchClaims_5_4_group_01], 114, 113⟩ + ⟨#[branchClaims5And4Group00, branchClaims5And4Group01], 114, 113⟩ -private def branchClaims_5_5_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 5), group 00. -/ +def branchClaims5And5Group00 : Array NodeClaim := #[⟨4, 4157949204818521118, 36240867219537150, 140875748872434, 3239, 268435456, 0, 0, #[⟨5, [], [], [], [276]⟩]⟩, ⟨3, 4107283709010603038, 36240317463723262, 810029298, @@ -2734,7 +2757,8 @@ private def branchClaims_5_5_group_00 : Array NodeClaim := ⟨4, 2857816412768136222, 36240731928067326, 36240178674168866, 133, 131072, 0, 131072, #[⟨3, [], [126], [], []⟩]⟩] -private def branchClaims_5_5_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 5), group 01. -/ +def branchClaims5And5Group01 : Array NodeClaim := #[⟨3, 2810247141704035358, 36240729780583542, 36099440648942594, 3264, 262144, 17180590080, 0, #[⟨3, [7, 5, 3], [], [63], []⟩, ⟨6, [0], [], [], []⟩]⟩, @@ -2861,9 +2885,10 @@ private def branchClaims_5_5_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (5, 5). -/ def branchClaims5Row5 : BranchClaims := - ⟨#[branchClaims_5_5_group_00, branchClaims_5_5_group_01], 94, 93⟩ + ⟨#[branchClaims5And5Group00, branchClaims5And5Group01], 94, 93⟩ -private def branchClaims_5_6_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 6), group 00. -/ +def branchClaims5And6Group00 : Array NodeClaim := #[⟨3, 6413126579715795998, 211932761619710, 70370088980722, 3186, 268435456, 0, 268435456, #[⟨5, [], [301], [], []⟩]⟩, ⟨2, 710340209694, 211657883712758, 70368746803362, @@ -3059,7 +3084,8 @@ private def branchClaims_5_6_group_00 : Array NodeClaim := ⟨4, 7180145914622995486, 36240731928067318, 211656541517986, 3041, 65536, 0, 65536, #[⟨3, [], [468], [], []⟩]⟩] -private def branchClaims_5_6_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 6), group 01. -/ +def branchClaims5And6Group01 : Array NodeClaim := #[⟨3, 7133702543465737246, 36240731928067314, 70919042676738, 3304, 32768, 0, 0, #[⟨3, [], [], [63], []⟩]⟩, ⟨4, 8188952231153986590, 36240869367004406, 211931419416752, @@ -3164,9 +3190,10 @@ private def branchClaims_5_6_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (5, 6). -/ def branchClaims5Row6 : BranchClaims := - ⟨#[branchClaims_5_6_group_00, branchClaims_5_6_group_01], 93, 92⟩ + ⟨#[branchClaims5And6Group00, branchClaims5And6Group01], 93, 92⟩ -private def branchClaims_5_7_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 7), group 00. -/ +def branchClaims5And7Group00 : Array NodeClaim := #[⟨2, 711142370334, 211657883712758, 70368746803362, 155, 147456, 0, 147456, #[⟨2, [], [379], [], []⟩, ⟨3, [], [380], [], []⟩]⟩, @@ -3403,7 +3430,8 @@ private def branchClaims_5_7_group_00 : Array NodeClaim := 415, 262144, 17180590080, 0, #[⟨3, [7, 5, 3], [], [62], []⟩, ⟨6, [0], [], [], []⟩]⟩] -private def branchClaims_5_7_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 7), group 01. -/ +def branchClaims5And7Group01 : Array NodeClaim := #[⟨3, 4107283576656194590, 36240867219537018, 70369552167968, 255, 16384, 0, 16384, #[⟨2, [], [586], [], []⟩]⟩, ⟨4, 6460695856933989406, 36240731928067322, 211382992172136, @@ -3540,9 +3568,10 @@ private def branchClaims_5_7_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (5, 7). -/ def branchClaims5Row7 : BranchClaims := - ⟨#[branchClaims_5_7_group_00, branchClaims_5_7_group_01], 99, 98⟩ + ⟨#[branchClaims5And7Group00, branchClaims5And7Group01], 99, 98⟩ -private def branchClaims_5_8_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 8), group 00. -/ +def branchClaims5And8Group00 : Array NodeClaim := #[⟨3, 4107283707673668638, 36240317463723262, 810029298, 156, 8623489024, 0, 8623489024, #[⟨5, [], [134], [], []⟩, ⟨6, [], [880], [], []⟩]⟩, @@ -3768,7 +3797,8 @@ private def branchClaims_5_8_group_00 : Array NodeClaim := ⟨3, 8142508996899859486, 36240869367020786, 211244748933152, 666, 131072, 0, 131072, #[⟨3, [], [353], [], []⟩]⟩] -private def branchClaims_5_8_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 8), group 01. -/ +def branchClaims5And8Group01 : Array NodeClaim := #[⟨2, 870614002718, 36240594489113762, 140738565801984, 3386, 525064, 536936576, 520, #[⟨0, [], [373], [], []⟩, ⟨1, [6], [146], [62], []⟩, @@ -3875,9 +3905,10 @@ private def branchClaims_5_8_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (5, 8). -/ def branchClaims5Row8 : BranchClaims := - ⟨#[branchClaims_5_8_group_00, branchClaims_5_8_group_01], 89, 88⟩ + ⟨#[branchClaims5And8Group00, branchClaims5And8Group01], 89, 88⟩ -private def branchClaims_5_9_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 9), group 00. -/ +def branchClaims5And9Group00 : Array NodeClaim := #[⟨3, 6413126578913635358, 36240317463723262, 1344803058, 3186, 268435456, 0, 268435456, #[⟨5, [], [306], [], []⟩]⟩, ⟨2, 709538049054, 36240042585816310, 2625698, @@ -4112,7 +4143,8 @@ private def branchClaims_5_9_group_00 : Array NodeClaim := ⟨5, [0], [], [], []⟩, ⟨6, [0], [], [], []⟩]⟩] -private def branchClaims_5_9_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 9), group 01. -/ +def branchClaims5And9Group01 : Array NodeClaim := #[⟨2, 716534148126, 36240729780583618, 36028797035250688, 412, 852640, 18186633552, 262656, #[⟨0, [5], [], [], []⟩, ⟨1, [5, 5], [158], [58, 60], []⟩, @@ -4215,6 +4247,6 @@ private def branchClaims_5_9_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (5, 9). -/ def branchClaims5Row9 : BranchClaims := - ⟨#[branchClaims_5_9_group_00, branchClaims_5_9_group_01], 86, 85⟩ + ⟨#[branchClaims5And9Group00, branchClaims5And9Group01], 86, 85⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData08.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData08.lean index b2701f4cd4..85daa7af7b 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData08.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData08.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_5_10_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 10), group 00. -/ +def branchClaims5And10Group00 : Array NodeClaim := #[⟨3, 6124896333514501150, 36240317463715070, 813170932, 3444, 536870912, 0, 536870912, #[⟨5, [], [1298], [], []⟩]⟩, ⟨3, 8214566560614411294, 36240317463723262, 70506991079584, @@ -230,7 +238,8 @@ private def branchClaims_5_10_group_00 : Array NodeClaim := 3305, 32768, 4, 0, #[⟨0, [7], [], [], []⟩, ⟨3, [], [], [62], []⟩]⟩] -private def branchClaims_5_10_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 10), group 01. -/ +def branchClaims5And10Group01 : Array NodeClaim := #[⟨2, 840508730398, 36240592333241594, 138244820992, 3464, 33604168, 4, 33587784, #[⟨0, [6], [160], [], []⟩, ⟨1, [], [160, 160], [], []⟩, @@ -445,7 +454,8 @@ private def branchClaims_5_10_group_01 : Array NodeClaim := ⟨2, [], [], [126], []⟩, ⟨4, [], [143], [], []⟩]⟩] -private def branchClaims_5_10_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 10), group 02. -/ +def branchClaims5And10Group02 : Array NodeClaim := #[⟨3, 2810247009028107294, 36240867211148542, 36099304010023970, 3486, 16384, 0, 16384, #[⟨2, [], [655], [], []⟩]⟩, ⟨3, 6124896334772792350, 36240867211140350, 36099578891075664, @@ -554,9 +564,10 @@ private def branchClaims_5_10_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (5, 10). -/ def branchClaims5Row10 : BranchClaims := - ⟨#[branchClaims_5_10_group_00, branchClaims_5_10_group_01, branchClaims_5_10_group_02], 159, 158⟩ + ⟨#[branchClaims5And10Group00, branchClaims5And10Group01, branchClaims5And10Group02], 159, 158⟩ -private def branchClaims_5_11_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 11), group 00. -/ +def branchClaims5And11Group00 : Array NodeClaim := #[⟨3, 8214566560616508446, 36240317463723262, 70644966904000, 3409, 268435456, 32, 268435456, #[⟨1, [7], [], [], []⟩, ⟨5, [], [1298], [], []⟩]⟩, @@ -775,7 +786,8 @@ private def branchClaims_5_11_group_00 : Array NodeClaim := 3534, 786432, 16384, 524288, #[⟨2, [5], [], [], []⟩, ⟨3, [], [631], [62], []⟩]⟩] -private def branchClaims_5_11_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 11), group 01. -/ +def branchClaims5And11Group01 : Array NodeClaim := #[⟨4, 3866622595585109022, 36240869358632190, 140876810064120, 399, 0, 0, 0, #[]⟩, ⟨3, 3819053324521008158, 36240867211148542, 138784837712, @@ -997,7 +1009,8 @@ private def branchClaims_5_11_group_01 : Array NodeClaim := ⟨5, [2], [819], [], []⟩, ⟨6, [], [141], [], []⟩]⟩] -private def branchClaims_5_11_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 11), group 02. -/ +def branchClaims5And11Group02 : Array NodeClaim := #[⟨3, 3819053325561195550, 36240867211140350, 36099579425849424, 3558, 268435968, 262248, 268435968, #[⟨0, [5], [], [], []⟩, ⟨1, [7, 5], [119], [], []⟩, @@ -1100,9 +1113,10 @@ private def branchClaims_5_11_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (5, 11). -/ def branchClaims5Row11 : BranchClaims := - ⟨#[branchClaims_5_11_group_00, branchClaims_5_11_group_01, branchClaims_5_11_group_02], 153, 152⟩ + ⟨#[branchClaims5And11Group00, branchClaims5And11Group01, branchClaims5And11Group02], 153, 152⟩ -private def branchClaims_5_12_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 12), group 00. -/ +def branchClaims5And12Group00 : Array NodeClaim := #[⟨4, 8190359180047641630, 212072348056830, 211109192142068, 485, 536870912, 0, 0, #[⟨5, [], [], [], [308]⟩]⟩, ⟨3, 8142508434006830110, 212072348015870, 70369019430132, @@ -1297,7 +1311,8 @@ private def branchClaims_5_12_group_00 : Array NodeClaim := 2760, 8320, 0, 0, #[⟨1, [], [], [61], []⟩, ⟨2, [], [], [62], []⟩]⟩] -private def branchClaims_5_12_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 12), group 01. -/ +def branchClaims5And12Group01 : Array NodeClaim := #[⟨4, 5991758563169102878, 36240731919678718, 211109187960050, 450, 8589934592, 0, 8589934592, #[⟨6, [], [300], [], []⟩]⟩, ⟨3, 5980781039077387294, 36240731919678714, 211109185853648, @@ -1513,7 +1528,8 @@ private def branchClaims_5_12_group_01 : Array NodeClaim := ⟨3, 7133702521957739550, 36240731928067326, 70918771069088, 3617, 268435456, 0, 268435456, #[⟨5, [], [424], [], []⟩]⟩] -private def branchClaims_5_12_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 12), group 02. -/ +def branchClaims5And12Group02 : Array NodeClaim := #[⟨3, 8142508838488730654, 36240869367012604, 71193648959664, 3617, 268435456, 0, 268435456, #[⟨5, [], [1298], [], []⟩]⟩, ⟨2, 712202873886, 36240731928059068, 550026875008, @@ -1713,7 +1729,8 @@ private def branchClaims_5_12_group_02 : Array NodeClaim := ⟨4, 5131008084639575070, 36240869358632190, 211796387957780, 3643, 512, 0, 512, #[⟨1, [], [161], [], []⟩]⟩] -private def branchClaims_5_12_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 12), group 03. -/ +def branchClaims5And12Group03 : Array NodeClaim := #[⟨3, 5116089910873910302, 36240869358632158, 211658945858560, 3641, 8320, 0, 0, #[⟨1, [], [], [190], []⟩, ⟨2, [], [], [191], []⟩]⟩, @@ -1758,10 +1775,11 @@ private def branchClaims_5_12_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (5, 12). -/ def branchClaims5Row12 : BranchClaims := - ⟨#[branchClaims_5_12_group_00, branchClaims_5_12_group_01, branchClaims_5_12_group_02, - branchClaims_5_12_group_03], 202, 201⟩ + ⟨#[branchClaims5And12Group00, branchClaims5And12Group01, branchClaims5And12Group02, + branchClaims5And12Group03], 202, 201⟩ -private def branchClaims_5_14_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 14), group 00. -/ +def branchClaims5And14Group00 : Array NodeClaim := #[⟨3, 6413126707794504734, 36240319602810110, 1882718456, 3444, 536870912, 0, 536870912, #[⟨5, [], [1298], [], []⟩]⟩, ⟨3, 8214566558742703134, 36240319602818302, 70506723692704, @@ -1972,7 +1990,8 @@ private def branchClaims_5_14_group_00 : Array NodeClaim := ⟨4, 3725603117181004830, 36240594489081086, 140876554180842, 1131, 0, 0, 0, #[]⟩] -private def branchClaims_5_14_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 14), group 01. -/ +def branchClaims5And14Group01 : Array NodeClaim := #[⟨3, 3674937621373086750, 36240044733267198, 1615337706, 71, 8589934592, 33554432, 0, #[⟨5, [4], [], [], []⟩, ⟨6, [], [], [63], []⟩]⟩, @@ -2199,7 +2218,8 @@ private def branchClaims_5_14_group_01 : Array NodeClaim := ⟨4, 5419238700790410270, 36240869358632190, 36239904865798392, 784, 0, 0, 0, #[]⟩] -private def branchClaims_5_14_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 14), group 02. -/ +def branchClaims5And14Group02 : Array NodeClaim := #[⟨3, 5404320527024745502, 36240731919678714, 36239904862652616, 3705, 8396800, 16777350, 8388608, #[⟨0, [5, 4], [], [], []⟩, ⟨1, [2], [], [], []⟩, @@ -2402,7 +2422,8 @@ private def branchClaims_5_14_group_02 : Array NodeClaim := ⟨3, 5116090047273724958, 36240594480725230, 140741251226624, 3719, 8192, 16384, 0, #[⟨2, [5], [], [190], []⟩]⟩] -private def branchClaims_5_14_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 14), group 03. -/ +def branchClaims5And14Group03 : Array NodeClaim := #[⟨4, 7175642451865594910, 36240594489113854, 211659748079776, 784, 0, 0, 0, #[]⟩, ⟨3, 7133702680335707166, 36240594480725226, 211109991217184, @@ -2618,7 +2639,8 @@ private def branchClaims_5_14_group_03 : Array NodeClaim := ⟨3, [], [], [252], []⟩, ⟨5, [], [], [254], []⟩]⟩] -private def branchClaims_5_14_group_04 : Array NodeClaim := +/-- Coverage claims for branch (5, 14), group 04. -/ +def branchClaims5And14Group04 : Array NodeClaim := #[⟨4, 6451125419464289310, 212072348056830, 211108123641066, 778, 536870912, 0, 536870912, #[⟨5, [], [1107], [], []⟩]⟩, ⟨3, 6413126297608350750, 212072348024058, 211108115251304, @@ -2829,7 +2851,8 @@ private def branchClaims_5_14_group_04 : Array NodeClaim := ⟨3, [1], [], [], []⟩, ⟨5, [], [106], [], []⟩]⟩] -private def branchClaims_5_14_group_05 : Array NodeClaim := +/-- Coverage claims for branch (5, 14), group 05. -/ +def branchClaims5And14Group05 : Array NodeClaim := #[⟨3, 6413126040916945950, 36240869358583038, 211382992110632, 290, 256, 16384, 256, #[⟨1, [], [465], [], []⟩, ⟨2, [1], [], [], []⟩]⟩, @@ -2989,10 +3012,11 @@ private def branchClaims_5_14_group_05 : Array NodeClaim := /-- Flat postorder claims for branch (5, 14). -/ def branchClaims5Row14 : BranchClaims := - ⟨#[branchClaims_5_14_group_00, branchClaims_5_14_group_01, branchClaims_5_14_group_02, - branchClaims_5_14_group_03, branchClaims_5_14_group_04, branchClaims_5_14_group_05], 364, 363⟩ + ⟨#[branchClaims5And14Group00, branchClaims5And14Group01, branchClaims5And14Group02, + branchClaims5And14Group03, branchClaims5And14Group04, branchClaims5And14Group05], 364, 363⟩ -private def branchClaims_5_15_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 15), group 00. -/ +def branchClaims5And15Group00 : Array NodeClaim := #[⟨3, 8214566421305846814, 36240319602818302, 70507260555424, 3371, 0, 0, 0, #[]⟩, ⟨2, 700982062110, 36240044724894974, 1077412000, @@ -3208,7 +3232,8 @@ private def branchClaims_5_15_group_00 : Array NodeClaim := ⟨3, 8214566452981230622, 36240869367020764, 70372503861376, 333, 0, 0, 0, #[]⟩] -private def branchClaims_5_15_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 15), group 01. -/ +def branchClaims5And15Group01 : Array NodeClaim := #[⟨2, 732657445918, 36240457050143964, 3759671424, 3670, 570982912, 396, 33587200, #[⟨0, [6, 5], [], [], []⟩, ⟨1, [6, 5], [], [61], []⟩, @@ -3432,7 +3457,8 @@ private def branchClaims_5_15_group_01 : Array NodeClaim := 3823, 16777218, 0, 16777218, #[⟨0, [], [599], [], []⟩, ⟨4, [], [105], [], []⟩]⟩] -private def branchClaims_5_15_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 15), group 02. -/ +def branchClaims5And15Group02 : Array NodeClaim := #[⟨2, 733127207966, 36240594480708856, 140741246978176, 3701, 9177711368, 8396934, 9177710848, #[⟨0, [6, 6], [], [126], []⟩, ⟨1, [6], [895], [127], []⟩, @@ -3655,7 +3681,8 @@ private def branchClaims_5_15_group_02 : Array NodeClaim := ⟨2, [5], [], [], []⟩, ⟨3, [], [], [188, 190], []⟩]⟩] -private def branchClaims_5_15_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 15), group 03. -/ +def branchClaims5And15Group03 : Array NodeClaim := #[⟨4, 3866903658789170206, 36240869358632190, 36099169524971616, 919, 0, 0, 0, #[]⟩, ⟨3, 3819052912748358686, 36100131870276862, 36099166840574048, @@ -3882,7 +3909,8 @@ private def branchClaims_5_15_group_03 : Array NodeClaim := 1291, 264, 0, 8, #[⟨0, [], [599], [], []⟩, ⟨1, [], [], [254], []⟩]⟩] -private def branchClaims_5_15_group_04 : Array NodeClaim := +/-- Coverage claims for branch (5, 15), group 04. -/ +def branchClaims5And15Group04 : Array NodeClaim := #[⟨3, 8214565908040477726, 36240869366988010, 70507797428232, 3865, 8, 0, 8, #[⟨0, [], [599], [], []⟩]⟩, ⟨2, 187716693022, 36240594489064682, 1614284808, @@ -4116,7 +4144,8 @@ private def branchClaims_5_15_group_04 : Array NodeClaim := ⟨4, 3721380976073993246, 36240869366988030, 36240041771013350, 6, 0, 0, 0, #[]⟩] -private def branchClaims_5_15_group_05 : Array NodeClaim := +/-- Coverage claims for branch (5, 15), group 05. -/ +def branchClaims5And15Group05 : Array NodeClaim := #[⟨3, 3674937604916735006, 36240869358599422, 36099304280560706, 3232, 268730368, 147456, 268697600, #[⟨2, [5], [], [], []⟩, ⟨3, [5], [124], [319], []⟩, @@ -4285,7 +4314,7 @@ private def branchClaims_5_15_group_05 : Array NodeClaim := /-- Flat postorder claims for branch (5, 15). -/ def branchClaims5Row15 : BranchClaims := - ⟨#[branchClaims_5_15_group_00, branchClaims_5_15_group_01, branchClaims_5_15_group_02, - branchClaims_5_15_group_03, branchClaims_5_15_group_04, branchClaims_5_15_group_05], 365, 364⟩ + ⟨#[branchClaims5And15Group00, branchClaims5And15Group01, branchClaims5And15Group02, + branchClaims5And15Group03, branchClaims5And15Group04, branchClaims5And15Group05], 365, 364⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData09.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData09.lean index c89f148d1b..bc45162152 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData09.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData09.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_5_16_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 16), group 00. -/ +def branchClaims5And16Group00 : Array NodeClaim := #[⟨4, 5167881283550931998, 212072348048630, 211794239427830, 452, 268435456, 0, 268435456, #[⟨5, [], [302], [], []⟩]⟩, ⟨3, 5116089887836171294, 212070200564982, 70368750998774, @@ -273,7 +281,8 @@ private def branchClaims_5_16_group_00 : Array NodeClaim := ⟨4, 5451889406723058718, 212072348056830, 211245282663658, 3916, 8589934592, 0, 8589934592, #[⟨6, [], [1356], [], []⟩]⟩] -private def branchClaims_5_16_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 16), group 01. -/ +def branchClaims5And16Group01 : Array NodeClaim := #[⟨3, 5404320135658957854, 212070200573182, 70507257437250, 3915, 294912, 147456, 32768, #[⟨2, [5], [], [], []⟩, ⟨3, [5], [1295], [63], []⟩]⟩, @@ -487,7 +496,8 @@ private def branchClaims_5_16_group_01 : Array NodeClaim := 3940, 256, 131072, 256, #[⟨1, [], [631], [], []⟩, ⟨3, [1], [], [], []⟩]⟩] -private def branchClaims_5_16_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 16), group 02. -/ +def branchClaims5And16Group02 : Array NodeClaim := #[⟨2, 849135889438, 36240867219479796, 70506199384128, 3938, 134217776, 0, 134217744, #[⟨0, [], [900], [], []⟩, ⟨1, [], [], [127], []⟩, @@ -634,9 +644,10 @@ private def branchClaims_5_16_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (5, 16). -/ def branchClaims5Row16 : BranchClaims := - ⟨#[branchClaims_5_16_group_00, branchClaims_5_16_group_01, branchClaims_5_16_group_02], 170, 169⟩ + ⟨#[branchClaims5And16Group00, branchClaims5And16Group01, branchClaims5And16Group02], 170, 169⟩ -private def branchClaims_5_17_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 17), group 00. -/ +def branchClaims5And17Group00 : Array NodeClaim := #[⟨4, 3145202237277563934, 36240867219537150, 140738040446194, 228, 17179869184, 0, 17179869184, #[⟨6, [], [680], [], []⟩]⟩, ⟨3, 3098477391143595038, 36240867219504382, 541595890, @@ -884,7 +895,8 @@ private def branchClaims_5_17_group_00 : Array NodeClaim := ⟨3, 6413126718280789022, 36240867219520764, 140738845738192, 3977, 32, 0, 32, #[⟨1, [], [306], [], []⟩]⟩] -private def branchClaims_5_17_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 17), group 01. -/ +def branchClaims5And17Group01 : Array NodeClaim := #[⟨3, 8214566569228987422, 36240867219537140, 211243686704256, 3371, 0, 0, 0, #[]⟩, ⟨2, 848905202718, 36240592341613812, 140737503560832, @@ -1105,7 +1117,8 @@ private def branchClaims_5_17_group_01 : Array NodeClaim := ⟨1, [2], [], [], []⟩, ⟨5, [2], [], [126], []⟩]⟩] -private def branchClaims_5_17_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 17), group 02. -/ +def branchClaims5And17Group02 : Array NodeClaim := #[⟨2, 428736605214, 36240867211148530, 70918500536352, 256, 147456, 0, 16384, #[⟨2, [], [378], [], []⟩, ⟨3, [], [], [127], []⟩]⟩, @@ -1327,7 +1340,8 @@ private def branchClaims_5_17_group_02 : Array NodeClaim := ⟨1, [], [], [190], []⟩, ⟨5, [0, 0], [], [], []⟩]⟩] -private def branchClaims_5_17_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 17), group 03. -/ +def branchClaims5And17Group03 : Array NodeClaim := #[⟨2, 841087020062, 36240867219528946, 36029346780545152, 4015, 18053137060, 134349136, 17516266116, #[⟨0, [5], [887], [], []⟩, ⟨1, [5, 5], [377, 160], [189], []⟩, @@ -1423,10 +1437,11 @@ private def branchClaims_5_17_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (5, 17). -/ def branchClaims5Row17 : BranchClaims := - ⟨#[branchClaims_5_17_group_00, branchClaims_5_17_group_01, branchClaims_5_17_group_02, - branchClaims_5_17_group_03], 220, 219⟩ + ⟨#[branchClaims5And17Group00, branchClaims5And17Group01, branchClaims5And17Group02, + branchClaims5And17Group03], 220, 219⟩ -private def branchClaims_5_18_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 18), group 00. -/ +def branchClaims5And18Group00 : Array NodeClaim := #[⟨4, 5456111658098322462, 36240869366988030, 141426564798706, 166, 33554432, 0, 33554432, #[⟨5, [], [1118], [], []⟩]⟩, ⟨3, 5404320262383561758, 36240867219504382, 1076369650, @@ -1665,7 +1680,8 @@ private def branchClaims_5_18_group_00 : Array NodeClaim := 4038, 536871424, 0, 536871424, #[⟨1, [], [135], [], []⟩, ⟨5, [], [135], [], []⟩]⟩] -private def branchClaims_5_18_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 18), group 01. -/ +def branchClaims5And18Group01 : Array NodeClaim := #[⟨4, 8262135316309175326, 36240869367020794, 211382723706056, 626, 0, 0, 0, #[]⟩, ⟨3, 8214566045245074462, 36240867219537114, 70644698479680, @@ -1875,7 +1891,8 @@ private def branchClaims_5_18_group_01 : Array NodeClaim := ⟨3, 3098477254226832414, 36240867219504382, 70644161591456, 208, 0, 0, 0, #[]⟩] -private def branchClaims_5_18_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 18), group 02. -/ +def branchClaims5And18Group02 : Array NodeClaim := #[⟨3, 5404320263440526366, 36240867219504382, 70644698470592, 4030, 17179869184, 65536, 17179869184, #[⟨3, [7], [], [], []⟩, ⟨6, [], [301], [], []⟩]⟩, @@ -2102,7 +2119,8 @@ private def branchClaims_5_18_group_02 : Array NodeClaim := ⟨4, 4157948681897733150, 36240867219537146, 36240592329001048, 562, 8, 0, 0, #[⟨0, [], [], [], [462]⟩]⟩] -private def branchClaims_5_18_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 18), group 03. -/ +def branchClaims5And18Group03 : Array NodeClaim := #[⟨3, 4107283186089815070, 36240867211148538, 36099167642732632, 4072, 8623521792, 562037260, 33587200, #[⟨0, [7, 5], [], [], []⟩, ⟨1, [2], [], [], []⟩, @@ -2320,10 +2338,11 @@ private def branchClaims_5_18_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (5, 18). -/ def branchClaims5Row18 : BranchClaims := - ⟨#[branchClaims_5_18_group_00, branchClaims_5_18_group_01, branchClaims_5_18_group_02, - branchClaims_5_18_group_03], 254, 253⟩ + ⟨#[branchClaims5And18Group00, branchClaims5And18Group01, branchClaims5And18Group02, + branchClaims5And18Group03], 254, 253⟩ -private def branchClaims_5_19_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 19), group 00. -/ +def branchClaims5And19Group00 : Array NodeClaim := #[⟨4, 5446260038209465374, 36240592341630206, 211107318349042, 1327, 0, 0, 0, #[]⟩, ⟨4, 5447385938116307998, 36240594489113850, 211107577347322, @@ -2531,7 +2550,8 @@ private def branchClaims_5_19_group_00 : Array NodeClaim := ⟨4, 5420364341996252190, 36240592341630206, 211108123643128, 1955, 536870912, 0, 536870912, #[⟨5, [], [719], [], []⟩]⟩] -private def branchClaims_5_19_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 19), group 01. -/ +def branchClaims5And19Group01 : Array NodeClaim := #[⟨3, 5404320268323744798, 36240454902676734, 211107318336704, 2548, 65664, 0, 0, #[⟨1, [], [], [62], []⟩, ⟨3, [], [], [63], []⟩]⟩, @@ -2715,7 +2735,8 @@ private def branchClaims_5_19_group_01 : Array NodeClaim := 2663, 8192, 147456, 0, #[⟨2, [5], [], [126], []⟩, ⟨3, [5], [], [], []⟩]⟩] -private def branchClaims_5_19_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 19), group 02. -/ +def branchClaims5And19Group02 : Array NodeClaim := #[⟨4, 3862118888928013342, 36240594489113852, 36239906212187312, 2073, 0, 0, 0, #[]⟩, ⟨3, 3819053217491282974, 36240044733299956, 36239903796268064, @@ -2899,7 +2920,8 @@ private def branchClaims_5_19_group_02 : Array NodeClaim := ⟨4, 2852186672691506206, 36240731928067318, 36240453547900068, 219, 65536, 0, 65536, #[⟨3, [], [570], [], []⟩]⟩] -private def branchClaims_5_19_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 19), group 03. -/ +def branchClaims5And19Group03 : Array NodeClaim := #[⟨3, 2810246901161618462, 36240731919678694, 36239903791037472, 102, 147456, 0, 131072, #[⟨2, [], [], [191], []⟩, ⟨3, [], [351], [], []⟩]⟩, @@ -3074,7 +3096,8 @@ private def branchClaims_5_19_group_03 : Array NodeClaim := 4111, 805306368, 320, 536870912, #[⟨1, [5, 5], [], [], []⟩, ⟨5, [], [465], [254], []⟩]⟩] -private def branchClaims_5_19_group_04 : Array NodeClaim := +/-- Coverage claims for branch (5, 19), group 04. -/ +def branchClaims5And19Group04 : Array NodeClaim := #[⟨2, 171075267614, 36240729780534502, 36099165771007008, 602, 201458000, 0, 201326608, #[⟨0, [], [144], [], []⟩, ⟨1, [], [], [251, 253], []⟩, @@ -3206,10 +3229,11 @@ private def branchClaims_5_19_group_04 : Array NodeClaim := /-- Flat postorder claims for branch (5, 19). -/ def branchClaims5Row19 : BranchClaims := - ⟨#[branchClaims_5_19_group_00, branchClaims_5_19_group_01, branchClaims_5_19_group_02, - branchClaims_5_19_group_03, branchClaims_5_19_group_04], 298, 297⟩ + ⟨#[branchClaims5And19Group00, branchClaims5And19Group01, branchClaims5And19Group02, + branchClaims5And19Group03, branchClaims5And19Group04], 298, 297⟩ -private def branchClaims_5_24_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 24), group 00. -/ +def branchClaims5And24Group00 : Array NodeClaim := #[⟨2, 581727579166, 211522592226550, 70369281608704, 4115, 147712, 8320, 147712, #[⟨1, [6], [377], [], []⟩, ⟨2, [6], [379], [], []⟩, @@ -3437,7 +3461,8 @@ private def branchClaims_5_24_group_00 : Array NodeClaim := ⟨5, [], [391, 449], [], []⟩, ⟨6, [], [449], [], []⟩]⟩] -private def branchClaims_5_24_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 24), group 01. -/ +def branchClaims5And24Group01 : Array NodeClaim := #[⟨3, 3674938265819573278, 36240869358615794, 36239903788906736, 309, 0, 0, 0, #[]⟩, ⟨3, 3819053453895429150, 36240869358615796, 36239903792040176, @@ -3625,7 +3650,8 @@ private def branchClaims_5_24_group_01 : Array NodeClaim := 102, 147456, 0, 131072, #[⟨2, [], [], [126], []⟩, ⟨3, [], [1148], [], []⟩]⟩] -private def branchClaims_5_24_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 24), group 02. -/ +def branchClaims5And24Group02 : Array NodeClaim := #[⟨4, 5995699448614382622, 36240319611206902, 36239903796288624, 2817, 0, 0, 0, #[]⟩, ⟨3, 5980781274848717854, 36240182172253426, 36239903793142848, @@ -3812,7 +3838,8 @@ private def branchClaims_5_24_group_02 : Array NodeClaim := ⟨3, 7133702393143389214, 36240731928067302, 70369295248386, 4155, 524288, 131072, 0, #[⟨3, [5], [], [190], []⟩]⟩] -private def branchClaims_5_24_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 24), group 03. -/ +def branchClaims5And24Group03 : Array NodeClaim := #[⟨3, 8142508709674380318, 36240869367004406, 70644173147136, 4156, 524416, 131072, 524416, #[⟨1, [], [157], [], []⟩, ⟨3, [5], [157], [], []⟩]⟩, @@ -3988,7 +4015,7 @@ private def branchClaims_5_24_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (5, 24). -/ def branchClaims5Row24 : BranchClaims := - ⟨#[branchClaims_5_24_group_00, branchClaims_5_24_group_01, branchClaims_5_24_group_02, - branchClaims_5_24_group_03], 242, 241⟩ + ⟨#[branchClaims5And24Group00, branchClaims5And24Group01, branchClaims5And24Group02, + branchClaims5And24Group03], 242, 241⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData10.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData10.lean index c32eb292db..5fb74f8e38 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData10.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData10.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_5_25_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 25), group 00. -/ +def branchClaims5And25Group00 : Array NodeClaim := #[⟨2, 581729676318, 36099582122843382, 70369818479616, 4175, 73856, 16640, 73856, #[⟨1, [5], [377], [], []⟩, ⟨2, [5], [379], [], []⟩, @@ -250,7 +258,8 @@ private def branchClaims_5_25_group_00 : Array NodeClaim := ⟨4, 6032571872154643486, 36240869358632182, 36239907280673890, 1758, 16384, 0, 16384, #[⟨2, [], [223], [], []⟩]⟩] -private def branchClaims_5_25_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 25), group 01. -/ +def branchClaims5And25Group01 : Array NodeClaim := #[⟨3, 5980780476439882782, 36240182163864822, 36099166839528546, 2569, 17179869184, 147456, 0, #[⟨2, [5], [], [], []⟩, ⟨3, [5], [], [], []⟩, @@ -430,7 +439,8 @@ private def branchClaims_5_25_group_01 : Array NodeClaim := ⟨4, 3862118583648283678, 36240594480725246, 71059432339504, 3473, 32768, 0, 32768, #[⟨3, [], [1049], [], []⟩]⟩] -private def branchClaims_5_25_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 25), group 02. -/ +def branchClaims5And25Group02 : Array NodeClaim := #[⟨3, 3819052912211553310, 36240594480725110, 70507260606496, 666, 131072, 0, 0, #[⟨3, [], [], [127], []⟩]⟩, ⟨4, 6171339292582505502, 36240869367020790, 211107314202724, @@ -609,7 +619,8 @@ private def branchClaims_5_25_group_02 : Array NodeClaim := 2572, 65536, 131080, 0, #[⟨0, [5], [], [], []⟩, ⟨3, [5], [], [190], []⟩]⟩] -private def branchClaims_5_25_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 25), group 03. -/ +def branchClaims5And25Group03 : Array NodeClaim := #[⟨2, 969400806430, 36240594489105632, 36239904328910848, 2953, 65928, 0, 65544, #[⟨0, [], [433], [], []⟩, ⟨1, [], [], [189, 191], []⟩, @@ -825,10 +836,11 @@ private def branchClaims_5_25_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (5, 25). -/ def branchClaims5Row25 : BranchClaims := - ⟨#[branchClaims_5_25_group_00, branchClaims_5_25_group_01, branchClaims_5_25_group_02, - branchClaims_5_25_group_03], 254, 253⟩ + ⟨#[branchClaims5And25Group00, branchClaims5And25Group01, branchClaims5And25Group02, + branchClaims5And25Group03], 254, 253⟩ -private def branchClaims_5_26_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 26), group 00. -/ +def branchClaims5And26Group00 : Array NodeClaim := #[⟨3, 4107283709012634654, 36240317463723262, 70506993168544, 3371, 0, 0, 0, #[]⟩, ⟨3, 6413126718226328606, 36240317463723262, 70644968992960, @@ -1028,7 +1040,8 @@ private def branchClaims_5_26_group_00 : Array NodeClaim := ⟨2, [], [], [60], []⟩, ⟨3, [], [], [61, 62], []⟩]⟩] -private def branchClaims_5_26_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 26), group 01. -/ +def branchClaims5And26Group01 : Array NodeClaim := #[⟨3, 5116090042757049374, 36240319611174126, 70369824756932, 3418, 17179869184, 268501024, 17179869184, #[⟨1, [4], [], [], []⟩, ⟨3, [7], [], [], []⟩, @@ -1234,7 +1247,8 @@ private def branchClaims_5_26_group_01 : Array NodeClaim := 68, 147456, 0, 147456, #[⟨2, [], [645], [], []⟩, ⟨3, [], [128], [], []⟩]⟩] -private def branchClaims_5_26_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 26), group 02. -/ +def branchClaims5And26Group02 : Array NodeClaim := #[⟨2, 853380590622, 36240867219537072, 70506187871232, 3992, 131104, 0, 131072, #[⟨1, [], [], [127], []⟩, ⟨3, [], [380], [], []⟩]⟩, @@ -1444,7 +1458,8 @@ private def branchClaims_5_26_group_02 : Array NodeClaim := 3830, 81920, 0, 65536, #[⟨2, [], [], [190], []⟩, ⟨3, [], [381], [], []⟩]⟩] -private def branchClaims_5_26_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 26), group 03. -/ +def branchClaims5And26Group03 : Array NodeClaim := #[⟨1, 2792516638, 211520444759040, 70368746812416, 4248, 426560, 268435488, 0, #[⟨1, [7], [], [174, 180], []⟩, ⟨3, [], [], [184, 188, 191], []⟩, @@ -1629,7 +1644,8 @@ private def branchClaims_5_26_group_03 : Array NodeClaim := 51, 131136, 0, 131136, #[⟨1, [], [611], [], []⟩, ⟨3, [], [351], [], []⟩]⟩] -private def branchClaims_5_26_group_04 : Array NodeClaim := +/-- Coverage claims for branch (5, 26), group 04. -/ +def branchClaims5And26Group04 : Array NodeClaim := #[⟨3, 5404320282258336798, 36240869366988010, 70645238487048, 3749, 557568, 33554444, 557568, #[⟨0, [7, 5], [], [], []⟩, ⟨1, [], [133], [], []⟩, @@ -1667,10 +1683,11 @@ private def branchClaims_5_26_group_04 : Array NodeClaim := /-- Flat postorder claims for branch (5, 26). -/ def branchClaims5Row26 : BranchClaims := - ⟨#[branchClaims_5_26_group_00, branchClaims_5_26_group_01, branchClaims_5_26_group_02, - branchClaims_5_26_group_03, branchClaims_5_26_group_04], 263, 262⟩ + ⟨#[branchClaims5And26Group00, branchClaims5And26Group01, branchClaims5And26Group02, + branchClaims5And26Group03, branchClaims5And26Group04], 263, 262⟩ -private def branchClaims_5_27_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 27), group 00. -/ +def branchClaims5And27Group00 : Array NodeClaim := #[⟨3, 6413126579717827614, 212070200573182, 211107577344096, 1127, 16456, 0, 16456, #[⟨0, [], [820], [], []⟩, ⟨1, [], [604], [], []⟩, @@ -1881,7 +1898,8 @@ private def branchClaims_5_27_group_00 : Array NodeClaim := 3305, 32768, 4, 0, #[⟨0, [7], [], [], []⟩, ⟨3, [], [], [62], []⟩]⟩] -private def branchClaims_5_27_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 27), group 01. -/ +def branchClaims5And27Group01 : Array NodeClaim := #[⟨2, 838956379166, 36240867211148502, 5804096, 4274, 17448370212, 0, 17448304644, #[⟨0, [], [391], [], []⟩, ⟨1, [], [], [61], []⟩, @@ -2090,7 +2108,8 @@ private def branchClaims_5_27_group_01 : Array NodeClaim := ⟨3, 8142508992354216990, 36240869367004412, 211244747854048, 309, 0, 0, 0, #[]⟩] -private def branchClaims_5_27_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 27), group 02. -/ +def branchClaims5And27Group02 : Array NodeClaim := #[⟨2, 866068360222, 36240594489097452, 140738564722816, 3840, 541192, 65568, 0, #[⟨0, [], [], [123], []⟩, ⟨1, [6], [], [124], []⟩, @@ -2300,7 +2319,8 @@ private def branchClaims_5_27_group_02 : Array NodeClaim := 3917, 36, 0, 4, #[⟨0, [], [886], [], []⟩, ⟨1, [], [], [190], []⟩]⟩] -private def branchClaims_5_27_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 27), group 03. -/ +def branchClaims5And27Group03 : Array NodeClaim := #[⟨4, 5158029675979762718, 212072348056830, 211793969943796, 159, 268435456, 0, 268435456, #[⟨5, [], [235], [], []⟩]⟩, ⟨3, 5116089904449874974, 212072339668222, 211244213081184, @@ -2519,7 +2539,8 @@ private def branchClaims_5_27_group_03 : Array NodeClaim := ⟨4, 3857051931775233054, 36240592341630206, 211244748938470, 3839, 0, 0, 0, #[]⟩] -private def branchClaims_5_27_group_04 : Array NodeClaim := +/-- Coverage claims for branch (5, 27), group 04. -/ +def branchClaims5And27Group04 : Array NodeClaim := #[⟨3, 3819052809919294494, 36240592333241598, 211244748904544, 103, 131080, 0, 131072, #[⟨0, [], [], [255], []⟩, ⟨3, [], [637], [], []⟩]⟩, @@ -2696,7 +2717,8 @@ private def branchClaims_5_27_group_04 : Array NodeClaim := ⟨3, [4], [140], [], []⟩, ⟨6, [0], [], [], []⟩]⟩] -private def branchClaims_5_27_group_05 : Array NodeClaim := +/-- Coverage claims for branch (5, 27), group 05. -/ +def branchClaims5And27Group05 : Array NodeClaim := #[⟨4, 7148620850142538782, 36240594489113854, 36099304283763808, 4301, 131072, 0, 131072, #[⟨3, [], [87], [], []⟩]⟩, ⟨3, 7133702676376874014, 36240594489113834, 36099166841664576, @@ -2878,7 +2900,8 @@ private def branchClaims_5_27_group_05 : Array NodeClaim := ⟨4, 3136476635422944286, 36240867219520750, 36240453558385826, 3041, 65536, 0, 0, #[⟨3, [], [], [], [379]⟩]⟩] -private def branchClaims_5_27_group_06 : Array NodeClaim := +/-- Coverage claims for branch (5, 27), group 06. -/ +def branchClaims5And27Group06 : Array NodeClaim := #[⟨3, 3098477513567005726, 36240867219520746, 36240453549963296, 698, 8, 0, 0, #[⟨0, [], [], [383], []⟩]⟩, ⟨3, 5404320522780699678, 36240867219537130, 36240454086826048, @@ -2914,11 +2937,12 @@ private def branchClaims_5_27_group_06 : Array NodeClaim := /-- Flat postorder claims for branch (5, 27). -/ def branchClaims5Row27 : BranchClaims := - ⟨#[branchClaims_5_27_group_00, branchClaims_5_27_group_01, branchClaims_5_27_group_02, - branchClaims_5_27_group_03, branchClaims_5_27_group_04, branchClaims_5_27_group_05, - branchClaims_5_27_group_06], 392, 391⟩ + ⟨#[branchClaims5And27Group00, branchClaims5And27Group01, branchClaims5And27Group02, + branchClaims5And27Group03, branchClaims5And27Group04, branchClaims5And27Group05, + branchClaims5And27Group06], 392, 391⟩ -private def branchClaims_5_28_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 28), group 00. -/ +def branchClaims5And28Group00 : Array NodeClaim := #[⟨3, 6413126579719924766, 36240729780583678, 70644966903904, 3335, 268435456, 16456, 268435456, #[⟨0, [5], [], [], []⟩, ⟨1, [5], [], [], []⟩, @@ -3144,7 +3168,8 @@ private def branchClaims_5_28_group_00 : Array NodeClaim := 415, 262144, 17180590080, 0, #[⟨3, [7, 5, 3], [], [62], []⟩, ⟨6, [0], [], [], []⟩]⟩] -private def branchClaims_5_28_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 28), group 01. -/ +def branchClaims5And28Group01 : Array NodeClaim := #[⟨3, 4107283574566317086, 36240867219537020, 275691115536, 3479, 0, 0, 0, #[]⟩, ⟨2, 714404424734, 36240729780583508, 274885809152, @@ -3345,7 +3370,8 @@ private def branchClaims_5_28_group_01 : Array NodeClaim := ⟨3, 3819052672012676126, 36100129731181822, 36028797563705380, 4333, 0, 131072, 0, #[⟨3, [5], [], [], []⟩]⟩] -private def branchClaims_5_28_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 28), group 02. -/ +def branchClaims5And28Group02 : Array NodeClaim := #[⟨4, 8189233160422321182, 36240867219537150, 36099441193172064, 4339, 131072, 0, 131072, #[⟨3, [], [1346], [], []⟩]⟩, ⟨3, 8142508314288352286, 36100129731181822, 36099441182644320, @@ -3564,7 +3590,8 @@ private def branchClaims_5_28_group_02 : Array NodeClaim := ⟨4, 6171620527024794654, 36240867219537150, 141562666859568, 477, 262144, 0, 262144, #[⟨3, [], [1003], [], []⟩]⟩] -private def branchClaims_5_28_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 28), group 03. -/ +def branchClaims5And28Group03 : Array NodeClaim := #[⟨3, 6124895680890825758, 36240867211148542, 825176365104, 198, 33554432, 8, 0, #[⟨0, [5], [], [], []⟩, ⟨5, [], [], [191], []⟩]⟩, @@ -3770,7 +3797,8 @@ private def branchClaims_5_28_group_03 : Array NodeClaim := ⟨4, 8185573985204988958, 36240869367020794, 71194185874488, 3547, 32768, 0, 32768, #[⟨3, [], [467], [], []⟩]⟩] -private def branchClaims_5_28_group_04 : Array NodeClaim := +/-- Coverage claims for branch (5, 28), group 04. -/ +def branchClaims5And28Group04 : Array NodeClaim := #[⟨3, 8142508313768258590, 36240867219537018, 70644161625120, 3931, 147456, 0, 16384, #[⟨2, [], [450], [], []⟩, ⟨3, [], [], [255], []⟩]⟩, @@ -3959,7 +3987,8 @@ private def branchClaims_5_28_group_04 : Array NodeClaim := 740, 512, 8, 512, #[⟨0, [5], [], [], []⟩, ⟨1, [], [149], [], []⟩]⟩] -private def branchClaims_5_28_group_05 : Array NodeClaim := +/-- Coverage claims for branch (5, 28), group 05. -/ +def branchClaims5And28Group05 : Array NodeClaim := #[⟨3, 7133702676076981278, 36240869367020778, 36099716596387904, 4354, 328224, 268435528, 328224, #[⟨0, [5], [], [], []⟩, ⟨1, [5], [149, 149], [], []⟩, @@ -4013,7 +4042,7 @@ private def branchClaims_5_28_group_05 : Array NodeClaim := /-- Flat postorder claims for branch (5, 28). -/ def branchClaims5Row28 : BranchClaims := - ⟨#[branchClaims_5_28_group_00, branchClaims_5_28_group_01, branchClaims_5_28_group_02, - branchClaims_5_28_group_03, branchClaims_5_28_group_04, branchClaims_5_28_group_05], 334, 333⟩ + ⟨#[branchClaims5And28Group00, branchClaims5And28Group01, branchClaims5And28Group02, + branchClaims5And28Group03, branchClaims5And28Group04, branchClaims5And28Group05], 334, 333⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData11.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData11.lean index ce304d96fe..c22453c244 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData11.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData11.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_5_29_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 29), group 00. -/ +def branchClaims5And29Group00 : Array NodeClaim := #[⟨4, 5447385933821406238, 36240594489113854, 211107577362618, 4356, 8589934592, 0, 8589934592, #[⟨6, [], [1262], [], []⟩]⟩, ⟨3, 5404320262384675870, 36240042585816318, 211107308927010, @@ -252,7 +260,8 @@ private def branchClaims_5_29_group_00 : Array NodeClaim := 4360, 17180164096, 0, 32768, #[⟨3, [], [121], [61], []⟩, ⟨6, [], [], [62], []⟩]⟩] -private def branchClaims_5_29_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 29), group 01. -/ +def branchClaims5And29Group01 : Array NodeClaim := #[⟨2, 324637191198, 36240454902676702, 70369819510784, 3358, 65668, 0, 65540, #[⟨0, [], [391], [], []⟩, ⟨1, [], [], [63], []⟩, @@ -489,7 +498,8 @@ private def branchClaims_5_29_group_01 : Array NodeClaim := ⟨3, [], [380], [], []⟩, ⟨5, [], [144], [], []⟩]⟩] -private def branchClaims_5_29_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 29), group 02. -/ +def branchClaims5And29Group02 : Array NodeClaim := #[⟨3, 3098476851557985310, 36240592333241598, 211106774150178, 4005, 147456, 0, 147456, #[⟨2, [], [128], [], []⟩, ⟨3, [], [668], [], []⟩]⟩, @@ -727,7 +737,8 @@ private def branchClaims_5_29_group_02 : Array NodeClaim := ⟨3, 3674937621091609630, 36240592341630074, 211244748929026, 3207, 131072, 0, 131072, #[⟨3, [], [286], [], []⟩]⟩] -private def branchClaims_5_29_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 29), group 03. -/ +def branchClaims5And29Group03 : Array NodeClaim := #[⟨4, 4145282307175115806, 36240592341630206, 211245562645514, 262, 524288, 0, 524288, #[⟨3, [], [420], [], []⟩]⟩, ⟨3, 4107283185319177246, 36240592341630074, 211245554223112, @@ -913,10 +924,11 @@ private def branchClaims_5_29_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (5, 29). -/ def branchClaims5Row29 : BranchClaims := - ⟨#[branchClaims_5_29_group_00, branchClaims_5_29_group_01, branchClaims_5_29_group_02, - branchClaims_5_29_group_03], 249, 248⟩ + ⟨#[branchClaims5And29Group00, branchClaims5And29Group01, branchClaims5And29Group02, + branchClaims5And29Group03], 249, 248⟩ -private def branchClaims_5_31_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 31), group 00. -/ +def branchClaims5And31Group00 : Array NodeClaim := #[⟨4, 5162533412006292510, 36240594489081086, 140878960661734, 3104, 0, 0, 0, #[]⟩, ⟨3, 5116090040849034270, 36240594480692478, 141470209090, @@ -1123,7 +1135,8 @@ private def branchClaims_5_31_group_00 : Array NodeClaim := ⟨5, [], [174], [62], []⟩, ⟨6, [], [898], [], []⟩]⟩] -private def branchClaims_5_31_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 31), group 01. -/ +def branchClaims5And31Group01 : Array NodeClaim := #[⟨4, 5995699332063980574, 36240869367020790, 140875740533810, 3361, 262144, 0, 262144, #[⟨3, [], [939], [], []⟩]⟩, ⟨3, 5980781158298315806, 36240869367020786, 140738298434562, @@ -1327,7 +1340,8 @@ private def branchClaims_5_31_group_01 : Array NodeClaim := ⟨3, 2810247008315010078, 36240594489113830, 36028797831087302, 4412, 536870912, 0, 536870912, #[⟨5, [], [140], [], []⟩]⟩] -private def branchClaims_5_31_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 31), group 02. -/ +def branchClaims5And31Group02 : Array NodeClaim := #[⟨3, 3819053324846001182, 36240594489105654, 36028935271088324, 4424, 0, 0, 0, #[]⟩, ⟨4, 8225544085251320862, 36240869367020774, 36099304014247110, @@ -1532,7 +1546,8 @@ private def branchClaims_5_31_group_02 : Array NodeClaim := 4088, 512, 8, 0, #[⟨0, [5], [], [], []⟩, ⟨1, [], [], [190], []⟩]⟩] -private def branchClaims_5_31_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 31), group 03. -/ +def branchClaims5And31Group03 : Array NodeClaim := #[⟨4, 8261009417122114590, 36240869366988030, 212070186899648, 621, 0, 0, 0, #[]⟩, ⟨3, 8214566045964856350, 36240869358599386, 71332696447040, @@ -1740,7 +1755,8 @@ private def branchClaims_5_31_group_03 : Array NodeClaim := ⟨3, 3674937604663962654, 36240594480692470, 211244481516642, 4387, 16384, 0, 16384, #[⟨2, [], [284], [], []⟩]⟩] -private def branchClaims_5_31_group_04 : Array NodeClaim := +/-- Coverage claims for branch (5, 31), group 04. -/ +def branchClaims5And31Group04 : Array NodeClaim := #[⟨3, 3819052792739818526, 36240594480684278, 211244484658276, 798, 320, 0, 320, #[⟨1, [], [619, 282], [], []⟩]⟩, ⟨2, 308729637918, 36240594480684262, 211107042559040, @@ -1914,7 +1930,8 @@ private def branchClaims_5_31_group_04 : Array NodeClaim := 4459, 256, 16384, 256, #[⟨1, [], [1144], [], []⟩, ⟨2, [1], [], [], []⟩]⟩] -private def branchClaims_5_31_group_05 : Array NodeClaim := +/-- Coverage claims for branch (5, 31), group 05. -/ +def branchClaims5And31Group05 : Array NodeClaim := #[⟨2, 866085530654, 36240594489097416, 140741517509632, 4456, 541440, 536871040, 16384, #[⟨1, [6], [], [316, 318], []⟩, ⟨2, [], [898], [], []⟩, @@ -2106,7 +2123,8 @@ private def branchClaims_5_31_group_05 : Array NodeClaim := ⟨3, 8142508297324882974, 36240869358632054, 71331624784928, 935, 64, 0, 0, #[⟨1, [], [], [382], []⟩]⟩] -private def branchClaims_5_31_group_06 : Array NodeClaim := +/-- Coverage claims for branch (5, 31), group 06. -/ +def branchClaims5And31Group06 : Array NodeClaim := #[⟨2, 171039026206, 36240869358631974, 550563746816, 3477, 541248, 0, 576, #[⟨1, [], [441, 148], [], []⟩, ⟨2, [], [], [381], []⟩, @@ -2295,7 +2313,8 @@ private def branchClaims_5_31_group_06 : Array NodeClaim := ⟨3, 5116089777497074718, 36240594480725198, 211109190093826, 3553, 8192, 16384, 0, #[⟨2, [5], [], [446], []⟩]⟩] -private def branchClaims_5_31_group_07 : Array NodeClaim := +/-- Coverage claims for branch (5, 31), group 07. -/ +def branchClaims5And31Group07 : Array NodeClaim := #[⟨2, 600804191262, 36240594480725130, 211109185882112, 3593, 16648, 25174150, 16640, #[⟨0, [6, 6], [], [447], []⟩, ⟨1, [6], [377], [], []⟩, @@ -2421,11 +2440,12 @@ private def branchClaims_5_31_group_07 : Array NodeClaim := /-- Flat postorder claims for branch (5, 31). -/ def branchClaims5Row31 : BranchClaims := - ⟨#[branchClaims_5_31_group_00, branchClaims_5_31_group_01, branchClaims_5_31_group_02, - branchClaims_5_31_group_03, branchClaims_5_31_group_04, branchClaims_5_31_group_05, - branchClaims_5_31_group_06, branchClaims_5_31_group_07], 486, 485⟩ + ⟨#[branchClaims5And31Group00, branchClaims5And31Group01, branchClaims5And31Group02, + branchClaims5And31Group03, branchClaims5And31Group04, branchClaims5And31Group05, + branchClaims5And31Group06, branchClaims5And31Group07], 486, 485⟩ -private def branchClaims_5_32_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 32), group 00. -/ +def branchClaims5And32Group00 : Array NodeClaim := #[⟨4, 5166755399220096030, 36240869366988030, 141428717524002, 3215, 0, 0, 0, #[]⟩, ⟨3, 5116089903412177950, 36240869358599422, 4031255586, @@ -2638,7 +2658,8 @@ private def branchClaims_5_32_group_00 : Array NodeClaim := ⟨3, 3819053337162574878, 36240869367020726, 36028798369039392, 338, 0, 0, 0, #[]⟩] -private def branchClaims_5_32_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 32), group 01. -/ +def branchClaims5And32Group01 : Array NodeClaim := #[⟨2, 853152394270, 36240731928067234, 36028798365893632, 4513, 533152, 536871168, 524960, #[⟨1, [5], [374, 147, 147], [], []⟩, ⟨2, [], [], [63], []⟩, @@ -2871,7 +2892,8 @@ private def branchClaims_5_32_group_01 : Array NodeClaim := ⟨3, 3819053187409144862, 36240869367004406, 36028798369005732, 332, 805306368, 0, 805306368, #[⟨5, [], [335, 136], [], []⟩]⟩] -private def branchClaims_5_32_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 32), group 02. -/ +def branchClaims5And32Group02 : Array NodeClaim := #[⟨3, 8142508829684821022, 36240869367004406, 36099441987944672, 4532, 847249408, 8606711810, 847249408, #[⟨0, [5], [], [], []⟩, ⟨4, [5], [105], [], []⟩, @@ -3097,7 +3119,8 @@ private def branchClaims_5_32_group_02 : Array NodeClaim := ⟨4, 8225544084917873694, 36240869358632182, 36100129180644514, 142, 0, 0, 0, #[]⟩] -private def branchClaims_5_32_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 32), group 03. -/ +def branchClaims5And32Group03 : Array NodeClaim := #[⟨3, 8214566560826158110, 36240869358632178, 36100129178538112, 3609, 4, 301989920, 0, #[⟨0, [], [], [191], []⟩, ⟨1, [2], [], [], []⟩, @@ -3289,7 +3312,8 @@ private def branchClaims_5_32_group_03 : Array NodeClaim := 949, 16392, 0, 0, #[⟨0, [], [], [253], []⟩, ⟨2, [], [], [254], []⟩]⟩] -private def branchClaims_5_32_group_04 : Array NodeClaim := +/-- Coverage claims for branch (5, 32), group 04. -/ +def branchClaims5And32Group04 : Array NodeClaim := #[⟨4, 5991758563173231646, 36240731919678710, 36240182158572642, 3167, 16384, 0, 0, #[⟨2, [], [], [], [515]⟩]⟩, ⟨4, 5995699212847180830, 36240869358632182, 36240182159612016, @@ -3504,7 +3528,8 @@ private def branchClaims_5_32_group_04 : Array NodeClaim := 902, 16392, 0, 16392, #[⟨0, [], [122], [], []⟩, ⟨2, [], [347], [], []⟩]⟩] -private def branchClaims_5_32_group_05 : Array NodeClaim := +/-- Coverage claims for branch (5, 32), group 05. -/ +def branchClaims5And32Group05 : Array NodeClaim := #[⟨2, 710596389918, 36240869366987940, 70644966887424, 4563, 40, 0, 0, #[⟨0, [], [], [318], []⟩, ⟨1, [], [], [319], []⟩]⟩, @@ -3702,7 +3727,8 @@ private def branchClaims_5_32_group_05 : Array NodeClaim := ⟨5, [0, 0, 0], [], [], []⟩, ⟨6, [0], [], [], []⟩]⟩] -private def branchClaims_5_32_group_06 : Array NodeClaim := +/-- Coverage claims for branch (5, 32), group 06. -/ +def branchClaims5And32Group06 : Array NodeClaim := #[⟨4, 6030601547335363614, 36240869358632182, 36240729230046258, 3140, 0, 0, 0, #[]⟩, ⟨3, 5980780476457577502, 36240731919678582, 36099441985876994, @@ -3887,8 +3913,8 @@ private def branchClaims_5_32_group_06 : Array NodeClaim := /-- Flat postorder claims for branch (5, 32). -/ def branchClaims5Row32 : BranchClaims := - ⟨#[branchClaims_5_32_group_00, branchClaims_5_32_group_01, branchClaims_5_32_group_02, - branchClaims_5_32_group_03, branchClaims_5_32_group_04, branchClaims_5_32_group_05, - branchClaims_5_32_group_06], 442, 441⟩ + ⟨#[branchClaims5And32Group00, branchClaims5And32Group01, branchClaims5And32Group02, + branchClaims5And32Group03, branchClaims5And32Group04, branchClaims5And32Group05, + branchClaims5And32Group06], 442, 441⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData12.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData12.lean index d890f7961f..f2b3ef3343 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData12.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData12.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_5_34_group_00 : Array NodeClaim := +/-- Coverage claims for branch (5, 34), group 00. -/ +def branchClaims5And34Group00 : Array NodeClaim := #[⟨4, 5159155557670611998, 36240869366988030, 211793702556854, 3226, 268435456, 0, 268435456, #[⟨5, [], [1133], [], []⟩]⟩, ⟨3, 5116089886233881630, 36240867219504374, 211243678307366, @@ -222,7 +230,8 @@ private def branchClaims_5_34_group_00 : Array NodeClaim := 3293, 268500992, 0, 65536, #[⟨3, [], [668], [], []⟩, ⟨5, [], [], [62], []⟩]⟩] -private def branchClaims_5_34_group_01 : Array NodeClaim := +/-- Coverage claims for branch (5, 34), group 01. -/ +def branchClaims5And34Group01 : Array NodeClaim := #[⟨4, 3831156773779172382, 36240869358615806, 36099854572198074, 1062, 0, 0, 0, #[]⟩, ⟨4, 3866904095821425694, 36240869358615806, 36240594208069776, @@ -451,7 +460,8 @@ private def branchClaims_5_34_group_01 : Array NodeClaim := ⟨3, [1], [], [], []⟩, ⟨5, [], [144], [], []⟩]⟩] -private def branchClaims_5_34_group_02 : Array NodeClaim := +/-- Coverage claims for branch (5, 34), group 02. -/ +def branchClaims5And34Group02 : Array NodeClaim := #[⟨3, 5116090040886258718, 36240869358591230, 36099304283702340, 3888, 268435968, 134611312, 268435968, #[⟨0, [5], [], [], []⟩, ⟨1, [7, 5, 5], [927], [], []⟩, @@ -670,7 +680,8 @@ private def branchClaims_5_34_group_02 : Array NodeClaim := ⟨3, [6], [380], [], []⟩, ⟨5, [6], [144], [], []⟩]⟩] -private def branchClaims_5_34_group_03 : Array NodeClaim := +/-- Coverage claims for branch (5, 34), group 03. -/ +def branchClaims5And34Group03 : Array NodeClaim := #[⟨4, 2858097753554185246, 36240869367020790, 36240453547895942, 4593, 65536, 0, 65536, #[⟨3, [], [309], [], []⟩]⟩, ⟨3, 2810247007513373726, 36240867219537142, 36099715522626694, @@ -880,7 +891,8 @@ private def branchClaims_5_34_group_03 : Array NodeClaim := 2510, 65664, 131328, 128, #[⟨1, [5], [639], [], []⟩, ⟨3, [5], [], [254], []⟩]⟩] -private def branchClaims_5_34_group_04 : Array NodeClaim := +/-- Coverage claims for branch (5, 34), group 04. -/ +def branchClaims5And34Group04 : Array NodeClaim := #[⟨4, 3714063170884627486, 36240869367020734, 36240040705694882, 4620, 65536, 0, 0, #[⟨3, [], [], [], [583]⟩]⟩, ⟨3, 3674938149121846302, 36240867219537078, 36240040705659936, @@ -1106,7 +1118,8 @@ private def branchClaims_5_34_group_04 : Array NodeClaim := ⟨3, [], [], [318], []⟩, ⟨4, [0], [], [], []⟩]⟩] -private def branchClaims_5_34_group_05 : Array NodeClaim := +/-- Coverage claims for branch (5, 34), group 05. -/ +def branchClaims5And34Group05 : Array NodeClaim := #[⟨1, 3320867870, 36240867219479748, 36099165767860224, 4109, 151142778, 0, 16392, #[⟨0, [], [49], [276, 281], []⟩, ⟨1, [], [], [289, 293, 296], []⟩, @@ -1302,7 +1315,8 @@ private def branchClaims_5_34_group_05 : Array NodeClaim := ⟨4, 3716877796651330590, 36240869367020734, 36240590997296304, 2694, 32, 0, 32, #[⟨1, [], [234], [], []⟩]⟩] -private def branchClaims_5_34_group_06 : Array NodeClaim := +/-- Coverage claims for branch (5, 34), group 06. -/ +def branchClaims5And34Group06 : Array NodeClaim := #[⟨3, 3674938025121442846, 36240869367020730, 36240041232045088, 1174, 147520, 0, 131136, #[⟨1, [], [125], [], []⟩, ⟨2, [], [], [383], []⟩, @@ -1336,11 +1350,12 @@ private def branchClaims_5_34_group_06 : Array NodeClaim := /-- Flat postorder claims for branch (5, 34). -/ def branchClaims5Row34 : BranchClaims := - ⟨#[branchClaims_5_34_group_00, branchClaims_5_34_group_01, branchClaims_5_34_group_02, - branchClaims_5_34_group_03, branchClaims_5_34_group_04, branchClaims_5_34_group_05, - branchClaims_5_34_group_06], 390, 389⟩ + ⟨#[branchClaims5And34Group00, branchClaims5And34Group01, branchClaims5And34Group02, + branchClaims5And34Group03, branchClaims5And34Group04, branchClaims5And34Group05, + branchClaims5And34Group06], 390, 389⟩ -private def branchClaims_6_1_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 1), group 00. -/ +def branchClaims6And1Group00 : Array NodeClaim := #[⟨4, 5600226975045903390, 36240594489113854, 36169672759445614, 3096, 0, 0, 0, #[]⟩, ⟨3, 5548435579331142686, 36240042585816318, 36028797026830446, @@ -1577,7 +1592,8 @@ private def branchClaims_6_1_group_00 : Array NodeClaim := ⟨4, [], [45, 56], [], []⟩, ⟨6, [], [45, 56], [], []⟩]⟩] -private def branchClaims_6_1_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 1), group 01. -/ +def branchClaims6And1Group01 : Array NodeClaim := #[⟨0, 2876446, 36239904073071658, 2048, 369, 34359738367, 0, 33889510399, #[⟨0, [], [7, 8, 181, 181, 8], [], []⟩, ⟨1, [], [181, 181, 8, 8, 181], [], []⟩, @@ -1589,9 +1605,10 @@ private def branchClaims_6_1_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (6, 1). -/ def branchClaims6Row1 : BranchClaims := - ⟨#[branchClaims_6_1_group_00, branchClaims_6_1_group_01], 65, 64⟩ + ⟨#[branchClaims6And1Group00, branchClaims6And1Group01], 65, 64⟩ -private def branchClaims_6_2_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 2), group 00. -/ +def branchClaims6And2Group00 : Array NodeClaim := #[⟨3, 8646911985525187614, 36240317463723262, 211245016811554, 1703, 4096, 0, 4096, #[⟨2, [], [629], [], []⟩]⟩, ⟨2, 700973835294, 36240042048945406, 140737491503138, @@ -1804,9 +1821,10 @@ private def branchClaims_6_2_group_00 : Array NodeClaim := /-- Flat postorder claims for branch (6, 2). -/ def branchClaims6Row2 : BranchClaims := - ⟨#[branchClaims_6_2_group_00], 52, 51⟩ + ⟨#[branchClaims6And2Group00], 52, 51⟩ -private def branchClaims_6_3_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 3), group 00. -/ +def branchClaims6And3Group00 : Array NodeClaim := #[⟨3, 6413126295475708958, 36240319074335998, 70369015761018, 4639, 536870912, 0, 536870912, #[⟨5, [], [318], [], []⟩]⟩, ⟨2, 426100122654, 36240043122687230, 70368747325474, @@ -1983,9 +2001,10 @@ private def branchClaims_6_3_group_00 : Array NodeClaim := /-- Flat postorder claims for branch (6, 3). -/ def branchClaims6Row3 : BranchClaims := - ⟨#[branchClaims_6_3_group_00], 42, 41⟩ + ⟨#[branchClaims6And3Group00], 42, 41⟩ -private def branchClaims_6_4_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 4), group 00. -/ +def branchClaims6And4Group00 : Array NodeClaim := #[⟨4, 6176687085487121438, 36240868293278974, 36169672759447670, 12, 0, 0, 0, #[]⟩, ⟨3, 6124895689772360734, 36240316389981438, 36028797026832502, @@ -2163,9 +2182,10 @@ private def branchClaims_6_4_group_00 : Array NodeClaim := /-- Flat postorder claims for branch (6, 4). -/ def branchClaims6Row4 : BranchClaims := - ⟨#[branchClaims_6_4_group_00], 51, 50⟩ + ⟨#[branchClaims6And4Group00], 51, 50⟩ -private def branchClaims_6_5_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 5), group 00. -/ +def branchClaims6And5Group00 : Array NodeClaim := #[⟨3, 8646911480565064734, 36240317463723262, 211381918371874, 78, 16384, 0, 16384, #[⟨2, [], [654], [], []⟩]⟩, ⟨2, 196013712414, 36240178951027966, 140737490980898, @@ -2314,9 +2334,10 @@ private def branchClaims_6_5_group_00 : Array NodeClaim := /-- Flat postorder claims for branch (6, 5). -/ def branchClaims6Row5 : BranchClaims := - ⟨#[branchClaims_6_5_group_00], 40, 39⟩ + ⟨#[branchClaims6And5Group00], 40, 39⟩ -private def branchClaims_6_6_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 6), group 00. -/ +def branchClaims6And6Group00 : Array NodeClaim := #[⟨3, 6413126064319751198, 36240729780583678, 70369015238778, 13, 268435456, 0, 268435456, #[⟨5, [], [308], [], []⟩]⟩, ⟨2, 194944164894, 36240453828934910, 70368746803234, @@ -2439,9 +2460,10 @@ private def branchClaims_6_6_group_00 : Array NodeClaim := /-- Flat postorder claims for branch (6, 6). -/ def branchClaims6Row6 : BranchClaims := - ⟨#[branchClaims_6_6_group_00], 35, 34⟩ + ⟨#[branchClaims6And6Group00], 35, 34⟩ -private def branchClaims_6_7_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 7), group 00. -/ +def branchClaims6And7Group00 : Array NodeClaim := #[⟨4, 6176687084684960798, 36240868293278974, 211656801521782, 149, 268435456, 0, 268435456, #[⟨5, [], [355], [], []⟩]⟩, ⟨3, 6124895688970200094, 36240728706841854, 70368752046198, @@ -2717,7 +2739,8 @@ private def branchClaims_6_7_group_00 : Array NodeClaim := ⟨2, [], [], [61], []⟩, ⟨3, [], [], [62], []⟩]⟩] -private def branchClaims_6_7_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 7), group 01. -/ +def branchClaims6And7Group01 : Array NodeClaim := #[⟨3, 3819052817715553310, 36240591804759166, 211243679363172, 243, 131136, 0, 131136, #[⟨1, [], [579], [], []⟩, ⟨3, [], [634], [], []⟩]⟩, @@ -2871,9 +2894,10 @@ private def branchClaims_6_7_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (6, 7). -/ def branchClaims6Row7 : BranchClaims := - ⟨#[branchClaims_6_7_group_00, branchClaims_6_7_group_01], 103, 102⟩ + ⟨#[branchClaims6And7Group00, branchClaims6And7Group01], 103, 102⟩ -private def branchClaims_6_8_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 8), group 00. -/ +def branchClaims6And8Group00 : Array NodeClaim := #[⟨4, 8688851250758018078, 36240867219537150, 211381927809206, 72, 268435456, 0, 268435456, #[⟨5, [], [250], [], []⟩]⟩, ⟨3, 8646911479228130334, 36240317463723262, 211381918371874, @@ -3124,7 +3148,8 @@ private def branchClaims_6_8_group_00 : Array NodeClaim := ⟨5, [], [63], [62], []⟩, ⟨6, [], [63], [], []⟩]⟩] -private def branchClaims_6_8_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 8), group 01. -/ +def branchClaims6And8Group01 : Array NodeClaim := #[⟨2, 325639726110, 36240729243712762, 36169534507321538, 4678, 31717402624, 2164261888, 31717402624, #[⟨2, [5], [385, 385], [], []⟩, ⟨3, [], [380], [], []⟩, @@ -3342,9 +3367,10 @@ private def branchClaims_6_8_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (6, 8). -/ def branchClaims6Row8 : BranchClaims := - ⟨#[branchClaims_6_8_group_00, branchClaims_6_8_group_01], 121, 120⟩ + ⟨#[branchClaims6And8Group00, branchClaims6And8Group01], 121, 120⟩ -private def branchClaims_6_9_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 9), group 00. -/ +def branchClaims6And9Group00 : Array NodeClaim := #[⟨3, 6413126063517590558, 36240317463723262, 36028797290025082, 13, 268435456, 0, 268435456, #[⟨5, [], [327], [], []⟩]⟩, ⟨3, 8646911478693356574, 36240317463723262, 36099304010027042, @@ -3609,7 +3635,8 @@ private def branchClaims_6_9_group_00 : Array NodeClaim := ⟨2, [], [329], [], []⟩, ⟨3, [], [285], [], []⟩]⟩] -private def branchClaims_6_9_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 9), group 01. -/ +def branchClaims6And9Group01 : Array NodeClaim := #[⟨2, 732053103646, 36240318537465074, 36239903251531840, 1397, 3246468230, 0, 3246466182, #[⟨0, [], [895, 373], [], []⟩, ⟨1, [], [895], [], []⟩, @@ -3841,9 +3868,10 @@ private def branchClaims_6_9_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (6, 9). -/ def branchClaims6Row9 : BranchClaims := - ⟨#[branchClaims_6_9_group_00, branchClaims_6_9_group_01], 115, 114⟩ + ⟨#[branchClaims6And9Group00, branchClaims6And9Group01], 115, 114⟩ -private def branchClaims_6_10_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 10), group 00. -/ +def branchClaims6And10Group00 : Array NodeClaim := #[⟨3, 5548435579097179166, 36240042585816318, 36028797294216302, 4851, 536870912, 268435456, 536870912, #[⟨5, [4], [346], [], []⟩]⟩, ⟨4, 6172747077441414174, 36240318537465086, 36169535320009846, @@ -4059,7 +4087,8 @@ private def branchClaims_6_10_group_00 : Array NodeClaim := ⟨2, [], [155], [61, 62], []⟩, ⟨4, [], [143], [], []⟩]⟩] -private def branchClaims_6_10_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 10), group 01. -/ +def branchClaims6And10Group01 : Array NodeClaim := #[⟨3, 5548435474340242462, 36240044733299966, 36169535317379144, 448, 8396928, 16390, 8396928, #[⟨0, [5, 4], [], [], []⟩, ⟨1, [], [115], [], []⟩, @@ -4283,7 +4312,8 @@ private def branchClaims_6_10_group_01 : Array NodeClaim := 4890, 268435456, 64, 268435456, #[⟨1, [5], [], [], []⟩, ⟨5, [], [338], [], []⟩]⟩] -private def branchClaims_6_10_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 10), group 02. -/ +def branchClaims6And10Group02 : Array NodeClaim := #[⟨2, 171030733854, 36240866145795134, 36028797289501728, 4888, 268456000, 0, 268435520, #[⟨1, [], [442], [], []⟩, ⟨2, [], [], [126, 127], []⟩, @@ -4401,9 +4431,10 @@ private def branchClaims_6_10_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (6, 10). -/ def branchClaims6Row10 : BranchClaims := - ⟨#[branchClaims_6_10_group_00, branchClaims_6_10_group_01, branchClaims_6_10_group_02], 158, 157⟩ + ⟨#[branchClaims6And10Group00, branchClaims6And10Group01, branchClaims6And10Group02], 158, 157⟩ -private def branchClaims_6_11_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 11), group 00. -/ +def branchClaims6And11Group00 : Array NodeClaim := #[⟨3, 7638105806199186462, 36240180024769790, 36099167107443778, 4897, 524288, 282624, 524288, #[⟨2, [4, 5], [], [], []⟩, ⟨3, [4], [631], [], []⟩]⟩, @@ -4637,7 +4668,8 @@ private def branchClaims_6_11_group_00 : Array NodeClaim := 4914, 524288, 8192, 0, #[⟨2, [7], [], [], []⟩, ⟨3, [], [], [62], []⟩]⟩] -private def branchClaims_6_11_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 11), group 01. -/ +def branchClaims6And11Group01 : Array NodeClaim := #[⟨4, 3292413384323621918, 36240867219537150, 211518828844220, 500, 268435456, 0, 268435456, #[⟨5, [], [355], [], []⟩]⟩, ⟨3, 3242592313445835806, 36240317463723262, 70643901535244, @@ -4864,7 +4896,8 @@ private def branchClaims_6_11_group_01 : Array NodeClaim := 2403, 786432, 20480, 0, #[⟨2, [5, 5], [], [], []⟩, ⟨3, [], [], [125, 126], []⟩]⟩] -private def branchClaims_6_11_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 11), group 02. -/ +def branchClaims6And11Group02 : Array NodeClaim := #[⟨4, 3288472611706233886, 36240729780583678, 36240180011137064, 745, 16384, 0, 0, #[⟨2, [], [], [], [903]⟩]⟩, ⟨4, 3292413261380183070, 36240867219537148, 36240729766910008, @@ -4920,6 +4953,6 @@ private def branchClaims_6_11_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (6, 11). -/ def branchClaims6Row11 : BranchClaims := - ⟨#[branchClaims_6_11_group_00, branchClaims_6_11_group_01, branchClaims_6_11_group_02], 142, 141⟩ + ⟨#[branchClaims6And11Group00, branchClaims6And11Group01, branchClaims6And11Group02], 142, 141⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData13.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData13.lean index 9c50752fb0..80bb1e7543 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData13.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData13.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_6_12_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 12), group 00. -/ +def branchClaims6And12Group00 : Array NodeClaim := #[⟨3, 7566048212165452830, 36240457050160382, 36099166033675498, 4939, 536870912, 268435456, 536870912, #[⟨5, [4], [346], [], []⟩]⟩, ⟨4, 8190359710509687838, 36240868293278974, 36239905669557490, @@ -231,7 +239,8 @@ private def branchClaims_6_12_group_00 : Array NodeClaim := ⟨3, [], [137, 127], [], []⟩, ⟨6, [], [137, 137], [], []⟩]⟩] -private def branchClaims_6_12_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 12), group 01. -/ +def branchClaims6And12Group01 : Array NodeClaim := #[⟨2, 306865366046, 36240867756375262, 70369016828928, 2447, 10272, 0, 10240, #[⟨1, [], [], [63], []⟩, ⟨2, [], [893, 378], [], []⟩]⟩, @@ -443,9 +452,10 @@ private def branchClaims_6_12_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (6, 12). -/ def branchClaims6Row12 : BranchClaims := - ⟨#[branchClaims_6_12_group_00, branchClaims_6_12_group_01], 125, 124⟩ + ⟨#[branchClaims6And12Group00, branchClaims6And12Group01], 125, 124⟩ -private def branchClaims_6_13_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 13), group 00. -/ +def branchClaims6And13Group00 : Array NodeClaim := #[⟨2, 838179873822, 36239905146862830, 36099165765239906, 4979, 2348811264, 0, 2348811264, #[⟨2, [], [145], [], []⟩, ⟨5, [], [144, 144], [], []⟩, @@ -694,7 +704,8 @@ private def branchClaims_6_13_group_00 : Array NodeClaim := ⟨5, [], [346], [], []⟩, ⟨6, [], [], [62], []⟩]⟩] -private def branchClaims_6_13_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 13), group 01. -/ +def branchClaims6And13Group01 : Array NodeClaim := #[⟨2, 869016396830, 36240182172245116, 36099166842128448, 1365, 67716, 0, 67712, #[⟨0, [], [], [63], []⟩, ⟨1, [], [895], [], []⟩, @@ -971,7 +982,8 @@ private def branchClaims_6_13_group_01 : Array NodeClaim := ⟨3, [5], [], [], []⟩, ⟨6, [0], [], [], []⟩]⟩] -private def branchClaims_6_13_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 13), group 02. -/ +def branchClaims6And13Group02 : Array NodeClaim := #[⟨3, 3819053217684775966, 36240869367020668, 36239903791552544, 4819, 135168, 0, 135168, #[⟨2, [], [1140], [], []⟩, ⟨3, [], [351], [], []⟩]⟩, @@ -1003,9 +1015,10 @@ private def branchClaims_6_13_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (6, 13). -/ def branchClaims6Row13 : BranchClaims := - ⟨#[branchClaims_6_13_group_00, branchClaims_6_13_group_01, branchClaims_6_13_group_02], 133, 132⟩ + ⟨#[branchClaims6And13Group00, branchClaims6And13Group01, branchClaims6And13Group02], 133, 132⟩ -private def branchClaims_6_14_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 14), group 00. -/ +def branchClaims6And14Group00 : Array NodeClaim := #[⟨3, 6124896331407942686, 36240181098511614, 36169534514660582, 4995, 67108864, 134217728, 67108864, #[⟨5, [5], [106], [], []⟩]⟩, ⟨3, 6413126707559654430, 36240182172253438, 36169534777853162, @@ -1244,7 +1257,8 @@ private def branchClaims_6_14_group_00 : Array NodeClaim := ⟨4, 8252565165202596894, 36240319611206910, 211243683044526, 5034, 17179869184, 0, 17179869184, #[⟨6, [], [1331], [], []⟩]⟩] -private def branchClaims_6_14_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 14), group 01. -/ +def branchClaims6And14Group01 : Array NodeClaim := #[⟨3, 8214566043346658334, 36240319611174142, 211243674654760, 1860, 8, 0, 0, #[⟨0, [], [], [63], []⟩]⟩, ⟨4, 8684910729430164510, 36240319611198718, 211245562072238, @@ -1488,7 +1502,8 @@ private def branchClaims_6_14_group_01 : Array NodeClaim := ⟨3, 3674937754718430238, 36240869366988026, 36239903788382384, 4729, 2147483648, 0, 2147483648, #[⟨6, [], [107], [], []⟩]⟩] -private def branchClaims_6_14_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 14), group 02. -/ +def branchClaims6And14Group02 : Array NodeClaim := #[⟨3, 3819052942794286110, 36240869366988028, 36239903791515824, 4128, 0, 0, 0, #[]⟩, ⟨2, 458784105502, 36240731928034552, 36239903788370048, @@ -1688,9 +1703,10 @@ private def branchClaims_6_14_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (6, 14). -/ def branchClaims6Row14 : BranchClaims := - ⟨#[branchClaims_6_14_group_00, branchClaims_6_14_group_01, branchClaims_6_14_group_02], 178, 177⟩ + ⟨#[branchClaims6And14Group00, branchClaims6And14Group01, branchClaims6And14Group02], 178, 177⟩ -private def branchClaims_6_15_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 15), group 00. -/ +def branchClaims6And15Group00 : Array NodeClaim := #[⟨3, 5980780761082094622, 36240182172220670, 36099166839012418, 5062, 17180393472, 2147963904, 17180393472, #[⟨2, [5, 4, 5], [], [], []⟩, ⟨3, [7, 5, 4], [925], [], []⟩, @@ -1930,7 +1946,8 @@ private def branchClaims_6_15_group_00 : Array NodeClaim := 5082, 65536, 2048, 0, #[⟨2, [4], [], [], []⟩, ⟨3, [], [], [62], []⟩]⟩] -private def branchClaims_6_15_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 15), group 01. -/ +def branchClaims6And15Group01 : Array NodeClaim := #[⟨3, 4107283318176343070, 36240044733299962, 36239905130555560, 2302, 16777218, 0, 16777218, #[⟨0, [], [599], [], []⟩, ⟨4, [], [105], [], []⟩]⟩, @@ -2168,7 +2185,8 @@ private def branchClaims_6_15_group_01 : Array NodeClaim := 5033, 132, 0, 4, #[⟨0, [], [599], [], []⟩, ⟨1, [], [], [126], []⟩]⟩] -private def branchClaims_6_15_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 15), group 02. -/ +def branchClaims6And15Group02 : Array NodeClaim := #[⟨2, 732657476638, 36240457050143964, 36169536664242304, 4793, 22046081536, 203148, 4865687552, #[⟨0, [6, 5], [], [], []⟩, ⟨1, [6, 5], [], [124], []⟩, @@ -2421,7 +2439,8 @@ private def branchClaims_6_15_group_02 : Array NodeClaim := ⟨4, 4149223059893117982, 36240594489113854, 36240590724149496, 5119, 2097152, 0, 2097152, #[⟨4, [], [69], [], []⟩]⟩] -private def branchClaims_6_15_group_03 : Array NodeClaim := +/-- Coverage claims for branch (6, 15), group 03. -/ +def branchClaims6And15Group03 : Array NodeClaim := #[⟨3, 4107283288363230238, 36240594489113850, 36240040958898280, 5118, 4210696, 0, 4194312, #[⟨0, [], [599], [], []⟩, ⟨2, [], [], [191], []⟩, @@ -2470,10 +2489,11 @@ private def branchClaims_6_15_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (6, 15). -/ def branchClaims6Row15 : BranchClaims := - ⟨#[branchClaims_6_15_group_00, branchClaims_6_15_group_01, branchClaims_6_15_group_02, - branchClaims_6_15_group_03], 201, 200⟩ + ⟨#[branchClaims6And15Group00, branchClaims6And15Group01, branchClaims6And15Group02, + branchClaims6And15Group03], 201, 200⟩ -private def branchClaims_6_16_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 16), group 00. -/ +def branchClaims6And16Group00 : Array NodeClaim := #[⟨2, 838180398110, 36240315853110518, 36099165765239906, 4979, 2348811264, 0, 2348811264, #[⟨2, [], [145], [], []⟩, ⟨5, [], [144, 144], [], []⟩, @@ -2734,7 +2754,8 @@ private def branchClaims_6_16_group_00 : Array NodeClaim := 4843, 32, 131072, 0, #[⟨1, [], [], [62], []⟩, ⟨3, [5], [], [], []⟩]⟩] -private def branchClaims_6_16_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 16), group 01. -/ +def branchClaims6And16Group01 : Array NodeClaim := #[⟨2, 582814393374, 36240865608908022, 211243679912960, 5128, 2147618880, 19488, 2147614720, #[⟨1, [6], [], [61], []⟩, ⟨2, [6, 6, 3], [], [63], []⟩, @@ -2957,9 +2978,10 @@ private def branchClaims_6_16_group_01 : Array NodeClaim := /-- Flat postorder claims for branch (6, 16). -/ def branchClaims6Row16 : BranchClaims := - ⟨#[branchClaims_6_16_group_00, branchClaims_6_16_group_01], 118, 117⟩ + ⟨#[branchClaims6And16Group00, branchClaims6And16Group01], 118, 117⟩ -private def branchClaims_6_17_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 17), group 00. -/ +def branchClaims6And17Group00 : Array NodeClaim := #[⟨3, 5548435579105043486, 36240591804759294, 36169534514136294, 5125, 67108864, 134217728, 67108864, #[⟨5, [5], [106], [], []⟩]⟩, ⟨3, 6413126707560178718, 36240866682666238, 36169534777853170, @@ -3200,7 +3222,8 @@ private def branchClaims_6_17_group_00 : Array NodeClaim := ⟨5, [], [63], [62], []⟩, ⟨6, [], [63], [], []⟩]⟩] -private def branchClaims_6_17_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 17), group 01. -/ +def branchClaims6And17Group01 : Array NodeClaim := #[⟨3, 5548434911707391006, 36240591804759294, 36169534514136294, 5125, 67108864, 134217728, 67108864, #[⟨5, [5], [106], [], []⟩]⟩, ⟨3, 6413126040162526238, 36240866682666238, 36169534777853170, @@ -3418,7 +3441,8 @@ private def branchClaims_6_17_group_01 : Array NodeClaim := ⟨2, [], [127], [], []⟩, ⟨3, [], [127], [], []⟩]⟩] -private def branchClaims_6_17_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 17), group 02. -/ +def branchClaims6And17Group02 : Array NodeClaim := #[⟨4, 5559413134519821342, 36240868830149886, 36240041771039780, 4803, 131072, 0, 131072, #[⟨3, [], [88], [], []⟩]⟩, ⟨3, 5548435610428105758, 36240868830149884, 36240041768933376, @@ -3587,9 +3611,10 @@ private def branchClaims_6_17_group_02 : Array NodeClaim := /-- Flat postorder claims for branch (6, 17). -/ def branchClaims6Row17 : BranchClaims := - ⟨#[branchClaims_6_17_group_00, branchClaims_6_17_group_01, branchClaims_6_17_group_02], 171, 170⟩ + ⟨#[branchClaims6And17Group00, branchClaims6And17Group01, branchClaims6And17Group02], 171, 170⟩ -private def branchClaims_6_18_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 18), group 00. -/ +def branchClaims6And18Group00 : Array NodeClaim := #[⟨4, 5600226592569811998, 36240869366988030, 36240454893186116, 586, 0, 0, 0, #[]⟩, ⟨3, 5548435196855051294, 36240729780550910, 36099166843710532, @@ -3798,7 +3823,8 @@ private def branchClaims_6_18_group_00 : Array NodeClaim := ⟨1, [], [109], [], []⟩, ⟨5, [], [], [62], []⟩]⟩] -private def branchClaims_6_18_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 18), group 01. -/ +def branchClaims6And18Group01 : Array NodeClaim := #[⟨2, 606459782174, 36240867756358910, 36028797027881104, 4723, 26072089088, 108, 8623522304, #[⟨0, [6, 5], [], [], []⟩, ⟨1, [6, 5], [147], [], []⟩, @@ -4054,7 +4080,8 @@ private def branchClaims_6_18_group_01 : Array NodeClaim := ⟨4, 5450200169248318494, 36240867219537150, 36240178132056298, 142, 0, 0, 0, #[]⟩] -private def branchClaims_6_18_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 18), group 02. -/ +def branchClaims6And18Group02 : Array NodeClaim := #[⟨3, 5404319748044481566, 36240867219504382, 36099440643692616, 544, 17180393984, 16392, 17180393472, #[⟨0, [5], [], [], []⟩, ⟨1, [], [], [127], []⟩, @@ -4293,7 +4320,8 @@ private def branchClaims_6_18_group_02 : Array NodeClaim := ⟨2, [], [283], [], []⟩, ⟨3, [], [324], [], []⟩]⟩] -private def branchClaims_6_18_group_03 : Array NodeClaim := +/-- Coverage claims for branch (6, 18), group 03. -/ +def branchClaims6And18Group03 : Array NodeClaim := #[⟨2, 458266633246, 36240867219537104, 36240453007325184, 5105, 228360, 3221225472, 222208, #[⟨0, [], [], [189], []⟩, ⟨2, [], [378, 378, 378], [190, 191], []⟩, @@ -4318,10 +4346,11 @@ private def branchClaims_6_18_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (6, 18). -/ def branchClaims6Row18 : BranchClaims := - ⟨#[branchClaims_6_18_group_00, branchClaims_6_18_group_01, branchClaims_6_18_group_02, - branchClaims_6_18_group_03], 195, 194⟩ + ⟨#[branchClaims6And18Group00, branchClaims6And18Group01, branchClaims6And18Group02, + branchClaims6And18Group03], 195, 194⟩ -private def branchClaims_6_23_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 23), group 00. -/ +def branchClaims6And23Group00 : Array NodeClaim := #[⟨2, 606453031966, 36240044733267134, 70368753104896, 2853, 147464, 73728, 147464, #[⟨0, [], [432], [], []⟩, ⟨2, [6], [379], [], []⟩, @@ -4553,7 +4582,8 @@ private def branchClaims_6_23_group_00 : Array NodeClaim := ⟨3, [], [], [60, 62], []⟩, ⟨6, [], [145], [], []⟩]⟩] -private def branchClaims_6_23_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 23), group 01. -/ +def branchClaims6And23Group01 : Array NodeClaim := #[⟨4, 3716877264016303134, 36240592341630206, 36099166312102070, 12, 0, 0, 0, #[]⟩, ⟨4, 3718003163923145758, 36240594489113854, 36099166571100346, @@ -4811,7 +4841,8 @@ private def branchClaims_6_23_group_01 : Array NodeClaim := 5229, 65664, 0, 65664, #[⟨1, [], [116], [], []⟩, ⟨3, [], [116], [], []⟩]⟩] -private def branchClaims_6_23_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 23), group 02. -/ +def branchClaims6And23Group02 : Array NodeClaim := #[⟨2, 582797157406, 36240592341630134, 211106240924800, 5123, 2147635456, 1073818752, 2147631360, #[⟨1, [6], [377], [], []⟩, ⟨2, [6, 6, 6], [379], [127], []⟩, @@ -5042,7 +5073,8 @@ private def branchClaims_6_23_group_02 : Array NodeClaim := ⟨4, 6140940407408354334, 36240867219537150, 36240041501063248, 4777, 4096, 0, 4096, #[⟨2, [], [540], [], []⟩]⟩] -private def branchClaims_6_23_group_03 : Array NodeClaim := +/-- Coverage claims for branch (6, 23), group 03. -/ +def branchClaims6And23Group03 : Array NodeClaim := #[⟨3, 6124896333735846942, 36240867219537110, 36239903256803392, 4776, 67584, 135168, 2048, #[⟨2, [5], [292], [], []⟩, ⟨3, [5], [], [191], []⟩]⟩, @@ -5229,7 +5261,7 @@ private def branchClaims_6_23_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (6, 23). -/ def branchClaims6Row23 : BranchClaims := - ⟨#[branchClaims_6_23_group_00, branchClaims_6_23_group_01, branchClaims_6_23_group_02, - branchClaims_6_23_group_03], 248, 247⟩ + ⟨#[branchClaims6And23Group00, branchClaims6And23Group01, branchClaims6And23Group02, + branchClaims6And23Group03], 248, 247⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData14.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData14.lean index a40a835fe1..5c3211597d 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData14.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData14.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_6_24_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 24), group 00. -/ +def branchClaims6And24Group00 : Array NodeClaim := #[⟨3, 8646911616130671646, 36240319611190398, 211245555267584, 5236, 16392, 0, 16392, #[⟨0, [], [333], [], []⟩, ⟨2, [], [284], [], []⟩]⟩, @@ -245,7 +253,8 @@ private def branchClaims_6_24_group_00 : Array NodeClaim := ⟨4, 8184448094372029470, 36240868293278974, 36239903800461556, 55, 0, 0, 0, #[]⟩] -private def branchClaims_6_24_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 24), group 01. -/ +def branchClaims6And24Group01 : Array NodeClaim := #[⟨4, 8185573994278872094, 36240868293278974, 36239906206943480, 433, 8388608, 0, 8388608, #[⟨4, [], [70], [], []⟩]⟩, ⟨3, 8142508322842141726, 36240318537465086, 36239903791024224, @@ -507,7 +516,8 @@ private def branchClaims_6_24_group_01 : Array NodeClaim := ⟨4, [], [383, 143], [], []⟩, ⟨6, [], [385, 145], [], []⟩]⟩] -private def branchClaims_6_24_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 24), group 02. -/ +def branchClaims6And24Group02 : Array NodeClaim := #[⟨4, 5157466193449903134, 36240868293278974, 211106776259702, 228, 17179869184, 0, 0, #[⟨6, [], [], [], [975]⟩]⟩, ⟨3, 5116089371873436702, 36240318537464958, 211106776222820, @@ -737,7 +747,8 @@ private def branchClaims_6_24_group_02 : Array NodeClaim := ⟨3, 5548434911958590494, 36240731928067182, 36169534514183172, 710, 65536, 131072, 0, #[⟨3, [5], [], [190], []⟩]⟩] -private def branchClaims_6_24_group_03 : Array NodeClaim := +/-- Coverage claims for branch (6, 24), group 03. -/ +def branchClaims6And24Group03 : Array NodeClaim := #[⟨4, 6140939737934521374, 36240868293278846, 36169810197920820, 3043, 0, 0, 0, #[]⟩, ⟨3, 6124895664262013982, 36240730854325366, 36169809392614404, @@ -880,10 +891,11 @@ private def branchClaims_6_24_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (6, 24). -/ def branchClaims6Row24 : BranchClaims := - ⟨#[branchClaims_6_24_group_00, branchClaims_6_24_group_01, branchClaims_6_24_group_02, - branchClaims_6_24_group_03], 235, 234⟩ + ⟨#[branchClaims6And24Group00, branchClaims6And24Group01, branchClaims6And24Group02, + branchClaims6And24Group03], 235, 234⟩ -private def branchClaims_6_25_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 25), group 00. -/ +def branchClaims6And25Group00 : Array NodeClaim := #[⟨3, 6413126063518049310, 36240319611206782, 36028798363768888, 5277, 0, 8, 0, #[⟨0, [5], [], [], []⟩]⟩, ⟨3, 8646911478693815326, 36240319611206718, 36099305083770912, @@ -1136,7 +1148,8 @@ private def branchClaims_6_25_group_00 : Array NodeClaim := ⟨4, 8661830066655388702, 36240319611206846, 36240044192204964, 954, 128, 0, 0, #[⟨1, [], [], [], [1040]⟩]⟩] -private def branchClaims_6_25_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 25), group 01. -/ +def branchClaims6And25Group01 : Array NodeClaim := #[⟨3, 8646911892889723934, 36240319611206830, 36239906750105728, 5256, 8320, 8388614, 128, #[⟨0, [5, 4], [], [], []⟩, ⟨1, [], [109], [], []⟩, @@ -1421,7 +1434,8 @@ private def branchClaims_6_25_group_01 : Array NodeClaim := ⟨3, [5], [380, 156], [124], []⟩, ⟨6, [], [145], [126], []⟩]⟩] -private def branchClaims_6_25_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 25), group 02. -/ +def branchClaims6And25Group02 : Array NodeClaim := #[⟨3, 7566047956785882142, 36240594489105662, 36239904333663392, 5149, 1073741824, 1024, 1073741824, #[⟨2, [5], [], [], []⟩, ⟨6, [], [107], [], []⟩]⟩, @@ -1635,7 +1649,8 @@ private def branchClaims_6_25_group_02 : Array NodeClaim := ⟨4, 8185573993995756574, 36240869367020796, 36240592864843832, 747, 4, 0, 4, #[⟨0, [], [229], [], []⟩]⟩] -private def branchClaims_6_25_group_03 : Array NodeClaim := +/-- Coverage claims for branch (6, 25), group 03. -/ +def branchClaims6And25Group03 : Array NodeClaim := #[⟨3, 8142508322559026206, 36240869367020668, 36240040693110816, 326, 147456, 0, 16384, #[⟨2, [], [329], [], []⟩, ⟨3, [], [], [191], []⟩]⟩, @@ -1711,10 +1726,11 @@ private def branchClaims_6_25_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (6, 25). -/ def branchClaims6Row25 : BranchClaims := - ⟨#[branchClaims_6_25_group_00, branchClaims_6_25_group_01, branchClaims_6_25_group_02, - branchClaims_6_25_group_03], 211, 210⟩ + ⟨#[branchClaims6And25Group00, branchClaims6And25Group01, branchClaims6And25Group02, + branchClaims6And25Group03], 211, 210⟩ -private def branchClaims_6_26_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 26), group 00. -/ +def branchClaims6And26Group00 : Array NodeClaim := #[⟨4, 5600226974815675422, 36240869367020782, 36240040965731398, 4, 0, 0, 0, #[]⟩, ⟨3, 5548435579100914718, 36240316926852334, 36099165769987142, @@ -1913,7 +1929,8 @@ private def branchClaims_6_26_group_00 : Array NodeClaim := 249, 16392, 0, 16392, #[⟨0, [], [982], [], []⟩, ⟨2, [], [635], [], []⟩]⟩] -private def branchClaims_6_26_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 26), group 01. -/ +def branchClaims6And26Group01 : Array NodeClaim := #[⟨2, 333454697502, 36240316926852334, 211106237263872, 3022, 204864, 0, 131136, #[⟨1, [], [374], [], []⟩, ⟨2, [], [], [62], []⟩, @@ -2142,7 +2159,8 @@ private def branchClaims_6_26_group_01 : Array NodeClaim := ⟨4, 5591501143398343710, 36240869367020796, 211246095284252, 2063, 512, 0, 512, #[⟨1, [], [226], [], []⟩]⟩] -private def branchClaims_6_26_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 26), group 02. -/ +def branchClaims6And26Group02 : Array NodeClaim := #[⟨3, 5548435471961613342, 36240319611206780, 211243679365124, 2852, 131072, 0, 0, #[⟨3, [], [], [127], []⟩]⟩, ⟨4, 6451125722272687134, 36240319611206910, 211518829411348, @@ -2398,7 +2416,8 @@ private def branchClaims_6_26_group_02 : Array NodeClaim := ⟨2, [], [], [190], []⟩, ⟨3, [], [380], [], []⟩]⟩] -private def branchClaims_6_26_group_03 : Array NodeClaim := +/-- Coverage claims for branch (6, 26), group 03. -/ +def branchClaims6And26Group03 : Array NodeClaim := #[⟨3, 3098476877320479774, 36240867219504382, 211243676219432, 249, 16392, 0, 16392, #[⟨0, [], [982], [], []⟩, ⟨2, [], [635], [], []⟩]⟩, @@ -2579,10 +2598,11 @@ private def branchClaims_6_26_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (6, 26). -/ def branchClaims6Row26 : BranchClaims := - ⟨#[branchClaims_6_26_group_00, branchClaims_6_26_group_01, branchClaims_6_26_group_02, - branchClaims_6_26_group_03], 232, 231⟩ + ⟨#[branchClaims6And26Group00, branchClaims6And26Group01, branchClaims6And26Group02, + branchClaims6And26Group03], 232, 231⟩ -private def branchClaims_6_27_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 27), group 00. -/ +def branchClaims6And27Group00 : Array NodeClaim := #[⟨4, 5564479652777616414, 36240592341630206, 36169672221570158, 37, 0, 0, 0, #[]⟩, ⟨3, 5548435579105109022, 36240591804759278, 36169534514181190, @@ -2781,7 +2801,8 @@ private def branchClaims_6_27_group_00 : Array NodeClaim := ⟨2, [], [], [60], []⟩, ⟨3, [], [], [62], []⟩]⟩] -private def branchClaims_6_27_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 27), group 01. -/ +def branchClaims6And27Group01 : Array NodeClaim := #[⟨3, 4107283192547042334, 36240592341630078, 211243944652904, 249, 16392, 0, 16392, #[⟨0, [], [333], [], []⟩, ⟨2, [], [637], [], []⟩]⟩, @@ -3001,7 +3022,8 @@ private def branchClaims_6_27_group_01 : Array NodeClaim := ⟨2, [], [], [124], []⟩, ⟨3, [], [], [126], []⟩]⟩] -private def branchClaims_6_27_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 27), group 02. -/ +def branchClaims6And27Group02 : Array NodeClaim := #[⟨3, 5116090045177193502, 36240593952242806, 36169671953669124, 2944, 0, 131072, 0, #[⟨3, [5], [], [], []⟩]⟩, ⟨3, 5548435609404761118, 36240593952242812, 36169673027917828, @@ -3269,7 +3291,8 @@ private def branchClaims_6_27_group_02 : Array NodeClaim := ⟨4, 5446259519555560478, 36240867219537150, 211793439365244, 21, 0, 0, 0, #[]⟩] -private def branchClaims_6_27_group_03 : Array NodeClaim := +/-- Coverage claims for branch (6, 27), group 03. -/ +def branchClaims6And27Group03 : Array NodeClaim := #[⟨3, 5404319748025672734, 36240867219537022, 211243674114152, 246, 16392, 0, 8, #[⟨0, [], [333], [], []⟩, ⟨2, [], [], [191], []⟩]⟩, @@ -3421,10 +3444,11 @@ private def branchClaims_6_27_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (6, 27). -/ def branchClaims6Row27 : BranchClaims := - ⟨#[branchClaims_6_27_group_00, branchClaims_6_27_group_01, branchClaims_6_27_group_02, - branchClaims_6_27_group_03], 224, 223⟩ + ⟨#[branchClaims6And27Group00, branchClaims6And27Group01, branchClaims6And27Group02, + branchClaims6And27Group03], 224, 223⟩ -private def branchClaims_6_28_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 28), group 00. -/ +def branchClaims6And28Group00 : Array NodeClaim := #[⟨2, 451639698462, 36240729780583534, 36099165765243936, 1480, 2147636288, 0, 2147636288, #[⟨1, [], [422], [], []⟩, ⟨2, [], [145, 426, 426], [], []⟩, @@ -3644,7 +3668,8 @@ private def branchClaims_6_28_group_00 : Array NodeClaim := ⟨3, 6413126601194791966, 36240731928067194, 36240178397902912, 4779, 10240, 20480, 2048, #[⟨2, [5, 5], [992], [62], []⟩]⟩] -private def branchClaims_6_28_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 28), group 01. -/ +def branchClaims6And28Group01 : Array NodeClaim := #[⟨2, 731819205662, 36240730854325346, 36239903251560448, 4773, 228352, 3221225472, 21504, #[⟨2, [], [145, 426, 426], [58, 60], []⟩, ⟨3, [], [], [61, 63], []⟩, @@ -3914,7 +3939,8 @@ private def branchClaims_6_28_group_01 : Array NodeClaim := ⟨2, [], [], [125], []⟩, ⟨3, [], [], [126], []⟩]⟩] -private def branchClaims_6_28_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 28), group 02. -/ +def branchClaims6And28Group02 : Array NodeClaim := #[⟨3, 2810246899063514142, 36240730854325366, 36169809392614404, 5273, 65536, 131072, 65536, #[⟨3, [5], [285], [], []⟩]⟩, ⟨3, 3242592463291081758, 36240730854325372, 36169809930000388, @@ -4156,7 +4182,8 @@ private def branchClaims_6_28_group_02 : Array NodeClaim := 5367, 2052, 0, 0, #[⟨0, [], [], [189], []⟩, ⟨2, [], [], [190], []⟩]⟩] -private def branchClaims_6_28_group_03 : Array NodeClaim := +/-- Coverage claims for branch (6, 28), group 03. -/ +def branchClaims6And28Group03 : Array NodeClaim := #[⟨2, 599983842334, 36240867756399802, 36170084263172224, 5246, 30099145216, 3221453836, 12919276032, #[⟨0, [6, 5], [], [], []⟩, ⟨1, [], [422], [], []⟩, @@ -4231,10 +4258,11 @@ private def branchClaims_6_28_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (6, 28). -/ def branchClaims6Row28 : BranchClaims := - ⟨#[branchClaims_6_28_group_00, branchClaims_6_28_group_01, branchClaims_6_28_group_02, - branchClaims_6_28_group_03], 205, 204⟩ + ⟨#[branchClaims6And28Group00, branchClaims6And28Group01, branchClaims6And28Group02, + branchClaims6And28Group03], 205, 204⟩ -private def branchClaims_6_30_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 30), group 00. -/ +def branchClaims6And30Group00 : Array NodeClaim := #[⟨4, 5598256649979094046, 36240867219537150, 36240042039444710, 3490, 0, 0, 0, #[]⟩, ⟨3, 5548435579101307934, 36240317463723246, 36099167112135750, @@ -4432,7 +4460,8 @@ private def branchClaims_6_30_group_00 : Array NodeClaim := ⟨4, 3288473017599452190, 36240319611206910, 36240180011077866, 570, 0, 0, 0, #[]⟩] -private def branchClaims_6_30_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 30), group 01. -/ +def branchClaims6And30Group01 : Array NodeClaim := #[⟨3, 3242592596395615262, 36240319611165950, 36099442522722376, 135, 512, 540680, 0, #[⟨0, [5], [], [], []⟩, ⟨1, [], [], [63], []⟩, @@ -4644,7 +4673,8 @@ private def branchClaims_6_30_group_01 : Array NodeClaim := ⟨2, [], [], [125, 126], []⟩, ⟨4, [], [143], [], []⟩]⟩] -private def branchClaims_6_30_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 30), group 02. -/ +def branchClaims6And30Group02 : Array NodeClaim := #[⟨4, 2849934464295429150, 36240869366988030, 211245024677038, 804, 536870912, 0, 0, #[⟨5, [], [], [], [948]⟩]⟩, ⟨3, 2810246492579226654, 36240867219504382, 211245015764002, @@ -4862,7 +4892,8 @@ private def branchClaims_6_30_group_02 : Array NodeClaim := ⟨4, 5131008084117349406, 36240869367020790, 36240316381006932, 55, 0, 0, 0, #[]⟩] -private def branchClaims_6_30_group_03 : Array NodeClaim := +/-- Coverage claims for branch (6, 30), group 03. -/ +def branchClaims6And30Group03 : Array NodeClaim := #[⟨3, 5116089910351684638, 36240869367020758, 36240178938907712, 5175, 8320, 20736, 0, #[⟨1, [5], [], [190], []⟩, ⟨2, [5, 5], [], [191], []⟩]⟩, @@ -5049,7 +5080,8 @@ private def branchClaims_6_30_group_03 : Array NodeClaim := ⟨4, 2852186668389688350, 36240869367020734, 36240728702063780, 5376, 32, 0, 0, #[⟨1, [], [], [], [963]⟩]⟩] -private def branchClaims_6_30_group_04 : Array NodeClaim := +/-- Coverage claims for branch (6, 30), group 04. -/ +def branchClaims6And30Group04 : Array NodeClaim := #[⟨3, 2810246896859800606, 36240869367020718, 36240178936812576, 1540, 20544, 0, 4160, #[⟨1, [], [338], [], []⟩, ⟨2, [], [125], [255], []⟩]⟩, @@ -5092,7 +5124,7 @@ private def branchClaims_6_30_group_04 : Array NodeClaim := /-- Flat postorder claims for branch (6, 30). -/ def branchClaims6Row30 : BranchClaims := - ⟨#[branchClaims_6_30_group_00, branchClaims_6_30_group_01, branchClaims_6_30_group_02, - branchClaims_6_30_group_03, branchClaims_6_30_group_04], 265, 264⟩ + ⟨#[branchClaims6And30Group00, branchClaims6And30Group01, branchClaims6And30Group02, + branchClaims6And30Group03, branchClaims6And30Group04], 265, 264⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData15.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData15.lean index cd9c5eb86f..7d91c4270a 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData15.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateData15.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Sharded flat coverage-certificate data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage -private def branchClaims_6_31_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 31), group 00. -/ +def branchClaims6And31Group00 : Array NodeClaim := #[⟨3, 5548435579105502238, 36240594489113838, 36169534782571590, 786, 0, 0, 0, #[]⟩, ⟨3, 6124896331408925726, 36240868293278966, 36169534783095878, @@ -192,7 +200,8 @@ private def branchClaims_6_31_group_00 : Array NodeClaim := ⟨5, [], [63, 203, 203], [], []⟩, ⟨6, [], [501, 501], [], []⟩]⟩] -private def branchClaims_6_31_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 31), group 01. -/ +def branchClaims6And31Group01 : Array NodeClaim := #[⟨4, 3857052058242311198, 36240869367012606, 211244488332406, 5490, 268435456, 0, 268435456, #[⟨5, [], [328], [], []⟩]⟩, ⟨3, 3819052936386372638, 36240869366979710, 211244479942768, @@ -421,7 +430,8 @@ private def branchClaims_6_31_group_01 : Array NodeClaim := ⟨2, [1], [], [], []⟩, ⟨4, [], [105], [], []⟩]⟩] -private def branchClaims_6_31_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 31), group 02. -/ +def branchClaims6And31Group02 : Array NodeClaim := #[⟨2, 324030489630, 36240869366979706, 211243939924032, 5505, 16779270, 0, 16777222, #[⟨0, [], [143, 390], [], []⟩, ⟨2, [], [], [127], []⟩, @@ -644,7 +654,8 @@ private def branchClaims_6_31_group_02 : Array NodeClaim := ⟨4, 5416986508541879326, 36240869367020782, 211244487826446, 960, 524288, 0, 0, #[⟨3, [], [], [], [1013]⟩]⟩] -private def branchClaims_6_31_group_03 : Array NodeClaim := +/-- Coverage claims for branch (6, 31), group 03. -/ +def branchClaims6And31Group03 : Array NodeClaim := #[⟨3, 5404320134589899806, 36240869367020750, 211243948334082, 5467, 2048, 0, 0, #[⟨2, [], [], [191], []⟩]⟩, ⟨2, 581745304606, 36240868293278854, 211243948315648, @@ -835,10 +846,11 @@ private def branchClaims_6_31_group_03 : Array NodeClaim := /-- Flat postorder claims for branch (6, 31). -/ def branchClaims6Row31 : BranchClaims := - ⟨#[branchClaims_6_31_group_00, branchClaims_6_31_group_01, branchClaims_6_31_group_02, - branchClaims_6_31_group_03], 250, 249⟩ + ⟨#[branchClaims6And31Group00, branchClaims6And31Group01, branchClaims6And31Group02, + branchClaims6And31Group03], 250, 249⟩ -private def branchClaims_6_32_group_00 : Array NodeClaim := +/-- Coverage claims for branch (6, 32), group 00. -/ +def branchClaims6And32Group00 : Array NodeClaim := #[⟨4, 6028350032147178526, 36240731928034558, 36240182158064674, 5286, 16384, 0, 0, #[⟨2, [], [], [], [1064]⟩]⟩, ⟨3, 5980780761083077662, 36240731928034422, 36099441985354754, @@ -1043,7 +1055,8 @@ private def branchClaims_6_32_group_00 : Array NodeClaim := ⟨3, 2810246894735385630, 36240731928034558, 36169811803247650, 5545, 0, 16384, 0, #[⟨2, [5], [], [], []⟩]⟩] -private def branchClaims_6_32_group_01 : Array NodeClaim := +/-- Coverage claims for branch (6, 32), group 01. -/ +def branchClaims6And32Group01 : Array NodeClaim := #[⟨4, 7653023869042222110, 36240869366988030, 36240182159104048, 5287, 8, 0, 0, #[⟨0, [], [], [], [1067]⟩]⟩, ⟨3, 7638105695276557342, 36240731928034554, 36240182155958272, @@ -1275,7 +1288,8 @@ private def branchClaims_6_32_group_01 : Array NodeClaim := ⟨4, 3292694876471747614, 36240869367004414, 36240867742750760, 5402, 4, 0, 0, #[⟨0, [], [], [], [1070]⟩]⟩] -private def branchClaims_6_32_group_02 : Array NodeClaim := +/-- Coverage claims for branch (6, 32), group 02. -/ +def branchClaims6And32Group02 : Array NodeClaim := #[⟨3, 3242592330617250846, 36240869366996222, 36099443059591208, 1078, 536870912, 16793866, 0, #[⟨0, [5, 5], [], [], []⟩, ⟨1, [5], [], [], []⟩, @@ -1499,7 +1513,8 @@ private def branchClaims_6_32_group_02 : Array NodeClaim := ⟨4, 3148298196256089118, 36240869367020734, 36240865601010850, 5192, 2048, 0, 0, #[⟨2, [], [], [], [1073]⟩]⟩] -private def branchClaims_6_32_group_03 : Array NodeClaim := +/-- Coverage claims for branch (6, 32), group 03. -/ +def branchClaims6And32Group03 : Array NodeClaim := #[⟨3, 3098477125378303006, 36240869367020718, 36099440917888002, 5539, 796672, 0, 272384, #[⟨2, [], [831, 654], [], []⟩, ⟨3, [], [154], [191], []⟩]⟩, @@ -1697,7 +1712,8 @@ private def branchClaims_6_32_group_03 : Array NodeClaim := ⟨5, [0], [], [], []⟩, ⟨6, [0], [], [], []⟩]⟩] -private def branchClaims_6_32_group_04 : Array NodeClaim := +/-- Coverage claims for branch (6, 32), group 04. -/ +def branchClaims6And32Group04 : Array NodeClaim := #[⟨0, 14214174, 36240731391138816, 36028797287399424, 2918, 3455286783, 0, 3253763073, #[⟨0, [], [192], [11, 30, 44, 57], []⟩, ⟨1, [], [], [67, 78, 92, 114], []⟩, @@ -1709,7 +1725,7 @@ private def branchClaims_6_32_group_04 : Array NodeClaim := /-- Flat postorder claims for branch (6, 32). -/ def branchClaims6Row32 : BranchClaims := - ⟨#[branchClaims_6_32_group_00, branchClaims_6_32_group_01, branchClaims_6_32_group_02, - branchClaims_6_32_group_03, branchClaims_6_32_group_04], 257, 256⟩ + ⟨#[branchClaims6And32Group00, branchClaims6And32Group01, branchClaims6And32Group02, + branchClaims6And32Group03, branchClaims6And32Group04], 257, 256⟩ end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts00.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts00.lean index 0556cc61a5..78ac09556f 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts00.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts00.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness /-! # Canonical audits for dense certificate summaries -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Dense pattern summary group 0 agrees with canonical audited data. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts01.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts01.lean index 1c0bf05f04..a4e73512b8 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts01.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts01.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness /-! # Canonical audits for dense certificate summaries -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Dense pattern summary group 5 agrees with canonical audited data. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts02.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts02.lean index 339e77668c..cd6beba09b 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts02.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts02.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness /-! # Canonical audits for dense certificate summaries -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Dense pattern summary group 10 agrees with canonical audited data. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts03.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts03.lean index 391c42be71..35ec11232b 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts03.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts03.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness /-! # Canonical audits for dense certificate summaries -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Dense pattern summary group 15 agrees with canonical audited data. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts04.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts04.lean index 6d97e7fc54..c59818649e 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts04.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts04.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness /-! # Canonical audits for dense certificate summaries -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Dense pattern summary group 20 agrees with canonical audited data. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts05.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts05.lean index 5c62f923cc..bda1b98708 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts05.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts05.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness /-! # Canonical audits for dense certificate summaries -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Dense hard summary group 3 agrees with canonical audited data. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts06.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts06.lean index eafc2f253b..cd18652dae 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts06.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts06.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness /-! # Canonical audits for dense certificate summaries -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Dense hard summary group 8 agrees with canonical audited data. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts07.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts07.lean index 1fb82f1b39..e46e0ca909 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts07.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryFacts07.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummarySoundness /-! # Canonical audits for dense certificate summaries -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Dense hard summary group 13 agrees with canonical audited data. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummarySoundness.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummarySoundness.lean index 7093538c21..0e84f61b7d 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummarySoundness.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummarySoundness.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateLookup +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateLookup /-! # Canonical validity of dense certificate summary identifiers -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Check that a dense pattern summary agrees with its canonical source lookup. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryValidity.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryValidity.lean index 73397203fb..a0016f0313 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryValidity.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateDenseSummaryValidity.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryValidity import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummaryFacts00 import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummaryFacts01 import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummaryFacts02 @@ -15,6 +18,8 @@ import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummaryFacts07 /-! # Global validity of dense certificate summaries -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage private theorem densePatternSummaryGroups_size : diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts00.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts00.lean index 0c24ee93b9..7229a0d6e4 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts00.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts00.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 0). -/ theorem coverageBranchRoot_0_00 : branchClaimRootValidB 0 0 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 18). -/ theorem coverageBranchRoot_4_18 : branchClaimRootValidB 4 18 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 4). -/ theorem coverageBranchRoot_1_04 : branchClaimRootValidB 1 4 (.search branchClaims1Row4) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 5). -/ theorem coverageBranchRoot_1_05 : branchClaimRootValidB 1 5 (.search branchClaims1Row5) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 4), starting at 0. -/ theorem coverageBranchNodes_1_04_00000 : nodeClaimChunkValidB branchClaims1Row4 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 4), starting at 64. -/ theorem coverageBranchNodes_1_04_00064 : nodeClaimChunkValidB branchClaims1Row4 64 38 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 5), starting at 0. -/ theorem coverageBranchNodes_1_05_00000 : nodeClaimChunkValidB branchClaims1Row5 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 5), starting at 64. -/ theorem coverageBranchNodes_1_05_00064 : nodeClaimChunkValidB branchClaims1Row5 64 37 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts01.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts01.lean index 6073c253f4..fecc82b5fb 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts01.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts01.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 1). -/ theorem coverageBranchRoot_0_01 : branchClaimRootValidB 0 1 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 19). -/ theorem coverageBranchRoot_4_19 : branchClaimRootValidB 4 19 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 6). -/ theorem coverageBranchRoot_1_06 : branchClaimRootValidB 1 6 (.search branchClaims1Row6) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 7). -/ theorem coverageBranchRoot_1_07 : branchClaimRootValidB 1 7 (.search branchClaims1Row7) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 6), starting at 0. -/ theorem coverageBranchNodes_1_06_00000 : nodeClaimChunkValidB branchClaims1Row6 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 6), starting at 64. -/ theorem coverageBranchNodes_1_06_00064 : nodeClaimChunkValidB branchClaims1Row6 64 57 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 7), starting at 0. -/ theorem coverageBranchNodes_1_07_00000 : nodeClaimChunkValidB branchClaims1Row7 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 7), starting at 64. -/ theorem coverageBranchNodes_1_07_00064 : nodeClaimChunkValidB branchClaims1Row7 64 51 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts02.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts02.lean index dff00c2786..dbe5c6f629 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts02.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts02.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 2). -/ theorem coverageBranchRoot_0_02 : branchClaimRootValidB 0 2 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 20). -/ theorem coverageBranchRoot_4_20 : branchClaimRootValidB 4 20 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 8). -/ theorem coverageBranchRoot_1_08 : branchClaimRootValidB 1 8 (.search branchClaims1Row8) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 9). -/ theorem coverageBranchRoot_1_09 : branchClaimRootValidB 1 9 (.search branchClaims1Row9) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 8), starting at 0. -/ theorem coverageBranchNodes_1_08_00000 : nodeClaimChunkValidB branchClaims1Row8 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 8), starting at 64. -/ theorem coverageBranchNodes_1_08_00064 : nodeClaimChunkValidB branchClaims1Row8 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 8), starting at 128. -/ theorem coverageBranchNodes_1_08_00128 : nodeClaimChunkValidB branchClaims1Row8 128 18 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 9), starting at 0. -/ theorem coverageBranchNodes_1_09_00000 : nodeClaimChunkValidB branchClaims1Row9 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts03.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts03.lean index c6c628db89..9629bac831 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts03.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts03.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 3). -/ theorem coverageBranchRoot_0_03 : branchClaimRootValidB 0 3 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 21). -/ theorem coverageBranchRoot_4_21 : branchClaimRootValidB 4 21 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 16). -/ theorem coverageBranchRoot_1_16 : branchClaimRootValidB 1 16 (.search branchClaims1Row16) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 9), starting at 64. -/ theorem coverageBranchNodes_1_09_00064 : nodeClaimChunkValidB branchClaims1Row9 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 9), starting at 128. -/ theorem coverageBranchNodes_1_09_00128 : nodeClaimChunkValidB branchClaims1Row9 128 16 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 16), starting at 0. -/ theorem coverageBranchNodes_1_16_00000 : nodeClaimChunkValidB branchClaims1Row16 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 16), starting at 64. -/ theorem coverageBranchNodes_1_16_00064 : nodeClaimChunkValidB branchClaims1Row16 64 28 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts04.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts04.lean index 9a7d9ed16e..14087cc5f1 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts04.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts04.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 4). -/ theorem coverageBranchRoot_0_04 : branchClaimRootValidB 0 4 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 22). -/ theorem coverageBranchRoot_4_22 : branchClaimRootValidB 4 22 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 17). -/ theorem coverageBranchRoot_1_17 : branchClaimRootValidB 1 17 (.search branchClaims1Row17) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 18). -/ theorem coverageBranchRoot_1_18 : branchClaimRootValidB 1 18 (.search branchClaims1Row18) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 17), starting at 0. -/ theorem coverageBranchNodes_1_17_00000 : nodeClaimChunkValidB branchClaims1Row17 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 17), starting at 64. -/ theorem coverageBranchNodes_1_17_00064 : nodeClaimChunkValidB branchClaims1Row17 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 17), starting at 128. -/ theorem coverageBranchNodes_1_17_00128 : nodeClaimChunkValidB branchClaims1Row17 128 10 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 18), starting at 0. -/ theorem coverageBranchNodes_1_18_00000 : nodeClaimChunkValidB branchClaims1Row18 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts05.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts05.lean index 170485f851..39c3a30d67 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts05.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts05.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 5). -/ theorem coverageBranchRoot_0_05 : branchClaimRootValidB 0 5 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 23). -/ theorem coverageBranchRoot_4_23 : branchClaimRootValidB 4 23 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 19). -/ theorem coverageBranchRoot_1_19 : branchClaimRootValidB 1 19 (.search branchClaims1Row19) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 26). -/ theorem coverageBranchRoot_1_26 : branchClaimRootValidB 1 26 (.search branchClaims1Row26) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 18), starting at 64. -/ theorem coverageBranchNodes_1_18_00064 : nodeClaimChunkValidB branchClaims1Row18 64 42 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 19), starting at 0. -/ theorem coverageBranchNodes_1_19_00000 : nodeClaimChunkValidB branchClaims1Row19 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 19), starting at 64. -/ theorem coverageBranchNodes_1_19_00064 : nodeClaimChunkValidB branchClaims1Row19 64 53 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 26), starting at 0. -/ theorem coverageBranchNodes_1_26_00000 : nodeClaimChunkValidB branchClaims1Row26 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts06.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts06.lean index 59565c41ca..c4cd123967 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts06.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts06.lean @@ -3,47 +3,54 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 6). -/ theorem coverageBranchRoot_0_06 : branchClaimRootValidB 0 6 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 24). -/ theorem coverageBranchRoot_4_24 : branchClaimRootValidB 4 24 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 27). -/ theorem coverageBranchRoot_1_27 : branchClaimRootValidB 1 27 (.search branchClaims1Row27) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 26), starting at 64. -/ theorem coverageBranchNodes_1_26_00064 : nodeClaimChunkValidB branchClaims1Row26 64 53 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 27), starting at 0. -/ theorem coverageBranchNodes_1_27_00000 : nodeClaimChunkValidB branchClaims1Row27 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 27), starting at 64. -/ theorem coverageBranchNodes_1_27_00064 : nodeClaimChunkValidB branchClaims1Row27 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 27), starting at 128. -/ theorem coverageBranchNodes_1_27_00128 : nodeClaimChunkValidB branchClaims1Row27 128 36 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts07.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts07.lean index 8e9f34d74a..10aa652f6e 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts07.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts07.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 7). -/ theorem coverageBranchRoot_0_07 : branchClaimRootValidB 0 7 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 25). -/ theorem coverageBranchRoot_4_25 : branchClaimRootValidB 4 25 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 28). -/ theorem coverageBranchRoot_1_28 : branchClaimRootValidB 1 28 (.search branchClaims1Row28) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 29). -/ theorem coverageBranchRoot_1_29 : branchClaimRootValidB 1 29 (.search branchClaims1Row29) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 28), starting at 0. -/ theorem coverageBranchNodes_1_28_00000 : nodeClaimChunkValidB branchClaims1Row28 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 28), starting at 64. -/ theorem coverageBranchNodes_1_28_00064 : nodeClaimChunkValidB branchClaims1Row28 64 56 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 29), starting at 0. -/ theorem coverageBranchNodes_1_29_00000 : nodeClaimChunkValidB branchClaims1Row29 0 32 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 29), starting at 32. -/ theorem coverageBranchNodes_1_29_00032 : nodeClaimChunkValidB branchClaims1Row29 32 32 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts08.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts08.lean index 01d23133fa..e31f031488 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts08.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts08.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 8). -/ theorem coverageBranchRoot_0_08 : branchClaimRootValidB 0 8 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 26). -/ theorem coverageBranchRoot_4_26 : branchClaimRootValidB 4 26 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 30). -/ theorem coverageBranchRoot_1_30 : branchClaimRootValidB 1 30 (.search branchClaims1Row30) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 29), starting at 64. -/ theorem coverageBranchNodes_1_29_00064 : nodeClaimChunkValidB branchClaims1Row29 64 3 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 30), starting at 0. -/ theorem coverageBranchNodes_1_30_00000 : nodeClaimChunkValidB branchClaims1Row30 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 30), starting at 64. -/ theorem coverageBranchNodes_1_30_00064 : nodeClaimChunkValidB branchClaims1Row30 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 30), starting at 128. -/ theorem coverageBranchNodes_1_30_00128 : nodeClaimChunkValidB branchClaims1Row30 128 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts09.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts09.lean index e52310d9cb..13e0b3f872 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts09.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts09.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 9). -/ theorem coverageBranchRoot_0_09 : branchClaimRootValidB 0 9 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 27). -/ theorem coverageBranchRoot_4_27 : branchClaimRootValidB 4 27 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 31). -/ theorem coverageBranchRoot_1_31 : branchClaimRootValidB 1 31 (.search branchClaims1Row31) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 30), starting at 192. -/ theorem coverageBranchNodes_1_30_00192 : nodeClaimChunkValidB branchClaims1Row30 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 30), starting at 256. -/ theorem coverageBranchNodes_1_30_00256 : nodeClaimChunkValidB branchClaims1Row30 256 19 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 31), starting at 0. -/ theorem coverageBranchNodes_1_31_00000 : nodeClaimChunkValidB branchClaims1Row31 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 31), starting at 64. -/ theorem coverageBranchNodes_1_31_00064 : nodeClaimChunkValidB branchClaims1Row31 64 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts10.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts10.lean index 2cd575372b..c46a1c6d79 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts10.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts10.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 10). -/ theorem coverageBranchRoot_0_10 : branchClaimRootValidB 0 10 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 28). -/ theorem coverageBranchRoot_4_28 : branchClaimRootValidB 4 28 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 32). -/ theorem coverageBranchRoot_1_32 : branchClaimRootValidB 1 32 (.search branchClaims1Row32) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 31), starting at 128. -/ theorem coverageBranchNodes_1_31_00128 : nodeClaimChunkValidB branchClaims1Row31 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 31), starting at 192. -/ theorem coverageBranchNodes_1_31_00192 : nodeClaimChunkValidB branchClaims1Row31 192 29 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 31), starting at 221. -/ theorem coverageBranchNodes_1_31_00221 : nodeClaimChunkValidB branchClaims1Row31 221 29 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 32), starting at 0. -/ theorem coverageBranchNodes_1_32_00000 : nodeClaimChunkValidB branchClaims1Row32 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts11.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts11.lean index 1a6baa517d..8aa7d78c9a 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts11.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts11.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 11). -/ theorem coverageBranchRoot_0_11 : branchClaimRootValidB 0 11 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 29). -/ theorem coverageBranchRoot_4_29 : branchClaimRootValidB 4 29 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 33). -/ theorem coverageBranchRoot_1_33 : branchClaimRootValidB 1 33 (.search branchClaims1Row33) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 32), starting at 64. -/ theorem coverageBranchNodes_1_32_00064 : nodeClaimChunkValidB branchClaims1Row32 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 32), starting at 128. -/ theorem coverageBranchNodes_1_32_00128 : nodeClaimChunkValidB branchClaims1Row32 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 32), starting at 192. -/ theorem coverageBranchNodes_1_32_00192 : nodeClaimChunkValidB branchClaims1Row32 192 54 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 33), starting at 0. -/ theorem coverageBranchNodes_1_33_00000 : nodeClaimChunkValidB branchClaims1Row33 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts12.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts12.lean index 68e8ebf9ad..ecd07f2174 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts12.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts12.lean @@ -3,47 +3,54 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 12). -/ theorem coverageBranchRoot_0_12 : branchClaimRootValidB 0 12 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 30). -/ theorem coverageBranchRoot_4_30 : branchClaimRootValidB 4 30 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (1, 34). -/ theorem coverageBranchRoot_1_34 : branchClaimRootValidB 1 34 (.search branchClaims1Row34) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 33), starting at 64. -/ theorem coverageBranchNodes_1_33_00064 : nodeClaimChunkValidB branchClaims1Row33 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 33), starting at 128. -/ theorem coverageBranchNodes_1_33_00128 : nodeClaimChunkValidB branchClaims1Row33 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 33), starting at 192. -/ theorem coverageBranchNodes_1_33_00192 : nodeClaimChunkValidB branchClaims1Row33 192 40 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 34), starting at 0. -/ theorem coverageBranchNodes_1_34_00000 : nodeClaimChunkValidB branchClaims1Row34 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts13.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts13.lean index f27fa5af30..0b15e9e329 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts13.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts13.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 13). -/ theorem coverageBranchRoot_0_13 : branchClaimRootValidB 0 13 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 31). -/ theorem coverageBranchRoot_4_31 : branchClaimRootValidB 4 31 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 1). -/ theorem coverageBranchRoot_2_01 : branchClaimRootValidB 2 1 (.search branchClaims2Row1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 2). -/ theorem coverageBranchRoot_2_02 : branchClaimRootValidB 2 2 (.search branchClaims2Row2) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (1, 34), starting at 64. -/ theorem coverageBranchNodes_1_34_00064 : nodeClaimChunkValidB branchClaims1Row34 64 41 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 1), starting at 0. -/ theorem coverageBranchNodes_2_01_00000 : nodeClaimChunkValidB branchClaims2Row1 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 1), starting at 64. -/ theorem coverageBranchNodes_2_01_00064 : nodeClaimChunkValidB branchClaims2Row1 64 46 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 2), starting at 0. -/ theorem coverageBranchNodes_2_02_00000 : nodeClaimChunkValidB branchClaims2Row2 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts14.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts14.lean index 8cd7057d90..f6bf1793c2 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts14.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts14.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 14). -/ theorem coverageBranchRoot_0_14 : branchClaimRootValidB 0 14 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 32). -/ theorem coverageBranchRoot_4_32 : branchClaimRootValidB 4 32 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 3). -/ theorem coverageBranchRoot_2_03 : branchClaimRootValidB 2 3 (.search branchClaims2Row3) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 4). -/ theorem coverageBranchRoot_2_04 : branchClaimRootValidB 2 4 (.search branchClaims2Row4) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 2), starting at 64. -/ theorem coverageBranchNodes_2_02_00064 : nodeClaimChunkValidB branchClaims2Row2 64 51 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 3), starting at 0. -/ theorem coverageBranchNodes_2_03_00000 : nodeClaimChunkValidB branchClaims2Row3 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 3), starting at 64. -/ theorem coverageBranchNodes_2_03_00064 : nodeClaimChunkValidB branchClaims2Row3 64 48 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 4), starting at 0. -/ theorem coverageBranchNodes_2_04_00000 : nodeClaimChunkValidB branchClaims2Row4 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts15.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts15.lean index f60661af2c..edd58529bf 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts15.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts15.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 15). -/ theorem coverageBranchRoot_0_15 : branchClaimRootValidB 0 15 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 33). -/ theorem coverageBranchRoot_4_33 : branchClaimRootValidB 4 33 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 5). -/ theorem coverageBranchRoot_2_05 : branchClaimRootValidB 2 5 (.search branchClaims2Row5) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 6). -/ theorem coverageBranchRoot_2_06 : branchClaimRootValidB 2 6 (.search branchClaims2Row6) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 4), starting at 64. -/ theorem coverageBranchNodes_2_04_00064 : nodeClaimChunkValidB branchClaims2Row4 64 50 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 5), starting at 0. -/ theorem coverageBranchNodes_2_05_00000 : nodeClaimChunkValidB branchClaims2Row5 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 5), starting at 64. -/ theorem coverageBranchNodes_2_05_00064 : nodeClaimChunkValidB branchClaims2Row5 64 61 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 6), starting at 0. -/ theorem coverageBranchNodes_2_06_00000 : nodeClaimChunkValidB branchClaims2Row6 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts16.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts16.lean index ae4de33aba..9c79896d00 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts16.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts16.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 16). -/ theorem coverageBranchRoot_0_16 : branchClaimRootValidB 0 16 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (4, 34). -/ theorem coverageBranchRoot_4_34 : branchClaimRootValidB 4 34 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 8). -/ theorem coverageBranchRoot_2_08 : branchClaimRootValidB 2 8 (.search branchClaims2Row8) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 6), starting at 64. -/ theorem coverageBranchNodes_2_06_00064 : nodeClaimChunkValidB branchClaims2Row6 64 45 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 8), starting at 0. -/ theorem coverageBranchNodes_2_08_00000 : nodeClaimChunkValidB branchClaims2Row8 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 8), starting at 64. -/ theorem coverageBranchNodes_2_08_00064 : nodeClaimChunkValidB branchClaims2Row8 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 8), starting at 128. -/ theorem coverageBranchNodes_2_08_00128 : nodeClaimChunkValidB branchClaims2Row8 128 36 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts17.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts17.lean index bdca5fc99e..d335b356f4 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts17.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts17.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 17). -/ theorem coverageBranchRoot_0_17 : branchClaimRootValidB 0 17 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 0). -/ theorem coverageBranchRoot_5_00 : branchClaimRootValidB 5 0 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 9). -/ theorem coverageBranchRoot_2_09 : branchClaimRootValidB 2 9 (.search branchClaims2Row9) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 10). -/ theorem coverageBranchRoot_2_10 : branchClaimRootValidB 2 10 (.search branchClaims2Row10) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 9), starting at 0. -/ theorem coverageBranchNodes_2_09_00000 : nodeClaimChunkValidB branchClaims2Row9 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 9), starting at 64. -/ theorem coverageBranchNodes_2_09_00064 : nodeClaimChunkValidB branchClaims2Row9 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 9), starting at 128. -/ theorem coverageBranchNodes_2_09_00128 : nodeClaimChunkValidB branchClaims2Row9 128 54 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 10), starting at 0. -/ theorem coverageBranchNodes_2_10_00000 : nodeClaimChunkValidB branchClaims2Row10 0 15 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts18.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts18.lean index 868f65a9ec..7f0283aa37 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts18.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts18.lean @@ -3,56 +3,63 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 18). -/ theorem coverageBranchRoot_0_18 : branchClaimRootValidB 0 18 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 1). -/ theorem coverageBranchRoot_5_01 : branchClaimRootValidB 5 1 (.patternThree 180) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 11). -/ theorem coverageBranchRoot_2_11 : branchClaimRootValidB 2 11 (.search branchClaims2Row11) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 12). -/ theorem coverageBranchRoot_2_12 : branchClaimRootValidB 2 12 (.search branchClaims2Row12) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 14). -/ theorem coverageBranchRoot_2_14 : branchClaimRootValidB 2 14 (.search branchClaims2Row14) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 11), starting at 0. -/ theorem coverageBranchNodes_2_11_00000 : nodeClaimChunkValidB branchClaims2Row11 0 15 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 12), starting at 0. -/ theorem coverageBranchNodes_2_12_00000 : nodeClaimChunkValidB branchClaims2Row12 0 28 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 14), starting at 0. -/ theorem coverageBranchNodes_2_14_00000 : nodeClaimChunkValidB branchClaims2Row14 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 14), starting at 64. -/ theorem coverageBranchNodes_2_14_00064 : nodeClaimChunkValidB branchClaims2Row14 64 56 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts19.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts19.lean index 357feaaa2e..40506ac223 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts19.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts19.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 19). -/ theorem coverageBranchRoot_0_19 : branchClaimRootValidB 0 19 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 2). -/ theorem coverageBranchRoot_5_02 : branchClaimRootValidB 5 2 (.patternThree 180) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 15). -/ theorem coverageBranchRoot_2_15 : branchClaimRootValidB 2 15 (.search branchClaims2Row15) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 15), starting at 0. -/ theorem coverageBranchNodes_2_15_00000 : nodeClaimChunkValidB branchClaims2Row15 0 32 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 15), starting at 32. -/ theorem coverageBranchNodes_2_15_00032 : nodeClaimChunkValidB branchClaims2Row15 32 32 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 15), starting at 64. -/ theorem coverageBranchNodes_2_15_00064 : nodeClaimChunkValidB branchClaims2Row15 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 15), starting at 128. -/ theorem coverageBranchNodes_2_15_00128 : nodeClaimChunkValidB branchClaims2Row15 128 7 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts20.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts20.lean index 53daf26b2e..1f05f0d26c 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts20.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts20.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 20). -/ theorem coverageBranchRoot_0_20 : branchClaimRootValidB 0 20 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 3). -/ theorem coverageBranchRoot_5_03 : branchClaimRootValidB 5 3 (.patternThree 180) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 17). -/ theorem coverageBranchRoot_2_17 : branchClaimRootValidB 2 17 (.search branchClaims2Row17) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 18). -/ theorem coverageBranchRoot_2_18 : branchClaimRootValidB 2 18 (.search branchClaims2Row18) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 17), starting at 0. -/ theorem coverageBranchNodes_2_17_00000 : nodeClaimChunkValidB branchClaims2Row17 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 17), starting at 64. -/ theorem coverageBranchNodes_2_17_00064 : nodeClaimChunkValidB branchClaims2Row17 64 60 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 18), starting at 0. -/ theorem coverageBranchNodes_2_18_00000 : nodeClaimChunkValidB branchClaims2Row18 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 18), starting at 64. -/ theorem coverageBranchNodes_2_18_00064 : nodeClaimChunkValidB branchClaims2Row18 64 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts21.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts21.lean index 76026891c3..ad7a53bebf 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts21.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts21.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 21). -/ theorem coverageBranchRoot_0_21 : branchClaimRootValidB 0 21 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 13). -/ theorem coverageBranchRoot_5_13 : branchClaimRootValidB 5 13 (.patternThree 3) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 23). -/ theorem coverageBranchRoot_2_23 : branchClaimRootValidB 2 23 (.search branchClaims2Row23) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 24). -/ theorem coverageBranchRoot_2_24 : branchClaimRootValidB 2 24 (.search branchClaims2Row24) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 18), starting at 128. -/ theorem coverageBranchNodes_2_18_00128 : nodeClaimChunkValidB branchClaims2Row18 128 12 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 23), starting at 0. -/ theorem coverageBranchNodes_2_23_00000 : nodeClaimChunkValidB branchClaims2Row23 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 23), starting at 64. -/ theorem coverageBranchNodes_2_23_00064 : nodeClaimChunkValidB branchClaims2Row23 64 56 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 24), starting at 0. -/ theorem coverageBranchNodes_2_24_00000 : nodeClaimChunkValidB branchClaims2Row24 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts22.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts22.lean index 45d7806323..ecd657cb09 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts22.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts22.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 22). -/ theorem coverageBranchRoot_0_22 : branchClaimRootValidB 0 22 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 20). -/ theorem coverageBranchRoot_5_20 : branchClaimRootValidB 5 20 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 25). -/ theorem coverageBranchRoot_2_25 : branchClaimRootValidB 2 25 (.search branchClaims2Row25) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 26). -/ theorem coverageBranchRoot_2_26 : branchClaimRootValidB 2 26 (.search branchClaims2Row26) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 24), starting at 64. -/ theorem coverageBranchNodes_2_24_00064 : nodeClaimChunkValidB branchClaims2Row24 64 46 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 25), starting at 0. -/ theorem coverageBranchNodes_2_25_00000 : nodeClaimChunkValidB branchClaims2Row25 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 25), starting at 64. -/ theorem coverageBranchNodes_2_25_00064 : nodeClaimChunkValidB branchClaims2Row25 64 41 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 26), starting at 0. -/ theorem coverageBranchNodes_2_26_00000 : nodeClaimChunkValidB branchClaims2Row26 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts23.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts23.lean index 11d2c23af8..2c4e1a490b 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts23.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts23.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 23). -/ theorem coverageBranchRoot_0_23 : branchClaimRootValidB 0 23 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 21). -/ theorem coverageBranchRoot_5_21 : branchClaimRootValidB 5 21 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 27). -/ theorem coverageBranchRoot_2_27 : branchClaimRootValidB 2 27 (.search branchClaims2Row27) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 28). -/ theorem coverageBranchRoot_2_28 : branchClaimRootValidB 2 28 (.search branchClaims2Row28) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 26), starting at 64. -/ theorem coverageBranchNodes_2_26_00064 : nodeClaimChunkValidB branchClaims2Row26 64 34 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 27), starting at 0. -/ theorem coverageBranchNodes_2_27_00000 : nodeClaimChunkValidB branchClaims2Row27 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 27), starting at 64. -/ theorem coverageBranchNodes_2_27_00064 : nodeClaimChunkValidB branchClaims2Row27 64 26 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 28), starting at 0. -/ theorem coverageBranchNodes_2_28_00000 : nodeClaimChunkValidB branchClaims2Row28 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts24.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts24.lean index 3846a894ab..07ba03c2e9 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts24.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts24.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 24). -/ theorem coverageBranchRoot_0_24 : branchClaimRootValidB 0 24 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 22). -/ theorem coverageBranchRoot_5_22 : branchClaimRootValidB 5 22 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 29). -/ theorem coverageBranchRoot_2_29 : branchClaimRootValidB 2 29 (.search branchClaims2Row29) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 30). -/ theorem coverageBranchRoot_2_30 : branchClaimRootValidB 2 30 (.search branchClaims2Row30) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 28), starting at 64. -/ theorem coverageBranchNodes_2_28_00064 : nodeClaimChunkValidB branchClaims2Row28 64 32 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 29), starting at 0. -/ theorem coverageBranchNodes_2_29_00000 : nodeClaimChunkValidB branchClaims2Row29 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 29), starting at 64. -/ theorem coverageBranchNodes_2_29_00064 : nodeClaimChunkValidB branchClaims2Row29 64 39 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 30), starting at 0. -/ theorem coverageBranchNodes_2_30_00000 : nodeClaimChunkValidB branchClaims2Row30 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts25.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts25.lean index 417f245488..3b9df6aec8 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts25.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts25.lean @@ -3,47 +3,54 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 25). -/ theorem coverageBranchRoot_0_25 : branchClaimRootValidB 0 25 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 23). -/ theorem coverageBranchRoot_5_23 : branchClaimRootValidB 5 23 (.patternThree 3) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 31). -/ theorem coverageBranchRoot_2_31 : branchClaimRootValidB 2 31 (.search branchClaims2Row31) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 30), starting at 64. -/ theorem coverageBranchNodes_2_30_00064 : nodeClaimChunkValidB branchClaims2Row30 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 30), starting at 128. -/ theorem coverageBranchNodes_2_30_00128 : nodeClaimChunkValidB branchClaims2Row30 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 30), starting at 192. -/ theorem coverageBranchNodes_2_30_00192 : nodeClaimChunkValidB branchClaims2Row30 192 14 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 31), starting at 0. -/ theorem coverageBranchNodes_2_31_00000 : nodeClaimChunkValidB branchClaims2Row31 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts26.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts26.lean index 26b1a1fdc8..f0b55451a6 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts26.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts26.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 26). -/ theorem coverageBranchRoot_0_26 : branchClaimRootValidB 0 26 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 30). -/ theorem coverageBranchRoot_5_30 : branchClaimRootValidB 5 30 (.patternThree 3) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 32). -/ theorem coverageBranchRoot_2_32 : branchClaimRootValidB 2 32 (.search branchClaims2Row32) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 31), starting at 64. -/ theorem coverageBranchNodes_2_31_00064 : nodeClaimChunkValidB branchClaims2Row31 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 31), starting at 128. -/ theorem coverageBranchNodes_2_31_00128 : nodeClaimChunkValidB branchClaims2Row31 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 31), starting at 192. -/ theorem coverageBranchNodes_2_31_00192 : nodeClaimChunkValidB branchClaims2Row31 192 31 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 32), starting at 0. -/ theorem coverageBranchNodes_2_32_00000 : nodeClaimChunkValidB branchClaims2Row32 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts27.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts27.lean index dace6505bb..477a1e4c67 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts27.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts27.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 27). -/ theorem coverageBranchRoot_0_27 : branchClaimRootValidB 0 27 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 33). -/ theorem coverageBranchRoot_5_33 : branchClaimRootValidB 5 33 (.patternThree 3) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 33). -/ theorem coverageBranchRoot_2_33 : branchClaimRootValidB 2 33 (.search branchClaims2Row33) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 32), starting at 64. -/ theorem coverageBranchNodes_2_32_00064 : nodeClaimChunkValidB branchClaims2Row32 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 32), starting at 128. -/ theorem coverageBranchNodes_2_32_00128 : nodeClaimChunkValidB branchClaims2Row32 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 32), starting at 192. -/ theorem coverageBranchNodes_2_32_00192 : nodeClaimChunkValidB branchClaims2Row32 192 27 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 33), starting at 0. -/ theorem coverageBranchNodes_2_33_00000 : nodeClaimChunkValidB branchClaims2Row33 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts28.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts28.lean index 1d0c3ea807..50edb4aa3c 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts28.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts28.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 28). -/ theorem coverageBranchRoot_0_28 : branchClaimRootValidB 0 28 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 0). -/ theorem coverageBranchRoot_6_00 : branchClaimRootValidB 6 0 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (2, 34). -/ theorem coverageBranchRoot_2_34 : branchClaimRootValidB 2 34 (.search branchClaims2Row34) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 33), starting at 64. -/ theorem coverageBranchNodes_2_33_00064 : nodeClaimChunkValidB branchClaims2Row33 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 33), starting at 128. -/ theorem coverageBranchNodes_2_33_00128 : nodeClaimChunkValidB branchClaims2Row33 128 38 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 34), starting at 0. -/ theorem coverageBranchNodes_2_34_00000 : nodeClaimChunkValidB branchClaims2Row34 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 34), starting at 64. -/ theorem coverageBranchNodes_2_34_00064 : nodeClaimChunkValidB branchClaims2Row34 64 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts29.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts29.lean index e696e40cbe..d2091a6e25 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts29.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts29.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 29). -/ theorem coverageBranchRoot_0_29 : branchClaimRootValidB 0 29 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 19). -/ theorem coverageBranchRoot_6_19 : branchClaimRootValidB 6 19 (.patternThree 6) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 1). -/ theorem coverageBranchRoot_3_01 : branchClaimRootValidB 3 1 (.search branchClaims3Row1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 2). -/ theorem coverageBranchRoot_3_02 : branchClaimRootValidB 3 2 (.search branchClaims3Row2) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (2, 34), starting at 128. -/ theorem coverageBranchNodes_2_34_00128 : nodeClaimChunkValidB branchClaims2Row34 128 34 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 1), starting at 0. -/ theorem coverageBranchNodes_3_01_00000 : nodeClaimChunkValidB branchClaims3Row1 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 1), starting at 64. -/ theorem coverageBranchNodes_3_01_00064 : nodeClaimChunkValidB branchClaims3Row1 64 47 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 2), starting at 0. -/ theorem coverageBranchNodes_3_02_00000 : nodeClaimChunkValidB branchClaims3Row2 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts30.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts30.lean index 7ed0cbe669..e3c5a1a0b4 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts30.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts30.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 30). -/ theorem coverageBranchRoot_0_30 : branchClaimRootValidB 0 30 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 20). -/ theorem coverageBranchRoot_6_20 : branchClaimRootValidB 6 20 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 3). -/ theorem coverageBranchRoot_3_03 : branchClaimRootValidB 3 3 (.search branchClaims3Row3) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 4). -/ theorem coverageBranchRoot_3_04 : branchClaimRootValidB 3 4 (.search branchClaims3Row4) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 2), starting at 64. -/ theorem coverageBranchNodes_3_02_00064 : nodeClaimChunkValidB branchClaims3Row2 64 52 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 3), starting at 0. -/ theorem coverageBranchNodes_3_03_00000 : nodeClaimChunkValidB branchClaims3Row3 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 3), starting at 64. -/ theorem coverageBranchNodes_3_03_00064 : nodeClaimChunkValidB branchClaims3Row3 64 31 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 4), starting at 0. -/ theorem coverageBranchNodes_3_04_00000 : nodeClaimChunkValidB branchClaims3Row4 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts31.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts31.lean index 8d02eb11f1..add3b95a99 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts31.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts31.lean @@ -3,52 +3,59 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 31). -/ theorem coverageBranchRoot_0_31 : branchClaimRootValidB 0 31 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 21). -/ theorem coverageBranchRoot_6_21 : branchClaimRootValidB 6 21 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 5). -/ theorem coverageBranchRoot_3_05 : branchClaimRootValidB 3 5 (.search branchClaims3Row5) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 6). -/ theorem coverageBranchRoot_3_06 : branchClaimRootValidB 3 6 (.search branchClaims3Row6) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 4), starting at 64. -/ theorem coverageBranchNodes_3_04_00064 : nodeClaimChunkValidB branchClaims3Row4 64 50 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 5), starting at 0. -/ theorem coverageBranchNodes_3_05_00000 : nodeClaimChunkValidB branchClaims3Row5 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 5), starting at 64. -/ theorem coverageBranchNodes_3_05_00064 : nodeClaimChunkValidB branchClaims3Row5 64 52 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 6), starting at 0. -/ theorem coverageBranchNodes_3_06_00000 : nodeClaimChunkValidB branchClaims3Row6 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts32.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts32.lean index c7ee10fec8..8703d9d75e 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts32.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts32.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 32). -/ theorem coverageBranchRoot_0_32 : branchClaimRootValidB 0 32 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 22). -/ theorem coverageBranchRoot_6_22 : branchClaimRootValidB 6 22 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 10). -/ theorem coverageBranchRoot_3_10 : branchClaimRootValidB 3 10 (.search branchClaims3Row10) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 6), starting at 64. -/ theorem coverageBranchNodes_3_06_00064 : nodeClaimChunkValidB branchClaims3Row6 64 33 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 10), starting at 0. -/ theorem coverageBranchNodes_3_10_00000 : nodeClaimChunkValidB branchClaims3Row10 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 10), starting at 64. -/ theorem coverageBranchNodes_3_10_00064 : nodeClaimChunkValidB branchClaims3Row10 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 10), starting at 128. -/ theorem coverageBranchNodes_3_10_00128 : nodeClaimChunkValidB branchClaims3Row10 128 17 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts33.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts33.lean index f32e8f1999..dc950cf342 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts33.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts33.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 33). -/ theorem coverageBranchRoot_0_33 : branchClaimRootValidB 0 33 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 29). -/ theorem coverageBranchRoot_6_29 : branchClaimRootValidB 6 29 (.patternThree 6) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 11). -/ theorem coverageBranchRoot_3_11 : branchClaimRootValidB 3 11 (.search branchClaims3Row11) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 12). -/ theorem coverageBranchRoot_3_12 : branchClaimRootValidB 3 12 (.search branchClaims3Row12) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 11), starting at 0. -/ theorem coverageBranchNodes_3_11_00000 : nodeClaimChunkValidB branchClaims3Row11 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 11), starting at 64. -/ theorem coverageBranchNodes_3_11_00064 : nodeClaimChunkValidB branchClaims3Row11 64 49 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 12), starting at 0. -/ theorem coverageBranchNodes_3_12_00000 : nodeClaimChunkValidB branchClaims3Row12 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 12), starting at 64. -/ theorem coverageBranchNodes_3_12_00064 : nodeClaimChunkValidB branchClaims3Row12 64 43 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts34.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts34.lean index 53201aec65..6bbbb58ed5 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts34.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts34.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (0, 34). -/ theorem coverageBranchRoot_0_34 : branchClaimRootValidB 0 34 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 33). -/ theorem coverageBranchRoot_6_33 : branchClaimRootValidB 6 33 (.patternThree 6) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 23). -/ theorem coverageBranchRoot_3_23 : branchClaimRootValidB 3 23 (.search branchClaims3Row23) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 23), starting at 0. -/ theorem coverageBranchNodes_3_23_00000 : nodeClaimChunkValidB branchClaims3Row23 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 23), starting at 64. -/ theorem coverageBranchNodes_3_23_00064 : nodeClaimChunkValidB branchClaims3Row23 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 23), starting at 128. -/ theorem coverageBranchNodes_3_23_00128 : nodeClaimChunkValidB branchClaims3Row23 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 23), starting at 192. -/ theorem coverageBranchNodes_3_23_00192 : nodeClaimChunkValidB branchClaims3Row23 192 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts35.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts35.lean index 6c6c103186..7f2aac15f5 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts35.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts35.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 0). -/ theorem coverageBranchRoot_1_00 : branchClaimRootValidB 1 0 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 34). -/ theorem coverageBranchRoot_6_34 : branchClaimRootValidB 6 34 (.patternThree 6) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 24). -/ theorem coverageBranchRoot_3_24 : branchClaimRootValidB 3 24 (.search branchClaims3Row24) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 23), starting at 256. -/ theorem coverageBranchNodes_3_23_00256 : nodeClaimChunkValidB branchClaims3Row23 256 41 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 24), starting at 0. -/ theorem coverageBranchNodes_3_24_00000 : nodeClaimChunkValidB branchClaims3Row24 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 24), starting at 64. -/ theorem coverageBranchNodes_3_24_00064 : nodeClaimChunkValidB branchClaims3Row24 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 24), starting at 128. -/ theorem coverageBranchNodes_3_24_00128 : nodeClaimChunkValidB branchClaims3Row24 128 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts36.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts36.lean index 114c7dbe57..99f99881d6 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts36.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts36.lean @@ -3,42 +3,49 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 1). -/ theorem coverageBranchRoot_1_01 : branchClaimRootValidB 1 1 (.patternThree 178) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 25). -/ theorem coverageBranchRoot_3_25 : branchClaimRootValidB 3 25 (.search branchClaims3Row25) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 24), starting at 192. -/ theorem coverageBranchNodes_3_24_00192 : nodeClaimChunkValidB branchClaims3Row24 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 24), starting at 256. -/ theorem coverageBranchNodes_3_24_00256 : nodeClaimChunkValidB branchClaims3Row24 256 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 24), starting at 320. -/ theorem coverageBranchNodes_3_24_00320 : nodeClaimChunkValidB branchClaims3Row24 320 29 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 25), starting at 0. -/ theorem coverageBranchNodes_3_25_00000 : nodeClaimChunkValidB branchClaims3Row25 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts37.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts37.lean index 220cbe524a..4b66df9f62 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts37.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts37.lean @@ -3,36 +3,43 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 2). -/ theorem coverageBranchRoot_1_02 : branchClaimRootValidB 1 2 (.patternThree 178) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 25), starting at 64. -/ theorem coverageBranchNodes_3_25_00064 : nodeClaimChunkValidB branchClaims3Row25 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 25), starting at 128. -/ theorem coverageBranchNodes_3_25_00128 : nodeClaimChunkValidB branchClaims3Row25 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 25), starting at 192. -/ theorem coverageBranchNodes_3_25_00192 : nodeClaimChunkValidB branchClaims3Row25 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 25), starting at 256. -/ theorem coverageBranchNodes_3_25_00256 : nodeClaimChunkValidB branchClaims3Row25 256 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts38.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts38.lean index e3870b8051..501e0fd4be 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts38.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts38.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 3). -/ theorem coverageBranchRoot_1_03 : branchClaimRootValidB 1 3 (.patternThree 178) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 26). -/ theorem coverageBranchRoot_3_26 : branchClaimRootValidB 3 26 (.search branchClaims3Row26) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 25), starting at 320. -/ theorem coverageBranchNodes_3_25_00320 : nodeClaimChunkValidB branchClaims3Row25 320 21 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 26), starting at 0. -/ theorem coverageBranchNodes_3_26_00000 : nodeClaimChunkValidB branchClaims3Row26 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 26), starting at 64. -/ theorem coverageBranchNodes_3_26_00064 : nodeClaimChunkValidB branchClaims3Row26 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 26), starting at 128. -/ theorem coverageBranchNodes_3_26_00128 : nodeClaimChunkValidB branchClaims3Row26 128 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts39.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts39.lean index 6279c8d476..3d4ef7fa11 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts39.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts39.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 10). -/ theorem coverageBranchRoot_1_10 : branchClaimRootValidB 1 10 (.patternThree 178) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 27). -/ theorem coverageBranchRoot_3_27 : branchClaimRootValidB 3 27 (.search branchClaims3Row27) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 26), starting at 192. -/ theorem coverageBranchNodes_3_26_00192 : nodeClaimChunkValidB branchClaims3Row26 192 32 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 26), starting at 224. -/ theorem coverageBranchNodes_3_26_00224 : nodeClaimChunkValidB branchClaims3Row26 224 32 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 26), starting at 256. -/ theorem coverageBranchNodes_3_26_00256 : nodeClaimChunkValidB branchClaims3Row26 256 42 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 27), starting at 0. -/ theorem coverageBranchNodes_3_27_00000 : nodeClaimChunkValidB branchClaims3Row27 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts40.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts40.lean index 00b6baa74e..d26f2876a5 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts40.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts40.lean @@ -3,36 +3,43 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 11). -/ theorem coverageBranchRoot_1_11 : branchClaimRootValidB 1 11 (.patternThree 178) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 27), starting at 64. -/ theorem coverageBranchNodes_3_27_00064 : nodeClaimChunkValidB branchClaims3Row27 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 27), starting at 128. -/ theorem coverageBranchNodes_3_27_00128 : nodeClaimChunkValidB branchClaims3Row27 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 27), starting at 192. -/ theorem coverageBranchNodes_3_27_00192 : nodeClaimChunkValidB branchClaims3Row27 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 27), starting at 256. -/ theorem coverageBranchNodes_3_27_00256 : nodeClaimChunkValidB branchClaims3Row27 256 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts41.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts41.lean index 85fd106123..2f1cb684ea 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts41.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts41.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 12). -/ theorem coverageBranchRoot_1_12 : branchClaimRootValidB 1 12 (.patternThree 178) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 28). -/ theorem coverageBranchRoot_3_28 : branchClaimRootValidB 3 28 (.search branchClaims3Row28) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 27), starting at 320. -/ theorem coverageBranchNodes_3_27_00320 : nodeClaimChunkValidB branchClaims3Row27 320 25 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 28), starting at 0. -/ theorem coverageBranchNodes_3_28_00000 : nodeClaimChunkValidB branchClaims3Row28 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 28), starting at 64. -/ theorem coverageBranchNodes_3_28_00064 : nodeClaimChunkValidB branchClaims3Row28 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 28), starting at 128. -/ theorem coverageBranchNodes_3_28_00128 : nodeClaimChunkValidB branchClaims3Row28 128 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts42.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts42.lean index a17a763c75..8848ebc03e 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts42.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts42.lean @@ -3,42 +3,49 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 13). -/ theorem coverageBranchRoot_1_13 : branchClaimRootValidB 1 13 (.patternThree 178) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 30). -/ theorem coverageBranchRoot_3_30 : branchClaimRootValidB 3 30 (.search branchClaims3Row30) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 28), starting at 192. -/ theorem coverageBranchNodes_3_28_00192 : nodeClaimChunkValidB branchClaims3Row28 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 28), starting at 256. -/ theorem coverageBranchNodes_3_28_00256 : nodeClaimChunkValidB branchClaims3Row28 256 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 28), starting at 320. -/ theorem coverageBranchNodes_3_28_00320 : nodeClaimChunkValidB branchClaims3Row28 320 21 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 30), starting at 0. -/ theorem coverageBranchNodes_3_30_00000 : nodeClaimChunkValidB branchClaims3Row30 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts43.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts43.lean index c3c93a09cd..381aef7643 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts43.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts43.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 14). -/ theorem coverageBranchRoot_1_14 : branchClaimRootValidB 1 14 (.patternThree 178) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 31). -/ theorem coverageBranchRoot_3_31 : branchClaimRootValidB 3 31 (.search branchClaims3Row31) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 30), starting at 64. -/ theorem coverageBranchNodes_3_30_00064 : nodeClaimChunkValidB branchClaims3Row30 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 30), starting at 128. -/ theorem coverageBranchNodes_3_30_00128 : nodeClaimChunkValidB branchClaims3Row30 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 30), starting at 192. -/ theorem coverageBranchNodes_3_30_00192 : nodeClaimChunkValidB branchClaims3Row30 192 31 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 31), starting at 0. -/ theorem coverageBranchNodes_3_31_00000 : nodeClaimChunkValidB branchClaims3Row31 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts44.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts44.lean index 23d9c2b7a1..78057b912a 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts44.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts44.lean @@ -3,36 +3,43 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 15). -/ theorem coverageBranchRoot_1_15 : branchClaimRootValidB 1 15 (.patternThree 178) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 31), starting at 64. -/ theorem coverageBranchNodes_3_31_00064 : nodeClaimChunkValidB branchClaims3Row31 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 31), starting at 128. -/ theorem coverageBranchNodes_3_31_00128 : nodeClaimChunkValidB branchClaims3Row31 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 31), starting at 192. -/ theorem coverageBranchNodes_3_31_00192 : nodeClaimChunkValidB branchClaims3Row31 192 26 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 31), starting at 218. -/ theorem coverageBranchNodes_3_31_00218 : nodeClaimChunkValidB branchClaims3Row31 218 27 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts45.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts45.lean index 3585955155..dba7a57049 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts45.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts45.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 20). -/ theorem coverageBranchRoot_1_20 : branchClaimRootValidB 1 20 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (3, 32). -/ theorem coverageBranchRoot_3_32 : branchClaimRootValidB 3 32 (.search branchClaims3Row32) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 32), starting at 0. -/ theorem coverageBranchNodes_3_32_00000 : nodeClaimChunkValidB branchClaims3Row32 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 32), starting at 64. -/ theorem coverageBranchNodes_3_32_00064 : nodeClaimChunkValidB branchClaims3Row32 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 32), starting at 128. -/ theorem coverageBranchNodes_3_32_00128 : nodeClaimChunkValidB branchClaims3Row32 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 32), starting at 192. -/ theorem coverageBranchNodes_3_32_00192 : nodeClaimChunkValidB branchClaims3Row32 192 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts46.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts46.lean index 6115c54648..94e9afb4b4 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts46.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts46.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 21). -/ theorem coverageBranchRoot_1_21 : branchClaimRootValidB 1 21 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 4). -/ theorem coverageBranchRoot_5_04 : branchClaimRootValidB 5 4 (.search branchClaims5Row4) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 5). -/ theorem coverageBranchRoot_5_05 : branchClaimRootValidB 5 5 (.search branchClaims5Row5) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (3, 32), starting at 256. -/ theorem coverageBranchNodes_3_32_00256 : nodeClaimChunkValidB branchClaims3Row32 256 12 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 4), starting at 0. -/ theorem coverageBranchNodes_5_04_00000 : nodeClaimChunkValidB branchClaims5Row4 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 4), starting at 64. -/ theorem coverageBranchNodes_5_04_00064 : nodeClaimChunkValidB branchClaims5Row4 64 50 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 5), starting at 0. -/ theorem coverageBranchNodes_5_05_00000 : nodeClaimChunkValidB branchClaims5Row5 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts47.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts47.lean index fb791248db..f05cce7924 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts47.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts47.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 22). -/ theorem coverageBranchRoot_1_22 : branchClaimRootValidB 1 22 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 6). -/ theorem coverageBranchRoot_5_06 : branchClaimRootValidB 5 6 (.search branchClaims5Row6) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 7). -/ theorem coverageBranchRoot_5_07 : branchClaimRootValidB 5 7 (.search branchClaims5Row7) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 5), starting at 64. -/ theorem coverageBranchNodes_5_05_00064 : nodeClaimChunkValidB branchClaims5Row5 64 30 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 6), starting at 0. -/ theorem coverageBranchNodes_5_06_00000 : nodeClaimChunkValidB branchClaims5Row6 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 6), starting at 64. -/ theorem coverageBranchNodes_5_06_00064 : nodeClaimChunkValidB branchClaims5Row6 64 29 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 7), starting at 0. -/ theorem coverageBranchNodes_5_07_00000 : nodeClaimChunkValidB branchClaims5Row7 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts48.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts48.lean index 512b1fe06f..defce6ac78 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts48.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts48.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 23). -/ theorem coverageBranchRoot_1_23 : branchClaimRootValidB 1 23 (.patternThree 179) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 8). -/ theorem coverageBranchRoot_5_08 : branchClaimRootValidB 5 8 (.search branchClaims5Row8) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 9). -/ theorem coverageBranchRoot_5_09 : branchClaimRootValidB 5 9 (.search branchClaims5Row9) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 7), starting at 64. -/ theorem coverageBranchNodes_5_07_00064 : nodeClaimChunkValidB branchClaims5Row7 64 35 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 8), starting at 0. -/ theorem coverageBranchNodes_5_08_00000 : nodeClaimChunkValidB branchClaims5Row8 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 8), starting at 64. -/ theorem coverageBranchNodes_5_08_00064 : nodeClaimChunkValidB branchClaims5Row8 64 25 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 9), starting at 0. -/ theorem coverageBranchNodes_5_09_00000 : nodeClaimChunkValidB branchClaims5Row9 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts49.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts49.lean index 91b4e20b45..cccde8e1fb 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts49.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts49.lean @@ -3,42 +3,49 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 24). -/ theorem coverageBranchRoot_1_24 : branchClaimRootValidB 1 24 (.patternThree 179) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 10). -/ theorem coverageBranchRoot_5_10 : branchClaimRootValidB 5 10 (.search branchClaims5Row10) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 9), starting at 64. -/ theorem coverageBranchNodes_5_09_00064 : nodeClaimChunkValidB branchClaims5Row9 64 22 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 10), starting at 0. -/ theorem coverageBranchNodes_5_10_00000 : nodeClaimChunkValidB branchClaims5Row10 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 10), starting at 64. -/ theorem coverageBranchNodes_5_10_00064 : nodeClaimChunkValidB branchClaims5Row10 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 10), starting at 128. -/ theorem coverageBranchNodes_5_10_00128 : nodeClaimChunkValidB branchClaims5Row10 128 31 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts50.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts50.lean index eed1291502..0b628dc918 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts50.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts50.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (1, 25). -/ theorem coverageBranchRoot_1_25 : branchClaimRootValidB 1 25 (.patternThree 179) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 11). -/ theorem coverageBranchRoot_5_11 : branchClaimRootValidB 5 11 (.search branchClaims5Row11) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 12). -/ theorem coverageBranchRoot_5_12 : branchClaimRootValidB 5 12 (.search branchClaims5Row12) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 11), starting at 0. -/ theorem coverageBranchNodes_5_11_00000 : nodeClaimChunkValidB branchClaims5Row11 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 11), starting at 64. -/ theorem coverageBranchNodes_5_11_00064 : nodeClaimChunkValidB branchClaims5Row11 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 11), starting at 128. -/ theorem coverageBranchNodes_5_11_00128 : nodeClaimChunkValidB branchClaims5Row11 128 25 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 12), starting at 0. -/ theorem coverageBranchNodes_5_12_00000 : nodeClaimChunkValidB branchClaims5Row12 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts51.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts51.lean index 022eeccfea..419b19d528 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts51.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts51.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (2, 0). -/ theorem coverageBranchRoot_2_00 : branchClaimRootValidB 2 0 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 14). -/ theorem coverageBranchRoot_5_14 : branchClaimRootValidB 5 14 (.search branchClaims5Row14) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 12), starting at 64. -/ theorem coverageBranchNodes_5_12_00064 : nodeClaimChunkValidB branchClaims5Row12 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 12), starting at 128. -/ theorem coverageBranchNodes_5_12_00128 : nodeClaimChunkValidB branchClaims5Row12 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 12), starting at 192. -/ theorem coverageBranchNodes_5_12_00192 : nodeClaimChunkValidB branchClaims5Row12 192 10 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 14), starting at 0. -/ theorem coverageBranchNodes_5_14_00000 : nodeClaimChunkValidB branchClaims5Row14 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts52.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts52.lean index 04ae0ade48..add9a708c2 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts52.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts52.lean @@ -3,36 +3,43 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (2, 7). -/ theorem coverageBranchRoot_2_07 : branchClaimRootValidB 2 7 (.patternThree 2) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 14), starting at 64. -/ theorem coverageBranchNodes_5_14_00064 : nodeClaimChunkValidB branchClaims5Row14 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 14), starting at 128. -/ theorem coverageBranchNodes_5_14_00128 : nodeClaimChunkValidB branchClaims5Row14 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 14), starting at 192. -/ theorem coverageBranchNodes_5_14_00192 : nodeClaimChunkValidB branchClaims5Row14 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 14), starting at 256. -/ theorem coverageBranchNodes_5_14_00256 : nodeClaimChunkValidB branchClaims5Row14 256 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts53.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts53.lean index ae36681d94..0384f80fa9 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts53.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts53.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (2, 13). -/ theorem coverageBranchRoot_2_13 : branchClaimRootValidB 2 13 (.patternThree 2) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 15). -/ theorem coverageBranchRoot_5_15 : branchClaimRootValidB 5 15 (.search branchClaims5Row15) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 14), starting at 320. -/ theorem coverageBranchNodes_5_14_00320 : nodeClaimChunkValidB branchClaims5Row14 320 44 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 15), starting at 0. -/ theorem coverageBranchNodes_5_15_00000 : nodeClaimChunkValidB branchClaims5Row15 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 15), starting at 64. -/ theorem coverageBranchNodes_5_15_00064 : nodeClaimChunkValidB branchClaims5Row15 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 15), starting at 128. -/ theorem coverageBranchNodes_5_15_00128 : nodeClaimChunkValidB branchClaims5Row15 128 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts54.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts54.lean index f57f9a251b..b23a57c3c2 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts54.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts54.lean @@ -3,42 +3,49 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (2, 16). -/ theorem coverageBranchRoot_2_16 : branchClaimRootValidB 2 16 (.patternThree 2) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 16). -/ theorem coverageBranchRoot_5_16 : branchClaimRootValidB 5 16 (.search branchClaims5Row16) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 15), starting at 192. -/ theorem coverageBranchNodes_5_15_00192 : nodeClaimChunkValidB branchClaims5Row15 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 15), starting at 256. -/ theorem coverageBranchNodes_5_15_00256 : nodeClaimChunkValidB branchClaims5Row15 256 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 15), starting at 320. -/ theorem coverageBranchNodes_5_15_00320 : nodeClaimChunkValidB branchClaims5Row15 320 45 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 16), starting at 0. -/ theorem coverageBranchNodes_5_16_00000 : nodeClaimChunkValidB branchClaims5Row16 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts55.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts55.lean index eb480eefdf..2419646a2a 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts55.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts55.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (2, 19). -/ theorem coverageBranchRoot_2_19 : branchClaimRootValidB 2 19 (.patternThree 2) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 17). -/ theorem coverageBranchRoot_5_17 : branchClaimRootValidB 5 17 (.search branchClaims5Row17) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 16), starting at 64. -/ theorem coverageBranchNodes_5_16_00064 : nodeClaimChunkValidB branchClaims5Row16 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 16), starting at 128. -/ theorem coverageBranchNodes_5_16_00128 : nodeClaimChunkValidB branchClaims5Row16 128 42 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 17), starting at 0. -/ theorem coverageBranchNodes_5_17_00000 : nodeClaimChunkValidB branchClaims5Row17 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 17), starting at 64. -/ theorem coverageBranchNodes_5_17_00064 : nodeClaimChunkValidB branchClaims5Row17 64 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts56.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts56.lean index 14e30d3abb..8c87dce5de 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts56.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts56.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (2, 20). -/ theorem coverageBranchRoot_2_20 : branchClaimRootValidB 2 20 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 18). -/ theorem coverageBranchRoot_5_18 : branchClaimRootValidB 5 18 (.search branchClaims5Row18) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 17), starting at 128. -/ theorem coverageBranchNodes_5_17_00128 : nodeClaimChunkValidB branchClaims5Row17 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 17), starting at 192. -/ theorem coverageBranchNodes_5_17_00192 : nodeClaimChunkValidB branchClaims5Row17 192 28 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 18), starting at 0. -/ theorem coverageBranchNodes_5_18_00000 : nodeClaimChunkValidB branchClaims5Row18 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 18), starting at 64. -/ theorem coverageBranchNodes_5_18_00064 : nodeClaimChunkValidB branchClaims5Row18 64 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts57.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts57.lean index aff031f1ca..81f67170c1 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts57.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts57.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (2, 21). -/ theorem coverageBranchRoot_2_21 : branchClaimRootValidB 2 21 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 19). -/ theorem coverageBranchRoot_5_19 : branchClaimRootValidB 5 19 (.search branchClaims5Row19) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 18), starting at 128. -/ theorem coverageBranchNodes_5_18_00128 : nodeClaimChunkValidB branchClaims5Row18 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 18), starting at 192. -/ theorem coverageBranchNodes_5_18_00192 : nodeClaimChunkValidB branchClaims5Row18 192 62 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 19), starting at 0. -/ theorem coverageBranchNodes_5_19_00000 : nodeClaimChunkValidB branchClaims5Row19 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 19), starting at 64. -/ theorem coverageBranchNodes_5_19_00064 : nodeClaimChunkValidB branchClaims5Row19 64 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts58.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts58.lean index 1f5205ffad..240541ee77 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts58.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts58.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (2, 22). -/ theorem coverageBranchRoot_2_22 : branchClaimRootValidB 2 22 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 24). -/ theorem coverageBranchRoot_5_24 : branchClaimRootValidB 5 24 (.search branchClaims5Row24) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 19), starting at 128. -/ theorem coverageBranchNodes_5_19_00128 : nodeClaimChunkValidB branchClaims5Row19 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 19), starting at 192. -/ theorem coverageBranchNodes_5_19_00192 : nodeClaimChunkValidB branchClaims5Row19 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 19), starting at 256. -/ theorem coverageBranchNodes_5_19_00256 : nodeClaimChunkValidB branchClaims5Row19 256 42 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 24), starting at 0. -/ theorem coverageBranchNodes_5_24_00000 : nodeClaimChunkValidB branchClaims5Row24 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts59.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts59.lean index 84ca5c668c..af41554d6d 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts59.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts59.lean @@ -3,36 +3,43 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 0). -/ theorem coverageBranchRoot_3_00 : branchClaimRootValidB 3 0 (.patternThree 1) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 24), starting at 64. -/ theorem coverageBranchNodes_5_24_00064 : nodeClaimChunkValidB branchClaims5Row24 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 24), starting at 128. -/ theorem coverageBranchNodes_5_24_00128 : nodeClaimChunkValidB branchClaims5Row24 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 24), starting at 192. -/ theorem coverageBranchNodes_5_24_00192 : nodeClaimChunkValidB branchClaims5Row24 192 25 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 24), starting at 217. -/ theorem coverageBranchNodes_5_24_00217 : nodeClaimChunkValidB branchClaims5Row24 217 25 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts60.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts60.lean index 79e47c5c02..9eb05da563 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts60.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts60.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 7). -/ theorem coverageBranchRoot_3_07 : branchClaimRootValidB 3 7 (.patternThree 2) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 25). -/ theorem coverageBranchRoot_5_25 : branchClaimRootValidB 5 25 (.search branchClaims5Row25) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 25), starting at 0. -/ theorem coverageBranchNodes_5_25_00000 : nodeClaimChunkValidB branchClaims5Row25 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 25), starting at 64. -/ theorem coverageBranchNodes_5_25_00064 : nodeClaimChunkValidB branchClaims5Row25 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 25), starting at 128. -/ theorem coverageBranchNodes_5_25_00128 : nodeClaimChunkValidB branchClaims5Row25 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 25), starting at 192. -/ theorem coverageBranchNodes_5_25_00192 : nodeClaimChunkValidB branchClaims5Row25 192 31 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts61.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts61.lean index 6dff820665..2277e1c502 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts61.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts61.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 8). -/ theorem coverageBranchRoot_3_08 : branchClaimRootValidB 3 8 (.patternThree 4) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 26). -/ theorem coverageBranchRoot_5_26 : branchClaimRootValidB 5 26 (.search branchClaims5Row26) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 25), starting at 223. -/ theorem coverageBranchNodes_5_25_00223 : nodeClaimChunkValidB branchClaims5Row25 223 31 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 26), starting at 0. -/ theorem coverageBranchNodes_5_26_00000 : nodeClaimChunkValidB branchClaims5Row26 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 26), starting at 64. -/ theorem coverageBranchNodes_5_26_00064 : nodeClaimChunkValidB branchClaims5Row26 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 26), starting at 128. -/ theorem coverageBranchNodes_5_26_00128 : nodeClaimChunkValidB branchClaims5Row26 128 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts62.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts62.lean index 8d8ace7f3c..7826d79019 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts62.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts62.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 9). -/ theorem coverageBranchRoot_3_09 : branchClaimRootValidB 3 9 (.patternThree 5) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 27). -/ theorem coverageBranchRoot_5_27 : branchClaimRootValidB 5 27 (.search branchClaims5Row27) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 26), starting at 192. -/ theorem coverageBranchNodes_5_26_00192 : nodeClaimChunkValidB branchClaims5Row26 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 26), starting at 256. -/ theorem coverageBranchNodes_5_26_00256 : nodeClaimChunkValidB branchClaims5Row26 256 7 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 27), starting at 0. -/ theorem coverageBranchNodes_5_27_00000 : nodeClaimChunkValidB branchClaims5Row27 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 27), starting at 64. -/ theorem coverageBranchNodes_5_27_00064 : nodeClaimChunkValidB branchClaims5Row27 64 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts63.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts63.lean index ec75cf9858..56e746235d 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts63.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts63.lean @@ -3,36 +3,43 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 13). -/ theorem coverageBranchRoot_3_13 : branchClaimRootValidB 3 13 (.patternThree 2) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 27), starting at 128. -/ theorem coverageBranchNodes_5_27_00128 : nodeClaimChunkValidB branchClaims5Row27 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 27), starting at 192. -/ theorem coverageBranchNodes_5_27_00192 : nodeClaimChunkValidB branchClaims5Row27 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 27), starting at 256. -/ theorem coverageBranchNodes_5_27_00256 : nodeClaimChunkValidB branchClaims5Row27 256 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 27), starting at 320. -/ theorem coverageBranchNodes_5_27_00320 : nodeClaimChunkValidB branchClaims5Row27 320 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts64.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts64.lean index d6b2b85d79..8db0c55d9a 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts64.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts64.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 14). -/ theorem coverageBranchRoot_3_14 : branchClaimRootValidB 3 14 (.patternThree 4) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 28). -/ theorem coverageBranchRoot_5_28 : branchClaimRootValidB 5 28 (.search branchClaims5Row28) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 27), starting at 384. -/ theorem coverageBranchNodes_5_27_00384 : nodeClaimChunkValidB branchClaims5Row27 384 8 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 28), starting at 0. -/ theorem coverageBranchNodes_5_28_00000 : nodeClaimChunkValidB branchClaims5Row28 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 28), starting at 64. -/ theorem coverageBranchNodes_5_28_00064 : nodeClaimChunkValidB branchClaims5Row28 64 32 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 28), starting at 96. -/ theorem coverageBranchNodes_5_28_00096 : nodeClaimChunkValidB branchClaims5Row28 96 32 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts65.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts65.lean index d7cdcf73ae..c0c174db56 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts65.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts65.lean @@ -3,36 +3,43 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 15). -/ theorem coverageBranchRoot_3_15 : branchClaimRootValidB 3 15 (.patternThree 5) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 28), starting at 128. -/ theorem coverageBranchNodes_5_28_00128 : nodeClaimChunkValidB branchClaims5Row28 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 28), starting at 192. -/ theorem coverageBranchNodes_5_28_00192 : nodeClaimChunkValidB branchClaims5Row28 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 28), starting at 256. -/ theorem coverageBranchNodes_5_28_00256 : nodeClaimChunkValidB branchClaims5Row28 256 32 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 28), starting at 288. -/ theorem coverageBranchNodes_5_28_00288 : nodeClaimChunkValidB branchClaims5Row28 288 32 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts66.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts66.lean index 93503acd22..7bc67e85fe 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts66.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts66.lean @@ -3,42 +3,49 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 16). -/ theorem coverageBranchRoot_3_16 : branchClaimRootValidB 3 16 (.patternThree 2) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 29). -/ theorem coverageBranchRoot_5_29 : branchClaimRootValidB 5 29 (.search branchClaims5Row29) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 28), starting at 320. -/ theorem coverageBranchNodes_5_28_00320 : nodeClaimChunkValidB branchClaims5Row28 320 14 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 29), starting at 0. -/ theorem coverageBranchNodes_5_29_00000 : nodeClaimChunkValidB branchClaims5Row29 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 29), starting at 64. -/ theorem coverageBranchNodes_5_29_00064 : nodeClaimChunkValidB branchClaims5Row29 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 29), starting at 128. -/ theorem coverageBranchNodes_5_29_00128 : nodeClaimChunkValidB branchClaims5Row29 128 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts67.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts67.lean index 4888ff6e0b..7956884d2e 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts67.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts67.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 17). -/ theorem coverageBranchRoot_3_17 : branchClaimRootValidB 3 17 (.patternThree 4) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 31). -/ theorem coverageBranchRoot_5_31 : branchClaimRootValidB 5 31 (.search branchClaims5Row31) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 29), starting at 192. -/ theorem coverageBranchNodes_5_29_00192 : nodeClaimChunkValidB branchClaims5Row29 192 57 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 31), starting at 0. -/ theorem coverageBranchNodes_5_31_00000 : nodeClaimChunkValidB branchClaims5Row31 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 31), starting at 64. -/ theorem coverageBranchNodes_5_31_00064 : nodeClaimChunkValidB branchClaims5Row31 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 31), starting at 128. -/ theorem coverageBranchNodes_5_31_00128 : nodeClaimChunkValidB branchClaims5Row31 128 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts68.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts68.lean index c8810faeee..c38934c891 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts68.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts68.lean @@ -3,36 +3,43 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 18). -/ theorem coverageBranchRoot_3_18 : branchClaimRootValidB 3 18 (.patternThree 5) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 31), starting at 192. -/ theorem coverageBranchNodes_5_31_00192 : nodeClaimChunkValidB branchClaims5Row31 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 31), starting at 256. -/ theorem coverageBranchNodes_5_31_00256 : nodeClaimChunkValidB branchClaims5Row31 256 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 31), starting at 320. -/ theorem coverageBranchNodes_5_31_00320 : nodeClaimChunkValidB branchClaims5Row31 320 32 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 31), starting at 352. -/ theorem coverageBranchNodes_5_31_00352 : nodeClaimChunkValidB branchClaims5Row31 352 32 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts69.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts69.lean index c42b3c50fa..11ba1be988 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts69.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts69.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 19). -/ theorem coverageBranchRoot_3_19 : branchClaimRootValidB 3 19 (.patternThree 2) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 32). -/ theorem coverageBranchRoot_5_32 : branchClaimRootValidB 5 32 (.search branchClaims5Row32) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 31), starting at 384. -/ theorem coverageBranchNodes_5_31_00384 : nodeClaimChunkValidB branchClaims5Row31 384 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 31), starting at 448. -/ theorem coverageBranchNodes_5_31_00448 : nodeClaimChunkValidB branchClaims5Row31 448 38 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 32), starting at 0. -/ theorem coverageBranchNodes_5_32_00000 : nodeClaimChunkValidB branchClaims5Row32 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 32), starting at 64. -/ theorem coverageBranchNodes_5_32_00064 : nodeClaimChunkValidB branchClaims5Row32 64 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts70.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts70.lean index 8dbd3645e4..9ce097dbe3 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts70.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts70.lean @@ -3,36 +3,43 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 20). -/ theorem coverageBranchRoot_3_20 : branchClaimRootValidB 3 20 (.patternThree 1) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 32), starting at 128. -/ theorem coverageBranchNodes_5_32_00128 : nodeClaimChunkValidB branchClaims5Row32 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 32), starting at 192. -/ theorem coverageBranchNodes_5_32_00192 : nodeClaimChunkValidB branchClaims5Row32 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 32), starting at 256. -/ theorem coverageBranchNodes_5_32_00256 : nodeClaimChunkValidB branchClaims5Row32 256 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 32), starting at 320. -/ theorem coverageBranchNodes_5_32_00320 : nodeClaimChunkValidB branchClaims5Row32 320 32 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts71.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts71.lean index 5768fdc1d5..bf52b44003 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts71.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts71.lean @@ -3,42 +3,49 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 21). -/ theorem coverageBranchRoot_3_21 : branchClaimRootValidB 3 21 (.patternThree 1) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (5, 34). -/ theorem coverageBranchRoot_5_34 : branchClaimRootValidB 5 34 (.search branchClaims5Row34) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 32), starting at 352. -/ theorem coverageBranchNodes_5_32_00352 : nodeClaimChunkValidB branchClaims5Row32 352 32 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 32), starting at 384. -/ theorem coverageBranchNodes_5_32_00384 : nodeClaimChunkValidB branchClaims5Row32 384 29 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 32), starting at 413. -/ theorem coverageBranchNodes_5_32_00413 : nodeClaimChunkValidB branchClaims5Row32 413 29 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 34), starting at 0. -/ theorem coverageBranchNodes_5_34_00000 : nodeClaimChunkValidB branchClaims5Row34 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts72.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts72.lean index b281072415..907b837155 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts72.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts72.lean @@ -3,36 +3,43 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 22). -/ theorem coverageBranchRoot_3_22 : branchClaimRootValidB 3 22 (.patternThree 1) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 34), starting at 64. -/ theorem coverageBranchNodes_5_34_00064 : nodeClaimChunkValidB branchClaims5Row34 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 34), starting at 128. -/ theorem coverageBranchNodes_5_34_00128 : nodeClaimChunkValidB branchClaims5Row34 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 34), starting at 192. -/ theorem coverageBranchNodes_5_34_00192 : nodeClaimChunkValidB branchClaims5Row34 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 34), starting at 256. -/ theorem coverageBranchNodes_5_34_00256 : nodeClaimChunkValidB branchClaims5Row34 256 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts73.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts73.lean index c139dbaacc..6a51cdf9b3 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts73.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts73.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 29). -/ theorem coverageBranchRoot_3_29 : branchClaimRootValidB 3 29 (.patternThree 6) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 1). -/ theorem coverageBranchRoot_6_01 : branchClaimRootValidB 6 1 (.search branchClaims6Row1) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 34), starting at 320. -/ theorem coverageBranchNodes_5_34_00320 : nodeClaimChunkValidB branchClaims5Row34 320 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (5, 34), starting at 384. -/ theorem coverageBranchNodes_5_34_00384 : nodeClaimChunkValidB branchClaims5Row34 384 6 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 1), starting at 0. -/ theorem coverageBranchNodes_6_01_00000 : nodeClaimChunkValidB branchClaims6Row1 0 32 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 1), starting at 32. -/ theorem coverageBranchNodes_6_01_00032 : nodeClaimChunkValidB branchClaims6Row1 32 32 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts74.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts74.lean index 113d65a8ba..564f65ae01 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts74.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts74.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 33). -/ theorem coverageBranchRoot_3_33 : branchClaimRootValidB 3 33 (.patternThree 6) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 2). -/ theorem coverageBranchRoot_6_02 : branchClaimRootValidB 6 2 (.search branchClaims6Row2) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 3). -/ theorem coverageBranchRoot_6_03 : branchClaimRootValidB 6 3 (.search branchClaims6Row3) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 4). -/ theorem coverageBranchRoot_6_04 : branchClaimRootValidB 6 4 (.search branchClaims6Row4) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 1), starting at 64. -/ theorem coverageBranchNodes_6_01_00064 : nodeClaimChunkValidB branchClaims6Row1 64 1 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 2), starting at 0. -/ theorem coverageBranchNodes_6_02_00000 : nodeClaimChunkValidB branchClaims6Row2 0 52 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 3), starting at 0. -/ theorem coverageBranchNodes_6_03_00000 : nodeClaimChunkValidB branchClaims6Row3 0 42 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 4), starting at 0. -/ theorem coverageBranchNodes_6_04_00000 : nodeClaimChunkValidB branchClaims6Row4 0 51 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts75.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts75.lean index dc99dbfb4c..8a7d56974c 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts75.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts75.lean @@ -3,51 +3,58 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (3, 34). -/ theorem coverageBranchRoot_3_34 : branchClaimRootValidB 3 34 (.patternThree 6) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 5). -/ theorem coverageBranchRoot_6_05 : branchClaimRootValidB 6 5 (.search branchClaims6Row5) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 6). -/ theorem coverageBranchRoot_6_06 : branchClaimRootValidB 6 6 (.search branchClaims6Row6) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 7). -/ theorem coverageBranchRoot_6_07 : branchClaimRootValidB 6 7 (.search branchClaims6Row7) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 5), starting at 0. -/ theorem coverageBranchNodes_6_05_00000 : nodeClaimChunkValidB branchClaims6Row5 0 40 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 6), starting at 0. -/ theorem coverageBranchNodes_6_06_00000 : nodeClaimChunkValidB branchClaims6Row6 0 35 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 7), starting at 0. -/ theorem coverageBranchNodes_6_07_00000 : nodeClaimChunkValidB branchClaims6Row7 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 7), starting at 64. -/ theorem coverageBranchNodes_6_07_00064 : nodeClaimChunkValidB branchClaims6Row7 64 39 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts76.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts76.lean index ddef64b286..b13de82fb1 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts76.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts76.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 0). -/ theorem coverageBranchRoot_4_00 : branchClaimRootValidB 4 0 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 8). -/ theorem coverageBranchRoot_6_08 : branchClaimRootValidB 6 8 (.search branchClaims6Row8) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 9). -/ theorem coverageBranchRoot_6_09 : branchClaimRootValidB 6 9 (.search branchClaims6Row9) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 8), starting at 0. -/ theorem coverageBranchNodes_6_08_00000 : nodeClaimChunkValidB branchClaims6Row8 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 8), starting at 64. -/ theorem coverageBranchNodes_6_08_00064 : nodeClaimChunkValidB branchClaims6Row8 64 28 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 8), starting at 92. -/ theorem coverageBranchNodes_6_08_00092 : nodeClaimChunkValidB branchClaims6Row8 92 29 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 9), starting at 0. -/ theorem coverageBranchNodes_6_09_00000 : nodeClaimChunkValidB branchClaims6Row9 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts77.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts77.lean index 7d6453e68b..83ba1efa0c 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts77.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts77.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 1). -/ theorem coverageBranchRoot_4_01 : branchClaimRootValidB 4 1 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 10). -/ theorem coverageBranchRoot_6_10 : branchClaimRootValidB 6 10 (.search branchClaims6Row10) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 9), starting at 64. -/ theorem coverageBranchNodes_6_09_00064 : nodeClaimChunkValidB branchClaims6Row9 64 51 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 10), starting at 0. -/ theorem coverageBranchNodes_6_10_00000 : nodeClaimChunkValidB branchClaims6Row10 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 10), starting at 64. -/ theorem coverageBranchNodes_6_10_00064 : nodeClaimChunkValidB branchClaims6Row10 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 10), starting at 128. -/ theorem coverageBranchNodes_6_10_00128 : nodeClaimChunkValidB branchClaims6Row10 128 30 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts78.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts78.lean index 7b5e6d59b8..5706f8ee30 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts78.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts78.lean @@ -3,47 +3,54 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 2). -/ theorem coverageBranchRoot_4_02 : branchClaimRootValidB 4 2 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 11). -/ theorem coverageBranchRoot_6_11 : branchClaimRootValidB 6 11 (.search branchClaims6Row11) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 12). -/ theorem coverageBranchRoot_6_12 : branchClaimRootValidB 6 12 (.search branchClaims6Row12) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 11), starting at 0. -/ theorem coverageBranchNodes_6_11_00000 : nodeClaimChunkValidB branchClaims6Row11 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 11), starting at 64. -/ theorem coverageBranchNodes_6_11_00064 : nodeClaimChunkValidB branchClaims6Row11 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 11), starting at 128. -/ theorem coverageBranchNodes_6_11_00128 : nodeClaimChunkValidB branchClaims6Row11 128 14 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 12), starting at 0. -/ theorem coverageBranchNodes_6_12_00000 : nodeClaimChunkValidB branchClaims6Row12 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts79.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts79.lean index ea64441fc9..62ea2e786b 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts79.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts79.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 3). -/ theorem coverageBranchRoot_4_03 : branchClaimRootValidB 4 3 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 13). -/ theorem coverageBranchRoot_6_13 : branchClaimRootValidB 6 13 (.search branchClaims6Row13) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 12), starting at 64. -/ theorem coverageBranchNodes_6_12_00064 : nodeClaimChunkValidB branchClaims6Row12 64 61 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 13), starting at 0. -/ theorem coverageBranchNodes_6_13_00000 : nodeClaimChunkValidB branchClaims6Row13 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 13), starting at 64. -/ theorem coverageBranchNodes_6_13_00064 : nodeClaimChunkValidB branchClaims6Row13 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 13), starting at 128. -/ theorem coverageBranchNodes_6_13_00128 : nodeClaimChunkValidB branchClaims6Row13 128 5 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts80.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts80.lean index af45ed4533..01f4f57f26 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts80.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts80.lean @@ -3,46 +3,53 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 4). -/ theorem coverageBranchRoot_4_04 : branchClaimRootValidB 4 4 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 14). -/ theorem coverageBranchRoot_6_14 : branchClaimRootValidB 6 14 (.search branchClaims6Row14) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 15). -/ theorem coverageBranchRoot_6_15 : branchClaimRootValidB 6 15 (.search branchClaims6Row15) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 14), starting at 0. -/ theorem coverageBranchNodes_6_14_00000 : nodeClaimChunkValidB branchClaims6Row14 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 14), starting at 64. -/ theorem coverageBranchNodes_6_14_00064 : nodeClaimChunkValidB branchClaims6Row14 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 14), starting at 128. -/ theorem coverageBranchNodes_6_14_00128 : nodeClaimChunkValidB branchClaims6Row14 128 50 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 15), starting at 0. -/ theorem coverageBranchNodes_6_15_00000 : nodeClaimChunkValidB branchClaims6Row15 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts81.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts81.lean index dd1c0d769f..65e79e7ea9 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts81.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts81.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 5). -/ theorem coverageBranchRoot_4_05 : branchClaimRootValidB 4 5 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 16). -/ theorem coverageBranchRoot_6_16 : branchClaimRootValidB 6 16 (.search branchClaims6Row16) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 15), starting at 64. -/ theorem coverageBranchNodes_6_15_00064 : nodeClaimChunkValidB branchClaims6Row15 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 15), starting at 128. -/ theorem coverageBranchNodes_6_15_00128 : nodeClaimChunkValidB branchClaims6Row15 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 15), starting at 192. -/ theorem coverageBranchNodes_6_15_00192 : nodeClaimChunkValidB branchClaims6Row15 192 9 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 16), starting at 0. -/ theorem coverageBranchNodes_6_16_00000 : nodeClaimChunkValidB branchClaims6Row16 0 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts82.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts82.lean index 105e0c4839..316d73aa51 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts82.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts82.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 6). -/ theorem coverageBranchRoot_4_06 : branchClaimRootValidB 4 6 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 17). -/ theorem coverageBranchRoot_6_17 : branchClaimRootValidB 6 17 (.search branchClaims6Row17) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 16), starting at 64. -/ theorem coverageBranchNodes_6_16_00064 : nodeClaimChunkValidB branchClaims6Row16 64 54 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 17), starting at 0. -/ theorem coverageBranchNodes_6_17_00000 : nodeClaimChunkValidB branchClaims6Row17 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 17), starting at 64. -/ theorem coverageBranchNodes_6_17_00064 : nodeClaimChunkValidB branchClaims6Row17 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 17), starting at 128. -/ theorem coverageBranchNodes_6_17_00128 : nodeClaimChunkValidB branchClaims6Row17 128 43 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts83.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts83.lean index 77177a1c08..373fdda499 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts83.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts83.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 7). -/ theorem coverageBranchRoot_4_07 : branchClaimRootValidB 4 7 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 18). -/ theorem coverageBranchRoot_6_18 : branchClaimRootValidB 6 18 (.search branchClaims6Row18) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 18), starting at 0. -/ theorem coverageBranchNodes_6_18_00000 : nodeClaimChunkValidB branchClaims6Row18 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 18), starting at 64. -/ theorem coverageBranchNodes_6_18_00064 : nodeClaimChunkValidB branchClaims6Row18 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 18), starting at 128. -/ theorem coverageBranchNodes_6_18_00128 : nodeClaimChunkValidB branchClaims6Row18 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 18), starting at 192. -/ theorem coverageBranchNodes_6_18_00192 : nodeClaimChunkValidB branchClaims6Row18 192 3 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts84.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts84.lean index 0986f170f5..170f61d572 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts84.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts84.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 8). -/ theorem coverageBranchRoot_4_08 : branchClaimRootValidB 4 8 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 23). -/ theorem coverageBranchRoot_6_23 : branchClaimRootValidB 6 23 (.search branchClaims6Row23) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 23), starting at 0. -/ theorem coverageBranchNodes_6_23_00000 : nodeClaimChunkValidB branchClaims6Row23 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 23), starting at 64. -/ theorem coverageBranchNodes_6_23_00064 : nodeClaimChunkValidB branchClaims6Row23 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 23), starting at 128. -/ theorem coverageBranchNodes_6_23_00128 : nodeClaimChunkValidB branchClaims6Row23 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 23), starting at 192. -/ theorem coverageBranchNodes_6_23_00192 : nodeClaimChunkValidB branchClaims6Row23 192 56 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts85.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts85.lean index ee5dfa9ec1..e34ce1a4a3 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts85.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts85.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 9). -/ theorem coverageBranchRoot_4_09 : branchClaimRootValidB 4 9 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 24). -/ theorem coverageBranchRoot_6_24 : branchClaimRootValidB 6 24 (.search branchClaims6Row24) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 24), starting at 0. -/ theorem coverageBranchNodes_6_24_00000 : nodeClaimChunkValidB branchClaims6Row24 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 24), starting at 64. -/ theorem coverageBranchNodes_6_24_00064 : nodeClaimChunkValidB branchClaims6Row24 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 24), starting at 128. -/ theorem coverageBranchNodes_6_24_00128 : nodeClaimChunkValidB branchClaims6Row24 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 24), starting at 192. -/ theorem coverageBranchNodes_6_24_00192 : nodeClaimChunkValidB branchClaims6Row24 192 43 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts86.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts86.lean index 77b6162844..747fa5eaa8 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts86.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts86.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 10). -/ theorem coverageBranchRoot_4_10 : branchClaimRootValidB 4 10 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 25). -/ theorem coverageBranchRoot_6_25 : branchClaimRootValidB 6 25 (.search branchClaims6Row25) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 25), starting at 0. -/ theorem coverageBranchNodes_6_25_00000 : nodeClaimChunkValidB branchClaims6Row25 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 25), starting at 64. -/ theorem coverageBranchNodes_6_25_00064 : nodeClaimChunkValidB branchClaims6Row25 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 25), starting at 128. -/ theorem coverageBranchNodes_6_25_00128 : nodeClaimChunkValidB branchClaims6Row25 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 25), starting at 192. -/ theorem coverageBranchNodes_6_25_00192 : nodeClaimChunkValidB branchClaims6Row25 192 19 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts87.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts87.lean index 684c4ab9fe..bb88c0cb6f 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts87.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts87.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 11). -/ theorem coverageBranchRoot_4_11 : branchClaimRootValidB 4 11 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 26). -/ theorem coverageBranchRoot_6_26 : branchClaimRootValidB 6 26 (.search branchClaims6Row26) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 26), starting at 0. -/ theorem coverageBranchNodes_6_26_00000 : nodeClaimChunkValidB branchClaims6Row26 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 26), starting at 64. -/ theorem coverageBranchNodes_6_26_00064 : nodeClaimChunkValidB branchClaims6Row26 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 26), starting at 128. -/ theorem coverageBranchNodes_6_26_00128 : nodeClaimChunkValidB branchClaims6Row26 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 26), starting at 192. -/ theorem coverageBranchNodes_6_26_00192 : nodeClaimChunkValidB branchClaims6Row26 192 40 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts88.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts88.lean index d31da3f5b9..75ebb2df91 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts88.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts88.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 12). -/ theorem coverageBranchRoot_4_12 : branchClaimRootValidB 4 12 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 27). -/ theorem coverageBranchRoot_6_27 : branchClaimRootValidB 6 27 (.search branchClaims6Row27) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 27), starting at 0. -/ theorem coverageBranchNodes_6_27_00000 : nodeClaimChunkValidB branchClaims6Row27 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 27), starting at 64. -/ theorem coverageBranchNodes_6_27_00064 : nodeClaimChunkValidB branchClaims6Row27 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 27), starting at 128. -/ theorem coverageBranchNodes_6_27_00128 : nodeClaimChunkValidB branchClaims6Row27 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 27), starting at 192. -/ theorem coverageBranchNodes_6_27_00192 : nodeClaimChunkValidB branchClaims6Row27 192 32 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts89.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts89.lean index 6f9677217f..1d2e1d8473 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts89.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts89.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 13). -/ theorem coverageBranchRoot_4_13 : branchClaimRootValidB 4 13 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 28). -/ theorem coverageBranchRoot_6_28 : branchClaimRootValidB 6 28 (.search branchClaims6Row28) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 28), starting at 0. -/ theorem coverageBranchNodes_6_28_00000 : nodeClaimChunkValidB branchClaims6Row28 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 28), starting at 64. -/ theorem coverageBranchNodes_6_28_00064 : nodeClaimChunkValidB branchClaims6Row28 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 28), starting at 128. -/ theorem coverageBranchNodes_6_28_00128 : nodeClaimChunkValidB branchClaims6Row28 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 28), starting at 192. -/ theorem coverageBranchNodes_6_28_00192 : nodeClaimChunkValidB branchClaims6Row28 192 13 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts90.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts90.lean index 5d29d7cb2a..346acbb002 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts90.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts90.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 14). -/ theorem coverageBranchRoot_4_14 : branchClaimRootValidB 4 14 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 30). -/ theorem coverageBranchRoot_6_30 : branchClaimRootValidB 6 30 (.search branchClaims6Row30) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 30), starting at 0. -/ theorem coverageBranchNodes_6_30_00000 : nodeClaimChunkValidB branchClaims6Row30 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 30), starting at 64. -/ theorem coverageBranchNodes_6_30_00064 : nodeClaimChunkValidB branchClaims6Row30 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 30), starting at 128. -/ theorem coverageBranchNodes_6_30_00128 : nodeClaimChunkValidB branchClaims6Row30 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 30), starting at 192. -/ theorem coverageBranchNodes_6_30_00192 : nodeClaimChunkValidB branchClaims6Row30 192 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts91.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts91.lean index 2cd1faf9f8..f6f6ec88fc 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts91.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts91.lean @@ -3,42 +3,49 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData15 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData15 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 15). -/ theorem coverageBranchRoot_4_15 : branchClaimRootValidB 4 15 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 31). -/ theorem coverageBranchRoot_6_31 : branchClaimRootValidB 6 31 (.search branchClaims6Row31) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 30), starting at 256. -/ theorem coverageBranchNodes_6_30_00256 : nodeClaimChunkValidB branchClaims6Row30 256 9 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 31), starting at 0. -/ theorem coverageBranchNodes_6_31_00000 : nodeClaimChunkValidB branchClaims6Row31 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 31), starting at 64. -/ theorem coverageBranchNodes_6_31_00064 : nodeClaimChunkValidB branchClaims6Row31 64 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 31), starting at 128. -/ theorem coverageBranchNodes_6_31_00128 : nodeClaimChunkValidB branchClaims6Row31 128 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts92.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts92.lean index 9d74da616a..2cf0800eba 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts92.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts92.lean @@ -3,41 +3,48 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData15 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData15 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 16). -/ theorem coverageBranchRoot_4_16 : branchClaimRootValidB 4 16 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Root audit for fixed branch (6, 32). -/ theorem coverageBranchRoot_6_32 : branchClaimRootValidB 6 32 (.search branchClaims6Row32) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 31), starting at 192. -/ theorem coverageBranchNodes_6_31_00192 : nodeClaimChunkValidB branchClaims6Row31 192 29 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 31), starting at 221. -/ theorem coverageBranchNodes_6_31_00221 : nodeClaimChunkValidB branchClaims6Row31 221 29 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 32), starting at 0. -/ theorem coverageBranchNodes_6_32_00000 : nodeClaimChunkValidB branchClaims6Row32 0 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 32), starting at 64. -/ theorem coverageBranchNodes_6_32_00064 : nodeClaimChunkValidB branchClaims6Row32 64 64 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts93.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts93.lean index 9abe0db850..829ca2c39f 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts93.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateFacts93.lean @@ -3,31 +3,38 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData15 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData15 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Bounded coverage-certificate computation facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Root audit for fixed branch (4, 17). -/ theorem coverageBranchRoot_4_17 : branchClaimRootValidB 4 17 (.patternTwo 0) = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 32), starting at 128. -/ theorem coverageBranchNodes_6_32_00128 : nodeClaimChunkValidB branchClaims6Row32 128 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 32), starting at 192. -/ theorem coverageBranchNodes_6_32_00192 : nodeClaimChunkValidB branchClaims6Row32 192 64 = true := by - rfl + decide +kernel /-- Node audit for fixed branch (6, 32), starting at 256. -/ theorem coverageBranchNodes_6_32_00256 : nodeClaimChunkValidB branchClaims6Row32 256 1 = true := by - rfl + decide +kernel end Erdos97Octagon.RawIncidence.StaticDirectCoverage diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateLookup.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateLookup.lean index e3dbd1f913..51cece44c0 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateLookup.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateLookup.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryValidity +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryValidity /-! # Canonical lookup and validity of coverage summaries -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Retrieve the generated pattern summary having one source origin. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateManifest.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateManifest.lean index 1c182153e1..41a54db8d8 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateManifest.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateManifest.lean @@ -3,26 +3,33 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData15 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData00 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData01 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData02 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData03 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData04 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData05 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData06 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData07 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData08 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData09 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData10 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData11 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData12 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData13 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData14 +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateData15 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Exhaustive fixed-branch coverage-certificate manifest -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Certificate claim for each of the 245 canonical fixed-row branches. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateNodeSoundness.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateNodeSoundness.lean index b3dbcb1e56..0a6f0574c1 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateNodeSoundness.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateNodeSoundness.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverSoundness -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummaryValidity -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateSemanticSoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateSemanticSoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateSupportSoundness /-! # Soundness of flat postorder coverage-certificate nodes -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Semantic validity accessors needed by the generic certificate proof. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSemanticSoundness.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSemanticSoundness.lean index 93e44368d6..3d4578404c 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSemanticSoundness.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSemanticSoundness.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CodeStateExactness -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateLookup -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateSupportSoundness +public import LeanPool.Erdos97ConvexOctagon.CodeStateExactness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryValidity +public import LeanPool.Erdos97ConvexOctagon.PairStateExactness +public import LeanPool.Erdos97ConvexOctagon.Relabelling +import LeanPool.Erdos97ConvexOctagon.CoverageSearchRowChoiceSoundness /-! # Semantic consequences of compact coverage certificates -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Every stored assignment agrees with the corresponding mathematical row. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSoundness.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSoundness.lean index 1fd389e891..517266f34c 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSoundness.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSoundness.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateNodeSoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateNodeSoundness +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateManifest +import LeanPool.Erdos97ConvexOctagon.CoverageCertificateConflictCoverSoundness +import LeanPool.Erdos97ConvexOctagon.CoverageCertificateDenseSummaryValidity import LeanPool.Erdos97ConvexOctagon.CoverageCertificateValidity import LeanPool.Erdos97ConvexOctagon.RowSymmetry /-! # Soundness of the exhaustive coverage-certificate manifest -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage private theorem coverageBranchClaim_search_locallyValid_orbit0 diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSummaries.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSummaries.lean index 70c99cb80d..a25cca2622 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSummaries.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSummaries.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Dense identifiers for audited coverage summaries -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Shallow PatternSummary group 0. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSupportSoundness.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSupportSoundness.lean index 617014bc4c..ec8ce8b739 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSupportSoundness.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateSupportSoundness.lean @@ -3,13 +3,21 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateChecker +public import LeanPool.Erdos97ConvexOctagon.PairStateExactness +public import LeanPool.Erdos97ConvexOctagon.CoverageSearchRowChoiceSoundness import LeanPool.Erdos97ConvexOctagon.CoveragePairRowIndexMaskSoundness -import LeanPool.Erdos97ConvexOctagon.PairStateExactness +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Support lemmas for compact coverage certificates -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage private theorem bitSetB_eq_getLsbD (code : UInt64) (index : Fin 64) : diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateValidity.lean b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateValidity.lean index b4b637549a..51b91f0d31 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageCertificateValidity.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageCertificateValidity.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageCertificateManifest +public import LeanPool.Erdos97ConvexOctagon.CoverageCertificateManifest import LeanPool.Erdos97ConvexOctagon.CoverageCertificateFacts00 import LeanPool.Erdos97ConvexOctagon.CoverageCertificateFacts01 import LeanPool.Erdos97ConvexOctagon.CoverageCertificateFacts02 @@ -99,9 +100,15 @@ import LeanPool.Erdos97ConvexOctagon.CoverageCertificateFacts90 import LeanPool.Erdos97ConvexOctagon.CoverageCertificateFacts91 import LeanPool.Erdos97ConvexOctagon.CoverageCertificateFacts92 import LeanPool.Erdos97ConvexOctagon.CoverageCertificateFacts93 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Assembled coverage-certificate validity facts -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- Every local node audit passes for fixed branch (1, 4). -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData00.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData00.lean index 029dd30cd3..16b468be4d 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData00.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData00.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 0–7 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData01.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData01.lean index 053203316e..9e86bb3117 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData01.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData01.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 8–15 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData02.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData02.lean index 051808aec8..14b21a6402 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData02.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData02.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 16–23 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData03.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData03.lean index 03d9c48cab..18fbf7852a 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData03.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData03.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 24–31 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData04.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData04.lean index 67cb82220f..354de2c58a 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData04.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData04.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 32–39 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData05.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData05.lean index 49f259d62e..da5df8834e 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData05.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData05.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 40–47 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData06.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData06.lean index 7c804d87c1..06945f3d3d 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData06.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData06.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 48–55 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData07.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData07.lean index 8ea32081a4..a867ee1bec 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData07.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData07.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 56–63 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData08.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData08.lean index 513e27e8dc..699fa9fd15 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData08.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData08.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 64–71 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData09.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData09.lean index 180314c666..f568ff7f73 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData09.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData09.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 72–79 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData10.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData10.lean index cfd4b47cd3..3c480aa9f6 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData10.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData10.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 80–87 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData11.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData11.lean index bdf7754b2a..45832b7faf 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData11.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData11.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 88–95 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData12.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData12.lean index 2cc9640b78..7ec91d2951 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData12.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData12.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 96–103 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData13.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData13.lean index df735beb29..13959d1407 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData13.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData13.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 104–111 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData14.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData14.lean index d756afd350..55b0a83055 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData14.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData14.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 112–119 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData15.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData15.lean index e63f5b5c13..690414996d 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData15.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData15.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 120–127 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData16.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData16.lean index 570de3b60b..0bc84bc041 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData16.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData16.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 128–135 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData17.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData17.lean index 5dda599167..2bbbd96891 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData17.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData17.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 136–143 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData18.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData18.lean index 2f91131c6d..d0a234d1de 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData18.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData18.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 144–151 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData19.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData19.lean index 99f89c0ac2..7b77df8af9 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData19.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData19.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 152–159 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData20.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData20.lean index 278bf0321f..2b04c717bc 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData20.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData20.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 160–167 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData21.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData21.lean index b5d4e7cda6..9cf57d1aa2 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData21.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData21.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 168–175 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData22.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData22.lean index 9fc7e269d0..2b10930dde 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData22.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData22.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 176–183 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData23.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData23.lean index 90c3cbdd0f..c22f7005bf 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData23.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData23.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 184–191 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData24.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData24.lean index 11236754fb..668f9eacc7 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData24.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData24.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 192–199 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData25.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData25.lean index a3292fc8b7..987dd3a65d 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData25.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData25.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 200–207 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData26.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData26.lean index d22141fa26..a5a4e350a0 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData26.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData26.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 208–215 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData27.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData27.lean index e230755510..b5d591c616 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData27.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData27.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 216–223 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData28.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData28.lean index f67d8f1588..863347f20c 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData28.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData28.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 224–231 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData29.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData29.lean index edffbde3f9..133bb040a4 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData29.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData29.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 232–239 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData30.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData30.lean index edd0ea6848..a8e2f7ed31 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData30.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData30.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 240–247 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageData31.lean b/LeanPool/Erdos97ConvexOctagon/CoverageData31.lean index 0aa7caaee0..a546addf03 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageData31.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageData31.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes /-! # Coverage certificate data, buckets 248–255 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Generated monotone-obstruction entries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageDataTypes.lean b/LeanPool/Erdos97ConvexOctagon/CoverageDataTypes.lean index 7b1503e1d3..da2b0962bd 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageDataTypes.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageDataTypes.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.PackedCertificates +public import LeanPool.Erdos97ConvexOctagon.PackedCertificates /-! # Erdős 97 convex-octagon formalization: Coverage Data Types -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- A monotone obstruction pattern paired with its checked witness. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoveragePairRowIndexMaskSoundness.lean b/LeanPool/Erdos97ConvexOctagon/CoveragePairRowIndexMaskSoundness.lean index dd7dd7db67..95138ac447 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoveragePairRowIndexMaskSoundness.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoveragePairRowIndexMaskSoundness.lean @@ -3,25 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoveragePairRowIndexMasks -import LeanPool.Erdos97ConvexOctagon.CoverageSearchRowChoiceSoundness +public import LeanPool.Erdos97ConvexOctagon.CoveragePairRowIndexMasks +public import LeanPool.Erdos97ConvexOctagon.CoverageSearchRowChoiceSoundness +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Soundness of the transposed legal-row pair masks -/ -namespace Erdos97Octagon.RawIncidence - -private def pairRowIndexMasksValidAtB (centre : Vertex) : Bool := - (List.range 64).all fun pairIndex => - (List.range 35).all fun rowIndex => - bitSetB ((pairRowIndexMasks.getD centre.val #[]).getD pairIndex 0) - rowIndex == - bitSetB ((searchRowChoices.getD centre.val #[]).getD rowIndex - ⟨0, 0⟩).pairMask pairIndex +@[expose] public section -private theorem pairRowIndexMasks_valid (centre : Vertex) : - pairRowIndexMasksValidAtB centre = true := by - fin_cases centre <;> decide +namespace Erdos97Octagon.RawIncidence /-- The transposed pair table records exactly which row choices contain each pair bit. -/ theorem pairRowIndexMasks_bit @@ -29,10 +24,7 @@ theorem pairRowIndexMasks_bit bitSetB ((pairRowIndexMasks.getD centre.val #[]).getD pairIndex.val 0) rowIndex.val = bitSetB (searchRowChoiceAt centre rowIndex).pairMask pairIndex.val := by - have hpair := (List.all_eq_true.mp (pairRowIndexMasks_valid centre)) - pairIndex.val (List.mem_range.mpr pairIndex.isLt) - have hrow := (List.all_eq_true.mp hpair) - rowIndex.val (List.mem_range.mpr rowIndex.isLt) - simpa only [pairRowIndexMasksValidAtB, beq_iff_eq, searchRowChoiceAt] using hrow + revert centre pairIndex rowIndex + decide +kernel end Erdos97Octagon.RawIncidence diff --git a/LeanPool/Erdos97ConvexOctagon/CoveragePairRowIndexMasks.lean b/LeanPool/Erdos97ConvexOctagon/CoveragePairRowIndexMasks.lean index 48bf6e8d2d..e43ab604d4 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoveragePairRowIndexMasks.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoveragePairRowIndexMasks.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Precomputed legal-row index masks for bulk pair pruning -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- For each centre and packed pair bit, legal-row indices containing that pair. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSearchCore.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSearchCore.lean index d492c548e3..779cffc5ed 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSearchCore.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSearchCore.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Lightweight state for finite coverage search -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage /-- One assigned centre and its eight-bit target-row mask. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSearchRowChoiceSoundness.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSearchRowChoiceSoundness.lean index b5576b3f24..e710039c66 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSearchRowChoiceSoundness.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSearchRowChoiceSoundness.lean @@ -3,12 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageSearchRowChoices -import LeanPool.Erdos97ConvexOctagon.RowMasks +public import LeanPool.Erdos97ConvexOctagon.CoverageSearchRowChoices +public import LeanPool.Erdos97ConvexOctagon.RowMasks +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryTypes +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Soundness and completeness of lightweight legal-row search data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- The lightweight choice at one legal-row index. -/ @@ -41,7 +49,8 @@ theorem searchRowChoices_complete (centre : Vertex) : (rowOptions centre).reverse = List.ofFn (fun index : Fin 35 => packedRow (searchRowChoiceAt centre index).rowMask) := by - fin_cases centre <;> decide + revert centre + decide +kernel /-- Every mathematical incidence row occurs at one lightweight search index. -/ theorem exists_searchRowChoiceIndex (Q : OctagonIncidence) (centre : Vertex) : @@ -58,7 +67,8 @@ theorem exists_searchRowChoiceIndex (Q : OctagonIncidence) (centre : Vertex) : theorem searchRowChoiceAt_pairMask (centre : Vertex) (index : Fin 35) : (searchRowChoiceAt centre index).pairMask = rowPairMask (searchRowChoiceAt centre index).rowMask := by - fin_cases centre <;> fin_cases index <;> rfl + revert centre index + decide +kernel /-- The centre-two row table uses exactly the public fixed-branch ordering. -/ theorem searchRowChoiceAt_two_mask (index : Fin 35) : diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSearchRowChoices.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSearchRowChoices.lean index 1d639707c8..22db07e309 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSearchRowChoices.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSearchRowChoices.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryTypes +public import LeanPool.Erdos97ConvexOctagon.Incidence +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Lightweight legal-row search data -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- A legal row and its packed unordered-pair mask. -/ @@ -17,7 +24,8 @@ structure SearchRowChoice where /-- Packed unordered-pair bits selected together by the row. -/ pairMask : UInt64 -private def searchRowChoices0 : Array SearchRowChoice := +/-- Packed search-row choices for vertex 0. -/ +def searchRowChoices0 : Array SearchRowChoice := #[⟨30, 270015488⟩, ⟨46, 539503616⟩, ⟨78, 1078479872⟩, ⟨142, 2156432384⟩, ⟨54, 137442112512⟩, ⟨86, 274883171328⟩, ⟨150, 549765288960⟩, ⟨102, 70368750494720⟩, ⟨166, 140737498883072⟩, ⟨198, 36028797031597056⟩, ⟨58, 138244274176⟩, ⟨90, 276220106752⟩, ⟨154, 552171771904⟩, @@ -29,7 +37,8 @@ private def searchRowChoices0 : Array SearchRowChoice := ⟨184, 141427635912704⟩, ⟨216, 36029625142345728⟩, ⟨232, 36239907009593344⟩, ⟨240, 36240865324171264⟩] -private def searchRowChoices1 : Array SearchRowChoice := +/-- Packed search-row choices for vertex 1. -/ +def searchRowChoices1 : Array SearchRowChoice := #[⟨29, 270008348⟩, ⟨45, 539492396⟩, ⟨77, 1078460492⟩, ⟨141, 2156396684⟩, ⟨53, 137442099252⟩, ⟨85, 274883149908⟩, ⟨149, 549765251220⟩, ⟨101, 70368750469220⟩, ⟨165, 140737498841252⟩, ⟨197, 36028797031547076⟩, ⟨57, 138244259896⟩, ⟨89, 276220084312⟩, ⟨153, 552171733144⟩, @@ -41,7 +50,8 @@ private def searchRowChoices1 : Array SearchRowChoice := ⟨184, 141427635912704⟩, ⟨216, 36029625142345728⟩, ⟨232, 36239907009593344⟩, ⟨240, 36240865324171264⟩] -private def searchRowChoices2 : Array SearchRowChoice := +/-- Packed search-row choices for vertex 2. -/ +def searchRowChoices2 : Array SearchRowChoice := #[⟨27, 268441626⟩, ⟨43, 536881194⟩, ⟨75, 1073760330⟩, ⟨139, 2147518602⟩, ⟨51, 137438965810⟩, ⟨83, 274877927506⟩, ⟨147, 549755850898⟩, ⟨99, 70368744202338⟩, ⟨163, 140737488396450⟩, ⟨195, 36028797019013314⟩, ⟨57, 138244259896⟩, ⟨89, 276220084312⟩, ⟨153, 552171733144⟩, @@ -53,7 +63,8 @@ private def searchRowChoices2 : Array SearchRowChoice := ⟨184, 141427635912704⟩, ⟨216, 36029625142345728⟩, ⟨232, 36239907009593344⟩, ⟨240, 36240865324171264⟩] -private def searchRowChoices3 : Array SearchRowChoice := +/-- Packed search-row choices for vertex 3. -/ +def searchRowChoices3 : Array SearchRowChoice := #[⟨23, 1053718⟩, ⟨39, 2106406⟩, ⟨71, 4211782⟩, ⟨135, 8422534⟩, ⟨51, 137438965810⟩, ⟨83, 274877927506⟩, ⟨147, 549755850898⟩, ⟨99, 70368744202338⟩, ⟨163, 140737488396450⟩, ⟨195, 36028797019013314⟩, ⟨53, 137442099252⟩, ⟨85, 274883149908⟩, ⟨149, 549765251220⟩, @@ -65,7 +76,8 @@ private def searchRowChoices3 : Array SearchRowChoice := ⟨180, 141424694657024⟩, ⟨212, 36029621666316288⟩, ⟨228, 36239903266177024⟩, ⟨240, 36240865324171264⟩] -private def searchRowChoices4 : Array SearchRowChoice := +/-- Packed search-row choices for vertex 4. -/ +def searchRowChoices4 : Array SearchRowChoice := #[⟨15, 527374⟩, ⟨39, 2106406⟩, ⟨71, 4211782⟩, ⟨135, 8422534⟩, ⟨43, 536881194⟩, ⟨75, 1073760330⟩, ⟨139, 2147518602⟩, ⟨99, 70368744202338⟩, ⟨163, 140737488396450⟩, ⟨195, 36028797019013314⟩, ⟨45, 539492396⟩, ⟨77, 1078460492⟩, ⟨141, 2156396684⟩, ⟨101, 70368750469220⟩, @@ -76,7 +88,8 @@ private def searchRowChoices4 : Array SearchRowChoice := ⟨226, 36239903251554304⟩, ⟨108, 70370361606144⟩, ⟨172, 140740183719936⟩, ⟨204, 36028800253296640⟩, ⟨228, 36239903266177024⟩, ⟨232, 36239907009593344⟩] -private def searchRowChoices5 : Array SearchRowChoice := +/-- Packed search-row choices for vertex 5. -/ +def searchRowChoices5 : Array SearchRowChoice := #[⟨15, 527374⟩, ⟨23, 1053718⟩, ⟨71, 4211782⟩, ⟨135, 8422534⟩, ⟨27, 268441626⟩, ⟨75, 1073760330⟩, ⟨139, 2147518602⟩, ⟨83, 274877927506⟩, ⟨147, 549755850898⟩, ⟨195, 36028797019013314⟩, ⟨29, 270008348⟩, ⟨77, 1078460492⟩, ⟨141, 2156396684⟩, ⟨85, 274883149908⟩, ⟨149, 549765251220⟩, @@ -87,7 +100,8 @@ private def searchRowChoices5 : Array SearchRowChoice := ⟨156, 552181694464⟩, ⟨204, 36028800253296640⟩, ⟨212, 36029621666316288⟩, ⟨216, 36029625142345728⟩] -private def searchRowChoices6 : Array SearchRowChoice := +/-- Packed search-row choices for vertex 6. -/ +def searchRowChoices6 : Array SearchRowChoice := #[⟨15, 527374⟩, ⟨23, 1053718⟩, ⟨39, 2106406⟩, ⟨135, 8422534⟩, ⟨27, 268441626⟩, ⟨43, 536881194⟩, ⟨139, 2147518602⟩, ⟨51, 137438965810⟩, ⟨147, 549755850898⟩, ⟨163, 140737488396450⟩, ⟨29, 270008348⟩, ⟨45, 539492396⟩, ⟨141, 2156396684⟩, ⟨53, 137442099252⟩, ⟨149, 549765251220⟩, @@ -97,7 +111,8 @@ private def searchRowChoices6 : Array SearchRowChoice := ⟨170, 140740172752896⟩, ⟨178, 141424683167744⟩, ⟨60, 138247929856⟩, ⟨156, 552181694464⟩, ⟨172, 140740183719936⟩, ⟨180, 141424694657024⟩, ⟨184, 141427635912704⟩] -private def searchRowChoices7 : Array SearchRowChoice := +/-- Packed search-row choices for vertex 7. -/ +def searchRowChoices7 : Array SearchRowChoice := #[⟨15, 527374⟩, ⟨23, 1053718⟩, ⟨39, 2106406⟩, ⟨71, 4211782⟩, ⟨27, 268441626⟩, ⟨43, 536881194⟩, ⟨75, 1073760330⟩, ⟨51, 137438965810⟩, ⟨83, 274877927506⟩, ⟨99, 70368744202338⟩, ⟨29, 270008348⟩, ⟨45, 539492396⟩, ⟨77, 1078460492⟩, ⟨53, 137442099252⟩, ⟨85, 274883149908⟩, diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData.lean index 8b10aecb36..5a91c3b8ab 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData.lean @@ -3,42 +3,45 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData00 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData01 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData02 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData03 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData04 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData05 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData06 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData07 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData08 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData09 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData10 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData11 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData12 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData13 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData14 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData15 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData16 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData17 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData18 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData19 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData20 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData21 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData22 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData23 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData24 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData25 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData26 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData27 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData28 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData29 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData30 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData31 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData00 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData01 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData02 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData03 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData04 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData05 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData06 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData07 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData08 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData09 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData10 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData11 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData12 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData13 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData14 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData15 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData16 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData17 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData18 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData19 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData20 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData21 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData22 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData23 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData24 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData25 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData26 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData27 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData28 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData29 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData30 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData31 /-! # Aggregated lightweight coverage summaries -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- The 32 groups containing all lightweight pattern summaries. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData00.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData00.lean index 463cf70341..745f1ec6bd 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData00.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData00.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData00 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData00 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 0–7 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData01.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData01.lean index 9af39b9587..60e96faf0d 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData01.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData01.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData01 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData01 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 8–15 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData02.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData02.lean index b5b3a1236f..9a3e59b02e 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData02.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData02.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData02 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData02 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 16–23 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData03.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData03.lean index b014345449..490f841e95 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData03.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData03.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData03 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData03 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 24–31 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData04.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData04.lean index ff9d2e4f7c..55361fcf5c 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData04.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData04.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData04 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData04 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 32–39 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData05.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData05.lean index a3e0124e9f..950ed7c15c 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData05.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData05.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData05 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData05 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 40–47 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData06.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData06.lean index 24752af1c6..33773436fe 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData06.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData06.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData06 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData06 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 48–55 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData07.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData07.lean index afe6c772a9..15e0f74d5f 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData07.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData07.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData07 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData07 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 56–63 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData08.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData08.lean index 8b62c96724..8bbdc8ba78 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData08.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData08.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData08 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData08 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 64–71 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData09.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData09.lean index d566eae901..d011ec57e5 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData09.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData09.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData09 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData09 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 72–79 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData10.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData10.lean index 7457406f7a..1a2b3dcbea 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData10.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData10.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData10 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData10 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 80–87 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData11.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData11.lean index fcfa90fc7b..6045ee93e0 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData11.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData11.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData11 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData11 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 88–95 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData12.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData12.lean index 68c2949456..58d970466a 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData12.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData12.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData12 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData12 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 96–103 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData13.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData13.lean index 625f69df11..9680d7f891 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData13.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData13.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData13 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData13 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 104–111 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData14.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData14.lean index 6d6f0ea775..00d394fd9d 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData14.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData14.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData14 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData14 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 112–119 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData15.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData15.lean index 788ab02b10..92f452b631 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData15.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData15.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData15 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData15 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 120–127 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData16.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData16.lean index 0fbab10f80..9959bf24e0 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData16.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData16.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData16 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData16 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 128–135 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData17.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData17.lean index bf84cc60e7..4f9a99a407 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData17.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData17.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData17 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData17 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 136–143 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData18.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData18.lean index 7bf2473d78..bfc49874b2 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData18.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData18.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData18 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData18 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 144–151 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData19.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData19.lean index 9c3a23b015..e5e3d677e0 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData19.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData19.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData19 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData19 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 152–159 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData20.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData20.lean index fc0216ad11..719333d504 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData20.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData20.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData20 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData20 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 160–167 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData21.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData21.lean index b177daa147..fece963253 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData21.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData21.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData21 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData21 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 168–175 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData22.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData22.lean index a6bc2fd6ae..c366054d19 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData22.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData22.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData22 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData22 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 176–183 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData23.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData23.lean index 4fac03c3d7..028058e131 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData23.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData23.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData23 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData23 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 184–191 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData24.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData24.lean index 50276ebd5f..74828de8fe 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData24.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData24.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData24 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData24 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 192–199 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData25.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData25.lean index fc402e46ea..64e93b75bf 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData25.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData25.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData25 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData25 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 200–207 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData26.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData26.lean index 162dc957f9..624e4eacfc 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData26.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData26.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData26 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData26 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 208–215 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData27.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData27.lean index fc78ac24df..53bf0bcbf0 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData27.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData27.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData27 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData27 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 216–223 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData28.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData28.lean index 2d52f16024..8b39d6824a 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData28.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData28.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData28 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData28 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 224–231 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData29.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData29.lean index 94434411b4..1f2e904384 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData29.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData29.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData29 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData29 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 232–239 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData30.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData30.lean index e73b0d26f5..4e5a13bc12 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData30.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData30.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData30 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData30 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 240–247 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData31.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData31.lean index 410e4e33eb..b725dc49f3 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData31.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryData31.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageData31 -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageData31 +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryDataTypes /-! # Lightweight coverage summaries, buckets 248–255 -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Lightweight monotone-obstruction summaries for this hash-bucket group. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryDataTypes.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryDataTypes.lean index 5419b7b42e..96249a7c7b 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryDataTypes.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryDataTypes.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageDataTypes +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryTypes /-! # Lightweight coverage-summary data validation -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Check a pattern summary against one eight-bucket data shard. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryTypes.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryTypes.lean index 6c3b44d14f..c1927b8e5e 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryTypes.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryTypes.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.FiniteModel +public import LeanPool.Erdos97ConvexOctagon.FiniteModel +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Lightweight coverage-summary types -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- A lightweight reference to a monotone obstruction. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryValidity.lean b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryValidity.lean index 98533d5d5d..b92ab82d6a 100644 --- a/LeanPool/Erdos97ConvexOctagon/CoverageSummaryValidity.lean +++ b/LeanPool/Erdos97ConvexOctagon/CoverageSummaryValidity.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData +public import LeanPool.Erdos97ConvexOctagon.CoverageSummaryData /-! # Soundness of lightweight coverage-summary audits -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- A pattern summary denotes a checked obstruction with the advertised fields. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/CycleStrip.lean b/LeanPool/Erdos97ConvexOctagon/CycleStrip.lean index ae50c2463f..744fd3994e 100644 --- a/LeanPool/Erdos97ConvexOctagon/CycleStrip.lean +++ b/LeanPool/Erdos97ConvexOctagon/CycleStrip.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.Basic import LeanPool.Erdos97ConvexOctagon.Gram /-! # Erdős 97 convex-octagon formalization: Cycle Strip -/ +@[expose] public section + namespace Erdos97Octagon open scoped InnerProductSpace diff --git a/LeanPool/Erdos97ConvexOctagon/EquidistantFour.lean b/LeanPool/Erdos97ConvexOctagon/EquidistantFour.lean index f267dc5a97..1216b11550 100644 --- a/LeanPool/Erdos97ConvexOctagon/EquidistantFour.lean +++ b/LeanPool/Erdos97ConvexOctagon/EquidistantFour.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.Basic +public import LeanPool.Erdos97ConvexOctagon.Basic /-! # Erdős 97 convex-octagon formalization: Equidistant Four -/ +@[expose] public section + namespace Erdos97Octagon open scoped InnerProductSpace diff --git a/LeanPool/Erdos97ConvexOctagon/FiniteModel.lean b/LeanPool/Erdos97ConvexOctagon/FiniteModel.lean index 6a43af9089..b4a61440a3 100644 --- a/LeanPool/Erdos97ConvexOctagon/FiniteModel.lean +++ b/LeanPool/Erdos97ConvexOctagon/FiniteModel.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.Relabelling -import Mathlib.Data.List.Sort +public import LeanPool.Erdos97ConvexOctagon.Incidence +public import Mathlib.Data.List.Sublists +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Erdős 97 convex-octagon formalization: Finite Model -/ +@[expose] public section + namespace Erdos97Octagon /-- An unbundled eight-row incidence table used by the finite certificate. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/GeometryReduction.lean b/LeanPool/Erdos97ConvexOctagon/GeometryReduction.lean index 8590d61cb2..0a051387b7 100644 --- a/LeanPool/Erdos97ConvexOctagon/GeometryReduction.lean +++ b/LeanPool/Erdos97ConvexOctagon/GeometryReduction.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.Basic -import LeanPool.Erdos97ConvexOctagon.Incidence -import Mathlib.Analysis.Convex.Between -import Mathlib.Analysis.Convex.Independent +public import LeanPool.Erdos97ConvexOctagon.Basic +public import LeanPool.Erdos97ConvexOctagon.Incidence +public import Mathlib.Analysis.Convex.Independent +public import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional import Mathlib.Geometry.Euclidean.PerpBisector /-! # Erdős 97 convex-octagon formalization: Geometry Reduction -/ +@[expose] public section + namespace Erdos97Octagon open scoped RealInnerProductSpace diff --git a/LeanPool/Erdos97ConvexOctagon/Gram.lean b/LeanPool/Erdos97ConvexOctagon/Gram.lean index 3cd2d14a13..1516d600d2 100644 --- a/LeanPool/Erdos97ConvexOctagon/Gram.lean +++ b/LeanPool/Erdos97ConvexOctagon/Gram.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.Basic -import Mathlib.LinearAlgebra.Matrix.Determinant.Basic -import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv +public import LeanPool.Erdos97ConvexOctagon.Basic /-! # Erdős 97 convex-octagon formalization: Gram -/ +@[expose] public section + namespace Erdos97Octagon open scoped InnerProductSpace diff --git a/LeanPool/Erdos97ConvexOctagon/Incidence.lean b/LeanPool/Erdos97ConvexOctagon/Incidence.lean index 95ad24445f..c598ca2bbd 100644 --- a/LeanPool/Erdos97ConvexOctagon/Incidence.lean +++ b/LeanPool/Erdos97ConvexOctagon/Incidence.lean @@ -3,16 +3,23 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import Mathlib.Data.Finset.Card +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Fintype.Basic import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.Algebra.BigOperators.Group.Finset.Sigma import Mathlib.Algebra.Order.BigOperators.Group.Finset -import Mathlib.Data.Finset.Card -import Mathlib.Tactic.NormNum -import Lean.Elab.Tactic.Omega +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Erdős 97 convex-octagon formalization: Incidence -/ +@[expose] public section + namespace Erdos97Octagon open scoped BigOperators diff --git a/LeanPool/Erdos97ConvexOctagon/Main.lean b/LeanPool/Erdos97ConvexOctagon/Main.lean index 16dc379117..233e676b0e 100644 --- a/LeanPool/Erdos97ConvexOctagon/Main.lean +++ b/LeanPool/Erdos97ConvexOctagon/Main.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.Classification +public import LeanPool.Erdos97ConvexOctagon.Classification + +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # The convex-octagon case of Erdős problem 97 @@ -21,3 +27,5 @@ remaining legal rows and checked geometric obstruction witnesses. This is the eight-point convex case only. It does not prove the general open problem. -/ + +@[expose] public section diff --git a/LeanPool/Erdos97ConvexOctagon/Obstructions.lean b/LeanPool/Erdos97ConvexOctagon/Obstructions.lean index 9abf411f4b..c4fc4fc73f 100644 --- a/LeanPool/Erdos97ConvexOctagon/Obstructions.lean +++ b/LeanPool/Erdos97ConvexOctagon/Obstructions.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CycleStrip import LeanPool.Erdos97ConvexOctagon.EquidistantFour import LeanPool.Erdos97ConvexOctagon.Pentagon -import LeanPool.Erdos97ConvexOctagon.Radius +import Mathlib.Geometry.Euclidean.PerpBisector /-! # Erdős 97 convex-octagon formalization: Obstructions -/ +@[expose] public section + namespace Erdos97Octagon open scoped InnerProductSpace RealInnerProductSpace diff --git a/LeanPool/Erdos97ConvexOctagon/PackedCertificates.lean b/LeanPool/Erdos97ConvexOctagon/PackedCertificates.lean index ced18953d1..f08be4c0e3 100644 --- a/LeanPool/Erdos97ConvexOctagon/PackedCertificates.lean +++ b/LeanPool/Erdos97ConvexOctagon/PackedCertificates.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.Certificates +public import LeanPool.Erdos97ConvexOctagon.Certificates /-! # Fast validation of certificates against packed incidence tables -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Validate the tail of a mutual-edge tree directly against a packed table. -/ @@ -28,12 +31,14 @@ def packedComponentTreeB | first :: remaining => decide (first = root) && packedExtendsTreeB code {root} remaining -private def packedTreeLabelledEdgeB +/-- Test whether a packed code selects an edge incident to the given component. -/ +def packedTreeLabelledEdgeB (code : UInt64) (component : List Vertex) (a b : Vertex) : Bool := (decide (a ∈ component) && packedSelectsB code a b) || (decide (b ∈ component) && packedSelectsB code b a) -private def packedResidualValidB (code payload : UInt64) : Bool := +/-- Check the residual certificate encoded by a packed code and payload. -/ +def packedResidualValidB (code payload : UInt64) : Bool := let classIndex := payloadClass payload let forward := decodeMap (payloadForwardCode payload) let inverse := decodeMap (payloadInverseCode payload) diff --git a/LeanPool/Erdos97ConvexOctagon/PairCompatibility.lean b/LeanPool/Erdos97ConvexOctagon/PairCompatibility.lean index 0c4a2d07d2..53578aaf7b 100644 --- a/LeanPool/Erdos97ConvexOctagon/PairCompatibility.lean +++ b/LeanPool/Erdos97ConvexOctagon/PairCompatibility.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.FiniteModel +public import LeanPool.Erdos97ConvexOctagon.FiniteModel +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Pair-sparsity guard for direct incidence-table search -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- Number of processed row masks containing both vertices. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/PairStateExactness.lean b/LeanPool/Erdos97ConvexOctagon/PairStateExactness.lean index d221c39e53..5823b6c057 100644 --- a/LeanPool/Erdos97ConvexOctagon/PairStateExactness.lean +++ b/LeanPool/Erdos97ConvexOctagon/PairStateExactness.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.CoverageSearchCore -import LeanPool.Erdos97ConvexOctagon.PairCompatibility +public import LeanPool.Erdos97ConvexOctagon.CoverageSearchCore +public import LeanPool.Erdos97ConvexOctagon.PairCompatibility +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Exactness of packed pair-occurrence states -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence.StaticDirectCoverage private theorem bitSetB_eq_getLsbD (code : UInt64) (index : Fin 64) : diff --git a/LeanPool/Erdos97ConvexOctagon/Pentagon.lean b/LeanPool/Erdos97ConvexOctagon/Pentagon.lean index d260c284f7..e3baae7582 100644 --- a/LeanPool/Erdos97ConvexOctagon/Pentagon.lean +++ b/LeanPool/Erdos97ConvexOctagon/Pentagon.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.Basic import LeanPool.Erdos97ConvexOctagon.Gram /-! # Erdős 97 convex-octagon formalization: Pentagon -/ +@[expose] public section + namespace Erdos97Octagon open scoped InnerProductSpace diff --git a/LeanPool/Erdos97ConvexOctagon/Radius.lean b/LeanPool/Erdos97ConvexOctagon/Radius.lean index 4cfe800944..d8190623c8 100644 --- a/LeanPool/Erdos97ConvexOctagon/Radius.lean +++ b/LeanPool/Erdos97ConvexOctagon/Radius.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.GeometryReduction +public import LeanPool.Erdos97ConvexOctagon.GeometryReduction /-! # Erdős 97 convex-octagon formalization: Radius -/ +@[expose] public section + namespace Erdos97Octagon namespace OctagonIncidence diff --git a/LeanPool/Erdos97ConvexOctagon/Relabelling.lean b/LeanPool/Erdos97ConvexOctagon/Relabelling.lean index caae827277..1b20280872 100644 --- a/LeanPool/Erdos97ConvexOctagon/Relabelling.lean +++ b/LeanPool/Erdos97ConvexOctagon/Relabelling.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.GeometryReduction -import Mathlib.Logic.Equiv.Fintype +public import LeanPool.Erdos97ConvexOctagon.GeometryReduction /-! # Erdős 97 convex-octagon formalization: Relabelling -/ +@[expose] public section + namespace Erdos97Octagon /-- The canonical first witness row used by the finite classification. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra00.lean b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra00.lean index 5d3bb112ec..eae8b21046 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra00.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra00.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CayleyMenger -import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives /-! # Erdős 97 convex-octagon formalization: Residual Algebra00 -/ +@[expose] public section + namespace Erdos97Octagon /-- Residual class 0 has no injective planar realisation. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra01.lean b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra01.lean index c9a8134847..48611ab53e 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra01.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra01.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CayleyMenger -import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives /-! # Erdős 97 convex-octagon formalization: Residual Algebra01 -/ +@[expose] public section + namespace Erdos97Octagon /-- Residual class 1 has no injective planar realisation. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra02.lean b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra02.lean index 79826f8e0c..11a76bb0ce 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra02.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra02.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CayleyMenger -import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives /-! # Erdős 97 convex-octagon formalization: Residual Algebra02 -/ +@[expose] public section + namespace Erdos97Octagon /-- Residual class 2 has no injective planar realisation. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra03.lean b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra03.lean index 0c209d0edd..99ac6842ed 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra03.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra03.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CayleyMenger -import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives /-! # Erdős 97 convex-octagon formalization: Residual Algebra03 -/ +@[expose] public section + namespace Erdos97Octagon /-- Residual class 3 has no injective planar realisation. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra04.lean b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra04.lean index bf6b49d8e2..f6e14be70b 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra04.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra04.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CayleyMenger -import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives /-! # Erdős 97 convex-octagon formalization: Residual Algebra04 -/ +@[expose] public section + namespace Erdos97Octagon /-- Residual class 4 has no injective planar realisation. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra05.lean b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra05.lean index 2caec51bd3..f060de04c5 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra05.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra05.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CayleyMenger -import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives /-! # Erdős 97 convex-octagon formalization: Residual Algebra05 -/ +@[expose] public section + namespace Erdos97Octagon /-- Residual class 5 has no injective planar realisation. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra06.lean b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra06.lean index 0bc2645ecc..d80fbf45d9 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra06.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra06.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CayleyMenger -import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives /-! # Erdős 97 convex-octagon formalization: Residual Algebra06 -/ +@[expose] public section + namespace Erdos97Octagon /-- Residual class 6 has no injective planar realisation. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra07.lean b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra07.lean index 3a15e839d6..7aee7d01b9 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra07.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra07.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CayleyMenger -import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives /-! # Erdős 97 convex-octagon formalization: Residual Algebra07 -/ +@[expose] public section + namespace Erdos97Octagon /-- Residual class 7 has no injective planar realisation. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra08.lean b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra08.lean index df48db21f7..e79b98d3f4 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra08.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra08.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CayleyMenger -import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives /-! # Erdős 97 convex-octagon formalization: Residual Algebra08 -/ +@[expose] public section + namespace Erdos97Octagon /-- Residual class 8 has no injective planar realisation. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra09.lean b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra09.lean index 067a90503f..bb73051b63 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra09.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra09.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CayleyMenger -import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives /-! # Erdős 97 convex-octagon formalization: Residual Algebra09 -/ +@[expose] public section + namespace Erdos97Octagon /-- Residual class 9 has no injective planar realisation. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra10.lean b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra10.lean index a3c1d356e7..db7aa37e26 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra10.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra10.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CayleyMenger -import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives /-! # Erdős 97 convex-octagon formalization: Residual Algebra10 -/ +@[expose] public section + namespace Erdos97Octagon /-- Residual class 10 has no injective planar realisation. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra11.lean b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra11.lean index f49ac0fece..1ca1dc8b20 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra11.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra11.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CayleyMenger -import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives -import Mathlib.Analysis.Convex.Combination /-! # The final residual incidence class @@ -15,6 +16,8 @@ parameter. Each of its two possible ranges puts a labelled vertex in the convex hull of four other vertices. -/ +@[expose] public section + namespace Erdos97Octagon open scoped InnerProductSpace diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra12.lean b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra12.lean index 7bc318962d..8df5cc24d2 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra12.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualAlgebra12.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives +public import LeanPool.Erdos97ConvexOctagon.Radius import LeanPool.Erdos97ConvexOctagon.CayleyMenger -import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives /-! # Erdős 97 convex-octagon formalization: Residual Algebra12 -/ +@[expose] public section + namespace Erdos97Octagon /-- Residual class 12 has no injective planar realisation. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualObstructions.lean b/LeanPool/Erdos97ConvexOctagon/ResidualObstructions.lean index 8f2ec5df96..1d9b5f1a17 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualObstructions.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualObstructions.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.Erdos97ConvexOctagon.GeometryReduction +public import LeanPool.Erdos97ConvexOctagon.ResidualRepresentatives import LeanPool.Erdos97ConvexOctagon.ResidualAlgebra00 import LeanPool.Erdos97ConvexOctagon.ResidualAlgebra01 import LeanPool.Erdos97ConvexOctagon.ResidualAlgebra02 @@ -20,6 +23,8 @@ import LeanPool.Erdos97ConvexOctagon.ResidualAlgebra12 /-! # Erdős 97 convex-octagon formalization: Residual Obstructions -/ +@[expose] public section + namespace Erdos97Octagon /-- None of the thirteen explicit candidate systems has a convex-independent diff --git a/LeanPool/Erdos97ConvexOctagon/ResidualRepresentatives.lean b/LeanPool/Erdos97ConvexOctagon/ResidualRepresentatives.lean index 39f9a36720..209bc16bf4 100644 --- a/LeanPool/Erdos97ConvexOctagon/ResidualRepresentatives.lean +++ b/LeanPool/Erdos97ConvexOctagon/ResidualRepresentatives.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.Radius +public import LeanPool.Erdos97ConvexOctagon.Incidence +public import Mathlib.Data.Fin.VecNotation +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Thirteen explicit candidate incidence representatives @@ -13,6 +19,8 @@ module defines the systems exactly but makes no claim that they exhaust all normalized, balanced, pair-sparse incidence systems. -/ +@[expose] public section + namespace Erdos97Octagon /-- The exact residual incidence representative of class 0. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/RowMasks.lean b/LeanPool/Erdos97ConvexOctagon/RowMasks.lean index a98b0965d5..60a48a104c 100644 --- a/LeanPool/Erdos97ConvexOctagon/RowMasks.lean +++ b/LeanPool/Erdos97ConvexOctagon/RowMasks.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.FiniteModel +public import LeanPool.Erdos97ConvexOctagon.Incidence +public import Mathlib.Data.Fin.VecNotation +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Explicit row masks for the finite incidence-table search -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence /-- The seven canonical first-row masks, in certificate order. -/ diff --git a/LeanPool/Erdos97ConvexOctagon/RowSymmetry.lean b/LeanPool/Erdos97ConvexOctagon/RowSymmetry.lean index c260efe8f9..3c7c9de00f 100644 --- a/LeanPool/Erdos97ConvexOctagon/RowSymmetry.lean +++ b/LeanPool/Erdos97ConvexOctagon/RowSymmetry.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.Erdos97ConvexOctagon.RowMasks -import Mathlib.Tactic.FinCases +public import LeanPool.Erdos97ConvexOctagon.RowMasks +public import LeanPool.Erdos97ConvexOctagon.FiniteModel +public import LeanPool.Erdos97ConvexOctagon.Relabelling /-! # First-row symmetry reduction @@ -16,6 +18,8 @@ to seven canonical orbits. The small table below records an explicit forward and inverse permutation for every row. -/ +@[expose] public section + namespace Erdos97Octagon.RawIncidence private theorem rowOneOptions_eq : diff --git a/LeanPool/ErdosMoser.lean b/LeanPool/ErdosMoser.lean index 5a9598feaa..2edaacdeff 100644 --- a/LeanPool/ErdosMoser.lean +++ b/LeanPool/ErdosMoser.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.ErdosMoser.Bounds +public import LeanPool.ErdosMoser.Bounds +import Mathlib.Tactic.Positivity.Finset /-! # Leo Moser's finite distinct-subset-sums inequality @@ -17,6 +19,8 @@ Tags: additive-combinatorics, number-theory, distinct-subset-sums, erdos-problem MSC: 11B13, 11B75 -/ +@[expose] public section + /-! Guy's 1982 account states the exact finite sum-of-squares inequality as Theorem 2 and attributes it to Leo Moser. This project formalizes that diff --git a/LeanPool/ErdosMoser/Basic.lean b/LeanPool/ErdosMoser/Basic.lean index 384844863f..48d896210c 100644 --- a/LeanPool/ErdosMoser/Basic.lean +++ b/LeanPool/ErdosMoser/Basic.lean @@ -3,17 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Algebra.BigOperators.Group.Finset.Powerset -import Mathlib.Algebra.BigOperators.Intervals -import Mathlib.Algebra.BigOperators.Ring.Finset +public import Mathlib.Data.Finset.Max +public import Mathlib.Data.Finset.Powerset +public import Mathlib.Basic.Real.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import Mathlib.Algebra.Order.BigOperators.Group.Finset -import Mathlib.Data.Finset.Card -import Mathlib.Data.Finset.Max -import Mathlib.Data.Finset.Powerset -import Mathlib.Basic.Real.Basic -import Mathlib.Tactic.NormNum +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Distinct subset sums @@ -23,6 +24,8 @@ establishes the elementary upper bound on their sum of squares in terms of their largest element. -/ +@[expose] public section + namespace LeanPool.ErdosMoser open Finset diff --git a/LeanPool/ErdosMoser/Bounds.lean b/LeanPool/ErdosMoser/Bounds.lean index 6df16c9d4d..361e16341f 100644 --- a/LeanPool/ErdosMoser/Bounds.lean +++ b/LeanPool/ErdosMoser/Bounds.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import Mathlib.Analysis.Real.Sqrt +public import LeanPool.ErdosMoser.Basic import LeanPool.ErdosMoser.SubsetSums -import Mathlib.Analysis.Real.Sqrt -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity.Finset /-! # Finite lower bounds for the largest element @@ -16,6 +17,8 @@ This file derives direct and square-root forms of the largest-element bound from Leo Moser's exact sum-of-squares inequality. -/ +@[expose] public section + namespace LeanPool.ErdosMoser open Finset diff --git a/LeanPool/ErdosMoser/DiscreteVariance.lean b/LeanPool/ErdosMoser/DiscreteVariance.lean index e116790aee..dd92566221 100644 --- a/LeanPool/ErdosMoser/DiscreteVariance.lean +++ b/LeanPool/ErdosMoser/DiscreteVariance.lean @@ -3,12 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.ErdosMoser.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Finset.Card +public import Mathlib.Basic.Real.Basic +public import Mathlib.Order.Fin.Basic +import Mathlib.Algebra.BigOperators.Intervals +import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Finset.Sort -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # A sharp variance bound for distinct natural numbers @@ -19,6 +29,8 @@ compares all pairwise differences with those of an initial interval, and evaluates the resulting quadratic sum. -/ +@[expose] public section + namespace LeanPool.ErdosMoser open Finset diff --git a/LeanPool/ErdosMoser/SubsetSums.lean b/LeanPool/ErdosMoser/SubsetSums.lean index 04f63e6dd6..5c139fb96f 100644 --- a/LeanPool/ErdosMoser/SubsetSums.lean +++ b/LeanPool/ErdosMoser/SubsetSums.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.ErdosMoser.Basic import LeanPool.ErdosMoser.DiscreteVariance -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring +import Mathlib.Algebra.BigOperators.Group.Finset.Powerset +import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # Variance of distinct subset sums @@ -19,6 +25,8 @@ combines them with the discrete variance bound to obtain Leo Moser's exact finite sum-of-squares inequality. -/ +@[expose] public section + namespace LeanPool.ErdosMoser open Finset diff --git a/LeanPool/ErdosTuzaValtr.lean b/LeanPool/ErdosTuzaValtr.lean index 159086d0ae..e3639a8734 100644 --- a/LeanPool/ErdosTuzaValtr.lean +++ b/LeanPool/ErdosTuzaValtr.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import LeanPool.ErdosTuzaValtr.All +public import LeanPool.ErdosTuzaValtr.Main.Main + +public import LeanPool.ErdosTuzaValtr.All +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # The Erdős–Tuza–Valtr conjecture @@ -17,6 +26,8 @@ Tags: combinatorics, discrete-geometry, convex-geometry, ramsey-theory MSC: 52C10, 05D10 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/ErdosTuzaValtr/All.lean b/LeanPool/ErdosTuzaValtr/All.lean index 0f1194991c..3ae624d48d 100644 --- a/LeanPool/ErdosTuzaValtr/All.lean +++ b/LeanPool/ErdosTuzaValtr/All.lean @@ -3,33 +3,43 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import LeanPool.ErdosTuzaValtr.Config.Lemmas -import LeanPool.ErdosTuzaValtr.Config.Mirror -import LeanPool.ErdosTuzaValtr.Config.Default -import LeanPool.ErdosTuzaValtr.Config.Defs -import LeanPool.ErdosTuzaValtr.Etv.Mirror -import LeanPool.ErdosTuzaValtr.Etv.Label -import LeanPool.ErdosTuzaValtr.Etv.Default -import LeanPool.ErdosTuzaValtr.Etv.AlphaBeta -import LeanPool.ErdosTuzaValtr.Etv.Defs -import LeanPool.ErdosTuzaValtr.Main.CapCup -import LeanPool.ErdosTuzaValtr.Main.Defs -import LeanPool.ErdosTuzaValtr.Main.InductionStep -import LeanPool.ErdosTuzaValtr.Main.Main -import LeanPool.ErdosTuzaValtr.Main.Lemmas.InterweavedLacedNgon -import LeanPool.ErdosTuzaValtr.Main.Lemmas.Default -import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N2 -import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3N2 -import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3JoinN3N2 -import LeanPool.ErdosTuzaValtr.Lib.Core.Rel3 -import LeanPool.ErdosTuzaValtr.Lib.List.Chain3 -import LeanPool.ErdosTuzaValtr.Lib.List.Lemmas -import LeanPool.ErdosTuzaValtr.Lib.List.Default -import LeanPool.ErdosTuzaValtr.Lib.List.Defs +public import LeanPool.ErdosTuzaValtr.Config.Lemmas +public import LeanPool.ErdosTuzaValtr.Config.Mirror +public import LeanPool.ErdosTuzaValtr.Config.Default +public import LeanPool.ErdosTuzaValtr.Config.Defs +public import LeanPool.ErdosTuzaValtr.Etv.Mirror +public import LeanPool.ErdosTuzaValtr.Etv.Label +public import LeanPool.ErdosTuzaValtr.Etv.Default +public import LeanPool.ErdosTuzaValtr.Etv.AlphaBeta +public import LeanPool.ErdosTuzaValtr.Etv.Defs +public import LeanPool.ErdosTuzaValtr.Main.CapCup +public import LeanPool.ErdosTuzaValtr.Main.Defs +public import LeanPool.ErdosTuzaValtr.Main.InductionStep +public import LeanPool.ErdosTuzaValtr.Main.Main +public import LeanPool.ErdosTuzaValtr.Main.Lemmas.InterweavedLacedNgon +public import LeanPool.ErdosTuzaValtr.Main.Lemmas.Default +public import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N2 +public import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3N2 +public import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3JoinN3N2 +public import LeanPool.ErdosTuzaValtr.Lib.Core.Rel3 +public import LeanPool.ErdosTuzaValtr.Lib.List.Chain3 +public import LeanPool.ErdosTuzaValtr.Lib.List.Lemmas +public import LeanPool.ErdosTuzaValtr.Lib.List.Default +public import LeanPool.ErdosTuzaValtr.Lib.List.Defs + +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.All Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.All`. -/ + +@[expose] public section diff --git a/LeanPool/ErdosTuzaValtr/Config/Default.lean b/LeanPool/ErdosTuzaValtr/Config/Default.lean index 076ad7fdf5..3b2dc8d3b7 100644 --- a/LeanPool/ErdosTuzaValtr/Config/Default.lean +++ b/LeanPool/ErdosTuzaValtr/Config/Default.lean @@ -3,13 +3,23 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import LeanPool.ErdosTuzaValtr.Config.Defs -import LeanPool.ErdosTuzaValtr.Config.Lemmas -import LeanPool.ErdosTuzaValtr.Config.Mirror +public import LeanPool.ErdosTuzaValtr.Config.Defs +public import LeanPool.ErdosTuzaValtr.Config.Lemmas +public import LeanPool.ErdosTuzaValtr.Config.Mirror + +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Config.Default Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Config.Default`. -/ + +@[expose] public section diff --git a/LeanPool/ErdosTuzaValtr/Config/Defs.lean b/LeanPool/ErdosTuzaValtr/Config/Defs.lean index 3f5a4a7785..efe5c6cb04 100644 --- a/LeanPool/ErdosTuzaValtr/Config/Defs.lean +++ b/LeanPool/ErdosTuzaValtr/Config/Defs.lean @@ -3,11 +3,9 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Data.List.Basic -import Mathlib.Data.Finset.Basic -import LeanPool.ErdosTuzaValtr.Lib.List.Default -import LeanPool.ErdosTuzaValtr.Lib.Core.Rel3 +public import LeanPool.ErdosTuzaValtr.Lib.List.Defs /-! # LeanPool.ErdosTuzaValtr.Config.Defs @@ -15,6 +13,8 @@ import LeanPool.ErdosTuzaValtr.Lib.Core.Rel3 Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Config.Defs`. -/ +@[expose] public section + /-- A configuration: a decidable ternary "cup" relation on a linearly ordered type. -/ structure Config (α : Type _) [LinearOrder α] where diff --git a/LeanPool/ErdosTuzaValtr/Config/Lemmas.lean b/LeanPool/ErdosTuzaValtr/Config/Lemmas.lean index 78de66ca58..5ad62f391a 100644 --- a/LeanPool/ErdosTuzaValtr/Config/Lemmas.lean +++ b/LeanPool/ErdosTuzaValtr/Config/Lemmas.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ - -import Mathlib.Algebra.Algebra.Defs -import Mathlib.Data.List.Sort -import Mathlib.Tactic.Linarith -import LeanPool.ErdosTuzaValtr.Config.Defs +module + +public import LeanPool.ErdosTuzaValtr.Config.Defs +import LeanPool.ErdosTuzaValtr.Lib.List.Chain3 +import LeanPool.ErdosTuzaValtr.Lib.List.Lemmas +import Mathlib.Data.List.Chain +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Config.Lemmas @@ -15,6 +21,8 @@ import LeanPool.ErdosTuzaValtr.Config.Defs Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Config.Lemmas`. -/ +@[expose] public section + variable {α : Type _} [LinearOrder α] {C : Config α} diff --git a/LeanPool/ErdosTuzaValtr/Config/Mirror.lean b/LeanPool/ErdosTuzaValtr/Config/Mirror.lean index 5c325e679c..05e4658ddd 100644 --- a/LeanPool/ErdosTuzaValtr/Config/Mirror.lean +++ b/LeanPool/ErdosTuzaValtr/Config/Mirror.lean @@ -5,9 +5,11 @@ Authors: Jineon Baek -/ -- Mirror configuration -import LeanPool.ErdosTuzaValtr.Lib.Core.Rel3 -import LeanPool.ErdosTuzaValtr.Lib.List.Default -import LeanPool.ErdosTuzaValtr.Config.Defs +module + +public import LeanPool.ErdosTuzaValtr.Config.Defs +import LeanPool.ErdosTuzaValtr.Lib.List.Chain3 +import LeanPool.ErdosTuzaValtr.Lib.List.Lemmas /-! # LeanPool.ErdosTuzaValtr.Config.Mirror @@ -15,6 +17,8 @@ import LeanPool.ErdosTuzaValtr.Config.Defs Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Config.Mirror`. -/ +@[expose] public section + variable {α : Type _} [LinearOrder α] (C : Config α) open OrderDual diff --git a/LeanPool/ErdosTuzaValtr/Etv/AlphaBeta.lean b/LeanPool/ErdosTuzaValtr/Etv/AlphaBeta.lean index c00886a451..fbba4ddbac 100644 --- a/LeanPool/ErdosTuzaValtr/Etv/AlphaBeta.lean +++ b/LeanPool/ErdosTuzaValtr/Etv/AlphaBeta.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Data.Finset.Sort -import Mathlib.Data.List.MinMax -import Mathlib.Data.List.Sublists +public import Mathlib.Data.Finset.Sort +public import Mathlib.Data.List.MinMax +public import Mathlib.Data.List.Sublists +public import LeanPool.ErdosTuzaValtr.Etv.Label import Mathlib.Data.List.Chain -import LeanPool.ErdosTuzaValtr.Etv.Defs -import LeanPool.ErdosTuzaValtr.Etv.Label +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Etv.AlphaBeta @@ -17,6 +22,8 @@ import LeanPool.ErdosTuzaValtr.Etv.Label Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Etv.AlphaBeta`. -/ +@[expose] public section + noncomputable section variable {α : Type _} [LinearOrder α] {C : Config α} {S : Finset α} (l : C.Label S) diff --git a/LeanPool/ErdosTuzaValtr/Etv/Default.lean b/LeanPool/ErdosTuzaValtr/Etv/Default.lean index f5006ef5ce..84382543ad 100644 --- a/LeanPool/ErdosTuzaValtr/Etv/Default.lean +++ b/LeanPool/ErdosTuzaValtr/Etv/Default.lean @@ -3,14 +3,24 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import LeanPool.ErdosTuzaValtr.Etv.Defs -import LeanPool.ErdosTuzaValtr.Etv.Label -import LeanPool.ErdosTuzaValtr.Etv.Mirror -import LeanPool.ErdosTuzaValtr.Etv.AlphaBeta +public import LeanPool.ErdosTuzaValtr.Etv.Defs +public import LeanPool.ErdosTuzaValtr.Etv.Label +public import LeanPool.ErdosTuzaValtr.Etv.Mirror +public import LeanPool.ErdosTuzaValtr.Etv.AlphaBeta + +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Etv.Default Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Etv.Default`. -/ + +@[expose] public section diff --git a/LeanPool/ErdosTuzaValtr/Etv/Defs.lean b/LeanPool/ErdosTuzaValtr/Etv/Defs.lean index f06f7eca92..4ea69b1f18 100644 --- a/LeanPool/ErdosTuzaValtr/Etv/Defs.lean +++ b/LeanPool/ErdosTuzaValtr/Etv/Defs.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import LeanPool.ErdosTuzaValtr.Config.Default +public import LeanPool.ErdosTuzaValtr.Config.Defs +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Etv.Defs @@ -12,6 +18,8 @@ import LeanPool.ErdosTuzaValtr.Config.Default Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Etv.Defs`. -/ +@[expose] public section + variable {α : Type _} [LinearOrder α] (C : Config α) namespace Config diff --git a/LeanPool/ErdosTuzaValtr/Etv/Label.lean b/LeanPool/ErdosTuzaValtr/Etv/Label.lean index 64c32c3f65..244a116932 100644 --- a/LeanPool/ErdosTuzaValtr/Etv/Label.lean +++ b/LeanPool/ErdosTuzaValtr/Etv/Label.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Data.Finset.Basic -import LeanPool.ErdosTuzaValtr.Lib.Core.Rel3 -import LeanPool.ErdosTuzaValtr.Config.Default +public import Mathlib.Data.NNRat.Defs + +public import LeanPool.ErdosTuzaValtr.Config.Lemmas +public import LeanPool.ErdosTuzaValtr.Config.Mirror +public import LeanPool.ErdosTuzaValtr.Lib.List.Lemmas +public import Mathlib.Algebra.Group.Defs +import Mathlib.Data.List.Chain +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Etv.Label @@ -14,6 +24,8 @@ import LeanPool.ErdosTuzaValtr.Config.Default Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Etv.Label`. -/ +@[expose] public section + variable {α : Type _} [LinearOrder α] (C : Config α) /-- A labeling of the edges of `S` by a slope predicate compatible with the cup relation. -/ diff --git a/LeanPool/ErdosTuzaValtr/Etv/Mirror.lean b/LeanPool/ErdosTuzaValtr/Etv/Mirror.lean index d9e9f836a0..f6ab756a98 100644 --- a/LeanPool/ErdosTuzaValtr/Etv/Mirror.lean +++ b/LeanPool/ErdosTuzaValtr/Etv/Mirror.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import LeanPool.ErdosTuzaValtr.Config.Default -import LeanPool.ErdosTuzaValtr.Etv.Defs +public import LeanPool.ErdosTuzaValtr.Etv.Defs +public import LeanPool.ErdosTuzaValtr.Config.Mirror +import LeanPool.ErdosTuzaValtr.Lib.List.Lemmas +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Etv.Mirror @@ -13,6 +20,8 @@ import LeanPool.ErdosTuzaValtr.Etv.Defs Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Etv.Mirror`. -/ +@[expose] public section + open OrderDual variable {α : Type _} [LinearOrder α] {C : Config α} diff --git a/LeanPool/ErdosTuzaValtr/Lib/Core/Rel3.lean b/LeanPool/ErdosTuzaValtr/Lib/Core/Rel3.lean index a681bf506b..9bc0572d47 100644 --- a/LeanPool/ErdosTuzaValtr/Lib/Core/Rel3.lean +++ b/LeanPool/ErdosTuzaValtr/Lib/Core/Rel3.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Order.Basic -import Mathlib.Order.OrderDual +public import Mathlib.Order.OrderDual /-! # LeanPool.ErdosTuzaValtr.Lib.Core.Rel3 @@ -13,6 +13,8 @@ import Mathlib.Order.OrderDual Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Lib.Core.Rel3`. -/ +@[expose] public section + universe u v open OrderDual diff --git a/LeanPool/ErdosTuzaValtr/Lib/List/Chain3.lean b/LeanPool/ErdosTuzaValtr/Lib/List/Chain3.lean index 036ee18aaa..ad77ab1c61 100644 --- a/LeanPool/ErdosTuzaValtr/Lib/List/Chain3.lean +++ b/LeanPool/ErdosTuzaValtr/Lib/List/Chain3.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import LeanPool.ErdosTuzaValtr.Lib.List.Defs +public import LeanPool.ErdosTuzaValtr.Lib.List.Defs /-! # LeanPool.ErdosTuzaValtr.Lib.List.Chain3 @@ -12,6 +13,8 @@ import LeanPool.ErdosTuzaValtr.Lib.List.Defs Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Lib.List.Chain3`. -/ +@[expose] public section + variable {α : Type _} {R : α → α → α → Prop} namespace List diff --git a/LeanPool/ErdosTuzaValtr/Lib/List/Default.lean b/LeanPool/ErdosTuzaValtr/Lib/List/Default.lean index 344c4ae3c0..c2701e700c 100644 --- a/LeanPool/ErdosTuzaValtr/Lib/List/Default.lean +++ b/LeanPool/ErdosTuzaValtr/Lib/List/Default.lean @@ -3,13 +3,20 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import LeanPool.ErdosTuzaValtr.Lib.List.Defs -import LeanPool.ErdosTuzaValtr.Lib.List.Chain3 -import LeanPool.ErdosTuzaValtr.Lib.List.Lemmas +public import LeanPool.ErdosTuzaValtr.Lib.List.Defs +public import LeanPool.ErdosTuzaValtr.Lib.List.Chain3 +public import LeanPool.ErdosTuzaValtr.Lib.List.Lemmas + +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # LeanPool.ErdosTuzaValtr.Lib.List.Default Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Lib.List.Default`. -/ + +@[expose] public section diff --git a/LeanPool/ErdosTuzaValtr/Lib/List/Defs.lean b/LeanPool/ErdosTuzaValtr/Lib/List/Defs.lean index f4b950b550..71b770b2b5 100644 --- a/LeanPool/ErdosTuzaValtr/Lib/List/Defs.lean +++ b/LeanPool/ErdosTuzaValtr/Lib/List/Defs.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Data.Finset.Basic -import Mathlib.Data.Finset.Image -import Mathlib.Tactic.Cases -import LeanPool.ErdosTuzaValtr.Lib.Core.Rel3 +public import Mathlib.Data.Finset.Image +public import LeanPool.ErdosTuzaValtr.Lib.Core.Rel3 /-! # LeanPool.ErdosTuzaValtr.Lib.List.Defs @@ -15,6 +14,8 @@ import LeanPool.ErdosTuzaValtr.Lib.Core.Rel3 Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Lib.List.Defs`. -/ +@[expose] public section + variable {α : Type _} /-- Local notion for a list whose elements all lie in a finset. -/ diff --git a/LeanPool/ErdosTuzaValtr/Lib/List/Lemmas.lean b/LeanPool/ErdosTuzaValtr/Lib/List/Lemmas.lean index 472fe72c75..a453dc50a7 100644 --- a/LeanPool/ErdosTuzaValtr/Lib/List/Lemmas.lean +++ b/LeanPool/ErdosTuzaValtr/Lib/List/Lemmas.lean @@ -3,13 +3,11 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Data.List.Basic +public import Mathlib.Data.Finset.Card +public import LeanPool.ErdosTuzaValtr.Lib.List.Defs import Mathlib.Data.List.Chain -import Mathlib.Data.Finset.Basic -import Mathlib.Data.Finset.Card -import Mathlib.Order.Basic -import LeanPool.ErdosTuzaValtr.Lib.List.Defs /-! # LeanPool.ErdosTuzaValtr.Lib.List.Lemmas @@ -17,6 +15,8 @@ import LeanPool.ErdosTuzaValtr.Lib.List.Defs Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Lib.List.Lemmas`. -/ +@[expose] public section + variable {α : Type _} section ListIn diff --git a/LeanPool/ErdosTuzaValtr/Main/CapCup.lean b/LeanPool/ErdosTuzaValtr/Main/CapCup.lean index f7147232d5..39713e82d1 100644 --- a/LeanPool/ErdosTuzaValtr/Main/CapCup.lean +++ b/LeanPool/ErdosTuzaValtr/Main/CapCup.lean @@ -3,12 +3,20 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Data.Nat.Choose.Basic -import Mathlib.Data.Finset.Basic +public import Mathlib.Data.Nat.Choose.Basic +public import LeanPool.ErdosTuzaValtr.Config.Defs +public import Mathlib.Data.Finset.Card +import LeanPool.ErdosTuzaValtr.Config.Lemmas +import LeanPool.ErdosTuzaValtr.Lib.List.Lemmas +import Mathlib.Data.Finset.Sort +import Mathlib.Data.List.Chain +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific import Mathlib.Tactic.Ring.RingNF -import LeanPool.ErdosTuzaValtr.Config.Default -import LeanPool.ErdosTuzaValtr.Etv.Default /-! # LeanPool.ErdosTuzaValtr.Main.CapCup @@ -16,6 +24,8 @@ import LeanPool.ErdosTuzaValtr.Etv.Default Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Main.CapCup`. -/ +@[expose] public section + noncomputable section namespace Config diff --git a/LeanPool/ErdosTuzaValtr/Main/Defs.lean b/LeanPool/ErdosTuzaValtr/Main/Defs.lean index c9d7d2dc17..63ecc5d595 100644 --- a/LeanPool/ErdosTuzaValtr/Main/Defs.lean +++ b/LeanPool/ErdosTuzaValtr/Main/Defs.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Data.Nat.Choose.Basic -import Mathlib.Data.Finset.Basic -import LeanPool.ErdosTuzaValtr.Config.Default -import LeanPool.ErdosTuzaValtr.Etv.Default +public import Mathlib.Data.Nat.Choose.Basic +public import LeanPool.ErdosTuzaValtr.Etv.Defs +public import Mathlib.Data.Finset.Card +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Main.Defs @@ -15,6 +20,8 @@ import LeanPool.ErdosTuzaValtr.Etv.Default Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Main.Defs`. -/ +@[expose] public section + noncomputable section variable {α : Type _} [LinearOrder α] (C : Config α) diff --git a/LeanPool/ErdosTuzaValtr/Main/InductionStep.lean b/LeanPool/ErdosTuzaValtr/Main/InductionStep.lean index 30da6afaaf..75382e5db1 100644 --- a/LeanPool/ErdosTuzaValtr/Main/InductionStep.lean +++ b/LeanPool/ErdosTuzaValtr/Main/InductionStep.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Data.Nat.Choose.Basic -import Mathlib.Data.Finset.Basic -import LeanPool.ErdosTuzaValtr.Config.Default -import LeanPool.ErdosTuzaValtr.Etv.Default -import LeanPool.ErdosTuzaValtr.Main.Defs -import LeanPool.ErdosTuzaValtr.Main.Lemmas.Default +public import LeanPool.ErdosTuzaValtr.Main.Defs +public import LeanPool.ErdosTuzaValtr.Etv.AlphaBeta +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # LeanPool.ErdosTuzaValtr.Main.InductionStep @@ -17,6 +19,8 @@ import LeanPool.ErdosTuzaValtr.Main.Lemmas.Default Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Main.InductionStep`. -/ +@[expose] public section + noncomputable section variable {α : Type _} [LinearOrder α] (C : Config α) diff --git a/LeanPool/ErdosTuzaValtr/Main/Lemmas/Default.lean b/LeanPool/ErdosTuzaValtr/Main/Lemmas/Default.lean index d6393e6dea..20bc4c523f 100644 --- a/LeanPool/ErdosTuzaValtr/Main/Lemmas/Default.lean +++ b/LeanPool/ErdosTuzaValtr/Main/Lemmas/Default.lean @@ -3,14 +3,24 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N2 -import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3N2 -import LeanPool.ErdosTuzaValtr.Main.Lemmas.InterweavedLacedNgon -import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3JoinN3N2 +public import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N2 +public import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3N2 +public import LeanPool.ErdosTuzaValtr.Main.Lemmas.InterweavedLacedNgon +public import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3JoinN3N2 + +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Main.Lemmas.Default Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Main.Lemmas.Default`. -/ + +@[expose] public section diff --git a/LeanPool/ErdosTuzaValtr/Main/Lemmas/InterweavedLacedNgon.lean b/LeanPool/ErdosTuzaValtr/Main/Lemmas/InterweavedLacedNgon.lean index 078b4aea8c..d0afb7d862 100644 --- a/LeanPool/ErdosTuzaValtr/Main/Lemmas/InterweavedLacedNgon.lean +++ b/LeanPool/ErdosTuzaValtr/Main/Lemmas/InterweavedLacedNgon.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Order.Basic -import LeanPool.ErdosTuzaValtr.Lib.List.Default -import LeanPool.ErdosTuzaValtr.Etv.Default +public import LeanPool.ErdosTuzaValtr.Etv.Defs +public import LeanPool.ErdosTuzaValtr.Etv.Label +import LeanPool.ErdosTuzaValtr.Etv.Mirror +import LeanPool.ErdosTuzaValtr.Lib.List.Chain3 import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N2 +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Main.Lemmas.InterweavedLacedNgon @@ -15,6 +22,8 @@ import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N2 Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Main.Lemmas.InterweavedLacedNgon`. -/ +@[expose] public section + open OrderDual variable {α : Type _} [LinearOrder α] (C : Config α) diff --git a/LeanPool/ErdosTuzaValtr/Main/Lemmas/JoinN2N2.lean b/LeanPool/ErdosTuzaValtr/Main/Lemmas/JoinN2N2.lean index f591409d8a..aeaaadf551 100644 --- a/LeanPool/ErdosTuzaValtr/Main/Lemmas/JoinN2N2.lean +++ b/LeanPool/ErdosTuzaValtr/Main/Lemmas/JoinN2N2.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Order.Basic -import Mathlib.Tactic.Ring.RingNF -import LeanPool.ErdosTuzaValtr.Lib.List.Default -import LeanPool.ErdosTuzaValtr.Etv.Defs -import LeanPool.ErdosTuzaValtr.Etv.Label +public import LeanPool.ErdosTuzaValtr.Etv.Label +import LeanPool.ErdosTuzaValtr.Lib.List.Chain3 +import Mathlib.Data.List.Chain +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N2 @@ -16,6 +20,8 @@ import LeanPool.ErdosTuzaValtr.Etv.Label Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N2`. -/ +@[expose] public section + open OrderDual variable {α : Type _} [LinearOrder α] (C : Config α) diff --git a/LeanPool/ErdosTuzaValtr/Main/Lemmas/JoinN2N3JoinN3N2.lean b/LeanPool/ErdosTuzaValtr/Main/Lemmas/JoinN2N3JoinN3N2.lean index 90f16af290..136d37c055 100644 --- a/LeanPool/ErdosTuzaValtr/Main/Lemmas/JoinN2N3JoinN3N2.lean +++ b/LeanPool/ErdosTuzaValtr/Main/Lemmas/JoinN2N3JoinN3N2.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Order.Basic -import Mathlib.Tactic.Ring.RingNF -import LeanPool.ErdosTuzaValtr.Lib.List.Default -import LeanPool.ErdosTuzaValtr.Etv.Default +public import LeanPool.ErdosTuzaValtr.Etv.Defs import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3N2 +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3JoinN3N2 @@ -16,6 +19,8 @@ import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3N2 Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3JoinN3N2`. -/ +@[expose] public section + open OrderDual variable {α : Type _} [LinearOrder α] (C : Config α) diff --git a/LeanPool/ErdosTuzaValtr/Main/Lemmas/JoinN2N3N2.lean b/LeanPool/ErdosTuzaValtr/Main/Lemmas/JoinN2N3N2.lean index ade208c16e..d7ec81e4ad 100644 --- a/LeanPool/ErdosTuzaValtr/Main/Lemmas/JoinN2N3N2.lean +++ b/LeanPool/ErdosTuzaValtr/Main/Lemmas/JoinN2N3N2.lean @@ -3,10 +3,17 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Order.Basic -import LeanPool.ErdosTuzaValtr.Lib.List.Default -import LeanPool.ErdosTuzaValtr.Etv.Default +public import LeanPool.ErdosTuzaValtr.Etv.Defs +public import LeanPool.ErdosTuzaValtr.Etv.Label +import LeanPool.ErdosTuzaValtr.Etv.Mirror +import Mathlib.Data.List.Chain +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3N2 @@ -14,6 +21,8 @@ import LeanPool.ErdosTuzaValtr.Etv.Default Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3N2`. -/ +@[expose] public section + open OrderDual variable {α : Type _} [LinearOrder α] (C : Config α) diff --git a/LeanPool/ErdosTuzaValtr/Main/Main.lean b/LeanPool/ErdosTuzaValtr/Main/Main.lean index ed12f9fd01..b6af202140 100644 --- a/LeanPool/ErdosTuzaValtr/Main/Main.lean +++ b/LeanPool/ErdosTuzaValtr/Main/Main.lean @@ -3,14 +3,19 @@ Copyright (c) 2026 Jineon Baek. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jineon Baek -/ +module -import Mathlib.Data.Nat.Choose.Basic -import Mathlib.Data.Finset.Basic -import LeanPool.ErdosTuzaValtr.Config.Default -import LeanPool.ErdosTuzaValtr.Etv.Default -import LeanPool.ErdosTuzaValtr.Main.Defs -import LeanPool.ErdosTuzaValtr.Main.Lemmas.Default +public import LeanPool.ErdosTuzaValtr.Main.Defs +public import LeanPool.ErdosTuzaValtr.Config.Mirror +import LeanPool.ErdosTuzaValtr.Etv.Mirror import LeanPool.ErdosTuzaValtr.Main.InductionStep +import LeanPool.ErdosTuzaValtr.Main.Lemmas.InterweavedLacedNgon +import LeanPool.ErdosTuzaValtr.Main.Lemmas.JoinN2N3JoinN3N2 +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ErdosTuzaValtr.Main.Main @@ -18,6 +23,8 @@ import LeanPool.ErdosTuzaValtr.Main.InductionStep Imported Lean Pool material for `LeanPool.ErdosTuzaValtr.Main.Main`. -/ +@[expose] public section + noncomputable section variable {γ : Type _} [LinearOrder γ] (C : Config γ) diff --git a/LeanPool/EventStructures.lean b/LeanPool/EventStructures.lean index cf8c2a796c..7f07de803e 100644 --- a/LeanPool/EventStructures.lean +++ b/LeanPool/EventStructures.lean @@ -3,16 +3,17 @@ Copyright (c) 2026 Vikraman Choudhury. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vikraman Choudhury -/ - -import LeanPool.EventStructures.Basic -import LeanPool.EventStructures.Configuration -import LeanPool.EventStructures.Trace -import LeanPool.EventStructures.Path -import LeanPool.EventStructures.Computation -import LeanPool.EventStructures.FinitePoset -import LeanPool.EventStructures.Rollback -import LeanPool.EventStructures.Log -import LeanPool.EventStructures.Replay +module + +public import LeanPool.EventStructures.Basic +public import LeanPool.EventStructures.Configuration +public import LeanPool.EventStructures.Trace +public import LeanPool.EventStructures.Path +public import LeanPool.EventStructures.Computation +public import LeanPool.EventStructures.FinitePoset +public import LeanPool.EventStructures.Rollback +public import LeanPool.EventStructures.Log +public import LeanPool.EventStructures.Replay /-! # Event Structures and Causal-Consistent Reversibility @@ -25,6 +26,8 @@ Tags: concurrency, order-theory, reversible-computation, event-structures MSC: 68Q85, 06A06 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/EventStructures/Basic.lean b/LeanPool/EventStructures/Basic.lean index d8beb9625d..6b965e588f 100644 --- a/LeanPool/EventStructures/Basic.lean +++ b/LeanPool/EventStructures/Basic.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Vikraman Choudhury. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vikraman Choudhury -/ -import Mathlib.Order.Basic +module + +public import Mathlib.Data.Set.Defs +public import Mathlib.Order.Defs.PartialOrder /-! # Event structures @@ -14,6 +17,8 @@ with the derived consistency, concurrency, minimal-conflict and past/future notions used throughout the development, and decidability data for events. -/ +@[expose] public section + namespace EventStructures /-- An event structure with binary conflict. -/ diff --git a/LeanPool/EventStructures/Computation.lean b/LeanPool/EventStructures/Computation.lean index 3e08d08134..692538e5a0 100644 --- a/LeanPool/EventStructures/Computation.lean +++ b/LeanPool/EventStructures/Computation.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Vikraman Choudhury. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vikraman Choudhury -/ -import LeanPool.EventStructures.Configuration -import LeanPool.EventStructures.Path -import LeanPool.EventStructures.Trace -import Mathlib.Logic.Function.Basic +module + +public import LeanPool.EventStructures.Path +import Mathlib.Data.Finset.Attr /-! # Computations @@ -17,6 +17,8 @@ configurations, and linearisations, and relates computations to the configurations they reach. -/ +@[expose] public section + namespace EventStructures variable (es : EventStructure) diff --git a/LeanPool/EventStructures/Configuration.lean b/LeanPool/EventStructures/Configuration.lean index 938d20d39f..9cfa54d67c 100644 --- a/LeanPool/EventStructures/Configuration.lean +++ b/LeanPool/EventStructures/Configuration.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Vikraman Choudhury. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vikraman Choudhury -/ -import LeanPool.EventStructures.Basic -import Mathlib.Data.Finset.Basic +module + +public import LeanPool.EventStructures.Basic +public import Mathlib.Data.Finset.Defs +import Mathlib.Data.Finset.Attr /-! # Configurations @@ -15,6 +18,8 @@ enabling relation between a configuration and an event, and proves that enabling an event extends a configuration. -/ +@[expose] public section + namespace EventStructures variable (es : EventStructure) diff --git a/LeanPool/EventStructures/FinitePoset.lean b/LeanPool/EventStructures/FinitePoset.lean index 19511c4f7c..bbdf88c11e 100644 --- a/LeanPool/EventStructures/FinitePoset.lean +++ b/LeanPool/EventStructures/FinitePoset.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Vikraman Choudhury. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vikraman Choudhury -/ -import Mathlib.Data.Finset.Basic -import Mathlib.Order.WellFounded +module + +public import Mathlib.Data.Finset.Empty +import Mathlib.Data.Finset.Insert /-! # Minimal elements of finite posets @@ -14,6 +16,8 @@ of a partial order with well-founded strict order (or, constructively, of any partial order) has a minimal element. -/ +@[expose] public section + namespace EventStructures /-- Classical: A non-empty finite subset of a well-founded partial order has a minimal element. -/ diff --git a/LeanPool/EventStructures/Log.lean b/LeanPool/EventStructures/Log.lean index ee1c13ae56..281563535f 100644 --- a/LeanPool/EventStructures/Log.lean +++ b/LeanPool/EventStructures/Log.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Vikraman Choudhury. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vikraman Choudhury -/ -import LeanPool.EventStructures.Basic -import LeanPool.EventStructures.Configuration -import LeanPool.EventStructures.Computation +module + +public import LeanPool.EventStructures.Computation +import Mathlib.Data.Finset.Attr /-! # Logs and compatibility @@ -15,6 +16,8 @@ have a minimal conflict with some event outside the configuration), and the notion of a computation being compatible with a log. -/ +@[expose] public section + namespace EventStructures variable (es : EventStructure) diff --git a/LeanPool/EventStructures/Path.lean b/LeanPool/EventStructures/Path.lean index 88a5c71efd..ab2b9353ef 100644 --- a/LeanPool/EventStructures/Path.lean +++ b/LeanPool/EventStructures/Path.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Vikraman Choudhury. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vikraman Choudhury -/ -import LeanPool.EventStructures.Basic -import LeanPool.EventStructures.Configuration -import LeanPool.EventStructures.Trace -import Mathlib.CategoryTheory.Category.Basic -import Mathlib.Data.Setoid.Basic -import Mathlib.Data.Nat.Find +module + +public import LeanPool.EventStructures.Configuration +public import LeanPool.EventStructures.Trace +public import Mathlib.CategoryTheory.Category.Basic +public import Mathlib.Data.Nat.Find +import Mathlib.Data.Finset.Attr /-! # Paths in the configuration graph @@ -19,6 +20,8 @@ quotient of paths by trace equivalence (asynchronous paths), and the resulting (synchronous and asynchronous) path categories. -/ +@[expose] public section + namespace EventStructures variable (es : EventStructure) diff --git a/LeanPool/EventStructures/Replay.lean b/LeanPool/EventStructures/Replay.lean index b18bbd8d6e..31f72d59d6 100644 --- a/LeanPool/EventStructures/Replay.lean +++ b/LeanPool/EventStructures/Replay.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Vikraman Choudhury. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vikraman Choudhury -/ -import LeanPool.EventStructures.Basic -import LeanPool.EventStructures.Configuration -import LeanPool.EventStructures.Computation -import LeanPool.EventStructures.Log -import LeanPool.EventStructures.Trace +module + +public import LeanPool.EventStructures.Log +public import Mathlib.Order.SetNotation +import Mathlib.Data.Finset.Attr /-! # Replay @@ -20,6 +20,8 @@ existence is established relative to a computation compatible with the log that reaches the corresponding replay set, not unconditionally. -/ +@[expose] public section + namespace EventStructures variable (es : EventStructure) diff --git a/LeanPool/EventStructures/Rollback.lean b/LeanPool/EventStructures/Rollback.lean index 564bcff455..80a016ab69 100644 --- a/LeanPool/EventStructures/Rollback.lean +++ b/LeanPool/EventStructures/Rollback.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Vikraman Choudhury. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vikraman Choudhury -/ -import LeanPool.EventStructures.Configuration -import LeanPool.EventStructures.Path +module + +public import LeanPool.EventStructures.Path +public import Mathlib.Data.Set.Card import LeanPool.EventStructures.FinitePoset -import Mathlib.Data.Finset.Basic -import Mathlib.Data.Set.Finite.Basic -import Mathlib.Data.Set.Card /-! # Rollback @@ -20,6 +19,8 @@ and causal safety, and—given a finite representation—correctness (the origin configuration is reachable from the rollback) and minimality. -/ +@[expose] public section + namespace EventStructures variable (es : EventStructure) diff --git a/LeanPool/EventStructures/Trace.lean b/LeanPool/EventStructures/Trace.lean index 4ba3a2a912..2caf4521e8 100644 --- a/LeanPool/EventStructures/Trace.lean +++ b/LeanPool/EventStructures/Trace.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Vikraman Choudhury. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vikraman Choudhury -/ -import LeanPool.EventStructures.Basic -import Mathlib.Algebra.Group.Defs +module + +public import LeanPool.EventStructures.Basic +public import Mathlib.Algebra.Group.Defs /-! # Traces and the trace monoid @@ -15,6 +17,8 @@ relation and a congruence for concatenation, and builds the trace monoid as the quotient of lists of events by trace equivalence. -/ +@[expose] public section + namespace EventStructures variable (es : EventStructure) diff --git a/LeanPool/FactorizationSystems.lean b/LeanPool/FactorizationSystems.lean index 8ebbadf20c..544652c501 100644 --- a/LeanPool/FactorizationSystems.lean +++ b/LeanPool/FactorizationSystems.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Ivan Kobe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Kobe -/ +module -import LeanPool.FactorizationSystems.Basic -import LeanPool.FactorizationSystems.Examples -import LeanPool.FactorizationSystems.Orthogonality -import LeanPool.FactorizationSystems.OrthogonalComplements -import LeanPool.FactorizationSystems.Characterization +public import LeanPool.FactorizationSystems.Basic +public import LeanPool.FactorizationSystems.Examples +public import LeanPool.FactorizationSystems.Orthogonality +public import LeanPool.FactorizationSystems.OrthogonalComplements +public import LeanPool.FactorizationSystems.Characterization +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.SetLike /-! # Factorization Systems @@ -20,3 +23,5 @@ Main declarations: `CategoryTheory.FactorizationSystemCharacterization` Tags: category-theory, factorization-systems, orthogonality MSC: 18A32, 18A40 -/ + +@[expose] public section diff --git a/LeanPool/FactorizationSystems/Basic.lean b/LeanPool/FactorizationSystems/Basic.lean index c18d77eaa5..b437f03d2c 100644 --- a/LeanPool/FactorizationSystems/Basic.lean +++ b/LeanPool/FactorizationSystems/Basic.lean @@ -3,15 +3,17 @@ Copyright (c) 2026 Ivan Kobe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Kobe -/ +module -import Mathlib.CategoryTheory.Category.Basic -import Mathlib.CategoryTheory.Comma.Over.Basic -import Mathlib.CategoryTheory.MorphismProperty.Composition +public import Mathlib.CategoryTheory.Comma.Over.Basic +import Mathlib.Tactic.Attr.Core /-! # LeanPool.FactorizationSystems.Basic -/ +@[expose] public section + namespace CategoryTheory universe u v u' v' variable {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D] diff --git a/LeanPool/FactorizationSystems/Characterization.lean b/LeanPool/FactorizationSystems/Characterization.lean index d6abfd9011..04c5ac264f 100644 --- a/LeanPool/FactorizationSystems/Characterization.lean +++ b/LeanPool/FactorizationSystems/Characterization.lean @@ -3,22 +3,19 @@ Copyright (c) 2026 Ivan Kobe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Kobe -/ +module -import Mathlib.CategoryTheory.MorphismProperty.Basic -import Mathlib.CategoryTheory.Comma.Arrow -import Mathlib.CategoryTheory.Limits.HasLimits -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.HasPullback -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.PullbackCone -import Mathlib.CategoryTheory.Limits.Comma -import LeanPool.FactorizationSystems.Basic -import LeanPool.FactorizationSystems.Orthogonality -import LeanPool.FactorizationSystems.OrthogonalComplements +public import LeanPool.FactorizationSystems.OrthogonalComplements +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.SetLike /-! # LeanPool.FactorizationSystems.Characterization -/ +@[expose] public section + namespace CategoryTheory universe u v variable {C : Type u} [Category.{v} C] diff --git a/LeanPool/FactorizationSystems/Examples.lean b/LeanPool/FactorizationSystems/Examples.lean index 638f4d59c5..0828b9b660 100644 --- a/LeanPool/FactorizationSystems/Examples.lean +++ b/LeanPool/FactorizationSystems/Examples.lean @@ -3,20 +3,18 @@ Copyright (c) 2026 Ivan Kobe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Kobe -/ +module -import Mathlib.CategoryTheory.Category.Basic -import Mathlib.CategoryTheory.Comma.Over.Basic -import Mathlib.CategoryTheory.ConcreteCategory.Basic -import Mathlib.CategoryTheory.MorphismProperty.Composition -import Mathlib.CategoryTheory.MorphismProperty.Basic -import Mathlib.CategoryTheory.Types.Epimorphisms -import Mathlib.CategoryTheory.Types.Monomorphisms -import LeanPool.FactorizationSystems.Basic +public import LeanPool.FactorizationSystems.Basic +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.SetLike /-! # LeanPool.FactorizationSystems.Examples -/ +@[expose] public section + namespace CategoryTheory universe u v variable {C : Type u} [Category.{v} C] diff --git a/LeanPool/FactorizationSystems/OrthogonalComplements.lean b/LeanPool/FactorizationSystems/OrthogonalComplements.lean index fc3a3b82f2..c2ad123b0a 100644 --- a/LeanPool/FactorizationSystems/OrthogonalComplements.lean +++ b/LeanPool/FactorizationSystems/OrthogonalComplements.lean @@ -3,21 +3,20 @@ Copyright (c) 2026 Ivan Kobe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Kobe -/ +module -import Mathlib.CategoryTheory.MorphismProperty.Basic -import Mathlib.CategoryTheory.Comma.Arrow -import Mathlib.CategoryTheory.Limits.HasLimits -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.HasPullback -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.PullbackCone -import Mathlib.CategoryTheory.Limits.Comma -import LeanPool.FactorizationSystems.Basic -import LeanPool.FactorizationSystems.Orthogonality +public import LeanPool.FactorizationSystems.Basic +public import LeanPool.FactorizationSystems.Orthogonality +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.SetLike /-! # LeanPool.FactorizationSystems.OrthogonalComplements -/ +@[expose] public section + namespace CategoryTheory universe u v variable {C : Type u} [Category.{v} C] diff --git a/LeanPool/FactorizationSystems/Orthogonality.lean b/LeanPool/FactorizationSystems/Orthogonality.lean index 7bc9655f93..748eeaf23a 100644 --- a/LeanPool/FactorizationSystems/Orthogonality.lean +++ b/LeanPool/FactorizationSystems/Orthogonality.lean @@ -3,20 +3,19 @@ Copyright (c) 2026 Ivan Kobe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ivan Kobe -/ +module + +public import Mathlib.CategoryTheory.Limits.Shapes.Pullback.HasPullback +public import Mathlib.CategoryTheory.Limits.Types.Limits +public import Mathlib.Tactic.Attr.Core +import Mathlib.CategoryTheory.Limits.Shapes.FiniteLimits -import LeanPool.FactorizationSystems.Examples -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.HasPullback -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.PullbackCone -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.Cospan -import Mathlib.CategoryTheory.Limits.Types.Pullbacks -import Mathlib.CategoryTheory.Limits.IsLimit -import Mathlib.CategoryTheory.Iso -import Mathlib.CategoryTheory.Types.Basic -import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts.ProdComparison /-! # LeanPool.FactorizationSystems.Orthogonality -/ +@[expose] public section + /- Given two morphisms l: A ⟶ B and r: X ⟶ Y in a category C, we say that l is left orthogonal to r or that r is right orthogonal to l, if for every commuting square of the form @@ -220,7 +219,7 @@ lemma hom_cospan_pullback_condition {A B X Y : C} (l : A ⟶ B) (r : X ⟶ Y) : /-- Imported FactorizationSystems declaration. -/ @[reducible] def isCartesianSquare {A B X Y : C} (S : square A B X Y) : Prop := - IsIso (Limits.pullback.lift S.top S.left (by rw [S.comm])) + IsIso (Limits.pullback.lift S.top S.left S.comm.symm) /- The second characterization of orthogonality via the hom square in Set -/ /-- Imported FactorizationSystems declaration. -/ diff --git a/LeanPool/Feige.lean b/LeanPool/Feige.lean index 344a1af95c..9a36832c8a 100644 --- a/LeanPool/Feige.lean +++ b/LeanPool/Feige.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module -import LeanPool.Feige.MainTheorem +public import LeanPool.Feige.MainTheorem +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # Feige's sharp unit-slack inequality @@ -17,6 +19,8 @@ Tags: probability, concentration-inequalities, convex-geometry, sharp-constants MSC: 60E15, 52A20 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Feige/AugmentedLatentSupport.lean b/LeanPool/Feige/AugmentedLatentSupport.lean index ede2ef9e63..fcdc848fb6 100644 --- a/LeanPool/Feige/AugmentedLatentSupport.lean +++ b/LeanPool/Feige/AugmentedLatentSupport.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.MeanOneAugmentedMixture +module + +public import LeanPool.Feige.MeanOneAugmentedMixture +public import LeanPool.Feige.AugmentedParameterization /-! # Support of the augmented latent parameterization -/ +@[expose] public section + open Set MeasureTheory ProbabilityTheory namespace Feige diff --git a/LeanPool/Feige/AugmentedParameterization.lean b/LeanPool/Feige/AugmentedParameterization.lean index 980955a5f8..fc64c846ab 100644 --- a/LeanPool/Feige/AugmentedParameterization.lean +++ b/LeanPool/Feige/AugmentedParameterization.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.ConditionalProductKernel -import LeanPool.Feige.TwoPoint +module + +public import LeanPool.Feige.TwoPoint +public import LeanPool.Feige.ProductTwoPointKernel /-! # Two-point parameters for augmented latent coordinates @@ -14,6 +16,8 @@ parametrization `γ = 0`, `β = 1`. A genuine support pair `(x,y)` is represented by `γ = 1-x`, `β = y-1`. -/ +@[expose] public section + open MeasureTheory namespace Feige diff --git a/LeanPool/Feige/AugmentedTwoPointKernel.lean b/LeanPool/Feige/AugmentedTwoPointKernel.lean index b6e2c19a01..6baf24eb07 100644 --- a/LeanPool/Feige/AugmentedTwoPointKernel.lean +++ b/LeanPool/Feige/AugmentedTwoPointKernel.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.MeasurableTwoPointKernel -import Mathlib.Probability.Kernel.Composition.MapComap +module + +public import LeanPool.Feige.MeasurableTwoPointKernel /-! # An augmented latent kernel @@ -14,6 +15,8 @@ strict below/above pair. Thus a single latent parameter always determines a mean-one law supported on at most two points. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Set namespace Feige diff --git a/LeanPool/Feige/BooleanChain.lean b/LeanPool/Feige/BooleanChain.lean index 5ad0dc514e..1d1f62d8f0 100644 --- a/LeanPool/Feige/BooleanChain.lean +++ b/LeanPool/Feige/BooleanChain.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import Mathlib.Data.Finset.Card +public import Mathlib.Algebra.Group.End +public import Mathlib.Data.Fintype.Basic import Mathlib.Data.Fintype.Fin -import Mathlib.Data.Finset.Card -import Mathlib.GroupTheory.Perm.Basic /-! # Maximal chains in the Boolean lattice @@ -17,6 +20,8 @@ chain structure and the exact one-element insertion step needed by the mass transport argument. -/ +@[expose] public section + open Finset namespace Feige diff --git a/LeanPool/Feige/BoundaryNull.lean b/LeanPool/Feige/BoundaryNull.lean index e9dfe8d02b..cddabe6007 100644 --- a/LeanPool/Feige/BoundaryNull.lean +++ b/LeanPool/Feige/BoundaryNull.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.KContinuity +module + +public import LeanPool.Feige.KContinuity import LeanPool.Feige.TransferProbability /-! @@ -16,6 +18,8 @@ nonnegative exponential law and then applies the product decomposition of a finite `Option`-indexed product. -/ +@[expose] public section + open scoped BigOperators ENNReal open MeasureTheory ProbabilityTheory Set diff --git a/LeanPool/Feige/Calibration.lean b/LeanPool/Feige/Calibration.lean index 01cdc8d720..3e16b85293 100644 --- a/LeanPool/Feige/Calibration.lean +++ b/LeanPool/Feige/Calibration.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.MeasureTheory.Measure.Real -import Mathlib.Probability.Independence.Basic +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.Probability.Independence.Basic /-! # Exact calibration interfaces @@ -14,6 +15,8 @@ This file contains the probability/calibration interfaces shared by the Vlassis--Thomas theorem and the reduction to Feige's inequality. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory namespace Feige diff --git a/LeanPool/Feige/ChainCalibration.lean b/LeanPool/Feige/ChainCalibration.lean index 90f149c34e..e256c8b57e 100644 --- a/LeanPool/Feige/ChainCalibration.lean +++ b/LeanPool/Feige/ChainCalibration.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.TwoPoint +module + +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Basic.Real.Basic +public import Mathlib.Order.Interval.Finset.Nat +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # Calibrated measures on finite chains @@ -20,6 +25,8 @@ exactly `K t`, which gives exact chain calibration whenever the rejected states form that terminal segment. -/ +@[expose] public section + open scoped BigOperators namespace Feige diff --git a/LeanPool/Feige/ChainFromBoolean.lean b/LeanPool/Feige/ChainFromBoolean.lean index 78f9fbe48c..34a4c74ff8 100644 --- a/LeanPool/Feige/ChainFromBoolean.lean +++ b/LeanPool/Feige/ChainFromBoolean.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.BooleanChain -import LeanPool.Feige.ChainCalibration +module + +public import LeanPool.Feige.BooleanChain +public import LeanPool.Feige.ChainCalibration +public import LeanPool.Feige.TwoPoint /-! # Calibrated statistic sequences along maximal Boolean chains @@ -15,6 +18,8 @@ extends the resulting finite sequence by zero. The extension is a immediately. -/ +@[expose] public section + namespace Feige /-- The two-point statistic along the maximal chain encoded by `σ`, extended diff --git a/LeanPool/Feige/ChainInsertion.lean b/LeanPool/Feige/ChainInsertion.lean index 0e731595ae..2d4c12e36c 100644 --- a/LeanPool/Feige/ChainInsertion.lean +++ b/LeanPool/Feige/ChainInsertion.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.BooleanChain -import Mathlib.Logic.Equiv.Fin.Basic +module + +public import LeanPool.Feige.BooleanChain +public import Mathlib.Logic.Equiv.Fin.Basic /-! # Inserting a new coordinate into a maximal chain @@ -17,6 +19,8 @@ chain with the new element adjoined. These are the two cases of the inserted-chain construction used in the proof of Theorem 2.1. -/ +@[expose] public section + open Finset namespace Feige diff --git a/LeanPool/Feige/ChainMeasure.lean b/LeanPool/Feige/ChainMeasure.lean index e56c8bd93c..171117a9e4 100644 --- a/LeanPool/Feige/ChainMeasure.lean +++ b/LeanPool/Feige/ChainMeasure.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.ChainFromBoolean +module + +public import LeanPool.Feige.ChainFromBoolean /-! # Probability measures carried by maximal chains @@ -14,6 +16,8 @@ packages its expectation and relates the indicator of a threshold rejection event to `rejectedMass`. -/ +@[expose] public section + open scoped BigOperators namespace Feige diff --git a/LeanPool/Feige/ConditionalMainTheorem.lean b/LeanPool/Feige/ConditionalMainTheorem.lean index 01db577265..8045f2db63 100644 --- a/LeanPool/Feige/ConditionalMainTheorem.lean +++ b/LeanPool/Feige/ConditionalMainTheorem.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.GeometryBridge -import LeanPool.Feige.Sharpness +module + +public import LeanPool.Feige.GeometryBridge +public import LeanPool.Feige.Sharpness /-! # Conditional assembly of the unit-slack theorem @@ -15,6 +17,8 @@ are fully discharged: Theorem 2.1, the simplex/exponential identification of (2.1), and the `α = 0` centroid-halfspace inequality are the only inputs. -/ +@[expose] public section + namespace Feige /-- The `δ = 1` specialization of Theorem 1.1, assembled from Theorem 2.1 diff --git a/LeanPool/Feige/ConditionalProductKernel.lean b/LeanPool/Feige/ConditionalProductKernel.lean index 17ce59cdb1..17c8aa9c8a 100644 --- a/LeanPool/Feige/ConditionalProductKernel.lean +++ b/LeanPool/Feige/ConditionalProductKernel.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.ProductTwoPointKernel +module + +public import LeanPool.Feige.ProductTwoPointKernel /-! # Conditional product law of the recursive augmented kernel @@ -13,6 +15,8 @@ has, at every fixed latent parameter vector, exactly the ordinary finite product of the selected one-coordinate laws. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory namespace Feige diff --git a/LeanPool/Feige/ConditionalTwoPointCalibration.lean b/LeanPool/Feige/ConditionalTwoPointCalibration.lean index a580b0e97e..e26bbc491e 100644 --- a/LeanPool/Feige/ConditionalTwoPointCalibration.lean +++ b/LeanPool/Feige/ConditionalTwoPointCalibration.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.AugmentedParameterization +module + +public import LeanPool.Feige.AugmentedParameterization +import LeanPool.Feige.ConditionalProductKernel import LeanPool.Feige.TwoPointProductLaw /-! @@ -15,6 +18,8 @@ conditional product law selected by any admissible augmented latent vector inherits the same rejection bound. -/ +@[expose] public section + open MeasureTheory namespace Feige diff --git a/LeanPool/Feige/Constants.lean b/LeanPool/Feige/Constants.lean index 5f6c35ef13..3d9e1c0d16 100644 --- a/LeanPool/Feige/Constants.lean +++ b/LeanPool/Feige/Constants.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import Mathlib.Analysis.Complex.Exponential import Mathlib.Analysis.SpecialFunctions.Complex.LogBounds -import Mathlib.Topology.Instances.ENNReal.Lemmas /-! # The sharp finite-dimensional constant @@ -17,6 +19,8 @@ which is the `δ = 1` value of the second branch in (1.1). The probability-theoretic proof is kept in later modules. -/ +@[expose] public section + namespace Feige open Filter Topology diff --git a/LeanPool/Feige/ConvolutionLogConcave.lean b/LeanPool/Feige/ConvolutionLogConcave.lean index 255838764b..832ab84205 100644 --- a/LeanPool/Feige/ConvolutionLogConcave.lean +++ b/LeanPool/Feige/ConvolutionLogConcave.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.OneSidedDensity -import Mathlib.Analysis.LConvolution -import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar -import Mathlib.MeasureTheory.Measure.WithDensity +module + +public import Mathlib.MeasureTheory.Measure.WithDensity +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Nonnegative density convolution @@ -19,6 +20,8 @@ one-dimensional closure is proved by the TP2/Cauchy--Binet argument in `Feige.FiniteSignedExp`. -/ +@[expose] public section + open MeasureTheory open scoped ENNReal diff --git a/LeanPool/Feige/FiniteSignedExp.lean b/LeanPool/Feige/FiniteSignedExp.lean index f52bc96028..3693ccc546 100644 --- a/LeanPool/Feige/FiniteSignedExp.lean +++ b/LeanPool/Feige/FiniteSignedExp.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.TranslationTP2 -import Mathlib.Probability.Distributions.Exponential +module + +public import LeanPool.Feige.TranslationTP2 +public import Mathlib.Probability.Distributions.Exponential +public import LeanPool.Feige.OneSidedDensity /-! # Finite signed exponential sums @@ -16,6 +19,8 @@ density and derives its four-point log-concavity from translation TP2 closure under convolution. -/ +@[expose] public section + open scoped ENNReal open MeasureTheory ProbabilityTheory diff --git a/LeanPool/Feige/GeometryBridge.lean b/LeanPool/Feige/GeometryBridge.lean index ca09568d3f..b11a3eb1d9 100644 --- a/LeanPool/Feige/GeometryBridge.lean +++ b/LeanPool/Feige/GeometryBridge.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.KStatistic -import LeanPool.Feige.Reduction -import LeanPool.Feige.SimplexMeasure +module + +public import LeanPool.Feige.KStatistic +public import LeanPool.Feige.Reduction +public import LeanPool.Feige.SimplexMeasure /-! # From simplex geometry to the exponential statistic @@ -17,6 +19,8 @@ the `α = 0` centroid-halfspace theorem supplies the `δ = 1` `LargeSumBridge` consumed by the final reduction. -/ +@[expose] public section + namespace Feige /-- Equality of the simplex-volume and exponential presentations of the diff --git a/LeanPool/Feige/Grunbaum/Definitions.lean b/LeanPool/Feige/Grunbaum/Definitions.lean index eb8c590c2c..6d06b74773 100644 --- a/LeanPool/Feige/Grunbaum/Definitions.lean +++ b/LeanPool/Feige/Grunbaum/Definitions.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI -/ -import Mathlib.Analysis.Convex.Body -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.MeasureTheory.Integral.Average -import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace -import Mathlib.MeasureTheory.Measure.OpenPos +module + +public import Mathlib.MeasureTheory.Integral.Average +public import Mathlib.Analysis.Normed.Lp.MeasurableSpace +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis /-! # Definitions for Grünbaum's centroid halfspace theorem @@ -18,6 +18,8 @@ have nonempty interior. `FullDimensionalConvexBody` records precisely that standard convention. -/ +@[expose] public section + open MeasureTheory Set namespace Grunbaum diff --git a/LeanPool/Feige/Grunbaum/FinalBridge.lean b/LeanPool/Feige/Grunbaum/FinalBridge.lean index c05df047a8..7e9fff8e91 100644 --- a/LeanPool/Feige/Grunbaum/FinalBridge.lean +++ b/LeanPool/Feige/Grunbaum/FinalBridge.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI -/ -import LeanPool.Feige.Grunbaum.TruncationConcavity +module + +public import LeanPool.Feige.Grunbaum.TruncationConcavity /-! # From truncation concavity to the Grünbaum volume bound -/ +@[expose] public section + open MeasureTheory Set namespace Grunbaum diff --git a/LeanPool/Feige/Grunbaum/Main.lean b/LeanPool/Feige/Grunbaum/Main.lean index c9e703519d..22a97eec55 100644 --- a/LeanPool/Feige/Grunbaum/Main.lean +++ b/LeanPool/Feige/Grunbaum/Main.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI -/ -import LeanPool.Feige.Grunbaum.ProbabilityCore -import LeanPool.Feige.Grunbaum.TruncationConcavity +module + +public import LeanPool.Feige.Grunbaum.ProbabilityCore +public import LeanPool.Feige.Grunbaum.TruncationConcavity import LeanPool.Feige.Grunbaum.FinalBridge -import Mathlib.MeasureTheory.Measure.Restrict +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Grünbaum's centroid halfspace theorem @@ -16,6 +21,8 @@ proof. The public theorem `grunbaum_centroid_halfspace` has only the assumptions in the mathematical statement. -/ +@[expose] public section + open Filter MeasureTheory ProbabilityTheory Set open scoped ENNReal Topology diff --git a/LeanPool/Feige/Grunbaum/ProbabilityCore.lean b/LeanPool/Feige/Grunbaum/ProbabilityCore.lean index 6bac7d6b00..9de3251376 100644 --- a/LeanPool/Feige/Grunbaum/ProbabilityCore.lean +++ b/LeanPool/Feige/Grunbaum/ProbabilityCore.lean @@ -3,20 +3,21 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI -/ -import Mathlib.Analysis.SpecialFunctions.Integrals.Basic -import Mathlib.Analysis.SpecialFunctions.Pow.Continuity +module + +public import Mathlib.MeasureTheory.Integral.Average +public import Mathlib.Probability.CDF +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Analysis.Convex.Integral -import Mathlib.MeasureTheory.Integral.Average +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic import Mathlib.MeasureTheory.Integral.Layercake -import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar -import Mathlib.MeasureTheory.Measure.Typeclasses.NullSingletonClass -import Mathlib.Probability.CDF -import Mathlib.Topology.Order.IntermediateValue /-! # Probability lemmas for Grünbaum's inequality -/ +@[expose] public section + open Filter MeasureTheory ProbabilityTheory Set open scoped ENNReal Topology diff --git a/LeanPool/Feige/Grunbaum/Sharpness.lean b/LeanPool/Feige/Grunbaum/Sharpness.lean index d6098670b3..e013ff0463 100644 --- a/LeanPool/Feige/Grunbaum/Sharpness.lean +++ b/LeanPool/Feige/Grunbaum/Sharpness.lean @@ -3,16 +3,12 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI -/ -import LeanPool.Feige.Grunbaum.Definitions -import Mathlib.Analysis.Convex.Measure +module + +public import LeanPool.Feige.Grunbaum.Definitions +import Mathlib.Analysis.Normed.Affine.AddTorsorBases import Mathlib.Analysis.SpecialFunctions.Integrals.Basic import Mathlib.MeasureTheory.Integral.Layercake -import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring /-! # Sharpness of Grünbaum's centroid halfspace constant @@ -23,6 +19,8 @@ layer-cake formula and proves that every universal project-level lower bound is at most `grunbaumConstant`. -/ +@[expose] public section + noncomputable section open Filter MeasureTheory MeasureTheory.Measure Set diff --git a/LeanPool/Feige/Grunbaum/SimplexCentroidCoordinates.lean b/LeanPool/Feige/Grunbaum/SimplexCentroidCoordinates.lean index 53919eeed4..7676bce5f5 100644 --- a/LeanPool/Feige/Grunbaum/SimplexCentroidCoordinates.lean +++ b/LeanPool/Feige/Grunbaum/SimplexCentroidCoordinates.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.Grunbaum.Sharpness +module + +public import LeanPool.Feige.Grunbaum.Sharpness +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace +import Mathlib.Tactic.Positivity.Finset /-! # Coordinates of the standard-simplex centroid @@ -13,6 +19,8 @@ simplex. Hence all centroid coordinates agree; their value follows from the already computed coordinate sum. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/Feige/Grunbaum/StrictBoundaryBridge.lean b/LeanPool/Feige/Grunbaum/StrictBoundaryBridge.lean index 6e8687b0e1..30e68211e9 100644 --- a/LeanPool/Feige/Grunbaum/StrictBoundaryBridge.lean +++ b/LeanPool/Feige/Grunbaum/StrictBoundaryBridge.lean @@ -3,12 +3,23 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import Mathlib.Analysis.Normed.Module.Basic +public import Mathlib.LinearAlgebra.FiniteDimensional.Defs +public import Mathlib.MeasureTheory.Group.Measure import LeanPool.Feige.Grunbaum.ProbabilityCore +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Passing from closed to strict halfspaces -/ +@[expose] public section + open MeasureTheory Set noncomputable section diff --git a/LeanPool/Feige/Grunbaum/TruncationConcavity.lean b/LeanPool/Feige/Grunbaum/TruncationConcavity.lean index 266a4a5f5f..5b224a9b04 100644 --- a/LeanPool/Feige/Grunbaum/TruncationConcavity.lean +++ b/LeanPool/Feige/Grunbaum/TruncationConcavity.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI -/ -import LeanPool.Feige.Grunbaum.Definitions +module + +public import LeanPool.Feige.Grunbaum.Definitions import LeanPool.Isoperimetric.BrunnMinkowski -import Mathlib.Analysis.Convex.Function +import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar /-! # Concavity of truncated-volume roots -/ +@[expose] public section + open MeasureTheory Set open scoped Pointwise diff --git a/LeanPool/Feige/GrunbaumImport.lean b/LeanPool/Feige/GrunbaumImport.lean index 98fcfb9b1b..c26eb0d34f 100644 --- a/LeanPool/Feige/GrunbaumImport.lean +++ b/LeanPool/Feige/GrunbaumImport.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.SimplexGeometry -import LeanPool.Feige.Grunbaum.Main -import LeanPool.Feige.Grunbaum.Sharpness -import LeanPool.Feige.Grunbaum.SimplexCentroidCoordinates -import LeanPool.Feige.Grunbaum.StrictBoundaryBridge +module + +public import LeanPool.Feige.SimplexGeometry +public import LeanPool.Feige.Grunbaum.Sharpness +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace +import Mathlib.Tactic.Positivity.Finset /-! # Basic interface to the Grünbaum formalization @@ -17,6 +20,8 @@ between the coordinate-function model used by `Feige` and Mathlib's `EuclideanSpace` model used by `Grunbaum`. -/ +@[expose] public section + open Set MeasureTheory namespace Feige diff --git a/LeanPool/Feige/GrunbaumSimplexProperty.lean b/LeanPool/Feige/GrunbaumSimplexProperty.lean index 95906fc75b..6994036d0f 100644 --- a/LeanPool/Feige/GrunbaumSimplexProperty.lean +++ b/LeanPool/Feige/GrunbaumSimplexProperty.lean @@ -3,13 +3,23 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import LeanPool.Feige.SimplexMeasure +import LeanPool.Feige.Grunbaum.Main +import LeanPool.Feige.Grunbaum.StrictBoundaryBridge import LeanPool.Feige.GrunbaumWeightedForm -import LeanPool.Feige.SimplexMeasure +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # The Grünbaum property for the standard simplex -/ +@[expose] public section + open scoped BigOperators ENNReal open Set MeasureTheory diff --git a/LeanPool/Feige/GrunbaumWeightedForm.lean b/LeanPool/Feige/GrunbaumWeightedForm.lean index 2513db8daf..f679972986 100644 --- a/LeanPool/Feige/GrunbaumWeightedForm.lean +++ b/LeanPool/Feige/GrunbaumWeightedForm.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.Constants -import LeanPool.Feige.GrunbaumImport +module + +public import LeanPool.Feige.Constants +public import LeanPool.Feige.GrunbaumImport +import LeanPool.Feige.Grunbaum.SimplexCentroidCoordinates +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Weighted halfspaces on the Euclidean standard simplex @@ -14,6 +20,8 @@ with the positive-dimensional Euclidean model used by the Grünbaum formalization. -/ +@[expose] public section + open scoped BigOperators open Set diff --git a/LeanPool/Feige/HighSetLaw.lean b/LeanPool/Feige/HighSetLaw.lean index 7869f411ac..ec69fe1e8c 100644 --- a/LeanPool/Feige/HighSetLaw.lean +++ b/LeanPool/Feige/HighSetLaw.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.TwoPointInduction -import Mathlib.Probability.Independence.Basic -import Mathlib.Probability.ProbabilityMassFunction.Constructions +module + +public import Mathlib.Probability.Independence.Basic +public import Mathlib.Probability.ProbabilityMassFunction.Constructions +public import LeanPool.Feige.TwoPoint /-! # The discrete law of the high set @@ -17,6 +19,8 @@ finite two-point calibration result can be stated directly as a probability bound. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory open scoped BigOperators ENNReal diff --git a/LeanPool/Feige/IndependentCalibrationAssembly.lean b/LeanPool/Feige/IndependentCalibrationAssembly.lean index 66d2eaa3d7..b7683c681e 100644 --- a/LeanPool/Feige/IndependentCalibrationAssembly.lean +++ b/LeanPool/Feige/IndependentCalibrationAssembly.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import LeanPool.Feige.Calibration +public import LeanPool.Feige.ConditionalTwoPointCalibration import LeanPool.Feige.AugmentedLatentSupport import LeanPool.Feige.MarginalLaw +import LeanPool.Feige.MeanOneReduction import LeanPool.Feige.MixtureCalibration import LeanPool.Feige.RecursiveLatentProbability -import LeanPool.Feige.Calibration +import LeanPool.Feige.TwoPointProductLaw /-! # Assembly of calibration for independent variables @@ -17,6 +22,8 @@ joint law is then the product of their marginal laws, which is represented by the augmented latent mixture and averaged using the two-point bound. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Set namespace Feige diff --git a/LeanPool/Feige/InsertionAlgebra.lean b/LeanPool/Feige/InsertionAlgebra.lean index df23b4b975..c0f5d5e56d 100644 --- a/LeanPool/Feige/InsertionAlgebra.lean +++ b/LeanPool/Feige/InsertionAlgebra.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.ChainCalibration -import LeanPool.Feige.TransferAlgebra +module + +public import LeanPool.Feige.ChainCalibration +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # Algebraic bookkeeping for chain insertion @@ -15,6 +17,8 @@ step is kept separate: once that step supplies the sign of `η`, the results bel chain mixture as an upward transfer inside each pair `{Cⱼ, Hⱼ}`. -/ +@[expose] public section + namespace Feige section PairMasses diff --git a/LeanPool/Feige/InsertionAnalyticAssembly.lean b/LeanPool/Feige/InsertionAnalyticAssembly.lean index 14f6a58aee..40e7d5afaf 100644 --- a/LeanPool/Feige/InsertionAnalyticAssembly.lean +++ b/LeanPool/Feige/InsertionAnalyticAssembly.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.InsertionExpectation -import LeanPool.Feige.Lemma43Insertion +module + +public import LeanPool.Feige.InsertionExpectation +public import LeanPool.Feige.Lemma43Insertion /-! # Assembly of the analytic insertion edges @@ -18,6 +20,8 @@ transfer hypotheses required by `exists_insertChainPerm_dominates_reveal` follow automatically. -/ +@[expose] public section + open MeasureTheory namespace Feige diff --git a/LeanPool/Feige/InsertionCommonDensity.lean b/LeanPool/Feige/InsertionCommonDensity.lean index 6c1949ceac..f7184706a0 100644 --- a/LeanPool/Feige/InsertionCommonDensity.lean +++ b/LeanPool/Feige/InsertionCommonDensity.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.FiniteSignedExp +module + +public import LeanPool.Feige.FiniteSignedExp /-! # Common densities on insertion edges @@ -14,6 +16,8 @@ negative scaled exponential. This file packages those factors and applies the finite-convolution TP2 theorem to the common part of any genuine edge. -/ +@[expose] public section + namespace Feige namespace LikelihoodRatio diff --git a/LeanPool/Feige/InsertionCommonLaw.lean b/LeanPool/Feige/InsertionCommonLaw.lean index 9eb07fcbf9..2f0000befb 100644 --- a/LeanPool/Feige/InsertionCommonLaw.lean +++ b/LeanPool/Feige/InsertionCommonLaw.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.TwoPoint -import LeanPool.Feige.SignedExpLaw -import LeanPool.Feige.TransferProbability23 -import LeanPool.Feige.InsertionCommonDensity +module + +public import LeanPool.Feige.TwoPoint +public import LeanPool.Feige.SignedExpLaw +public import LeanPool.Feige.TransferProbability23 +public import LeanPool.Feige.InsertionCommonDensity +public import Mathlib.Probability.Independence.Basic import LeanPool.Feige.NNRealExponentialLaw -import Mathlib.Probability.Independence.Basic /-! # Signed-sum laws along a Boolean insertion edge @@ -17,6 +19,8 @@ The event defining `twoPointKFinset` is rewritten as nonnegativity of the corresponding signed exponential sum. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Set open scoped BigOperators ENNReal diff --git a/LeanPool/Feige/InsertionEdgeRealization.lean b/LeanPool/Feige/InsertionEdgeRealization.lean index 15a8f36444..a6cb5106c6 100644 --- a/LeanPool/Feige/InsertionEdgeRealization.lean +++ b/LeanPool/Feige/InsertionEdgeRealization.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.InsertionAnalyticAssembly +module + +public import LeanPool.Feige.InsertionCommonLaw +public import LeanPool.Feige.InsertionK +public import LeanPool.Feige.Lemma43Insertion import LeanPool.Feige.InsertionLastCoordinateLaw +import LeanPool.Feige.Lemma43Endpoints +import LeanPool.Feige.Lemma43Relations /-! # Realizing the genuine edges of an insertion chain @@ -16,6 +22,8 @@ new high-side scale. This identifies every nonterminal edge with the finite signed-exponential instance of the local transfer step. -/ +@[expose] public section + open MeasureTheory namespace Feige diff --git a/LeanPool/Feige/InsertionExpectation.lean b/LeanPool/Feige/InsertionExpectation.lean index 7a9e80839c..02ddead687 100644 --- a/LeanPool/Feige/InsertionExpectation.lean +++ b/LeanPool/Feige/InsertionExpectation.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.InsertionK -import LeanPool.Feige.ChainMeasure +module + +public import LeanPool.Feige.InsertionK +public import LeanPool.Feige.ChainMeasure /-! # Expectations on inserted maximal chains @@ -15,6 +17,8 @@ from concrete Boolean chains to the pairwise mass-transport calculation in the proof of Theorem 2.1. -/ +@[expose] public section + open scoped BigOperators namespace Feige diff --git a/LeanPool/Feige/InsertionK.lean b/LeanPool/Feige/InsertionK.lean index d974bce11d..ce50afb8f1 100644 --- a/LeanPool/Feige/InsertionK.lean +++ b/LeanPool/Feige/InsertionK.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.InsertionAlgebra -import LeanPool.Feige.ChainInsertion -import LeanPool.Feige.ChainFromBoolean +module + +public import LeanPool.Feige.InsertionAlgebra +public import LeanPool.Feige.ChainInsertion +public import LeanPool.Feige.ChainFromBoolean /-! # Statistic values on an inserted Boolean chain @@ -14,6 +16,8 @@ This file connects the concrete inserted Boolean chain to the abstract `A`/`B` statistic sequences used in the mass-transport proof of Theorem 2.1. -/ +@[expose] public section + namespace Feige /-- The `Bᵣ` value at the lifted lower state `Cᵣ`, extended by zero after diff --git a/LeanPool/Feige/InsertionLastCoordinateLaw.lean b/LeanPool/Feige/InsertionLastCoordinateLaw.lean index cd4730f6f2..a7e4978814 100644 --- a/LeanPool/Feige/InsertionLastCoordinateLaw.lean +++ b/LeanPool/Feige/InsertionLastCoordinateLaw.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.InsertionCommonLaw -import LeanPool.Feige.ChainInsertion +module + +public import LeanPool.Feige.InsertionCommonLaw +public import LeanPool.Feige.ChainInsertion /-! # Splitting off the newly inserted coordinate @@ -16,6 +18,8 @@ exponential shifts of the old law. These are the dimension-change identifications used at every chain-insertion edge. -/ +@[expose] public section + open MeasureTheory namespace Feige diff --git a/LeanPool/Feige/InsertionTerminalLaw.lean b/LeanPool/Feige/InsertionTerminalLaw.lean index a931e15cfa..2837c06490 100644 --- a/LeanPool/Feige/InsertionTerminalLaw.lean +++ b/LeanPool/Feige/InsertionTerminalLaw.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import LeanPool.Feige.InsertionCommonLaw +public import LeanPool.Feige.InsertionK +public import LeanPool.Feige.Lemma43Insertion import LeanPool.Feige.InsertionEdgeRealization +import LeanPool.Feige.Lemma43ArbitraryBase +import LeanPool.Feige.NNRealExponentialLaw /-! # The terminal law in the insertion argument @@ -12,6 +19,8 @@ The common variable on the terminal edge is the sum of the negative old coordinates, with the distinguished positive exponential removed. -/ +@[expose] public section + open MeasureTheory Set namespace Feige diff --git a/LeanPool/Feige/KContinuity.lean b/LeanPool/Feige/KContinuity.lean index 8b4a6e8b9c..c280a811f9 100644 --- a/LeanPool/Feige/KContinuity.lean +++ b/LeanPool/Feige/KContinuity.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.KStatistic +module + +public import LeanPool.Feige.KStatistic import Mathlib.MeasureTheory.Integral.Indicator -import Mathlib.Topology.Instances.ENNReal.Lemmas /-! # Continuity core for the Dirichlet statistic @@ -17,6 +18,8 @@ that `dirichletK` is sequentially continuous at every parameter whose boundary hyperplane has zero product-exponential measure. -/ +@[expose] public section + open scoped BigOperators open Filter MeasureTheory ProbabilityTheory Set Topology diff --git a/LeanPool/Feige/KStatistic.lean b/LeanPool/Feige/KStatistic.lean index 72fc642981..2a032f8142 100644 --- a/LeanPool/Feige/KStatistic.lean +++ b/LeanPool/Feige/KStatistic.lean @@ -3,11 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic -import Mathlib.MeasureTheory.Constructions.BorelSpace.Real -import Mathlib.MeasureTheory.Constructions.Pi -import Mathlib.MeasureTheory.Measure.Real -import Mathlib.Probability.Distributions.Exponential +module + +public import Mathlib.Probability.Distributions.Exponential /-! # An exponential representation of the Dirichlet statistic @@ -22,6 +20,8 @@ exponentials on `ℝ≥0`, so their nonnegativity is encoded by the type and the coordinatewise antitonicity of `K` is a pointwise set inclusion. -/ +@[expose] public section + open scoped BigOperators ENNReal open MeasureTheory ProbabilityTheory Set diff --git a/LeanPool/Feige/KernelAveraging.lean b/LeanPool/Feige/KernelAveraging.lean index 66b110aebf..05b690138d 100644 --- a/LeanPool/Feige/KernelAveraging.lean +++ b/LeanPool/Feige/KernelAveraging.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.ConditionalProductKernel -import Mathlib.MeasureTheory.Measure.Real +module + +public import Mathlib.Probability.Kernel.Composition.CompNotation +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Averaging conditional probability bounds @@ -14,6 +16,8 @@ two-point decomposition: an almost-everywhere event bound for the conditional Markov kernel survives averaging over a probability law. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory namespace Feige diff --git a/LeanPool/Feige/Lemma43.lean b/LeanPool/Feige/Lemma43.lean index 6b11b8937c..c458f3a6fa 100644 --- a/LeanPool/Feige/Lemma43.lean +++ b/LeanPool/Feige/Lemma43.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.TransferProbability23 +module + +public import LeanPool.Feige.TransferProbability23 +public import LeanPool.Feige.LikelihoodRatio import LeanPool.Feige.TransferAlgebra -import LeanPool.Feige.LikelihoodRatio /-! # Complete interface for the local exponential transfer step @@ -15,6 +17,8 @@ order comparison in forms intended for pointwise use along an insertion chain. -/ +@[expose] public section + open MeasureTheory Real Set open scoped ENNReal diff --git a/LeanPool/Feige/Lemma43ArbitraryBase.lean b/LeanPool/Feige/Lemma43ArbitraryBase.lean index 3ec6cc93b6..42e221bfd8 100644 --- a/LeanPool/Feige/Lemma43ArbitraryBase.lean +++ b/LeanPool/Feige/Lemma43ArbitraryBase.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import LeanPool.Feige.Lemma43 import LeanPool.Feige.Lemma43Complete import LeanPool.Feige.Lemma43Endpoints +import LeanPool.Feige.Lemma43Relations /-! # Local transfer identity for an arbitrary base law -/ +@[expose] public section + open MeasureTheory Real Set open scoped ENNReal diff --git a/LeanPool/Feige/Lemma43Complete.lean b/LeanPool/Feige/Lemma43Complete.lean index 87105d223f..ee71bd1a11 100644 --- a/LeanPool/Feige/Lemma43Complete.lean +++ b/LeanPool/Feige/Lemma43Complete.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.Lemma43Relations +module + +public import LeanPool.Feige.Lemma43 import LeanPool.Feige.Lemma43Density +import LeanPool.Feige.Lemma43Relations /-! # Fully automatic local exponential transfer interface @@ -14,6 +17,8 @@ Stein identities and assembles the probability relations and density identifications. -/ +@[expose] public section + open MeasureTheory Real Set open scoped ENNReal diff --git a/LeanPool/Feige/Lemma43Density.lean b/LeanPool/Feige/Lemma43Density.lean index 25b56fe5b9..c7b5b144f3 100644 --- a/LeanPool/Feige/Lemma43Density.lean +++ b/LeanPool/Feige/Lemma43Density.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.Lemma43 -import Mathlib.MeasureTheory.Integral.Lebesgue.Map +module + +public import LeanPool.Feige.Lemma43 /-! # Density identification for the local transfer step @@ -13,6 +14,8 @@ This file connects the pushforward laws `zPlusLaw` and `zMinusLaw` to the convolution densities `LikelihoodRatio.fPlus` and `fMinus`. -/ +@[expose] public section + open MeasureTheory Real Set open scoped ENNReal diff --git a/LeanPool/Feige/Lemma43Endpoints.lean b/LeanPool/Feige/Lemma43Endpoints.lean index fb077770ab..3924552f50 100644 --- a/LeanPool/Feige/Lemma43Endpoints.lean +++ b/LeanPool/Feige/Lemma43Endpoints.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import LeanPool.Feige.Lemma43 import LeanPool.Feige.Lemma43Relations -import LeanPool.Feige.TransferProbability23 +import LeanPool.Feige.TransferProbability /-! # Endpoint tail identities for the local transfer step -/ +@[expose] public section + open MeasureTheory Real Set open scoped ENNReal diff --git a/LeanPool/Feige/Lemma43FiniteSigned.lean b/LeanPool/Feige/Lemma43FiniteSigned.lean index c6928bd79c..d5d1fe8897 100644 --- a/LeanPool/Feige/Lemma43FiniteSigned.lean +++ b/LeanPool/Feige/Lemma43FiniteSigned.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.InsertionCommonDensity +module + +public import LeanPool.Feige.InsertionCommonDensity +public import LeanPool.Feige.Lemma43 import LeanPool.Feige.Lemma43Complete +import LeanPool.Feige.Lemma43Density /-! # Local transfer for finite signed-exponential common parts @@ -14,6 +18,8 @@ likelihood-ratio results to the exact common laws appearing on genuine Boolean-lattice insertion edges. -/ +@[expose] public section + open MeasureTheory namespace Feige diff --git a/LeanPool/Feige/Lemma43Insertion.lean b/LeanPool/Feige/Lemma43Insertion.lean index 2142a8f81f..abddeb63f9 100644 --- a/LeanPool/Feige/Lemma43Insertion.lean +++ b/LeanPool/Feige/Lemma43Insertion.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.InsertionAlgebra +module + +public import LeanPool.Feige.InsertionAlgebra +public import LeanPool.Feige.Lemma43FiniteSigned import LeanPool.Feige.Lemma43ArbitraryBase -import LeanPool.Feige.Lemma43FiniteSigned /-! # The local transfer result in the insertion-sequence interface @@ -16,6 +18,8 @@ an old Boolean chain. This file records the exact, purely algebraic interface between those two presentations. -/ +@[expose] public section + open MeasureTheory namespace Feige diff --git a/LeanPool/Feige/Lemma43Relations.lean b/LeanPool/Feige/Lemma43Relations.lean index d36a0eec7c..e56d45aabb 100644 --- a/LeanPool/Feige/Lemma43Relations.lean +++ b/LeanPool/Feige/Lemma43Relations.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.Lemma43 +module + +public import LeanPool.Feige.Lemma43 /-! # Automatic elementary relations for the local transfer step @@ -14,6 +16,8 @@ tails. Consequently the `ProbabilityRelations` input of `Lemma43.complete` holds for every finite law and need not remain an external hypothesis. -/ +@[expose] public section + open MeasureTheory Real Set namespace Feige diff --git a/LeanPool/Feige/LikelihoodRatio.lean b/LeanPool/Feige/LikelihoodRatio.lean index b933aea8b7..cea6b19875 100644 --- a/LeanPool/Feige/LikelihoodRatio.lean +++ b/LeanPool/Feige/LikelihoodRatio.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import Mathlib.MeasureTheory.Integral.Prod +module + +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Likelihood-ratio comparison for exponential convolutions @@ -14,6 +17,8 @@ exponential transfer step used in the proof of Theorem 2.1. We use an auxiliary integrability assumptions. -/ +@[expose] public section + open MeasureTheory Real Set open scoped ENNReal diff --git a/LeanPool/Feige/MainTheorem.lean b/LeanPool/Feige/MainTheorem.lean index a0fd23714c..402bd9fc5d 100644 --- a/LeanPool/Feige/MainTheorem.lean +++ b/LeanPool/Feige/MainTheorem.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import LeanPool.Feige.Sharpness import LeanPool.Feige.GrunbaumSimplexProperty import LeanPool.Feige.PaperAssembly +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # The unit-slack case of the sharp Feige main theorem @@ -13,6 +17,8 @@ All probabilistic, analytic, and geometric inputs for the `δ = 1` specialization of Theorem 1.1 are discharged here. -/ +@[expose] public section + namespace Feige /-- The fully assembled `δ = 1` sharp fixed-dimensional bound from diff --git a/LeanPool/Feige/MarginalLaw.lean b/LeanPool/Feige/MarginalLaw.lean index 6943df2899..335e8d52c1 100644 --- a/LeanPool/Feige/MarginalLaw.lean +++ b/LeanPool/Feige/MarginalLaw.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.MeanOneReduction -import Mathlib.MeasureTheory.Integral.Bochner.Basic +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # Elementary facts about one-dimensional marginal laws @@ -14,6 +17,8 @@ random variables by their product of marginal distributions: integrability, the first moment, and nonnegative support. -/ +@[expose] public section + open MeasureTheory Set namespace Feige diff --git a/LeanPool/Feige/MeanOneAugmentedMixture.lean b/LeanPool/Feige/MeanOneAugmentedMixture.lean index 34d0d8718d..d4594bbfac 100644 --- a/LeanPool/Feige/MeanOneAugmentedMixture.lean +++ b/LeanPool/Feige/MeanOneAugmentedMixture.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.AugmentedParameterization +module + +public import LeanPool.Feige.ProductTwoPointKernel +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # A total augmented mixture for mean-one laws @@ -14,6 +17,8 @@ latent law is simply the atom branch. This removes the artificial coordinatewise strict-moment assumption from the finite product mixture. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory namespace Feige diff --git a/LeanPool/Feige/MeanOneReduction.lean b/LeanPool/Feige/MeanOneReduction.lean index 8f1f2f78a3..39f9cd5d07 100644 --- a/LeanPool/Feige/MeanOneReduction.lean +++ b/LeanPool/Feige/MeanOneReduction.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.KStatistic -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.Probability.Independence.Basic +module + +public import LeanPool.Feige.KStatistic +public import Mathlib.Probability.Independence.Basic /-! # Reduction from means at most one to means exactly one @@ -13,6 +14,8 @@ import Mathlib.Probability.Independence.Basic This is the final mean-normalization reduction in the proof of Theorem 2.1. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Set Filter namespace Feige diff --git a/LeanPool/Feige/MeasurableTwoPointKernel.lean b/LeanPool/Feige/MeasurableTwoPointKernel.lean index e07550d116..c267d46106 100644 --- a/LeanPool/Feige/MeasurableTwoPointKernel.lean +++ b/LeanPool/Feige/MeasurableTwoPointKernel.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.TwoPointMixture -import Mathlib.Probability.Kernel.Basic +module + +public import LeanPool.Feige.TwoPointMixture +public import Mathlib.Probability.Kernel.Composition.CompNotation +import Mathlib.MeasureTheory.Integral.Bochner.Set import Mathlib.Probability.Kernel.Composition.MeasureComp -import Mathlib.MeasureTheory.Measure.Prod -import Mathlib.MeasureTheory.Measure.WithDensity -import Mathlib.MeasureTheory.Integral.Lebesgue.Add -import Mathlib.MeasureTheory.Integral.Lebesgue.Map /-! # A measurable kernel of mean-one two-point laws @@ -18,6 +17,8 @@ This file supplies the measurable-kernel interface needed to condition on the latent two-point parameters in the proof of Theorem 2.1. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Set namespace Feige diff --git a/LeanPool/Feige/MixtureCalibration.lean b/LeanPool/Feige/MixtureCalibration.lean index 6090b04168..b8f6b7475d 100644 --- a/LeanPool/Feige/MixtureCalibration.lean +++ b/LeanPool/Feige/MixtureCalibration.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.ConditionalTwoPointCalibration +module + +public import LeanPool.Feige.ConditionalTwoPointCalibration import LeanPool.Feige.KernelAveraging +import LeanPool.Feige.TwoPointProductLaw /-! # Calibration after latent mixing @@ -14,6 +17,8 @@ It is kept separate from the construction of the latent law: any probability measure on augmented parameters that is almost surely admissible can be used. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory namespace Feige diff --git a/LeanPool/Feige/NNRealExponentialLaw.lean b/LeanPool/Feige/NNRealExponentialLaw.lean index b8e481dc73..f655dbee6f 100644 --- a/LeanPool/Feige/NNRealExponentialLaw.lean +++ b/LeanPool/Feige/NNRealExponentialLaw.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.KStatistic +module + +public import LeanPool.Feige.KStatistic import LeanPool.Feige.TransferProbability /-! @@ -14,6 +16,8 @@ This module isolates the elementary push-forward identity relating the measure. -/ +@[expose] public section + open Set MeasureTheory ProbabilityTheory namespace Feige diff --git a/LeanPool/Feige/NormalizedExponential.lean b/LeanPool/Feige/NormalizedExponential.lean index 86bb0b3528..a70a12e580 100644 --- a/LeanPool/Feige/NormalizedExponential.lean +++ b/LeanPool/Feige/NormalizedExponential.lean @@ -3,13 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.SimplexGeometry -import Mathlib.Analysis.Calculus.FDeriv.Mul -import Mathlib.Analysis.Calculus.FDeriv.Prod -import Mathlib.LinearAlgebra.Matrix.ToLin -import Mathlib.LinearAlgebra.Matrix.Block -import Mathlib.MeasureTheory.Function.Jacobian -import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar +module + +public import LeanPool.Feige.SimplexGeometry +public import Mathlib.Analysis.Calculus.FDeriv.Defs +public import Mathlib.MeasureTheory.Integral.Bochner.Basic import Mathlib.Analysis.SpecialFunctions.Gamma.Basic import Mathlib.MeasureTheory.Integral.Pi @@ -28,6 +26,8 @@ The forward map is and its inverse divides all nonzero-total vectors by their total mass. -/ +@[expose] public section + open scoped BigOperators ENNReal open Set open MeasureTheory diff --git a/LeanPool/Feige/NormalizedExponentialProbability.lean b/LeanPool/Feige/NormalizedExponentialProbability.lean index 4fe034d768..eb80ee7d8b 100644 --- a/LeanPool/Feige/NormalizedExponentialProbability.lean +++ b/LeanPool/Feige/NormalizedExponentialProbability.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.NormalizedExponential -import Mathlib.MeasureTheory.Integral.IntegrableOn +module + +public import LeanPool.Feige.NormalizedExponential +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.MeasureTheory.Integral.Pi /-! # Probability normalization for independent unit exponentials @@ -13,6 +16,8 @@ This module supplies the product-density normalization needed to turn the normalized-exponential integral identity into a probability-law statement. -/ +@[expose] public section + open scoped BigOperators ENNReal open Set MeasureTheory diff --git a/LeanPool/Feige/OneSidedDensity.lean b/LeanPool/Feige/OneSidedDensity.lean index 3e9309fd3d..355dc50ae7 100644 --- a/LeanPool/Feige/OneSidedDensity.lean +++ b/LeanPool/Feige/OneSidedDensity.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.LikelihoodRatio +module + +public import LeanPool.Feige.LikelihoodRatio +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Log-concavity of scaled one-sided exponential densities @@ -13,6 +16,8 @@ negative scaled exponentials. This file verifies the four-point log-concavity condition for each individual one-sided exponential factor. -/ +@[expose] public section + open scoped ENNReal namespace Feige diff --git a/LeanPool/Feige/OrderedTwoPointInduction.lean b/LeanPool/Feige/OrderedTwoPointInduction.lean index cd35c35a7c..7fe6790344 100644 --- a/LeanPool/Feige/OrderedTwoPointInduction.lean +++ b/LeanPool/Feige/OrderedTwoPointInduction.lean @@ -3,6 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import LeanPool.Feige.InsertionExpectation +public import LeanPool.Feige.TwoPointInduction import LeanPool.Feige.ProductSplit /-! @@ -14,6 +18,8 @@ the last coordinate, the induction hypothesis constructs a chain on the old coordinates, and one insertion of the new coordinate completes the step. -/ +@[expose] public section + open scoped BigOperators namespace Feige diff --git a/LeanPool/Feige/PaperAssembly.lean b/LeanPool/Feige/PaperAssembly.lean index 609160d94a..41732928db 100644 --- a/LeanPool/Feige/PaperAssembly.lean +++ b/LeanPool/Feige/PaperAssembly.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.VlassisThomas.Main +module + +public import LeanPool.Feige.Sharpness +public import LeanPool.Feige.SimplexMeasure import LeanPool.Feige.ConditionalMainTheorem import LeanPool.Feige.SimplexExponentialIdentification +import LeanPool.Feige.VlassisThomas.Main /-! # Final assembly of the unit-slack theorem @@ -16,6 +20,8 @@ The remaining parameter is the `α = 0` centroid-halfspace bound used by the `δ = 1` specialization of the geometric argument in §2.2. -/ +@[expose] public section + namespace Feige /-- The `δ = 1` specialization of Theorem 1.1 with the probabilistic block diff --git a/LeanPool/Feige/ProductSplit.lean b/LeanPool/Feige/ProductSplit.lean index b5e48c6e95..e2c3d7d830 100644 --- a/LeanPool/Feige/ProductSplit.lean +++ b/LeanPool/Feige/ProductSplit.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.InsertionExpectation -import LeanPool.Feige.TwoPointInduction +module + +public import LeanPool.Feige.InsertionExpectation +public import LeanPool.Feige.TwoPointInduction /-! # Splitting a finite product law at its last coordinate @@ -14,6 +16,8 @@ induction for Theorem 2.1. Every high set on `Fin (n + 1)` is uniquely a lifted old high set, with or without the last coordinate. -/ +@[expose] public section + open Finset namespace Feige diff --git a/LeanPool/Feige/ProductTwoPointKernel.lean b/LeanPool/Feige/ProductTwoPointKernel.lean index 66a8f12e9e..24f685567c 100644 --- a/LeanPool/Feige/ProductTwoPointKernel.lean +++ b/LeanPool/Feige/ProductTwoPointKernel.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.AugmentedTwoPointKernel -import Mathlib.MeasureTheory.Measure.FiniteMeasureProd +module + +public import LeanPool.Feige.AugmentedTwoPointKernel +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Probability.Kernel.Composition.ParallelComp import Mathlib.Probability.Kernel.Composition.Lemmas /-! @@ -15,6 +18,8 @@ finite independent product. It is the product-measure interface used in the proof of Theorem 2.1 before conditioning on all latent pairs. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Set namespace Feige diff --git a/LeanPool/Feige/RecursiveLatentProbability.lean b/LeanPool/Feige/RecursiveLatentProbability.lean index 6a835acb3c..a9f2f77add 100644 --- a/LeanPool/Feige/RecursiveLatentProbability.lean +++ b/LeanPool/Feige/RecursiveLatentProbability.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.ProductTwoPointKernel +module + +public import LeanPool.Feige.ProductTwoPointKernel /-! # Probability instance for the recursive latent product -/ +@[expose] public section + open MeasureTheory namespace Feige diff --git a/LeanPool/Feige/Reduction.lean b/LeanPool/Feige/Reduction.lean index 207e46e720..f2408d688c 100644 --- a/LeanPool/Feige/Reduction.lean +++ b/LeanPool/Feige/Reduction.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.Calibration -import LeanPool.Feige.Constants -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.MeasureTheory.Measure.Real -import Mathlib.Probability.Independence.Basic +module + +public import LeanPool.Feige.Calibration +public import LeanPool.Feige.Constants +public import Mathlib.Analysis.InnerProductSpace.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Reduction from exact calibration to Feige's inequality @@ -18,6 +21,8 @@ hypotheses. The result here is the shift, bad-event inclusion, and complement argument in the proof of Theorem 1.1. -/ +@[expose] public section + open scoped BigOperators open MeasureTheory ProbabilityTheory Set diff --git a/LeanPool/Feige/Sharpness.lean b/LeanPool/Feige/Sharpness.lean index 5887e56f80..c98af1d5f3 100644 --- a/LeanPool/Feige/Sharpness.lean +++ b/LeanPool/Feige/Sharpness.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.Reduction -import Mathlib.MeasureTheory.Measure.Real -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.Probability.Independence.Basic +module + +public import LeanPool.Feige.Reduction +public import Mathlib.Probability.Distributions.Uniform +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch import Mathlib.Probability.ProbabilityMassFunction.Integrals -import Mathlib.Probability.Distributions.Uniform +import Mathlib.Tactic.Positivity.Finset /-! # The fixed-dimensional extremal example @@ -19,6 +21,8 @@ sample space is `(Fin n → Fin (n + 1))`, with its uniform law. Coordinate every coordinate has the two-point law used in the proof outline. -/ +@[expose] public section + open scoped BigOperators ENNReal open MeasureTheory Set diff --git a/LeanPool/Feige/SignedExpLaw.lean b/LeanPool/Feige/SignedExpLaw.lean index beea5b2c5e..beb40014ca 100644 --- a/LeanPool/Feige/SignedExpLaw.lean +++ b/LeanPool/Feige/SignedExpLaw.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.FiniteSignedExp +module + +public import LeanPool.Feige.FiniteSignedExp /-! # Probability laws of signed scaled exponentials @@ -14,6 +16,8 @@ of exponential coordinates in `dirichletK` to the finite convolution law used by the TP2 proof. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Set open scoped ENNReal diff --git a/LeanPool/Feige/SimplexExponentialIdentification.lean b/LeanPool/Feige/SimplexExponentialIdentification.lean index 616501a188..69d425d408 100644 --- a/LeanPool/Feige/SimplexExponentialIdentification.lean +++ b/LeanPool/Feige/SimplexExponentialIdentification.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.SimplexExponentialLaw +module + +public import LeanPool.Feige.SimplexExponentialLaw +public import LeanPool.Feige.GeometryBridge +public import LeanPool.Feige.NormalizedExponentialProbability import LeanPool.Feige.NNRealExponentialLaw /-! @@ -14,6 +18,8 @@ simplex statistic in (2.1) and the internal exponential representation, in the `NNReal` coordinate model used by `expProductMeasure`. -/ +@[expose] public section + open scoped BigOperators ENNReal open Set MeasureTheory ProbabilityTheory diff --git a/LeanPool/Feige/SimplexExponentialLaw.lean b/LeanPool/Feige/SimplexExponentialLaw.lean index c7de4cf9eb..75847a9a43 100644 --- a/LeanPool/Feige/SimplexExponentialLaw.lean +++ b/LeanPool/Feige/SimplexExponentialLaw.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import LeanPool.Feige.NormalizedExponential +public import LeanPool.Feige.SimplexMeasure import LeanPool.Feige.NormalizedExponentialProbability -import LeanPool.Feige.GeometryBridge +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # Uniform simplex law from normalized exponentials @@ -14,6 +18,8 @@ the normalized-exponential calculation with the project's existing uniform simplex probability measure. -/ +@[expose] public section + open scoped ENNReal open MeasureTheory Set diff --git a/LeanPool/Feige/SimplexGeometry.lean b/LeanPool/Feige/SimplexGeometry.lean index f52156d5fd..c03c4352ce 100644 --- a/LeanPool/Feige/SimplexGeometry.lean +++ b/LeanPool/Feige/SimplexGeometry.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import Mathlib.Analysis.Convex.StdSimplex +module + +public import Mathlib.MeasureTheory.Constructions.Pi +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.MeasureTheory.Measure.Lebesgue.Basic /-! @@ -20,6 +23,8 @@ halfspace argument: the simplex, its centroid, and the value at that centroid of the linear functional determined by a coefficient vector. -/ +@[expose] public section + open scoped BigOperators ENNReal open MeasureTheory Set diff --git a/LeanPool/Feige/SimplexMeasure.lean b/LeanPool/Feige/SimplexMeasure.lean index 4c76667d3e..d57d31bc15 100644 --- a/LeanPool/Feige/SimplexMeasure.lean +++ b/LeanPool/Feige/SimplexMeasure.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.Constants -import LeanPool.Feige.SimplexGeometry -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +module + +public import LeanPool.Feige.Constants +public import LeanPool.Feige.SimplexGeometry +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Uniform measure and halfspace statistic on the simplex @@ -16,6 +20,8 @@ the `δ = 1` specialization of §2.2. Everything after that geometric input, including the strict-boundary/complement step, is proved here. -/ +@[expose] public section + open scoped BigOperators ENNReal open MeasureTheory ProbabilityTheory Set diff --git a/LeanPool/Feige/SteinIdentity.lean b/LeanPool/Feige/SteinIdentity.lean index 6ffc85dce8..8867bdfbd2 100644 --- a/LeanPool/Feige/SteinIdentity.lean +++ b/LeanPool/Feige/SteinIdentity.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import Mathlib.MeasureTheory.Integral.IntegralEqImproper -import Mathlib.Probability.Distributions.Exponential +module + +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # Exponential Stein identity @@ -17,6 +20,8 @@ conditions and the boundary condition at infinity needed for improper integration by parts. -/ +@[expose] public section + open MeasureTheory Real Set Filter Topology namespace Feige diff --git a/LeanPool/Feige/StrictLocalInsertion.lean b/LeanPool/Feige/StrictLocalInsertion.lean index 89ca40d723..c2b2f9fdb3 100644 --- a/LeanPool/Feige/StrictLocalInsertion.lean +++ b/LeanPool/Feige/StrictLocalInsertion.lean @@ -3,6 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import LeanPool.Feige.OrderedTwoPointInduction +import LeanPool.Feige.InsertionAnalyticAssembly +import LeanPool.Feige.InsertionEdgeRealization import LeanPool.Feige.InsertionTerminalLaw import LeanPool.Feige.TwoPointReindex @@ -14,6 +19,8 @@ then feeds the resulting local insertion principle into the permutation reduction for an arbitrary (not initially ordered) strict system. -/ +@[expose] public section + namespace Feige noncomputable section diff --git a/LeanPool/Feige/TransferAlgebra.lean b/LeanPool/Feige/TransferAlgebra.lean index 8f3f0a14c9..74ccbbd767 100644 --- a/LeanPool/Feige/TransferAlgebra.lean +++ b/LeanPool/Feige/TransferAlgebra.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import Mathlib.Basic.Real.Basic +module + +public import Mathlib.Basic.Real.Basic import Mathlib.Tactic.FieldSimp import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Ring /-! # Algebraic part of the exponential transfer identity @@ -25,6 +26,8 @@ hypotheses are needed for these implications; only the denominators have to be nonzero. -/ +@[expose] public section + namespace Feige section ExponentialTransferAlgebra diff --git a/LeanPool/Feige/TransferProbability.lean b/LeanPool/Feige/TransferProbability.lean index 50ffddcecb..dd37967e17 100644 --- a/LeanPool/Feige/TransferProbability.lean +++ b/LeanPool/Feige/TransferProbability.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import Mathlib.Probability.Distributions.Exponential +module + +public import Mathlib.Probability.Distributions.Exponential /-! # Exponential tail formulas used by the transfer identity @@ -14,6 +16,8 @@ rate-one exponential measure. In particular, the strict and non-strict tails agree, since this measure has no atoms. -/ +@[expose] public section + open MeasureTheory Real Set open scoped ENNReal diff --git a/LeanPool/Feige/TransferProbability23.lean b/LeanPool/Feige/TransferProbability23.lean index 8aef7a57c0..958face0aa 100644 --- a/LeanPool/Feige/TransferProbability23.lean +++ b/LeanPool/Feige/TransferProbability23.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.TransferStein +module + +public import LeanPool.Feige.TransferStein +public import Mathlib.Probability.Distributions.Exponential +import LeanPool.Feige.TransferProbability /-! # Probability-law formulation of the transfer Stein identities -/ +@[expose] public section + open MeasureTheory Real Set open scoped ENNReal diff --git a/LeanPool/Feige/TransferStein.lean b/LeanPool/Feige/TransferStein.lean index 65111456f8..ab1cf59dbb 100644 --- a/LeanPool/Feige/TransferStein.lean +++ b/LeanPool/Feige/TransferStein.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.TransferTestFunctions -import LeanPool.Feige.TransferProbability +module + +public import LeanPool.Feige.TransferTestFunctions +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # Measure-level transfer Stein identities @@ -14,6 +16,8 @@ The outer integrability assumptions are stated explicitly, making the result usable independently of how the law of `Y` is presented. -/ +@[expose] public section + open MeasureTheory Real Set namespace Feige diff --git a/LeanPool/Feige/TransferTestFunctions.lean b/LeanPool/Feige/TransferTestFunctions.lean index 106d60e46a..1bf2987fc9 100644 --- a/LeanPool/Feige/TransferTestFunctions.lean +++ b/LeanPool/Feige/TransferTestFunctions.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import LeanPool.Feige.SteinIdentity +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # Test functions for the exponential transfer identity @@ -14,6 +19,8 @@ equivalent to the corresponding indicator notation and makes global continuity transparent. -/ +@[expose] public section + open Real Set Filter Topology MeasureTheory namespace Feige diff --git a/LeanPool/Feige/TranslationTP2.lean b/LeanPool/Feige/TranslationTP2.lean index 57296905c7..70a146446b 100644 --- a/LeanPool/Feige/TranslationTP2.lean +++ b/LeanPool/Feige/TranslationTP2.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.ConvolutionLogConcave -import LeanPool.Feige.LikelihoodRatio +module + +public import LeanPool.Feige.ConvolutionLogConcave +public import LeanPool.Feige.LikelihoodRatio +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Translation TP2 and convolution @@ -14,6 +17,8 @@ preservation of log-concavity under convolution. It is adapted to the existing `LikelihoodRatio.densityConvolution` definition. -/ +@[expose] public section + open scoped ENNReal open MeasureTheory diff --git a/LeanPool/Feige/TwoPoint.lean b/LeanPool/Feige/TwoPoint.lean index de0b416662..8c331a4752 100644 --- a/LeanPool/Feige/TwoPoint.lean +++ b/LeanPool/Feige/TwoPoint.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.KStatistic +module + +public import LeanPool.Feige.KStatistic /-! # Mean-one two-point systems @@ -18,6 +20,8 @@ directly from the coordinatewise antitonicity of the exponential Dirichlet statistic. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Set namespace Feige diff --git a/LeanPool/Feige/TwoPointBoundary.lean b/LeanPool/Feige/TwoPointBoundary.lean index 5d7e79d598..055158305e 100644 --- a/LeanPool/Feige/TwoPointBoundary.lean +++ b/LeanPool/Feige/TwoPointBoundary.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.StrictLocalInsertion -import LeanPool.Feige.ConditionalTwoPointCalibration +module + +public import LeanPool.Feige.ConditionalTwoPointCalibration import LeanPool.Feige.BoundaryNull +import LeanPool.Feige.StrictLocalInsertion /-! # Removing strict positivity from the finite two-point bound -/ +@[expose] public section + open Filter Topology namespace Feige diff --git a/LeanPool/Feige/TwoPointInduction.lean b/LeanPool/Feige/TwoPointInduction.lean index dabd52f749..0814500a40 100644 --- a/LeanPool/Feige/TwoPointInduction.lean +++ b/LeanPool/Feige/TwoPointInduction.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.ChainInsertion -import LeanPool.Feige.ChainMeasure +module + +public import LeanPool.Feige.ChainMeasure /-! # Finite expectations in the two-point calibration argument @@ -13,6 +14,8 @@ This file defines the independent product expectation and the rejection payoff used by the ordered insertion proof. -/ +@[expose] public section + open scoped BigOperators namespace Feige diff --git a/LeanPool/Feige/TwoPointMixture.lean b/LeanPool/Feige/TwoPointMixture.lean index cbc0b61d0e..3ac14ca479 100644 --- a/LeanPool/Feige/TwoPointMixture.lean +++ b/LeanPool/Feige/TwoPointMixture.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import Mathlib.MeasureTheory.Integral.Bochner.Set -import Mathlib.MeasureTheory.Measure.Typeclasses.Probability +module + +public import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Algebraic core of the two-point mixture lemma @@ -14,6 +15,8 @@ Theorem 2.1. It isolates the equality of the lower and upper first moments and constructs the mean-one two-point law `Q_{x,y}`. -/ +@[expose] public section + open MeasureTheory Set namespace Feige diff --git a/LeanPool/Feige/TwoPointProductLaw.lean b/LeanPool/Feige/TwoPointProductLaw.lean index 761d4fb686..8ab24905d3 100644 --- a/LeanPool/Feige/TwoPointProductLaw.lean +++ b/LeanPool/Feige/TwoPointProductLaw.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.HighSetLaw +module + +public import LeanPool.Feige.HighSetLaw +public import LeanPool.Feige.TwoPointMixture import LeanPool.Feige.BoundaryNull -import LeanPool.Feige.TwoPointMixture /-! # Product laws for two-point random variables -/ +@[expose] public section + open scoped BigOperators ENNReal open Set MeasureTheory ProbabilityTheory diff --git a/LeanPool/Feige/TwoPointReindex.lean b/LeanPool/Feige/TwoPointReindex.lean index cc11892350..10e44809f3 100644 --- a/LeanPool/Feige/TwoPointReindex.lean +++ b/LeanPool/Feige/TwoPointReindex.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ -import LeanPool.Feige.OrderedTwoPointInduction -import Mathlib.Data.Fin.Tuple.Sort +module + +public import LeanPool.Feige.OrderedTwoPointInduction +public import Mathlib.Data.Fin.Tuple.Sort /-! # Reindexing and sorting finite two-point systems -/ +@[expose] public section + open MeasureTheory Set open scoped BigOperators diff --git a/LeanPool/Feige/VlassisThomas/Main.lean b/LeanPool/Feige/VlassisThomas/Main.lean index 3ab95e5013..a88c23f5b0 100644 --- a/LeanPool/Feige/VlassisThomas/Main.lean +++ b/LeanPool/Feige/VlassisThomas/Main.lean @@ -3,6 +3,10 @@ Copyright (c) 2026 Zhengqing Zhou and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhengqing Zhou, GPT-5.6 Pro -/ +module + +public import LeanPool.Feige.Calibration +public import LeanPool.Feige.KStatistic import LeanPool.Feige.IndependentCalibrationAssembly import LeanPool.Feige.TwoPointBoundary @@ -17,6 +21,8 @@ measurable two-point mixing, and normalization to coordinatewise means at most one. -/ +@[expose] public section + namespace VlassisThomas /-- The Vlassis--Thomas exact calibration theorem, uniformly over diff --git a/LeanPool/FelConjecture.lean b/LeanPool/FelConjecture.lean index 1441be1754..ce5957f5f4 100644 --- a/LeanPool/FelConjecture.lean +++ b/LeanPool/FelConjecture.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang. All rights reser Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang -/ +module -import LeanPool.FelConjecture.Solution +public import LeanPool.FelConjecture.Solution /-! # Fel's Conjecture on Syzygies of Numerical Semigroups @@ -17,6 +18,8 @@ Tags: number-theory, combinatorics, polynomials MSC: 20M14, 13D02 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/FelConjecture/Solution.lean b/LeanPool/FelConjecture/Solution.lean index b674a6c18f..de79238aec 100644 --- a/LeanPool/FelConjecture/Solution.lean +++ b/LeanPool/FelConjecture/Solution.lean @@ -3,20 +3,12 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang. All rights reser Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang -/ -import Mathlib.NumberTheory.Bernoulli -import Mathlib.Data.Nat.Choose.Sum -import Mathlib.RingTheory.PowerSeries.WellKnown -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +module + +public import Mathlib.NumberTheory.Bernoulli /-! # Fel's Conjecture for Numerical Semigroups -/ + +@[expose] public section /-- A *numerical semigroup*: an additive submonoid of `ℕ` with finite complement. -/ structure NumericalSemigroup where /-- The underlying set of natural numbers comprising the semigroup. -/ diff --git a/LeanPool/Fineqs.lean b/LeanPool/Fineqs.lean index 5c28d470e5..fb525aeb38 100644 --- a/LeanPool/Fineqs.lean +++ b/LeanPool/Fineqs.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Stefan Barańczuk, Aristotle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Stefan Barańczuk, Aristotle -/ +module -import LeanPool.Fineqs.Main +public import LeanPool.Fineqs.Main +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # FinEqs - reducing equations defining a subset of n-space over a finite field @@ -17,6 +23,8 @@ Tags: number-theory, finite-fields, algebraic-geometry MSC: 14G15, 11T06 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Fineqs/Main.lean b/LeanPool/Fineqs/Main.lean index e41443336a..8b405707a9 100644 --- a/LeanPool/Fineqs/Main.lean +++ b/LeanPool/Fineqs/Main.lean @@ -3,28 +3,28 @@ Copyright (c) 2026 Stefan Barańczuk, Aristotle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Stefan Barańczuk, Aristotle -/ +module +public import Mathlib.LinearAlgebra.Projectivization.Basic +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.GroupTheory.GroupAction.Ring +import Mathlib.LinearAlgebra.Dimension.Localization +import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas +import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition import Mathlib.LinearAlgebra.Projectivization.Cardinality -import Mathlib.LinearAlgebra.Matrix.Rank -import Mathlib.LinearAlgebra.Dimension.RankNullity -import Mathlib.Data.Set.Card -import Mathlib.FieldTheory.Finite.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +import Mathlib.RingTheory.LocalRing.Basic +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # FinEqs main file Vendored from `nasqret/fineqs`. See `LeanPool/Fineqs.lean` for the project overview. -/ +@[expose] public section + namespace LeanPool.Fineqs open scoped BigOperators diff --git a/LeanPool/FiniteGraphFundamentalGroup.lean b/LeanPool/FiniteGraphFundamentalGroup.lean index 5e843e6646..4001d213db 100644 --- a/LeanPool/FiniteGraphFundamentalGroup.lean +++ b/LeanPool/FiniteGraphFundamentalGroup.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Arthur Freitas Ramos, David Hulak, Ruy de Queiroz. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Freitas Ramos, David Hulak, Ruy de Queiroz -/ +module -import LeanPool.FiniteGraphFundamentalGroup.Consequences -import LeanPool.FiniteGraphFundamentalGroup.Cover -import LeanPool.FiniteGraphFundamentalGroup.Realization -import LeanPool.FiniteGraphFundamentalGroup.TreeContraction -import LeanPool.FiniteGraphFundamentalGroup.TopologicalComparison +public import LeanPool.FiniteGraphFundamentalGroup.Consequences +public import LeanPool.FiniteGraphFundamentalGroup.Cover +public import LeanPool.FiniteGraphFundamentalGroup.Realization +public import LeanPool.FiniteGraphFundamentalGroup.TreeContraction +public import LeanPool.FiniteGraphFundamentalGroup.TopologicalComparison /-! # Fundamental groups of finite connected graphs @@ -20,3 +21,5 @@ Main declarations: `FiniteGraphFreeGroup.graphTopologicalFundamentalGroupEquiv` Tags: algebraic-topology, graph-theory, fundamental-groups, free-groups, covering-spaces MSC: 05C25, 55Q05, 20F65 -/ + +@[expose] public section diff --git a/LeanPool/FiniteGraphFundamentalGroup/Consequences.lean b/LeanPool/FiniteGraphFundamentalGroup/Consequences.lean index 7e274f791b..e49e86d938 100644 --- a/LeanPool/FiniteGraphFundamentalGroup/Consequences.lean +++ b/LeanPool/FiniteGraphFundamentalGroup/Consequences.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Arthur Freitas Ramos, David Hulak, Ruy de Queiroz. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Freitas Ramos, David Hulak, Ruy de Queiroz -/ +module -import Mathlib.GroupTheory.FreeAbelianGroup +public import Mathlib.GroupTheory.FreeAbelianGroup +public import LeanPool.FiniteGraphFundamentalGroup.Proof import Mathlib.GroupTheory.FreeGroup.Reduce -import LeanPool.FiniteGraphFundamentalGroup.Proof /-! # Consequences of the spanning-tree computation @@ -14,6 +15,8 @@ import LeanPool.FiniteGraphFundamentalGroup.Proof This module exposes the free basis, rank identities, basepoint independence, and abelianization. -/ +@[expose] public section + open Set Function open CategoryTheory CategoryTheory.SingleObj Quiver FreeGroup diff --git a/LeanPool/FiniteGraphFundamentalGroup/Cover.lean b/LeanPool/FiniteGraphFundamentalGroup/Cover.lean index 16dc9dcaf8..5fcb9f83aa 100644 --- a/LeanPool/FiniteGraphFundamentalGroup/Cover.lean +++ b/LeanPool/FiniteGraphFundamentalGroup/Cover.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Arthur Freitas Ramos, David Hulak, Ruy de Queiroz. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Freitas Ramos, David Hulak, Ruy de Queiroz -/ +module -import Mathlib.Combinatorics.Quiver.Covering -import LeanPool.FiniteGraphFundamentalGroup.Proof +public import Mathlib.Combinatorics.Quiver.Covering +public import Mathlib.Algebra.Group.End +public import Mathlib.CategoryTheory.Groupoid.FreeGroupoid +import Mathlib.CategoryTheory.Elementwise +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.SetLike /-! # The path-lifting graph cover @@ -13,6 +19,8 @@ import LeanPool.FiniteGraphFundamentalGroup.Proof This module constructs the standard combinatorial unfolding of a rooted quiver. -/ +@[expose] public section + open CategoryTheory Quiver noncomputable section diff --git a/LeanPool/FiniteGraphFundamentalGroup/Proof.lean b/LeanPool/FiniteGraphFundamentalGroup/Proof.lean index d5caa2a06d..530b368744 100644 --- a/LeanPool/FiniteGraphFundamentalGroup/Proof.lean +++ b/LeanPool/FiniteGraphFundamentalGroup/Proof.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Arthur Freitas Ramos, David Hulak, Ruy de Queiroz. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Freitas Ramos, David Hulak, Ruy de Queiroz -/ +module -import Mathlib.CategoryTheory.Groupoid.FreeGroupoid -import Mathlib.CategoryTheory.Endomorphism -import Mathlib.GroupTheory.FreeGroup.NielsenSchreier +public import Mathlib.CategoryTheory.Groupoid.FreeGroupoid +public import Mathlib.GroupTheory.FreeGroup.NielsenSchreier /-! # The spanning-tree computation for finite quivers @@ -16,6 +16,8 @@ Mathlib's free groupoid and identifies a basis indexed by the edges outside a ge tree. -/ +@[expose] public section + attribute [local implicit_reducible] Quiver.Symmetrify IsFreeGroupoid.Generators WideSubquiver WideSubquiver.toType WideSubquiver.quiver IsFreeGroupoid.quiverGenerators @@ -247,12 +249,14 @@ lemma symmetrified_tree_set_card [Fintype V] [∀ a b : V, Fintype (a ⟶ b)] rw [← Fintype.card_congr (wideTotalEquiv (wideSubquiverSymmetrify T))] exact symmetrified_tree_card T -private abbrev spanningRoot {G : Type u} [Groupoid.{u} G] [IsFreeGroupoid G] +/-- The root of the chosen spanning arborescence, viewed in the ambient groupoid. -/ +abbrev spanningRoot {G : Type u} [Groupoid.{u} G] [IsFreeGroupoid G] (T : WideSubquiver (Symmetrify (IsFreeGroupoid.Generators G))) [Arborescence T] : G := show T from root T +/-- Interpret an oriented spanning-tree path as an ambient groupoid morphism. -/ @[reducible] -private def spanningHomOfPath {G : Type u} [Groupoid.{u} G] [IsFreeGroupoid G] +def spanningHomOfPath {G : Type u} [Groupoid.{u} G] [IsFreeGroupoid G] (T : WideSubquiver (Symmetrify (IsFreeGroupoid.Generators G))) [Arborescence T] : ∀ {a : G}, Path (root T) a → (spanningRoot T ⟶ a) | _, Path.nil => 𝟙 _ @@ -260,8 +264,9 @@ private def spanningHomOfPath {G : Type u} [Groupoid.{u} G] [IsFreeGroupoid G] spanningHomOfPath T p ≫ Sum.recOn f.val (fun e => IsFreeGroupoid.of e) fun e => inv (IsFreeGroupoid.of e) +/-- The ambient groupoid morphism represented by the chosen tree path. -/ @[reducible] -private def spanningTreeHom {G : Type u} [Groupoid.{u} G] [IsFreeGroupoid G] +def spanningTreeHom {G : Type u} [Groupoid.{u} G] [IsFreeGroupoid G] (T : WideSubquiver (Symmetrify (IsFreeGroupoid.Generators G))) [Arborescence T] (a : G) : spanningRoot T ⟶ a := spanningHomOfPath T default @@ -277,8 +282,9 @@ private lemma spanningTreeHom_root {G : Type u} [Groupoid.{u} G] [IsFreeGroupoid spanningTreeHom T (spanningRoot T) = 𝟙 _ := by rw [spanningTreeHom_eq T Path.nil] +/-- Close a groupoid morphism into a loop using the spanning-tree paths. -/ @[reducible] -private def spanningLoopOfHom {G : Type u} [Groupoid.{u} G] [IsFreeGroupoid G] +def spanningLoopOfHom {G : Type u} [Groupoid.{u} G] [IsFreeGroupoid G] (T : WideSubquiver (Symmetrify (IsFreeGroupoid.Generators G))) [Arborescence T] {a b : G} (p : a ⟶ b) : End (spanningRoot T) := spanningTreeHom T a ≫ p ≫ inv (spanningTreeHom T b) @@ -325,40 +331,41 @@ noncomputable def spanningTreeBasis {G : Type u} [Groupoid.{u} G] [IsFreeGroupoi apply FreeGroupBasis.ofUniqueLift X (fun e => spanningLoopOfHom T (IsFreeGroupoid.of e.val.hom)) intro Y _ f - let f' : Labelling (IsFreeGroupoid.Generators G) Y := fun a b e => - if h : e ∈ wideSubquiverSymmetrify T a b then 1 else f ⟨⟨a, b, e⟩, h⟩ - rcases IsFreeGroupoid.unique_lift f' with ⟨F', hF', uF'⟩ - refine ⟨F'.mapEnd _, ?_, ?_⟩ - · suffices ∀ {x y} (q : x ⟶ y), F'.map (spanningLoopOfHom T q) = (F'.map q : Y) by - rintro ⟨⟨a, b, e⟩, h⟩ - simp only [Functor.mapEnd, DFunLike.coe, this, hF'] - exact dite_eq_right h - intro x y q - suffices ∀ {a} (p : Path (root T) a), F'.map (spanningHomOfPath T p) = 1 by - simp only [this, spanningTreeHom, comp_as_mul, inv_as_inv, spanningLoopOfHom, inv_one, - mul_one, one_mul, Functor.map_inv, Functor.map_comp] - intro a p - induction p with - | nil => rw [spanningHomOfPath, F'.map_id, id_as_one] - | cons p e ih => - rw [spanningHomOfPath, F'.map_comp, comp_as_mul, ih, mul_one] - rcases e with ⟨e | e, eT⟩ - · rw [hF'] - exact dite_eq_left (Or.inl eT) - · rw [F'.map_inv, inv_as_inv, inv_eq_one, hF'] - exact dite_eq_left (Or.inr eT) - · intro E hE - ext x - suffices (spanningFunctorOfMonoidHom T E).map x = F'.map x by - simpa only [spanningLoopOfHom, spanningFunctorOfMonoidHom, IsIso.inv_id, - spanningTreeHom_root, Category.id_comp, Category.comp_id] using! this - congr - apply uF' - intro a b e - change E (spanningLoopOfHom T _) = dite _ _ _ - split_ifs with h - · rw [spanningLoopOfHom_eq_id T e h, ← CategoryTheory.End.one_def, E.map_one] - · exact hE ⟨⟨a, b, e⟩, h⟩ + exact private_decl% (by + let f' : Labelling (IsFreeGroupoid.Generators G) Y := fun a b e => + if h : e ∈ wideSubquiverSymmetrify T a b then 1 else f ⟨⟨a, b, e⟩, h⟩ + rcases IsFreeGroupoid.unique_lift f' with ⟨F', hF', uF'⟩ + refine ⟨F'.mapEnd _, ?_, ?_⟩ + · suffices ∀ {x y} (q : x ⟶ y), F'.map (spanningLoopOfHom T q) = (F'.map q : Y) by + rintro ⟨⟨a, b, e⟩, h⟩ + simp only [Functor.mapEnd, DFunLike.coe, this, hF'] + exact dite_eq_right h + intro x y q + suffices ∀ {a} (p : Path (root T) a), F'.map (spanningHomOfPath T p) = 1 by + simp only [this, spanningTreeHom, comp_as_mul, inv_as_inv, spanningLoopOfHom, inv_one, + mul_one, one_mul, Functor.map_inv, Functor.map_comp] + intro a p + induction p with + | nil => rw [spanningHomOfPath, F'.map_id, id_as_one] + | cons p e ih => + rw [spanningHomOfPath, F'.map_comp, comp_as_mul, ih, mul_one] + rcases e with ⟨e | e, eT⟩ + · rw [hF'] + exact dite_eq_left (Or.inl eT) + · rw [F'.map_inv, inv_as_inv, inv_eq_one, hF'] + exact dite_eq_left (Or.inr eT) + · intro E hE + ext x + suffices (spanningFunctorOfMonoidHom T E).map x = F'.map x by + simpa only [spanningLoopOfHom, spanningFunctorOfMonoidHom, IsIso.inv_id, + spanningTreeHom_root, Category.id_comp, Category.comp_id] using! this + congr + apply uF' + intro a b e + change E (spanningLoopOfHom T _) = dite _ _ _ + split_ifs with h + · rw [spanningLoopOfHom_eq_id T e h, ← CategoryTheory.End.one_def, E.map_one] + · exact hE ⟨⟨a, b, e⟩, h⟩) instance freeGroupoidIsFree : IsFreeGroupoid (Quiver.FreeGroupoid V) where quiverGenerators := diff --git a/LeanPool/FiniteGraphFundamentalGroup/Realization.lean b/LeanPool/FiniteGraphFundamentalGroup/Realization.lean index 807fff1b52..be40d26520 100644 --- a/LeanPool/FiniteGraphFundamentalGroup/Realization.lean +++ b/LeanPool/FiniteGraphFundamentalGroup/Realization.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Arthur Freitas Ramos, David Hulak, Ruy de Queiroz. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Freitas Ramos, David Hulak, Ruy de Queiroz -/ +module -import Mathlib.AlgebraicTopology.FundamentalGroupoid.FundamentalGroup -import Mathlib.AlgebraicTopology.FundamentalGroupoid.InducedMaps -import Mathlib.Topology.Connected.PathConnected -import Mathlib.Topology.Constructions -import Mathlib.Topology.Order -import LeanPool.FiniteGraphFundamentalGroup.Proof + +public import Mathlib.AlgebraicTopology.FundamentalGroupoid.FundamentalGroup +public import LeanPool.FiniteGraphFundamentalGroup.Proof +import Mathlib.Topology.WithTopology /-! # Geometric realization of a finite quiver @@ -17,6 +16,8 @@ import LeanPool.FiniteGraphFundamentalGroup.Proof This module realizes vertices discretely and every directed edge as a separate interval cell. -/ +@[expose] public section + open Set Function open CategoryTheory CategoryTheory.SingleObj Quiver open unitInterval @@ -298,6 +299,9 @@ theorem graphRealization_pathConnected {V : Type u} [Quiver.{u} V] theorem graphRealization_compact {V : Type u} [Quiver.{u} V] [Finite V] [FiniteQuiver V] : CompactSpace (graphRealization V) := by let _ : Fintype V := Fintype.ofFinite V + let _ : Finite (Quiver.Total V) := Finite.of_injective + (fun e : Quiver.Total V ↦ (⟨e.left, e.right, e.hom⟩ : Σ a b : V, a ⟶ b)) + (by intro a b h; cases a; cases b; cases h; rfl) let _ : CompactSpace (graphRealizationPre V) := by infer_instance infer_instance diff --git a/LeanPool/FiniteGraphFundamentalGroup/TopologicalComparison.lean b/LeanPool/FiniteGraphFundamentalGroup/TopologicalComparison.lean index 6e054351dc..e4e8b64721 100644 --- a/LeanPool/FiniteGraphFundamentalGroup/TopologicalComparison.lean +++ b/LeanPool/FiniteGraphFundamentalGroup/TopologicalComparison.lean @@ -3,15 +3,15 @@ Copyright (c) 2026 Arthur Freitas Ramos, David Hulak, Ruy de Queiroz. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Freitas Ramos, David Hulak, Ruy de Queiroz -/ +module -import Mathlib.Topology.Covering.Basic -import Mathlib.Topology.Homotopy.Lifting -import Mathlib.GroupTheory.FreeGroup.Reduce -import LeanPool.FiniteGraphFundamentalGroup.Cover -import LeanPool.FiniteGraphFundamentalGroup.Realization -import LeanPool.FiniteGraphFundamentalGroup.TopologicalCover +public import LeanPool.FiniteGraphFundamentalGroup.TopologicalCover +public import LeanPool.FiniteGraphFundamentalGroup.Consequences +public import Mathlib.Topology.Homotopy.Contractible import LeanPool.FiniteGraphFundamentalGroup.TreeContraction -import LeanPool.FiniteGraphFundamentalGroup.Consequences +import Mathlib.GroupTheory.FreeGroup.Reduce +import Mathlib.Topology.Homotopy.Lifting +import Mathlib.Topology.WithTopology /-! # Comparison of combinatorial and topological fundamental groups @@ -19,6 +19,8 @@ import LeanPool.FiniteGraphFundamentalGroup.Consequences This module identifies the free-groupoid computation with the fundamental group of the realization. -/ +@[expose] public section + attribute [local implicit_reducible] Quiver.Symmetrify Quiver.FreeGroupoid Quiver.FreeGroupoid.of IsFreeGroupoid.Generators WideSubquiver WideSubquiver.toType WideSubquiver.quiver IsFreeGroupoid.quiverGenerators diff --git a/LeanPool/FiniteGraphFundamentalGroup/TopologicalCover.lean b/LeanPool/FiniteGraphFundamentalGroup/TopologicalCover.lean index e7976bcb48..de3d5e1040 100644 --- a/LeanPool/FiniteGraphFundamentalGroup/TopologicalCover.lean +++ b/LeanPool/FiniteGraphFundamentalGroup/TopologicalCover.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Arthur Freitas Ramos, David Hulak, Ruy de Queiroz. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Freitas Ramos, David Hulak, Ruy de Queiroz -/ +module -import Mathlib.Topology.Covering.Basic -import Mathlib.Topology.Homotopy.Lifting -import LeanPool.FiniteGraphFundamentalGroup.Cover -import LeanPool.FiniteGraphFundamentalGroup.Realization +public import Mathlib.Topology.Covering.Basic +public import LeanPool.FiniteGraphFundamentalGroup.Cover +public import LeanPool.FiniteGraphFundamentalGroup.Realization +import Mathlib.Topology.WithTopology /-! # Local charts and topological graph covers @@ -15,6 +16,8 @@ import LeanPool.FiniteGraphFundamentalGroup.Realization This module verifies the local topology needed to realize the combinatorial path-lifting cover. -/ +@[expose] public section + open Set Function open CategoryTheory CategoryTheory.SingleObj Quiver open unitInterval diff --git a/LeanPool/FiniteGraphFundamentalGroup/TreeContraction.lean b/LeanPool/FiniteGraphFundamentalGroup/TreeContraction.lean index ff25c1f184..57a22598d4 100644 --- a/LeanPool/FiniteGraphFundamentalGroup/TreeContraction.lean +++ b/LeanPool/FiniteGraphFundamentalGroup/TreeContraction.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Arthur Freitas Ramos, David Hulak, Ruy de Queiroz. All rights Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Freitas Ramos, David Hulak, Ruy de Queiroz -/ +module -import Mathlib.AlgebraicTopology.FundamentalGroupoid.SimplyConnected -import Mathlib.Combinatorics.Quiver.Arborescence -import LeanPool.FiniteGraphFundamentalGroup.Realization +public import Mathlib.AlgebraicTopology.FundamentalGroupoid.SimplyConnected +public import LeanPool.FiniteGraphFundamentalGroup.Realization /-! # Contraction of a directed tree realization @@ -14,6 +14,8 @@ import LeanPool.FiniteGraphFundamentalGroup.Realization This module constructs cellwise contraction data from the unique paths in an arborescence. -/ +@[expose] public section + open Set Function open CategoryTheory CategoryTheory.SingleObj Quiver open unitInterval @@ -66,7 +68,8 @@ theorem graphTreeRootPath_cons {a b : V} (e : a ⟶ b) : rw [h] rfl -private def treeContractionCoordinate (t s : I) : I := +/-- The interval coordinate used while contracting a tree edge. -/ +def treeContractionCoordinate (t s : I) : I := ⟨(1 - (s : ℝ)) * ((1 + (t : ℝ)) / 2), by have hs : 0 ≤ 1 - (s : ℝ) := by linarith [s.2.2] have hs' : 1 - (s : ℝ) ≤ 1 := by linarith [s.2.1] @@ -117,8 +120,8 @@ theorem treeContractionCoordinate_one_right (t : I) : /-- The square which contracts the cell of an edge towards the root. -/ def graphTreeEdgeContraction (e : Quiver.Total V) : C(I × I, graphRealization V) where toFun p := graphTreeRootPath e.right (treeContractionCoordinate p.1 p.2) - continuous_toFun := - (graphTreeRootPath e.right).continuous.comp continuous_treeContractionCoordinate + continuous_toFun := by + exact (graphTreeRootPath e.right).continuous.comp continuous_treeContractionCoordinate /-- The path which contracts a vertex of the tree to the root. -/ def graphTreeVertexContraction (v : V) : C(I, graphRealization V) := diff --git a/LeanPool/FiveEighthsTheorem.lean b/LeanPool/FiveEighthsTheorem.lean index 77b7955f63..b89838fcb2 100644 --- a/LeanPool/FiveEighthsTheorem.lean +++ b/LeanPool/FiveEighthsTheorem.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module -import LeanPool.FiveEighthsTheorem.Basic +public import LeanPool.FiveEighthsTheorem.Basic /-! # The 5/8 theorem @@ -16,3 +17,5 @@ Main declarations: `FiveEighths.commProb_le_five_eighths` Tags: group-theory, finite-groups, commuting-probability MSC: 20P05 -/ + +@[expose] public section diff --git a/LeanPool/FiveEighthsTheorem/Basic.lean b/LeanPool/FiveEighthsTheorem/Basic.lean index 5dea13a07a..1321bfccd4 100644 --- a/LeanPool/FiveEighthsTheorem/Basic.lean +++ b/LeanPool/FiveEighthsTheorem/Basic.lean @@ -3,19 +3,11 @@ Copyright (c) 2026 Xuanji Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xuanji Li -/ +module +public import Mathlib.GroupTheory.CommutingProbability import Mathlib.Algebra.BigOperators.Field -import Mathlib.Data.Set.Card -import Mathlib.GroupTheory.CommutingProbability -import Mathlib.GroupTheory.Index -import Mathlib.GroupTheory.SpecificGroups.Cyclic -import Mathlib.GroupTheory.Subgroup.Centralizer -import Mathlib.Logic.Equiv.Set -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Linarith.Frontend /-! # The 5/8 theorem @@ -47,6 +39,8 @@ The proof is the classical counting argument: All declarations live in the `FiveEighths` namespace. -/ +@[expose] public section + namespace FiveEighths /-- The fraction of elements of a finite group `G` that lie in its center. -/ diff --git a/LeanPool/Flean.lean b/LeanPool/Flean.lean index 061d296873..e15a65ec83 100644 --- a/LeanPool/Flean.lean +++ b/LeanPool/Flean.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Joseph McKinsey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph McKinsey -/ +module -import LeanPool.Flean.Basic +public import LeanPool.Flean.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.Positivity.Finset /-! # Flean: Floating-Point Numbers in Lean @@ -17,6 +20,8 @@ Tags: floating-point, numerical-analysis, ieee-754, rounding MSC: 65G50, 65G30, 68V20 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Flean/Basic.lean b/LeanPool/Flean/Basic.lean index 8c4e6a7ebf..957b10c99e 100644 --- a/LeanPool/Flean/Basic.lean +++ b/LeanPool/Flean/Basic.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Joseph McKinsey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph McKinsey -/ -import LeanPool.Flean.FloatCfg -import LeanPool.Flean.Subnorm -import LeanPool.Flean.FloatRep -import LeanPool.Flean.Rounding +module + +public import Mathlib.Order.Closure + +public import Mathlib.Data.FunLike.IsApply + +public import LeanPool.Flean.Subnorm +public import LeanPool.Flean.Rounding +public meta import Lean.Meta.Tactic.NormCast +public import Mathlib.Algebra.Order.SuccPred +import LeanPool.Flean.LogRules +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.Positivity.Finset /-! # Floating-Point Numbers @@ -17,6 +26,8 @@ and `toRat` between rationals and floats, and the round-trip and rounding-error correctness results such as `to_float_to_rat`. -/ +@[expose] public section + variable {C : FloatCfg} /-- Round a rational to a subnormal representation using the mode in scope. -/ diff --git a/LeanPool/Flean/FloatCfg.lean b/LeanPool/Flean/FloatCfg.lean index 4898b9d447..242aa0d3a8 100644 --- a/LeanPool/Flean/FloatCfg.lean +++ b/LeanPool/Flean/FloatCfg.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Joseph McKinsey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph McKinsey -/ -import Mathlib.Data.Rat.Defs +module + +public import Aesop.BuiltinRules +public import Mathlib.Data.Int.Notation +public import Mathlib.Data.Nat.Notation +public import Mathlib.Tactic.ToDual /-! # Floating-Point Configuration @@ -13,6 +18,8 @@ describe a floating-point format, along with the available `RoundingMode`s and a `Rounding` typeclass selecting the mode in scope. -/ +@[expose] public section + /-- A floating-point format: a precision `prec` and an exponent range `[emin, emax]`. -/ structure FloatCfg where diff --git a/LeanPool/Flean/FloatRep.lean b/LeanPool/Flean/FloatRep.lean index a078eb25de..ecafaff082 100644 --- a/LeanPool/Flean/FloatRep.lean +++ b/LeanPool/Flean/FloatRep.lean @@ -3,17 +3,15 @@ Copyright (c) 2026 Joseph McKinsey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph McKinsey -/ -import Mathlib.Data.Rat.Defs -import Mathlib.Data.Rat.Floor -import Mathlib.Analysis.SpecialFunctions.Log.Base -import Mathlib.Data.Int.Log -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.WLOG -import Mathlib.Tactic.Tauto -import LeanPool.Flean.FloatCfg +module + +public import Mathlib.Data.Rat.Floor +public import Mathlib.Data.Int.Log +public import LeanPool.Flean.FloatCfg +public import Mathlib.Tactic.Continuity import LeanPool.Flean.LogRules +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.Positivity.Finset /-! # Floating-Point Representations @@ -24,6 +22,8 @@ interpretation `coeQ`, negation, validity predicates, and an ordering `floatrepLe` proved equivalent to the order on the underlying rationals. -/ +@[expose] public section + /-- A sign/exponent/mantissa representation of a (normal) floating-point number in the format `α`. -/ structure FloatRep (α : FloatCfg) where diff --git a/LeanPool/Flean/IntRounding.lean b/LeanPool/Flean/IntRounding.lean index 65ed42b2df..aa2262f572 100644 --- a/LeanPool/Flean/IntRounding.lean +++ b/LeanPool/Flean/IntRounding.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Joseph McKinsey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph McKinsey -/ -import Mathlib.Data.Rat.Defs -import Mathlib.Data.Rat.Floor -import Mathlib.Tactic.Positivity.Core -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Qify +module + +public import Mathlib.Data.Rat.Floor import Mathlib.Algebra.Order.Interval.Set.Group +import Mathlib.Tactic.Qify /-! # Integer Rounding Functions @@ -19,6 +18,8 @@ mantissa, together with their basic correctness properties such as round-to-even behaviour on half-integers. -/ +@[expose] public section + /-- An integer-valued rounding rule taking a sign bit and a rational mantissa. -/ abbrev IntRounder := Bool → ℚ → ℕ @@ -317,7 +318,7 @@ lemma round_near_eq_iff (q : ℚ) (z : ℤ) : open Lean Meta Qq Mathlib.Meta.Positivity in /-- A `positivity` extension proving `0 ≤ roundNearInt q` from `0 ≤ q`. -/ @[positivity roundNearInt _] -def evalRoundNearInt : PositivityExt where eval {u α} _ pα? e := do +meta def evalRoundNearInt : PositivityExt where eval {u α} _ pα? e := do match u, α, e with | 0, ~q(ℤ), ~q(roundNearInt $a) => match (dependent := true) pα? with diff --git a/LeanPool/Flean/LogRules.lean b/LeanPool/Flean/LogRules.lean index d5f57a8634..336b3d011e 100644 --- a/LeanPool/Flean/LogRules.lean +++ b/LeanPool/Flean/LogRules.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Joseph McKinsey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph McKinsey -/ -import Mathlib.Data.Rat.Defs -import Mathlib.Data.Rat.Floor -import Mathlib.Analysis.SpecialFunctions.Log.Base -import Mathlib.Data.Int.Log -import LeanPool.Flean.FloatCfg +module + +public import Mathlib.Data.Rat.Floor +public import Mathlib.Data.Int.Log +public import LeanPool.Flean.FloatCfg +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Logarithmic Properties of Scientific Notation for Floating-Point @@ -15,6 +16,8 @@ This module proves facts in ℚ about the sizes and properties of values like x * b^e where x is in [1, b) and e is an integer. -/ +@[expose] public section + variable {C : FloatCfg} /-- For 1 ≤ x, (x * b^e) has an exponent at least e. -/ diff --git a/LeanPool/Flean/Rounding.lean b/LeanPool/Flean/Rounding.lean index f0f106660b..80d2ead691 100644 --- a/LeanPool/Flean/Rounding.lean +++ b/LeanPool/Flean/Rounding.lean @@ -3,19 +3,14 @@ Copyright (c) 2026 Joseph McKinsey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph McKinsey -/ -import Mathlib.Data.Rat.Defs -import Mathlib.Data.Rat.Floor -import Mathlib.Analysis.SpecialFunctions.Log.Base -import Mathlib.Data.Int.Log -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.WLOG -import Mathlib.Tactic.Tauto -import LeanPool.Flean.FloatRep -import LeanPool.Flean.FloatCfg +module + +public import LeanPool.Flean.FloatRep +public import LeanPool.Flean.IntRounding import LeanPool.Flean.LogRules -import LeanPool.Flean.IntRounding +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Qify /-! # Rounding Rationals to Floating-Point Representations @@ -26,6 +21,8 @@ correctness and error-bound results (such as `roundf_close`) controlling the distance between a rational and its rounded floating-point value. -/ +@[expose] public section + variable {C : FloatCfg} diff --git a/LeanPool/Flean/Subnorm.lean b/LeanPool/Flean/Subnorm.lean index f989ad8bb6..e71aa628ef 100644 --- a/LeanPool/Flean/Subnorm.lean +++ b/LeanPool/Flean/Subnorm.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Joseph McKinsey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph McKinsey -/ -import LeanPool.Flean.FloatCfg +module + +public import LeanPool.Flean.FloatCfg +public import LeanPool.Flean.IntRounding +public import Mathlib.Data.Int.Log import LeanPool.Flean.LogRules -import LeanPool.Flean.IntRounding +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.Qify /-! # Subnormal Floating-Point Representations @@ -15,6 +20,8 @@ floating-point numbers, its rational interpretation, rounding to subnormals, and the validity and error properties of subnormal rounding. -/ +@[expose] public section + variable {C : FloatCfg} /-- A sign/mantissa representation of a subnormal floating-point number. -/ diff --git a/LeanPool/FltRegular.lean b/LeanPool/FltRegular.lean index 4811796e51..1f4ed2973b 100644 --- a/LeanPool/FltRegular.lean +++ b/LeanPool/FltRegular.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 FltRegular contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FltRegular contributors -/ +module -import LeanPool.FltRegular.FltRegular +public import LeanPool.FltRegular.FltRegular /-! # Fermat's Last Theorem for regular primes @@ -16,3 +17,5 @@ Main declarations: `flt_regular` Tags: algebraic-number-theory, fermats-last-theorem, cyclotomic-fields, class-groups, regular-primes MSC: 11D41, 11R18, 11R29 -/ + +@[expose] public section diff --git a/LeanPool/FltRegular/CaseII/AuxLemmas.lean b/LeanPool/FltRegular/CaseII/AuxLemmas.lean index 5321e4f4cf..9c17ce7a23 100644 --- a/LeanPool/FltRegular/CaseII/AuxLemmas.lean +++ b/LeanPool/FltRegular/CaseII/AuxLemmas.lean @@ -6,8 +6,9 @@ Authors: FltRegular contributors module -public import Mathlib.RingTheory.ClassGroup.Basic import Mathlib.RingTheory.DedekindDomain.Ideal.Lemmas +public import Mathlib.RingTheory.DedekindDomain.Basic +public import Mathlib.RingTheory.FractionalIdeal.Operations /-! # Auxiliary lemmas for the second case diff --git a/LeanPool/FltRegular/CaseII/Statement.lean b/LeanPool/FltRegular/CaseII/Statement.lean index 1d9f3c6413..b1db540ff8 100644 --- a/LeanPool/FltRegular/CaseII/Statement.lean +++ b/LeanPool/FltRegular/CaseII/Statement.lean @@ -8,7 +8,6 @@ module public import LeanPool.FltRegular.NumberTheory.RegularPrimes import LeanPool.FltRegular.CaseII.InductionStep -import Mathlib.Order.CompletePartialOrder public import Mathlib.NumberTheory.NumberField.Cyclotomic.Basic import Mathlib.NumberTheory.NumberField.Cyclotomic.Ideal diff --git a/LeanPool/FltRegular/FltRegular.lean b/LeanPool/FltRegular/FltRegular.lean index 4f61962d25..4d48c279b0 100644 --- a/LeanPool/FltRegular/FltRegular.lean +++ b/LeanPool/FltRegular/FltRegular.lean @@ -11,7 +11,6 @@ public import Mathlib.NumberTheory.FLT.Basic public import LeanPool.FltRegular.NumberTheory.RegularPrimes import LeanPool.FltRegular.CaseI.Statement import LeanPool.FltRegular.CaseII.Statement -import LeanPool.FltRegular.MayAssume.Lemmas /-! # Fermat's Last Theorem for regular primes diff --git a/LeanPool/FltRegular/NumberTheory/Cyclotomic/CyclRat.lean b/LeanPool/FltRegular/NumberTheory/Cyclotomic/CyclRat.lean index 3b523e9e18..706f5501c2 100644 --- a/LeanPool/FltRegular/NumberTheory/Cyclotomic/CyclRat.lean +++ b/LeanPool/FltRegular/NumberTheory/Cyclotomic/CyclRat.lean @@ -7,7 +7,8 @@ Authors: FltRegular contributors module public import Mathlib.NumberTheory.Cyclotomic.Basic -import Mathlib.NumberTheory.NumberField.Cyclotomic.Ideal +import Mathlib.NumberTheory.NumberField.Cyclotomic.Basic +import Mathlib.RingTheory.RootsOfUnity.CyclotomicUnits /-! # Ideals in rational cyclotomic fields diff --git a/LeanPool/FltRegular/NumberTheory/Hilbert92.lean b/LeanPool/FltRegular/NumberTheory/Hilbert92.lean index 9d05c1335f..71b96db19e 100644 --- a/LeanPool/FltRegular/NumberTheory/Hilbert92.lean +++ b/LeanPool/FltRegular/NumberTheory/Hilbert92.lean @@ -8,8 +8,8 @@ module public import LeanPool.FltRegular.NumberTheory.SystemOfUnits public import Mathlib.NumberTheory.NumberField.Units.DirichletTheorem -public import Mathlib.GroupTheory.FiniteAbelian.Basic -public import Mathlib.LinearAlgebra.Dimension.Torsion.Finite +import Mathlib.GroupTheory.FiniteAbelian.Basic +import Mathlib.LinearAlgebra.Dimension.Torsion.Finite /-! # Hilbert's theorem 92 diff --git a/LeanPool/FltRegular/NumberTheory/Unramified.lean b/LeanPool/FltRegular/NumberTheory/Unramified.lean index 62c1f27a36..0bdd4a73d3 100644 --- a/LeanPool/FltRegular/NumberTheory/Unramified.lean +++ b/LeanPool/FltRegular/NumberTheory/Unramified.lean @@ -10,7 +10,6 @@ public import Mathlib.RingTheory.IntegralClosure.IntegralRestrict import Mathlib.NumberTheory.RamificationInertia.Galois import Mathlib.RingTheory.DedekindDomain.Different import Mathlib.RingTheory.DedekindDomain.Factorization -public import Mathlib.RingTheory.DedekindDomain.Ideal.Lemmas public import Mathlib.RingTheory.Unramified.Locus /-! diff --git a/LeanPool/FoZfc.lean b/LeanPool/FoZfc.lean index f0c393ea0c..b07ed3b26c 100644 --- a/LeanPool/FoZfc.lean +++ b/LeanPool/FoZfc.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Tetsuya Ishiu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tetsuya Ishiu -/ +module -import LeanPool.FoZfc.Basic -import LeanPool.FoZfc.FixedSnoc -import LeanPool.FoZfc.BoundedFormulaOps -import LeanPool.FoZfc.Tostring -import LeanPool.FoZfc.Axioms -import LeanPool.FoZfc.Replacement +public import LeanPool.FoZfc.Basic +public import LeanPool.FoZfc.FixedSnoc +public import LeanPool.FoZfc.BoundedFormulaOps +public import LeanPool.FoZfc.Tostring +public import LeanPool.FoZfc.Axioms +public import LeanPool.FoZfc.Replacement /-! # First Order Language of ZF Set Theory @@ -22,6 +23,8 @@ Tags: model-theory, set-theory, zf MSC: 03B10, 03E30 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/FoZfc/Axioms.lean b/LeanPool/FoZfc/Axioms.lean index 1427be00ae..67af43b0e2 100644 --- a/LeanPool/FoZfc/Axioms.lean +++ b/LeanPool/FoZfc/Axioms.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Tetsuya Ishiu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tetsuya Ishiu -/ +module -import Init.Data.Fin.Basic -import LeanPool.FoZfc.Basic -import LeanPool.FoZfc.Tostring -import LeanPool.FoZfc.FixedSnoc -import LeanPool.FoZfc.BoundedFormulaOps +public import LeanPool.FoZfc.Basic +public import LeanPool.FoZfc.FixedSnoc +public import LeanPool.FoZfc.BoundedFormulaOps /-! # Axioms of ZF except Replacement. @@ -47,6 +46,8 @@ import LeanPool.FoZfc.BoundedFormulaOps -/ +@[expose] public section + open FirstOrder open FirstOrder.Language open FirstOrder.Language.BoundedFormula diff --git a/LeanPool/FoZfc/Basic.lean b/LeanPool/FoZfc/Basic.lean index 84b3803069..bdf20db9d4 100644 --- a/LeanPool/FoZfc/Basic.lean +++ b/LeanPool/FoZfc/Basic.lean @@ -3,12 +3,9 @@ Copyright (c) 2026 Tetsuya Ishiu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tetsuya Ishiu -/ +module -import Mathlib.Data.Set.Basic -import Mathlib.ModelTheory.Basic -import Mathlib.ModelTheory.Syntax -import Mathlib.ModelTheory.Semantics -import Mathlib.Data.Fin.Tuple.Basic +public import Mathlib.ModelTheory.Semantics /-! # The Basics of First Order Language of ZFC set theory @@ -41,6 +38,8 @@ import Mathlib.Data.Fin.Tuple.Basic -/ +@[expose] public section + namespace FirstOrder open FirstOrder.Language open FirstOrder.Language.BoundedFormula diff --git a/LeanPool/FoZfc/BoundedFormulaOps.lean b/LeanPool/FoZfc/BoundedFormulaOps.lean index 45a57aa4d5..9d35c9e6f2 100644 --- a/LeanPool/FoZfc/BoundedFormulaOps.lean +++ b/LeanPool/FoZfc/BoundedFormulaOps.lean @@ -3,13 +3,9 @@ Copyright (c) 2026 Tetsuya Ishiu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tetsuya Ishiu -/ +module -import Mathlib.Data.Set.Basic -import Mathlib.ModelTheory.Basic -import Mathlib.ModelTheory.Syntax -import Mathlib.ModelTheory.Semantics -import Mathlib.Data.Fin.Tuple.Basic -import Mathlib.Tactic.Cases +public import Mathlib.ModelTheory.Semantics import LeanPool.FoZfc.FixedSnoc /-! @@ -40,6 +36,8 @@ import LeanPool.FoZfc.FixedSnoc -/ +@[expose] public section + open FirstOrder open FirstOrder.Language open FirstOrder.Language.BoundedFormula diff --git a/LeanPool/FoZfc/FixedSnoc.lean b/LeanPool/FoZfc/FixedSnoc.lean index 38b0bc34b9..3fdb08dd44 100644 --- a/LeanPool/FoZfc/FixedSnoc.lean +++ b/LeanPool/FoZfc/FixedSnoc.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Tetsuya Ishiu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tetsuya Ishiu -/ +module -import Init.Data.Fin.Basic -import Mathlib.Data.Set.Basic -import Mathlib.Data.Fin.Tuple.Basic -import Mathlib.Data.Fin.VecNotation +public import Mathlib.Data.Fin.VecNotation +import Mathlib.Tactic.Attr.Core /-! # The version of Fin.snoc for the fixed type. @@ -28,6 +27,8 @@ import Mathlib.Data.Fin.VecNotation -/ +@[expose] public section + universe u namespace FirstOrder.ZFC.FixedSnoc diff --git a/LeanPool/FoZfc/Replacement.lean b/LeanPool/FoZfc/Replacement.lean index b32c012adb..283cdab2fb 100644 --- a/LeanPool/FoZfc/Replacement.lean +++ b/LeanPool/FoZfc/Replacement.lean @@ -3,13 +3,9 @@ Copyright (c) 2026 Tetsuya Ishiu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tetsuya Ishiu -/ +module -import Init.Data.Fin.Basic -import LeanPool.FoZfc.Basic -import LeanPool.FoZfc.Tostring -import LeanPool.FoZfc.FixedSnoc -import LeanPool.FoZfc.BoundedFormulaOps -import LeanPool.FoZfc.Axioms +public import LeanPool.FoZfc.Axioms /-! # The Replacement Axiom @@ -32,6 +28,8 @@ import LeanPool.FoZfc.Axioms -/ +@[expose] public section + open FirstOrder open FirstOrder.Language open FirstOrder.Language.BoundedFormula diff --git a/LeanPool/FoZfc/Tostring.lean b/LeanPool/FoZfc/Tostring.lean index 0c51636206..d21a1c2d76 100644 --- a/LeanPool/FoZfc/Tostring.lean +++ b/LeanPool/FoZfc/Tostring.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Tetsuya Ishiu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tetsuya Ishiu -/ +module -import LeanPool.FoZfc.Basic -import LeanPool.FoZfc.BoundedFormulaOps +public import LeanPool.FoZfc.BoundedFormulaOps + +public import LeanPool.FoZfc.Basic /-! # To string for LZFC.Term and LZFC.BoundedFormula @@ -15,6 +17,8 @@ strings, with two flavors (with and without depth information). -/ +@[expose] public section + open FirstOrder open FirstOrder.Language open FirstOrder.Language.BoundedFormula diff --git a/LeanPool/FormalLearningTheory.lean b/LeanPool/FormalLearningTheory.lean index 5378bdd04b..f0aefb41fc 100644 --- a/LeanPool/FormalLearningTheory.lean +++ b/LeanPool/FormalLearningTheory.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ +module -import LeanPool.FormalLearningTheory.Theorem +public import LeanPool.FormalLearningTheory.Theorem +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Formal Learning Theory Kernel @@ -17,6 +21,8 @@ Tags: learning-theory, probability, combinatorics, online-learning MSC: 68Q32, 68T05 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/FormalLearningTheory/Basic.lean b/LeanPool/FormalLearningTheory/Basic.lean index 3b8c9a45b9..2e9f05ca57 100644 --- a/LeanPool/FormalLearningTheory/Basic.lean +++ b/LeanPool/FormalLearningTheory/Basic.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import Mathlib.Order.BoundedOrder.Basic -import Mathlib.Topology.Basic -import Mathlib.MeasureTheory.Measure.Basic -import Mathlib.Data.Finset.Basic +module + +public import Mathlib.Basic.Real.Basic +public import Mathlib.MeasureTheory.MeasurableSpace.Instances +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Basic Types for Formal Learning Theory @@ -20,6 +24,8 @@ commented-out variants for different proof contexts (decidable, RE, measurable, multiclass, Bayesian). -/ +@[expose] public section + universe u v /-! diff --git a/LeanPool/FormalLearningTheory/Bridge.lean b/LeanPool/FormalLearningTheory/Bridge.lean index 393d434bdf..05cc5422b4 100644 --- a/LeanPool/FormalLearningTheory/Bridge.lean +++ b/LeanPool/FormalLearningTheory/Bridge.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import LeanPool.FormalLearningTheory.Data -import LeanPool.FormalLearningTheory.Learner -import LeanPool.FormalLearningTheory.Criterion -import LeanPool.FormalLearningTheory.Complexity -import LeanPool.FormalLearningTheory.Computation -import Mathlib.Combinatorics.SetFamily.Shatter -import Mathlib.Data.ENat.Lattice +module + +public import LeanPool.FormalLearningTheory.Data +public import Mathlib.Combinatorics.SetFamily.Shatter +public import LeanPool.FormalLearningTheory.Complexity.Ordinal +public import LeanPool.FormalLearningTheory.Complexity.Structures +public import LeanPool.FormalLearningTheory.Learner.Bayesian +import LeanPool.FormalLearningTheory.Complexity.Generalization.Core +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Bridge Types: Connecting to Mathlib and Across Paradigms @@ -29,6 +33,8 @@ paradigm-specific types: | B₇ | BatchLearner ↔ GoldLearner | Cross-paradigm | No common parent (BP₁) | -/ +@[expose] public section + universe u v /-! diff --git a/LeanPool/FormalLearningTheory/Complexity.lean b/LeanPool/FormalLearningTheory/Complexity.lean index 1935613f04..10e04ec197 100644 --- a/LeanPool/FormalLearningTheory/Complexity.lean +++ b/LeanPool/FormalLearningTheory/Complexity.lean @@ -3,20 +3,27 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Complexity.VCDimension -import LeanPool.FormalLearningTheory.Complexity.Littlestone -import LeanPool.FormalLearningTheory.Complexity.Ordinal -import LeanPool.FormalLearningTheory.Complexity.MindChange -import LeanPool.FormalLearningTheory.Complexity.Generalization -import LeanPool.FormalLearningTheory.Complexity.Rademacher -import LeanPool.FormalLearningTheory.Complexity.Symmetrization -import LeanPool.FormalLearningTheory.Complexity.GeneralizationResults -import LeanPool.FormalLearningTheory.Complexity.Structures -import LeanPool.FormalLearningTheory.Complexity.Measurability -import LeanPool.FormalLearningTheory.Complexity.BorelAnalyticBridge +module + +public import LeanPool.FormalLearningTheory.Complexity.VCDimension +public import LeanPool.FormalLearningTheory.Complexity.Littlestone +public import LeanPool.FormalLearningTheory.Complexity.Ordinal +public import LeanPool.FormalLearningTheory.Complexity.MindChange +public import LeanPool.FormalLearningTheory.Complexity.Generalization +public import LeanPool.FormalLearningTheory.Complexity.Rademacher +public import LeanPool.FormalLearningTheory.Complexity.Symmetrization +public import LeanPool.FormalLearningTheory.Complexity.GeneralizationResults +public import LeanPool.FormalLearningTheory.Complexity.Structures +public import LeanPool.FormalLearningTheory.Complexity.Measurability +public import LeanPool.FormalLearningTheory.Complexity.BorelAnalyticBridge +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # LeanPool.FormalLearningTheory.Complexity Imported Lean Pool material for `LeanPool.FormalLearningTheory.Complexity`. -/ + +@[expose] public section diff --git a/LeanPool/FormalLearningTheory/Complexity/Amalgamation.lean b/LeanPool/FormalLearningTheory/Complexity/Amalgamation.lean index 115da9ab40..119006f1b2 100644 --- a/LeanPool/FormalLearningTheory/Complexity/Amalgamation.lean +++ b/LeanPool/FormalLearningTheory/Complexity/Amalgamation.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Complexity.Interpolation +module + +public import LeanPool.FormalLearningTheory.Complexity.Interpolation +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Amalgamation Preserves WellBehavedVCMeasTarget @@ -32,6 +37,8 @@ The proof proceeds by: - Interpolation.lean (piecewise concepts, interpClassFixed) -/ +@[expose] public section + universe u open MeasureTheory diff --git a/LeanPool/FormalLearningTheory/Complexity/BorelAnalyticBridge.lean b/LeanPool/FormalLearningTheory/Complexity/BorelAnalyticBridge.lean index 975439fc68..54d06c2a1b 100644 --- a/LeanPool/FormalLearningTheory/Complexity/BorelAnalyticBridge.lean +++ b/LeanPool/FormalLearningTheory/Complexity/BorelAnalyticBridge.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Complexity.Measurability +module + +public import LeanPool.FormalLearningTheory.Complexity.Measurability import LeanPool.FormalLearningTheory.PureMath.AnalyticMeasurability +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Borel-Analytic Bridge for Statistical Learning Theory @@ -34,6 +39,8 @@ but KrappWirthWellBehaved fails. See Theorem/BorelAnalyticSeparation.lean. - This kernel: NullMeasurableSet weakening discovered during Lean4 formalization -/ +@[expose] public section + universe u open MeasureTheory diff --git a/LeanPool/FormalLearningTheory/Complexity/Compression.lean b/LeanPool/FormalLearningTheory/Complexity/Compression.lean index 55f2ce6218..4f484c9115 100644 --- a/LeanPool/FormalLearningTheory/Complexity/Compression.lean +++ b/LeanPool/FormalLearningTheory/Complexity/Compression.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Complexity.DualVC -import LeanPool.FormalLearningTheory.Complexity.Structures -import LeanPool.FormalLearningTheory.Complexity.Generalization +module + +public import LeanPool.FormalLearningTheory.Complexity.Structures +public import LeanPool.FormalLearningTheory.PureMath.FiniteVCApprox +public import LeanPool.FormalLearningTheory.Complexity.Generalization.Tail import LeanPool.FormalLearningTheory.Complexity.FiniteSupportUC -import LeanPool.FormalLearningTheory.PureMath.ApproxMinimax -import LeanPool.FormalLearningTheory.PureMath.FiniteVCApprox -import LeanPool.FormalLearningTheory.PureMath.BinaryMatrix +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Moran-Yehudayoff Compression Theorem @@ -35,6 +38,8 @@ and finite games — no MeasureTheory.Measure, IsProbabilityMeasure, Measure.dir or MeasurableSpace hypotheses. -/ +@[expose] public section + open Finset noncomputable section universe u diff --git a/LeanPool/FormalLearningTheory/Complexity/DualVC.lean b/LeanPool/FormalLearningTheory/Complexity/DualVC.lean index 7ed7f39a28..730f1fa3b9 100644 --- a/LeanPool/FormalLearningTheory/Complexity/DualVC.lean +++ b/LeanPool/FormalLearningTheory/Complexity/DualVC.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import LeanPool.FormalLearningTheory.Complexity.VCDimension -import Mathlib.Data.Fintype.BigOperators -import Mathlib.Data.Fintype.EquivFin -import Mathlib.Order.CompleteLattice.Basic +module + +public import LeanPool.FormalLearningTheory.Complexity.VCDimension +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Dual VC Dimension (Assouad's Lemma) @@ -26,6 +28,8 @@ on the domain `↥C` where each point `x : X` induces a concept `c ↦ c x`. * `dual_vcdim_le_pow` - Assouad's bound: `VCDim*(C) ≤ 2^(VCDim(C)+1) - 1` -/ +@[expose] public section + open Finset universe u diff --git a/LeanPool/FormalLearningTheory/Complexity/FiniteSupportUC.lean b/LeanPool/FormalLearningTheory/Complexity/FiniteSupportUC.lean index 847097e6f0..b6e8bec46b 100644 --- a/LeanPool/FormalLearningTheory/Complexity/FiniteSupportUC.lean +++ b/LeanPool/FormalLearningTheory/Complexity/FiniteSupportUC.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ +module + +public import LeanPool.FormalLearningTheory.PureMath.FiniteVCApprox import LeanPool.FormalLearningTheory.Complexity.Symmetrization -import LeanPool.FormalLearningTheory.Complexity.Generalization -import LeanPool.FormalLearningTheory.PureMath.FiniteVCApprox -import Mathlib.Probability.ProbabilityMassFunction.Basic +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch import Mathlib.Probability.ProbabilityMassFunction.Constructions -import Mathlib.MeasureTheory.Constructions.Pi -import Mathlib.MeasureTheory.Measure.Map /-! # Finite-Support VC Approximation via Symmetrization @@ -19,6 +20,8 @@ forward along `Sum.inl`. This forces the growth-function path in the symmetrizat proof, giving a sample bound depending only on d and ε, not on |H| or |A|. -/ +@[expose] public section + open Finset MeasureTheory noncomputable section universe u diff --git a/LeanPool/FormalLearningTheory/Complexity/GameInfra.lean b/LeanPool/FormalLearningTheory/Complexity/GameInfra.lean index dc80563aa5..419d31b5c6 100644 --- a/LeanPool/FormalLearningTheory/Complexity/GameInfra.lean +++ b/LeanPool/FormalLearningTheory/Complexity/GameInfra.lean @@ -3,14 +3,16 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Criterion.Online +module + +public import LeanPool.FormalLearningTheory.Criterion.Online -- Removed: import LeanPool.FormalLearningTheory.Complexity.Littlestone -- Γ₁₉: branch-wise isShattered wrong + trees must be complete (balanced). -- Corrected: depth-indexed complete trees + path-wise shattering. -import LeanPool.FormalLearningTheory.Complexity.Generalization -- Path B (Γ₂₁): WithBot (WithTop ℕ) for LittlestoneDim -- Required for CompleteLattice instance and ConditionallyCompleteLinearOrderBot ℕ -import Mathlib.Order.Lattice.Nat +public import Mathlib.Order.Lattice.Nat +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Game-Theoretic Infrastructure for Online Learning @@ -27,6 +29,8 @@ Definitions and interface lemmas for the online learning game: Characterization theorems live in `FLT_Proofs.Theorem.Online`. -/ +@[expose] public section + -- ============================================================ -- CORRECTED DEFINITIONS: Depth-indexed complete Littlestone trees -- ============================================================ diff --git a/LeanPool/FormalLearningTheory/Complexity/Generalization.lean b/LeanPool/FormalLearningTheory/Complexity/Generalization.lean index 64116b3c4c..0b36ca9b2f 100644 --- a/LeanPool/FormalLearningTheory/Complexity/Generalization.lean +++ b/LeanPool/FormalLearningTheory/Complexity/Generalization.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ +module -import LeanPool.FormalLearningTheory.Complexity.Generalization.Core -import LeanPool.FormalLearningTheory.Complexity.Generalization.Tail +public import LeanPool.FormalLearningTheory.Complexity.Generalization.Core +public import LeanPool.FormalLearningTheory.Complexity.Generalization.Tail /-! # Generalization Error, Sample/Query/Label Complexity, ERM Import-only index for the generalization infrastructure. -/ + +@[expose] public section diff --git a/LeanPool/FormalLearningTheory/Complexity/Generalization/Core.lean b/LeanPool/FormalLearningTheory/Complexity/Generalization/Core.lean index c16afa3642..1cd153da4f 100644 --- a/LeanPool/FormalLearningTheory/Complexity/Generalization/Core.lean +++ b/LeanPool/FormalLearningTheory/Complexity/Generalization/Core.lean @@ -3,22 +3,15 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import LeanPool.FormalLearningTheory.Data -import LeanPool.FormalLearningTheory.Learner.Core -import LeanPool.FormalLearningTheory.Learner.Active -import LeanPool.FormalLearningTheory.Criterion.Online -import LeanPool.FormalLearningTheory.Criterion.PAC -import LeanPool.FormalLearningTheory.Complexity.VCDimension -import LeanPool.FormalLearningTheory.Complexity.Structures -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.MeasureTheory.Measure.FiniteMeasureProd -import Mathlib.Analysis.SpecialFunctions.Log.Basic -import Mathlib.MeasureTheory.Constructions.Pi -import Mathlib.Combinatorics.SetFamily.Shatter -import Mathlib.Data.Nat.Choose.Bounds -import Mathlib.Probability.Independence.Basic -import Mathlib.Probability.ProductMeasure +module + +public import LeanPool.FormalLearningTheory.Criterion.Online +public import LeanPool.FormalLearningTheory.Criterion.PAC +public import LeanPool.FormalLearningTheory.Complexity.Structures +public import Mathlib.Combinatorics.SetFamily.Shatter +public import Mathlib.Analysis.InnerProductSpace.Basic +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.MeasureTheory.Integral.Bochner.Set /-! # Generalization Error, Sample/Query/Label Complexity, ERM @@ -27,6 +20,8 @@ The numerical quantities that PAC learning bounds. Includes the canonical PAC learner (ERM). -/ +@[expose] public section + universe u v /-- Sample complexity of PAC learning: the minimum number of samples diff --git a/LeanPool/FormalLearningTheory/Complexity/Generalization/Tail.lean b/LeanPool/FormalLearningTheory/Complexity/Generalization/Tail.lean index f952a6f5d6..4141b0f208 100644 --- a/LeanPool/FormalLearningTheory/Complexity/Generalization/Tail.lean +++ b/LeanPool/FormalLearningTheory/Complexity/Generalization/Tail.lean @@ -3,12 +3,20 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ +module + +public import LeanPool.FormalLearningTheory.Complexity.VCDimension +public import LeanPool.FormalLearningTheory.Criterion.PAC +public import Mathlib.Probability.Independence.Basic import LeanPool.FormalLearningTheory.Complexity.Generalization.Core +import Mathlib.Probability.ProductMeasure /-! # LeanPool.FormalLearningTheory.Complexity.Generalization.Tail -/ +@[expose] public section + universe u v diff --git a/LeanPool/FormalLearningTheory/Complexity/GeneralizationResults.lean b/LeanPool/FormalLearningTheory/Complexity/GeneralizationResults.lean index fe697b1ec9..8065b53448 100644 --- a/LeanPool/FormalLearningTheory/Complexity/GeneralizationResults.lean +++ b/LeanPool/FormalLearningTheory/Complexity/GeneralizationResults.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Complexity.Generalization -import LeanPool.FormalLearningTheory.Complexity.Symmetrization -import LeanPool.FormalLearningTheory.Complexity.Rademacher -import LeanPool.FormalLearningTheory.Complexity.Measurability +module + +public import LeanPool.FormalLearningTheory.Complexity.Rademacher +public import LeanPool.FormalLearningTheory.Complexity.Measurability +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Generalization Results @@ -23,6 +27,8 @@ The public statements use the primed uniform-convergence route from - `rademacher_vanishing_imp_pac` : uniform Rademacher vanishing → PAC -/ +@[expose] public section + universe u attribute [local instance] Classical.propDecidable diff --git a/LeanPool/FormalLearningTheory/Complexity/Interpolation.lean b/LeanPool/FormalLearningTheory/Complexity/Interpolation.lean index 5e9918e748..3150559048 100644 --- a/LeanPool/FormalLearningTheory/Complexity/Interpolation.lean +++ b/LeanPool/FormalLearningTheory/Complexity/Interpolation.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Complexity.BorelAnalyticBridge +module + +public import LeanPool.FormalLearningTheory.Complexity.BorelAnalyticBridge +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Interpolation of Concept Classes — Measurability Descent @@ -31,6 +36,8 @@ not stay at the Borel level. - BorelAnalyticBridge.lean (this kernel) -/ +@[expose] public section + universe u open MeasureTheory diff --git a/LeanPool/FormalLearningTheory/Complexity/Littlestone.lean b/LeanPool/FormalLearningTheory/Complexity/Littlestone.lean index 908260769e..2e695b79ea 100644 --- a/LeanPool/FormalLearningTheory/Complexity/Littlestone.lean +++ b/LeanPool/FormalLearningTheory/Complexity/Littlestone.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Complexity.VCDimension +module + +public import LeanPool.FormalLearningTheory.Complexity.VCDimension +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Littlestone Dimension (Online Paradigm) @@ -12,6 +18,8 @@ The online-learning analog of VC dimension. Characterizes mistake-bounded learnability. -/ +@[expose] public section + universe u v /-- A mistake tree (Littlestone tree): a complete binary tree diff --git a/LeanPool/FormalLearningTheory/Complexity/Measurability.lean b/LeanPool/FormalLearningTheory/Complexity/Measurability.lean index 698550c4db..3c6c7c8335 100644 --- a/LeanPool/FormalLearningTheory/Complexity/Measurability.lean +++ b/LeanPool/FormalLearningTheory/Complexity/Measurability.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import LeanPool.FormalLearningTheory.Data -import LeanPool.FormalLearningTheory.Complexity.Symmetrization +module + +public import LeanPool.FormalLearningTheory.Complexity.Symmetrization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Measurability Infrastructure for Learning Theory @@ -44,6 +47,8 @@ Combined with `MeasurableBatchLearner` (Learner/Core.lean), these two typeclasse provide the complete regularity infrastructure for PAC learning proofs. -/ +@[expose] public section + universe u /-- A concept class with the measure-theoretic regularity needed for PAC theory. diff --git a/LeanPool/FormalLearningTheory/Complexity/MindChange.lean b/LeanPool/FormalLearningTheory/Complexity/MindChange.lean index 7451d8df8d..e133a0672f 100644 --- a/LeanPool/FormalLearningTheory/Complexity/MindChange.lean +++ b/LeanPool/FormalLearningTheory/Complexity/MindChange.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import LeanPool.FormalLearningTheory.Data -import LeanPool.FormalLearningTheory.Learner.Core -import Mathlib.SetTheory.Ordinal.Arithmetic +module + +public import LeanPool.FormalLearningTheory.Data +public import LeanPool.FormalLearningTheory.Learner.Core +public import Mathlib.SetTheory.Ordinal.Basic /-! # Mind Change Complexity (Gold Paradigm) @@ -14,6 +15,8 @@ import Mathlib.SetTheory.Ordinal.Arithmetic Counts how often a Gold learner changes its conjecture before converging. -/ +@[expose] public section + universe u v /-- The data prefix: the first t examples from a data stream, as a list. -/ diff --git a/LeanPool/FormalLearningTheory/Complexity/Ordinal.lean b/LeanPool/FormalLearningTheory/Complexity/Ordinal.lean index a9a5f39a1e..3cebadc4e5 100644 --- a/LeanPool/FormalLearningTheory/Complexity/Ordinal.lean +++ b/LeanPool/FormalLearningTheory/Complexity/Ordinal.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Complexity.VCDimension -import LeanPool.FormalLearningTheory.Complexity.Littlestone +module + +public import LeanPool.FormalLearningTheory.Complexity.Littlestone +public import Mathlib.SetTheory.Ordinal.Basic +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv import Mathlib.SetTheory.Ordinal.Arithmetic +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Ordinal Extensions @@ -16,6 +22,8 @@ The embedding ℕ∞ ↪ Ordinal sends n ↦ n and ⊤ ↦ ω, but ordinal VC di can take values beyond ω. -/ +@[expose] public section + universe u v /-! ## BddAbove infrastructure for nat-to-ordinal iSup diff --git a/LeanPool/FormalLearningTheory/Complexity/Rademacher.lean b/LeanPool/FormalLearningTheory/Complexity/Rademacher.lean index d971d2f77f..62e1fd67bc 100644 --- a/LeanPool/FormalLearningTheory/Complexity/Rademacher.lean +++ b/LeanPool/FormalLearningTheory/Complexity/Rademacher.lean @@ -3,13 +3,11 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Complexity.VCDimension -import LeanPool.FormalLearningTheory.Complexity.Generalization -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.MeasureTheory.Constructions.Pi -import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Algebra.Order.Chebyshev +module + +public import LeanPool.FormalLearningTheory.Complexity.Generalization.Core import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series +import Mathlib.MeasureTheory.Integral.Bochner.Set /-! # Rademacher Complexity @@ -28,6 +26,8 @@ Upper bounded by VC dimension. Bridges to lean-rademacher library (K₂). - `vcdim_finite_imp_rademacher_vanishing` : VCDim < ⊤ → Rad → 0 -/ +@[expose] public section + universe u v /-- Convert Bool labels to ±1 reals. true ↦ 1, false ↦ -1. -/ diff --git a/LeanPool/FormalLearningTheory/Complexity/Structures.lean b/LeanPool/FormalLearningTheory/Complexity/Structures.lean index 157adfe982..1946b0d2db 100644 --- a/LeanPool/FormalLearningTheory/Complexity/Structures.lean +++ b/LeanPool/FormalLearningTheory/Complexity/Structures.lean @@ -3,13 +3,11 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import LeanPool.FormalLearningTheory.Learner.Core -import LeanPool.FormalLearningTheory.Complexity.VCDimension -import LeanPool.FormalLearningTheory.Criterion.Online -import Mathlib.Analysis.SpecialFunctions.Log.Basic -import Mathlib.Topology.Algebra.InfiniteSum.Basic -import Mathlib.MeasureTheory.Integral.Bochner.Basic +module + +public import LeanPool.FormalLearningTheory.Learner.Core +public import LeanPool.FormalLearningTheory.Complexity.VCDimension +public import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Structured Complexity Measures @@ -19,6 +17,8 @@ real-valued dimensions, teaching/eluder dimensions, SQ dimension, KL complexity, margin theory, covering numbers. -/ +@[expose] public section + universe u v /-! diff --git a/LeanPool/FormalLearningTheory/Complexity/Symmetrization.lean b/LeanPool/FormalLearningTheory/Complexity/Symmetrization.lean index 86156a2a4e..9c0cb89a2f 100644 --- a/LeanPool/FormalLearningTheory/Complexity/Symmetrization.lean +++ b/LeanPool/FormalLearningTheory/Complexity/Symmetrization.lean @@ -3,15 +3,10 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import LeanPool.FormalLearningTheory.Complexity.Generalization +module + +public import LeanPool.FormalLearningTheory.Complexity.Generalization.Core import LeanPool.FormalLearningTheory.Complexity.Rademacher -import LeanPool.FormalLearningTheory.PureMath.Exchangeability -import Mathlib.MeasureTheory.Constructions.Pi -import Mathlib.MeasureTheory.Measure.FiniteMeasureProd -import Mathlib.Analysis.SpecialFunctions.Log.Basic -import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Probability.Independence.Basic import Mathlib.Probability.Moments.SubGaussian /-! @@ -43,6 +38,8 @@ NOT the relaxed iid Rademacher approach. This is the structurally correct argume that avoids introducing unnecessary independence assumptions. -/ +@[expose] public section + universe u v open MeasureTheory ENNReal diff --git a/LeanPool/FormalLearningTheory/Complexity/VCDimension.lean b/LeanPool/FormalLearningTheory/Complexity/VCDimension.lean index fa86ba52a1..f28440dcb8 100644 --- a/LeanPool/FormalLearningTheory/Complexity/VCDimension.lean +++ b/LeanPool/FormalLearningTheory/Complexity/VCDimension.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import Mathlib.Order.BoundedOrder.Basic -import Mathlib.Data.Finset.Card -import Mathlib.Data.Set.Card +module + +public import LeanPool.FormalLearningTheory.Basic +public import Mathlib.Data.Set.Card +public import Mathlib.Order.Lattice.Nat +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # VC Dimension and Shattering @@ -15,6 +20,8 @@ The foundational complexity measure for PAC learning. Bridges to Mathlib's `Finset.vcDim` via `Bridge.lean`. -/ +@[expose] public section + universe u v /-- A set S ⊆ X is shattered by concept class C if every labeling of S diff --git a/LeanPool/FormalLearningTheory/Computation.lean b/LeanPool/FormalLearningTheory/Computation.lean index c8d2383979..54c4d8d170 100644 --- a/LeanPool/FormalLearningTheory/Computation.lean +++ b/LeanPool/FormalLearningTheory/Computation.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import Mathlib.Computability.TuringMachine.StackTuringMachine -import Mathlib.Computability.Primrec.List -import Mathlib.Computability.Partrec -import Mathlib.Computability.PartrecCode -import Mathlib.Computability.Encoding -import Mathlib.SetTheory.Ordinal.Arithmetic +module + +public import LeanPool.FormalLearningTheory.Basic +public import Mathlib.Computability.PartrecCode +public import Mathlib.Algebra.Group.End +public import Mathlib.Topology.Algebra.InfiniteSum.Defs +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Computation and Formal Language Theory @@ -22,6 +26,8 @@ Computability-theoretic substrate for Gold-style learning theory. Contains: - Execution traces for program synthesis -/ +@[expose] public section + universe u v /-! diff --git a/LeanPool/FormalLearningTheory/Criterion.lean b/LeanPool/FormalLearningTheory/Criterion.lean index a101c2cfd7..6d9a6928f7 100644 --- a/LeanPool/FormalLearningTheory/Criterion.lean +++ b/LeanPool/FormalLearningTheory/Criterion.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Criterion.Gold -import LeanPool.FormalLearningTheory.Criterion.PAC -import LeanPool.FormalLearningTheory.Criterion.Online -import LeanPool.FormalLearningTheory.Criterion.Extended +module + +public import LeanPool.FormalLearningTheory.Criterion.Gold +public import LeanPool.FormalLearningTheory.Criterion.PAC +public import LeanPool.FormalLearningTheory.Criterion.Online +public import LeanPool.FormalLearningTheory.Criterion.Extended /-! # LeanPool.FormalLearningTheory.Criterion Imported Lean Pool material for `LeanPool.FormalLearningTheory.Criterion`. -/ + +@[expose] public section diff --git a/LeanPool/FormalLearningTheory/Criterion/Extended.lean b/LeanPool/FormalLearningTheory/Criterion/Extended.lean index d750bcb5bd..dd7bca96bd 100644 --- a/LeanPool/FormalLearningTheory/Criterion/Extended.lean +++ b/LeanPool/FormalLearningTheory/Criterion/Extended.lean @@ -3,14 +3,13 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import LeanPool.FormalLearningTheory.Data -import LeanPool.FormalLearningTheory.Learner.Core -import LeanPool.FormalLearningTheory.Learner.Bayesian -import LeanPool.FormalLearningTheory.Criterion.PAC -import LeanPool.FormalLearningTheory.Criterion.Gold -import Mathlib.Analysis.Real.Sqrt -import Mathlib.Analysis.SpecialFunctions.Log.Basic +module + +public import LeanPool.FormalLearningTheory.Learner.Bayesian +public import LeanPool.FormalLearningTheory.Criterion.Gold +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +public import LeanPool.FormalLearningTheory.Learner.Active +public import Mathlib.MeasureTheory.Constructions.Pi /-! # Extended and Cross-Paradigm Criteria @@ -19,6 +18,8 @@ EX under drift, universal learning, Bayesian criteria (posterior consistency, PAC-Bayes, information-theoretic bounds). -/ +@[expose] public section + universe u v /-- EX-learning under drift: the target concept changes over time. diff --git a/LeanPool/FormalLearningTheory/Criterion/Gold.lean b/LeanPool/FormalLearningTheory/Criterion/Gold.lean index bb35c2bcb9..0a447ee4a9 100644 --- a/LeanPool/FormalLearningTheory/Criterion/Gold.lean +++ b/LeanPool/FormalLearningTheory/Criterion/Gold.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import LeanPool.FormalLearningTheory.Data -import LeanPool.FormalLearningTheory.Learner.Core +module + +public import LeanPool.FormalLearningTheory.Data +public import LeanPool.FormalLearningTheory.Learner.Core /-! # Gold-Style Success Criteria (Identification in the Limit) @@ -19,6 +20,8 @@ All share the quantifier pattern: The variation is in what "..." requires. -/ +@[expose] public section + universe u v /-- Helper: the data seen up to time t from a data stream. -/ diff --git a/LeanPool/FormalLearningTheory/Criterion/Online.lean b/LeanPool/FormalLearningTheory/Criterion/Online.lean index 833d64cd87..84f6141ed4 100644 --- a/LeanPool/FormalLearningTheory/Criterion/Online.lean +++ b/LeanPool/FormalLearningTheory/Criterion/Online.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import LeanPool.FormalLearningTheory.Learner.Core +module + +public import LeanPool.FormalLearningTheory.Learner.Core +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Online Learning Criteria @@ -13,6 +18,8 @@ Mistake-bounded learning, online learnability, and regret bounds. Characterized by Littlestone dimension. -/ +@[expose] public section + universe u v /-- Count mistakes from an arbitrary online-learner state. -/ diff --git a/LeanPool/FormalLearningTheory/Criterion/PAC.lean b/LeanPool/FormalLearningTheory/Criterion/PAC.lean index 6778b6f326..1681f7882d 100644 --- a/LeanPool/FormalLearningTheory/Criterion/PAC.lean +++ b/LeanPool/FormalLearningTheory/Criterion/PAC.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import LeanPool.FormalLearningTheory.Data -import LeanPool.FormalLearningTheory.Learner.Core -import LeanPool.FormalLearningTheory.Learner.Active -import Mathlib.MeasureTheory.Constructions.Pi +module + +public import LeanPool.FormalLearningTheory.Learner.Active +public import Mathlib.MeasureTheory.Constructions.Pi /-! # PAC Learning Criteria @@ -44,6 +43,8 @@ function xs ↦ D{x | L(S(xs)) x ≠ c x} to be measurable - a deep technical condition that specific proofs (Hoeffding, Sauer-Shelah) will establish. -/ +@[expose] public section + universe u v /-- PAC (Probably Approximately Correct) learning. diff --git a/LeanPool/FormalLearningTheory/Data.lean b/LeanPool/FormalLearningTheory/Data.lean index 4cbccf87b8..9d5237b02f 100644 --- a/LeanPool/FormalLearningTheory/Data.lean +++ b/LeanPool/FormalLearningTheory/Data.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import Mathlib.MeasureTheory.Measure.Basic -import Mathlib.Probability.ProbabilityMassFunction.Basic +module + +public import LeanPool.FormalLearningTheory.Basic +public import Mathlib.MeasureTheory.Measure.Typeclasses.Probability /-! # Data Presentations @@ -23,6 +24,8 @@ Also includes query-learning interfaces (MembershipOracle, EquivalenceOracle), noisy data, and advice. -/ +@[expose] public section + universe u v /-! diff --git a/LeanPool/FormalLearningTheory/Learner.lean b/LeanPool/FormalLearningTheory/Learner.lean index 5f7be880d3..f74ef6d209 100644 --- a/LeanPool/FormalLearningTheory/Learner.lean +++ b/LeanPool/FormalLearningTheory/Learner.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Learner.Core -import LeanPool.FormalLearningTheory.Learner.Properties -import LeanPool.FormalLearningTheory.Learner.Active -import LeanPool.FormalLearningTheory.Learner.Bayesian +module + +public import LeanPool.FormalLearningTheory.Learner.Core +public import LeanPool.FormalLearningTheory.Learner.Properties +public import LeanPool.FormalLearningTheory.Learner.Active +public import LeanPool.FormalLearningTheory.Learner.Bayesian /-! # LeanPool.FormalLearningTheory.Learner Imported Lean Pool material for `LeanPool.FormalLearningTheory.Learner`. -/ + +@[expose] public section diff --git a/LeanPool/FormalLearningTheory/Learner/Active.lean b/LeanPool/FormalLearningTheory/Learner/Active.lean index 8411b3b8ce..3234f24ec2 100644 --- a/LeanPool/FormalLearningTheory/Learner/Active.lean +++ b/LeanPool/FormalLearningTheory/Learner/Active.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Learner.Core +module + +public import LeanPool.FormalLearningTheory.Learner.Core +public import LeanPool.FormalLearningTheory.Data /-! # Active Learning, Teachers, and Meta-Learning @@ -13,6 +16,8 @@ Meta-learners learn to learn. Also includes synthesizers and verifiers for the CEGIS paradigm. -/ +@[expose] public section + universe u v /-! diff --git a/LeanPool/FormalLearningTheory/Learner/Bayesian.lean b/LeanPool/FormalLearningTheory/Learner/Bayesian.lean index 385ad70e18..279881d481 100644 --- a/LeanPool/FormalLearningTheory/Learner/Bayesian.lean +++ b/LeanPool/FormalLearningTheory/Learner/Bayesian.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Learner.Core +module + +public import LeanPool.FormalLearningTheory.Basic +public import Mathlib.Algebra.BigOperators.Group.List.Defs +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Bayesian Inference and Learners @@ -13,6 +20,8 @@ BayesianLearner extends BatchLearner with Bayesian inference machinery. GibbsPosterior adds temperature for PAC-Bayes optimization. -/ +@[expose] public section + universe u v /-- Bayesian inference: bundles prior, likelihood model, and posterior computation. -/ diff --git a/LeanPool/FormalLearningTheory/Learner/Closure.lean b/LeanPool/FormalLearningTheory/Learner/Closure.lean index d0dd033469..9e08cbfa69 100644 --- a/LeanPool/FormalLearningTheory/Learner/Closure.lean +++ b/LeanPool/FormalLearningTheory/Learner/Closure.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Learner.Core -import LeanPool.FormalLearningTheory.Complexity.Generalization +module + +public import LeanPool.FormalLearningTheory.Complexity.Generalization.Tail +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Closure of Measurable Learners under Combiners and Selection @@ -17,6 +19,8 @@ The algebra of `MeasurableBatchLearner`s is closed under: -/ +@[expose] public section + universe u attribute [local instance] Classical.propDecidable diff --git a/LeanPool/FormalLearningTheory/Learner/Core.lean b/LeanPool/FormalLearningTheory/Learner/Core.lean index 4e68823988..be30ffafe4 100644 --- a/LeanPool/FormalLearningTheory/Learner/Core.lean +++ b/LeanPool/FormalLearningTheory/Learner/Core.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import LeanPool.FormalLearningTheory.Data -import LeanPool.FormalLearningTheory.Computation +module + +public import LeanPool.FormalLearningTheory.Basic +public import Mathlib.MeasureTheory.MeasurableSpace.Constructions +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Core Learner Types @@ -23,6 +28,8 @@ This is intentional: a common parent would erase the structural properties that make each paradigm's theorems non-trivial. -/ +@[expose] public section + universe u v /-- A batch learner (PAC paradigm): takes a finite sample, returns a hypothesis. -/ diff --git a/LeanPool/FormalLearningTheory/Learner/Monad.lean b/LeanPool/FormalLearningTheory/Learner/Monad.lean index 41e9abd76e..62a4699211 100644 --- a/LeanPool/FormalLearningTheory/Learner/Monad.lean +++ b/LeanPool/FormalLearningTheory/Learner/Monad.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Learner.Closure -import LeanPool.FormalLearningTheory.PureMath.ReaderMonad +module + +public import LeanPool.FormalLearningTheory.Learner.Closure +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Measurable Batch Learner Monad @@ -19,6 +21,8 @@ lives in the pure math layer. This file adds the measurability certificate. - Monad laws: inherited from ReaderSel, verified at evaluation level -/ +@[expose] public section + universe u /-- A measurable batch learner bundled with its measurability certificate. The carrier diff --git a/LeanPool/FormalLearningTheory/Learner/Properties.lean b/LeanPool/FormalLearningTheory/Learner/Properties.lean index d4b54e2cbb..9023d61cb1 100644 --- a/LeanPool/FormalLearningTheory/Learner/Properties.lean +++ b/LeanPool/FormalLearningTheory/Learner/Properties.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Learner.Core +module + +public import LeanPool.FormalLearningTheory.Learner.Core +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Learner Properties @@ -13,6 +19,8 @@ conservative, passive. These are `Prop` predicates, not separate types. Also includes probabilistic and team learner variants. -/ +@[expose] public section + universe u v /-! diff --git a/LeanPool/FormalLearningTheory/Learner/VersionSpace.lean b/LeanPool/FormalLearningTheory/Learner/VersionSpace.lean index cba4ca797a..fc0e6d635a 100644 --- a/LeanPool/FormalLearningTheory/Learner/VersionSpace.lean +++ b/LeanPool/FormalLearningTheory/Learner/VersionSpace.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Learner.Core +module + +public import LeanPool.FormalLearningTheory.Learner.Core +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Version Space Learner: Measurable Selection via Countable Enumeration @@ -34,6 +40,8 @@ Measurability follows from `measurable_to_countable'` (Mathlib). the countable restriction) -/ +@[expose] public section + universe u open MeasureTheory Set diff --git a/LeanPool/FormalLearningTheory/Process.lean b/LeanPool/FormalLearningTheory/Process.lean index 13d1354d05..0283047eab 100644 --- a/LeanPool/FormalLearningTheory/Process.lean +++ b/LeanPool/FormalLearningTheory/Process.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Basic -import LeanPool.FormalLearningTheory.Data -import LeanPool.FormalLearningTheory.Learner -import LeanPool.FormalLearningTheory.Criterion -import LeanPool.FormalLearningTheory.Complexity -import LeanPool.FormalLearningTheory.Computation +module + +public import LeanPool.FormalLearningTheory.Computation +public import LeanPool.FormalLearningTheory.Complexity.Generalization.Tail +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Processes and Applications @@ -22,6 +23,8 @@ Concrete learning processes, algorithms, and scope boundaries: - Granger causality (causal inference connection) -/ +@[expose] public section + universe u v /-! diff --git a/LeanPool/FormalLearningTheory/PureMath/AnalyticMeasurability.lean b/LeanPool/FormalLearningTheory/PureMath/AnalyticMeasurability.lean index dda951ae3a..8d090c6c5d 100644 --- a/LeanPool/FormalLearningTheory/PureMath/AnalyticMeasurability.lean +++ b/LeanPool/FormalLearningTheory/PureMath/AnalyticMeasurability.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ +module + +public import Mathlib.MeasureTheory.Constructions.Polish.Basic import LeanPool.FormalLearningTheory.PureMath.ChoquetCapacity -import Mathlib.MeasureTheory.Measure.NullMeasurable import Mathlib.MeasureTheory.Measure.Real /-! @@ -19,6 +21,8 @@ This file is independent of learning theory and is a candidate for contribution - `analyticSet_nullMeasurableSet`: analytic sets are null-measurable for finite Borel measures -/ +@[expose] public section + open MeasureTheory Set /-- Inner regularity for analytic sets: every analytic subset of a Polish space can be diff --git a/LeanPool/FormalLearningTheory/PureMath/ApproxMinimax.lean b/LeanPool/FormalLearningTheory/PureMath/ApproxMinimax.lean index 70750e4f74..bb2ab4f9da 100644 --- a/LeanPool/FormalLearningTheory/PureMath/ApproxMinimax.lean +++ b/LeanPool/FormalLearningTheory/PureMath/ApproxMinimax.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.PureMath.KLDivergence +module + +public import LeanPool.FormalLearningTheory.PureMath.KLDivergence import Mathlib.Algebra.BigOperators.Field -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Analysis.SpecialFunctions.Log.Basic -import Mathlib.Algebra.Order.Floor.Defs /-! # Approximate Minimax for Finite Boolean Games @@ -36,6 +35,8 @@ utilities, payoff analysis, covering arguments, and MWU potential bounds. - Arora, Hazan, Kale, "The Multiplicative Weights Update Method", ToC 8(1), 2012 -/ +@[expose] public section + open Finset noncomputable section diff --git a/LeanPool/FormalLearningTheory/PureMath/BinaryMatrix.lean b/LeanPool/FormalLearningTheory/PureMath/BinaryMatrix.lean index c80bd47fab..7e8da9f6d3 100644 --- a/LeanPool/FormalLearningTheory/PureMath/BinaryMatrix.lean +++ b/LeanPool/FormalLearningTheory/PureMath/BinaryMatrix.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ +module -import Mathlib.Combinatorics.SetFamily.Shatter +public import Mathlib.Combinatorics.SetFamily.Shatter import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Fintype.BigOperators -import Mathlib.Data.Fintype.EquivFin /-! # Binary Matrix VC Dimension and Sauer-Shelah @@ -16,6 +16,8 @@ Pure combinatorics: VC dimension on binary matrices, bridged to Mathlib's `Finset.Shatters` infrastructure. No learning theory types. -/ +@[expose] public section + open Finset universe u diff --git a/LeanPool/FormalLearningTheory/PureMath/ChoquetCapacity.lean b/LeanPool/FormalLearningTheory/PureMath/ChoquetCapacity.lean index f97cb0a8e5..d2ddbf6168 100644 --- a/LeanPool/FormalLearningTheory/PureMath/ChoquetCapacity.lean +++ b/LeanPool/FormalLearningTheory/PureMath/ChoquetCapacity.lean @@ -3,13 +3,10 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import Mathlib.MeasureTheory.Constructions.Polish.Basic -import Mathlib.MeasureTheory.Measure.Regular +module + +public import Mathlib.MeasureTheory.Constructions.Polish.Basic import Mathlib.MeasureTheory.Measure.RegularityCompacts -import Mathlib.MeasureTheory.Measure.MeasureSpaceDef -import Mathlib.Order.ConditionallyCompleteLattice.Basic -import Mathlib.Topology.Sequences -import Mathlib.Topology.Metrizable.Basic /-! # Choquet Capacity Theory @@ -32,6 +29,8 @@ This file is independent of learning theory and is a candidate for contribution - Kechris, "Classical Descriptive Set Theory", Theorem 30.13 -/ +@[expose] public section + universe u open MeasureTheory Set Filter Topology diff --git a/LeanPool/FormalLearningTheory/PureMath/Concentration.lean b/LeanPool/FormalLearningTheory/PureMath/Concentration.lean index f6d9397288..a84e1eaa7c 100644 --- a/LeanPool/FormalLearningTheory/PureMath/Concentration.lean +++ b/LeanPool/FormalLearningTheory/PureMath/Concentration.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import Mathlib.MeasureTheory.Measure.Basic -import Mathlib.Probability.Independence.Basic -import Mathlib.MeasureTheory.Function.LpSeminorm.Basic -import Mathlib.MeasureTheory.Integral.Bochner.Basic +module + +public import Mathlib.Probability.Independence.Basic import Mathlib.Probability.Moments.Variance /-! @@ -30,6 +29,8 @@ No learning-theory types. - Boucheron, Lugosi, Massart, "Concentration Inequalities", Chapter 2 -/ +@[expose] public section + open MeasureTheory /-- A random variable f : Ω → ℝ is bounded in [a, b] almost everywhere. -/ diff --git a/LeanPool/FormalLearningTheory/PureMath/Exchangeability.lean b/LeanPool/FormalLearningTheory/PureMath/Exchangeability.lean index fb3bb6c94d..9409e4d5de 100644 --- a/LeanPool/FormalLearningTheory/PureMath/Exchangeability.lean +++ b/LeanPool/FormalLearningTheory/PureMath/Exchangeability.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import Mathlib.MeasureTheory.Constructions.Pi -import Mathlib.MeasureTheory.Measure.FiniteMeasureProd +module + +public import Mathlib.MeasureTheory.Constructions.Pi +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Exchangeability and Double-Sample Infrastructure @@ -28,6 +30,8 @@ valid splits, and split measures. No learning-theory types. - Kakade & Tewari, Lecture 19: Symmetrization -/ +@[expose] public section + universe u open MeasureTheory ENNReal diff --git a/LeanPool/FormalLearningTheory/PureMath/FiniteVCApprox.lean b/LeanPool/FormalLearningTheory/PureMath/FiniteVCApprox.lean index aa959c3e59..76c48db497 100644 --- a/LeanPool/FormalLearningTheory/PureMath/FiniteVCApprox.lean +++ b/LeanPool/FormalLearningTheory/PureMath/FiniteVCApprox.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.PureMath.ApproxMinimax -import LeanPool.FormalLearningTheory.PureMath.BinaryMatrix +module + +public import LeanPool.FormalLearningTheory.PureMath.ApproxMinimax +public import Mathlib.Combinatorics.SetFamily.Shatter +import Mathlib.Algebra.BigOperators.Field /-! # Finite Sample Approximation for FinitePMF @@ -19,6 +22,8 @@ finite samples. - `boolFamilyToFinsetFamily` / `Finset.boolVCDim` : VC dimension for Boolean function families -/ +@[expose] public section + open Finset noncomputable section diff --git a/LeanPool/FormalLearningTheory/PureMath/KLDivergence.lean b/LeanPool/FormalLearningTheory/PureMath/KLDivergence.lean index 519189b634..10a7f78ae2 100644 --- a/LeanPool/FormalLearningTheory/PureMath/KLDivergence.lean +++ b/LeanPool/FormalLearningTheory/PureMath/KLDivergence.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import Mathlib.Analysis.SpecialFunctions.Log.Basic -import Mathlib.Algebra.BigOperators.Group.Finset.Basic +module + +public import Mathlib.Analysis.SpecialFunctions.Log.Basic /-! # KL Divergence and Finite PMFs @@ -25,6 +26,8 @@ KL divergence, cross-entropy, and expected values. No learning-theory types. - Cover & Thomas, "Elements of Information Theory", Chapter 2 -/ +@[expose] public section + open Finset /-- A probability mass function over a finite type. diff --git a/LeanPool/FormalLearningTheory/PureMath/ReaderMonad.lean b/LeanPool/FormalLearningTheory/PureMath/ReaderMonad.lean index 2246124c6b..c1bc0383d9 100644 --- a/LeanPool/FormalLearningTheory/PureMath/ReaderMonad.lean +++ b/LeanPool/FormalLearningTheory/PureMath/ReaderMonad.lean @@ -3,6 +3,7 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ +module /-! # Reader Selection Monad @@ -14,7 +15,7 @@ The three monad laws hold definitionally (by `rfl`). This structure underlies MeasurableBatchLearner composition in the learning theory layer, but the monad itself is pure mathematics with zero dependencies. --/ +-/@[expose] public section universe u v w diff --git a/LeanPool/FormalLearningTheory/Theorem.lean b/LeanPool/FormalLearningTheory/Theorem.lean index 08daf46095..17c6631af4 100644 --- a/LeanPool/FormalLearningTheory/Theorem.lean +++ b/LeanPool/FormalLearningTheory/Theorem.lean @@ -3,13 +3,20 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Theorem.Gold -import LeanPool.FormalLearningTheory.Theorem.PAC -import LeanPool.FormalLearningTheory.Theorem.Online -import LeanPool.FormalLearningTheory.Theorem.Separation +module + +public import LeanPool.FormalLearningTheory.Theorem.Gold +public import LeanPool.FormalLearningTheory.Theorem.PAC +public import LeanPool.FormalLearningTheory.Theorem.Online +public import LeanPool.FormalLearningTheory.Theorem.Separation +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # LeanPool.FormalLearningTheory.Theorem Imported Lean Pool material for `LeanPool.FormalLearningTheory.Theorem`. -/ + +@[expose] public section diff --git a/LeanPool/FormalLearningTheory/Theorem/BorelAnalyticSeparation.lean b/LeanPool/FormalLearningTheory/Theorem/BorelAnalyticSeparation.lean index 4ab3dfb743..5c13bcc1b3 100644 --- a/LeanPool/FormalLearningTheory/Theorem/BorelAnalyticSeparation.lean +++ b/LeanPool/FormalLearningTheory/Theorem/BorelAnalyticSeparation.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ +module + +public import LeanPool.FormalLearningTheory.Complexity.Measurability import LeanPool.FormalLearningTheory.Complexity.BorelAnalyticBridge -import LeanPool.FormalLearningTheory.Complexity.Generalization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Borel-Analytic Separation: Counterexample Chain @@ -22,6 +27,8 @@ KrappWirthWellBehaved (MeasurableSet/Borel). - `singleton_badEvent_not_measurable`: the sample-space bad event is NOT Borel -/ +@[expose] public section + open MeasureTheory /-! ## Definitions -/ diff --git a/LeanPool/FormalLearningTheory/Theorem/Extended.lean b/LeanPool/FormalLearningTheory/Theorem/Extended.lean index 4e4f394ed3..153ae4a540 100644 --- a/LeanPool/FormalLearningTheory/Theorem/Extended.lean +++ b/LeanPool/FormalLearningTheory/Theorem/Extended.lean @@ -3,17 +3,14 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Criterion.PAC -import LeanPool.FormalLearningTheory.Criterion.Extended -import LeanPool.FormalLearningTheory.Complexity.VCDimension -import LeanPool.FormalLearningTheory.Complexity.Ordinal -import LeanPool.FormalLearningTheory.Theorem.Online -import LeanPool.FormalLearningTheory.Theorem.Separation -import LeanPool.FormalLearningTheory.Complexity.Structures -import LeanPool.FormalLearningTheory.Complexity.Generalization -import LeanPool.FormalLearningTheory.Learner.Active -import Mathlib.Data.Nat.Pairing -import Mathlib.MeasureTheory.Measure.Prod +module + +public import LeanPool.FormalLearningTheory.Complexity.Generalization.Core +import LeanPool.FormalLearningTheory.Complexity.Symmetrization +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.MeasureTheory.Order.Group.Lattice /-! # Extended Theorems @@ -22,6 +19,8 @@ Advice reduction, meta-learning lower-bound infrastructure, and separation results for compression and SQ dimension. -/ +@[expose] public section + universe u v /-! ## Multi-Task Meta-Learning Infrastructure -/ diff --git a/LeanPool/FormalLearningTheory/Theorem/Gold.lean b/LeanPool/FormalLearningTheory/Theorem/Gold.lean index 58d522e007..d746268544 100644 --- a/LeanPool/FormalLearningTheory/Theorem/Gold.lean +++ b/LeanPool/FormalLearningTheory/Theorem/Gold.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Criterion.Gold -import LeanPool.FormalLearningTheory.Complexity.MindChange +module + +public import LeanPool.FormalLearningTheory.Criterion.Gold +public import LeanPool.FormalLearningTheory.Complexity.MindChange +import Mathlib.SetTheory.Ordinal.Arithmetic /-! # Gold's Theorem and Mind Change Characterization @@ -12,6 +15,8 @@ import LeanPool.FormalLearningTheory.Complexity.MindChange The foundational results of inductive inference theory. -/ +@[expose] public section + universe u v /-- Gold's theorem (1967): No learner can EX-identify any concept class diff --git a/LeanPool/FormalLearningTheory/Theorem/Online.lean b/LeanPool/FormalLearningTheory/Theorem/Online.lean index e6bc4889b6..1b5a07029b 100644 --- a/LeanPool/FormalLearningTheory/Theorem/Online.lean +++ b/LeanPool/FormalLearningTheory/Theorem/Online.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Complexity.GameInfra +module + +public import LeanPool.FormalLearningTheory.Complexity.GameInfra +public import LeanPool.FormalLearningTheory.Complexity.Generalization.Core /-! # Online Learning Characterization Theorems @@ -19,6 +22,8 @@ Main results: - `optimal_mistake_bound_eq_ldim`: OptimalMistakeBound = LittlestoneDim (for nonempty C) -/ +@[expose] public section + -- ============================================================ -- FORWARD DIRECTION: OnlineLearnable → LittlestoneDim < ⊤ -- ============================================================ diff --git a/LeanPool/FormalLearningTheory/Theorem/PAC.lean b/LeanPool/FormalLearningTheory/Theorem/PAC.lean index aa2508a070..e4d39be6f1 100644 --- a/LeanPool/FormalLearningTheory/Theorem/PAC.lean +++ b/LeanPool/FormalLearningTheory/Theorem/PAC.lean @@ -3,15 +3,16 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Criterion.PAC -import LeanPool.FormalLearningTheory.Complexity.VCDimension -import LeanPool.FormalLearningTheory.Complexity.Rademacher -import LeanPool.FormalLearningTheory.Complexity.Structures -import LeanPool.FormalLearningTheory.Complexity.Generalization -import LeanPool.FormalLearningTheory.Complexity.Compression -import LeanPool.FormalLearningTheory.Complexity.Symmetrization -import LeanPool.FormalLearningTheory.Bridge -import LeanPool.FormalLearningTheory.Complexity.Measurability +module + +public import LeanPool.FormalLearningTheory.Complexity.Rademacher +public import LeanPool.FormalLearningTheory.Complexity.Compression +public import LeanPool.FormalLearningTheory.Bridge +public import LeanPool.FormalLearningTheory.Complexity.Measurability +import LeanPool.FormalLearningTheory.Complexity.GeneralizationResults +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # PAC Learning Theorems @@ -45,6 +46,8 @@ construction: if VCDim = ∞, construct a distribution D where any learner fails with probability > δ for some ε. -/ +@[expose] public section + universe u v /-- Direction ←: finite VCDim implies PAC learnability. diff --git a/LeanPool/FormalLearningTheory/Theorem/PACBayes.lean b/LeanPool/FormalLearningTheory/Theorem/PACBayes.lean index 5339f54f23..1b53e97fb0 100644 --- a/LeanPool/FormalLearningTheory/Theorem/PACBayes.lean +++ b/LeanPool/FormalLearningTheory/Theorem/PACBayes.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Complexity.Generalization +module + +public import LeanPool.FormalLearningTheory.PureMath.KLDivergence +public import LeanPool.FormalLearningTheory.Complexity.Generalization.Core import LeanPool.FormalLearningTheory.Complexity.Symmetrization -import LeanPool.FormalLearningTheory.PureMath.KLDivergence -import Mathlib.Analysis.SpecialFunctions.Log.Basic -import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # PAC-Bayes Bounds @@ -29,6 +32,8 @@ plus a complexity term involving KL(Q‖P). - McAllester, "Simplified PAC-Bayesian Margin Bounds", COLT 2003 -/ +@[expose] public section + universe u open MeasureTheory Finset diff --git a/LeanPool/FormalLearningTheory/Theorem/Separation.lean b/LeanPool/FormalLearningTheory/Theorem/Separation.lean index 4b8fa7d626..70d300ce74 100644 --- a/LeanPool/FormalLearningTheory/Theorem/Separation.lean +++ b/LeanPool/FormalLearningTheory/Theorem/Separation.lean @@ -3,17 +3,17 @@ Copyright (c) 2026 Dhruv Gupta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhruv Gupta -/ -import LeanPool.FormalLearningTheory.Criterion.PAC -import LeanPool.FormalLearningTheory.Criterion.Online -import LeanPool.FormalLearningTheory.Criterion.Gold -import LeanPool.FormalLearningTheory.Criterion.Extended -import LeanPool.FormalLearningTheory.Complexity.Structures -import LeanPool.FormalLearningTheory.Complexity.Generalization -import LeanPool.FormalLearningTheory.Complexity.Symmetrization -import LeanPool.FormalLearningTheory.Complexity.Measurability +module + +public import LeanPool.FormalLearningTheory.Criterion.Extended +public import LeanPool.FormalLearningTheory.Complexity.Measurability +import LeanPool.FormalLearningTheory.Complexity.Generalization.Tail import LeanPool.FormalLearningTheory.Theorem.Online -import LeanPool.FormalLearningTheory.PureMath.Concentration +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch import Mathlib.Probability.Moments.Variance +import Mathlib.Probability.ProductMeasure /-! # Separation Theorems @@ -22,6 +22,8 @@ These prove that the paradigms are genuinely different — the criteria do NOT imply each other. -/ +@[expose] public section + open MeasureTheory attribute [local instance] Classical.propDecidable diff --git a/LeanPool/FormalizationOfBoundedArithmetic.lean b/LeanPool/FormalizationOfBoundedArithmetic.lean index 6afb66a9cf..b4fb4a1867 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic.lean @@ -3,27 +3,29 @@ Copyright (c) 2026 ruplet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: ruplet -/ +module -import LeanPool.FormalizationOfBoundedArithmetic.Algebra -import LeanPool.FormalizationOfBoundedArithmetic.AxiomSchemes -import LeanPool.FormalizationOfBoundedArithmetic.BasicSingleSorted -import LeanPool.FormalizationOfBoundedArithmetic.Complexity -import LeanPool.FormalizationOfBoundedArithmetic.DisplayedVariables -import LeanPool.FormalizationOfBoundedArithmetic.IDelta0 -import LeanPool.FormalizationOfBoundedArithmetic.IOPEN -import LeanPool.FormalizationOfBoundedArithmetic.IsEnum -import LeanPool.FormalizationOfBoundedArithmetic.LanguagePeano -import LeanPool.FormalizationOfBoundedArithmetic.LanguageZambella -import LeanPool.FormalizationOfBoundedArithmetic.MathlibSimps -import LeanPool.FormalizationOfBoundedArithmetic.Order -import LeanPool.FormalizationOfBoundedArithmetic.Register -import LeanPool.FormalizationOfBoundedArithmetic.Semantics -import LeanPool.FormalizationOfBoundedArithmetic.SimpRules -import LeanPool.FormalizationOfBoundedArithmetic.Syntax -import LeanPool.FormalizationOfBoundedArithmetic.V0 -import LeanPool.FormalizationOfBoundedArithmetic.V0StrAddAssoc -import LeanPool.FormalizationOfBoundedArithmetic.V0StrAddComm -import LeanPool.FormalizationOfBoundedArithmetic.V0StrSuccAssoc +public import LeanPool.FormalizationOfBoundedArithmetic.Algebra +public import LeanPool.FormalizationOfBoundedArithmetic.AxiomSchemes +public import LeanPool.FormalizationOfBoundedArithmetic.BasicSingleSorted +public import LeanPool.FormalizationOfBoundedArithmetic.Complexity +public import LeanPool.FormalizationOfBoundedArithmetic.DisplayedVariables +public import LeanPool.FormalizationOfBoundedArithmetic.IDelta0 +public import LeanPool.FormalizationOfBoundedArithmetic.IOPEN +public import LeanPool.FormalizationOfBoundedArithmetic.IsEnum +public import LeanPool.FormalizationOfBoundedArithmetic.LanguagePeano +public import LeanPool.FormalizationOfBoundedArithmetic.LanguageZambella +public import LeanPool.FormalizationOfBoundedArithmetic.MathlibSimps +public import LeanPool.FormalizationOfBoundedArithmetic.Order +public import LeanPool.FormalizationOfBoundedArithmetic.Register +public import LeanPool.FormalizationOfBoundedArithmetic.Semantics +public import LeanPool.FormalizationOfBoundedArithmetic.SimpRules +public import LeanPool.FormalizationOfBoundedArithmetic.Syntax +public import LeanPool.FormalizationOfBoundedArithmetic.V0 +public import LeanPool.FormalizationOfBoundedArithmetic.V0StrAddAssoc +public import LeanPool.FormalizationOfBoundedArithmetic.V0StrAddComm +public import LeanPool.FormalizationOfBoundedArithmetic.V0StrSuccAssoc +import Mathlib.Tactic.Positivity.Finset /-! # Strengthened V0 Bounded Arithmetic Interfaces @@ -35,3 +37,5 @@ Main declarations: `V0Model.ind_strengthened_v0`, `str_add_assoc_strengthened_v0 Tags: logic, bounded-arithmetic, model-theory, computational-complexity MSC: 03F30, 03D15 -/ + +@[expose] public section diff --git a/LeanPool/FormalizationOfBoundedArithmetic/Algebra.lean b/LeanPool/FormalizationOfBoundedArithmetic/Algebra.lean index 6159a67259..6eec2db118 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/Algebra.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/Algebra.lean @@ -3,16 +3,18 @@ Copyright (c) 2026 ruplet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: ruplet -/ +module -import Mathlib.Algebra.Regular.Defs -import LeanPool.FormalizationOfBoundedArithmetic.IOPEN -import LeanPool.FormalizationOfBoundedArithmetic.IDelta0 +public import LeanPool.FormalizationOfBoundedArithmetic.IDelta0 +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.FormalizationOfBoundedArithmetic.Algebra -/ +@[expose] public section + -- INSTANCES! universe u v diff --git a/LeanPool/FormalizationOfBoundedArithmetic/AxiomSchemes.lean b/LeanPool/FormalizationOfBoundedArithmetic/AxiomSchemes.lean index 7a124e3f59..a0089656bf 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/AxiomSchemes.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/AxiomSchemes.lean @@ -3,24 +3,20 @@ Copyright (c) 2026 ruplet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: ruplet -/ +module -import Lean.Elab.Command +public import LeanPool.FormalizationOfBoundedArithmetic.Semantics -import Mathlib.ModelTheory.Syntax -import Mathlib.ModelTheory.Semantics -import LeanPool.FormalizationOfBoundedArithmetic.IsEnum -import LeanPool.FormalizationOfBoundedArithmetic.DisplayedVariables -import LeanPool.FormalizationOfBoundedArithmetic.LanguagePeano -import LeanPool.FormalizationOfBoundedArithmetic.LanguageZambella -import LeanPool.FormalizationOfBoundedArithmetic.Syntax -import LeanPool.FormalizationOfBoundedArithmetic.Semantics -import LeanPool.FormalizationOfBoundedArithmetic.Order + +public import LeanPool.FormalizationOfBoundedArithmetic.Order /-! # LeanPool.FormalizationOfBoundedArithmetic.AxiomSchemes -/ +@[expose] public section + open FirstOrder Language BoundedFormula Formula diff --git a/LeanPool/FormalizationOfBoundedArithmetic/BasicSingleSorted.lean b/LeanPool/FormalizationOfBoundedArithmetic/BasicSingleSorted.lean index b2bf836284..d476be70d0 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/BasicSingleSorted.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/BasicSingleSorted.lean @@ -3,14 +3,16 @@ Copyright (c) 2026 ruplet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: ruplet -/ +module -import Mathlib.ModelTheory.Semantics -import LeanPool.FormalizationOfBoundedArithmetic.LanguagePeano +public import LeanPool.FormalizationOfBoundedArithmetic.LanguagePeano /-! # LeanPool.FormalizationOfBoundedArithmetic.BasicSingleSorted -/ +@[expose] public section + open FirstOrder FirstOrder.Language universe u diff --git a/LeanPool/FormalizationOfBoundedArithmetic/Complexity.lean b/LeanPool/FormalizationOfBoundedArithmetic/Complexity.lean index e43aee2b1a..4c4761dd5a 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/Complexity.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/Complexity.lean @@ -3,20 +3,18 @@ Copyright (c) 2026 ruplet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: ruplet -/ +module -import Mathlib.ModelTheory.Complexity -import Mathlib.ModelTheory.Syntax -import LeanPool.FormalizationOfBoundedArithmetic.DisplayedVariables -import LeanPool.FormalizationOfBoundedArithmetic.Order -import LeanPool.FormalizationOfBoundedArithmetic.LanguagePeano -import LeanPool.FormalizationOfBoundedArithmetic.LanguageZambella +public import LeanPool.FormalizationOfBoundedArithmetic.Order import LeanPool.FormalizationOfBoundedArithmetic.Register /-! # LeanPool.FormalizationOfBoundedArithmetic.Complexity -/ +@[expose] public section + open FirstOrder Language universe u diff --git a/LeanPool/FormalizationOfBoundedArithmetic/DisplayedVariables.lean b/LeanPool/FormalizationOfBoundedArithmetic/DisplayedVariables.lean index 1bbd88a20e..97ba6674ba 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/DisplayedVariables.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/DisplayedVariables.lean @@ -3,17 +3,20 @@ Copyright (c) 2026 ruplet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: ruplet -/ +module -import Mathlib.ModelTheory.Syntax -import Mathlib.ModelTheory.Semantics -import Mathlib.Tactic.FinCases -import LeanPool.FormalizationOfBoundedArithmetic.IsEnum +public import Mathlib.ModelTheory.Syntax +public import LeanPool.FormalizationOfBoundedArithmetic.IsEnum import LeanPool.FormalizationOfBoundedArithmetic.Register +import Mathlib.Tactic.FinCases +import Std.Tactic.BVDecide.Normalize.Prop /-! # LeanPool.FormalizationOfBoundedArithmetic.DisplayedVariables -/ +@[expose] public section + /-- Names used for displayed free variables in formulas. -/ inductive FvName | x | y | z | X diff --git a/LeanPool/FormalizationOfBoundedArithmetic/IDelta0.lean b/LeanPool/FormalizationOfBoundedArithmetic/IDelta0.lean index a56e38e031..2b2eda6f5d 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/IDelta0.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/IDelta0.lean @@ -5,16 +5,22 @@ Authors: ruplet -/ -- import Mathlib.Algebra.Ring.Defs +module -import LeanPool.FormalizationOfBoundedArithmetic.DisplayedVariables -import LeanPool.FormalizationOfBoundedArithmetic.Complexity -import LeanPool.FormalizationOfBoundedArithmetic.IsEnum -import LeanPool.FormalizationOfBoundedArithmetic.IOPEN +public import LeanPool.FormalizationOfBoundedArithmetic.IOPEN +import LeanPool.FormalizationOfBoundedArithmetic.MathlibSimps +import LeanPool.FormalizationOfBoundedArithmetic.Register +import LeanPool.FormalizationOfBoundedArithmetic.Semantics +import LeanPool.FormalizationOfBoundedArithmetic.SimpRules +import Mathlib.Tactic.Positivity.Finset +import Std.Tactic.BVDecide.Normalize.Prop /-! # LeanPool.FormalizationOfBoundedArithmetic.IDelta0 -/ +@[expose] public section + open FirstOrder Language BoundedFormula /-- Models of open induction extended with induction for delta-zero formulas. -/ diff --git a/LeanPool/FormalizationOfBoundedArithmetic/IOPEN.lean b/LeanPool/FormalizationOfBoundedArithmetic/IOPEN.lean index 618996d71a..994b425b25 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/IOPEN.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/IOPEN.lean @@ -5,36 +5,25 @@ Authors: ruplet -/ -- for a quick demo, jump straight to `theorem add_assoc` -import Mathlib.Tactic.Core -import Mathlib.Basic.Logic.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith -import Mathlib.ModelTheory.Basic -import Mathlib.ModelTheory.Syntax -import Mathlib.ModelTheory.Complexity -import Mathlib.ModelTheory.Semantics - -import LeanPool.FormalizationOfBoundedArithmetic.IsEnum -import LeanPool.FormalizationOfBoundedArithmetic.AxiomSchemes -import LeanPool.FormalizationOfBoundedArithmetic.Syntax -import LeanPool.FormalizationOfBoundedArithmetic.Semantics -import LeanPool.FormalizationOfBoundedArithmetic.Complexity -import LeanPool.FormalizationOfBoundedArithmetic.Order -import LeanPool.FormalizationOfBoundedArithmetic.BasicSingleSorted +module + + +public import LeanPool.FormalizationOfBoundedArithmetic.AxiomSchemes +public import LeanPool.FormalizationOfBoundedArithmetic.Complexity +public import LeanPool.FormalizationOfBoundedArithmetic.BasicSingleSorted +import LeanPool.FormalizationOfBoundedArithmetic.MathlibSimps +import LeanPool.FormalizationOfBoundedArithmetic.Register +public import LeanPool.FormalizationOfBoundedArithmetic.Semantics import LeanPool.FormalizationOfBoundedArithmetic.SimpRules +import Mathlib.Tactic.Positivity.Finset +import Std.Tactic.BVDecide.Normalize.Prop /-! # LeanPool.FormalizationOfBoundedArithmetic.IOPEN -/ +@[expose] public section + open FirstOrder Language BoundedFormula /-- Models of BASIC arithmetic satisfying open induction. -/ diff --git a/LeanPool/FormalizationOfBoundedArithmetic/IsEnum.lean b/LeanPool/FormalizationOfBoundedArithmetic/IsEnum.lean index b31168923a..89474fea7a 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/IsEnum.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/IsEnum.lean @@ -6,17 +6,22 @@ Authors: ruplet -- Source: the example from https://lean-lang.org/doc/reference/latest/Type-Classes/Deriving-Instances/ -- extended with case for empty type +module + +public import Mathlib.Basic.Finite.Defs +public import Aesop.BuiltinRules +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToDual import Lean.Elab.Deriving.Basic -import Mathlib.Basic.IsEmpty.Basic -import Mathlib.Logic.Equiv.Defs -import Mathlib.Basic.Finite.Defs -import Mathlib.Data.List.Nodup import Mathlib.Data.List.OfFn /-! # LeanPool.FormalizationOfBoundedArithmetic.IsEnum -/ +@[expose] public section + open Lean Elab Parser Term Command universe u diff --git a/LeanPool/FormalizationOfBoundedArithmetic/LanguagePeano.lean b/LeanPool/FormalizationOfBoundedArithmetic/LanguagePeano.lean index aba08a4578..e0fe0d4903 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/LanguagePeano.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/LanguagePeano.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 ruplet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: ruplet -/ +module -import Mathlib.ModelTheory.Order +public import Mathlib.ModelTheory.Order import LeanPool.FormalizationOfBoundedArithmetic.Register @@ -12,6 +13,8 @@ import LeanPool.FormalizationOfBoundedArithmetic.Register # LeanPool.FormalizationOfBoundedArithmetic.LanguagePeano -/ +@[expose] public section + universe u v namespace FirstOrder diff --git a/LeanPool/FormalizationOfBoundedArithmetic/LanguageZambella.lean b/LeanPool/FormalizationOfBoundedArithmetic/LanguageZambella.lean index 65388b2751..5f3cf512be 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/LanguageZambella.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/LanguageZambella.lean @@ -3,18 +3,19 @@ Copyright (c) 2026 ruplet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: ruplet -/ +module -import Mathlib.ModelTheory.Syntax -import Mathlib.ModelTheory.Order -import Mathlib.ModelTheory.LanguageMap -import LeanPool.FormalizationOfBoundedArithmetic.DisplayedVariables -import LeanPool.FormalizationOfBoundedArithmetic.LanguagePeano +public import LeanPool.FormalizationOfBoundedArithmetic.DisplayedVariables +public import LeanPool.FormalizationOfBoundedArithmetic.LanguagePeano +import LeanPool.FormalizationOfBoundedArithmetic.Register /-! # LeanPool.FormalizationOfBoundedArithmetic.LanguageZambella -/ +@[expose] public section + universe u v u' namespace FirstOrder diff --git a/LeanPool/FormalizationOfBoundedArithmetic/MathlibSimps.lean b/LeanPool/FormalizationOfBoundedArithmetic/MathlibSimps.lean index 627f33b8ad..e2626a17c4 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/MathlibSimps.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/MathlibSimps.lean @@ -6,15 +6,10 @@ Authors: ruplet -- In this file this is crucial to be careful with imports, -- as all `simp` lemmas in scope will get our `delta0_simp` attribute! -import Lean.Elab.Command -import Mathlib.Lean.Meta.Simp -import Mathlib.Tactic.Simps.Basic +module -import Mathlib.ModelTheory.Basic -import Mathlib.ModelTheory.Syntax -import Mathlib.ModelTheory.Semantics -import Mathlib.ModelTheory.Order -import Mathlib.ModelTheory.Complexity + +public import Mathlib.ModelTheory.Order import LeanPool.FormalizationOfBoundedArithmetic.Register @@ -22,6 +17,8 @@ import LeanPool.FormalizationOfBoundedArithmetic.Register # LeanPool.FormalizationOfBoundedArithmetic.MathlibSimps -/ +@[expose] public section + open Lean Elab Command /-- Add existing Mathlib model-theory simp lemmas to the local `delta0_simps` simp set. -/ diff --git a/LeanPool/FormalizationOfBoundedArithmetic/Order.lean b/LeanPool/FormalizationOfBoundedArithmetic/Order.lean index eb8c376f20..fcb63dc3e9 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/Order.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/Order.lean @@ -3,19 +3,19 @@ Copyright (c) 2026 ruplet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: ruplet -/ +module -import Mathlib.ModelTheory.Syntax -import Mathlib.ModelTheory.Order -import Mathlib.Tactic.FinCases -import LeanPool.FormalizationOfBoundedArithmetic.DisplayedVariables -import LeanPool.FormalizationOfBoundedArithmetic.Syntax -import LeanPool.FormalizationOfBoundedArithmetic.LanguageZambella +public import LeanPool.FormalizationOfBoundedArithmetic.Syntax +public import LeanPool.FormalizationOfBoundedArithmetic.LanguageZambella +import Mathlib.Tactic.FinCases /-! # LeanPool.FormalizationOfBoundedArithmetic.Order -/ +@[expose] public section + namespace FirstOrder.Language.Formula open Language BoundedFormula diff --git a/LeanPool/FormalizationOfBoundedArithmetic/Register.lean b/LeanPool/FormalizationOfBoundedArithmetic/Register.lean index e1460f5988..7dbf849ab3 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/Register.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/Register.lean @@ -6,12 +6,18 @@ Authors: ruplet -- only here we register simp attributes -- details: https://leanprover-community.github.io/mathlib4_docs/Mathlib/Tactic/Attr/Core.html -import Lean +module + +public meta import Lean.Meta.Tactic.Simp.Simproc +meta import Lean.Meta.Tactic.Simp.Attr +import Lean.Meta.Tactic.Simp.RegisterCommand /-! # LeanPool.FormalizationOfBoundedArithmetic.Register Imported Lean Pool material for `LeanPool.FormalizationOfBoundedArithmetic.Register`. -/ + +@[expose] public section /-- Simp set used by the bounded-arithmetic import for formula normalization. -/ register_simp_attr delta0_simps diff --git a/LeanPool/FormalizationOfBoundedArithmetic/Semantics.lean b/LeanPool/FormalizationOfBoundedArithmetic/Semantics.lean index e3744ebe4e..ea0dcad420 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/Semantics.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/Semantics.lean @@ -3,22 +3,25 @@ Copyright (c) 2026 ruplet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: ruplet -/ +module -import Lean.Elab.Command +public meta import Lean.Elab.Tactic.Conv.Congr +public meta import Lean.Elab.Tactic.Conv.Rewrite +public meta import Lean.Elab.Tactic.Conv.Unfold -import Mathlib.ModelTheory.Semantics -import LeanPool.FormalizationOfBoundedArithmetic.Syntax -import LeanPool.FormalizationOfBoundedArithmetic.DisplayedVariables + +public import LeanPool.FormalizationOfBoundedArithmetic.Order +import LeanPool.FormalizationOfBoundedArithmetic.MathlibSimps +import LeanPool.FormalizationOfBoundedArithmetic.Register import LeanPool.FormalizationOfBoundedArithmetic.SimpRules -import LeanPool.FormalizationOfBoundedArithmetic.Order -import LeanPool.FormalizationOfBoundedArithmetic.LanguagePeano -import LeanPool.FormalizationOfBoundedArithmetic.LanguageZambella /-! # LeanPool.FormalizationOfBoundedArithmetic.Semantics -/ +@[expose] public section + namespace FirstOrder.Language attribute [local implicit_reducible] peano diff --git a/LeanPool/FormalizationOfBoundedArithmetic/SimpRules.lean b/LeanPool/FormalizationOfBoundedArithmetic/SimpRules.lean index 927b84ba8d..6e94be7fc9 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/SimpRules.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/SimpRules.lean @@ -3,13 +3,20 @@ Copyright (c) 2026 ruplet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: ruplet -/ +module -import LeanPool.FormalizationOfBoundedArithmetic.MathlibSimps +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.Push +import LeanPool.FormalizationOfBoundedArithmetic.Register +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Floor /-! # LeanPool.FormalizationOfBoundedArithmetic.SimpRules -/ +@[expose] public section + attribute [delta0_simps] Sum.elim_inl Sum.elim_inr diff --git a/LeanPool/FormalizationOfBoundedArithmetic/Syntax.lean b/LeanPool/FormalizationOfBoundedArithmetic/Syntax.lean index f2366cac57..11b3addff7 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/Syntax.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/Syntax.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 ruplet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: ruplet -/ +module -import Mathlib.ModelTheory.Syntax +public import Mathlib.ModelTheory.Syntax -import LeanPool.FormalizationOfBoundedArithmetic.IsEnum +public import LeanPool.FormalizationOfBoundedArithmetic.IsEnum /-! # LeanPool.FormalizationOfBoundedArithmetic.Syntax -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/FormalizationOfBoundedArithmetic/V0.lean b/LeanPool/FormalizationOfBoundedArithmetic/V0.lean index 01cb63a7c8..a01938552e 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/V0.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/V0.lean @@ -18,27 +18,19 @@ Authors: ruplet -- long term, this will be necessary. For now, this is probably weeks -- of work which we can skip until making sure that we'll get to any -- interesting result at all +module -import Lean.Elab.Command -import Mathlib.ModelTheory.Basic -import Mathlib.ModelTheory.Syntax -import Mathlib.ModelTheory.Complexity -import Mathlib.Tactic.SimpRw -import LeanPool.FormalizationOfBoundedArithmetic.BasicSingleSorted -import LeanPool.FormalizationOfBoundedArithmetic.IOPEN -import LeanPool.FormalizationOfBoundedArithmetic.IDelta0 -import LeanPool.FormalizationOfBoundedArithmetic.DisplayedVariables -import LeanPool.FormalizationOfBoundedArithmetic.Complexity -import LeanPool.FormalizationOfBoundedArithmetic.Algebra -import LeanPool.FormalizationOfBoundedArithmetic.AxiomSchemes -import LeanPool.FormalizationOfBoundedArithmetic.Register +public import LeanPool.FormalizationOfBoundedArithmetic.IDelta0 +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.FormalizationOfBoundedArithmetic.V0 -/ +@[expose] public section + open FirstOrder Language open HasTypesIs open HasEmptySet diff --git a/LeanPool/FormalizationOfBoundedArithmetic/V0StrAddAssoc.lean b/LeanPool/FormalizationOfBoundedArithmetic/V0StrAddAssoc.lean index 021f45d229..2c8869c09b 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/V0StrAddAssoc.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/V0StrAddAssoc.lean @@ -8,12 +8,20 @@ Authors: ruplet -- ∀ {X Y Z : str}, (X + Y) + Z = X + (Y + Z) -- However, the proof was done using leanstral and is very verbose -- Please see V0.lean for the manually written foundations. +module + +public import LeanPool.FormalizationOfBoundedArithmetic.V0 +import LeanPool.FormalizationOfBoundedArithmetic.SimpRules import LeanPool.FormalizationOfBoundedArithmetic.V0StrAddComm +import Mathlib.Tactic.Positivity.Finset +import Std.Tactic.BVDecide.Normalize.Prop /-! # LeanPool.FormalizationOfBoundedArithmetic.V0StrAddAssoc -/ +@[expose] public section + variable {num str : Type} [M : V0ExtModel num str] open FirstOrder Language open HasTypesIs diff --git a/LeanPool/FormalizationOfBoundedArithmetic/V0StrAddComm.lean b/LeanPool/FormalizationOfBoundedArithmetic/V0StrAddComm.lean index 9373f571f0..d894867b5e 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/V0StrAddComm.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/V0StrAddComm.lean @@ -8,12 +8,17 @@ Authors: ruplet -- ∀ {X Y : str}, X + Y = Y + X -- However, the proof was done using leanstral and is very verbose -- Please see V0.lean for the manually written foundations. -import LeanPool.FormalizationOfBoundedArithmetic.V0 +module + +public import LeanPool.FormalizationOfBoundedArithmetic.V0 +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.FormalizationOfBoundedArithmetic.V0StrAddComm -/ +@[expose] public section + variable {num str : Type} [M : V0ExtModel num str] open FirstOrder Language open HasTypesIs diff --git a/LeanPool/FormalizationOfBoundedArithmetic/V0StrSuccAssoc.lean b/LeanPool/FormalizationOfBoundedArithmetic/V0StrSuccAssoc.lean index 2de6eb88fa..dddd248990 100644 --- a/LeanPool/FormalizationOfBoundedArithmetic/V0StrSuccAssoc.lean +++ b/LeanPool/FormalizationOfBoundedArithmetic/V0StrSuccAssoc.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 ruplet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: ruplet -/ -import LeanPool.FormalizationOfBoundedArithmetic.V0 +module + +public import LeanPool.FormalizationOfBoundedArithmetic.V0 +import LeanPool.FormalizationOfBoundedArithmetic.SimpRules +import Mathlib.Tactic.Positivity.Finset +import Std.Tactic.BVDecide.Normalize.Prop /-! # LeanPool.FormalizationOfBoundedArithmetic.V0StrSuccAssoc -/ +@[expose] public section + -- This file proves: -- ∀ {X Y : str}, X + succ Y = succ (X + Y) -- However, the proof was done using leanstral and is very verbose diff --git a/LeanPool/FriezePatterns.lean b/LeanPool/FriezePatterns.lean index e5c2af67a7..f0da05e5c4 100644 --- a/LeanPool/FriezePatterns.lean +++ b/LeanPool/FriezePatterns.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Antoine de Saint-Germain. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine de Saint-Germain, Akselai, Jon Cheah, Bockman Cheung, Eaton Liu -/ +module -import LeanPool.FriezePatterns.Chapter1 -import LeanPool.FriezePatterns.Chapter2 -import LeanPool.FriezePatterns.Chapter3 +public import LeanPool.FriezePatterns.Chapter1 +public import LeanPool.FriezePatterns.Chapter2 +public import LeanPool.FriezePatterns.Chapter3 +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.NormNum.NatFib +import Mathlib.Tactic.Positivity.Finset /-! # Maxima of Coxeter frieze patterns are Fibonacci numbers @@ -18,3 +22,5 @@ Main declarations: `main3`, `FluteBounded`, `glideSymm`, `translationInvariance` Tags: combinatorics, frieze-patterns, fibonacci, coxeter MSC: 05E15, 11B39, 13F60 -/ + +@[expose] public section diff --git a/LeanPool/FriezePatterns/Chapter1.lean b/LeanPool/FriezePatterns/Chapter1.lean index f986a41655..9f519377b1 100644 --- a/LeanPool/FriezePatterns/Chapter1.lean +++ b/LeanPool/FriezePatterns/Chapter1.lean @@ -3,17 +3,19 @@ Copyright (c) 2026 Antoine de Saint-Germain. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine de Saint-Germain, Akselai, Jon Cheah, Bockman Cheung, Eaton Liu -/ +module -import Mathlib.Algebra.Field.Basic +public import Aesop.BuiltinRules +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Basic.Finite.Defs +public import Mathlib.Data.Set.Operations import Mathlib.Basic.Finite.Prod -import Mathlib.Data.Nat.Basic -import Mathlib.Data.Set.Finite.Range -import Mathlib.Tactic.Cases -import Mathlib.Tactic.Convert -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # LeanPool.FriezePatterns.Chapter1 @@ -21,6 +23,8 @@ import Mathlib.Tactic.Ring Imported Lean Pool material for `LeanPool.FriezePatterns.Chapter1`. -/ +@[expose] public section + /-- A field-valued frieze pattern of height `n`: a function `f : ℕ × ℕ → F` with `0`s on the row `i = 0`, `1`s on rows `i = 1` and `i = n`, `0`s on rows `i ≥ n + 1`, satisfying the diamond (or unimodular) relation `f (i + 1, m) * f (i + 1, m + 1) - 1 = f (i + 2, m) * f (i, m + 1)` diff --git a/LeanPool/FriezePatterns/Chapter2.lean b/LeanPool/FriezePatterns/Chapter2.lean index 8326649745..ed0ab6ad27 100644 --- a/LeanPool/FriezePatterns/Chapter2.lean +++ b/LeanPool/FriezePatterns/Chapter2.lean @@ -3,19 +3,24 @@ Copyright (c) 2026 Antoine de Saint-Germain. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine de Saint-Germain, Akselai, Jon Cheah, Bockman Cheung, Eaton Liu -/ +module -import LeanPool.FriezePatterns.Chapter1 -import Mathlib.Data.Nat.Fib.Basic -import Mathlib.Tactic.NormNum +public import Mathlib.Algebra.Ring.Divisibility.Basic + +public import Mathlib.Data.Nat.Fib.Basic +public import Mathlib.Data.Nat.Cast.Order.Ring +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Linarith.Frontend import Mathlib.Tactic.NormNum.NatFib -import Mathlib.Tactic.NthRewrite -import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.FriezePatterns.Chapter2 Imported Lean Pool material for `LeanPool.FriezePatterns.Chapter2`. -/ + +@[expose] public section ---- n-Flutes ---- /-- An `n`-flute: a positive integer sequence `a` with `a 0 = 1`, periodic with period diff --git a/LeanPool/FriezePatterns/Chapter3.lean b/LeanPool/FriezePatterns/Chapter3.lean index 74ef3470ec..8c4e149d83 100644 --- a/LeanPool/FriezePatterns/Chapter3.lean +++ b/LeanPool/FriezePatterns/Chapter3.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Antoine de Saint-Germain. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine de Saint-Germain, Akselai, Jon Cheah, Bockman Cheung, Eaton Liu -/ +module -import LeanPool.FriezePatterns.Chapter1 -import LeanPool.FriezePatterns.Chapter2 -import Mathlib.Data.Nat.ModEq -import Mathlib.Data.Rat.Defs -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push +public import LeanPool.FriezePatterns.Chapter1 +public import LeanPool.FriezePatterns.Chapter2 +public import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Algebra.Order.Field.Basic +public import Mathlib.Data.Nat.ModEq +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.NormNum.NatFib +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.FriezePatterns.Chapter3 @@ -17,6 +20,8 @@ import Mathlib.Tactic.Push Imported Lean Pool material for `LeanPool.FriezePatterns.Chapter3`. -/ +@[expose] public section + /-- An *arithmetic frieze pattern* of height `n`: a rational-valued frieze pattern with all denominators equal to one and positive interior entries. -/ @@ -96,9 +101,10 @@ def friezeToFlute (f : ℕ × ℕ → ℚ) (n m : ℕ) (hn : 2 ≤ n) [arith_fp simp [key, this] have this.num.toNat : (f (2, m)).num.toNat * (f (2, m + 1)).num.toNat = 2 := by have h₃ : 0 ≤ (f (2,m)).num := by - linarith [Rat.num_pos.mpr (@arith_fp.positive f n _ 2 m (by omega) (by omega))] + exact le_of_lt (Rat.num_pos.mpr (@arith_fp.positive f n _ 2 m (by omega) (by omega))) have h₄ : 0 ≤ (f (2,m+1)).num := by - linarith [Rat.num_pos.mpr (@arith_fp.positive f n _ 2 (m+1) (by omega) (by omega))] + exact le_of_lt (Rat.num_pos.mpr + (@arith_fp.positive f n _ 2 (m+1) (by omega) (by omega))) zify; rw [Int.toNat_of_nonneg h₃, Int.toNat_of_nonneg h₄, this.num] nth_rewrite 2 [← this.num.toNat] simp --finish if n=3, i_even @@ -163,16 +169,17 @@ def friezeToFlute (f : ℕ × ℕ → ℚ) (n m : ℕ) (hn : 2 ≤ n) [arith_fp (f ((n - 2), m)).num.toNat + (f ((n - 2) + 1 + 1, m)).num.toNat = (f (2, m + ((n - 2)))).num.toNat * (f ((n - 2) + 1,m)).num.toNat := by have h₂ : 0 ≤ (f ((n - 2), m)).num := by - linarith [Rat.num_pos.mpr (@arith_fp.positive f n _ ((n - 2)) m (by omega) (by omega))] + exact le_of_lt (Rat.num_pos.mpr + (@arith_fp.positive f n _ ((n - 2)) m (by omega) (by omega))) have h₃ : 0 ≤ (f ((n - 2) + 1 + 1, m)).num := by - linarith [Rat.num_pos.mpr - (@arith_fp.positive f n _ ((n - 2) + 1 + 1) m (by omega) (by omega))] + exact le_of_lt (Rat.num_pos.mpr + (@arith_fp.positive f n _ ((n - 2) + 1 + 1) m (by omega) (by omega))) have h₄ : 0 ≤ (f (2, m + ((n - 2)))).num := by - linarith [Rat.num_pos.mpr - (@arith_fp.positive f n _ 2 (m + ((n - 2))) (by omega) (by omega))] + exact le_of_lt (Rat.num_pos.mpr + (@arith_fp.positive f n _ 2 (m + ((n - 2))) (by omega) (by omega))) have h₅ : 0 ≤ (f ((n - 2) + 1,m)).num := by - linarith [Rat.num_pos.mpr - (@arith_fp.positive f n _ ((n - 2) + 1) m (by omega) (by omega))] + exact le_of_lt (Rat.num_pos.mpr + (@arith_fp.positive f n _ ((n - 2) + 1) m (by omega) (by omega))) zify rw [Int.toNat_of_nonneg h₂, Int.toNat_of_nonneg h₃, Int.toNat_of_nonneg h₄, Int.toNat_of_nonneg h₅, continuant3.num] @@ -192,13 +199,13 @@ def friezeToFlute (f : ℕ × ℕ → ℚ) (n m : ℕ) (hn : 2 ≤ n) [arith_fp by_contra boundary_neg rw [Nat.not_lt] at boundary_neg apply boundary - have this : i % (n - 1) + 1 = n - 1 := by linarith + have this : i % (n - 1) + 1 = n - 1 := by omega rw[Nat.add_mod, Nat.mod_eq_of_lt (one_lt_n_sub_one), this] simp have a₁ : (i + 1) % (n - 1) = (i) % (n - 1) + 1 := by rw[Nat.add_mod_of_add_mod_lt a₀₁] simp only [Nat.add_left_cancel_iff] - rw[Nat.mod_eq_of_lt (by linarith)] + rw[Nat.mod_eq_of_lt (by omega)] have a₀₂ : (i) % (n - 1) + (2) % (n - 1) < n - 1 := by rw[Nat.mod_eq_of_lt (two_lt_n_sub_one)] by_contra boundary_neg @@ -240,17 +247,17 @@ def friezeToFlute (f : ℕ × ℕ → ℚ) (n m : ℕ) (hn : 2 ≤ n) [arith_fp (f (i % (n - 1) + 1, m)).num.toNat + (f (i % (n - 1) + 1 + 1 + 1, m)).num.toNat = (f (2, m + (i % (n - 1) + 1))).num.toNat * (f (i % (n - 1) + 1 + 1,m)).num.toNat := by have h₂ : 0 ≤ (f (i % (n - 1) + 1, m)).num := by - linarith [Rat.num_pos.mpr - (@arith_fp.positive f n _ (i % (n - 1) + 1) m (by omega) (by omega))] + exact le_of_lt (Rat.num_pos.mpr + (@arith_fp.positive f n _ (i % (n - 1) + 1) m (by omega) (by omega))) have h₃ : 0 ≤ (f (i % (n - 1) + 1 + 1 + 1, m)).num := by - linarith [Rat.num_pos.mpr - (@arith_fp.positive f n _ (i % (n - 1) + 1 + 1 + 1) m (by omega) (by omega))] + exact le_of_lt (Rat.num_pos.mpr + (@arith_fp.positive f n _ (i % (n - 1) + 1 + 1 + 1) m (by omega) (by omega))) have h₄ : 0 ≤ (f (2, m + (i % (n - 1) + 1))).num := by - linarith [Rat.num_pos.mpr - (@arith_fp.positive f n _ 2 (m + (i % (n - 1) + 1)) (by omega) (by omega))] + exact le_of_lt (Rat.num_pos.mpr + (@arith_fp.positive f n _ 2 (m + (i % (n - 1) + 1)) (by omega) (by omega))) have h₅ : 0 ≤ (f (i % (n - 1) + 1 + 1,m)).num := by - linarith [Rat.num_pos.mpr - (@arith_fp.positive f n _ (i % (n - 1) + 1 + 1) m (by omega) (by omega))] + exact le_of_lt (Rat.num_pos.mpr + (@arith_fp.positive f n _ (i % (n - 1) + 1 + 1) m (by omega) (by omega))) zify rw [Int.toNat_of_nonneg h₂, Int.toNat_of_nonneg h₃, Int.toNat_of_nonneg h₄, Int.toNat_of_nonneg h₅, continuant.num] diff --git a/LeanPool/FrontierMathOpenHypergraphs.lean b/LeanPool/FrontierMathOpenHypergraphs.lean index 11c166208d..936885d571 100644 --- a/LeanPool/FrontierMathOpenHypergraphs.lean +++ b/LeanPool/FrontierMathOpenHypergraphs.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dean Cureton -/ +module -import LeanPool.FrontierMathOpenHypergraphs.Basic -import LeanPool.FrontierMathOpenHypergraphs.Substitution -import LeanPool.FrontierMathOpenHypergraphs.Uniform -import LeanPool.FrontierMathOpenHypergraphs.Lubell +public import LeanPool.FrontierMathOpenHypergraphs.Basic +public import LeanPool.FrontierMathOpenHypergraphs.Substitution +public import LeanPool.FrontierMathOpenHypergraphs.Uniform +public import LeanPool.FrontierMathOpenHypergraphs.Lubell +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # FrontierMath Ramsey Hypergraphs @@ -19,3 +23,5 @@ Main declarations: `HypergraphLowerBound.thm_main_H_lower_bound` Tags: combinatorics, hypergraphs, ramsey-theory, extremal-combinatorics, frontiermath MSC: 05C65, 05D10, 03E02 -/ + +@[expose] public section diff --git a/LeanPool/FrontierMathOpenHypergraphs/Basic.lean b/LeanPool/FrontierMathOpenHypergraphs/Basic.lean index 33c3863e58..c8d6c2b9e7 100644 --- a/LeanPool/FrontierMathOpenHypergraphs/Basic.lean +++ b/LeanPool/FrontierMathOpenHypergraphs/Basic.lean @@ -3,12 +3,9 @@ Copyright (c) 2026 Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dean Cureton -/ +module -import Mathlib.Data.Finset.Basic -import Mathlib.Data.Finset.Card -import Mathlib.Data.Finset.Union -import Mathlib.Data.Nat.Basic -import Mathlib.Order.Lattice.Nat +public import Mathlib.Order.Lattice.Nat /-! # Basic definitions for the hypergraph lower bound @@ -16,6 +13,8 @@ import Mathlib.Order.Lattice.Nat Basic definitions and the substitution theorem for the hypergraph lower bound. -/ +@[expose] public section + open Finset namespace HypergraphLowerBound diff --git a/LeanPool/FrontierMathOpenHypergraphs/Lubell.lean b/LeanPool/FrontierMathOpenHypergraphs/Lubell.lean index 2246b3e668..de080aedfc 100644 --- a/LeanPool/FrontierMathOpenHypergraphs/Lubell.lean +++ b/LeanPool/FrontierMathOpenHypergraphs/Lubell.lean @@ -3,42 +3,21 @@ Copyright (c) 2026 Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dean Cureton -/ +module +public import Mathlib.NumberTheory.Harmonic.Defs +public import Mathlib.Analysis.SpecialFunctions.Log.Base +public import LeanPool.FrontierMathOpenHypergraphs.Substitution +import all LeanPool.FrontierMathOpenHypergraphs.Uniform import Batteries.Tactic.OpenPrivate -import Mathlib.Algebra.GCDMonoid.Finset -import Mathlib.Algebra.Order.Group.Multiset -import Mathlib.Analysis.Convex.Jensen -import Mathlib.Analysis.SpecialFunctions.Log.NegMulLog -import Mathlib.Data.Fintype.Fin -import Mathlib.Data.Nat.Cast.Field -import Mathlib.Data.Nat.Basic -import Mathlib.Data.Nat.Choose.Basic -import Mathlib.Data.Nat.Choose.Cast -import Mathlib.Data.Nat.Choose.Sum -import Mathlib.Data.Nat.Log -import Mathlib.Data.Finset.Powerset -import Mathlib.Data.Multiset.Replicate -import Mathlib.NumberTheory.Harmonic.Defs import Mathlib.NumberTheory.Harmonic.Bounds -import Mathlib.Order.Filter.AtTopBot.Basic -import Mathlib.Order.Filter.AtTopBot.Tendsto -import Mathlib.Analysis.SpecialFunctions.Log.Base -import Mathlib.Topology.Order.LiminfLimsup -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Order -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring -import LeanPool.FrontierMathOpenHypergraphs.Basic -import LeanPool.FrontierMathOpenHypergraphs.Substitution -import LeanPool.FrontierMathOpenHypergraphs.Uniform /-! # Lubell frames and asymptotic context -/ +@[expose] public section + namespace HypergraphLowerBound open private WitnessStrong WitnessStrong.toWitnessData apply_frameData ws_singleton @@ -60,7 +39,7 @@ noncomputable def lubellMultiplicity (t j : ℕ) : ℕ := noncomputable def lubellCap (t : ℕ) : Fin t → ℕ := Function.const (Fin t) (M t) /-- Embed a `j`-subset of `[t]` into the type of support patterns. -/ -private def supportPatternEmbedding {t j : ℕ} (hj : 2 ≤ j) : +def supportPatternEmbedding {t j : ℕ} (hj : 2 ≤ j) : {S // S ∈ (((Finset.univ : Finset (Fin t)).powersetCard j).val)} ↪ SupportPattern t where toFun := fun S => ⟨S.1, by diff --git a/LeanPool/FrontierMathOpenHypergraphs/Substitution.lean b/LeanPool/FrontierMathOpenHypergraphs/Substitution.lean index 47255fefac..c73ec269b6 100644 --- a/LeanPool/FrontierMathOpenHypergraphs/Substitution.lean +++ b/LeanPool/FrontierMathOpenHypergraphs/Substitution.lean @@ -3,24 +3,23 @@ Copyright (c) 2026 Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dean Cureton -/ +module -import Mathlib.Algebra.BigOperators.Group.Finset.Basic +public import LeanPool.FrontierMathOpenHypergraphs.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import Mathlib.Algebra.Order.BigOperators.Group.Finset -import Mathlib.Data.Fin.Basic -import Mathlib.Data.Finset.Basic -import Mathlib.Data.Finset.Card -import Mathlib.Data.Fintype.Basic -import Mathlib.Data.Multiset.Basic -import Mathlib.Data.Nat.Basic -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import LeanPool.FrontierMathOpenHypergraphs.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Support gadgets and the substitution theorem -/ +@[expose] public section + open Finset namespace HypergraphLowerBound diff --git a/LeanPool/FrontierMathOpenHypergraphs/Uniform.lean b/LeanPool/FrontierMathOpenHypergraphs/Uniform.lean index bd40a4dbe8..d435a4f9d3 100644 --- a/LeanPool/FrontierMathOpenHypergraphs/Uniform.lean +++ b/LeanPool/FrontierMathOpenHypergraphs/Uniform.lean @@ -3,13 +3,23 @@ Copyright (c) 2026 Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dean Cureton -/ +module -import LeanPool.FrontierMathOpenHypergraphs.Uniform.Frames +public import LeanPool.FrontierMathOpenHypergraphs.Uniform.Frames +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Data.Nat.Pairing +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.IntervalCases +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.Ring.RingNF /-! # The uniform 26/25 factor and the finite bootstrap -/ +@[expose] public section + namespace HypergraphLowerBound local macro "eval_A_small" : tactic => diff --git a/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameBoosters.lean b/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameBoosters.lean index 03666e3645..454fdb25ba 100644 --- a/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameBoosters.lean +++ b/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameBoosters.lean @@ -3,110 +3,71 @@ Copyright (c) 2026 Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dean Cureton -/ +module -import LeanPool.FrontierMathOpenHypergraphs.Uniform.FrameDefs +public import LeanPool.FrontierMathOpenHypergraphs.Uniform.FrameDefs +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Booster-frame validations + +The larger checks are split into blocks of 128 masks to bound kernel memory. +Each block is evaluated directly by the kernel. -/ +@[expose] public section + namespace HypergraphLowerBound private theorem booster_0_valid : (boosters.get ⟨0, by decide⟩).IsValid := by - exact (boosters.get ⟨0, by decide⟩).checkComplementValid_sound rfl + exact (boosters.get ⟨0, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem booster_1_valid : (boosters.get ⟨1, by decide⟩).IsValid := by - exact (boosters.get ⟨1, by decide⟩).checkComplementValid_sound rfl + exact (boosters.get ⟨1, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem booster_2_valid : (boosters.get ⟨2, by decide⟩).IsValid := by - exact (boosters.get ⟨2, by decide⟩).checkComplementValid_sound rfl + exact (boosters.get ⟨2, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem booster_3_valid : (boosters.get ⟨3, by decide⟩).IsValid := by - exact (boosters.get ⟨3, by decide⟩).checkComplementValid_sound rfl - -private def booster4Spec : FrameSpec := - boosters.get ⟨4, by decide⟩ - -private theorem booster_4_check_0 : - checkComplementMasksDown booster4Spec 7 0 = true := rfl - -private theorem booster_4_check_1 : - checkComplementMasksDown booster4Spec 7 ((1 : Nat) <<< 7) = true := rfl - -private theorem booster_4_checkComplementValid : - booster4Spec.checkComplementValid = true := by - unfold FrameSpec.checkComplementValid - change checkComplementMasksDown booster4Spec 8 0 = true - exact checkComplementMasksDown_step_true booster4Spec 7 0 - booster_4_check_0 booster_4_check_1 + exact (boosters.get ⟨3, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem booster_4_valid : (boosters.get ⟨4, by decide⟩).IsValid := by - simpa [booster4Spec] using - booster4Spec.checkComplementValid_sound booster_4_checkComplementValid - -private def booster5Spec : FrameSpec := - boosters.get ⟨5, by decide⟩ - -private theorem booster_5_check_0 : - checkComplementMasksDown booster5Spec 7 0 = true := rfl - -private theorem booster_5_check_1 : - checkComplementMasksDown booster5Spec 7 ((1 : Nat) <<< 7) = true := rfl - -private theorem booster_5_checkComplementValid : - booster5Spec.checkComplementValid = true := by - unfold FrameSpec.checkComplementValid - change checkComplementMasksDown booster5Spec 8 0 = true - exact checkComplementMasksDown_step_true booster5Spec 7 0 - booster_5_check_0 booster_5_check_1 + apply (boosters.get ⟨4, by decide⟩).checkComplementValid_sound + change checkComplementMasksDown _ 8 0 = true + apply checkComplementMasksDown_step_true <;> decide +kernel private theorem booster_5_valid : (boosters.get ⟨5, by decide⟩).IsValid := by - simpa [booster5Spec] using - booster5Spec.checkComplementValid_sound booster_5_checkComplementValid + apply (boosters.get ⟨5, by decide⟩).checkComplementValid_sound + change checkComplementMasksDown _ 8 0 = true + apply checkComplementMasksDown_step_true <;> decide +kernel private def booster6Spec : FrameSpec := boosters.get ⟨6, by decide⟩ -private theorem booster_6_check_00 : - checkComplementMasksDown booster6Spec 7 0 = true := rfl - -private theorem booster_6_check_01 : - checkComplementMasksDown booster6Spec 7 ((1 : Nat) <<< 7) = true := rfl - private theorem booster_6_check_0 : checkComplementMasksDown booster6Spec 8 0 = true := by - exact checkComplementMasksDown_step_true booster6Spec 7 0 - booster_6_check_00 booster_6_check_01 - -private theorem booster_6_check_10 : - checkComplementMasksDown booster6Spec 7 ((1 : Nat) <<< 8) = true := rfl - -private theorem booster_6_check_11 : - checkComplementMasksDown booster6Spec 7 - (((1 : Nat) <<< 8) ||| ((1 : Nat) <<< 7)) = true := rfl + apply checkComplementMasksDown_step_true <;> decide +kernel private theorem booster_6_check_1 : checkComplementMasksDown booster6Spec 8 ((1 : Nat) <<< 8) = true := by - exact checkComplementMasksDown_step_true booster6Spec 7 ((1 : Nat) <<< 8) - booster_6_check_10 booster_6_check_11 - -private theorem booster_6_checkComplementValid : - booster6Spec.checkComplementValid = true := by - unfold FrameSpec.checkComplementValid - change checkComplementMasksDown booster6Spec 9 0 = true - exact checkComplementMasksDown_step_true booster6Spec 8 0 - booster_6_check_0 booster_6_check_1 + apply checkComplementMasksDown_step_true <;> decide +kernel private theorem booster_6_valid : (boosters.get ⟨6, by decide⟩).IsValid := by - simpa [booster6Spec] using - booster6Spec.checkComplementValid_sound booster_6_checkComplementValid + apply booster6Spec.checkComplementValid_sound + exact checkComplementMasksDown_step_true booster6Spec 8 0 + booster_6_check_0 booster_6_check_1 theorem boosters_valid : ∀ spec ∈ boosters, spec.IsValid := by diff --git a/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameDefs.lean b/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameDefs.lean index 7b8d00f22b..2defd34702 100644 --- a/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameDefs.lean +++ b/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameDefs.lean @@ -3,26 +3,28 @@ Copyright (c) 2026 Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dean Cureton -/ +module +public import Mathlib.Algebra.CharZero.Defs + +public import LeanPool.FrontierMathOpenHypergraphs.Substitution +public import Mathlib.Data.Fintype.Powerset +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.ToAdditive import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Data.Fin.VecNotation -import Mathlib.Data.Fintype.Fin -import Mathlib.Data.Nat.Basic import Mathlib.Data.Nat.Bitwise -import Mathlib.Data.Nat.Pairing -import Mathlib.Data.Finset.Powerset +import Mathlib.Data.Rat.Cast.Order import Mathlib.Tactic.Bound -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import LeanPool.FrontierMathOpenHypergraphs.Substitution +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # The uniform 26/25 factor and the finite bootstrap -/ +@[expose] public section + namespace HypergraphLowerBound /-! ## The sequence A_n -/ @@ -45,7 +47,8 @@ def FrameSpec.t (spec : FrameSpec) : ℕ := def FrameSpec.cap (spec : FrameSpec) : Fin spec.t → ℕ := fun i => spec.parts.get i -private def supportPatternOfList {t : ℕ} (s : List ℕ) +/-- Encode a list of support indices as a support pattern. -/ +def supportPatternOfList {t : ℕ} (s : List ℕ) (hIn : ∀ i ∈ s, i < t) (hNodup : s.Nodup) (hCard : 2 ≤ s.length) : SupportPattern t := by let finList : List (Fin t) := s.pmap (fun i hi => (⟨i, hi⟩ : Fin t)) hIn @@ -93,14 +96,22 @@ instance (spec : FrameSpec) : Decidable spec.IsValid := by unfold FrameSpec.IsValid FrameSpec.countWitnesses infer_instance -private def sup2 (a b : ℕ) : List ℕ := [a, b] -private def sup3 (a b c : ℕ) : List ℕ := [a, b, c] -private def sup4 (a b c d : ℕ) : List ℕ := [a, b, c, d] -private def sup5 (a b c d e : ℕ) : List ℕ := [a, b, c, d, e] -private def sup6 (a b c d e f : ℕ) : List ℕ := [a, b, c, d, e, f] -private def sup7 (a b c d e f g : ℕ) : List ℕ := [a, b, c, d, e, f, g] -private def sup8 (a b c d e f g h : ℕ) : List ℕ := [a, b, c, d, e, f, g, h] -private def sup9 (a b c d e f g h i : ℕ) : List ℕ := [a, b, c, d, e, f, g, h, i] +/-- A support list with 2 specified indices. -/ +def sup2 (a b : ℕ) : List ℕ := [a, b] +/-- A support list with 3 specified indices. -/ +def sup3 (a b c : ℕ) : List ℕ := [a, b, c] +/-- A support list with 4 specified indices. -/ +def sup4 (a b c d : ℕ) : List ℕ := [a, b, c, d] +/-- A support list with 5 specified indices. -/ +def sup5 (a b c d e : ℕ) : List ℕ := [a, b, c, d, e] +/-- A support list with 6 specified indices. -/ +def sup6 (a b c d e f : ℕ) : List ℕ := [a, b, c, d, e, f] +/-- A support list with 7 specified indices. -/ +def sup7 (a b c d e f g : ℕ) : List ℕ := [a, b, c, d, e, f, g] +/-- A support list with 8 specified indices. -/ +def sup8 (a b c d e f g h : ℕ) : List ℕ := [a, b, c, d, e, f, g, h] +/-- A support list with 9 specified indices. -/ +def sup9 (a b c d e f g h i : ℕ) : List ℕ := [a, b, c, d, e, f, g, h, i] local notation "s2" => sup2 local notation "s3" => sup3 @@ -111,7 +122,8 @@ local notation "s7" => sup7 local notation "s8" => sup8 local notation "s9" => sup9 -private def mkFrame (parts : List ℕ) (rawSupports : List (List ℕ)) +/-- Build a frame specification from its parts and raw support lists. -/ +def mkFrame (parts : List ℕ) (rawSupports : List (List ℕ)) (h : ∀ s ∈ rawSupports, s.Nodup ∧ (∀ i ∈ s, i < parts.length) ∧ 2 ≤ s.length) : FrameSpec where parts := parts @@ -136,15 +148,19 @@ private inductive ChoiceKind where | boost31 | boost32 | boost33 -deriving DecidableEq, Repr, Inhabited +deriving DecidableEq, Repr + +private instance : Inhabited ChoiceKind := ⟨.base⟩ private structure ChoiceSpec where kind : ChoiceKind parts : List ℕ bonus : ℕ -deriving Inhabited -private def core4Supports : List (List ℕ) := +private instance : Inhabited ChoiceSpec := ⟨⟨.base, [], 0⟩⟩ + +/-- The support lists of the four-core frame. -/ +def core4Supports : List (List ℕ) := [ s2 0 1 , s2 0 2 , s2 0 3 @@ -1449,7 +1465,8 @@ private theorem bit_testBit_gt {n i : Nat} (hi : n < i) : · cases htest : Nat.testBit 1 (i - n) <;> simp_all simp_all -private def maskFinset (spec : FrameSpec) (mask : Nat) : Finset (Fin spec.t) := +/-- The frame coordinates selected by a natural-number bit mask. -/ +def maskFinset (spec : FrameSpec) (mask : Nat) : Finset (Fin spec.t) := Finset.univ.filter fun i => mask.testBit i.1 /-- Recursively check the maximal witness set for each right-hand side support mask. -/ diff --git a/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameExact.lean b/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameExact.lean index 0c8a50a577..e5ddf5f67b 100644 --- a/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameExact.lean +++ b/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameExact.lean @@ -3,98 +3,107 @@ Copyright (c) 2026 Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dean Cureton -/ +module -import LeanPool.FrontierMathOpenHypergraphs.Uniform.FrameDefs +public import LeanPool.FrontierMathOpenHypergraphs.Uniform.FrameDefs +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Exact small-frame validations -/ +@[expose] public section + namespace HypergraphLowerBound private theorem exactSmallFrame_0_valid : (exactSmallFrames.get ⟨0, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨0, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨0, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_1_valid : (exactSmallFrames.get ⟨1, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨1, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨1, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_2_valid : (exactSmallFrames.get ⟨2, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨2, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨2, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_3_valid : (exactSmallFrames.get ⟨3, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨3, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨3, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_4_valid : (exactSmallFrames.get ⟨4, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨4, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨4, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_5_valid : (exactSmallFrames.get ⟨5, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨5, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨5, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_6_valid : (exactSmallFrames.get ⟨6, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨6, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨6, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_7_valid : (exactSmallFrames.get ⟨7, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨7, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨7, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_8_valid : (exactSmallFrames.get ⟨8, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨8, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨8, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_9_valid : (exactSmallFrames.get ⟨9, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨9, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨9, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_10_valid : (exactSmallFrames.get ⟨10, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨10, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨10, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_11_valid : (exactSmallFrames.get ⟨11, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨11, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨11, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_12_valid : (exactSmallFrames.get ⟨12, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨12, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨12, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_13_valid : (exactSmallFrames.get ⟨13, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨13, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨13, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_14_valid : (exactSmallFrames.get ⟨14, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨14, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨14, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_15_valid : (exactSmallFrames.get ⟨15, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨15, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨15, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_16_valid : (exactSmallFrames.get ⟨16, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨16, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨16, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_17_valid : (exactSmallFrames.get ⟨17, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨17, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨17, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_18_valid : (exactSmallFrames.get ⟨18, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨18, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨18, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_19_valid : (exactSmallFrames.get ⟨19, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨19, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨19, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem exactSmallFrame_20_valid : (exactSmallFrames.get ⟨20, by decide⟩).IsValid := by - exact (exactSmallFrames.get ⟨20, by decide⟩).checkComplementValid_sound rfl + exact (exactSmallFrames.get ⟨20, by decide⟩).checkComplementValid_sound (by decide +kernel) theorem exactSmallFrames_valid : ∀ spec ∈ exactSmallFrames, spec.IsValid := by diff --git a/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameResidues.lean b/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameResidues.lean index c19ce7185e..7096abf6ac 100644 --- a/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameResidues.lean +++ b/LeanPool/FrontierMathOpenHypergraphs/Uniform/FrameResidues.lean @@ -3,62 +3,71 @@ Copyright (c) 2026 Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dean Cureton -/ +module -import LeanPool.FrontierMathOpenHypergraphs.Uniform.FrameDefs +public import LeanPool.FrontierMathOpenHypergraphs.Uniform.FrameDefs +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Residue-gadget validations -/ +@[expose] public section + namespace HypergraphLowerBound private theorem residueGadget_0_valid : (residueGadgets.get ⟨0, by decide⟩).IsValid := by - exact (residueGadgets.get ⟨0, by decide⟩).checkComplementValid_sound rfl + exact (residueGadgets.get ⟨0, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem residueGadget_1_valid : (residueGadgets.get ⟨1, by decide⟩).IsValid := by - exact (residueGadgets.get ⟨1, by decide⟩).checkComplementValid_sound rfl + exact (residueGadgets.get ⟨1, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem residueGadget_2_valid : (residueGadgets.get ⟨2, by decide⟩).IsValid := by - exact (residueGadgets.get ⟨2, by decide⟩).checkComplementValid_sound rfl + exact (residueGadgets.get ⟨2, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem residueGadget_3_valid : (residueGadgets.get ⟨3, by decide⟩).IsValid := by - exact (residueGadgets.get ⟨3, by decide⟩).checkComplementValid_sound rfl + exact (residueGadgets.get ⟨3, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem residueGadget_4_valid : (residueGadgets.get ⟨4, by decide⟩).IsValid := by - exact (residueGadgets.get ⟨4, by decide⟩).checkComplementValid_sound rfl + exact (residueGadgets.get ⟨4, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem residueGadget_5_valid : (residueGadgets.get ⟨5, by decide⟩).IsValid := by - exact (residueGadgets.get ⟨5, by decide⟩).checkComplementValid_sound rfl + exact (residueGadgets.get ⟨5, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem residueGadget_6_valid : (residueGadgets.get ⟨6, by decide⟩).IsValid := by - exact (residueGadgets.get ⟨6, by decide⟩).checkComplementValid_sound rfl + exact (residueGadgets.get ⟨6, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem residueGadget_7_valid : (residueGadgets.get ⟨7, by decide⟩).IsValid := by - exact (residueGadgets.get ⟨7, by decide⟩).checkComplementValid_sound rfl + exact (residueGadgets.get ⟨7, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem residueGadget_8_valid : (residueGadgets.get ⟨8, by decide⟩).IsValid := by - exact (residueGadgets.get ⟨8, by decide⟩).checkComplementValid_sound rfl + exact (residueGadgets.get ⟨8, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem residueGadget_9_valid : (residueGadgets.get ⟨9, by decide⟩).IsValid := by - exact (residueGadgets.get ⟨9, by decide⟩).checkComplementValid_sound rfl + exact (residueGadgets.get ⟨9, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem residueGadget_10_valid : (residueGadgets.get ⟨10, by decide⟩).IsValid := by - exact (residueGadgets.get ⟨10, by decide⟩).checkComplementValid_sound rfl + exact (residueGadgets.get ⟨10, by decide⟩).checkComplementValid_sound (by decide +kernel) private theorem residueGadget_11_valid : (residueGadgets.get ⟨11, by decide⟩).IsValid := by - exact (residueGadgets.get ⟨11, by decide⟩).checkComplementValid_sound rfl + exact (residueGadgets.get ⟨11, by decide⟩).checkComplementValid_sound (by decide +kernel) theorem residueGadgets_valid : ∀ spec ∈ residueGadgets, spec.IsValid := by diff --git a/LeanPool/FrontierMathOpenHypergraphs/Uniform/Frames.lean b/LeanPool/FrontierMathOpenHypergraphs/Uniform/Frames.lean index 85a86a8364..a2f0e20fa9 100644 --- a/LeanPool/FrontierMathOpenHypergraphs/Uniform/Frames.lean +++ b/LeanPool/FrontierMathOpenHypergraphs/Uniform/Frames.lean @@ -3,15 +3,24 @@ Copyright (c) 2026 Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dean Cureton -/ +module -import LeanPool.FrontierMathOpenHypergraphs.Uniform.FrameExact +public import LeanPool.FrontierMathOpenHypergraphs.Uniform.FrameDefs import LeanPool.FrontierMathOpenHypergraphs.Uniform.FrameBoosters +import LeanPool.FrontierMathOpenHypergraphs.Uniform.FrameExact import LeanPool.FrontierMathOpenHypergraphs.Uniform.FrameResidues +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Finite frame bank -/ +@[expose] public section + namespace HypergraphLowerBound /-- Every exact small frame, booster, and residue gadget listed in the appendices diff --git a/LeanPool/FundamentalInequality.lean b/LeanPool/FundamentalInequality.lean index 9afbe3d50f..d89a98f44c 100644 --- a/LeanPool/FundamentalInequality.lean +++ b/LeanPool/FundamentalInequality.lean @@ -3,21 +3,9 @@ Copyright (c) 2026 Alessandro Linzi. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alessandro Linzi -/ +module -import Mathlib.RingTheory.Valuation.Basic -import Mathlib.RingTheory.Valuation.ValuationRing -import Mathlib.RingTheory.Valuation.Extension -import Mathlib.RingTheory.Valuation.ValuationSubring -import Mathlib.Algebra.Order.Group.Defs -import Mathlib.GroupTheory.Index -import Mathlib.RingTheory.IntegralClosure.IsIntegral.Basic -import Mathlib.RingTheory.LocalRing.ResidueField.Basic -import Mathlib.FieldTheory.Tower -import Mathlib.FieldTheory.Separable -import Mathlib.LinearAlgebra.Basis.Basic -import Mathlib.LinearAlgebra.Dimension.Free -import Mathlib.LinearAlgebra.Dimension.Finrank -import Mathlib.LinearAlgebra.Dimension.Finite +public import Mathlib.RingTheory.Valuation.Extension /-! # The Fundamental Inequality of Valued Fields @@ -30,6 +18,8 @@ Tags: valued-fields, number-theory, valuation-theory MSC: 12J20 -/ +@[expose] public section + /-! # Ramification Index, Residue Degree, and the Fundamental Inequality diff --git a/LeanPool/GKPCarry.lean b/LeanPool/GKPCarry.lean index e35a0ce9dc..ca69668f87 100644 --- a/LeanPool/GKPCarry.lean +++ b/LeanPool/GKPCarry.lean @@ -3,9 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.GKPCarry.DensityOne -import LeanPool.GKPCarry.FiniteRangeCorollary +public import LeanPool.GKPCarry.DensityOne +public import LeanPool.GKPCarry.FiniteRangeCorollary +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Density-One GKP Divisibility and Its Carry-Language Characterization @@ -17,3 +28,5 @@ Main declarations: `GKPCarry.tendsto_gkpSuccessProportion_one` Tags: number-theory, finite-automata, asymptotic-density MSC: 11A63, 11B65, 68Q45 -/ + +@[expose] public section diff --git a/LeanPool/GKPCarry/BadCarryCounting.lean b/LeanPool/GKPCarry/BadCarryCounting.lean index 7bc70e56ba..34881b12e5 100644 --- a/LeanPool/GKPCarry/BadCarryCounting.lean +++ b/LeanPool/GKPCarry/BadCarryCounting.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.GKPCarry.BadCarryLanguage -import Lean.Elab.Tactic.Omega +module + +public import LeanPool.GKPCarry.BadCarryLanguage +public import Mathlib.Data.Fintype.Vector +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Data.Fintype.BigOperators -import Mathlib.Data.Fintype.Vector -import Mathlib.Tactic.Ring +import Mathlib.Data.Nat.SuccPred /-! # Counting deficient-carry ternary words @@ -19,6 +20,8 @@ when doubled. The theorem below uses the subtraction-free parameterization `m = n + 2`. -/ +@[expose] public section + namespace GKPCarry open scoped BigOperators diff --git a/LeanPool/GKPCarry/BadCarryLanguage.lean b/LeanPool/GKPCarry/BadCarryLanguage.lean index 41f4461081..d8c616cd0c 100644 --- a/LeanPool/GKPCarry/BadCarryLanguage.lean +++ b/LeanPool/GKPCarry/BadCarryLanguage.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.GKPCarry.CarryArithmetic -import Lean.Elab.Tactic.Omega +module + +public import LeanPool.GKPCarry.Definitions +import Mathlib.Data.List.Monad +import Mathlib.Data.Nat.SuccPred import Mathlib.Tactic.IntervalCases /-! @@ -16,6 +19,8 @@ explicit digit patterns. This turns the remaining GKP power-of-two condition into an exact regular-language avoidance statement. -/ +@[expose] public section + namespace GKPCarry open Nat diff --git a/LeanPool/GKPCarry/BinaryReduction.lean b/LeanPool/GKPCarry/BinaryReduction.lean index c78ef2d772..0eff5d50d6 100644 --- a/LeanPool/GKPCarry/BinaryReduction.lean +++ b/LeanPool/GKPCarry/BinaryReduction.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.GKPCarry.Kummer -import Lean.Elab.Tactic.Omega -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring +module + +public import LeanPool.GKPCarry.Statement +public import Mathlib.Data.Nat.Digits.Defs +public import Mathlib.Data.Nat.MaxPowDiv +public import Mathlib.Data.Nat.PadicValNat +import Mathlib.NumberTheory.Padics.PadicVal.Basic /-! # Binary reduction of the GKP conjecture @@ -18,6 +19,8 @@ binomial coefficient with binary popcount. Hence every positive non-power of two already satisfies the divisibility-by-four branch of GKP. -/ +@[expose] public section + namespace GKPCarry open Nat diff --git a/LeanPool/GKPCarry/CarryArithmetic.lean b/LeanPool/GKPCarry/CarryArithmetic.lean index ad92283d74..8192e58dad 100644 --- a/LeanPool/GKPCarry/CarryArithmetic.lean +++ b/LeanPool/GKPCarry/CarryArithmetic.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module + +public import LeanPool.GKPCarry.Definitions +public import LeanPool.GKPCarry.Statement import LeanPool.GKPCarry.BinaryReduction -import LeanPool.GKPCarry.Definitions -import Lean.Elab.Tactic.Omega +import LeanPool.GKPCarry.Kummer import Mathlib.Data.Nat.Digits.Lemmas -import Mathlib.Tactic.IntervalCases /-! # Arithmetic correctness of the ternary doubling transducer @@ -17,6 +19,8 @@ a little-endian ternary word. This file proves that, on the canonical ternary digits of `n`, twice that count is exactly Kummer's ternary digit excess. -/ +@[expose] public section + namespace GKPCarry open Nat diff --git a/LeanPool/GKPCarry/Definitions.lean b/LeanPool/GKPCarry/Definitions.lean index b37175303f..472ec712dd 100644 --- a/LeanPool/GKPCarry/Definitions.lean +++ b/LeanPool/GKPCarry/Definitions.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import Lean.Elab.Tactic.Omega -import Mathlib.Data.List.Count -import Mathlib.Data.Nat.Digits.Defs +module + +public import Mathlib.Data.Nat.Digits.Defs /-! # Ternary prefixes and doubling carries @@ -15,6 +15,8 @@ bounded C3 corollary. Ternary digit lists are little-endian, following `Nat.digits`. -/ +@[expose] public section + namespace GKPCarry /-- Length of the canonical base-three expansion of `n`. -/ diff --git a/LeanPool/GKPCarry/DensityOne.lean b/LeanPool/GKPCarry/DensityOne.lean index c4714852c0..6fe9231d16 100644 --- a/LeanPool/GKPCarry/DensityOne.lean +++ b/LeanPool/GKPCarry/DensityOne.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.GKPCarry.InfiniteSieve -import Mathlib.Data.Nat.Cast.Order.Field +module + +public import LeanPool.GKPCarry.InfiniteSieve +meta import Lean.Meta.Tactic.NormCast +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Normed.Module.Basic +import Mathlib.Analysis.SpecificLimits.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # A density-one theorem for the GKP power-of-two condition @@ -20,6 +30,8 @@ The universal conjecture remains open because a density-zero failure set need not be empty. -/ +@[expose] public section + namespace GKPCarry /-- Possible GKP failures among exponents below `bound`. -/ diff --git a/LeanPool/GKPCarry/FiniteRange.lean b/LeanPool/GKPCarry/FiniteRange.lean index ae59ca1957..2501bf07c7 100644 --- a/LeanPool/GKPCarry/FiniteRange.lean +++ b/LeanPool/GKPCarry/FiniteRange.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module + +public import LeanPool.GKPCarry.Definitions import LeanPool.GKPCarry.ModularPrefix +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Digits.Lemmas +import Mathlib.Tactic.Positivity.Finset /-! # Kernel-checked bounded C3 certificate @@ -11,12 +17,46 @@ import LeanPool.GKPCarry.ModularPrefix The Boolean certificates cover `27 ≤ m ≤ 6560` over the five ranges on which the ternary length is constant. Within each range, modular residues are advanced by multiplication by four, so only the first power is computed from scratch. +Residue tests stop scanning ternary digits as soon as two twos have been found. Their soundness is transported through proved modular exponentiation and ternary prefix lemmas, yielding the headline carry theorem at the end of this file. -/ +@[expose] public section + namespace GKPCarry +/-- Test whether the ternary expansion contains at least `required` twos, +stopping as soon as enough have been found. -/ +def hasAtLeastTernaryTwos : (required n : ℕ) → Bool + | 0, _ => true + | required + 1, n => + if hzero : n = 0 then false + else if n % 3 = 2 then hasAtLeastTernaryTwos required (n / 3) + else hasAtLeastTernaryTwos (required + 1) (n / 3) +termination_by _ n => n +decreasing_by all_goals exact Nat.div_lt_self (Nat.pos_of_ne_zero hzero) (by decide) + +/-- The digit scanner is equivalent to counting twos in the canonical ternary expansion. -/ +theorem hasAtLeastTernaryTwos_eq_true (required n : ℕ) : + hasAtLeastTernaryTwos required n = true ↔ required ≤ (Nat.digits 3 n).count 2 := by + induction n using Nat.strong_induction_on generalizing required with + | h n ih => + cases required with + | zero => simp [hasAtLeastTernaryTwos] + | succ required => + by_cases hzero : n = 0 + · subst n + simp [hasAtLeastTernaryTwos] + · have hpositive : 0 < n := Nat.pos_of_ne_zero hzero + have hdiv : n / 3 < n := Nat.div_lt_self hpositive (by decide) + rw [hasAtLeastTernaryTwos] + simp only [hzero, ↓reduceDIte] + rw [Nat.digits_def' (by decide) hpositive, List.count_cons] + by_cases hdigit : n % 3 = 2 + · simpa [hdigit] using ih (n / 3) hdiv required + · simpa [hdigit] using ih (n / 3) hdiv (required + 1) + private lemma powMod_succ (base exponent modulus : ℕ) : powMod base (exponent + 1) modulus = base * powMod base exponent modulus % modulus := by @@ -29,17 +69,11 @@ private lemma powMod_add (base left right modulus : ℕ) : rw [powMod_eq_pow_mod, powMod_eq_pow_mod, powMod_eq_pow_mod, pow_add, Nat.mod_mul_mod, Nat.mul_mod_mod] -/-- Advance a residue by `count` multiplications by four. -/ -private def finiteAdvance (modulus residue : ℕ) : ℕ → ℕ - | 0 => residue - | count + 1 => - finiteAdvance modulus (4 * residue % modulus) count - /-- Check `count` consecutive residues. -/ private def finiteCheckBlock (modulus residue : ℕ) : ℕ → Bool | 0 => true | count + 1 => - decide (2 ≤ (Nat.digits 3 residue).count 2) && + hasAtLeastTernaryTwos 2 residue && finiteCheckBlock modulus (4 * residue % modulus) count /-- Compute the residue after `blocks` blocks without a deep recursive term. -/ @@ -51,26 +85,15 @@ private def finiteCheckBlocks (modulus residue : ℕ) : ℕ → Bool | 0 => true | blocks + 1 => finiteCheckBlock modulus residue 64 && - finiteCheckBlocks modulus (finiteAdvance modulus residue 64) blocks + finiteCheckBlocks modulus (finiteAdvanceBlocks modulus residue 1) blocks private def finiteCheck (lower count digitLength : ℕ) : Bool := let modulus := 3 ^ (6 * digitLength) - let blocks := finiteCheckBlocks modulus (powMod 4 lower modulus) (count / 64) - let residue := finiteAdvanceBlocks modulus (powMod 4 lower modulus) (count / 64) + let initial := powMod 4 lower modulus + let blocks := finiteCheckBlocks modulus initial (count / 64) + let residue := finiteAdvanceBlocks modulus initial (count / 64) blocks && finiteCheckBlock modulus residue (count % 64) -private lemma finiteAdvance_sound - {modulus residue lower count : ℕ} - (hresidue : residue = powMod 4 lower modulus) : - finiteAdvance modulus residue count = powMod 4 (lower + count) modulus := by - induction count generalizing lower residue with - | zero => simpa [finiteAdvance] using hresidue - | succ count ih => - have hnext : 4 * residue % modulus = powMod 4 (lower + 1) modulus := by - rw [hresidue, powMod_succ] - rw [finiteAdvance] - simpa [Nat.add_assoc, Nat.add_comm 1 count] using ih hnext - private lemma finiteCheckBlock_sound {modulus residue lower count : ℕ} (hresidue : residue = powMod 4 lower modulus) @@ -80,7 +103,7 @@ private lemma finiteCheckBlock_sound induction count generalizing lower residue with | zero => omega | succ count ih => - change (decide (2 ≤ (Nat.digits 3 residue).count 2) && + change (hasAtLeastTernaryTwos 2 residue && finiteCheckBlock modulus (4 * residue % modulus) count) = true at hcheck rw [Bool.and_eq_true] at hcheck have hnext : 4 * residue % modulus = powMod 4 (lower + 1) modulus := by @@ -88,9 +111,7 @@ private lemma finiteCheckBlock_sound intro m hlower hupper by_cases hm : m = lower · subst m - simpa [hresidue] using - (show 2 ≤ (Nat.digits 3 residue).count 2 by - simpa only [decide_eq_true_eq] using hcheck.1) + simpa [hresidue] using (hasAtLeastTernaryTwos_eq_true 2 residue).mp hcheck.1 · exact ih hnext hcheck.2 (by omega) (by omega) private lemma finiteAdvanceBlocks_sound @@ -111,11 +132,11 @@ private lemma finiteCheckBlocks_sound | zero => omega | succ blocks ih => change (finiteCheckBlock modulus residue 64 && - finiteCheckBlocks modulus (finiteAdvance modulus residue 64) blocks) = true at hcheck + finiteCheckBlocks modulus (finiteAdvanceBlocks modulus residue 1) blocks) = true at hcheck rw [Bool.and_eq_true] at hcheck - have hnext : finiteAdvance modulus residue 64 = + have hnext : finiteAdvanceBlocks modulus residue 1 = powMod 4 (lower + 64) modulus := by - exact finiteAdvance_sound hresidue + simpa using (finiteAdvanceBlocks_sound (blocks := 1) hresidue) intro m hlower hupper by_cases hfirst : m < lower + 64 · exact finiteCheckBlock_sound hresidue hcheck.1 hlower hfirst @@ -152,34 +173,34 @@ private lemma ternaryLength_eq_of_pow_bounds (by decide) m).mpr hlower omega -private theorem finiteCheck_length_four : finiteCheck 27 54 4 = true := by decide -private theorem finiteCheck_length_five : finiteCheck 81 162 5 = true := by decide -private theorem finiteCheck_length_six_a : finiteCheck 243 256 6 = true := by decide -private theorem finiteCheck_length_six_b : finiteCheck 499 230 6 = true := by decide -private theorem finiteCheck_length_seven_a : finiteCheck 729 256 7 = true := by decide -private theorem finiteCheck_length_seven_b : finiteCheck 985 256 7 = true := by decide -private theorem finiteCheck_length_seven_c : finiteCheck 1241 256 7 = true := by decide -private theorem finiteCheck_length_seven_d : finiteCheck 1497 256 7 = true := by decide -private theorem finiteCheck_length_seven_e : finiteCheck 1753 256 7 = true := by decide -private theorem finiteCheck_length_seven_f : finiteCheck 2009 178 7 = true := by decide -private theorem finiteCheck_length_eight_a : finiteCheck 2187 256 8 = true := by decide -private theorem finiteCheck_length_eight_b : finiteCheck 2443 256 8 = true := by decide -private theorem finiteCheck_length_eight_c : finiteCheck 2699 256 8 = true := by decide -private theorem finiteCheck_length_eight_d : finiteCheck 2955 256 8 = true := by decide -private theorem finiteCheck_length_eight_e : finiteCheck 3211 256 8 = true := by decide -private theorem finiteCheck_length_eight_f : finiteCheck 3467 256 8 = true := by decide -private theorem finiteCheck_length_eight_g : finiteCheck 3723 256 8 = true := by decide -private theorem finiteCheck_length_eight_h : finiteCheck 3979 256 8 = true := by decide -private theorem finiteCheck_length_eight_i : finiteCheck 4235 256 8 = true := by decide -private theorem finiteCheck_length_eight_j : finiteCheck 4491 256 8 = true := by decide -private theorem finiteCheck_length_eight_k : finiteCheck 4747 256 8 = true := by decide -private theorem finiteCheck_length_eight_l : finiteCheck 5003 256 8 = true := by decide -private theorem finiteCheck_length_eight_m : finiteCheck 5259 256 8 = true := by decide -private theorem finiteCheck_length_eight_n : finiteCheck 5515 256 8 = true := by decide -private theorem finiteCheck_length_eight_o : finiteCheck 5771 256 8 = true := by decide -private theorem finiteCheck_length_eight_p : finiteCheck 6027 256 8 = true := by decide -private theorem finiteCheck_length_eight_q : finiteCheck 6283 256 8 = true := by decide -private theorem finiteCheck_length_eight_r : finiteCheck 6539 22 8 = true := by decide +private theorem finiteCheck_length_four : finiteCheck 27 54 4 = true := by decide +kernel +private theorem finiteCheck_length_five : finiteCheck 81 162 5 = true := by decide +kernel +private theorem finiteCheck_length_six_a : finiteCheck 243 256 6 = true := by decide +kernel +private theorem finiteCheck_length_six_b : finiteCheck 499 230 6 = true := by decide +kernel +private theorem finiteCheck_length_seven_a : finiteCheck 729 256 7 = true := by decide +kernel +private theorem finiteCheck_length_seven_b : finiteCheck 985 256 7 = true := by decide +kernel +private theorem finiteCheck_length_seven_c : finiteCheck 1241 256 7 = true := by decide +kernel +private theorem finiteCheck_length_seven_d : finiteCheck 1497 256 7 = true := by decide +kernel +private theorem finiteCheck_length_seven_e : finiteCheck 1753 256 7 = true := by decide +kernel +private theorem finiteCheck_length_seven_f : finiteCheck 2009 178 7 = true := by decide +kernel +private theorem finiteCheck_length_eight_a : finiteCheck 2187 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_b : finiteCheck 2443 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_c : finiteCheck 2699 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_d : finiteCheck 2955 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_e : finiteCheck 3211 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_f : finiteCheck 3467 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_g : finiteCheck 3723 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_h : finiteCheck 3979 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_i : finiteCheck 4235 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_j : finiteCheck 4491 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_k : finiteCheck 4747 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_l : finiteCheck 5003 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_m : finiteCheck 5259 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_n : finiteCheck 5515 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_o : finiteCheck 5771 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_p : finiteCheck 6027 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_q : finiteCheck 6283 256 8 = true := by decide +kernel +private theorem finiteCheck_length_eight_r : finiteCheck 6539 22 8 = true := by decide +kernel private theorem finiteModularCertificate_length_six {m : ℕ} (hlower : 243 ≤ m) (hupper : m ≤ 728) : diff --git a/LeanPool/GKPCarry/FiniteRangeCorollary.lean b/LeanPool/GKPCarry/FiniteRangeCorollary.lean index a2e1acab7d..13d5235dbe 100644 --- a/LeanPool/GKPCarry/FiniteRangeCorollary.lean +++ b/LeanPool/GKPCarry/FiniteRangeCorollary.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module + +public import Mathlib.Data.Nat.Choose.Central import LeanPool.GKPCarry.CarryArithmetic import LeanPool.GKPCarry.FiniteRange +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Central-binomial consequence of the bounded C3 certificate @@ -14,6 +19,8 @@ Kummer carry theorem: divisibility by nine for a finite family of central binomial coefficients indexed by powers of four. -/ +@[expose] public section + namespace GKPCarry /-- The bounded C3 certificate implies divisibility by nine for diff --git a/LeanPool/GKPCarry/GKPCharacterization.lean b/LeanPool/GKPCarry/GKPCharacterization.lean index ffb4049817..7dbf9f6004 100644 --- a/LeanPool/GKPCarry/GKPCharacterization.lean +++ b/LeanPool/GKPCarry/GKPCharacterization.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.GKPCarry.BadCarryLanguage +module + +public import LeanPool.GKPCarry.BadCarryLanguage +public import LeanPool.GKPCarry.Statement +import LeanPool.GKPCarry.BinaryReduction +import LeanPool.GKPCarry.CarryArithmetic +import LeanPool.GKPCarry.Kummer +import Mathlib.Data.Finset.Attr /-! # A regular-language characterization of the GKP conjecture @@ -17,6 +24,8 @@ explicit regular language by nonexceptional powers of two. This equivalence is a reduction of the open conjecture, not a proof of it. -/ +@[expose] public section + namespace GKPCarry open Nat diff --git a/LeanPool/GKPCarry/InfiniteSieve.lean b/LeanPool/GKPCarry/InfiniteSieve.lean index a6a96e6765..f9cd483495 100644 --- a/LeanPool/GKPCarry/InfiniteSieve.lean +++ b/LeanPool/GKPCarry/InfiniteSieve.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module + +public import LeanPool.GKPCarry.UnitCarryCounting +public import LeanPool.GKPCarry.PowerResidues +public import Mathlib.Data.Nat.Choose.Central +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import LeanPool.GKPCarry.GKPCharacterization import LeanPool.GKPCarry.InfiniteSlices -import LeanPool.GKPCarry.UnitCarryCounting import Mathlib.Analysis.SpecificLimits.Normed -import Mathlib.Data.Fintype.Card +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # An exact all-depth modular sieve for GKP carries @@ -22,6 +32,8 @@ at each finite depth may acquire carries later; this theorem neither decides them nor proves the universal GKP conjecture. -/ +@[expose] public section + namespace GKPCarry /-- One exponent period is equivalent to all fixed-length ternary unit words. -/ diff --git a/LeanPool/GKPCarry/InfiniteSlices.lean b/LeanPool/GKPCarry/InfiniteSlices.lean index 66824c168a..7d573c7e90 100644 --- a/LeanPool/GKPCarry/InfiniteSlices.lean +++ b/LeanPool/GKPCarry/InfiniteSlices.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module + +public import Mathlib.Data.Finset.Card +public import LeanPool.GKPCarry.BadCarryLanguage +public import Mathlib.Data.Nat.Choose.Central +import LeanPool.GKPCarry.CarryArithmetic import LeanPool.GKPCarry.GKPCharacterization -import LeanPool.GKPCarry.ModularPrefix -import Mathlib.Data.Finset.Card -import Mathlib.Tactic.IntervalCases +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Digits.Lemmas +import Mathlib.Tactic.Positivity.Finset /-! # Infinite periodic slices of the GKP carry condition @@ -20,6 +26,8 @@ This is an infinite scoped result. The other nine residue classes are not settled here, and the universal GKP conjecture remains open. -/ +@[expose] public section + namespace GKPCarry open Nat diff --git a/LeanPool/GKPCarry/Kummer.lean b/LeanPool/GKPCarry/Kummer.lean index e89aeae73c..97abfb53ac 100644 --- a/LeanPool/GKPCarry/Kummer.lean +++ b/LeanPool/GKPCarry/Kummer.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.GKPCarry.Statement -import Lean.Elab.Tactic.Omega +module + +public import Mathlib.Data.Nat.Choose.Central +public import Mathlib.Data.Nat.Digits.Defs +public import Mathlib.Data.Nat.MaxPowDiv +public import Mathlib.Data.Nat.PadicValNat +public import Mathlib.Data.Nat.Prime.Defs import Mathlib.NumberTheory.Padics.PadicVal.Basic -import Mathlib.Tactic.Ring /-! # Kummer formulas for central binomial coefficients @@ -15,6 +19,8 @@ Kummer's digit-sum formula is specialized to `Nat.centralBinom`. The resulting bridge turns digit and carry estimates into divisibility statements. -/ +@[expose] public section + namespace GKPCarry open Nat diff --git a/LeanPool/GKPCarry/ModularPrefix.lean b/LeanPool/GKPCarry/ModularPrefix.lean index 6478fdbaa7..78e9a884f0 100644 --- a/LeanPool/GKPCarry/ModularPrefix.lean +++ b/LeanPool/GKPCarry/ModularPrefix.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.GKPCarry.Definitions +module + +public import LeanPool.GKPCarry.Definitions +import Mathlib.Algebra.Order.Field.Basic import Mathlib.Data.Nat.Digits.Lemmas -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity.Finset /-! # Modular evaluation of ternary prefixes @@ -17,6 +18,8 @@ binary-digit modular exponentiation function below lets the finite certificate evaluate those residues without first constructing the enormous value `4 ^ m`. -/ +@[expose] public section + namespace GKPCarry lemma count_append_replicate_zero diff --git a/LeanPool/GKPCarry/PowerResidues.lean b/LeanPool/GKPCarry/PowerResidues.lean index 7814fcf6df..f7dc111c8d 100644 --- a/LeanPool/GKPCarry/PowerResidues.lean +++ b/LeanPool/GKPCarry/PowerResidues.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import Mathlib.Data.Fintype.EquivFin +module + +public import Mathlib.Data.ZMod.Basic import Mathlib.RingTheory.ZMod.UnitsCyclic /-! @@ -15,6 +17,8 @@ of three. At level `n`, its order modulo `3 ^ (n + 1)` is exactly unit group. -/ +@[expose] public section + namespace GKPCarry /-- The unit represented by `2` modulo `3 ^ (level + 1)`. -/ diff --git a/LeanPool/GKPCarry/Statement.lean b/LeanPool/GKPCarry/Statement.lean index 563d8aaa50..ee98795fb9 100644 --- a/LeanPool/GKPCarry/Statement.lean +++ b/LeanPool/GKPCarry/Statement.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import Mathlib.Data.Nat.Choose.Central +module + +public import Mathlib.Data.Nat.Choose.Central /-! # The Graham--Knuth--Patashnik central-binomial conjecture @@ -12,6 +14,8 @@ This file records the conjecture from Exercise 5.112 of *Concrete Mathematics* and its restriction to powers of two. The conjecture itself remains open. -/ +@[expose] public section + namespace GKPCarry /-- The Graham--Knuth--Patashnik conjecture: if `n > 4` and diff --git a/LeanPool/GKPCarry/UnitCarryCounting.lean b/LeanPool/GKPCarry/UnitCarryCounting.lean index 16130bad0e..55d031d233 100644 --- a/LeanPool/GKPCarry/UnitCarryCounting.lean +++ b/LeanPool/GKPCarry/UnitCarryCounting.lean @@ -3,8 +3,24 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.GKPCarry.BadCarryCounting +module + +public import Mathlib.Basic.NNReal.Defs + +public import LeanPool.GKPCarry.BadCarryCounting +public import Mathlib.Data.ZMod.Basic +import LeanPool.GKPCarry.CarryArithmetic import LeanPool.GKPCarry.PowerResidues +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Digits.Lemmas +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Counting deficient-carry ternary units @@ -15,6 +31,8 @@ count to that unit slice. Among unit words of length `n + 3`, exactly `(n + 9) * 2 ^ n` create fewer than two doubling carries. -/ +@[expose] public section + namespace GKPCarry /-- Natural value of a fixed-length ternary word. -/ @@ -182,18 +200,22 @@ theorem ternaryDoubleCarryCount_word_eq_value {length : ℕ} (word : List.Vector (Fin 3) length) : ternaryDoubleCarryCount (ternaryWordDigits word) = ternaryDoubleCarryCount (Nat.digits 3 (ternaryWordValue word)) := by - have hword : - ternaryWordDigits word ∈ - {digits : List ℕ | - digits.length = length ∧ ∀ digit ∈ digits, digit < 3} := by - simp [ternaryWordDigits] - have hinverse : - Nat.digitsAppend 3 length (ternaryWordValue word) = - ternaryWordDigits word := by - simpa [ternaryWordValue] using - (Nat.setInvOn_digitsAppend_ofDigits (b := 3) (by decide) length).1 hword - rw [← hinverse, Nat.digitsAppend, - ternaryDoubleCarryCount_append_replicate_zero] + let digits := Nat.digits 3 (ternaryWordValue word) + have hlength : digits.length ≤ length := + (Nat.digits_length_le_iff (by decide) _).mpr (ternaryWordValue_lt word) + have hpad : ternaryWordDigits word = + digits ++ List.replicate (length - digits.length) 0 := by + apply Nat.ofDigits_inj_of_len_eq (b := 3) (by decide) + · simp [ternaryWordDigits, Nat.add_sub_cancel' hlength] + · simp [ternaryWordDigits] + · intro digit hd + rcases List.mem_append.mp hd with hd | hd + · exact Nat.digits_lt_base (by decide) hd + · have : digit = 0 := (List.mem_replicate.mp hd).2 + omega + · simp only [Nat.ofDigits_append_replicate_zero] + exact (Nat.ofDigits_digits 3 (ternaryWordValue word)).symm + rw [hpad, ternaryDoubleCarryCount_append_replicate_zero] /-! ## Deficient-carry unit words -/ diff --git a/LeanPool/GrothendieckVanishing.lean b/LeanPool/GrothendieckVanishing.lean index 5ef31a7e45..2c031e0720 100644 --- a/LeanPool/GrothendieckVanishing.lean +++ b/LeanPool/GrothendieckVanishing.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module -import LeanPool.GrothendieckVanishing.GrothendieckVanishingOverview +public import LeanPool.GrothendieckVanishing.GrothendieckVanishing + +public import LeanPool.GrothendieckVanishing.GrothendieckVanishingOverview +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Floor +import Mathlib.Tactic.Continuity.Init +import Mathlib.Topology.Sheaves.Init /-! # Grothendieck's Vanishing Theorem @@ -16,3 +24,5 @@ Main declarations: `GrothendieckVanishing` Tags: algebraic-geometry, sheaf-theory, topology MSC: 14F06, 18F20 -/ + +@[expose] public section diff --git a/LeanPool/GrothendieckVanishing/ClosedImmersion.lean b/LeanPool/GrothendieckVanishing/ClosedImmersion.lean index efba3c2f60..4616280c9b 100644 --- a/LeanPool/GrothendieckVanishing/ClosedImmersion.lean +++ b/LeanPool/GrothendieckVanishing/ClosedImmersion.lean @@ -3,25 +3,18 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ - -import Mathlib.Algebra.Category.Grp.AB +module + +public import Mathlib.Algebra.Category.Grp.FilteredColimits +public import Mathlib.CategoryTheory.Sites.Abelian +public import Mathlib.Topology.Sheaves.Functors +public import Mathlib.Topology.Sheaves.LocallySurjective +public import Mathlib.Algebra.Category.Grp.Abelian +public import Mathlib.Algebra.Homology.ShortComplex.ShortExact import Mathlib.Algebra.Category.Grp.EpiMono -import Mathlib.Algebra.Category.Grp.FilteredColimits -import Mathlib.Algebra.Category.Grp.ForgetCorepresentable import Mathlib.Algebra.Category.Grp.Zero -import Mathlib.Algebra.Homology.ShortComplex.Exact -import Mathlib.CategoryTheory.Abelian.FunctorCategory -import Mathlib.CategoryTheory.Adjunction.Additive -import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms -import Mathlib.CategoryTheory.Sites.Abelian -import Mathlib.CategoryTheory.Sites.EpiMono -import Mathlib.CategoryTheory.Sites.LocallyBijective -import Mathlib.CategoryTheory.Sites.LocallyInjective -import Mathlib.CategoryTheory.Preadditive.Injective.Preserves -import Mathlib.Topology.Sheaves.Functors -import Mathlib.Topology.Sheaves.LocallySurjective -import Mathlib.Topology.Sheaves.SheafCondition.UniqueGluing -import Mathlib.Topology.Sheaves.Stalks +import Mathlib.CategoryTheory.Limits.Filtered +import Mathlib.CategoryTheory.Limits.Shapes.Countable /-! # Closed immersions @@ -51,6 +44,8 @@ Main results: `0 → ker(η) → F → i_*(i^*F) → 0` associated to a closed immersion. -/ +@[expose] public section + open CategoryTheory TopologicalSpace Opposite Limits universe u diff --git a/LeanPool/GrothendieckVanishing/ClosedImmersionCohomology.lean b/LeanPool/GrothendieckVanishing/ClosedImmersionCohomology.lean index 89264ff1e3..84e74e3a4a 100644 --- a/LeanPool/GrothendieckVanishing/ClosedImmersionCohomology.lean +++ b/LeanPool/GrothendieckVanishing/ClosedImmersionCohomology.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module -import LeanPool.GrothendieckVanishing.ClosedImmersion -import LeanPool.GrothendieckVanishing.CohomologyAPI -import LeanPool.GrothendieckVanishing.FlasqueVanishing +public import LeanPool.GrothendieckVanishing.FlasqueVanishing +public import Mathlib.CategoryTheory.Abelian.Injective.Resolution /-! # Closed-immersion cohomology @@ -25,6 +25,8 @@ in `ClosedImmersion.lean`. LES-facing `Sheaf.H` wrappers come from `CohomologyAP and the flasque infrastructure from `FlasqueVanishing.lean`. -/ +@[expose] public section + universe u open CategoryTheory TopologicalSpace Abelian Limits Opposite @@ -32,7 +34,7 @@ open CategoryTheory TopologicalSpace Abelian Limits Opposite /-! ## Closed-immersion cohomology consequences -/ -- Instance search does not unfold the subtype topology in `TopCat.of Z`. -private noncomputable instance subtypeSheafHAddCommGroup +noncomputable instance subtypeSheafHAddCommGroup {X : TopCat.{u}} {Z : Set X} (G : TopCat.Sheaf AddCommGrpCat.{u} (TopCat.of Z)) (n : ℕ) : AddCommGroup (Sheaf.H G n) := diff --git a/LeanPool/GrothendieckVanishing/CohomologyAPI.lean b/LeanPool/GrothendieckVanishing/CohomologyAPI.lean index 6fdb788afb..82c6f86b4a 100644 --- a/LeanPool/GrothendieckVanishing/CohomologyAPI.lean +++ b/LeanPool/GrothendieckVanishing/CohomologyAPI.lean @@ -3,14 +3,14 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module -import Mathlib.Algebra.Homology.DerivedCategory.Ext.ExactSequences -import Mathlib.Algebra.Homology.DerivedCategory.Ext.EnoughInjectives -import Mathlib.CategoryTheory.Abelian.GrothendieckAxioms.Sheaf -import Mathlib.CategoryTheory.Abelian.GrothendieckCategory.HasExt -import Mathlib.CategoryTheory.Sites.SheafCohomology.Basic +public import Mathlib.CategoryTheory.Abelian.GrothendieckAxioms.Sheaf +public import Mathlib.CategoryTheory.Abelian.GrothendieckCategory.HasExt +public import Mathlib.CategoryTheory.Sites.SheafCohomology.Basic +public import LeanPool.GrothendieckVanishing.ClosedImmersion +import Mathlib.Algebra.Category.Grp.AB import Mathlib.Topology.Sheaves.Skyscraper -import LeanPool.GrothendieckVanishing.ClosedImmersion /-! # Sheaf Cohomology API @@ -61,6 +61,8 @@ calculations internal so downstream files never need to unfold `Sheaf.H` directl surjective morphisms -/ +@[expose] public section + universe w' w v u open CategoryTheory TopologicalSpace Abelian Limits Opposite @@ -139,6 +141,17 @@ private theorem ext_dimension_shift_X₃ (Z : C') {S : ShortComplex C'} (hS : S. obtain ⟨d, hd⟩ := Ext.covariant_sequence_exact₃ _ hS b rfl (@Subsingleton.elim _ h₁ _ _) rw [← hc, ← hd, @Subsingleton.elim _ h₂ c d] +/-- If both outer terms in an Ext exact sequence vanish, its middle term vanishes. -/ +private theorem ext_subsingleton_of_shortExact_middle (Z : C') + {S : ShortComplex C'} (hS : S.ShortExact) (n : ℕ) + (h₁ : Subsingleton (Ext Z S.X₁ n)) (h₃ : Subsingleton (Ext Z S.X₃ n)) : + Subsingleton (Ext Z S.X₂ n) := by + constructor + intro a b + obtain ⟨c, hc⟩ := Ext.covariant_sequence_exact₂ Z hS a (Subsingleton.elim _ _) + obtain ⟨d, hd⟩ := Ext.covariant_sequence_exact₂ Z hS b (Subsingleton.elim _ _) + rw [← hc, ← hd, @Subsingleton.elim _ h₁ c d] + /-- If the middle cohomology groups in degrees `n` and `n + 1` are subsingleton, then the connecting morphism `Ext^n(Z, X₃) → Ext^(n+1)(Z, X₁)` is bijective. -/ private theorem extClass_postcomp_bijective_of_subsingleton_middle @@ -162,51 +175,20 @@ private theorem extClass_postcomp_bijective_of_subsingleton_middle /-- The connecting morphism in the covariant long exact sequence as an additive equivalence, assuming the middle cohomology groups in degrees `n` and `n + 1` vanish. -/ -private noncomputable def extClass_postcompAddEquiv_of_subsingleton_middle +noncomputable def extClassPostcompAddEquivOfSubsingletonMiddle (Z : C') {S : ShortComplex C'} (hS : S.ShortExact) (n : ℕ) (h₂n : Subsingleton (Ext Z S.X₂ n)) (h₂succ : Subsingleton (Ext Z S.X₂ (n + 1))) : Ext Z S.X₃ n ≃+ Ext Z S.X₁ (n + 1) := AddEquiv.ofBijective (hS.extClass.postcomp Z (rfl : n + 1 = n + 1)) - (extClass_postcomp_bijective_of_subsingleton_middle Z hS n h₂n h₂succ) + (private_decl% (extClass_postcomp_bijective_of_subsingleton_middle Z hS n h₂n h₂succ)) -/-- Naturality of the extension class: given a morphism `φ : S₁ ⟶ S₂` of short exact sequences, - the connecting homomorphism commutes with the induced maps on Ext groups. - Proved via the triangulated category axiom TR3 (`complete_distinguished_triangle_morphism₁`), - fullness/faithfulness of `singleFunctor`, and mono cancellation. -/ +/-- Naturality of the extension class for a morphism of short exact sequences. -/ private lemma extClass_naturality {S₁ S₂ : ShortComplex C'} (hS₁ : S₁.ShortExact) (hS₂ : S₂.ShortExact) (φ : S₁ ⟶ S₂) : (Ext.mk₀ φ.τ₃).comp hS₂.extClass (zero_add 1) = - hS₁.extClass.comp (Ext.mk₀ φ.τ₁) (add_zero 1) := by - let := HasDerivedCategory.standard C' - ext - simp only [Ext.comp_hom, Ext.mk₀_hom, ShortComplex.ShortExact.extClass_hom] - rw [ShiftedHom.mk₀_comp, ShiftedHom.comp_mk₀] - have comm₂ : hS₁.singleTriangle.mor₂ ≫ (DerivedCategory.singleFunctor C' 0).map φ.τ₃ = - (DerivedCategory.singleFunctor C' 0).map φ.τ₂ ≫ hS₂.singleTriangle.mor₂ := by - change (DerivedCategory.singleFunctor C' 0).map S₁.g ≫ - (DerivedCategory.singleFunctor C' 0).map φ.τ₃ = - (DerivedCategory.singleFunctor C' 0).map φ.τ₂ ≫ - (DerivedCategory.singleFunctor C' 0).map S₂.g - simp [← Functor.map_comp, φ.comm₂₃] - obtain ⟨a', ha₁, ha₃⟩ := Pretriangulated.complete_distinguished_triangle_morphism₁ - hS₁.singleTriangle hS₂.singleTriangle - hS₁.singleTriangle_distinguished hS₂.singleTriangle_distinguished - ((DerivedCategory.singleFunctor C' 0).map φ.τ₂) - ((DerivedCategory.singleFunctor C' 0).map φ.τ₃) comm₂ - simp only [ShortComplex.ShortExact.singleTriangle_mor₃] at ha₃ - have ha' : a' = (DerivedCategory.singleFunctor C' 0).map φ.τ₁ := by - obtain ⟨a'', rfl⟩ := (DerivedCategory.singleFunctor C' 0).map_surjective a' - congr 1 - have h : S₁.f ≫ φ.τ₂ = a'' ≫ S₂.f := by - have := ha₁ - simp only [ShortComplex.ShortExact.singleTriangle_mor₁] at this - exact (DerivedCategory.singleFunctor C' 0).map_injective <| by - rwa [Functor.map_comp, Functor.map_comp] - have : Mono S₂.f := hS₂.mono_f - exact (cancel_mono S₂.f).mp (by rw [← φ.comm₁₂.symm, h]) - rw [ha'] at ha₃ - exact ha₃.symm + hS₁.extClass.comp (Ext.mk₀ φ.τ₁) (add_zero 1) := + (ShortComplex.ShortExact.extClass_naturality hS₁ hS₂ φ).symm /-- Internal helper: if `Y` is zero in an abelian category, `Ext X Y n` is subsingleton for all `X`, `n`. @@ -247,7 +229,7 @@ noncomputable def sheafHSuccMap {X : TopCat.{u}} (fun y ↦ y.comp hS.extClass rfl) (fun a b ↦ Ext.add_comp a b hS.extClass rfl) -private theorem sheafH_succ_map_apply {X : TopCat.{u}} +theorem sheafH_succ_map_apply {X : TopCat.{u}} {S : ShortComplex (TopCat.Sheaf AddCommGrpCat.{u} X)} (hS : S.ShortExact) (n : ℕ) @@ -282,11 +264,8 @@ theorem sheaf_isZero_of_zero_stalks (X : TopCat.{u}) have hWU : W ≤ U := leOfHom iV rw [Subsingleton.elim iV (homOfLE hWU)] at hEq exact ⟨W, hWU, hxW, hEq⟩⟩) - exact IsZero.mk - (fun G ↦ ⟨{ default := 0, uniq := fun f ↦ InducedCategory.Hom.ext (NatTrans.ext (funext - fun U ↦ (hZ.obj U).eq_zero_of_src (f.hom.app U))) }⟩) - (fun G ↦ ⟨{ default := 0, uniq := fun f ↦ InducedCategory.Hom.ext (NatTrans.ext (funext - fun U ↦ (hZ.obj U).eq_zero_of_tgt (f.hom.app U))) }⟩) + exact IsZero.of_full_of_faithful_of_isZero (TopCat.Sheaf.forget AddCommGrpCat.{u} X) + ⟨F, hF⟩ hZ /-- If a bundled sheaf is zero, then its cohomology is subsingleton in every degree. -/ theorem sheafH_subsingleton_of_isZero {X : TopCat.{u}} @@ -298,10 +277,7 @@ theorem sheafH_subsingleton_of_isZero {X : TopCat.{u}} private theorem stalkFunctor_map_f_mono {X : TopCat.{u}} (S : ShortComplex (TopCat.Sheaf AddCommGrpCat.{u} X)) (hS : S.ShortExact) (x : X) : Mono ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map S.f.hom) := by - have : Mono S.f := (Sheaf.Hom.mono_iff_presheaf_mono - (J := Opens.grothendieckTopology X) (D := AddCommGrpCat.{u}) S.f).2 - ((Sheaf.Hom.mono_iff_presheaf_mono - (J := Opens.grothendieckTopology X) (D := AddCommGrpCat.{u}) S.f).1 hS.mono_f) + have : Mono S.f := hS.mono_f have := TopCat.Presheaf.stalkFunctor_preserves_mono (C := AddCommGrpCat.{u}) (X := X) x exact show Mono ((TopCat.Sheaf.forget AddCommGrpCat.{u} X ⋙ TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map S.f) from @@ -642,15 +618,7 @@ theorem subsingleton_sheafH_of_shortExact_middle {X : TopCat.{u}} have hS : S.ShortExact := ShortComplex.ShortExact.mk' (ShortComplex.exact_of_g_is_cokernel _ (cokernelIsCokernel f)) inferInstance inferInstance - have h₁' : Subsingleton (Sheaf.H S.X₁ n) := h₁ - have h₃' : Subsingleton (Sheaf.H S.X₃ n) := h₃ - constructor - intro a b - obtain ⟨c, hc⟩ := Ext.covariant_sequence_exact₂ _ hS a - (@Subsingleton.elim _ ((add_zero n) ▸ h₃') _ _) - obtain ⟨d, hd⟩ := Ext.covariant_sequence_exact₂ _ hS b - (@Subsingleton.elim _ ((add_zero n) ▸ h₃') _ _) - rw [← hc, ← hd, @Subsingleton.elim _ h₁' c d] + exact ext_subsingleton_of_shortExact_middle _ hS n h₁ h₃ /-- Naturality of `sheafH1CokernelIsoOfSubsingletonMiddle` for a morphism between two short exact sequences of sheaves. -/ @@ -714,13 +682,13 @@ noncomputable def sheafH0NatIsoSections {X : TopCat.{u}} : /-- Higher-degree connecting additive equivalence for a short exact sequence of sheaves: if the middle cohomology groups in degrees `n` and `n + 1` are subsingleton, then the connecting morphism induces an additive equivalence `H^n(S.X₃) ≃+ H^(n+1)(S.X₁)`. -/ -private noncomputable def sheafH_extClassAddEquiv_of_subsingleton_middle {X : TopCat.{u}} +noncomputable def sheafHExtClassAddEquivOfSubsingletonMiddle {X : TopCat.{u}} {S : ShortComplex (TopCat.Sheaf AddCommGrpCat.{u} X)} (hS : S.ShortExact) (n : ℕ) (h₂n : Subsingleton (Sheaf.H S.X₂ n)) (h₂succ : Subsingleton (Sheaf.H S.X₂ (n + 1))) : Sheaf.H S.X₃ n ≃+ Sheaf.H S.X₁ (n + 1) := - extClass_postcompAddEquiv_of_subsingleton_middle _ hS n h₂n h₂succ + extClassPostcompAddEquivOfSubsingletonMiddle _ hS n h₂n h₂succ @[simp] private theorem sheafH_extClassAddEquiv_of_subsingleton_middle_apply {X : TopCat.{u}} {S : ShortComplex (TopCat.Sheaf AddCommGrpCat.{u} X)} @@ -728,7 +696,7 @@ private noncomputable def sheafH_extClassAddEquiv_of_subsingleton_middle {X : To (h₂n : Subsingleton (Sheaf.H S.X₂ n)) (h₂succ : Subsingleton (Sheaf.H S.X₂ (n + 1))) (y : Sheaf.H S.X₃ n) : - sheafH_extClassAddEquiv_of_subsingleton_middle hS n h₂n h₂succ y = + sheafHExtClassAddEquivOfSubsingletonMiddle hS n h₂n h₂succ y = y.comp hS.extClass rfl := rfl /-- Higher-degree connecting isomorphism for a short exact sequence of sheaves: if the @@ -740,7 +708,7 @@ noncomputable def sheafHSuccIsoOfSubsingletonMiddle {X : TopCat.{u}} (h₂n : Subsingleton (Sheaf.H S.X₂ n)) (h₂succ : Subsingleton (Sheaf.H S.X₂ (n + 1))) : AddCommGrpCat.of (Sheaf.H S.X₃ n) ≅ AddCommGrpCat.of (Sheaf.H S.X₁ (n + 1)) := - (sheafH_extClassAddEquiv_of_subsingleton_middle hS n h₂n h₂succ).toAddCommGrpIso + (sheafHExtClassAddEquivOfSubsingletonMiddle hS n h₂n h₂succ).toAddCommGrpIso private theorem sheafH_succ_iso_of_subsingleton_middle_hom_apply {X : TopCat.{u}} {S : ShortComplex (TopCat.Sheaf AddCommGrpCat.{u} X)} diff --git a/LeanPool/GrothendieckVanishing/ConstantSheafFlasque.lean b/LeanPool/GrothendieckVanishing/ConstantSheafFlasque.lean index 79d1adc49c..542e419547 100644 --- a/LeanPool/GrothendieckVanishing/ConstantSheafFlasque.lean +++ b/LeanPool/GrothendieckVanishing/ConstantSheafFlasque.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module -import LeanPool.GrothendieckVanishing.ClosedImmersionCohomology -import LeanPool.GrothendieckVanishing.TopologicalKrullDim -import LeanPool.GrothendieckVanishing.ZeroOutside +public import LeanPool.GrothendieckVanishing.ZeroOutside +public import LeanPool.GrothendieckVanishing.FlasqueVanishing /-! # Flasqueness of the constant sheaf on an irreducible space @@ -25,6 +25,8 @@ relies crucially on `nonempty_preirreducible_inter` for irreducible spaces. * `isFlasqueSheaf_zeroOutsideInt_top` -/ +@[expose] public section + universe u open CategoryTheory TopologicalSpace Limits Opposite GrothendieckTopology GrothendieckTopology.Plus diff --git a/LeanPool/GrothendieckVanishing/FinitelyGeneratedVanishing.lean b/LeanPool/GrothendieckVanishing/FinitelyGeneratedVanishing.lean index 176fa0dce2..39e17b59e0 100644 --- a/LeanPool/GrothendieckVanishing/FinitelyGeneratedVanishing.lean +++ b/LeanPool/GrothendieckVanishing/FinitelyGeneratedVanishing.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module +public import LeanPool.GrothendieckVanishing.GeneratedSubsheaf +public import Mathlib.Topology.NoetherianSpace import LeanPool.GrothendieckVanishing.PresheafFilteredColimit -import LeanPool.GrothendieckVanishing.ClosedImmersionCohomology -import LeanPool.GrothendieckVanishing.GeneratedSubsheaf +import Mathlib.Algebra.Category.Grp.AB /-! # Finitely generated vanishing reduction @@ -34,6 +36,8 @@ The `isFlasque_filtered_colimit` and `sheafHPreservesFilteredColimits` building live in the `PresheafFilteredColimit` modules. -/ +@[expose] public section + universe u open CategoryTheory TopologicalSpace Abelian Limits Opposite TopCat diff --git a/LeanPool/GrothendieckVanishing/FlasqueVanishing.lean b/LeanPool/GrothendieckVanishing/FlasqueVanishing.lean index 145b8402d8..56c279f828 100644 --- a/LeanPool/GrothendieckVanishing/FlasqueVanishing.lean +++ b/LeanPool/GrothendieckVanishing/FlasqueVanishing.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module -import Mathlib.CategoryTheory.Abelian.Injective.Resolution -import LeanPool.GrothendieckVanishing.CohomologyAPI +public import LeanPool.GrothendieckVanishing.CohomologyAPI import LeanPool.GrothendieckVanishing.ZeroOutside +import Mathlib.CategoryTheory.Abelian.Injective.Resolution /-! # Flasque sheaf theory and cohomological vanishing @@ -32,6 +33,8 @@ adapted from Brian Nugent's Mathlib PR #35790. Generic `Sheaf.H` and `Ext` API lives in `CohomologyAPI.lean`. -/ +@[expose] public section + universe u open CategoryTheory TopologicalSpace Abelian Limits Opposite diff --git a/LeanPool/GrothendieckVanishing/GeneratedSubsheaf.lean b/LeanPool/GrothendieckVanishing/GeneratedSubsheaf.lean index a6d29d8fb0..1a3243af88 100644 --- a/LeanPool/GrothendieckVanishing/GeneratedSubsheaf.lean +++ b/LeanPool/GrothendieckVanishing/GeneratedSubsheaf.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module -import LeanPool.GrothendieckVanishing.ZeroOutside +public import LeanPool.GrothendieckVanishing.ZeroOutside +public import LeanPool.GrothendieckVanishing.CohomologyAPI /-! # Generated subsheaves via coproduct images @@ -23,6 +25,8 @@ sections. `zeroOutsideInt` generators of `F`, together with its `Epi` instance. -/ +@[expose] public section + universe u open CategoryTheory TopologicalSpace Limits Opposite @@ -75,7 +79,8 @@ abbrev SectionIndex {C : Type*} [Category C] {FC : C → C → Type*} {CC : C (F : TopCat.Presheaf C X) := Σ U : Opens X, ToType (F.obj (op U)) -private noncomputable def sectionHom {X : TopCat.{u}} +/-- The presheaf morphism associated to a section. -/ +noncomputable def sectionHom {X : TopCat.{u}} {F : TopCat.Presheaf AddCommGrpCat.{u} X} (hF : F.IsSheaf) (σ : SectionIndex F) : TopCat.Sheaf.zeroOutsideInt σ.1 ⟶ sheafOfIsSheaf hF := diff --git a/LeanPool/GrothendieckVanishing/GrothendieckVanishing.lean b/LeanPool/GrothendieckVanishing/GrothendieckVanishing.lean index 4f3d1e911e..6bf2fbe1d6 100644 --- a/LeanPool/GrothendieckVanishing/GrothendieckVanishing.lean +++ b/LeanPool/GrothendieckVanishing/GrothendieckVanishing.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module +public import LeanPool.GrothendieckVanishing.CohomologyAPI +public import Mathlib.Topology.KrullDimension +public import Mathlib.Topology.NoetherianSpace +import LeanPool.GrothendieckVanishing.ClosedImmersionCohomology import LeanPool.GrothendieckVanishing.IrreducibleStep +import LeanPool.GrothendieckVanishing.TopologicalKrullDim +import Mathlib.Data.Rat.Floor /-! # Grothendieck's vanishing theorem @@ -23,6 +30,8 @@ The dimension-zero base case is proved here; the positive-dimensional irreducibl lives in `IrreducibleStep.lean`. -/ +@[expose] public section + universe u open CategoryTheory TopologicalSpace Order Limits Opposite diff --git a/LeanPool/GrothendieckVanishing/GrothendieckVanishingOverview.lean b/LeanPool/GrothendieckVanishing/GrothendieckVanishingOverview.lean index ac91ccb681..5ecbf3f267 100644 --- a/LeanPool/GrothendieckVanishing/GrothendieckVanishingOverview.lean +++ b/LeanPool/GrothendieckVanishing/GrothendieckVanishingOverview.lean @@ -3,10 +3,17 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module -import LeanPool.GrothendieckVanishing.ClosedImmersion -import LeanPool.GrothendieckVanishing.ZeroOutside -import LeanPool.GrothendieckVanishing.GrothendieckVanishing +public import LeanPool.GrothendieckVanishing.ClosedImmersion +public import LeanPool.GrothendieckVanishing.ZeroOutside +public import LeanPool.GrothendieckVanishing.GrothendieckVanishing + +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Floor +import Mathlib.Tactic.Continuity.Init +import Mathlib.Topology.Sheaves.Init /-! # Grothendieck's vanishing theorem @@ -16,3 +23,5 @@ Umbrella module for the Hartshorne III, Theorem 2.7 formalization. For a Noetherian topological space `X` of dimension `n` and a sheaf `F` of abelian groups on `X`, the imports below assemble `Hⁱ(X, F) = 0` for all `i > n`. -/ + +@[expose] public section diff --git a/LeanPool/GrothendieckVanishing/IrreducibleStep.lean b/LeanPool/GrothendieckVanishing/IrreducibleStep.lean index eb547efc41..8e80f74b47 100644 --- a/LeanPool/GrothendieckVanishing/IrreducibleStep.lean +++ b/LeanPool/GrothendieckVanishing/IrreducibleStep.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module +public import LeanPool.GrothendieckVanishing.GeneratedSubsheaf +public import Mathlib.Topology.KrullDimension +public import Mathlib.Topology.NoetherianSpace import LeanPool.GrothendieckVanishing.ClosedImmersionCohomology import LeanPool.GrothendieckVanishing.ConstantSheafFlasque import LeanPool.GrothendieckVanishing.FinitelyGeneratedVanishing -import LeanPool.GrothendieckVanishing.FlasqueVanishing import LeanPool.GrothendieckVanishing.TopologicalKrullDim -import LeanPool.GrothendieckVanishing.ZeroOutside import Mathlib.GroupTheory.Archimedean /-! @@ -43,6 +45,8 @@ neighbourhood by minimality. * `irreducible_pos_vanishing` — the headline assembly. -/ +@[expose] public section + universe u open CategoryTheory TopologicalSpace Abelian Limits Opposite TopCat diff --git a/LeanPool/GrothendieckVanishing/PresheafFilteredColimit.lean b/LeanPool/GrothendieckVanishing/PresheafFilteredColimit.lean index fbcb8bdd2c..2739029489 100644 --- a/LeanPool/GrothendieckVanishing/PresheafFilteredColimit.lean +++ b/LeanPool/GrothendieckVanishing/PresheafFilteredColimit.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module -import LeanPool.GrothendieckVanishing.PresheafFilteredColimitCore +public import LeanPool.GrothendieckVanishing.PresheafFilteredColimitCore +import Mathlib.Algebra.Category.Grp.AB /-! # Degree-one and higher filtered-colimit comparisons @@ -14,6 +16,8 @@ with filtered colimits on Noetherian spaces, building on the presheaf-boundary a successor-stage infrastructure in `PresheafFilteredColimitCore`. -/ +@[expose] public section + universe u open CategoryTheory TopologicalSpace Abelian Limits Opposite TopCat @@ -26,7 +30,7 @@ attribute [local implicit_reducible] /-- The global-sections functor used in the degree-`1` filtered-colimit boundary construction. -/ @[implicit_reducible] -private noncomputable def sheafH_filtered_colimit_h1_sectionsFunctor +noncomputable def sheafHFilteredColimitH1SectionsFunctor {X : TopCat.{u}} : TopCat.Sheaf AddCommGrpCat.{u} X ⥤ AddCommGrpCat.{u} := sheafToPresheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u} ⋙ @@ -39,9 +43,9 @@ variable (Y' : J' ⥤ TopCat.Sheaf AddCommGrpCat.{u} X) [Zero (TopCat.Sheaf AddC /-- The stagewise top-sections map from the injective replacement to its quotient in the degree-`1` filtered-colimit comparison. -/ -private noncomputable def sheafH_filtered_colimit_h1_gTopNat : - (sheafHFilteredColimitSuccInj Y' ⋙ sheafH_filtered_colimit_h1_sectionsFunctor) ⟶ - (sheafHFilteredColimitSuccQuotient Y' ⋙ sheafH_filtered_colimit_h1_sectionsFunctor) := +noncomputable def sheafHFilteredColimitH1GTopNat : + (sheafHFilteredColimitSuccInj Y' ⋙ sheafHFilteredColimitH1SectionsFunctor) ⟶ + (sheafHFilteredColimitSuccQuotient Y' ⋙ sheafHFilteredColimitH1SectionsFunctor) := { app := fun j ↦ ((cokernel.π ((sheafHFilteredColimitSuccEta Y').app j)).hom.app (op ⊤)) naturality := fun j j' f ↦ by @@ -73,13 +77,13 @@ private theorem sheafH_filtered_colimit_succ_Inj_obj_injective (j : J') : /-- The functor of stagewise cokernels of the top-sections maps used in the degree-`1` filtered-colimit boundary construction. -/ -private noncomputable def sheafH_filtered_colimit_h1_cokernelFunctor : +noncomputable def sheafHFilteredColimitH1CokernelFunctor : J' ⥤ AddCommGrpCat.{u} := - { obj := fun j ↦ cokernel ((sheafH_filtered_colimit_h1_gTopNat Y').app j) + { obj := fun j ↦ cokernel ((sheafHFilteredColimitH1GTopNat Y').app j) map := fun {j j'} f ↦ cokernel.map - ((sheafH_filtered_colimit_h1_gTopNat Y').app j) - ((sheafH_filtered_colimit_h1_gTopNat Y').app j') + ((sheafHFilteredColimitH1GTopNat Y').app j) + ((sheafHFilteredColimitH1GTopNat Y').app j') (((sheafHFilteredColimitSuccInj Y').map f).hom.app (op ⊤)) (((sheafHFilteredColimitSuccQuotient Y').map f).hom.app (op ⊤)) (by @@ -92,7 +96,7 @@ private noncomputable def sheafH_filtered_colimit_h1_cokernelFunctor : exact cokernel.π_desc _ _ _ exact congrArg (fun β ↦ β.hom.app (op ⊤)) hπ) map_id := fun j ↦ by - apply (cancel_epi (cokernel.π ((sheafH_filtered_colimit_h1_gTopNat Y').app j))).mp + apply (cancel_epi (cokernel.π ((sheafHFilteredColimitH1GTopNat Y').app j))).mp rw [cokernel.π_desc] rw [show (sheafHFilteredColimitSuccQuotient Y').map (𝟙 j) = 𝟙 ((sheafHFilteredColimitSuccQuotient Y').obj j) by @@ -100,7 +104,7 @@ private noncomputable def sheafH_filtered_colimit_h1_cokernelFunctor : ] exact Category.id_comp _ map_comp := fun {j j' j''} f g ↦ by - apply (cancel_epi (cokernel.π ((sheafH_filtered_colimit_h1_gTopNat Y').app j))).mp + apply (cancel_epi (cokernel.π ((sheafHFilteredColimitH1GTopNat Y').app j))).mp rw [cokernel.π_desc, ← Category.assoc, cokernel.π_desc, Category.assoc, cokernel.π_desc] rw [show (sheafHFilteredColimitSuccQuotient Y').map (f ≫ g) = (sheafHFilteredColimitSuccQuotient Y').map f ≫ @@ -109,21 +113,21 @@ private noncomputable def sheafH_filtered_colimit_h1_cokernelFunctor : ] change (((sheafHFilteredColimitSuccQuotient Y').map f).hom.app (op ⊤) ≫ ((sheafHFilteredColimitSuccQuotient Y').map g).hom.app (op ⊤)) ≫ - cokernel.π ((sheafH_filtered_colimit_h1_gTopNat Y').app j'') = _ + cokernel.π ((sheafHFilteredColimitH1GTopNat Y').app j'') = _ rfl } /-- Evaluation at each diagram object identifies the stagewise cokernel functor with the -cokernel of `sheafH_filtered_colimit_h1_gTopNat`. -/ -private noncomputable def sheafH_filtered_colimit_h1_cokernelFunctorIso : - sheafH_filtered_colimit_h1_cokernelFunctor Y' ≅ - cokernel (sheafH_filtered_colimit_h1_gTopNat Y') := +cokernel of `sheafHFilteredColimitH1GTopNat`. -/ +noncomputable def sheafHFilteredColimitH1CokernelFunctorIso : + sheafHFilteredColimitH1CokernelFunctor Y' ≅ + cokernel (sheafHFilteredColimitH1GTopNat Y') := NatIso.ofComponents (fun j ↦ (PreservesCokernel.iso ((CategoryTheory.evaluation J' AddCommGrpCat.{u}).obj j) - (sheafH_filtered_colimit_h1_gTopNat Y')).symm) + (sheafHFilteredColimitH1GTopNat Y')).symm) (fun {j j'} f ↦ by - let alpha := sheafH_filtered_colimit_h1_gTopNat Y' + let alpha := sheafHFilteredColimitH1GTopNat Y' let ev := CategoryTheory.evaluation J' AddCommGrpCat.{u} let e_j := PreservesCokernel.iso (ev.obj j) alpha let e_j' := PreservesCokernel.iso (ev.obj j') alpha @@ -143,9 +147,9 @@ private noncomputable def sheafH_filtered_colimit_h1_cokernelFunctorIso : cokernel.π ((ev.obj j').map alpha) exact PreservesCokernel.π_iso_hom (ev.obj j') alpha) change cokernel.π (alpha.app j) ≫ - (sheafH_filtered_colimit_h1_cokernelFunctor Y').map f ≫ e_j'.inv = + (sheafHFilteredColimitH1CokernelFunctor Y').map f ≫ e_j'.inv = cokernel.π (alpha.app j) ≫ e_j.inv ≫ (cokernel alpha).map f - dsimp [sheafH_filtered_colimit_h1_cokernelFunctor] + dsimp [sheafHFilteredColimitH1CokernelFunctor] rw [← Category.assoc, cokernel.π_desc] change ((sheafHFilteredColimitSuccQuotient Y').map f).hom.app (op ⊤) ≫ (cokernel.π (alpha.app j') ≫ e_j'.inv) = @@ -159,9 +163,9 @@ private noncomputable def sheafH_filtered_colimit_h1_cokernelFunctorIso : /-- The stagewise identification of `H¹` with the cokernel of top sections for the injective-replacement short exact sequence used in the filtered-colimit comparison. -/ -private noncomputable def sheafH_filtered_colimit_h1_stageNatIso +noncomputable def sheafHFilteredColimitH1StageNatIso (h_mid : ∀ j, Subsingleton (Sheaf.H ((sheafHFilteredColimitSuccInj Y').obj j) 1)) : - sheafH_filtered_colimit_h1_cokernelFunctor Y' ≅ + sheafHFilteredColimitH1CokernelFunctor Y' ≅ Y' ⋙ sheafCohomologyFunctor X 1 := NatIso.ofComponents (fun j ↦ by @@ -194,21 +198,21 @@ private noncomputable def sheafH_filtered_colimit_h1_stageNatIso variable (c' : Cocone Y') (hc' : IsColimit c') private theorem sheafH_filtered_colimit_h1_boundary_square - (hc_sections_inj : IsColimit ((sheafH_filtered_colimit_h1_sectionsFunctor (X := X)).mapCocone + (hc_sections_inj : IsColimit ((sheafHFilteredColimitH1SectionsFunctor (X := X)).mapCocone (sheafHFilteredColimitSuccInjCocone Y'))) - (hc_sections_q : IsColimit ((sheafH_filtered_colimit_h1_sectionsFunctor (X := X)).mapCocone + (hc_sections_q : IsColimit ((sheafHFilteredColimitH1SectionsFunctor (X := X)).mapCocone (sheafHFilteredColimitSuccQuotientCocone Y' c' hc'))) : (colim (J := J') (C := AddCommGrpCat.{u})).map - (sheafH_filtered_colimit_h1_gTopNat Y') ≫ + (sheafHFilteredColimitH1GTopNat Y') ≫ ((colimit.isColimit (sheafHFilteredColimitSuccQuotient Y' ⋙ - sheafH_filtered_colimit_h1_sectionsFunctor (X := X))).coconePointUniqueUpToIso + sheafHFilteredColimitH1SectionsFunctor (X := X))).coconePointUniqueUpToIso hc_sections_q).hom = ((colimit.isColimit (sheafHFilteredColimitSuccInj Y' ⋙ - sheafH_filtered_colimit_h1_sectionsFunctor (X := X))).coconePointUniqueUpToIso + sheafHFilteredColimitH1SectionsFunctor (X := X))).coconePointUniqueUpToIso hc_sections_inj).hom ≫ - (sheafH_filtered_colimit_h1_sectionsFunctor (X := X)).map + (sheafHFilteredColimitH1SectionsFunctor (X := X)).map (cokernel.π (sheafHFilteredColimitSuccIota Y' c' hc')) := by - let sectionsFunctor := sheafH_filtered_colimit_h1_sectionsFunctor (X := X) + let sectionsFunctor := sheafHFilteredColimitH1SectionsFunctor (X := X) let qCocone := sheafHFilteredColimitSuccQuotientCocone Y' c' hc' let ι' := sheafHFilteredColimitSuccIota Y' c' hc' let eInj := (colimit.isColimit @@ -219,7 +223,7 @@ private theorem sheafH_filtered_colimit_h1_boundary_square hc_sections_q change (colim (J := J') (C := AddCommGrpCat.{u})).map - (sheafH_filtered_colimit_h1_gTopNat Y') ≫ eQ.hom = + (sheafHFilteredColimitH1GTopNat Y') ≫ eQ.hom = eInj.hom ≫ sectionsFunctor.map (cokernel.π ι') apply colimit.hom_ext intro j @@ -243,7 +247,7 @@ private theorem sheafH_filtered_colimit_h1_boundary_square (sheafHFilteredColimitSuccInjCocone Y').ι.app j ≫ cokernel.π ι' := cokernel.π_desc _ _ _ have hπ_top : - (sheafH_filtered_colimit_h1_gTopNat Y').app j ≫ + (sheafHFilteredColimitH1GTopNat Y').app j ≫ (sectionsFunctor.mapCocone qCocone).ι.app j = (sectionsFunctor.mapCocone (sheafHFilteredColimitSuccInjCocone Y')).ι.app j ≫ sectionsFunctor.map (cokernel.π ι') := by @@ -253,16 +257,17 @@ private theorem sheafH_filtered_colimit_h1_boundary_square cokernel.π ι').hom.app (op ⊤)) simp_all exact - (congrArg (fun t ↦ (sheafH_filtered_colimit_h1_gTopNat Y').app j ≫ t) heQ).trans + (congrArg (fun t ↦ (sheafHFilteredColimitH1GTopNat Y').app j ≫ t) heQ).trans (hπ_top.trans (congrArg (fun t ↦ t ≫ sectionsFunctor.map (cokernel.π ι')) heInj).symm) -private noncomputable def sheafH_filtered_colimit_h1_global_cokernel_iso +/-- Identify the global section cokernel with first cohomology of the colimit. -/ +noncomputable def sheafHFilteredColimitH1GlobalCokernelIso (h_colim : Subsingleton (Sheaf.H (sheafHFilteredColimitSuccInjCocone Y').pt 1)) : - cokernel ((sheafH_filtered_colimit_h1_sectionsFunctor (X := X)).map + cokernel ((sheafHFilteredColimitH1SectionsFunctor (X := X)).map (cokernel.π (sheafHFilteredColimitSuccIota Y' c' hc'))) ≅ (sheafCohomologyFunctor X 1).obj c'.pt := by - let sectionsFunctor := sheafH_filtered_colimit_h1_sectionsFunctor (X := X) + let sectionsFunctor := sheafHFilteredColimitH1SectionsFunctor (X := X) let qCocone := sheafHFilteredColimitSuccQuotientCocone Y' c' hc' let ι' := sheafHFilteredColimitSuccIota Y' c' hc' change cokernel (sectionsFunctor.map (cokernel.π ι')) ≅ @@ -285,17 +290,17 @@ include hcsh /-- The degree-`1` filtered-colimit comparison isomorphism, obtained by identifying `H¹` with the cokernel of top sections for the injective-replacement short exact sequence. -/ -private noncomputable def sheafH_filtered_colimit_comparison_one_iso : +noncomputable def sheafHFilteredColimitComparisonOneIso : colimit (Ysh ⋙ sheafCohomologyFunctor X 1) ≅ (sheafCohomologyFunctor X 1).obj csh.pt := by letI : Zero (TopCat.Sheaf AddCommGrpCat.{u} X) := Limits.HasZeroObject.zero' _ let Inj := sheafHFilteredColimitSuccInj Ysh let qCocone := sheafHFilteredColimitSuccQuotientCocone Ysh csh hcsh - let sectionsFunctor := sheafH_filtered_colimit_h1_sectionsFunctor (X := X) + let sectionsFunctor := sheafHFilteredColimitH1SectionsFunctor (X := X) let ι' := sheafHFilteredColimitSuccIota Ysh csh hcsh let toPsh := sheafToPresheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u} - have hInj (j) : Injective (Inj.obj j) := - sheafH_filtered_colimit_succ_Inj_obj_injective (Y' := Ysh) j + have hInj (j) : Injective (Inj.obj j) := by + exact private_decl% (sheafH_filtered_colimit_succ_Inj_obj_injective (Y' := Ysh) j) have h_mid (j) : Subsingleton (Sheaf.H (Inj.obj j) 1) := @sheafH_subsingleton_of_injective (Opens X) _ (Opens.grothendieckTopology X) _ _ (Inj.obj j) (hInj j) 0 @@ -336,35 +341,36 @@ private noncomputable def sheafH_filtered_colimit_comparison_one_iso : sectionsFunctor.obj (sheafHFilteredColimitSuccQuotientCocone Ysh csh hcsh).pt := (colimit.isColimit (sheafHFilteredColimitSuccQuotient Ysh ⋙ sectionsFunctor)).coconePointUniqueUpToIso hc_sections_q - let globalIso := by + let globalIso : cokernel (sectionsFunctor.map (cokernel.π ι')) ≅ + (sheafCohomologyFunctor X 1).obj csh.pt := by simpa [sectionsFunctor, ι'] using - (sheafH_filtered_colimit_h1_global_cokernel_iso (Y' := Ysh) (c' := csh) (hc' := hcsh) h_colim) + (sheafHFilteredColimitH1GlobalCokernelIso (Y' := Ysh) (c' := csh) (hc' := hcsh) h_colim) exact - (HasColimit.isoOfNatIso (sheafH_filtered_colimit_h1_stageNatIso Ysh h_mid)).symm ≪≫ - HasColimit.isoOfNatIso (sheafH_filtered_colimit_h1_cokernelFunctorIso Ysh) ≪≫ + (HasColimit.isoOfNatIso (sheafHFilteredColimitH1StageNatIso Ysh h_mid)).symm ≪≫ + HasColimit.isoOfNatIso (sheafHFilteredColimitH1CokernelFunctorIso Ysh) ≪≫ PreservesCokernel.iso (colim (J := J') (C := AddCommGrpCat.{u})) - (sheafH_filtered_colimit_h1_gTopNat Ysh) ≪≫ + (sheafHFilteredColimitH1GTopNat Ysh) ≪≫ (cokernel.mapIso (f := (colim (J := J') (C := AddCommGrpCat.{u})).map - (sheafH_filtered_colimit_h1_gTopNat Ysh)) + (sheafHFilteredColimitH1GTopNat Ysh)) (sectionsFunctor.map (cokernel.π ι')) eInj eQ (by - change colim.map (sheafH_filtered_colimit_h1_gTopNat Ysh) ≫ eQ.hom = + change colim.map (sheafHFilteredColimitH1GTopNat Ysh) ≫ eQ.hom = eInj.hom ≫ sectionsFunctor.map (cokernel.π ι') exact sheafH_filtered_colimit_h1_boundary_square Ysh csh hcsh hc_sections_inj hc_sections_q)) ≪≫ globalIso @[simp] theorem sheafH_filtered_colimit_comparison_one_iso_hom : - (sheafH_filtered_colimit_comparison_one_iso + (sheafHFilteredColimitComparisonOneIso (Ysh := Ysh) (csh := csh) (hcsh := hcsh)).hom = sheafHFilteredColimitComparison Ysh 1 csh := by let : Zero (TopCat.Sheaf AddCommGrpCat.{u} X) := Limits.HasZeroObject.zero' _ let Inj := sheafHFilteredColimitSuccInj Ysh let toPsh := sheafToPresheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u} let evTop := (CategoryTheory.evaluation (Opens X)ᵒᵖ AddCommGrpCat.{u}).obj (op ⊤) - let sectionsFunctor := sheafH_filtered_colimit_h1_sectionsFunctor (X := X) + let sectionsFunctor := sheafHFilteredColimitH1SectionsFunctor (X := X) let ι' := sheafHFilteredColimitSuccIota Ysh csh hcsh - have hInj (j) : Injective (Inj.obj j) := - sheafH_filtered_colimit_succ_Inj_obj_injective (Y' := Ysh) j + have hInj (j) : Injective (Inj.obj j) := by + exact private_decl% (sheafH_filtered_colimit_succ_Inj_obj_injective (Y' := Ysh) j) have h_mid (j) : Subsingleton (Sheaf.H (Inj.obj j) 1) := @sheafH_subsingleton_of_injective (Opens X) _ (Opens.grothendieckTopology X) _ _ (Inj.obj j) (hInj j) 0 @@ -402,20 +408,20 @@ private noncomputable def sheafH_filtered_colimit_comparison_one_iso : sectionsFunctor.obj (sheafHFilteredColimitSuccQuotientCocone Ysh csh hcsh).pt := (colimit.isColimit (sheafHFilteredColimitSuccQuotient Ysh ⋙ sectionsFunctor)).coconePointUniqueUpToIso hc_sections_q - let α := sheafH_filtered_colimit_h1_gTopNat Ysh + let α := sheafHFilteredColimitH1GTopNat Ysh let mapIso := cokernel.mapIso (f := (colim (C := AddCommGrpCat.{u})).map α) (sectionsFunctor.map (cokernel.π ι')) eInj eQ (sheafH_filtered_colimit_h1_boundary_square Ysh csh hcsh hc_sections_inj hc_sections_q) - let globalIso := sheafH_filtered_colimit_h1_global_cokernel_iso Ysh csh hcsh h_colim - dsimp [sheafH_filtered_colimit_comparison_one_iso] + let globalIso := sheafHFilteredColimitH1GlobalCokernelIso Ysh csh hcsh h_colim + dsimp [sheafHFilteredColimitComparisonOneIso] refine colimit.hom_ext (fun j ↦ ?_) let stageHom := sheafHFilteredColimitSuccStageHom Ysh csh hcsh j let appTop {F G : TopCat.Sheaf AddCommGrpCat.{u} X} (f : F ⟶ G) := f.hom.app (op ⊤) let stageCokMap := cokernel.map (α.app j) (sectionsFunctor.map (cokernel.π ι')) (appTop stageHom.τ₂) (appTop stageHom.τ₃) (congrArg appTop stageHom.comm₂₃.symm) - let cokIso := sheafH_filtered_colimit_h1_cokernelFunctorIso Ysh - let stageNat := sheafH_filtered_colimit_h1_stageNatIso Ysh h_mid + let cokIso := sheafHFilteredColimitH1CokernelFunctorIso Ysh + let stageNat := sheafHFilteredColimitH1StageNatIso Ysh h_mid have hnat : stageCokMap ≫ globalIso.hom = stageNat.hom.app j ≫ (sheafCohomologyFunctor X 1).map (csh.ι.app j) := by change stageCokMap ≫ globalIso.hom = @@ -434,16 +440,16 @@ private noncomputable def sheafH_filtered_colimit_comparison_one_iso : (Iso.inv_hom_id_app_assoc stageNat j ((sheafCohomologyFunctor X 1).map (csh.ι.app j))) have hleft : - (sheafH_filtered_colimit_h1_stageNatIso Ysh h_mid).inv.app j ≫ + (sheafHFilteredColimitH1StageNatIso Ysh h_mid).inv.app j ≫ cokIso.hom.app j ≫ colimit.ι (cokernel α) j ≫ (PreservesCokernel.iso (colim (C := AddCommGrpCat.{u})) α).hom ≫ mapIso.hom ≫ globalIso.hom = - (sheafH_filtered_colimit_h1_stageNatIso Ysh h_mid).inv.app j ≫ + (sheafHFilteredColimitH1StageNatIso Ysh h_mid).inv.app j ≫ stageCokMap ≫ globalIso.hom := by simpa [Category.assoc] using congrArg (fun t ↦ - (sheafH_filtered_colimit_h1_stageNatIso Ysh h_mid).inv.app j ≫ + (sheafHFilteredColimitH1StageNatIso Ysh h_mid).inv.app j ≫ t ≫ globalIso.hom) (show cokIso.hom.app j ≫ colimit.ι (cokernel α) j ≫ (PreservesCokernel.iso (colim (C := AddCommGrpCat.{u})) α).hom ≫ @@ -522,7 +528,7 @@ private noncomputable def sheafH_filtered_colimit_comparison_one_iso : cokernel.π (α.app j) ≫ stageCokMap := (cokernel.π_desc _ _ _).symm exact hmap.trans (hstage.trans hdesc)) - change (sheafH_filtered_colimit_h1_stageNatIso Ysh h_mid).inv.app j ≫ + change (sheafHFilteredColimitH1StageNatIso Ysh h_mid).inv.app j ≫ cokIso.hom.app j ≫ colimit.ι (cokernel α) j ≫ (PreservesCokernel.iso (colim (C := AddCommGrpCat.{u})) α).hom ≫ mapIso.hom ≫ globalIso.hom = @@ -530,10 +536,10 @@ private noncomputable def sheafH_filtered_colimit_comparison_one_iso : exact hleft.trans hright /-- The degree-`0` comparison up to identifying `H⁰` with global sections. -/ -private noncomputable def sheafH_filtered_colimit_zero_sections_iso : +noncomputable def sheafHFilteredColimitZeroSectionsIso : colimit (Ysh ⋙ sheafCohomologyFunctor X 0) ≅ - (sheafH_filtered_colimit_h1_sectionsFunctor (X := X)).obj csh.pt := by - let sectionsFunctor := sheafH_filtered_colimit_h1_sectionsFunctor (X := X) + (sheafHFilteredColimitH1SectionsFunctor (X := X)).obj csh.pt := by + let sectionsFunctor := sheafHFilteredColimitH1SectionsFunctor (X := X) let h0Iso : Ysh ⋙ sheafCohomologyFunctor X 0 ≅ Ysh ⋙ sectionsFunctor := Functor.isoWhiskerLeft Ysh (sheafH0NatIsoSections (X := X)) @@ -552,17 +558,17 @@ private noncomputable def sheafH_filtered_colimit_zero_sections_iso : (colimit.isColimit (Ysh ⋙ sectionsFunctor)).coconePointUniqueUpToIso hc_sections /-- The degree-`0` filtered-colimit comparison isomorphism, obtained from global sections. -/ -private noncomputable def sheafH_filtered_colimit_comparison_zero_iso : +noncomputable def sheafHFilteredColimitComparisonZeroIso : colimit (Ysh ⋙ sheafCohomologyFunctor X 0) ≅ (sheafCohomologyFunctor X 0).obj csh.pt := - sheafH_filtered_colimit_zero_sections_iso (Ysh := Ysh) csh hcsh ≪≫ + sheafHFilteredColimitZeroSectionsIso (Ysh := Ysh) csh hcsh ≪≫ ((sheafH0EquivSections csh.pt).toAddCommGrpIso).symm @[simp] theorem sheafH_filtered_colimit_comparison_zero_iso_hom : - (sheafH_filtered_colimit_comparison_zero_iso + (sheafHFilteredColimitComparisonZeroIso (Ysh := Ysh) (csh := csh) (hcsh := hcsh)).hom = sheafHFilteredColimitComparison Ysh 0 csh := by - let sectionsFunctor := sheafH_filtered_colimit_h1_sectionsFunctor (X := X) + let sectionsFunctor := sheafHFilteredColimitH1SectionsFunctor (X := X) let toPsh := sheafToPresheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u} have : CreatesColimit Ysh toPsh := createsFilteredColimit Ysh @@ -613,7 +619,7 @@ private noncomputable def sheafH_filtered_colimit_comparison_zero_iso : (sheafH0EquivSections_natural (f := csh.ι.app j) (x := x)).symm calc colimit.ι (Ysh ⋙ sheafCohomologyFunctor X 0) j ≫ - (sheafH_filtered_colimit_comparison_zero_iso + (sheafHFilteredColimitComparisonZeroIso (Ysh := Ysh) (csh := csh) (hcsh := hcsh)).hom = h0Iso.hom.app j ≫ colimit.ι (Ysh ⋙ sectionsFunctor) j ≫ e.hom ≫ h0Symm := by @@ -662,8 +668,8 @@ private theorem sheafH_filtered_colimit_comparison_isIso_succ_succ ih (Ysh := sheafHFilteredColimitSuccQuotient Ysh) (csh := qCocone) (sheafHFilteredColimitSuccQuotientCoconeIsColimit Ysh csh hcsh) - have hInj (j) : Injective (Inj.obj j) := - sheafH_filtered_colimit_succ_Inj_obj_injective (Y' := Ysh) j + have hInj (j) : Injective (Inj.obj j) := by + exact private_decl% (sheafH_filtered_colimit_succ_Inj_obj_injective (Y' := Ysh) j) have h_mid (r) (j) : Subsingleton (Sheaf.H (Inj.obj j) (r + 1)) := @sheafH_subsingleton_of_injective (Opens X) _ (Opens.grothendieckTopology X) _ _ (Inj.obj j) (hInj j) r @@ -721,6 +727,6 @@ noncomputable def sheafHPreservesFilteredColimits (n : ℕ) : colimit (Y' ⋙ sheafCohomologyFunctor X n) ≅ (sheafCohomologyFunctor X n).obj c'.pt := by - haveI : IsIso (sheafHFilteredColimitComparison Y' n c') := - sheafH_filtered_colimit_comparison_isIso Y' c' hc' n + haveI : IsIso (sheafHFilteredColimitComparison Y' n c') := by + exact sheafH_filtered_colimit_comparison_isIso Y' c' hc' n exact asIso (sheafHFilteredColimitComparison Y' n c') diff --git a/LeanPool/GrothendieckVanishing/PresheafFilteredColimitCore.lean b/LeanPool/GrothendieckVanishing/PresheafFilteredColimitCore.lean index a9a1d5d456..004b1851f6 100644 --- a/LeanPool/GrothendieckVanishing/PresheafFilteredColimitCore.lean +++ b/LeanPool/GrothendieckVanishing/PresheafFilteredColimitCore.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module -import Mathlib.Topology.NoetherianSpace +public import Mathlib.Topology.NoetherianSpace +public import LeanPool.GrothendieckVanishing.FlasqueVanishing import LeanPool.GrothendieckVanishing.PresheafFilteredColimitGeneral -import LeanPool.GrothendieckVanishing.ClosedImmersionCohomology +import Mathlib.Algebra.Category.Grp.AB /-! # Noetherian filtered-colimit infrastructure for sheaf cohomology @@ -20,6 +22,8 @@ Noetherian spaces: degree-`n+1` colimit comparison. -/ +@[expose] public section + universe u open CategoryTheory TopologicalSpace Abelian Limits Opposite TopCat @@ -247,8 +251,9 @@ noncomputable def sheafHFilteredColimitSuccQuotientCocone attribute [local implicit_reducible] sheafHFilteredColimitSuccQuotientCocone +/-- Lift a filtered cocone through the injective construction for successor cohomology. -/ @[implicit_reducible] -private noncomputable def sheafH_filtered_colimit_succ_liftedCocone +noncomputable def sheafHFilteredColimitSuccLiftedCocone (s : Cocone (sheafHFilteredColimitSuccQuotient Y')) : Cocone (sheafHFilteredColimitSuccInj Y') := Cocone.mk s.pt @@ -269,7 +274,7 @@ omit [IsFiltered J'] in @[simp] private theorem sheafH_filtered_colimit_succ_liftedCocone_ι_app (s : Cocone (sheafHFilteredColimitSuccQuotient Y')) (j : J') : - (sheafH_filtered_colimit_succ_liftedCocone Y' s).ι.app j = + (sheafHFilteredColimitSuccLiftedCocone Y' s).ι.app j = cokernel.π ((sheafHFilteredColimitSuccEta Y').app j) ≫ s.ι.app j := rfl /-- The quotient cocone obtained from the stagewise injective replacements is colimiting. -/ @@ -287,12 +292,12 @@ noncomputable def sheafHFilteredColimitSuccQuotientCoconeIsColimit injCocone.ι.app j ≫ cokernel.π ι' := cokernel.π_desc _ _ _ exact { desc := fun s ↦ - let lifted := sheafH_filtered_colimit_succ_liftedCocone Y' s + let lifted := sheafHFilteredColimitSuccLiftedCocone Y' s cokernel.desc ι' (injColim.desc lifted) (hc'.hom_ext fun j ↦ by have hfac_lifted : injCocone.ι.app j ≫ injColim.desc lifted = cokernel.π ((sheafHFilteredColimitSuccEta Y').app j) ≫ s.ι.app j := by - simpa [lifted, sheafH_filtered_colimit_succ_liftedCocone, injCocone, + simpa [lifted, sheafHFilteredColimitSuccLiftedCocone, injCocone, sheafHFilteredColimitSuccInjCocone] using injColim.fac lifted j change c'.ι.app j ≫ sheafHFilteredColimitSuccIota Y' c' hc' ≫ injColim.desc lifted = c'.ι.app j ≫ 0 @@ -310,18 +315,18 @@ noncomputable def sheafHFilteredColimitSuccQuotientCoconeIsColimit rw [cokernel.condition, zero_comp, comp_zero] exact hzero) fac := fun s j ↦ (cancel_epi (cokernel.π ((sheafHFilteredColimitSuccEta Y').app j))).mp (by - let lifted := sheafH_filtered_colimit_succ_liftedCocone Y' s + let lifted := sheafHFilteredColimitSuccLiftedCocone Y' s have hfac_lifted : injCocone.ι.app j ≫ injColim.desc lifted = cokernel.π ((sheafHFilteredColimitSuccEta Y').app j) ≫ s.ι.app j := by - simpa [lifted, sheafH_filtered_colimit_succ_liftedCocone, injCocone, + simpa [lifted, sheafHFilteredColimitSuccLiftedCocone, injCocone, sheafHFilteredColimitSuccInjCocone] using injColim.fac lifted j have hι : ι' ≫ injColim.desc lifted = 0 := hc'.hom_ext fun k ↦ by have hfac_lifted_k : injCocone.ι.app k ≫ injColim.desc lifted = cokernel.π ((sheafHFilteredColimitSuccEta Y').app k) ≫ s.ι.app k := by - simpa [lifted, sheafH_filtered_colimit_succ_liftedCocone, injCocone, + simpa [lifted, sheafHFilteredColimitSuccLiftedCocone, injCocone, sheafHFilteredColimitSuccInjCocone] using injColim.fac lifted k change c'.ι.app k ≫ sheafHFilteredColimitSuccIota Y' c' hc' ≫ injColim.desc lifted = c'.ι.app k ≫ 0 @@ -351,7 +356,7 @@ noncomputable def sheafHFilteredColimitSuccQuotientCoconeIsColimit rw [cokernel.π_desc] exact (congrArg (fun t ↦ injCocone.ι.app j ≫ t) hdesc).trans hfac_lifted) uniq := fun s m hm ↦ by - let lifted := sheafH_filtered_colimit_succ_liftedCocone Y' s + let lifted := sheafHFilteredColimitSuccLiftedCocone Y' s apply (cancel_epi (cokernel.π ι')).mp change cokernel.π ι' ≫ m = cokernel.π ι' ≫ cokernel.desc ι' (injColim.desc lifted) _ diff --git a/LeanPool/GrothendieckVanishing/PresheafFilteredColimitGeneral.lean b/LeanPool/GrothendieckVanishing/PresheafFilteredColimitGeneral.lean index 3f9c823e94..ec4ff1088e 100644 --- a/LeanPool/GrothendieckVanishing/PresheafFilteredColimitGeneral.lean +++ b/LeanPool/GrothendieckVanishing/PresheafFilteredColimitGeneral.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module -import LeanPool.GrothendieckVanishing.CohomologyAPI +public import Mathlib.Algebra.Category.Grp.Basic +public import Mathlib.Topology.Sheaves.SheafCondition.UniqueGluing +import Mathlib.Algebra.Category.Grp.Colimits +import Mathlib.Algebra.Category.Grp.FilteredColimits +import Mathlib.Algebra.Category.Grp.Limits +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # General filtered-colimit infrastructure for presheaves @@ -14,9 +24,11 @@ finite-cover separation, eventual vanishing, compatible representative extractio finite-subcover gluing in cocone points. -/ +@[expose] public section + universe u -open CategoryTheory TopologicalSpace Abelian Limits Opposite TopCat +open CategoryTheory TopologicalSpace Limits Opposite TopCat /-- Zero is preserved under filtered transitions: if restricting a transition to an open gives 0, then restricting any further transition also gives 0. -/ diff --git a/LeanPool/GrothendieckVanishing/TopologicalKrullDim.lean b/LeanPool/GrothendieckVanishing/TopologicalKrullDim.lean index 3a7e31308d..0a2f3aefae 100644 --- a/LeanPool/GrothendieckVanishing/TopologicalKrullDim.lean +++ b/LeanPool/GrothendieckVanishing/TopologicalKrullDim.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module -import Mathlib.Topology.KrullDimension -import Mathlib.Topology.Category.TopCat.Basic -import Mathlib.Topology.Sets.Opens -import Mathlib.Tactic.Common -import Mathlib.Tactic.Ring +public import Mathlib.Topology.KrullDimension +public import Mathlib.Topology.Category.TopCat.Basic +import Mathlib.Tactic.Ring.RingNF /-! # Topological Krull Dimension @@ -34,6 +33,8 @@ API for topological Krull dimension on irreducible spaces. strictly smaller dimension -/ +@[expose] public section + universe u open CategoryTheory TopologicalSpace diff --git a/LeanPool/GrothendieckVanishing/ZeroOutside.lean b/LeanPool/GrothendieckVanishing/ZeroOutside.lean index f3d95eeebb..90b2525619 100644 --- a/LeanPool/GrothendieckVanishing/ZeroOutside.lean +++ b/LeanPool/GrothendieckVanishing/ZeroOutside.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Vasily Ilin, Brian Nugent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Ilin, Brian Nugent -/ +module +public import Mathlib.Algebra.Category.Grp.Colimits +public import Mathlib.Algebra.Category.Grp.FilteredColimits +public import Mathlib.Algebra.Category.Grp.Limits +public import Mathlib.Algebra.Category.Grp.Zero +public import Mathlib.Topology.Sheaves.Stalks import LeanPool.GrothendieckVanishing.CohomologyAPI /-! @@ -35,6 +41,8 @@ finitely-generated subsheaf reduction in the Grothendieck vanishing proof. canonical germ. -/ +@[expose] public section + universe u open CategoryTheory TopologicalSpace Limits Opposite diff --git a/LeanPool/HSDInteriorPointLP.lean b/LeanPool/HSDInteriorPointLP.lean index 98a88d0391..33a0b5aff3 100644 --- a/LeanPool/HSDInteriorPointLP.lean +++ b/LeanPool/HSDInteriorPointLP.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Makoto Yamashita. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Makoto Yamashita -/ +module -import LeanPool.HSDInteriorPointLP.GeneratedConvergence +public import LeanPool.HSDInteriorPointLP.GeneratedConvergence +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Homogeneous self-dual interior-point method for linear programming @@ -17,6 +23,8 @@ Tags: linear-programming, interior-point-methods, optimization, homogeneous-self MSC: 90C05, 90C51 -/ +@[expose] public section + /-! Top-level import for the HSD interior-point LP proof. diff --git a/LeanPool/HSDInteriorPointLP/FixedYTMTheory.lean b/LeanPool/HSDInteriorPointLP/FixedYTMTheory.lean index e8b964f793..e44a5a702f 100644 --- a/LeanPool/HSDInteriorPointLP/FixedYTMTheory.lean +++ b/LeanPool/HSDInteriorPointLP/FixedYTMTheory.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Makoto Yamashita. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Makoto Yamashita -/ +module -import LeanPool.HSDInteriorPointLP.LocalNeighborhoodEstimates +public import LeanPool.HSDInteriorPointLP.LocalNeighborhoodEstimates +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Algebra.BigOperators.Field +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Fixed YTM convergence ingredients @@ -19,6 +27,8 @@ That older interface was removed because the generated-algorithm interface in `GeneratedConvergence.lean` constructs the iterates recursively and makes the algorithm dependency clearer. -/ + +@[expose] public section noncomputable section open scoped BigOperators diff --git a/LeanPool/HSDInteriorPointLP/GeneratedConvergence.lean b/LeanPool/HSDInteriorPointLP/GeneratedConvergence.lean index 5c2de32b10..f141af3f5a 100644 --- a/LeanPool/HSDInteriorPointLP/GeneratedConvergence.lean +++ b/LeanPool/HSDInteriorPointLP/GeneratedConvergence.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Makoto Yamashita. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Makoto Yamashita -/ +module -import LeanPool.HSDInteriorPointLP.FixedYTMTheory +public import LeanPool.HSDInteriorPointLP.FixedYTMTheory +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Generated predictor-corrector algorithm and final convergence theorem @@ -19,6 +25,8 @@ Lean-reading hints for beginners: * `calc ...` is a readable chain of equalities/inequalities. * `omega` solves arithmetic goals over natural numbers and integers. -/ + +@[expose] public section noncomputable section open scoped BigOperators diff --git a/LeanPool/HSDInteriorPointLP/LocalNeighborhoodEstimates.lean b/LeanPool/HSDInteriorPointLP/LocalNeighborhoodEstimates.lean index 9728728f60..bd0f4d5d2c 100644 --- a/LeanPool/HSDInteriorPointLP/LocalNeighborhoodEstimates.lean +++ b/LeanPool/HSDInteriorPointLP/LocalNeighborhoodEstimates.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Makoto Yamashita. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Makoto Yamashita -/ +module -import LeanPool.HSDInteriorPointLP.NewtonSystem +public import LeanPool.HSDInteriorPointLP.NewtonSystem +import Mathlib.Algebra.BigOperators.Field +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Fixed local neighborhood estimates @@ -24,6 +31,8 @@ Lean-reading hints for beginners: * `ring` proves polynomial identities such as rearrangements of sums/products. * `field_simp` clears denominators after you provide nonzero-denominator proofs. -/ + +@[expose] public section noncomputable section open scoped BigOperators diff --git a/LeanPool/HSDInteriorPointLP/NewtonSystem.lean b/LeanPool/HSDInteriorPointLP/NewtonSystem.lean index dde232ac88..3dd26be108 100644 --- a/LeanPool/HSDInteriorPointLP/NewtonSystem.lean +++ b/LeanPool/HSDInteriorPointLP/NewtonSystem.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Makoto Yamashita. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Makoto Yamashita -/ - -import LeanPool.HSDInteriorPointLP.PrimalDualData +module + +public import LeanPool.HSDInteriorPointLP.PrimalDualData +public import Mathlib.Analysis.Real.Sqrt +public import Mathlib.LinearAlgebra.FiniteDimensional.Defs +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.LinearAlgebra.FiniteDimensional.Basic +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Newton-system layer @@ -22,6 +31,8 @@ Lean-reading hints for beginners: * `simpa [defs] using h` means: simplify the goal and the type of `h` using `defs`, then close the goal by `h`. -/ + +@[expose] public section noncomputable section open scoped BigOperators diff --git a/LeanPool/HSDInteriorPointLP/PrimalDualData.lean b/LeanPool/HSDInteriorPointLP/PrimalDualData.lean index 2657146030..848fe18b64 100644 --- a/LeanPool/HSDInteriorPointLP/PrimalDualData.lean +++ b/LeanPool/HSDInteriorPointLP/PrimalDualData.lean @@ -3,22 +3,17 @@ Copyright (c) 2026 Makoto Yamashita. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Makoto Yamashita -/ +module -import Lean.Elab.Tactic.Omega -import Mathlib.Algebra.BigOperators.Field -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Analysis.SpecialFunctions.Log.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Fintype.Basic +public import Mathlib.Basic.Real.Basic +public import Mathlib.LinearAlgebra.Matrix.Defs +import Mathlib.Algebra.Order.Algebra import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Analysis.SpecialFunctions.Sqrt -import Mathlib.Data.Matrix.Basic -import Mathlib.LinearAlgebra.FiniteDimensional.Basic -import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Primal-dual LP data and HSDE notation @@ -35,6 +30,8 @@ Lean-reading hints for beginners: `simp` in a long proof because the simplification set does not change silently. -/ +@[expose] public section + noncomputable section open scoped BigOperators diff --git a/LeanPool/HadwigerNelsonBounds.lean b/LeanPool/HadwigerNelsonBounds.lean index 7f70f2bbe2..c156c93c46 100644 --- a/LeanPool/HadwigerNelsonBounds.lean +++ b/LeanPool/HadwigerNelsonBounds.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsSpindle +public import LeanPool.HadwigerNelsonBounds.PartsSpindle /-! # Known Bounds for the Hadwiger-Nelson Problem @@ -17,6 +18,8 @@ Tags: graph-theory, geometric-graph-theory, graph-coloring, hadwiger-nelson MSC: 05C15, 52C10 -/ +@[expose] public section + /-! # Kernel-checked Hadwiger--Nelson bounds diff --git a/LeanPool/HadwigerNelsonBounds/Basic.lean b/LeanPool/HadwigerNelsonBounds/Basic.lean index 13634a74b9..a4e7a56fe2 100644 --- a/LeanPool/HadwigerNelsonBounds/Basic.lean +++ b/LeanPool/HadwigerNelsonBounds/Basic.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Combinatorics.SimpleGraph.Basic -import Mathlib.Data.ZMod.Basic +public import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.Combinatorics.SimpleGraph.Basic /-! # Plane unit-distance graph and triangular lattice @@ -15,6 +15,8 @@ This module defines the Euclidean plane graph and the lattice geometry used by the seven-color construction. -/ +@[expose] public section + namespace HadwigerNelsonBounds open SimpleGraph diff --git a/LeanPool/HadwigerNelsonBounds/IsbellColoring.lean b/LeanPool/HadwigerNelsonBounds/IsbellColoring.lean index c0e9e565b5..dc90c01251 100644 --- a/LeanPool/HadwigerNelsonBounds/IsbellColoring.lean +++ b/LeanPool/HadwigerNelsonBounds/IsbellColoring.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import Mathlib.Combinatorics.SimpleGraph.Coloring.Vertex +public import LeanPool.HadwigerNelsonBounds.Voronoi import LeanPool.HadwigerNelsonBounds.LatticeSeparation -import Mathlib.Combinatorics.SimpleGraph.Coloring.Vertex /-! # Isbell's seven-coloring @@ -14,6 +16,8 @@ This module proves the numerical gap estimates, constructs the plane coloring, and establishes the seven-color upper bound. -/ +@[expose] public section + namespace HadwigerNelsonBounds open SimpleGraph diff --git a/LeanPool/HadwigerNelsonBounds/LatticeSeparation.lean b/LeanPool/HadwigerNelsonBounds/LatticeSeparation.lean index e8be7d9c5b..ce25f23901 100644 --- a/LeanPool/HadwigerNelsonBounds/LatticeSeparation.lean +++ b/LeanPool/HadwigerNelsonBounds/LatticeSeparation.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.Voronoi +public import LeanPool.HadwigerNelsonBounds.Basic /-! # Separation of equally colored lattice points @@ -13,6 +14,8 @@ This module proves the modular quadratic-form estimate that separates distinct lattice points carrying the same residue color. -/ +@[expose] public section + namespace HadwigerNelsonBounds open SimpleGraph diff --git a/LeanPool/HadwigerNelsonBounds/PartsCanonicalTriangle.lean b/LeanPool/HadwigerNelsonBounds/PartsCanonicalTriangle.lean index 9b4386ee37..002a84e252 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsCanonicalTriangle.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsCanonicalTriangle.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import Mathlib.Combinatorics.SimpleGraph.Coloring.Vertex +public import LeanPool.HadwigerNelsonBounds.PartsRootDecisionCore import LeanPool.HadwigerNelsonBounds.PartsRootDecision -import Mathlib.Combinatorics.SimpleGraph.Coloring.Vertex /-! # The canonical non-monochromatic sqrt-three triangle @@ -14,6 +16,8 @@ The checked Parts certificate rules out a monochromatic copy of its canonical equilateral triangle in every proper four-coloring of the plane. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Rename a distinguished color to zero and a different color to three. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsCertificate.lean b/LeanPool/HadwigerNelsonBounds/PartsCertificate.lean index 592a63ab65..54abb932c1 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsCertificate.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsCertificate.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCoordinates +public import LeanPool.HadwigerNelsonBounds.PartsCoordinates /-! # A sound checker for Parts coloring trees @@ -15,6 +16,8 @@ the same certificate as the source coloring diagram, but avoids artificial recursion depth from long chains of forced assignments. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- A vertex-color assignment on the finite Parts graph. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsCertificateData.lean b/LeanPool/HadwigerNelsonBounds/PartsCertificateData.lean index d6a538ccde..938e983fbc 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsCertificateData.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsCertificateData.lean @@ -3,14 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCertificateData0 -import LeanPool.HadwigerNelsonBounds.PartsCertificateData1 -import LeanPool.HadwigerNelsonBounds.PartsCertificateData2 -import LeanPool.HadwigerNelsonBounds.PartsCertificateData3 -import LeanPool.HadwigerNelsonBounds.PartsCertificateData4 -import LeanPool.HadwigerNelsonBounds.PartsCertificateData5 -import LeanPool.HadwigerNelsonBounds.PartsCertificateData6 +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData0 +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData1 +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData2 +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData3 +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData4 +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData5 +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData6 /-! # Parts certificate roots and exact graph symmetries @@ -20,6 +21,8 @@ Together with swapping the two unused color names, they expand 36 orbit representatives to all 432 proper normalized root colorings. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- The 36 normalized coloring-tree representatives. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsCertificateData0.lean b/LeanPool/HadwigerNelsonBounds/PartsCertificateData0.lean index fdc39a5a96..81b2ca208d 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsCertificateData0.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsCertificateData0.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCertificate +public import LeanPool.HadwigerNelsonBounds.PartsCertificate /-! Generated chunk 0 of the Parts coloring-tree certificate. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Normalized root orbit 10, checked by Parts tree `S`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsCertificateData1.lean b/LeanPool/HadwigerNelsonBounds/PartsCertificateData1.lean index 0729168521..74ef4bd50b 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsCertificateData1.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsCertificateData1.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCertificate +public import LeanPool.HadwigerNelsonBounds.PartsCertificate /-! Generated chunk 1 of the Parts coloring-tree certificate. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Normalized root orbit 3, checked by Parts tree `L2`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsCertificateData2.lean b/LeanPool/HadwigerNelsonBounds/PartsCertificateData2.lean index 0ba7462cb4..efc05c0a0d 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsCertificateData2.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsCertificateData2.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCertificate +public import LeanPool.HadwigerNelsonBounds.PartsCertificate /-! Generated chunk 2 of the Parts coloring-tree certificate. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Normalized root orbit 0, checked by Parts tree `S`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsCertificateData3.lean b/LeanPool/HadwigerNelsonBounds/PartsCertificateData3.lean index 5cebb7d14f..795a58f3b0 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsCertificateData3.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsCertificateData3.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCertificate +public import LeanPool.HadwigerNelsonBounds.PartsCertificate /-! Generated chunk 3 of the Parts coloring-tree certificate. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Normalized root orbit 2, checked by Parts tree `S`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsCertificateData4.lean b/LeanPool/HadwigerNelsonBounds/PartsCertificateData4.lean index b244e84f8d..f044bcf0d3 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsCertificateData4.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsCertificateData4.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCertificate +public import LeanPool.HadwigerNelsonBounds.PartsCertificate /-! Generated chunk 4 of the Parts coloring-tree certificate. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Normalized root orbit 5, checked by Parts tree `S`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsCertificateData5.lean b/LeanPool/HadwigerNelsonBounds/PartsCertificateData5.lean index 7d4f639a05..15b3d25ff0 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsCertificateData5.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsCertificateData5.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCertificate +public import LeanPool.HadwigerNelsonBounds.PartsCertificate /-! Generated chunk 5 of the Parts coloring-tree certificate. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Normalized root orbit 6, checked by Parts tree `S`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsCertificateData6.lean b/LeanPool/HadwigerNelsonBounds/PartsCertificateData6.lean index 21a4bcdf63..43f3336b31 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsCertificateData6.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsCertificateData6.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCertificate +public import LeanPool.HadwigerNelsonBounds.PartsCertificate /-! Generated chunk 6 of the Parts coloring-tree certificate. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Normalized root orbit 1, checked by Parts tree `L1`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsCoordinates.lean b/LeanPool/HadwigerNelsonBounds/PartsCoordinates.lean index 4d2b111478..01f610b535 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsCoordinates.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsCoordinates.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGeometry +public import LeanPool.HadwigerNelsonBounds.PartsGeometry /-! # The 481 exact vertices in Parts' base graph @@ -13,6 +14,8 @@ The order and coordinates are transcribed from `JP/Pink/g481.vtx` in the Polymath 16 data archive accompanying Jaan Parts, arXiv:2010.12661. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Coordinate lookup chunk 0. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsFirstStage.lean b/LeanPool/HadwigerNelsonBounds/PartsFirstStage.lean index 330de8b35b..4573565a6f 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsFirstStage.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsFirstStage.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCertificateData -import LeanPool.HadwigerNelsonBounds.PartsPermutations +public import LeanPool.HadwigerNelsonBounds.PartsPermutations +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData0 +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData1 +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData2 +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData3 +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData4 +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData5 +public import LeanPool.HadwigerNelsonBounds.PartsCertificateData6 /-! # The Parts obstruction to a monochromatic sqrt-three triangle @@ -15,6 +22,8 @@ root symmetries and the remaining color swap. The resulting 432 certificates cover every proper normalized coloring of the 13-vertex 2-Golomb root. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Swap the two colors not fixed by the normalized root. -/ @@ -180,126 +189,12 @@ private lemma IsTransform.isUnit_eq {symmetry : Fin 6} {point image : PartsPoint end PartsPoint -private def partsSymmetryOfNat (value : Nat) : Fin 6 := - ⟨value % 6, Nat.mod_lt value (by decide)⟩ - -private def partsVertexOfNat (value : Nat) : Fin 481 := - ⟨value % 481, Nat.mod_lt value (by decide)⟩ - -private lemma partsPoint_permuteVertex_isTransform0 (symmetryValue : Nat) - (hsymmetry : symmetryValue < 6) - (value : Nat) (hupper : value < 64) : - PartsPoint.IsTransform (partsSymmetryOfNat symmetryValue) - (partsPoint (partsVertexOfNat value)) - (partsPoint (partsPermuteVertex (partsSymmetryOfNat symmetryValue) - (partsVertexOfNat value))) := by - interval_cases symmetryValue <;> interval_cases value <;> - simp only [PartsPoint.IsTransform, partsSymmetryOfNat] <;> decide - -private lemma partsPoint_permuteVertex_isTransform1 (symmetryValue : Nat) - (hsymmetry : symmetryValue < 6) - (value : Nat) (hlower : 64 ≤ value) (hupper : value < 128) : - PartsPoint.IsTransform (partsSymmetryOfNat symmetryValue) - (partsPoint (partsVertexOfNat value)) - (partsPoint (partsPermuteVertex (partsSymmetryOfNat symmetryValue) - (partsVertexOfNat value))) := by - interval_cases symmetryValue <;> interval_cases value <;> - simp only [PartsPoint.IsTransform, partsSymmetryOfNat] <;> decide - -private lemma partsPoint_permuteVertex_isTransform2 (symmetryValue : Nat) - (hsymmetry : symmetryValue < 6) - (value : Nat) (hlower : 128 ≤ value) (hupper : value < 192) : - PartsPoint.IsTransform (partsSymmetryOfNat symmetryValue) - (partsPoint (partsVertexOfNat value)) - (partsPoint (partsPermuteVertex (partsSymmetryOfNat symmetryValue) - (partsVertexOfNat value))) := by - interval_cases symmetryValue <;> interval_cases value <;> - simp only [PartsPoint.IsTransform, partsSymmetryOfNat] <;> decide - -private lemma partsPoint_permuteVertex_isTransform3 (symmetryValue : Nat) - (hsymmetry : symmetryValue < 6) - (value : Nat) (hlower : 192 ≤ value) (hupper : value < 256) : - PartsPoint.IsTransform (partsSymmetryOfNat symmetryValue) - (partsPoint (partsVertexOfNat value)) - (partsPoint (partsPermuteVertex (partsSymmetryOfNat symmetryValue) - (partsVertexOfNat value))) := by - interval_cases symmetryValue <;> interval_cases value <;> - simp only [PartsPoint.IsTransform, partsSymmetryOfNat] <;> decide - -private lemma partsPoint_permuteVertex_isTransform4 (symmetryValue : Nat) - (hsymmetry : symmetryValue < 6) - (value : Nat) (hlower : 256 ≤ value) (hupper : value < 320) : - PartsPoint.IsTransform (partsSymmetryOfNat symmetryValue) - (partsPoint (partsVertexOfNat value)) - (partsPoint (partsPermuteVertex (partsSymmetryOfNat symmetryValue) - (partsVertexOfNat value))) := by - interval_cases symmetryValue <;> interval_cases value <;> - simp only [PartsPoint.IsTransform, partsSymmetryOfNat] <;> decide - -private lemma partsPoint_permuteVertex_isTransform5 (symmetryValue : Nat) - (hsymmetry : symmetryValue < 6) - (value : Nat) (hlower : 320 ≤ value) (hupper : value < 384) : - PartsPoint.IsTransform (partsSymmetryOfNat symmetryValue) - (partsPoint (partsVertexOfNat value)) - (partsPoint (partsPermuteVertex (partsSymmetryOfNat symmetryValue) - (partsVertexOfNat value))) := by - interval_cases symmetryValue <;> interval_cases value <;> - simp only [PartsPoint.IsTransform, partsSymmetryOfNat] <;> decide - -private lemma partsPoint_permuteVertex_isTransform6 (symmetryValue : Nat) - (hsymmetry : symmetryValue < 6) - (value : Nat) (hlower : 384 ≤ value) (hupper : value < 448) : - PartsPoint.IsTransform (partsSymmetryOfNat symmetryValue) - (partsPoint (partsVertexOfNat value)) - (partsPoint (partsPermuteVertex (partsSymmetryOfNat symmetryValue) - (partsVertexOfNat value))) := by - interval_cases symmetryValue <;> interval_cases value <;> - simp only [PartsPoint.IsTransform, partsSymmetryOfNat] <;> decide - -private lemma partsPoint_permuteVertex_isTransform7 (symmetryValue : Nat) - (hsymmetry : symmetryValue < 6) - (value : Nat) (hupper : value < 481) (hlower : 448 ≤ value) : - PartsPoint.IsTransform (partsSymmetryOfNat symmetryValue) - (partsPoint (partsVertexOfNat value)) - (partsPoint (partsPermuteVertex (partsSymmetryOfNat symmetryValue) - (partsVertexOfNat value))) := by - interval_cases symmetryValue <;> interval_cases value <;> - simp only [PartsPoint.IsTransform, partsSymmetryOfNat] <;> decide - /-- The stored vertex tables implement the exact isometries described above. -/ private lemma partsPoint_permuteVertex_isTransform (symmetry : Fin 6) : ∀ vertex, PartsPoint.IsTransform symmetry (partsPoint vertex) (partsPoint (partsPermuteVertex symmetry vertex)) := by - intro vertex - have hsymmetry : partsSymmetryOfNat symmetry.val = symmetry := by - apply Fin.ext - exact Nat.mod_eq_of_lt symmetry.isLt - have hvertex : partsVertexOfNat vertex.val = vertex := by - apply Fin.ext - exact Nat.mod_eq_of_lt vertex.isLt - rw [← hsymmetry, ← hvertex] - by_cases h64 : vertex.val < 64 - · exact partsPoint_permuteVertex_isTransform0 symmetry.val symmetry.isLt vertex.val h64 - by_cases h128 : vertex.val < 128 - · exact partsPoint_permuteVertex_isTransform1 symmetry.val symmetry.isLt vertex.val - (Nat.le_of_not_gt h64) h128 - by_cases h192 : vertex.val < 192 - · exact partsPoint_permuteVertex_isTransform2 symmetry.val symmetry.isLt vertex.val - (Nat.le_of_not_gt h128) h192 - by_cases h256 : vertex.val < 256 - · exact partsPoint_permuteVertex_isTransform3 symmetry.val symmetry.isLt vertex.val - (Nat.le_of_not_gt h192) h256 - by_cases h320 : vertex.val < 320 - · exact partsPoint_permuteVertex_isTransform4 symmetry.val symmetry.isLt vertex.val - (Nat.le_of_not_gt h256) h320 - by_cases h384 : vertex.val < 384 - · exact partsPoint_permuteVertex_isTransform5 symmetry.val symmetry.isLt vertex.val - (Nat.le_of_not_gt h320) h384 - by_cases h448 : vertex.val < 448 - · exact partsPoint_permuteVertex_isTransform6 symmetry.val symmetry.isLt vertex.val - (Nat.le_of_not_gt h384) h448 - · exact partsPoint_permuteVertex_isTransform7 symmetry.val symmetry.isLt vertex.val - vertex.isLt (Nat.le_of_not_gt h448) + fin_cases symmetry <;> + simp only [PartsPoint.IsTransform] <;> decide +kernel private lemma partsAdjacent_permuteVertex (symmetry : Fin 6) (left right : Fin 481) : partsAdjacent (partsPermuteVertex symmetry left) (partsPermuteVertex symmetry right) = @@ -497,112 +392,112 @@ private lemma partsCertificateVariantVerifies_of_base exact verified private theorem partsBaseCertificate0_verify : - (partsBaseCertificate 0).Verifies := by decide + (partsBaseCertificate 0).Verifies := by decide +kernel private theorem partsBaseCertificate1_verify : - (partsBaseCertificate 1).Verifies := by decide + (partsBaseCertificate 1).Verifies := by decide +kernel private theorem partsBaseCertificate2_verify : - (partsBaseCertificate 2).Verifies := by decide + (partsBaseCertificate 2).Verifies := by decide +kernel private theorem partsBaseCertificate3_verify : - (partsBaseCertificate 3).Verifies := by decide + (partsBaseCertificate 3).Verifies := by decide +kernel private theorem partsBaseCertificate4_verify : - (partsBaseCertificate 4).Verifies := by decide + (partsBaseCertificate 4).Verifies := by decide +kernel private theorem partsBaseCertificate5_verify : - (partsBaseCertificate 5).Verifies := by decide + (partsBaseCertificate 5).Verifies := by decide +kernel private theorem partsBaseCertificate6_verify : - (partsBaseCertificate 6).Verifies := by decide + (partsBaseCertificate 6).Verifies := by decide +kernel private theorem partsBaseCertificate7_verify : - (partsBaseCertificate 7).Verifies := by decide + (partsBaseCertificate 7).Verifies := by decide +kernel private theorem partsBaseCertificate8_verify : - (partsBaseCertificate 8).Verifies := by decide + (partsBaseCertificate 8).Verifies := by decide +kernel private theorem partsBaseCertificate9_verify : - (partsBaseCertificate 9).Verifies := by decide + (partsBaseCertificate 9).Verifies := by decide +kernel private theorem partsBaseCertificate10_verify : - (partsBaseCertificate 10).Verifies := by decide + (partsBaseCertificate 10).Verifies := by decide +kernel private theorem partsBaseCertificate11_verify : - (partsBaseCertificate 11).Verifies := by decide + (partsBaseCertificate 11).Verifies := by decide +kernel private theorem partsBaseCertificate12_verify : - (partsBaseCertificate 12).Verifies := by decide + (partsBaseCertificate 12).Verifies := by decide +kernel private theorem partsBaseCertificate13_verify : - (partsBaseCertificate 13).Verifies := by decide + (partsBaseCertificate 13).Verifies := by decide +kernel private theorem partsBaseCertificate14_verify : - (partsBaseCertificate 14).Verifies := by decide + (partsBaseCertificate 14).Verifies := by decide +kernel private theorem partsBaseCertificate15_verify : - (partsBaseCertificate 15).Verifies := by decide + (partsBaseCertificate 15).Verifies := by decide +kernel private theorem partsBaseCertificate16_verify : - (partsBaseCertificate 16).Verifies := by decide + (partsBaseCertificate 16).Verifies := by decide +kernel private theorem partsBaseCertificate17_verify : - (partsBaseCertificate 17).Verifies := by decide + (partsBaseCertificate 17).Verifies := by decide +kernel private theorem partsBaseCertificate18_verify : - (partsBaseCertificate 18).Verifies := by decide + (partsBaseCertificate 18).Verifies := by decide +kernel private theorem partsBaseCertificate19_verify : - (partsBaseCertificate 19).Verifies := by decide + (partsBaseCertificate 19).Verifies := by decide +kernel private theorem partsBaseCertificate20_verify : - (partsBaseCertificate 20).Verifies := by decide + (partsBaseCertificate 20).Verifies := by decide +kernel private theorem partsBaseCertificate21_verify : - (partsBaseCertificate 21).Verifies := by decide + (partsBaseCertificate 21).Verifies := by decide +kernel private theorem partsBaseCertificate22_verify : - (partsBaseCertificate 22).Verifies := by decide + (partsBaseCertificate 22).Verifies := by decide +kernel private theorem partsBaseCertificate23_verify : - (partsBaseCertificate 23).Verifies := by decide + (partsBaseCertificate 23).Verifies := by decide +kernel private theorem partsBaseCertificate24_verify : - (partsBaseCertificate 24).Verifies := by decide + (partsBaseCertificate 24).Verifies := by decide +kernel private theorem partsBaseCertificate25_verify : - (partsBaseCertificate 25).Verifies := by decide + (partsBaseCertificate 25).Verifies := by decide +kernel private theorem partsBaseCertificate26_verify : - (partsBaseCertificate 26).Verifies := by decide + (partsBaseCertificate 26).Verifies := by decide +kernel private theorem partsBaseCertificate27_verify : - (partsBaseCertificate 27).Verifies := by decide + (partsBaseCertificate 27).Verifies := by decide +kernel private theorem partsBaseCertificate28_verify : - (partsBaseCertificate 28).Verifies := by decide + (partsBaseCertificate 28).Verifies := by decide +kernel private theorem partsBaseCertificate29_verify : - (partsBaseCertificate 29).Verifies := by decide + (partsBaseCertificate 29).Verifies := by decide +kernel private theorem partsBaseCertificate30_verify : - (partsBaseCertificate 30).Verifies := by decide + (partsBaseCertificate 30).Verifies := by decide +kernel private theorem partsBaseCertificate31_verify : - (partsBaseCertificate 31).Verifies := by decide + (partsBaseCertificate 31).Verifies := by decide +kernel private theorem partsBaseCertificate32_verify : - (partsBaseCertificate 32).Verifies := by decide + (partsBaseCertificate 32).Verifies := by decide +kernel private theorem partsBaseCertificate33_verify : - (partsBaseCertificate 33).Verifies := by decide + (partsBaseCertificate 33).Verifies := by decide +kernel private theorem partsBaseCertificate34_verify : - (partsBaseCertificate 34).Verifies := by decide + (partsBaseCertificate 34).Verifies := by decide +kernel private theorem partsBaseCertificate35_verify : - (partsBaseCertificate 35).Verifies := by decide + (partsBaseCertificate 35).Verifies := by decide +kernel /-- Every stored base tree passes the checker before applying root symmetries. -/ theorem partsBaseCertificate_verifies (base : Fin 36) : diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetCases.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetCases.lean index ecb6072d65..80eaabaf5e 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetCases.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetCases.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetCertificate +public import LeanPool.HadwigerNelsonBounds.PartsGadgetCertificate +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Routing between independently checked gadget certificates @@ -15,6 +21,8 @@ unblocked color branch. Certificate soundness remains a theorem of Lean, while each small tree is independently reduced by the kernel. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- A routing node either selects a checked certificate or branches on a color. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetCertificate.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetCertificate.lean index 1c3504b1dd..596650c637 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetCertificate.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetCertificate.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetData +public import Mathlib.Tactic.Basic +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # A sound checker for the second-stage Parts gadget @@ -14,6 +21,8 @@ sqrt-three triples. Unary stretches of its coloring trees are stored as forced stems, exactly as in the first-stage Parts certificate. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- A vertex-color assignment in the 73-vertex second-stage gadget. -/ @@ -201,7 +210,7 @@ def PartsGadgetCertificate.Verifies PartsGadgetVerifiesNodeB certificate.nodes (certificate.nodeCount + 1) certificate.roots 0 = true -instance (certificate : PartsGadgetCertificate) : +instance instDecidableGadgetVerifies (certificate : PartsGadgetCertificate) : Decidable certificate.Verifies := by unfold PartsGadgetCertificate.Verifies infer_instance diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetData.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetData.lean index dc7d9edbfd..e05eeb029a 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetData.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetData.lean @@ -3,11 +3,22 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCanonicalTriangle +public import Aesop.BuiltinRules +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToDual +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated exact combinatorics for the finite second-stage Parts gadget. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Axial coordinates in one of the two triangular-lattice patches. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification.lean index 4f39991867..5c5b76cc99 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.HadwigerNelsonBounds.PartsGadgetEmbeddingCore import LeanPool.HadwigerNelsonBounds.PartsGadgetEdgeVerification0 import LeanPool.HadwigerNelsonBounds.PartsGadgetEdgeVerification1 import LeanPool.HadwigerNelsonBounds.PartsGadgetEdgeVerification2 @@ -11,6 +13,8 @@ import LeanPool.HadwigerNelsonBounds.PartsGadgetEdgeVerification3 /-! Aggregated edge-geometry checks for the finite gadget. -/ +@[expose] public section + namespace HadwigerNelsonBounds lemma partsGadget_edgeCase {vertex neighbor : Fin 73} diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification0.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification0.lean index 68a98511a1..a88dd488ed 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification0.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification0.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetEmbeddingCore +public import LeanPool.HadwigerNelsonBounds.PartsGadgetEmbeddingCore /-! Generated edge-geometry checks, group 0. -/ +@[expose] public section + namespace HadwigerNelsonBounds lemma partsGadgetEdgeCase0 {neighbor : Fin 73} diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification1.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification1.lean index 7ef8630af5..46165603cf 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification1.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification1.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetEmbeddingCore +public import LeanPool.HadwigerNelsonBounds.PartsGadgetEmbeddingCore /-! Generated edge-geometry checks, group 1. -/ +@[expose] public section + namespace HadwigerNelsonBounds lemma partsGadgetEdgeCase19 {neighbor : Fin 73} diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification2.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification2.lean index 12dd15a9b6..d826938276 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification2.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification2.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetEmbeddingCore +public import LeanPool.HadwigerNelsonBounds.PartsGadgetEmbeddingCore /-! Generated edge-geometry checks, group 2. -/ +@[expose] public section + namespace HadwigerNelsonBounds lemma partsGadgetEdgeCase38 {neighbor : Fin 73} diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification3.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification3.lean index 4208208c2a..d5006448ac 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification3.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetEdgeVerification3.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetEmbeddingCore +public import LeanPool.HadwigerNelsonBounds.PartsGadgetEmbeddingCore /-! Generated edge-geometry checks, group 3. -/ +@[expose] public section + namespace HadwigerNelsonBounds lemma partsGadgetEdgeCase57 {neighbor : Fin 73} diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetEmbedding.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetEmbedding.lean index d54fb0db65..29e5dbe360 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetEmbedding.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetEmbedding.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.HadwigerNelsonBounds.PartsGadgetCertificate +public import LeanPool.HadwigerNelsonBounds.PartsGadgetEmbeddingCore import LeanPool.HadwigerNelsonBounds.PartsGadgetEdgeVerification import LeanPool.HadwigerNelsonBounds.PartsGadgetForcedPair +import LeanPool.HadwigerNelsonBounds.PartsGadgetSymmetry /-! # The finite Parts gadget inside the unit-distance plane @@ -14,6 +18,8 @@ Every combinatorial edge is a unit segment and every hyperedge is a rigid copy of the canonical triangle ruled out by the checked 481-vertex certificate. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Restrict a plane coloring to the 73 explicit gadget points. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetEmbeddingCore.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetEmbeddingCore.lean index 584b7566a3..76da00de16 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetEmbeddingCore.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetEmbeddingCore.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsPlaneGeometry -import LeanPool.HadwigerNelsonBounds.PartsGadgetData +public import LeanPool.HadwigerNelsonBounds.PartsPlaneGeometry +public import LeanPool.HadwigerNelsonBounds.PartsGadgetData /-! # Euclidean realization of the finite Parts gadget @@ -14,6 +15,8 @@ The 73 descriptors encode two radius-three triangular-lattice patches with a common center. The second patch is rotated through cosine `7/8`. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- The integral quadratic norm of an axial lattice vector. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetForcedPair.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetForcedPair.lean index 4c7ded3755..a35db1bf0d 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetForcedPair.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetForcedPair.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetVerification +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetMiddleData +public import Mathlib.Algebra.Group.End +import LeanPool.HadwigerNelsonBounds.PartsCanonicalTriangle +import LeanPool.HadwigerNelsonBounds.PartsGadgetHardVerification import LeanPool.HadwigerNelsonBounds.PartsGadgetSymmetry +import LeanPool.HadwigerNelsonBounds.PartsGadgetVerification /-! # The forced pair in the second-stage Parts gadget @@ -15,6 +21,8 @@ to have the same color. Color renamings and central inversion reduce every case to the independently checked normalized trees. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Renaming colors preserves both gadget constraints. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData.lean index 4ad9e0585c..234cae9a63 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData.lean @@ -3,17 +3,26 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData0 -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData1 -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData2 -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData3 -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData4 -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData5 -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData6 +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData0 +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData1 +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData2 +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData3 +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData4 +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData5 +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData6 +public import LeanPool.HadwigerNelsonBounds.PartsGadgetCases +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated aggregation and routing for the hard normalized cases. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- All independently checked hard-case certificates. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData0.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData0.lean index c106c9b660..cd9eef7a05 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData0.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData0.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetCases +public import LeanPool.HadwigerNelsonBounds.PartsGadgetCertificate +public import Mathlib.Data.Fin.VecNotation +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated hard-case certificates, data group 0. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Independently checked hard-case certificate `partsGadgetHardCertificate0`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData1.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData1.lean index e9d83207b3..6150be2de7 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData1.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData1.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetCases +public import LeanPool.HadwigerNelsonBounds.PartsGadgetCertificate +public import Mathlib.Data.Fin.VecNotation +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated hard-case certificates, data group 1. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Independently checked hard-case certificate `partsGadgetHardCertificate5`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData2.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData2.lean index 86aaa49587..b9d754dc09 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData2.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData2.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetCases +public import LeanPool.HadwigerNelsonBounds.PartsGadgetCertificate +public import Mathlib.Data.Fin.VecNotation +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated hard-case certificates, data group 2. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Independently checked hard-case certificate `partsGadgetHardCertificate9`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData3.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData3.lean index c33f92898d..898c48ada9 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData3.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData3.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetCases +public import LeanPool.HadwigerNelsonBounds.PartsGadgetCertificate +public import Mathlib.Data.Fin.VecNotation +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated hard-case certificates, data group 3. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Independently checked hard-case certificate `partsGadgetHardCertificate11`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData4.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData4.lean index 8dafbfff36..bdf472375b 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData4.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData4.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetCases +public import LeanPool.HadwigerNelsonBounds.PartsGadgetCertificate +public import Mathlib.Data.Fin.VecNotation +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated hard-case certificates, data group 4. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Independently checked hard-case certificate `partsGadgetHardCertificate19`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData5.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData5.lean index 9fd36a46b0..3812f30ca3 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData5.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData5.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetCases +public import LeanPool.HadwigerNelsonBounds.PartsGadgetCertificate +public import Mathlib.Data.Fin.VecNotation +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated hard-case certificates, data group 5. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Independently checked hard-case certificate `partsGadgetHardCertificate24`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData6.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData6.lean index b641a4a821..5d840f571e 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData6.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardCasesData6.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetCases +public import LeanPool.HadwigerNelsonBounds.PartsGadgetCertificate +public import Mathlib.Data.Fin.VecNotation +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated hard-case certificates, data group 6. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Independently checked hard-case certificate `partsGadgetHardCertificate28`. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification.lean index 020224bb05..137ed2bd67 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData import LeanPool.HadwigerNelsonBounds.PartsGadgetHardVerification0 import LeanPool.HadwigerNelsonBounds.PartsGadgetHardVerification1 import LeanPool.HadwigerNelsonBounds.PartsGadgetHardVerification2 @@ -12,9 +14,16 @@ import LeanPool.HadwigerNelsonBounds.PartsGadgetHardVerification4 import LeanPool.HadwigerNelsonBounds.PartsGadgetHardVerification5 import LeanPool.HadwigerNelsonBounds.PartsGadgetHardVerification6 import LeanPool.HadwigerNelsonBounds.PartsGadgetHardVerification7 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Aggregated kernel and routing checks for the hard normalized cases. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Every hard-case leaf certificate has been kernel checked. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification0.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification0.lean index 4358981a28..979f42dc21 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification0.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification0.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData0 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Kernel checks for hard-case certificate group 0. -/ +@[expose] public section + namespace HadwigerNelsonBounds theorem partsGadgetHardCertificate0_verifies : diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification1.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification1.lean index 2ffce6849b..b972693528 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification1.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification1.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData0 +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData1 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Kernel checks for hard-case certificate group 1. -/ +@[expose] public section + namespace HadwigerNelsonBounds theorem partsGadgetHardCertificate4_verifies : diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification2.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification2.lean index 7680f92057..84cea6fc61 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification2.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification2.lean @@ -3,11 +3,21 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData1 +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData2 +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData3 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Kernel checks for hard-case certificate group 2. -/ +@[expose] public section + namespace HadwigerNelsonBounds theorem partsGadgetHardCertificate8_verifies : diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification3.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification3.lean index 75800460e2..3daee93a70 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification3.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification3.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData3 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Kernel checks for hard-case certificate group 3. -/ +@[expose] public section + namespace HadwigerNelsonBounds theorem partsGadgetHardCertificate12_verifies : diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification4.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification4.lean index 64a129b546..ac28cbc09a 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification4.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification4.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData3 +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData4 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Kernel checks for hard-case certificate group 4. -/ +@[expose] public section + namespace HadwigerNelsonBounds theorem partsGadgetHardCertificate16_verifies : diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification5.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification5.lean index ceb02a66f6..29199c8bfe 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification5.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification5.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData4 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Kernel checks for hard-case certificate group 5. -/ +@[expose] public section + namespace HadwigerNelsonBounds theorem partsGadgetHardCertificate20_verifies : diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification6.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification6.lean index bf2dce5c0f..9f91ad7bfd 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification6.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification6.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData5 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Kernel checks for hard-case certificate group 6. -/ +@[expose] public section + namespace HadwigerNelsonBounds theorem partsGadgetHardCertificate24_verifies : diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification7.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification7.lean index a9f2e46a38..aee96128fa 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification7.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetHardVerification7.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetHardCasesData6 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Kernel checks for hard-case certificate group 7. -/ +@[expose] public section + namespace HadwigerNelsonBounds theorem partsGadgetHardCertificate28_verifies : diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetMiddleData.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetMiddleData.lean index b1ba78680c..cce54ad38a 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetMiddleData.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetMiddleData.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetMiddleData0 +public import LeanPool.HadwigerNelsonBounds.PartsGadgetMiddleData0 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Aggregation of the generated `Middle` certificate. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- The checked `Middle` contradiction tree. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetMiddleData0.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetMiddleData0.lean index 45f8dd3787..95474c9fd4 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetMiddleData0.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetMiddleData0.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetCertificate +public import LeanPool.HadwigerNelsonBounds.PartsGadgetCertificate +public import Mathlib.Data.Fin.VecNotation +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated `Middle` certificate chunks 0 through 0. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- `Middle` certificate chunk 0. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry.lean index e35332f0f8..0ed333f753 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry.lean @@ -3,14 +3,23 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.HadwigerNelsonBounds.PartsGadgetData import LeanPool.HadwigerNelsonBounds.PartsGadgetSymmetry0 import LeanPool.HadwigerNelsonBounds.PartsGadgetSymmetry1 import LeanPool.HadwigerNelsonBounds.PartsGadgetSymmetry2 import LeanPool.HadwigerNelsonBounds.PartsGadgetSymmetry3 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Aggregated central-inversion facts for the finite gadget. -/ +@[expose] public section + namespace HadwigerNelsonBounds lemma partsGadgetNegation_neighbor {vertex neighbor : Fin 73} diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry0.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry0.lean index a58b036476..a0ba8574ed 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry0.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry0.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetData +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated central-inversion checks, group 0. -/ +@[expose] public section + namespace HadwigerNelsonBounds lemma partsGadgetNegationNeighbor0 {neighbor : Fin 73} diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry1.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry1.lean index a4cb856b30..823660836a 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry1.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry1.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetData +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated central-inversion checks, group 1. -/ +@[expose] public section + namespace HadwigerNelsonBounds lemma partsGadgetNegationNeighbor19 {neighbor : Fin 73} diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry2.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry2.lean index f6340a5b0f..c3a4968128 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry2.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry2.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetData +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated central-inversion checks, group 2. -/ +@[expose] public section + namespace HadwigerNelsonBounds lemma partsGadgetNegationNeighbor38 {neighbor : Fin 73} diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry3.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry3.lean index b2a032cb93..b593b1ed56 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry3.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetSymmetry3.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetData +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Generated central-inversion checks, group 3. -/ +@[expose] public section + namespace HadwigerNelsonBounds lemma partsGadgetNegationNeighbor57 {neighbor : Fin 73} diff --git a/LeanPool/HadwigerNelsonBounds/PartsGadgetVerification.lean b/LeanPool/HadwigerNelsonBounds/PartsGadgetVerification.lean index d5c4df560f..d5c48833f5 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGadgetVerification.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGadgetVerification.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetHardVerification -import LeanPool.HadwigerNelsonBounds.PartsGadgetMiddleData +public import LeanPool.HadwigerNelsonBounds.PartsGadgetMiddleData +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Kernel verification of the two normalized second-stage coloring trees. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- The middle-color normalized second-stage certificate checks by reduction. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsGeometry.lean b/LeanPool/HadwigerNelsonBounds/PartsGeometry.lean index f55fd3650f..ec283879ad 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsGeometry.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsGeometry.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.Basic +public import LeanPool.HadwigerNelsonBounds.Basic /-! # Exact geometry for the Parts lower-bound certificate @@ -17,6 +18,8 @@ The equivalent coordinates below use only `sqrt 33` and `sqrt 3`; this makes the unit-distance check an integer calculation. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Integer coordinates for the quadratic field used by the Parts graph. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsPermutationData0.lean b/LeanPool/HadwigerNelsonBounds/PartsPermutationData0.lean index 01f3f17451..d073db6739 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsPermutationData0.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsPermutationData0.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCoordinates +public import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToDual +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Exact vertex permutation 0 for the Parts root stabilizer. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Permutation 0, lookup chunk 0. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsPermutationData1.lean b/LeanPool/HadwigerNelsonBounds/PartsPermutationData1.lean index 5d997750c4..4cb9e93a80 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsPermutationData1.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsPermutationData1.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCoordinates +public import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToDual +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Exact vertex permutation 1 for the Parts root stabilizer. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Permutation 1, lookup chunk 0. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsPermutationData2.lean b/LeanPool/HadwigerNelsonBounds/PartsPermutationData2.lean index 58646dab90..f105703296 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsPermutationData2.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsPermutationData2.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCoordinates +public import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToDual +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Exact vertex permutation 2 for the Parts root stabilizer. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Permutation 2, lookup chunk 0. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsPermutationData3.lean b/LeanPool/HadwigerNelsonBounds/PartsPermutationData3.lean index ce41a2cbcd..34f1db7046 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsPermutationData3.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsPermutationData3.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCoordinates +public import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToDual +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Exact vertex permutation 3 for the Parts root stabilizer. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Permutation 3, lookup chunk 0. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsPermutationData4.lean b/LeanPool/HadwigerNelsonBounds/PartsPermutationData4.lean index e1d4a404c2..88eed46c34 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsPermutationData4.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsPermutationData4.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCoordinates +public import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToDual +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Exact vertex permutation 4 for the Parts root stabilizer. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Permutation 4, lookup chunk 0. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsPermutationData5.lean b/LeanPool/HadwigerNelsonBounds/PartsPermutationData5.lean index 7ff7dd1180..81ae75b87b 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsPermutationData5.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsPermutationData5.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCoordinates +public import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToDual +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Exact vertex permutation 5 for the Parts root stabilizer. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Permutation 5, lookup chunk 0. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsPermutations.lean b/LeanPool/HadwigerNelsonBounds/PartsPermutations.lean index 54d686d4af..8c7a72e347 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsPermutations.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsPermutations.lean @@ -3,16 +3,24 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsPermutationData0 -import LeanPool.HadwigerNelsonBounds.PartsPermutationData1 -import LeanPool.HadwigerNelsonBounds.PartsPermutationData2 -import LeanPool.HadwigerNelsonBounds.PartsPermutationData3 -import LeanPool.HadwigerNelsonBounds.PartsPermutationData4 -import LeanPool.HadwigerNelsonBounds.PartsPermutationData5 +public import LeanPool.HadwigerNelsonBounds.PartsPermutationData0 +public import LeanPool.HadwigerNelsonBounds.PartsPermutationData1 +public import LeanPool.HadwigerNelsonBounds.PartsPermutationData2 +public import LeanPool.HadwigerNelsonBounds.PartsPermutationData3 +public import LeanPool.HadwigerNelsonBounds.PartsPermutationData4 +public import LeanPool.HadwigerNelsonBounds.PartsPermutationData5 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! The six exact automorphisms of the normalized Parts root. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Apply one of the six stored automorphisms of the exact base graph. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsPlaneGeometry.lean b/LeanPool/HadwigerNelsonBounds/PartsPlaneGeometry.lean index e5ecf79c57..abdb8cfcd1 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsPlaneGeometry.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsPlaneGeometry.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsCanonicalTriangle +public import LeanPool.HadwigerNelsonBounds.PartsCanonicalTriangle /-! # Plane geometry for the Parts spindle @@ -14,6 +15,8 @@ distance-preserving rotations. The two exact cosines are the angles used in Parts' doubled wheel and spindle. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- A point in `R²` from its two Cartesian coordinates. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsRootDecision.lean b/LeanPool/HadwigerNelsonBounds/PartsRootDecision.lean index a9c14d09b5..565222db03 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsRootDecision.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsRootDecision.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsRootDecisionData0 -import LeanPool.HadwigerNelsonBounds.PartsRootDecisionData1 -import LeanPool.HadwigerNelsonBounds.PartsRootDecisionData2 -import LeanPool.HadwigerNelsonBounds.PartsRootDecisionData3 +public import LeanPool.HadwigerNelsonBounds.PartsRootDecisionData0 +public import LeanPool.HadwigerNelsonBounds.PartsRootDecisionData1 +public import LeanPool.HadwigerNelsonBounds.PartsRootDecisionData2 +public import LeanPool.HadwigerNelsonBounds.PartsRootDecisionData3 /-! # Complete normalized root dispatch @@ -16,6 +17,8 @@ The 1,023-node trie has 432 leaves, one for each proper normalized coloring of the 13-vertex 2-Golomb root. Every leaf names a separately checked Parts tree. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- All chunks of the complete normalized root-decision trie. -/ @@ -41,7 +44,7 @@ def partsRootDecisionNodes : Array (Array PartsRootNode) := #[ theorem partsRootDecision_verifies : PartsRootVerifiesNodeB partsRootDecisionNodes 1024 partsNormalizedRootPath 0 = true := by - decide + decide +kernel /-- No proper coloring of the Parts graph extends the normalized fixed root. -/ theorem no_parts_coloring_of_normalized_root {coloring : Fin 481 → Fin 4} diff --git a/LeanPool/HadwigerNelsonBounds/PartsRootDecisionCore.lean b/LeanPool/HadwigerNelsonBounds/PartsRootDecisionCore.lean index 7b3128c01b..8ce236fb8b 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsRootDecisionCore.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsRootDecisionCore.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsFirstStage +public import LeanPool.HadwigerNelsonBounds.PartsFirstStage /-! # Root-case dispatcher for the Parts certificate @@ -14,6 +15,8 @@ root. Its leaves point to the appropriate one of the 432 checked symmetry and color variants from `PartsFirstStage`. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- A branch in the root trie, or a leaf selecting a checked Parts tree. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData0.lean b/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData0.lean index 94634c72a8..b20113ba37 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData0.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData0.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsRootDecisionCore +public import LeanPool.HadwigerNelsonBounds.PartsRootDecisionCore /-! Generated root-decision chunks 0 through 3. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Root-decision data chunk 0. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData1.lean b/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData1.lean index ec54efdb0f..e67bf1ab3a 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData1.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData1.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsRootDecisionCore +public import LeanPool.HadwigerNelsonBounds.PartsRootDecisionCore /-! Generated root-decision chunks 4 through 7. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Root-decision data chunk 4. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData2.lean b/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData2.lean index 3916ca01a1..ea129d3eb8 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData2.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData2.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsRootDecisionCore +public import LeanPool.HadwigerNelsonBounds.PartsRootDecisionCore /-! Generated root-decision chunks 8 through 11. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Root-decision data chunk 8. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData3.lean b/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData3.lean index b02616685b..4bc6dd050f 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData3.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsRootDecisionData3.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsRootDecisionCore +public import LeanPool.HadwigerNelsonBounds.PartsRootDecisionCore /-! Generated root-decision chunks 12 through 15. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- Root-decision data chunk 12. -/ diff --git a/LeanPool/HadwigerNelsonBounds/PartsSpindle.lean b/LeanPool/HadwigerNelsonBounds/PartsSpindle.lean index 5a4ca1a51e..ed43d9692f 100644 --- a/LeanPool/HadwigerNelsonBounds/PartsSpindle.lean +++ b/LeanPool/HadwigerNelsonBounds/PartsSpindle.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.HadwigerNelsonBounds.PartsGadgetEmbedding +public import LeanPool.HadwigerNelsonBounds.PartsPlaneGeometry import LeanPool.HadwigerNelsonBounds.IsbellColoring +import LeanPool.HadwigerNelsonBounds.PartsGadgetEmbedding /-! # The Parts spindle and the known bounds @@ -15,6 +17,8 @@ second copy through cosine `31/32` makes the remaining endpoints unit-adjacent, contradicting a proper four-coloring. -/ +@[expose] public section + namespace HadwigerNelsonBounds /-- The distance-four vector between the translated gadget endpoints. -/ diff --git a/LeanPool/HadwigerNelsonBounds/Voronoi.lean b/LeanPool/HadwigerNelsonBounds/Voronoi.lean index 35faa37080..e46fbe321c 100644 --- a/LeanPool/HadwigerNelsonBounds/Voronoi.lean +++ b/LeanPool/HadwigerNelsonBounds/Voronoi.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import LeanPool.HadwigerNelsonBounds.Basic import LeanPool.HadwigerNelsonBounds.VoronoiQuadratic /-! @@ -13,6 +15,8 @@ This module converts the unit-square quadratic estimate into a covering-radius theorem for the triangular lattice and defines the chosen nearest lattice cell. -/ +@[expose] public section + namespace HadwigerNelsonBounds open SimpleGraph diff --git a/LeanPool/HadwigerNelsonBounds/VoronoiQuadratic.lean b/LeanPool/HadwigerNelsonBounds/VoronoiQuadratic.lean index 3d48f637f9..f919d72be9 100644 --- a/LeanPool/HadwigerNelsonBounds/VoronoiQuadratic.lean +++ b/LeanPool/HadwigerNelsonBounds/VoronoiQuadratic.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module +public import Mathlib.Basic.Real.Basic import LeanPool.HadwigerNelsonBounds.Basic /-! @@ -13,6 +15,8 @@ This module proves that one of the four corners of a lattice-coordinate unit square lies within the required quadratic-form radius. -/ +@[expose] public section + namespace HadwigerNelsonBounds private lemma cornerZeroZero_le_third {α β : ℝ} diff --git a/LeanPool/HansonWright.lean b/LeanPool/HansonWright.lean index 379efd3cea..43dbff4b08 100644 --- a/LeanPool/HansonWright.lean +++ b/LeanPool/HansonWright.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Yuanhe Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuanhe Zhang, Jason D. Lee, Fanghui Liu -/ +module -import LeanPool.HansonWright.Probability.Concentration.HansonWright +public import LeanPool.HansonWright.Probability.Concentration.HansonWright /-! # The Hanson-Wright inequality for sub-Gaussian quadratic forms @@ -16,3 +17,5 @@ Main declarations: `LeanPool.HansonWright.hanson_wright_inequality_hdp` Tags: probability-theory, concentration-inequalities, high-dimensional-probability, random-matrices MSC: 60E15, 60B20, 62H12 -/ + +@[expose] public section diff --git a/LeanPool/HansonWright/MeasureTheory/Integral/LayerCake.lean b/LeanPool/HansonWright/MeasureTheory/Integral/LayerCake.lean index b6e8b3304e..8eff7bb904 100644 --- a/LeanPool/HansonWright/MeasureTheory/Integral/LayerCake.lean +++ b/LeanPool/HansonWright/MeasureTheory/Integral/LayerCake.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Yuanhe Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuanhe Zhang, Jason D. Lee, Fanghui Liu -/ +module + +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.MeasureTheory.Integral.Layercake /-! @@ -19,6 +22,8 @@ This module introduces no new definitions. * `lintegral_eq_lintegral_tail`: a nonnegative function is the integral of its upper tails. -/ +@[expose] public section + namespace LeanPool open MeasureTheory Set Real Filter Topology diff --git a/LeanPool/HansonWright/Probability/Concentration/Bernstein.lean b/LeanPool/HansonWright/Probability/Concentration/Bernstein.lean index 4ba231bb13..f0cc257315 100644 --- a/LeanPool/HansonWright/Probability/Concentration/Bernstein.lean +++ b/LeanPool/HansonWright/Probability/Concentration/Bernstein.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Yuanhe Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuanhe Zhang, Jason D. Lee, Fanghui Liu, Kazuki Uesugi -/ +module + +public import Mathlib.Probability.Moments.Basic import LeanPool.HansonWright.Probability.Concentration.Chernoff import LeanPool.HansonWright.Probability.Moments.Cumulant -import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Scalar Bernstein Inequality @@ -29,6 +34,8 @@ real random variables. -/ +@[expose] public section + namespace LeanPool open MeasureTheory Real Set Metric Filter diff --git a/LeanPool/HansonWright/Probability/Concentration/Chernoff.lean b/LeanPool/HansonWright/Probability/Concentration/Chernoff.lean index 227ec215ac..7112e0c85b 100644 --- a/LeanPool/HansonWright/Probability/Concentration/Chernoff.lean +++ b/LeanPool/HansonWright/Probability/Concentration/Chernoff.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Yuanhe Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuanhe Zhang, Jason D. Lee, Fanghui Liu -/ -import Mathlib.Analysis.Calculus.Monotone -import Mathlib.Probability.Moments.Basic -import Mathlib.Analysis.SpecialFunctions.Log.Basic -import Mathlib.Analysis.SpecialFunctions.Pow.Real +module + +public import Mathlib.Probability.Moments.Basic /-! # Chernoff Bounds @@ -23,6 +22,8 @@ This module introduces no new definitions. * `chernoff_bound_subGaussian`: the optimized sub-Gaussian specialization. -/ +@[expose] public section + namespace LeanPool open MeasureTheory Set Real Filter Topology diff --git a/LeanPool/HansonWright/Probability/Concentration/HansonWright.lean b/LeanPool/HansonWright/Probability/Concentration/HansonWright.lean index 31f1b96ac3..d21d6e4790 100644 --- a/LeanPool/HansonWright/Probability/Concentration/HansonWright.lean +++ b/LeanPool/HansonWright/Probability/Concentration/HansonWright.lean @@ -3,14 +3,16 @@ Copyright (c) 2026 Yuanhe Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuanhe Zhang, Jason D. Lee, Fanghui Liu -/ +module + +import Mathlib.Probability.Independence.Integration + +public import LeanPool.HansonWright.Probability.Process.SubGaussian +public import Mathlib.Probability.Distributions.Gaussian.Multivariate import LeanPool.HansonWright.Probability.Concentration.Bernstein -import LeanPool.HansonWright.Probability.Process.SubGaussian import LeanPool.HansonWright.Probability.Moments.Exponential -import Mathlib.Analysis.CStarAlgebra.Matrix -import Mathlib.Analysis.InnerProductSpace.SingularValues -import Mathlib.Analysis.InnerProductSpace.Trace -import Mathlib.Probability.Distributions.Gaussian.Multivariate import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Analysis.InnerProductSpace.Trace import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series import Mathlib.MeasureTheory.Function.SpecialFunctions.Inner @@ -47,11 +49,12 @@ two-scale Chernoff bound. using the maximum coordinate least global-MGF sub-Gaussian scale. -/ +@[expose] public section + namespace LeanPool open MeasureTheory Real open _root_.ProbabilityTheory -open _root_.LeanPool.ProbabilityTheory open scoped BigOperators NNReal noncomputable section diff --git a/LeanPool/HansonWright/Probability/Moments/Cumulant.lean b/LeanPool/HansonWright/Probability/Moments/Cumulant.lean index b22cdb9577..9d1d4d0e9a 100644 --- a/LeanPool/HansonWright/Probability/Moments/Cumulant.lean +++ b/LeanPool/HansonWright/Probability/Moments/Cumulant.lean @@ -3,10 +3,16 @@ Copyright (c) 2024 Kei Tsukamoto. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kei Tsukamoto, Kazumi Kasaura, Naoto Onda, Yuma Mizuno, Sho Sonoda -/ -import Mathlib.Probability.Moments.Tilted +module + +public import Mathlib.MeasureTheory.Measure.Tilted +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Probability.Moments.Basic import Mathlib.Analysis.Calculus.ParametricIntegral +import Mathlib.Analysis.SpecialFunctions.Bernstein import Mathlib.Analysis.SpecialFunctions.Log.Deriv -import Mathlib.MeasureTheory.Measure.Tilted +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Derivatives of Moment and Cumulant Generating Functions @@ -26,6 +32,8 @@ This module extends Mathlib's existing moment-generating and tilted-measure defi * `ProbabilityTheory.cgf_deriv_two`: second derivative of the cumulant generating function. -/ +@[expose] public section + namespace LeanPool open MeasureTheory Filter Finset Real diff --git a/LeanPool/HansonWright/Probability/Moments/Exponential.lean b/LeanPool/HansonWright/Probability/Moments/Exponential.lean index 5b92e5c2fc..0333f7d123 100644 --- a/LeanPool/HansonWright/Probability/Moments/Exponential.lean +++ b/LeanPool/HansonWright/Probability/Moments/Exponential.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Yuanhe Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuanhe Zhang, Jason D. Lee, Fanghui Liu -/ +module + +public import Mathlib.Probability.Moments.IntegrableExpMul +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic import Mathlib.Analysis.Convex.Integral -import Mathlib.Probability.Moments.Basic -import Mathlib.Probability.Moments.IntegrableExpMul -import Mathlib.Analysis.SpecialFunctions.Log.Basic -import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Exponential-Moment Bounds @@ -26,6 +27,8 @@ This module introduces no new definitions. summands without requiring independence. -/ +@[expose] public section + namespace LeanPool open MeasureTheory Set Real Filter Topology diff --git a/LeanPool/HansonWright/Probability/Process/FiniteMaximum.lean b/LeanPool/HansonWright/Probability/Process/FiniteMaximum.lean index ce894049f0..8b2084b1c1 100644 --- a/LeanPool/HansonWright/Probability/Process/FiniteMaximum.lean +++ b/LeanPool/HansonWright/Probability/Process/FiniteMaximum.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Yuanhe Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuanhe Zhang, Jason D. Lee, Fanghui Liu -/ +module + +public import Mathlib.Probability.Moments.Basic import LeanPool.HansonWright.Probability.Moments.Exponential /-! @@ -21,6 +24,8 @@ This module introduces no new definitions. * `expected_max_subGaussian`: expected maximum of a finite sub-Gaussian family. -/ +@[expose] public section + namespace LeanPool open MeasureTheory Set Real Filter Topology diff --git a/LeanPool/HansonWright/Probability/Process/SubGaussian.lean b/LeanPool/HansonWright/Probability/Process/SubGaussian.lean index 928dfaf05d..f52a54bf05 100644 --- a/LeanPool/HansonWright/Probability/Process/SubGaussian.lean +++ b/LeanPool/HansonWright/Probability/Process/SubGaussian.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Yuanhe Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuanhe Zhang, Jason D. Lee, Fanghui Liu -/ -import LeanPool.HansonWright.Probability.Concentration.Chernoff -import LeanPool.HansonWright.Probability.Moments.Cumulant +module + +public import Mathlib.Probability.Moments.SubGaussian import LeanPool.HansonWright.MeasureTheory.Integral.LayerCake +import LeanPool.HansonWright.Probability.Concentration.Chernoff +import LeanPool.HansonWright.Probability.Moments.Exponential import LeanPool.HansonWright.Probability.Process.FiniteMaximum -import Mathlib.Probability.Moments.SubGaussian import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral -import Mathlib.Topology.Order.OrderClosed /-! # Sub-Gaussian Processes @@ -43,11 +44,12 @@ entropy integral bound. -/ +@[expose] public section + namespace LeanPool open MeasureTheory Real Set Metric Filter open _root_.ProbabilityTheory -open _root_.LeanPool.ProbabilityTheory open scoped ENNReal BigOperators NNReal Topology noncomputable section diff --git a/LeanPool/Incompleteness.lean b/LeanPool/Incompleteness.lean index 3bfa748449..218a8ba578 100644 --- a/LeanPool/Incompleteness.lean +++ b/LeanPool/Incompleteness.lean @@ -3,17 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arith.FormalizedArithmetic -import LeanPool.Incompleteness.Arith.Theory -import LeanPool.Incompleteness.Arith.D1 -import LeanPool.Incompleteness.Arith.D3 -import LeanPool.Incompleteness.Arith.First -import LeanPool.Incompleteness.Arith.Second -import LeanPool.Incompleteness.Arith.DC -import LeanPool.Incompleteness.DC.Basic +public import LeanPool.Incompleteness.Arith.FormalizedArithmetic +public import LeanPool.Incompleteness.Arith.Theory +public import LeanPool.Incompleteness.Arith.D1 +public import LeanPool.Incompleteness.Arith.D3 +public import LeanPool.Incompleteness.Arith.First +public import LeanPool.Incompleteness.Arith.Second +public import LeanPool.Incompleteness.Arith.DC +public import LeanPool.Incompleteness.DC.Basic -import LeanPool.Incompleteness.ProvabilityLogic.Basic +public import LeanPool.Incompleteness.ProvabilityLogic.Basic +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! # Gödel's First and Second Incompleteness Theorems @@ -26,6 +28,8 @@ Tags: incompleteness, provability, first-order-arithmetic, mathematical-logic MSC: 03F40, 03F30 -/ +@[expose] public section + namespace LeanPool.Incompleteness /-- Metadata alias for Gödel's first incompleteness theorem. -/ diff --git a/LeanPool/Incompleteness/Arith/D1.lean b/LeanPool/Incompleteness/Arith/D1.lean index 9e2a7f287d..6cc0cec64c 100644 --- a/LeanPool/Incompleteness/Arith/D1.lean +++ b/LeanPool/Incompleteness/Arith/D1.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arith.Theory +public import LeanPool.Incompleteness.Arith.Theory +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Calculus2 +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Algebra.BigOperators.Group.Finset.Basic +import Mathlib.Data.Nat.SuccPred /-! # D1 -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arith/D3.lean b/LeanPool/Incompleteness/Arith/D3.lean index d5a28e1a44..682a17793c 100644 --- a/LeanPool/Incompleteness/Arith/D3.lean +++ b/LeanPool/Incompleteness/Arith/D3.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arith.D1 +public import LeanPool.Incompleteness.Arith.Theory +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Data.Nat.Cast.Order.Basic /-! @@ -12,6 +15,8 @@ import LeanPool.Incompleteness.Arith.D1 -/ +@[expose] public section + noncomputable section «lp_nc_section_1» namespace LO diff --git a/LeanPool/Incompleteness/Arith/DC.lean b/LeanPool/Incompleteness/Arith/DC.lean index 4a21f9b4d8..310aca4c8a 100644 --- a/LeanPool/Incompleteness/Arith/DC.lean +++ b/LeanPool/Incompleteness/Arith/DC.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arith.First -import LeanPool.Incompleteness.Arith.Second -import LeanPool.Incompleteness.DC.Basic +public import LeanPool.Incompleteness.Arith.Second +public import LeanPool.Incompleteness.DC.Basic +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! # DC -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arith/First.lean b/LeanPool/Incompleteness/Arith/First.lean index c5240f2f32..51b794d4c1 100644 --- a/LeanPool/Incompleteness/Arith/First.lean +++ b/LeanPool/Incompleteness/Arith/First.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.CodedTheory +public import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Representation import LeanPool.Incompleteness.Arith.D1 +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! # First -/ +@[expose] public section + namespace List diff --git a/LeanPool/Incompleteness/Arith/FormalizedArithmetic.lean b/LeanPool/Incompleteness/Arith/FormalizedArithmetic.lean index 15f6993703..71fe51b7d0 100644 --- a/LeanPool/Incompleteness/Arith/FormalizedArithmetic.lean +++ b/LeanPool/Incompleteness/Arith/FormalizedArithmetic.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Proof.Typed +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental +public import Mathlib.Algebra.Order.Sub.Basic +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! @@ -12,6 +16,8 @@ import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath -/ +@[expose] public section + noncomputable section «lp_nc_section_1» namespace LO @@ -88,7 +94,8 @@ lemma «eq_refl!» (t : ⌜ℒₒᵣ⌝.Term) : T ⊢! t =' t := ⟨eqRefl T t noncomputable def replace (φ : ⌜ℒₒᵣ⌝.Semiformula (0 + 1)) (t u : ⌜ℒₒᵣ⌝.Term) : T ⊢ t =' u ==> φ^/[t.sing] ==> φ^/[u.sing] := by have : T ⊢ (#'1 =' #'0 ==> φ^/[(#'1).sing] ==> φ^/[(#'0).sing]).all.all := R₀Theory.replace φ - have := by simpa using specialize this t + have := specialize this t + simp only [LO.Arith.substs₁_all] at this simpa [Language.SemitermVec.q_of_pos, Language.Semiformula.substs₁, Language.TSemifromula.substs_substs] using specialize this u diff --git a/LeanPool/Incompleteness/Arith/Second.lean b/LeanPool/Incompleteness/Arith/Second.lean index c632c41801..ed3edb4cf5 100644 --- a/LeanPool/Incompleteness/Arith/Second.lean +++ b/LeanPool/Incompleteness/Arith/Second.lean @@ -3,13 +3,22 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.ToFoundation.Basic +public import LeanPool.Incompleteness.Arith.Theory +import LeanPool.Incompleteness.Arith.D1 import LeanPool.Incompleteness.Arith.D3 -import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental -import LeanPool.Incompleteness.ToFoundation.Basic +import LeanPool.Incompleteness.Arithmetization.Definability.Absoluteness +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Soundness +import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Completeness +import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Corollaries /-! # Second -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arith/Theory.lean b/LeanPool/Incompleteness/Arith/Theory.lean index 7e58286147..f956b39342 100644 --- a/LeanPool/Incompleteness/Arith/Theory.lean +++ b/LeanPool/Incompleteness/Arith/Theory.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arith.FormalizedArithmetic +public import LeanPool.Incompleteness.Arith.FormalizedArithmetic +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.CodedTheory +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Completeness /-! @@ -12,6 +16,8 @@ import LeanPool.Incompleteness.Arith.FormalizedArithmetic -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Arithmetization/Basic/IOpen.lean b/LeanPool/Incompleteness/Arithmetization/Basic/IOpen.lean index 06223393cf..5a12871dd6 100644 --- a/LeanPool/Incompleteness/Arithmetization/Basic/IOpen.lean +++ b/LeanPool/Incompleteness/Arithmetization/Basic/IOpen.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.Basic.Ind -import Mathlib.Basic.Nonempty +public import LeanPool.Incompleteness.Arithmetization.Basic.Ind +public import LeanPool.Incompleteness.Arithmetization.Basic.PeanoMinus +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Algebra.Order.Sub.Basic +import Mathlib.Data.Nat.Cast.Order.Basic /-! # IOpen -/ +@[expose] public section + namespace LO namespace Arith @@ -546,7 +552,7 @@ macro_rules /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander pair] -def pairUnexpander : Lean.PrettyPrinter.Unexpander +meta def pairUnexpander : Lean.PrettyPrinter.Unexpander | `($_ $term $term2) => `(⟪$term, $term2⟫) | _ => throw () diff --git a/LeanPool/Incompleteness/Arithmetization/Basic/Ind.lean b/LeanPool/Incompleteness/Arithmetization/Basic/Ind.lean index 0c5c78cb7c..6ea5e1f4d3 100644 --- a/LeanPool/Incompleteness/Arithmetization/Basic/Ind.lean +++ b/LeanPool/Incompleteness/Arithmetization/Basic/Ind.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Arithmetization.Definability.Boldface import LeanPool.Incompleteness.Arithmetization.Basic.PeanoMinus +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Corollaries +import Mathlib.Algebra.Order.Sub.Basic /-! # Ind -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Arithmetization/Basic/PeanoMinus.lean b/LeanPool/Incompleteness/Arithmetization/Basic/PeanoMinus.lean index 8e676757d1..36b1d47715 100644 --- a/LeanPool/Incompleteness/Arithmetization/Basic/PeanoMinus.lean +++ b/LeanPool/Incompleteness/Arithmetization/Basic/PeanoMinus.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.Definability.Absoluteness +public import LeanPool.Incompleteness.Arithmetization.Definability.BoundedBoldface +public import LeanPool.Incompleteness.Foundation.Vorspiel.ExistsUnique +public import Mathlib.Algebra.Prime.Defs +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Algebra.Order.Sub.Basic +import Mathlib.Algebra.Prime.Lemmas /-! # PeanoMinus -/ +@[expose] public section + namespace LO namespace Arith diff --git a/LeanPool/Incompleteness/Arithmetization/Definability/Absoluteness.lean b/LeanPool/Incompleteness/Arithmetization/Definability/Absoluteness.lean index 369e9983d3..4ef7b49050 100644 --- a/LeanPool/Incompleteness/Arithmetization/Definability/Absoluteness.lean +++ b/LeanPool/Incompleteness/Arithmetization/Definability/Absoluteness.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.Definability.BoundedBoldface +public import LeanPool.Incompleteness.Arithmetization.Definability.Boldface +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.CobhamR0 /-! # Absoluteness -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Arithmetization/Definability/Boldface.lean b/LeanPool/Incompleteness/Arithmetization/Definability/Boldface.lean index c3a58cefad..c8a4221715 100644 --- a/LeanPool/Incompleteness/Arithmetization/Definability/Boldface.lean +++ b/LeanPool/Incompleteness/Arithmetization/Definability/Boldface.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.Definability.Hierarchy -import LeanPool.Incompleteness.Arithmetization.Vorspiel.Graph +public import LeanPool.Incompleteness.Arithmetization.Definability.Hierarchy +public import LeanPool.Incompleteness.Arithmetization.Vorspiel.Graph +import Mathlib.Algebra.Order.Sub.Basic /-! # Boldface -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Arithmetization/Definability/BoundedBoldface.lean b/LeanPool/Incompleteness/Arithmetization/Definability/BoundedBoldface.lean index 65d17e6398..99e5ad7539 100644 --- a/LeanPool/Incompleteness/Arithmetization/Definability/BoundedBoldface.lean +++ b/LeanPool/Incompleteness/Arithmetization/Definability/BoundedBoldface.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.Definability.Boldface +public import LeanPool.Incompleteness.Arithmetization.Definability.Boldface import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Algebra.Order.Sub.Basic /-! # BoundedBoldface -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Arithmetization/Definability/Hierarchy.lean b/LeanPool/Incompleteness/Arithmetization/Definability/Hierarchy.lean index 5980c0ab47..8f0267333b 100644 --- a/LeanPool/Incompleteness/Arithmetization/Definability/Hierarchy.lean +++ b/LeanPool/Incompleteness/Arithmetization/Definability/Hierarchy.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.Vorspiel.Lemmata -import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.StrictHierarchy +public import LeanPool.Incompleteness.Arithmetization.Vorspiel.Lemmata +public import LeanPool.Incompleteness.Arithmetization.Vorspiel.Vorspiel +import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Soundness +import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Completeness /-! @@ -21,6 +24,8 @@ This file defines the $\Sigma_n / \Pi_n / \Delta_n$ formulas of arithmetic of fi -/ +@[expose] public section + namespace LO namespace FirstOrder namespace Arith diff --git a/LeanPool/Incompleteness/Arithmetization/Definability/Init.lean b/LeanPool/Incompleteness/Arithmetization/Definability/Init.lean index 604d9b1eb0..db8f0d5166 100644 --- a/LeanPool/Incompleteness/Arithmetization/Definability/Init.lean +++ b/LeanPool/Incompleteness/Arithmetization/Definability/Init.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import Aesop +import Aesop.Frontend.Command + +@[expose] public section declare_aesop_rule_sets [Definability] diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Bit.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Bit.lean index c02806073b..23c0a25d9a 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Bit.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Bit.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaZero.Exponential.Exp -import LeanPool.Incompleteness.Arithmetization.ISigmaZero.Exponential.Log +public import LeanPool.Incompleteness.Arithmetization.ISigmaZero.Exponential.Log +import LeanPool.Incompleteness.Arithmetization.Definability.Absoluteness +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Data.Nat.Cast.Order.Basic /-! # Bit -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS.lean index 72ae37bf10..13a93ff37e 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Basic -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Seq -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.PRF -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Fixpoint -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Vec -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Coding +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Basic +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Seq +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.PRF +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Fixpoint +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Vec +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Coding +import LeanPool.Incompleteness.Arithmetization.Definability.Init diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Basic.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Basic.lean index f0a1e43d1c..f78140b8aa 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Basic.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Basic.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Bit -import LeanPool.Incompleteness.Arithmetization.Vorspiel.ExistsUnique +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Bit +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! @@ -13,6 +14,8 @@ import LeanPool.Incompleteness.Arithmetization.Vorspiel.ExistsUnique -/ +@[expose] public section + noncomputable section «lp_nc_section_1» namespace LO diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Coding.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Coding.lean index 919aa9d789..e623ca760e 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Coding.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Coding.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Vec +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Bit +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! # Coding -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Fixpoint.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Fixpoint.lean index b97f798eeb..2ac0a4e769 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Fixpoint.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Fixpoint.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.PRF +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.PRF +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! @@ -12,6 +14,8 @@ import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.PRF -/ +@[expose] public section + noncomputable section «lp_nc_section_1» namespace LO diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/PRF.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/PRF.lean index 71f54fb1e8..a359eb29cb 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/PRF.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/PRF.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Seq +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Seq +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Algebra.Order.Sub.Basic /-! @@ -12,6 +15,8 @@ import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Seq -/ +@[expose] public section + noncomputable section «lp_nc_section_1» namespace LO diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Seq.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Seq.lean index b620842163..d3332a3d10 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Seq.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Seq.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Basic +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Basic +import LeanPool.Incompleteness.Arithmetization.Definability.Absoluteness +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Algebra.Order.Sub.Basic /-! @@ -12,6 +16,8 @@ import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Basic -/ +@[expose] public section + noncomputable section «lp_nc_section_1» namespace LO @@ -408,7 +414,7 @@ macro_rules /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander seqCons] -def vecConsUnexpander : Lean.PrettyPrinter.Unexpander +meta def vecConsUnexpander : Lean.PrettyPrinter.Unexpander | `($_ !⟦$term2, $terms,*⟧ $term) => `(!⟦$term2, $terms,*, $term⟧) | `($_ !⟦$term2⟧ $term) => `(!⟦$term2, $term⟧) | `($_ ∅ $term) => `(!⟦$term⟧) diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Vec.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Vec.lean index ef989b0e05..0105fd0fa8 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Vec.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/HFS/Vec.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Fixpoint +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Fixpoint +import LeanPool.Incompleteness.Arithmetization.Definability.Absoluteness +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Algebra.Order.Sub.Basic /-! @@ -12,6 +16,8 @@ import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Fixpoint -/ +@[expose] public section + noncomputable section «lp_nc_section_1» namespace LO @@ -38,7 +44,7 @@ macro_rules /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Cons.cons] -def consUnexpander : Lean.PrettyPrinter.Unexpander +meta def consUnexpander : Lean.PrettyPrinter.Unexpander | `($_ $term ?[$terms,*]) => `(?[$term, $terms,*]) | `($_ $term 0) => `(?[$term]) | _ => throw () diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath.lean index de44e0784e..db1caf970b 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath.lean @@ -3,19 +3,21 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Basic -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Functions -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Typed +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Basic +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Functions +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Typed -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Basic -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Functions -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Iteration -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Typed +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Basic +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Functions +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Iteration +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Typed -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Proof.Thy -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Proof.Derivation -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Proof.Typed +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Proof.Thy +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Proof.Derivation +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Proof.Typed -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Coding -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.CodedTheory +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Coding +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.CodedTheory +import LeanPool.Incompleteness.Arithmetization.Definability.Init diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/CodedTheory.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/CodedTheory.lean index afbe32c8d8..6677c25248 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/CodedTheory.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/CodedTheory.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Coding -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Proof.Typed -import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.PeanoMinus +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Coding +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Proof.Typed +import LeanPool.Incompleteness.Arithmetization.Definability.Absoluteness +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! # CodedTheory -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Coding.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Coding.lean index 97728250e9..79756595b4 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Coding.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Coding.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Typed -import LeanPool.Incompleteness.Arithmetization.Definability.Absoluteness -import Mathlib.Combinatorics.Colex +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Typed +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Coding +public import Mathlib.Computability.Primrec.Basic +public import Mathlib.Data.Nat.BitIndices +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Data.Nat.Cast.Order.Basic /-! # Coding -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Basic.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Basic.lean index f4015b077f..afbd63d396 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Basic.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Basic.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Basic +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Basic +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! # Basic -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Functions.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Functions.lean index bd62faefd9..7d7fe02a9e 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Functions.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Functions.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Basic -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Functions +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Basic +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Functions +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! # Functions -/ +@[expose] public section + noncomputable section «lp_nc_section_1» @@ -510,8 +514,10 @@ def construction : Language.UformulaRec1.Construction V L (blueprint pL) where or_defined := by intro v; simp [blueprint] all_defined := by intro v; simp [blueprint] ex_defined := by intro v; simp [blueprint] - allChanges_defined := defined_identity_substitution pL.qVecDef L.qVec L.qVec_defined - exChanges_defined := defined_identity_substitution pL.qVecDef L.qVec L.qVec_defined + allChanges_defined := by + exact defined_identity_substitution pL.qVecDef L.qVec L.qVec_defined + exChanges_defined := by + exact defined_identity_substitution pL.qVecDef L.qVec L.qVec_defined end Substs diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Iteration.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Iteration.lean index 344a643a11..cbf44ae39a 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Iteration.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Iteration.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Functions +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Functions +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! # Iteration -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Typed.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Typed.lean index aba197a6ea..c1959324ef 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Typed.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Formula/Typed.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Typed -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Iteration +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Typed +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Iteration +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Algebra.Order.Sub.Basic /-! @@ -13,6 +16,8 @@ import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Iterat -/ +@[expose] public section + noncomputable section «lp_nc_section_1» namespace LO diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Language.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Language.lean index 37718a401e..daa26761f7 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Language.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Language.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS +public import LeanPool.Incompleteness.Arithmetization.Basic.Ind +import LeanPool.Incompleteness.Arithmetization.Definability.Absoluteness +import LeanPool.Incompleteness.Arithmetization.Definability.BoundedBoldface +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! # Language -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Proof/Derivation.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Proof/Derivation.lean index 2a0aba2b7d..30565adb96 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Proof/Derivation.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Proof/Derivation.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Proof.Thy +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Proof.Thy +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Iteration +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Algebra.Order.Sub.Basic /-! # Derivation -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Proof/Thy.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Proof/Thy.lean index b14eaaec42..0ab3671a98 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Proof/Thy.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Proof/Thy.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Functions -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Iteration +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Language +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! # Thy -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Proof/Typed.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Proof/Typed.lean index f1f7001c8a..79d194f0cf 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Proof/Typed.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Proof/Typed.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Typed -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Proof.Derivation -import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Formula.Typed +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Proof.Derivation +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Context +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! @@ -14,6 +16,8 @@ import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental -/ +@[expose] public section + noncomputable section «lp_nc_section_1» namespace LO diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Term/Basic.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Term/Basic.lean index 01e78b2921..9336861da9 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Term/Basic.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Term/Basic.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Language -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Language +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.HFS.Vec +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Data.Nat.Cast.Order.Basic /-! # Basic -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Term/Functions.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Term/Functions.lean index ff0da6fdbc..08de8262a7 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Term/Functions.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Term/Functions.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Basic +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Basic +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Algebra.Order.Sub.Basic +import Mathlib.Data.Nat.Cast.Order.Basic /-! # Functions -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Term/Typed.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Term/Typed.lean index 4bfd63da12..309c48b9c8 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Term/Typed.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaOne/Metamath/Term/Typed.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Functions +public import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Functions +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! @@ -12,6 +14,8 @@ import LeanPool.Incompleteness.Arithmetization.ISigmaOne.Metamath.Term.Functions -/ +@[expose] public section + noncomputable section «lp_nc_section_1» namespace LO diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/Exp.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/Exp.lean index 8cb6e66219..7323db08d5 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/Exp.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/Exp.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaZero.Exponential.PPow2 -import Mathlib.Algebra.Order.Ring.Basic +public import LeanPool.Incompleteness.Arithmetization.ISigmaZero.Exponential.PPow2 +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Data.Nat.Cast.Order.Basic /-! # Exp -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/Log.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/Log.lean index 66aa63af3c..c9f9c66b5d 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/Log.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/Log.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaZero.Exponential.Exp +public import LeanPool.Incompleteness.Arithmetization.ISigmaZero.Exponential.Exp +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Data.Nat.Cast.Order.Basic /-! # Log -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/PPow2.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/PPow2.lean index 7f32ca6621..ec5e64cd12 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/PPow2.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/PPow2.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.ISigmaZero.Exponential.Pow2 +public import LeanPool.Incompleteness.Arithmetization.ISigmaZero.Exponential.Pow2 +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Data.Nat.Cast.Order.Basic /-! # PPow2 -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/Pow2.lean b/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/Pow2.lean index 84e5b1bc9e..de708e5015 100644 --- a/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/Pow2.lean +++ b/LeanPool/Incompleteness/Arithmetization/ISigmaZero/Exponential/Pow2.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.Basic.IOpen +public import LeanPool.Incompleteness.Arithmetization.Basic.IOpen +import LeanPool.Incompleteness.Arithmetization.Definability.Init +import Mathlib.Algebra.Prime.Lemmas +import Mathlib.Data.Nat.Cast.Order.Basic /-! # Pow2 -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Arithmetization/Vorspiel/ExistsUnique.lean b/LeanPool/Incompleteness/Arithmetization/Vorspiel/ExistsUnique.lean index 59ad310ef3..94aa112b81 100644 --- a/LeanPool/Incompleteness/Arithmetization/Vorspiel/ExistsUnique.lean +++ b/LeanPool/Incompleteness/Arithmetization/Vorspiel/ExistsUnique.lean @@ -3,11 +3,22 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ - -import LeanPool.Incompleteness.Arithmetization.Vorspiel.Vorspiel +module + +public import Aesop.BuiltinRules +public import Mathlib.Basic.ExistsUnique +import Mathlib.Data.Finset.Attr +import Mathlib.Basic.IsEmpty.Defs +import Mathlib.Tactic.Attr.Core +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.Push +import Mathlib.Tactic.SetLike /-! # ExistsUnique -/ +@[expose] public section + namespace Classical variable {α : Sort*} {p : α → Prop} {r : α → α → Prop} diff --git a/LeanPool/Incompleteness/Arithmetization/Vorspiel/Graph.lean b/LeanPool/Incompleteness/Arithmetization/Vorspiel/Graph.lean index 97855ba803..91b6a5486b 100644 --- a/LeanPool/Incompleteness/Arithmetization/Vorspiel/Graph.lean +++ b/LeanPool/Incompleteness/Arithmetization/Vorspiel/Graph.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arithmetization.Vorspiel.Vorspiel +public import Aesop.BuiltinRules +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # Graph -/ +@[expose] public section + namespace Function diff --git a/LeanPool/Incompleteness/Arithmetization/Vorspiel/Lemmata.lean b/LeanPool/Incompleteness/Arithmetization/Vorspiel/Lemmata.lean index eb9e479b2b..57876c0e12 100644 --- a/LeanPool/Incompleteness/Arithmetization/Vorspiel/Lemmata.lean +++ b/LeanPool/Incompleteness/Arithmetization/Vorspiel/Lemmata.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.PeanoMinus import LeanPool.Incompleteness.Arithmetization.Vorspiel.Vorspiel -import Mathlib.Algebra.GCDMonoid.Basic +import Mathlib.Data.Nat.Cast.Order.Basic /-! # Lemmata -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Arithmetization/Vorspiel/Vorspiel.lean b/LeanPool/Incompleteness/Arithmetization/Vorspiel/Vorspiel.lean index d7cc825f66..da59821d37 100644 --- a/LeanPool/Incompleteness/Arithmetization/Vorspiel/Vorspiel.lean +++ b/LeanPool/Incompleteness/Arithmetization/Vorspiel/Vorspiel.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Representation +public import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Model +import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.CobhamR0 import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.PeanoMinus -import Mathlib.Data.Fin.Basic -import Mathlib.Algebra.Order.Sub.Basic +import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Soundness +import Mathlib.Order.ConditionallyCompleteLattice.Basic /-! # Vorspiel -/ +@[expose] public section + instance [Zero α] : Nonempty α := ⟨0⟩ diff --git a/LeanPool/Incompleteness/DC/Basic.lean b/LeanPool/Incompleteness/DC/Basic.lean index d5fd80bd55..34bc3663fa 100644 --- a/LeanPool/Incompleteness/DC/Basic.lean +++ b/LeanPool/Incompleteness/DC/Basic.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Theory +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.BinderNotation +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Calculus import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental -import LeanPool.Incompleteness.ToFoundation.Basic /-! # Basic -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Basic.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Basic.lean index 7dd77477dd..f32deff5f6 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Basic.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Basic.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Order.Le +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Eq +import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Model +import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Completeness +import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Corollaries /-! # Basic -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/CobhamR0.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/CobhamR0.lean index 1604031b85..8ffdaf5cd5 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/CobhamR0.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/CobhamR0.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Model -import LeanPool.Incompleteness.Foundation.Vorspiel.ExistsUnique -import Mathlib.Algebra.Order.Monoid.Canonical.Defs -import Mathlib.Data.Nat.Cast.Order.Basic +public import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Model +import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Soundness +import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Completeness +import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Corollaries /-! # CobhamR0 -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Hierarchy.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Hierarchy.lean index a6b12a1ea1..48734cd843 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Hierarchy.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Hierarchy.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Basic +public import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Basic /-! # Hierarchy -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Model.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Model.lean index 507e3d02cd..ea22519533 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Model.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Model.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Theory +public import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Theory +import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Soundness +import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Completeness +import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Corollaries /-! # Model -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/PeanoMinus.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/PeanoMinus.lean index 4690d4db74..93a86df9fb 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/PeanoMinus.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/PeanoMinus.lean @@ -3,14 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Model import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.CobhamR0 -import Mathlib.Algebra.Order.Monoid.Canonical.Defs -import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Data.Nat.Cast.Order.Basic /-! # PeanoMinus -/ +@[expose] public section + noncomputable section «lp_nc_section_1» diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Representation.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Representation.lean index 1b03e949d8..7945bc46c9 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Representation.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Representation.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Vorspiel.Arith +public import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Model +public import Mathlib.Computability.RE import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.CobhamR0 -import LeanPool.Incompleteness.Foundation.Vorspiel.Arith -import Mathlib.Computability.Halting -import Mathlib.Computability.Primrec.List /-! # Representation -/ +@[expose] public section + namespace Part lemma _root_.Part.unit_dom_iff (x : Part Unit) : x.Dom ↔ () ∈ x := by simp [dom_iff_mem, show ∀ x : diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/StrictHierarchy.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/StrictHierarchy.lean index 500032c4ee..289216cac6 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/StrictHierarchy.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/StrictHierarchy.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.PeanoMinus +public import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Hierarchy /-! # StrictHierarchy -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Theory.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Theory.lean index 56dd522b42..f5165c257d 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Theory.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Arith/Theory.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Hierarchy +public import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Hierarchy /-! # Theory -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic.lean index 4c545dd219..030c5a9903 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic.lean @@ -3,16 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Syntax.Formula -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Syntax.Rew -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Semantics -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Elementary -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Operator -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.BinderNotation -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Model -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Calculus -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Calculus2 -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Coding -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Eq -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Soundness +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Syntax.Formula +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Syntax.Rew +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Semantics +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Elementary +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Operator +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.BinderNotation +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Model +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Calculus +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Calculus2 +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Coding +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Eq +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Soundness diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/BinderNotation.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/BinderNotation.lean index de5262caca..6352807114 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/BinderNotation.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/BinderNotation.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Operator +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Operator +import Mathlib.Tactic.Bound.Init /-! # BinderNotation -/ +@[expose] public section + open Lean PrettyPrinter Delaborator SubExpr @@ -155,24 +159,24 @@ section «lp_section_1» /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Semiterm.Operator.numeral] -def unexpsnderNatLit : Unexpander +meta def unexpsnderNatLit : Unexpander | `($_ $_ $z:num) => `($z:num) | _ => throw () /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Semiterm.Operator.const] -def unexpsnderOperatorConst : Unexpander +meta def unexpsnderOperatorConst : Unexpander | `($_ $z:num) => `(‘ $z:num ’) | _ => throw () /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Semiterm.Operator.Add.add] -def unexpsnderAdd : Unexpander +meta def unexpsnderAdd : Unexpander | `($_) => `(op(+)) /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Semiterm.Operator.Mul.mul] -def unexpsnderMul : Unexpander +meta def unexpsnderMul : Unexpander | `($_) => `(op(*)) /- @@ -182,7 +186,7 @@ def unexpsnderMul : Unexpander /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Semiterm.Operator.operator] -def unexpandFuncArith : Unexpander +meta def unexpandFuncArith : Unexpander | `($_ op(+) ![‘$t:firstOrderTerm’, ‘$u:firstOrderTerm’ ]) => `(‘($t + $u )’) | `($_ op(+) ![‘$t:firstOrderTerm’, #$x ]) => `(‘($t + #$x )’) | `($_ op(+) ![‘$t:firstOrderTerm’, &$x ]) => `(‘($t + &$x )’) @@ -219,7 +223,7 @@ def unexpandFuncArith : Unexpander /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Semiterm.numeral] -def unexpandNumeral : Unexpander +meta def unexpandNumeral : Unexpander | `($_ $n:num) => `(‘$n:num’) | _ => throw () @@ -489,17 +493,17 @@ section «lp_section_2» /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Language.Eq.eq] -def unexpsnderEq : Unexpander +meta def unexpsnderEq : Unexpander | `($_) => `(op(=)) /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Language.LT.lt] -def unexpsnderLe : Unexpander +meta def unexpsnderLe : Unexpander | `($_) => `(op(<)) /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Wedge.wedge] -def unexpandAnd : Unexpander +meta def unexpandAnd : Unexpander | `($_ “ $φ:firstOrderFormula ” “ $ψ:firstOrderFormula ”) => `(“ ($φ ∧ $ψ) ”) | `($_ “ $φ:firstOrderFormula ” $u:term ) => `(“ ($φ ∧ !$u) ”) | `($_ $t:term “ $ψ:firstOrderFormula ”) => `(“ (!$t ∧ $ψ) ”) @@ -507,7 +511,7 @@ def unexpandAnd : Unexpander /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Vee.vee] -def unexpandOr : Unexpander +meta def unexpandOr : Unexpander | `($_ “ $φ:firstOrderFormula ” “ $ψ:firstOrderFormula ”) => `(“ ($φ ∨ $ψ) ”) | `($_ “ $φ:firstOrderFormula ” $u:term ) => `(“ ($φ ∨ !$u) ”) | `($_ $t:term “ $ψ:firstOrderFormula ”) => `(“ (!$t ∨ $ψ) ”) @@ -515,25 +519,25 @@ def unexpandOr : Unexpander /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Tilde.tilde] -def unexpandNeg : Unexpander +meta def unexpandNeg : Unexpander | `($_ “ $φ:firstOrderFormula ”) => `(“ ¬$φ ”) | _ => throw () /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander UnivQuantifier.univ] -def unexpandUniv : Unexpander +meta def unexpandUniv : Unexpander | `($_ “ $φ:firstOrderFormula ”) => `(“ ∀' $φ:firstOrderFormula ”) | _ => throw () /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander ExQuantifier.ex] -def unexpandEx : Unexpander +meta def unexpandEx : Unexpander | `($_ “ $φ:firstOrderFormula”) => `(“ ∃' $φ:firstOrderFormula ”) | _ => throw () /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander ball] -def unexpandBall : Unexpander +meta def unexpandBall : Unexpander | `($_ “ $φ:firstOrderFormula ” “ $ψ:firstOrderFormula ”) => `(“ (∀[$φ] $ψ) ”) | `($_ “ $φ:firstOrderFormula ” $u:term ) => `(“ (∀[$φ] !$u) ”) | `($_ $t:term “ $ψ:firstOrderFormula ”) => `(“ (∀[!$t] $ψ) ”) @@ -541,7 +545,7 @@ def unexpandBall : Unexpander /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander bex] -def unexpandBex : Unexpander +meta def unexpandBex : Unexpander | `($_ “ $φ:firstOrderFormula ” “ $ψ:firstOrderFormula ”) => `(“ (∃[$φ] $ψ) ”) | `($_ “ $φ:firstOrderFormula ” $u:term ) => `(“ (∃[$φ] !$u) ”) | `($_ $t:term “ $ψ:firstOrderFormula ”) => `(“ (∃[!$t] $ψ) ”) @@ -549,7 +553,7 @@ def unexpandBex : Unexpander /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Arrow.arrow] -def unexpandArrow : Unexpander +meta def unexpandArrow : Unexpander | `($_ “ $φ:firstOrderFormula ” “ $ψ:firstOrderFormula”) => `(“ ($φ → $ψ) ”) | `($_ “ $φ:firstOrderFormula ” $u:term ) => `(“ ($φ → !$u) ”) | `($_ $t:term “ $ψ:firstOrderFormula”) => `(“ (!$t → $ψ) ”) @@ -557,7 +561,7 @@ def unexpandArrow : Unexpander /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander LogicalConnective.iff] -def unexpandIff : Unexpander +meta def unexpandIff : Unexpander | `($_ “ $φ:firstOrderFormula” “ $ψ:firstOrderFormula”) => `(“ ($φ ↔ $ψ) ”) | `($_ “ $φ:firstOrderFormula” $u:term ) => `(“ ($φ ↔ !$u) ”) | `($_ $t:term “ $ψ:firstOrderFormula”) => `(“ (!$t ↔ $ψ) ”) @@ -565,7 +569,7 @@ def unexpandIff : Unexpander /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Semiformula.Operator.operator] -def unexpandOpArith : Unexpander +meta def unexpandOpArith : Unexpander | `($_ op(=) ![‘ $t:firstOrderTerm ’, ‘ $u:firstOrderTerm ’]) => `(“ $t:firstOrderTerm = $u ”) | `($_ op(=) ![‘ $t:firstOrderTerm ’, #$y:term ]) => diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Calculus.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Calculus.lean index 57af15f137..7fce3b1200 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Calculus.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Calculus.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.Calculus -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Syntax.Rew +public import LeanPool.Incompleteness.Foundation.Logic.Calculus +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Syntax.Rew +import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental /-! # Calculus -/ +@[expose] public section + namespace LO namespace FirstOrder @@ -349,7 +353,8 @@ instance : Tait.Axiomatized (SyntacticFormula L) (Theory L) where variable [(k : ℕ) → DecidableEq (L.Func k)] [(k : ℕ) → DecidableEq (L.Rel k)] -private def not_close' (φ) : T ⟹ [∼(∀∀φ), φ] := +/-- Derive a formula from the negation of its universal closure in the sequent calculus. -/ +def notClose' (φ) : T ⟹ [∼(∀∀φ), φ] := have : T ⟹ [∃* ∼(@Rew.fixitr L 0 (fvSup φ) ▹ φ), φ] := instances (v := fun x ↦ &x) (em (φ := φ) (by simp) (by simp)) @@ -357,13 +362,14 @@ private def not_close' (φ) : T ⟹ [∼(∀∀φ), φ] := /-- Imported declaration from the Incompleteness formalization. -/ def _root_.LO.FirstOrder.Derivation.invClose (b : T ⊢ ∀∀φ) : T ⊢ φ := - cut (wk b (by simp)) (not_close' φ) + cut (wk b (by simp)) (notClose' φ) omit [(k : ℕ) → DecidableEq (L.Func k)] [(k : ℕ) → DecidableEq (L.Rel k)] in /-- Imported declaration from the Incompleteness formalization. -/ lemma «invClose!» (b : T ⊢! ∀∀φ) : T ⊢! φ := ⟨invClose b.get⟩ -private def deductionAux {Γ : Sequent L} : T ⟹ Γ → T \ {φ} ⟹ ∼(∀∀φ) :: Γ +/-- Transform a derivation by removing one theory axiom and adding its negated closure. -/ +def deductionAux {Γ : Sequent L} : T ⟹ Γ → T \ {φ} ⟹ ∼(∀∀φ) :: Γ | axL Γ R v => Tait.wkTail <| axL Γ R v | verum Γ => Tait.wkTail <| verum Γ | and d₁ d₂ => @@ -374,7 +380,7 @@ private def deductionAux {Γ : Sequent L} : T ⟹ Γ → T \ {φ} ⟹ ∼(∀∀ | ex t d => Tait.rotate₁ <| ex t <| Tait.rotate₁ (deductionAux d) | wk d ss => wk (deductionAux d) (by simp [List.subset_cons_of_subset _ ss]) | cut d₁ d₂ => (Tait.rotate₁ <| deductionAux d₁).cut (Tait.rotate₁ <| deductionAux d₂) - | root (φ := ψ) h => if hq : φ = ψ then Derivation.cast (not_close' φ) (by simp [hq]) else + | root (φ := ψ) h => if hq : φ = ψ then Derivation.cast (notClose' φ) (by simp [hq]) else have : T \ {φ} ⟹. ψ := root (by simp [h, Ne.symm hq]) wk this (by simp) diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Calculus2.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Calculus2.lean index d5a38bdfa4..049bbaf58f 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Calculus2.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Calculus2.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Calculus +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Calculus /-! @@ -14,6 +15,8 @@ Different characterizations of proof. -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Coding.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Coding.lean index b5996a36fa..1167d3dedd 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Coding.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Coding.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.BinderNotation +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Syntax.Formula +import Mathlib.Tactic.Bound.Init /-! # Coding -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Eq.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Eq.lean index 9fed95c2d0..9270602601 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Eq.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Eq.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.BinderNotation -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Elementary +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.BinderNotation +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Elementary +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Calculus import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Soundness /-! # Eq -/ +@[expose] public section + namespace Matrix variable {α : Type*} diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Model.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Model.lean index 0e758b4cd0..2da612d7dd 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Model.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Model.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Operator -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Elementary +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Operator +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Elementary +import Mathlib.Tactic.Bound.Init /-! # Model -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Operator.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Operator.lean index 334a762d98..d74c04e80f 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Operator.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Operator.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Semantics -import LeanPool.Incompleteness.Foundation.Vorspiel.NotationClass +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Semantics +public import LeanPool.Incompleteness.Foundation.Vorspiel.NotationClass +import Mathlib.Algebra.Ring.Nat +import Mathlib.Tactic.Bound.Init /-! # Operator -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Semantics/Elementary.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Semantics/Elementary.lean index b0101ee76f..d5eddc28cb 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Semantics/Elementary.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Semantics/Elementary.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Semantics +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Semantics +import Mathlib.Tactic.Bound.Init /-! # Elementary -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Semantics/Semantics.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Semantics/Semantics.lean index cd17f36280..54059bb180 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Semantics/Semantics.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Semantics/Semantics.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Syntax.Rew +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Syntax.Rew +public import LeanPool.Incompleteness.Foundation.Logic.Semantics +import Mathlib.Tactic.Bound.Init /-! # Semantics of first-order logic @@ -14,6 +17,8 @@ definition. -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Soundness.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Soundness.lean index 5fcc614c31..deacc38f6d 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Soundness.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Soundness.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Semantics -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Calculus +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Semantics +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Calculus /-! # Soundness -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Syntax/Formula.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Syntax/Formula.lean index 7eb39fe90d..d287092c01 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Syntax/Formula.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Syntax/Formula.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.Predicate.Term -import LeanPool.Incompleteness.Foundation.Logic.Predicate.Quantifier +public import LeanPool.Incompleteness.Foundation.Logic.Predicate.Term +public import LeanPool.Incompleteness.Foundation.Logic.Predicate.Quantifier +public import Mathlib.Data.Finset.Max +import Mathlib.Algebra.Order.Ring.Nat /-! # Formulas of first-order logic @@ -18,6 +21,8 @@ The quantification is represented by de Bruijn index. -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Syntax/Rew.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Syntax/Rew.lean index c5b6906311..0889c7e4df 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Syntax/Rew.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Basic/Syntax/Rew.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.Predicate.Rew -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Syntax.Formula +public import LeanPool.Incompleteness.Foundation.Logic.Predicate.Rew +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Syntax.Formula +import Mathlib.Algebra.GroupWithZero.Nat +import Mathlib.Algebra.Order.Group.Nat +import Mathlib.Tactic.Bound.Init /-! # Rewriting Entailment @@ -27,6 +31,8 @@ Rewritings `LO.FirstOrder.Rew` is naturally converted to formula Rewritings by -/ +@[expose] public section + namespace Finset lemma biUnion_eq_empty [DecidableEq β] {s : Finset α} {f : α → Finset β} : diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/Coding.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/Coding.lean index 2bfd781db2..87803bbd0a 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/Coding.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/Coding.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Coding +public import Mathlib.Logic.Encodable.Pi +import Mathlib.Tactic.Bound.Init /-! # Coding -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/Completeness.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/Completeness.lean index 254f5919fb..842d26b50d 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/Completeness.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/Completeness.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.SearchTree -import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.SubLanguage +public import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.SearchTree +public import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.SubLanguage +import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Model +import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Soundness import LeanPool.Incompleteness.Foundation.FirstOrder.Ultraproduct /-! # Completeness -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/Corollaries.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/Corollaries.lean index 26aab87c0f..0e4677be53 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/Corollaries.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/Corollaries.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Eq +import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Model +import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Soundness import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Completeness /-! # Corollaries -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/SearchTree.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/SearchTree.lean index 13cdae2c85..d152e15f2c 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/SearchTree.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/SearchTree.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Coding -import LeanPool.Incompleteness.Foundation.Vorspiel.Order +public import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Coding +public import LeanPool.Incompleteness.Foundation.Vorspiel.Order +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Calculus +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Semantics /-! # SearchTree -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/SubLanguage.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/SubLanguage.lean index 2919ba3dee..9465151249 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/SubLanguage.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Completeness/SubLanguage.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Semantics +public import Mathlib.Data.Finset.Preimage +import Mathlib.Tactic.Bound.Init /-! # SubLanguage -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Order/Le.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Order/Le.lean index e37d3a2f65..96f1f3a612 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Order/Le.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Order/Le.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Corollaries +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Eq +import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Model +import LeanPool.Incompleteness.Foundation.FirstOrder.Completeness.Completeness /-! # Le -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/FirstOrder/Ultraproduct.lean b/LeanPool/Incompleteness/Foundation/FirstOrder/Ultraproduct.lean index 14e333c151..5e88552355 100644 --- a/LeanPool/Incompleteness/Foundation/FirstOrder/Ultraproduct.lean +++ b/LeanPool/Incompleteness/Foundation/FirstOrder/Ultraproduct.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Basic +public import LeanPool.Incompleteness.Foundation.FirstOrder.Basic.Semantics.Semantics +public import Mathlib.Order.Filter.Ultrafilter.Defs import Mathlib.Order.Filter.Ultrafilter.Basic +import Mathlib.Tactic.Bound.Init /-! # Ultraproduct -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/IntProp/Formula.lean b/LeanPool/Incompleteness/Foundation/IntProp/Formula.lean index 6a25263f6e..d1ba5fbfd5 100644 --- a/LeanPool/Incompleteness/Foundation/IntProp/Formula.lean +++ b/LeanPool/Incompleteness/Foundation/IntProp/Formula.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.LogicSymbol -import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Basic +public import LeanPool.Incompleteness.Foundation.Logic.LogicSymbol +import Mathlib.Tactic.Bound.Init /-! # Formula -/ +@[expose] public section + namespace LO namespace IntProp diff --git a/LeanPool/Incompleteness/Foundation/IntProp/Hilbert/Basic.lean b/LeanPool/Incompleteness/Foundation/IntProp/Hilbert/Basic.lean index 3d6f21f729..807f929b69 100644 --- a/LeanPool/Incompleteness/Foundation/IntProp/Hilbert/Basic.lean +++ b/LeanPool/Incompleteness/Foundation/IntProp/Hilbert/Basic.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental -import LeanPool.Incompleteness.Foundation.IntProp.Substitution +public import LeanPool.Incompleteness.Foundation.IntProp.Substitution +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Basic /-! # Basic -/ +@[expose] public section + namespace LO namespace IntProp diff --git a/LeanPool/Incompleteness/Foundation/IntProp/Hilbert/Int.lean b/LeanPool/Incompleteness/Foundation/IntProp/Hilbert/Int.lean index 9515a9e104..3962e63351 100644 --- a/LeanPool/Incompleteness/Foundation/IntProp/Hilbert/Int.lean +++ b/LeanPool/Incompleteness/Foundation/IntProp/Hilbert/Int.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.IntProp.Hilbert.Basic +public import LeanPool.Incompleteness.Foundation.IntProp.Hilbert.Basic /-! # Int -/ +@[expose] public section + namespace LO namespace IntProp diff --git a/LeanPool/Incompleteness/Foundation/IntProp/Hilbert/WellKnown.lean b/LeanPool/Incompleteness/Foundation/IntProp/Hilbert/WellKnown.lean index 3facc9096e..7226af74d4 100644 --- a/LeanPool/Incompleteness/Foundation/IntProp/Hilbert/WellKnown.lean +++ b/LeanPool/Incompleteness/Foundation/IntProp/Hilbert/WellKnown.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.IntProp.Hilbert.Int +public import LeanPool.Incompleteness.Foundation.IntProp.Hilbert.Int +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental /-! # WellKnown -/ +@[expose] public section + namespace LO namespace IntProp diff --git a/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Basic.lean b/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Basic.lean index b5a47f7a78..efd7a621fa 100644 --- a/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Basic.lean +++ b/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Basic.lean @@ -3,17 +3,22 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Vorspiel.BinaryRelations -import LeanPool.Incompleteness.Foundation.IntProp.Hilbert.Basic +public import LeanPool.Incompleteness.Foundation.Vorspiel.BinaryRelations +public import LeanPool.Incompleteness.Foundation.IntProp.Substitution +public import LeanPool.Incompleteness.Foundation.Logic.Axioms +public import LeanPool.Incompleteness.Foundation.Logic.Semantics +import Mathlib.Tactic.Bound.Init /-! # Basic -/ +@[expose] public section + namespace LO namespace IntProp -open Entailment namespace Kripke diff --git a/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Hilbert/Cl/Basic.lean b/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Hilbert/Cl/Basic.lean index c5958a25d9..bc7bd04c83 100644 --- a/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Hilbert/Cl/Basic.lean +++ b/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Hilbert/Cl/Basic.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.IntProp.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.IntProp.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.IntProp.Kripke.Basic import LeanPool.Incompleteness.Foundation.IntProp.Kripke.Hilbert.Soundness /-! # Basic -/ +@[expose] public section + namespace LO namespace IntProp diff --git a/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Hilbert/Cl/Classical.lean b/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Hilbert/Cl/Classical.lean index 1828742f82..2e92df9afb 100644 --- a/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Hilbert/Cl/Classical.lean +++ b/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Hilbert/Cl/Classical.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.IntProp.Hilbert.WellKnown -import LeanPool.Incompleteness.Foundation.IntProp.Kripke.Hilbert.Soundness +public import LeanPool.Incompleteness.Foundation.IntProp.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.IntProp.Kripke.Basic import LeanPool.Incompleteness.Foundation.IntProp.Kripke.Hilbert.Cl.Basic /-! # Classical -/ +@[expose] public section + namespace LO namespace IntProp diff --git a/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Hilbert/Soundness.lean b/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Hilbert/Soundness.lean index dbe9332db0..87c20538d4 100644 --- a/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Hilbert/Soundness.lean +++ b/LeanPool/Incompleteness/Foundation/IntProp/Kripke/Hilbert/Soundness.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.IntProp.Hilbert.Basic -import LeanPool.Incompleteness.Foundation.IntProp.Kripke.Basic +public import LeanPool.Incompleteness.Foundation.IntProp.Hilbert.Basic +public import LeanPool.Incompleteness.Foundation.IntProp.Kripke.Basic /-! # Soundness -/ +@[expose] public section + namespace LO namespace IntProp diff --git a/LeanPool/Incompleteness/Foundation/IntProp/Substitution.lean b/LeanPool/Incompleteness/Foundation/IntProp/Substitution.lean index 89ef583add..7d34e746db 100644 --- a/LeanPool/Incompleteness/Foundation/IntProp/Substitution.lean +++ b/LeanPool/Incompleteness/Foundation/IntProp/Substitution.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.IntProp.Formula +public import LeanPool.Incompleteness.Foundation.IntProp.Formula +import Mathlib.Tactic.Bound.Init /-! # Substitution -/ +@[expose] public section + namespace LO namespace IntProp diff --git a/LeanPool/Incompleteness/Foundation/Logic/Axioms.lean b/LeanPool/Incompleteness/Foundation/Logic/Axioms.lean index bf1fb7f7e3..98291acad7 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/Axioms.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/Axioms.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.Entailment +public import LeanPool.Incompleteness.Foundation.Logic.LogicSymbol +import Mathlib.Tactic.Bound.Init /-! # Axioms -/ +@[expose] public section + namespace LO namespace Axioms diff --git a/LeanPool/Incompleteness/Foundation/Logic/Calculus.lean b/LeanPool/Incompleteness/Foundation/Logic/Calculus.lean index edacaa9a6e..d2479974d7 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/Calculus.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/Calculus.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.Entailment -import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Basic /-! # Sequent calculus and variants @@ -18,6 +18,8 @@ This file defines a characterization of Tait style calculus and Gentzen style ca -/ +@[expose] public section + namespace LO /-- Imported declaration from the Incompleteness formalization. -/ diff --git a/LeanPool/Incompleteness/Foundation/Logic/Disjunctive.lean b/LeanPool/Incompleteness/Foundation/Logic/Disjunctive.lean index 7520d461a4..2a79fafa5e 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/Disjunctive.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/Disjunctive.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Basic import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental /-! # Disjunctive -/ +@[expose] public section + namespace LO namespace Entailment diff --git a/LeanPool/Incompleteness/Foundation/Logic/Entailment.lean b/LeanPool/Incompleteness/Foundation/Logic/Entailment.lean index cd4f4d7f85..c4ebe63b2d 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/Entailment.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/Entailment.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.LogicSymbol -import LeanPool.Incompleteness.Foundation.Logic.Semantics -import LeanPool.Incompleteness.Foundation.Vorspiel.Collection +public import LeanPool.Incompleteness.Foundation.Logic.Semantics +public import LeanPool.Incompleteness.Foundation.Vorspiel.Collection +import Mathlib.Order.ConditionallyCompleteLattice.Basic +import Mathlib.Tactic.Bound.Init /-! # Basic definitions and properties of proof system related notions @@ -32,6 +34,8 @@ Also defines soundness and completeness. -/ +@[expose] public section + namespace LO /-- Imported declaration from the Incompleteness formalization. -/ diff --git a/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Basic.lean b/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Basic.lean index 91c8d44d29..6c427b161e 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Basic.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Basic.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.Entailment -import LeanPool.Incompleteness.Foundation.Logic.Axioms +public import LeanPool.Incompleteness.Foundation.Logic.Entailment +public import LeanPool.Incompleteness.Foundation.Logic.Axioms +public import Mathlib.Algebra.Order.Ring.Nat /-! # Basic -/ +@[expose] public section + namespace LO namespace Entailment diff --git a/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Context.lean b/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Context.lean index de681d20f4..cbd2edb935 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Context.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Context.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.Entailment -import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Basic +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Basic /-! # Context -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Lukasiewicz.lean b/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Lukasiewicz.lean index cd82312dc1..f1813de36c 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Lukasiewicz.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Lukasiewicz.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Basic +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Basic /-! # Lukasiewicz -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Supplemental.lean b/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Supplemental.lean index bfe8a5d3da..a62f6aaf94 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Supplemental.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/HilbertStyle/Supplemental.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.Entailment -import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Context +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Context /-! # Supplemental -/ +@[expose] public section + namespace LO namespace Entailment @@ -947,7 +949,7 @@ noncomputable instance [HasAxiomDNE 𝓢] : HasAxiomPeirce 𝓢 where apply deduct; refine (FiniteContext.byAxm (φ := (φ ==> ψ) ==> φ)) ⨀ ?_; apply deduct; - apply efqOfMemEither (by aesop) (by aesop) + apply efqOfMemEither (φ := φ) (by aesop) (by aesop) omit [DecidableEq F] in instance [HasAxiomDNE 𝓢] : HasAxiomElimContra 𝓢 where diff --git a/LeanPool/Incompleteness/Foundation/Logic/LogicSymbol.lean b/LeanPool/Incompleteness/Foundation/Logic/LogicSymbol.lean index 458b59a193..a054c30faf 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/LogicSymbol.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/LogicSymbol.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Vorspiel.Vorspiel +public import LeanPool.Incompleteness.Foundation.Vorspiel.Vorspiel +import Mathlib.Algebra.Order.Ring.Nat /-! # Logic Symbols @@ -21,6 +23,8 @@ a function that preserves logical connectives. -/ +@[expose] public section + namespace LO section «lp_section_1» diff --git a/LeanPool/Incompleteness/Foundation/Logic/Predicate/Language.lean b/LeanPool/Incompleteness/Foundation/Logic/Predicate/Language.lean index f904bdae6d..1855e74406 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/Predicate/Language.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/Predicate/Language.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.Entailment +public import Mathlib.Data.Fintype.Basic +public import Mathlib.Logic.Encodable.Basic +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.ToDual +import Mathlib.Algebra.Order.Ring.Nat /-! # Language of first-order logic @@ -16,6 +21,8 @@ This file defines the language of first-order logic. - `LO.FirstOrder.Language.oRing`, `ℒₒᵣ` is the language of ordered ring. -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Foundation/Logic/Predicate/Quantifier.lean b/LeanPool/Incompleteness/Foundation/Logic/Predicate/Quantifier.lean index 92aa40431f..2138f530fd 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/Predicate/Quantifier.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/Predicate/Quantifier.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.LogicSymbol +public import LeanPool.Incompleteness.Foundation.Logic.LogicSymbol +import Mathlib.Tactic.Bound.Init /-! # Quantifier -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/Logic/Predicate/Rew.lean b/LeanPool/Incompleteness/Foundation/Logic/Predicate/Rew.lean index 8ce787abd6..d1ddd60f40 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/Predicate/Rew.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/Predicate/Rew.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.Predicate.Term -import LeanPool.Incompleteness.Foundation.Logic.Predicate.Quantifier +public import LeanPool.Incompleteness.Foundation.Logic.Predicate.Term +public import LeanPool.Incompleteness.Foundation.Logic.Predicate.Quantifier +import Mathlib.Algebra.Order.Ring.Nat /-! # Rewriting Entailment @@ -27,6 +29,8 @@ Rewritings `LO.FirstOrder.Rew` is naturally converted to formula Rewritings by -/ +@[expose] public section + namespace LO namespace FirstOrder @@ -984,7 +988,7 @@ macro_rules (kind := substituteNotation) /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Rewriting.substitute] -def _root_.unexpsnderSubstitute : Unexpander +meta def _root_.unexpsnderSubstitute : Unexpander | `($_ $φ:term ![$ts:term,*]) => `($φ /[ $ts,* ]) | _ => throw () diff --git a/LeanPool/Incompleteness/Foundation/Logic/Predicate/Term.lean b/LeanPool/Incompleteness/Foundation/Logic/Predicate/Term.lean index b73747382f..e2615db869 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/Predicate/Term.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/Predicate/Term.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.Predicate.Language +public import LeanPool.Incompleteness.Foundation.Logic.Predicate.Language +public import LeanPool.Incompleteness.Foundation.Vorspiel.Collection +public import LeanPool.Incompleteness.Foundation.Vorspiel.Vorspiel +import Mathlib.Tactic.Bound.Init /-! # Terms of first-order logic @@ -18,6 +22,8 @@ variables of `ξ`. -/ +@[expose] public section + namespace LO namespace FirstOrder diff --git a/LeanPool/Incompleteness/Foundation/Logic/Semantics.lean b/LeanPool/Incompleteness/Foundation/Logic/Semantics.lean index 364d165fcd..7015b7f122 100644 --- a/LeanPool/Incompleteness/Foundation/Logic/Semantics.lean +++ b/LeanPool/Incompleteness/Foundation/Logic/Semantics.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.LogicSymbol +public import LeanPool.Incompleteness.Foundation.Logic.LogicSymbol +import Mathlib.Order.ConditionallyCompleteLattice.Basic +import Mathlib.Tactic.Bound.Init /-! # Basic definitions and properties of semantics-related notions @@ -22,6 +25,8 @@ Also provides 𝓜 characterization of compactness. -/ +@[expose] public section + namespace LO /-- Imported declaration from the Incompleteness formalization. -/ diff --git a/LeanPool/Incompleteness/Foundation/Modal/Axioms.lean b/LeanPool/Incompleteness/Foundation/Modal/Axioms.lean index 063118447b..ca8f939a34 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Axioms.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Axioms.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.LogicSymbol -import LeanPool.Incompleteness.Foundation.Modal.Geachean +public import LeanPool.Incompleteness.Foundation.Modal.LogicSymbol +public import LeanPool.Incompleteness.Foundation.Modal.Geachean +import Mathlib.Tactic.Bound.Init /-! # Axioms -/ +@[expose] public section + namespace LO namespace Axioms diff --git a/LeanPool/Incompleteness/Foundation/Modal/Complement.lean b/LeanPool/Incompleteness/Foundation/Modal/Complement.lean index a9af66596f..2661e254e5 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Complement.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Complement.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Formula -import LeanPool.Incompleteness.Foundation.Modal.Subformulas +public import LeanPool.Incompleteness.Foundation.Modal.Subformulas /-! # Complement -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/Modal/ComplementClosedConsistentFinset.lean b/LeanPool/Incompleteness/Foundation/Modal/ComplementClosedConsistentFinset.lean index eb86e903a5..fe77a1d0f6 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/ComplementClosedConsistentFinset.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/ComplementClosedConsistentFinset.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import Mathlib.Data.Set.Finite.Powerset -import LeanPool.Incompleteness.Foundation.Modal.MaximalConsistentSet -import LeanPool.Incompleteness.Foundation.Modal.Complement +public import LeanPool.Incompleteness.Foundation.Modal.MaximalConsistentSet +public import LeanPool.Incompleteness.Foundation.Modal.Complement +import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental +import Mathlib.Data.Finset.Powerset /-! # ComplementClosedConsistentFinset -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Entailment/Basic.lean b/LeanPool/Incompleteness/Foundation/Modal/Entailment/Basic.lean index 7a1e0dbcae..25827bb972 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Entailment/Basic.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Entailment/Basic.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.Disjunctive -import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental -import LeanPool.Incompleteness.Foundation.Modal.Axioms +public import LeanPool.Incompleteness.Foundation.Logic.Disjunctive +public import LeanPool.Incompleteness.Foundation.Modal.Axioms +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Context /-! # Basic -/ +@[expose] public section + namespace LO namespace Entailment @@ -621,7 +624,7 @@ private lemma unnec_of_mdp_aux [ModalDisjunctive 𝓢] (h : 𝓢 ⊢! □φ) : noncomputable instance unnecessitationOfModalDisjunctive [ModalDisjunctive 𝓢] : Unnecessitation 𝓢 where - unnec h := (unnec_of_mdp_aux ⟨h⟩).some + unnec h := (private_decl% (unnec_of_mdp_aux ⟨h⟩)).some end «lp_section_24» diff --git a/LeanPool/Incompleteness/Foundation/Modal/Entailment/GL.lean b/LeanPool/Incompleteness/Foundation/Modal/Entailment/GL.lean index a58a27ce21..47c025681b 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Entailment/GL.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Entailment/GL.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Entailment.K4 +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.K4 /-! # GL -/ +@[expose] public section + namespace LO namespace Entailment @@ -67,7 +70,8 @@ instance : HasAxiomH 𝓢 := ⟨fun _ ↦ GL.axiomH⟩ end GL -private noncomputable def lem_boxdot_Grz_of_L : +/-- The intermediate boxed Grzegorczyk derivation obtained from the Löb principle. -/ +noncomputable def lemBoxdotGrzOfL : 𝓢 ⊢ (⊡(⊡(φ ==> ⊡φ) ==> φ)) ==> (□(φ ==> ⊡φ) ==> φ) := by have : 𝓢 ⊢ (□(φ ==> ⊡φ) ⋏ ∼φ) ==> ⊡(φ ==> ⊡φ) := by apply deduct'; @@ -93,7 +97,7 @@ noncomputable def boxdotGrzOfL : 𝓢 ⊢ ⊡(⊡(φ ==> ⊡φ) ==> φ) ==> φ : have : 𝓢 ⊢ □(⊡(φ ==> ⊡φ) ==> φ) ==> □(□(φ ==> ⊡φ) ==> (φ ==> ⊡φ)) := impTrans'' axiomFour this; have : 𝓢 ⊢ □(⊡(φ ==> ⊡φ) ==> φ) ==> □(φ ==> ⊡φ) := impTrans'' this axiomL; have : 𝓢 ⊢ ⊡(⊡(φ ==> ⊡φ) ==> φ) ==> □(φ ==> ⊡φ) := impTrans'' boxdotBox this; - exact mdp₁ lem_boxdot_Grz_of_L this; + exact mdp₁ lemBoxdotGrzOfL this; omit [DecidableEq F] in @[simp] lemma «boxdotGrzOfL!» : 𝓢 ⊢! ⊡(⊡(φ ==> ⊡φ) ==> φ) ==> φ := by classical diff --git a/LeanPool/Incompleteness/Foundation/Modal/Entailment/Grz.lean b/LeanPool/Incompleteness/Foundation/Modal/Entailment/Grz.lean index a7162a9fac..a7a2aa7027 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Entailment/Grz.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Entailment/Grz.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Entailment.K +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.K /-! # Grz -/ +@[expose] public section + namespace LO namespace Entailment diff --git a/LeanPool/Incompleteness/Foundation/Modal/Entailment/K.lean b/LeanPool/Incompleteness/Foundation/Modal/Entailment/K.lean index 6ae701618f..c3e15b4c35 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Entailment/K.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Entailment/K.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Entailment.Basic +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.Basic +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental /-! # K -/ +@[expose] public section + namespace LO namespace Entailment @@ -423,7 +427,8 @@ def collectBoxOr' (h : 𝓢 ⊢ □φ ⋎ □ψ) : 𝓢 ⊢ □(φ ⋎ ψ) := co omit [DecidableEq F] in lemma collectBoxOr'! (h : 𝓢 ⊢! □φ ⋎ □ψ) : 𝓢 ⊢! □(φ ⋎ ψ) := ⟨collectBoxOr' h.some⟩ -private def diaOrInstOf (h : 𝓢 ⊢ χ ==> φ ⋎ ψ) : 𝓢 ⊢ ◇χ ==> ◇(φ ⋎ ψ) := by +/-- Lift an implication with a disjunctive conclusion through possibility. -/ +def diaOrInstOf (h : 𝓢 ⊢ χ ==> φ ⋎ ψ) : 𝓢 ⊢ ◇χ ==> ◇(φ ⋎ ψ) := by apply impTrans'' (and₁' diaDuality); apply impTrans'' ?h (and₂' diaDuality); apply contra₀'; diff --git a/LeanPool/Incompleteness/Foundation/Modal/Entailment/K4.lean b/LeanPool/Incompleteness/Foundation/Modal/Entailment/K4.lean index ad23b37860..aecfc2f03f 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Entailment/K4.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Entailment/K4.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Entailment.K +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.K /-! # K4 -/ +@[expose] public section + namespace LO namespace Entailment diff --git a/LeanPool/Incompleteness/Foundation/Modal/Entailment/K5.lean b/LeanPool/Incompleteness/Foundation/Modal/Entailment/K5.lean index 7d6b7a53e8..c9c22e195a 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Entailment/K5.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Entailment/K5.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Entailment.K +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.K + +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # K5 -/ +@[expose] public section + namespace LO namespace Entailment diff --git a/LeanPool/Incompleteness/Foundation/Modal/Entailment/KD.lean b/LeanPool/Incompleteness/Foundation/Modal/Entailment/KD.lean index 7ee20e7c10..e8da81e861 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Entailment/KD.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Entailment/KD.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Entailment.K +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.Basic /-! # KD -/ +@[expose] public section + namespace LO namespace Entailment diff --git a/LeanPool/Incompleteness/Foundation/Modal/Entailment/KP.lean b/LeanPool/Incompleteness/Foundation/Modal/Entailment/KP.lean index 5a83125f77..48321a6755 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Entailment/KP.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Entailment/KP.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Entailment.K +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.K /-! # KP -/ +@[expose] public section + namespace LO namespace Entailment diff --git a/LeanPool/Incompleteness/Foundation/Modal/Entailment/KT.lean b/LeanPool/Incompleteness/Foundation/Modal/Entailment/KT.lean index 6718c8926a..2e76f9de33 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Entailment/KT.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Entailment/KT.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Entailment.K -import LeanPool.Incompleteness.Foundation.Modal.Entailment.KP -import LeanPool.Incompleteness.Foundation.Modal.Entailment.KD +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.KP /-! # KT -/ +@[expose] public section + namespace LO namespace Entailment diff --git a/LeanPool/Incompleteness/Foundation/Modal/Entailment/KTc.lean b/LeanPool/Incompleteness/Foundation/Modal/Entailment/KTc.lean index 3a567abbc6..ca2becd243 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Entailment/KTc.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Entailment/KTc.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Entailment.K +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.K /-! # KTc -/ +@[expose] public section + namespace LO namespace Entailment diff --git a/LeanPool/Incompleteness/Foundation/Modal/Entailment/S5.lean b/LeanPool/Incompleteness/Foundation/Modal/Entailment/S5.lean index b795e592ab..b837d8aa8f 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Entailment/S5.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Entailment/S5.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Entailment.KT -import LeanPool.Incompleteness.Foundation.Modal.Entailment.K5 +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.K /-! # S5 -/ +@[expose] public section + namespace LO namespace Entailment diff --git a/LeanPool/Incompleteness/Foundation/Modal/Entailment/Triv.lean b/LeanPool/Incompleteness/Foundation/Modal/Entailment/Triv.lean index 033896ea10..aca4736533 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Entailment/Triv.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Entailment/Triv.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Entailment.KT -import LeanPool.Incompleteness.Foundation.Modal.Entailment.KTc +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.Basic /-! # Triv -/ +@[expose] public section + namespace LO namespace Entailment diff --git a/LeanPool/Incompleteness/Foundation/Modal/Formula.lean b/LeanPool/Incompleteness/Foundation/Modal/Formula.lean index 7fcbd49be6..cc1d4990c1 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Formula.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Formula.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Lukasiewicz -import LeanPool.Incompleteness.Foundation.Vorspiel.Collection -import LeanPool.Incompleteness.Foundation.Modal.LogicSymbol +public import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Lukasiewicz +public import LeanPool.Incompleteness.Foundation.Modal.LogicSymbol /-! # Formula -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Geachean.lean b/LeanPool/Incompleteness/Foundation/Modal/Geachean.lean index 0bef43e2b8..9221f04ac3 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Geachean.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Geachean.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Vorspiel.RelItr -import LeanPool.Incompleteness.Foundation.Vorspiel.BinaryRelations +public import LeanPool.Incompleteness.Foundation.Vorspiel.RelItr +public import LeanPool.Incompleteness.Foundation.Vorspiel.BinaryRelations +public import Mathlib.Tactic.Attr.Core +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.SetLike /-! # Geachean -/ +@[expose] public section + /-- Imported declaration from the Incompleteness formalization. -/ structure Geachean.Taple where diff --git a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Basic.lean b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Basic.lean index 5176cb2028..d64cedfd79 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Basic.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Basic.lean @@ -3,14 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Formula -import LeanPool.Incompleteness.Foundation.Modal.Substitution -import LeanPool.Incompleteness.Foundation.Modal.Entailment.K -import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Lukasiewicz +public import LeanPool.Incompleteness.Foundation.Modal.Substitution +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.Basic +import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental /-! # Basic -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Geach.lean b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Geach.lean index 545e9eabd8..dd656b1445 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Geach.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Geach.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown /-! # Geach -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/K.lean b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/K.lean index 2cbbf097e8..5f9680663a 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/K.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/K.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.Basic +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.Basic /-! # K -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Maximal/Basic.lean b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Maximal/Basic.lean index b5a6409e89..069e3a5b62 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Maximal/Basic.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Maximal/Basic.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.IntProp.Hilbert.WellKnown -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown -import LeanPool.Incompleteness.Foundation.Modal.IntProp +public import LeanPool.Incompleteness.Foundation.IntProp.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.IntProp /-! # Basic -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Maximal/Unprovability.lean b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Maximal/Unprovability.lean index 9e8296d24e..2a8f6111dc 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Maximal/Unprovability.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/Maximal/Unprovability.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.Maximal.Basic +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.Maximal.Basic import LeanPool.Incompleteness.Foundation.IntProp.Kripke.Hilbert.Cl.Classical /-! # Unprovability -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/S5Grz.lean b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/S5Grz.lean index 2b24c8ea04..1392834a7a 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/S5Grz.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/S5Grz.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown -import LeanPool.Incompleteness.Foundation.Modal.Entailment.S5 +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.S5 import LeanPool.Incompleteness.Foundation.Modal.Entailment.KTc import LeanPool.Incompleteness.Foundation.Modal.Entailment.Triv /-! # S5Grz -/ +@[expose] public section + namespace LO namespace Entailment diff --git a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/WellKnown.lean b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/WellKnown.lean index 01c76087d2..ddc19bb746 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Hilbert/WellKnown.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Hilbert/WellKnown.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.K +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.K import LeanPool.Incompleteness.Foundation.Modal.Entailment.Grz /-! # WellKnown -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/IntProp.lean b/LeanPool/Incompleteness/Foundation/Modal/IntProp.lean index aef4fe47f0..12bfeddaaa 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/IntProp.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/IntProp.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.IntProp.Formula -import LeanPool.Incompleteness.Foundation.Modal.Formula +public import LeanPool.Incompleteness.Foundation.IntProp.Formula +public import LeanPool.Incompleteness.Foundation.Modal.Formula /-! # IntProp -/ +@[expose] public section + namespace LO namespace IntProp diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomDot3.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomDot3.lean index 92fe61181d..c2956f9151 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomDot3.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomDot3.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic /-! # AxiomDot3 -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomGrz.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomGrz.lean index 7ed36d75cb..7bada31cbb 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomGrz.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomGrz.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Vorspiel.BinaryRelations -import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.K +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame +import LeanPool.Incompleteness.Foundation.Modal.Entailment.K import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.K +import Mathlib.Tactic.TautoSet /-! # AxiomGrz -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomL.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomL.lean index 0c331f45ff..42f55c804a 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomL.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomL.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Vorspiel.BinaryRelations -import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame /-! # AxiomL -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomVer.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomVer.lean index 40ff82d635..e8897b9476 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomVer.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/AxiomVer.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Vorspiel.BinaryRelations -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Completeness +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic /-! # AxiomVer -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Basic.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Basic.lean index 2bdea6aae6..af26612279 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Basic.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Basic.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Vorspiel.RelItr -import LeanPool.Incompleteness.Foundation.Modal.Axioms -import LeanPool.Incompleteness.Foundation.Modal.Substitution +public import LeanPool.Incompleteness.Foundation.Modal.Axioms +public import LeanPool.Incompleteness.Foundation.Modal.Substitution /-! # Basic -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Closure.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Closure.lean index 7a64c63532..a7c7240c32 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Closure.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Closure.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Vorspiel.BinaryRelations -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic /-! # Closure -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Completeness.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Completeness.lean index a75b48d0bb..ef421ea063 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Completeness.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Completeness.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.MaximalConsistentSet -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic +public import LeanPool.Incompleteness.Foundation.Modal.MaximalConsistentSet +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic +import LeanPool.Incompleteness.Foundation.Modal.Entailment.K +import Mathlib.Tactic.TautoSet /-! # Completeness -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Filteration.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Filteration.lean index c387231fc5..dae7487448 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Filteration.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Filteration.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Closure +public import LeanPool.Incompleteness.Foundation.Modal.Subformulas import Mathlib.Data.Set.Finite.Powerset -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Closure -import LeanPool.Incompleteness.Foundation.Modal.Subformulas +import Mathlib.Order.ConditionallyCompleteLattice.Basic /-! # Filteration -/ +@[expose] public section + universe u v diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/FiniteFrame.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/FiniteFrame.lean index 280d155baf..95bc879114 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/FiniteFrame.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/FiniteFrame.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic /-! # FiniteFrame -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Completeness.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Completeness.lean index 98e8d59346..0116af096b 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Completeness.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Completeness.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.ComplementClosedConsistentFinset +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomL import LeanPool.Incompleteness.Foundation.Modal.Entailment.GL -import LeanPool.Incompleteness.Foundation.Modal.ComplementClosedConsistentFinset -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.GL.Soundness +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.GL.Soundness /-! # Completeness -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/MDP.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/MDP.lean index 647f49cd5f..55f44a93e6 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/MDP.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/MDP.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import Mathlib.Basic.Finite.Sum + +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Tree +import LeanPool.Incompleteness.Foundation.Modal.Entailment.GL +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.GL.Tree import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.GL.Unnecessitation /-! # MDP -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Soundness.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Soundness.lean index dc09ed8ade..70e538761d 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Soundness.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Soundness.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomL +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomL +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Soundness -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown /-! # Soundness -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Tree.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Tree.lean index 3bb497c0d4..626523d7fe 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Tree.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Tree.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Tree +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomL import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.GL.Completeness -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Tree +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.GL.Soundness /-! # Tree -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Unnecessitation.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Unnecessitation.lean index 526e9c9be8..872ce3e68a 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Unnecessitation.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/GL/Unnecessitation.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +import LeanPool.Incompleteness.Foundation.Modal.Entailment.K import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.GL.Tree import LeanPool.Incompleteness.Foundation.Modal.Kripke.SimpleExtension /-! # Unnecessitation -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Geach.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Geach.lean index 21e313379c..0c4e06dadb 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Geach.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Geach.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.Geach -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Completeness +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.Geach +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Completeness +import LeanPool.Incompleteness.Foundation.Modal.Entailment.K import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Soundness /-! # Geach -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Grz/Completeness.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Grz/Completeness.lean index 651c65d71c..8e883f6d51 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Grz/Completeness.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Grz/Completeness.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Grz.Soundness +public import LeanPool.Incompleteness.Foundation.Modal.ComplementClosedConsistentFinset +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomGrz +import LeanPool.Incompleteness.Foundation.Modal.Entailment.Grz +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Grz.Soundness +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KT /-! # Completeness -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Grz/Soundness.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Grz/Soundness.lean index 8e22e1561b..20c894783c 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Grz/Soundness.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Grz/Soundness.lean @@ -3,16 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.ComplementClosedConsistentFinset -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown -import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomGrz -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KT +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomGrz import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Soundness -import LeanPool.Incompleteness.Foundation.Modal.Entailment.Grz /-! # Soundness -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K.lean index 9b548dd13c..0c3a06b07c 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.K -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Soundness -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Completeness +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.K +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Completeness +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame import LeanPool.Incompleteness.Foundation.Modal.Kripke.Filteration -import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Soundness /-! # K -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K4.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K4.lean index 6c83fdf98d..bcb563670e 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K4.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K4.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown import LeanPool.Incompleteness.Foundation.Modal.Kripke.Filteration -import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # K4 -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K45.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K45.lean index d693bb72b1..615da1a486 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K45.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K45.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # K45 -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K5.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K5.lean index aebf6e4f1e..0b71b3432a 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K5.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/K5.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # K5 -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KB.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KB.lean index 764050ec3d..eaaf742d26 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KB.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KB.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # KB -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KB4.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KB4.lean index cd012acb3c..078168043a 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KB4.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KB4.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # KB4 -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KB5.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KB5.lean index 2c7dc211e3..da60fdb205 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KB5.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KB5.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # KB5 -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD.lean index cc655c8269..11be5bc70e 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # KD -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD4.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD4.lean index 6944cd9ab3..43d2cfe87e 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD4.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD4.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # KD4 -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD45.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD45.lean index e98286cc84..3041d02c3a 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD45.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD45.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # KD45 -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD5.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD5.lean index 80526507af..00759880c9 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD5.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KD5.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # KD5 -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KDB.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KDB.lean index 80440571ad..b6dff65373 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KDB.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KDB.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # KDB -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KT.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KT.lean index dbd3468593..05cf223a56 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KT.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KT.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # KT -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KT4B.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KT4B.lean index e07729c415..7a23d47842 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KT4B.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KT4B.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown import LeanPool.Incompleteness.Foundation.Modal.Kripke.Filteration -import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # KT4B -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KTB.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KTB.lean index d1226091e1..1a130449b3 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KTB.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/KTB.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown import LeanPool.Incompleteness.Foundation.Modal.Kripke.Filteration -import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # KTB -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S4.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S4.lean index acd7c8139d..db913be264 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S4.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S4.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown import LeanPool.Incompleteness.Foundation.Modal.Kripke.Filteration -import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # S4 -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S4Dot2.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S4Dot2.lean index a4af6e0237..a2d04314be 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S4Dot2.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S4Dot2.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # S4Dot2 -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S4Dot3.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S4Dot3.lean index 2bd6032773..599599b035 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S4Dot3.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S4Dot3.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.S4 +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Completeness import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomDot3 +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.S4 +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Soundness /-! # S4Dot3 -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S5.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S5.lean index c8a842b357..cde80c50c4 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S5.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/S5.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KT4B import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach import LeanPool.Incompleteness.Foundation.Modal.Kripke.Preservation -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KT4B /-! # S5 -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Soundness.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Soundness.lean index 1904f5aeb0..d1a6599af0 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Soundness.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Soundness.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.Basic -import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.Basic +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame /-! # Soundness -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Triv.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Triv.lean index d22d7e5106..eb5164846e 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Triv.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Triv.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Geach /-! # Triv -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Ver.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Ver.lean index 1c61e1cebc..784482d595 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Ver.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Hilbert/Ver.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomVer +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomVer +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Completeness import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Soundness -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown /-! # Ver -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/KHIncompleteness.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/KHIncompleteness.lean index 090f2a2523..0a48229c66 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/KHIncompleteness.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/KHIncompleteness.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Basic import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomL -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.WellKnown +import Mathlib.Data.Finset.Max import Mathlib.Order.Interval.Finset.Nat +import Mathlib.Tactic.TautoSet /-! # KHIncompleteness -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Preservation.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Preservation.lean index ccdaf7cee7..33fc71e994 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Preservation.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Preservation.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Closure +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Closure /-! # Preservation -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/SimpleExtension.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/SimpleExtension.lean index 8f276e213d..ba6b0f3049 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/SimpleExtension.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/SimpleExtension.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module + +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Tree +public import Mathlib.Basic.Finite.Sum -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Tree -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Preservation -import Mathlib.Basic.Finite.Sum /-! # SimpleExtension -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Tree.lean b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Tree.lean index 099acf65d5..afa035cfe7 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Kripke/Tree.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Kripke/Tree.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Preservation +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame import LeanPool.Incompleteness.Foundation.Vorspiel.Chain -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Preservation -import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame /-! # Tree -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Logic/Basic.lean b/LeanPool/Incompleteness/Foundation/Modal/Logic/Basic.lean index b5ca93bae4..71d1d1cb02 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Logic/Basic.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Logic/Basic.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.K +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.K +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.FiniteFrame +public import Mathlib.Order.ConditionallyCompleteLattice.Basic +import LeanPool.Incompleteness.Foundation.Logic.HilbertStyle.Supplemental import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.K +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Soundness /-! # Basic -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/Modal/Logic/WellKnown.lean b/LeanPool/Incompleteness/Foundation/Modal/Logic/WellKnown.lean index 911d3e271a..c484f574a1 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Logic/WellKnown.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Logic/WellKnown.lean @@ -3,36 +3,42 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ - -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.Maximal.Unprovability -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.GL.MDP +module + +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.K4 +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.K45 +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.K5 +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KB +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KB4 +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KB5 +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KD +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KD4 +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KD45 +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KD5 +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KDB +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KT +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KTB +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.S4 +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.S4Dot2 +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.S4Dot3 +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.S5 +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Triv +public import LeanPool.Incompleteness.Foundation.Modal.Hilbert.S5Grz +public import LeanPool.Incompleteness.Foundation.Modal.Logic.Basic +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomGrz +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomL +public import LeanPool.Incompleteness.Foundation.Modal.Kripke.AxiomVer +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.GL.Completeness +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.GL.Soundness +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.GL.Unnecessitation import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Grz.Completeness -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.K4 -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.K45 -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.K5 -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KB -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KB4 -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KB5 -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KD -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KD4 -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KD45 -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KD5 -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KDB -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KT -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.KTB -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.S4 -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.S4Dot2 -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.S4Dot3 -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.S5 -import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Triv +import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Grz.Soundness import LeanPool.Incompleteness.Foundation.Modal.Kripke.Hilbert.Ver -import LeanPool.Incompleteness.Foundation.Modal.Hilbert.S5Grz -import LeanPool.Incompleteness.Foundation.Modal.Logic.Basic -import LeanPool.Incompleteness.Foundation.Modal.Entailment.KT -import LeanPool.Incompleteness.Foundation.Modal.Kripke.KHIncompleteness /-! # WellKnown -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/LogicSymbol.lean b/LeanPool/Incompleteness/Foundation/Modal/LogicSymbol.lean index b27b19943a..40b29311b6 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/LogicSymbol.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/LogicSymbol.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Logic.LogicSymbol +public import LeanPool.Incompleteness.Foundation.Logic.LogicSymbol +public import Mathlib.Data.Finset.Preimage +import Mathlib.Order.ConditionallyCompleteLattice.Basic +import Mathlib.Tactic.Bound.Init /-! # LogicSymbol -/ +@[expose] public section + open Function diff --git a/LeanPool/Incompleteness/Foundation/Modal/MaximalConsistentSet.lean b/LeanPool/Incompleteness/Foundation/Modal/MaximalConsistentSet.lean index f4ac5463e9..4120119fb2 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/MaximalConsistentSet.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/MaximalConsistentSet.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Formula +public import LeanPool.Incompleteness.Foundation.Modal.Formula +public import LeanPool.Incompleteness.Foundation.Modal.Entailment.Basic +public import Mathlib.Order.ConditionallyCompleteLattice.Basic import LeanPool.Incompleteness.Foundation.Modal.Entailment.K +import Mathlib.Order.Zorn +import Mathlib.Tactic.TautoSet /-! # MaximalConsistentSet -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Modal/Subformulas.lean b/LeanPool/Incompleteness/Foundation/Modal/Subformulas.lean index 7ee98b710c..de26304443 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Subformulas.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Subformulas.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Formula +public import LeanPool.Incompleteness.Foundation.Modal.Formula /-! # Subformulas -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/Modal/Substitution.lean b/LeanPool/Incompleteness/Foundation/Modal/Substitution.lean index a224a4ee4f..2774bcfed9 100644 --- a/LeanPool/Incompleteness/Foundation/Modal/Substitution.lean +++ b/LeanPool/Incompleteness/Foundation/Modal/Substitution.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Modal.Formula +public import LeanPool.Incompleteness.Foundation.Modal.Formula /-! # Substitution -/ +@[expose] public section + namespace LO namespace Modal diff --git a/LeanPool/Incompleteness/Foundation/Vorspiel/Arith.lean b/LeanPool/Incompleteness/Foundation/Vorspiel/Arith.lean index 6af01ad031..3dbee096c1 100644 --- a/LeanPool/Incompleteness/Foundation/Vorspiel/Arith.lean +++ b/LeanPool/Incompleteness/Foundation/Vorspiel/Arith.lean @@ -3,16 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module +public import Mathlib.Computability.PartrecBasis +public import Mathlib.Logic.Godel.GodelBetaFunction import LeanPool.Incompleteness.Foundation.Vorspiel.Vorspiel -import Mathlib.Computability.Halting -import Mathlib.Computability.PartrecBasis -import Mathlib.Data.Nat.ModEq -import Mathlib.Data.List.FinRange -import Mathlib.Logic.Godel.GodelBetaFunction /-! # Arith -/ +@[expose] public section + open Mathlib List.Vector Part diff --git a/LeanPool/Incompleteness/Foundation/Vorspiel/BinaryRelations.lean b/LeanPool/Incompleteness/Foundation/Vorspiel/BinaryRelations.lean index a1479be456..183297891f 100644 --- a/LeanPool/Incompleteness/Foundation/Vorspiel/BinaryRelations.lean +++ b/LeanPool/Incompleteness/Foundation/Vorspiel/BinaryRelations.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Vorspiel.Vorspiel +public import Aesop.BuiltinRules +public import Mathlib.Basic.Finite.Defs +public import Mathlib.Order.Lattice import Mathlib.Data.Fintype.Pigeonhole +import Mathlib.Order.WellFounded +import Mathlib.Tactic.Bound.Init /-! # BinaryRelations -/ +@[expose] public section + section «lp_section_1» diff --git a/LeanPool/Incompleteness/Foundation/Vorspiel/Chain.lean b/LeanPool/Incompleteness/Foundation/Vorspiel/Chain.lean index 98d0021b42..d0b0735825 100644 --- a/LeanPool/Incompleteness/Foundation/Vorspiel/Chain.lean +++ b/LeanPool/Incompleteness/Foundation/Vorspiel/Chain.lean @@ -3,14 +3,20 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ - -import Mathlib.Data.Fintype.Card +module + +public import Aesop.BuiltinRules +public import Batteries.Data.List.Basic +public import Mathlib.Basic.Finite.Defs +public import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToDual +import Mathlib.Data.Fintype.EquivFin import Mathlib.Data.Fintype.List -import Mathlib.Data.List.Chain -import Mathlib.Data.Set.Finite.Basic /-! # Chain -/ +@[expose] public section + namespace List diff --git a/LeanPool/Incompleteness/Foundation/Vorspiel/Collection.lean b/LeanPool/Incompleteness/Foundation/Vorspiel/Collection.lean index eee10b68fe..2f3ea0a077 100644 --- a/LeanPool/Incompleteness/Foundation/Vorspiel/Collection.lean +++ b/LeanPool/Incompleteness/Foundation/Vorspiel/Collection.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module - -import LeanPool.Incompleteness.Foundation.Vorspiel.Vorspiel +public import Mathlib.Basic.Finite.Defs +public import Mathlib.Data.Finset.Insert +public import Mathlib.Tactic.ToAdditive +import Mathlib.Data.Set.Finite.Basic +import Mathlib.Tactic.Bound.Init /-! # Collection -/ +@[expose] public section + /-- Imported declaration from the Incompleteness formalization. -/ class Cons (β : outParam Type*) (α : Type*) where diff --git a/LeanPool/Incompleteness/Foundation/Vorspiel/ExistsUnique.lean b/LeanPool/Incompleteness/Foundation/Vorspiel/ExistsUnique.lean index 7d7a8f9388..4df7bbd006 100644 --- a/LeanPool/Incompleteness/Foundation/Vorspiel/ExistsUnique.lean +++ b/LeanPool/Incompleteness/Foundation/Vorspiel/ExistsUnique.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Vorspiel.Vorspiel +public import Aesop.BuiltinRules +public import Mathlib.Basic.ExistsUnique +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # ExistsUnique -/ +@[expose] public section + namespace Classical variable {α : Sort*} {φ : α → Prop} (h : ∃! x, φ x) diff --git a/LeanPool/Incompleteness/Foundation/Vorspiel/NotationClass.lean b/LeanPool/Incompleteness/Foundation/Vorspiel/NotationClass.lean index 8ef0459c7f..a8b18c36be 100644 --- a/LeanPool/Incompleteness/Foundation/Vorspiel/NotationClass.lean +++ b/LeanPool/Incompleteness/Foundation/Vorspiel/NotationClass.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Vorspiel.Vorspiel +public import Mathlib.Tactic.Attr.Core +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.ToDual +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # NotationClass -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/Foundation/Vorspiel/Order.lean b/LeanPool/Incompleteness/Foundation/Vorspiel/Order.lean index 9c674d986a..119548eef5 100644 --- a/LeanPool/Incompleteness/Foundation/Vorspiel/Order.lean +++ b/LeanPool/Incompleteness/Foundation/Vorspiel/Order.lean @@ -3,11 +3,21 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Vorspiel.Vorspiel +public import Aesop.BuiltinRules +public import Mathlib.Order.Heyting.Basic +public import Mathlib.Tactic.ToAdditive +import Mathlib.Algebra.GroupWithZero.Nat +import Mathlib.Algebra.Order.Group.Nat +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.SetLike /-! # Order -/ +@[expose] public section + section «lp_section_1» diff --git a/LeanPool/Incompleteness/Foundation/Vorspiel/RelItr.lean b/LeanPool/Incompleteness/Foundation/Vorspiel/RelItr.lean index a97ab5879b..ed915bfac6 100644 --- a/LeanPool/Incompleteness/Foundation/Vorspiel/RelItr.lean +++ b/LeanPool/Incompleteness/Foundation/Vorspiel/RelItr.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.Vorspiel.Vorspiel +public import Mathlib.Basic.Rel +public import Mathlib.Tactic.ToAdditive +import Mathlib.Algebra.Group.Nat.Defs +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.SetLike /-! # RelItr -/ +@[expose] public section + /-- Imported declaration from the Incompleteness formalization. -/ def Rel.iterate (R : Rel α α) : ℕ → α → α → Prop diff --git a/LeanPool/Incompleteness/Foundation/Vorspiel/Vorspiel.lean b/LeanPool/Incompleteness/Foundation/Vorspiel/Vorspiel.lean index 60434d5bf9..b5d9f80341 100644 --- a/LeanPool/Incompleteness/Foundation/Vorspiel/Vorspiel.lean +++ b/LeanPool/Incompleteness/Foundation/Vorspiel/Vorspiel.lean @@ -3,25 +3,29 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ - -import Mathlib.Data.Vector.Basic -import Mathlib.Data.Fin.Basic -import Mathlib.Data.Fin.VecNotation -import Mathlib.Data.Fintype.Basic -import Mathlib.Data.Finset.Basic -import Mathlib.Data.Finset.Preimage -import Mathlib.Data.Finset.Sort -import Mathlib.Order.Filter.Ultrafilter.Defs -import Mathlib.Logic.Encodable.Basic -import Mathlib.Computability.Primrec.List -import Mathlib.Computability.Partrec +module + +public import Mathlib.Algebra.CharZero.Defs + +public import Mathlib.Data.Vector.Basic +public import Mathlib.Data.Fin.VecNotation +public import Mathlib.Data.Set.Finite.Range +public import Mathlib.Data.Finset.Lattice.Fold +public import Mathlib.Data.Finset.Union +public import Mathlib.Data.PFun +public import Mathlib.Data.Set.Finite.Basic +public import Mathlib.Logic.Equiv.List +public import Mathlib.Order.Preorder.Chain +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.ToDual +import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Data.List.GetD -import Mathlib.Data.Set.Finite.Range -import Mathlib.Tactic.Cases -import Mathlib.Tactic.TautoSet +import Mathlib.Order.ConditionallyCompleteLattice.Basic /-! # Vorspiel -/ +@[expose] public section + namespace Nat variable {α : ℕ → Sort u} @@ -99,12 +103,12 @@ open Lean PrettyPrinter Delaborator SubExpr /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Matrix.vecEmpty] -def unexpandVecEmpty : Unexpander +meta def unexpandVecEmpty : Unexpander | `($(_)) => `(![]) /-- Imported declaration from the Incompleteness formalization. -/ @[app_unexpander Matrix.vecCons] -def unexpandVecCons : Unexpander +meta def unexpandVecCons : Unexpander | `($(_) $a ![]) => `(![$a]) | `($(_) $a ![$as,*]) => `(![$a, $as,*]) | _ => throw () diff --git a/LeanPool/Incompleteness/ProvabilityLogic/Basic.lean b/LeanPool/Incompleteness/ProvabilityLogic/Basic.lean index 7607807f7e..d4cdc86640 100644 --- a/LeanPool/Incompleteness/ProvabilityLogic/Basic.lean +++ b/LeanPool/Incompleteness/ProvabilityLogic/Basic.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Arith.DC -import LeanPool.Incompleteness.DC.Basic -import LeanPool.Incompleteness.Foundation.Modal.Logic.WellKnown +public import LeanPool.Incompleteness.Arith.DC +public import LeanPool.Incompleteness.Foundation.Modal.Logic.WellKnown +import LeanPool.Incompleteness.Arithmetization.Definability.Init /-! # Basic -/ +@[expose] public section + namespace LO diff --git a/LeanPool/Incompleteness/ToFoundation/Basic.lean b/LeanPool/Incompleteness/ToFoundation/Basic.lean index 6e3df2f537..32eaf02a08 100644 --- a/LeanPool/Incompleteness/ToFoundation/Basic.lean +++ b/LeanPool/Incompleteness/ToFoundation/Basic.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Palalansoukî. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Palalansoukî -/ +module -import LeanPool.Incompleteness.Foundation.FirstOrder.Arith.Hierarchy +public import LeanPool.Incompleteness.Foundation.Vorspiel.Vorspiel +import Mathlib.Algebra.Order.Ring.Nat /-! # Basic -/ +@[expose] public section + namespace Fin @@ -29,20 +33,3 @@ variable {α : Type*} appendr u v (i.addNat m) = v i := by simp [appendr, vecAppend_eq_ite] end Matrix - -namespace LO -namespace FirstOrder - -variable {L : Language} - -namespace Semiformula - -open Rew - -variable (ω : Rew L ξ₁ n₁ ξ₂ n₂) - - -end Semiformula - -end FirstOrder -end LO diff --git a/LeanPool/InfinitaryLogic.lean b/LeanPool/InfinitaryLogic.lean index 8a5fb6e454..828ff62b9a 100644 --- a/LeanPool/InfinitaryLogic.lean +++ b/LeanPool/InfinitaryLogic.lean @@ -3,28 +3,30 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module -import LeanPool.InfinitaryLogic.Admissible.HF -import LeanPool.InfinitaryLogic.Admissible.Family -import LeanPool.InfinitaryLogic.Admissible.Fragment.Honest -import LeanPool.InfinitaryLogic.Conditional.GandyHarrington -import LeanPool.InfinitaryLogic.Conditional.MorleyHanfSchemaDischarge -import LeanPool.InfinitaryLogic.Descriptive.IsomorphismBorel -import LeanPool.InfinitaryLogic.Descriptive.LopezEscobar -import LeanPool.InfinitaryLogic.Descriptive.WellOrderNonBorel -import LeanPool.InfinitaryLogic.Karp.CarrierTheorem -import LeanPool.InfinitaryLogic.Methods.Henkin.ModelExistence -import LeanPool.InfinitaryLogic.Methods.Interpolation.CraigArbitrary -import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonArbitrary -import LeanPool.InfinitaryLogic.Methods.Interpolation.MalitzSublanguage -import LeanPool.InfinitaryLogic.Methods.UniformCollapse -import LeanPool.InfinitaryLogic.Methods.WellOrdering.GraphTranslation -import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.BethLadder -import LeanPool.InfinitaryLogic.ModelTheory.MorleyCounting -import LeanPool.InfinitaryLogic.ModelTheory.ScottCompletion -import LeanPool.InfinitaryLogic.Scott.Rank -import LeanPool.InfinitaryLogic.Scott.RefinementCount -import LeanPool.InfinitaryLogic.Scott.Sentence +public import LeanPool.InfinitaryLogic.Admissible.HF +public import LeanPool.InfinitaryLogic.Admissible.Family +public import LeanPool.InfinitaryLogic.Admissible.Fragment.Honest +public import LeanPool.InfinitaryLogic.Conditional.GandyHarrington +public import LeanPool.InfinitaryLogic.Conditional.MorleyHanfSchemaDischarge +public import LeanPool.InfinitaryLogic.Descriptive.IsomorphismBorel +public import LeanPool.InfinitaryLogic.Descriptive.LopezEscobar +public import LeanPool.InfinitaryLogic.Descriptive.WellOrderNonBorel +public import LeanPool.InfinitaryLogic.Karp.CarrierTheorem +public import LeanPool.InfinitaryLogic.Methods.Henkin.ModelExistence +public import LeanPool.InfinitaryLogic.Methods.Interpolation.CraigArbitrary +public import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonArbitrary +public import LeanPool.InfinitaryLogic.Methods.Interpolation.MalitzSublanguage +public import LeanPool.InfinitaryLogic.Methods.UniformCollapse +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.GraphTranslation +public import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.BethLadder +public import LeanPool.InfinitaryLogic.ModelTheory.MorleyCounting +public import LeanPool.InfinitaryLogic.ModelTheory.ScottCompletion +public import LeanPool.InfinitaryLogic.Scott.Rank +public import LeanPool.InfinitaryLogic.Scott.RefinementCount +public import LeanPool.InfinitaryLogic.Scott.Sentence +import Mathlib.Data.Sym.Sym2.Init /-! # Infinitary logic and countable model theory @@ -36,3 +38,5 @@ Main declarations: `FirstOrder.Language.scottSentence_characterizes` Tags: mathematical-logic, infinitary-logic, model-theory, descriptive-set-theory MSC: 03C75, 03E15, 03C30 -/ + +@[expose] public section diff --git a/LeanPool/InfinitaryLogic/Admissible/Family.lean b/LeanPool/InfinitaryLogic/Admissible/Family.lean index 7195adfcd2..07f2f55bb7 100644 --- a/LeanPool/InfinitaryLogic/Admissible/Family.lean +++ b/LeanPool/InfinitaryLogic/Admissible/Family.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Syntax -import LeanPool.InfinitaryLogic.Lomega1omega.Semantics +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Syntax /-! # The family layer (issues #18, #19A) @@ -34,6 +35,8 @@ on. - `CodedFamily`, `codedIInf`, `codedISup`. -/ +@[expose] public section + namespace FirstOrder.Language universe u v uCode uIndex diff --git a/LeanPool/InfinitaryLogic/Admissible/Fragment/Honest.lean b/LeanPool/InfinitaryLogic/Admissible/Fragment/Honest.lean index 44f9cd6bb4..f4e74a5bfd 100644 --- a/LeanPool/InfinitaryLogic/Admissible/Fragment/Honest.lean +++ b/LeanPool/InfinitaryLogic/Admissible/Fragment/Honest.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Admissible.Family -import LeanPool.InfinitaryLogic.Lomega1omega.Fragment +module + +public import LeanPool.InfinitaryLogic.Admissible.Family +public import LeanPool.InfinitaryLogic.Lomega1omega.Fragment /-! # The honest admissible fragment (issue #18) @@ -23,6 +25,8 @@ This does **not** wrap the legacy `AdmissibleFragmentCore`, which an honest HF f cannot instantiate: its `closed_iInf`/`closed_iSup` are *upward* over arbitrary external ℕ-families. -/ +@[expose] public section + namespace FirstOrder.Language universe u v uCode uIndex diff --git a/LeanPool/InfinitaryLogic/Admissible/HF.lean b/LeanPool/InfinitaryLogic/Admissible/HF.lean index 0b1a115657..d8d02a0563 100644 --- a/LeanPool/InfinitaryLogic/Admissible/HF.lean +++ b/LeanPool/InfinitaryLogic/Admissible/HF.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Admissible.Fragment.Honest -import LeanPool.InfinitaryLogic.Lomega1omega.Theory -import LeanPool.InfinitaryLogic.Lomega1omega.FirstOrderImage +module + +public import LeanPool.InfinitaryLogic.Admissible.Fragment.Honest +public import LeanPool.InfinitaryLogic.Lomega1omega.Theory +public import LeanPool.InfinitaryLogic.Lomega1omega.FirstOrderImage import Mathlib.ModelTheory.Satisfiability -import Mathlib.Data.Set.Finite.Basic -import Mathlib.Data.Fintype.EquivFin /-! # The HF fragment (issue #18) @@ -37,6 +37,8 @@ returns Mathlib's canonical model in `Type (max u v)`. The compatibility theore placeholder; nothing here uses it, and nothing here may be proved from it. -/ +@[expose] public section + namespace FirstOrder.Language universe u v w uCode uIndex @@ -44,7 +46,7 @@ universe u v w uCode uIndex variable {L : Language.{0, 0}} /-- The all-arity first-order image: every formula containing no infinitary node. -/ -private def hfSet (L : Language.{u, v}) : Set (Σ n, L.BoundedFormulaω Empty n) := +def hfSet (L : Language.{u, v}) : Set (Σ n, L.BoundedFormulaω Empty n) := {p | p.2.IsFirstOrder} /-- **The HF fragment.** Each field is now one appeal to the first-order-image API: three diff --git a/LeanPool/InfinitaryLogic/Combinatorics/EndHomogeneousErdosRado.lean b/LeanPool/InfinitaryLogic/Combinatorics/EndHomogeneousErdosRado.lean index 3f95bf4cff..dfd3db6eb7 100644 --- a/LeanPool/InfinitaryLogic/Combinatorics/EndHomogeneousErdosRado.lean +++ b/LeanPool/InfinitaryLogic/Combinatorics/EndHomogeneousErdosRado.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Combinatorics.PairErdosRadoGeneral +module + +public import LeanPool.InfinitaryLogic.Combinatorics.PairErdosRadoGeneral +import Mathlib.SetTheory.Cardinal.Arithmetic /-! # End-homogeneous Erdős–Rado: the arity-general EHMR engine (ER hard chunk 2a) @@ -55,6 +58,8 @@ feeding `c'` to the arity-`(n+1)` inductive hypothesis homogenizes `G` outright. (abstract well-ordered source); **regression**: `pairER_from_endHomogeneous`. -/ +@[expose] public section + universe u namespace FirstOrder.Combinatorics.EndHomogER @@ -233,7 +238,7 @@ variable [Nonempty C] /-- The color of the tuple `r ⌢ y` when `r` is strictly monotone and bounded by `y` (junk otherwise). Factoring the tree's recorded colors through `colorAbove` makes every "the color depends only on the underlying points" step a `congrArg`. -/ -private noncomputable def colorAbove (G : (Fin (n + 2) ↪o Source lam) → C) (y : Source lam) +noncomputable def colorAbove (G : (Fin (n + 2) ↪o Source lam) → C) (y : Source lam) (r : Fin (n + 1) → Source lam) : C := by classical exact if h : StrictMono r ∧ ∀ k, r k < y then @@ -251,7 +256,7 @@ private theorem colorAbove_eq (G : (Fin (n + 2) ↪o Source lam) → C) {y : Sou /-- The successor set `S(h)` of a node with reps `rep`: points `y` strictly above every rep whose appended tuple colors all match the recorded ones. -/ -private def nodeFiber (G : (Fin (n + 2) ↪o Source lam) → C) {β : Ordinal.{0}} +def nodeFiber (G : (Fin (n + 2) ↪o Source lam) → C) {β : Ordinal.{0}} (rep : β.ToType → Source lam) (col : NodeAt C n β) : Set (Source lam) := { y | (∀ x : β.ToType, rep x < y) ∧ ∀ τ : Fin (n + 1) ↪o β.ToType, colorAbove G y (fun k => rep (τ k)) = col τ } @@ -280,7 +285,7 @@ decreasing_by rwa [Ordinal.type_toType] at hh /-- The reps along a node: the chosen rep of the restriction to each position. -/ -private noncomputable def nodeRep (G : (Fin (n + 2) ↪o Source lam) → C) {β : Ordinal.{0}} +noncomputable def nodeRep (G : (Fin (n + 2) ↪o Source lam) → C) {β : Ordinal.{0}} (h : NodeAt C n β) : β.ToType → Source lam := by haveI : IsWellOrder β.ToType (· < ·) := isWellOrder_lt exact fun x => nodeChosen G (Ordinal.typein (· < ·) x) diff --git a/LeanPool/InfinitaryLogic/Combinatorics/FiniteArityErdosRadoInduction.lean b/LeanPool/InfinitaryLogic/Combinatorics/FiniteArityErdosRadoInduction.lean index 158f44d5e4..5fcc851e5c 100644 --- a/LeanPool/InfinitaryLogic/Combinatorics/FiniteArityErdosRadoInduction.lean +++ b/LeanPool/InfinitaryLogic/Combinatorics/FiniteArityErdosRadoInduction.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import Mathlib.SetTheory.Cardinal.Aleph import LeanPool.InfinitaryLogic.Combinatorics.EndHomogeneousErdosRado +import Mathlib.SetTheory.Cardinal.Arithmetic /-! # Finite-arity Erdős–Rado: the induction scaffold @@ -39,6 +43,8 @@ At `κ = ℶ₁` every level sits below `ℶ_{ω₁}` (`finiteERBound_le_beth_om `succ ∘ (2 ^ ·)` is absorbed by two beth steps (`finiteERBound_beth_one_le`). -/ +@[expose] public section + open FirstOrder.Combinatorics.PairERGen open FirstOrder.Combinatorics.EndHomogER diff --git a/LeanPool/InfinitaryLogic/Combinatorics/PairErdosRadoGeneral.lean b/LeanPool/InfinitaryLogic/Combinatorics/PairErdosRadoGeneral.lean index fb8996de26..e655daee68 100644 --- a/LeanPool/InfinitaryLogic/Combinatorics/PairErdosRadoGeneral.lean +++ b/LeanPool/InfinitaryLogic/Combinatorics/PairErdosRadoGeneral.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import Mathlib.SetTheory.Cardinal.Aleph +module + +public import Mathlib.Data.Fin.VecNotation +public import Mathlib.SetTheory.Ordinal.Basic import Mathlib.SetTheory.Cardinal.Pigeonhole -import Mathlib.SetTheory.Cardinal.Regular -import Mathlib.Order.InitialSeg -import Mathlib.Data.Fin.VecNotation /-! # Pair Erdős–Rado, parameterized by the color bound `κ` @@ -34,6 +34,8 @@ This file develops the canonical partition tree and extracts a live node of leng - **Consumer interface**: `exists_live_node_ge`. -/ +@[expose] public section + universe u namespace FirstOrder.Combinatorics.PairERGen @@ -263,7 +265,7 @@ theorem ehmr_partitionTree_card_lower /-- The successor set `S(h)`: points above all the reps respecting the recorded colors. (`β.ToType`-indexed `validFiber` shape, with a plain-function `rep`.) -/ -private def ehmrFiber (cR : (Fin 2 ↪o Source κ) → C) {β : Ordinal.{0}} +def ehmrFiber (cR : (Fin 2 ↪o Source κ) → C) {β : Ordinal.{0}} (rep : β.ToType → Source κ) (col : EHMRNodeAt C β) : Set (Source κ) := { y | ∀ x : β.ToType, ∃ h : rep x < y, cR (pairEmbed h) = col x } @@ -292,7 +294,7 @@ decreasing_by rwa [Ordinal.type_toType] at hh /-- The reps along a node: the chosen rep of the restriction to each position. -/ -private noncomputable def ehmrRep (cR : (Fin 2 ↪o Source κ) → C) {β : Ordinal.{0}} +noncomputable def ehmrRep (cR : (Fin 2 ↪o Source κ) → C) {β : Ordinal.{0}} (h : EHMRNodeAt C β) : β.ToType → Source κ := by haveI : IsWellOrder β.ToType (· < ·) := isWellOrder_lt exact fun x => ehmrChosen cR (Ordinal.typein (· < ·) x) diff --git a/LeanPool/InfinitaryLogic/Conditional/GandyHarrington.lean b/LeanPool/InfinitaryLogic/Conditional/GandyHarrington.lean index 26418b562f..d6a1a4d215 100644 --- a/LeanPool/InfinitaryLogic/Conditional/GandyHarrington.lean +++ b/LeanPool/InfinitaryLogic/Conditional/GandyHarrington.lean @@ -3,13 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Descriptive.CountingDichotomy import LeanPool.InfinitaryLogic.Conditional.SilverCategoryRoute -import LeanPool.InfinitaryLogic.Descriptive.CountingDichotomy import LeanPool.InfinitaryLogic.Descriptive.PerfectAntichain -import Mathlib.MeasureTheory.Constructions.Polish.Basic -import Mathlib.Topology.MetricSpace.CantorScheme -import Mathlib.Topology.MetricSpace.Perfect -import Mathlib.Topology.MetricSpace.Polish /-! # Silver's Theorem for Borel Equivalence Relations @@ -34,6 +32,8 @@ the hard core of Silver is exactly the non-smooth relations — the `G₀`-dicho the category route. -/ +@[expose] public section + universe u v open Set Cardinal Topology MeasureTheory diff --git a/LeanPool/InfinitaryLogic/Conditional/MorleyHanfSchemaDischarge.lean b/LeanPool/InfinitaryLogic/Conditional/MorleyHanfSchemaDischarge.lean index afcbb61664..031a2d557e 100644 --- a/LeanPool/InfinitaryLogic/Conditional/MorleyHanfSchemaDischarge.lean +++ b/LeanPool/InfinitaryLogic/Conditional/MorleyHanfSchemaDischarge.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Conditional.MorleyHanfTransfer +module + +public import LeanPool.InfinitaryLogic.Conditional.MorleyHanfTransfer +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage +import LeanPool.InfinitaryLogic.Methods.LocalEMTemplateRealization import LeanPool.InfinitaryLogic.Methods.SchemaLocalEMSource -import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage /-! # The Morley–Hanf theorem, discharged @@ -27,6 +30,8 @@ constants pass through; the degenerate `IsEmpty J` case is served by the source So: **`ℶ_{ω₁}` is a Hanf bound for every `L_{ω₁ω}` sentence, unconditionally.** -/ +@[expose] public section + namespace FirstOrder.Language open Cardinal diff --git a/LeanPool/InfinitaryLogic/Conditional/MorleyHanfTransfer.lean b/LeanPool/InfinitaryLogic/Conditional/MorleyHanfTransfer.lean index 9e03d76662..ec9bcb02ed 100644 --- a/LeanPool/InfinitaryLogic/Conditional/MorleyHanfTransfer.lean +++ b/LeanPool/InfinitaryLogic/Conditional/MorleyHanfTransfer.lean @@ -3,15 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.ModelTheory.Hanf -import LeanPool.InfinitaryLogic.Methods.EM.FragmentAdapter -import LeanPool.InfinitaryLogic.Methods.EM.TailAdapter -import Mathlib.Data.Fin.VecNotation -import Mathlib.Data.Nat.Nth -import Mathlib.Data.Set.Finite.Basic -import Mathlib.Order.Hom.Basic -import Mathlib.Order.WellFounded -import Mathlib.SetTheory.Cardinal.Aleph +module + +public import LeanPool.InfinitaryLogic.ModelTheory.Hanf +public import LeanPool.InfinitaryLogic.Methods.EM.FragmentAdapter +public import LeanPool.InfinitaryLogic.Methods.EM.TailAdapter +public import Mathlib.SetTheory.Cardinal.Aleph /-! # Morley-Hanf Transfer Hypothesis (Conditional) @@ -32,6 +29,8 @@ Both are placed in `Conditional/` to make the external dependency visible. - [KK04], §1.6 -/ +@[expose] public section + universe u v namespace FirstOrder @@ -264,7 +263,7 @@ instance : Infinite Carrier := Cardinal.infinite_iff.mpr (mk_Carrier ▸ Cardinal.aleph0_le_beth _) /-- A copy of `ℕ` inside the carrier, along which heights are unbounded. -/ -private noncomputable def emb : ℕ ↪ Carrier := Infinite.natEmbedding Carrier +noncomputable def emb : ℕ ↪ Carrier := Infinite.natEmbedding Carrier /-- The height of a carrier element: the inverse of `emb` on its range, arbitrary elsewhere. -/ noncomputable def hgt (x : Carrier) : ℕ := Function.invFun emb x @@ -275,7 +274,7 @@ def P (i : ℕ) : Lang.BoundedFormulaω Empty 1 := (fun _ => Term.var (Sum.inr (0 : Fin 1))) /-- The countable conjunction `⋀ᵢ Pᵢ x₀`. -/ -private def conj : Lang.BoundedFormulaω Empty 1 := BoundedFormulaω.iInf P +def conj : Lang.BoundedFormulaω Empty 1 := BoundedFormulaω.iInf P /-- The seed: `⋀ᵢ Pᵢ` first, then every `Pᵢ`. -/ def seed : ℕ → Σ n, Lang.BoundedFormulaω Empty n := fun k => diff --git a/LeanPool/InfinitaryLogic/Conditional/SilverCategoryRoute.lean b/LeanPool/InfinitaryLogic/Conditional/SilverCategoryRoute.lean index 02715c7f81..ab9cfee008 100644 --- a/LeanPool/InfinitaryLogic/Conditional/SilverCategoryRoute.lean +++ b/LeanPool/InfinitaryLogic/Conditional/SilverCategoryRoute.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.Mycielski -import LeanPool.InfinitaryLogic.Descriptive.KuratowskiUlam -import LeanPool.InfinitaryLogic.Descriptive.GSGraph +module + +public import LeanPool.InfinitaryLogic.Descriptive.GSGraph import LeanPool.InfinitaryLogic.Descriptive.G0Fusion +import LeanPool.InfinitaryLogic.Descriptive.KuratowskiUlam +import LeanPool.InfinitaryLogic.Descriptive.Mycielski +import Mathlib.Topology.Baire.LocallyCompactRegular /-! # Silver via the classical category route (Miller): interface layer @@ -59,6 +62,8 @@ for this route; it remains the assembly point for the closed case (`silver_core_ whole chain through `gandy_harrington_of_gSGraphHom` is unconditional. -/ +@[expose] public section + universe u open Set diff --git a/LeanPool/InfinitaryLogic/Descriptive/AnalyticTree.lean b/LeanPool/InfinitaryLogic/Descriptive/AnalyticTree.lean index 112e7a0c59..06815bdc1c 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/AnalyticTree.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/AnalyticTree.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.QueryCode +module + +public import LeanPool.InfinitaryLogic.Descriptive.QueryCode +public import Mathlib.MeasureTheory.Constructions.Polish.Basic /-! # The analytic tree normal form (issue #10, Unit 0b) @@ -23,6 +26,8 @@ index, so the chosen points converge to `(queryCode c, g)`, continuity gives analytic set is served by the branchless tree. -/ +@[expose] public section + namespace FirstOrder.Language open Set Filter diff --git a/LeanPool/InfinitaryLogic/Descriptive/BFEquivBorel.lean b/LeanPool/InfinitaryLogic/Descriptive/BFEquivBorel.lean index 5ec5a3043a..9f35f29b05 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/BFEquivBorel.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/BFEquivBorel.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Scott.BackAndForth +public import Mathlib.SetTheory.Cardinal.Aleph +public import LeanPool.InfinitaryLogic.Descriptive.Measurable import LeanPool.InfinitaryLogic.OrdinalUtil -import LeanPool.InfinitaryLogic.Descriptive.SatisfactionBorel -import LeanPool.InfinitaryLogic.Scott.BackAndForth -import Mathlib.SetTheory.Cardinal.Aleph +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # BFEquiv is Borel on the Pair Space @@ -31,6 +37,8 @@ Direct transfinite induction on `α` matching `BFEquiv`'s definition: - **Limit β**: `⋂_{γ < β} IH` — countable intersection (since `β < ω₁`). -/ +@[expose] public section + universe u v namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Descriptive/CodeTransport.lean b/LeanPool/InfinitaryLogic/Descriptive/CodeTransport.lean index b14de4a3dd..c35c3a1d00 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/CodeTransport.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/CodeTransport.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.StructureSpace +module + +public import LeanPool.InfinitaryLogic.Descriptive.StructureSpace +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics import LeanPool.InfinitaryLogic.Lomega1omega.Theory /-! # Transport of codes along equivalences (generic `StructureSpaceOn` API) @@ -18,6 +21,8 @@ finite-specific and are the transport layer the López–Escobar converse (issue so they live here at the `StructureSpaceOn` level. -/ +@[expose] public section + namespace FirstOrder.Language namespace StructureSpaceOn diff --git a/LeanPool/InfinitaryLogic/Descriptive/CountingDichotomy.lean b/LeanPool/InfinitaryLogic/Descriptive/CountingDichotomy.lean index 3f014fb273..8fc7ede649 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/CountingDichotomy.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/CountingDichotomy.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.ModelClassStandardBorel -import Mathlib.SetTheory.Cardinal.Continuum +module + +public import Mathlib.SetTheory.Cardinal.Continuum +public import Mathlib.MeasureTheory.Constructions.Polish.Basic /-! # Conditional Counting Dichotomy for Models @@ -29,6 +31,8 @@ The isomorphism relation `isoSetoid` this file counts is defined in among coded ℕ-models is either ≤ ℵ₀ or exactly 2^ℵ₀. -/ +@[expose] public section + universe u v w namespace FirstOrder @@ -46,7 +50,6 @@ def SilverBurgessDichotomy : Prop := MeasurableSet {p : X × X | r.r p.1 p.2} → (#(Quotient r) ≤ ℵ₀) ∨ (#(Quotient r) = Cardinal.continuum) -variable {L : Language.{u, v}} [L.IsRelational] [Countable (Σ l, L.Relations l)] end Language diff --git a/LeanPool/InfinitaryLogic/Descriptive/FiniteCarrier.lean b/LeanPool/InfinitaryLogic/Descriptive/FiniteCarrier.lean index 204e4cd374..1f8c4690b8 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/FiniteCarrier.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/FiniteCarrier.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.SatisfactionBorelOn -import LeanPool.InfinitaryLogic.Descriptive.StructureIsoSetoid -import LeanPool.InfinitaryLogic.Descriptive.CountingDichotomy +module + import LeanPool.InfinitaryLogic.Descriptive.CodeTransport -import Mathlib.GroupTheory.Perm.Basic + +public import LeanPool.InfinitaryLogic.Descriptive.SatisfactionBorelOn +public import LeanPool.InfinitaryLogic.Descriptive.StructureIsoSetoid +public import LeanPool.InfinitaryLogic.Descriptive.CountingDichotomy /-! # Finite-Carrier Counting via Permutation Orbits @@ -29,6 +31,8 @@ gives a counting dichotomy for all countable models. - `allCodedIsoClasses_dichotomy`: Combined counting dichotomy for all countable models. -/ +@[expose] public section + universe u v namespace FirstOrder @@ -97,7 +101,7 @@ structures they decode on `Fin n` are `L`-isomorphic. Stated on all of This mirrors `structureIsoSetoid` at the `ℕ` tier, and for the same reason: perfectness of a set of codes must be a property of the ambient space, not of whichever refinement was chosen to make one model class Polish. -/ -private def structureIsoSetoidOn (L : Language.{u, v}) [L.IsRelational] (n : ℕ) : +def structureIsoSetoidOn (L : Language.{u, v}) [L.IsRelational] (n : ℕ) : Setoid (StructureSpaceOn L (Fin n)) where r c₁ c₂ := Nonempty (@Language.Equiv L (Fin n) (Fin n) (StructureSpaceOn.toStructure c₁) (StructureSpaceOn.toStructure c₂)) diff --git a/LeanPool/InfinitaryLogic/Descriptive/G0Dichotomy.lean b/LeanPool/InfinitaryLogic/Descriptive/G0Dichotomy.lean index 41cc2e1c09..1f6e6bf292 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/G0Dichotomy.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/G0Dichotomy.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import Mathlib.MeasureTheory.Constructions.Polish.Basic +module + +public import Mathlib.MeasureTheory.Constructions.Polish.Basic /-! # Towards the classical `G₀`-dichotomy: independence and positivity machinery @@ -47,6 +49,8 @@ extracting the continuous homomorphism build on these in completed proof map. -/ +@[expose] public section + open Set Function MeasureTheory /-! ### Independent sets and neighborhoods -/ diff --git a/LeanPool/InfinitaryLogic/Descriptive/G0Fusion.lean b/LeanPool/InfinitaryLogic/Descriptive/G0Fusion.lean index 2ff2e72ac5..55cdd4bf12 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/G0Fusion.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/G0Fusion.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.GSGraph -import LeanPool.InfinitaryLogic.Descriptive.G0Dichotomy -import Mathlib.Analysis.SpecificLimits.Basic +module + +public import LeanPool.InfinitaryLogic.Descriptive.GSGraph +public import LeanPool.InfinitaryLogic.Descriptive.G0Dichotomy +import Mathlib.Data.List.GetD /-! # Fusion for the `G₀`-dichotomy: level objects and edge bookkeeping @@ -38,6 +40,8 @@ extraction `exists_gsGraph_hom` — the classical `G₀`-dichotomy construction Silver's theorem. -/ +@[expose] public section + open Set Function MeasureTheory namespace G0Fusion diff --git a/LeanPool/InfinitaryLogic/Descriptive/GSGraph.lean b/LeanPool/InfinitaryLogic/Descriptive/GSGraph.lean index 3380d18dd3..ee02fd3b9d 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/GSGraph.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/GSGraph.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import Mathlib.Topology.Baire.BaireMeasurable import Mathlib.Data.List.GetD -import Mathlib.Topology.MetricSpace.PiNat -import Mathlib.Topology.Baire.BaireMeasurable -import Mathlib.Topology.Baire.Lemmas import Mathlib.Topology.Baire.LocallyCompactRegular -import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic +import Mathlib.Topology.MetricSpace.PiNat /-! # The graphs `G_S(2^ℕ)` and Miller's independence lemma @@ -47,6 +47,8 @@ applied to the part of the symmetric difference inside each child cylinder). A c `(prependWord (s ++ [false]) x, prependWord (s ++ [true]) x)` inside `B`. -/ +@[expose] public section + open Set Filter Topology /-! ### Words and word cylinders -/ @@ -173,13 +175,13 @@ def DenseWords (S : Set (List Bool)) : Prop := /-! ### A canonical dense and sparse set of words -/ /-- An enumeration of all finite binary words. -/ -private def wordEnum (n : ℕ) : List Bool := (Encodable.decode (α := List Bool) n).getD [] +def wordEnum (n : ℕ) : List Bool := (Encodable.decode (α := List Bool) n).getD [] private theorem wordEnum_encode (w : List Bool) : wordEnum (Encodable.encode w) = w := by simp [wordEnum, Encodable.encodek] /-- Pad a word with `false` up to length `n`. -/ -private def padTo (w : List Bool) (n : ℕ) : List Bool := w ++ List.replicate (n - w.length) false +def padTo (w : List Bool) (n : ℕ) : List Bool := w ++ List.replicate (n - w.length) false private theorem length_padTo {w : List Bool} {n : ℕ} (h : w.length ≤ n) : (padTo w n).length = n := by diff --git a/LeanPool/InfinitaryLogic/Descriptive/InvariantMeasurableSpace.lean b/LeanPool/InfinitaryLogic/Descriptive/InvariantMeasurableSpace.lean index 3a6f47f6bd..e01d612b68 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/InvariantMeasurableSpace.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/InvariantMeasurableSpace.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.LogicAction +module + +public import LeanPool.InfinitaryLogic.Descriptive.LopezEscobarEasy +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Complement closure for isomorphism-invariant classes @@ -11,6 +17,8 @@ The complement of an isomorphism-invariant class of coded structures is again in elementary lemma is the only closure property needed by the retained López–Escobar branch. -/ +@[expose] public section + namespace FirstOrder.Language variable {L : Language.{0, 0}} diff --git a/LeanPool/InfinitaryLogic/Descriptive/IsomorphismBorel.lean b/LeanPool/InfinitaryLogic/Descriptive/IsomorphismBorel.lean index d1fc91c34e..15c0e8df0e 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/IsomorphismBorel.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/IsomorphismBorel.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.BFEquivBorel +module + +public import LeanPool.InfinitaryLogic.Descriptive.BFEquivBorel +public import LeanPool.InfinitaryLogic.Descriptive.SatisfactionBorel +public import LeanPool.InfinitaryLogic.Scott.Height.Defs import LeanPool.InfinitaryLogic.ModelTheory.CountingModels +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Isomorphism is Borel under Bounded Scott Height @@ -18,6 +26,8 @@ This file proves that isomorphism restricted to models of a sentence is Borel is measurable. -/ +@[expose] public section + universe u v namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Descriptive/KuratowskiUlam.lean b/LeanPool/InfinitaryLogic/Descriptive/KuratowskiUlam.lean index 2708b40dca..ccb2fd9342 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/KuratowskiUlam.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/KuratowskiUlam.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import Mathlib.Topology.Baire.BaireMeasurable -import Mathlib.Topology.Baire.Lemmas -import Mathlib.Topology.Bases +module + +public import Mathlib.Topology.Baire.BaireMeasurable /-! # Kuratowski–Ulam: meager sections give a meager set @@ -35,6 +35,8 @@ in the Baire space `X` are non-meager, some such `x₁` lies in `G`. Then space. -/ +@[expose] public section + open Set Filter Topology TopologicalSpace variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] diff --git a/LeanPool/InfinitaryLogic/Descriptive/LogicAction.lean b/LeanPool/InfinitaryLogic/Descriptive/LogicAction.lean index 75632d166d..9aa5f3f034 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/LogicAction.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/LogicAction.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.LopezEscobarEasy -import Mathlib.GroupTheory.Perm.Basic +module + +public import LeanPool.InfinitaryLogic.Descriptive.LopezEscobarEasy +public import Mathlib.Tactic.Continuity +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The logic action of `S∞ = Equiv.Perm ℕ` on the structure space (issue #27, algebraic layer) @@ -22,6 +28,8 @@ this is the `ℕ`-tier that issue #27 packages (and that #28 will build its σ-a topology, Polish-group structure, and `ContinuousSMul` are the *next* milestones of #27, not here. -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/Descriptive/LopezEscobar.lean b/LeanPool/InfinitaryLogic/Descriptive/LopezEscobar.lean index 6436e5029e..523aa2266d 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/LopezEscobar.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/LopezEscobar.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Descriptive.LogicAction import LeanPool.InfinitaryLogic.Methods.LopezEscobar.Separation -import LeanPool.InfinitaryLogic.Descriptive.LogicAction +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The López–Escobar theorem (issue #10, Unit 6) @@ -27,6 +33,8 @@ Only the hard direction is new; the reverse of each is the easy direction, and t adds no mathematical content beyond the orbit = isomorphism identification. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure Set diff --git a/LeanPool/InfinitaryLogic/Descriptive/LopezEscobarEasy.lean b/LeanPool/InfinitaryLogic/Descriptive/LopezEscobarEasy.lean index 6013e8ca0a..da11632c8d 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/LopezEscobarEasy.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/LopezEscobarEasy.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.SatisfactionBorel +module + +public import LeanPool.InfinitaryLogic.Descriptive.SatisfactionBorel import LeanPool.InfinitaryLogic.Lomega1omega.Theory +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # López-Escobar, the easy direction @@ -24,6 +30,8 @@ route through Craig interpolation and PC-separation — is **proved**: `lopez_es in `Descriptive/LopezEscobar.lean`. -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/Descriptive/Measurable.lean b/LeanPool/InfinitaryLogic/Descriptive/Measurable.lean index ecb3815854..4cbf81974b 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/Measurable.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/Measurable.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.StructureSpace -import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic +module + +public import LeanPool.InfinitaryLogic.Descriptive.StructureSpace +public import Mathlib.MeasureTheory.MeasurableSpace.Constructions +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Measurable Structure on the Structure Space @@ -19,6 +25,8 @@ sets (sets determined by a single relation query) are measurable. - `measurableSet_relHolds`: The set of codes where a given relation query holds is measurable. -/ +@[expose] public section + universe u v namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Descriptive/ModelClassStandardBorel.lean b/LeanPool/InfinitaryLogic/Descriptive/ModelClassStandardBorel.lean index e3f7cddc14..62b844bcd2 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/ModelClassStandardBorel.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/ModelClassStandardBorel.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Descriptive.SatisfactionBorel +public import Mathlib.MeasureTheory.Constructions.Polish.Basic import LeanPool.InfinitaryLogic.Descriptive.Polish -import LeanPool.InfinitaryLogic.Descriptive.SatisfactionBorel /-! # Standard Borel Structure on the Model Class @@ -18,6 +21,8 @@ inherits `StandardBorelSpace` as a measurable subspace of the structure space. - `modelsOf_standardBorel`: The subtype `↥(ModelsOf φ)` is standard Borel. -/ +@[expose] public section + universe u v namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Descriptive/Mycielski.lean b/LeanPool/InfinitaryLogic/Descriptive/Mycielski.lean index 1b1a7c4f03..e87ce43aed 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/Mycielski.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/Mycielski.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import Mathlib.Topology.MetricSpace.CantorScheme -import Mathlib.Topology.GDelta.Basic -import Mathlib.Topology.Baire.Lemmas +module + +public import Mathlib.Topology.MetricSpace.PiNat import Mathlib.Topology.Baire.CompleteMetrizable +import Mathlib.Topology.MetricSpace.CantorScheme /-! # Mycielski's theorem for Cantor space @@ -49,6 +50,8 @@ since `Bool` has a `UniformSpace` instance, the plain `PiNat.metricSpace` would second, non-defeq uniform structure). -/ +@[expose] public section + open Set PiNat Filter Topology namespace MycielskiCantor diff --git a/LeanPool/InfinitaryLogic/Descriptive/PerfectAntichain.lean b/LeanPool/InfinitaryLogic/Descriptive/PerfectAntichain.lean index 9e699b77b5..c3672e6306 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/PerfectAntichain.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/PerfectAntichain.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import Mathlib.Topology.DerivedSet -import Mathlib.Topology.MetricSpace.CantorScheme -import Mathlib.Topology.MetricSpace.Perfect +module + +public import Mathlib.SetTheory.Cardinal.Continuum +public import Mathlib.Topology.MetricSpace.Defs +public import Mathlib.Topology.UniformSpace.Cauchy +import Mathlib.Tactic.Measurability.Init +import Mathlib.Topology.GDelta.MetrizableSpace import Mathlib.Topology.MetricSpace.Polish -import Mathlib.MeasureTheory.Constructions.Polish.Basic -import Mathlib.SetTheory.Cardinal.Continuum /-! # Perfect and Cantor antichains, and thinness @@ -43,6 +45,8 @@ through `mk_eq_continuum`, which is what lets it drop second countability — it the lower bound. -/ +@[expose] public section + open Cardinal Set -- `𝓟` only; opening `Filter` itself would clash with `Set` on names like `map`. diff --git a/LeanPool/InfinitaryLogic/Descriptive/Polish.lean b/LeanPool/InfinitaryLogic/Descriptive/Polish.lean index 02a2948447..5f37c2cd5d 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/Polish.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/Polish.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.Topology -import Mathlib.Topology.MetricSpace.Polish -import Mathlib.Topology.Metrizable.Basic -import Mathlib.MeasureTheory.Constructions.Polish.Basic +module + +public import LeanPool.InfinitaryLogic.Descriptive.Topology +public import Mathlib.MeasureTheory.Constructions.Polish.Basic +public import LeanPool.InfinitaryLogic.Descriptive.Measurable /-! # Polish Space and Borel Space Structure on the Structure Space @@ -35,6 +36,8 @@ see through it. We provide the intermediate instances explicitly. - Analogous instances for the pair space `StructureSpace L × StructureSpace L`. -/ +@[expose] public section + universe u v namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Descriptive/QueryCode.lean b/LeanPool/InfinitaryLogic/Descriptive/QueryCode.lean index d0d5ec7fb1..2ba6d3a62f 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/QueryCode.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/QueryCode.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.Polish +module + +public import LeanPool.InfinitaryLogic.Descriptive.Topology +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Measurability.Init +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The query-code closed embedding (issue #10, Unit 0a) @@ -26,6 +33,8 @@ This is the stop/go gate's first half; the analytic tree normal form (Unit 0b) b cylinder tree in `(ℕ → Bool) × (ℕ → ℕ)` on top of it. -/ +@[expose] public section + namespace FirstOrder.Language open Set diff --git a/LeanPool/InfinitaryLogic/Descriptive/SatisfactionBorel.lean b/LeanPool/InfinitaryLogic/Descriptive/SatisfactionBorel.lean index 43109f5007..d3a7047694 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/SatisfactionBorel.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/SatisfactionBorel.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Descriptive.Measurable +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics import LeanPool.InfinitaryLogic.Descriptive.SatisfactionBorelOn +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Satisfaction of Lω₁ω Formulas is Borel @@ -19,6 +27,8 @@ This file specializes the carrier-parametric result to structures on `ℕ`. - `modelsOf_measurableSet`: Satisfaction of any Lω₁ω sentence is measurable. -/ +@[expose] public section + universe u v u' namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Descriptive/SatisfactionBorelOn.lean b/LeanPool/InfinitaryLogic/Descriptive/SatisfactionBorelOn.lean index 7aa3c71181..70a7cceec2 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/SatisfactionBorelOn.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/SatisfactionBorelOn.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.Polish -import LeanPool.InfinitaryLogic.Lomega1omega.Semantics +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics +public import LeanPool.InfinitaryLogic.Descriptive.StructureSpace +public import Mathlib.MeasureTheory.MeasurableSpace.Constructions +import LeanPool.InfinitaryLogic.Descriptive.Measurable +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Generic Satisfaction Measurability for Carrier-Parametric Structure Spaces @@ -25,6 +33,8 @@ This file proves that satisfaction of Lω₁ω formulas is measurable on - `modelsOfOn_measurableSet`: Satisfaction of any Lω₁ω sentence is measurable. -/ +@[expose] public section + universe u v u' namespace FirstOrder @@ -48,7 +58,7 @@ variable [L.IsRelational] {α : Type*} /-- The set of codes in `StructureSpaceOn L α` where a bounded formula is realized, given variable assignments. -/ -private def ModelsOfBoundedOn +def ModelsOfBoundedOn {β : Type u'} {n : ℕ} (φ : L.BoundedFormulaω β n) (v : β → α) (xs : Fin n → α) : Set (StructureSpaceOn L α) := diff --git a/LeanPool/InfinitaryLogic/Descriptive/StructureIsoSetoid.lean b/LeanPool/InfinitaryLogic/Descriptive/StructureIsoSetoid.lean index c760aaa326..4aa025cf71 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/StructureIsoSetoid.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/StructureIsoSetoid.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.ModelClassStandardBorel -import LeanPool.InfinitaryLogic.Descriptive.PerfectAntichain -import LeanPool.InfinitaryLogic.Descriptive.SatisfactionBorel +module + +public import LeanPool.InfinitaryLogic.Descriptive.SatisfactionBorel +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The ambient isomorphism relation on coded structures @@ -21,6 +25,8 @@ theorem about it. The sentence-level predicates below then quantify over perfec statements. -/ +@[expose] public section + open Cardinal Set universe u v diff --git a/LeanPool/InfinitaryLogic/Descriptive/StructureSpace.lean b/LeanPool/InfinitaryLogic/Descriptive/StructureSpace.lean index 48ebac7eff..1bb8d3a8fd 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/StructureSpace.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/StructureSpace.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Semantics -import Mathlib.ModelTheory.Basic +module + +public import Mathlib.ModelTheory.Basic +import Mathlib.Basic.Countable.Basic /-! # Coding Space for Countable Structures @@ -30,6 +32,8 @@ while `RelQuery L` and `StructureSpace L` specialize to carrier ℕ. preserves relation satisfaction. -/ +@[expose] public section + universe u v namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Descriptive/Topology.lean b/LeanPool/InfinitaryLogic/Descriptive/Topology.lean index 8daff20675..7a5a6519c7 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/Topology.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/Topology.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.Measurable -import Mathlib.Topology.Clopen +module + +public import LeanPool.InfinitaryLogic.Descriptive.StructureSpace +public import Mathlib.Topology.Constructions +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Measurability.Init +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Product Topology on the Structure Space @@ -19,6 +26,8 @@ with `Bool` discrete) and proves that cylinder sets are clopen. - `isOpen_relHolds`, `isClosed_relHolds`: Components of the clopen result. -/ +@[expose] public section + universe u v namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Descriptive/WellOrderBridge.lean b/LeanPool/InfinitaryLogic/Descriptive/WellOrderBridge.lean index dfb34e3c2e..37144df00d 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/WellOrderBridge.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/WellOrderBridge.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.WellOrderClass +module + +public import LeanPool.InfinitaryLogic.Descriptive.WellOrderClass +public import LeanPool.InfinitaryLogic.Lomega1omega.InfiniteAxiom +import LeanPool.InfinitaryLogic.Descriptive.CodeTransport import LeanPool.InfinitaryLogic.ModelTheory.FragmentLowenheimSkolem -import LeanPool.InfinitaryLogic.Lomega1omega.InfiniteAxiom +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.FinCases +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # From coded well-orders to models: the defect bridge @@ -33,6 +41,8 @@ That second consumer is why `isWellOrder_of_realize_of_modelsOf_subset` is the p - `isWellOrder_of_realize`: the equality-form corollary. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure Set diff --git a/LeanPool/InfinitaryLogic/Descriptive/WellOrderClass.lean b/LeanPool/InfinitaryLogic/Descriptive/WellOrderClass.lean index c0432bf37c..1c79b8da4a 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/WellOrderClass.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/WellOrderClass.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Descriptive.LopezEscobarEasy +public import Mathlib.SetTheory.Cardinal.Aleph import LeanPool.InfinitaryLogic.Descriptive.CodeTransport -import LeanPool.InfinitaryLogic.Descriptive.LopezEscobarEasy import LeanPool.InfinitaryLogic.Methods.WellOrdering.GraphTranslation +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.FinCases +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The coded class of countable well-orders (issue #33, step 1) @@ -24,6 +32,8 @@ The comparison structures are the arbitrary-language ones already built for generic code-transport API. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure Set diff --git a/LeanPool/InfinitaryLogic/Descriptive/WellOrderNonBorel.lean b/LeanPool/InfinitaryLogic/Descriptive/WellOrderNonBorel.lean index a6fbf7d1af..7735295997 100644 --- a/LeanPool/InfinitaryLogic/Descriptive/WellOrderNonBorel.lean +++ b/LeanPool/InfinitaryLogic/Descriptive/WellOrderNonBorel.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Descriptive.LopezEscobar +module + +public import LeanPool.InfinitaryLogic.Descriptive.WellOrderClass import LeanPool.InfinitaryLogic.Descriptive.WellOrderBridge +import LeanPool.InfinitaryLogic.Methods.LopezEscobar.Separation +import LeanPool.InfinitaryLogic.Methods.WellOrdering.GraphTranslation import LeanPool.InfinitaryLogic.OrdinalUtil +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Non-Borelness of the countable well-order class (issue #33) @@ -33,6 +41,8 @@ Marker's Corollary 4.27 then bounds the order types of all models of `φ ⊓ inf single countable ordinal, which `exists_code_type_eq` contradicts. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure Set diff --git a/LeanPool/InfinitaryLogic/Karp/CarrierTheorem.lean b/LeanPool/InfinitaryLogic/Karp/CarrierTheorem.lean index b028513b07..7614e25307 100644 --- a/LeanPool/InfinitaryLogic/Karp/CarrierTheorem.lean +++ b/LeanPool/InfinitaryLogic/Karp/CarrierTheorem.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Karp.PotentialIso +module + +public import LeanPool.InfinitaryLogic.Karp.PotentialIso import LeanPool.InfinitaryLogic.Mathlib.ModelTheory.Infinitary.Reindex -import LeanPool.InfinitaryLogic.Scott.AtomicDiagram -import LeanPool.InfinitaryLogic.Scott.BackAndForth /-! # Karp's theorem at a common branching carrier @@ -52,6 +52,8 @@ The common-carrier formulation with `IndexCoding` is this formalization's presen a statement made in those sources; the mathematics is Karp's. -/ +@[expose] public section + universe u v w w' uι uκ namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Karp/PotentialIso.lean b/LeanPool/InfinitaryLogic/Karp/PotentialIso.lean index 9f6818c665..f8efa1b518 100644 --- a/LeanPool/InfinitaryLogic/Karp/PotentialIso.lean +++ b/LeanPool/InfinitaryLogic/Karp/PotentialIso.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Scott.BackAndForth +module + +public import LeanPool.InfinitaryLogic.Scott.BackAndForth import Mathlib.SetTheory.Ordinal.Family /-! @@ -28,6 +30,8 @@ back-and-forth equivalence at all ordinal levels. - [KK04], Theorem 1.2.1 -/ +@[expose] public section + universe u v w w' namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/CountableIndex.lean b/LeanPool/InfinitaryLogic/Lomega1omega/CountableIndex.lean index acfb4ccf91..50ecf43184 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/CountableIndex.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/CountableIndex.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Semantics -import LeanPool.InfinitaryLogic.Mathlib.ModelTheory.Infinitary.Reindex +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics +public import LeanPool.InfinitaryLogic.Mathlib.ModelTheory.Infinitary.Reindex /-! # Countable connectives over arbitrary countable index types @@ -28,6 +30,8 @@ encoding is noncanonical, so definitional commutation statements would be unplea consumers should work through `realize_ciInf`/`realize_ciSup`. -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/Depth.lean b/LeanPool/InfinitaryLogic/Lomega1omega/Depth.lean index b5f10fb81d..db5b9b0c61 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/Depth.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/Depth.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Operations +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Operations +public import Mathlib.SetTheory.Ordinal.Basic import Mathlib.SetTheory.Ordinal.Family /-! @@ -18,6 +21,8 @@ structural subterm. `depth` uses `Ordinal.iSup` at the countable connectives an by `castLE`, `relabel`, `openBounds`, and `subst`, with strict decrease into every connective. -/ +@[expose] public section + universe u v namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/Entailment.lean b/LeanPool/InfinitaryLogic/Lomega1omega/Entailment.lean index 5c99ab1595..2491578e22 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/Entailment.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/Entailment.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Theory +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Theory /-! # Semantic entailment for `L_{ω₁ω}` (issue #8 kernel step 1) @@ -15,6 +17,8 @@ base structure by constant interpretations, which no empty carrier admits). `Language.{0,0}` throughout, per the arc's D2 freeze. -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/FiniteQuantification.lean b/LeanPool/InfinitaryLogic/Lomega1omega/FiniteQuantification.lean index 9471bffed2..1c2b13f560 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/FiniteQuantification.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/FiniteQuantification.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Semantics +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics /-! # Finite quantifier blocks for Lω₁ω formulas @@ -31,6 +33,8 @@ The environment in the realization lemmas is the plain `Fin.append xs ys` (well- syntax infrastructure independent of any particular application. -/ +@[expose] public section + universe u v w u' namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/FirstOrderImage.lean b/LeanPool/InfinitaryLogic/Lomega1omega/FirstOrderImage.lean index d28cc93428..b2bab41b8e 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/FirstOrderImage.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/FirstOrderImage.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Operations +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Operations /-! # The first-order image inside `Lω₁ω` @@ -20,6 +22,8 @@ same `cases … <;> simp [toLω]` inversion. With them the HF fragment's closure one-liners. -/ +@[expose] public section + namespace FirstOrder.Language universe u v u' diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/Fragment.lean b/LeanPool/InfinitaryLogic/Lomega1omega/Fragment.lean index 627fc03809..babae990dc 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/Fragment.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/Fragment.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Semantics +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Syntax /-! # Fragments of `L_{ω₁ω}` @@ -17,6 +19,8 @@ connectives (destroys countability), syntactic substitution closure (subsumed by parameters), and formal-negation closure (an NNF concern, #14). -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/InfiniteAxiom.lean b/LeanPool/InfinitaryLogic/Lomega1omega/InfiniteAxiom.lean index 80f48e7b81..054f0a5f70 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/InfiniteAxiom.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/InfiniteAxiom.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Operations +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Operations /-! # The infiniteness axiom of `L_ω₁ω` @@ -18,6 +20,8 @@ infinite) to a statement about arbitrary models of a sentence, where a finite mo otherwise escape. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Cardinal diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/OpenBoundsSemantics.lean b/LeanPool/InfinitaryLogic/Lomega1omega/OpenBoundsSemantics.lean index c5ac738be9..b5a06fbd2a 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/OpenBoundsSemantics.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/OpenBoundsSemantics.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Operations +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Operations import LeanPool.InfinitaryLogic.Util /-! # Semantics of `openBounds` and of relabeling by `insertLastBound` @@ -22,6 +24,8 @@ Both were previously proved inside `Scott/Formula.lean` and `Methods/Henkin/Cons respectively; the statements and names are unchanged. -/ +@[expose] public section + universe u v w namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/Operations.lean b/LeanPool/InfinitaryLogic/Lomega1omega/Operations.lean index 3dd1a17ff1..3e77e87304 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/Operations.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/Operations.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Semantics +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics +import LeanPool.Incompleteness.Foundation.Vorspiel.Vorspiel import LeanPool.InfinitaryLogic.Util /-! # Operations on Lω₁ω Formulas @@ -24,6 +27,8 @@ sense at an arbitrary branching carrier belongs upstream on `BoundedFormulaInf`; handles transport between carriers. -/ +@[expose] public section + universe u v u' namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/Polarity.lean b/LeanPool/InfinitaryLogic/Lomega1omega/Polarity.lean index 0555071d12..ab1df0e8cf 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/Polarity.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/Polarity.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Syntax +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Syntax /-! # Polarity of relation-symbol occurrences (issue #14, Unit 0 layer 1) @@ -31,6 +33,8 @@ Only the **generic** `relationsInSigned` equations are `@[simp]`; the `positiveR installed alongside them and nothing can loop through `not`, `and`, `or`, or `ex`. -/ +@[expose] public section + namespace FirstOrder.Language namespace BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/QuantifierClass.lean b/LeanPool/InfinitaryLogic/Lomega1omega/QuantifierClass.lean index 7efa21b5c9..b31e767163 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/QuantifierClass.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/QuantifierClass.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Operations +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Operations /-! # The universal and existential quantifier classes (issue #15, Unit 0) @@ -27,6 +29,8 @@ reused by any preservation theorem (issue #15's interpolation and relative prese #16's end extensions), not to live inside the interpolation development. -/ +@[expose] public section + namespace FirstOrder.Language namespace BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/QuantifierOccurrence.lean b/LeanPool/InfinitaryLogic/Lomega1omega/QuantifierOccurrence.lean index 2ceca58939..bce64c19d4 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/QuantifierOccurrence.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/QuantifierOccurrence.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.QuantifierClass +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.QuantifierClass /-! # Signed quantifier *occurrence* (issue #15, budget gate 1) @@ -26,6 +28,8 @@ positive sign only. Nothing here mentions interpolation; the set-level versions the separator budgets are stated against. -/ +@[expose] public section + namespace FirstOrder.Language namespace BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/Semantics.lean b/LeanPool/InfinitaryLogic/Lomega1omega/Semantics.lean index bdf3a14312..2e87052955 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/Semantics.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/Semantics.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Syntax -import LeanPool.InfinitaryLogic.Mathlib.ModelTheory.Infinitary.Semantics +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Syntax +public import LeanPool.InfinitaryLogic.Mathlib.ModelTheory.Infinitary.Semantics /-! # Lω₁ω Semantics — compatibility facade over the fixed-carrier semantics @@ -38,6 +40,8 @@ Mathlib semantics, and that the historical `Fin.elim0` spellings of the arity-0 agree with Mathlib's `default`. -/ +@[expose] public section + universe u v w u' namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/Syntax.lean b/LeanPool/InfinitaryLogic/Lomega1omega/Syntax.lean index b9092a3a5d..6401c2a29c 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/Syntax.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/Syntax.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Mathlib.ModelTheory.Infinitary.Syntax -import Mathlib.Logic.Encodable.Basic +module + +public import LeanPool.InfinitaryLogic.Mathlib.ModelTheory.Infinitary.Syntax /-! # Lω₁ω Syntax — compatibility facade over the fixed-carrier syntax @@ -39,6 +40,8 @@ to it (`not falsum` reduces to `imp falsum falsum`). -/ +@[expose] public section + universe u v u' namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Lomega1omega/Theory.lean b/LeanPool/InfinitaryLogic/Lomega1omega/Theory.lean index 94fbc03fa9..20f7eb33fd 100644 --- a/LeanPool/InfinitaryLogic/Lomega1omega/Theory.lean +++ b/LeanPool/InfinitaryLogic/Lomega1omega/Theory.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Semantics +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics import LeanPool.InfinitaryLogic.Util -import Mathlib.Data.Set.Basic /-! # Lω₁ω Theories and Semantic Entailment @@ -34,6 +35,8 @@ in Lω₁ω (countable infinitary logic with countable conjunctions/disjunctions - [KK04] -/ +@[expose] public section + universe u v w w' namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Mathlib/ModelTheory/Infinitary/IndexCoding.lean b/LeanPool/InfinitaryLogic/Mathlib/ModelTheory/Infinitary/IndexCoding.lean index 0a665747c7..0c85b478e3 100644 --- a/LeanPool/InfinitaryLogic/Mathlib/ModelTheory/Infinitary/IndexCoding.lean +++ b/LeanPool/InfinitaryLogic/Mathlib/ModelTheory/Infinitary/IndexCoding.lean @@ -6,7 +6,7 @@ Authors: Cameron Freer module public import Mathlib.Logic.Encodable.Basic -public import Mathlib.Logic.Embedding.Basic +import Mathlib.Tactic.Attr.Core /-! # Index codings diff --git a/LeanPool/InfinitaryLogic/Methods/ConstantAbstraction.lean b/LeanPool/InfinitaryLogic/Methods/ConstantAbstraction.lean index c698a8ba48..3b40f1dbf6 100644 --- a/LeanPool/InfinitaryLogic/Methods/ConstantAbstraction.lean +++ b/LeanPool/InfinitaryLogic/Methods/ConstantAbstraction.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.ConstantSupport +module + +public import LeanPool.InfinitaryLogic.Methods.ConstantSupport /-! # Constant abstraction and reinterpretation surgery (issue #8 kernel steps 3–5) @@ -28,6 +30,8 @@ on `M`: Pure realization surgery: no `InsepAt`, no interpolation-specific commitments. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/ConstantInstances.lean b/LeanPool/InfinitaryLogic/Methods/ConstantInstances.lean index 94de20d7bd..b94a0eb998 100644 --- a/LeanPool/InfinitaryLogic/Methods/ConstantInstances.lean +++ b/LeanPool/InfinitaryLogic/Methods/ConstantInstances.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.ConstantSupport +module + +public import LeanPool.InfinitaryLogic.Methods.ConstantSupport /-! # Constant instances @@ -15,6 +17,8 @@ This neutral module defines the two closing operations by the auxiliary constant constants `c_{τ i}`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/ConstantSupport.lean b/LeanPool/InfinitaryLogic/Methods/ConstantSupport.lean index a51ee7eca3..806d069818 100644 --- a/LeanPool/InfinitaryLogic/Methods/ConstantSupport.lean +++ b/LeanPool/InfinitaryLogic/Methods/ConstantSupport.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.FiniteQuantification -import LeanPool.InfinitaryLogic.Lomega1omega.QuantifierClass +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.FiniteQuantification +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage import LeanPool.InfinitaryLogic.Methods.LanguageMapOccurrence -import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage import Mathlib.Data.Set.Finite.Lattice /-! @@ -29,6 +30,8 @@ freshness arguments must CARRY a finite support rather than compute one). Craig transport (the `A = ∅` root gate of the interpolation argument). -/ +@[expose] public section + namespace FirstOrder.Language /-! ## Structural lemmas for `functionsIn` (relabel / castLE / subst / openBounds) diff --git a/LeanPool/InfinitaryLogic/Methods/ConstantSurgery.lean b/LeanPool/InfinitaryLogic/Methods/ConstantSurgery.lean index 5e30db8f02..e85b29a96c 100644 --- a/LeanPool/InfinitaryLogic/Methods/ConstantSurgery.lean +++ b/LeanPool/InfinitaryLogic/Methods/ConstantSurgery.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.QuantifierRoundTrip +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.QuantifierOccurrence +public import LeanPool.InfinitaryLogic.Methods.ConstantAbstraction +public import LeanPool.InfinitaryLogic.Methods.ConstantInstances import LeanPool.InfinitaryLogic.Methods.Interpolation.BaseOccurrenceProjections -import LeanPool.InfinitaryLogic.Lomega1omega.QuantifierOccurrence +import LeanPool.InfinitaryLogic.Methods.Interpolation.QuantifierRoundTrip /-! # Constant surgery: substituting one constant for another @@ -23,6 +27,8 @@ The `instConst` dependency is why this file currently sits under `Methods` besid machinery rather than in the syntax layer; #39's consolidation is where that is resolved. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/EM/FragmentAdapter.lean b/LeanPool/InfinitaryLogic/Methods/EM/FragmentAdapter.lean index 99e443a153..2a0871e752 100644 --- a/LeanPool/InfinitaryLogic/Methods/EM/FragmentAdapter.lean +++ b/LeanPool/InfinitaryLogic/Methods/EM/FragmentAdapter.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.EM.Realization +module + +public import LeanPool.InfinitaryLogic.Methods.EM.Realization +public import LeanPool.InfinitaryLogic.Methods.EM.Indiscernible +import LeanPool.InfinitaryLogic.Lomega1omega.OpenBoundsSemantics /-! # EM Realization: the compactness-oracle layer @@ -19,6 +23,8 @@ general. `Realization.lean`'s model-input endpoints are the honest residual ben take the model itself, and the oracle factors through them. -/ +@[expose] public section + universe u v w namespace FirstOrder.Language diff --git a/LeanPool/InfinitaryLogic/Methods/EM/Indiscernible.lean b/LeanPool/InfinitaryLogic/Methods/EM/Indiscernible.lean index fb7712f127..e7af568042 100644 --- a/LeanPool/InfinitaryLogic/Methods/EM/Indiscernible.lean +++ b/LeanPool/InfinitaryLogic/Methods/EM/Indiscernible.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Semantics +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics /-! # Indiscernible Sequences for Lω₁ω @@ -14,6 +16,8 @@ formula holds on one iff it holds on the other. Standalone API — does not advance the Hanf boundary. -/ +@[expose] public section + universe u v w namespace FirstOrder.Language diff --git a/LeanPool/InfinitaryLogic/Methods/EM/Realization.lean b/LeanPool/InfinitaryLogic/Methods/EM/Realization.lean index e448268634..c352098ff9 100644 --- a/LeanPool/InfinitaryLogic/Methods/EM/Realization.lean +++ b/LeanPool/InfinitaryLogic/Methods/EM/Realization.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.EM.Template -import LeanPool.InfinitaryLogic.Methods.Henkin.Construction -import Mathlib.Data.Finset.Sort +module + +public import LeanPool.InfinitaryLogic.Methods.EM.Template +public import LeanPool.InfinitaryLogic.Lomega1omega.Operations +import LeanPool.InfinitaryLogic.Lomega1omega.OpenBoundsSemantics /-! # Template-to-`L[[J]]`-theory bridge for Lω₁ω @@ -36,6 +38,8 @@ inherits the continuum size of the Lω₁ω formula syntax. Any future model-realizing tranche will need to restrict to a countable sub-theory. -/ +@[expose] public section + universe u v w namespace FirstOrder.Language diff --git a/LeanPool/InfinitaryLogic/Methods/EM/TailAdapter.lean b/LeanPool/InfinitaryLogic/Methods/EM/TailAdapter.lean index b04aa0c850..71b70fc93f 100644 --- a/LeanPool/InfinitaryLogic/Methods/EM/TailAdapter.lean +++ b/LeanPool/InfinitaryLogic/Methods/EM/TailAdapter.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Methods.TailIndiscernible +public import LeanPool.InfinitaryLogic.Lomega1omega.Theory +public import LeanPool.InfinitaryLogic.Methods.EM.Indiscernible +public import LeanPool.InfinitaryLogic.Methods.EM.Realization import LeanPool.InfinitaryLogic.Methods.EM.FragmentAdapter -import LeanPool.InfinitaryLogic.Methods.TailIndiscernible /-! # Tail-indiscernibility: the eventually-form EM adapter @@ -41,6 +46,8 @@ The downstream consumer is `hasArbLargeModels_of_tail_extraction` in `InfinitaryLogic/Conditional/MorleyHanfTransfer.lean`. -/ +@[expose] public section + universe u v namespace FirstOrder.Language diff --git a/LeanPool/InfinitaryLogic/Methods/EM/Template.lean b/LeanPool/InfinitaryLogic/Methods/EM/Template.lean index 389bf11091..8ce951a1b8 100644 --- a/LeanPool/InfinitaryLogic/Methods/EM/Template.lean +++ b/LeanPool/InfinitaryLogic/Methods/EM/Template.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.EM.Indiscernible +module + +public import LeanPool.InfinitaryLogic.Mathlib.ModelTheory.Infinitary.Syntax /-! # Ehrenfeucht–Mostowski templates for Lω₁ω @@ -12,6 +14,8 @@ The downstream EM modules construct templates from indiscernible sequences and d realization properties. -/ +@[expose] public section + universe u v namespace FirstOrder.Language diff --git a/LeanPool/InfinitaryLogic/Methods/GeneratedSublanguage.lean b/LeanPool/InfinitaryLogic/Methods/GeneratedSublanguage.lean index b67900a26f..14a945a9d9 100644 --- a/LeanPool/InfinitaryLogic/Methods/GeneratedSublanguage.lean +++ b/LeanPool/InfinitaryLogic/Methods/GeneratedSublanguage.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Operations -import LeanPool.InfinitaryLogic.Lomega1omega.QuantifierClass -import Mathlib.Data.Set.Countable +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.QuantifierClass /-! # The function-generated sublanguage of an `L_{ω₁ω}` formula @@ -23,6 +23,8 @@ the full language. Pure syntax + set-countability; no EM, no local stack, no `Conditional/`. -/ +@[expose] public section + namespace FirstOrder.Language variable {L : Language.{0, 0}} diff --git a/LeanPool/InfinitaryLogic/Methods/Henkin/ConsistencyProperty.lean b/LeanPool/InfinitaryLogic/Methods/Henkin/ConsistencyProperty.lean index 821e8f2c72..7bdd6cb61e 100644 --- a/LeanPool/InfinitaryLogic/Methods/Henkin/ConsistencyProperty.lean +++ b/LeanPool/InfinitaryLogic/Methods/Henkin/ConsistencyProperty.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Theory -import LeanPool.InfinitaryLogic.Lomega1omega.Operations +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Operations /-! # Consistency Properties @@ -23,6 +24,8 @@ of sentences satisfying closure conditions that guarantee model existence. - [Kei71] -/ +@[expose] public section + universe u v namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Methods/Henkin/Construction.lean b/LeanPool/InfinitaryLogic/Methods/Henkin/Construction.lean index e3051f62a6..a459bdc632 100644 --- a/LeanPool/InfinitaryLogic/Methods/Henkin/Construction.lean +++ b/LeanPool/InfinitaryLogic/Methods/Henkin/Construction.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Henkin.ConsistencyProperty +module + +public import LeanPool.InfinitaryLogic.Methods.Henkin.ConsistencyProperty +public import Mathlib.Data.Fintype.Quotient import LeanPool.InfinitaryLogic.Lomega1omega.Depth -import LeanPool.InfinitaryLogic.Scott.Formula import LeanPool.InfinitaryLogic.Lomega1omega.OpenBoundsSemantics -import Mathlib.Order.Zorn -import Mathlib.Data.Fintype.Quotient import Mathlib.ModelTheory.Encoding /-! @@ -37,6 +37,8 @@ existence theorem for Lω₁ω. The construction proceeds in several stages: - [Kei71] -/ +@[expose] public section + universe u v namespace FirstOrder @@ -202,7 +204,7 @@ language L. Two terms are equivalent if the maximal consistent set contains the equation `t₁ = t₂`. The quotient model satisfies all sentences in S. -/ /-- Equivalence relation on closed terms induced by a maximal consistent set. -/ -private def termEquiv (C : ConsistencyPropertyEq L) (S : Set L.Sentenceω) +def termEquiv (C : ConsistencyPropertyEq L) (S : Set L.Sentenceω) (_hmax : C.toConsistencyProperty.MaximalConsistent S) : L.Term Empty → L.Term Empty → Prop := fun t₁ t₂ => BoundedFormulaω.equal @@ -301,10 +303,10 @@ private theorem termEquiv_equivalence (C : ConsistencyPropertyEq L) (S : Set L.S /-! ### Term Setoid and Quotient -/ /-- The Setoid on closed terms induced by the equivalence relation from S*. -/ -private def termSetoid (C : ConsistencyPropertyEq L) (S : Set L.Sentenceω) +def termSetoid (C : ConsistencyPropertyEq L) (S : Set L.Sentenceω) (hmax : C.toConsistencyProperty.MaximalConsistent S) : Setoid (L.Term Empty) where r := termEquiv C S hmax - iseqv := termEquiv_equivalence C S hmax + iseqv := by exact termEquiv_equivalence C S hmax /-- The carrier of the term model: closed terms quotiented by the equivalence relation `t₁ ~ t₂ ↔ (t₁ = t₂) ∈ S*`. -/ @@ -331,7 +333,7 @@ def TermModel.mk (t : L.Term Empty) : TermModel C S hmax := Quotient.mk (termSetoid C S hmax) t /-- The constant family of setoids for the quotient lifting. -/ -private def termSetoidFamily (C : ConsistencyPropertyEq L) (S : Set L.Sentenceω) +def termSetoidFamily (C : ConsistencyPropertyEq L) (S : Set L.Sentenceω) (hmax : C.toConsistencyProperty.MaximalConsistent S) (n : ℕ) : ∀ (_ : Fin n), Setoid (L.Term Empty) := fun _ => termSetoid C S hmax @@ -596,13 +598,13 @@ noncomputable instance termModelStructure : @Quotient.finLiftOn (Fin n) _ _ (fun _ => L.Term Empty) (termSetoidFamily C S hmax n) (TermModel C S hmax) xs (fun ts => TermModel.mk (Term.func f ts)) - (fun a b hab => Quotient.sound (func_congr f a b hab)) + (fun a b hab => by exact Quotient.sound (func_congr f a b hab)) RelMap {n} R xs := @Quotient.finLiftOn (Fin n) _ _ (fun _ => L.Term Empty) (termSetoidFamily C S hmax n) Prop xs (fun ts => BoundedFormulaω.rel R (fun i => (ts i).relabel (Sum.inl : Empty → Empty ⊕ Fin 0)) ∈ S) - (fun a b hab => rel_congr R a b hab) + (fun a b hab => by exact rel_congr R a b hab) /-! ### Truth Lemma Infrastructure -/ @@ -794,13 +796,13 @@ theorem truthLemma : Prop (fun i => Quotient.mk _ ((ts i).toEmpty)) (fun ts => BoundedFormulaω.rel R (fun i => (ts i).relabel (Sum.inl : Empty → Empty ⊕ Fin 0)) ∈ S) - (fun a b hab => rel_congr R a b hab) + (fun a b hab => by exact rel_congr R a b hab) have hsimp := congr_fun (congr_fun (Quotient.finLiftOn_mk (S := termSetoidFamily C S hmax _) (β := Prop) (fun i => (ts i).toEmpty)) (fun ts => BoundedFormulaω.rel R (fun i => (ts i).relabel (Sum.inl : Empty → Empty ⊕ Fin 0)) ∈ S)) - (fun a b hab => rel_congr R a b hab) + (fun a b hab => by exact rel_congr R a b hab) rw [hsimp]; dsimp only [] -- Now goal is: rel R ts ∈ S ↔ rel R (fun i => ((ts i).toEmpty).relabel Sum.inl) ∈ S have hconv : (fun i => ((ts i).toEmpty).relabel (Sum.inl : Empty → Empty ⊕ Fin 0)) = diff --git a/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/ConsistencyPropertyEqOn.lean b/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/ConsistencyPropertyEqOn.lean index 4a88e5a5f6..df1c31d563 100644 --- a/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/ConsistencyPropertyEqOn.lean +++ b/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/ConsistencyPropertyEqOn.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.GeneratedUniverse +module + +public import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.GeneratedUniverse /-! # The fragment-relative consistency property and Henkin completion (issue #8 tranche 2, commit 2) @@ -24,6 +26,8 @@ no general `C6` (a countable `U` cannot close under arbitrary substitution templ finiteness** — finiteness belongs to the inseparable-pair instance (commit 4). -/ +@[expose] public section + namespace FirstOrder.Language variable {L : Language.{0, 0}} diff --git a/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/FairEnumeration.lean b/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/FairEnumeration.lean index 5da2169ba4..73774431e1 100644 --- a/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/FairEnumeration.lean +++ b/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/FairEnumeration.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.ConsistencyPropertyEqOn +module + +public import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.ConsistencyPropertyEqOn /-! # Fair enumeration for a fragment-relative consistency property (issue #8 tranche 2, commit 3) @@ -21,6 +23,8 @@ The remaining piece (the `HenkinComplete Sstar` acceptance theorem) is the per-f it consumes `request_fires_after` plus per-request "what `process` adds" facts. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure @@ -80,7 +84,7 @@ variable {P : ConsistencyPropertyEqOn U} /-- Process a decomposition request: if the trigger `t` is present, add the target dictated by its outermost shape (the per-index rules use `idx`; the branching/witness rules choose classically). -/ -private noncomputable def processDecompose (S : SetIn P) (t : U) (idx : ℕ) : SetIn P := by +noncomputable def processDecompose (S : SetIn P) (t : U) (idx : ℕ) : SetIn P := by classical exact if hs : (t : L[[ℕ]].Sentenceω) ∈ S.1 then match heq : (t : L[[ℕ]].Sentenceω) with @@ -124,7 +128,7 @@ private noncomputable def processDecompose (S : SetIn P) (t : U) (idx : ℕ) : S /-- Process a `C1` request: inspects only the **outer** `imp` constructor (so it reduces on `φ.imp ψ` regardless of whether `φ`/`ψ` later specialize to the negation encoding — the field that a shape-dispatching `decompose` leaves stuck). -/ -private noncomputable def processImpC1 (S : SetIn P) (t : U) : SetIn P := by +noncomputable def processImpC1 (S : SetIn P) (t : U) : SetIn P := by classical exact if hs : (t : L[[ℕ]].Sentenceω) ∈ S.1 then match heq : (t : L[[ℕ]].Sentenceω) with @@ -136,7 +140,7 @@ private noncomputable def processImpC1 (S : SetIn P) (t : U) : SetIn P := by else S /-- Process one request. -/ -private noncomputable def process (S : SetIn P) : Request U → SetIn P := by +noncomputable def process (S : SetIn P) : Request U → SetIn P := by classical intro request exact match request with @@ -190,7 +194,7 @@ private theorem subset_process (S : SetIn P) (r : Request U) : S.1 ⊆ (process variable (e : ℕ → Request U) /-- One sweep: process requests `e 0, …, e n` in order. -/ -private noncomputable def sweep (S : SetIn P) : ℕ → SetIn P +noncomputable def sweep (S : SetIn P) : ℕ → SetIn P | 0 => process S (e 0) | (n + 1) => process (sweep S n) (e (n + 1)) diff --git a/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/GeneratedUniverse.lean b/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/GeneratedUniverse.lean index 72262ff2e8..b2204a52c6 100644 --- a/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/GeneratedUniverse.lean +++ b/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/GeneratedUniverse.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.ConstantInstances +module + +public import LeanPool.InfinitaryLogic.Methods.ConstantInstances +import Mathlib.Data.Set.Finite.Range /-! # The generated enumeration universe `U` (issue #8 tranche 2, commit 1) @@ -27,6 +30,8 @@ The relational-core collapse lemma `exists_eq_constTerm` (every closed term is a included — it drives the later term-model plumbing. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/QuotientTermModel.lean b/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/QuotientTermModel.lean index ad26cd0745..e87788c013 100644 --- a/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/QuotientTermModel.lean +++ b/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/QuotientTermModel.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.ConsistencyPropertyEqOn -import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.GeneratedUniverse +module + +public import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.ConsistencyPropertyEqOn /-! # The quotient term model and its atomic semantics (issue #8, commit 5a) @@ -35,6 +36,8 @@ constant-specialized equality and congruence laws. congruence, and `C0` alone. There is no `M ⊨ φ ↔ φ ∈ S` for arbitrary `φ`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure @@ -64,7 +67,7 @@ private theorem qtConst_constTerm (c : ℕ) : qtConst (constTerm (L' := L) (J := /-! ## The quotient carrier -/ /-- The equality relation on closed terms: their collapsed constants are `S`-equal. -/ -private def qRel (t u : L[[ℕ]].Term Empty) : Prop := constEq (L := L) (qtConst t) (qtConst u) ∈ S +def qRel (t u : L[[ℕ]].Term Empty) : Prop := constEq (L := L) (qtConst t) (qtConst u) ∈ S /-- The equality relation is an equivalence (from the atomic equality fields of `S`). -/ private theorem qRel_equiv (hsc : HenkinComplete U S) : Equivalence (qRel (L := L) (S := S)) where @@ -74,7 +77,7 @@ private theorem qRel_equiv (hsc : HenkinComplete U S) : Equivalence (qRel (L := /-- The setoid on closed terms. -/ def qSetoid (hsc : HenkinComplete U S) : Setoid (L[[ℕ]].Term Empty) := - ⟨qRel (S := S), qRel_equiv hsc⟩ + ⟨qRel (S := S), by exact qRel_equiv hsc⟩ /-- The quotient term model. -/ def QModel (hsc : HenkinComplete U S) := Quotient (qSetoid hsc) diff --git a/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/QuotientTruthLemma.lean b/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/QuotientTruthLemma.lean index 70036e6b52..91c66f2568 100644 --- a/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/QuotientTruthLemma.lean +++ b/LeanPool/InfinitaryLogic/Methods/Henkin/CountableCompletion/QuotientTruthLemma.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.QuotientTermModel -import LeanPool.InfinitaryLogic.Methods.ConstantInstances +module + +public import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.QuotientTermModel import LeanPool.InfinitaryLogic.Lomega1omega.Depth import LeanPool.InfinitaryLogic.Lomega1omega.OpenBoundsSemantics /-! @@ -43,6 +44,8 @@ the shape of the legacy `Methods/Henkin/Construction.lean` truth lemma: from `(a discharges the universal (dually for the negated universal via `neg_all_witness`). -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Henkin/ModelExistence.lean b/LeanPool/InfinitaryLogic/Methods/Henkin/ModelExistence.lean index edf6914e57..eaabec3448 100644 --- a/LeanPool/InfinitaryLogic/Methods/Henkin/ModelExistence.lean +++ b/LeanPool/InfinitaryLogic/Methods/Henkin/ModelExistence.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Henkin.ConsistencyProperty +module + +public import LeanPool.InfinitaryLogic.Methods.Henkin.ConsistencyProperty +public import LeanPool.InfinitaryLogic.Lomega1omega.Theory import LeanPool.InfinitaryLogic.Methods.Henkin.Construction /-! # Model Existence Theorem @@ -22,6 +25,8 @@ that belongs to a consistency property has a countable model. - [Kei71] -/ +@[expose] public section + universe u v w namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Methods/HighlyOrderTransitive.lean b/LeanPool/InfinitaryLogic/Methods/HighlyOrderTransitive.lean index d780797164..16791096dc 100644 --- a/LeanPool/InfinitaryLogic/Methods/HighlyOrderTransitive.lean +++ b/LeanPool/InfinitaryLogic/Methods/HighlyOrderTransitive.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import Mathlib.Order.Hom.Basic -import Mathlib.Order.Fin.Basic +module + +public import Mathlib.Order.Hom.Basic /-! # Highly order-transitive linear orders @@ -20,6 +21,8 @@ This file supplies the consumer-shaped definition. Existence results via ordered `HighlyTransitiveField.lean` and `HighlyTransitiveExistence.lean`. -/ +@[expose] public section + namespace FirstOrder /-- A linear order is **highly order-transitive** when every isomorphism between two finite diff --git a/LeanPool/InfinitaryLogic/Methods/HighlyTransitiveExistence.lean b/LeanPool/InfinitaryLogic/Methods/HighlyTransitiveExistence.lean index 2e879480b9..29d18ccc9e 100644 --- a/LeanPool/InfinitaryLogic/Methods/HighlyTransitiveExistence.lean +++ b/LeanPool/InfinitaryLogic/Methods/HighlyTransitiveExistence.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.HighlyTransitiveField -import Mathlib.RingTheory.HahnSeries.Lex -import Mathlib.RingTheory.HahnSeries.Summable +module + +public import Mathlib.RingTheory.HahnSeries.Lex +public import Mathlib.RingTheory.HahnSeries.Summable +public import Mathlib.Data.Finsupp.Lex +public import LeanPool.InfinitaryLogic.Methods.HighlyOrderTransitive +public import Mathlib.Algebra.Field.Subfield.Basic +public import Mathlib.SetTheory.Ordinal.Basic +public import LeanPool.InfinitaryLogic.Methods.HighlyTransitiveField import Mathlib.SetTheory.Cardinal.Subfield -import Mathlib.Data.Finsupp.Lex /-! # Highly order-transitive orders of every infinite cardinality (issue #11 unit 6b) @@ -27,6 +32,8 @@ Implementation note: `Mathlib.RingTheory.HahnSeries.Summable` must be imported e the lexicographic Hahn import alone does not load the field instance. -/ +@[expose] public section + namespace FirstOrder open Cardinal @@ -47,13 +54,13 @@ section Construction variable (X : Type) [LinearOrder X] /-- The lexicographic value group of the construction. -/ -private abbrev hahnGamma : Type := Lex (X →₀ ℤ) +abbrev hahnGamma : Type := Lex (X →₀ ℤ) /-- The ambient lexicographically ordered Hahn-series field. -/ -private abbrev hahnField : Type := Lex (HahnSeries (hahnGamma X) ℚ) +abbrev hahnField : Type := Lex (HahnSeries (hahnGamma X) ℚ) /-- The monomial embedding of the index type. -/ -private noncomputable def hahnMonomial (x : X) : hahnField X := +noncomputable def hahnMonomial (x : X) : hahnField X := toLex (HahnSeries.single (toLex (Finsupp.single x 1)) (1 : ℚ)) private theorem hahnMonomial_injective : Function.Injective (hahnMonomial X) := by @@ -70,7 +77,7 @@ private theorem hahnMonomial_injective : Function.Injective (hahnMonomial X) := exact one_ne_zero h1.symm /-- The generated subfield: the ordered field of cardinality `#X`. -/ -private noncomputable def hahnSubfield : Subfield (hahnField X) := +noncomputable def hahnSubfield : Subfield (hahnField X) := Subfield.closure (Set.range (hahnMonomial X)) private theorem mk_hahnSubfield [Infinite X] : Cardinal.mk (hahnSubfield X) = Cardinal.mk X := by @@ -93,7 +100,7 @@ noncomputable def highlyTransitiveOrderAt (κ : Cardinal.{0}) (hκ : Cardinal.al (Subtype.val : hahnSubfield X → hahnField X) rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun {_ _} => Iff.rfl) (fun {_ _} => Iff.rfl) refine ⟨hahnSubfield X, inferInstance, ?_, ?_⟩ - · rw [mk_hahnSubfield, Cardinal.mk_toType, Cardinal.card_ord] + · exact private_decl% (by rw [mk_hahnSubfield, Cardinal.mk_toType, Cardinal.card_ord]) · exact HighlyOrderTransitive.of_field _ end FirstOrder diff --git a/LeanPool/InfinitaryLogic/Methods/HighlyTransitiveField.lean b/LeanPool/InfinitaryLogic/Methods/HighlyTransitiveField.lean index da9f175c22..996fdf0b38 100644 --- a/LeanPool/InfinitaryLogic/Methods/HighlyTransitiveField.lean +++ b/LeanPool/InfinitaryLogic/Methods/HighlyTransitiveField.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.HighlyOrderTransitive +module + +public import LeanPool.InfinitaryLogic.Methods.HighlyOrderTransitive +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Order.Field.Basic -import Mathlib.Tactic.Linarith +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Order.Fin.Basic import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # Linear ordered fields are highly order-transitive (issue #11 unit 6a) @@ -23,6 +32,8 @@ The automorphism is built as a piecewise strictly monotone surjection (`StrictMono.orderIsoOfSurjective`) — no order-sum gluing needed. -/ +@[expose] public section + namespace FirstOrder variable {K : Type*} [Field K] [LinearOrder K] [IsStrictOrderedRing K] diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/BackTranslate.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/BackTranslate.lean index 00effdf341..e89c10550f 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/BackTranslate.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/BackTranslate.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.Relationalize +module + +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage +public import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphLanguage /-! # Back-translation from the graph language (Craig Layer 3, Unit 6) @@ -30,6 +33,8 @@ graph axioms, choice, or reconstruction enters. relationalization is semantically the original formula (no syntactic identity claimed). -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/BaseOccurrenceProjections.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/BaseOccurrenceProjections.lean index f5efa72613..8d8499658e 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/BaseOccurrenceProjections.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/BaseOccurrenceProjections.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.GeneratedUniverse +module + +public import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.GeneratedUniverse +import LeanPool.InfinitaryLogic.Methods.LanguageMapOccurrence /-! # Base-symbol occurrence projections (neutral layer) @@ -20,6 +23,8 @@ the boundary now matches the proof architecture. Declaration names and namespac so no compatibility shims are needed. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/BudgetedPair.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/BudgetedPair.lean index 80b5c20187..b7b42066c2 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/BudgetedPair.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/BudgetedPair.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.PairedInsepFamily +public import LeanPool.InfinitaryLogic.Lomega1omega.QuantifierOccurrence +public import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.ConsistencyPropertyEqOn import LeanPool.InfinitaryLogic.Methods.ConstantSurgery import LeanPool.InfinitaryLogic.Methods.Interpolation.ConstantGeneralization -import LeanPool.InfinitaryLogic.Methods.Interpolation.PairedInsepFamily -import LeanPool.InfinitaryLogic.Lomega1omega.QuantifierOccurrence +import LeanPool.InfinitaryLogic.Methods.Interpolation.InseparablePairFamily +import LeanPool.InfinitaryLogic.Methods.Interpolation.QuantifierRoundTrip +import Mathlib.Data.Set.Finite.Lattice /-! # The budgeted labelled pair (issue #15, side-labelled restart) @@ -52,6 +58,8 @@ Stern's model-theoretic forcing proof is identified as the semantic dual, but it **unverified** — the paper has not been read. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω @@ -2558,22 +2566,23 @@ def budgetedPairConsistencyProperty (hr₂ : (sentenceJConsts (L' := L) (J := ℕ) r₂).Finite) : ConsistencyPropertyEqOn (GenU r₁ r₂) where sets := {S | BudgetedPairMem r₁ r₂ F₁ R₁ F₂ R₂ S} - subset_U := fun _ hS => budgetedPairMem_subset_U hS - C0_no_falsum := fun _ hS => budgetedPairMem_C0_no_falsum hS - C0_no_contradiction := fun _ hS φ => budgetedPairMem_C0_no_contradiction hS φ - C1_imp := fun _ hS φ ψ hmem => budgetedPairMem_C1_imp hS φ ψ hmem - C1_neg_imp := fun _ hS φ ψ hmem => budgetedPairMem_C1_neg_imp hS φ ψ hmem - C2_not_not := fun _ hS φ hmem => budgetedPairMem_C2_not_not hS φ hmem - C3_iInf := fun _ hS φs hmem k => budgetedPairMem_C3_iInf hS φs hmem k - C3_neg_iInf := fun _ hS φs hmem => budgetedPairMem_C3_neg_iInf hS φs hmem - C4_iSup := fun _ hS φs hmem => budgetedPairMem_C4_iSup hS φs hmem - C4_neg_iSup := fun _ hS φs hmem k => budgetedPairMem_C4_neg_iSup hS φs hmem k - eq_refl := fun _ hS c => budgetedPairMem_eq_refl hS c - eq_symm := fun _ hS a b hmem => budgetedPairMem_eq_symm hS a b hmem - eq_trans := fun _ hS a b d hab hbd => budgetedPairMem_eq_trans hS a b d hab hbd - rel_congr := fun _ hS _ Rr g i b hrel heq => budgetedPairMem_rel_congr hS Rr g i b hrel heq - all_inst := fun _ hS φ hmem c => budgetedPairMem_all_inst hS φ hmem c - neg_all_witness := fun _ hS φ hmem => budgetedPairMem_neg_all_witness hr₁ hr₂ hS φ hmem + subset_U := fun _ hS => by exact budgetedPairMem_subset_U hS + C0_no_falsum := fun _ hS => by exact budgetedPairMem_C0_no_falsum hS + C0_no_contradiction := fun _ hS φ => by exact budgetedPairMem_C0_no_contradiction hS φ + C1_imp := fun _ hS φ ψ hmem => by exact budgetedPairMem_C1_imp hS φ ψ hmem + C1_neg_imp := fun _ hS φ ψ hmem => by exact budgetedPairMem_C1_neg_imp hS φ ψ hmem + C2_not_not := fun _ hS φ hmem => by exact budgetedPairMem_C2_not_not hS φ hmem + C3_iInf := fun _ hS φs hmem k => by exact budgetedPairMem_C3_iInf hS φs hmem k + C3_neg_iInf := fun _ hS φs hmem => by exact budgetedPairMem_C3_neg_iInf hS φs hmem + C4_iSup := fun _ hS φs hmem => by exact budgetedPairMem_C4_iSup hS φs hmem + C4_neg_iSup := fun _ hS φs hmem k => by exact budgetedPairMem_C4_neg_iSup hS φs hmem k + eq_refl := fun _ hS c => by exact budgetedPairMem_eq_refl hS c + eq_symm := fun _ hS a b hmem => by exact budgetedPairMem_eq_symm hS a b hmem + eq_trans := fun _ hS a b d hab hbd => by exact budgetedPairMem_eq_trans hS a b d hab hbd + rel_congr := fun _ hS _ Rr g i b hrel heq => by + exact budgetedPairMem_rel_congr hS Rr g i b hrel heq + all_inst := fun _ hS φ hmem c => by exact budgetedPairMem_all_inst hS φ hmem c + neg_all_witness := fun _ hS φ hmem => by exact budgetedPairMem_neg_all_witness hr₁ hr₂ hS φ hmem end FamilyFields diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/BudgetedPairCompletion.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/BudgetedPairCompletion.lean index de3a96e04a..f1d1ac1500 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/BudgetedPairCompletion.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/BudgetedPairCompletion.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.BudgetedPair +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.BudgetedPair import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.FairEnumeration /-! # Completing the budgeted labelled pair (issue #15) @@ -26,6 +28,8 @@ ripple outward. converted locally — the interpolation consumer holds the former. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/BudgetedPairModel.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/BudgetedPairModel.lean index 333eeefb49..cd8105808a 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/BudgetedPairModel.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/BudgetedPairModel.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.BudgetedPairCompletion +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.BudgetedPair import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.QuotientTruthLemma +import LeanPool.InfinitaryLogic.Methods.Interpolation.BudgetedPairCompletion /-! # The budgeted labelled pair's countermodel (issue #15) @@ -24,6 +27,8 @@ This is the countermodel that contradicts `r₁ ⊨ r₂` in the final interpola seeded; the negative direction of the truth lemma is discarded, so no polarity argument is needed. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/ConstantElimination.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/ConstantElimination.lean index 62d563d6e0..5e6401d47e 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/ConstantElimination.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/ConstantElimination.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.ConstantAbstraction -import LeanPool.InfinitaryLogic.Lomega1omega.Entailment +module + +public import LeanPool.InfinitaryLogic.Methods.ConstantAbstraction +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment /-! # Constant elimination: the C7 acceptance lemmas (issue #8 kernel step 5) @@ -22,6 +24,8 @@ invariance-outside-support congruence (`realize_congr_const`), bridged to arbitr separator from constant support `insert c A` back to `A` (the InsepAt C7 step). -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/ConstantGeneralization.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/ConstantGeneralization.lean index 067868726b..48b4315be3 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/ConstantGeneralization.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/ConstantGeneralization.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.ConstantElimination -import LeanPool.InfinitaryLogic.Lomega1omega.QuantifierClass -import LeanPool.InfinitaryLogic.Lomega1omega.QuantifierOccurrence -import LeanPool.InfinitaryLogic.Lomega1omega.Theory +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.ConstantElimination +public import LeanPool.InfinitaryLogic.Lomega1omega.QuantifierOccurrence /-! # Constant generalization: the `∀`-twin of `genEx`, and countable-conjunction bounds @@ -33,6 +33,8 @@ Nothing here is specific to Malitz interpolation (issue #15) or to end extension consume it. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigArbitrary.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigArbitrary.lean index f2a5697f25..940365ed58 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigArbitrary.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigArbitrary.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment +public import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphAxioms +public import LeanPool.InfinitaryLogic.Methods.Interpolation.Relationalize +import LeanPool.InfinitaryLogic.Methods.ConstantSupport +import LeanPool.InfinitaryLogic.Methods.Interpolation.BackTranslate import LeanPool.InfinitaryLogic.Methods.Interpolation.CraigSublanguage import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphReconstruction -import LeanPool.InfinitaryLogic.Methods.Interpolation.BackTranslate /-! # Craig interpolation for `L_ω₁ω` over an arbitrary language (Craig Layer 3, Unit 7a) @@ -29,6 +35,8 @@ assembly of the relationalization layer over the relational core: `craig_pcSeparation_relational` stays, in the exact form issue #10 consumes). -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigRelational.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigRelational.lean index bc873e7ee0..d35391ce28 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigRelational.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigRelational.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage +import LeanPool.InfinitaryLogic.Methods.Interpolation.BaseOccurrenceProjections +import LeanPool.InfinitaryLogic.Methods.Interpolation.InseparablePairFamily import LeanPool.InfinitaryLogic.Methods.Interpolation.PairedInsepFamily import LeanPool.InfinitaryLogic.Methods.Interpolation.RootGate -import LeanPool.InfinitaryLogic.Methods.Interpolation.BaseOccurrenceProjections -import LeanPool.InfinitaryLogic.Methods.ConstantSupport -import LeanPool.InfinitaryLogic.Methods.LanguageMapOccurrence -import LeanPool.InfinitaryLogic.Methods.SchemaCompletion /-! # Craig interpolation for `L_ω₁ω`, countable relational core (issue #8, Layer 1) @@ -39,6 +41,8 @@ semantic contraposition — contradiction. Feeding the inseparable root pair to gives one model with `M ⊨ r₁` and `¬ M ⊨ r₂`; its base reduct contradicts `r₁ ⊨ r₂`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigSeparation.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigSeparation.lean index caa588917d..4d53f08aeb 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigSeparation.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigSeparation.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.CraigSublanguage +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage import LeanPool.InfinitaryLogic.Methods.ConstantSupport +import LeanPool.InfinitaryLogic.Methods.Interpolation.CraigSublanguage /-! # Craig separation (PC-separation) for `L_ω₁ω`, relational (issue #8, audit §10) @@ -30,6 +34,8 @@ intersection (`functionsIn_not`/`relationsIn_not` strip the negation), then `res into `L₀` and read both directions off the reduct realization bridge (`realize_mapLanguage`). -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigSublanguage.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigSublanguage.lean index a6581101ae..7f482e2366 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigSublanguage.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/CraigSublanguage.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage import LeanPool.InfinitaryLogic.Methods.Interpolation.CraigRelational +import LeanPool.InfinitaryLogic.Methods.LanguageMapOccurrence import LeanPool.InfinitaryLogic.Methods.SymbSublangExpansion /-! # Craig interpolation for `L_ω₁ω`, relational core without global countability (Layer 2) @@ -25,6 +30,8 @@ craig_interpolation_relational [L.IsRelational] : ``` -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/GraphAxioms.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/GraphAxioms.lean index b4a0e70038..87ccda920f 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/GraphAxioms.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/GraphAxioms.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphLanguage +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphLanguage +public import LeanPool.InfinitaryLogic.Lomega1omega.FiniteQuantification +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage import LeanPool.InfinitaryLogic.Methods.ConstantSupport /-! # Graph axioms: totality and functionality (Craig Layer 3, Unit 5a) @@ -30,6 +34,8 @@ the graph-relation convention `funMap f args = output`. Unit 5b consumes these to reconstruct an `L`-structure from any model of `graphAxioms F`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/GraphLanguage.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/GraphLanguage.lean index 299e20555c..1d32a7190a 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/GraphLanguage.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/GraphLanguage.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Operations +module + +public import Mathlib.ModelTheory.Basic +import Mathlib.Data.Set.Lattice.Image /-! # Relationalization of a language: the graph language and its structures (Craig Layer 3, Unit 1) @@ -30,6 +33,8 @@ computation. * `relSym` and the intersection identity `relSym_inter`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure @@ -68,7 +73,7 @@ variable {L : Language.{0, 0}} /-- Realization of a graph-language relation symbol in the graph expansion of an `L`-structure: base relations unchanged, and `G_f(xs, y)` reads `f(xs) = y` (the first `n` coordinates feed `f`, the last is its value). -/ -private def graphRelMap (M : Type) [L.Structure M] : +def graphRelMap (M : Type) [L.Structure M] : ∀ {n : ℕ}, GraphRelation L n → (Fin n → M) → Prop | _, .base r, v => Structure.RelMap r v | _, .graph f, v => Structure.funMap f (Fin.init v) = v (Fin.last _) diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/GraphReconstruction.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/GraphReconstruction.lean index efb1f5693a..fd7eb2f1aa 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/GraphReconstruction.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/GraphReconstruction.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphAxioms -import LeanPool.InfinitaryLogic.Methods.Interpolation.Relationalize +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphAxioms +public import LeanPool.InfinitaryLogic.Methods.Interpolation.Relationalize +import LeanPool.InfinitaryLogic.Methods.ConstantSupport /-! # Reconstructing functions from a model of the graph axioms (Craig Layer 3, Unit 5b) @@ -20,6 +23,8 @@ occurrence-aware congruence `realize_congr_symbolsIn`, the exact occurrence iden `relationsIn_relationalizeFormula`, and Unit 4's `realize_relationalizeFormula`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure @@ -33,7 +38,7 @@ variable {F : Set (Σ n, L.Functions n)} [Countable ↥F] /-- The function value extracted from a model of the graph axioms: the totality witness for `f ∈ F` (unique by functionality), an arbitrary element outside `F`. -/ -private noncomputable def graphValue (hAx : Sentenceω.Realize (graphAxioms F) M) {n : ℕ} +noncomputable def graphValue (hAx : Sentenceω.Realize (graphAxioms F) M) {n : ℕ} (f : L.Functions n) (xs : Fin n → M) : M := letI := Classical.dec ((⟨n, f⟩ : Σ n, L.Functions n) ∈ F) if h : (⟨n, f⟩ : Σ n, L.Functions n) ∈ F then diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/Inseparability.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/Inseparability.lean index 4a37ea9660..d8a813aa3c 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/Inseparability.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/Inseparability.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.ConstantElimination +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.ConstantElimination /-! # Support-parameterized inseparability and the C7 closure step (issue #8 kernel gate) @@ -20,6 +22,8 @@ existential pair at support `A`. The full inseparability consistency-property in Henkin model existence belong to tranche 2. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/InseparablePairFamily.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/InseparablePairFamily.lean index 40d9ba63e5..64da878193 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/InseparablePairFamily.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/InseparablePairFamily.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.GeneratedUniverse +public import LeanPool.InfinitaryLogic.Methods.Interpolation.Inseparability import LeanPool.InfinitaryLogic.Methods.Interpolation.QuantifierRoundTrip -import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.GeneratedUniverse /-! # The finite inseparable-pair consistency family and its structural lemmas (issue #8, commit 4a) @@ -31,6 +34,8 @@ The two moving parts are: `GeneratedUniverse` reachability lemmas) and finiteness (via `Set.Finite.insert`). -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonArbitrary.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonArbitrary.lean index c78c137e94..4115d62437 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonArbitrary.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonArbitrary.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonSublanguage -import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonRelationalize +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment +public import LeanPool.InfinitaryLogic.Lomega1omega.Polarity +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage import LeanPool.InfinitaryLogic.Methods.Interpolation.CraigArbitrary +import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonRelationalize +import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonSublanguage /-! # Lyndon interpolation, arbitrary language (issue #14, Unit 7) @@ -34,6 +39,8 @@ The assembly is Craig's, reused verbatim wherever polarity is irrelevant: * both entailments are Craig's graph-expansion arguments, unchanged. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonClosures.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonClosures.lean index a5b31a2809..d25beb3d23 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonClosures.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonClosures.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonInseparability +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonInseparability import LeanPool.InfinitaryLogic.Methods.Interpolation.BaseOccurrenceProjections +import LeanPool.InfinitaryLogic.Methods.Interpolation.InseparablePairFamily /-! # The polarity side bound and the one-sided closures (issue #14, Unit 3) @@ -43,6 +46,8 @@ projections this file consumes now live in the neutral universe. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonInseparability.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonInseparability.lean index 9e376b77da..07c5825eb7 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonInseparability.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonInseparability.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.PolarityCalculus -import LeanPool.InfinitaryLogic.Methods.Interpolation.InseparablePairFamily +module + +public import LeanPool.InfinitaryLogic.Methods.PolarityCalculus import LeanPool.InfinitaryLogic.Methods.Interpolation.BaseOccurrenceProjections +import LeanPool.InfinitaryLogic.Methods.Interpolation.InseparablePairFamily /-! # Polarity-refined inseparability and the mixed closures (issue #14, Unit 2 — the stop/go gate) @@ -37,6 +39,8 @@ equation. `SentBndPol`, the one-sided closure suite, and the paired family are López–Escobar 1965, Theorem 4.0(.4). -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonPairedCP.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonPairedCP.lean index 8cbb02ef60..4a81ab2ec5 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonPairedCP.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonPairedCP.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonClosures +import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.FairEnumeration +import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.QuotientTruthLemma +import LeanPool.InfinitaryLogic.Methods.Interpolation.InseparablePairFamily import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonPairedFamily +import LeanPool.InfinitaryLogic.Methods.Interpolation.PairedInsepFamily +import LeanPool.InfinitaryLogic.Methods.Interpolation.QuantifierRoundTrip /-! # The polarity-refined consistency property and paired model (issue #14, Unit 4b) @@ -35,6 +43,8 @@ for `exists_lyndon_paired_model_neg`. Root inseparability itself is **not** proved here; that (and interpolation) is Unit 5. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonPairedFamily.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonPairedFamily.lean index b535234f39..1d07737a7e 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonPairedFamily.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonPairedFamily.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonClosures -import LeanPool.InfinitaryLogic.Methods.Interpolation.PairedInsepFamily +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonClosures /-! # The polarity-refined paired family and its cross gates (issue #14, Unit 4a) @@ -38,6 +39,8 @@ Unit 4b adds the sixteen consistency-property fields, the Henkin completion, and endpoint. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonRelational.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonRelational.lean index 483152e1b0..75e4d849bc 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonRelational.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonRelational.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonRootGate +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment +public import LeanPool.InfinitaryLogic.Lomega1omega.Polarity +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage +import LeanPool.InfinitaryLogic.Methods.Interpolation.BaseOccurrenceProjections +import LeanPool.InfinitaryLogic.Methods.Interpolation.InseparablePairFamily import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonPairedCP -import LeanPool.InfinitaryLogic.Methods.Interpolation.CraigRelational +import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonRootGate +import LeanPool.InfinitaryLogic.Methods.Interpolation.RootGate /-! # Lyndon interpolation, countable relational core (issue #14, Unit 5, commit 2) @@ -29,6 +36,8 @@ polarity bounds `(Pos (r₂.not), Neg (r₂.not))`, so the engine maintains the the endpoint's `(Pos r₁ ∩ Pos r₂, Neg r₁ ∩ Neg r₂)`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonRelationalize.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonRelationalize.lean index ff39942e22..522d6cd74a 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonRelationalize.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonRelationalize.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.Relationalize +public import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphAxioms +public import LeanPool.InfinitaryLogic.Methods.Interpolation.BackTranslate +public import LeanPool.InfinitaryLogic.Lomega1omega.Polarity import LeanPool.InfinitaryLogic.Methods.PolarityCalculus -import LeanPool.InfinitaryLogic.Methods.Interpolation.Relationalize -import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphAxioms -import LeanPool.InfinitaryLogic.Methods.Interpolation.BackTranslate /-! # Signed occurrences through the relationalization layer (issue #14, Unit 6 — the D6 gate) @@ -44,6 +47,8 @@ for Craig's graph antecedent `(graphAxioms F).and (relationalizeFormula r)` and `(graphAxioms F).imp (relationalizeFormula r)`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonRootGate.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonRootGate.lean index d0000e6bf3..ec2e3d229b 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonRootGate.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonRootGate.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Methods.PolarityCalculus import LeanPool.InfinitaryLogic.Methods.Interpolation.RootGate -import LeanPool.InfinitaryLogic.Methods.PolarityCalculus /-! # The signed root gate (issue #14, Unit 5, commit 1) @@ -22,6 +24,8 @@ occurrence calculus, so the paired/countable-completion machinery enters the Lyn only at the countable core (`LyndonRelational.lean`), which is its first semantic consumer. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonSublanguage.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonSublanguage.lean index 2b68aa7be0..bdcfe2979e 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonSublanguage.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/LyndonSublanguage.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonRelational +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment +public import LeanPool.InfinitaryLogic.Lomega1omega.Polarity +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage import LeanPool.InfinitaryLogic.Methods.Interpolation.CraigSublanguage +import LeanPool.InfinitaryLogic.Methods.Interpolation.LyndonRelational +import LeanPool.InfinitaryLogic.Methods.PolarityCalculus +import LeanPool.InfinitaryLogic.Methods.SymbSublangExpansion /-! # Lyndon interpolation, ambient relational theorem (issue #14, Unit 5, commit 3) @@ -31,6 +38,8 @@ clause (.4) in full, with clause (.3)'s equality-occurrence condition deliberate recoverable without duplicating the existing `craig_interpolation_relational`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/MalitzRelational.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/MalitzRelational.lean index 43f05a976a..7c8b3a2d0d 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/MalitzRelational.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/MalitzRelational.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.MalitzRootGate +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage import LeanPool.InfinitaryLogic.Methods.Interpolation.BudgetedPairModel +import LeanPool.InfinitaryLogic.Methods.Interpolation.MalitzRootGate +import LeanPool.InfinitaryLogic.Methods.Interpolation.RootGate /-! # Malitz interpolation, countable relational core (issue #15) @@ -26,6 +31,8 @@ converts into universality of the separator. This is the sense in which the lab for" the interpolant's class. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/MalitzRootGate.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/MalitzRootGate.lean index 3e770de821..d9f06a4ecc 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/MalitzRootGate.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/MalitzRootGate.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Methods.ConstantSupport +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment import LeanPool.InfinitaryLogic.Methods.Interpolation.RootGate -import LeanPool.InfinitaryLogic.Methods.ConstantSupport /-! # The Malitz root gate (issue #15) @@ -18,6 +21,8 @@ universality is the class-preservation lemma proved alongside `stripConsts` itse composition only. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/MalitzSublanguage.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/MalitzSublanguage.lean index 29faa553f7..89c1a8ab4b 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/MalitzSublanguage.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/MalitzSublanguage.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.MalitzRelational +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage import LeanPool.InfinitaryLogic.Methods.Interpolation.CraigSublanguage +import LeanPool.InfinitaryLogic.Methods.Interpolation.MalitzRelational +import LeanPool.InfinitaryLogic.Methods.SymbSublangExpansion /-! # Malitz interpolation over an arbitrary relational language (issue #15) @@ -18,6 +23,8 @@ into the sublanguage, and `universalSigned_mapLanguage` carries it back out. Th proving those as *exact* equivalences rather than one-way implications. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder BoundedFormulaω diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/PairedInsepFamily.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/PairedInsepFamily.lean index a7e40abac3..7e56b67c91 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/PairedInsepFamily.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/PairedInsepFamily.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.BaseOccurrenceProjections -import LeanPool.InfinitaryLogic.Methods.Interpolation.PairedInseparability -import LeanPool.InfinitaryLogic.Methods.Interpolation.InseparablePairFamily -import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.ConsistencyPropertyEqOn +module + +public import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.GeneratedUniverse +public import LeanPool.InfinitaryLogic.Methods.Interpolation.Inseparability import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.FairEnumeration import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.QuotientTruthLemma +import LeanPool.InfinitaryLogic.Methods.Interpolation.BaseOccurrenceProjections +import LeanPool.InfinitaryLogic.Methods.Interpolation.InseparablePairFamily +import LeanPool.InfinitaryLogic.Methods.Interpolation.PairedInseparability +import LeanPool.InfinitaryLogic.Methods.Interpolation.QuantifierRoundTrip /-! # The paired inseparable-pair consistency family and its model (issue #8, commit 4c part 2) @@ -30,6 +34,8 @@ pair `(Γ, Δ)` with `Γ ⊆ SentBnd F₁ R₁`, `Δ ⊆ SentBnd F₂ R₂`, ins `M ⊨ r₁ ∧ ¬ M ⊨ r₂`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/PairedInseparability.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/PairedInseparability.lean index 3365df2b96..17ac0318b9 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/PairedInseparability.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/PairedInseparability.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.Inseparability import LeanPool.InfinitaryLogic.Methods.Interpolation.InseparablePairFamily /-! # Paired inseparability: the cross-coordinate gates (issue #8, commit 4c — risky core) @@ -39,6 +42,8 @@ closures, the `ConsistencyPropertyEqOn` instance over the union, and the `{r₁, endpoint yielding `M ⊨ r₁ ∧ ¬ M ⊨ r₂`) is assembled on top of these gates in the next tranche. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/QuantifierRoundTrip.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/QuantifierRoundTrip.lean index 693a6abaf9..60605dbae3 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/QuantifierRoundTrip.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/QuantifierRoundTrip.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.Inseparability -import LeanPool.InfinitaryLogic.Methods.Henkin.Construction -import LeanPool.InfinitaryLogic.Methods.ConstantInstances +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.Inseparability +public import LeanPool.InfinitaryLogic.Methods.ConstantInstances +import LeanPool.InfinitaryLogic.Lomega1omega.OpenBoundsSemantics /-! # The quantifier round-trip and the arbitrary-syntax C7 consumers (issue #8 tranche 1.5) @@ -20,6 +22,8 @@ The Henkin truth lemma will meet an arbitrary existential `ψ.ex` (or negated un C7 consumers for arbitrary existential / negated-universal parents. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/Relationalize.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/Relationalize.lean index 01070f48c1..cfff103771 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/Relationalize.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/Relationalize.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.TermGraph +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.TermGraph +import LeanPool.InfinitaryLogic.Methods.ConstantSupport /-! # Relationalization of formulas (Craig Layer 3, Unit 4) @@ -34,6 +37,8 @@ lifted variable embedding `ctxLiftEmb` (no term relabeling of built formulas). * The nested-formula pilot `R(f(g(x), h(c)))`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/RootGate.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/RootGate.lean index 530a851841..f751c7fd1d 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/RootGate.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/RootGate.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.Inseparability +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment +public import LeanPool.InfinitaryLogic.Methods.ConstantSupport +import LeanPool.InfinitaryLogic.Methods.ConstantAbstraction /-! # The semantic root gate (issue #8 tranche 1.5 item 2) @@ -20,6 +24,8 @@ turns that *syntactic* left inverse into the *semantic* bridge the argument need documented future composition. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/Interpolation/TermGraph.lean b/LeanPool/InfinitaryLogic/Methods/Interpolation/TermGraph.lean index 47a79875af..fc4c2c370a 100644 --- a/LeanPool/InfinitaryLogic/Methods/Interpolation/TermGraph.lean +++ b/LeanPool/InfinitaryLogic/Methods/Interpolation/TermGraph.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphLanguage +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphLanguage +public import LeanPool.InfinitaryLogic.Lomega1omega.FiniteQuantification +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage import LeanPool.InfinitaryLogic.Methods.ConstantSupport /-! # Term graphs: relationalizing a term's value (Craig Layer 3, Unit 3) @@ -42,6 +46,8 @@ are ever needed. - The nested-term pilot `f(g(x), h(c))` (genuinely nested, includes a `0`-ary application). -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/LanguageMapOccurrence.lean b/LeanPool/InfinitaryLogic/Methods/LanguageMapOccurrence.lean index 1864e83986..e9fa561d25 100644 --- a/LeanPool/InfinitaryLogic/Methods/LanguageMapOccurrence.lean +++ b/LeanPool/InfinitaryLogic/Methods/LanguageMapOccurrence.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage +module + +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage /-! # Occurrence calculus for language maps @@ -17,6 +19,8 @@ across `SchemaCompletion.lean`, `Interpolation/CraigRelational.lean` and order. Consolidating here removes that hazard. -/ +@[expose] public section + namespace FirstOrder.Language variable {L L' : Language.{0, 0}} (g : L →ᴸ L') diff --git a/LeanPool/InfinitaryLogic/Methods/LocalColimit.lean b/LeanPool/InfinitaryLogic/Methods/LocalColimit.lean index 3db5be45a1..f7ff5b9e6a 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalColimit.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalColimit.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalTower +module + +public import LeanPool.InfinitaryLogic.Methods.LocalTower +public import LeanPool.InfinitaryLogic.Methods.SkolemColimit /-! # The countable local colimit language `L_Γ` (`localColim`) and its cocone @@ -36,6 +39,8 @@ Next chunks (not here): the local atom/deForm seed and its countability, then th re-base over `localColim`. -/ +@[expose] public section + namespace FirstOrder.Language /-- A sequential colimit of countable types is countable: the colimit is a quotient of the diff --git a/LeanPool/InfinitaryLogic/Methods/LocalEMCardinality.lean b/LeanPool/InfinitaryLogic/Methods/LocalEMCardinality.lean index b5bbfa9715..6e3213eaee 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalEMCardinality.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalEMCardinality.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalEMCompression +module + +public import LeanPool.InfinitaryLogic.Methods.LocalEMCompression import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.CardinalBounds +import Mathlib.ModelTheory.Encoding +import Mathlib.Order.Filter.AtTopBot.Basic /-! # Exact cardinality of the local EM carrier (issue #11 unit 5) @@ -25,6 +29,8 @@ embedding travels WITH the code, expansion is a total function (`LocatedTermCode countable base language, injective deep sequence. -/ +@[expose] public section + namespace FirstOrder namespace Language @@ -33,7 +39,7 @@ variable (Λ : Language.{0, 0}) (J : Type) [LinearOrder J] /-- The located term code: compression arity, the support's increasing enumeration, and the compressed term. Unlike the orbit code, it remembers WHERE the support sits in `J`. -/ -private def LocatedTermCode : Type := +def LocatedTermCode : Type := Σ k : ℕ, (Fin k ↪o J) × Λ[[Fin k]].Term Empty /-- Expansion of a located code — total, since the embedding travels with the code. -/ diff --git a/LeanPool/InfinitaryLogic/Methods/LocalEMCompression.lean b/LeanPool/InfinitaryLogic/Methods/LocalEMCompression.lean index cdf010762f..1e9e4a3aa7 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalEMCompression.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalEMCompression.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalEMEquivariance +module + +public import LeanPool.InfinitaryLogic.Methods.LocalEMEquivariance import Mathlib.ModelTheory.Encoding /-! @@ -27,6 +29,8 @@ for a countable base language (`countable_localEMTupleCode`) — the quotient-tu the orbit theorem are unit 3b (`LocalEMTupleOrbit.lean`). -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/Methods/LocalEMContext.lean b/LeanPool/InfinitaryLogic/Methods/LocalEMContext.lean index 78751a32a2..eb848af252 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalEMContext.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalEMContext.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalEMFamily -import LeanPool.InfinitaryLogic.Methods.Henkin.Construction -import LeanPool.InfinitaryLogic.Methods.TailIndiscernible +module + +public import LeanPool.InfinitaryLogic.Methods.LocalEMFamily +public import LeanPool.InfinitaryLogic.Methods.TailIndiscernible +public import Mathlib.Order.Filter.AtTopBot.Defs +import LeanPool.InfinitaryLogic.Lomega1omega.OpenBoundsSemantics import Mathlib.Order.Filter.AtTopBot.Basic import Mathlib.Order.Filter.Finite @@ -46,6 +49,8 @@ Next layers (subsequent chunks): the `skolemNeedSymbol` witness-term transport a family-membership-carrying restricted truth lemma. -/ +@[expose] public section + namespace FirstOrder.Language variable (Λ : Language.{0, 0}) (J : Type) [LinearOrder J] @@ -520,7 +525,7 @@ def LocalEMContext.mkClass (ctx : LocalEMContext Λ J (M := M)) (t : Λ[[J]].Ter /-- A common support covering all argument representatives — the support over which a relation's deep truth is read. -/ -private noncomputable def LocalEMContext.commonSupport (ctx : LocalEMContext Λ J (M := M)) {n : ℕ} +noncomputable def LocalEMContext.commonSupport (ctx : LocalEMContext Λ J (M := M)) {n : ℕ} (xs : Fin n → ctx.Carrier) : Finset J := Finset.univ.biUnion fun i => locJSupport Λ J (Quotient.out (xs i)) diff --git a/LeanPool/InfinitaryLogic/Methods/LocalEMEquivariance.lean b/LeanPool/InfinitaryLogic/Methods/LocalEMEquivariance.lean index 4cf4cfccb6..48ba447d01 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalEMEquivariance.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalEMEquivariance.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalEMContext +module + +public import LeanPool.InfinitaryLogic.Methods.LocalEMContext +import LeanPool.InfinitaryLogic.Lomega1omega.Theory /-! # Equivariance of the local EM quotient (the issue #11 spike) @@ -34,6 +37,8 @@ targeted expanded-language equivariance (`carrierEquiv_funMap` under the renamed infinitary formula is invariant under the induced automorphism. -/ +@[expose] public section + namespace FirstOrder namespace Language @@ -189,11 +194,11 @@ private theorem locJRename_locJRename_symm (e : J ≃o J) {α : Type} (t : Λ[[J exact locJRename_refl t /-- The renaming action as an equivalence of closed terms. -/ -private def locJRenameEquiv (e : J ≃o J) : Λ[[J]].Term Empty ≃ Λ[[J]].Term Empty where +def locJRenameEquiv (e : J ≃o J) : Λ[[J]].Term Empty ≃ Λ[[J]].Term Empty where toFun := locJRename Λ J e invFun := locJRename Λ J e.symm - left_inv t := locJRename_symm_locJRename e t - right_inv t := locJRename_locJRename_symm e t + left_inv t := by exact locJRename_symm_locJRename e t + right_inv t := by exact locJRename_locJRename_symm e t /-! ## The descended automorphism of the local EM quotient -/ @@ -203,8 +208,8 @@ variable {M : Type} [Λ.Structure M] local EM quotient by renaming representatives — well-defined by the equivariance gate. -/ noncomputable def LocalEMContext.carrierEquiv (ctx : LocalEMContext Λ J (M := M)) (e : J ≃o J) : ctx.Carrier ≃ ctx.Carrier := - Quotient.congr (locJRenameEquiv e) fun t u => - (LocalEMContext.setoid_locJRename_iff Λ J ctx e t u).symm + Quotient.congr (locJRenameEquiv e) fun t u => by + exact (LocalEMContext.setoid_locJRename_iff Λ J ctx e t u).symm theorem LocalEMContext.carrierEquiv_mkClass (ctx : LocalEMContext Λ J (M := M)) (e : J ≃o J) (t : Λ[[J]].Term Empty) : diff --git a/LeanPool/InfinitaryLogic/Methods/LocalEMFamily.lean b/LeanPool/InfinitaryLogic/Methods/LocalEMFamily.lean index f59a26fc1d..e82e30af26 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalEMFamily.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalEMFamily.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalColimit -import LeanPool.InfinitaryLogic.Methods.LocalEMSupport +module + +public import LeanPool.InfinitaryLogic.Methods.LocalColimit +public import LeanPool.InfinitaryLogic.Methods.LocalEMSupport import Mathlib.ModelTheory.Encoding /-! @@ -44,6 +46,8 @@ The GENERIC semantic (realize) bridges live in `LocalEMContext.lean`; the old syntactic. -/ +@[expose] public section + namespace FirstOrder.Language /-! ### Canonical (J-free) seeds over a countable language -/ diff --git a/LeanPool/InfinitaryLogic/Methods/LocalEMSmall.lean b/LeanPool/InfinitaryLogic/Methods/LocalEMSmall.lean index 5192f9f316..d30c23c237 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalEMSmall.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalEMSmall.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.ModelTheory.InfinitaryTypes +public import LeanPool.InfinitaryLogic.Methods.HighlyOrderTransitive +public import LeanPool.InfinitaryLogic.Methods.LocalEMContext import LeanPool.InfinitaryLogic.Methods.LocalEMTupleOrbit -import LeanPool.InfinitaryLogic.ModelTheory.InfinitaryTypes /-! # Smallness of the local EM model (issue #11 unit 4) @@ -22,6 +26,8 @@ subsingletons is countable. Transport to the original language is `Lomega1omegaS (`ModelTheory/InfinitaryTypes.lean`), not re-proved here. -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/Methods/LocalEMSmallModel.lean b/LeanPool/InfinitaryLogic/Methods/LocalEMSmallModel.lean index 33e7c5354b..d94d301da8 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalEMSmallModel.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalEMSmallModel.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.SchemaLocalEMSource -import LeanPool.InfinitaryLogic.Methods.LocalEMSmall -import LeanPool.InfinitaryLogic.Methods.LocalEMCardinality +module + +public import LeanPool.InfinitaryLogic.ModelTheory.Hanf +public import LeanPool.InfinitaryLogic.ModelTheory.InfinitaryTypes import LeanPool.InfinitaryLogic.Methods.HighlyTransitiveExistence -import LeanPool.InfinitaryLogic.ModelTheory.Hanf +import LeanPool.InfinitaryLogic.Methods.LocalEMCardinality +import LeanPool.InfinitaryLogic.Methods.LocalEMSmall +import LeanPool.InfinitaryLogic.Methods.LocalEMTemplateRealization +import LeanPool.InfinitaryLogic.Methods.SchemaLocalEMSource +import LeanPool.InfinitaryLogic.Methods.SchemaTermTruth /-! # Small models of every infinite size: the countable-symbol core (issue #11 unit 7a) @@ -27,6 +32,8 @@ realized types (`lomega1omegaSmall` on the `localColim` reduct, descended to the by `Lomega1omegaSmall.of_expansion`). -/ +@[expose] public section + namespace FirstOrder.Language open Cardinal diff --git a/LeanPool/InfinitaryLogic/Methods/LocalEMSupport.lean b/LeanPool/InfinitaryLogic/Methods/LocalEMSupport.lean index 5f2917558f..67cc79812c 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalEMSupport.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalEMSupport.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import Mathlib.ModelTheory.Semantics -import Mathlib.Data.Finset.Sort +module + +public import Mathlib.ModelTheory.Semantics +public import Mathlib.Data.Finset.Sort import Mathlib.Order.Interval.Finset.Fin /-! @@ -22,6 +24,8 @@ Language-independent lemmas consumed by BOTH the original `skolemColim`-based EM `Finset.orderEmbOfFin`. -/ +@[expose] public section + namespace FirstOrder.Language /-- The variables of a relabeled term are the image of the original variables (a Mathlib gap). -/ diff --git a/LeanPool/InfinitaryLogic/Methods/LocalEMTemplateRealization.lean b/LeanPool/InfinitaryLogic/Methods/LocalEMTemplateRealization.lean index e719870d70..881eddd9fb 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalEMTemplateRealization.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalEMTemplateRealization.lean @@ -3,13 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalEMTruthLemma -import LeanPool.InfinitaryLogic.Methods.EM.TailAdapter -import Mathlib.Data.Fin.VecNotation -import Mathlib.Data.Nat.Nth -import Mathlib.Data.Set.Finite.Basic -import Mathlib.Order.Hom.Basic -import Mathlib.Order.WellFounded +module + +public import LeanPool.InfinitaryLogic.Methods.LocalEMTruthLemma +public import LeanPool.InfinitaryLogic.Methods.EM.TailAdapter +public import LeanPool.InfinitaryLogic.Methods.EM.FragmentAdapter +import Mathlib.Order.Filter.AtTopBot.Basic +import Mathlib.Order.Lattice.Nat /-! # The local EM template-realization bridge @@ -70,6 +70,8 @@ part of the pure local stack guarded by `check_local_boundary.sh`'s EM-free root downstream Conditional-touching file. -/ +@[expose] public section + universe u v namespace FirstOrder.Language diff --git a/LeanPool/InfinitaryLogic/Methods/LocalEMTruth.lean b/LeanPool/InfinitaryLogic/Methods/LocalEMTruth.lean index ab0e43beb7..db6e5e4193 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalEMTruth.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalEMTruth.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalEMContext +module + +public import LeanPool.InfinitaryLogic.Methods.LocalEMContext +import Mathlib.Order.Filter.AtTopBot.Basic /-! # The local EM truth lemma, layer 1: truth kernel + Skolem-witness transport @@ -44,6 +47,8 @@ This is the local analogue of `EMTermModel.lean:114–180`. It is a pure file (i stays off the EM stack. -/ +@[expose] public section + namespace FirstOrder.Language /-! ## The generic truth kernel diff --git a/LeanPool/InfinitaryLogic/Methods/LocalEMTruthLemma.lean b/LeanPool/InfinitaryLogic/Methods/LocalEMTruthLemma.lean index a9fc90dcf5..2d2a2e1256 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalEMTruthLemma.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalEMTruthLemma.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalEMTruth -import LeanPool.InfinitaryLogic.Methods.LocalSkolemUniversal +module + +public import LeanPool.InfinitaryLogic.Methods.LocalSkolemUniversal /-! # The local EM truth lemma, layer 2: readiness + the staged truth lemma @@ -62,6 +63,8 @@ as is the final connection to `TailTemplateRealizable`. This is a pure file (imp `LocalEMTruth`, hence the pure local stack only) — no EM-stack or `Conditional/` reach. -/ +@[expose] public section + namespace FirstOrder.Language /-! ## Generic truth-lemma readiness @@ -135,7 +138,7 @@ about the source sequence (`LocalEMOmegaHomogeneous` below). -/ /-- **Decidedness of a formula's eventual deep truth** (the named output of `eventualDeepTruth_decided`): either it holds eventually, or it fails eventually. Local analogue of `EMContext.Decided`, with the ambient `[Λ.Structure M]` in place of the `skolemColim` `letI`. -/ -private def LocalEMContext.Decided (ctx : LocalEMContext Λ J (M := M)) {m : ℕ} +def LocalEMContext.Decided (ctx : LocalEMContext Λ J (M := M)) {m : ℕ} (φ : Λ.BoundedFormulaω Empty m) (ts : Fin m → Λ[[J]].Term Empty) (S : Finset J) : Prop := (∀ᶠ d in Filter.atTop, φ.Realize Empty.elim fun i => locDeepInterp Λ J ctx.a d S (ts i)) ∨ diff --git a/LeanPool/InfinitaryLogic/Methods/LocalEMTupleOrbit.lean b/LeanPool/InfinitaryLogic/Methods/LocalEMTupleOrbit.lean index 38c0149bc8..db066712bf 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalEMTupleOrbit.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalEMTupleOrbit.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalEMCompression -import LeanPool.InfinitaryLogic.Methods.HighlyOrderTransitive +module + +public import LeanPool.InfinitaryLogic.Methods.LocalEMCompression +public import LeanPool.InfinitaryLogic.Methods.HighlyOrderTransitive /-! # Tuple codes and orbit classification (issue #11 unit 3b) @@ -25,6 +27,8 @@ only creates more codes, and countability plus "same code ⇒ same orbit" is all countably-many-types argument consumes. -/ +@[expose] public section + namespace FirstOrder namespace Language @@ -32,7 +36,7 @@ namespace Language variable {Λ : Language.{0, 0}} {J : Type} [LinearOrder J] {M : Type} [Λ.Structure M] /-- The common finite skeleton support of a tuple's chosen representatives. -/ -private noncomputable def LocalEMContext.tupleSupport (ctx : LocalEMContext Λ J (M := M)) {n : ℕ} +noncomputable def LocalEMContext.tupleSupport (ctx : LocalEMContext Λ J (M := M)) {n : ℕ} (a : Fin n → ctx.Carrier) : Finset J := Finset.univ.biUnion fun i => locJSupport Λ J (Quotient.out (a i)) @@ -49,7 +53,7 @@ noncomputable def LocalEMContext.tupleCode (ctx : LocalEMContext Λ J (M := M)) (a : Fin n → ctx.Carrier) : LocalEMTupleCode Λ n := ⟨(ctx.tupleSupport a).card, fun i => locJCompress Λ J (ctx.tupleSupport a) (Quotient.out (a i)) - (ctx.locJSupport_out_subset_tupleSupport a i)⟩ + (by exact ctx.locJSupport_out_subset_tupleSupport a i)⟩ /-- **The orbit theorem**: over a highly order-transitive skeleton, tuples with equal codes lie in the same orbit of the induced structure automorphisms — some order automorphism of `J` @@ -74,21 +78,21 @@ theorem LocalEMContext.exists_carrierEquiv_of_tupleCode_eq -- in place, whereas `Eq.trans` elaborates at default transparency. have hexp : (some fun i => locJExpand Λ J ((ctx.tupleSupport b).orderEmbOfFin hk.symm) (locJCompress Λ J (ctx.tupleSupport a) (Quotient.out (a i)) - (ctx.locJSupport_out_subset_tupleSupport a i))) + (by exact ctx.locJSupport_out_subset_tupleSupport a i))) = some fun i => locJExpand Λ J ((ctx.tupleSupport b).orderEmbOfFin rfl) (locJCompress Λ J (ctx.tupleSupport b) (Quotient.out (b i)) (ctx.locJSupport_out_subset_tupleSupport b i)) := (dite_eq_left hk.symm).symm.trans (hcode.trans (dite_eq_left rfl)) have hcomp : locJExpand Λ J ((ctx.tupleSupport b).orderEmbOfFin hk.symm) (locJCompress Λ J (ctx.tupleSupport a) (Quotient.out (a i)) - (ctx.locJSupport_out_subset_tupleSupport a i)) + (by exact ctx.locJSupport_out_subset_tupleSupport a i)) = Quotient.out (b i) := by have hBi := congrFun (Option.some.inj hexp) i exact hBi.trans (locJExpand_compress Λ J (ctx.tupleSupport b) (Quotient.out (b i)) (ctx.locJSupport_out_subset_tupleSupport b i)) have hterm : locJRename Λ J e (Quotient.out (a i)) = Quotient.out (b i) := by conv_lhs => rw [← locJExpand_compress Λ J (ctx.tupleSupport a) (Quotient.out (a i)) - (ctx.locJSupport_out_subset_tupleSupport a i)] + (by exact ctx.locJSupport_out_subset_tupleSupport a i)] rw [locJRename_expand Λ J e _ _ he] exact hcomp calc ctx.carrierEquiv e (a i) diff --git a/LeanPool/InfinitaryLogic/Methods/LocalSkolem.lean b/LeanPool/InfinitaryLogic/Methods/LocalSkolem.lean index b9d453dba3..ebd423f706 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalSkolem.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalSkolem.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.SkolemClosure +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics /-! # Local (family-restricted) Skolem language `localSkolem` @@ -23,6 +25,8 @@ This file builds the language, its Hilbert-choice structure, and its countabilit recursive language/closure tower is a later chunk. -/ +@[expose] public section + universe u v w namespace FirstOrder.Language diff --git a/LeanPool/InfinitaryLogic/Methods/LocalSkolemUniversal.lean b/LeanPool/InfinitaryLogic/Methods/LocalSkolemUniversal.lean index 3e9ee1daad..8a3107e900 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalSkolemUniversal.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalSkolemUniversal.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalEMTruth +module + +public import LeanPool.InfinitaryLogic.Methods.LocalEMTruth /-! # The local Skolem-universality mixin @@ -27,6 +29,8 @@ as wrappers supplying the canonical proof) and discharges it for `schemaTermStru restricted schema truth lemma. -/ +@[expose] public section + namespace FirstOrder.Language /-- **The Skolem-universality mixin**: in a given `localColim` structure, every staged diff --git a/LeanPool/InfinitaryLogic/Methods/LocalTower.lean b/LeanPool/InfinitaryLogic/Methods/LocalTower.lean index 0dbc775d34..ef747316e2 100644 --- a/LeanPool/InfinitaryLogic/Methods/LocalTower.lean +++ b/LeanPool/InfinitaryLogic/Methods/LocalTower.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalSkolem +module + +public import LeanPool.InfinitaryLogic.Methods.LocalSkolem +public import LeanPool.InfinitaryLogic.Lomega1omega.Operations +public import LeanPool.InfinitaryLogic.Methods.SkolemClosure /-! # The countable local Skolem tower `Llocal` / `Γlocal` @@ -32,6 +36,8 @@ this chunk** is that every stage is countable — both the language's symbol typ countability live in `LocalColimit.lean`; here we stop at the tower and its stagewise countability. -/ +@[expose] public section + universe u v w namespace FirstOrder.Language @@ -71,7 +77,7 @@ added to the successor family. -/ /-- The **local Skolem witness term** for the symbol `sym` (a formula `φ ∈ Γ` of arity `n+1`): the function symbol `sym` — in the `localSkolem` summand — applied to the argument terms `ts`, as a term of `L.sum (localSkolem L Γ)`. Local analogue of `skolemTerm`. -/ -private def localSkolemTerm {Γ : Set (Σ n, L.BoundedFormulaω Empty n)} {γ : Type*} {n : ℕ} +def localSkolemTerm {Γ : Set (Σ n, L.BoundedFormulaω Empty n)} {γ : Type*} {n : ℕ} (sym : (localSkolem L Γ).Functions n) (ts : Fin n → (L.sum (localSkolem L Γ)).Term γ) : (L.sum (localSkolem L Γ)).Term γ := Term.func (Sum.inr sym : (L.sum (localSkolem L Γ)).Functions n) ts @@ -95,7 +101,7 @@ exactly these symbols. -/ /-- The negated body contributed by a single family member: a universal `∀ψ` (arity `n`) contributes `¬ψ` (arity `n+1`) — the formula whose local Skolem symbol the EM `all`-case consumes; every other form contributes nothing. -/ -private def allNegBody : (Σ n, L.BoundedFormulaω Empty n) → Set (Σ n, L.BoundedFormulaω Empty n) +def allNegBody : (Σ n, L.BoundedFormulaω Empty n) → Set (Σ n, L.BoundedFormulaω Empty n) | ⟨_, .all ψ⟩ => {⟨_, ψ.not⟩} | _ => ∅ @@ -134,7 +140,7 @@ def skolemNeedSymbol {Γ : Set (Σ n, L.BoundedFormulaω Empty n)} {n : ℕ} {ψ : L.BoundedFormulaω Empty (n + 1)} (h : (⟨n, .all ψ⟩ : Σ n, L.BoundedFormulaω Empty n) ∈ Γ) : (localSkolem L (skolemNeed Γ)).Functions n := - ⟨ψ.not, not_mem_skolemNeed_of_all_mem h⟩ + ⟨ψ.not, by exact not_mem_skolemNeed_of_all_mem h⟩ /-! ### Seed of the successor family @@ -143,7 +149,7 @@ when `Γ` is, so the whole seed is. -/ /-- The **lift** of `Γ` into the successor language `L.sum (localSkolem L Γ)` along the left injection `LHom.sumInl`. Arity is preserved. -/ -private def liftGamma (Γ : Set (Σ n, L.BoundedFormulaω Empty n)) : +def liftGamma (Γ : Set (Σ n, L.BoundedFormulaω Empty n)) : Set (Σ n, (L.sum (localSkolem L Γ)).BoundedFormulaω Empty n) := (fun p : Σ n, L.BoundedFormulaω Empty n => (⟨p.1, p.2.mapLanguage (LHom.sumInl : L →ᴸ L.sum (localSkolem L Γ))⟩ : @@ -155,7 +161,7 @@ private theorem liftGamma_countable {Γ : Set (Σ n, L.BoundedFormulaω Empty n) /-- The **Skolem-witness seed**: the witness formula of every local Skolem symbol. Indexed by the symbol type `Σ n, (localSkolem L Γ).Functions n`, which is countable when `Γ` is. -/ -private def localSkWitnessSeed (Γ : Set (Σ n, L.BoundedFormulaω Empty n)) : +def localSkWitnessSeed (Γ : Set (Σ n, L.BoundedFormulaω Empty n)) : Set (Σ n, (L.sum (localSkolem L Γ)).BoundedFormulaω Empty n) := Set.range fun sym : Σ n, (localSkolem L Γ).Functions n => (⟨sym.1, localSkolemWitnessFormula sym.2⟩ : @@ -173,7 +179,7 @@ private theorem localSkWitnessSeed_countable the *de-substituted* formulas `deForm S φ ts` of its members; but `deForm` is defined over a term-model carrier `J` (see `EMTermModel.deForm`), which does not exist at the pure language-tower level. This named slot is empty until the local colimit and its term model are in place. -/ -private def deFormSeed (Γ : Set (Σ n, L.BoundedFormulaω Empty n)) : +def deFormSeed (Γ : Set (Σ n, L.BoundedFormulaω Empty n)) : Set (Σ n, (L.sum (localSkolem L Γ)).BoundedFormulaω Empty n) := ∅ /-- The reserved deForm seed is (trivially) countable. -/ @@ -182,7 +188,7 @@ private theorem deFormSeed_countable (Γ : Set (Σ n, L.BoundedFormulaω Empty n /-- The full **seed** of the successor family: the lift of `Γ`, the Skolem-witness bodies, and the reserved deForm slot. -/ -private def localSeed (Γ : Set (Σ n, L.BoundedFormulaω Empty n)) : +def localSeed (Γ : Set (Σ n, L.BoundedFormulaω Empty n)) : Set (Σ n, (L.sum (localSkolem L Γ)).BoundedFormulaω Empty n) := liftGamma Γ ∪ localSkWitnessSeed Γ ∪ deFormSeed Γ @@ -197,7 +203,7 @@ private theorem localSeed_countable {Γ : Set (Σ n, L.BoundedFormulaω Empty n) successor seed. Closing under `bfSubformulas` makes `Γ_{k+1}` closed under immediate subformulas and countable-connective components — the structural-induction requirement of the truth lemma — while the Skolem-witness and (reserved) deForm generators sit in the seed. -/ -private def localGammaNext (Γ : Set (Σ n, L.BoundedFormulaω Empty n)) : +def localGammaNext (Γ : Set (Σ n, L.BoundedFormulaω Empty n)) : Set (Σ n, (L.sum (localSkolem L Γ)).BoundedFormulaω Empty n) := setClosure bfSubformulas (localSeed Γ) @@ -238,13 +244,13 @@ language via `sum_sigma_functions_countable` / `sum_sigma_relations_countable` t def LocalStage.succ (s : LocalStage) : LocalStage where Lang := s.Lang.sum (localSkolem s.Lang (skolemNeed s.Gamma)) Gamma := localGammaNext (skolemNeed s.Gamma) - gamma_countable := localGammaNext_countable (skolemNeed_countable s.gamma_countable) - fun_countable := - sum_sigma_functions_countable s.fun_countable + gamma_countable := by exact localGammaNext_countable (skolemNeed_countable s.gamma_countable) + fun_countable := by + exact sum_sigma_functions_countable s.fun_countable (localSkolem_sigma_functions_countable (skolemNeed s.Gamma) (skolemNeed_countable s.gamma_countable)) - rel_countable := - sum_sigma_relations_countable s.rel_countable + rel_countable := by + exact sum_sigma_relations_countable s.rel_countable (localSkolem_sigma_relations_countable (skolemNeed s.Gamma)) /-- The **local Skolem tower** seeded at `s₀`: stage `0` is the seed and each successor Skolemizes diff --git a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/CodeClass.lean b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/CodeClass.lean index f3eb4b8bea..da98a25871 100644 --- a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/CodeClass.lean +++ b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/CodeClass.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LopezEscobar.StandardModel +module + +public import LeanPool.InfinitaryLogic.Methods.LopezEscobar.StandardModel +public import LeanPool.InfinitaryLogic.Descriptive.LopezEscobarEasy import LeanPool.InfinitaryLogic.Descriptive.CodeTransport -import LeanPool.InfinitaryLogic.Descriptive.LopezEscobarEasy +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Reconstruction and the code-class equality (issue #10, Unit 3b) @@ -19,6 +25,8 @@ sentence, read a branch off it, and land the base reduct back in `B` — **the o `codeReduct '' ModelsOf (pcSentence side T) = B`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure Set diff --git a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/Disjoint.lean b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/Disjoint.lean index 3fc58e20d5..4897018c9a 100644 --- a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/Disjoint.lean +++ b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/Disjoint.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Methods.LopezEscobar.CodeClass +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment +import LeanPool.InfinitaryLogic.Descriptive.CodeTransport +import LeanPool.InfinitaryLogic.Descriptive.InvariantMeasurableSpace import LeanPool.InfinitaryLogic.Methods.LopezEscobar.TaggedGlue -import LeanPool.InfinitaryLogic.Methods.LopezEscobar.CodeClass import LeanPool.InfinitaryLogic.ModelTheory.FragmentLowenheimSkolem -import LeanPool.InfinitaryLogic.Lomega1omega.Entailment -import LeanPool.InfinitaryLogic.Descriptive.InvariantMeasurableSpace +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The sole Löwenheim–Skolem consumer (issue #10, Unit 4 commit 3) @@ -21,6 +28,8 @@ Endpoints: `pcMem_disjoint` and `pcSentences_entails_not`, the latter being exac Unit 5 feeds to `craig_pcSeparation_relational`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure Set diff --git a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/FunctionalTheta.lean b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/FunctionalTheta.lean index 62283e7125..5a5aa8f4b0 100644 --- a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/FunctionalTheta.lean +++ b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/FunctionalTheta.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LopezEscobar.WitnessLang -import LeanPool.InfinitaryLogic.Descriptive.QueryCode -import LeanPool.InfinitaryLogic.Lomega1omega.FiniteQuantification +module + +public import LeanPool.InfinitaryLogic.Methods.LopezEscobar.WitnessLang +public import LeanPool.InfinitaryLogic.Descriptive.QueryCode +public import LeanPool.InfinitaryLogic.Lomega1omega.FiniteQuantification +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Measurability.Init +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The functional Θ: syntax and semantics (issue #10, Unit 2a) @@ -33,6 +40,8 @@ with `queryCode` of the base-reduct code `pulledCode`); the tree pinning as an * (`realize_treeDiagram`); and the bundled `functionalTheta T`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure Set @@ -323,7 +332,7 @@ theorem realize_defaultAxiom [Countable (Σ l, L.Relations l)] variable (L) in /-- The tree atom at level `n`: `tree n` applied to the bit-numerals of `σ` followed by the numerals of `τ`. -/ -private def treeAtom (n : ℕ) (σ : Fin n → Bool) (τ : Fin n → ℕ) : (MidLang L).Sentenceω := +def treeAtom (n : ℕ) (σ : Fin n → Bool) (τ : Fin n → ℕ) : (MidLang L).Sentenceω := BoundedFormulaω.rel (Sum.inr (WitnessRel.tree n) : (MidLang L).Relations (2 * n)) (fun i : Fin (2 * n) => if h : (i : ℕ) < n then mNum L _ (cond (σ ⟨i, h⟩) 1 0) diff --git a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/PCMem.lean b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/PCMem.lean index 0f3fad9863..5748104c7d 100644 --- a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/PCMem.lean +++ b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/PCMem.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.ModelTheory.PCClass -import LeanPool.InfinitaryLogic.Methods.LopezEscobar.StandardModel +module + +public import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphLanguage +public import LeanPool.InfinitaryLogic.Methods.LopezEscobar.WitnessLang +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Measurability.Init +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The López–Escobar PC-class interface (issue #10, Unit 4 commit 1) @@ -14,6 +21,8 @@ membership in `codeReduct '' ModelsOf Θ`. This freezes the PC-class interface of López–Escobar's tree machinery. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure Set diff --git a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/PCSentence.lean b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/PCSentence.lean index 5c8dafac56..cc48444232 100644 --- a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/PCSentence.lean +++ b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/PCSentence.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LopezEscobar.FunctionalTheta +module + +public import LeanPool.InfinitaryLogic.Methods.LopezEscobar.FunctionalTheta +public import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphReconstruction +import LeanPool.InfinitaryLogic.Methods.ConstantSupport import LeanPool.InfinitaryLogic.Methods.LanguageMapOccurrence -import LeanPool.InfinitaryLogic.Methods.LopezEscobar.WitnessLang -import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphReconstruction -import LeanPool.InfinitaryLogic.Methods.SchemaCompletion +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Measurability.Init +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Assembly and graph translation: the PC sentence (issue #10, Unit 2b) @@ -30,6 +36,8 @@ Acceptance gates (audit v2, Unit 2b): `pcSentence_relationsIn_inter` is the two-presentation intersection bound. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure Set diff --git a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/Separation.lean b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/Separation.lean index d2b3967fe9..4ad94ca5b2 100644 --- a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/Separation.lean +++ b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/Separation.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LopezEscobar.SharedDecoder -import LeanPool.InfinitaryLogic.Methods.LopezEscobar.Disjoint -import LeanPool.InfinitaryLogic.Methods.Interpolation.CraigSeparation +module + +public import LeanPool.InfinitaryLogic.Descriptive.LopezEscobarEasy import LeanPool.InfinitaryLogic.Descriptive.AnalyticTree +import LeanPool.InfinitaryLogic.Descriptive.Polish +import LeanPool.InfinitaryLogic.Methods.Interpolation.CraigSeparation +import LeanPool.InfinitaryLogic.Methods.LopezEscobar.Disjoint +import LeanPool.InfinitaryLogic.Methods.LopezEscobar.SharedDecoder /-! # López–Escobar, hard direction (issue #10, Unit 5b) @@ -29,6 +33,8 @@ So `IsomorphismInvariant` is consumed exactly where Unit 3b/Unit 4 already consu inside `pcSentences_entails_not`; this unit adds no further use of it. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure Set diff --git a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/SharedDecoder.lean b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/SharedDecoder.lean index 021d1c91d9..24cdd8366d 100644 --- a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/SharedDecoder.lean +++ b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/SharedDecoder.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LopezEscobar.CodeClass +module + +public import LeanPool.InfinitaryLogic.Methods.LopezEscobar.CodeClass +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The shared-symbol decoder (issue #10, Unit 5a) @@ -26,6 +32,8 @@ Contents: sentence holds in the sublanguage reduct of `d` iff its decoding holds in `codeReduct d`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure Set @@ -69,7 +77,8 @@ noncomputable def sharedToBase (T₀ T₁ : (n : ℕ) → Set ((Fin n → Bool) sharedLang L T₀ T₁ →ᴸ L where onFunction {_} f := f.1.elim onRelation {_} r := - Classical.choose (exists_base_of_mem_relSym (pcSentence_relationsIn_inter T₀ T₁ r.2)) + Classical.choose (private_decl% + (exists_base_of_mem_relSym (pcSentence_relationsIn_inter T₀ T₁ r.2))) /-- The decoder recovers the shared symbol: its base image is the symbol itself. -/ private theorem sharedToBase_onRelation_spec diff --git a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/StandardModel.lean b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/StandardModel.lean index 44c40d26d6..1f90bae25d 100644 --- a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/StandardModel.lean +++ b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/StandardModel.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LopezEscobar.PCSentence -import LeanPool.InfinitaryLogic.Descriptive.SatisfactionBorel +module + +public import LeanPool.InfinitaryLogic.Methods.LopezEscobar.PCSentence +public import LeanPool.InfinitaryLogic.Descriptive.SatisfactionBorel +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The standard functional model and the forward presentation (issue #10, Unit 3a) @@ -21,6 +27,8 @@ Forward acceptance gate (`subset_pcClass`): `c ∈ B → ∃ d, codeReduct d = c d ∈ ModelsOf (pcSentence side T)` — **without** `IsomorphismInvariant`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure Set @@ -55,17 +63,17 @@ theorem decodeBit_cond (b : Bool) : decodeBit (cond b 1 0) = b := by cases b <;> rfl /-- The first-half `Fin (2n)` index of `i : Fin n`. -/ -private def firstIdx (n : ℕ) (i : Fin n) : Fin (2 * n) := ⟨(i : ℕ), by omega⟩ +def firstIdx (n : ℕ) (i : Fin n) : Fin (2 * n) := ⟨(i : ℕ), by omega⟩ /-- The second-half `Fin (2n)` index of `i : Fin n`. -/ -private def secondIdx (n : ℕ) (i : Fin n) : Fin (2 * n) := ⟨n + (i : ℕ), by omega⟩ +def secondIdx (n : ℕ) (i : Fin n) : Fin (2 * n) := ⟨n + (i : ℕ), by omega⟩ variable (c : StructureSpace L) (g : ℕ → ℕ) (T : (n : ℕ) → Set ((Fin n → Bool) × (Fin n → ℕ))) /-- The witness function interpretation on `ℕ`: `c ↦ 0`, `s ↦ succ`, `f ↦` the query bit, `g ↦` the branch. -/ -private noncomputable def wFun : {k : ℕ} → WitnessFun k → (Fin k → ℕ) → ℕ +noncomputable def wFun : {k : ℕ} → WitnessFun k → (Fin k → ℕ) → ℕ | _, .c, _ => 0 | _, .s, a => a 0 + 1 | _, .f, a => cond (queryCode c (a 0)) 1 0 @@ -73,7 +81,7 @@ private noncomputable def wFun : {k : ℕ} → WitnessFun k → (Fin k → ℕ) /-- The witness (tree) relation interpretation on `ℕ`: `tree n` decodes the first half as bits, the second half as `τ`, and asks membership in `T n`. -/ -private def wRel : {k : ℕ} → WitnessRel k → (Fin k → ℕ) → Prop +def wRel : {k : ℕ} → WitnessRel k → (Fin k → ℕ) → Prop | _, .tree n, u => ((fun i : Fin n => decodeBit (u (firstIdx n i))), (fun i : Fin n => u (secondIdx n i))) ∈ T n diff --git a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/TaggedGlue.lean b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/TaggedGlue.lean index 6cef77df36..a4aa0e22f0 100644 --- a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/TaggedGlue.lean +++ b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/TaggedGlue.lean @@ -3,7 +3,17 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LopezEscobar.PCMem +module + +public import LeanPool.InfinitaryLogic.Methods.LopezEscobar.PCMem +public import LeanPool.InfinitaryLogic.Methods.LopezEscobar.PCSentence +public import LeanPool.InfinitaryLogic.ModelTheory.PCClass +import LeanPool.InfinitaryLogic.Methods.ConstantSupport +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Measurability.Init +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Tagged-expansion gluing (issue #10, Unit 4 commit 2) @@ -17,6 +27,8 @@ Endpoint (`pcMem_glue`): `PCMem ψleft M ∧ PCMem ψright M → ∃ S, Realize the realizations using `S`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure Set diff --git a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/WitnessLang.lean b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/WitnessLang.lean index f9ae76e05d..abb48681c2 100644 --- a/LeanPool/InfinitaryLogic/Methods/LopezEscobar/WitnessLang.lean +++ b/LeanPool/InfinitaryLogic/Methods/LopezEscobar/WitnessLang.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage +module + +public import Mathlib.ModelTheory.LanguageMap /-! # The functional witness language (issue #10, Unit 1 part 1) @@ -22,6 +24,8 @@ witness, and right witness symbols; the tagged symbol-image sets; and their pair disjointness (the combinatorial half of the Unit-1 occurrence gate). -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder diff --git a/LeanPool/InfinitaryLogic/Methods/MarkerStage.lean b/LeanPool/InfinitaryLogic/Methods/MarkerStage.lean index 02f4d0dba7..db26866356 100644 --- a/LeanPool/InfinitaryLogic/Methods/MarkerStage.lean +++ b/LeanPool/InfinitaryLogic/Methods/MarkerStage.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Methods.ConstantSupport +public import Mathlib.SetTheory.Cardinal.Aleph +import LeanPool.InfinitaryLogic.Combinatorics.FiniteArityErdosRadoInduction +import LeanPool.InfinitaryLogic.Lomega1omega.OpenBoundsSemantics import Mathlib.Data.Finset.Sort import Mathlib.SetTheory.Cardinal.Regular -import LeanPool.InfinitaryLogic.Combinatorics.FiniteArityErdosRadoInduction -import LeanPool.InfinitaryLogic.Lomega1omega.Theory -import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage -import LeanPool.InfinitaryLogic.Methods.ConstantSupport -import LeanPool.InfinitaryLogic.Methods.Henkin.Construction /-! # The Marker stage: finite-fragment support extraction and Erdős–Rado certification @@ -88,6 +89,8 @@ witness index (enabled by the finite-Henkin-support invariant — see the Layer note), then the Henkin construction/model-existence adapter decision. -/ +@[expose] public section + universe u namespace FirstOrder.Language diff --git a/LeanPool/InfinitaryLogic/Methods/PolarityCalculus.lean b/LeanPool/InfinitaryLogic/Methods/PolarityCalculus.lean index 5031e5287f..ffad38d8d8 100644 --- a/LeanPool/InfinitaryLogic/Methods/PolarityCalculus.lean +++ b/LeanPool/InfinitaryLogic/Methods/PolarityCalculus.lean @@ -3,14 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Polarity -import LeanPool.InfinitaryLogic.Lomega1omega.FiniteQuantification -import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage -import LeanPool.InfinitaryLogic.Methods.ConstantSupport -import LeanPool.InfinitaryLogic.Methods.ConstantAbstraction -import LeanPool.InfinitaryLogic.Methods.Interpolation.ConstantElimination -import LeanPool.InfinitaryLogic.Methods.Interpolation.QuantifierRoundTrip -import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.GeneratedUniverse +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Polarity +public import LeanPool.InfinitaryLogic.Methods.Interpolation.ConstantElimination +public import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.GeneratedUniverse /-! # The signed occurrence calculus (issue #14, Unit 0 layer 2) @@ -34,6 +31,8 @@ Acceptance gates of Unit 0 (all in this file or its Core companion): No semantics and no inseparability notions appear in Unit 0. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder diff --git a/LeanPool/InfinitaryLogic/Methods/SchemaCompletion.lean b/LeanPool/InfinitaryLogic/Methods/SchemaCompletion.lean index 1c98a9f0a9..abcf72b95b 100644 --- a/LeanPool/InfinitaryLogic/Methods/SchemaCompletion.lean +++ b/LeanPool/InfinitaryLogic/Methods/SchemaCompletion.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.SchemaOmegaWitness +module + +public import LeanPool.InfinitaryLogic.Methods.MarkerStage +public import LeanPool.InfinitaryLogic.Methods.EM.Realization +public import LeanPool.InfinitaryLogic.Methods.LocalEMFamily import LeanPool.InfinitaryLogic.Methods.LanguageMapOccurrence -import LeanPool.InfinitaryLogic.Methods.MarkerStage +import LeanPool.InfinitaryLogic.Methods.SchemaOmegaWitness +import Mathlib.Order.Lattice.Nat /-! # Layer 7b, checkpoint 1: the countable schema sentence universe @@ -35,6 +40,8 @@ No completion, Zorn, term model, or `realizeWith` bridge appears here — this c pins the countable substrate. -/ +@[expose] public section + namespace FirstOrder.Language open Cardinal @@ -269,7 +276,7 @@ variable {s₀ : LocalStage} {M : Type} [(localColim s₀).Structure M] [LinearO the decided sign's connective: a positive `iSup` gets a disjunct, a negative `iInf` a refuted conjunct. Returns the next stage with consistency, monotonicity, and the balanced decision record `(positive ∧ iSup-witnessed) ∨ (negative ∧ neg-iInf-witnessed)`. -/ -private noncomputable def stageStep +noncomputable def stageStep (Fp : {F : Finset (((localColim s₀)[[ℕ]])[[ℕ]].Sentenceω) // MarkerHenkinConsistent M F}) (n : ℕ) : {G : Finset (((localColim s₀)[[ℕ]])[[ℕ]].Sentenceω) // @@ -317,10 +324,10 @@ private noncomputable def stageStep exact absurd ⟨φs', hφs'⟩ hInf /-- **The completion stages.** `T 0 = ∅`; `T (n+1)` is the `stageStep` of `T n`. -/ -private noncomputable def schemaCompletionStage +noncomputable def schemaCompletionStage (hM : Cardinal.beth (Ordinal.omega 1) ≤ Cardinal.mk M) : ℕ → {F : Finset (((localColim s₀)[[ℕ]])[[ℕ]].Sentenceω) // MarkerHenkinConsistent M F} - | 0 => ⟨∅, markerHenkinConsistent_empty hM⟩ + | 0 => ⟨∅, by exact markerHenkinConsistent_empty hM⟩ | n + 1 => ⟨(stageStep ρ (schemaCompletionStage hM n) n).1, (stageStep ρ (schemaCompletionStage hM n) n).2.1⟩ @@ -413,13 +420,13 @@ variable {s₀ : LocalStage} {M : Type} [(localColim s₀).Structure M] [LinearO /-- **The canonical enumeration** of the schema universe (from countable + nonempty). -/ noncomputable def schemaEnumeration (s₀ : LocalStage) : ℕ → FSentence (L'' := localColim s₀) (J := ℕ) := - ((schemaFSentenceUniverse_countable (s₀ := s₀)).exists_eq_range - schemaFSentenceUniverse_nonempty).choose + (private_decl% ((schemaFSentenceUniverse_countable (s₀ := s₀)).exists_eq_range + schemaFSentenceUniverse_nonempty)).choose private theorem schemaEnumeration_range : Set.range (schemaEnumeration s₀) = schemaFSentenceUniverse s₀ := - (((schemaFSentenceUniverse_countable (s₀ := s₀)).exists_eq_range - schemaFSentenceUniverse_nonempty).choose_spec).symm + ((private_decl% ((schemaFSentenceUniverse_countable (s₀ := s₀)).exists_eq_range + schemaFSentenceUniverse_nonempty)).choose_spec).symm variable (ρ : ℕ → FSentence (L'' := localColim s₀) (J := ℕ)) (hM : Cardinal.beth (Ordinal.omega 1) ≤ Cardinal.mk M) diff --git a/LeanPool/InfinitaryLogic/Methods/SchemaLocalEMSource.lean b/LeanPool/InfinitaryLogic/Methods/SchemaLocalEMSource.lean index f20a5fcaf1..7e883ecb58 100644 --- a/LeanPool/InfinitaryLogic/Methods/SchemaLocalEMSource.lean +++ b/LeanPool/InfinitaryLogic/Methods/SchemaLocalEMSource.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalSkolemUniversal -import LeanPool.InfinitaryLogic.Methods.SchemaTermTruth +module + +public import LeanPool.InfinitaryLogic.Methods.EM.FragmentAdapter +public import LeanPool.InfinitaryLogic.Methods.EM.TailAdapter +public import LeanPool.InfinitaryLogic.Methods.LocalEMTruthLemma +public import LeanPool.InfinitaryLogic.Methods.SchemaTermModel +import LeanPool.InfinitaryLogic.Methods.LocalEMTemplateRealization +public import LeanPool.InfinitaryLogic.Methods.SchemaTermTruth /-! # The schema term model as a local-EM source @@ -24,6 +30,8 @@ a contradiction. The universal sentence is therefore positive, and the truth lem into the quotient. -/ +@[expose] public section + namespace FirstOrder.Language open Cardinal diff --git a/LeanPool/InfinitaryLogic/Methods/SchemaOmegaWitness.lean b/LeanPool/InfinitaryLogic/Methods/SchemaOmegaWitness.lean index d1f08049e2..c3dd838ebc 100644 --- a/LeanPool/InfinitaryLogic/Methods/SchemaOmegaWitness.lean +++ b/LeanPool/InfinitaryLogic/Methods/SchemaOmegaWitness.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.LocalEMTemplateRealization +module + +public import LeanPool.InfinitaryLogic.Methods.EM.TailAdapter +public import LeanPool.InfinitaryLogic.Methods.LocalEMTruthLemma +import Mathlib.Order.Filter.AtTopBot.Basic +import Mathlib.Order.Lattice.Nat /-! # Layer 7a: the schema-template Ω-witness bridge @@ -24,6 +29,8 @@ No enumeration, Zorn, or term model appears here — this is the interface miles the shape the ω-stage completion (Layer 7b) must produce. -/ +@[expose] public section + namespace FirstOrder.Language open Filter diff --git a/LeanPool/InfinitaryLogic/Methods/SchemaTermModel.lean b/LeanPool/InfinitaryLogic/Methods/SchemaTermModel.lean index 8541e62962..d2cfc8eed4 100644 --- a/LeanPool/InfinitaryLogic/Methods/SchemaTermModel.lean +++ b/LeanPool/InfinitaryLogic/Methods/SchemaTermModel.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.SchemaCompletion +module + +public import LeanPool.InfinitaryLogic.Methods.SchemaCompletion +import LeanPool.InfinitaryLogic.Lomega1omega.OpenBoundsSemantics /-! # Layer 7b checkpoint 5a: the schema term-model substrate @@ -27,6 +30,8 @@ sequence `schemaSeq` (the classes of the `d`-constants). No `iSup`, `all`, or tr that is checkpoint 5b. -/ +@[expose] public section + namespace FirstOrder.Language open Cardinal @@ -338,7 +343,7 @@ private theorem schemaTermRel_congr {l : ℕ} (R : (localColim s₀).Relations l /-- The setoid on closed schema terms induced by the completed theory. -/ def schemaTermSetoid : Setoid ((localColim s₀)[[ℕ]].Term Empty) where r := SchemaTermEq hM - iseqv := ⟨schemaTermEq_refl hM, schemaTermEq_symm hM, schemaTermEq_trans hM⟩ + iseqv := by exact ⟨schemaTermEq_refl hM, schemaTermEq_symm hM, schemaTermEq_trans hM⟩ /-- **The schema term-model carrier**: closed `(localColim s₀)[[ℕ]]` terms quotiented by the completed theory's equality. An `abbrev`, so `Quotient` lemmas and dot-notation apply diff --git a/LeanPool/InfinitaryLogic/Methods/SchemaTermTruth.lean b/LeanPool/InfinitaryLogic/Methods/SchemaTermTruth.lean index 0d9759ba6f..984e4eb7eb 100644 --- a/LeanPool/InfinitaryLogic/Methods/SchemaTermTruth.lean +++ b/LeanPool/InfinitaryLogic/Methods/SchemaTermTruth.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.SchemaTermModel +module + +public import LeanPool.InfinitaryLogic.Methods.SchemaTermModel +public import LeanPool.InfinitaryLogic.Methods.SchemaOmegaWitness +import LeanPool.InfinitaryLogic.Lomega1omega.OpenBoundsSemantics /-! # Layer 7b, checkpoint 5b-3: the restricted schema truth lemma @@ -20,6 +24,8 @@ proof is the same contrapositive Hilbert-choice argument — `localSkolem_funMap tuple-shape hypothesis, so nothing about `σ` is used beyond interpreting the argument terms. -/ +@[expose] public section + namespace FirstOrder.Language open Cardinal diff --git a/LeanPool/InfinitaryLogic/Methods/SkolemClosure.lean b/LeanPool/InfinitaryLogic/Methods/SkolemClosure.lean index 0399ae46b1..d600c96b24 100644 --- a/LeanPool/InfinitaryLogic/Methods/SkolemClosure.lean +++ b/LeanPool/InfinitaryLogic/Methods/SkolemClosure.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.SkolemColimit -import LeanPool.InfinitaryLogic.Lomega1omega.Operations +module + +public import LeanPool.InfinitaryLogic.Mathlib.ModelTheory.Infinitary.Syntax /-! # Staged set-closure (generic core for the Skolem-closed family `Γ*`) @@ -19,13 +20,15 @@ The concrete formula `stepOne` (subformulas / components / Skolem witnesses / re to the lifted EM starting family. -/ +@[expose] public section + namespace FirstOrder.Language variable {α : Type*} /-- Stages of closing `Γ₀` under the pointwise expansion `stepOne`: stage `0` is the seed, each successor adds `stepOne x` for every `x` already present. Increasing by construction. -/ -private def iterClosure (stepOne : α → Set α) (Γ₀ : Set α) : ℕ → Set α +def iterClosure (stepOne : α → Set α) (Γ₀ : Set α) : ℕ → Set α | 0 => Γ₀ | k + 1 => iterClosure stepOne Γ₀ k ∪ ⋃ x ∈ iterClosure stepOne Γ₀ k, stepOne x diff --git a/LeanPool/InfinitaryLogic/Methods/SkolemColimit.lean b/LeanPool/InfinitaryLogic/Methods/SkolemColimit.lean index cf1e544e29..b4bb8a7694 100644 --- a/LeanPool/InfinitaryLogic/Methods/SkolemColimit.lean +++ b/LeanPool/InfinitaryLogic/Methods/SkolemColimit.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import Mathlib.ModelTheory.Basic +module + +public import Aesop.BuiltinRules +public import Mathlib.Data.Nat.Notation +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # Sequential colimits @@ -11,6 +18,8 @@ import Mathlib.ModelTheory.Basic tower uses this generic construction for its function and relation symbols. -/ +@[expose] public section + namespace FirstOrder.Language /-! ### Sequential colimit of types -/ diff --git a/LeanPool/InfinitaryLogic/Methods/SymbSublangExpansion.lean b/LeanPool/InfinitaryLogic/Methods/SymbSublangExpansion.lean index 1b5848a5a4..ee2b3806ea 100644 --- a/LeanPool/InfinitaryLogic/Methods/SymbSublangExpansion.lean +++ b/LeanPool/InfinitaryLogic/Methods/SymbSublangExpansion.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage -import LeanPool.InfinitaryLogic.Lomega1omega.Entailment +module + +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage +public import LeanPool.InfinitaryLogic.Lomega1omega.Entailment /-! # Semantic expansion of a two-sorted generated sublanguage (neutral prerequisite) @@ -25,6 +27,8 @@ of any `Conditional` file. via the expansion of an arbitrary sublanguage model. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/TailIndiscernible.lean b/LeanPool/InfinitaryLogic/Methods/TailIndiscernible.lean index 4afc2235c5..e23cdb9ea1 100644 --- a/LeanPool/InfinitaryLogic/Methods/TailIndiscernible.lean +++ b/LeanPool/InfinitaryLogic/Methods/TailIndiscernible.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Semantics +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics /-! # Tail-restricted `L_{ω₁ω}` indiscernibility (neutral definition) @@ -18,6 +20,8 @@ surface (imported by `TailAdapter.lean` → `Admissible.lean`); being neutral an harmless, unlike routing the def through the WIP-excluded `LocalEMSupport.lean`. -/ +@[expose] public section + universe u v namespace FirstOrder.Language diff --git a/LeanPool/InfinitaryLogic/Methods/UniformCollapse.lean b/LeanPool/InfinitaryLogic/Methods/UniformCollapse.lean index e67202954d..a532621664 100644 --- a/LeanPool/InfinitaryLogic/Methods/UniformCollapse.lean +++ b/LeanPool/InfinitaryLogic/Methods/UniformCollapse.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage +module + +public import LeanPool.InfinitaryLogic.Methods.GeneratedSublanguage +public import LeanPool.InfinitaryLogic.ModelTheory.Hanf +public import LeanPool.InfinitaryLogic.ModelTheory.InfinitaryTypes import LeanPool.InfinitaryLogic.Methods.LocalEMSmallModel -import LeanPool.InfinitaryLogic.ModelTheory.Hanf -import LeanPool.InfinitaryLogic.ModelTheory.InfinitaryTypes +import Mathlib.Data.Rat.Floor /-! # The uniform collapsing language (issue #11 unit 7b) @@ -28,6 +31,8 @@ supplied generically (`realize_mapLanguage`) and smallness descends by of the collapsed sentence. -/ +@[expose] public section + namespace FirstOrder namespace Language @@ -35,7 +40,7 @@ namespace Language variable {L : Language.{0, 0}} /-- The dummy language: one function and one relation symbol at every arity. -/ -private def dummyLang : Language.{0, 0} := +def dummyLang : Language.{0, 0} := ⟨fun _ => Unit, fun _ => Unit⟩ /-- The uniform countable target: `φ`'s generated sublanguage plus the dummies. -/ diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/BaseMember.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/BaseMember.lean index e3371dee70..e804b0f3c2 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/BaseMember.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/BaseMember.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.StarCondition import LeanPool.InfinitaryLogic.Methods.WellOrdering.MarkExtension +import LeanPool.InfinitaryLogic.Methods.WellOrdering.WORealization /-! # The initial member: `Bφ ∈ P` (issue #12, the mathematical starting gate) @@ -23,6 +27,8 @@ This separately certifies that the strengthened terminal/bottom-margin invariant that is consumed. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/ClosureFields.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/ClosureFields.lean index b0e3daa2cf..f9bae37c68 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/ClosureFields.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/ClosureFields.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.StarCondition +import LeanPool.InfinitaryLogic.Methods.Interpolation.PairedInsepFamily +import LeanPool.InfinitaryLogic.Methods.Interpolation.QuantifierRoundTrip +import LeanPool.InfinitaryLogic.Methods.WellOrdering.CofinalFiber import LeanPool.InfinitaryLogic.Methods.WellOrdering.MarkExtension +import LeanPool.InfinitaryLogic.Methods.WellOrdering.WORealization /-! # The closure fields (issue #12, commit 4b part 3 — Exercise 4.28) @@ -20,6 +27,8 @@ changes nothing); the genuine extensions go through `WOMem.extend`, whose three `StarWitness` operations of the previous commits. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/CofinalFiber.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/CofinalFiber.lean index 42e59890b6..849f5fa76f 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/CofinalFiber.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/CofinalFiber.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import Mathlib.SetTheory.Cardinal.Aleph import Mathlib.SetTheory.Cardinal.Regular /-! @@ -21,6 +24,8 @@ Proof: if every fiber were bounded, the supremum of countably many bounds would `ω₁` — contradicting the regularity of `ℵ₁` (via `Ordinal.iSup_lt_omega_one`). -/ +@[expose] public section + namespace FirstOrder.Language open Cardinal Ordinal diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/Constants.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/Constants.lean index 543a4d4d1d..e5718bf89d 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/Constants.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/Constants.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.GeneratedUniverse -import Mathlib.Data.Rat.Encodable +module + +public import Mathlib.Data.Rat.Encodable +public import LeanPool.InfinitaryLogic.Methods.ConstantSupport /-! # Constant coding for the undefinability of well-ordering (issue #12, commit 1) @@ -19,6 +21,8 @@ This commit is the coding layer only: the two index functions, their injectivity disjointness, and the term/sentence-level wrappers over the kernel's `constTerm`/`constTermS`. -/ +@[expose] public section + namespace FirstOrder.Language /-- The kernel index of the rational constant `d_q`. -/ diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/Descent.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/Descent.lean index 6f093ec52c..e896c90cc1 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/Descent.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/Descent.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.WellOrdering.GapWitness +module + +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.GapWitness import Mathlib.Algebra.Order.Ring.Rat /-! @@ -22,6 +24,8 @@ model extraction involved: strict-order hypotheses, so `RelEmbedding.natGT` is deliberately not used). -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/GapInsertion.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/GapInsertion.lean index 8bab948cc9..3f7b66ab26 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/GapInsertion.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/GapInsertion.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.WellOrdering.GapWitness -import Mathlib.Data.Fin.SuccPred +module + +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.GapWitness /-! # The four-case gap insertion engine (issue #12, risky engine 2) @@ -20,6 +21,8 @@ margin obligation is ordinal-rank arithmetic, and the four cases collapse into a `Fin.succAbove` case analysis. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/GapWitness.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/GapWitness.lean index b4b442665b..41225eb71a 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/GapWitness.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/GapWitness.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.WellOrdering.Constants -import Mathlib.SetTheory.Ordinal.Enum -import Mathlib.SetTheory.Cardinal.Aleph +module + +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.Constants +public import Mathlib.SetTheory.Cardinal.Aleph +public import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.GeneratedUniverse /-! # Base diagram, preservation predicate, and the gap witness (issue #12, commit 2) @@ -30,6 +32,8 @@ the uniform insertion lemma) needs the chain to be long enough to contain rank ` `GapWitness.mono` is the downward closure in `α` consumed by the `ω₁` fiber argument (C4). -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/GraphTranslation.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/GraphTranslation.lean index 76d8b4588a..d1a743cda5 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/GraphTranslation.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/GraphTranslation.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.WellOrdering.SymbolCountability +module + +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.GapWitness +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.Undefinability import LeanPool.InfinitaryLogic.Methods.Interpolation.GraphReconstruction +import LeanPool.InfinitaryLogic.Methods.WellOrdering.Descent +import LeanPool.InfinitaryLogic.Methods.WellOrdering.MarkExtension +import LeanPool.InfinitaryLogic.Methods.WellOrdering.SymbolCountability /-! # The arbitrary-language graph translation (issue #12, the final transport) @@ -25,6 +31,8 @@ The four public **arbitrary-language** endpoints of issue #12 live here: `wellOrder_type_boundedness` (Marker Corollary 4.27), and `wellOrdering_undefinable`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/MarkExtension.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/MarkExtension.lean index 58c0eacf61..da31979a0b 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/MarkExtension.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/MarkExtension.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.StarCondition +import LeanPool.InfinitaryLogic.Methods.WellOrdering.GapInsertion import LeanPool.InfinitaryLogic.Methods.WellOrdering.WORealization import Mathlib.Order.Interval.Finset.Fin +import Mathlib.SetTheory.Cardinal.Arithmetic /-! # Marking extension: the range-based constant split (issue #12, commit 4b part 2) @@ -30,6 +35,8 @@ like Henkin constants, as ordinary auxiliary constants with no rank insertion). invariant. Already-marked rationals need only downward closure. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/ModelExtraction.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/ModelExtraction.lean index 614cc9f8b7..c508f1eb6f 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/ModelExtraction.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/ModelExtraction.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.WellOrdering.WOConsistency +module + +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.GapWitness import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.QuotientTruthLemma +import LeanPool.InfinitaryLogic.Methods.WellOrdering.WOConsistency /-! # Model extraction from the completed well-ordering set (issue #12, step 5) @@ -18,6 +21,8 @@ quotient term model (the relational-core collapse of closed terms to constants), the later transport step, not done here. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/StarCondition.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/StarCondition.lean index d6de3d129b..cc545b592e 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/StarCondition.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/StarCondition.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.WellOrdering.GapInsertion -import LeanPool.InfinitaryLogic.Methods.WellOrdering.CofinalFiber -import LeanPool.InfinitaryLogic.Methods.ConstantAbstraction -import Mathlib.Algebra.Order.Ring.Unbundled.Rat +module + +public import LeanPool.InfinitaryLogic.Methods.ConstantAbstraction +public import Mathlib.Algebra.Order.Ring.Unbundled.Rat +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.GapWitness /-! # The semantic gap condition (*) and the member predicate (issue #12, commit 4a) @@ -32,6 +33,8 @@ universe containment (the kernel's `GenU`, whose seed already holds every consta atom — in particular all of `Bφ`'s diagram), and (*) at every countable ordinal. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/SymbolCountability.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/SymbolCountability.lean index ff14484c36..d85280974c 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/SymbolCountability.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/SymbolCountability.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.WellOrdering.Undefinability +module + +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.GapWitness import LeanPool.InfinitaryLogic.Methods.SymbSublangExpansion +import LeanPool.InfinitaryLogic.Methods.WellOrdering.ModelExtraction /-! # Removing symbol countability (issue #12, the sublanguage wrapper) @@ -23,6 +26,8 @@ relation survives the restriction): the separate arbitrary-function-language graph translation, not this wrapper. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/Undefinability.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/Undefinability.lean index b8937880cd..08d17d2ef5 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/Undefinability.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/Undefinability.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.WellOrdering.Descent -import LeanPool.InfinitaryLogic.Methods.WellOrdering.ModelExtraction +module + +public import Mathlib.SetTheory.Ordinal.Basic /-! # Undefinability of well-ordering (issue #12, step 6 layer 3) @@ -27,9 +28,11 @@ every other arity as empty — this avoids deciding equality against the disting `lt`, which a general language does not support. -/ +@[expose] public section + namespace FirstOrder.Language -open FirstOrder Structure +open FirstOrder /-- The all-arities relation family on an ordinal's type: binary positions get the ordinal order, every other arity is empty. -/ diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/WOConsistency.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/WOConsistency.lean index 4f39742b7b..c8fa1a2da0 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/WOConsistency.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/WOConsistency.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.WellOrdering.ClosureFields +module + +public import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.ConsistencyPropertyEqOn +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.GapWitness +import LeanPool.InfinitaryLogic.Methods.Henkin.CountableCompletion.FairEnumeration import LeanPool.InfinitaryLogic.Methods.WellOrdering.BaseMember +import LeanPool.InfinitaryLogic.Methods.WellOrdering.ClosureFields /-! # The bundled consistency property and completion endpoint (issue #12, packaging) @@ -27,6 +32,8 @@ Step 5 consumes the returned `S` opaquely: the quotient term model realizes the `RelPreserving`. -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/Methods/WellOrdering/WORealization.lean b/LeanPool/InfinitaryLogic/Methods/WellOrdering/WORealization.lean index 52770d429b..be19f13ea3 100644 --- a/LeanPool/InfinitaryLogic/Methods/WellOrdering/WORealization.lean +++ b/LeanPool/InfinitaryLogic/Methods/WellOrdering/WORealization.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Methods.WellOrdering.StarCondition -import LeanPool.InfinitaryLogic.Methods.SchemaCompletion +module + +public import LeanPool.InfinitaryLogic.Methods.WellOrdering.StarCondition import LeanPool.InfinitaryLogic.Methods.Interpolation.PairedInsepFamily +import LeanPool.InfinitaryLogic.Methods.LanguageMapOccurrence /-! # Realization helpers for the closure fields (issue #12, commit 4b part 1) @@ -29,6 +31,8 @@ The shared semantic tools the fifteen closure fields consume, isolated per revie `lift_eq_falsum_reflect`). -/ +@[expose] public section + namespace FirstOrder.Language open FirstOrder Structure diff --git a/LeanPool/InfinitaryLogic/ModelTheory/AElementary.lean b/LeanPool/InfinitaryLogic/ModelTheory/AElementary.lean index beab999df6..9d99b6ee2b 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/AElementary.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/AElementary.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Fragment -import LeanPool.InfinitaryLogic.Lomega1omega.Theory +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Fragment +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics /-! # A-elementarity and the fragment Tarski–Vaught criterion (issue #13 unit 4) @@ -18,6 +20,8 @@ universals to full A-elementarity — witnesses are ELEMENTS (semantic parameter syntactic substitution enters the induction. -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/ModelTheory/ArbitraryStabilization.lean b/LeanPool/InfinitaryLogic/ModelTheory/ArbitraryStabilization.lean index 93718cd401..a1fc80f0a9 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/ArbitraryStabilization.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/ArbitraryStabilization.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Scott.Sentence import LeanPool.InfinitaryLogic.ModelTheory.FragmentLowenheimSkolem -import LeanPool.InfinitaryLogic.Scott.Sentence +import Mathlib.Data.Set.Finite.Range /-! # Arbitrary-target stabilization (issue #17 chunk 5.1) @@ -26,6 +29,8 @@ of the audited thin bridge) then upgrades stabilized `BFEquiv α` to EVERY ordin (`bfEquiv_all_of_stabilizesCompletely_arbitrary`). -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/ModelTheory/CountableCompanion.lean b/LeanPool/InfinitaryLogic/ModelTheory/CountableCompanion.lean index b7501429ab..3cbffe5bbb 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/CountableCompanion.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/CountableCompanion.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.ModelTheory.TypeIsolation +module + +public import LeanPool.InfinitaryLogic.ModelTheory.TypeIsolation +public import LeanPool.InfinitaryLogic.ModelTheory.AElementary +public import Mathlib.ModelTheory.Substructures import LeanPool.InfinitaryLogic.ModelTheory.FragmentLowenheimSkolem /-! # The controlling fragment and the countable companion (issue #17 chunk 2) @@ -19,6 +23,8 @@ Still language-general (countable function symbols only — relationality first BF/Scott packaging boundary, per the frozen audit). -/ +@[expose] public section + namespace FirstOrder namespace Language @@ -31,7 +37,7 @@ variable {L : Language.{u, v}} {M : Type w} [L.Structure M] /-- The controlling seed: all isolators, and the existential closures of all isolators of one higher arity. -/ -private def isolatorSeed (hsmall : Lomega1omegaSmall (L := L) M) : +def isolatorSeed (hsmall : Lomega1omegaSmall (L := L) M) : Set (Σ n, L.BoundedFormulaω Empty n) := (⋃ n : ℕ, (fun p : Set (L.BoundedFormulaω Empty n) => (⟨n, isolatingFormula (hsmall n) p⟩ : Σ n, L.BoundedFormulaω Empty n)) '' diff --git a/LeanPool/InfinitaryLogic/ModelTheory/CountingModels.lean b/LeanPool/InfinitaryLogic/ModelTheory/CountingModels.lean index 632e5db362..cf74a02ad6 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/CountingModels.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/CountingModels.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Theory -import LeanPool.InfinitaryLogic.Scott.Height.CanonicalSentence -import LeanPool.InfinitaryLogic.Scott.Height.Defs +module + +public import LeanPool.InfinitaryLogic.Scott.Height.Defs import LeanPool.InfinitaryLogic.Scott.RefinementCount +import LeanPool.InfinitaryLogic.Util /-! # Counting Models @@ -27,6 +28,8 @@ to the structure of the isomorphism relation. - [KK04] -/ +@[expose] public section + universe u v w namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/ModelTheory/FragmentLowenheimSkolem.lean b/LeanPool/InfinitaryLogic/ModelTheory/FragmentLowenheimSkolem.lean index 1d521872ff..966ccdfc3c 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/FragmentLowenheimSkolem.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/FragmentLowenheimSkolem.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.ModelTheory.AElementary +module + +public import LeanPool.InfinitaryLogic.ModelTheory.AElementary +public import Mathlib.ModelTheory.Substructures import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.CardinalBounds -import Mathlib.ModelTheory.Substructures /-! # Genuine downward Löwenheim–Skolem for fragments (issue #13 unit 5) @@ -33,6 +35,8 @@ compared therefore start in three different universes, so every bound is stated same-universe form, where those lifts are identities. -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/ModelTheory/Hanf.lean b/LeanPool/InfinitaryLogic/ModelTheory/Hanf.lean index b30e3ea7a4..43327d7928 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/Hanf.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/Hanf.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Theory -import Mathlib.SetTheory.Cardinal.Ordinal -import Mathlib.SetTheory.Cardinal.Aleph +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics /-! # Hanf Numbers @@ -35,6 +35,8 @@ arbitrary language — is proved in `Conditional/MorleyHanfSchemaDischarge.lean` - [Mar16], §5 -/ +@[expose] public section + universe u v namespace FirstOrder @@ -43,7 +45,7 @@ namespace Language variable {L : Language.{u, v}} -open FirstOrder Structure Cardinal Ordinal +open FirstOrder Structure Cardinal /-- A sentence has arbitrarily large models if for every cardinal κ, there exists a model of size ≥ κ. -/ diff --git a/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/BethLadder.lean b/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/BethLadder.lean index 9e3eb5e286..f9940711fd 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/BethLadder.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/BethLadder.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.VonNeumannModel +module + +public import LeanPool.InfinitaryLogic.ModelTheory.MorleyHanf +import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.CardinalBounds import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.LadderBound -import LeanPool.InfinitaryLogic.ModelTheory.MorleyHanf +import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.VonNeumannModel /-! # The beth ladder: sharpness of the Morley–Hanf bound @@ -22,6 +25,8 @@ upper bound `Lomega1omegaHanfNumber_le_beth_omega1`: Reference: Marker, *Lectures on Infinitary Model Theory*, Exercise 5.3 and Theorem 5.4. -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/CardinalBounds.lean b/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/CardinalBounds.lean index 8effc823d4..ab85898fdb 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/CardinalBounds.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/CardinalBounds.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import Mathlib.SetTheory.Cardinal.Aleph import Mathlib.SetTheory.Cardinal.Arithmetic -import Mathlib.SetTheory.Cardinal.Aleph /-! # Cardinal lemmas for the beth ladder @@ -28,6 +30,8 @@ the right side is the empty supremum), so Mathlib's `beth_zero`/`beth_succ`/`bet used directly as the formal interface; no second recursive beth is introduced. -/ +@[expose] public section + namespace FirstOrder namespace HanfLadder diff --git a/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/IndexOrder.lean b/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/IndexOrder.lean index 3babe71b10..334e634b34 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/IndexOrder.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/IndexOrder.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.LadderSyntax -import Mathlib.SetTheory.Cardinal.Aleph +module + +public import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.LadderSyntax +public import Mathlib.SetTheory.Cardinal.Aleph /-! # The ordinal interpretation of the ladder index order @@ -21,6 +23,8 @@ use to interpret indices as ordinals: discharged for every `α < ω₁`. -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/LadderBound.lean b/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/LadderBound.lean index 0cc696d3c8..41e6ccc891 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/LadderBound.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/LadderBound.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.IndexOrder +module + +public import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.LadderSyntax +public import Mathlib.SetTheory.Cardinal.Aleph import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.CardinalBounds +import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.IndexOrder /-! # The ladder upper bound @@ -17,6 +21,8 @@ level is a countable union of earlier levels (`CardinalBounds.mk_iUnion_le_of_co The top clause then bounds the whole model by `|U_⊤| ≤ ℶ_{α+1}`. -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/LadderSyntax.lean b/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/LadderSyntax.lean index db7f140fd8..7ee34d0091 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/LadderSyntax.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/LadderSyntax.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.CountableIndex +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.CountableIndex +public import Mathlib.SetTheory.Ordinal.Basic import Mathlib.SetTheory.Ordinal.Arithmetic /-! @@ -33,6 +36,8 @@ equivalent to the six named clause predicates bundled in `IsLadderModel` — dow never unfold binders, `ciInf`/`ciSup`, or valuation bookkeeping again. -/ +@[expose] public section + namespace FirstOrder namespace Language @@ -84,21 +89,21 @@ def ladderLang (α : Ordinal.{0}) : Language.{0, 0} := variable {α : Ordinal.{0}} /-- The `n`-th constant, as a term over any variable type. -/ -private def const (n : ℕ) {γ : Type} : (ladderLang α).Term γ := +def const (n : ℕ) {γ : Type} : (ladderLang α).Term γ := Term.func (show (ladderLang α).Functions 0 from n) Fin.elim0 /-- The level atom `U_i t`. -/ -private def levelAtom (i : Index α) {γ : Type} {n : ℕ} (t : (ladderLang α).Term (γ ⊕ Fin n)) : +def levelAtom (i : Index α) {γ : Type} {n : ℕ} (t : (ladderLang α).Term (γ ⊕ Fin n)) : (ladderLang α).BoundedFormulaω γ n := BoundedFormulaω.rel (show (ladderLang α).Relations 1 from i) (fun _ => t) /-- The edge atom `E t u`. -/ -private def eAtom {γ : Type} {n : ℕ} (t u : (ladderLang α).Term (γ ⊕ Fin n)) : +def eAtom {γ : Type} {n : ℕ} (t u : (ladderLang α).Term (γ ⊕ Fin n)) : (ladderLang α).BoundedFormulaω γ n := BoundedFormulaω.rel (show (ladderLang α).Relations 2 from ()) ![t, u] /-- Variable `i` at arity `n`, over `Empty` free variables. -/ -private abbrev bvar {n : ℕ} (i : Fin n) : (ladderLang α).Term (Empty ⊕ Fin n) := +abbrev bvar {n : ℕ} (i : Fin n) : (ladderLang α).Term (Empty ⊕ Fin n) := Term.var (Sum.inr i) section Clauses @@ -107,32 +112,32 @@ variable (α) variable [Countable (Index α)] /-- Base, `⊇`: every constant is in the bottom level. -/ -private noncomputable def baseInC : (ladderLang α).Sentenceω := +noncomputable def baseInC : (ladderLang α).Sentenceω := BoundedFormulaω.iInf fun n => levelAtom ⊥ (const n) /-- Base, `⊆`: every bottom-level element is a constant. -/ -private noncomputable def baseOutC : (ladderLang α).Sentenceω := +noncomputable def baseOutC : (ladderLang α).Sentenceω := BoundedFormulaω.all ((levelAtom ⊥ (bvar 0)).imp (BoundedFormulaω.iSup fun n => BoundedFormulaω.equal (bvar 0) (const n))) /-- Top: every element is in the top level. -/ -private noncomputable def topC : (ladderLang α).Sentenceω := +noncomputable def topC : (ladderLang α).Sentenceω := BoundedFormulaω.all (levelAtom ⊤ (bvar 0)) /-- Nesting: `U_i ⊆ U_j` for `i < j`. -/ -private noncomputable def nestedC : (ladderLang α).Sentenceω := +noncomputable def nestedC : (ladderLang α).Sentenceω := BoundedFormulaω.ciInf fun p : {p : Index α × Index α // p.1 < p.2} => BoundedFormulaω.all ((levelAtom p.1.1 (bvar 0)).imp (levelAtom p.1.2 (bvar 0))) /-- Limit covering: at an order-limit level `j`, `U_j x → ⋁_{i BoundedFormulaω.all ((levelAtom j.1 (bvar 0)).imp (BoundedFormulaω.ciSup fun i : {i : Index α // i < j.1} => levelAtom i.1 (bvar 0))) /-- Predecessor descent: for adjacent `i ⋖ j`, `U_j x → E y x → U_i y` (`x` = bound variable `0`, `y` = bound variable `1`). -/ -private noncomputable def predC : (ladderLang α).Sentenceω := +noncomputable def predC : (ladderLang α).Sentenceω := BoundedFormulaω.ciInf fun p : {p : Index α × Index α // p.1 ⋖ p.2} => BoundedFormulaω.all (BoundedFormulaω.all ((levelAtom p.1.2 (bvar 0)).imp @@ -140,7 +145,7 @@ private noncomputable def predC : (ladderLang α).Sentenceω := /-- Extensionality, curried: `(∀x, E x y → E x z) → (∀x, E x z → E x y) → y = z` (`y` = bound variable `0`, `z` = bound variable `1`, `x` = bound variable `2`). -/ -private def extC : (ladderLang α).Sentenceω := +def extC : (ladderLang α).Sentenceω := BoundedFormulaω.all (BoundedFormulaω.all ((BoundedFormulaω.all ((eAtom (bvar 2) (bvar 0)).imp (eAtom (bvar 2) (bvar 1)))).imp ((BoundedFormulaω.all ((eAtom (bvar 2) (bvar 1)).imp (eAtom (bvar 2) (bvar 0)))).imp diff --git a/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/VonNeumannModel.lean b/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/VonNeumannModel.lean index 83e06e421f..d3b5e210d6 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/VonNeumannModel.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/HanfSpectrum/VonNeumannModel.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.IndexOrder -import Mathlib.SetTheory.ZFC.VonNeumann -import Mathlib.SetTheory.ZFC.Cardinal +module + +public import LeanPool.InfinitaryLogic.ModelTheory.HanfSpectrum.IndexOrder +public import Mathlib.SetTheory.ZFC.VonNeumann /-! # The von Neumann ladder model @@ -24,6 +25,8 @@ The upper-bound half (every ladder model has size `≤ ℶ_{α+1}`) is `LadderBo per-stage endpoint and the supremum assembly are `BethLadder.lean`. -/ +@[expose] public section + namespace FirstOrder namespace Language @@ -50,7 +53,7 @@ private theorem ladderLevel_add_one (β : Ordinal.{0}) : rw [ladderLevel, ladderLevel, ← add_assoc, ZFSet.vonNeumann_add_one] /-- The countable enumeration of the base level `V_ω`. -/ -private noncomputable def omegaEnum : ℕ ≃ Shrink.{0} ↥(ladderLevel 0) := +noncomputable def omegaEnum : ℕ ≃ Shrink.{0} ↥(ladderLevel 0) := Classical.choice (Cardinal.eq.mp (by rw [Cardinal.mk_nat] exact (show (ladderLevel 0).card = Cardinal.aleph0 by diff --git a/LeanPool/InfinitaryLogic/ModelTheory/InfinitaryTypes.lean b/LeanPool/InfinitaryLogic/ModelTheory/InfinitaryTypes.lean index 2155694a40..fd27703ffe 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/InfinitaryTypes.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/InfinitaryTypes.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics import LeanPool.InfinitaryLogic.Lomega1omega.Operations import LeanPool.InfinitaryLogic.Lomega1omega.Theory /-! @@ -19,6 +22,8 @@ image); it does NOT ascend through arbitrary expansions, which is why the arbitr endpoint of issue #11 must go through a canonical uniform expansion rather than this lemma. -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/ModelTheory/MorleyCounting.lean b/LeanPool/InfinitaryLogic/ModelTheory/MorleyCounting.lean index a1dab64a4f..eed2c2ebbe 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/MorleyCounting.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/MorleyCounting.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Descriptive.FiniteCarrier import LeanPool.InfinitaryLogic.Descriptive.BFEquivBorel -import LeanPool.InfinitaryLogic.Descriptive.FiniteCarrier +import LeanPool.InfinitaryLogic.Descriptive.ModelClassStandardBorel import LeanPool.InfinitaryLogic.ModelTheory.CountingModels +import LeanPool.InfinitaryLogic.Scott.RefinementCount +import LeanPool.InfinitaryLogic.Util /-! # Morley's Counting Theorem via Scott-Height Stratification @@ -28,6 +33,8 @@ each α, the iso classes with height ≤ α inject into BFEquiv_α classes, givi by `SilverBurgessDichotomy` (proved in this repository). -/ +@[expose] public section + universe u v namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/ModelTheory/MorleyHanf.lean b/LeanPool/InfinitaryLogic/ModelTheory/MorleyHanf.lean index 902ac3a0e1..281dc0c027 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/MorleyHanf.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/MorleyHanf.lean @@ -3,6 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.ModelTheory.Hanf +public import Mathlib.SetTheory.Cardinal.Aleph import LeanPool.InfinitaryLogic.Conditional.MorleyHanfSchemaDischarge /-! # The Morley–Hanf theorem: public facade and corollaries @@ -26,6 +30,8 @@ together with the corollaries packaged here: arbitrarily large models (via `Theoryω.conjunction`). -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/ModelTheory/PCClass.lean b/LeanPool/InfinitaryLogic/ModelTheory/PCClass.lean index 022f2ad3d8..c06d34b537 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/PCClass.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/PCClass.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Semantics -import Mathlib.ModelTheory.LanguageMap +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Semantics /-! # The abstract PC-class membership predicate (issue #10, Unit 4) @@ -18,6 +19,8 @@ Deliberately language-generic and free of any nonemptiness assumption; the Lópe specialization (`baseGraphEmb`, code compatibility) lives in `Methods/LopezEscobar/PCMem.lean`. -/ +@[expose] public section + namespace FirstOrder.Language variable {L : Language.{u, v}} {L' : Language.{u', v'}} diff --git a/LeanPool/InfinitaryLogic/ModelTheory/ScottCompletion.lean b/LeanPool/InfinitaryLogic/ModelTheory/ScottCompletion.lean index 0d130a9f4b..638f97e3cb 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/ScottCompletion.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/ScottCompletion.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.ModelTheory.Hanf +public import LeanPool.InfinitaryLogic.ModelTheory.InfinitaryTypes +import LeanPool.InfinitaryLogic.Karp.CarrierTheorem +import LeanPool.InfinitaryLogic.Lomega1omega.Theory +import LeanPool.InfinitaryLogic.Methods.UniformCollapse import LeanPool.InfinitaryLogic.ModelTheory.ArbitraryStabilization import LeanPool.InfinitaryLogic.ModelTheory.TypePreservingBF -import LeanPool.InfinitaryLogic.Methods.UniformCollapse import LeanPool.InfinitaryLogic.Scott.Height.CanonicalSentence -import LeanPool.InfinitaryLogic.Karp.CarrierTheorem +import Mathlib.Data.Rat.Floor /-! # The Scott completion and categoricity (issue #17 chunks 5.2–6) @@ -35,6 +41,8 @@ Everything is for countable relational vocabularies (`[L.IsRelational]`, `[Countable (Σ l, L.Relations l)]`), inherited from the Scott/Karp stack per the frozen audit. -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/ModelTheory/TypeIsolation.lean b/LeanPool/InfinitaryLogic/ModelTheory/TypeIsolation.lean index 0081faef2b..de3bd8ff9a 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/TypeIsolation.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/TypeIsolation.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.ModelTheory.InfinitaryTypes -import LeanPool.InfinitaryLogic.Lomega1omega.CountableIndex +module + +public import LeanPool.InfinitaryLogic.ModelTheory.InfinitaryTypes +public import LeanPool.InfinitaryLogic.Lomega1omega.CountableIndex /-! # Realized-type isolators (issue #17 chunk 1) @@ -25,6 +27,8 @@ relation symbols, no relationality assumption. The characterization: `realize_isolatingFormula_iff : χ_p.Realize Empty.elim a ↔ infinitaryType M a = p`. -/ +@[expose] public section + namespace FirstOrder namespace Language @@ -73,7 +77,7 @@ noncomputable def isolatingFormula haveI := hcount.to_subtype BoundedFormulaω.ciInf fun q : RealizedInfinitaryTypes (L := L) M n => if h : q.1 = p then BoundedFormulaω.falsum.imp BoundedFormulaω.falsum - else (exists_separator (M := M) fun he => h he.symm).choose + else (private_decl% (exists_separator (M := M) fun he => h he.symm)).choose /-- **The decisive characterization**: `χ_p` holds at a tuple exactly when its complete type is `p`. -/ @@ -97,7 +101,7 @@ theorem realize_isolatingFormula_iff rw [BoundedFormulaω.realize_imp] exact fun hf => hf · rw [dite_eq_right h] - exact (exists_separator (M := M) fun he => h he.symm).choose_spec.1 a htp + exact (private_decl% (exists_separator (M := M) fun he => h he.symm)).choose_spec.1 a htp /-! ## Universe regression diff --git a/LeanPool/InfinitaryLogic/ModelTheory/TypePreservingBF.lean b/LeanPool/InfinitaryLogic/ModelTheory/TypePreservingBF.lean index 1dcde1a4ce..a88df0f323 100644 --- a/LeanPool/InfinitaryLogic/ModelTheory/TypePreservingBF.lean +++ b/LeanPool/InfinitaryLogic/ModelTheory/TypePreservingBF.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.ModelTheory.CountableCompanion -import LeanPool.InfinitaryLogic.Scott.BackAndForth -import LeanPool.InfinitaryLogic.Karp.CarrierTheorem +module + +public import LeanPool.InfinitaryLogic.ModelTheory.CountableCompanion +public import LeanPool.InfinitaryLogic.Scott.BackAndForth /-! # The type-preserving back-and-forth (issue #17 chunk 3) @@ -25,6 +26,8 @@ two extensions is `BFEquiv` at EVERY ordinal — one `limitRecOn` induction whos the substructure inclusion reflects them). -/ +@[expose] public section + namespace FirstOrder namespace Language diff --git a/LeanPool/InfinitaryLogic/OrdinalUtil.lean b/LeanPool/InfinitaryLogic/OrdinalUtil.lean index acfe222fa8..22e124745a 100644 --- a/LeanPool/InfinitaryLogic/OrdinalUtil.lean +++ b/LeanPool/InfinitaryLogic/OrdinalUtil.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import Mathlib.SetTheory.Cardinal.Aleph -import Mathlib.SetTheory.Ordinal.Basic -import Mathlib.SetTheory.Ordinal.Rank -import Mathlib.SetTheory.Ordinal.Family +module + +public import Mathlib.SetTheory.Cardinal.Aleph /-! # Small ordinal facts @@ -20,6 +19,8 @@ Both shapes of the countability statement are provided: `Set.Countable (Set.Iio at each site is noise. -/ +@[expose] public section + universe u namespace InfinitaryLogic diff --git a/LeanPool/InfinitaryLogic/Scott/AtomicDiagram.lean b/LeanPool/InfinitaryLogic/Scott/AtomicDiagram.lean index 9b31e51f20..cdd8608025 100644 --- a/LeanPool/InfinitaryLogic/Scott/AtomicDiagram.lean +++ b/LeanPool/InfinitaryLogic/Scott/AtomicDiagram.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Lomega1omega.Operations +module + +public import LeanPool.InfinitaryLogic.Lomega1omega.Operations /-! # Atomic Diagrams for Relational Languages @@ -23,6 +25,8 @@ We restrict to relational languages (`L.IsRelational`) so that the atomic diagra tuple is determined by equality and relation holding information. -/ +@[expose] public section + universe u v w w' namespace FirstOrder @@ -86,7 +90,7 @@ private theorem holds_comp_eq_holds_pushforward {m : ℕ} (idx : L.AtomicIdx m) end AtomicIdx /-- Builds an atomic formula from an index. The formula uses free variables for the tuple. -/ -private def atomicFormula (idx : L.AtomicIdx n) : L.BoundedFormula (Fin n) 0 := +def atomicFormula (idx : L.AtomicIdx n) : L.BoundedFormula (Fin n) 0 := match idx with | .eq i j => Term.equal (Term.var i) (Term.var j) | .rel R f => R.formula fun k => Term.var (f k) diff --git a/LeanPool/InfinitaryLogic/Scott/BackAndForth.lean b/LeanPool/InfinitaryLogic/Scott/BackAndForth.lean index 8a69ad7b61..1c95d76805 100644 --- a/LeanPool/InfinitaryLogic/Scott/BackAndForth.lean +++ b/LeanPool/InfinitaryLogic/Scott/BackAndForth.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Scott.AtomicDiagram -import Mathlib.SetTheory.Ordinal.Arithmetic +module + +public import LeanPool.InfinitaryLogic.Scott.AtomicDiagram +public import Mathlib.SetTheory.Ordinal.Arithmetic /-! # Back-and-Forth Equivalence @@ -94,6 +96,8 @@ equivalence relations with matching finite-class structure but different arrange infinite classes. -/ +@[expose] public section + universe u v w w' namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Scott/Formula.lean b/LeanPool/InfinitaryLogic/Scott/Formula.lean index d003b5e7a1..3a38a142db 100644 --- a/LeanPool/InfinitaryLogic/Scott/Formula.lean +++ b/LeanPool/InfinitaryLogic/Scott/Formula.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Scott.BackAndForth -import LeanPool.InfinitaryLogic.Util +module + +public import LeanPool.InfinitaryLogic.Scott.BackAndForth +public import Mathlib.SetTheory.Cardinal.Aleph import LeanPool.InfinitaryLogic.Lomega1omega.OpenBoundsSemantics -import Mathlib.SetTheory.Cardinal.Aleph +import LeanPool.InfinitaryLogic.Util /-! # Scott Formulas @@ -38,6 +40,8 @@ a formula φ(x₀,...,xₙ) with n+1 free variables and want to existentially qu over the last variable, we use `relabel` to move it into a bound position. -/ +@[expose] public section + universe u v w w' namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Scott/Height/CanonicalSentence.lean b/LeanPool/InfinitaryLogic/Scott/Height/CanonicalSentence.lean index 41f2375e0c..7f3a3530ef 100644 --- a/LeanPool/InfinitaryLogic/Scott/Height/CanonicalSentence.lean +++ b/LeanPool/InfinitaryLogic/Scott/Height/CanonicalSentence.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Scott.Height.Defs +module + +public import LeanPool.InfinitaryLogic.Scott.Height.Defs /-! # Canonical Scott Sentence @@ -24,6 +26,8 @@ Scott sentence. - `canonicalScottSentence_qrank`: Quantifier rank bounded by scottHeight + ω. -/ +@[expose] public section + universe u v w w' namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Scott/Height/Defs.lean b/LeanPool/InfinitaryLogic/Scott/Height/Defs.lean index ad170d0a20..fe4a41e64a 100644 --- a/LeanPool/InfinitaryLogic/Scott/Height/Defs.lean +++ b/LeanPool/InfinitaryLogic/Scott/Height/Defs.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Karp.PotentialIso -import LeanPool.InfinitaryLogic.Karp.CarrierTheorem -import LeanPool.InfinitaryLogic.Scott.Formula -import LeanPool.InfinitaryLogic.Scott.Rank +module + +public import LeanPool.InfinitaryLogic.Scott.Sentence import LeanPool.InfinitaryLogic.Scott.RefinementCount /-! # Scott Height: Definition and Core Properties @@ -25,6 +24,8 @@ formula analysis stabilizes for all tuples simultaneously. - `scottHeight_eq_of_equiv`: Scott height is invariant under L-isomorphism. -/ +@[expose] public section + universe u v w namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Scott/Rank.lean b/LeanPool/InfinitaryLogic/Scott/Rank.lean index dd79604abd..c205ef4371 100644 --- a/LeanPool/InfinitaryLogic/Scott/Rank.lean +++ b/LeanPool/InfinitaryLogic/Scott/Rank.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Scott.Sentence +module + +public import LeanPool.InfinitaryLogic.Scott.Sentence import LeanPool.InfinitaryLogic.Scott.RefinementCount -import Mathlib.SetTheory.Cardinal.Regular /-! # Scott Rank @@ -28,6 +29,8 @@ least ordinal α such that any tuple extending with a is determined by its α-ty This is equivalent to the stabilization ordinal approach but more compositional. -/ +@[expose] public section + universe u v w namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Scott/RefinementCount.lean b/LeanPool/InfinitaryLogic/Scott/RefinementCount.lean index 8555912e0e..e3639cfced 100644 --- a/LeanPool/InfinitaryLogic/Scott/RefinementCount.lean +++ b/LeanPool/InfinitaryLogic/Scott/RefinementCount.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ +module + +public import LeanPool.InfinitaryLogic.Scott.Sentence import LeanPool.InfinitaryLogic.OrdinalUtil -import LeanPool.InfinitaryLogic.Scott.Sentence +import Mathlib.SetTheory.Cardinal.Regular /-! # Proof of CountableRefinementHypothesis @@ -30,6 +33,8 @@ The proof uses the "constant chain" argument: - `countableRefinementHypothesis` : `CountableRefinementHypothesis L` -/ +@[expose] public section + universe u v w namespace FirstOrder diff --git a/LeanPool/InfinitaryLogic/Scott/Sentence.lean b/LeanPool/InfinitaryLogic/Scott/Sentence.lean index 860beedc5a..62d1ef03d1 100644 --- a/LeanPool/InfinitaryLogic/Scott/Sentence.lean +++ b/LeanPool/InfinitaryLogic/Scott/Sentence.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import LeanPool.InfinitaryLogic.Scott.Formula +module + +public import LeanPool.InfinitaryLogic.Scott.Formula import LeanPool.InfinitaryLogic.Karp.PotentialIso -import Mathlib.ModelTheory.PartialEquiv +import LeanPool.InfinitaryLogic.Util import Mathlib.SetTheory.Cardinal.Regular /-! # Scott Sentences @@ -31,6 +33,8 @@ The proof proceeds by showing: 3. The Scott formula at the stabilization ordinal captures exactly this. -/ +@[expose] public section + universe u v w u' namespace FirstOrder @@ -40,7 +44,7 @@ namespace Language variable {L : Language.{u, v}} [L.IsRelational] variable [Countable (Σ l, L.Relations l)] -open FirstOrder Structure Ordinal BoundedFormulaω Substructure +open FirstOrder Structure Ordinal BoundedFormulaω -- We fix the ordinal universe to avoid metavariable issues -- In practice, we typically work with Ordinal.{0} diff --git a/LeanPool/InfinitaryLogic/Util.lean b/LeanPool/InfinitaryLogic/Util.lean index 3b4f03bee1..4c2bc5dbf5 100644 --- a/LeanPool/InfinitaryLogic/Util.lean +++ b/LeanPool/InfinitaryLogic/Util.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Cameron Freer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cameron Freer -/ -import Mathlib.Data.Fin.VecNotation +module + +public import Mathlib.Data.Fin.Tuple.Basic /-! # Utility Lemmas @@ -12,6 +14,8 @@ Small lemmas about `Empty.elim`, `Fin.elim0`, `Fin.snoc`, and `Fin.append` that across the infinitary logic library but not (yet) in Mathlib. -/ +@[expose] public section + universe u v /-- Any function from `Empty` equals `Empty.elim`. -/ diff --git a/LeanPool/IsTranscendentalPi.lean b/LeanPool/IsTranscendentalPi.lean index d00a8c951a..4f3c05dbd9 100644 --- a/LeanPool/IsTranscendentalPi.lean +++ b/LeanPool/IsTranscendentalPi.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 James Huang, Samuël Borza. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: James Huang, Samuël Borza -/ +module -import LeanPool.IsTranscendentalPi.Main +public import LeanPool.IsTranscendentalPi.Main +import Mathlib.Combinatorics.Matroid.Init /-! # The transcendence of π @@ -16,3 +18,5 @@ Main declarations: `IsTranscendentalPi`, `IsTranscendentalPiReal` Tags: transcendence, pi, number-theory, niven MSC: 11A41 -/ + +@[expose] public section diff --git a/LeanPool/IsTranscendentalPi/AnalyticEstimates.lean b/LeanPool/IsTranscendentalPi/AnalyticEstimates.lean index 583aa806a0..75e155cedc 100644 --- a/LeanPool/IsTranscendentalPi/AnalyticEstimates.lean +++ b/LeanPool/IsTranscendentalPi/AnalyticEstimates.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 James Huang, Samuël Borza. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: James Huang, Samuël Borza -/ -import LeanPool.IsTranscendentalPi.NivenPolynomials +module + +public import LeanPool.IsTranscendentalPi.NivenPolynomials +import LeanPool.IsTranscendentalPi.ComplexExponential +import Mathlib.Combinatorics.Matroid.Init import Mathlib.RingTheory.Int.Basic /-! @@ -13,6 +17,8 @@ Uniform bounds on the Niven auxiliary polynomials, controlling the size of the integral appearing in Niven's proof of the transcendence of `π`. -/ +@[expose] public section + open Polynomial open Complex diff --git a/LeanPool/IsTranscendentalPi/CalculusOnPoly.lean b/LeanPool/IsTranscendentalPi/CalculusOnPoly.lean index 50b29e29ce..c0dfc521e2 100644 --- a/LeanPool/IsTranscendentalPi/CalculusOnPoly.lean +++ b/LeanPool/IsTranscendentalPi/CalculusOnPoly.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 James Huang, Samuël Borza. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: James Huang, Samuël Borza -/ +module + +public import Mathlib.Algebra.Polynomial.Derivative +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import LeanPool.IsTranscendentalPi.ComplexExponential +import Mathlib.Analysis.Calculus.Deriv.Polynomial +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Topology.Algebra.Polynomial /-! # Calculus on polynomials @@ -12,6 +21,8 @@ The integral `∫₀¹ x · exp(-(t · x)) · T(t · x) dt` and the polynomial ` together with the calculus identities relating them for Niven's argument. -/ +@[expose] public section + open Polynomial open Complex diff --git a/LeanPool/IsTranscendentalPi/ComplexExponential.lean b/LeanPool/IsTranscendentalPi/ComplexExponential.lean index c209b687ac..1d94592189 100644 --- a/LeanPool/IsTranscendentalPi/ComplexExponential.lean +++ b/LeanPool/IsTranscendentalPi/ComplexExponential.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 James Huang, Samuël Borza. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: James Huang, Samuël Borza -/ -import Mathlib.Analysis.Complex.Polynomial.Basic -import Mathlib.Algebra.Order.Group.Pointwise.Interval +module + +public import LeanPool.IsTranscendentalPi.SymmetricPolynomials +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import LeanPool.IsTranscendentalPi.IncrementalDerivatives -import LeanPool.IsTranscendentalPi.SymmetricPolynomials +import Mathlib.Analysis.SpecialFunctions.ExpDeriv +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus /-! # The complex exponential and subset sums @@ -16,6 +21,8 @@ multiset of roots into zero- and nonzero-sum subset contributions, the analytic heart of Niven's proof of the transcendence of `π`. -/ +@[expose] public section + open Polynomial open Set diff --git a/LeanPool/IsTranscendentalPi/IncrementalDerivatives.lean b/LeanPool/IsTranscendentalPi/IncrementalDerivatives.lean index e8deb78646..121b95a9bf 100644 --- a/LeanPool/IsTranscendentalPi/IncrementalDerivatives.lean +++ b/LeanPool/IsTranscendentalPi/IncrementalDerivatives.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 James Huang, Samuël Borza. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: James Huang, Samuël Borza -/ +module + +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Complex.Exponential import Mathlib.Analysis.SpecialFunctions.ExpDeriv -import Mathlib.Analysis.Calculus.Deriv.Polynomial -import Mathlib.Algebra.Polynomial.FieldDivision /-! # Incremental derivatives @@ -14,6 +17,8 @@ Differentiability and derivative formulas for the maps `t ↦ f⁽ᵏ⁾(t · x) finite sums, used to differentiate the exponential factors in Niven's argument. -/ +@[expose] public section + open Polynomial open Complex diff --git a/LeanPool/IsTranscendentalPi/Main.lean b/LeanPool/IsTranscendentalPi/Main.lean index 79e73f6be6..4ea161bbc4 100644 --- a/LeanPool/IsTranscendentalPi/Main.lean +++ b/LeanPool/IsTranscendentalPi/Main.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 James Huang, Samuël Borza. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: James Huang, Samuël Borza -/ -import Mathlib.Analysis.Complex.IsIntegral +module + +public import LeanPool.IsTranscendentalPi.ScaledAuxiliaryPolynomial import LeanPool.IsTranscendentalPi.AnalyticEstimates -import LeanPool.IsTranscendentalPi.ScaledAuxiliaryPolynomial -import LeanPool.IsTranscendentalPi.SymmetricPolynomials +import Mathlib.Analysis.Complex.IsIntegral +import Mathlib.Analysis.Complex.Polynomial.Basic /-! # Transcendence of `π` @@ -16,6 +18,8 @@ transcendental over `ℚ`, assembling the analytic and algebraic estimates of th preceding modules into Niven's contradiction argument. -/ +@[expose] public section + open Polynomial open Complex diff --git a/LeanPool/IsTranscendentalPi/NivenPolynomials.lean b/LeanPool/IsTranscendentalPi/NivenPolynomials.lean index a4225eb442..1f188090fa 100644 --- a/LeanPool/IsTranscendentalPi/NivenPolynomials.lean +++ b/LeanPool/IsTranscendentalPi/NivenPolynomials.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 James Huang, Samuël Borza. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: James Huang, Samuël Borza -/ -import LeanPool.IsTranscendentalPi.CalculusOnPoly +module + +public import LeanPool.IsTranscendentalPi.CalculusOnPoly +import LeanPool.IsTranscendentalPi.ComplexExponential +import Mathlib.Combinatorics.Matroid.Init /-! # Niven polynomials @@ -12,6 +16,8 @@ The auxiliary polynomials `Fₚ = Xᵖ⁻¹ Tᵖ` and basic facts about their de to build the integer that drives the contradiction in Niven's proof. -/ +@[expose] public section + open Polynomial open Complex diff --git a/LeanPool/IsTranscendentalPi/ScaledAuxiliaryPolynomial.lean b/LeanPool/IsTranscendentalPi/ScaledAuxiliaryPolynomial.lean index 784bd85909..4a60344fec 100644 --- a/LeanPool/IsTranscendentalPi/ScaledAuxiliaryPolynomial.lean +++ b/LeanPool/IsTranscendentalPi/ScaledAuxiliaryPolynomial.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 James Huang, Samuël Borza. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: James Huang, Samuël Borza -/ -import LeanPool.IsTranscendentalPi.SubsetSumPolynomial +module + +public import LeanPool.IsTranscendentalPi.SubsetSumPolynomial +public import LeanPool.IsTranscendentalPi.NivenPolynomials +import Mathlib.Analysis.Complex.Polynomial.Basic /-! # Scaled auxiliary polynomial @@ -12,6 +16,8 @@ The symmetric polynomial `∑ᵢ T(Xᵢ)` and its evaluation, providing the alge input to the auxiliary integer in Niven's proof. -/ +@[expose] public section + open Polynomial open Multiset diff --git a/LeanPool/IsTranscendentalPi/SubsetSumPolynomial.lean b/LeanPool/IsTranscendentalPi/SubsetSumPolynomial.lean index 69fadc7eee..4c2110b907 100644 --- a/LeanPool/IsTranscendentalPi/SubsetSumPolynomial.lean +++ b/LeanPool/IsTranscendentalPi/SubsetSumPolynomial.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 James Huang, Samuël Borza. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: James Huang, Samuël Borza -/ -import LeanPool.IsTranscendentalPi.NivenPolynomials -import LeanPool.IsTranscendentalPi.SymmetricPolynomials -import Mathlib.Algebra.Polynomial.OfFn +module + +public import Mathlib.Algebra.Polynomial.OfFn +public import LeanPool.IsTranscendentalPi.ComplexExponential +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.RingTheory.Polynomial.Vieta /-! # Subset-sum polynomial @@ -15,6 +18,8 @@ according to the vanishing subset sums, used to track integer divisibility in Niven's argument. -/ +@[expose] public section + open Polynomial open Multiset diff --git a/LeanPool/IsTranscendentalPi/SymmetricPolynomials.lean b/LeanPool/IsTranscendentalPi/SymmetricPolynomials.lean index 7ae43a103c..141b62a8e2 100644 --- a/LeanPool/IsTranscendentalPi/SymmetricPolynomials.lean +++ b/LeanPool/IsTranscendentalPi/SymmetricPolynomials.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 James Huang, Samuël Borza. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: James Huang, Samuël Borza -/ -import Mathlib.Analysis.Complex.Basic -import Mathlib.FieldTheory.IsAlgClosed.Basic +module + +public import Mathlib.FieldTheory.IsAlgClosed.Basic +public import Mathlib.Algebra.Algebra.Rat +public import Mathlib.Basic.Complex.Basic +public import Mathlib.RingTheory.MvPolynomial.Symmetric.Defs +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Algebra.Order.Star.Basic +import Mathlib.Analysis.Complex.Order import Mathlib.RingTheory.MvPolynomial.Symmetric.FundamentalTheorem import Mathlib.RingTheory.Polynomial.Vieta @@ -15,6 +22,8 @@ Multisets `{b₀, …, bₙ₋₁}` attached to maps `b : Fin n → α` and symm machinery feeding the algebraic estimates of Niven's proof. -/ +@[expose] public section + open Polynomial open Multiset diff --git a/LeanPool/IsoGraph.lean b/LeanPool/IsoGraph.lean index 79ccf985c1..e331e5d9e2 100644 --- a/LeanPool/IsoGraph.lean +++ b/LeanPool/IsoGraph.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import LeanPool.IsoGraph.Canon.Spec +public import LeanPool.IsoGraph.Canon.Spec +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Verified canonical labelling of finite graphs @@ -17,6 +23,8 @@ Tags: graph-theory, graph-isomorphism, canonical-labelling, verified-algorithms MSC: 05C60, 68R10 -/ +@[expose] public section + /-! ## Imported scope diff --git a/LeanPool/IsoGraph/Canon/Algorithm.lean b/LeanPool/IsoGraph/Canon/Algorithm.lean index 46fbf6dc03..4717f6e3c1 100644 --- a/LeanPool/IsoGraph/Canon/Algorithm.lean +++ b/LeanPool/IsoGraph/Canon/Algorithm.lean @@ -3,6 +3,7 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module /-! # Canonical labelling of finite graphs (a compact "mini-nauty") @@ -53,7 +54,7 @@ Two prunings make this fast: Note that hash collisions can only *weaken* pruning: an invariant path is used solely as the first component of a total order on leaves, and any isomorphism-invariant function works there. --/ +-/@[expose] public section namespace IsoGraph namespace Canon @@ -66,7 +67,7 @@ namespace Canon The constructor is private so callers cannot supply arrays with inconsistent dimensions or contents. Use `Graph.ofOracle`, which builds both representations from the same oracle. -/ structure Graph where - private mk :: + mk :: /-- Number of vertices. -/ n : Nat /-- `adj[v]![w]!` is `true` iff `v` and `w` are adjacent. -/ @@ -787,6 +788,8 @@ def dfsChildren (G : Graph) (fuel : Nat) (path : Array Nat) (invPath : Array UIn end +attribute [elab_as_elim] dfsNode.induct + /-! ## Entry points -/ /-- The result of canonicalisation. -/ diff --git a/LeanPool/IsoGraph/Canon/Autos.lean b/LeanPool/IsoGraph/Canon/Autos.lean index 01fa3a9c94..b16fe14109 100644 --- a/LeanPool/IsoGraph/Canon/Autos.lean +++ b/LeanPool/IsoGraph/Canon/Autos.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import LeanPool.IsoGraph.Canon.Search +public import LeanPool.IsoGraph.Canon.Search +import LeanPool.IsoGraph.ForMathlib.Array +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Harvested automorphisms, and how they act on the search tree @@ -25,6 +32,8 @@ The bridge between the two is `ofOracle_congr`: an automorphism `γ` of `G` sati `IsoGraph.Canon.Equivariance` into a statement about the action of `Aut G` on the tree. -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Branch.lean b/LeanPool/IsoGraph/Canon/Branch.lean index 21ec220339..e651e846fa 100644 --- a/LeanPool/IsoGraph/Canon/Branch.lean +++ b/LeanPool/IsoGraph/Canon/Branch.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module +public import LeanPool.IsoGraph.Canon.Leaves +public import LeanPool.IsoGraph.Canon.Paths import LeanPool.IsoGraph.Canon.Dominate +import LeanPool.IsoGraph.Canon.Jump import LeanPool.IsoGraph.ForMathlib.Array +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # The running invariants of the optimality induction @@ -27,6 +36,8 @@ the bookkeeping for the third and hardest one, backjumping. not already dominated. This is `jump_sound` fed by `Jmp`. -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Correct.lean b/LeanPool/IsoGraph/Canon/Correct.lean index 0c1c89205c..47903ede65 100644 --- a/LeanPool/IsoGraph/Canon/Correct.lean +++ b/LeanPool/IsoGraph/Canon/Correct.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module +public import LeanPool.IsoGraph.Canon.Dominate import LeanPool.IsoGraph.Canon.Optimal +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # The search meets its specification @@ -26,6 +33,8 @@ That is exactly what `Spec.LabellingInvariant` needs, once `certOf_get` is used adjacency matrix back out of the packed certificate (`canonical_get`). -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Dominate.lean b/LeanPool/IsoGraph/Canon/Dominate.lean index 5389c83187..f0619899a9 100644 --- a/LeanPool/IsoGraph/Canon/Dominate.lean +++ b/LeanPool/IsoGraph/Canon/Dominate.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import LeanPool.IsoGraph.Canon.Leaves +public import LeanPool.IsoGraph.Canon.Leaves +public import LeanPool.IsoGraph.Canon.Monotone +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Domination bookkeeping for the optimality proof @@ -22,6 +29,8 @@ dominated by the incumbent, and about moving a subtree along an automorphism. `γ w` onto the leaves below the child `w`, so the two children are interchangeable. -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Equivariance.lean b/LeanPool/IsoGraph/Canon/Equivariance.lean index fe7d9b298f..d256ba01ff 100644 --- a/LeanPool/IsoGraph/Canon/Equivariance.lean +++ b/LeanPool/IsoGraph/Canon/Equivariance.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import LeanPool.IsoGraph.Canon.Algorithm -import Mathlib.Data.Finset.Card -import Mathlib.Algebra.BigOperators.Intervals -import Mathlib.Tactic.Push +public import LeanPool.IsoGraph.Canon.Algorithm +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Order.Interval.Finset.Nat import LeanPool.IsoGraph.ForMathlib.Array import LeanPool.IsoGraph.ForMathlib.Bits +import Mathlib.Algebra.BigOperators.Intervals +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Equivariance of the pieces of the canonical labelling @@ -44,6 +50,8 @@ Each piece of the search respects `≈`: the discreteness at the leaves. -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Jump.lean b/LeanPool/IsoGraph/Canon/Jump.lean index a292b77d90..0b3f36c5c0 100644 --- a/LeanPool/IsoGraph/Canon/Jump.lean +++ b/LeanPool/IsoGraph/Canon/Jump.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module +public import LeanPool.IsoGraph.Canon.Node import LeanPool.IsoGraph.Canon.Pinned import LeanPool.IsoGraph.ForMathlib.Array +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Backjumping is sound @@ -27,6 +34,8 @@ current leaf and the deepest node the two leaves share. This file justifies tha therefore already recorded under the second — the branch depth-first search has *finished*. -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Leaves.lean b/LeanPool/IsoGraph/Canon/Leaves.lean index b281556760..f17df369ae 100644 --- a/LeanPool/IsoGraph/Canon/Leaves.lean +++ b/LeanPool/IsoGraph/Canon/Leaves.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module +public import LeanPool.IsoGraph.Canon.Pinned import LeanPool.IsoGraph.Canon.Jump +import LeanPool.IsoGraph.ForMathlib.Array +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # The leaves and generators a state holds @@ -23,6 +31,8 @@ Bookkeeping for the optimality proof, one layer above `Jump.lean`. tree, and every generator it records is a genuine automorphism. -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Monotone.lean b/LeanPool/IsoGraph/Canon/Monotone.lean index ec312ca6fa..8aae84fd29 100644 --- a/LeanPool/IsoGraph/Canon/Monotone.lean +++ b/LeanPool/IsoGraph/Canon/Monotone.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import LeanPool.IsoGraph.Canon.Progress +public import LeanPool.IsoGraph.Canon.Progress +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # The incumbent never gets worse @@ -25,6 +31,8 @@ The comparison used throughout is `compare k k' ≠ .gt` on `leafKey`s, the same is stated with. -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Node.lean b/LeanPool/IsoGraph/Canon/Node.lean index 68ba505064..ab3e49f3ca 100644 --- a/LeanPool/IsoGraph/Canon/Node.lean +++ b/LeanPool/IsoGraph/Canon/Node.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import LeanPool.IsoGraph.Canon.Autos +public import LeanPool.IsoGraph.Canon.Autos import LeanPool.IsoGraph.ForMathlib.Array +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Nodes of the search tree @@ -26,6 +32,8 @@ It packages the facts that the recursion needs about a node it is sitting at: `usableAutos` filters for. -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Optimal.lean b/LeanPool/IsoGraph/Canon/Optimal.lean index 0cac84a383..4c0468dadb 100644 --- a/LeanPool/IsoGraph/Canon/Optimal.lean +++ b/LeanPool/IsoGraph/Canon/Optimal.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ - -import LeanPool.IsoGraph.Canon.Branch -import LeanPool.IsoGraph.Canon.Orbits +module + +public import LeanPool.IsoGraph.Canon.Branch +public import LeanPool.IsoGraph.Canon.Orbits +public import LeanPool.IsoGraph.Canon.Dominate +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # The search misses nothing @@ -36,6 +44,8 @@ The other pieces: it returned normally, only the part above the backjump target if it asked to jump. -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Orbits.lean b/LeanPool/IsoGraph/Canon/Orbits.lean index 59a3270542..dd9a9f5305 100644 --- a/LeanPool/IsoGraph/Canon/Orbits.lean +++ b/LeanPool/IsoGraph/Canon/Orbits.lean @@ -3,8 +3,21 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ - -import LeanPool.IsoGraph.Canon.Node +module + +public import Aesop.BuiltinRules +public import LeanPool.IsoGraph.Canon.Algorithm +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.Basic +public import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToDual +import LeanPool.IsoGraph.ForMathlib.Array +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Orbit closure @@ -21,6 +34,8 @@ Instantiated with `P w := "the subtree below the child w is dominated"` and comb `Autos.reach_child_auto`, this says that skipping a marked child loses no leaf key. -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Paths.lean b/LeanPool/IsoGraph/Canon/Paths.lean index d54143b865..4dc96b532e 100644 --- a/LeanPool/IsoGraph/Canon/Paths.lean +++ b/LeanPool/IsoGraph/Canon/Paths.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import LeanPool.IsoGraph.Canon.Monotone +public import LeanPool.IsoGraph.Canon.Equivariance +import LeanPool.IsoGraph.ForMathlib.Array +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Where the search records its leaves @@ -21,6 +28,8 @@ which leaf is *best*. invariant "the incumbent's path does not go down a branch we have not explored yet". -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Pinned.lean b/LeanPool/IsoGraph/Canon/Pinned.lean index 6ad8a0ae11..f29fc3d828 100644 --- a/LeanPool/IsoGraph/Canon/Pinned.lean +++ b/LeanPool/IsoGraph/Canon/Pinned.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import LeanPool.IsoGraph.Canon.Paths +public import LeanPool.IsoGraph.Canon.Node +import LeanPool.IsoGraph.Canon.Progress +import LeanPool.IsoGraph.ForMathlib.Array +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Individualised vertices stay where they were put @@ -24,6 +32,8 @@ two equal-certificate leaves visibly map one branch onto the other. Along the way `nodePath` makes a node an honest function of its path (`Node.det`). -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Progress.lean b/LeanPool/IsoGraph/Canon/Progress.lean index 9a75c577da..d329f4d25c 100644 --- a/LeanPool/IsoGraph/Canon/Progress.lean +++ b/LeanPool/IsoGraph/Canon/Progress.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import LeanPool.IsoGraph.Canon.Node +public import LeanPool.IsoGraph.Canon.Search import LeanPool.IsoGraph.ForMathlib.Array +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Refinement splits cells, so the search terminates with a leaf in hand @@ -22,6 +28,8 @@ the *first* child of a node is never orbit-pruned, which holds because the orbit empty and is only refreshed when an automorphism has been found — which happens only at a leaf. -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Search.lean b/LeanPool/IsoGraph/Canon/Search.lean index cac24ef248..7ebfdfd9b7 100644 --- a/LeanPool/IsoGraph/Canon/Search.lean +++ b/LeanPool/IsoGraph/Canon/Search.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import LeanPool.IsoGraph.Canon.Equivariance +public import LeanPool.IsoGraph.Canon.Equivariance +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # The search tree, and what the search is looking for @@ -26,6 +32,8 @@ largest key, i.e. that none of the three pruning rules ever discards it — is ` `IsoGraph/Canon/Optimal.lean`; the two are joined in `IsoGraph/Canon/Correct.lean`. -/ +@[expose] public section + namespace IsoGraph namespace Canon diff --git a/LeanPool/IsoGraph/Canon/Spec.lean b/LeanPool/IsoGraph/Canon/Spec.lean index 9f711323c0..bf46bb5dc1 100644 --- a/LeanPool/IsoGraph/Canon/Spec.lean +++ b/LeanPool/IsoGraph/Canon/Spec.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import Mathlib.Data.Fintype.EquivFin -import Mathlib.Logic.Equiv.Defs -import LeanPool.IsoGraph.Canon.Algorithm -import LeanPool.IsoGraph.Canon.Equivariance +public import LeanPool.IsoGraph.Canon.Equivariance import LeanPool.IsoGraph.Canon.Correct +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # From the canonical labelling algorithm to permutations, and its specification @@ -38,6 +41,8 @@ Write `relabel σ adj` for `adj` with its vertices renamed along `σ`. Two stat `IsoGraph/Canon/Correct.lean` obtains from the soundness and optimality of the search. -/ +@[expose] public section + namespace IsoGraph.Canon /-! ## Arrays as permutations -/ diff --git a/LeanPool/IsoGraph/ForMathlib/Array.lean b/LeanPool/IsoGraph/ForMathlib/Array.lean index 1481f92c96..6a06714c60 100644 --- a/LeanPool/IsoGraph/ForMathlib/Array.lean +++ b/LeanPool/IsoGraph/ForMathlib/Array.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import Mathlib.Data.List.Basic +public import Aesop.BuiltinRules +public import Mathlib.Tactic.ToDual import Mathlib.Data.List.Nodup -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lemmas about arrays and `getElem!` @@ -17,6 +22,8 @@ something in the library needed them, and they are collected in `ForMathlib` so can be contributed upstream, or deleted when Mathlib grows its own. -/ +@[expose] public section + theorem array_extD {α : Type _} [Inhabited α] {a b : Array α} (hs : a.size = b.size) (h : ∀ i, i < a.size → a[i]! = b[i]!) : a = b := by diff --git a/LeanPool/IsoGraph/ForMathlib/Bits.lean b/LeanPool/IsoGraph/ForMathlib/Bits.lean index 599ad1a702..e123a649c9 100644 --- a/LeanPool/IsoGraph/ForMathlib/Bits.lean +++ b/LeanPool/IsoGraph/ForMathlib/Bits.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Alex Meiburg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Meiburg -/ +module -import Mathlib.Data.Nat.Bitwise -import Mathlib.Data.List.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith +public import Aesop.BuiltinRules +public import Mathlib.Algebra.Group.Nat.Defs +public import Mathlib.Tactic.ToDual +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Lemmas about `Nat.testBit` and bitwise folds @@ -17,6 +22,8 @@ something in the library needed them, and they are collected in `ForMathlib` so can be contributed upstream, or deleted when Mathlib grows its own. -/ +@[expose] public section + theorem eq_of_testBit_lt {n a b : ℕ} (ha : a < 2 ^ n) (hb : b < 2 ^ n) (h : ∀ k, k < n → a.testBit k = b.testBit k) : a = b := by diff --git a/LeanPool/Isoperimetric.lean b/LeanPool/Isoperimetric.lean index 3b3c845783..871514e450 100644 --- a/LeanPool/Isoperimetric.lean +++ b/LeanPool/Isoperimetric.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Jonathan Ho. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jonathan Ho -/ +module -import LeanPool.Isoperimetric.Basic -import LeanPool.Isoperimetric.BrunnMinkowski -import LeanPool.Isoperimetric.Isoperimetric -import LeanPool.Isoperimetric.PrekopaLeindler +public import LeanPool.Isoperimetric.Basic +public import LeanPool.Isoperimetric.BrunnMinkowski +public import LeanPool.Isoperimetric.Isoperimetric +public import LeanPool.Isoperimetric.PrekopaLeindler +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Prekopa-Leindler, Brunn-Minkowski, and the isoperimetric inequality @@ -20,6 +23,8 @@ Tags: measure-theory, geometric-inequalities MSC: 28A75, 52A40, 49Q20 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Isoperimetric/Basic.lean b/LeanPool/Isoperimetric/Basic.lean index 447438c40e..5c237d0a51 100644 --- a/LeanPool/Isoperimetric/Basic.lean +++ b/LeanPool/Isoperimetric/Basic.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Jonathan Ho. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jonathan Ho -/ -import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +module + +public import Mathlib.Analysis.SpecialFunctions.Pow.NNReal /-! # Basic supremum and `rpow` lemmas for `ENNReal` @@ -13,6 +15,8 @@ powers of `ENNReal`-valued functions used throughout the formalization of the Prékopa–Leindler, Brunn–Minkowski, and isoperimetric inequalities. -/ +@[expose] public section + /-- The sum of two bounded indexed suprema in `ENNReal` equals the indexed supremum of the pointwise sums. -/ lemma biSup_add_biSup diff --git a/LeanPool/Isoperimetric/BrunnMinkowski.lean b/LeanPool/Isoperimetric/BrunnMinkowski.lean index be4685d9a7..dae31a8cfc 100644 --- a/LeanPool/Isoperimetric/BrunnMinkowski.lean +++ b/LeanPool/Isoperimetric/BrunnMinkowski.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Jonathan Ho. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jonathan Ho -/ -import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace +module + +public import Mathlib.Analysis.Normed.Lp.MeasurableSpace +public import Mathlib.MeasureTheory.Constructions.Pi +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.Isoperimetric.PrekopaLeindler +import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace /-! # The Brunn–Minkowski inequality @@ -14,6 +19,8 @@ inequality, both for the standard product measure on `ℝⁿ` and for the Euclidean structure `EuclideanSpace ℝ (Fin n)`. -/ +@[expose] public section + open MeasureTheory Set open scoped Pointwise diff --git a/LeanPool/Isoperimetric/Isoperimetric.lean b/LeanPool/Isoperimetric/Isoperimetric.lean index fd69371c49..43bfa8a152 100644 --- a/LeanPool/Isoperimetric/Isoperimetric.lean +++ b/LeanPool/Isoperimetric/Isoperimetric.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Jonathan Ho. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jonathan Ho -/ -import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls +module + +public import Mathlib.Analysis.Normed.Lp.MeasurableSpace +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.Isoperimetric.BrunnMinkowski +import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls /-! # The isoperimetric inequality @@ -15,6 +19,8 @@ relating `volume A`, the volume of the unit ball, and the volume of the `ε`-thickening of `A`. -/ +@[expose] public section + open MeasureTheory Set open scoped Pointwise diff --git a/LeanPool/Isoperimetric/PrekopaLeindler.lean b/LeanPool/Isoperimetric/PrekopaLeindler.lean index c74da55a4d..8a84c4527f 100644 --- a/LeanPool/Isoperimetric/PrekopaLeindler.lean +++ b/LeanPool/Isoperimetric/PrekopaLeindler.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Jonathan Ho. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jonathan Ho -/ -import Mathlib.MeasureTheory.Measure.Lebesgue.Basic +module + +public import Mathlib.MeasureTheory.Integral.Marginal +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.Isoperimetric.Basic +import Mathlib.MeasureTheory.Measure.Lebesgue.Basic /-! # The Prékopa–Leindler inequality @@ -15,6 +19,8 @@ proceeds by reducing to the one-dimensional case via the layer-cake formula and then induction on the dimension. -/ +@[expose] public section + open MeasureTheory Set open scoped Pointwise diff --git a/LeanPool/JacobianDiffgeo.lean b/LeanPool/JacobianDiffgeo.lean index aa949cccd6..40c5fb9802 100644 --- a/LeanPool/JacobianDiffgeo.lean +++ b/LeanPool/JacobianDiffgeo.lean @@ -3,41 +3,44 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Init -import LeanPool.JacobianDiffgeo.Surface -import LeanPool.JacobianDiffgeo.LocalMultiplicity -import LeanPool.JacobianDiffgeo.Forms -import LeanPool.JacobianDiffgeo.MappingDegree -import LeanPool.JacobianDiffgeo.ProjectiveLine -import LeanPool.JacobianDiffgeo.ResidueCalculus -import LeanPool.JacobianDiffgeo.Meromorphic -import LeanPool.JacobianDiffgeo.Path -import LeanPool.JacobianDiffgeo.SphereTopology -import LeanPool.JacobianDiffgeo.MeromorphicTrace -import LeanPool.JacobianDiffgeo.ProperDegree -import LeanPool.JacobianDiffgeo.JacobianConstruction -import LeanPool.JacobianDiffgeo.Cech -import LeanPool.JacobianDiffgeo.Finiteness -import LeanPool.JacobianDiffgeo.Dbar -import LeanPool.JacobianDiffgeo.Monodromy -import LeanPool.JacobianDiffgeo.FormTrace -import LeanPool.JacobianDiffgeo.PlanarStokes -import LeanPool.JacobianDiffgeo.SerrePairing -import LeanPool.JacobianDiffgeo.AbelWeak -import LeanPool.JacobianDiffgeo.DolbeaultComparison -import LeanPool.JacobianDiffgeo.ResidueTheorem -import LeanPool.JacobianDiffgeo.CanonicalForms -import LeanPool.JacobianDiffgeo.LaurentTail -import LeanPool.JacobianDiffgeo.JacFunctorial -import LeanPool.JacobianDiffgeo.Abel -import LeanPool.JacobianDiffgeo.TailDuality -import LeanPool.JacobianDiffgeo.H1Genus -import LeanPool.JacobianDiffgeo.RiemannRoch -import LeanPool.JacobianDiffgeo.GenusSphereHeadline -import LeanPool.JacobianDiffgeo.PeriodLattice -import LeanPool.JacobianDiffgeo.CechCount -import LeanPool.JacobianDiffgeo.Challenge +public import LeanPool.JacobianDiffgeo.Init +public import LeanPool.JacobianDiffgeo.Surface +public import LeanPool.JacobianDiffgeo.LocalMultiplicity +public import LeanPool.JacobianDiffgeo.Forms +public import LeanPool.JacobianDiffgeo.MappingDegree +public import LeanPool.JacobianDiffgeo.ProjectiveLine +public import LeanPool.JacobianDiffgeo.ResidueCalculus +public import LeanPool.JacobianDiffgeo.Meromorphic +public import LeanPool.JacobianDiffgeo.Path +public import LeanPool.JacobianDiffgeo.SphereTopology +public import LeanPool.JacobianDiffgeo.MeromorphicTrace +public import LeanPool.JacobianDiffgeo.ProperDegree +public import LeanPool.JacobianDiffgeo.JacobianConstruction +public import LeanPool.JacobianDiffgeo.Cech +public import LeanPool.JacobianDiffgeo.Finiteness +public import LeanPool.JacobianDiffgeo.Dbar +public import LeanPool.JacobianDiffgeo.Monodromy +public import LeanPool.JacobianDiffgeo.FormTrace +public import LeanPool.JacobianDiffgeo.PlanarStokes +public import LeanPool.JacobianDiffgeo.SerrePairing +public import LeanPool.JacobianDiffgeo.AbelWeak +public import LeanPool.JacobianDiffgeo.DolbeaultComparison +public import LeanPool.JacobianDiffgeo.ResidueTheorem +public import LeanPool.JacobianDiffgeo.CanonicalForms +public import LeanPool.JacobianDiffgeo.LaurentTail +public import LeanPool.JacobianDiffgeo.JacFunctorial +public import LeanPool.JacobianDiffgeo.Abel +public import LeanPool.JacobianDiffgeo.TailDuality +public import LeanPool.JacobianDiffgeo.H1Genus +public import LeanPool.JacobianDiffgeo.RiemannRoch +public import LeanPool.JacobianDiffgeo.GenusSphereHeadline +public import LeanPool.JacobianDiffgeo.PeriodLattice +public import LeanPool.JacobianDiffgeo.CechCount +public import LeanPool.JacobianDiffgeo.Challenge +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The Jacobian of a Compact Riemann Surface @@ -49,3 +52,5 @@ Main declarations: `genus_eq_zero_iff_homeo`, `Jacobian.ofCurve_inj` Tags: riemann-surfaces, complex-geometry, abel-jacobi, riemann-roch, serre-duality MSC: 14H40, 30F30, 32G20 -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/Abel.lean b/LeanPool/JacobianDiffgeo/Abel.lean index e127109ce9..a154217271 100644 --- a/LeanPool/JacobianDiffgeo/Abel.lean +++ b/LeanPool/JacobianDiffgeo/Abel.lean @@ -3,18 +3,22 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ - -import LeanPool.JacobianDiffgeo.Abel.Loops -import LeanPool.JacobianDiffgeo.Abel.WeakToMero -import LeanPool.JacobianDiffgeo.Abel.DolbeaultBridge -import LeanPool.JacobianDiffgeo.Abel.AreaPairing -import LeanPool.JacobianDiffgeo.Abel.SerreFunctional -import LeanPool.JacobianDiffgeo.Abel.ChartSupported -import LeanPool.JacobianDiffgeo.Abel.LogPiece -import LeanPool.JacobianDiffgeo.Abel.LinkData -import LeanPool.JacobianDiffgeo.Abel.Sufficiency -import LeanPool.JacobianDiffgeo.Abel.UpgradeDischarge -import LeanPool.JacobianDiffgeo.Abel.OfCurveInj +module + +public import LeanPool.JacobianDiffgeo.Abel.Loops +public import LeanPool.JacobianDiffgeo.Abel.WeakToMero +public import LeanPool.JacobianDiffgeo.Abel.DolbeaultBridge +public import LeanPool.JacobianDiffgeo.Abel.AreaPairing +public import LeanPool.JacobianDiffgeo.Abel.SerreFunctional +public import LeanPool.JacobianDiffgeo.Abel.ChartSupported +public import LeanPool.JacobianDiffgeo.Abel.LogPiece +public import LeanPool.JacobianDiffgeo.Abel.LinkData +public import LeanPool.JacobianDiffgeo.Abel.Sufficiency +public import LeanPool.JacobianDiffgeo.Abel.UpgradeDischarge +public import LeanPool.JacobianDiffgeo.Abel.OfCurveInj +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # abel-theorem: Abel's theorem (Forster 20.7, dissection-free), `ofCurve_inj` @@ -170,3 +174,5 @@ every breakpoint, including the case where the path revisits its own basepoint). ∀ z, (∀ i, z ≠ a i) → (∀ i, z ≠ x i) → F.ord z = 0 ``` -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/Abel/AreaPairing.lean b/LeanPool/JacobianDiffgeo/Abel/AreaPairing.lean index 897f4aa004..82530e550b 100644 --- a/LeanPool/JacobianDiffgeo/Abel/AreaPairing.lean +++ b/LeanPool/JacobianDiffgeo/Abel/AreaPairing.lean @@ -3,15 +3,19 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ - -import LeanPool.JacobianDiffgeo.Dbar.Operator +module + +public import LeanPool.JacobianDiffgeo.Dbar.Form01 +public import LeanPool.JacobianDiffgeo.Dbar.Wirtinger +public import LeanPool.JacobianDiffgeo.Forms.Coeffs +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.JacobianDiffgeo.Forms.Analyticity import LeanPool.JacobianDiffgeo.Surface.RealSmooth -import LeanPool.JacobianDiffgeo.PlanarStokes.Compat import Mathlib.MeasureTheory.Function.Jacobian import Mathlib.RingTheory.Complex import Mathlib.RingTheory.Norm.Transitivity -import Mathlib.Topology.Algebra.Module.Determinant /-! # abel-theorem: the Serre area-pairing infrastructure (design §4.3, routing decision #2) @@ -44,6 +48,8 @@ single-chart-supported `(0,1)`-data. No independence-of-`PU` statement is ever n downstream conclusion is a `Prop` quantified over a single fixed `PU`. -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Metric Set MeasureTheory diff --git a/LeanPool/JacobianDiffgeo/Abel/ChartSupported.lean b/LeanPool/JacobianDiffgeo/Abel/ChartSupported.lean index b4d040d10c..fb2a0cd107 100644 --- a/LeanPool/JacobianDiffgeo/Abel/ChartSupported.lean +++ b/LeanPool/JacobianDiffgeo/Abel/ChartSupported.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Abel.AreaPairing +public import LeanPool.JacobianDiffgeo.Abel.AreaPairing +import LeanPool.JacobianDiffgeo.Forms.Analyticity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # abel-theorem: chart-supported `(0,1)`-forms and pairing localization (design §4.1 step 5) @@ -33,6 +37,8 @@ Also here: the inverse-derivative units `deriv_trans_mul_deriv_trans_symm` / `Form01.coeffAt_finsetSum`. -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Metric Set MeasureTheory diff --git a/LeanPool/JacobianDiffgeo/Abel/DolbeaultBridge.lean b/LeanPool/JacobianDiffgeo/Abel/DolbeaultBridge.lean index 03d14967a3..9370eced91 100644 --- a/LeanPool/JacobianDiffgeo/Abel/DolbeaultBridge.lean +++ b/LeanPool/JacobianDiffgeo/Abel/DolbeaultBridge.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Abel.Loops -import LeanPool.JacobianDiffgeo.TailDuality -import LeanPool.JacobianDiffgeo.LaurentTail -import LeanPool.JacobianDiffgeo.DolbeaultComparison -import LeanPool.JacobianDiffgeo.CanonicalForms +public import LeanPool.JacobianDiffgeo.DolbeaultComparison.Comparison +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Periods +public import LeanPool.JacobianDiffgeo.LaurentTail.Comparison +public import LeanPool.JacobianDiffgeo.TailDuality.Duality +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # abel-theorem: the Dolbeault-upgrade bridge, RESTATED at the tail level (design §4.3 D3) @@ -66,6 +70,8 @@ explicitly does not build this global object) is independent, substantial new an not an external blocker — flagged precisely in `Sufficiency.lean`. -/ +@[expose] public section + open scoped ContDiff Manifold noncomputable section @@ -101,26 +107,17 @@ theorem exists_dbar_eq_zero_of_forall_basis_pairing_eq_zero ((RS.dolbeaultEquiv (X := X)).symm (RS.H01.mk η))) = 0) : ∃ u : RS.SmoothC X, RS.dbar u = η := by apply RS.H01.mk_eq_zero_iff.1 - have hzero : - (RS.LaurentTail.H1Tail.equivOfSurjective (0 : RS.Divisor X) hsurj).symm - ((RS.dolbeaultEquiv (X := X)).symm (RS.H01.mk η)) = 0 := by - rw [← Module.forall_dual_apply_eq_zero_iff ℂ] - intro φ - obtain ⟨g, rfl⟩ := formDualEquiv.surjective φ - have hL : ((LinearMap.applyₗ - ((RS.LaurentTail.H1Tail.equivOfSurjective (0 : RS.Divisor X) hsurj).symm - ((RS.dolbeaultEquiv (X := X)).symm (RS.H01.mk η)))).comp formDualEquiv.toLinearMap - : RS.Form1 X →ₗ[ℂ] ℂ) = 0 := by - apply (RS.basis X).ext - intro i - simpa using h i - have := congrArg (fun L => L g) hL - simpa using this - have hde : (RS.dolbeaultEquiv (X := X)).symm (RS.H01.mk η) = 0 := by - have h2 := congrArg (RS.LaurentTail.H1Tail.equivOfSurjective (0 : RS.Divisor X) hsurj) hzero - rwa [LinearEquiv.apply_symm_apply, map_zero] at h2 - have h3 := congrArg (RS.dolbeaultEquiv (X := X)) hde - rwa [LinearEquiv.apply_symm_apply, map_zero] at h3 + apply (RS.dolbeaultEquiv (X := X)).symm.map_eq_zero_iff.mp + apply (RS.LaurentTail.H1Tail.equivOfSurjective (0 : RS.Divisor X) hsurj).symm.map_eq_zero_iff.mp + apply (Module.forall_dual_apply_eq_zero_iff ℂ _).mp + intro φ + obtain ⟨g, rfl⟩ := formDualEquiv.surjective φ + have hL : ((LinearMap.applyₗ + ((RS.LaurentTail.H1Tail.equivOfSurjective (0 : RS.Divisor X) hsurj).symm + ((RS.dolbeaultEquiv (X := X)).symm (RS.H01.mk η)))).comp formDualEquiv.toLinearMap + : RS.Form1 X →ₗ[ℂ] ℂ) = 0 := + (RS.basis X).ext h + exact LinearMap.congr_fun hL g end RS.Abel diff --git a/LeanPool/JacobianDiffgeo/Abel/LinkData.lean b/LeanPool/JacobianDiffgeo/Abel/LinkData.lean index e5fb34c815..2a40fbd017 100644 --- a/LeanPool/JacobianDiffgeo/Abel/LinkData.lean +++ b/LeanPool/JacobianDiffgeo/Abel/LinkData.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Abel.LogPiece +public import LeanPool.JacobianDiffgeo.Abel.AreaPairing +public import Mathlib.Analysis.Meromorphic.Order import LeanPool.JacobianDiffgeo.Abel.ChartSupported -import LeanPool.JacobianDiffgeo.Abel.SerreFunctional +import LeanPool.JacobianDiffgeo.Abel.LogPiece +import LeanPool.JacobianDiffgeo.AbelWeak.PlanarLogBranch import LeanPool.JacobianDiffgeo.AbelWeak.WeakSolution +import LeanPool.JacobianDiffgeo.Forms.Analyticity +import LeanPool.JacobianDiffgeo.PlanarStokes.Compat +import Mathlib.Analysis.Complex.RemovableSingularity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # abel-theorem: the per-link construction (design §4.1 steps 5-7, link layer) @@ -36,6 +44,8 @@ plus a factor limit pin `meromorphicOrderAt`, via mathlib's removable-singularit `wirtingerDbar_finset_prod`. -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Metric Set MeasureTheory Filter Topology diff --git a/LeanPool/JacobianDiffgeo/Abel/LogPiece.lean b/LeanPool/JacobianDiffgeo/Abel/LogPiece.lean index ebcc6b9f4a..821457633b 100644 --- a/LeanPool/JacobianDiffgeo/Abel/LogPiece.lean +++ b/LeanPool/JacobianDiffgeo/Abel/LogPiece.lean @@ -3,10 +3,17 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.AbelWeak.PlanarLogBranch +public import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct +public import LeanPool.JacobianDiffgeo.Dbar.Wirtinger +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.JacobianDiffgeo.PlanarStokes.AnnulusResidue -import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct +import LeanPool.JacobianDiffgeo.PlanarStokes.Compat +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # abel-theorem: the planar log piece and its residue identity (design §4.1 step 5, planar core) @@ -34,6 +41,8 @@ pole at `α`), interpolated to `1` across the bump annulus `ρ < rIn ≤ ‖z - (`DiffContOnCl.circleIntegral_sub_inv_smul`) evaluates it. -/ +@[expose] public section + open scoped ContDiff open Complex Metric Set MeasureTheory Filter Topology diff --git a/LeanPool/JacobianDiffgeo/Abel/Loops.lean b/LeanPool/JacobianDiffgeo/Abel/Loops.lean index b1a4fec7dc..5231b69eeb 100644 --- a/LeanPool/JacobianDiffgeo/Abel/Loops.lean +++ b/LeanPool/JacobianDiffgeo/Abel/Loops.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.AbelWeak -import LeanPool.JacobianDiffgeo.JacobianConstruction +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Periods +import LeanPool.JacobianDiffgeo.JacobianConstruction.OfCurve +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # abel-theorem: loop-cancellation algebra (`docs/design/abel-theorem.md` §4.2, D2, §2.1 steps 1-3) @@ -26,6 +30,8 @@ Unit: abel-theorem. Namespace `RS.Abel`. Two deliverables: of `RS.pathIntegralₗ` and `Module.Basis.ext`). -/ +@[expose] public section + open scoped ContDiff Manifold noncomputable section diff --git a/LeanPool/JacobianDiffgeo/Abel/OfCurveInj.lean b/LeanPool/JacobianDiffgeo/Abel/OfCurveInj.lean index 62e30446f0..9c0d5d481d 100644 --- a/LeanPool/JacobianDiffgeo/Abel/OfCurveInj.lean +++ b/LeanPool/JacobianDiffgeo/Abel/OfCurveInj.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Abel.Sufficiency +public import LeanPool.JacobianDiffgeo.Abel.Sufficiency +public import LeanPool.JacobianDiffgeo.JacobianConstruction.OfCurve +public import LeanPool.JacobianDiffgeo.LaurentTail.Comparison import LeanPool.JacobianDiffgeo.Abel.UpgradeDischarge +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # abel-theorem: the gated `ofCurve_inj` and final-assembly discharge (§4.4 D4) @@ -25,6 +31,8 @@ moment `period-lattice-rank` registers `instance : DiscreteTopology (RS.periodSu `WeakSolutionUpgrade X` is proved (see `Sufficiency.lean` for the precise remaining roadmap). -/ +@[expose] public section + open scoped ContDiff Manifold namespace Jacobian diff --git a/LeanPool/JacobianDiffgeo/Abel/SerreFunctional.lean b/LeanPool/JacobianDiffgeo/Abel/SerreFunctional.lean index 6a8f22a9c6..6cb9ce4def 100644 --- a/LeanPool/JacobianDiffgeo/Abel/SerreFunctional.lean +++ b/LeanPool/JacobianDiffgeo/Abel/SerreFunctional.lean @@ -3,12 +3,20 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ - -import LeanPool.JacobianDiffgeo.Abel.AreaPairing +module + +public import LeanPool.JacobianDiffgeo.Abel.AreaPairing +public import LeanPool.JacobianDiffgeo.DolbeaultComparison.Comparison +public import LeanPool.JacobianDiffgeo.Forms.Genus +public import LeanPool.JacobianDiffgeo.LaurentTail.Comparison +import LeanPool.JacobianDiffgeo.Finiteness.H1Finite +import LeanPool.JacobianDiffgeo.Forms.Finiteness import LeanPool.JacobianDiffgeo.PlanarStokes.CompactSupport -import LeanPool.JacobianDiffgeo.TailDuality -import LeanPool.JacobianDiffgeo.LaurentTail -import LeanPool.JacobianDiffgeo.DolbeaultComparison +import LeanPool.JacobianDiffgeo.PlanarStokes.Compat +import LeanPool.JacobianDiffgeo.TailDuality.Duality +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.FreeModule.Finite.Matrix +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # abel-theorem: the Serre functional (design §4.3, routing decision #2's "honest integration atom") @@ -46,6 +54,8 @@ concrete planar Stokes/residue computations — the shape `DolbeaultBridge.lean` residue-pairing hypothesis does not directly offer. -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Metric Set MeasureTheory @@ -680,8 +690,7 @@ theorem pairingDual_injective (PU : SurfPoU X) : Function.Injective (pairingDual rw [injective_iff_map_eq_zero] intro θ hθ refine eq_zero_of_pairing_conjForm_eq_zero PU θ ?_ - have happ := congrArg (fun φ => φ (RS.H01.mk (conjForm θ))) hθ - simpa [pairingDual, pairingH01_mk] using happ + exact LinearMap.congr_fun hθ (RS.H01.mk (conjForm θ)) /-! ## The gated dimension count and the integral-pairing bridge -/ @@ -695,9 +704,7 @@ theorem finrank_H01_eq_genus have e1 : RS.LaurentTail.H1Tail (0 : RS.Divisor X) ≃ₗ[ℂ] RS.H01 X := (RS.LaurentTail.H1Tail.equivOfSurjective (0 : RS.Divisor X) hsurj).trans RS.dolbeaultEquiv - have h2 : Module.finrank ℂ (RS.LaurentTail.H1Tail (0 : RS.Divisor X)) = genus X := - RS.TailDuality.h1T_zero_eq_genus - rw [← e1.finrank_eq, h2] + exact e1.finrank_eq.symm.trans RS.TailDuality.h1T_zero_eq_genus /-- **The integral-pairing Dolbeault bridge** (the Serre-functional replacement for `DolbeaultBridge.lean`'s abstract statement): if a smooth `(0,1)`-form pairs to zero against @@ -707,7 +714,7 @@ theorem exists_dbar_of_forall_pairing_eq_zero (PU : SurfPoU X) (hsurj : Function.Surjective (RS.LaurentTail.tailToH1 (0 : RS.Divisor X))) {η : RS.Form01 X} (h : ∀ θ : RS.Form1 X, pairing PU η θ = 0) : ∃ u : RS.SmoothC X, RS.dbar u = η := by - rw [← RS.H01.mk_eq_zero_iff] + apply RS.H01.mk_eq_zero_iff.1 have : FiniteDimensional ℂ (RS.H01 X) := RS.finiteDimensional_H01 have hfr : Module.finrank ℂ (RS.Form1 X) = Module.finrank ℂ (Module.Dual ℂ (RS.H01 X)) := by rw [Subspace.dual_finrank_eq, finrank_H01_eq_genus hsurj] @@ -715,11 +722,9 @@ theorem exists_dbar_of_forall_pairing_eq_zero (PU : SurfPoU X) have hsurjPsi : Function.Surjective (pairingDual PU) := (LinearMap.injective_iff_surjective_of_finrank_eq_finrank hfr).mp (pairingDual_injective PU) - rw [← Module.forall_dual_apply_eq_zero_iff ℂ] + apply (Module.forall_dual_apply_eq_zero_iff ℂ _).mp intro φ obtain ⟨θ, rfl⟩ := hsurjPsi φ - change pairingH01 PU θ (RS.H01.mk η) = 0 - rw [pairingH01_mk] exact h θ /-- **The single remaining gate, reformulated as a pure dimension count**: `tailToH1 0` is @@ -733,26 +738,17 @@ theorem tailToH1_zero_surjective_iff_finrank_le : constructor · intro hsurj have e1 := RS.LaurentTail.H1Tail.equivOfSurjective (0 : RS.Divisor X) hsurj - rw [← e1.finrank_eq] - exact le_of_eq RS.TailDuality.h1T_zero_eq_genus + exact (e1.finrank_eq.symm.trans RS.TailDuality.h1T_zero_eq_genus).le · intro hle have hinj := RS.LaurentTail.H1Tail.toH1_injective (0 : RS.Divisor X) have hgen : Module.finrank ℂ (RS.LaurentTail.H1Tail (0 : RS.Divisor X)) = genus X := RS.TailDuality.h1T_zero_eq_genus have hfr : Module.finrank ℂ (RS.LaurentTail.H1Tail (0 : RS.Divisor X)) - = Module.finrank ℂ (RS.Cech.H1 (0 : RS.Divisor X)) := by - refine le_antisymm ?_ ?_ - · exact LinearMap.finrank_le_finrank_of_injective hinj - · rw [hgen] - exact hle + = Module.finrank ℂ (RS.Cech.H1 (0 : RS.Divisor X)) := + (LinearMap.finrank_le_finrank_of_injective hinj).antisymm (hle.trans_eq hgen.symm) have hsurj' : Function.Surjective (RS.LaurentTail.H1Tail.toH1 (0 : RS.Divisor X)) := (LinearMap.injective_iff_surjective_of_finrank_eq_finrank hfr).mp hinj - intro ξ - obtain ⟨c, hc⟩ := hsurj' ξ - obtain ⟨z, rfl⟩ := RS.LaurentTail.H1Tail.mk_surjective (0 : RS.Divisor X) c - refine ⟨z, ?_⟩ - rw [← RS.LaurentTail.H1Tail.toH1_mk] - exact hc + exact hsurj'.comp (RS.LaurentTail.H1Tail.mk_surjective (0 : RS.Divisor X)) end RS.Abel diff --git a/LeanPool/JacobianDiffgeo/Abel/Sufficiency.lean b/LeanPool/JacobianDiffgeo/Abel/Sufficiency.lean index d6777deaa5..302bbc4143 100644 --- a/LeanPool/JacobianDiffgeo/Abel/Sufficiency.lean +++ b/LeanPool/JacobianDiffgeo/Abel/Sufficiency.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.AbelWeak.WeakSolution +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Periods +public import LeanPool.JacobianDiffgeo.Meromorphic.Field +import LeanPool.JacobianDiffgeo.Abel.Loops import LeanPool.JacobianDiffgeo.Abel.WeakToMero -import LeanPool.JacobianDiffgeo.Abel.DolbeaultBridge +import LeanPool.JacobianDiffgeo.AbelWeak.GeneralChain +import LeanPool.JacobianDiffgeo.JacobianConstruction.OfCurve +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # abel-theorem: the sufficiency direction (`docs/design/abel-theorem.md` §4.1 D1, §2.1) @@ -60,6 +69,8 @@ The **easy/necessity direction** (§2.2, "`∃F` with one simple pole `⟹` `gen built, no admitted steps: `genus_eq_zero_of_exists_simple_pole` (`WeakToMero.lean`). -/ +@[expose] public section + open scoped ContDiff Manifold noncomputable section diff --git a/LeanPool/JacobianDiffgeo/Abel/UpgradeDischarge.lean b/LeanPool/JacobianDiffgeo/Abel/UpgradeDischarge.lean index d75ab13d35..95852e1c6c 100644 --- a/LeanPool/JacobianDiffgeo/Abel/UpgradeDischarge.lean +++ b/LeanPool/JacobianDiffgeo/Abel/UpgradeDischarge.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Abel.LinkData -import LeanPool.JacobianDiffgeo.Abel.Sufficiency -import LeanPool.JacobianDiffgeo.Path +public import LeanPool.JacobianDiffgeo.Abel.LinkData +public import LeanPool.JacobianDiffgeo.Abel.Sufficiency +public import LeanPool.JacobianDiffgeo.LaurentTail.Comparison +import LeanPool.JacobianDiffgeo.Abel.ChartSupported +import LeanPool.JacobianDiffgeo.Abel.SerreFunctional +import LeanPool.JacobianDiffgeo.Abel.WeakToMero +import LeanPool.JacobianDiffgeo.AbelWeak.ChainAssembly +import LeanPool.JacobianDiffgeo.Surface.RealSmooth +import Mathlib.Analysis.Complex.HasPrimitives +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # abel-theorem: the weak-solution-upgrade discharge (design §4.1 steps 5-7, assembled) @@ -38,6 +48,8 @@ external fact (the same gate as `DolbeaultBridge.lean`; the weak-solution hypoth `WeakSolutionUpgrade` shapes are simply not needed: the construction builds its own pieces). -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Metric Set MeasureTheory Filter Topology @@ -124,9 +136,7 @@ private theorem isDbarOn_exp_neg_mul_prod {Λ : Type*} [Fintype Λ] have hrule := wirtingerDbar_finset_prod (f := fun l => f l ∘ ⇑(chartAt ℂ x).symm) Finset.univ (fun l _ => hdiffs l) have hshape : (fT ∘ ⇑(chartAt ℂ x).symm) - = fun w => ∏ l : Λ, (f l ∘ ⇑(chartAt ℂ x).symm) w := by - funext w - simp [hfT_def, Function.comp] + = fun w => ∏ l : Λ, (f l ∘ ⇑(chartAt ℂ x).symm) w := rfl rw [hshape, hrule] have hcoeff : ηT.coeffAt x (chartAt ℂ x x) = ∑ l : Λ, (η l).coeffAt x (chartAt ℂ x x) := by rw [hηT_def] @@ -143,7 +153,7 @@ private theorem isDbarOn_exp_neg_mul_prod {Λ : Type*} [Fintype Λ] rw [hdlog l x (hmemSc x hx l).1 (hmemSc x hx l).2, Finset.prod_congr rfl (fun j _ => hval j)] _ = (η l).coeffAt x (chartAt ℂ x x) * - (f l x * ∏ j ∈ Finset.univ.erase l, f j x) := by ring + (f l x * ∏ j ∈ Finset.univ.erase l, f j x) := mul_assoc _ _ _ _ = (η l).coeffAt x (chartAt ℂ x x) * fT x := by rw [Finset.mul_prod_erase Finset.univ (fun j => f j x) (Finset.mem_univ l)] -- the dbar equation for `u` @@ -155,17 +165,14 @@ private theorem isDbarOn_exp_neg_mul_prod {Λ : Type*} [Fintype Λ] change RS.wirtingerDbar (F₀ ∘ ⇑(chartAt ℂ x).symm) (chartAt ℂ x x) = (0 : RS.Form01 X).coeffAt x (chartAt ℂ x x) rw [RS.Form01.coeffAt_zero] + have hval : (fT ∘ ⇑(chartAt ℂ x).symm) (chartAt ℂ x x) = fT x := by + simp [Function.comp, (chartAt ℂ x).left_inv (mem_chart_source ℂ x)] have hkey : RS.wirtingerDbar (⇑u ∘ ⇑(chartAt ℂ x).symm) (chartAt ℂ x x) = RS.wirtingerDbar (fT ∘ ⇑(chartAt ℂ x).symm) (chartAt ℂ x x) / (fT ∘ ⇑(chartAt ℂ x).symm) (chartAt ℂ x x) := by - have hval : (fT ∘ ⇑(chartAt ℂ x).symm) (chartAt ℂ x x) = fT x := by - simp [Function.comp, (chartAt ℂ x).left_inv (mem_chart_source ℂ x)] rw [hux, hprod_dlog, hval, mul_div_cancel_right₀ _ hfT_ne] - have hval : (fT ∘ ⇑(chartAt ℂ x).symm) (chartAt ℂ x x) = fT x := by - simp [Function.comp, (chartAt ℂ x).left_inv (mem_chart_source ℂ x)] - have hfT_ne' : (fT ∘ ⇑(chartAt ℂ x).symm) (chartAt ℂ x x) ≠ 0 := by - rw [hval] - exact hfT_ne + have hfT_ne' : (fT ∘ ⇑(chartAt ℂ x).symm) (chartAt ℂ x x) ≠ 0 := + hval ▸ hfT_ne exact RS.Abel.wirtingerDbar_exp_neg_mul_eq_zero hud hfTd hkey hfT_ne' /-- **The Abel sufficiency engine** (Forster 20.5 + 20.7(a), assembled; gated only on @@ -182,11 +189,11 @@ theorem exists_mero_of_sum_pathIntegral_eq_zero {ι : Type*} [Fintype ι] [Conne obtain ⟨PU⟩ := SurfPoU.nonempty (X := X) -- the chart chains have hC : ∀ i, Nonempty (RS.ChartChain (δ i)) := fun i => RS.exists_chartChain (δ i) - set C : (i : ι) → RS.ChartChain (δ i) := fun i => (hC i).some with hC_def + let C : (i : ι) → RS.ChartChain (δ i) := fun i => (hC i).some -- the link index and endpoint data - set Λ : Type _ := (i : ι) × Fin (C i).n with hΛ_def - set lA : Λ → X := fun l => (δ l.1).extend ((C l.1).t l.2) with hlA_def - set lB : Λ → X := fun l => (δ l.1).extend ((C l.1).t (l.2 + 1)) with hlB_def + let Λ : Type _ := (i : ι) × Fin (C i).n + let lA : Λ → X := fun l => (δ l.1).extend ((C l.1).t l.2) + let lB : Λ → X := fun l => (δ l.1).extend ((C l.1).t (l.2 + 1)) -- link data from the chain have hmemA : ∀ l : Λ, lA l ∈ ((C l.1).e l.2).source ∧ (C l.1).e l.2 (lA l) ∈ ball ((C l.1).c l.2) ((C l.1).r l.2) := fun l => @@ -231,9 +238,9 @@ theorem exists_mero_of_sum_pathIntegral_eq_zero {ι : Type*} [Fintype ι] [Conne -- STEP 2: solve dbaru = ηT obtain ⟨u, hu⟩ := exists_dbar_of_forall_pairing_eq_zero PU hsurj hpair_total -- STEP 3: the corrected function - set F₀ : X → ℂ := fun x => Complex.exp (-(u x)) * fT x with hF₀_def + let F₀ : X → ℂ := fun x => Complex.exp (-(u x)) * fT x -- the divisor set - set S : Set X := Set.range lA ∪ Set.range lB with hS_def + let S : Set X := Set.range lA ∪ Set.range lB have hSfin : S.Finite := (Set.finite_range _).union (Set.finite_range _) have hSc_open : IsOpen Sᶜ := hSfin.isClosed.isOpen_compl have hmemSc : ∀ x ∈ Sᶜ, ∀ l : Λ, x ≠ lA l ∧ x ≠ lB l := by @@ -269,30 +276,18 @@ theorem exists_mero_of_sum_pathIntegral_eq_zero {ι : Type*} [Fintype ι] [Conne intro x set z₀ : ℂ := chartAt ℂ x x with hz₀_def -- the punctured-holomorphy neighborhood - set V : Set ℂ := (chartAt ℂ x).target ∩ ⇑(chartAt ℂ x).symm ⁻¹' ((S \ {x})ᶜ) with hV_def - have hVopen : IsOpen V := by - have h1 : IsOpen ((S \ {x})ᶜ) := ((hSfin.subset Set.sdiff_subset).isClosed).isOpen_compl - have hthis := (chartAt ℂ x).symm.isOpen_inter_preimage h1 - rw [hV_def] - exact hthis - have hz₀V : z₀ ∈ V := by - constructor - · exact mem_chart_target ℂ x - · rw [Set.mem_preimage, hz₀_def, (chartAt ℂ x).left_inv (mem_chart_source ℂ x)] - intro hmem - exact hmem.2 rfl + let V : Set ℂ := (chartAt ℂ x).target ∩ ⇑(chartAt ℂ x).symm ⁻¹' ((S \ {x})ᶜ) + have hVopen : IsOpen V := + (chartAt ℂ x).symm.isOpen_inter_preimage + (hSfin.subset Set.sdiff_subset).isClosed.isOpen_compl + have hz₀V : z₀ ∈ V := + ⟨mem_chart_target ℂ x, fun hmem => + hmem.2 ((chartAt ℂ x).left_inv (mem_chart_source ℂ x))⟩ have hVmem : V ∈ nhds z₀ := hVopen.mem_nhds hz₀V have hVsub : V \ {z₀} ⊆ (chartAt ℂ x).target ∩ ⇑(chartAt ℂ x).symm ⁻¹' Sᶜ := by rintro w ⟨⟨hw1, hw2⟩, hw3⟩ - refine ⟨hw1, ?_⟩ - rw [Set.mem_preimage] at hw2 ⊢ - intro hmem - refine hw2 ⟨hmem, fun heq => ?_⟩ - rw [Set.mem_singleton_iff] at heq - apply hw3 - rw [Set.mem_singleton_iff, hz₀_def] - calc w = chartAt ℂ x ((chartAt ℂ x).symm w) := ((chartAt ℂ x).right_inv hw1).symm - _ = chartAt ℂ x x := by rw [heq] + exact ⟨hw1, fun hmem => hw2 ⟨hmem, fun heq => + hw3 (((chartAt ℂ x).right_inv hw1).symm.trans (congrArg (chartAt ℂ x) heq))⟩⟩ -- punctured differentiability of the chart representative have hdiffV : DifferentiableOn ℂ (F₀ ∘ ⇑(chartAt ℂ x).symm) (V \ {z₀}) := by have hsymm : ContMDiffOn 𝓘(ℂ) 𝓘(ℂ) ω (⇑(chartAt ℂ x).symm) (chartAt ℂ x).target := @@ -342,37 +337,26 @@ theorem exists_mero_of_sum_pathIntegral_eq_zero {ι : Type*} [Fintype ι] [Conne = (F₀ ∘ ⇑(chartAt ℂ x).symm) z * (z - z₀) ^ (-(∑ l : Λ, linkOrd (lA l) (lB l) x)) rw [hzpow, Finset.prod_mul_distrib] - change Complex.exp (-(u ((chartAt ℂ x).symm z))) * - ((∏ l : Λ, f l ((chartAt ℂ x).symm z)) * - ∏ l : Λ, (z - z₀) ^ (-(linkOrd (lA l) (lB l) x))) - = Complex.exp (-(u ((chartAt ℂ x).symm z))) * fT ((chartAt ℂ x).symm z) * - ∏ l : Λ, (z - z₀) ^ (-(linkOrd (lA l) (lB l) x)) - rw [hfT_def] - ring + exact (mul_assoc _ _ _).symm exact meromorphicAt_of_tendsto_factor hVmem hdiffV hCtot_ne hfactor_tot -- STEP 5: package as a `Mero` and read off orders have hmero : RS.MeromorphicOnX F₀ (Set.univ : Set X) := fun x _ => (hmero_ord x).1 - set F : RS.Mero X := RS.MeroGermOn.mk F₀ hmero with hF_def + let F : RS.Mero X := RS.MeroGermOn.mk F₀ hmero have hord : ∀ z : X, F.ord z = ((∑ l : Λ, linkOrd (lA l) (lB l) z : ℤ) : WithTop ℤ) := by intro z - rw [hF_def, RS.MeroGermOn.ord_mk isOpen_univ (Set.mem_univ z)] - exact (hmero_ord z).2 + exact (RS.MeroGermOn.ord_mk isOpen_univ (Set.mem_univ z)).trans (hmero_ord z).2 -- telescope the link orders back to endpoint orders have htel : ∀ z : X, ∑ l : Λ, linkOrd (lA l) (lB l) z = ∑ i, linkOrd (A i) (B i) z := by intro z rw [← Finset.univ_sigma_univ, Finset.sum_sigma] refine Finset.sum_congr rfl (fun i _ => ?_) - have hstep : ∀ k : ℕ, linkOrd ((δ i).extend ((C i).t k)) ((δ i).extend ((C i).t (k + 1))) z - = (if z = (δ i).extend ((C i).t (k + 1)) then (1 : ℤ) else 0) - - (if z = (δ i).extend ((C i).t k) then (1 : ℤ) else 0) := fun k => rfl calc ∑ k : Fin (C i).n, linkOrd (lA ⟨i, k⟩) (lB ⟨i, k⟩) z = ∑ k ∈ Finset.range (C i).n, ((if z = (δ i).extend ((C i).t (k + 1)) then (1 : ℤ) else 0) - (if z = (δ i).extend ((C i).t k) then (1 : ℤ) else 0)) := by - rw [← Fin.sum_univ_eq_sum_range (fun k => + exact Fin.sum_univ_eq_sum_range (fun k => (if z = (δ i).extend ((C i).t (k + 1)) then (1 : ℤ) else 0) - - (if z = (δ i).extend ((C i).t k) then (1 : ℤ) else 0)) (C i).n] - exact Finset.sum_congr rfl (fun k _ => rfl) + - (if z = (δ i).extend ((C i).t k) then (1 : ℤ) else 0)) (C i).n _ = (if z = (δ i).extend ((C i).t (C i).n) then (1 : ℤ) else 0) - (if z = (δ i).extend ((C i).t 0) then (1 : ℤ) else 0) := Finset.sum_range_sub (fun k => if z = (δ i).extend ((C i).t k) then (1 : ℤ) else 0) diff --git a/LeanPool/JacobianDiffgeo/Abel/WeakToMero.lean b/LeanPool/JacobianDiffgeo/Abel/WeakToMero.lean index 3eb99510d4..94e034f764 100644 --- a/LeanPool/JacobianDiffgeo/Abel/WeakToMero.lean +++ b/LeanPool/JacobianDiffgeo/Abel/WeakToMero.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Abel.Loops -import LeanPool.JacobianDiffgeo.Dbar -import LeanPool.JacobianDiffgeo.Meromorphic -import LeanPool.JacobianDiffgeo.ProperDegree -import LeanPool.JacobianDiffgeo.SphereTopology +public import LeanPool.JacobianDiffgeo.Dbar.Wirtinger +public import LeanPool.JacobianDiffgeo.Forms.Genus +public import LeanPool.JacobianDiffgeo.Meromorphic.OrderEval +public import Mathlib.Analysis.Complex.Exponential +import LeanPool.JacobianDiffgeo.PlanarStokes.Compat +import LeanPool.JacobianDiffgeo.ProperDegree.GenusZeroFinisher +import LeanPool.JacobianDiffgeo.SphereTopology.Headline +import Mathlib.Analysis.SpecialFunctions.ExpDeriv +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # abel-theorem: the CR-converse promotion (`docs/design/abel-theorem.md` §4.2 D2, §2.1 step 7) @@ -29,6 +36,8 @@ Unit: abel-theorem. Namespace `RS.Abel`. Two deliverables: imported anywhere in this unit, matching the design's finding (§2.2). -/ +@[expose] public section + open scoped ContDiff Manifold noncomputable section diff --git a/LeanPool/JacobianDiffgeo/AbelWeak.lean b/LeanPool/JacobianDiffgeo/AbelWeak.lean index 3cda1a3943..8c5f165bc4 100644 --- a/LeanPool/JacobianDiffgeo/AbelWeak.lean +++ b/LeanPool/JacobianDiffgeo/AbelWeak.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.AbelWeak.PlanarLogBranch -import LeanPool.JacobianDiffgeo.AbelWeak.WeakSolution -import LeanPool.JacobianDiffgeo.AbelWeak.SingleChart -import LeanPool.JacobianDiffgeo.AbelWeak.ChainAssembly -import LeanPool.JacobianDiffgeo.AbelWeak.Rechart -import LeanPool.JacobianDiffgeo.AbelWeak.GeneralChain +public import LeanPool.JacobianDiffgeo.AbelWeak.PlanarLogBranch +public import LeanPool.JacobianDiffgeo.AbelWeak.WeakSolution +public import LeanPool.JacobianDiffgeo.AbelWeak.SingleChart +public import LeanPool.JacobianDiffgeo.AbelWeak.ChainAssembly +public import LeanPool.JacobianDiffgeo.AbelWeak.Rechart +public import LeanPool.JacobianDiffgeo.AbelWeak.GeneralChain +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # abel-weak-solutions: weak solutions, the planar log-branch, and chain assembly (Forster @@ -129,3 +133,5 @@ now-built `exists_weakSolutionOfPair` above) have everything they need from this tightened `Builds on:` line (§2.5) plus the `ChartChain` dependency the general-chain gap closure needed. No file here imports `Jacobian.Monodromy`, `Jacobian.FormTrace`, or `Jacobian.Meromorphic`. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/AbelWeak/ChainAssembly.lean b/LeanPool/JacobianDiffgeo/AbelWeak/ChainAssembly.lean index c2102a34dc..61210deb2e 100644 --- a/LeanPool/JacobianDiffgeo/AbelWeak/ChainAssembly.lean +++ b/LeanPool/JacobianDiffgeo/AbelWeak/ChainAssembly.lean @@ -3,10 +3,21 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ - +module + +public import LeanPool.JacobianDiffgeo.AbelWeak.WeakSolution +public import LeanPool.JacobianDiffgeo.Dbar.Wirtinger +public import LeanPool.JacobianDiffgeo.Path.Chain +public import LeanPool.JacobianDiffgeo.Path.Continuation +public import Mathlib.Analysis.Calculus.BumpFunction.Basic +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.JacobianDiffgeo.AbelWeak.SingleChart -import LeanPool.JacobianDiffgeo.Path -import LeanPool.JacobianDiffgeo.PlanarStokes +import LeanPool.JacobianDiffgeo.PlanarStokes.AnnulusResidue +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Chain assembly (`abel-weak-solutions`, §7) @@ -37,6 +48,8 @@ induction gluing `SingleChart` pieces at every interior breakpoint via a fully g order-additive `IsWeakSolutionAt.mul`. -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Metric Set Filter Topology diff --git a/LeanPool/JacobianDiffgeo/AbelWeak/GeneralChain.lean b/LeanPool/JacobianDiffgeo/AbelWeak/GeneralChain.lean index 0b98076d1a..fab13ad347 100644 --- a/LeanPool/JacobianDiffgeo/AbelWeak/GeneralChain.lean +++ b/LeanPool/JacobianDiffgeo/AbelWeak/GeneralChain.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.AbelWeak.WeakSolution import LeanPool.JacobianDiffgeo.AbelWeak.Rechart import LeanPool.JacobianDiffgeo.AbelWeak.SingleChart import LeanPool.JacobianDiffgeo.Path.Chain +import LeanPool.JacobianDiffgeo.Surface.RealSmooth /-! # The general multi-chart `exists_weakSolutionOfPair` @@ -35,6 +38,8 @@ THREE points (`M 0`, `M m`, `M (m+1)`, with the possible coincidences `M 0 = M m off-`U` value if `P ∉ U`). -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Metric Set Filter Topology diff --git a/LeanPool/JacobianDiffgeo/AbelWeak/PlanarLogBranch.lean b/LeanPool/JacobianDiffgeo/AbelWeak/PlanarLogBranch.lean index 7a18866526..87b78fb905 100644 --- a/LeanPool/JacobianDiffgeo/AbelWeak/PlanarLogBranch.lean +++ b/LeanPool/JacobianDiffgeo/AbelWeak/PlanarLogBranch.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Complex.Exponential +public import Mathlib.Topology.Algebra.Module.ModuleTopology import Mathlib.Analysis.Complex.HasPrimitives -import Mathlib.Analysis.SpecialFunctions.Complex.Log -import Mathlib.Analysis.Calculus.Deriv.Inv /-! # The planar log-branch atom (`abel-weak-solutions`, D2 / §6.1) @@ -25,6 +28,8 @@ imports (matches `Path/Planar.lean`'s hygiene). Two facts: machinery needed). -/ +@[expose] public section + open Complex Metric Set noncomputable section diff --git a/LeanPool/JacobianDiffgeo/AbelWeak/Rechart.lean b/LeanPool/JacobianDiffgeo/AbelWeak/Rechart.lean index 8fb132dc04..deef1eb378 100644 --- a/LeanPool/JacobianDiffgeo/AbelWeak/Rechart.lean +++ b/LeanPool/JacobianDiffgeo/AbelWeak/Rechart.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.AbelWeak.WeakSolution +public import LeanPool.JacobianDiffgeo.AbelWeak.WeakSolution import Mathlib.Analysis.Analytic.IsolatedZeros +import Mathlib.Geometry.Manifold.ContMDiff.Atlas +import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Rechart: `IsWeakSolutionAt` is chart-independent, and general order-additive multiplication @@ -35,6 +39,8 @@ uniformly for every `k1, k2` (no case split needed: `Function.update`'s value when `k1 + k2 = 0`, AND the generic case, `= 0`, matching what the naive product already gives). -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Filter Topology Set diff --git a/LeanPool/JacobianDiffgeo/AbelWeak/SingleChart.lean b/LeanPool/JacobianDiffgeo/AbelWeak/SingleChart.lean index 65262a2f0b..df6b89efbe 100644 --- a/LeanPool/JacobianDiffgeo/AbelWeak/SingleChart.lean +++ b/LeanPool/JacobianDiffgeo/AbelWeak/SingleChart.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.AbelWeak.WeakSolution +public import Mathlib.Analysis.Calculus.BumpFunction.Basic import LeanPool.JacobianDiffgeo.AbelWeak.PlanarLogBranch -import LeanPool.JacobianDiffgeo.AbelWeak.WeakSolution -import Mathlib.Analysis.Calculus.BumpFunction.Basic +import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Geometry.Manifold.ContMDiff.Atlas +import Mathlib.Geometry.Manifold.ContMDiff.Basic /-! # The single-chart weak solution (`abel-weak-solutions`, §6.2-6.3) @@ -26,6 +31,8 @@ beyond `Set.EqOn`-rewriting** on the transition annulus (the same shape the desi describes). -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Metric Set Filter Topology diff --git a/LeanPool/JacobianDiffgeo/AbelWeak/WeakSolution.lean b/LeanPool/JacobianDiffgeo/AbelWeak/WeakSolution.lean index 9b1d0b8f65..39cee26746 100644 --- a/LeanPool/JacobianDiffgeo/AbelWeak/WeakSolution.lean +++ b/LeanPool/JacobianDiffgeo/AbelWeak/WeakSolution.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import Mathlib.Geometry.Manifold.ContMDiff.Atlas -import Mathlib.Analysis.Calculus.ContDiff.Operations +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Geometry.Manifold.ContMDiff.Defs import LeanPool.JacobianDiffgeo.Surface.RealSmooth /-! @@ -28,6 +29,8 @@ two-point pairs — the degenerate, already-disjoint case `abel-theorem`'s own 2 construction sets up (no general chain/homology bookkeeping needed). -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Filter Topology Set diff --git a/LeanPool/JacobianDiffgeo/CanonicalForms.lean b/LeanPool/JacobianDiffgeo/CanonicalForms.lean index 96b7edcef9..9fef7a8543 100644 --- a/LeanPool/JacobianDiffgeo/CanonicalForms.lean +++ b/LeanPool/JacobianDiffgeo/CanonicalForms.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.CanonicalForms.MForm -import LeanPool.JacobianDiffgeo.CanonicalForms.OrdRes -import LeanPool.JacobianDiffgeo.CanonicalForms.Quotient -import LeanPool.JacobianDiffgeo.CanonicalForms.Differential -import LeanPool.JacobianDiffgeo.CanonicalForms.OneDimensional -import LeanPool.JacobianDiffgeo.CanonicalForms.LinearSystems -import LeanPool.JacobianDiffgeo.CanonicalForms.Existence +public import LeanPool.JacobianDiffgeo.CanonicalForms.MForm +public import LeanPool.JacobianDiffgeo.CanonicalForms.OrdRes +public import LeanPool.JacobianDiffgeo.CanonicalForms.Quotient +public import LeanPool.JacobianDiffgeo.CanonicalForms.Differential +public import LeanPool.JacobianDiffgeo.CanonicalForms.OneDimensional +public import LeanPool.JacobianDiffgeo.CanonicalForms.LinearSystems +public import LeanPool.JacobianDiffgeo.CanonicalForms.Existence +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # canonical-forms: meromorphic 1-forms and the canonical divisor `K` (namespace `RS`) @@ -94,3 +97,5 @@ congruences; the raw files remain the foundation every proof works through via r since residue-theorem is DOWNSTREAM of canonical-forms, importing it back would cycle; this is the clean home, and `residue-theorem` now imports it from here). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/CanonicalForms/Differential.lean b/LeanPool/JacobianDiffgeo/CanonicalForms/Differential.lean index 27ad7c844f..d492a8dc71 100644 --- a/LeanPool/JacobianDiffgeo/CanonicalForms/Differential.lean +++ b/LeanPool/JacobianDiffgeo/CanonicalForms/Differential.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.CanonicalForms.Quotient +public import LeanPool.JacobianDiffgeo.CanonicalForms.Quotient +public import LeanPool.JacobianDiffgeo.Forms.Coeffs +public import Mathlib.Algebra.Module.MinimalAxioms +import LeanPool.JacobianDiffgeo.Forms.Analyticity +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `ofForm1`, the `ℳ(X)`-module structure, `d`, `dlog` (D7), data + quotient layers @@ -37,6 +44,8 @@ Quotient layer (`MForm`, the honest 1-form type): pointwise engine). -/ +@[expose] public section + open scoped ContDiff Manifold open Set IsManifold Filter Topology diff --git a/LeanPool/JacobianDiffgeo/CanonicalForms/Existence.lean b/LeanPool/JacobianDiffgeo/CanonicalForms/Existence.lean index 706b3825fb..8080f170e3 100644 --- a/LeanPool/JacobianDiffgeo/CanonicalForms/Existence.lean +++ b/LeanPool/JacobianDiffgeo/CanonicalForms/Existence.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.CanonicalForms.LinearSystems +public import LeanPool.JacobianDiffgeo.CanonicalForms.OneDimensional import LeanPool.JacobianDiffgeo.Finiteness.Chi -import Mathlib.Analysis.Calculus.MeanValue +import LeanPool.JacobianDiffgeo.Meromorphic.CodiscreteBridge +import LeanPool.JacobianDiffgeo.Surface.Bridges +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # D9: existence of a nonconstant meromorphic function and a nonzero meromorphic 1-form @@ -51,6 +56,8 @@ plan flagged as "the ONLY file gated on finiteness-and-chi" can finally be writt instantiated at all; D9 supplies it). -/ +@[expose] public section + open scoped ContDiff Manifold open Set IsManifold Filter Topology diff --git a/LeanPool/JacobianDiffgeo/CanonicalForms/LinearSystems.lean b/LeanPool/JacobianDiffgeo/CanonicalForms/LinearSystems.lean index 380724df88..6a2263176c 100644 --- a/LeanPool/JacobianDiffgeo/CanonicalForms/LinearSystems.lean +++ b/LeanPool/JacobianDiffgeo/CanonicalForms/LinearSystems.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ - -import LeanPool.JacobianDiffgeo.CanonicalForms.OneDimensional +module + +public import LeanPool.JacobianDiffgeo.CanonicalForms.OneDimensional +public import LeanPool.JacobianDiffgeo.Forms.Genus +public import LeanPool.JacobianDiffgeo.Meromorphic.LinearSystem +public import LeanPool.JacobianDiffgeo.ResidueCalculus.MittagLeffler +import LeanPool.JacobianDiffgeo.Forms.OfCoeffs +import LeanPool.JacobianDiffgeo.Surface.Bridges +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `Ω(D)`, the `L(D+K)` bridge, holomorphic forms, and ML form data (D11/D12/D13) @@ -32,6 +41,8 @@ Unit: canonical-forms (`docs/design/canonical-forms.md` §2 D11–D13, §4.5, pr `Realizes.resAt_eq`: a thin `X`-level wrapper around residue-calculus's `PrincipalPartData`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set IsManifold Filter Topology diff --git a/LeanPool/JacobianDiffgeo/CanonicalForms/MForm.lean b/LeanPool/JacobianDiffgeo/CanonicalForms/MForm.lean index c6f04391ae..8876999110 100644 --- a/LeanPool/JacobianDiffgeo/CanonicalForms/MForm.lean +++ b/LeanPool/JacobianDiffgeo/CanonicalForms/MForm.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Forms -import LeanPool.JacobianDiffgeo.Meromorphic +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.Meromorphic.Basic +public import Mathlib.Geometry.Manifold.IsManifold.Basic +import LeanPool.JacobianDiffgeo.Forms.Analyticity +import LeanPool.JacobianDiffgeo.LocalMultiplicity.ChartBridge +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `MFormData X`: raw chart-coefficient families for meromorphic 1-forms (D1–D3, data layer) @@ -38,6 +44,8 @@ Main declarations: in `Differential.lean`), offered for future covering-family constructions (e.g. laurent-tails). -/ +@[expose] public section + open scoped ContDiff Manifold open Set IsManifold diff --git a/LeanPool/JacobianDiffgeo/CanonicalForms/OneDimensional.lean b/LeanPool/JacobianDiffgeo/CanonicalForms/OneDimensional.lean index 44f6e41b34..df1077645f 100644 --- a/LeanPool/JacobianDiffgeo/CanonicalForms/OneDimensional.lean +++ b/LeanPool/JacobianDiffgeo/CanonicalForms/OneDimensional.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.CanonicalForms.Differential +public import LeanPool.JacobianDiffgeo.CanonicalForms.Differential +import LeanPool.JacobianDiffgeo.Meromorphic.CodiscreteBridge import LeanPool.JacobianDiffgeo.Meromorphic.Gluing +import LeanPool.JacobianDiffgeo.Meromorphic.LinearSystem +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # One-dimensionality over `ℳ(X)` (D8) and the canonical divisor `K` (D10) @@ -33,6 +38,8 @@ Hypothesis note: D8 needs only `[T1Space X] [ConnectedSpace X]` (the design list `[T2Space X]`, which is not required — the dichotomy and `Mero.ord_ne_top` are `T1`-level). -/ +@[expose] public section + open scoped ContDiff Manifold open Set IsManifold Filter Topology diff --git a/LeanPool/JacobianDiffgeo/CanonicalForms/OrdRes.lean b/LeanPool/JacobianDiffgeo/CanonicalForms/OrdRes.lean index 874a183b9e..880e55ec2f 100644 --- a/LeanPool/JacobianDiffgeo/CanonicalForms/OrdRes.lean +++ b/LeanPool/JacobianDiffgeo/CanonicalForms/OrdRes.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.CanonicalForms.MForm -import LeanPool.JacobianDiffgeo.ResidueCalculus +public import LeanPool.JacobianDiffgeo.CanonicalForms.MForm +public import LeanPool.JacobianDiffgeo.Meromorphic.Divisor +public import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue +import LeanPool.JacobianDiffgeo.ResidueCalculus.ChangeOfVariables +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `MFormData.ord`/`resAt` (D4), chart-invariance, and `divisor` (D6) — data layer @@ -28,6 +33,8 @@ order, `MeroGermOn.divisorOn`'s proof exactly. -/ +@[expose] public section + open scoped ContDiff Manifold open Set IsManifold Filter Topology diff --git a/LeanPool/JacobianDiffgeo/CanonicalForms/Quotient.lean b/LeanPool/JacobianDiffgeo/CanonicalForms/Quotient.lean index a0318bab69..c58ed1f91b 100644 --- a/LeanPool/JacobianDiffgeo/CanonicalForms/Quotient.lean +++ b/LeanPool/JacobianDiffgeo/CanonicalForms/Quotient.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.CanonicalForms.OrdRes +public import LeanPool.JacobianDiffgeo.CanonicalForms.OrdRes +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `MForm X`: meromorphic 1-forms as germ classes of chart-coefficient families (D1/D2/D4–D6) @@ -31,6 +34,8 @@ meromorphic functions by codiscrete agreement (`Jacobian/Meromorphic/GermSpace.l `MForm.ord_ne_top`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set IsManifold Filter Topology diff --git a/LeanPool/JacobianDiffgeo/Cech.lean b/LeanPool/JacobianDiffgeo/Cech.lean index 2405d9696e..00f734331b 100644 --- a/LeanPool/JacobianDiffgeo/Cech.lean +++ b/LeanPool/JacobianDiffgeo/Cech.lean @@ -3,17 +3,20 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Cech.Covers -import LeanPool.JacobianDiffgeo.Cech.Cochains -import LeanPool.JacobianDiffgeo.Cech.H0 -import LeanPool.JacobianDiffgeo.Cech.Refinement -import LeanPool.JacobianDiffgeo.Cech.Colimit -import LeanPool.JacobianDiffgeo.Cech.Injectivity -import LeanPool.JacobianDiffgeo.Cech.Window -import LeanPool.JacobianDiffgeo.Cech.WindowRank -import LeanPool.JacobianDiffgeo.Cech.Skyscraper -import LeanPool.JacobianDiffgeo.Cech.SixTerm +public import LeanPool.JacobianDiffgeo.Cech.Covers +public import LeanPool.JacobianDiffgeo.Cech.Cochains +public import LeanPool.JacobianDiffgeo.Cech.H0 +public import LeanPool.JacobianDiffgeo.Cech.Refinement +public import LeanPool.JacobianDiffgeo.Cech.Colimit +public import LeanPool.JacobianDiffgeo.Cech.Injectivity +public import LeanPool.JacobianDiffgeo.Cech.Window +public import LeanPool.JacobianDiffgeo.Cech.WindowRank +public import LeanPool.JacobianDiffgeo.Cech.Skyscraper +public import LeanPool.JacobianDiffgeo.Cech.SixTerm +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # cech-cohomology (CC8): `H¹(D)` as a directed colimit over finite covers (namespace `RS.Cech`) @@ -58,3 +61,5 @@ The unit is **complete**: every export above (including Forster 12.4 injectivity dimension counts, and the full six-term fragment, all previously deferred) is proved with zero sorries. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/Cech/Cochains.lean b/LeanPool/JacobianDiffgeo/Cech/Cochains.lean index 9f14206aec..4612a7a5ec 100644 --- a/LeanPool/JacobianDiffgeo/Cech/Cochains.lean +++ b/LeanPool/JacobianDiffgeo/Cech/Cochains.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Cech.Covers -import LeanPool.JacobianDiffgeo.Meromorphic +public import LeanPool.JacobianDiffgeo.Cech.Covers +public import LeanPool.JacobianDiffgeo.Meromorphic.LinearSystem +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Čech cochains, coboundary maps, `Z¹`/`B¹`/`H¹(𝒰,D)` (CC8, D5/D6) @@ -20,6 +23,8 @@ Unit: cech-cohomology (`docs/design/cech-cohomology.md` §4.2). * `Z1`/`B1`/`H1Cover` — the cover-level Čech `H¹(𝒰,D)`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace RS.Cech @@ -143,58 +148,18 @@ theorem d1_comp_d0 : (d1 D 𝒰) ∘ₗ (d0 D 𝒰) = 0 := by intro f funext t obtain ⟨i, j, k⟩ := t - simp only [LinearMap.comp_apply, d1_apply, d0_apply, LinearMap.zero_apply] - have e1 : LinSysOn.restrictL D (le_inf (inf_le_left.trans inf_le_right) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U j ⊓ 𝒰.U k) - (LinSysOn.restrictL D (inf_le_right : 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U k) (f k)) = - LinSysOn.restrictL D - (le_trans (le_inf (inf_le_left.trans inf_le_right) inf_le_right) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U k) (f k) := - restrictL_restrictL D inf_le_right _ _ (f k) - have e2 : LinSysOn.restrictL D (le_inf (inf_le_left.trans inf_le_right) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U j ⊓ 𝒰.U k) - (LinSysOn.restrictL D (inf_le_left : 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U j) (f j)) = - LinSysOn.restrictL D - (le_trans (le_inf (inf_le_left.trans inf_le_right) inf_le_right) inf_le_left : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U j) (f j) := - restrictL_restrictL D inf_le_left _ _ (f j) - have e3 : LinSysOn.restrictL D (le_inf (inf_le_left.trans inf_le_left) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U i ⊓ 𝒰.U k) - (LinSysOn.restrictL D (inf_le_right : 𝒰.U i ⊓ 𝒰.U k ≤ 𝒰.U k) (f k)) = - LinSysOn.restrictL D - (le_trans (le_inf (inf_le_left.trans inf_le_left) inf_le_right) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U k) (f k) := - restrictL_restrictL D inf_le_right _ _ (f k) - have e4 : LinSysOn.restrictL D (le_inf (inf_le_left.trans inf_le_left) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U i ⊓ 𝒰.U k) - (LinSysOn.restrictL D (inf_le_left : 𝒰.U i ⊓ 𝒰.U k ≤ 𝒰.U i) (f i)) = - LinSysOn.restrictL D - (le_trans (le_inf (inf_le_left.trans inf_le_left) inf_le_right) inf_le_left : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U i) (f i) := - restrictL_restrictL D inf_le_left _ _ (f i) - have e5 : LinSysOn.restrictL D (inf_le_left : 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U i ⊓ 𝒰.U j) - (LinSysOn.restrictL D (inf_le_right : 𝒰.U i ⊓ 𝒰.U j ≤ 𝒰.U j) (f j)) = - LinSysOn.restrictL D - (le_trans inf_le_left inf_le_right : 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U j) (f j) := - restrictL_restrictL D inf_le_right _ _ (f j) - have e6 : LinSysOn.restrictL D (inf_le_left : 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U i ⊓ 𝒰.U j) - (LinSysOn.restrictL D (inf_le_left : 𝒰.U i ⊓ 𝒰.U j ≤ 𝒰.U i) (f i)) = - LinSysOn.restrictL D - (le_trans inf_le_left inf_le_left : 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U i) (f i) := - restrictL_restrictL D inf_le_left _ _ (f i) - simp only [map_sub] - rw [e1, e2, e3, e4, e5, e6] - have p1 : (le_trans (le_inf (inf_le_left.trans inf_le_right) inf_le_right) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U k) = - (le_trans (le_inf (inf_le_left.trans inf_le_left) inf_le_right) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U k) := rfl - have p2 : (le_trans (le_inf (inf_le_left.trans inf_le_right) inf_le_right) inf_le_left : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U j) = - (le_trans inf_le_left inf_le_right : 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U j) := rfl - have p3 : (le_trans (le_inf (inf_le_left.trans inf_le_left) inf_le_right) inf_le_left : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U i) = - (le_trans inf_le_left inf_le_left : 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k ≤ 𝒰.U i) := rfl - rw [p1, p2, p3, Pi.zero_apply] + let W : Opens X := 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k + have hi : W ≤ 𝒰.U i := inf_le_left.trans inf_le_left + have hj : W ≤ 𝒰.U j := inf_le_left.trans inf_le_right + have hk : W ≤ 𝒰.U k := inf_le_right + have hij : W ≤ 𝒰.U i ⊓ 𝒰.U j := inf_le_left + have hik : W ≤ 𝒰.U i ⊓ 𝒰.U k := le_inf hi hk + have hjk : W ≤ 𝒰.U j ⊓ 𝒰.U k := le_inf hj hk + simp only [LinearMap.comp_apply, d1_apply, d0_apply, LinearMap.zero_apply, Pi.zero_apply, + map_sub] + rw [restrictL_restrictL D inf_le_right hjk hk, restrictL_restrictL D inf_le_left hjk hj, + restrictL_restrictL D inf_le_right hik hk, restrictL_restrictL D inf_le_left hik hi, + restrictL_restrictL D inf_le_right hij hj, restrictL_restrictL D inf_le_left hij hi] abel /-! ### `Z1`, `B1`, `H1Cover` -/ @@ -222,9 +187,7 @@ theorem B1_le_Z1 : B1 D 𝒰 ≤ Z1 D 𝒰 := by exact LinearMap.congr_fun (d1_comp_d0 D 𝒰) x omit [IsManifold 𝓘(ℂ, ℂ) ω X] in -theorem mem_Z1_iff (f : C1 D 𝒰) : f ∈ Z1 D 𝒰 ↔ ∀ t, d1 D 𝒰 f t = 0 := by - rw [Z1, LinearMap.mem_ker] - exact ⟨fun h t => congrFun h t, fun h => funext h⟩ +theorem mem_Z1_iff (f : C1 D 𝒰) : f ∈ Z1 D 𝒰 ↔ ∀ t, d1 D 𝒰 f t = 0 := funext_iff /-- The Čech `H¹(𝒰,D)` at cover level. Reducible (`abbrev`) for the same reason as `C0/C1/C2`. -/ noncomputable abbrev H1Cover : Type _ := Z1 D 𝒰 ⧸ (B1 D 𝒰).comap (Z1 D 𝒰).subtype @@ -237,9 +200,7 @@ theorem H1Cover.mk_surjective : Function.Surjective (H1Cover.mk D 𝒰) := Submo omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem H1Cover.mk_eq_zero_iff (f : Z1 D 𝒰) : - H1Cover.mk D 𝒰 f = 0 ↔ (f : C1 D 𝒰) ∈ B1 D 𝒰 := by - rw [H1Cover.mk, Submodule.mkQ_apply, Submodule.Quotient.mk_eq_zero, Submodule.mem_comap] - rfl + H1Cover.mk D 𝒰 f = 0 ↔ (f : C1 D 𝒰) ∈ B1 D 𝒰 := Submodule.Quotient.mk_eq_zero _ omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem subsingleton_h1Cover_iff : Subsingleton (H1Cover D 𝒰) ↔ Z1 D 𝒰 ≤ B1 D 𝒰 := by @@ -251,18 +212,9 @@ omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem Z1.ord_diag {f : C1 D 𝒰} (hf : f ∈ Z1 D 𝒰) (i : Fin 𝒰.n) {x : X} (hx : x ∈ (𝒰.U i ⊓ 𝒰.U i : Opens X)) : (f (i, i) : RS.MeroGermOn X ((𝒰.U i ⊓ 𝒰.U i : Opens X) : Set X)).ord x = ⊤ := by - have hzero : d1 D 𝒰 f (i, i, i) = 0 := (mem_Z1_iff D 𝒰 f).1 hf (i, i, i) - rw [d1_apply] at hzero - have hcollapse : LinSysOn.restrictL D - (le_inf (inf_le_left.trans inf_le_right) inf_le_right : - 𝒰.U i ⊓ 𝒰.U i ⊓ 𝒰.U i ≤ 𝒰.U i ⊓ 𝒰.U i) (f (i, i)) - - LinSysOn.restrictL D - (le_inf (inf_le_left.trans inf_le_left) inf_le_right : - 𝒰.U i ⊓ 𝒰.U i ⊓ 𝒰.U i ≤ 𝒰.U i ⊓ 𝒰.U i) (f (i, i)) - + LinSysOn.restrictL D (inf_le_left : 𝒰.U i ⊓ 𝒰.U i ⊓ 𝒰.U i ≤ 𝒰.U i ⊓ 𝒰.U i) (f (i, i)) - = LinSysOn.restrictL D (inf_le_left : 𝒰.U i ⊓ 𝒰.U i ⊓ 𝒰.U i ≤ 𝒰.U i ⊓ 𝒰.U i) (f (i, i)) := by - abel - rw [hcollapse] at hzero + have hzero : LinSysOn.restrictL D + (inf_le_left : 𝒰.U i ⊓ 𝒰.U i ⊓ 𝒰.U i ≤ 𝒰.U i ⊓ 𝒰.U i) (f (i, i)) = 0 := by + simpa only [d1_apply, sub_self, zero_add] using (mem_Z1_iff D 𝒰 f).1 hf (i, i, i) have hxx : x ∈ (𝒰.U i ⊓ 𝒰.U i ⊓ 𝒰.U i : Opens X) := ⟨hx, hx.2⟩ have := ord_restrictL D (inf_le_left : 𝒰.U i ⊓ 𝒰.U i ⊓ 𝒰.U i ≤ 𝒰.U i ⊓ 𝒰.U i) hxx (f (i, i)) rw [hzero] at this diff --git a/LeanPool/JacobianDiffgeo/Cech/Colimit.lean b/LeanPool/JacobianDiffgeo/Cech/Colimit.lean index 2e0a553ca6..b49d6fa731 100644 --- a/LeanPool/JacobianDiffgeo/Cech/Colimit.lean +++ b/LeanPool/JacobianDiffgeo/Cech/Colimit.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Cech.Refinement -import Mathlib.Algebra.Colimit.Module +public import LeanPool.JacobianDiffgeo.Cech.Refinement +public import Mathlib.Algebra.Colimit.Module +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `H¹(D)` as a directed colimit (CC8, D1) @@ -26,6 +29,8 @@ Unit: cech-cohomology (`docs/design/cech-cohomology.md` §4.5, §5). cofinality) does not need 12.4 and is proved here. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace RS.Cech Module @@ -53,11 +58,10 @@ instance directedSystemH1Cover : rw [resH1'_eq_resH1 D (le_refl 𝒰) id (fun _ => le_rfl)] exact LinearMap.congr_fun (resH1_id D (fun _ => le_rfl)) x map_map {𝒰c 𝒰b 𝒰a} hab hbc x := by - show resH1' D hbc (resH1' D hab x) = resH1' D (hab.trans hbc) x - rw [resH1'_eq_resH1 D hab (chosenRefIdx hab) (chosenRefIdx_spec hab), - resH1'_eq_resH1 D hbc (chosenRefIdx hbc) (chosenRefIdx_spec hbc), - resH1'_eq_resH1 D (hab.trans hbc) (chosenRefIdx hab ∘ chosenRefIdx hbc) - (fun k => (chosenRefIdx_spec hbc k).trans (chosenRefIdx_spec hab (chosenRefIdx hbc k)))] + change resH1 D (chosenRefIdx hbc) (chosenRefIdx_spec hbc) + (resH1 D (chosenRefIdx hab) (chosenRefIdx_spec hab) x) = resH1' D (hab.trans hbc) x + rw [resH1'_eq_resH1 D (hab.trans hbc) (chosenRefIdx hab ∘ chosenRefIdx hbc) + (fun k => (chosenRefIdx_spec hbc k).trans (chosenRefIdx_spec hab (chosenRefIdx hbc k)))] exact LinearMap.congr_fun (resH1_comp D (chosenRefIdx hab) (chosenRefIdx_spec hab) (chosenRefIdx hbc) (chosenRefIdx_spec hbc)) x @@ -110,6 +114,15 @@ omit [IsManifold 𝓘(ℂ, ℂ) ω X] in (ih : ∀ (𝒰 : FinCover (⊤ : Opens X)) (c : H1Cover D 𝒰), C (toH1 D 𝒰 c)) : C ξ := Module.DirectLimit.induction_on ξ ih +omit [IsManifold 𝓘(ℂ, ℂ) ω X] in +/-- Prove a property of a cohomology class using a cocycle on a finite cover. -/ +@[elab_as_elim] theorem H1.induction_on_cocycles {D : RS.Divisor X} + {motive : H1 D → Prop} (ξ : H1 D) + (h : ∀ (𝒰 : FinCover (⊤ : Opens X)) (z : Z1 D 𝒰), + motive (toH1 D 𝒰 (H1Cover.mk D 𝒰 z))) : motive ξ := by + induction ξ using H1.induction_on with + | ih 𝒰 c => exact Submodule.Quotient.induction_on _ c (h 𝒰) + /-! ### Subsingleton criteria not requiring 12.4 -/ omit [IsManifold 𝓘(ℂ, ℂ) ω X] in @@ -270,28 +283,18 @@ omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem H1Incl_id : H1Incl D (le_refl D) = LinearMap.id := by apply LinearMap.ext intro ξ - induction ξ using H1.induction_on with - | _ 𝒰 c => - rw [H1Incl_toH1, LinearMap.id_apply] - congr 1 - obtain ⟨f, rfl⟩ := H1Cover.mk_surjective D 𝒰 c - rw [h1CoverIncl_mk] - congr 1 + refine H1.induction_on_cocycles ξ (fun 𝒰 z => ?_) + rw [H1Incl_toH1, LinearMap.id_apply] + rfl omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem H1Incl_comp {D'' : RS.Divisor X} (h : D ≤ D') (h' : D' ≤ D'') : H1Incl D' h' ∘ₗ H1Incl D h = H1Incl D (h.trans h') := by apply LinearMap.ext intro ξ - induction ξ using H1.induction_on with - | _ 𝒰 c => - -- `simp only` traverses once; three successive `rw`s of the same `@[simp]` lemma each - -- re-solve the direct-limit unification and together blow the heartbeat budget. - simp only [LinearMap.comp_apply, H1Incl_toH1] - congr 1 - obtain ⟨f, rfl⟩ := H1Cover.mk_surjective D 𝒰 c - simp only [h1CoverIncl_mk] - congr 1 + refine H1.induction_on_cocycles ξ (fun 𝒰 z => ?_) + simp only [LinearMap.comp_apply, H1Incl_toH1] + rfl /-! ### Leray interface (recorded; proof owned by dolbeault-comparison / dbar-solvability) diff --git a/LeanPool/JacobianDiffgeo/Cech/Covers.lean b/LeanPool/JacobianDiffgeo/Cech/Covers.lean index 4ef8c98aac..df284dbb45 100644 --- a/LeanPool/JacobianDiffgeo/Cech/Covers.lean +++ b/LeanPool/JacobianDiffgeo/Cech/Covers.lean @@ -3,16 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import Mathlib.Topology.Sets.Opens -import Mathlib.Topology.Compactness.Compact -import Mathlib.Topology.Separation.Basic -import Mathlib.Topology.OpenPartialHomeomorph.Basic -import Mathlib.Geometry.Manifold.ChartedSpace -import Mathlib.Analysis.Complex.Basic -import Mathlib.Logic.Equiv.Fin.Basic -import Mathlib.Data.Fintype.EquivFin -import Mathlib.Order.Directed +public import Mathlib.Geometry.Manifold.ChartedSpace +public import Mathlib.Analysis.Complex.Basic /-! # Finite covers and their refinement preorder (CC8, D2/D3/D4) @@ -28,6 +22,8 @@ Unit: cech-cohomology (`docs/design/cech-cohomology.md` §4.1, D2–D4, proof pl * `FinCover.IsAdapted`: adapted covers (Miranda IX Ex. 3.6), `exists_adapted_refinement`. -/ +@[expose] public section + open Set Filter Topology TopologicalSpace namespace RS.Cech diff --git a/LeanPool/JacobianDiffgeo/Cech/H0.lean b/LeanPool/JacobianDiffgeo/Cech/H0.lean index 3e55df95a7..1e7bdf8ecc 100644 --- a/LeanPool/JacobianDiffgeo/Cech/H0.lean +++ b/LeanPool/JacobianDiffgeo/Cech/H0.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Cech.Cochains +public import LeanPool.JacobianDiffgeo.Cech.Cochains +import LeanPool.JacobianDiffgeo.Meromorphic.Gluing +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `H⁰(𝒰,D) ≃ L(D)` (CC8, proof plan §6.1) @@ -16,6 +20,8 @@ Unit: cech-cohomology (`docs/design/cech-cohomology.md` §4.3). * `h0Equiv`: the global form `H⁰(𝒰,D) ≃ L(D)` for covers of `X`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace RS.Cech @@ -58,64 +64,44 @@ theorem iUnion_U_eq : (⋃ i, (𝒰.U i : Set X)) = (Ω : Set X) := by theorem toC0'_injective : Function.Injective (toC0' D 𝒰) := by intro φ1 φ2 heq - have hcomp : ∀ i, LinSysOn.restrictL D (𝒰.le_base i) φ1 = LinSysOn.restrictL D (𝒰.le_base i) φ2 := - by - intro i - have := congrArg (fun x => (x : LinearMap.ker (d0 D 𝒰)).1 i) heq - simpa [toC0', toC0_apply] using this apply Subtype.ext - set e := MeroGermOn.congrSet (iUnion_U_eq 𝒰).symm with he_def - have key : e (φ1 : RS.MeroGermOn X (Ω : Set X)) = e (φ2 : RS.MeroGermOn X (Ω : Set X)) := by - apply RS.MeroGermOn.glue_unique (fun i => (𝒰.U i).2) - intro i - have h1 : RS.MeroGermOn.restrict (Set.subset_iUnion (fun i => (𝒰.U i : Set X)) i) - (e (φ1 : RS.MeroGermOn X (Ω : Set X))) = - RS.MeroGermOn.restrict (𝒰.le_base i) (φ1 : RS.MeroGermOn X (Ω : Set X)) := by - change RS.MeroGermOn.restrict _ (RS.MeroGermOn.restrict _ _) = _ - rw [RS.MeroGermOn.restrict_restrict] - have h2 : RS.MeroGermOn.restrict (Set.subset_iUnion (fun i => (𝒰.U i : Set X)) i) - (e (φ2 : RS.MeroGermOn X (Ω : Set X))) = - RS.MeroGermOn.restrict (𝒰.le_base i) (φ2 : RS.MeroGermOn X (Ω : Set X)) := by - change RS.MeroGermOn.restrict _ (RS.MeroGermOn.restrict _ _) = _ - rw [RS.MeroGermOn.restrict_restrict] - rw [h1, h2] - exact congrArg Subtype.val (hcomp i) - exact e.injective key + let e := MeroGermOn.congrSet (iUnion_U_eq 𝒰).symm + apply e.injective + apply RS.MeroGermOn.glue_unique (fun i => (𝒰.U i).2) + intro i + change RS.MeroGermOn.restrict _ (RS.MeroGermOn.restrict _ _) = + RS.MeroGermOn.restrict _ (RS.MeroGermOn.restrict _ _) + rw [RS.MeroGermOn.restrict_restrict, RS.MeroGermOn.restrict_restrict] + exact congrArg (fun z : LinearMap.ker (d0 D 𝒰) => (z.1 i).val) heq theorem toC0'_surjective : Function.Surjective (toC0' D 𝒰) := by intro f - set g : ∀ i, RS.MeroGermOn X (𝒰.U i : Set X) := fun i => (f.1 i : RS.MeroGermOn X (𝒰.U i : Set X)) - with hg_def + let g : ∀ i, RS.MeroGermOn X (𝒰.U i : Set X) := + fun i => (f.1 i : RS.MeroGermOn X (𝒰.U i : Set X)) have hcompat : ∀ i j, RS.MeroGermOn.restrict (Set.inter_subset_left : (𝒰.U i : Set X) ∩ 𝒰.U j ⊆ 𝒰.U i) (g i) = RS.MeroGermOn.restrict (Set.inter_subset_right : (𝒰.U i : Set X) ∩ 𝒰.U j ⊆ 𝒰.U j) (g j) := by intro i j - have hd0 : d0 D 𝒰 f.1 = 0 := f.2 - have hcomp := congrFun hd0 (i, j) - rw [d0_apply, Pi.zero_apply, sub_eq_zero] at hcomp + have hcomp : LinSysOn.restrictL D inf_le_right (f.1 j) = + LinSysOn.restrictL D inf_le_left (f.1 i) := sub_eq_zero.mp (congrFun f.2 (i, j)) exact (congrArg Subtype.val hcomp).symm obtain ⟨Φ, hΦ⟩ := RS.MeroGermOn.exists_glue (fun i => (𝒰.U i).2) g hcompat - set e := MeroGermOn.congrSet (iUnion_U_eq 𝒰) with he_def + let e := MeroGermOn.congrSet (iUnion_U_eq 𝒰) + have hrestr (i : Fin 𝒰.n) : RS.MeroGermOn.restrict (𝒰.le_base i) (e Φ) = g i := + (RS.MeroGermOn.restrict_restrict _ _ Φ).trans (hΦ i) have hΦmem : e Φ ∈ RS.LinSysOn D (Ω : Set X) := by apply (RS.mem_linSysOn_iff_of_isOpen Ω.2).2 intro x hx obtain ⟨i, hi⟩ := 𝒰.covers x hx - have hrestr : RS.MeroGermOn.restrict (𝒰.le_base i) (e Φ) = g i := by - change RS.MeroGermOn.restrict (𝒰.le_base i) (RS.MeroGermOn.restrict _ Φ) = g i - exact (RS.MeroGermOn.restrict_restrict _ _ Φ).trans (hΦ i) have hord := RS.MeroGermOn.ord_restrict (𝒰.le_base i) (𝒰.U i).2 Ω.2 hi (e Φ) - rw [hrestr] at hord + rw [hrestr i] at hord rw [← hord] exact (RS.mem_linSysOn_iff_of_isOpen (𝒰.U i).2).1 (f.1 i).2 x hi refine ⟨⟨e Φ, hΦmem⟩, ?_⟩ apply Subtype.ext funext i - change LinSysOn.restrictL D (𝒰.le_base i) ⟨e Φ, hΦmem⟩ = f.1 i - apply Subtype.ext - change RS.MeroGermOn.restrict (𝒰.le_base i) (e Φ) = g i - change RS.MeroGermOn.restrict (𝒰.le_base i) (RS.MeroGermOn.restrict _ Φ) = g i - exact (RS.MeroGermOn.restrict_restrict _ _ Φ).trans (hΦ i) + exact Subtype.ext (hrestr i) theorem toC0'_bijective : Function.Bijective (toC0' D 𝒰) := ⟨toC0'_injective D 𝒰, toC0'_surjective D 𝒰⟩ @@ -126,14 +112,12 @@ noncomputable def h0EquivLinSysOn : LinearMap.ker (d0 D 𝒰) ≃ₗ[ℂ] RS.Lin @[simp] theorem h0EquivLinSysOn_symm_apply (φ : RS.LinSysOn D (Ω : Set X)) (i : Fin 𝒰.n) : ((h0EquivLinSysOn D 𝒰).symm φ : C0 D 𝒰) i = LinSysOn.restrictL D (𝒰.le_base i) φ := by - change ((toC0' D 𝒰) φ : C0 D 𝒰) i = _ rfl theorem h0EquivLinSysOn_symm_apply_ord (φ : RS.LinSysOn D (Ω : Set X)) (i : Fin 𝒰.n) {x : X} (hx : x ∈ 𝒰.U i) : (((h0EquivLinSysOn D 𝒰).symm φ : C0 D 𝒰) i : RS.MeroGermOn X (𝒰.U i : Set X)).ord x = (φ : RS.MeroGermOn X (Ω : Set X)).ord x := by - rw [h0EquivLinSysOn_symm_apply] exact ord_restrictL D (𝒰.le_base i) hx φ omit [IsManifold 𝓘(ℂ, ℂ) ω X] in diff --git a/LeanPool/JacobianDiffgeo/Cech/Injectivity.lean b/LeanPool/JacobianDiffgeo/Cech/Injectivity.lean index 9a2052b273..de67efae1a 100644 --- a/LeanPool/JacobianDiffgeo/Cech/Injectivity.lean +++ b/LeanPool/JacobianDiffgeo/Cech/Injectivity.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Cech.Colimit +public import LeanPool.JacobianDiffgeo.Cech.Colimit import LeanPool.JacobianDiffgeo.Meromorphic.Gluing +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Forster 12.4: refinement maps are injective on `H¹` (CC8, D8, proof plan §6.7) @@ -19,6 +22,8 @@ Unit: cech-cohomology (`docs/design/cech-cohomology.md` §4.4, §6.7). * `subsingleton_H1_iff`: the colimit vanishes iff every cover-level `H¹` vanishes. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace RS.Cech @@ -47,6 +52,16 @@ noncomputable def injPatch (f : C1 D 𝒰) (g : C0 D 𝒱) (i : Fin 𝒰.n) (k : LinSysOn.restrictL D (inf_le_inf (le_refl (𝒰.U i)) (hτ k)) (f (i, τ k)) - LinSysOn.restrictL D (inf_le_right : 𝒰.U i ⊓ 𝒱.U k ≤ 𝒱.U k) (g k) +omit [IsManifold 𝓘(ℂ, ℂ) ω X] in +private theorem injPatch_restrict (f : C1 D 𝒰) (g : C0 D 𝒱) (i : Fin 𝒰.n) + (k : Fin 𝒱.n) {W : Opens X} (hW : W ≤ 𝒰.U i ⊓ 𝒱.U k) + (hWf : W ≤ 𝒰.U i ⊓ 𝒰.U (τ k)) (hWg : W ≤ 𝒱.U k) : + LinSysOn.restrictL D hW (injPatch D τ hτ f g i k) = + LinSysOn.restrictL D hWf (f (i, τ k)) - LinSysOn.restrictL D hWg (g k) := by + exact (map_sub (LinSysOn.restrictL D hW) _ _).trans + (congrArg₂ (· - ·) (restrictL_restrictL D _ hW hWf _) + (restrictL_restrictL D _ hW hWg _)) + omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem injPatch_compat {f : C1 D 𝒰} (hf : f ∈ Z1 D 𝒰) {g : C0 D 𝒱} (hgeq : resC1 D τ hτ f = d0 D 𝒱 g) (i : Fin 𝒰.n) (k l : Fin 𝒱.n) : @@ -88,28 +103,13 @@ theorem injPatch_compat {f : C1 D 𝒰} (hf : f ∈ Z1 D 𝒰) {g : C0 D 𝒱} -- combine: the two restricted `injPatch`s agree on `Wraw` have key3 : LinSysOn.restrictL D hab (f (i, τ k)) - LinSysOn.restrictL D hWk (g k) = LinSysOn.restrictL D hac (f (i, τ l)) - LinSysOn.restrictL D hWl (g l) := by - have e : LinSysOn.restrictL D hab (f (i, τ k)) - LinSysOn.restrictL D hWk (g k) - - (LinSysOn.restrictL D hac (f (i, τ l)) - LinSysOn.restrictL D hWl (g l)) = - (LinSysOn.restrictL D hWl (g l) - LinSysOn.restrictL D hWk (g k)) - - LinSysOn.restrictL D hac (f (i, τ l)) + LinSysOn.restrictL D hab (f (i, τ k)) := by - abel - rw [key1] at e - exact sub_eq_zero.1 e - have hcoeK : LinSysOn.restrictL D hWA (injPatch D τ hτ f g i k) = - LinSysOn.restrictL D hab (f (i, τ k)) - LinSysOn.restrictL D hWk (g k) := by - unfold injPatch - rw [map_sub, restrictL_restrictL D (inf_le_inf (le_refl (𝒰.U i)) (hτ k)) hWA hab, - restrictL_restrictL D (inf_le_right : 𝒰.U i ⊓ 𝒱.U k ≤ 𝒱.U k) hWA hWk] - have hcoeL : LinSysOn.restrictL D hWB (injPatch D τ hτ f g i l) = - LinSysOn.restrictL D hac (f (i, τ l)) - LinSysOn.restrictL D hWl (g l) := by - unfold injPatch - rw [map_sub, restrictL_restrictL D (inf_le_inf (le_refl (𝒰.U i)) (hτ l)) hWB hac, - restrictL_restrictL D (inf_le_right : 𝒰.U i ⊓ 𝒱.U l ≤ 𝒱.U l) hWB hWl] - have key4 : LinSysOn.restrictL D hWA (injPatch D τ hτ f g i k) = - LinSysOn.restrictL D hWB (injPatch D τ hτ f g i l) := by - rw [hcoeK, hcoeL, key3] - have hval := congrArg Subtype.val key4 - simpa only [restrictL_apply_coe] using hval + apply sub_eq_sub_iff_sub_eq_sub.2 + have h := eq_neg_of_add_eq_zero_right key1 + rw [neg_sub] at h + rw [h, sub_right_comm, sub_self, zero_sub, neg_sub] + have key4 := (injPatch_restrict D τ hτ f g i k hWA hab hWk).trans + (key3.trans (injPatch_restrict D τ hτ f g i l hWB hac hWl).symm) + exact congrArg Subtype.val key4 /-- Glue the local candidates `injPatch D τ hτ f g i ·` (compatible by `injPatch_compat`) into a genuine section on the whole member `𝒰.U i` (Forster p. 99 / §6.7, sheaf axioms only). -/ @@ -119,12 +119,7 @@ theorem exists_injGlue {f : C1 D 𝒰} (hf : f ∈ Z1 D 𝒰) {g : C0 D 𝒱} LinSysOn.restrictL D (inf_le_left : 𝒰.U i ⊓ 𝒱.U k ≤ 𝒰.U i) ψ = injPatch D τ hτ f g i k := by set W : Fin 𝒱.n → Set X := fun k => ((𝒰.U i ⊓ 𝒱.U k : Opens X) : Set X) with hW_def have hWopen : ∀ k, IsOpen (W k) := fun k => (𝒰.U i ⊓ 𝒱.U k).isOpen - have hunion : (⋃ k, W k) = (𝒰.U i : Set X) := by - apply Set.Subset.antisymm - · exact Set.iUnion_subset fun k => inf_le_left - · intro x hx - obtain ⟨k, hk⟩ := 𝒱.covers x (𝒰.le_base i hx) - exact Set.mem_iUnion.2 ⟨k, hx, hk⟩ + have hunion : (⋃ k, W k) = (𝒰.U i : Set X) := iUnion_inf_eq _ (𝒰.le_base i) obtain ⟨Φ, hΦ⟩ := RS.MeroGermOn.exists_glue hWopen (fun k => (injPatch D τ hτ f g i k : RS.MeroGermOn X (W k))) (fun k l => injPatch_compat D τ hτ hf hgeq i k l) @@ -198,32 +193,11 @@ theorem d0_injGlue_eq_neg {f : C1 D 𝒰} (hf : f ∈ Z1 D 𝒰) {g : C0 D 𝒱} have hexpand : LinSysOn.restrictL D hjk (injPatch D τ hτ f g j k) - LinSysOn.restrictL D hik (injPatch D τ hτ f g i k) = LinSysOn.restrictL D hbc (f (j, τ k)) - LinSysOn.restrictL D hac (f (i, τ k)) := by - have e1 : LinSysOn.restrictL D hjk (injPatch D τ hτ f g j k) = - LinSysOn.restrictL D hbc (f (j, τ k)) - - LinSysOn.restrictL D hWk (g k) := by - unfold injPatch - rw [map_sub, - restrictL_restrictL D (inf_le_inf (le_refl (𝒰.U j)) (hτ k)) hjk hbc, - restrictL_restrictL D (inf_le_right : 𝒰.U j ⊓ 𝒱.U k ≤ 𝒱.U k) hjk hWk] - have e2 : LinSysOn.restrictL D hik (injPatch D τ hτ f g i k) = - LinSysOn.restrictL D hac (f (i, τ k)) - - LinSysOn.restrictL D hWk (g k) := by - unfold injPatch - rw [map_sub, - restrictL_restrictL D (inf_le_inf (le_refl (𝒰.U i)) (hτ k)) hik hac, - restrictL_restrictL D (inf_le_right : 𝒰.U i ⊓ 𝒱.U k ≤ 𝒱.U k) hik hWk] - rw [e1, e2] - abel + rw [injPatch_restrict D τ hτ f g j k hjk hbc hWk, + injPatch_restrict D τ hτ f g i k hik hac hWk, sub_sub_sub_cancel_right] have key1 := Z1.rel_res D hf i j (τ k) (le_inf hab hWtk) hbc hac hab - have hRHS : LinSysOn.restrictL D (inf_le_left : A ⊓ 𝒱.U k ≤ A) (-(f (i, j))) = - -LinSysOn.restrictL D hab (f (i, j)) := by - rw [map_neg] - rw [hLHS, hexpand, hRHS] - have e : LinSysOn.restrictL D hbc (f (j, τ k)) - LinSysOn.restrictL D hac (f (i, τ k)) = - LinSysOn.restrictL D hbc (f (j, τ k)) - LinSysOn.restrictL D hac (f (i, τ k)) + - LinSysOn.restrictL D hab (f (i, j)) - LinSysOn.restrictL D hab (f (i, j)) := by - abel - rw [e, key1, zero_sub] + rw [hLHS, hexpand, map_neg] + exact eq_neg_of_add_eq_zero_left key1 have hglu : e' ((d0 D 𝒰 ψ (i, j) : RS.MeroGermOn X (A : Set X))) = e' ((-(f (i, j)) : RS.MeroGermOn X (A : Set X))) := by apply RS.MeroGermOn.glue_unique hW'open @@ -258,12 +232,7 @@ theorem toH1_injective (𝒰 : FinCover (⊤ : Opens X)) : Function.Injective (t exact resH1_injective D (chosenRefIdx hij) (chosenRefIdx_spec hij) hz @[simp] theorem toH1_eq_zero_iff {𝒰 : FinCover (⊤ : Opens X)} (c : H1Cover D 𝒰) : - toH1 D 𝒰 c = 0 ↔ c = 0 := by - constructor - · intro h - exact toH1_injective D 𝒰 (h.trans (map_zero (toH1 D 𝒰)).symm) - · intro h - rw [h, map_zero] + toH1 D 𝒰 c = 0 ↔ c = 0 := (toH1_injective D 𝒰).eq_iff' (map_zero _) /-- The colimit `H1 D` vanishes iff every cover-level `H¹(𝒰,D)` vanishes. -/ theorem subsingleton_H1_iff : Subsingleton (H1 D) ↔ ∀ 𝒰 : FinCover (⊤ : Opens X), diff --git a/LeanPool/JacobianDiffgeo/Cech/Refinement.lean b/LeanPool/JacobianDiffgeo/Cech/Refinement.lean index 51801f95b7..113811318f 100644 --- a/LeanPool/JacobianDiffgeo/Cech/Refinement.lean +++ b/LeanPool/JacobianDiffgeo/Cech/Refinement.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Cech.H0 +public import LeanPool.JacobianDiffgeo.Cech.Cochains +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Refinement maps, 12.3 independence (CC8) @@ -22,6 +25,8 @@ Unit: cech-cohomology (`docs/design/cech-cohomology.md` §4.4, proof plans §6.4 (sheaf-axiom gluing argument via `injPatch`/`exists_injGlue`, no analysis). -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace RS.Cech @@ -58,16 +63,13 @@ theorem resC1_comp_d0 : (resC1 D τ hτ) ∘ₗ (d0 D 𝒰) = (d0 D 𝒱) ∘ₗ apply LinearMap.ext intro f funext p - change LinSysOn.restrictL D (inf_le_inf (hτ p.1) (hτ p.2)) (d0 D 𝒰 f (τ p.1, τ p.2)) = - d0 D 𝒱 (resC0 D τ hτ f) p - rw [d0_apply, d0_apply, resC0_apply, resC0_apply] - simp only [map_sub] - rw [restrictL_restrictL D inf_le_right (inf_le_inf (hτ p.1) (hτ p.2)) - ((inf_le_inf (hτ p.1) (hτ p.2)).trans inf_le_right), - restrictL_restrictL D inf_le_left (inf_le_inf (hτ p.1) (hτ p.2)) - ((inf_le_inf (hτ p.1) (hτ p.2)).trans inf_le_left), - restrictL_restrictL D (hτ p.2) inf_le_right (inf_le_right.trans (hτ p.2)), - restrictL_restrictL D (hτ p.1) inf_le_left (inf_le_left.trans (hτ p.1))] + have hij := inf_le_inf (hτ p.1) (hτ p.2) + refine (map_sub (LinSysOn.restrictL D hij) _ _).trans ?_ + exact congrArg₂ (· - ·) + ((restrictL_restrictL D inf_le_right hij (inf_le_right.trans (hτ p.2)) _).trans + (restrictL_restrictL D (hτ p.2) inf_le_right _ _).symm) + ((restrictL_restrictL D inf_le_left hij (inf_le_left.trans (hτ p.1)) _).trans + (restrictL_restrictL D (hτ p.1) inf_le_left _ _).symm) omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem resC1_mem_B1 {f : C1 D 𝒰} (hf : f ∈ B1 D 𝒰) : resC1 D τ hτ f ∈ B1 D 𝒱 := by @@ -84,10 +86,8 @@ theorem Z1.rel_res {f : C1 D 𝒰} (hf : f ∈ Z1 D 𝒰) (a b c : Fin 𝒰.n) { (hab : W ≤ 𝒰.U a ⊓ 𝒰.U b) : LinSysOn.restrictL D hbc (f (b, c)) - LinSysOn.restrictL D hac (f (a, c)) + LinSysOn.restrictL D hab (f (a, b)) = 0 := by - have hzero : d1 D 𝒰 f (a, b, c) = 0 := (mem_Z1_iff D 𝒰 f).1 hf (a, b, c) - rw [d1_apply] at hzero - have hcongr := congrArg (LinSysOn.restrictL D h) hzero - simp only [map_add, map_sub, map_zero] at hcongr + have hcongr := congrArg (LinSysOn.restrictL D h) ((mem_Z1_iff D 𝒰 f).1 hf (a, b, c)) + simp only [d1_apply, map_add, map_sub, map_zero] at hcongr rw [restrictL_restrictL D (le_inf (inf_le_left.trans inf_le_right) inf_le_right) h hbc, restrictL_restrictL D (le_inf (inf_le_left.trans inf_le_left) inf_le_right) h hac, restrictL_restrictL D inf_le_left h hab] at hcongr @@ -95,22 +95,18 @@ theorem Z1.rel_res {f : C1 D 𝒰} (hf : f ∈ Z1 D 𝒰) (a b c : Fin 𝒰.n) { omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem resC1_mem_Z1 {f : C1 D 𝒰} (hf : f ∈ Z1 D 𝒰) : resC1 D τ hτ f ∈ Z1 D 𝒱 := by - rw [mem_Z1_iff] + apply (mem_Z1_iff D 𝒱 _).2 rintro ⟨k, l, m⟩ - rw [d1_apply, resC1_apply, resC1_apply, resC1_apply] - set hkτ : 𝒱.U k ⊓ 𝒱.U l ⊓ 𝒱.U m ≤ 𝒰.U (τ k) := (inf_le_left.trans inf_le_left).trans (hτ k) - with hkτ_def - set hlτ : 𝒱.U k ⊓ 𝒱.U l ⊓ 𝒱.U m ≤ 𝒰.U (τ l) := (inf_le_left.trans inf_le_right).trans (hτ l) - with hlτ_def - set hmτ : 𝒱.U k ⊓ 𝒱.U l ⊓ 𝒱.U m ≤ 𝒰.U (τ m) := inf_le_right.trans (hτ m) with hmτ_def - have key := Z1.rel_res D hf (τ k) (τ l) (τ m) - (le_inf (le_inf hkτ hlτ) hmτ) (le_inf hlτ hmτ) (le_inf hkτ hmτ) (le_inf hkτ hlτ) - rw [restrictL_restrictL D (inf_le_inf (hτ l) (hτ m)) - (le_inf (inf_le_left.trans inf_le_right) inf_le_right) (le_inf hlτ hmτ), - restrictL_restrictL D (inf_le_inf (hτ k) (hτ m)) - (le_inf (inf_le_left.trans inf_le_left) inf_le_right) (le_inf hkτ hmτ), - restrictL_restrictL D (inf_le_inf (hτ k) (hτ l)) inf_le_left (le_inf hkτ hlτ)] - exact key + have hkτ : 𝒱.U k ⊓ 𝒱.U l ⊓ 𝒱.U m ≤ 𝒰.U (τ k) := (inf_le_left.trans inf_le_left).trans (hτ k) + have hlτ : 𝒱.U k ⊓ 𝒱.U l ⊓ 𝒱.U m ≤ 𝒰.U (τ l) := (inf_le_left.trans inf_le_right).trans (hτ l) + have hmτ : 𝒱.U k ⊓ 𝒱.U l ⊓ 𝒱.U m ≤ 𝒰.U (τ m) := inf_le_right.trans (hτ m) + refine Eq.trans ?_ (Z1.rel_res D hf (τ k) (τ l) (τ m) + (le_inf (le_inf hkτ hlτ) hmτ) (le_inf hlτ hmτ) (le_inf hkτ hmτ) (le_inf hkτ hlτ)) + exact congrArg₂ (· + ·) + (congrArg₂ (· - ·) + (restrictL_restrictL D _ _ (le_inf hlτ hmτ) _) + (restrictL_restrictL D _ _ (le_inf hkτ hmτ) _)) + (restrictL_restrictL D _ _ (le_inf hkτ hlτ) _) /-! ### `resZ1`, `resH1` -/ @@ -143,23 +139,23 @@ theorem resH1_indep (τ τ' : Fin 𝒱.n → Fin 𝒰.n) (hτ : IsRefIdx 𝒰 obtain ⟨f, rfl⟩ := H1Cover.mk_surjective D 𝒰 ξ have hmem : (f : C1 D 𝒰) ∈ Z1 D 𝒰 := f.2 -- The connecting `0`-cochain `h_k := restrict (f (τ k, τ' k))` (D3/§6.6). - set h : C0 D 𝒱 := - fun k => LinSysOn.restrictL D (le_inf (hτ k) (hτ' k)) ((f : C1 D 𝒰) (τ k, τ' k)) with hh_def + let h : C0 D 𝒱 := + fun k => LinSysOn.restrictL D (le_inf (hτ k) (hτ' k)) ((f : C1 D 𝒰) (τ k, τ' k)) have hdiff : (resZ1 D τ hτ f : C1 D 𝒱) - (resZ1 D τ' hτ' f : C1 D 𝒱) = d0 D 𝒱 (-h) := by funext p obtain ⟨k, l⟩ := p change resC1 D τ hτ (f : C1 D 𝒰) (k, l) - resC1 D τ' hτ' (f : C1 D 𝒰) (k, l) = d0 D 𝒱 (-h) (k, l) - set hab : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒰.U (τ k) ⊓ 𝒰.U (τ l) := - le_inf (inf_le_left.trans (hτ k)) (inf_le_right.trans (hτ l)) with hhab_def - set hbc : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒰.U (τ l) ⊓ 𝒰.U (τ' l) := - le_inf (inf_le_right.trans (hτ l)) (inf_le_right.trans (hτ' l)) with hhbc_def - set hac : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒰.U (τ k) ⊓ 𝒰.U (τ' l) := - le_inf (inf_le_left.trans (hτ k)) (inf_le_right.trans (hτ' l)) with hhac_def - set hab' : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒰.U (τ k) ⊓ 𝒰.U (τ' k) := - le_inf (inf_le_left.trans (hτ k)) (inf_le_left.trans (hτ' k)) with hhab'_def - set hbc' : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒰.U (τ' k) ⊓ 𝒰.U (τ' l) := - le_inf (inf_le_left.trans (hτ' k)) (inf_le_right.trans (hτ' l)) with hhbc'_def + have hab : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒰.U (τ k) ⊓ 𝒰.U (τ l) := + le_inf (inf_le_left.trans (hτ k)) (inf_le_right.trans (hτ l)) + have hbc : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒰.U (τ l) ⊓ 𝒰.U (τ' l) := + le_inf (inf_le_right.trans (hτ l)) (inf_le_right.trans (hτ' l)) + have hac : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒰.U (τ k) ⊓ 𝒰.U (τ' l) := + le_inf (inf_le_left.trans (hτ k)) (inf_le_right.trans (hτ' l)) + have hab' : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒰.U (τ k) ⊓ 𝒰.U (τ' k) := + le_inf (inf_le_left.trans (hτ k)) (inf_le_left.trans (hτ' k)) + have hbc' : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒰.U (τ' k) ⊓ 𝒰.U (τ' l) := + le_inf (inf_le_left.trans (hτ' k)) (inf_le_right.trans (hτ' l)) have keyA := Z1.rel_res D hmem (τ k) (τ l) (τ' l) (le_inf hab (inf_le_right.trans (hτ' l))) hbc hac hab have keyB := Z1.rel_res D hmem (τ k) (τ' k) (τ' l) (le_inf hab' (inf_le_right.trans (hτ' l))) @@ -168,42 +164,21 @@ theorem resH1_indep (τ τ' : Fin 𝒱.n → Fin 𝒰.n) (hτ : IsRefIdx 𝒰 LinSysOn.restrictL D hbc' ((f : C1 D 𝒰) (τ' k, τ' l)) = LinSysOn.restrictL D hab' ((f : C1 D 𝒰) (τ k, τ' k)) - LinSysOn.restrictL D hbc ((f : C1 D 𝒰) (τ l, τ' l)) := by - have e : LinSysOn.restrictL D hab ((f : C1 D 𝒰) (τ k, τ l)) - - LinSysOn.restrictL D hbc' ((f : C1 D 𝒰) (τ' k, τ' l)) - - (LinSysOn.restrictL D hab' ((f : C1 D 𝒰) (τ k, τ' k)) - - LinSysOn.restrictL D hbc ((f : C1 D 𝒰) (τ l, τ' l))) = - (LinSysOn.restrictL D hbc ((f : C1 D 𝒰) (τ l, τ' l)) - - LinSysOn.restrictL D hac ((f : C1 D 𝒰) (τ k, τ' l)) + - LinSysOn.restrictL D hab ((f : C1 D 𝒰) (τ k, τ l))) - - (LinSysOn.restrictL D hbc' ((f : C1 D 𝒰) (τ' k, τ' l)) - - LinSysOn.restrictL D hac ((f : C1 D 𝒰) (τ k, τ' l)) + - LinSysOn.restrictL D hab' ((f : C1 D 𝒰) (τ k, τ' k))) := by - abel - rw [keyA, keyB, sub_zero] at e - exact sub_eq_zero.1 e + have hA := eq_neg_of_add_eq_zero_right keyA + have hB := eq_neg_of_add_eq_zero_right keyB + rw [neg_sub] at hA hB + rw [hA, hB, sub_right_comm] have eεδ : LinSysOn.restrictL D hbc ((f : C1 D 𝒰) (τ l, τ' l)) = - LinSysOn.restrictL D (inf_le_right : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒱.U l) (h l) := by - change LinSysOn.restrictL D hbc ((f : C1 D 𝒰) (τ l, τ' l)) = - LinSysOn.restrictL D inf_le_right - (LinSysOn.restrictL D (le_inf (hτ l) (hτ' l)) ((f : C1 D 𝒰) (τ l, τ' l))) - rw [restrictL_restrictL] + LinSysOn.restrictL D (inf_le_right : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒱.U l) (h l) := + (restrictL_restrictL D (le_inf (hτ l) (hτ' l)) inf_le_right hbc _).symm have eγhab' : LinSysOn.restrictL D hab' ((f : C1 D 𝒰) (τ k, τ' k)) = - LinSysOn.restrictL D (inf_le_left : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒱.U k) (h k) := by - change LinSysOn.restrictL D hab' ((f : C1 D 𝒰) (τ k, τ' k)) = - LinSysOn.restrictL D inf_le_left - (LinSysOn.restrictL D (le_inf (hτ k) (hτ' k)) ((f : C1 D 𝒰) (τ k, τ' k))) - rw [restrictL_restrictL] - change LinSysOn.restrictL D hab ((f : C1 D 𝒰) (τ k, τ l)) - - LinSysOn.restrictL D hbc' ((f : C1 D 𝒰) (τ' k, τ' l)) = d0 D 𝒱 (-h) (k, l) - rw [hcomb, eγhab', eεδ, d0_apply] - change LinSysOn.restrictL D inf_le_left (h k) - LinSysOn.restrictL D inf_le_right (h l) = - LinSysOn.restrictL D inf_le_right ((-h) l) - LinSysOn.restrictL D inf_le_left ((-h) k) - rw [show (-h) l = -(h l) from rfl, show (-h) k = -(h k) from rfl, map_neg, map_neg] - abel - rw [resH1_mk, resH1_mk, ← sub_eq_zero, ← map_sub, H1Cover.mk_eq_zero_iff] - change (↑(resZ1 D τ hτ f) - ↑(resZ1 D τ' hτ' f) : C1 D 𝒱) ∈ B1 D 𝒱 - rw [hdiff] - exact ⟨-h, rfl⟩ + LinSysOn.restrictL D (inf_le_left : 𝒱.U k ⊓ 𝒱.U l ≤ 𝒱.U k) (h k) := + (restrictL_restrictL D (le_inf (hτ k) (hτ' k)) inf_le_left hab' _).symm + exact hcomb.trans ((congrArg₂ (· - ·) eγhab' eεδ).trans + ((neg_sub _ _).symm.trans (congrFun (map_neg (d0 D 𝒱) h) (k, l)).symm)) + have hclasses : H1Cover.mk D 𝒱 (resZ1 D τ hτ f) = H1Cover.mk D 𝒱 (resZ1 D τ' hτ' f) := + (Submodule.Quotient.eq _).2 ⟨-h, hdiff.symm⟩ + exact (resH1_mk D τ hτ f).trans (hclasses.trans (resH1_mk D τ' hτ' f).symm) /-! ### Functor laws: identity and composition -/ @@ -226,19 +201,15 @@ omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem resZ1_id (h : IsRefIdx 𝒰 𝒰 id) : resZ1 D id h = LinearMap.id := by apply LinearMap.ext intro f - apply Subtype.ext - rw [resZ1_apply_coe] - change resC1 D id h (f : C1 D 𝒰) = (f : C1 D 𝒰) - rw [resC1_id] - rfl + exact Subtype.ext (LinearMap.congr_fun (resC1_id D h) (f : C1 D 𝒰)) omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem resH1_id (h : IsRefIdx 𝒰 𝒰 id) : resH1 D id h = LinearMap.id := by apply LinearMap.ext intro ξ obtain ⟨f, rfl⟩ := H1Cover.mk_surjective D 𝒰 ξ - rw [resH1_mk, resZ1_id] - rfl + exact (resH1_mk D id h f).trans + (congrArg (H1Cover.mk D 𝒰) (LinearMap.congr_fun (resZ1_id D h) f)) omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem resC0_comp {𝒲 : FinCover Ω} (σ : Fin 𝒲.n → Fin 𝒱.n) (hσ : IsRefIdx 𝒱 𝒲 σ) : @@ -247,9 +218,6 @@ theorem resC0_comp {𝒲 : FinCover Ω} (σ : Fin 𝒲.n → Fin 𝒱.n) (hσ : apply LinearMap.ext intro f funext k - change LinSysOn.restrictL D (hσ k) (resC0 D τ hτ f (σ k)) = - LinSysOn.restrictL D ((hσ k).trans (hτ (σ k))) (f (τ (σ k))) - rw [resC0_apply] exact restrictL_restrictL D (hτ (σ k)) (hσ k) ((hσ k).trans (hτ (σ k))) (f (τ (σ k))) omit [IsManifold 𝓘(ℂ, ℂ) ω X] in @@ -260,19 +228,13 @@ theorem resC1_comp {𝒲 : FinCover Ω} (σ : Fin 𝒲.n → Fin 𝒱.n) (hσ : intro f funext p obtain ⟨k, l⟩ := p - change LinSysOn.restrictL D (inf_le_inf (hσ k) (hσ l)) (resC1 D τ hτ f (σ k, σ l)) = - LinSysOn.restrictL D (inf_le_inf ((hσ k).trans (hτ (σ k))) ((hσ l).trans (hτ (σ l)))) - (f (τ (σ k), τ (σ l))) - rw [resC1_apply] exact restrictL_restrictL D (inf_le_inf (hτ (σ k)) (hτ (σ l))) (inf_le_inf (hσ k) (hσ l)) (inf_le_inf ((hσ k).trans (hτ (σ k))) ((hσ l).trans (hτ (σ l)))) (f (τ (σ k), τ (σ l))) omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem resZ1_comp {𝒲 : FinCover Ω} (σ : Fin 𝒲.n → Fin 𝒱.n) (hσ : IsRefIdx 𝒱 𝒲 σ) (f : Z1 D 𝒰) : (resZ1 D σ hσ) (resZ1 D τ hτ f) = resZ1 D (τ ∘ σ) (fun k => (hσ k).trans (hτ (σ k))) f := by - apply Subtype.ext - simp only [resZ1_apply_coe] - exact LinearMap.congr_fun (resC1_comp D τ hτ σ hσ) (f : C1 D 𝒰) + exact Subtype.ext (LinearMap.congr_fun (resC1_comp D τ hτ σ hσ) (f : C1 D 𝒰)) omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem resH1_comp {𝒲 : FinCover Ω} (σ : Fin 𝒲.n → Fin 𝒱.n) (hσ : IsRefIdx 𝒱 𝒲 σ) : @@ -280,9 +242,9 @@ theorem resH1_comp {𝒲 : FinCover Ω} (σ : Fin 𝒲.n → Fin 𝒱.n) (hσ : apply LinearMap.ext intro ξ obtain ⟨f, rfl⟩ := H1Cover.mk_surjective D 𝒰 ξ - change resH1 D σ hσ (resH1 D τ hτ (H1Cover.mk D 𝒰 f)) = _ - simp only [resH1_mk] - rw [resZ1_comp] - exact (resH1_mk D _ _ f).symm + exact (congrArg (resH1 D σ hσ) (resH1_mk D τ hτ f)).trans + ((resH1_mk D σ hσ (resZ1 D τ hτ f)).trans + ((congrArg (H1Cover.mk D 𝒲) (resZ1_comp D τ hτ σ hσ f)).trans + (resH1_mk D _ _ f).symm)) end RS.Cech diff --git a/LeanPool/JacobianDiffgeo/Cech/SixTerm.lean b/LeanPool/JacobianDiffgeo/Cech/SixTerm.lean index 115ec0959a..c48115f0f6 100644 --- a/LeanPool/JacobianDiffgeo/Cech/SixTerm.lean +++ b/LeanPool/JacobianDiffgeo/Cech/SixTerm.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Cech.Skyscraper -import LeanPool.JacobianDiffgeo.Cech.WindowRank +public import LeanPool.JacobianDiffgeo.Cech.Skyscraper +public import LeanPool.JacobianDiffgeo.Cech.WindowRank +import LeanPool.JacobianDiffgeo.Cech.Injectivity +import LeanPool.JacobianDiffgeo.Meromorphic.CodiscreteBridge +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Geometry.Manifold.ContMDiff.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The six-term skyscraper fragment (CC8, D7, proof plan §6.9(c)-(g)) @@ -39,6 +45,8 @@ Unit: cech-cohomology (`docs/design/cech-cohomology.md` §4.7, §6.9). `0 → L(D) → L(D') → Window D D' → H¹(D) → H¹(D') → 0`. -/ +@[expose] public section + open scoped ContDiff Manifold Topology open Set Filter TopologicalSpace RS.Cech @@ -53,23 +61,17 @@ omit [IsManifold 𝓘(ℂ, ℂ) ω X] in components all satisfy the `D`-bound gives a `Z1 D`-cocycle. -/ theorem C1.retype_mem_Z1' {f : C1 D' 𝒰} (hf : f ∈ Z1 D' 𝒰) (hmem : f.MemLD D) : C1.retype f hmem ∈ Z1 D 𝒰 := by - rw [mem_Z1_iff] + apply (mem_Z1_iff D 𝒰 _).2 intro t - apply Subtype.ext - have hcoe : (d1 D 𝒰 (C1.retype f hmem) t : - RS.MeroGermOn X ((𝒰.U t.1 ⊓ 𝒰.U t.2.1 ⊓ 𝒰.U t.2.2 : Opens X) : Set X)) = - (d1 D' 𝒰 f t : - RS.MeroGermOn X ((𝒰.U t.1 ⊓ 𝒰.U t.2.1 ⊓ 𝒰.U t.2.2 : Opens X) : Set X)) := rfl - rw [hcoe, (mem_Z1_iff D' 𝒰 f).1 hf t] - simp + exact Subtype.ext (congrArg (fun z : RS.LinSysOn D' _ => z.val) + ((mem_Z1_iff D' 𝒰 f).1 hf t)) omit [IsManifold 𝓘(ℂ, ℂ) ω X] in /-- The `D`-inclusion of a retyped `Z1 D 𝒰` class recovers the original `Z1 D' 𝒰` class. -/ theorem h1CoverIncl_mk_retype (h : D ≤ D') {f : C1 D' 𝒰} (hf : f ∈ Z1 D' 𝒰) (hmem : f.MemLD D) : h1CoverIncl D 𝒰 h (H1Cover.mk D 𝒰 ⟨C1.retype f hmem, C1.retype_mem_Z1' hf hmem⟩) = H1Cover.mk D' 𝒰 ⟨f, hf⟩ := by - rw [h1CoverIncl_mk] - congr 1 + rfl /-! ### Small order arithmetic helpers -/ @@ -368,26 +370,6 @@ theorem memLD_d0_smul (a : ℂ) {g : C0 D' 𝒰} (hg : (d0 D' 𝒰 g).MemLD D) : rw [map_smul] exact hg.smul a -/-! ### `mlClass` is refinement-stable (§6.9(a), `mlClass_res`) -/ - -omit [IsManifold 𝓘(ℂ, ℂ) ω X] in -theorem mlClass_res {𝒰 𝒱 : FinCover (⊤ : Opens X)} (τ : Fin 𝒱.n → Fin 𝒰.n) - (hτ : IsRefIdx 𝒰 𝒱 τ) (g : C0 D' 𝒰) (hg : (d0 D' 𝒰 g).MemLD D) - (hgr : (d0 D' 𝒱 (resC0 D' τ hτ g)).MemLD D) : - mlClass 𝒱 (resC0 D' τ hτ g) hgr = mlClass 𝒰 g hg := by - have hcomm : resC1 D' τ hτ (d0 D' 𝒰 g) = d0 D' 𝒱 (resC0 D' τ hτ g) := - LinearMap.congr_fun (resC1_comp_d0 D' τ hτ) g - have hkey : (⟨C1.retype (d0 D' 𝒱 (resC0 D' τ hτ g)) hgr, C1.retype_mem_Z1 hgr⟩ : Z1 D 𝒱) = - resZ1 D τ hτ ⟨C1.retype (d0 D' 𝒰 g) hg, C1.retype_mem_Z1 hg⟩ := by - apply Subtype.ext - rw [resZ1_apply_coe] - funext p - apply Subtype.ext - rw [C1.retype_apply_coe, ← congrFun hcomm p] - rfl - simp only [mlClass] - rw [hkey, ← resH1_mk, toH1_resH1] - variable [T2Space X] [CompactSpace X] omit [IsManifold 𝓘(ℂ, ℂ) ω X] in @@ -416,29 +398,26 @@ theorem memLD_of_isAdapted {𝒲 : FinCover (⊤ : Opens X)} (hadapt : 𝒲.IsAd -- `diffSupp D D'`, represented by a genuine `Z1 D`-cocycle (retyping across the finite set where -- `D ≠ D'` costs nothing since cocycles vanish there anyway). omit [T2Space X] [CompactSpace X] [IsManifold 𝓘(ℂ, ℂ) ω X] in -/-- Pushing a cocycle to a refinement does not change its colimit class. Split out for the same -budget reason as `H1Incl_toH1_retype`. -/ +/-- Pushing a cocycle to a refinement does not change its colimit class. -/ private theorem toH1_mk_resZ1 {𝒰₀ 𝒲 : FinCover (⊤ : Opens X)} (τ : Fin 𝒲.n → Fin 𝒰₀.n) (hτ : IsRefIdx 𝒰₀ 𝒲 τ) (f' : Z1 D' 𝒰₀) : toH1 D' 𝒲 (H1Cover.mk D' 𝒲 (resZ1 D' τ hτ f')) = toH1 D' 𝒰₀ (H1Cover.mk D' 𝒰₀ f') := by - rw [← resH1_mk, toH1_resH1 D' τ hτ] + exact toH1_resH1 D' τ hτ (H1Cover.mk D' 𝒰₀ f') omit [T2Space X] [CompactSpace X] [IsManifold 𝓘(ℂ, ℂ) ω X] in /-- `H1Incl` sends the retyped class of a `D`-bounded `D'`-cocycle back to the cocycle's own -class. Split out of `H1Incl_surjective`: these two rewrites go through `H1Cover`'s direct-limit -types and, kept inline, push that proof past the default heartbeat budget. -/ +class. -/ private theorem H1Incl_toH1_retype (h : D ≤ D') {𝒲 : FinCover (⊤ : Opens X)} (g : Z1 D' 𝒲) (hmemld : (g : C1 D' 𝒲).MemLD D) : H1Incl D h (toH1 D 𝒲 (H1Cover.mk D 𝒲 ⟨C1.retype (g : C1 D' 𝒲) hmemld, C1.retype_mem_Z1' g.2 hmemld⟩)) = toH1 D' 𝒲 (H1Cover.mk D' 𝒲 g) := by - rw [H1Incl_toH1, h1CoverIncl_mk_retype h g.2 hmemld] + exact H1Incl_toH1 D h 𝒲 _ omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem H1Incl_surjective (h : D ≤ D') : Function.Surjective (H1Incl D h) := by intro ξ' - obtain ⟨𝒰₀, f'c, hf'c⟩ := exists_rep D' ξ' - obtain ⟨f', hf'⟩ := H1Cover.mk_surjective D' 𝒰₀ f'c + refine H1.induction_on_cocycles ξ' (fun 𝒰₀ f' => ?_) obtain ⟨𝒲, hle, hadapt, -⟩ := exists_adapted_refinement 𝒰₀ (diffSupp D D') (fun _ _ => trivial) (fun _ => ⊤) (fun _ _ => trivial) -- opaque refinement index: `toH1_resH1` holds for any of them, and leaving @@ -449,7 +428,9 @@ theorem H1Incl_surjective (h : D ≤ D') : Function.Surjective (H1Incl D h) := b have hmemld : (g' : C1 D' 𝒲).MemLD D := memLD_of_isAdapted hadapt hgmem refine ⟨toH1 D 𝒲 (H1Cover.mk D 𝒲 ⟨C1.retype (g' : C1 D' 𝒲) hmemld, C1.retype_mem_Z1' hgmem hmemld⟩), ?_⟩ - rw [H1Incl_toH1_retype h g' hmemld, hg'_def, toH1_mk_resZ1 τ hτspec f', hf', hf'c] + exact (H1Incl_toH1_retype h g' hmemld).trans + ((congrArg (fun z => toH1 D' 𝒲 (H1Cover.mk D' 𝒲 z)) hg'_def).trans + (toH1_mk_resZ1 τ hτspec f')) /-! ### `Realizes` (§6.9(c), D7): the pointwise-`ord` realization predicate -/ @@ -566,9 +547,10 @@ theorem mlClass_eq_of_realizes {𝒰 𝒰' : FinCover (⊤ : Opens X)} {g : C0 D have hG' : (d0 D' (𝒰.meet 𝒰') (resC0 D' τ' hτ' g')).MemLD D := memLD_d0_res hg' τ' hτ' have hrG : Realizes (𝒰.meet 𝒰') (resC0 D' τ hτ g) w := hr.res τ hτ have hrG' : Realizes (𝒰.meet 𝒰') (resC0 D' τ' hτ' g') w := hr'.res τ' hτ' - rw [← mlClass_res τ hτ g hg hG, ← mlClass_res τ' hτ' g' hg' hG'] - set G := resC0 D' τ hτ g with hGdef - set G' := resC0 D' τ' hτ' g' with hG'def + refine (mlClass_res τ hτ g hg hG).symm.trans + (Eq.trans ?_ (mlClass_res τ' hτ' g' hg' hG')) + let G := resC0 D' τ hτ g + let G' := resC0 D' τ' hτ' g' -- the connecting `D`-cochain: `G - G'` is componentwise `D`-bounded have hmemk : ∀ k : Fin (𝒰.meet 𝒰').n, ((G k : RS.MeroGermOn X ((𝒰.meet 𝒰').U k : Set X)) - @@ -633,7 +615,7 @@ theorem mlClass_eq_of_realizes {𝒰 𝒰' : FinCover (⊤ : Opens X)} {g : C0 D (G' p.1 : RS.MeroGermOn X ((𝒰.meet 𝒰').U p.1 : Set X))) rw [map_sub, map_sub] abel - rw [mlClass, mlClass, hz] + exact congrArg (toH1 D (𝒰.meet 𝒰')) hz /-! ### `exists_realization` (§6.9(c)) -/ @@ -764,7 +746,8 @@ theorem exists_realization (_h : D ≤ D') (w : Window D D') : /-! ### The connecting map `windowConnect` (§6.9(d)) -/ -private noncomputable def windowConnectRaw (h : D ≤ D') (w : Window D D') : H1 D := +/-- The first-cohomology class associated to a section in the divisor window. -/ +noncomputable def windowConnectRaw (h : D ≤ D') (w : Window D D') : H1 D := mlClass (exists_realization h w).choose (exists_realization h w).choose_spec.choose (exists_realization h w).choose_spec.choose_spec.choose @@ -809,8 +792,8 @@ theorem windowConnect_spec (h : D ≤ D') (w : Window D D') {𝒰 : FinCover ( theorem H1Incl_windowConnect (h : D ≤ D') (w : Window D D') : H1Incl D h (windowConnect h w) = 0 := by obtain ⟨𝒰, g, hg, hr, -⟩ := exists_realization h w - rw [windowConnect_spec h w hg hr] - exact H1Incl_mlClass h g hg + exact (congrArg (H1Incl D h) (windowConnect_spec h w hg hr)).trans + (H1Incl_mlClass h g hg) /-! ### Exactness (§6.9(e)/(f)) -/ @@ -920,13 +903,13 @@ vector. -/ theorem exact_windowConnect_H1Incl (h : D ≤ D') : Function.Exact (windowConnect h) (H1Incl D h) := by intro ξ + refine H1.induction_on_cocycles ξ (fun 𝒱 f => ?_) constructor · intro hξ - obtain ⟨𝒱, c, hc⟩ := exists_rep D ξ - obtain ⟨f, rfl⟩ := H1Cover.mk_surjective D 𝒱 c have hincl0 : h1CoverIncl D 𝒱 h (H1Cover.mk D 𝒱 f) = 0 := by apply toH1_injective D' 𝒱 - rw [map_zero, ← H1Incl_toH1, hc, hξ] + exact ((H1Incl_toH1 D h 𝒱 (H1Cover.mk D 𝒱 f)).symm.trans hξ).trans + (toH1 D' 𝒱).map_zero.symm rw [h1CoverIncl_mk, H1Cover.mk_eq_zero_iff] at hincl0 obtain ⟨g', hg'd0⟩ := hincl0 have hg'd0' : d0 D' 𝒱 g' = inclC1 D 𝒱 h (f : C1 D 𝒱) := by @@ -934,10 +917,6 @@ theorem exact_windowConnect_H1Incl (h : D ≤ D') : have hmemld : (d0 D' 𝒱 g').MemLD D := by intro p rw [hg'd0'] - change (Submodule.inclusion (RS.Cech.linSysOn_mono h) ((f : C1 D 𝒱) p) : - RS.MeroGermOn X ((𝒱.U p.1 ⊓ 𝒱.U p.2 : Opens X) : Set X)) ∈ - RS.LinSysOn D ((𝒱.U p.1 ⊓ 𝒱.U p.2 : Opens X) : Set X) - rw [Submodule.coe_inclusion] exact ((f : C1 D 𝒱) p).2 -- read off the window vector of `g'` via tail approximation have hbase : ∀ q : diffSupp D D', ∃ (i : Fin 𝒱.n) (_ : (q : X) ∈ 𝒱.U i) @@ -1035,9 +1014,8 @@ theorem exact_windowConnect_H1Incl (h : D ≤ D') : RS.MeroGermOn X ((𝒱.U p.1 ⊓ 𝒱.U p.2 : Opens X) : Set X)) = ((f : C1 D 𝒱) p : RS.MeroGermOn X ((𝒱.U p.1 ⊓ 𝒱.U p.2 : Opens X) : Set X)) rw [Submodule.coe_inclusion] - rw [mlClass, hfz] - exact hc - · rintro ⟨w, rfl⟩ - exact H1Incl_windowConnect h w + exact congrArg (fun z => toH1 D 𝒱 (H1Cover.mk D 𝒱 z)) hfz + · rintro ⟨w, hw⟩ + exact (congrArg (H1Incl D h) hw).symm.trans (H1Incl_windowConnect h w) end RS.Cech diff --git a/LeanPool/JacobianDiffgeo/Cech/Skyscraper.lean b/LeanPool/JacobianDiffgeo/Cech/Skyscraper.lean index 806d6a889f..16ea4eeafb 100644 --- a/LeanPool/JacobianDiffgeo/Cech/Skyscraper.lean +++ b/LeanPool/JacobianDiffgeo/Cech/Skyscraper.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Cech.Window +public import LeanPool.JacobianDiffgeo.Cech.Colimit +import LeanPool.JacobianDiffgeo.Cech.H0 import LeanPool.JacobianDiffgeo.Cech.Injectivity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The Mittag-Leffler atom and the skyscraper fragment (CC8, D7, proof plan §6.9) @@ -28,6 +32,8 @@ Unit: cech-cohomology (`docs/design/cech-cohomology.md` §4.7). is proved in `SixTerm.lean`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace RS.Cech @@ -56,15 +62,10 @@ theorem C1.retype_apply_coe (f : C1 D' 𝒰) (hf : f.MemLD D) (p : Fin 𝒰.n × omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem C1.retype_mem_Z1 {g : C0 D' 𝒰} (hg : (d0 D' 𝒰 g).MemLD D) : C1.retype (d0 D' 𝒰 g) hg ∈ Z1 D 𝒰 := by - rw [mem_Z1_iff] + apply (mem_Z1_iff D 𝒰 _).2 intro t - apply Subtype.ext - have hcoe : (d1 D 𝒰 (C1.retype (d0 D' 𝒰 g) hg) t : - RS.MeroGermOn X ((𝒰.U t.1 ⊓ 𝒰.U t.2.1 ⊓ 𝒰.U t.2.2 : Opens X) : Set X)) = - (d1 D' 𝒰 (d0 D' 𝒰 g) t : - RS.MeroGermOn X ((𝒰.U t.1 ⊓ 𝒰.U t.2.1 ⊓ 𝒰.U t.2.2 : Opens X) : Set X)) := rfl - rw [hcoe, (mem_Z1_iff D' 𝒰 (d0 D' 𝒰 g)).1 (B1_le_Z1 D' 𝒰 ⟨g, rfl⟩) t] - simp + exact Subtype.ext (congrArg (fun z : RS.LinSysOn D' _ => z.val) + ((mem_Z1_iff D' 𝒰 (d0 D' 𝒰 g)).1 (B1_le_Z1 D' 𝒰 ⟨g, rfl⟩) t)) /-! ### The Mittag-Leffler atom -/ @@ -83,27 +84,9 @@ theorem mlClass_add (g g' : C0 D' 𝒰) (hg : (d0 D' 𝒰 g).MemLD D) (hg' : (d0 have hval : C1.retype (d0 D' 𝒰 (g + g')) hgg' = (C1.retype (d0 D' 𝒰 g) hg : C1 D 𝒰) + C1.retype (d0 D' 𝒰 g') hg' := by funext p - apply Subtype.ext - change (C1.retype (d0 D' 𝒰 (g + g')) hgg' p : - RS.MeroGermOn X ((𝒰.U p.1 ⊓ 𝒰.U p.2 : Opens X) : Set X)) = - (C1.retype (d0 D' 𝒰 g) hg p : RS.MeroGermOn X ((𝒰.U p.1 ⊓ 𝒰.U p.2 : Opens X) : Set X)) + - (C1.retype (d0 D' 𝒰 g') hg' p : - RS.MeroGermOn X ((𝒰.U p.1 ⊓ 𝒰.U p.2 : Opens X) : Set X)) - change RS.MeroGermOn.restrict inf_le_right - ((g p.2 : RS.MeroGermOn X (𝒰.U p.2 : Set X)) + (g' p.2 : RS.MeroGermOn X (𝒰.U p.2 : Set - X))) - - RS.MeroGermOn.restrict inf_le_left - ((g p.1 : RS.MeroGermOn X (𝒰.U p.1 : Set X)) + (g' p.1 : RS.MeroGermOn X (𝒰.U p.1 : Set - X))) = - (RS.MeroGermOn.restrict inf_le_right (g p.2 : RS.MeroGermOn X (𝒰.U p.2 : Set X)) - - RS.MeroGermOn.restrict inf_le_left (g p.1 : RS.MeroGermOn X (𝒰.U p.1 : Set X))) + - (RS.MeroGermOn.restrict inf_le_right (g' p.2 : RS.MeroGermOn X (𝒰.U p.2 : Set X)) - - RS.MeroGermOn.restrict inf_le_left (g' p.1 : RS.MeroGermOn X (𝒰.U p.1 : Set X))) - simp only [map_add] - abel - simp only [mlClass] - rw [← map_add, ← map_add] - exact congrArg (toH1 D 𝒰) (congrArg (H1Cover.mk D 𝒰) (Subtype.ext hval)) + exact Subtype.ext (congrArg (fun c : C1 D' 𝒰 => (c p).val) ((d0 D' 𝒰).map_add g g')) + exact (congrArg ((toH1 D 𝒰).comp (H1Cover.mk D 𝒰)) (Subtype.ext hval)).trans + (((toH1 D 𝒰).comp (H1Cover.mk D 𝒰)).map_add _ _) omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem mlClass_smul (a : ℂ) (g : C0 D' 𝒰) (hg : (d0 D' 𝒰 g).MemLD D) @@ -111,34 +94,36 @@ theorem mlClass_smul (a : ℂ) (g : C0 D' 𝒰) (hg : (d0 D' 𝒰 g).MemLD D) mlClass 𝒰 (a • g) hag = a • mlClass 𝒰 g hg := by have hval : C1.retype (d0 D' 𝒰 (a • g)) hag = a • (C1.retype (d0 D' 𝒰 g) hg : C1 D 𝒰) := by funext p - apply Subtype.ext - change (C1.retype (d0 D' 𝒰 (a • g)) hag p : - RS.MeroGermOn X ((𝒰.U p.1 ⊓ 𝒰.U p.2 : Opens X) : Set X)) = - a • (C1.retype (d0 D' 𝒰 g) hg p : RS.MeroGermOn X ((𝒰.U p.1 ⊓ 𝒰.U p.2 : Opens X) : Set X)) - change RS.MeroGermOn.restrict inf_le_right (a • (g p.2 : RS.MeroGermOn X (𝒰.U p.2 : Set X))) - - RS.MeroGermOn.restrict inf_le_left (a • (g p.1 : RS.MeroGermOn X (𝒰.U p.1 : Set X))) = - a • (RS.MeroGermOn.restrict inf_le_right (g p.2 : RS.MeroGermOn X (𝒰.U p.2 : Set X)) - - RS.MeroGermOn.restrict inf_le_left (g p.1 : RS.MeroGermOn X (𝒰.U p.1 : Set X))) - simp only [map_smul, smul_sub] - rw [mlClass, mlClass, ← map_smul] - exact congrArg (toH1 D 𝒰) (congrArg (H1Cover.mk D 𝒰) (Subtype.ext hval)) + exact Subtype.ext (congrArg (fun c : C1 D' 𝒰 => (c p).val) ((d0 D' 𝒰).map_smul a g)) + exact (congrArg ((toH1 D 𝒰).comp (H1Cover.mk D 𝒰)) (Subtype.ext hval)).trans + (((toH1 D 𝒰).comp (H1Cover.mk D 𝒰)).map_smul a _) omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem H1Incl_mlClass (h : D ≤ D') (g : C0 D' 𝒰) (hg : (d0 D' 𝒰 g).MemLD D) : H1Incl D h (mlClass 𝒰 g hg) = 0 := by - rw [mlClass, H1Incl_toH1, h1CoverIncl_mk D h] have hz : H1Cover.mk D' 𝒰 (LinearMap.restrict (inclC1 D 𝒰 h) (fun _ hf => inclC1_mem_Z1 D h hf) - ⟨C1.retype (d0 D' 𝒰 g) hg, C1.retype_mem_Z1 hg⟩) = 0 := by - rw [H1Cover.mk_eq_zero_iff] - refine ⟨g, ?_⟩ - rw [LinearMap.coe_restrict_apply] - funext p - apply Subtype.ext - change (Submodule.inclusion (RS.Cech.linSysOn_mono h) - (C1.retype (d0 D' 𝒰 g) hg p) : RS.MeroGermOn X ((𝒰.U p.1 ⊓ 𝒰.U p.2 : Opens X) : Set X)) = - (d0 D' 𝒰 g p : RS.MeroGermOn X ((𝒰.U p.1 ⊓ 𝒰.U p.2 : Opens X) : Set X)) - rfl - rw [hz, map_zero] + ⟨C1.retype (d0 D' 𝒰 g) hg, C1.retype_mem_Z1 hg⟩) = 0 := + (H1Cover.mk_eq_zero_iff D' 𝒰 _).2 ⟨g, rfl⟩ + exact (H1Incl_toH1 D h 𝒰 _).trans + ((congrArg (toH1 D' 𝒰) ((h1CoverIncl_mk D h _).trans hz)).trans (toH1 D' 𝒰).map_zero) + +/-! ### `mlClass` is refinement-stable (§6.9(a), `mlClass_res`) -/ + +omit [IsManifold 𝓘(ℂ, ℂ) ω X] in +/-- Refining the cover and restricting the realizing cochain preserves its Mittag-Leffler class. -/ +theorem mlClass_res {𝒰 𝒱 : FinCover (⊤ : Opens X)} (τ : Fin 𝒱.n → Fin 𝒰.n) + (hτ : IsRefIdx 𝒰 𝒱 τ) (g : C0 D' 𝒰) (hg : (d0 D' 𝒰 g).MemLD D) + (hgr : (d0 D' 𝒱 (resC0 D' τ hτ g)).MemLD D) : + mlClass 𝒱 (resC0 D' τ hτ g) hgr = mlClass 𝒰 g hg := by + symm + change toH1 D 𝒰 (H1Cover.mk D 𝒰 _) = toH1 D 𝒱 (H1Cover.mk D 𝒱 _) + rw [← toH1_resH1 D τ hτ, resH1_mk] + apply congrArg (toH1 D 𝒱) + apply congrArg (H1Cover.mk D 𝒱) + apply Subtype.ext + change C1.retype (resC1 D' τ hτ (d0 D' 𝒰 g)) _ = _ + congr 1 + exact LinearMap.congr_fun (resC1_comp_d0 D' τ hτ) g /-! ### The vanishing criterion (§6.9(b), `⇐` half) @@ -153,39 +138,20 @@ theorem mlClass_eq_zero_of_exists (g : C0 D' 𝒰) (hg : (d0 D' 𝒰 g).MemLD D) ((g i : RS.MeroGermOn X (𝒰.U i : Set X)) - RS.MeroGermOn.restrict (𝒰.le_base i) (φ : RS.MeroGermOn X (Set.univ : Set X))).ord x) : mlClass 𝒰 g hg = 0 := by - set h : C0 D 𝒰 := fun i => ⟨(g i : RS.MeroGermOn X (𝒰.U i : Set X)) - + let h : C0 D 𝒰 := fun i => ⟨(g i : RS.MeroGermOn X (𝒰.U i : Set X)) - RS.MeroGermOn.restrict (𝒰.le_base i) (φ : RS.MeroGermOn X (Set.univ : Set X)), - fun hU x hx => hφ i x hx⟩ with hh_def + fun hU x hx => hφ i x hx⟩ + let φ' : RS.LinSysOn D' ((⊤ : Opens X) : Set X) := + ⟨φ, by rw [linSysOn_top_eq_linSys D']; exact φ.property⟩ + have hdiff : d0 D' 𝒰 (g - toC0 D' 𝒰 φ') = d0 D' 𝒰 g := by + rw [map_sub, LinearMap.mem_ker.mp (toC0_mem_ker D' 𝒰 φ'), sub_zero] have hkey : C1.retype (d0 D' 𝒰 g) hg = d0 D 𝒰 h := by funext p - apply Subtype.ext - obtain ⟨i, j⟩ := p - change RS.MeroGermOn.restrict inf_le_right (g j : RS.MeroGermOn X _) - - RS.MeroGermOn.restrict inf_le_left (g i : RS.MeroGermOn X _) = - RS.MeroGermOn.restrict inf_le_right - ((g j : RS.MeroGermOn X _) - - RS.MeroGermOn.restrict (𝒰.le_base j) (φ : RS.MeroGermOn X (Set.univ : Set X))) - - RS.MeroGermOn.restrict inf_le_left - ((g i : RS.MeroGermOn X _) - - RS.MeroGermOn.restrict (𝒰.le_base i) (φ : RS.MeroGermOn X (Set.univ : Set X))) - simp only [map_sub] - -- proofs supplied explicitly: `rw`/`simp` will not instantiate a metavariable sitting in a - -- proof-valued argument of `MeroGermOn.restrict` - rw [RS.MeroGermOn.restrict_restrict (𝒰.le_base j) inf_le_right - (φ : RS.MeroGermOn X (Set.univ : Set X)), - RS.MeroGermOn.restrict_restrict (𝒰.le_base i) inf_le_left - (φ : RS.MeroGermOn X (Set.univ : Set X))] - have hcancel : RS.MeroGermOn.restrict (inf_le_right.trans (𝒰.le_base j)) - (φ : RS.MeroGermOn X (Set.univ : Set X)) = - RS.MeroGermOn.restrict (inf_le_left.trans (𝒰.le_base i)) - (φ : RS.MeroGermOn X (Set.univ : Set X)) := rfl - rw [hcancel] - abel - rw [mlClass] + exact Subtype.ext (congrArg (fun c : C1 D' 𝒰 => (c p).val) hdiff.symm) have hz : H1Cover.mk D 𝒰 (⟨C1.retype (d0 D' 𝒰 g) hg, C1.retype_mem_Z1 hg⟩ : Z1 D 𝒰) = 0 := by rw [H1Cover.mk_eq_zero_iff] exact ⟨h, hkey.symm⟩ - rw [hz, map_zero] + exact (congrArg (toH1 D 𝒰) hz).trans (toH1 D 𝒰).map_zero /-! ### The vanishing criterion (§6.9(b), `⇒` half): now unlocked by `toH1_injective` (12.4). -/ @@ -200,45 +166,16 @@ theorem mlClass_eq_zero_iff (h : D ≤ D') (g : C0 D' 𝒰) (hg : (d0 D' 𝒰 g) · rintro ⟨φ, hφ⟩ exact mlClass_eq_zero_of_exists g hg φ hφ intro hz - rw [mlClass] at hz have hz' : H1Cover.mk D 𝒰 (⟨C1.retype (d0 D' 𝒰 g) hg, C1.retype_mem_Z1 hg⟩ : Z1 D 𝒰) = 0 := - toH1_injective D 𝒰 (by rw [hz, map_zero]) + toH1_injective D 𝒰 (hz.trans (toH1 D 𝒰).map_zero.symm) rw [H1Cover.mk_eq_zero_iff] at hz' obtain ⟨hc, hhc⟩ := hz' - -- `hhc : d0 D 𝒰 hc = C1.retype (d0 D' 𝒰 g) hg` (as `C1 D 𝒰` elements). - have hincl_retype : ∀ p : Fin 𝒰.n × Fin 𝒰.n, - Submodule.inclusion (RS.Cech.linSysOn_mono h) (C1.retype (d0 D' 𝒰 g) hg p) = - d0 D' 𝒰 g p := by - intro p - apply Subtype.ext - rw [Submodule.coe_inclusion, C1.retype_apply_coe] - set k : C0 D' 𝒰 := - fun i => (g i) - Submodule.inclusion (RS.Cech.linSysOn_mono h) (hc i) with hk_def + let k : C0 D' 𝒰 := + fun i => (g i) - Submodule.inclusion (RS.Cech.linSysOn_mono h) (hc i) have hk0 : d0 D' 𝒰 k = 0 := by - funext p - obtain ⟨i, j⟩ := p - show d0 D' 𝒰 k (i, j) = (0 : C1 D' 𝒰) (i, j) - rw [Pi.zero_apply, d0_apply] - have step1 : LinSysOn.restrictL D' (inf_le_right : 𝒰.U i ⊓ 𝒰.U j ≤ 𝒰.U j) (k j) - - LinSysOn.restrictL D' (inf_le_left : 𝒰.U i ⊓ 𝒰.U j ≤ 𝒰.U i) (k i) = - (LinSysOn.restrictL D' inf_le_right (g j) - LinSysOn.restrictL D' inf_le_left (g i)) - - (Submodule.inclusion (RS.Cech.linSysOn_mono h) (LinSysOn.restrictL D inf_le_right (hc j)) - - Submodule.inclusion (RS.Cech.linSysOn_mono h) - (LinSysOn.restrictL D inf_le_left (hc i))) := by - change LinSysOn.restrictL D' inf_le_right - (g j - Submodule.inclusion (RS.Cech.linSysOn_mono h) (hc j)) - - LinSysOn.restrictL D' inf_le_left - (g i - Submodule.inclusion (RS.Cech.linSysOn_mono h) (hc i)) = _ - rw [map_sub, map_sub, inclusion_restrictL_comm D inf_le_right h (hc j), - inclusion_restrictL_comm D inf_le_left h (hc i)] - abel - rw [step1] - have step2 : Submodule.inclusion (RS.Cech.linSysOn_mono h) - (LinSysOn.restrictL D inf_le_right (hc j)) - - Submodule.inclusion (RS.Cech.linSysOn_mono h) (LinSysOn.restrictL D inf_le_left (hc i)) = - Submodule.inclusion (RS.Cech.linSysOn_mono h) (d0 D 𝒰 hc (i, j)) := by - rw [d0_apply, map_sub] - rw [step2, congrFun hhc (i, j), hincl_retype, d0_apply, sub_self] + change d0 D' 𝒰 (g - inclC0 D 𝒰 h hc) = 0 + rw [map_sub] + exact sub_eq_zero.mpr (congrArg (inclC1 D 𝒰 h) hhc).symm obtain ⟨ψ, hψ⟩ := toC0'_surjective D' 𝒰 ⟨k, hk0⟩ have hψ' : toC0 D' 𝒰 ψ = k := congrArg Subtype.val hψ have hψi : ∀ i, LinSysOn.restrictL D' (𝒰.le_base i) ψ = k i := fun i => @@ -247,17 +184,14 @@ theorem mlClass_eq_zero_iff (h : D ≤ D') (g : C0 D' 𝒰) (hg : (d0 D' 𝒰 g) have hψ2 := ψ.2 rwa [← linSysOn_top_eq_linSys D'] refine ⟨⟨(ψ : RS.MeroGermOn X (Set.univ : Set X)), hmemφ⟩, fun i x hx => ?_⟩ - have hrel : (k i : RS.MeroGermOn X (𝒰.U i : Set X)) = - (g i : RS.MeroGermOn X (𝒰.U i : Set X)) - - (Submodule.inclusion (RS.Cech.linSysOn_mono h) (hc i) : RS.MeroGermOn X (𝒰.U i : Set X)) := - by - change ((g i - Submodule.inclusion (RS.Cech.linSysOn_mono h) (hc i) : RS.LinSysOn D' _) : - RS.MeroGermOn X (𝒰.U i : Set X)) = _ - rw [Submodule.coe_sub] change (-(D x : ℤ) : WithTop ℤ) ≤ ((g i : RS.MeroGermOn X (𝒰.U i : Set X)) - RS.MeroGermOn.restrict (𝒰.le_base i) (ψ : RS.MeroGermOn X (Set.univ : Set X))).ord x - rw [← restrictL_apply_coe, hψi i, hrel, sub_sub_cancel, Submodule.coe_inclusion] + rw [← restrictL_apply_coe, hψi i] + change (-(D x : ℤ) : WithTop ℤ) ≤ + ((g i : RS.MeroGermOn X (𝒰.U i : Set X)) - + ((g i : RS.MeroGermOn X (𝒰.U i : Set X)) - (hc i : RS.MeroGermOn X (𝒰.U i : Set X)))).ord x + rw [sub_sub_cancel] exact (RS.mem_linSysOn_iff_of_isOpen (𝒰.U i).isOpen).1 (hc i).2 x hx end RS.Cech diff --git a/LeanPool/JacobianDiffgeo/Cech/Window.lean b/LeanPool/JacobianDiffgeo/Cech/Window.lean index 7619a0059e..1e6c63f3dd 100644 --- a/LeanPool/JacobianDiffgeo/Cech/Window.lean +++ b/LeanPool/JacobianDiffgeo/Cech/Window.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Cech.Colimit -import Mathlib.LinearAlgebra.Dimension.Constructions +public import LeanPool.JacobianDiffgeo.Meromorphic.LinearSystem +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Local Laurent windows and the skyscraper data (CC8, D7, proof plan §6.8) @@ -26,8 +28,10 @@ inputs) are exported from `WindowRank.lean` instead, via a one-step splitting needed); the *structural* exactness in this file does not depend on them. -/ +@[expose] public section + open scoped ContDiff Manifold Topology -open Set TopologicalSpace RS.Cech Filter +open Set TopologicalSpace Filter namespace RS.Cech diff --git a/LeanPool/JacobianDiffgeo/Cech/WindowRank.lean b/LeanPool/JacobianDiffgeo/Cech/WindowRank.lean index 18c6cf50bc..eeab469977 100644 --- a/LeanPool/JacobianDiffgeo/Cech/WindowRank.lean +++ b/LeanPool/JacobianDiffgeo/Cech/WindowRank.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Cech.Window +public import LeanPool.JacobianDiffgeo.Cech.Window +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Window dimension counts (CC8, D7, proof plan §6.8) @@ -21,6 +25,8 @@ Unit: cech-cohomology (`docs/design/cech-cohomology.md` §4.6, §6.8). `(d' - d).toNat` (no explicit basis/independence argument needed). -/ +@[expose] public section + open scoped ContDiff Manifold Topology open Set TopologicalSpace RS.Cech Filter @@ -61,16 +67,9 @@ private theorem withTop_lt_neg_add_iff (m : ℤ) (t : WithTop ℤ) : by_cases ht : t = ⊤ · subst ht simp - · obtain ⟨k, rfl⟩ := WithTop.ne_top_iff_exists.1 ht - rw [show (((-m : ℤ) : WithTop ℤ) + (k : WithTop ℤ)) = (((-m + k : ℤ) : ℤ) : WithTop ℤ) by - norm_cast] - constructor - · intro h - have h' : (0 : ℤ) < -m + k := by exact_mod_cast h - exact_mod_cast (show m + 1 ≤ k by omega) - · intro h - have h' : m + 1 ≤ k := by exact_mod_cast h - exact_mod_cast (show (0 : ℤ) < -m + k by omega) + · lift t to ℤ using ht + norm_cast + omega theorem leadCoeff_eq_zero_iff (p : X) (m : ℤ) (ψ : ordGe p m) : leadCoeff p m ψ = 0 ↔ @@ -81,14 +80,8 @@ theorem leadCoeff_eq_zero_iff (p : X) (m : ℤ) (ψ : ordGe p m) : have h0 : (0 : WithTop ℤ) ≤ (tailGerm p (-m) * (ψ : RS.MeroGermOn X ((chartAt ℂ p).source))).ord p := by rw [hmul_ord] - have hψm : (m : WithTop ℤ) ≤ (ψ : RS.MeroGermOn X ((chartAt ℂ p).source)).ord p := ψ.2 - have hstep : (((-m : ℤ) : WithTop ℤ) + (m : WithTop ℤ)) ≤ - ((-m : ℤ) : WithTop ℤ) + (ψ : RS.MeroGermOn X ((chartAt ℂ p).source)).ord p := - add_le_add le_rfl hψm - have hz : (((-m : ℤ) : WithTop ℤ) + (m : WithTop ℤ)) = 0 := by - have : (-m + m : ℤ) = 0 := by ring - exact_mod_cast this - rwa [hz] at hstep + simpa only [← WithTop.coe_add, neg_add_cancel, WithTop.coe_zero] using + add_le_add (le_refl (((-m : ℤ) : WithTop ℤ))) ψ.2 change (tailGerm p (-m) * (ψ : RS.MeroGermOn X ((chartAt ℂ p).source))).evalAt p = 0 ↔ _ rw [RS.Cech.MeroGermOn.evalAt_eq_zero_iff (chartAt ℂ p).open_source (mem_chart_source ℂ p) _ h0, hmul_ord, withTop_lt_neg_add_iff] @@ -145,8 +138,7 @@ private theorem mem_ordGe_succ_rawCorr (d' : ℤ) (ψ : ordGe p (-d')) : rw [rawCorr_apply, smul_smul] have hleadzero : leadCoeff p (-d') (⟨rawCorr p d' ψ, hmem0⟩ : ordGe p (-d')) = 0 := by rw [hcongr, map_sub, map_smul, ← hlam_def, smul_eq_mul, ← hc_def] - field_simp - ring + rw [mul_assoc, inv_mul_cancel₀ hlam0, mul_one, sub_self] have hfin := (leadCoeff_eq_zero_iff p (-d') ⟨rawCorr p d' ψ, hmem0⟩).1 hleadzero rw [mem_ordGe_iff] have heq : ((-(d' - 1) : ℤ) : WithTop ℤ) = ((-d' + 1 : ℤ) : WithTop ℤ) := by @@ -184,12 +176,8 @@ private theorem bigMap_mem_ker_iff (d d' : ℤ) (h : d ≤ d' - 1) (ψ : ordGe p · intro hord have hlc : leadCoeff p (-d') ψ = 0 := by rw [leadCoeff_eq_zero_iff] - have h1 : ((-(d' - 1) : ℤ) : WithTop ℤ) ≤ ((-d : ℤ) : WithTop ℤ) := by - exact_mod_cast (show -(d' - 1) ≤ -d by omega) - have h2 : ((-d' + 1 : ℤ) : WithTop ℤ) = ((-(d' - 1) : ℤ) : WithTop ℤ) := by - congr 1; omega - rw [h2] - exact h1.trans hord + exact (show ((-d' + 1 : ℤ) : WithTop ℤ) ≤ ((-d : ℤ) : WithTop ℤ) by + exact_mod_cast (show -d' + 1 ≤ -d by omega)).trans hord refine ⟨?_, hlc⟩ rw [WindowAt.mk_eq_zero_iff, corrMap_apply_coe, rawCorr_eq_of_leadCoeff_eq_zero p d' ψ hlc] exact hord @@ -253,31 +241,10 @@ private theorem finrank_windowAt_aux (p : X) (d : ℤ) (n : ℕ) : rw [heq0] have hsub : Subsingleton (WindowAt p d d) := by refine ⟨fun a b => ?_⟩ - have hsurj : Function.Surjective (WindowAt.mk p d d) := Submodule.mkQ_surjective _ - obtain ⟨x, rfl⟩ := hsurj a - obtain ⟨y, rfl⟩ := hsurj b - have h1 := x.2 - have h2 := y.2 - rw [mem_ordGe_iff] at h1 h2 - have hneg : ((-d : ℤ) : WithTop ℤ) ≤ - (-(y : RS.MeroGermOn X ((chartAt ℂ p).source))).ord p := by - rw [RS.MeroGermOn.ord_neg] - exact h2 - have hxy : ((-d : ℤ) : WithTop ℤ) ≤ ((x : RS.MeroGermOn X ((chartAt ℂ p).source)) - - (y : RS.MeroGermOn X ((chartAt ℂ p).source))).ord p := by - rw [sub_eq_add_neg] - calc ((-d : ℤ) : WithTop ℤ) = min ((-d : ℤ) : WithTop ℤ) ((-d : ℤ) : WithTop ℤ) := by - simp - _ ≤ min ((x : RS.MeroGermOn X ((chartAt ℂ p).source)).ord p) - ((-(y : RS.MeroGermOn X ((chartAt ℂ p).source))).ord p) := min_le_min h1 hneg - _ ≤ ((x : RS.MeroGermOn X ((chartAt ℂ p).source)) + - (-(y : RS.MeroGermOn X ((chartAt ℂ p).source)))).ord p := - RS.MeroGermOn.ord_add (chartAt ℂ p).open_source (mem_chart_source ℂ p) _ _ - have hz : WindowAt.mk p d d (x - y) = 0 := by - rw [WindowAt.mk_eq_zero_iff] - exact hxy - rw [map_sub] at hz - exact sub_eq_zero.1 hz + obtain ⟨x, rfl⟩ := (Submodule.mkQ_surjective _) a + obtain ⟨y, rfl⟩ := (Submodule.mkQ_surjective _) b + exact ((WindowAt.mk_eq_zero_iff x).2 x.2).trans + ((WindowAt.mk_eq_zero_iff y).2 y.2).symm exact ⟨by have := hsub; infer_instance, Module.finrank_zero_of_subsingleton⟩ | succ n ih => obtain ⟨ihFD, ihFR⟩ := ih diff --git a/LeanPool/JacobianDiffgeo/CechCount.lean b/LeanPool/JacobianDiffgeo/CechCount.lean index 69e55c4c9c..14acc8aef1 100644 --- a/LeanPool/JacobianDiffgeo/CechCount.lean +++ b/LeanPool/JacobianDiffgeo/CechCount.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.CechCount.Mul -import LeanPool.JacobianDiffgeo.CechCount.Surjective -import LeanPool.JacobianDiffgeo.CechCount.Count -import LeanPool.JacobianDiffgeo.CechCount.Final +public import LeanPool.JacobianDiffgeo.CechCount.Mul +public import LeanPool.JacobianDiffgeo.CechCount.Surjective +public import LeanPool.JacobianDiffgeo.CechCount.Count +public import LeanPool.JacobianDiffgeo.CechCount.Final +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # cechcount: the final gate — `dim H¹(𝒪_X) ≤ genus X` (namespace `RS` / `RS.Cech`) @@ -38,3 +42,5 @@ executed directly on the project's Čech colimit `RS.Cech.H1` (Hodge-free, duali `RS.finrank_int_periodSubgroup_final` (`ℤ`-rank `2g`), and **`Jacobian.ofCurve_inj`** (the challenge's `ofCurve_inj`, hypothesis-free). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/CechCount/Count.lean b/LeanPool/JacobianDiffgeo/CechCount/Count.lean index e348fdd24e..415a6745d1 100644 --- a/LeanPool/JacobianDiffgeo/CechCount/Count.lean +++ b/LeanPool/JacobianDiffgeo/CechCount/Count.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Finiteness.Chi +public import LeanPool.JacobianDiffgeo.Forms.Genus +import LeanPool.JacobianDiffgeo.CanonicalForms.Existence import LeanPool.JacobianDiffgeo.CechCount.Surjective -import LeanPool.JacobianDiffgeo.Finiteness -import LeanPool.JacobianDiffgeo.RiemannRoch -import LeanPool.JacobianDiffgeo.ProperDegree -import LeanPool.JacobianDiffgeo.CanonicalForms +import LeanPool.JacobianDiffgeo.Finiteness.H1Finite +import LeanPool.JacobianDiffgeo.LaurentTail.Comparison +import LeanPool.JacobianDiffgeo.ProperDegree.DivisorDegreeZero +import LeanPool.JacobianDiffgeo.RiemannRoch.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The Čech count: `dim H¹(𝒪_X) ≤ genus X` (cechcount unit, Forster 17.9/17.16) @@ -33,6 +39,8 @@ hence injective — forcing `ξ = 0`. Contradiction; so `h⁰¹ ≤ g`. Exports: `RS.cechCount` (= `RS.finrank_H1_zero_le_genus`). -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace diff --git a/LeanPool/JacobianDiffgeo/CechCount/Final.lean b/LeanPool/JacobianDiffgeo/CechCount/Final.lean index bb809fd4ff..28e3aa5f97 100644 --- a/LeanPool/JacobianDiffgeo/CechCount/Final.lean +++ b/LeanPool/JacobianDiffgeo/CechCount/Final.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ - +module + +public import LeanPool.JacobianDiffgeo.JacobianConstruction.OfCurve +public import LeanPool.JacobianDiffgeo.LaurentTail.Comparison +public import LeanPool.JacobianDiffgeo.PeriodLattice.Discreteness +import LeanPool.JacobianDiffgeo.Abel.OfCurveInj +import LeanPool.JacobianDiffgeo.Abel.SerreFunctional +import LeanPool.JacobianDiffgeo.Abel.UpgradeDischarge import LeanPool.JacobianDiffgeo.CechCount.Count -import LeanPool.JacobianDiffgeo.Abel -import LeanPool.JacobianDiffgeo.PeriodLattice +import LeanPool.JacobianDiffgeo.PeriodLattice.FullRank +import LeanPool.JacobianDiffgeo.TailDuality.Duality +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The final gate, closed: ungated exports (cechcount unit) @@ -31,6 +41,8 @@ gate of the project was reduced to. This file records the ungated finals: with no remaining hypotheses (the challenge's `ofCurve_inj`, ungated). -/ +@[expose] public section + open scoped ContDiff Manifold diff --git a/LeanPool/JacobianDiffgeo/CechCount/Mul.lean b/LeanPool/JacobianDiffgeo/CechCount/Mul.lean index 3dcd4738d7..53aca570df 100644 --- a/LeanPool/JacobianDiffgeo/CechCount/Mul.lean +++ b/LeanPool/JacobianDiffgeo/CechCount/Mul.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Cech +public import LeanPool.JacobianDiffgeo.Cech.Colimit +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Multiplication on Čech `H¹` by global meromorphic functions (cechcount unit) @@ -30,6 +33,8 @@ action level by level, mirroring `Colimit.lean`'s `H1Incl` construction verbatim epimorphism statement `mulH1_surjective`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace RS.Cech Module @@ -272,93 +277,76 @@ omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem mulH1_add {f g : ℳ X} {D E : RS.Divisor X} (hf : MulBound f D E) (hg : MulBound g D E) (hfg : MulBound (f + g) D E) (ξ : H1 D) : mulH1 (f + g) hfg ξ = mulH1 f hf ξ + mulH1 g hg ξ := by - induction ξ using H1.induction_on with - | ih 𝒰 c => - simp only [mulH1_toH1] - rw [← map_add] - congr 1 - obtain ⟨z, rfl⟩ := H1Cover.mk_surjective D 𝒰 c - simp only [mulH1Cover_mk] - rw [← map_add] - congr 1 - apply Subtype.ext - rw [Submodule.coe_add, mulZ1_apply_coe, mulZ1_apply_coe, mulZ1_apply_coe] - funext p - rw [Pi.add_apply, mulC1_apply, mulC1_apply, mulC1_apply] - apply Subtype.ext - rw [Submodule.coe_add, mulOn_apply_coe, mulOn_apply_coe, mulOn_apply_coe, map_add, add_mul] + refine H1.induction_on_cocycles ξ (fun 𝒰 z => ?_) + simp only [mulH1_toH1] + refine (congrArg (toH1 E 𝒰) ?_).trans ((toH1 E 𝒰).map_add _ _) + simp only [mulH1Cover_mk] + refine (congrArg (H1Cover.mk E 𝒰) ?_).trans ((H1Cover.mk E 𝒰).map_add _ _) + apply Subtype.ext + rw [Submodule.coe_add, mulZ1_apply_coe, mulZ1_apply_coe, mulZ1_apply_coe] + funext p + rw [Pi.add_apply, mulC1_apply, mulC1_apply, mulC1_apply] + apply Subtype.ext + rw [Submodule.coe_add, mulOn_apply_coe, mulOn_apply_coe, mulOn_apply_coe, map_add, add_mul] omit [IsManifold 𝓘(ℂ, ℂ) ω X] in theorem mulH1_smul {f : ℳ X} {D E : RS.Divisor X} (a : ℂ) (hf : MulBound f D E) (haf : MulBound (a • f) D E) (ξ : H1 D) : mulH1 (a • f) haf ξ = a • mulH1 f hf ξ := by - induction ξ using H1.induction_on with - | ih 𝒰 c => - simp only [mulH1_toH1] - rw [← map_smul] - congr 1 - obtain ⟨z, rfl⟩ := H1Cover.mk_surjective D 𝒰 c - simp only [mulH1Cover_mk] - rw [← map_smul] - congr 1 - apply Subtype.ext - rw [Submodule.coe_smul, mulZ1_apply_coe, mulZ1_apply_coe] - funext p - rw [Pi.smul_apply, mulC1_apply, mulC1_apply] - apply Subtype.ext - rw [Submodule.coe_smul, mulOn_apply_coe, mulOn_apply_coe, map_smul, smul_mul_assoc] + refine H1.induction_on_cocycles ξ (fun 𝒰 z => ?_) + simp only [mulH1_toH1] + refine (congrArg (toH1 E 𝒰) ?_).trans ((toH1 E 𝒰).map_smul a _) + simp only [mulH1Cover_mk] + refine (congrArg (H1Cover.mk E 𝒰) ?_).trans ((H1Cover.mk E 𝒰).map_smul a _) + apply Subtype.ext + rw [Submodule.coe_smul, mulZ1_apply_coe, mulZ1_apply_coe] + funext p + rw [Pi.smul_apply, mulC1_apply, mulC1_apply] + apply Subtype.ext + rw [Submodule.coe_smul, mulOn_apply_coe, mulOn_apply_coe, map_smul, smul_mul_assoc] omit [IsManifold 𝓘(ℂ, ℂ) ω X] in /-- Composition of multiplications is multiplication by the product. -/ theorem mulH1_mulH1 {f g : ℳ X} {D D' E : RS.Divisor X} (hf : MulBound f D' E) (hg : MulBound g D D') (hfg : MulBound (f * g) D E) (ξ : H1 D) : mulH1 f hf (mulH1 g hg ξ) = mulH1 (f * g) hfg ξ := by - induction ξ using H1.induction_on with - | ih 𝒰 c => - simp only [mulH1_toH1] - congr 1 - obtain ⟨z, rfl⟩ := H1Cover.mk_surjective D 𝒰 c - simp only [mulH1Cover_mk] - congr 1 - apply Subtype.ext - simp only [mulZ1_apply_coe] - funext p - simp only [mulC1_apply] - apply Subtype.ext - simp only [mulOn_apply_coe] - rw [map_mul, mul_assoc] + refine H1.induction_on_cocycles ξ (fun 𝒰 z => ?_) + simp only [mulH1_toH1] + congr 1 + simp only [mulH1Cover_mk] + congr 1 + apply Subtype.ext + simp only [mulZ1_apply_coe] + funext p + simp only [mulC1_apply] + apply Subtype.ext + simp only [mulOn_apply_coe] + rw [map_mul, mul_assoc] omit [IsManifold 𝓘(ℂ, ℂ) ω X] in /-- Multiplication by `1` is the divisor inclusion. -/ theorem mulH1_one {D E : RS.Divisor X} (h1 : MulBound (1 : ℳ X) D E) (hDE : D ≤ E) (ξ : H1 D) : mulH1 (1 : ℳ X) h1 ξ = H1Incl D hDE ξ := by - induction ξ using H1.induction_on with - | ih 𝒰 c => - rw [mulH1_toH1, H1Incl_toH1] - congr 1 - obtain ⟨z, rfl⟩ := H1Cover.mk_surjective D 𝒰 c - rw [mulH1Cover_mk, h1CoverIncl_mk] - congr 1 - apply Subtype.ext - rw [mulZ1_apply_coe, LinearMap.coe_restrict_apply] - funext p - rw [mulC1_apply, inclC1_apply] - apply Subtype.ext - rw [mulOn_apply_coe, map_one, one_mul, Submodule.coe_inclusion] + refine H1.induction_on_cocycles ξ (fun 𝒰 z => ?_) + rw [mulH1_toH1, H1Incl_toH1] + congr 1 + rw [mulH1Cover_mk, h1CoverIncl_mk] + congr 1 + apply Subtype.ext + rw [mulZ1_apply_coe, LinearMap.coe_restrict_apply] + funext p + rw [mulC1_apply, inclC1_apply] + apply Subtype.ext + rw [mulOn_apply_coe, map_one, one_mul, Submodule.coe_inclusion] omit [IsManifold 𝓘(ℂ, ℂ) ω X] in /-- Multiplication absorbs a preceding divisor inclusion. -/ theorem mulH1_H1Incl {f : ℳ X} {D D' E : RS.Divisor X} (h : D ≤ D') (hf' : MulBound f D' E) (hf : MulBound f D E) (ξ : H1 D) : mulH1 f hf' (H1Incl D h ξ) = mulH1 f hf ξ := by - induction ξ using H1.induction_on with - | ih 𝒰 c => - rw [H1Incl_toH1] - simp only [mulH1_toH1] - congr 1 - obtain ⟨z, rfl⟩ := H1Cover.mk_surjective D 𝒰 c - rw [h1CoverIncl_mk] - simp only [mulH1Cover_mk] - congr 1 + refine H1.induction_on_cocycles ξ (fun 𝒰 z => ?_) + rw [H1Incl_toH1] + simp only [mulH1_toH1] + congr 1 end RS.Cech diff --git a/LeanPool/JacobianDiffgeo/CechCount/Surjective.lean b/LeanPool/JacobianDiffgeo/CechCount/Surjective.lean index 3e14a2cc8f..e3e47eeb09 100644 --- a/LeanPool/JacobianDiffgeo/CechCount/Surjective.lean +++ b/LeanPool/JacobianDiffgeo/CechCount/Surjective.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.CechCount.Mul +public import LeanPool.JacobianDiffgeo.CechCount.Mul +import LeanPool.JacobianDiffgeo.Cech.SixTerm +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Multiplication epimorphisms on Čech `H¹` (cechcount unit, Forster 17.8) @@ -21,6 +25,8 @@ primal form). Proof: factor through the intermediate divisor `D₁ := E + diviso * `mulH1 f hf` agrees with the composite (`mulH1_H1Incl`). -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace RS.Cech Module diff --git a/LeanPool/JacobianDiffgeo/Challenge.lean b/LeanPool/JacobianDiffgeo/Challenge.lean index c75579e94b..7ff9eea3bb 100644 --- a/LeanPool/JacobianDiffgeo/Challenge.lean +++ b/LeanPool/JacobianDiffgeo/Challenge.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Forms -import LeanPool.JacobianDiffgeo.GenusSphereHeadline -import LeanPool.JacobianDiffgeo.JacobianConstruction -import LeanPool.JacobianDiffgeo.JacFunctorial -import LeanPool.JacobianDiffgeo.ProperDegree -import LeanPool.JacobianDiffgeo.CechCount +import LeanPool.JacobianDiffgeo.GenusSphereHeadline.Basic + +public import LeanPool.JacobianDiffgeo.CechCount.Final +public import LeanPool.JacobianDiffgeo.JacFunctorial.PullbackMaps +public import LeanPool.JacobianDiffgeo.ProperDegree.ChallengeDegree +import LeanPool.JacobianDiffgeo.JacFunctorial.Challenge +import LeanPool.JacobianDiffgeo.JacFunctorial.ChallengeLaws +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Jacobians — the assembled challenge API @@ -70,6 +75,8 @@ otherwise the gist's, and the (overwhelmingly common) same-universe uses — inc in `Type 0` — elaborate verbatim. -/ +@[expose] public section + open scoped ContDiff -- for ω notation open scoped Manifold -- for 𝓘 notation diff --git a/LeanPool/JacobianDiffgeo/Dbar.lean b/LeanPool/JacobianDiffgeo/Dbar.lean index c802c9d97f..439853d45e 100644 --- a/LeanPool/JacobianDiffgeo/Dbar.lean +++ b/LeanPool/JacobianDiffgeo/Dbar.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Dbar.Wirtinger -import LeanPool.JacobianDiffgeo.Dbar.CauchyKernel -import LeanPool.JacobianDiffgeo.Dbar.SolveDisk -import LeanPool.JacobianDiffgeo.Dbar.Form01 -import LeanPool.JacobianDiffgeo.Dbar.Operator -import LeanPool.JacobianDiffgeo.Dbar.PlanarPoU -import LeanPool.JacobianDiffgeo.Dbar.PlanarCousin -import LeanPool.JacobianDiffgeo.Dbar.DiskAcyclic +public import LeanPool.JacobianDiffgeo.Dbar.Wirtinger +public import LeanPool.JacobianDiffgeo.Dbar.CauchyKernel +public import LeanPool.JacobianDiffgeo.Dbar.SolveDisk +public import LeanPool.JacobianDiffgeo.Dbar.Form01 +public import LeanPool.JacobianDiffgeo.Dbar.Operator +public import LeanPool.JacobianDiffgeo.Dbar.PlanarPoU +public import LeanPool.JacobianDiffgeo.Dbar.PlanarCousin +public import LeanPool.JacobianDiffgeo.Dbar.DiskAcyclic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # dbar-solvability: the `dbar`-equation on Riemann surfaces (namespace `RS`) @@ -32,3 +35,5 @@ API summary (see `docs/design/dbar-solvability.md`). Zero sorries throughout. `D = 0` case of Čech `H¹` vanishing on chart-disk covers — the general-divisor twist is NOT included (see the file's docstring and the build log for the honest scope note). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/Dbar/CauchyKernel.lean b/LeanPool/JacobianDiffgeo/Dbar/CauchyKernel.lean index 3a579463e4..42b6eb2760 100644 --- a/LeanPool/JacobianDiffgeo/Dbar/CauchyKernel.lean +++ b/LeanPool/JacobianDiffgeo/Dbar/CauchyKernel.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Dbar.Wirtinger +public import Mathlib.Analysis.Convolution import Mathlib.Analysis.Calculus.ContDiff.Convolution import Mathlib.Analysis.SpecialFunctions.PolarCoord -import Mathlib.MeasureTheory.Integral.Prod -import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import LeanPool.JacobianDiffgeo.Dbar.Wirtinger +import Mathlib.MeasureTheory.Integral.CircleIntegral /-! # The Cauchy kernel, the Cauchy transform, and Cauchy–Pompeiu (Forster 13.1) @@ -23,6 +24,8 @@ derivative package handles "differentiate under the integral", and the polar sub the kernel singularity cancel exactly. -/ +@[expose] public section + open MeasureTheory Metric Set Complex open scoped Convolution ContDiff diff --git a/LeanPool/JacobianDiffgeo/Dbar/DiskAcyclic.lean b/LeanPool/JacobianDiffgeo/Dbar/DiskAcyclic.lean index 5707d8a8e0..d76b0b0b16 100644 --- a/LeanPool/JacobianDiffgeo/Dbar/DiskAcyclic.lean +++ b/LeanPool/JacobianDiffgeo/Dbar/DiskAcyclic.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Dbar.PlanarCousin -import LeanPool.JacobianDiffgeo.Dbar.Operator -import LeanPool.JacobianDiffgeo.Cech.Cochains +public import LeanPool.JacobianDiffgeo.Cech.Cochains import LeanPool.JacobianDiffgeo.Cech.Refinement -import LeanPool.JacobianDiffgeo.Meromorphic +import LeanPool.JacobianDiffgeo.Dbar.PlanarCousin +import LeanPool.JacobianDiffgeo.Meromorphic.CodiscreteBridge +import LeanPool.JacobianDiffgeo.Surface.Bridges +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Disk acyclicity of `𝒪_D` (`Jacobian/Dbar/DiskAcyclic.lean`) @@ -31,6 +35,8 @@ below is a complete, self-contained, fully admitted-free proof of disk acyclicit structure sheaf, which is the piece the design flags as needed with "no compactness". -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology TopologicalSpace diff --git a/LeanPool/JacobianDiffgeo/Dbar/Form01.lean b/LeanPool/JacobianDiffgeo/Dbar/Form01.lean index 24754c9300..8950967d3e 100644 --- a/LeanPool/JacobianDiffgeo/Dbar/Form01.lean +++ b/LeanPool/JacobianDiffgeo/Dbar/Form01.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Surface +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Geometry.Manifold.IsManifold.Basic import LeanPool.JacobianDiffgeo.Forms.Analyticity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `Form01 X`: smooth `(0,1)`-forms as chart-coefficient families (`Jacobian/Dbar/Form01.lean`) @@ -26,6 +30,8 @@ reserved token in the ambient `ContDiff` scope's regularity level and cannot be ordinary identifier.) -/ +@[expose] public section + open scoped ContDiff Manifold open Set IsManifold diff --git a/LeanPool/JacobianDiffgeo/Dbar/Operator.lean b/LeanPool/JacobianDiffgeo/Dbar/Operator.lean index b4e223f4c2..e4deac550b 100644 --- a/LeanPool/JacobianDiffgeo/Dbar/Operator.lean +++ b/LeanPool/JacobianDiffgeo/Dbar/Operator.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Dbar.Form01 +public import LeanPool.JacobianDiffgeo.Dbar.Wirtinger +public import Mathlib.Geometry.Manifold.ContMDiff.Defs import LeanPool.JacobianDiffgeo.Dbar.SolveDisk -import LeanPool.JacobianDiffgeo.Dbar.Form01 +import LeanPool.JacobianDiffgeo.Forms.Analyticity +import LeanPool.JacobianDiffgeo.Surface.Bridges +import LeanPool.JacobianDiffgeo.Surface.RealSmooth +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The intrinsic `dbar` operator and `IsDbarOn` (`Jacobian/Dbar/Operator.lean`) @@ -30,6 +39,8 @@ predicates (D7); `exists_dbar_solution_chart_ball` transports Forster 13.2 (`Sol through a chart. -/ +@[expose] public section + open scoped ContDiff Manifold open Set IsManifold @@ -89,24 +100,24 @@ private theorem contMDiff_of_chart_op {f : X → ℂ} ContMDiff 𝓘(ℝ, ℂ) 𝓘(ℝ, ℂ) ∞ f := fun x => contMDiffAt_real_iff_contDiffAt.2 (h x) instance : Add (SmoothC X) where - add f g := ⟨fun x => f x + g x, contMDiff_of_chart_op fun x => - (f.contDiffAt_comp_chartAt_symm_self x).add (g.contDiffAt_comp_chartAt_symm_self x)⟩ + add f g := ⟨fun x => f x + g x, private_decl% (contMDiff_of_chart_op fun x => + (f.contDiffAt_comp_chartAt_symm_self x).add (g.contDiffAt_comp_chartAt_symm_self x))⟩ instance : Neg (SmoothC X) where - neg f := ⟨fun x => -f x, contMDiff_of_chart_op fun x => - (f.contDiffAt_comp_chartAt_symm_self x).neg⟩ + neg f := ⟨fun x => -f x, private_decl% (contMDiff_of_chart_op fun x => + (f.contDiffAt_comp_chartAt_symm_self x).neg)⟩ instance : Sub (SmoothC X) where - sub f g := ⟨fun x => f x - g x, contMDiff_of_chart_op fun x => - (f.contDiffAt_comp_chartAt_symm_self x).sub (g.contDiffAt_comp_chartAt_symm_self x)⟩ + sub f g := ⟨fun x => f x - g x, private_decl% (contMDiff_of_chart_op fun x => + (f.contDiffAt_comp_chartAt_symm_self x).sub (g.contDiffAt_comp_chartAt_symm_self x))⟩ instance : Zero (SmoothC X) where - zero := ⟨fun _ => 0, contMDiff_of_chart_op fun _ => contDiffAt_const⟩ + zero := ⟨fun _ => 0, private_decl% (contMDiff_of_chart_op fun _ => contDiffAt_const)⟩ instance : SMul ℂ (SmoothC X) where - smul c f := ⟨fun x => c * f x, contMDiff_of_chart_op fun x => + smul c f := ⟨fun x => c * f x, private_decl% (contMDiff_of_chart_op fun x => (ContinuousLinearMap.mul ℝ ℂ c).contDiff.contDiffAt.comp _ - (f.contDiffAt_comp_chartAt_symm_self x)⟩ + (f.contDiffAt_comp_chartAt_symm_self x))⟩ @[simp] theorem coe_add (f g : SmoothC X) (x : X) : (f + g) x = f x + g x := rfl @[simp] theorem coe_neg (f : SmoothC X) (x : X) : (-f) x = -f x := rfl @@ -142,7 +153,7 @@ end SmoothC /-- The raw coefficient family underlying `dbar f`: chart-local `wirtingerDbar` of the chart representative of `f`, junk-zero off the chart target. -/ -private def dbarCoeffAt (f : SmoothC X) (x : X) : ℂ → ℂ := +def dbarCoeffAt (f : SmoothC X) (x : X) : ℂ → ℂ := (chartAt ℂ x).target.indicator (fun z => wirtingerDbar (⇑f ∘ ⇑(chartAt ℂ x).symm) z) omit [IsManifold 𝓘(ℂ, ℂ) ω X] in @@ -193,7 +204,7 @@ noncomputable def dbar : SmoothC X →ₗ[ℂ] Form01 X where (f.contDiffOn_comp_chartAt_symm x)).congr intro z hz exact dbarCoeffAt_of_mem f x hz - compat := dbarCoeffAt_compat f } + compat := private dbarCoeffAt_compat f } map_add' f g := by apply Form01.ext intro x z hz diff --git a/LeanPool/JacobianDiffgeo/Dbar/PlanarCousin.lean b/LeanPool/JacobianDiffgeo/Dbar/PlanarCousin.lean index 2d0935052d..0cb44d4119 100644 --- a/LeanPool/JacobianDiffgeo/Dbar/PlanarCousin.lean +++ b/LeanPool/JacobianDiffgeo/Dbar/PlanarCousin.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.Analysis.InnerProductSpace.Basic import LeanPool.JacobianDiffgeo.Dbar.PlanarPoU import LeanPool.JacobianDiffgeo.Dbar.SolveDisk +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Planar Cousin: cocycle splittings (`Jacobian/Dbar/PlanarCousin.lean`) @@ -22,6 +27,8 @@ Cocycle convention matched to cech's `d0` (`(d0 h)_{ij} = h_j − h_i`) and `Z1. (`f_{jk} − f_{ik} + f_{ij} = 0`, i.e. `f i k = f i j + f j k`). -/ +@[expose] public section + noncomputable section open scoped ContDiff diff --git a/LeanPool/JacobianDiffgeo/Dbar/PlanarPoU.lean b/LeanPool/JacobianDiffgeo/Dbar/PlanarPoU.lean index 0a72b853bb..452c947a94 100644 --- a/LeanPool/JacobianDiffgeo/Dbar/PlanarPoU.lean +++ b/LeanPool/JacobianDiffgeo/Dbar/PlanarPoU.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import Mathlib.Topology.ShrinkingLemma +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension -import Mathlib.Topology.GDelta.MetrizableSpace +import Mathlib.Topology.ShrinkingLemma /-! # Finite smooth partitions of unity on planar open sets (`Jacobian/Dbar/PlanarPoU.lean`) @@ -25,6 +27,8 @@ not the plain functions with prescribed exact `support` needed here) was confirm call by an upstream investigation of the manifold `PartitionOfUnity` API. -/ +@[expose] public section + noncomputable section open scoped ContDiff diff --git a/LeanPool/JacobianDiffgeo/Dbar/SolveDisk.lean b/LeanPool/JacobianDiffgeo/Dbar/SolveDisk.lean index 75c1bb4bb2..4ff271ffb5 100644 --- a/LeanPool/JacobianDiffgeo/Dbar/SolveDisk.lean +++ b/LeanPool/JacobianDiffgeo/Dbar/SolveDisk.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import Mathlib.Analysis.Calculus.BumpFunction.Normed -import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension -import Mathlib.Analysis.Complex.LocallyUniformLimit +public import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension +public import LeanPool.JacobianDiffgeo.Dbar.Wirtinger import LeanPool.JacobianDiffgeo.Dbar.CauchyKernel +import Mathlib.Analysis.Complex.LocallyUniformLimit +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Forster 13.2: Dolbeault's lemma on an open disk (`Jacobian/Dbar/SolveDisk.lean`) @@ -21,6 +23,8 @@ sum of the power series of the (holomorphic) difference `f_{n+1} - fₙ`, chosen that the corrected sequence converges locally uniformly to a solution on the whole disk. -/ +@[expose] public section + open MeasureTheory Metric Set Complex Filter Topology open scoped Convolution ContDiff NNReal diff --git a/LeanPool/JacobianDiffgeo/Dbar/Wirtinger.lean b/LeanPool/JacobianDiffgeo/Dbar/Wirtinger.lean index 6d130ed338..117ab90f9f 100644 --- a/LeanPool/JacobianDiffgeo/Dbar/Wirtinger.lean +++ b/LeanPool/JacobianDiffgeo/Dbar/Wirtinger.lean @@ -3,15 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars -import Mathlib.Analysis.Calculus.FDeriv.Add -import Mathlib.Analysis.Calculus.FDeriv.Mul -import Mathlib.Analysis.Calculus.FDeriv.Comp -import Mathlib.Analysis.Calculus.FDeriv.Congr -import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Topology.Algebra.Support /-! # Wirtinger derivatives and the Cauchy–Riemann bridge @@ -32,6 +28,8 @@ project imports, no manifold variables, so downstream planar consumers (`planar- `hasCompactSupport_wirtingerDbar`. -/ +@[expose] public section + open scoped ContDiff noncomputable section diff --git a/LeanPool/JacobianDiffgeo/DolbeaultComparison.lean b/LeanPool/JacobianDiffgeo/DolbeaultComparison.lean index ea6f440c09..8f1c4064a3 100644 --- a/LeanPool/JacobianDiffgeo/DolbeaultComparison.lean +++ b/LeanPool/JacobianDiffgeo/DolbeaultComparison.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.DolbeaultComparison.Leray -import LeanPool.JacobianDiffgeo.DolbeaultComparison.GlueForm01 -import LeanPool.JacobianDiffgeo.DolbeaultComparison.Splitting -import LeanPool.JacobianDiffgeo.DolbeaultComparison.Comparison +public import LeanPool.JacobianDiffgeo.DolbeaultComparison.Leray +public import LeanPool.JacobianDiffgeo.DolbeaultComparison.GlueForm01 +public import LeanPool.JacobianDiffgeo.DolbeaultComparison.Splitting +public import LeanPool.JacobianDiffgeo.DolbeaultComparison.Comparison +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # dolbeault-comparison: Leray's theorem and the Dolbeault comparison (namespaces `RS`, `RS.Cech`, @@ -42,3 +45,5 @@ API summary (see `docs/design/dolbeault-comparison.md`). Zero sorries throughout No Weyl lemma, no elliptic regularity, no harmonic theory anywhere: the only PDE fact ever consumed is dbar-solvability's `exists_dbar_solution_chart_ball`/disk acyclicity. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/DolbeaultComparison/Comparison.lean b/LeanPool/JacobianDiffgeo/DolbeaultComparison/Comparison.lean index a72001f6d9..268b31518d 100644 --- a/LeanPool/JacobianDiffgeo/DolbeaultComparison/Comparison.lean +++ b/LeanPool/JacobianDiffgeo/DolbeaultComparison/Comparison.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.DolbeaultComparison.Splitting +public import LeanPool.JacobianDiffgeo.Cech.Colimit +import LeanPool.JacobianDiffgeo.Dbar.DiskAcyclic import LeanPool.JacobianDiffgeo.DolbeaultComparison.Leray -import LeanPool.JacobianDiffgeo.DolbeaultComparison.Splitting +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The Dolbeault comparison `H¹(X, 𝒪) ≅ H^{0,1}(X)` (`Jacobian/DolbeaultComparison/Comparison.lean`) @@ -21,6 +26,8 @@ the time of this build `Jacobian/Finiteness/H1Finite.lean` (the file that would hypothesis unconditionally) has not landed; see the unit's build-log entry. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace RS.Cech @@ -108,8 +115,6 @@ noncomputable def toDolb {𝒰 : FinCover (⊤ : Opens X)} [T2Space X] [CompactS @[simp] theorem toDolb_mk {𝒰 : FinCover (⊤ : Opens X)} [T2Space X] [CompactSpace X] (h𝒰 : 𝒰.IsGood) (f : Z1 (0 : RS.Divisor X) 𝒰) : toDolb h𝒰 (H1Cover.mk (0 : RS.Divisor X) 𝒰 f) = H01.mk (RS.Dolb.dolbForm h𝒰 f) := by - change Submodule.liftQ _ (toDolbRaw h𝒰) _ (Submodule.Quotient.mk f) = _ - rw [Submodule.liftQ_apply] rfl theorem toDolb_res {𝒰 𝒱 : FinCover (⊤ : Opens X)} [T2Space X] [CompactSpace X] @@ -118,12 +123,8 @@ theorem toDolb_res {𝒰 𝒱 : FinCover (⊤ : Opens X)} [T2Space X] [CompactSp apply LinearMap.ext intro ξ obtain ⟨f, rfl⟩ := H1Cover.mk_surjective (0 : RS.Divisor X) 𝒰 ξ - change toDolb h𝒱 (resH1 (0 : RS.Divisor X) τ hτ (H1Cover.mk (0 : RS.Divisor X) 𝒰 f)) = - toDolb h𝒰 (H1Cover.mk (0 : RS.Divisor X) 𝒰 f) - rw [resH1_mk, toDolb_mk, toDolb_mk] - have hmem := RS.Dolb.dolbForm_res_sub_mem h𝒰 h𝒱 τ hτ f - rw [← sub_eq_zero, ← map_sub] - exact H01.mk_eq_zero_iff.2 (LinearMap.mem_range.mp hmem) + exact H01.mk_eq_mk_iff.2 + (LinearMap.mem_range.mp (RS.Dolb.dolbForm_res_sub_mem h𝒰 h𝒱 τ hτ f)) /-! ### `cechToH01`: extend `toDolb` to the whole colimit via `H1.lift` -/ @@ -154,8 +155,9 @@ private theorem resH1_resH1' {𝒰 𝒱 𝒲 : FinCover (⊤ : Opens X)} (h : (ξ : H1Cover (0 : RS.Divisor X) 𝒰) : resH1 (0 : RS.Divisor X) c hc (resH1' (0 : RS.Divisor X) h ξ) = resH1 (0 : RS.Divisor X) (ρ ∘ c) hidx ξ := by - rw [resH1'_eq_resH1 (0 : RS.Divisor X) h ρ hρ] - exact LinearMap.congr_fun (resH1_comp (0 : RS.Divisor X) ρ hρ c hc) ξ + exact (congrArg (resH1 (0 : RS.Divisor X) c hc) + (LinearMap.congr_fun (resH1'_eq_resH1 (0 : RS.Divisor X) h ρ hρ) ξ)).trans + (LinearMap.congr_fun (resH1_comp (0 : RS.Divisor X) ρ hρ c hc) ξ) /-- `toDolb` does not see which refinement index was used (`resH1_indep`). -/ private theorem toDolb_resH1_congr [T2Space X] [CompactSpace X] @@ -181,18 +183,10 @@ private theorem toDolbAll_eq_toDolb [T2Space X] [CompactSpace X] ⟨chosenRefIdx (goodRef_le 𝒴), chosenRefIdx_spec (goodRef_le 𝒴)⟩ obtain ⟨σ, hσ⟩ : ∃ σ, IsRefIdx (goodRef 𝒴) 𝒲 σ := ⟨chosenRefIdx hg, chosenRefIdx_spec hg⟩ have hidx : IsRefIdx 𝒴 𝒲 (τ ∘ σ) := fun k => (hσ k).trans (hτ (σ k)) - have h1 : toDolbAll 𝒴 η = toDolb h𝒲good (resH1 (0 : RS.Divisor X) (τ ∘ σ) hidx η) := by - change toDolb (goodRef_isGood 𝒴) (resH1' (0 : RS.Divisor X) (goodRef_le 𝒴) η) = _ - rw [resH1'_eq_resH1 (0 : RS.Divisor X) (goodRef_le 𝒴) τ hτ] - have hc1 : resH1 (0 : RS.Divisor X) σ hσ (resH1 (0 : RS.Divisor X) τ hτ η) = - resH1 (0 : RS.Divisor X) (τ ∘ σ) hidx η := - LinearMap.congr_fun (resH1_comp (0 : RS.Divisor X) τ hτ σ hσ) η - have hc2 : toDolb h𝒲good (resH1 (0 : RS.Divisor X) σ hσ (resH1 (0 : RS.Divisor X) τ hτ η)) = - toDolb (goodRef_isGood 𝒴) (resH1 (0 : RS.Divisor X) τ hτ η) := - LinearMap.congr_fun (toDolb_res (goodRef_isGood 𝒴) h𝒲good σ hσ) - (resH1 (0 : RS.Divisor X) τ hτ η) - rw [← hc2, hc1] - exact h1.trans (toDolb_resH1_congr h𝒲good hidx ha η) + exact ((LinearMap.congr_fun (toDolb_res (goodRef_isGood 𝒴) h𝒲good σ hσ) + (resH1' (0 : RS.Divisor X) (goodRef_le 𝒴) η)).symm.trans + (congrArg (toDolb h𝒲good) (resH1_resH1' (goodRef_le 𝒴) hτ hσ hidx η))).trans + (toDolb_resH1_congr h𝒲good hidx ha η) theorem toDolbAll_compat [T2Space X] [CompactSpace X] (𝒰 𝒱 : FinCover (⊤ : Opens X)) (h : 𝒰 ≤ 𝒱) (ξ : H1Cover (0 : RS.Divisor X) 𝒰) : @@ -200,18 +194,13 @@ theorem toDolbAll_compat [T2Space X] [CompactSpace X] (𝒰 𝒱 : FinCover (⊤ obtain ⟨𝒲, h𝒲le, h𝒲good⟩ := exists_good_refinement ((goodRef 𝒰).meet (goodRef 𝒱)) have hU𝒲 : goodRef 𝒰 ≤ 𝒲 := (le_meet_left _ _).trans h𝒲le have hV𝒲 : goodRef 𝒱 ≤ 𝒲 := (le_meet_right _ _).trans h𝒲le - obtain ⟨a, ha⟩ : ∃ a, IsRefIdx 𝒰 𝒲 a := - ⟨chosenRefIdx ((goodRef_le 𝒰).trans hU𝒲), chosenRefIdx_spec ((goodRef_le 𝒰).trans hU𝒲)⟩ obtain ⟨b, hb⟩ : ∃ b, IsRefIdx 𝒱 𝒲 b := ⟨chosenRefIdx ((goodRef_le 𝒱).trans hV𝒲), chosenRefIdx_spec ((goodRef_le 𝒱).trans hV𝒲)⟩ obtain ⟨ρ, hρ⟩ : ∃ ρ, IsRefIdx 𝒰 𝒱 ρ := ⟨chosenRefIdx h, chosenRefIdx_spec h⟩ have hidx : IsRefIdx 𝒰 𝒲 (ρ ∘ b) := fun k => (hb k).trans (hρ (b k)) - -- composed as terms rather than by `rw`: building rewrite motives over the `H1Cover` - -- direct-limit types is expensive here. exact (toDolbAll_eq_toDolb hV𝒲 h𝒲good hb (resH1' (0 : RS.Divisor X) h ξ)).trans - (((congrArg (toDolb h𝒲good) (resH1_resH1' h hρ hb hidx ξ)).trans - (toDolb_resH1_congr h𝒲good hidx ha ξ)).trans - (toDolbAll_eq_toDolb hU𝒲 h𝒲good ha ξ).symm) + ((congrArg (toDolb h𝒲good) (resH1_resH1' h hρ hb hidx ξ)).trans + (toDolbAll_eq_toDolb hU𝒲 h𝒲good hidx ξ).symm) /-- **THE comparison map on the colimit** (Forster 15.14(a), forward map). -/ noncomputable def cechToH01 [T2Space X] [CompactSpace X] : @@ -225,12 +214,12 @@ noncomputable def cechToH01 [T2Space X] [CompactSpace X] : theorem cechToH01_toH1 [T2Space X] [CompactSpace X] {𝒰 : FinCover (⊤ : Opens X)} (h𝒰 : 𝒰.IsGood) (c : H1Cover (0 : RS.Divisor X) 𝒰) : cechToH01 (toH1 (0 : RS.Divisor X) 𝒰 c) = toDolb h𝒰 c := by - rw [cechToH01_toH1_all] - change toDolb (goodRef_isGood 𝒰) (resH1' (0 : RS.Divisor X) (goodRef_le 𝒰) c) = toDolb h𝒰 c - rw [resH1'_eq_resH1 (0 : RS.Divisor X) (goodRef_le 𝒰) (chosenRefIdx (goodRef_le 𝒰)) - (chosenRefIdx_spec (goodRef_le 𝒰))] - exact LinearMap.congr_fun (toDolb_res h𝒰 (goodRef_isGood 𝒰) (chosenRefIdx (goodRef_le 𝒰)) - (chosenRefIdx_spec (goodRef_le 𝒰))) c + exact (cechToH01_toH1_all 𝒰 c).trans + ((congrArg (toDolb (goodRef_isGood 𝒰)) + (LinearMap.congr_fun (resH1'_eq_resH1 (0 : RS.Divisor X) (goodRef_le 𝒰) + (chosenRefIdx (goodRef_le 𝒰)) (chosenRefIdx_spec (goodRef_le 𝒰))) c)).trans + (LinearMap.congr_fun (toDolb_res h𝒰 (goodRef_isGood 𝒰) (chosenRefIdx (goodRef_le 𝒰)) + (chosenRefIdx_spec (goodRef_le 𝒰))) c)) /-! ### Injectivity -/ @@ -241,23 +230,23 @@ theorem cechToH01_injective [T2Space X] [CompactSpace X] : intro ξ hξ obtain ⟨𝒰, h𝒰, f, hf⟩ := exists_rep_good (0 : RS.Divisor X) ξ obtain ⟨F, rfl⟩ := H1Cover.mk_surjective (0 : RS.Divisor X) 𝒰 f - rw [← hf, cechToH01_toH1 h𝒰, toDolb_mk, H01.mk_eq_zero_iff] at hξ - obtain ⟨u, hu⟩ := hξ - set s := (RS.Dolb.exists_smoothSplitting 𝒰 F).some with hs_def - have hform : RS.Dolb.dolbForm h𝒰 F = (s.glueData h𝒰).form := rfl - rw [hform] at hu - have hIsDbarOn_u : ∀ i, IsDbarOn (⇑u) (s.glueData h𝒰).form (𝒰.U i : Set X) := fun i x _ => by - have h1 := RS.isDbarOn_dbar u x trivial - rwa [hu] at h1 + have hzero : H01.mk (RS.Dolb.dolbForm h𝒰 F) = 0 := + (cechToH01_toH1 h𝒰 (H1Cover.mk (0 : RS.Divisor X) 𝒰 F)).symm.trans + ((congrArg (cechToH01 (X := X)) hf).trans hξ) + obtain ⟨u, hu⟩ := H01.mk_eq_zero_iff.1 hzero + let s := (RS.Dolb.exists_smoothSplitting 𝒰 F).some + have hIsDbarOn_u : ∀ i, IsDbarOn (⇑u) (s.glueData h𝒰).form (𝒰.U i : Set X) := + fun i x _ => (congrArg (fun η => IsDbarAt (⇑u) η x) hu).mp + (RS.isDbarOn_dbar u x trivial) have hCMu : ContMDiffOn 𝓘(ℝ, ℂ) 𝓘(ℝ, ℂ) ∞ (⇑u) (Set.univ : Set X) := u.contMDiff.contMDiffOn have hholo : ∀ i, ContMDiffOn 𝓘(ℂ) 𝓘(ℂ) ω (s.g i - ⇑u) (𝒰.U i : Set X) := fun i => RS.contMDiffOn_omega_sub_of_isDbarOn (𝒰.U i).isOpen (s.smoothOn i) (hCMu.mono (Set.subset_univ _)) ((s.glueData h𝒰).isDbarOn_form i) (hIsDbarOn_u i) have hmero : ∀ i, MeromorphicOnX (s.g i - ⇑u) (𝒰.U i : Set X) := fun i => RS.meromorphicOnX_of_contMDiffOn_omega (𝒰.U i).isOpen (hholo i) - set b : C0 (0 : RS.Divisor X) 𝒰 := fun i => + let b : C0 (0 : RS.Divisor X) 𝒰 := fun i => (⟨RS.MeroGermOn.mk (s.g i - ⇑u) (hmero i), RS.mk_mem_linSysOn_zero (𝒰.U i).isOpen (hholo i)⟩ : - RS.LinSysOn (0 : RS.Divisor X) (𝒰.U i : Set X)) with hb_def + RS.LinSysOn (0 : RS.Divisor X) (𝒰.U i : Set X)) have hd0b : d0 (0 : RS.Divisor X) 𝒰 b = (F : C1 (0 : RS.Divisor X) 𝒰) := by funext p obtain ⟨i, j⟩ := p @@ -267,12 +256,6 @@ theorem cechToH01_injective [T2Space X] [CompactSpace X] : -- the application ill-typed at `implicit` transparency, which blocks every later rewrite have hj : (↑(𝒰.U i ⊓ 𝒰.U j) : Set X) ⊆ ↑(𝒰.U j) := fun _ hx => hx.2 have hi : (↑(𝒰.U i ⊓ 𝒰.U j) : Set X) ⊆ ↑(𝒰.U i) := fun _ hx => hx.1 - change (RS.MeroGermOn.restrict hj - (b j : RS.MeroGermOn X (𝒰.U j : Set X)) - - RS.MeroGermOn.restrict hi - (b i : RS.MeroGermOn X (𝒰.U i : Set X)) : - RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j : Set X)) = - ((F : C1 (0 : RS.Divisor X) 𝒰) (i, j) : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j : Set X)) change (RS.MeroGermOn.restrict hj (RS.MeroGermOn.mk (s.g j - ⇑u) (hmero j)) - RS.MeroGermOn.restrict hi @@ -289,11 +272,12 @@ theorem cechToH01_injective [T2Space X] [CompactSpace X] : change (s.g j y - u y) - (s.g i y - u y) = RS.Dolb.Z1.repr F (i, j) y rw [s.split i j y hy] - ring + abel have hFB1 : (F : C1 (0 : RS.Divisor X) 𝒰) ∈ B1 (0 : RS.Divisor X) 𝒰 := ⟨b, hd0b⟩ have hFmk0 : H1Cover.mk (0 : RS.Divisor X) 𝒰 F = 0 := (H1Cover.mk_eq_zero_iff (0 : RS.Divisor X) 𝒰 F).2 hFB1 - rw [← hf, hFmk0, map_zero] + exact hf.symm.trans ((congrArg (toH1 (0 : RS.Divisor X) 𝒰) hFmk0).trans + (toH1 (0 : RS.Divisor X) 𝒰).map_zero) /-! ### Surjectivity -/ @@ -315,10 +299,10 @@ theorem cechToH01_surjective [T2Space X] [CompactSpace X] : (fun x hx => hDbar j x hx.2) (fun x hx => hDbar i x hx.1) have hmero : ∀ i j, MeromorphicOnX (h j - h i) (𝒰.U i ⊓ 𝒰.U j : Set X) := fun i j => RS.meromorphicOnX_of_contMDiffOn_omega (𝒰.U i ⊓ 𝒰.U j).isOpen (hholoDiff i j) - set F : C1 (0 : RS.Divisor X) 𝒰 := fun p => + let F : C1 (0 : RS.Divisor X) 𝒰 := fun p => (⟨RS.MeroGermOn.mk (h p.2 - h p.1) (hmero p.1 p.2), RS.mk_mem_linSysOn_zero (𝒰.U p.1 ⊓ 𝒰.U p.2).isOpen (hholoDiff p.1 p.2)⟩ : - RS.LinSysOn (0 : RS.Divisor X) (𝒰.U p.1 ⊓ 𝒰.U p.2 : Set X)) with hF_def + RS.LinSysOn (0 : RS.Divisor X) (𝒰.U p.1 ⊓ 𝒰.U p.2 : Set X)) have hFZ1 : F ∈ Z1 (0 : RS.Divisor X) 𝒰 := by rw [mem_Z1_iff] rintro ⟨i, j, k⟩ @@ -329,13 +313,6 @@ theorem cechToH01_surjective [T2Space X] [CompactSpace X] : have hik : (↑(𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k) : Set X) ⊆ ↑(𝒰.U i ⊓ 𝒰.U k) := fun _ hx => ⟨hx.1.1, hx.2⟩ have hij : (↑(𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k) : Set X) ⊆ ↑(𝒰.U i ⊓ 𝒰.U j) := fun _ hx => hx.1 - change (RS.MeroGermOn.restrict hjk - (F (j, k) : RS.MeroGermOn X (𝒰.U j ⊓ 𝒰.U k : Set X)) - - RS.MeroGermOn.restrict hik - (F (i, k) : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U k : Set X)) + - RS.MeroGermOn.restrict hij - (F (i, j) : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j : Set X)) : - RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k : Set X)) = 0 change (RS.MeroGermOn.restrict hjk (RS.MeroGermOn.mk (h k - h j) (hmero j k)) - RS.MeroGermOn.restrict hik @@ -351,8 +328,8 @@ theorem cechToH01_surjective [T2Space X] [CompactSpace X] : refine Filter.mem_of_superset (Filter.self_mem_codiscreteWithin _) ?_ intro y _ change (h k y - h j y) - (h k y - h i y) + (h j y - h i y) = 0 - ring - set FZ1 : Z1 (0 : RS.Divisor X) 𝒰 := ⟨F, hFZ1⟩ with hFZ1_def + abel + let FZ1 : Z1 (0 : RS.Divisor X) 𝒰 := ⟨F, hFZ1⟩ have hsplit : ∀ i j, ∀ x ∈ (𝒰.U i ⊓ 𝒰.U j : Opens X), RS.Dolb.Z1.repr FZ1 (i, j) x = h j x - h i x := by intro i j x hx @@ -363,14 +340,16 @@ theorem cechToH01_surjective [T2Space X] [CompactSpace X] : have hCMAt : ContMDiffAt 𝓘(ℂ) 𝓘(ℂ) ω (h j - h i) x := (hholoDiff i j).contMDiffAt ((𝒰.U i ⊓ 𝒰.U j).isOpen.mem_nhds hx) exact RS.MeroGermOn.evalAt_mk_of_contMDiffAt (𝒰.U i ⊓ 𝒰.U j).isOpen hx hCMAt - set s : RS.Dolb.SmoothSplitting 𝒰 FZ1 := ⟨h, hCM, hsplit⟩ with hs_def + let s : RS.Dolb.SmoothSplitting 𝒰 FZ1 := ⟨h, hCM, hsplit⟩ have hIsDbarZero : ∀ i, IsDbarOn (h i) η (𝒰.U i : Set X) := hDbar have hformEq : (s.glueData h𝒰).form = η := (RS.DbarGlueData.form_unique (s.glueData h𝒰) hIsDbarZero).symm refine ⟨toH1 (0 : RS.Divisor X) 𝒰 (H1Cover.mk (0 : RS.Divisor X) 𝒰 FZ1), ?_⟩ - rw [cechToH01_toH1 h𝒰, toDolb_mk, ← hformEq, ← sub_eq_zero, ← map_sub] - exact H01.mk_eq_zero_iff.2 (LinearMap.mem_range.mp - (RS.Dolb.sub_mem_range_dbar_of_splittings h𝒰 (RS.Dolb.exists_smoothSplitting 𝒰 FZ1).some s)) + have heq : H01.mk (RS.Dolb.dolbForm h𝒰 FZ1) = H01.mk (s.glueData h𝒰).form := + H01.mk_eq_mk_iff.2 (LinearMap.mem_range.mp + (RS.Dolb.sub_mem_range_dbar_of_splittings h𝒰 (RS.Dolb.exists_smoothSplitting 𝒰 FZ1).some s)) + exact (cechToH01_toH1 h𝒰 (H1Cover.mk (0 : RS.Divisor X) 𝒰 FZ1)).trans + (heq.trans (congrArg H01.mk hformEq)) /-! ### Assembly -/ diff --git a/LeanPool/JacobianDiffgeo/DolbeaultComparison/GlueForm01.lean b/LeanPool/JacobianDiffgeo/DolbeaultComparison/GlueForm01.lean index b503944955..7a4803645a 100644 --- a/LeanPool/JacobianDiffgeo/DolbeaultComparison/GlueForm01.lean +++ b/LeanPool/JacobianDiffgeo/DolbeaultComparison/GlueForm01.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Dbar.Operator +public import LeanPool.JacobianDiffgeo.Dbar.Operator +import LeanPool.JacobianDiffgeo.Forms.Analyticity +import LeanPool.JacobianDiffgeo.Surface.Bridges +import LeanPool.JacobianDiffgeo.Surface.RealSmooth +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # `DbarGlueData`: the Mittag-Leffler-style gluing atom @@ -21,6 +27,8 @@ chart-subordinate cover determine a UNIQUE global `Form01` solving `dbaru_i = ω * `DbarGlueData.isDbarOn_form`, `DbarGlueData.form_unique`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set IsManifold TopologicalSpace diff --git a/LeanPool/JacobianDiffgeo/DolbeaultComparison/Leray.lean b/LeanPool/JacobianDiffgeo/DolbeaultComparison/Leray.lean index 4955ab501f..e9d1c95af3 100644 --- a/LeanPool/JacobianDiffgeo/DolbeaultComparison/Leray.lean +++ b/LeanPool/JacobianDiffgeo/DolbeaultComparison/Leray.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Cech.Injectivity +public import LeanPool.JacobianDiffgeo.Cech.Colimit +public import LeanPool.JacobianDiffgeo.Cech.Injectivity import LeanPool.JacobianDiffgeo.Dbar.DiskAcyclic import LeanPool.JacobianDiffgeo.Meromorphic.Gluing +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Leray's theorem and the cocycle-trade lemma (`Jacobian/DolbeaultComparison/Leray.lean`) @@ -26,6 +30,8 @@ under this unit's authorization) as black boxes — no `Form01`, no PoU, no dbar injectivity is cech's `toH1_injective`, ALREADY on disk) / `h1CoverEquiv`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace RS.Cech @@ -96,54 +102,12 @@ theorem indCocycle_mem_Z1 (i : Fin 𝒰.n) {f : C1 D 𝒱} (hf : f ∈ Z1 D 𝒱 have hW : (𝒱.induced (𝒰.U i)).U α ⊓ (𝒱.induced (𝒰.U i)).U β ⊓ (𝒱.induced (𝒰.U i)).U γ ≤ 𝒱.U α ⊓ 𝒱.U β ⊓ 𝒱.U γ := le_inf hαβ (inf_le_right.trans inf_le_right) have key := Z1.rel_res D hf α β γ hW hβγ hαγ hαβ - have hkey : (RS.MeroGermOn.restrict hβγ (f (β, γ) : RS.MeroGermOn X (𝒱.U β ⊓ 𝒱.U γ : Set X)) - - RS.MeroGermOn.restrict hαγ (f (α, γ) : RS.MeroGermOn X (𝒱.U α ⊓ 𝒱.U γ : Set X)) + - RS.MeroGermOn.restrict hαβ (f (α, β) : RS.MeroGermOn X (𝒱.U α ⊓ 𝒱.U β : Set X)) : - RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α ⊓ (𝒱.induced (𝒰.U i)).U β ⊓ - (𝒱.induced (𝒰.U i)).U γ : Set X)) = 0 := by - have hcast := congrArg Subtype.val key - exact hcast - apply Subtype.ext - rw [d1_apply] - change (RS.MeroGermOn.restrict hβγ𝒱ᵢ - (indCocycle D i f (β, γ) : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U β ⊓ - (𝒱.induced (𝒰.U i)).U γ : Set X)) - - RS.MeroGermOn.restrict hαγ𝒱ᵢ - (indCocycle D i f (α, γ) : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α ⊓ - (𝒱.induced (𝒰.U i)).U γ : Set X)) + - RS.MeroGermOn.restrict hαβ𝒱ᵢ - (indCocycle D i f (α, β) : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α ⊓ - (𝒱.induced (𝒰.U i)).U β : Set X)) : - RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α ⊓ (𝒱.induced (𝒰.U i)).U β ⊓ - (𝒱.induced (𝒰.U i)).U γ : Set X)) = 0 - change (RS.MeroGermOn.restrict hβγ𝒱ᵢ - (RS.MeroGermOn.restrict (inf_inf_inf_le (𝒰.U i) (𝒱.U β) (𝒱.U γ)) - (f (β, γ) : RS.MeroGermOn X (𝒱.U β ⊓ 𝒱.U γ : Set X))) - - RS.MeroGermOn.restrict hαγ𝒱ᵢ - (RS.MeroGermOn.restrict (inf_inf_inf_le (𝒰.U i) (𝒱.U α) (𝒱.U γ)) - (f (α, γ) : RS.MeroGermOn X (𝒱.U α ⊓ 𝒱.U γ : Set X))) + - RS.MeroGermOn.restrict hαβ𝒱ᵢ - (RS.MeroGermOn.restrict (inf_inf_inf_le (𝒰.U i) (𝒱.U α) (𝒱.U β)) - (f (α, β) : RS.MeroGermOn X (𝒱.U α ⊓ 𝒱.U β : Set X))) : - RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α ⊓ (𝒱.induced (𝒰.U i)).U β ⊓ - (𝒱.induced (𝒰.U i)).U γ : Set X)) = 0 - have e1 : (RS.MeroGermOn.restrict hβγ𝒱ᵢ - (RS.MeroGermOn.restrict (inf_inf_inf_le (𝒰.U i) (𝒱.U β) (𝒱.U γ)) - (f (β, γ) : RS.MeroGermOn X (𝒱.U β ⊓ 𝒱.U γ : Set X)))) = - RS.MeroGermOn.restrict hβγ (f (β, γ) : RS.MeroGermOn X (𝒱.U β ⊓ 𝒱.U γ : Set X)) := - RS.MeroGermOn.restrict_restrict (inf_inf_inf_le (𝒰.U i) (𝒱.U β) (𝒱.U γ)) hβγ𝒱ᵢ _ - have e2 : (RS.MeroGermOn.restrict hαγ𝒱ᵢ - (RS.MeroGermOn.restrict (inf_inf_inf_le (𝒰.U i) (𝒱.U α) (𝒱.U γ)) - (f (α, γ) : RS.MeroGermOn X (𝒱.U α ⊓ 𝒱.U γ : Set X)))) = - RS.MeroGermOn.restrict hαγ (f (α, γ) : RS.MeroGermOn X (𝒱.U α ⊓ 𝒱.U γ : Set X)) := - RS.MeroGermOn.restrict_restrict (inf_inf_inf_le (𝒰.U i) (𝒱.U α) (𝒱.U γ)) hαγ𝒱ᵢ _ - have e3 : (RS.MeroGermOn.restrict hαβ𝒱ᵢ - (RS.MeroGermOn.restrict (inf_inf_inf_le (𝒰.U i) (𝒱.U α) (𝒱.U β)) - (f (α, β) : RS.MeroGermOn X (𝒱.U α ⊓ 𝒱.U β : Set X)))) = - RS.MeroGermOn.restrict hαβ (f (α, β) : RS.MeroGermOn X (𝒱.U α ⊓ 𝒱.U β : Set X)) := - RS.MeroGermOn.restrict_restrict (inf_inf_inf_le (𝒰.U i) (𝒱.U α) (𝒱.U β)) hαβ𝒱ᵢ _ - rw [e1, e2, e3] - exact hkey + refine Eq.trans ?_ key + exact congrArg₂ (· + ·) + (congrArg₂ (· - ·) + (restrictL_restrictL D _ hβγ𝒱ᵢ hβγ _) + (restrictL_restrictL D _ hαγ𝒱ᵢ hαγ _)) + (restrictL_restrictL D _ hαβ𝒱ᵢ hαβ _) /-! ### §5 step 2: member splitting via disk acyclicity -/ @@ -171,10 +135,7 @@ theorem splitting_eq {f : C1 D 𝒱} {gFam : ∀ i : Fin 𝒰.n, C0 D (𝒱.indu LinSysOn.restrictL D (inf_le_left : (𝒱.induced (𝒰.U i)).U α ⊓ (𝒱.induced (𝒰.U i)).U β ≤ (𝒱.induced (𝒰.U i)).U α) (gFam i α) = - indCocycle D i f (α, β) := by - have hd := congrFun (hgFam i) (α, β) - rw [d0_apply] at hd - exact hd + indCocycle D i f (α, β) := congrFun (hgFam i) (α, β) omit [T2Space X] [CompactSpace X] [IsManifold 𝓘(ℂ, ℂ) ω X] in /-- Raw `MeroGermOn`-level form of `splitting_eq`. -/ @@ -208,27 +169,11 @@ theorem splitting_eq_restrict {f : C1 D 𝒱} {gFam : ∀ i : Fin 𝒰.n, C0 D ( have hWαβ' : W ≤ (𝒱.induced (𝒰.U i)).U α ⊓ (𝒱.induced (𝒰.U i)).U β := le_inf hWα hWβ have hcast := congrArg (RS.MeroGermOn.restrict hWαβ') (splitting_eq' D hgFam i α β) rw [map_sub] at hcast - have e1 : (RS.MeroGermOn.restrict hWαβ' - (RS.MeroGermOn.restrict - (inf_le_right : (𝒱.induced (𝒰.U i)).U α ⊓ (𝒱.induced (𝒰.U i)).U β ≤ - (𝒱.induced (𝒰.U i)).U β) - (gFam i β : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U β : Set X)))) = - RS.MeroGermOn.restrict hWβ (gFam i β : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U β : Set X)) := - RS.MeroGermOn.restrict_restrict inf_le_right hWαβ' _ - have e2 : (RS.MeroGermOn.restrict hWαβ' - (RS.MeroGermOn.restrict - (inf_le_left : (𝒱.induced (𝒰.U i)).U α ⊓ (𝒱.induced (𝒰.U i)).U β ≤ - (𝒱.induced (𝒰.U i)).U α) - (gFam i α : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α : Set X)))) = - RS.MeroGermOn.restrict hWα (gFam i α : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α : Set X)) := - RS.MeroGermOn.restrict_restrict inf_le_left hWαβ' _ - have e3 : (RS.MeroGermOn.restrict hWαβ' - (RS.MeroGermOn.restrict (inf_inf_inf_le (𝒰.U i) (𝒱.U α) (𝒱.U β)) - (f (α, β) : RS.MeroGermOn X (𝒱.U α ⊓ 𝒱.U β : Set X)))) = - RS.MeroGermOn.restrict hWαβ (f (α, β) : RS.MeroGermOn X (𝒱.U α ⊓ 𝒱.U β : Set X)) := - RS.MeroGermOn.restrict_restrict (inf_inf_inf_le (𝒰.U i) (𝒱.U α) (𝒱.U β)) hWαβ' _ - rw [e1, e2, e3] at hcast - exact hcast + exact (congrArg₂ (· - ·) + (RS.MeroGermOn.restrict_restrict inf_le_right hWαβ' _).symm + (RS.MeroGermOn.restrict_restrict inf_le_left hWαβ' _).symm).trans + (hcast.trans (RS.MeroGermOn.restrict_restrict (inf_inf_inf_le (𝒰.U i) (𝒱.U α) (𝒱.U β)) + hWαβ' _)) /-! ### §5 step 3: cross-glue -/ @@ -255,6 +200,22 @@ theorem patch_coe (gFam : ∀ i : Fin 𝒰.n, C0 D (𝒱.induced (𝒰.U i))) (i 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α ≤ (𝒱.induced (𝒰.U i)).U α) (gFam i α : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α : Set X))) := rfl +omit [IsManifold 𝓘(ℂ, ℂ) ω X] [T2Space X] [CompactSpace X] in +/-- `patch`, restricted further down to an arbitrary open `W` (`LinSysOn`-level unfolding of +`patch_coe`, reused for both step 4's triple relation and step 5's final comparison). -/ +theorem patch_restrict (gFam : ∀ i : Fin 𝒰.n, C0 D (𝒱.induced (𝒰.U i))) (i j : Fin 𝒰.n) + (α : Fin 𝒱.n) {W : Opens X} (hWj : W ≤ (𝒱.induced (𝒰.U j)).U α) + (hWi : W ≤ (𝒱.induced (𝒰.U i)).U α) (hWij : W ≤ 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α) : + RS.MeroGermOn.restrict hWij + (patch D gFam i j α : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α : Set X)) = + RS.MeroGermOn.restrict hWj + (gFam j α : RS.MeroGermOn X ((𝒱.induced (𝒰.U j)).U α : Set X)) - + RS.MeroGermOn.restrict hWi + (gFam i α : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α : Set X)) := by + exact (map_sub (RS.MeroGermOn.restrict hWij) _ _).trans + (congrArg₂ (· - ·) (RS.MeroGermOn.restrict_restrict _ hWij _) + (RS.MeroGermOn.restrict_restrict _ hWij _)) + omit [T2Space X] [CompactSpace X] [IsManifold 𝓘(ℂ, ℂ) ω X] in /-- Compatibility of the patches on overlaps (§5 step 3). -/ theorem patch_compat {f : C1 D 𝒱} {gFam : ∀ i : Fin 𝒰.n, C0 D (𝒱.induced (𝒰.U i))} @@ -280,60 +241,10 @@ theorem patch_compat {f : C1 D 𝒱} {gFam : ∀ i : Fin 𝒰.n, C0 D (𝒱.indu le_inf (hWα.trans inf_le_right) (hWβ.trans inf_le_right) have hj := splitting_eq_restrict D hgFam j α β hWαj hWβj hWαβ𝒱 have hi := splitting_eq_restrict D hgFam i α β hWαi hWβi hWαβ𝒱 - have hcompute : RS.MeroGermOn.restrict hWα - (patch D gFam i j α : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α : Set X)) - - RS.MeroGermOn.restrict hWβ - (patch D gFam i j β : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U β : Set X)) = - (RS.MeroGermOn.restrict hWαj - (gFam j α : RS.MeroGermOn X ((𝒱.induced (𝒰.U j)).U α : Set X)) - - RS.MeroGermOn.restrict hWβj - (gFam j β : RS.MeroGermOn X ((𝒱.induced (𝒰.U j)).U β : Set X))) - - (RS.MeroGermOn.restrict hWαi - (gFam i α : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α : Set X)) - - RS.MeroGermOn.restrict hWβi - (gFam i β : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U β : Set X))) := by - rw [patch_coe, patch_coe, map_sub, map_sub] - have e1 : (RS.MeroGermOn.restrict hWα - (RS.MeroGermOn.restrict - (le_inf (inf_le_left.trans inf_le_right) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α ≤ (𝒱.induced (𝒰.U j)).U α) - (gFam j α : RS.MeroGermOn X ((𝒱.induced (𝒰.U j)).U α : Set X)))) = - RS.MeroGermOn.restrict hWαj (gFam j α : RS.MeroGermOn X ((𝒱.induced (𝒰.U j)).U α : Set X)) - := - RS.MeroGermOn.restrict_restrict _ hWα _ - have e2 : (RS.MeroGermOn.restrict hWα - (RS.MeroGermOn.restrict - (le_inf (inf_le_left.trans inf_le_left) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α ≤ (𝒱.induced (𝒰.U i)).U α) - (gFam i α : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α : Set X)))) = - RS.MeroGermOn.restrict hWαi (gFam i α : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α : Set X)) - := - RS.MeroGermOn.restrict_restrict _ hWα _ - have e3 : (RS.MeroGermOn.restrict hWβ - (RS.MeroGermOn.restrict - (le_inf (inf_le_left.trans inf_le_right) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U β ≤ (𝒱.induced (𝒰.U j)).U β) - (gFam j β : RS.MeroGermOn X ((𝒱.induced (𝒰.U j)).U β : Set X)))) = - RS.MeroGermOn.restrict hWβj (gFam j β : RS.MeroGermOn X ((𝒱.induced (𝒰.U j)).U β : Set X)) - := - RS.MeroGermOn.restrict_restrict _ hWβ _ - have e4 : (RS.MeroGermOn.restrict hWβ - (RS.MeroGermOn.restrict - (le_inf (inf_le_left.trans inf_le_left) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U β ≤ (𝒱.induced (𝒰.U i)).U β) - (gFam i β : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U β : Set X)))) = - RS.MeroGermOn.restrict hWβi (gFam i β : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U β : Set X)) - := - RS.MeroGermOn.restrict_restrict _ hWβ _ - rw [e1, e2, e3, e4] - abel - have hfinal : RS.MeroGermOn.restrict hWα - (patch D gFam i j α : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α : Set X)) - - RS.MeroGermOn.restrict hWβ - (patch D gFam i j β : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U β : Set X)) = 0 := by - rw [hcompute] - linear_combination hi - hj - exact sub_eq_zero.mp hfinal + rw [patch_restrict D gFam i j α hWαj hWαi hWα, + patch_restrict D gFam i j β hWβj hWβi hWβ] + apply sub_eq_sub_iff_sub_eq_sub.2 + simpa only [neg_sub] using congrArg Neg.neg (hj.trans hi.symm) omit [T2Space X] [CompactSpace X] in /-- The glued section `F_{ij}` on `𝒰.U i ⊓ 𝒰.U j`, restricting back to `patch` on each @@ -390,30 +301,6 @@ theorem exists_crossGlueLinSysOn {f : C1 D 𝒱} (hf : f ∈ Z1 D 𝒱) rw [restrictL_apply_coe] exact hΨ α -omit [IsManifold 𝓘(ℂ, ℂ) ω X] [T2Space X] [CompactSpace X] in -/-- `patch`, restricted further down to an arbitrary open `W` (`LinSysOn`-level unfolding of -`patch_coe`, reused for both step 4's triple relation and step 5's final comparison). -/ -theorem patch_restrict (gFam : ∀ i : Fin 𝒰.n, C0 D (𝒱.induced (𝒰.U i))) (i j : Fin 𝒰.n) - (α : Fin 𝒱.n) {W : Opens X} (hWj : W ≤ (𝒱.induced (𝒰.U j)).U α) - (hWi : W ≤ (𝒱.induced (𝒰.U i)).U α) (hWij : W ≤ 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α) : - RS.MeroGermOn.restrict hWij - (patch D gFam i j α : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α : Set X)) = - RS.MeroGermOn.restrict hWj - (gFam j α : RS.MeroGermOn X ((𝒱.induced (𝒰.U j)).U α : Set X)) - - RS.MeroGermOn.restrict hWi - (gFam i α : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α : Set X)) := by - rw [patch_coe, map_sub] - have e1 := RS.MeroGermOn.restrict_restrict - (le_inf (inf_le_left.trans inf_le_right) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α ≤ (𝒱.induced (𝒰.U j)).U α) hWij - (gFam j α : RS.MeroGermOn X ((𝒱.induced (𝒰.U j)).U α : Set X)) - have e2 := RS.MeroGermOn.restrict_restrict - (le_inf (inf_le_left.trans inf_le_left) inf_le_right : - 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α ≤ (𝒱.induced (𝒰.U i)).U α) hWij - (gFam i α : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α : Set X)) - rw [e1, e2] - rfl - omit [T2Space X] [CompactSpace X] in /-- The glued sections `F_{ij}`, packaged as a full `1`-cochain on `𝒰` (§5 step 3, `LinSysOn` level): a choice of `crossGlue`-witness for every pair. -/ @@ -427,6 +314,25 @@ theorem exists_crossGlueFam {f : C1 D 𝒱} (hf : f ∈ Z1 D 𝒱) exists_crossGlueLinSysOn D hf hgFam p.1 p.2 exact ⟨Φ, fun i j α => hΦ (i, j) α⟩ +omit [T2Space X] [CompactSpace X] [IsManifold 𝓘(ℂ, ℂ) ω X] in +private theorem crossGlueFam_restrict {F : C1 D 𝒰} + {gFam : ∀ i : Fin 𝒰.n, C0 D (𝒱.induced (𝒰.U i))} + (hF : ∀ (i j : Fin 𝒰.n) (α : Fin 𝒱.n), + LinSysOn.restrictL D (inf_le_left : 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α ≤ 𝒰.U i ⊓ 𝒰.U j) (F (i, j)) = + patch D gFam i j α) + (i j : Fin 𝒰.n) (α : Fin 𝒱.n) {W : Opens X} + (hWj : W ≤ (𝒱.induced (𝒰.U j)).U α) (hWi : W ≤ (𝒱.induced (𝒰.U i)).U α) + (hWij : W ≤ 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α) : + RS.MeroGermOn.restrict (hWij.trans inf_le_left) + (F (i, j) : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j : Set X)) = + RS.MeroGermOn.restrict hWj + (gFam j α : RS.MeroGermOn X ((𝒱.induced (𝒰.U j)).U α : Set X)) - + RS.MeroGermOn.restrict hWi + (gFam i α : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α : Set X)) := by + exact (RS.MeroGermOn.restrict_restrict inf_le_left hWij _).symm.trans + ((congrArg (RS.MeroGermOn.restrict hWij) (congrArg Subtype.val (hF i j α))).trans + (patch_restrict D gFam i j α hWj hWi hWij)) + /-! ### §5 step 4: `F ∈ Z1 D 𝒰` -/ omit [T2Space X] [CompactSpace X] in @@ -439,17 +345,16 @@ theorem crossGlueFam_mem_Z1 {F : C1 D 𝒰} {gFam : ∀ i : Fin 𝒰.n, C0 D ( F ∈ Z1 D 𝒰 := by rw [mem_Z1_iff] rintro ⟨i, j, k⟩ - set A : Opens X := 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k with hA_def - set W : Fin 𝒱.n → Set X := fun α => ((A ⊓ 𝒱.U α : Opens X) : Set X) with hW_def + let A : Opens X := 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒰.U k + let W : Fin 𝒱.n → Set X := fun α => ((A ⊓ 𝒱.U α : Opens X) : Set X) have hWopen : ∀ α, IsOpen (W α) := fun α => (A ⊓ 𝒱.U α).isOpen have hunion : (⋃ α, W α) = (A : Set X) := iUnion_inf_eq A le_top - set e := MeroGermOn.congrSet hunion.symm with he_def + let e := MeroGermOn.congrSet hunion.symm have hrewrite : ∀ (Z : RS.MeroGermOn X (A : Set X)) (α : Fin 𝒱.n), RS.MeroGermOn.restrict (Set.subset_iUnion W α) (e Z) = RS.MeroGermOn.restrict (inf_le_left : A ⊓ 𝒱.U α ≤ A) Z := by intro Z α - change RS.MeroGermOn.restrict (Set.subset_iUnion W α) (RS.MeroGermOn.restrict _ Z) = _ - rw [RS.MeroGermOn.restrict_restrict] + exact RS.MeroGermOn.restrict_restrict _ _ Z have hi : A ≤ 𝒰.U i := inf_le_left.trans inf_le_left have hj : A ≤ 𝒰.U j := inf_le_left.trans inf_le_right have hk : A ≤ 𝒰.U k := inf_le_right @@ -462,7 +367,7 @@ theorem crossGlueFam_mem_Z1 {F : C1 D 𝒰} {gFam : ∀ i : Fin 𝒰.n, C0 D ( RS.MeroGermOn.restrict (inf_le_left : A ⊓ 𝒱.U α ≤ A) ((0 : RS.LinSysOn D (A : Set X)) : RS.MeroGermOn X (A : Set X)) := by intro α - set Wα : Opens X := A ⊓ 𝒱.U α with hWα_def + let Wα : Opens X := A ⊓ 𝒱.U α have hWA : Wα ≤ A := inf_le_left have hWα' : Wα ≤ 𝒱.U α := inf_le_right have hWjk : Wα ≤ 𝒰.U j ⊓ 𝒰.U k := hWA.trans hjk @@ -474,56 +379,14 @@ theorem crossGlueFam_mem_Z1 {F : C1 D 𝒰} {gFam : ∀ i : Fin 𝒰.n, C0 D ( have hWjα : Wα ≤ (𝒱.induced (𝒰.U j)).U α := le_inf (hWA.trans hj) hWα' have hWiα : Wα ≤ (𝒱.induced (𝒰.U i)).U α := le_inf (hWA.trans hi) hWα' have hWkα : Wα ≤ (𝒱.induced (𝒰.U k)).U α := le_inf (hWA.trans hk) hWα' - have step_jk : - RS.MeroGermOn.restrict hWjk (F (j, k) : RS.MeroGermOn X (𝒰.U j ⊓ 𝒰.U k : Set X)) = - RS.MeroGermOn.restrict hWkα - (gFam k α : RS.MeroGermOn X ((𝒱.induced (𝒰.U k)).U α : Set X)) - - RS.MeroGermOn.restrict hWjα - (gFam j α : RS.MeroGermOn X ((𝒱.induced (𝒰.U j)).U α : Set X)) := by - have hF' := congrArg Subtype.val (hF j k α) - rw [restrictL_apply_coe] at hF' - have e1 := RS.MeroGermOn.restrict_restrict - (inf_le_left : 𝒰.U j ⊓ 𝒰.U k ⊓ 𝒱.U α ≤ 𝒰.U j ⊓ 𝒰.U k) hWjkα - (F (j, k) : RS.MeroGermOn X (𝒰.U j ⊓ 𝒰.U k : Set X)) - rw [hF'] at e1 - rw [← e1, patch_restrict D gFam j k α hWkα hWjα hWjkα] - have step_ik : - RS.MeroGermOn.restrict hWik (F (i, k) : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U k : Set X)) = - RS.MeroGermOn.restrict hWkα - (gFam k α : RS.MeroGermOn X ((𝒱.induced (𝒰.U k)).U α : Set X)) - - RS.MeroGermOn.restrict hWiα - (gFam i α : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α : Set X)) := by - have hF' := congrArg Subtype.val (hF i k α) - rw [restrictL_apply_coe] at hF' - have e1 := RS.MeroGermOn.restrict_restrict - (inf_le_left : 𝒰.U i ⊓ 𝒰.U k ⊓ 𝒱.U α ≤ 𝒰.U i ⊓ 𝒰.U k) hWikα - (F (i, k) : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U k : Set X)) - rw [hF'] at e1 - rw [← e1, patch_restrict D gFam i k α hWkα hWiα hWikα] - have step_ij : - RS.MeroGermOn.restrict hWij (F (i, j) : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j : Set X)) = - RS.MeroGermOn.restrict hWjα - (gFam j α : RS.MeroGermOn X ((𝒱.induced (𝒰.U j)).U α : Set X)) - - RS.MeroGermOn.restrict hWiα - (gFam i α : RS.MeroGermOn X ((𝒱.induced (𝒰.U i)).U α : Set X)) := by - have hF' := congrArg Subtype.val (hF i j α) - rw [restrictL_apply_coe] at hF' - have e1 := RS.MeroGermOn.restrict_restrict - (inf_le_left : 𝒰.U i ⊓ 𝒰.U j ⊓ 𝒱.U α ≤ 𝒰.U i ⊓ 𝒰.U j) hWijα - (F (i, j) : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j : Set X)) - rw [hF'] at e1 - rw [← e1, patch_restrict D gFam i j α hWjα hWiα hWijα] - rw [d1_apply] + have step_jk := crossGlueFam_restrict D hF j k α hWkα hWjα hWjkα + have step_ik := crossGlueFam_restrict D hF i k α hWkα hWiα hWikα + have step_ij := crossGlueFam_restrict D hF i j α hWjα hWiα hWijα change RS.MeroGermOn.restrict hWA - ((RS.MeroGermOn.restrict - (le_inf (inf_le_left.trans inf_le_right) inf_le_right : A ≤ 𝒰.U j ⊓ 𝒰.U k) - (F (j, k) : RS.MeroGermOn X (𝒰.U j ⊓ 𝒰.U k : Set X)) - - RS.MeroGermOn.restrict - (le_inf (inf_le_left.trans inf_le_left) inf_le_right : A ≤ 𝒰.U i ⊓ 𝒰.U k) - (F (i, k) : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U k : Set X)) + - RS.MeroGermOn.restrict (inf_le_left : A ≤ 𝒰.U i ⊓ 𝒰.U j) - (F (i, j) : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j : Set X)))) = - RS.MeroGermOn.restrict hWA (0 : RS.MeroGermOn X (A : Set X)) + (RS.MeroGermOn.restrict hjk (F (j, k) : RS.MeroGermOn X (𝒰.U j ⊓ 𝒰.U k : Set X)) - + RS.MeroGermOn.restrict hik (F (i, k) : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U k : Set X)) + + RS.MeroGermOn.restrict hij (F (i, j) : RS.MeroGermOn X (𝒰.U i ⊓ 𝒰.U j : Set X))) = + RS.MeroGermOn.restrict hWA 0 rw [map_add, map_sub] have g1 := RS.MeroGermOn.restrict_restrict (le_inf (inf_le_left.trans inf_le_right) inf_le_right : A ≤ 𝒰.U j ⊓ 𝒰.U k) hWA @@ -542,9 +405,7 @@ theorem crossGlueFam_mem_Z1 {F : C1 D 𝒰} {gFam : ∀ i : Fin 𝒰.n, C0 D ( intro α rw [hrewrite _ α, hrewrite _ α] exact hcore α - have hval := e.injective hglu - apply Subtype.ext - simpa using hval + exact Subtype.ext (e.injective hglu) /-! ### §5 step 5: the comparison on `𝒱` -/ @@ -567,7 +428,7 @@ theorem resC1_crossGlueFam_add_eq {f : C1 D 𝒱} (_hf : f ∈ Z1 D 𝒱) funext p obtain ⟨α, β⟩ := p apply Subtype.ext - set W : Opens X := 𝒱.U α ⊓ 𝒱.U β with hW_def + let W : Opens X := 𝒱.U α ⊓ 𝒱.U β have hWτα : W ≤ 𝒰.U (τ α) := inf_le_left.trans (hτ α) have hWτβ : W ≤ 𝒰.U (τ β) := inf_le_right.trans (hτ β) have hWα : W ≤ 𝒱.U α := inf_le_left @@ -583,14 +444,8 @@ theorem resC1_crossGlueFam_add_eq {f : C1 D 𝒱} (_hf : f ∈ Z1 D 𝒱) RS.MeroGermOn.restrict hWτβα (gFam (τ β) α : RS.MeroGermOn X ((𝒱.induced (𝒰.U (τ β))).U α : Set X)) - RS.MeroGermOn.restrict hWτα' - (gFam (τ α) α : RS.MeroGermOn X ((𝒱.induced (𝒰.U (τ α))).U α : Set X)) := by - have hF' := congrArg Subtype.val (hF (τ α) (τ β) α) - rw [restrictL_apply_coe] at hF' - have e1 := RS.MeroGermOn.restrict_restrict - (inf_le_left : 𝒰.U (τ α) ⊓ 𝒰.U (τ β) ⊓ 𝒱.U α ≤ 𝒰.U (τ α) ⊓ 𝒰.U (τ β)) hWijα - (F (τ α, τ β) : RS.MeroGermOn X (𝒰.U (τ α) ⊓ 𝒰.U (τ β) : Set X)) - rw [hF'] at e1 - rw [← e1, patch_restrict D gFam (τ α) (τ β) α hWτβα hWτα' hWijα] + (gFam (τ α) α : RS.MeroGermOn X ((𝒱.induced (𝒰.U (τ α))).U α : Set X)) := + crossGlueFam_restrict D hF (τ α) (τ β) α hWτβα hWτα' hWijα -- LHS term 2: `f (α, β)`, unfolded via `splitting_eq_restrict` at `i := τ β` have step2 : RS.MeroGermOn.restrict hWτβ' @@ -616,29 +471,9 @@ theorem resC1_crossGlueFam_add_eq {f : C1 D 𝒱} (_hf : f ∈ Z1 D 𝒱) have hα := RS.MeroGermOn.restrict_restrict (le_inf (hτ α) le_rfl : 𝒱.U α ≤ 𝒰.U (τ α) ⊓ 𝒱.U α) hWα (gFam (τ α) α : RS.MeroGermOn X ((𝒱.induced (𝒰.U (τ α))).U α : Set X)) - change RS.MeroGermOn.restrict hWβ - (RS.MeroGermOn.restrict (le_inf (hτ β) le_rfl : 𝒱.U β ≤ 𝒰.U (τ β) ⊓ 𝒱.U β) - (gFam (τ β) β : RS.MeroGermOn X ((𝒱.induced (𝒰.U (τ β))).U β : Set X))) - - RS.MeroGermOn.restrict hWα - (RS.MeroGermOn.restrict (le_inf (hτ α) le_rfl : 𝒱.U α ≤ 𝒰.U (τ α) ⊓ 𝒱.U α) - (gFam (τ α) α : RS.MeroGermOn X ((𝒱.induced (𝒰.U (τ α))).U α : Set X))) = - RS.MeroGermOn.restrict hWτβ' - (gFam (τ β) β : RS.MeroGermOn X ((𝒱.induced (𝒰.U (τ β))).U β : Set X)) - - RS.MeroGermOn.restrict hWτα' - (gFam (τ α) α : RS.MeroGermOn X ((𝒱.induced (𝒰.U (τ α))).U α : Set X)) - rw [hβ, hα] - rfl - change RS.MeroGermOn.restrict (inf_le_inf (hτ α) (hτ β)) - (F (τ α, τ β) : RS.MeroGermOn X (𝒰.U (τ α) ⊓ 𝒰.U (τ β) : Set X)) + - (f (α, β) : RS.MeroGermOn X (𝒱.U α ⊓ 𝒱.U β : Set X)) = - RS.MeroGermOn.restrict hWβ - ((tradeH0 D τ hτ gFam β : RS.LinSysOn D (𝒱.U β : Set X)) : - RS.MeroGermOn X (𝒱.U β : Set X)) - - RS.MeroGermOn.restrict hWα - ((tradeH0 D τ hτ gFam α : RS.LinSysOn D (𝒱.U α : Set X)) : - RS.MeroGermOn X (𝒱.U α : Set X)) - rw [step3] - linear_combination step1 - step2 + exact congrArg₂ (· - ·) hβ hα + exact ((congrArg₂ (· + ·) step1 step2.symm).trans + ((add_comm _ _).trans (sub_add_sub_cancel _ _ _))).trans step3.symm /-! ### §5 steps 6-7: `exists_trade`, Leray's theorem, `h1CoverEquiv` -/ @@ -654,16 +489,11 @@ theorem exists_trade (h𝒰 : 𝒰.IsGood) (τ : Fin 𝒱.n → Fin 𝒰.n) (hτ have hF₀mem : F₀ ∈ Z1 D 𝒰 := crossGlueFam_mem_Z1 D hF₀ have hadd := resC1_crossGlueFam_add_eq D τ hτ f.2 hgFam hF₀ refine ⟨-(⟨F₀, hF₀mem⟩ : Z1 D 𝒰), -(tradeH0 D τ hτ gFam), ?_⟩ - have hcoe : (resZ1 D τ hτ (-(⟨F₀, hF₀mem⟩ : Z1 D 𝒰)) : C1 D 𝒱) = -(resC1 D τ hτ F₀) := by - rw [resZ1_apply_coe] - change resC1 D τ hτ (-F₀) = -(resC1 D τ hτ F₀) - rw [map_neg] - rw [hcoe, map_neg] - have heq : resC1 D τ hτ F₀ = d0 D 𝒱 (tradeH0 D τ hτ gFam) - (f : C1 D 𝒱) := by - rw [eq_sub_iff_add_eq] - exact hadd - rw [heq] - abel + have hneg : -(resC1 D τ hτ F₀) = (f : C1 D 𝒱) - d0 D 𝒱 (tradeH0 D τ hτ gFam) := + neg_eq_iff_add_eq_zero.2 ((add_sub_assoc _ _ _).symm.trans (sub_eq_zero.mpr hadd)) + exact (map_neg (resC1 D τ hτ) F₀).trans + (hneg.trans ((sub_eq_add_neg _ _).trans + (congrArg ((f : C1 D 𝒱) + ·) (map_neg (d0 D 𝒱) _).symm))) /-- Forster 14.6(a) at `H1Cover`-level: the qualitative trade. -/ theorem resH1_surjective_of_isGood (h𝒰 : 𝒰.IsGood) (τ : Fin 𝒱.n → Fin 𝒰.n) @@ -671,12 +501,9 @@ theorem resH1_surjective_of_isGood (h𝒰 : 𝒰.IsGood) (τ : Fin 𝒱.n → Fi intro ξ obtain ⟨f, rfl⟩ := H1Cover.mk_surjective D 𝒱 ξ obtain ⟨F, g, hFg⟩ := exists_trade D h𝒰 τ hτ f - refine ⟨H1Cover.mk D 𝒰 F, ?_⟩ - rw [resH1_mk, ← sub_eq_zero, ← map_sub, H1Cover.mk_eq_zero_iff] - change (↑(resZ1 D τ hτ F) - ↑f : C1 D 𝒱) ∈ B1 D 𝒱 - rw [hFg] - simp only [add_sub_cancel_left] - exact ⟨g, rfl⟩ + refine ⟨H1Cover.mk D 𝒰 F, (resH1_mk D τ hτ F).trans ?_⟩ + apply (Submodule.Quotient.eq _).2 + exact ⟨g, (eq_sub_iff_add_eq).2 ((add_comm _ _).trans hFg.symm)⟩ /-- **LERAY** (Forster 12.8 surjectivity half; injectivity is cech's `toH1_injective`, already on disk). Discharges the interface recorded in cech's `Colimit.lean`. -/ @@ -685,13 +512,10 @@ theorem toH1_surjective_of_isGood (h𝒰 : 𝒰.IsGood) : Function.Surjective (t obtain ⟨𝒲, c, hc⟩ := exists_rep D ξ obtain ⟨c', hc'⟩ := resH1_surjective_of_isGood D h𝒰 (chosenRefIdx (le_meet_left 𝒰 𝒲)) (chosenRefIdx_spec (le_meet_left 𝒰 𝒲)) (resH1' D (le_meet_right 𝒰 𝒲) c) - refine ⟨c', ?_⟩ - have h1 := toH1_resH1 D (chosenRefIdx (le_meet_left 𝒰 𝒲)) - (chosenRefIdx_spec (le_meet_left 𝒰 𝒲)) c' - rw [hc'] at h1 - rw [toH1_resH1'] at h1 - rw [← h1] - exact hc + refine ⟨c', (toH1_resH1 D (chosenRefIdx (le_meet_left 𝒰 𝒲)) + (chosenRefIdx_spec (le_meet_left 𝒰 𝒲)) c').symm.trans ?_⟩ + exact (congrArg (toH1 D (FinCover.meet 𝒰 𝒲)) hc').trans + ((toH1_resH1' D (le_meet_right 𝒰 𝒲) c).trans hc) /-- Cover-level `H¹` computes the colimit on good covers — finiteness transfers dimensions through this. -/ diff --git a/LeanPool/JacobianDiffgeo/DolbeaultComparison/Splitting.lean b/LeanPool/JacobianDiffgeo/DolbeaultComparison/Splitting.lean index 1d044de617..633bdebd70 100644 --- a/LeanPool/JacobianDiffgeo/DolbeaultComparison/Splitting.lean +++ b/LeanPool/JacobianDiffgeo/DolbeaultComparison/Splitting.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.DolbeaultComparison.GlueForm01 -import LeanPool.JacobianDiffgeo.Cech.Refinement +public import LeanPool.JacobianDiffgeo.DolbeaultComparison.GlueForm01 +public import LeanPool.JacobianDiffgeo.Cech.Refinement +import LeanPool.JacobianDiffgeo.Surface.Bridges +import LeanPool.JacobianDiffgeo.Surface.RealSmooth +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # PoU splitting of a Čech `0`-cocycle (`Jacobian/DolbeaultComparison/Splitting.lean`) @@ -25,6 +30,8 @@ each splitting's PDE data as a `DbarGlueData` (via `GlueForm01.lean`), whose glu `dolbForm_mem_range_of_mem_B1`, `dolbForm_res_sub_mem`). -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace RS.Cech diff --git a/LeanPool/JacobianDiffgeo/Finiteness.lean b/LeanPool/JacobianDiffgeo/Finiteness.lean index 0dc3ed1869..d245c26313 100644 --- a/LeanPool/JacobianDiffgeo/Finiteness.lean +++ b/LeanPool/JacobianDiffgeo/Finiteness.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Finiteness.Schwartz -import LeanPool.JacobianDiffgeo.Finiteness.BddHolo -import LeanPool.JacobianDiffgeo.Finiteness.CompactRestrict -import LeanPool.JacobianDiffgeo.Finiteness.Chain -import LeanPool.JacobianDiffgeo.Finiteness.TradeBounded -import LeanPool.JacobianDiffgeo.Finiteness.H1Finite -import LeanPool.JacobianDiffgeo.Finiteness.Chi +public import LeanPool.JacobianDiffgeo.Finiteness.Schwartz +public import LeanPool.JacobianDiffgeo.Finiteness.BddHolo +public import LeanPool.JacobianDiffgeo.Finiteness.CompactRestrict +public import LeanPool.JacobianDiffgeo.Finiteness.Chain +public import LeanPool.JacobianDiffgeo.Finiteness.TradeBounded +public import LeanPool.JacobianDiffgeo.Finiteness.H1Finite +public import LeanPool.JacobianDiffgeo.Finiteness.Chi +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # finiteness-and-chi: `FiniteDimensional H¹(X, O_D)` via Schwartz/Montel (namespace @@ -80,3 +83,5 @@ forbidden tactic. Existence gate consumes); `l_mono`/`l_le_l_add_degree`/`h1_le_of_le`/`h1_le_h1_add_degree` (monotonicity corollaries). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/Finiteness/BddHolo.lean b/LeanPool/JacobianDiffgeo/Finiteness/BddHolo.lean index c5a913fb90..3f33946fba 100644 --- a/LeanPool/JacobianDiffgeo/Finiteness/BddHolo.lean +++ b/LeanPool/JacobianDiffgeo/Finiteness/BddHolo.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Meromorphic +public import Mathlib.Topology.ContinuousMap.Bounded.Normed +public import LeanPool.JacobianDiffgeo.Meromorphic.LinearSystem +import LeanPool.JacobianDiffgeo.Meromorphic.CodiscreteBridge import LeanPool.JacobianDiffgeo.Surface.Bridges -import Mathlib.Topology.Sets.Opens -import Mathlib.Topology.ContinuousMap.Bounded.Normed import Mathlib.Analysis.Complex.LocallyUniformLimit -import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Combinatorics.Matroid.Init +public import Mathlib.Geometry.Manifold.ContMDiff.Basic /-! # `BddHoloOn`: bounded-holomorphic Banach spaces, and the germ bridges (`finiteness-and-chi`) @@ -33,6 +35,8 @@ three named maps; the Banach files (`Chain.lean`, `CompactRestrict.lean`) never `MeroGermOn` internals directly, and the germ files never touch `→ᵇ` internals. -/ +@[expose] public section + open scoped ContDiff Manifold BoundedContinuousFunction open Set Filter Topology TopologicalSpace Metric diff --git a/LeanPool/JacobianDiffgeo/Finiteness/Chain.lean b/LeanPool/JacobianDiffgeo/Finiteness/Chain.lean index 2252a30834..453808b569 100644 --- a/LeanPool/JacobianDiffgeo/Finiteness/Chain.lean +++ b/LeanPool/JacobianDiffgeo/Finiteness/Chain.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Finiteness.CompactRestrict -import LeanPool.JacobianDiffgeo.Cech.Cochains +public import LeanPool.JacobianDiffgeo.Cech.Covers +public import LeanPool.JacobianDiffgeo.Finiteness.BddHolo +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `ShrinkChain`: Forster's four-level shrinking chain (`finiteness-and-chi`) @@ -47,6 +50,8 @@ not built here): the two `IsCompactOperator` assembly lemmas of design §4.4 Nothing here uses the forbidden tactic. -/ +@[expose] public section + open scoped ContDiff Manifold BoundedContinuousFunction open Set Filter Topology TopologicalSpace Metric RS.Cech @@ -273,9 +278,8 @@ noncomputable instance : NormedAddCommGroup (NZ1 T P) := (NZ1 T P).normedAddComm noncomputable instance : NormedSpace ℂ (NZ1 T P) := (NZ1 T P).normedSpace -theorem mem_NZ1_iff (f : NC1 T P) : f ∈ NZ1 T P ↔ ∀ t, d1NC T P f t = 0 := by - rw [NZ1, LinearMap.mem_ker] - exact ⟨fun h t => congrFun h t, fun h => funext h⟩ +theorem mem_NZ1_iff (f : NC1 T P) : f ∈ NZ1 T P ↔ ∀ t, d1NC T P f t = 0 := + funext_iff /-- **The cocycle-relation workhorse** (mirrors `Cech.Refinement`'s `Z1.rel_res`): any cocycle-relation triple, restricted to any smaller open `W` (via arbitrary — by proof @@ -284,13 +288,7 @@ theorem NZ1.rel_res {f : NC1 T P} (hf : f ∈ NZ1 T P) (a b c : Fin T.n) {W : Op (h : W ≤ P a ⊓ P b ⊓ P c) (hbc : W ≤ P b ⊓ P c) (hac : W ≤ P a ⊓ P c) (hab : W ≤ P a ⊓ P b) : restrictCLM hbc (f (b, c)) - restrictCLM hac (f (a, c)) + restrictCLM hab (f (a, b)) = 0 := by have hzero : d1NC T P f (a, b, c) = 0 := (mem_NZ1_iff T P f).1 hf (a, b, c) - rw [d1NC_apply] at hzero - have hcongr := congrArg (restrictCLM h) hzero - simp only [map_add, map_sub, map_zero] at hcongr - rw [restrictCLM_restrictCLM (le_inf (inf_le_left.trans inf_le_right) inf_le_right) h hbc, - restrictCLM_restrictCLM (le_inf (inf_le_left.trans inf_le_left) inf_le_right) h hac, - restrictCLM_restrictCLM inf_le_left h hab] at hcongr - exact hcongr + exact congrArg (restrictCLM h) hzero /-- Restriction of `0`-cochains along a same-index shrinking `P' ≤ P`. -/ noncomputable def resNC0 (h : ∀ i, P' i ≤ P i) : NC0 T P →L[ℂ] NC0 T P' := @@ -308,20 +306,13 @@ noncomputable def resNC1 (h : ∀ i, P' i ≤ P i) : NC1 T P →L[ℂ] NC1 T P' `NZ1.rel_res` workhorse — mirrors `Cech.Refinement`'s `resC1_mem_Z1`). -/ theorem resNC1_mapsTo_NZ1 (h : ∀ i, P' i ≤ P i) {f : NC1 T P} (hf : f ∈ NZ1 T P) : resNC1 T P P' h f ∈ NZ1 T P' := by - rw [mem_NZ1_iff] + apply (mem_NZ1_iff T P' _).2 rintro ⟨k, l, m⟩ - rw [d1NC_apply, resNC1_apply, resNC1_apply, resNC1_apply] have hkh : P' k ⊓ P' l ⊓ P' m ≤ P (k) := (inf_le_left.trans inf_le_left).trans (h k) have hlh : P' k ⊓ P' l ⊓ P' m ≤ P l := (inf_le_left.trans inf_le_right).trans (h l) have hmh : P' k ⊓ P' l ⊓ P' m ≤ P m := inf_le_right.trans (h m) - have key := NZ1.rel_res T P hf k l m + exact NZ1.rel_res T P hf k l m (le_inf (le_inf hkh hlh) hmh) (le_inf hlh hmh) (le_inf hkh hmh) (le_inf hkh hlh) - rw [restrictCLM_restrictCLM (inf_le_inf (h l) (h m)) - (le_inf (inf_le_left.trans inf_le_right) inf_le_right) (le_inf hlh hmh), - restrictCLM_restrictCLM (inf_le_inf (h k) (h m)) - (le_inf (inf_le_left.trans inf_le_left) inf_le_right) (le_inf hkh hmh), - restrictCLM_restrictCLM (inf_le_inf (h k) (h l)) inf_le_left (le_inf hkh hlh)] - exact key /-- Restriction of bounded cocycles between same-index levels. -/ noncomputable def resZ (h : ∀ i, P' i ≤ P i) : NZ1 T P →L[ℂ] NZ1 T P' := @@ -360,9 +351,8 @@ noncomputable def tradeSpace : (tradeDefect T).ker theorem mem_tradeSpace_iff (x : NZ1 T T.U × NZ1 T T.V × NC0 T T.W) : - x ∈ tradeSpace T ↔ ∀ p : Fin T.n × Fin T.n, tradeDefect T x p = 0 := by - rw [tradeSpace, LinearMap.mem_ker] - exact ⟨fun h p => congrFun h p, fun h => funext h⟩ + x ∈ tradeSpace T ↔ ∀ p : Fin T.n × Fin T.n, tradeDefect T x p = 0 := + funext_iff /-- Membership in `L`, rearranged to Forster's `ζ = ξ + δη` shape on each `𝔚`-pair (the form `TradeBounded.lean`'s §5 steps 2/6/8 consume). -/ @@ -371,9 +361,8 @@ theorem mem_tradeSpace_iff_eq (x : NZ1 T T.U × NZ1 T T.V × NC0 T T.W) : restrictCLM (inf_le_inf (T.W_le_U p.1) (T.W_le_U p.2)) ((x.1 : NC1 T T.U) p) = restrictCLM (inf_le_inf (T.W_le_V p.1) (T.W_le_V p.2)) ((x.2.1 : NC1 T T.V) p) + (restrictCLM inf_le_right (x.2.2 p.2) - restrictCLM inf_le_left (x.2.2 p.1)) := by - rw [mem_tradeSpace_iff] - refine forall_congr' fun p => ?_ - rw [tradeDefect_apply T x p, sub_sub, sub_eq_zero] + exact (mem_tradeSpace_iff T x).trans + (forall_congr' fun _ => sub_eq_zero.trans sub_eq_iff_eq_add') instance : CompleteSpace (tradeSpace T) := ContinuousLinearMap.completeSpace_ker (tradeDefect T) diff --git a/LeanPool/JacobianDiffgeo/Finiteness/Chi.lean b/LeanPool/JacobianDiffgeo/Finiteness/Chi.lean index eea4f3c585..97002cb5a2 100644 --- a/LeanPool/JacobianDiffgeo/Finiteness/Chi.lean +++ b/LeanPool/JacobianDiffgeo/Finiteness/Chi.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Cech.Colimit +public import LeanPool.JacobianDiffgeo.Cech.WindowRank +import LeanPool.JacobianDiffgeo.Cech.SixTerm import LeanPool.JacobianDiffgeo.Finiteness.H1Finite +import LeanPool.JacobianDiffgeo.Finiteness.Schwartz +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The χ ledger (`finiteness-and-chi`, gated file 3/3) @@ -26,6 +33,8 @@ Unit: finiteness-and-chi (`docs/design/finiteness-and-chi.md` §8). * `l_mono`/`l_le_l_add_degree`/`h1_le_of_le`/`h1_le_h1_add_degree`: monotonicity corollaries. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology TopologicalSpace RS.Cech diff --git a/LeanPool/JacobianDiffgeo/Finiteness/CompactRestrict.lean b/LeanPool/JacobianDiffgeo/Finiteness/CompactRestrict.lean index 85978c93a3..29650ad436 100644 --- a/LeanPool/JacobianDiffgeo/Finiteness/CompactRestrict.lean +++ b/LeanPool/JacobianDiffgeo/Finiteness/CompactRestrict.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Finiteness.BddHolo +public import LeanPool.JacobianDiffgeo.Finiteness.BddHolo +public import Mathlib.Analysis.Normed.Operator.Compact.Basic import LeanPool.JacobianDiffgeo.Forms.Montel -import Mathlib.Analysis.Normed.Operator.Compact.Basic +import LeanPool.JacobianDiffgeo.Surface.Bridges +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Topology.ContinuousMap.Compact /-! # Montel compactness of `restrictCLM` (`finiteness-and-chi`) @@ -27,6 +32,8 @@ after the relevant definitions, by `IsCompactOperator.comp_clm`/`.clm_comp` comp lemma (per §6.3 step 5) — no mathematical content moves, only the file boundary. -/ +@[expose] public section + open scoped ContDiff Manifold BoundedContinuousFunction open Set Filter Topology TopologicalSpace Metric diff --git a/LeanPool/JacobianDiffgeo/Finiteness/H1Finite.lean b/LeanPool/JacobianDiffgeo/Finiteness/H1Finite.lean index 064df688c9..6f460d00db 100644 --- a/LeanPool/JacobianDiffgeo/Finiteness/H1Finite.lean +++ b/LeanPool/JacobianDiffgeo/Finiteness/H1Finite.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Cech.Colimit +public import LeanPool.JacobianDiffgeo.Finiteness.Chain +import LeanPool.JacobianDiffgeo.Cech.SixTerm +import LeanPool.JacobianDiffgeo.DolbeaultComparison.Leray import LeanPool.JacobianDiffgeo.Finiteness.Schwartz import LeanPool.JacobianDiffgeo.Finiteness.TradeBounded -import LeanPool.JacobianDiffgeo.Cech.SixTerm +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # `FiniteDimensional ℂ (H1 D)` for all `D` (`finiteness-and-chi`, gated file 2/3) @@ -24,6 +30,8 @@ Unit: finiteness-and-chi (`docs/design/finiteness-and-chi.md` §6.4/§6.5, §7). cech's six-term skyscraper fragment, NOT twisted norms). -/ +@[expose] public section + open scoped ContDiff Manifold BoundedContinuousFunction open Set Filter Topology TopologicalSpace Metric RS.Cech diff --git a/LeanPool/JacobianDiffgeo/Finiteness/Schwartz.lean b/LeanPool/JacobianDiffgeo/Finiteness/Schwartz.lean index 7f166f73b2..99a1bb1b5f 100644 --- a/LeanPool/JacobianDiffgeo/Finiteness/Schwartz.lean +++ b/LeanPool/JacobianDiffgeo/Finiteness/Schwartz.lean @@ -3,13 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import Mathlib.Analysis.Normed.Operator.Compact.Basic +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.LinearAlgebra.FiniteDimensional.Defs import Mathlib.Analysis.Normed.Operator.Banach -import Mathlib.Analysis.Normed.Operator.Compact.Basic -import Mathlib.Analysis.Normed.Module.FiniteDimension -import Mathlib.RingTheory.Finiteness.Finsupp -import Mathlib.LinearAlgebra.Isomorphisms -import Mathlib.Analysis.Complex.Basic +import Mathlib.Topology.Algebra.Module.FiniteDimension /-! # The Schwartz cospan lemma (`finiteness-and-chi`, Banach half) @@ -43,6 +43,8 @@ perturbation `v` to correct for. Forster's open-mapping step 14.6(b) survives as timeout at `E →L[ℂ] F`, per the spike `scratch_finiteness.lean` §11). -/ +@[expose] public section + open Metric Function namespace RS diff --git a/LeanPool/JacobianDiffgeo/Finiteness/TradeBounded.lean b/LeanPool/JacobianDiffgeo/Finiteness/TradeBounded.lean index d51a68434b..84182d0e8e 100644 --- a/LeanPool/JacobianDiffgeo/Finiteness/TradeBounded.lean +++ b/LeanPool/JacobianDiffgeo/Finiteness/TradeBounded.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Finiteness.Chain +public import LeanPool.JacobianDiffgeo.Finiteness.Chain +public import LeanPool.JacobianDiffgeo.Cech.Refinement +public import Mathlib.Analysis.Normed.Operator.Compact.Basic import LeanPool.JacobianDiffgeo.DolbeaultComparison.Leray +import LeanPool.JacobianDiffgeo.Finiteness.CompactRestrict +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The norm-bounded trade (`finiteness-and-chi`, gated file 1/3) @@ -24,6 +30,8 @@ step 5). This is the first of the three files that were blocked on the cech `Col Schwartz-consumer properties. -/ +@[expose] public section + open scoped ContDiff Manifold BoundedContinuousFunction open Set Filter Topology TopologicalSpace Metric RS.Cech @@ -279,7 +287,7 @@ variable [T2Space X] [CompactSpace X] noncomputable def boundZ1 {P : Fin T.n → Opens X} (h : ∀ i, closure (P i : Set X) ⊆ (T.Ustar i : Set X)) (F : Z1 (0 : RS.Divisor X) T.coverStar) : NC1 T P := - fun p => restrictGerm (closure_inf_pair_subset T h p.1 p.2) + fun p => restrictGerm (private_decl% (closure_inf_pair_subset T h p.1 p.2)) ((F : C1 (0 : RS.Divisor X) T.coverStar) (p.1, p.2)) /-- The `(i, j)`-component of a good-cover cocycle, as a `LinSysOn`-membership term (a named @@ -369,8 +377,6 @@ theorem trade_evalAt {𝒱 : FinCover (⊤ : Opens X)} {τ : Fin 𝒱.n → Fin + ((g β : RS.MeroGermOn X (𝒱.U β : Set X)).evalAt z - (g α : RS.MeroGermOn X (𝒱.U α : Set X)).evalAt z) := by have hLopen : IsOpen ((𝒱.U α ⊓ 𝒱.U β : Opens X) : Set X) := (𝒱.U α ⊓ 𝒱.U β).2 - have hza : (z : X) ∈ 𝒱.U α := hz.1 - have hzb : (z : X) ∈ 𝒱.U β := hz.2 have hpt : (resZ1 (0 : RS.Divisor X) τ hτ F : C1 (0 : RS.Divisor X) 𝒱) (α, β) = f (α, β) + d0 (0 : RS.Divisor X) 𝒱 g (α, β) := congrFun hFg (α, β) rw [resZ1_apply_coe, resC1_apply, d0_apply] at hpt @@ -378,24 +384,17 @@ theorem trade_evalAt {𝒱 : FinCover (⊤ : Opens X)} {τ : Fin 𝒱.n → Fin simp only [Submodule.coe_add, Submodule.coe_sub, restrictL_apply_coe] at hcoe have hnn_f : 0 ≤ (f (α, β) : RS.MeroGermOn X (𝒱.U α ⊓ 𝒱.U β : Set X)).ord z := LinSysOn.ord_nonneg hLopen hz (f (α, β)) - have hnn_gb : 0 ≤ (g β : RS.MeroGermOn X (𝒱.U β : Set X)).ord z := - LinSysOn.ord_nonneg (𝒱.U β).2 hzb (g β) - have hnn_ga : 0 ≤ (g α : RS.MeroGermOn X (𝒱.U α : Set X)).ord z := - LinSysOn.ord_nonneg (𝒱.U α).2 hza (g α) have hnn_gb' : 0 ≤ (RS.MeroGermOn.restrict (inf_le_right : 𝒱.U α ⊓ 𝒱.U β ≤ 𝒱.U β) - (g β : RS.MeroGermOn X (𝒱.U β : Set X))).ord z := by - rw [RS.MeroGermOn.ord_restrict inf_le_right hLopen (𝒱.U β).2 hz]; exact hnn_gb + (g β : RS.MeroGermOn X (𝒱.U β : Set X))).ord z := + LinSysOn.ord_nonneg hLopen hz (LinSysOn.restrictL (0 : RS.Divisor X) inf_le_right (g β)) have hnn_ga' : 0 ≤ (RS.MeroGermOn.restrict (inf_le_left : 𝒱.U α ⊓ 𝒱.U β ≤ 𝒱.U α) - (g α : RS.MeroGermOn X (𝒱.U α : Set X))).ord z := by - rw [RS.MeroGermOn.ord_restrict inf_le_left hLopen (𝒱.U α).2 hz]; exact hnn_ga + (g α : RS.MeroGermOn X (𝒱.U α : Set X))).ord z := + LinSysOn.ord_nonneg hLopen hz (LinSysOn.restrictL (0 : RS.Divisor X) inf_le_left (g α)) have hnn_sub : 0 ≤ (RS.MeroGermOn.restrict (inf_le_right : 𝒱.U α ⊓ 𝒱.U β ≤ 𝒱.U β) (g β : RS.MeroGermOn X (𝒱.U β : Set X)) - RS.MeroGermOn.restrict (inf_le_left : 𝒱.U α ⊓ 𝒱.U β ≤ 𝒱.U α) (g α : - RS.MeroGermOn X (𝒱.U α : Set X))).ord z := by - rw [sub_eq_add_neg] - refine le_trans (le_min hnn_gb' ?_) (RS.MeroGermOn.ord_add hLopen hz _ _) - rw [RS.MeroGermOn.ord_neg] - exact hnn_ga' + RS.MeroGermOn X (𝒱.U α : Set X))).ord z := + LinSysOn.ord_nonneg hLopen hz (d0 (0 : RS.Divisor X) 𝒱 g (α, β)) have hcongr := congrArg (fun ψ : RS.MeroGermOn X ((𝒱.U α ⊓ 𝒱.U β : Opens X) : Set X) => ψ.evalAt z) hcoe rw [MeroGermOn.evalAt_add hLopen hz hnn_f hnn_sub, @@ -431,7 +430,7 @@ noncomputable def cComp (ξ : NZ1 T T.V) (α β : Fin T.n) : omit [T2Space X] [CompactSpace X] [T1Space X] in theorem cComp_eq (ξ : NZ1 T T.V) (α β : Fin T.n) : cComp T ξ α β = toGerm (T.V α ⊓ T.V β) ((ξ : NC1 T T.V) (α, β)) := by - rw [cComp, cCompMem, cC1, toGermZ1_apply_coe, toGermC1_apply, toGermSub_apply_coe] + rfl omit [T1Space X] in /-- **§5's centerpiece**: the trade projection `π : L →L Z¹(𝔙)` is onto (Forster 14.6(a) upgraded @@ -441,8 +440,8 @@ theorem tradePi_surjective (T : ShrinkChain X) : Function.Surjective (tradePi T) obtain ⟨F, g, hFg⟩ := exists_trade (𝒰 := T.coverStar) (𝒱 := T.coverV) (D := (0 : RS.Divisor X)) (h𝒰 := T.good_star) (hτ := T.ref_star_V) (τ := id) (f := toGermZ1 T T.V T.covers_V ξ) have hζmem : boundZ1 T T.closure_U_subset F ∈ NZ1 T T.U := boundZ1_mem_NZ1 T T.closure_U_subset F - set ζ : NZ1 T T.U := ⟨boundZ1 T T.closure_U_subset F, hζmem⟩ with hζ_def - set η : NC0 T T.W := boundZ1C0 T g with hη_def + let ζ : NZ1 T T.U := ⟨boundZ1 T T.closure_U_subset F, hζmem⟩ + let η : NC0 T T.W := boundZ1C0 T g have hmem : (ζ, ξ, η) ∈ tradeSpace T := by rw [mem_tradeSpace_iff_eq] rintro ⟨α, β⟩ @@ -451,11 +450,12 @@ theorem tradePi_surjective (T : ShrinkChain X) : Function.Surjective (tradePi T) intro z simp only [Submodule.coe_add, Submodule.coe_sub, BoundedContinuousFunction.coe_add, BoundedContinuousFunction.coe_sub, Pi.add_apply, Pi.sub_apply, restrictCLM_apply_coe] - have hzeq : (ζ.1 : NC1 T T.U) (α, β) = boundZ1 T T.closure_U_subset F (α, β) := rfl - rw [hzeq, boundZ1_apply_eq_evalAt] - have hηβ : η β = boundZ1C0 T g β := rfl - have hηα : η α = boundZ1C0 T g α := rfl - rw [hηβ, hηα, boundZ1C0_apply_eq_evalAt, boundZ1C0_apply_eq_evalAt] + change (boundZ1 T T.closure_U_subset F (α, β) : ↥((T.U α ⊓ T.U β : Opens X) : Set X) →ᵇ ℂ) + _ = _ + rw [boundZ1_apply_eq_evalAt] + change _ = _ + ((boundZ1C0 T g β : ↥(T.W β : Set X) →ᵇ ℂ) _ - + (boundZ1C0 T g α : ↥(T.W α : Set X) →ᵇ ℂ) _) + rw [boundZ1C0_apply_eq_evalAt, boundZ1C0_apply_eq_evalAt] have hξeval : ((ξ : NC1 T T.V) (α, β) : ↥((T.V α ⊓ T.V β : Set X)) →ᵇ ℂ) (Set.inclusion (inf_le_inf (T.W_le_V α) (T.W_le_V β)) z) = (toGerm (T.V α ⊓ T.V β) ((ξ : NC1 T T.V) (α, β))).evalAt @@ -532,42 +532,33 @@ theorem classMap_apply (ψ : NZ1 T T.V) : rfl omit [T2Space X] [CompactSpace X] [T1Space X] in -/-- The trade defect, restricted to `W`, is minus the coboundary of `x`'s `W`-component. - -Split out of `classMap_tradeDiff_eq_zero`: the two halves together exceed the default heartbeat -budget, and as separate declarations each elaborates well inside it. -/ +/-- The trade defect, restricted to `W`, is minus the coboundary of `x`'s `W`-component. -/ private theorem resZ_tradeDiff_eq_neg_deltaCLM (x : tradeSpace T) : (resZ T T.V T.W T.W_le_V (tradePi T x - tradeCompact T x) : NC1 T T.W) = -(deltaCLM T T.W x.1.2.2) := by - have hxmem := (mem_tradeSpace_iff_eq T x.1).1 x.2 - rw [map_sub] - funext p - obtain ⟨α, β⟩ := p - simp only [Submodule.coe_sub, Pi.sub_apply, Pi.neg_apply] - rw [tradePi_apply] - have hcomp : resZ T T.V T.W T.W_le_V (tradeCompact T x) = resZ T T.U T.W T.W_le_U x.1.1 := by - rw [tradeCompact_apply, resZ_resZ] - rw [hcomp, resZ_apply_coe, resZ_apply_coe, resNC1_apply, resNC1_apply, deltaCLM_apply] - have e1 := hxmem (α, β) - rw [e1] - abel + let b : NC1 T T.W := resZ T T.V T.W T.W_le_V x.1.2.1 + let a : NC1 T T.W := resZ T T.U T.W T.W_le_U x.1.1 + have hx : a = b + deltaCLM T T.W x.1.2.2 := + funext ((mem_tradeSpace_iff_eq T x.1).1 x.2) + have hcomp : (resZ T T.V T.W T.W_le_V (tradeCompact T x) : NC1 T T.W) = a := + congrArg Subtype.val (resZ_resZ T T.V_le_U T.W_le_V T.W_le_U x.1.1) + calc + _ = b - (resZ T T.V T.W T.W_le_V (tradeCompact T x) : NC1 T T.W) := + congrArg Subtype.val ((resZ T T.V T.W T.W_le_V).map_sub _ _) + _ = b - a := congrArg (fun z : NC1 T T.W => b - z) hcomp + _ = -(deltaCLM T T.W x.1.2.2) := by rw [hx]; abel omit [T2Space X] [CompactSpace X] [T1Space X] in /-- **Schwartz-consumer property 1** (§5 step 8): the trade defect dies in `H¹(𝔚)`. -/ theorem classMap_tradeDiff_eq_zero (x : tradeSpace T) : classMap T (tradePi T x - tradeCompact T x) = 0 := by - have hkey := resZ_tradeDiff_eq_neg_deltaCLM T x - simp only [classMap_apply, H1Cover.mk_eq_zero_iff] + apply (H1Cover.mk_eq_zero_iff (0 : RS.Divisor X) T.coverW _).2 refine ⟨-(toGermC0 T T.W x.1.2.2), ?_⟩ - rw [toGermZ1W_apply_coe, hkey] - have hd0neg : d0 (0 : RS.Divisor X) T.coverW (-(toGermC0 T T.W x.1.2.2)) = - -(d0 (0 : RS.Divisor X) T.coverW (toGermC0 T T.W x.1.2.2)) := map_neg _ _ - have htgneg : toGermC1 T T.W (-(deltaCLM T T.W x.1.2.2)) = - -(toGermC1 T T.W (deltaCLM T T.W x.1.2.2)) := map_neg _ _ - rw [hd0neg, htgneg] - congr 1 - funext p - exact (toGermC1_deltaCLM_eq_d0 T x.1.2.2 p).symm + have hd0 := funext (toGermC1_deltaCLM_eq_d0 T x.1.2.2) + exact ((d0 (0 : RS.Divisor X) T.coverW).map_neg _).trans + ((congrArg Neg.neg hd0.symm).trans + (((toGermC1 T T.W).map_neg _).symm.trans + (congrArg (toGermC1 T T.W) (resZ_tradeDiff_eq_neg_deltaCLM T x).symm))) omit [T1Space X] [T2Space X] in /-- Restriction commutes with `boundZ1` (Banach-level restriction of a de-germified good-cover @@ -632,27 +623,24 @@ theorem classMap_surjective : Function.Surjective (classMap T) := by fun i => (T.closure_W_subset i).trans ((T.V_subset_U i).trans (T.U_subset_Ustar i)) have hVUstar : ∀ i, closure (T.V i : Set X) ⊆ (T.Ustar i : Set X) := fun i => (T.closure_V_subset i).trans (T.U_subset_Ustar i) - set ξF : NZ1 T T.V := ⟨boundZ1 T hVUstar F, boundZ1_mem_NZ1 T hVUstar F⟩ with hξF_def + let ξF : NZ1 T T.V := ⟨boundZ1 T hVUstar F, boundZ1_mem_NZ1 T hVUstar F⟩ refine ⟨ξF, ?_⟩ - rw [classMap_apply, ← hc] have hresZ : resZ T T.V T.W T.W_le_V ξF = ⟨boundZ1 T hWUstar F, boundZ1_mem_NZ1 T hWUstar F⟩ := resZ_boundZ1 T hVUstar T.W_le_V hWUstar F - rw [hξF_def, hresZ] have hrt := toGermZ1W_boundZ1 T hWUstar F have hd0mem : d0 (0 : RS.Divisor X) T.coverW g ∈ Z1 (0 : RS.Divisor X) T.coverW := B1_le_Z1 (0 : RS.Divisor X) T.coverW ⟨g, rfl⟩ have hsplit : (toGermZ1W T ⟨boundZ1 T hWUstar F, boundZ1_mem_NZ1 T hWUstar F⟩ : Z1 (0 : RS.Divisor X) T.coverW) = c + (⟨d0 (0 : RS.Divisor X) T.coverW g, hd0mem⟩ : - Z1 (0 : RS.Divisor X) T.coverW) := by - apply Subtype.ext - rw [hrt] - simp only [Submodule.coe_add] - exact hFg - rw [hsplit, map_add] + Z1 (0 : RS.Divisor X) T.coverW) := Subtype.ext (hrt.trans hFg) have hmk0 : H1Cover.mk (0 : RS.Divisor X) T.coverW - (⟨d0 (0 : RS.Divisor X) T.coverW g, hd0mem⟩ : Z1 (0 : RS.Divisor X) T.coverW) = 0 := by - rw [H1Cover.mk_eq_zero_iff] - exact ⟨g, rfl⟩ - rw [hmk0, add_zero] + (⟨d0 (0 : RS.Divisor X) T.coverW g, hd0mem⟩ : Z1 (0 : RS.Divisor X) T.coverW) = 0 := + (H1Cover.mk_eq_zero_iff (0 : RS.Divisor X) T.coverW _).2 ⟨g, rfl⟩ + exact (congrArg (fun ψ : NZ1 T T.W => + H1Cover.mk (0 : RS.Divisor X) T.coverW (toGermZ1W T ψ)) hresZ).trans + ((congrArg (H1Cover.mk (0 : RS.Divisor X) T.coverW) hsplit).trans + (((H1Cover.mk (0 : RS.Divisor X) T.coverW).map_add _ _).trans + ((congrArg (H1Cover.mk (0 : RS.Divisor X) T.coverW c + ·) hmk0).trans + ((add_zero _).trans hc)))) end RS.Finiteness diff --git a/LeanPool/JacobianDiffgeo/FormTrace.lean b/LeanPool/JacobianDiffgeo/FormTrace.lean index 8871dafef2..0303e67af3 100644 --- a/LeanPool/JacobianDiffgeo/FormTrace.lean +++ b/LeanPool/JacobianDiffgeo/FormTrace.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.FormTrace.PairForm -import LeanPool.JacobianDiffgeo.FormTrace.TraceZkForm -import LeanPool.JacobianDiffgeo.FormTrace.ResidueTraceCompat +public import LeanPool.JacobianDiffgeo.FormTrace.PairForm +public import LeanPool.JacobianDiffgeo.FormTrace.TraceZkForm +public import LeanPool.JacobianDiffgeo.FormTrace.ResidueTraceCompat +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # form-trace-tower: pair-form residues and residue-trace compatibility (namespace `RS.FormTrace`) @@ -73,3 +76,5 @@ residues, chart handling, and residue-trace compatibility (Miranda Lemma 3.2 glo * **`serre-duality-tails`**: nothing from this unit is DAG-wired to it (confirmed by the design's own §0.3 audit; unaffected by any of the findings above). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/FormTrace/PairForm.lean b/LeanPool/JacobianDiffgeo/FormTrace/PairForm.lean index 52396de79f..24175a9f9e 100644 --- a/LeanPool/JacobianDiffgeo/FormTrace/PairForm.lean +++ b/LeanPool/JacobianDiffgeo/FormTrace/PairForm.lean @@ -8,9 +8,12 @@ Authors: Rado Kirov Blueprint unit: form-trace-tower. Pair-form residues `resAtX F h x` (D2) and their chart-invariance (task item 1). -/ +module + +public import LeanPool.JacobianDiffgeo.Meromorphic.Predicates +public import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue import LeanPool.JacobianDiffgeo.ResidueCalculus.ChangeOfVariables -import LeanPool.JacobianDiffgeo.LocalMultiplicity.ChartBridge -import LeanPool.JacobianDiffgeo.Meromorphic.Predicates +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Pair-form residues (`form-trace-tower`, file 1/6) @@ -45,6 +48,8 @@ than assumed away (see `ResidueTraceCompat.lean`). * Basic algebra: `resAtX_congr`, `resAtX_add`, `resAtX_const_mul`. -/ +@[expose] public section + open scoped ContDiff Manifold open Filter Topology Metric Function Set diff --git a/LeanPool/JacobianDiffgeo/FormTrace/ResidueTraceCompat.lean b/LeanPool/JacobianDiffgeo/FormTrace/ResidueTraceCompat.lean index 3906c3e64e..984ac9b5da 100644 --- a/LeanPool/JacobianDiffgeo/FormTrace/ResidueTraceCompat.lean +++ b/LeanPool/JacobianDiffgeo/FormTrace/ResidueTraceCompat.lean @@ -8,12 +8,16 @@ Authors: Rado Kirov Blueprint unit: form-trace-tower. `resAtP1` (D4) and residue-trace compatibility (task item 3, Miranda Lemma 3.2 globalized). -/ -import LeanPool.JacobianDiffgeo.FormTrace.PairForm +module + +public import LeanPool.JacobianDiffgeo.FormTrace.PairForm +public import LeanPool.JacobianDiffgeo.MeromorphicTrace.FunctionTrace +public import LeanPool.JacobianDiffgeo.MappingDegree.Degree +public import LeanPool.JacobianDiffgeo.ProjectiveLine.Charts import LeanPool.JacobianDiffgeo.FormTrace.TraceZkForm -import LeanPool.JacobianDiffgeo.MeromorphicTrace.FunctionTrace -import LeanPool.JacobianDiffgeo.MappingDegree.LocalStructure -import LeanPool.JacobianDiffgeo.MappingDegree.Degree -import LeanPool.JacobianDiffgeo.MappingDegree.Ramification +import LeanPool.JacobianDiffgeo.ResidueCalculus.ChangeOfVariables +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Residue-trace compatibility (`form-trace-tower`, file 3/6) @@ -44,6 +48,8 @@ EXPLICIT hypothesis `hcal` (satisfied by any stack built via `exists_fiberStack` (task item 5, §4.6), NOT gated on the calibration issue at all (pure value/finsum identities). -/ +@[expose] public section + open scoped ContDiff Manifold open Filter Topology Metric Function Set diff --git a/LeanPool/JacobianDiffgeo/FormTrace/TraceZkForm.lean b/LeanPool/JacobianDiffgeo/FormTrace/TraceZkForm.lean index 4a88b23228..467e1e455c 100644 --- a/LeanPool/JacobianDiffgeo/FormTrace/TraceZkForm.lean +++ b/LeanPool/JacobianDiffgeo/FormTrace/TraceZkForm.lean @@ -7,9 +7,10 @@ Authors: Rado Kirov /- Blueprint unit: form-trace-tower. `traceZkForm`: the Jacobian-weighted planar trace atom (D3). -/ -import LeanPool.JacobianDiffgeo.MeromorphicTrace.PlanarTrace -import LeanPool.JacobianDiffgeo.ResidueCalculus.LaurentCoeff -import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue +module + +public import LeanPool.JacobianDiffgeo.MeromorphicTrace.PlanarTrace +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The Jacobian-weighted planar trace atom (`form-trace-tower`, file 2/6) @@ -39,6 +40,8 @@ the Jacobian factor" atom on top. identities, now UNCONDITIONALLY PROVABLE (mtrace's P6 landed, see `docs/build-log.md`). -/ +@[expose] public section + open Filter Topology namespace RS.FormTrace diff --git a/LeanPool/JacobianDiffgeo/Forms.lean b/LeanPool/JacobianDiffgeo/Forms.lean index f91c4edf2c..75047b1b2a 100644 --- a/LeanPool/JacobianDiffgeo/Forms.lean +++ b/LeanPool/JacobianDiffgeo/Forms.lean @@ -3,15 +3,17 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Forms.Basic -import LeanPool.JacobianDiffgeo.Forms.Coeffs -import LeanPool.JacobianDiffgeo.Forms.Analyticity -import LeanPool.JacobianDiffgeo.Forms.OfCoeffs -import LeanPool.JacobianDiffgeo.Forms.MDifferential -import LeanPool.JacobianDiffgeo.Forms.Montel -import LeanPool.JacobianDiffgeo.Forms.Finiteness -import LeanPool.JacobianDiffgeo.Forms.Genus +public import LeanPool.JacobianDiffgeo.Forms.Basic +public import LeanPool.JacobianDiffgeo.Forms.Coeffs +public import LeanPool.JacobianDiffgeo.Forms.Analyticity +public import LeanPool.JacobianDiffgeo.Forms.OfCoeffs +public import LeanPool.JacobianDiffgeo.Forms.MDifferential +public import LeanPool.JacobianDiffgeo.Forms.Montel +public import LeanPool.JacobianDiffgeo.Forms.Finiteness +public import LeanPool.JacobianDiffgeo.Forms.Genus +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # holomorphic-forms (CC1): holomorphic 1-forms and `genus` @@ -54,3 +56,5 @@ API summary (see `docs/design/holomorphic-forms.md`): Downstream units use `coeffIn`/`coeffAt` and the lemmas above — never raw bundle internals (`Form1` is `abbrev`-only plumbing). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/Forms/Analyticity.lean b/LeanPool/JacobianDiffgeo/Forms/Analyticity.lean index 48f82f4f58..e1f53d1279 100644 --- a/LeanPool/JacobianDiffgeo/Forms/Analyticity.lean +++ b/LeanPool/JacobianDiffgeo/Forms/Analyticity.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Forms.Coeffs +public import LeanPool.JacobianDiffgeo.Forms.Coeffs import LeanPool.JacobianDiffgeo.Surface.Bridges -import Mathlib.Analysis.Normed.Operator.Mul -import Mathlib.Analysis.Calculus.FDeriv.Analytic /-! # Analyticity characterization of holomorphic 1-forms (CC1, design §2.2) @@ -31,6 +30,8 @@ Main declarations: targets (any maximal-atlas chart). -/ +@[expose] public section + open scoped ContDiff Manifold Bundle open Set IsManifold open ContinuousLinearMap (inCoordinates) diff --git a/LeanPool/JacobianDiffgeo/Forms/Basic.lean b/LeanPool/JacobianDiffgeo/Forms/Basic.lean index 484e4b883c..ddb7818589 100644 --- a/LeanPool/JacobianDiffgeo/Forms/Basic.lean +++ b/LeanPool/JacobianDiffgeo/Forms/Basic.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import Mathlib.Analysis.Complex.Basic -import Mathlib.Geometry.Manifold.VectorBundle.Hom -import Mathlib.Geometry.Manifold.VectorBundle.Tangent -import Mathlib.Geometry.Manifold.VectorBundle.ContMDiffSection +public import Mathlib.Geometry.Manifold.VectorBundle.Hom + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Geometry.Manifold.VectorBundle.ContMDiffSection +public import Mathlib.Topology.VectorBundle.Hom /-! # Holomorphic 1-forms: the definition (CC1) @@ -23,6 +25,8 @@ bundle are all found by typeclass inference (checked by the `example`s below). E `η x v : ℂ` works through the reducible `Bundle.Trivial X ℂ x ≡ ℂ`. -/ +@[expose] public section + open scoped ContDiff Manifold Bundle noncomputable section diff --git a/LeanPool/JacobianDiffgeo/Forms/Coeffs.lean b/LeanPool/JacobianDiffgeo/Forms/Coeffs.lean index fbbfc799a2..9008b111d2 100644 --- a/LeanPool/JacobianDiffgeo/Forms/Coeffs.lean +++ b/LeanPool/JacobianDiffgeo/Forms/Coeffs.lean @@ -3,11 +3,9 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Forms.Basic -import Mathlib.Geometry.Manifold.MFDeriv.Atlas -import Mathlib.Geometry.Manifold.MFDeriv.Tangent -import Mathlib.Geometry.Manifold.ContMDiff.Atlas +public import LeanPool.JacobianDiffgeo.Forms.Basic /-! # The chart-coefficient API for holomorphic 1-forms (CC1) @@ -30,6 +28,8 @@ Main results: All downstream units interact with 1-forms exclusively through this API. -/ +@[expose] public section + open scoped ContDiff Manifold Bundle open Set diff --git a/LeanPool/JacobianDiffgeo/Forms/Finiteness.lean b/LeanPool/JacobianDiffgeo/Forms/Finiteness.lean index e92794d138..3cce9322fc 100644 --- a/LeanPool/JacobianDiffgeo/Forms/Finiteness.lean +++ b/LeanPool/JacobianDiffgeo/Forms/Finiteness.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Forms.Montel +public import LeanPool.JacobianDiffgeo.Forms.Analyticity +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Topology.ContinuousMap.Compact import LeanPool.JacobianDiffgeo.Forms.OfCoeffs -import LeanPool.JacobianDiffgeo.Forms.Montel -import Mathlib.Analysis.Normed.Module.FiniteDimension -import Mathlib.Topology.Sequences +import Mathlib.Analysis.Complex.LocallyUniformLimit /-! # Finite-dimensionality of the space of holomorphic 1-forms (CC1, design §2.6) @@ -32,6 +35,8 @@ Main declarations: * `instance : FiniteDimensional ℂ (Form1 X)` (compact T2 `X`). -/ +@[expose] public section + open scoped ContDiff Manifold Bundle Topology open Set Filter IsManifold diff --git a/LeanPool/JacobianDiffgeo/Forms/Genus.lean b/LeanPool/JacobianDiffgeo/Forms/Genus.lean index 58c23edba3..f23c51f7e6 100644 --- a/LeanPool/JacobianDiffgeo/Forms/Genus.lean +++ b/LeanPool/JacobianDiffgeo/Forms/Genus.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Forms.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic import LeanPool.JacobianDiffgeo.Forms.Finiteness -import Mathlib.LinearAlgebra.Dimension.Finrank +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `genus` (CC1, design §2.1) — root-level, exact challenge signature @@ -22,6 +25,8 @@ Main declarations: * `genus_eq_zero_iff_subsingleton` — `genus X = 0 ↔ Subsingleton (RS.Form1 X)`. -/ +@[expose] public section + open scoped ContDiff Manifold /-- The genus of a compact Riemann surface: the dimension of the space of global holomorphic diff --git a/LeanPool/JacobianDiffgeo/Forms/MDifferential.lean b/LeanPool/JacobianDiffgeo/Forms/MDifferential.lean index b8cc03c16d..4828873147 100644 --- a/LeanPool/JacobianDiffgeo/Forms/MDifferential.lean +++ b/LeanPool/JacobianDiffgeo/Forms/MDifferential.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Forms.Analyticity +public import LeanPool.JacobianDiffgeo.Forms.Analyticity +import LeanPool.JacobianDiffgeo.Surface.Bridges import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Mul @@ -23,6 +25,8 @@ Holomorphic 1-forms only — no meromorphic machinery here (meromorphic 1-forms `f • η` pairs in canonical-forms/meromorphic-trace). -/ +@[expose] public section + open scoped ContDiff Manifold Bundle open Set IsManifold diff --git a/LeanPool/JacobianDiffgeo/Forms/Montel.lean b/LeanPool/JacobianDiffgeo/Forms/Montel.lean index fc21f67cbe..b7c3443eb8 100644 --- a/LeanPool/JacobianDiffgeo/Forms/Montel.lean +++ b/LeanPool/JacobianDiffgeo/Forms/Montel.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.Complex.LocallyUniformLimit import Mathlib.Topology.ContinuousMap.Bounded.ArzelaAscoli -import Mathlib.Topology.ContinuousMap.Compact -import Mathlib.Topology.MetricSpace.Equicontinuity -import Mathlib.Analysis.Calculus.MeanValue -import Mathlib.Topology.MetricSpace.Thickening /-! # Planar Montel theorem (holomorphic-forms unit) @@ -27,6 +26,8 @@ Main declarations: `C(K, ℂ)` (Cauchy estimate ⇒ equicontinuity ⇒ Arzelà–Ascoli). -/ +@[expose] public section + namespace RS open Metric Set diff --git a/LeanPool/JacobianDiffgeo/Forms/OfCoeffs.lean b/LeanPool/JacobianDiffgeo/Forms/OfCoeffs.lean index 65a12c6d89..f4b770ee86 100644 --- a/LeanPool/JacobianDiffgeo/Forms/OfCoeffs.lean +++ b/LeanPool/JacobianDiffgeo/Forms/OfCoeffs.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Forms.Analyticity +public import LeanPool.JacobianDiffgeo.Forms.Analyticity /-! # Constructing holomorphic 1-forms from coefficient data (CC1, design §2.3) @@ -26,6 +27,8 @@ Main declarations: * `RS.Form1.ofCoeffs`, `RS.Form1.coeffIn_ofCoeffs`, `RS.Form1.coeffAt_ofCoeffs`. -/ +@[expose] public section + open scoped ContDiff Manifold Bundle open Set IsManifold diff --git a/LeanPool/JacobianDiffgeo/GenusSphereHeadline.lean b/LeanPool/JacobianDiffgeo/GenusSphereHeadline.lean index cbab8a5f77..d8239276be 100644 --- a/LeanPool/JacobianDiffgeo/GenusSphereHeadline.lean +++ b/LeanPool/JacobianDiffgeo/GenusSphereHeadline.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.GenusSphereHeadline.Basic +public import LeanPool.JacobianDiffgeo.GenusSphereHeadline.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # genus-zero-headline (#30): `genus X = 0 ↔ X ≃ₜ S²` @@ -28,3 +32,5 @@ direction's finisher: `RS.homeoSphere_of_exists_simple_pole`). **Unit COMPLETE** `classical`). **This is a direct alias target for final assembly**: no further wrapping should be needed to slot it into the challenge file. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/GenusSphereHeadline/Basic.lean b/LeanPool/JacobianDiffgeo/GenusSphereHeadline/Basic.lean index 4b6e33d7c7..b7ab58180d 100644 --- a/LeanPool/JacobianDiffgeo/GenusSphereHeadline/Basic.lean +++ b/LeanPool/JacobianDiffgeo/GenusSphereHeadline/Basic.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.RiemannRoch -import LeanPool.JacobianDiffgeo.SphereTopology -import LeanPool.JacobianDiffgeo.ProperDegree +public import LeanPool.JacobianDiffgeo.Forms.Genus +public import LeanPool.JacobianDiffgeo.Meromorphic.OrderEval +public import Mathlib.Analysis.InnerProductSpace.PiL2 +import LeanPool.JacobianDiffgeo.CanonicalForms.Existence +import LeanPool.JacobianDiffgeo.ProperDegree.GenusZeroFinisher +import LeanPool.JacobianDiffgeo.RiemannRoch.Basic +import LeanPool.JacobianDiffgeo.SphereTopology.Headline +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # genus-zero-headline (#30): `genus X = 0 ↔ X ≃ₜ S²` @@ -34,6 +42,8 @@ note). Assembles the two already-built halves: standing variables — a direct alias target for final assembly). -/ +@[expose] public section + open scoped ContDiff Manifold namespace RS.GenusSphereHeadline diff --git a/LeanPool/JacobianDiffgeo/H1Genus.lean b/LeanPool/JacobianDiffgeo/H1Genus.lean index cffc179a60..68c924c79a 100644 --- a/LeanPool/JacobianDiffgeo/H1Genus.lean +++ b/LeanPool/JacobianDiffgeo/H1Genus.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.H1Genus.Basic +public import LeanPool.JacobianDiffgeo.H1Genus.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # cech-h1-genus (#27): `dim H¹(X, 𝒪) = g` (namespace `RS`) @@ -27,3 +30,5 @@ produced, since it needs `H1Tail.equiv`'s full (unconditional) comparison, itsel `tailToH1`'s surjectivity — a hard, out-of-scope analytic fact per `serre-duality-tails`'s own addendum. See `Basic.lean`'s docstring for the full account. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/H1Genus/Basic.lean b/LeanPool/JacobianDiffgeo/H1Genus/Basic.lean index ccee83e98c..ca89b4d2bc 100644 --- a/LeanPool/JacobianDiffgeo/H1Genus/Basic.lean +++ b/LeanPool/JacobianDiffgeo/H1Genus/Basic.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.TailDuality +public import LeanPool.JacobianDiffgeo.Forms.Genus +public import LeanPool.JacobianDiffgeo.LaurentTail.Truncation +import LeanPool.JacobianDiffgeo.TailDuality.Duality +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # cech-h1-genus (#27): `dim H¹(X, 𝒪) = g` at the tail level @@ -30,6 +35,8 @@ scope for this challenge (per the orchestrator's 2026-07-08 addendum). Only the mentions Čech `H¹` — this gap does not block anything else in this project. -/ +@[expose] public section + open scoped ContDiff Manifold namespace RS diff --git a/LeanPool/JacobianDiffgeo/Init.lean b/LeanPool/JacobianDiffgeo/Init.lean index 5cb8c1049e..e7f3e12241 100644 --- a/LeanPool/JacobianDiffgeo/Init.lean +++ b/LeanPool/JacobianDiffgeo/Init.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module /-! # Jacobian challenge project Units live in subdirectories of `Jacobian/`; each unit has a root module `Jacobian/.lean` importing its files. See `CONVENTIONS.md`. --/ +-/@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/JacFunctorial.lean b/LeanPool/JacobianDiffgeo/JacFunctorial.lean index 922ee90149..618c42c534 100644 --- a/LeanPool/JacobianDiffgeo/JacFunctorial.lean +++ b/LeanPool/JacobianDiffgeo/JacFunctorial.lean @@ -3,18 +3,21 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacFunctorial.Pullback -import LeanPool.JacobianDiffgeo.JacFunctorial.PullbackIntegral -import LeanPool.JacobianDiffgeo.JacFunctorial.Density -import LeanPool.JacobianDiffgeo.JacFunctorial.PeriodMaps -import LeanPool.JacobianDiffgeo.JacFunctorial.Challenge -import LeanPool.JacobianDiffgeo.JacFunctorial.TraceCoeff -import LeanPool.JacobianDiffgeo.JacFunctorial.Trace -import LeanPool.JacobianDiffgeo.JacFunctorial.TraceLaws -import LeanPool.JacobianDiffgeo.JacFunctorial.TraceIntegral -import LeanPool.JacobianDiffgeo.JacFunctorial.PullbackMaps -import LeanPool.JacobianDiffgeo.JacFunctorial.ChallengeLaws +public import LeanPool.JacobianDiffgeo.JacFunctorial.Pullback +public import LeanPool.JacobianDiffgeo.JacFunctorial.PullbackIntegral +public import LeanPool.JacobianDiffgeo.JacFunctorial.Density +public import LeanPool.JacobianDiffgeo.JacFunctorial.PeriodMaps +public import LeanPool.JacobianDiffgeo.JacFunctorial.Challenge +public import LeanPool.JacobianDiffgeo.JacFunctorial.TraceCoeff +public import LeanPool.JacobianDiffgeo.JacFunctorial.Trace +public import LeanPool.JacobianDiffgeo.JacFunctorial.TraceLaws +public import LeanPool.JacobianDiffgeo.JacFunctorial.TraceIntegral +public import LeanPool.JacobianDiffgeo.JacFunctorial.PullbackMaps +public import LeanPool.JacobianDiffgeo.JacFunctorial.ChallengeLaws +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # `jacobian-functoriality` (unit root) @@ -126,3 +129,5 @@ reference chart and cancels a provably-nonzero transition factor. Anyone needing `ofCurve_contMDiff` already need. Everything else in this unit (both maps, all four functoriality laws, `pushforward_pullback`) is gate-free. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/JacFunctorial/Challenge.lean b/LeanPool/JacobianDiffgeo/JacFunctorial/Challenge.lean index 4c1c25cd56..aec94f0d68 100644 --- a/LeanPool/JacobianDiffgeo/JacFunctorial/Challenge.lean +++ b/LeanPool/JacobianDiffgeo/JacFunctorial/Challenge.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacFunctorial.PeriodMaps +public import LeanPool.JacobianDiffgeo.JacFunctorial.PeriodMaps +import Mathlib.CategoryTheory.Category.Init /-! # Challenge-signature pushforward exports (jacobian-functoriality §9, pushforward half) @@ -27,6 +29,8 @@ unit** — see the root file's LEDGER and this builder's final report for the pr (`Form1.trace`'s branch-point analyticity and the trace–path-integral relation). -/ +@[expose] public section + open scoped ContDiff Manifold noncomputable section diff --git a/LeanPool/JacobianDiffgeo/JacFunctorial/ChallengeLaws.lean b/LeanPool/JacobianDiffgeo/JacFunctorial/ChallengeLaws.lean index f63d5b205f..dadc0d2a67 100644 --- a/LeanPool/JacobianDiffgeo/JacFunctorial/ChallengeLaws.lean +++ b/LeanPool/JacobianDiffgeo/JacFunctorial/ChallengeLaws.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacFunctorial.PullbackMaps -import LeanPool.JacobianDiffgeo.JacFunctorial.Challenge +public import LeanPool.JacobianDiffgeo.JacFunctorial.PullbackMaps +public import LeanPool.JacobianDiffgeo.ProperDegree.ChallengeDegree +import LeanPool.JacobianDiffgeo.JacFunctorial.TraceLaws +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # Challenge-signature functoriality laws and the projection formula (jacobian-functoriality §9) @@ -25,6 +29,8 @@ Unit: jacobian-functoriality. The remaining challenge exports Same-universe convention throughout (see `PeriodMaps.lean`'s universe warning). -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Module diff --git a/LeanPool/JacobianDiffgeo/JacFunctorial/Density.lean b/LeanPool/JacobianDiffgeo/JacFunctorial/Density.lean index 9743bd4926..63dfb54b83 100644 --- a/LeanPool/JacobianDiffgeo/JacFunctorial/Density.lean +++ b/LeanPool/JacobianDiffgeo/JacFunctorial/Density.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Forms -import LeanPool.JacobianDiffgeo.LocalMultiplicity +public import LeanPool.JacobianDiffgeo.Forms.Coeffs +public import Mathlib.Analysis.InnerProductSpace.Basic +import LeanPool.JacobianDiffgeo.Forms.Analyticity +import LeanPool.JacobianDiffgeo.LocalMultiplicity.ChartBridge +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `Density.lean` — the reusable "dense ⟹ everywhere" closing lemma (jacobian-functoriality §5) @@ -30,6 +34,8 @@ hypothesis `coeffAt x η = coeffAt x η'` cancels it, reducing the comparison to argument (`tendsto_nhds_unique_of_eventuallyEq`). -/ +@[expose] public section + open scoped ContDiff Manifold Topology open Set Filter IsManifold diff --git a/LeanPool/JacobianDiffgeo/JacFunctorial/PeriodMaps.lean b/LeanPool/JacobianDiffgeo/JacFunctorial/PeriodMaps.lean index 2a67305ce4..a8ea65b1b9 100644 --- a/LeanPool/JacobianDiffgeo/JacFunctorial/PeriodMaps.lean +++ b/LeanPool/JacobianDiffgeo/JacFunctorial/PeriodMaps.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.JacFunctorial.Pullback +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Functorial import LeanPool.JacobianDiffgeo.JacFunctorial.PullbackIntegral -import LeanPool.JacobianDiffgeo.JacobianConstruction +import LeanPool.JacobianDiffgeo.JacobianConstruction.OfCurve +import Mathlib.CategoryTheory.Category.Init /-! # Period-space plumbing and the pushforward map (jacobian-functoriality §8, pushforward half) @@ -23,6 +27,8 @@ trace–path-integral relation are not completed, so `pullbackT`/`Jacobian.pullb `pushforward_pullback` cannot be assembled here). -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Module diff --git a/LeanPool/JacobianDiffgeo/JacFunctorial/Pullback.lean b/LeanPool/JacobianDiffgeo/JacFunctorial/Pullback.lean index 96c146e1d9..c5e363c234 100644 --- a/LeanPool/JacobianDiffgeo/JacFunctorial/Pullback.lean +++ b/LeanPool/JacobianDiffgeo/JacFunctorial/Pullback.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Forms +public import LeanPool.JacobianDiffgeo.Forms.Analyticity +public import Mathlib.Analysis.InnerProductSpace.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `Form1.pullback` — the easy direction (jacobian-functoriality §3) @@ -31,6 +34,8 @@ Main declarations: `RS.tangentCoord_mfderiv_comp`, reading the target through its own preferred chart. -/ +@[expose] public section + open scoped ContDiff Manifold Bundle open Set IsManifold diff --git a/LeanPool/JacobianDiffgeo/JacFunctorial/PullbackIntegral.lean b/LeanPool/JacobianDiffgeo/JacFunctorial/PullbackIntegral.lean index c2da57fb4d..b82e630153 100644 --- a/LeanPool/JacobianDiffgeo/JacFunctorial/PullbackIntegral.lean +++ b/LeanPool/JacobianDiffgeo/JacFunctorial/PullbackIntegral.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacFunctorial.Pullback -import LeanPool.JacobianDiffgeo.Path +public import LeanPool.JacobianDiffgeo.JacFunctorial.Pullback +public import LeanPool.JacobianDiffgeo.Path.Continuation +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Path-integral naturality (jacobian-functoriality §4) @@ -15,6 +18,8 @@ primitive of `η` along `f ∘ K` pulls back to a primitive of `Form1.pullback f and its corollary `pathIntegral_pullback` (naturality of `pathIntegral` under pullback). -/ +@[expose] public section + open scoped ContDiff Manifold Topology unitInterval open Set Filter IsManifold diff --git a/LeanPool/JacobianDiffgeo/JacFunctorial/PullbackMaps.lean b/LeanPool/JacobianDiffgeo/JacFunctorial/PullbackMaps.lean index 8b64b9783d..b3549b0efa 100644 --- a/LeanPool/JacobianDiffgeo/JacFunctorial/PullbackMaps.lean +++ b/LeanPool/JacobianDiffgeo/JacFunctorial/PullbackMaps.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.JacFunctorial.PeriodMaps +public import LeanPool.JacobianDiffgeo.JacFunctorial.Trace import LeanPool.JacobianDiffgeo.JacFunctorial.TraceIntegral -import LeanPool.JacobianDiffgeo.JacFunctorial.TraceLaws -import LeanPool.JacobianDiffgeo.JacFunctorial.PeriodMaps +import LeanPool.JacobianDiffgeo.Path.Perturb +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # The pullback map on Jacobians (jacobian-functoriality §8, pullback half) @@ -21,6 +25,8 @@ via `RS.periodVector_traceForm_mem`, after conjugating the loop to a regular bas `PeriodMaps.lean`'s universe warning). -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Module diff --git a/LeanPool/JacobianDiffgeo/JacFunctorial/Trace.lean b/LeanPool/JacobianDiffgeo/JacFunctorial/Trace.lean index ed220f4555..c1ad05540c 100644 --- a/LeanPool/JacobianDiffgeo/JacFunctorial/Trace.lean +++ b/LeanPool/JacobianDiffgeo/JacFunctorial/Trace.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacFunctorial.TraceCoeff +public import LeanPool.JacobianDiffgeo.JacFunctorial.TraceCoeff +public import LeanPool.JacobianDiffgeo.Forms.OfCoeffs +public import LeanPool.JacobianDiffgeo.MappingDegree.LocalStructure +public import LeanPool.JacobianDiffgeo.MappingDegree.Ramification import LeanPool.JacobianDiffgeo.JacFunctorial.Density -import LeanPool.JacobianDiffgeo.MeromorphicTrace.FunctionTrace -import LeanPool.JacobianDiffgeo.Forms.OfCoeffs import LeanPool.JacobianDiffgeo.JacFunctorial.Pullback +import LeanPool.JacobianDiffgeo.MeromorphicTrace.FunctionTrace +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `Form1.trace` — the fibrewise trace of a holomorphic 1-form (jacobian-functoriality §6) @@ -35,6 +41,8 @@ Main declarations: formula / functoriality laws / the trace–period relation). -/ +@[expose] public section + open scoped ContDiff Manifold Topology open Set Filter Metric IsManifold open RS.FormTrace RS.MTrace diff --git a/LeanPool/JacobianDiffgeo/JacFunctorial/TraceCoeff.lean b/LeanPool/JacobianDiffgeo/JacFunctorial/TraceCoeff.lean index 713cdb531a..d5f0a23936 100644 --- a/LeanPool/JacobianDiffgeo/JacFunctorial/TraceCoeff.lean +++ b/LeanPool/JacobianDiffgeo/JacFunctorial/TraceCoeff.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.FormTrace.TraceZkForm +public import LeanPool.JacobianDiffgeo.FormTrace.TraceZkForm +public import Mathlib.Analysis.Meromorphic.NormalForm import LeanPool.JacobianDiffgeo.Surface.Identity -import Mathlib.Analysis.Meromorphic.NormalForm +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `traceCoeff`: the repaired planar trace coefficient (jacobian-functoriality §6, planar layer) @@ -32,6 +35,8 @@ proves the repair is genuinely analytic across `0`: `ℂ`-linearity in `h`, including at the repaired point `0` (by uniqueness of limits). -/ +@[expose] public section + open Filter Topology Set open RS.FormTrace RS.MTrace diff --git a/LeanPool/JacobianDiffgeo/JacFunctorial/TraceIntegral.lean b/LeanPool/JacobianDiffgeo/JacFunctorial/TraceIntegral.lean index e8d03d5753..9bb7d332b1 100644 --- a/LeanPool/JacobianDiffgeo/JacFunctorial/TraceIntegral.lean +++ b/LeanPool/JacobianDiffgeo/JacFunctorial/TraceIntegral.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacFunctorial.Trace -import LeanPool.JacobianDiffgeo.Path -import LeanPool.JacobianDiffgeo.JacobianConstruction.OfCurve +public import LeanPool.JacobianDiffgeo.JacFunctorial.Trace +public import LeanPool.JacobianDiffgeo.JacobianConstruction.OfCurve +import LeanPool.JacobianDiffgeo.MeromorphicTrace.FunctionTrace +import LeanPool.JacobianDiffgeo.Path.Planar +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # The trace–period relation (jacobian-functoriality §7, period-level form) @@ -30,6 +34,8 @@ Route (cheaper than the design's full `FiberChain`/monodromy construction, same loop. No cycle decomposition, no lifted-path concatenation. -/ +@[expose] public section + open scoped ContDiff Manifold Topology unitInterval open Set Filter Metric IsManifold diff --git a/LeanPool/JacobianDiffgeo/JacFunctorial/TraceLaws.lean b/LeanPool/JacobianDiffgeo/JacFunctorial/TraceLaws.lean index 30421fdb94..4bfdebf78b 100644 --- a/LeanPool/JacobianDiffgeo/JacFunctorial/TraceLaws.lean +++ b/LeanPool/JacobianDiffgeo/JacFunctorial/TraceLaws.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacFunctorial.Trace -import LeanPool.JacobianDiffgeo.ProperDegree.ChallengeDegree +public import LeanPool.JacobianDiffgeo.JacFunctorial.Trace +public import LeanPool.JacobianDiffgeo.ProperDegree.ChallengeDegree +public import LeanPool.JacobianDiffgeo.JacFunctorial.Pullback +import LeanPool.JacobianDiffgeo.JacFunctorial.Density +import LeanPool.JacobianDiffgeo.LocalMultiplicity.Composition +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Functoriality laws and the projection formula for `Form1.trace` (jacobian-functoriality §6.5, §9) @@ -21,6 +28,8 @@ All three are proved at regular values via `RS.coeffAt_traceForm_of_isRegularVal everywhere by `RS.Form1.eq_of_eqOn_dense` (density of regular values). -/ +@[expose] public section + open scoped ContDiff Manifold Topology open Set Filter Metric IsManifold diff --git a/LeanPool/JacobianDiffgeo/JacobianConstruction.lean b/LeanPool/JacobianDiffgeo/JacobianConstruction.lean index 2a036deea9..145a15e91c 100644 --- a/LeanPool/JacobianDiffgeo/JacobianConstruction.lean +++ b/LeanPool/JacobianDiffgeo/JacobianConstruction.lean @@ -3,14 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacobianConstruction.ChartedSpaceKitV -import LeanPool.JacobianDiffgeo.JacobianConstruction.Torus -import LeanPool.JacobianDiffgeo.JacobianConstruction.Periods -import LeanPool.JacobianDiffgeo.JacobianConstruction.ULift -import LeanPool.JacobianDiffgeo.JacobianConstruction.Basic -import LeanPool.JacobianDiffgeo.JacobianConstruction.OfCurve -import LeanPool.JacobianDiffgeo.JacobianConstruction.Functorial +public import LeanPool.JacobianDiffgeo.JacobianConstruction.ChartedSpaceKitV +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Torus +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Periods +public import LeanPool.JacobianDiffgeo.JacobianConstruction.ULift +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Basic +public import LeanPool.JacobianDiffgeo.JacobianConstruction.OfCurve +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Functorial +import Mathlib.CategoryTheory.Category.Init /-! # jacobian-construction (CC9): the `Jacobian` type, its scaffolding, and `ofCurve` @@ -82,3 +84,5 @@ holomorphic map", which no unit in the 30-unit blueprint currently owns; natural abel-theorem, since it already needs period-naturality for its two-point argument, or a final-assembly addendum). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/JacobianConstruction/Basic.lean b/LeanPool/JacobianDiffgeo/JacobianConstruction/Basic.lean index 5661ab7513..ed751ea2f7 100644 --- a/LeanPool/JacobianDiffgeo/JacobianConstruction/Basic.lean +++ b/LeanPool/JacobianDiffgeo/JacobianConstruction/Basic.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacobianConstruction.Periods -import LeanPool.JacobianDiffgeo.JacobianConstruction.ULift +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Periods +public import LeanPool.JacobianDiffgeo.JacobianConstruction.ULift +import Mathlib.CategoryTheory.Category.Init +import Mathlib.LinearAlgebra.Complex.FiniteDimensional /-! # `Jac₀`, `Jacobian`, and the challenge instance assembly (CC9, §2–§9) @@ -45,6 +48,8 @@ subgroup of a given `X`, Lean's instance search discharges all four automaticall needs to change here. -/ +@[expose] public section + open scoped ContDiff Manifold universe u diff --git a/LeanPool/JacobianDiffgeo/JacobianConstruction/ChartedSpaceKitV.lean b/LeanPool/JacobianDiffgeo/JacobianConstruction/ChartedSpaceKitV.lean index ad53de72a8..0dfda70060 100644 --- a/LeanPool/JacobianDiffgeo/JacobianConstruction/ChartedSpaceKitV.lean +++ b/LeanPool/JacobianDiffgeo/JacobianConstruction/ChartedSpaceKitV.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import Mathlib.Geometry.Manifold.IsManifold.Basic -import Mathlib.Analysis.Complex.Basic +public import Mathlib.Geometry.Manifold.IsManifold.Basic +public import Mathlib.Analysis.Complex.Basic /-! # Charted-space kit, generalized to an arbitrary `NormedSpace ℂ` codomain @@ -26,6 +27,8 @@ Namespace `RS` (Compat section, primed names to avoid clashing with Surface's or * `isManifold_of_family'`: family version. -/ +@[expose] public section + open scoped ContDiff Manifold open Set diff --git a/LeanPool/JacobianDiffgeo/JacobianConstruction/Functorial.lean b/LeanPool/JacobianDiffgeo/JacobianConstruction/Functorial.lean index 7fb7c41676..9ba8a27885 100644 --- a/LeanPool/JacobianDiffgeo/JacobianConstruction/Functorial.lean +++ b/LeanPool/JacobianDiffgeo/JacobianConstruction/Functorial.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacobianConstruction.Basic +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Basic +import Mathlib.CategoryTheory.Category.Init /-! # The `→ₜ+` functoriality substrate, wrapped through the `ULift` shell (§9.4) @@ -21,6 +23,8 @@ blueprint unit currently owns "pullback of holomorphic `1`-forms along a holomor this unit's final report for the flag to the orchestrator. -/ +@[expose] public section + open scoped ContDiff Manifold universe u diff --git a/LeanPool/JacobianDiffgeo/JacobianConstruction/OfCurve.lean b/LeanPool/JacobianDiffgeo/JacobianConstruction/OfCurve.lean index 0f85c0bb32..fa8044f3da 100644 --- a/LeanPool/JacobianDiffgeo/JacobianConstruction/OfCurve.lean +++ b/LeanPool/JacobianDiffgeo/JacobianConstruction/OfCurve.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacobianConstruction.Basic +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Basic +import LeanPool.JacobianDiffgeo.Path.Planar +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.CategoryTheory.Category.Init /-! # `ofCurve`, well-definedness, `ofCurve_self`, `ofCurve_contMDiff` (CC9, §8) @@ -26,6 +30,8 @@ lattice-shift computation as `Torus.contMDiff_add_torus`/`ULift.contMDiff_uliftU chart composite affine in `g (e z)`, hence analytic. -/ +@[expose] public section + open scoped ContDiff Manifold Convex Topology open IsManifold Metric Set Filter diff --git a/LeanPool/JacobianDiffgeo/JacobianConstruction/Periods.lean b/LeanPool/JacobianDiffgeo/JacobianConstruction/Periods.lean index 4b841fedd7..1bfef32411 100644 --- a/LeanPool/JacobianDiffgeo/JacobianConstruction/Periods.lean +++ b/LeanPool/JacobianDiffgeo/JacobianConstruction/Periods.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Forms -import LeanPool.JacobianDiffgeo.Path +public import LeanPool.JacobianDiffgeo.Forms.Finiteness +public import LeanPool.JacobianDiffgeo.Forms.Genus +public import LeanPool.JacobianDiffgeo.Path.Periods +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `basis`, `periodVector`, `periodSubgroup` (CC9) @@ -26,6 +30,8 @@ Main declarations: `periodVector (basis X)` over based loops at a fixed basepoint. -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Module diff --git a/LeanPool/JacobianDiffgeo/JacobianConstruction/Torus.lean b/LeanPool/JacobianDiffgeo/JacobianConstruction/Torus.lean index 969dfcc588..a83cba64ba 100644 --- a/LeanPool/JacobianDiffgeo/JacobianConstruction/Torus.lean +++ b/LeanPool/JacobianDiffgeo/JacobianConstruction/Torus.lean @@ -3,14 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacobianConstruction.ChartedSpaceKitV -import Mathlib.Topology.Algebra.Group.Quotient -import Mathlib.Topology.Algebra.ContinuousMonoidHom -import Mathlib.Algebra.Module.ZLattice.Basic -import Mathlib.Geometry.Manifold.Algebra.LieGroup -import Mathlib.Geometry.Manifold.ContMDiff.Atlas -import Mathlib.Analysis.Analytic.Linear +public import LeanPool.JacobianDiffgeo.JacobianConstruction.ChartedSpaceKitV +public import Mathlib.Algebra.Module.ZLattice.Basic +public import Mathlib.Geometry.Manifold.Algebra.LieGroup /-! # The abstract torus layer: `V ⧸ L` for `L : AddSubgroup V` @@ -39,6 +36,8 @@ fire once a caller supplies them — which is exactly the hook period-lattice-ra establishes discreteness/full-rank for the actual period subgroup. -/ +@[expose] public section + open scoped ContDiff Manifold Pointwise open Set Filter Topology Metric diff --git a/LeanPool/JacobianDiffgeo/JacobianConstruction/ULift.lean b/LeanPool/JacobianDiffgeo/JacobianConstruction/ULift.lean index 8120227528..d19a59aafd 100644 --- a/LeanPool/JacobianDiffgeo/JacobianConstruction/ULift.lean +++ b/LeanPool/JacobianDiffgeo/JacobianConstruction/ULift.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacobianConstruction.Torus +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Torus /-! # The `ULift` shell: transporting `ChartedSpace`/`IsManifold`/`LieAddGroup` along `Homeomorph.ulift` @@ -30,6 +31,8 @@ continuous maps, so every chart composite involving them cancels by `rfl`. Conse analyticity computation. -/ +@[expose] public section + open scoped ContDiff Manifold Pointwise open Set Filter Topology Metric diff --git a/LeanPool/JacobianDiffgeo/LaurentTail.lean b/LeanPool/JacobianDiffgeo/LaurentTail.lean index e4b8fe9e11..4d98319666 100644 --- a/LeanPool/JacobianDiffgeo/LaurentTail.lean +++ b/LeanPool/JacobianDiffgeo/LaurentTail.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.LaurentTail.TailSpace -import LeanPool.JacobianDiffgeo.LaurentTail.Truncation -import LeanPool.JacobianDiffgeo.LaurentTail.Comparison -import LeanPool.JacobianDiffgeo.LaurentTail.RiemannRoch +public import LeanPool.JacobianDiffgeo.LaurentTail.TailSpace +public import LeanPool.JacobianDiffgeo.LaurentTail.Truncation +public import LeanPool.JacobianDiffgeo.LaurentTail.Comparison +public import LeanPool.JacobianDiffgeo.LaurentTail.RiemannRoch +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # laurent-tails: Miranda's Laurent-tail calculus for `H¹(D)` (namespace `RS.LaurentTail`) @@ -76,3 +79,5 @@ dimension-counting endgame). `mulTail`/`mulTailEquiv` are deliberately not built `TailSpace.lean`'s note above); `serre-duality-tails`'s own `mulInto` supersedes them, already accounted for in that unit's design. `firstFormRR`/`g0` remain gated on `H1Tail.equiv` too. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/LaurentTail/Comparison.lean b/LeanPool/JacobianDiffgeo/LaurentTail/Comparison.lean index 45543fce7d..4a249f0471 100644 --- a/LeanPool/JacobianDiffgeo/LaurentTail/Comparison.lean +++ b/LeanPool/JacobianDiffgeo/LaurentTail/Comparison.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.LaurentTail.Truncation +public import LeanPool.JacobianDiffgeo.LaurentTail.Truncation +public import LeanPool.JacobianDiffgeo.Cech.Skyscraper +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The comparison `H1Tail D ≃ₗ Cech.H1 D` (laurent-tails, design §4.3/§5) @@ -56,6 +60,8 @@ accumulating ~25 `have`/`set` steps hits a severe elaboration performance wall r helpers (`alphaPatch`/`mlSumCochain`/…) were already structured — restores normal compile times. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace RS.Cech @@ -102,17 +108,7 @@ theorem resC1_retype {D D' : RS.Divisor X} {Ω : Opens X} {𝒰 𝒱 : RS.Cech.F (hf : f.MemLD D) (hf' : (RS.Cech.resC1 D' τ hτ f).MemLD D) : RS.Cech.resC1 D τ hτ (RS.Cech.C1.retype f hf) = RS.Cech.C1.retype (RS.Cech.resC1 D' τ hτ f) hf' := by - funext p - apply Subtype.ext - have hL : (RS.Cech.resC1 D τ hτ (RS.Cech.C1.retype f hf) p : RS.MeroGermOn X _) = - RS.MeroGermOn.restrict (inf_le_inf (hτ p.1) (hτ p.2)) - (f (τ p.1, τ p.2) : RS.MeroGermOn X _) := by - rw [RS.Cech.resC1_apply, RS.Cech.restrictL_apply_coe, RS.Cech.C1.retype_apply_coe] - have hR : (RS.Cech.C1.retype (RS.Cech.resC1 D' τ hτ f) hf' p : RS.MeroGermOn X _) = - RS.MeroGermOn.restrict (inf_le_inf (hτ p.1) (hτ p.2)) - (f (τ p.1, τ p.2) : RS.MeroGermOn X _) := by - rw [RS.Cech.C1.retype_apply_coe, RS.Cech.resC1_apply, RS.Cech.restrictL_apply_coe] - rw [hL, hR] + rfl omit [T2Space X] [CompactSpace X] [ConnectedSpace X] [T1Space X] [DecidableEq X] [IsManifold 𝓘(ℂ, ℂ) ω X] in @@ -123,23 +119,7 @@ theorem mlClass_res {D D' : RS.Divisor X} {𝒰 𝒱 : RS.Cech.FinCover (⊤ : O (hg : (RS.Cech.d0 D' 𝒰 g).MemLD D) (hg' : (RS.Cech.d0 D' 𝒱 (RS.Cech.resC0 D' τ hτ g)).MemLD D) : RS.Cech.mlClass 𝒰 g hg = RS.Cech.mlClass 𝒱 (RS.Cech.resC0 D' τ hτ g) hg' := by - have hd0 : RS.Cech.d0 D' 𝒱 (RS.Cech.resC0 D' τ hτ g) = - RS.Cech.resC1 D' τ hτ (RS.Cech.d0 D' 𝒰 g) := - (LinearMap.congr_fun (RS.Cech.resC1_comp_d0 D' τ hτ) g).symm - have hg'' : (RS.Cech.resC1 D' τ hτ (RS.Cech.d0 D' 𝒰 g)).MemLD D := hd0 ▸ hg' - have key : RS.Cech.resZ1 D τ hτ - ⟨RS.Cech.C1.retype (RS.Cech.d0 D' 𝒰 g) hg, RS.Cech.C1.retype_mem_Z1 hg⟩ = - ⟨RS.Cech.C1.retype (RS.Cech.d0 D' 𝒱 (RS.Cech.resC0 D' τ hτ g)) hg', - RS.Cech.C1.retype_mem_Z1 hg'⟩ := by - apply Subtype.ext - rw [RS.Cech.resZ1_apply_coe] - change RS.Cech.resC1 D τ hτ (RS.Cech.C1.retype (RS.Cech.d0 D' 𝒰 g) hg) = - (RS.Cech.C1.retype (RS.Cech.d0 D' 𝒱 (RS.Cech.resC0 D' τ hτ g)) hg' : RS.Cech.C1 D 𝒱) - rw [resC1_retype τ hτ (RS.Cech.d0 D' 𝒰 g) hg hg''] - congr 1 - exact hd0.symm - simp only [RS.Cech.mlClass] - rw [← RS.Cech.toH1_resH1 D τ hτ, RS.Cech.resH1_mk, key] + exact (RS.Cech.mlClass_res τ hτ g hg hg').symm /-! ### The per-point construction: realizing a clean representative -/ @@ -202,10 +182,6 @@ theorem d0_inclC0_coe {Ω : Opens X} {𝒰 : RS.Cech.FinCover Ω} {D₁ D₂ : R (RS.Cech.d0 D₂ 𝒰 (RS.Cech.inclC0 D₁ 𝒰 h g) p : RS.MeroGermOn X ((𝒰.U p.1 ⊓ 𝒰.U p.2 : Opens X) : Set X)) = (RS.Cech.d0 D₁ 𝒰 g p : RS.MeroGermOn X ((𝒰.U p.1 ⊓ 𝒰.U p.2 : Opens X) : Set X)) := by - rw [RS.Cech.d0_apply, RS.Cech.d0_apply, Submodule.coe_sub, Submodule.coe_sub, - RS.Cech.restrictL_apply_coe, RS.Cech.restrictL_apply_coe, - RS.Cech.restrictL_apply_coe, RS.Cech.restrictL_apply_coe, - RS.Cech.inclC0_apply, RS.Cech.inclC0_apply] rfl omit [T2Space X] [CompactSpace X] [ConnectedSpace X] [T1Space X] [DecidableEq X] @@ -222,18 +198,7 @@ omit [T2Space X] [CompactSpace X] [ConnectedSpace X] [T1Space X] [DecidableEq X] theorem mlClass_inclC0 {𝒰 : RS.Cech.FinCover (⊤ : Opens X)} {D₁ D₂ D : RS.Divisor X} (h : D₁ ≤ D₂) {g : RS.Cech.C0 D₁ 𝒰} (hg : (RS.Cech.d0 D₁ 𝒰 g).MemLD D) : RS.Cech.mlClass 𝒰 (RS.Cech.inclC0 D₁ 𝒰 h g) (memLD_inclC0 h hg) = RS.Cech.mlClass 𝒰 g hg := by - have hval : RS.Cech.C1.retype (RS.Cech.d0 D₂ 𝒰 (RS.Cech.inclC0 D₁ 𝒰 h g)) (memLD_inclC0 h hg) = - RS.Cech.C1.retype (RS.Cech.d0 D₁ 𝒰 g) hg := by - funext p - apply Subtype.ext - simp only [RS.Cech.C1.retype_apply_coe] - rw [d0_inclC0_coe] - change RS.Cech.toH1 D 𝒰 (RS.Cech.H1Cover.mk D 𝒰 - ⟨RS.Cech.C1.retype (RS.Cech.d0 D₂ 𝒰 (RS.Cech.inclC0 D₁ 𝒰 h g)) (memLD_inclC0 h hg), - RS.Cech.C1.retype_mem_Z1 (memLD_inclC0 h hg)⟩) = - RS.Cech.toH1 D 𝒰 (RS.Cech.H1Cover.mk D 𝒰 - ⟨RS.Cech.C1.retype (RS.Cech.d0 D₁ 𝒰 g) hg, RS.Cech.C1.retype_mem_Z1 hg⟩) - exact congrArg (RS.Cech.toH1 D 𝒰) (congrArg (RS.Cech.H1Cover.mk D 𝒰) (Subtype.ext hval)) + rfl /-! ### `gOf` algebra -/ @@ -405,6 +370,11 @@ theorem gOf_memLD_of_clean (p : X) (D D' : RS.Divisor X) (ψ : RS.MeroGermOn X ( (ψV : RS.LinSysOn D' (V : Set X)) (hψV : (ψV : RS.MeroGermOn X (V : Set X)) = RS.MeroGermOn.restrict hVsub ψ) : (RS.Cech.d0 D' (pairCover p V hpV) (gOf p V hpV D' ψV)).MemLD D := by + have hbound (x : X) (hxV : x ∈ (V : Set X)) (hxp : x ≠ p) : + ((-D x : ℤ) : WithTop ℤ) ≤ (ψV : RS.MeroGermOn X (V : Set X)).ord x := by + rw [hψV, RS.MeroGermOn.ord_restrict hVsub V.2 (chartAt ℂ p).open_source hxV, + hVDzero x hxV hxp] + simpa using hVclean x hxV hxp rintro ⟨i, j⟩ fin_cases i <;> fin_cases j <;> dsimp only · rw [d0_pairCover_diag]; exact Submodule.zero_mem _ @@ -412,27 +382,15 @@ theorem gOf_memLD_of_clean (p : X) (D D' : RS.Divisor X) (ψ : RS.MeroGermOn X ( refine (RS.mem_linSysOn_iff_of_isOpen ((pairCover p V hpV).U _ ⊓ (pairCover p V hpV).U _).2).2 ?_ intro x hx - have hxV : x ∈ (V : Set X) := hx.1 - have hxp : x ≠ p := hx.2 rw [Submodule.coe_neg, RS.MeroGermOn.ord_neg, - RS.Cech.ord_restrictL D' inf_le_left hx ψV, hψV] - have hordeq : ((RS.MeroGermOn.restrict hVsub) ψ).ord x = ψ.ord x := - RS.MeroGermOn.ord_restrict hVsub V.2 (chartAt ℂ p).open_source hxV ψ - have hbound : (((-D x : ℤ) : WithTop ℤ)) ≤ ψ.ord x := by - rw [hVDzero x hxV hxp]; simpa using hVclean x hxV hxp - exact hbound.trans_eq hordeq.symm + RS.Cech.ord_restrictL D' inf_le_left hx ψV] + exact hbound x hx.1 hx.2 · erw [RS.Cech.d0_apply, gOf_apply_zero, gOf_apply_one, map_zero, sub_zero] refine (RS.mem_linSysOn_iff_of_isOpen ((pairCover p V hpV).U _ ⊓ (pairCover p V hpV).U _).2).2 ?_ intro x hx - have hxV : x ∈ (V : Set X) := hx.2 - have hxp : x ≠ p := hx.1 - rw [RS.Cech.ord_restrictL D' inf_le_right hx ψV, hψV] - have hordeq : ((RS.MeroGermOn.restrict hVsub) ψ).ord x = ψ.ord x := - RS.MeroGermOn.ord_restrict hVsub V.2 (chartAt ℂ p).open_source hxV ψ - have hbound : (((-D x : ℤ) : WithTop ℤ)) ≤ ψ.ord x := by - rw [hVDzero x hxV hxp]; simpa using hVclean x hxV hxp - exact hbound.trans_eq hordeq.symm + rw [RS.Cech.ord_restrictL D' inf_le_right hx ψV] + exact hbound x hx.2 hx.1 · rw [d0_pairCover_diag]; exact Submodule.zero_mem _ /-! ### `gOf` commutes with `inclC0` and with refinement (`resC0`) -/ @@ -568,20 +526,12 @@ theorem mlClassAtOf_agree (p : X) (D : RS.Divisor X) (ψ : RS.MeroGermOn X (char set D'' : RS.Divisor X := D'₁ ⊔ D'₂ with hD''def have h₁ : D'₁ ≤ D'' := le_sup_left have h₂ : D'₂ ≤ D'' := le_sup_right - have hψWmem : RS.MeroGermOn.restrict hWsub ψ ∈ RS.LinSysOn D'' (W : Set X) := by - refine (RS.mem_linSysOn_iff_of_isOpen W.2).2 ?_ - intro x hx - rw [RS.MeroGermOn.ord_restrict hWsub W.2 (chartAt ℂ p).open_source hx] - have hb1 : ((-(D'₁ x) : ℤ) : WithTop ℤ) ≤ ψ.ord x := by - have hmem := (RS.mem_linSysOn_iff_of_isOpen V₁.2).1 ψV₁.2 x (hWV₁ hx) - rwa [hψV₁, RS.MeroGermOn.ord_restrict hV₁sub V₁.2 (chartAt ℂ p).open_source (hWV₁ hx)] at hmem - have hDsup : D'' x = D'₁ x ⊔ D'₂ x := Function.locallyFinsuppWithin.max_apply - have hcast : ((-(D'' x) : ℤ) : WithTop ℤ) ≤ ((-(D'₁ x) : ℤ) : WithTop ℤ) := by - rw [hDsup] - exact_mod_cast neg_le_neg (le_max_left (D'₁ x) (D'₂ x)) - exact hcast.trans hb1 - set ψW : RS.LinSysOn D'' (W : Set X) := ⟨RS.MeroGermOn.restrict hWsub ψ, hψWmem⟩ with hψWdef - have hψW : (ψW : RS.MeroGermOn X (W : Set X)) = RS.MeroGermOn.restrict hWsub ψ := rfl + let ψW : RS.LinSysOn D'' (W : Set X) := + Submodule.inclusion (RS.Cech.linSysOn_mono h₁) (RS.Cech.LinSysOn.restrictL D'₁ hWV₁ ψV₁) + have hψW : (ψW : RS.MeroGermOn X (W : Set X)) = RS.MeroGermOn.restrict hWsub ψ := by + change RS.MeroGermOn.restrict hWV₁ (ψV₁ : RS.MeroGermOn X (V₁ : Set X)) = _ + rw [hψV₁] + exact RS.MeroGermOn.restrict_restrict _ _ ψ have hL := mlClassAtOf_raise_res p D D'₁ D'' ψ V₁ W hpV₁ hpW hWV₁ hV₁sub hV₁clean hV₁Dzero hWsub hWclean hWDzero h₁ ψV₁ hψV₁ ψW hψW have hR := mlClassAtOf_raise_res p D D'₂ D'' ψ V₂ W hpV₂ hpW hWV₂ hV₂sub hV₂clean hV₂Dzero @@ -655,47 +605,16 @@ theorem mlClassAt_add (D : RS.Divisor X) (p : X) (ψ ψ' : RS.MeroGermOn X (char have hVDzero : ∀ x ∈ (V : Set X), x ≠ p → D x = 0 := fun x hx hxp => cleanNbhd_D_eq_zero D p ψ x hx.1 hxp set D' : RS.Divisor X := DPrimeOf D p ψ ⊔ DPrimeOf D p ψ' with hD'def - have hDψ : D' p ≥ nOf D p ψ := by - rw [hD'def] - calc nOf D p ψ = DPrimeOf D p ψ p := (DPrimeOf_apply_self D p ψ).symm - _ ≤ DPrimeOf D p ψ p ⊔ DPrimeOf D p ψ' p := le_sup_left - _ = (DPrimeOf D p ψ ⊔ DPrimeOf D p ψ') p := (Function.locallyFinsuppWithin.max_apply).symm - have hDψ' : D' p ≥ nOf D p ψ' := by - rw [hD'def] - calc nOf D p ψ' = DPrimeOf D p ψ' p := (DPrimeOf_apply_self D p ψ').symm - _ ≤ DPrimeOf D p ψ p ⊔ DPrimeOf D p ψ' p := le_sup_right - _ = (DPrimeOf D p ψ ⊔ DPrimeOf D p ψ') p := (Function.locallyFinsuppWithin.max_apply).symm - have hD'x : ∀ x ≠ p, D' x = D x := by - intro x hx - rw [hD'def] - change DPrimeOf D p ψ x ⊔ DPrimeOf D p ψ' x = D x - rw [DPrimeOf_apply_of_ne D p ψ hx, DPrimeOf_apply_of_ne D p ψ' hx, sup_idem] - have hboundψ : ((-(D' p) : ℤ) : WithTop ℤ) ≤ ψ.ord p := by - calc ((-(D' p) : ℤ) : WithTop ℤ) ≤ ((-(nOf D p ψ) : ℤ) : WithTop ℤ) := - by exact_mod_cast neg_le_neg hDψ - _ ≤ ψ.ord p := neg_nOf_le_ord D p ψ - have hboundψ' : ((-(D' p) : ℤ) : WithTop ℤ) ≤ ψ'.ord p := by - calc ((-(D' p) : ℤ) : WithTop ℤ) ≤ ((-(nOf D p ψ') : ℤ) : WithTop ℤ) := - by exact_mod_cast neg_le_neg hDψ' - _ ≤ ψ'.ord p := neg_nOf_le_ord D p ψ' - have hmemψ : RS.MeroGermOn.restrict hVsub ψ ∈ RS.LinSysOn D' (V : Set X) := by - refine (RS.mem_linSysOn_iff_of_isOpen V.2).2 ?_ - intro x hx - rw [RS.MeroGermOn.ord_restrict hVsub V.2 (chartAt ℂ p).open_source hx] - rcases eq_or_ne x p with rfl | hxp - · exact hboundψ - · rw [hD'x x hxp, hVDzero x hx hxp]; simpa using hVclean x hx hxp - have hmemψ' : RS.MeroGermOn.restrict hVsub ψ' ∈ RS.LinSysOn D' (V : Set X) := by - refine (RS.mem_linSysOn_iff_of_isOpen V.2).2 ?_ - intro x hx - rw [RS.MeroGermOn.ord_restrict hVsub V.2 (chartAt ℂ p).open_source hx] - rcases eq_or_ne x p with rfl | hxp - · exact hboundψ' - · rw [hD'x x hxp, hVDzero x hx hxp]; simpa using hVclean' x hx hxp - set ψVd : RS.LinSysOn D' (V : Set X) := ⟨RS.MeroGermOn.restrict hVsub ψ, hmemψ⟩ with hψVddef - set ψV'd : RS.LinSysOn D' (V : Set X) := ⟨RS.MeroGermOn.restrict hVsub ψ', hmemψ'⟩ with hψV'ddef - have hψVd : (ψVd : RS.MeroGermOn X (V : Set X)) = RS.MeroGermOn.restrict hVsub ψ := rfl - have hψV'd : (ψV'd : RS.MeroGermOn X (V : Set X)) = RS.MeroGermOn.restrict hVsub ψ' := rfl + let ψVd : RS.LinSysOn D' (V : Set X) := + Submodule.inclusion (RS.Cech.linSysOn_mono le_sup_left) + (RS.Cech.LinSysOn.restrictL _ inf_le_left (ψVOf D p ψ)) + let ψV'd : RS.LinSysOn D' (V : Set X) := + Submodule.inclusion (RS.Cech.linSysOn_mono le_sup_right) + (RS.Cech.LinSysOn.restrictL _ inf_le_right (ψVOf D p ψ')) + have hψVd : (ψVd : RS.MeroGermOn X (V : Set X)) = RS.MeroGermOn.restrict hVsub ψ := + RS.MeroGermOn.restrict_restrict _ _ ψ + have hψV'd : (ψV'd : RS.MeroGermOn X (V : Set X)) = RS.MeroGermOn.restrict hVsub ψ' := + RS.MeroGermOn.restrict_restrict _ _ ψ' have hψVsumd : ((ψVd + ψV'd : RS.LinSysOn D' (V : Set X)) : RS.MeroGermOn X (V : Set X)) = RS.MeroGermOn.restrict hVsub (ψ + ψ') := by rw [Submodule.coe_add, hψVd, hψV'd, map_add] @@ -715,22 +634,10 @@ omit [ConnectedSpace X] in theorem mlClassAt_smul (D : RS.Divisor X) (p : X) (c : ℂ) (ψ : RS.MeroGermOn X (chartAt ℂ p).source) : mlClassAt D p (c • ψ) = c • mlClassAt D p ψ := by - have hψV : (ψVOf D p ψ : RS.MeroGermOn X (cleanNbhd D p ψ : Set X)) = - RS.MeroGermOn.restrict (cleanNbhd_sub_source D p ψ) ψ := rfl - have hmemc : RS.MeroGermOn.restrict (cleanNbhd_sub_source D p ψ) (c • ψ) ∈ - RS.LinSysOn (DPrimeOf D p ψ) (cleanNbhd D p ψ : Set X) := by - rw [map_smul] - exact Submodule.smul_mem _ c (restrict_ψ_mem_linSysOn D p ψ) - set ψVc : RS.LinSysOn (DPrimeOf D p ψ) (cleanNbhd D p ψ : Set X) := - ⟨RS.MeroGermOn.restrict (cleanNbhd_sub_source D p ψ) (c • ψ), hmemc⟩ with hψVcdef + let ψVc := c • ψVOf D p ψ have hψVc : (ψVc : RS.MeroGermOn X (cleanNbhd D p ψ : Set X)) = - RS.MeroGermOn.restrict (cleanNbhd_sub_source D p ψ) (c • ψ) := rfl - have hψVcsmul : ((c • ψVOf D p ψ : RS.LinSysOn (DPrimeOf D p ψ) (cleanNbhd D p ψ : Set X)) : - RS.MeroGermOn X (cleanNbhd D p ψ : Set X)) = - RS.MeroGermOn.restrict (cleanNbhd_sub_source D p ψ) (c • ψ) := by - rw [Submodule.coe_smul, hψV, map_smul] - have hVclean : ∀ x ∈ (cleanNbhd D p (c • ψ) : Set X), x ≠ p → (0 : WithTop ℤ) ≤ (c • ψ).ord x := - cleanNbhd_ord_nonneg D p (c • ψ) + RS.MeroGermOn.restrict (cleanNbhd_sub_source D p ψ) (c • ψ) := + (map_smul (RS.MeroGermOn.restrict _) c ψ).symm have key1 : mlClassAt D p (c • ψ) = mlClassAtOf p D (DPrimeOf D p ψ) (c • ψ) (cleanNbhd D p ψ) (mem_cleanNbhd D p ψ) (cleanNbhd_sub_source D p ψ) (fun x hx hxp => by @@ -745,13 +652,8 @@ theorem mlClassAt_smul (D : RS.Divisor X) (p : X) (c : ℂ) (cleanNbhd_D_eq_zero D p ψ) ψVc hψVc rw [key1] unfold mlClassAt mlClassAtOf - have hgeq : gOf p (cleanNbhd D p ψ) (mem_cleanNbhd D p ψ) (DPrimeOf D p ψ) ψVc = - c • gOf p (cleanNbhd D p ψ) (mem_cleanNbhd D p ψ) (DPrimeOf D p ψ) (ψVOf D p ψ) := by - rw [← gOf_smul] - congr 1 - apply Subtype.ext - rw [hψVc, Submodule.coe_smul, hψV, map_smul] - exact (mlClass_congr hgeq).trans (RS.Cech.mlClass_smul _ _ _ _) + exact (mlClass_congr (gOf_smul c p (cleanNbhd D p ψ) (mem_cleanNbhd D p ψ) + (DPrimeOf D p ψ) (ψVOf D p ψ))).trans (RS.Cech.mlClass_smul _ _ _ _) /-! ### The ambient linear map, and its descent to `TailAt p D` / `T D` -/ @@ -791,8 +693,8 @@ noncomputable def tailToH1 (D : RS.Divisor X) : T D →ₗ[ℂ] RS.Cech.H1 D := omit [ConnectedSpace X] in theorem tailToH1_apply_single (D : RS.Divisor X) (p : X) (τ : TailAt p D) : - tailToH1 D (DFinsupp.single p τ) = tailAtToH1 D p τ := by - rw [tailToH1, DFinsupp.lsum_single] + tailToH1 D (DFinsupp.single p τ) = tailAtToH1 D p τ := + DFinsupp.lsum_single ℕ (fun q => tailAtToH1 D q) p τ @@ -1152,26 +1054,15 @@ end AlphaPieces open scoped Classical in theorem tailToH1_alpha (D : RS.Divisor X) (f : RS.Mero X) : tailToH1 D (alphaL D f) = 0 := by - rw [alphaL_apply] rcases eq_or_ne f 0 with rfl | hf - · have : alpha D (0 : RS.Mero X) = 0 := by - have h0 := (alphaL D).map_zero - rwa [alphaL_apply] at h0 - rw [this, map_zero] + · exact ((tailToH1 D).comp (alphaL D)).map_zero + rw [alphaL_apply] set S := alphaFinset D f with hS_def set D' := alphaAuxD D f with hD'_def have hfD' : f ∈ RS.LinSys D' := mem_linSys_alphaAuxD D hf obtain ⟨𝒱, -, h𝒱Adapted, hOclause⟩ := RS.Cech.exists_adapted_refinement (RS.Cech.FinCover.single (⊤ : Opens X)) S (fun p _ => trivial) (alphaPatch D f S) (fun p _ => mem_alphaPatch D f S p) - -- off-diagonal overlaps of distinct members never meet `S` (pure adaptedness) - have hoffdiag := alpha_hoffdiag D f h𝒱Adapted - -- a marked point's own dedicated member excludes every other point of `S` - have hexcl := alpha_hexcl D f hOclause - -- the order of the multi-point cochain's value at any member, at any point outside `S` - have hmember_ord := alpha_hmember_ord D f (𝒱 := 𝒱) hfD' - -- `MemLD D` for the multi-point cochain, at ANY `T` (diagonal trivial; off-diagonal via - -- `hoffdiag` + `hmember_ord`) have hg_MemLD := alpha_hg_MemLD D f hfD' h𝒱Adapted -- (indeed literally-zero-or-`D`-bounded) difference everywhere have hφ : ∀ k : Fin 𝒱.n, ∀ x ∈ (𝒱.U k : Set X), @@ -1198,9 +1089,6 @@ theorem tailToH1_alpha (D : RS.Divisor X) (f : RS.Mero X) : tailToH1 D (alphaL D have hzero : RS.Cech.mlClass 𝒱 (mlSumCochain (𝒱 := 𝒱) D' f hfD' S) (hg_MemLD S) = 0 := RS.Cech.mlClass_eq_zero_of_exists (mlSumCochain (𝒱 := 𝒱) D' f hfD' S) (hg_MemLD S) (⟨f, hfD'⟩ : RS.LinSys D') hφ - -- CLAIM1: a single marked point's `mlClassAt` equals the big cover's `mlClass` restricted to - -- the single-point cochain `mlSumCochain D' f hfD' {p}` - have CLAIM1 := alpha_claim1 D f hfD' h𝒱Adapted hOclause have main := alpha_main D f hfD' h𝒱Adapted hOclause have hsum0 : ∑ q ∈ S, mlClassAt D q (RS.MeroGermOn.restrict (Set.subset_univ _) f) = 0 := (main S (Finset.Subset.refl S)).trans hzero @@ -1211,8 +1099,8 @@ theorem tailToH1_alpha (D : RS.Divisor X) (f : RS.Mero X) : tailToH1 D (alphaL D exact (DFinsupp.mem_support_iff.mp hq) ((alpha_apply_eq_zero_iff D f q).2 (not_mem_alphaFinset D f hqS)) have hlsum : tailToH1 D (alpha D f) = ∑ q ∈ S, tailAtToH1 D q (alpha D f q) := by - rw [tailToH1, DFinsupp.lsum_apply_apply, DFinsupp.sumAddHom_apply] - unfold DFinsupp.sum + refine (DFinsupp.sumAddHom_apply (fun q => (tailAtToH1 D q).toAddMonoidHom) + (alpha D f)).trans ?_ apply Finset.sum_subset hsupp intro q _ hq rw [DFinsupp.mem_support_iff, not_not] at hq @@ -1611,15 +1499,14 @@ theorem H1Tail.toH1_injective (D : RS.Divisor X) : Function.Injective (H1Tail.to inj_main ψ S D D' hD'mem h𝒱Adapted hOclause S (Finset.Subset.refl S) have hclass0 : RS.Cech.mlClass 𝒱 (injG ψ S D D' hD'mem hOclause S) (inj_hg_MemLD ψ S D D' hD'mem h𝒱Adapted hOclause S) = 0 := by - have hlsum : tailToH1 D z = ∑ q ∈ S, tailAtToH1 D q (z q) := by - rw [tailToH1, DFinsupp.lsum_apply_apply, DFinsupp.sumAddHom_apply] - unfold DFinsupp.sum - rfl - rw [hlsum] at hξ - rw [show (∑ q ∈ S, tailAtToH1 D q (z q)) = ∑ q ∈ S, mlClassAt D q (ψ q) from - Finset.sum_congr rfl (fun q _ => by rw [← hψ q, tailAtToH1_mk])] at hξ - rw [← hsum0] - exact hξ + refine hsum0.symm.trans ?_ + calc + ∑ q ∈ S, mlClassAt D q (ψ q) = ∑ q ∈ S, tailAtToH1 D q (z q) := + Finset.sum_congr rfl (fun q _ => + (tailAtToH1_mk D q (ψ q)).symm.trans (congrArg (tailAtToH1 D q) (hψ q))) + _ = tailToH1 D z := + (DFinsupp.sumAddHom_apply (fun q => (tailAtToH1 D q).toAddMonoidHom) z).symm + _ = 0 := hξ obtain ⟨φ, hφ⟩ := (RS.Cech.mlClass_eq_zero_iff hDD' (injG ψ S D D' hD'mem hOclause S) (inj_hg_MemLD ψ S D D' hD'mem h𝒱Adapted hOclause S)).1 hclass0 refine ⟨(φ : RS.Mero X), ?_⟩ @@ -1632,10 +1519,7 @@ theorem H1Tail.toH1_injective (D : RS.Divisor X) : Function.Injective (H1Tail.to rw [injG_apply_of_mem ψ S D D' hD'mem hOclause S kp p hp hp hkp_mem, inj_hcoe ψ S D D' hD'mem hOclause φ p hp kp hkp_mem p hkp_mem] at hφp rw [alpha_apply, ← hψ p, ← sub_eq_zero, ← map_sub, TailAt.mk_eq_zero_iff, - show RS.MeroGermOn.restrict (Set.subset_univ (chartAt ℂ p).source) - (φ : RS.MeroGermOn X (Set.univ : Set X)) - ψ p = - -(ψ p - RS.MeroGermOn.restrict (Set.subset_univ (chartAt ℂ p).source) - (φ : RS.MeroGermOn X (Set.univ : Set X))) from by ring, + ← neg_sub, RS.MeroGermOn.ord_neg] exact hφp · have hz0 : z p = 0 := DFinsupp.notMem_support_iff.mp hp @@ -1659,11 +1543,9 @@ theorem H1Tail.toH1_injective (D : RS.Divisor X) : Function.Injective (H1Tail.to have hordφ : (0 : WithTop ℤ) ≤ (RS.MeroGermOn.restrict (Set.subset_univ (chartAt ℂ q).source) (φ : RS.MeroGermOn X (Set.univ : Set X))).ord p := by - have hsplit : (RS.MeroGermOn.restrict (Set.subset_univ (chartAt ℂ q).source) - (φ : RS.MeroGermOn X (Set.univ : Set X)) : RS.MeroGermOn X (chartAt ℂ q).source) = - ψ q + (-(ψ q - RS.MeroGermOn.restrict (Set.subset_univ (chartAt ℂ q).source) - (φ : RS.MeroGermOn X (Set.univ : Set X)))) := by ring - rw [hsplit] + rw [← sub_sub_cancel (ψ q) + (RS.MeroGermOn.restrict (Set.subset_univ (chartAt ℂ q).source) + (φ : RS.MeroGermOn X (Set.univ : Set X))), sub_eq_add_neg] refine le_trans ?_ (RS.MeroGermOn.ord_add (chartAt ℂ q).open_source hqPatch _ _) rw [RS.MeroGermOn.ord_neg] exact le_min hordψq hb2 @@ -1692,7 +1574,7 @@ theorem H1Tail.toH1_surjective_of_tailToH1_surjective (D : RS.Divisor X) (hsurj : Function.Surjective (tailToH1 D)) : Function.Surjective (H1Tail.toH1 D) := by intro ξ obtain ⟨z, hz⟩ := hsurj ξ - exact ⟨H1Tail.mk D z, by rw [H1Tail.toH1_mk]; exact hz⟩ + exact ⟨H1Tail.mk D z, (H1Tail.toH1_mk D z).trans hz⟩ /-- CC8's mandate, conditional on `tailToH1`'s surjectivity (item 3 of the four deferrals, gated on `dolbeault-comparison`'s Leray/Mittag-Leffler-existence machinery — see this file's diff --git a/LeanPool/JacobianDiffgeo/LaurentTail/RiemannRoch.lean b/LeanPool/JacobianDiffgeo/LaurentTail/RiemannRoch.lean index 90bf4d33c0..4dffe76193 100644 --- a/LeanPool/JacobianDiffgeo/LaurentTail/RiemannRoch.lean +++ b/LeanPool/JacobianDiffgeo/LaurentTail/RiemannRoch.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.LaurentTail.Comparison -import LeanPool.JacobianDiffgeo.Finiteness +public import LeanPool.JacobianDiffgeo.LaurentTail.Comparison +public import LeanPool.JacobianDiffgeo.Finiteness + +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # The Riemann–Roch bridge (laurent-tails, design §4.4) — DEFERRED, gated on `H1Tail.equiv` only @@ -55,3 +60,5 @@ conjugating `Cech`'s own six-term fragment by `H1Tail.equiv`) — every proof is no new analysis, per the design doc §0/§6's own explicit recommendation not to re-derive Miranda's finiteness route independently. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/LaurentTail/TailSpace.lean b/LeanPool/JacobianDiffgeo/LaurentTail/TailSpace.lean index d0f12abbc0..1b8b318f22 100644 --- a/LeanPool/JacobianDiffgeo/LaurentTail/TailSpace.lean +++ b/LeanPool/JacobianDiffgeo/LaurentTail/TailSpace.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Cech -import Mathlib.Data.DFinsupp.Module +public import LeanPool.JacobianDiffgeo.Cech.WindowRank +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Laurent tail spaces `TailAt p D` / `T D` (laurent-tails, design §2 D1/D2/D4, §4.1) @@ -30,6 +32,8 @@ own `mulInto` (built directly on `T D`/`TailAt p D` from this file) supersedes ` is a genuine scope relief, not a shortfall. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace diff --git a/LeanPool/JacobianDiffgeo/LaurentTail/Truncation.lean b/LeanPool/JacobianDiffgeo/LaurentTail/Truncation.lean index ba5039d0bd..00fde97b16 100644 --- a/LeanPool/JacobianDiffgeo/LaurentTail/Truncation.lean +++ b/LeanPool/JacobianDiffgeo/LaurentTail/Truncation.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.LaurentTail.TailSpace +public import LeanPool.JacobianDiffgeo.LaurentTail.TailSpace +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The truncation map `α_D` and `H¹Tail(D)` (laurent-tails, design §2 D3, §4.2) @@ -21,6 +24,8 @@ Unit: laurent-tails (`docs/design/laurent-tails.md`). `Cech.H1 D` is `Comparison.lean`'s job). -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace diff --git a/LeanPool/JacobianDiffgeo/LocalMultiplicity.lean b/LeanPool/JacobianDiffgeo/LocalMultiplicity.lean index eb9429673d..a373815d6c 100644 --- a/LeanPool/JacobianDiffgeo/LocalMultiplicity.lean +++ b/LeanPool/JacobianDiffgeo/LocalMultiplicity.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.LocalMultiplicity.KthRoot -import LeanPool.JacobianDiffgeo.LocalMultiplicity.PlanarNormalForm -import LeanPool.JacobianDiffgeo.LocalMultiplicity.ChartBridge -import LeanPool.JacobianDiffgeo.LocalMultiplicity.Multiplicity -import LeanPool.JacobianDiffgeo.LocalMultiplicity.AdaptedCharts -import LeanPool.JacobianDiffgeo.LocalMultiplicity.Composition +public import LeanPool.JacobianDiffgeo.LocalMultiplicity.KthRoot +public import LeanPool.JacobianDiffgeo.LocalMultiplicity.PlanarNormalForm +public import LeanPool.JacobianDiffgeo.LocalMultiplicity.ChartBridge +public import LeanPool.JacobianDiffgeo.LocalMultiplicity.Multiplicity +public import LeanPool.JacobianDiffgeo.LocalMultiplicity.AdaptedCharts +public import LeanPool.JacobianDiffgeo.LocalMultiplicity.Composition +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # local-multiplicity (CC4): local multiplicity of holomorphic maps (namespace `RS`) @@ -37,3 +39,5 @@ API summary (see `docs/design/local-multiplicity.md`): `trans_mem_maximalAtlas`, `mem_contDiffGroupoid_iff_analytic`, `map_nhdsNE`) and a local `LMCompat` copy of the CC7 holomorphy bridge (canonical version: `Jacobian.Surface`). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/LocalMultiplicity/AdaptedCharts.lean b/LeanPool/JacobianDiffgeo/LocalMultiplicity/AdaptedCharts.lean index c097fd1181..18cb1c5739 100644 --- a/LeanPool/JacobianDiffgeo/LocalMultiplicity/AdaptedCharts.lean +++ b/LeanPool/JacobianDiffgeo/LocalMultiplicity/AdaptedCharts.lean @@ -7,7 +7,12 @@ Authors: Rado Kirov /- Blueprint unit: local-multiplicity (CC4). Adapted charts: the local normal form `z ↦ z ^ k`. -/ -import LeanPool.JacobianDiffgeo.LocalMultiplicity.Multiplicity +module + +public import LeanPool.JacobianDiffgeo.LocalMultiplicity.Multiplicity +import LeanPool.JacobianDiffgeo.LocalMultiplicity.PlanarNormalForm +import Mathlib.Geometry.Manifold.ContMDiff.Atlas +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Adapted charts (Forster Thm 2.1) @@ -21,6 +26,8 @@ import LeanPool.JacobianDiffgeo.LocalMultiplicity.Multiplicity multiplicity). -/ +@[expose] public section + open Filter Set OpenPartialHomeomorph Metric open scoped ContDiff Manifold Topology diff --git a/LeanPool/JacobianDiffgeo/LocalMultiplicity/ChartBridge.lean b/LeanPool/JacobianDiffgeo/LocalMultiplicity/ChartBridge.lean index de9dcab9b2..2d5a2aff63 100644 --- a/LeanPool/JacobianDiffgeo/LocalMultiplicity/ChartBridge.lean +++ b/LeanPool/JacobianDiffgeo/LocalMultiplicity/ChartBridge.lean @@ -7,11 +7,11 @@ Authors: Rado Kirov /- Blueprint unit: local-multiplicity (CC4). Chart bridge: `inChartAt` and transitions. -/ -import Mathlib.Analysis.Complex.Basic -import Mathlib.Geometry.Manifold.ContMDiff.Atlas -import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace -import Mathlib.Analysis.Calculus.Deriv.Comp -import Mathlib.Order.Filter.EventuallyConst +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Order.Filter.EventuallyConst +public import Mathlib.Geometry.Manifold.ContMDiff.Defs /-! # Chart bridge for local multiplicity @@ -30,6 +30,8 @@ import Mathlib.Order.Filter.EventuallyConst * `RS.map_nhdsNE` — an `OpenPartialHomeomorph` maps `𝓝[≠] x` to `𝓝[≠] (e x)` on its source. -/ +@[expose] public section + open Filter Set OpenPartialHomeomorph open scoped ContDiff Manifold Topology diff --git a/LeanPool/JacobianDiffgeo/LocalMultiplicity/Composition.lean b/LeanPool/JacobianDiffgeo/LocalMultiplicity/Composition.lean index 841c6e7777..da5b426257 100644 --- a/LeanPool/JacobianDiffgeo/LocalMultiplicity/Composition.lean +++ b/LeanPool/JacobianDiffgeo/LocalMultiplicity/Composition.lean @@ -7,8 +7,11 @@ Authors: Rado Kirov /- Blueprint unit: local-multiplicity (CC4). Composition law and multiplicity-one criteria. -/ +module + +public import LeanPool.JacobianDiffgeo.LocalMultiplicity.Multiplicity import LeanPool.JacobianDiffgeo.LocalMultiplicity.AdaptedCharts -import Mathlib.Analysis.Calculus.Deriv.Pow +import Mathlib.MeasureTheory.Integral.Bochner.Basic import Mathlib.RingTheory.RootsOfUnity.Complex /-! @@ -26,6 +29,8 @@ import Mathlib.RingTheory.RootsOfUnity.Complex `mult F y = 1` (mapping-degree's "critical values are discrete" seed). -/ +@[expose] public section + open Filter Set OpenPartialHomeomorph Metric open scoped ContDiff Manifold Topology diff --git a/LeanPool/JacobianDiffgeo/LocalMultiplicity/KthRoot.lean b/LeanPool/JacobianDiffgeo/LocalMultiplicity/KthRoot.lean index 8dce184bb9..16c6f84d9d 100644 --- a/LeanPool/JacobianDiffgeo/LocalMultiplicity/KthRoot.lean +++ b/LeanPool/JacobianDiffgeo/LocalMultiplicity/KthRoot.lean @@ -7,8 +7,11 @@ Authors: Rado Kirov /- Blueprint unit: local-multiplicity (CC4). Planar analytic k-th root. -/ +module + +public import Mathlib.Analysis.Analytic.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.SpecialFunctions.Complex.Analytic -import Mathlib.Analysis.SpecialFunctions.ExpDeriv /-! # Local analytic k-th root @@ -21,6 +24,8 @@ Only `log (u z / a)` (value near `1`, inside `slitPlane`) needs *analyticity* of `exp (log a) = a` holds for every nonzero constant, so no case split on `arg (u z₀)` is needed. -/ +@[expose] public section + open Filter Complex open scoped Topology diff --git a/LeanPool/JacobianDiffgeo/LocalMultiplicity/Multiplicity.lean b/LeanPool/JacobianDiffgeo/LocalMultiplicity/Multiplicity.lean index a62975bc41..05bc4bc83f 100644 --- a/LeanPool/JacobianDiffgeo/LocalMultiplicity/Multiplicity.lean +++ b/LeanPool/JacobianDiffgeo/LocalMultiplicity/Multiplicity.lean @@ -7,10 +7,13 @@ Authors: Rado Kirov /- Blueprint unit: local-multiplicity (CC4). The multiplicity definition and its basic API. -/ -import LeanPool.JacobianDiffgeo.LocalMultiplicity.ChartBridge +module + +public import LeanPool.JacobianDiffgeo.LocalMultiplicity.ChartBridge +public import Mathlib.Analysis.Meromorphic.Order +public import Mathlib.Analysis.InnerProductSpace.Basic import LeanPool.JacobianDiffgeo.LocalMultiplicity.PlanarNormalForm -import Mathlib.Analysis.Analytic.IsolatedZeros -import Mathlib.Analysis.Meromorphic.Order +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Local multiplicity of a holomorphic map (CC4) @@ -27,6 +30,8 @@ import Mathlib.Analysis.Meromorphic.Order * CC3 compatibility: `RS.meromorphicOrderAt_chart_sub`, `RS.meromorphicOrderAt_chart_of_eq_zero`. -/ +@[expose] public section + open Filter Set OpenPartialHomeomorph open scoped ContDiff Manifold Topology diff --git a/LeanPool/JacobianDiffgeo/LocalMultiplicity/PlanarNormalForm.lean b/LeanPool/JacobianDiffgeo/LocalMultiplicity/PlanarNormalForm.lean index b315b9efba..52c707045e 100644 --- a/LeanPool/JacobianDiffgeo/LocalMultiplicity/PlanarNormalForm.lean +++ b/LeanPool/JacobianDiffgeo/LocalMultiplicity/PlanarNormalForm.lean @@ -7,9 +7,12 @@ Authors: Rado Kirov /- Blueprint unit: local-multiplicity (CC4). Planar normal form `f = f z₀ + φ ^ k`. -/ +module + +public import Mathlib.Analysis.Analytic.Order +public import Mathlib.Analysis.InnerProductSpace.Basic import LeanPool.JacobianDiffgeo.LocalMultiplicity.KthRoot -import Mathlib.Analysis.Analytic.Order -import Mathlib.Analysis.Calculus.InverseFunctionTheorem.Analytic +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Planar normal form (Forster Thm 2.1, planar half) @@ -25,6 +28,8 @@ import Mathlib.Analysis.Calculus.InverseFunctionTheorem.Analytic * `RS.image_pow_ball`: `(· ^ k)` maps `ball 0 ρ` onto `ball 0 (ρ ^ k)`. -/ +@[expose] public section + open Filter Complex Metric open scoped Topology diff --git a/LeanPool/JacobianDiffgeo/MappingDegree.lean b/LeanPool/JacobianDiffgeo/MappingDegree.lean index 7bb95de548..9c83239b11 100644 --- a/LeanPool/JacobianDiffgeo/MappingDegree.lean +++ b/LeanPool/JacobianDiffgeo/MappingDegree.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.MappingDegree.Basics -import LeanPool.JacobianDiffgeo.MappingDegree.RootCounting -import LeanPool.JacobianDiffgeo.MappingDegree.Ramification -import LeanPool.JacobianDiffgeo.MappingDegree.LocalStructure -import LeanPool.JacobianDiffgeo.MappingDegree.LocalConstancy -import LeanPool.JacobianDiffgeo.MappingDegree.Degree -import LeanPool.JacobianDiffgeo.MappingDegree.Covering +public import LeanPool.JacobianDiffgeo.MappingDegree.Basics +public import LeanPool.JacobianDiffgeo.MappingDegree.RootCounting +public import LeanPool.JacobianDiffgeo.MappingDegree.Ramification +public import LeanPool.JacobianDiffgeo.MappingDegree.LocalStructure +public import LeanPool.JacobianDiffgeo.MappingDegree.LocalConstancy +public import LeanPool.JacobianDiffgeo.MappingDegree.Degree +public import LeanPool.JacobianDiffgeo.MappingDegree.Covering +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # mapping-degree: the mapping degree of a holomorphic map between compact Riemann surfaces @@ -52,3 +55,5 @@ zeros-minus-poles identity; meromorphic-trace/form-trace-tower consume the whole structure; paths-and-integrals/abel-weak consume `branchLocus_finite` and `isCoveringMapOn_compl_branchLocus`. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/MappingDegree/Basics.lean b/LeanPool/JacobianDiffgeo/MappingDegree/Basics.lean index cb7a78bf93..b177395fca 100644 --- a/LeanPool/JacobianDiffgeo/MappingDegree/Basics.lean +++ b/LeanPool/JacobianDiffgeo/MappingDegree/Basics.lean @@ -7,10 +7,13 @@ Authors: Rado Kirov /- Blueprint unit: mapping-degree. Basics: nonconstancy bridges, fibers, `fiberMultSum`. -/ -import LeanPool.JacobianDiffgeo.Surface -import LeanPool.JacobianDiffgeo.LocalMultiplicity -import Mathlib.Topology.DiscreteSubset -import Mathlib.Algebra.BigOperators.Finprod +module + +public import LeanPool.JacobianDiffgeo.LocalMultiplicity.Multiplicity +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Geometry.Manifold.ContMDiff.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Mapping-degree basics @@ -31,6 +34,8 @@ Surface perfectness (`(𝓝[≠] x).NeBot`) is NOT re-proved here: surfaces-and- provides the instance `RS.nhdsNE_neBot` for any `ChartedSpace ℂ` space. -/ +@[expose] public section + open Filter Set Function open scoped ContDiff Manifold Topology diff --git a/LeanPool/JacobianDiffgeo/MappingDegree/Covering.lean b/LeanPool/JacobianDiffgeo/MappingDegree/Covering.lean index 28ec15d620..7cc4c5c3e0 100644 --- a/LeanPool/JacobianDiffgeo/MappingDegree/Covering.lean +++ b/LeanPool/JacobianDiffgeo/MappingDegree/Covering.lean @@ -7,8 +7,14 @@ Authors: Rado Kirov /- Blueprint unit: mapping-degree. `F` is a covering map away from the (finite) branch locus. -/ -import LeanPool.JacobianDiffgeo.MappingDegree.Ramification -import Mathlib.Topology.Covering.Basic +module + +public import LeanPool.JacobianDiffgeo.MappingDegree.Ramification +public import Mathlib.Topology.Covering.Basic +import LeanPool.JacobianDiffgeo.LocalMultiplicity.Composition +import LeanPool.JacobianDiffgeo.MappingDegree.Basics +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Covering structure off the branch locus @@ -27,6 +33,8 @@ Downstream may further compose with mathlib's `IsCoveringMapOn.isCoveringMap_res with `Topology/Homotopy/Lifting.lean` for path/homotopy lifting — no extra exports needed here. -/ +@[expose] public section + open Filter Set Function open scoped ContDiff Manifold Topology diff --git a/LeanPool/JacobianDiffgeo/MappingDegree/Degree.lean b/LeanPool/JacobianDiffgeo/MappingDegree/Degree.lean index 8d7967d1ee..0e6ec3676d 100644 --- a/LeanPool/JacobianDiffgeo/MappingDegree/Degree.lean +++ b/LeanPool/JacobianDiffgeo/MappingDegree/Degree.lean @@ -8,9 +8,15 @@ Authors: Rado Kirov Blueprint unit: mapping-degree. The mapping degree, positivity/bounds, degree-1 ⇒ homeomorphism, and the (statement-bank) multiplicativity of degree under composition. -/ -import LeanPool.JacobianDiffgeo.MappingDegree.Ramification +module + +public import LeanPool.JacobianDiffgeo.MappingDegree.Ramification +public import LeanPool.JacobianDiffgeo.MappingDegree.Basics +import LeanPool.JacobianDiffgeo.LocalMultiplicity.Composition import LeanPool.JacobianDiffgeo.MappingDegree.LocalConstancy -import Mathlib.Topology.Homeomorph.Lemmas +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Geometry.Manifold.ContMDiff.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The mapping degree @@ -27,6 +33,8 @@ import Mathlib.Topology.Homeomorph.Lemmas `[CompactSpace Y]`, the only statement in the unit that does). -/ +@[expose] public section + open Filter Set Function open scoped ContDiff Manifold Topology diff --git a/LeanPool/JacobianDiffgeo/MappingDegree/LocalConstancy.lean b/LeanPool/JacobianDiffgeo/MappingDegree/LocalConstancy.lean index fa3e930d90..6918666482 100644 --- a/LeanPool/JacobianDiffgeo/MappingDegree/LocalConstancy.lean +++ b/LeanPool/JacobianDiffgeo/MappingDegree/LocalConstancy.lean @@ -7,9 +7,13 @@ Authors: Rado Kirov /- Blueprint unit: mapping-degree. Local constancy of `fiberMultSum` (heart, part 2). -/ +module + +public import LeanPool.JacobianDiffgeo.MappingDegree.LocalStructure +public import LeanPool.JacobianDiffgeo.MappingDegree.Basics import LeanPool.JacobianDiffgeo.MappingDegree.RootCounting -import LeanPool.JacobianDiffgeo.MappingDegree.LocalStructure -import Mathlib.Topology.LocallyConstant.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Local constancy of `fiberMultSum` (heart, part 2) @@ -28,6 +32,8 @@ connected `Y` — the well-definedness theorem for `degree`. `y : Y` (needs `[ConnectedSpace Y]`). -/ +@[expose] public section + open Filter Set Function open scoped ContDiff Manifold Topology diff --git a/LeanPool/JacobianDiffgeo/MappingDegree/LocalStructure.lean b/LeanPool/JacobianDiffgeo/MappingDegree/LocalStructure.lean index 75820bbe94..3d3d1bf914 100644 --- a/LeanPool/JacobianDiffgeo/MappingDegree/LocalStructure.lean +++ b/LeanPool/JacobianDiffgeo/MappingDegree/LocalStructure.lean @@ -7,7 +7,12 @@ Authors: Rado Kirov /- Blueprint unit: mapping-degree. FiberStack: adapted charts stacked over a whole fiber. -/ +module + +public import LeanPool.JacobianDiffgeo.LocalMultiplicity.AdaptedCharts import LeanPool.JacobianDiffgeo.MappingDegree.Basics +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The stack of adapted charts over a fiber (heart, part 1) @@ -26,6 +31,8 @@ import LeanPool.JacobianDiffgeo.MappingDegree.Basics `fiberMultSum` is locally constant. -/ +@[expose] public section + open Filter Set Function open scoped ContDiff Manifold Topology diff --git a/LeanPool/JacobianDiffgeo/MappingDegree/Ramification.lean b/LeanPool/JacobianDiffgeo/MappingDegree/Ramification.lean index 79bb88d903..592f902fcf 100644 --- a/LeanPool/JacobianDiffgeo/MappingDegree/Ramification.lean +++ b/LeanPool/JacobianDiffgeo/MappingDegree/Ramification.lean @@ -7,7 +7,14 @@ Authors: Rado Kirov /- Blueprint unit: mapping-degree. Ramification and branch loci are finite; regular values. -/ +module + +public import LeanPool.JacobianDiffgeo.LocalMultiplicity.Multiplicity +import LeanPool.JacobianDiffgeo.LocalMultiplicity.Composition import LeanPool.JacobianDiffgeo.MappingDegree.Basics +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Ramification locus, branch locus, regular values @@ -22,6 +29,8 @@ import LeanPool.JacobianDiffgeo.MappingDegree.Basics existence `RS.exists_isRegularValue`. -/ +@[expose] public section + open Filter Set Function open scoped ContDiff Manifold Topology diff --git a/LeanPool/JacobianDiffgeo/MappingDegree/RootCounting.lean b/LeanPool/JacobianDiffgeo/MappingDegree/RootCounting.lean index b3f2a1c190..24a85f2b2b 100644 --- a/LeanPool/JacobianDiffgeo/MappingDegree/RootCounting.lean +++ b/LeanPool/JacobianDiffgeo/MappingDegree/RootCounting.lean @@ -7,11 +7,12 @@ Authors: Rado Kirov /- Blueprint unit: mapping-degree. Planar root counting: total multiplicity of `z ↦ z ^ k` is `k`. -/ +module + +public import Mathlib.Analysis.Analytic.Order +public import Mathlib.Algebra.Polynomial.Roots +public import Mathlib.Analysis.Complex.Basic import Mathlib.RingTheory.RootsOfUnity.Complex -import Mathlib.Analysis.Analytic.Order -import Mathlib.Analysis.Calculus.Deriv.Pow -import Mathlib.Algebra.BigOperators.Finprod -import Mathlib.Data.Set.Card /-! # Planar root counting (mapping-degree, planar layer) @@ -32,6 +33,8 @@ This file has zero project imports; `LocalConstancy.lean` bridges `analyticOrder `RS.multiplicity` via local-multiplicity's chart invariance. -/ +@[expose] public section + open Filter Set Polynomial open scoped Topology diff --git a/LeanPool/JacobianDiffgeo/Meromorphic.lean b/LeanPool/JacobianDiffgeo/Meromorphic.lean index 720749d233..d802041560 100644 --- a/LeanPool/JacobianDiffgeo/Meromorphic.lean +++ b/LeanPool/JacobianDiffgeo/Meromorphic.lean @@ -3,16 +3,19 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Meromorphic.Predicates -import LeanPool.JacobianDiffgeo.Meromorphic.CodiscreteBridge -import LeanPool.JacobianDiffgeo.Meromorphic.GermSpace -import LeanPool.JacobianDiffgeo.Meromorphic.OrderEval -import LeanPool.JacobianDiffgeo.Meromorphic.Field -import LeanPool.JacobianDiffgeo.Meromorphic.Divisor -import LeanPool.JacobianDiffgeo.Meromorphic.LinearSystem -import LeanPool.JacobianDiffgeo.Meromorphic.Gluing -import LeanPool.JacobianDiffgeo.Meromorphic.LinSysMulEquiv +public import LeanPool.JacobianDiffgeo.Meromorphic.Predicates +public import LeanPool.JacobianDiffgeo.Meromorphic.CodiscreteBridge +public import LeanPool.JacobianDiffgeo.Meromorphic.GermSpace +public import LeanPool.JacobianDiffgeo.Meromorphic.OrderEval +public import LeanPool.JacobianDiffgeo.Meromorphic.Field +public import LeanPool.JacobianDiffgeo.Meromorphic.Divisor +public import LeanPool.JacobianDiffgeo.Meromorphic.LinearSystem +public import LeanPool.JacobianDiffgeo.Meromorphic.Gluing +public import LeanPool.JacobianDiffgeo.Meromorphic.LinSysMulEquiv +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # meromorphic-and-divisors (CC2/CC3): junk-free `ℳ(X)`, divisors, `L(D)` (namespace `RS`) @@ -54,3 +57,5 @@ API summary (see `docs/design/meromorphic-and-divisors.md`): Every export listed in the design doc §4.1–§4.7 and the six hard proof plans (§6.1–§6.7, including gluing) is proved; zero sorries. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/Meromorphic/CodiscreteBridge.lean b/LeanPool/JacobianDiffgeo/Meromorphic/CodiscreteBridge.lean index 2010766029..40945324b2 100644 --- a/LeanPool/JacobianDiffgeo/Meromorphic/CodiscreteBridge.lean +++ b/LeanPool/JacobianDiffgeo/Meromorphic/CodiscreteBridge.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Meromorphic.Predicates +public import LeanPool.JacobianDiffgeo.Meromorphic.Predicates +import LeanPool.JacobianDiffgeo.Surface.Bridges import LeanPool.JacobianDiffgeo.Surface.Identity -import Mathlib.Topology.DiscreteSubset +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The codiscrete ⇄ punctured-neighborhood bridge (D2) and the identity dichotomy @@ -25,6 +28,8 @@ Unit: meromorphic-and-divisors (`docs/design/meromorphic-and-divisors.md` §4.2, `Field (ℳ X)` and `divisor` well-definedness. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology diff --git a/LeanPool/JacobianDiffgeo/Meromorphic/Divisor.lean b/LeanPool/JacobianDiffgeo/Meromorphic/Divisor.lean index 24b7f527ae..c268f44d14 100644 --- a/LeanPool/JacobianDiffgeo/Meromorphic/Divisor.lean +++ b/LeanPool/JacobianDiffgeo/Meromorphic/Divisor.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Meromorphic.Field -import Mathlib.Topology.LocallyFinsupp +public import LeanPool.JacobianDiffgeo.Meromorphic.Field +public import Mathlib.Topology.LocallyFinsupp +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Divisors (CC2) and the divisor map `divisor : ℳ X → Divisor X` (CC3) @@ -24,6 +27,8 @@ Unit: meromorphic-and-divisors (`docs/design/meromorphic-and-divisors.md` §4.6, `finite_setOf_ord_neg/pos`, `eventually_ord_eq_zero`). -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology diff --git a/LeanPool/JacobianDiffgeo/Meromorphic/Field.lean b/LeanPool/JacobianDiffgeo/Meromorphic/Field.lean index 1a80429871..e55c3af465 100644 --- a/LeanPool/JacobianDiffgeo/Meromorphic/Field.lean +++ b/LeanPool/JacobianDiffgeo/Meromorphic/Field.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Meromorphic.OrderEval +public import LeanPool.JacobianDiffgeo.Meromorphic.OrderEval +import LeanPool.JacobianDiffgeo.Meromorphic.CodiscreteBridge +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `Field (ℳ X)` and pointwise inverse (CC3, proof plan §6.2) @@ -17,6 +21,8 @@ Unit: meromorphic-and-divisors (`docs/design/meromorphic-and-divisors.md` §4.5) zero class (`Mero.ord_eq_top_iff`) and gives `mul_inv_cancel₀`, assembling `Field (ℳ X)`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology diff --git a/LeanPool/JacobianDiffgeo/Meromorphic/GermSpace.lean b/LeanPool/JacobianDiffgeo/Meromorphic/GermSpace.lean index 7dbb541c82..cd353e326d 100644 --- a/LeanPool/JacobianDiffgeo/Meromorphic/GermSpace.lean +++ b/LeanPool/JacobianDiffgeo/Meromorphic/GermSpace.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import Mathlib.Order.Filter.Germ.Basic +public import LeanPool.JacobianDiffgeo.Meromorphic.Predicates import LeanPool.JacobianDiffgeo.Meromorphic.CodiscreteBridge -import Mathlib.Order.Filter.Germ.Basic +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The germ space `MeroGermOn X U` and `ℳ X` (CC3, D1/D6) @@ -24,6 +29,8 @@ Unit: meromorphic-and-divisors (`docs/design/meromorphic-and-divisors.md` §4.3, maps), with `restrict_mk`, `restrict_restrict`, `restrict_id`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology diff --git a/LeanPool/JacobianDiffgeo/Meromorphic/Gluing.lean b/LeanPool/JacobianDiffgeo/Meromorphic/Gluing.lean index b0400f8a70..ef1583c2c2 100644 --- a/LeanPool/JacobianDiffgeo/Meromorphic/Gluing.lean +++ b/LeanPool/JacobianDiffgeo/Meromorphic/Gluing.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Meromorphic.GermSpace +import LeanPool.JacobianDiffgeo.Meromorphic.CodiscreteBridge import LeanPool.JacobianDiffgeo.Meromorphic.OrderEval +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Sheaf gluing for `MeroGermOn` (§6.6): the Čech `H⁰` engine @@ -17,6 +22,8 @@ Unit: meromorphic-and-divisors (`docs/design/meromorphic-and-divisors.md` §4.4, * `MeroGermOn.glue_unique`: the glued class is unique. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology diff --git a/LeanPool/JacobianDiffgeo/Meromorphic/LinSysMulEquiv.lean b/LeanPool/JacobianDiffgeo/Meromorphic/LinSysMulEquiv.lean index 6c0f082391..1cbc140000 100644 --- a/LeanPool/JacobianDiffgeo/Meromorphic/LinSysMulEquiv.lean +++ b/LeanPool/JacobianDiffgeo/Meromorphic/LinSysMulEquiv.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Meromorphic.LinearSystem +public import LeanPool.JacobianDiffgeo.Meromorphic.LinearSystem +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Multiplication linear equivalence for `L(D)` (design §6.7, closing the documented gap) @@ -14,6 +17,8 @@ multiplication by `φ` is a `ℂ`-linear equivalence `L(D) ≃ₗ L(D - divisor vocabulary; riemann-roch's lattice tool). -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology diff --git a/LeanPool/JacobianDiffgeo/Meromorphic/LinearSystem.lean b/LeanPool/JacobianDiffgeo/Meromorphic/LinearSystem.lean index 2b6f5c6c2b..d63c3f8809 100644 --- a/LeanPool/JacobianDiffgeo/Meromorphic/LinearSystem.lean +++ b/LeanPool/JacobianDiffgeo/Meromorphic/LinearSystem.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Meromorphic.Divisor +public import LeanPool.JacobianDiffgeo.Meromorphic.Divisor +import Mathlib.Combinatorics.Matroid.Init import Mathlib.Geometry.Manifold.Complex +import Mathlib.Geometry.Manifold.MFDeriv.Basic /-! # The linear system `L(D)` and `l(D)` (CC3, D4) @@ -29,6 +32,8 @@ bookkeeping for the two-sided bound is more delicate than the time budget allowe final report for the precise missing step. Everything else in §4.7 is proved. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology diff --git a/LeanPool/JacobianDiffgeo/Meromorphic/OrderEval.lean b/LeanPool/JacobianDiffgeo/Meromorphic/OrderEval.lean index d845c6d9fa..5db285c10d 100644 --- a/LeanPool/JacobianDiffgeo/Meromorphic/OrderEval.lean +++ b/LeanPool/JacobianDiffgeo/Meromorphic/OrderEval.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Meromorphic.GermSpace +public import LeanPool.JacobianDiffgeo.Meromorphic.GermSpace +import LeanPool.JacobianDiffgeo.Meromorphic.CodiscreteBridge +import LeanPool.JacobianDiffgeo.Surface.Bridges +import LeanPool.JacobianDiffgeo.Surface.Identity import Mathlib.Analysis.Meromorphic.NormalForm +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Geometry.Manifold.ContMDiff.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Order, canonical value, and `holoRepr` on germ classes (CC3, D3/D5) @@ -22,6 +29,8 @@ Unit: meromorphic-and-divisors (`docs/design/meromorphic-and-divisors.md` §4.4, it recovers `φ` as a class. This is the rigidified normal form the blueprint needs for Čech. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology diff --git a/LeanPool/JacobianDiffgeo/Meromorphic/Predicates.lean b/LeanPool/JacobianDiffgeo/Meromorphic/Predicates.lean index 7b604b26e3..bf05f09170 100644 --- a/LeanPool/JacobianDiffgeo/Meromorphic/Predicates.lean +++ b/LeanPool/JacobianDiffgeo/Meromorphic/Predicates.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import Mathlib.Analysis.Meromorphic.Basic -import Mathlib.Analysis.Meromorphic.Order -import Mathlib.Analysis.Meromorphic.IsolatedZeros +public import LeanPool.JacobianDiffgeo.LocalMultiplicity.Multiplicity import LeanPool.JacobianDiffgeo.Surface.Bridges -import LeanPool.JacobianDiffgeo.LocalMultiplicity.ChartBridge -import LeanPool.JacobianDiffgeo.LocalMultiplicity.Multiplicity +import Mathlib.Analysis.Meromorphic.IsolatedZeros +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Meromorphic predicates and orders on a Riemann surface (CC3, chart layer) @@ -27,6 +26,8 @@ Unit: meromorphic-and-divisors (`docs/design/meromorphic-and-divisors.md` §4.1) (and back); every other transport lemma in this file is a one-line specialization of it. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology diff --git a/LeanPool/JacobianDiffgeo/MeromorphicTrace.lean b/LeanPool/JacobianDiffgeo/MeromorphicTrace.lean index 9bfe7da1fe..0b4cd03121 100644 --- a/LeanPool/JacobianDiffgeo/MeromorphicTrace.lean +++ b/LeanPool/JacobianDiffgeo/MeromorphicTrace.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.MeromorphicTrace.ToP1 -import LeanPool.JacobianDiffgeo.MeromorphicTrace.OrderMultiplicity -import LeanPool.JacobianDiffgeo.MeromorphicTrace.ArgumentPrinciple -import LeanPool.JacobianDiffgeo.MeromorphicTrace.PlanarTrace -import LeanPool.JacobianDiffgeo.MeromorphicTrace.FunctionTrace +public import LeanPool.JacobianDiffgeo.MeromorphicTrace.ToP1 +public import LeanPool.JacobianDiffgeo.MeromorphicTrace.OrderMultiplicity +public import LeanPool.JacobianDiffgeo.MeromorphicTrace.ArgumentPrinciple +public import LeanPool.JacobianDiffgeo.MeromorphicTrace.PlanarTrace +public import LeanPool.JacobianDiffgeo.MeromorphicTrace.FunctionTrace +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # meromorphic-trace: the argument principle and the fibre trace of functions (namespace `RS.MTrace`) @@ -79,3 +82,5 @@ API summary (see `docs/design/meromorphic-trace.md`). Standing surface hypothese * **laurent-tails (CC8)**: no direct edge (per the design, nothing here is laurent-tails-facing beyond what `residue-calculus`/`form-trace-tower` already mediate). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/MeromorphicTrace/ArgumentPrinciple.lean b/LeanPool/JacobianDiffgeo/MeromorphicTrace/ArgumentPrinciple.lean index ed41a9de9c..4077dc300b 100644 --- a/LeanPool/JacobianDiffgeo/MeromorphicTrace/ArgumentPrinciple.lean +++ b/LeanPool/JacobianDiffgeo/MeromorphicTrace/ArgumentPrinciple.lean @@ -7,8 +7,14 @@ Authors: Rado Kirov /- Blueprint unit: meromorphic-trace. THE argument principle, file 3 of the design's 6-file plan. -/ +module + +public import LeanPool.JacobianDiffgeo.MappingDegree.Degree +public import LeanPool.JacobianDiffgeo.MeromorphicTrace.ToP1 import LeanPool.JacobianDiffgeo.MeromorphicTrace.OrderMultiplicity -import LeanPool.JacobianDiffgeo.MappingDegree.Degree +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The argument principle (meromorphic-trace, cluster 1) @@ -30,6 +36,8 @@ design's routing warning; `proper-map-degree` needs the counting route, not a ge route). -/ +@[expose] public section + open scoped ContDiff Manifold OnePoint open Filter Set Function Topology diff --git a/LeanPool/JacobianDiffgeo/MeromorphicTrace/FunctionTrace.lean b/LeanPool/JacobianDiffgeo/MeromorphicTrace/FunctionTrace.lean index ddf66d2397..31070587a9 100644 --- a/LeanPool/JacobianDiffgeo/MeromorphicTrace/FunctionTrace.lean +++ b/LeanPool/JacobianDiffgeo/MeromorphicTrace/FunctionTrace.lean @@ -8,10 +8,15 @@ Authors: Rado Kirov Blueprint unit: meromorphic-trace. `Tr_F h`: the global assembly, file 5 of the design's 6-file plan. -/ -import LeanPool.JacobianDiffgeo.MeromorphicTrace.PlanarTrace -import LeanPool.JacobianDiffgeo.MeromorphicTrace.OrderMultiplicity -import LeanPool.JacobianDiffgeo.MappingDegree.LocalStructure -import LeanPool.JacobianDiffgeo.MappingDegree.Ramification +module + +public import LeanPool.JacobianDiffgeo.MeromorphicTrace.PlanarTrace +public import LeanPool.JacobianDiffgeo.MappingDegree.LocalStructure +public import LeanPool.JacobianDiffgeo.MappingDegree.Ramification +public import LeanPool.JacobianDiffgeo.Meromorphic.Predicates +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `Tr_F h`: the surface-level fibre trace (meromorphic-trace, cluster 2) @@ -47,7 +52,9 @@ needed on `Y` itself). stability, though `trace_eq_finsum'` proves the identity at every point.) -/ -open scoped ContDiff Manifold OnePoint +@[expose] public section + +open scoped ContDiff Manifold open Filter Set Function Topology namespace RS.MTrace diff --git a/LeanPool/JacobianDiffgeo/MeromorphicTrace/OrderMultiplicity.lean b/LeanPool/JacobianDiffgeo/MeromorphicTrace/OrderMultiplicity.lean index a78d09cd0d..102b91f917 100644 --- a/LeanPool/JacobianDiffgeo/MeromorphicTrace/OrderMultiplicity.lean +++ b/LeanPool/JacobianDiffgeo/MeromorphicTrace/OrderMultiplicity.lean @@ -8,8 +8,13 @@ Authors: Rado Kirov Blueprint unit: meromorphic-trace. Order↔multiplicity bridges (zero and pole cases), file 2 of the design's 6-file plan. -/ -import LeanPool.JacobianDiffgeo.MeromorphicTrace.ToP1 -import LeanPool.JacobianDiffgeo.LocalMultiplicity.Multiplicity +module + +public import LeanPool.JacobianDiffgeo.MeromorphicTrace.ToP1 +import LeanPool.JacobianDiffgeo.Surface.Bridges +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Order↔multiplicity bridges (meromorphic-trace, cluster 1) @@ -40,6 +45,8 @@ this lemma as a non-essential "cheap corollary... even though we do not need it dropped rather than patched into a different (correct) statement under the same name. -/ +@[expose] public section + open scoped ContDiff Manifold OnePoint open Filter Set Function Topology diff --git a/LeanPool/JacobianDiffgeo/MeromorphicTrace/PlanarTrace.lean b/LeanPool/JacobianDiffgeo/MeromorphicTrace/PlanarTrace.lean index 51b4bbe639..7c76d8eb17 100644 --- a/LeanPool/JacobianDiffgeo/MeromorphicTrace/PlanarTrace.lean +++ b/LeanPool/JacobianDiffgeo/MeromorphicTrace/PlanarTrace.lean @@ -8,14 +8,14 @@ Authors: Rado Kirov Blueprint unit: meromorphic-trace. The planar trace atom `traceZk h k w` (trace of `h` along `z ↦ z ^ k`), file 4 of the design's 6-file plan. -/ +module + +public import LeanPool.JacobianDiffgeo.MappingDegree.RootCounting +public import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue +public import Mathlib.Analysis.InnerProductSpace.Basic +import LeanPool.JacobianDiffgeo.LocalMultiplicity.KthRoot import Mathlib.Analysis.Complex.RemovableSingularity -import Mathlib.Analysis.Complex.CauchyIntegral import Mathlib.RingTheory.RootsOfUnity.Complex -import Mathlib.RingTheory.RootsOfUnity.PrimitiveRoots -import Mathlib.Algebra.Field.GeomSum -import LeanPool.JacobianDiffgeo.MappingDegree.RootCounting -import LeanPool.JacobianDiffgeo.LocalMultiplicity.KthRoot -import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue /-! # The planar trace atom `traceZk` (meromorphic-trace, cluster 2) @@ -46,6 +46,8 @@ manifold content, independent of `ToP1`/`OrderMultiplicity`/`ArgumentPrinciple`. monomials, and residue-calculus's presentation-independent `laurentCoeffAt` characterization. -/ +@[expose] public section + open Filter Set Topology Metric Function namespace RS.MTrace diff --git a/LeanPool/JacobianDiffgeo/MeromorphicTrace/ToP1.lean b/LeanPool/JacobianDiffgeo/MeromorphicTrace/ToP1.lean index e7004a6f0a..55e8445b9e 100644 --- a/LeanPool/JacobianDiffgeo/MeromorphicTrace/ToP1.lean +++ b/LeanPool/JacobianDiffgeo/MeromorphicTrace/ToP1.lean @@ -8,8 +8,15 @@ Authors: Rado Kirov Blueprint unit: meromorphic-trace. The `toP1` bridge: meromorphic function → holomorphic map to `ℙ¹`, file 1 of the design's 6-file plan. -/ -import LeanPool.JacobianDiffgeo.Meromorphic.OrderEval +module + +public import LeanPool.JacobianDiffgeo.Meromorphic.OrderEval +public import LeanPool.JacobianDiffgeo.ProjectiveLine.Charts +import LeanPool.JacobianDiffgeo.Meromorphic.CodiscreteBridge import LeanPool.JacobianDiffgeo.ProjectiveLine.Holomorphy +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `toP1`: the `f`-to-`ℙ¹` bridge (meromorphic-trace, cluster 1) @@ -34,6 +41,8 @@ surface hypotheses throughout (`CONVENTIONS.md`). nonconstant `toP1 f`. -/ +@[expose] public section + open scoped ContDiff Manifold OnePoint open Filter Set Function Topology diff --git a/LeanPool/JacobianDiffgeo/Monodromy.lean b/LeanPool/JacobianDiffgeo/Monodromy.lean index 98d9abbdd9..a132429ef6 100644 --- a/LeanPool/JacobianDiffgeo/Monodromy.lean +++ b/LeanPool/JacobianDiffgeo/Monodromy.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Monodromy.OpenLocus -import LeanPool.JacobianDiffgeo.Monodromy.LogContinuation +public import LeanPool.JacobianDiffgeo.Monodromy.OpenLocus +public import LeanPool.JacobianDiffgeo.Monodromy.LogContinuation +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # monodromy (namespace `RS.Monodromy`) @@ -71,3 +75,5 @@ type, which does not exist on disk yet, and no currently-designed consumer needs solutions` needs only the function-level `dlog f` case above). See `docs/design/monodromy.md` §5 for the sketch, should a future unit ever need it. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/Monodromy/LogContinuation.lean b/LeanPool/JacobianDiffgeo/Monodromy/LogContinuation.lean index 2e446bdf4e..0c26d43892 100644 --- a/LeanPool/JacobianDiffgeo/Monodromy/LogContinuation.lean +++ b/LeanPool/JacobianDiffgeo/Monodromy/LogContinuation.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Monodromy.OpenLocus -import LeanPool.JacobianDiffgeo.Meromorphic -import Mathlib.Geometry.Manifold.Algebra.LieGroup +public import LeanPool.JacobianDiffgeo.Monodromy.OpenLocus +public import LeanPool.JacobianDiffgeo.Forms.MDifferential +public import LeanPool.JacobianDiffgeo.Meromorphic.Divisor +public import LeanPool.JacobianDiffgeo.Path.Continuation +public import Mathlib.Analysis.Complex.Exponential +import LeanPool.JacobianDiffgeo.Path.Planar +import LeanPool.JacobianDiffgeo.Surface.Bridges +import Mathlib.Analysis.Meromorphic.NormalForm +import Mathlib.Analysis.SpecialFunctions.ExpDeriv +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `monodromy`: continuation of `log f` along pole/zero-avoiding paths @@ -43,6 +53,8 @@ Main declarations: existence/uniqueness API). -/ +@[expose] public section + open scoped ContDiff Manifold Topology open Set Filter TopologicalSpace diff --git a/LeanPool/JacobianDiffgeo/Monodromy/OpenLocus.lean b/LeanPool/JacobianDiffgeo/Monodromy/OpenLocus.lean index d00ef97d8c..a577038c1e 100644 --- a/LeanPool/JacobianDiffgeo/Monodromy/OpenLocus.lean +++ b/LeanPool/JacobianDiffgeo/Monodromy/OpenLocus.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Path -import Mathlib.Geometry.Manifold.IsManifold.Basic +public import Mathlib.Analysis.Complex.Basic + +public import Mathlib.Geometry.Manifold.IsManifold.Basic +public import Mathlib.Basic.Complex.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `monodromy`: the open pole/zero-free locus as a Riemann surface @@ -26,6 +31,8 @@ Main declarations: in the open locus; `RS.Monodromy.Path.liftOpenLocus_extend` recovers `γ.extend` pointwise. -/ +@[expose] public section + open scoped ContDiff Manifold open TopologicalSpace Set diff --git a/LeanPool/JacobianDiffgeo/Path.lean b/LeanPool/JacobianDiffgeo/Path.lean index cbac6aff41..8f2ba1e22c 100644 --- a/LeanPool/JacobianDiffgeo/Path.lean +++ b/LeanPool/JacobianDiffgeo/Path.lean @@ -3,15 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Path.Planar -import LeanPool.JacobianDiffgeo.Path.LocalPrimitive -import LeanPool.JacobianDiffgeo.Path.Chain -import LeanPool.JacobianDiffgeo.Path.Continuation -import LeanPool.JacobianDiffgeo.Path.Bridge -import LeanPool.JacobianDiffgeo.Path.HomotopySquare -import LeanPool.JacobianDiffgeo.Path.Periods -import LeanPool.JacobianDiffgeo.Path.Perturb +public import LeanPool.JacobianDiffgeo.Path.Planar +public import LeanPool.JacobianDiffgeo.Path.LocalPrimitive +public import LeanPool.JacobianDiffgeo.Path.Chain +public import LeanPool.JacobianDiffgeo.Path.Continuation +public import LeanPool.JacobianDiffgeo.Path.Bridge +public import LeanPool.JacobianDiffgeo.Path.HomotopySquare +public import LeanPool.JacobianDiffgeo.Path.Periods +public import LeanPool.JacobianDiffgeo.Path.Perturb /-! # paths-and-integrals (CC6): integration of holomorphic 1-forms along continuous paths @@ -72,3 +73,5 @@ No `T2Space`/`CompactSpace`/`ConnectedSpace` anywhere in this unit (compactness `[0,1]²` does all the work). No dependency on `Jacobian.Surface` (the `chartAt`-chart trick in the bridge/FTC lemma removes the only candidate dependency). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/Path/Bridge.lean b/LeanPool/JacobianDiffgeo/Path/Bridge.lean index c1c7df2a36..03230bfee3 100644 --- a/LeanPool/JacobianDiffgeo/Path/Bridge.lean +++ b/LeanPool/JacobianDiffgeo/Path/Bridge.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Path.Continuation -import LeanPool.JacobianDiffgeo.Forms.MDifferential +public import LeanPool.JacobianDiffgeo.Path.Continuation +public import LeanPool.JacobianDiffgeo.Forms.MDifferential +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import LeanPool.JacobianDiffgeo.Surface.Bridges import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus /-! @@ -25,6 +28,8 @@ Main declarations: * `RS.pathIntegral_mdifferential` — FTC along a continuous path for `d f`. -/ +@[expose] public section + open scoped ContDiff Manifold Topology open IsManifold Metric Set Filter MeasureTheory diff --git a/LeanPool/JacobianDiffgeo/Path/Chain.lean b/LeanPool/JacobianDiffgeo/Path/Chain.lean index 0d8d2fe6eb..5a432afa5c 100644 --- a/LeanPool/JacobianDiffgeo/Path/Chain.lean +++ b/LeanPool/JacobianDiffgeo/Path/Chain.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Path.LocalPrimitive -import Mathlib.Topology.UnitInterval +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Geometry.Manifold.IsManifold.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `ChartChain`: a Lebesgue-number chart subdivision along a path (CC6) @@ -20,6 +22,8 @@ Main declarations: * `RS.exists_chartChain` — existence, for any continuous path `γ`. -/ +@[expose] public section + open scoped ContDiff Manifold Topology unitInterval open IsManifold Metric Set Filter diff --git a/LeanPool/JacobianDiffgeo/Path/Continuation.lean b/LeanPool/JacobianDiffgeo/Path/Continuation.lean index 204514e8df..48d3ec0a5e 100644 --- a/LeanPool/JacobianDiffgeo/Path/Continuation.lean +++ b/LeanPool/JacobianDiffgeo/Path/Continuation.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Path.LocalPrimitive +import LeanPool.JacobianDiffgeo.Forms.Analyticity import LeanPool.JacobianDiffgeo.Path.Chain -import Mathlib.Topology.Order.ProjIcc +import LeanPool.JacobianDiffgeo.Path.Planar +import Mathlib.Analysis.Calculus.Deriv.Add +import Mathlib.Analysis.Calculus.Deriv.Mul +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Existence, `pathIntegral`, path algebra and linearity (CC6) @@ -21,6 +27,8 @@ Main declarations: * `RS.pathIntegral_add/smul/zero_form`, `RS.pathIntegralₗ`. -/ +@[expose] public section + open scoped ContDiff Manifold Topology unitInterval open IsManifold Metric Set Filter diff --git a/LeanPool/JacobianDiffgeo/Path/HomotopySquare.lean b/LeanPool/JacobianDiffgeo/Path/HomotopySquare.lean index cc7ad5ff6a..b53782ab6d 100644 --- a/LeanPool/JacobianDiffgeo/Path/HomotopySquare.lean +++ b/LeanPool/JacobianDiffgeo/Path/HomotopySquare.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Path.Continuation -import Mathlib.AlgebraicTopology.FundamentalGroupoid.SimplyConnected +public import LeanPool.JacobianDiffgeo.Path.Continuation +public import Mathlib.AlgebraicTopology.FundamentalGroupoid.SimplyConnected +import LeanPool.JacobianDiffgeo.Forms.Analyticity +import LeanPool.JacobianDiffgeo.Path.Planar +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Homotopy invariance: the 2D grid argument (CC6) @@ -23,6 +27,8 @@ Main declarations: `RS.pathIntegral_eq_of_simplyConnected`, `RS.period_eq_zero_of_homotopic_refl`. -/ +@[expose] public section + open scoped ContDiff Manifold Topology unitInterval open IsManifold Metric Set Filter diff --git a/LeanPool/JacobianDiffgeo/Path/LocalPrimitive.lean b/LeanPool/JacobianDiffgeo/Path/LocalPrimitive.lean index f469a23790..102db7c95b 100644 --- a/LeanPool/JacobianDiffgeo/Path/LocalPrimitive.lean +++ b/LeanPool/JacobianDiffgeo/Path/LocalPrimitive.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Forms.Coeffs +public import LeanPool.JacobianDiffgeo.Forms.Coeffs +public import Mathlib.Analysis.InnerProductSpace.Basic import LeanPool.JacobianDiffgeo.Forms.Analyticity import LeanPool.JacobianDiffgeo.Path.Planar +import Mathlib.Analysis.Calculus.Deriv.Add +import Mathlib.MeasureTheory.Integral.Bochner.Basic import Mathlib.Topology.LocallyConstant.Basic /-! @@ -32,6 +36,8 @@ Main declarations: (`Continuation.lean`) and the 2D grid (`HomotopySquare.lean`). -/ +@[expose] public section + open scoped ContDiff Manifold Topology open IsManifold Metric Set Filter diff --git a/LeanPool/JacobianDiffgeo/Path/Periods.lean b/LeanPool/JacobianDiffgeo/Path/Periods.lean index b17eec22fe..f7f7d00e77 100644 --- a/LeanPool/JacobianDiffgeo/Path/Periods.lean +++ b/LeanPool/JacobianDiffgeo/Path/Periods.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Path.Continuation +public import Mathlib.Topology.Homotopy.Path import LeanPool.JacobianDiffgeo.Path.HomotopySquare -import Mathlib.LinearAlgebra.Basis.Defs +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Periods of a holomorphic 1-form along a loop (CC6) @@ -23,6 +26,8 @@ Main declarations: `periodVector_trans/symm/refl`. -/ +@[expose] public section + open scoped ContDiff Manifold open IsManifold Module diff --git a/LeanPool/JacobianDiffgeo/Path/Perturb.lean b/LeanPool/JacobianDiffgeo/Path/Perturb.lean index 1302b818ad..25a0cea644 100644 --- a/LeanPool/JacobianDiffgeo/Path/Perturb.lean +++ b/LeanPool/JacobianDiffgeo/Path/Perturb.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Geometry.Manifold.IsManifold.Basic +public import Mathlib.Topology.Homotopy.Path import LeanPool.JacobianDiffgeo.Path.Chain +import LeanPool.JacobianDiffgeo.Path.Planar import Mathlib.AlgebraicTopology.FundamentalGroupoid.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Topology.Algebra.Module.Cardinality /-! # Perturbing a path off a finite set (CC6) @@ -23,6 +30,8 @@ Main declarations: one avoiding `S` entirely. -/ +@[expose] public section + open scoped ContDiff Manifold Topology unitInterval open IsManifold Metric Set Filter diff --git a/LeanPool/JacobianDiffgeo/Path/Planar.lean b/LeanPool/JacobianDiffgeo/Path/Planar.lean index edf33996bc..e932aeb59b 100644 --- a/LeanPool/JacobianDiffgeo/Path/Planar.lean +++ b/LeanPool/JacobianDiffgeo/Path/Planar.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import Mathlib.Topology.Homotopy.Path +public import Mathlib.Analysis.Analytic.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Topology.Algebra.Module.ModuleTopology import Mathlib.Analysis.Complex.HasPrimitives -import Mathlib.Analysis.Calculus.MeanValue -import Mathlib.Analysis.Normed.Module.Connected import Mathlib.LinearAlgebra.Complex.FiniteDimensional -import Mathlib.Topology.Homotopy.Path -import Mathlib.Analysis.Convex.Segment +import Mathlib.Topology.Algebra.Module.Cardinality /-! # Planar atoms for paths-and-integrals (CC6) @@ -30,6 +33,8 @@ Main declarations: convex planar set are homotopic rel endpoints through the set (affine homotopy). -/ +@[expose] public section + noncomputable section namespace RS diff --git a/LeanPool/JacobianDiffgeo/PeriodLattice.lean b/LeanPool/JacobianDiffgeo/PeriodLattice.lean index 249868a318..d6e868e3a9 100644 --- a/LeanPool/JacobianDiffgeo/PeriodLattice.lean +++ b/LeanPool/JacobianDiffgeo/PeriodLattice.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.PeriodLattice.Membership -import LeanPool.JacobianDiffgeo.PeriodLattice.GenericPoints -import LeanPool.JacobianDiffgeo.PeriodLattice.Segment -import LeanPool.JacobianDiffgeo.PeriodLattice.FormIdentity -import LeanPool.JacobianDiffgeo.PeriodLattice.Nondegeneracy -import LeanPool.JacobianDiffgeo.PeriodLattice.Discreteness -import LeanPool.JacobianDiffgeo.PeriodLattice.FullRank +public import LeanPool.JacobianDiffgeo.PeriodLattice.Membership +public import LeanPool.JacobianDiffgeo.PeriodLattice.GenericPoints +public import LeanPool.JacobianDiffgeo.PeriodLattice.Segment +public import LeanPool.JacobianDiffgeo.PeriodLattice.FormIdentity +public import LeanPool.JacobianDiffgeo.PeriodLattice.Nondegeneracy +public import LeanPool.JacobianDiffgeo.PeriodLattice.Discreteness +public import LeanPool.JacobianDiffgeo.PeriodLattice.FullRank +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # period-lattice-rank: the period lattice is discrete and spans (Forster §21.1–21.4) @@ -108,3 +112,5 @@ leaf apart from final assembly), except that `periodSubgroup_topologicalClosure_ direct interest to `abel-theorem`'s `ofCurve_inj`/`ofCurve_eq_of_path` consumers, who want to strip `.topologicalClosure` from `Jac₀`'s defining quotient once discreteness is unconditional. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/PeriodLattice/Discreteness.lean b/LeanPool/JacobianDiffgeo/PeriodLattice/Discreteness.lean index 1713611c67..f06cd6411b 100644 --- a/LeanPool/JacobianDiffgeo/PeriodLattice/Discreteness.lean +++ b/LeanPool/JacobianDiffgeo/PeriodLattice/Discreteness.lean @@ -3,14 +3,19 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Abel.Sufficiency +import LeanPool.JacobianDiffgeo.Path.Planar import LeanPool.JacobianDiffgeo.PeriodLattice.GenericPoints +import LeanPool.JacobianDiffgeo.PeriodLattice.Membership import LeanPool.JacobianDiffgeo.PeriodLattice.Segment -import LeanPool.JacobianDiffgeo.Abel -import LeanPool.JacobianDiffgeo.CanonicalForms -import LeanPool.JacobianDiffgeo.ResidueTheorem -import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv -import Mathlib.Analysis.Calculus.InverseFunctionTheorem.FDeriv +import LeanPool.JacobianDiffgeo.ResidueTheorem.MFormCompat +import LeanPool.JacobianDiffgeo.ResidueTheorem.Unconditional +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Discreteness of the period subgroup (Forster 21.4(a)+(b)) @@ -28,6 +33,8 @@ Main declarations: `RS.exists_isolating_nhds_periodSubgroup`, `RS.discreteTopolo `RS.periodSubgroup_topologicalClosure_eq`, `RS.discreteTopology_periodSubgroup_topologicalClosure`. -/ +@[expose] public section + open scoped ContDiff Manifold Topology open Set Filter Metric IsManifold diff --git a/LeanPool/JacobianDiffgeo/PeriodLattice/FormIdentity.lean b/LeanPool/JacobianDiffgeo/PeriodLattice/FormIdentity.lean index 1ad57fad3f..5aa5cacba1 100644 --- a/LeanPool/JacobianDiffgeo/PeriodLattice/FormIdentity.lean +++ b/LeanPool/JacobianDiffgeo/PeriodLattice/FormIdentity.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.PeriodLattice.GenericPoints +public import LeanPool.JacobianDiffgeo.Forms.Coeffs +public import Mathlib.Analysis.InnerProductSpace.Basic +import LeanPool.JacobianDiffgeo.Forms.Analyticity import Mathlib.Analysis.Analytic.Uniqueness +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Identity theorem for 1-form coefficients (§6.4) @@ -18,6 +23,8 @@ whole neighborhood, `η = 0` identically. Needed by `Nondegeneracy.lean`'s maxim Main declaration: `RS.form1_eq_zero_of_eventually_coeffIn_zero`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology Metric IsManifold diff --git a/LeanPool/JacobianDiffgeo/PeriodLattice/FullRank.lean b/LeanPool/JacobianDiffgeo/PeriodLattice/FullRank.lean index b52aa9b52c..98404a1f12 100644 --- a/LeanPool/JacobianDiffgeo/PeriodLattice/FullRank.lean +++ b/LeanPool/JacobianDiffgeo/PeriodLattice/FullRank.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.PeriodLattice.Discreteness +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Basic import LeanPool.JacobianDiffgeo.PeriodLattice.Nondegeneracy -import LeanPool.JacobianDiffgeo.PeriodLattice.Discreteness -import LeanPool.JacobianDiffgeo.JacobianConstruction.Basic -import Mathlib.LinearAlgebra.Dual.Lemmas +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init import Mathlib.LinearAlgebra.Complex.FiniteDimensional +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Full rank and the `IsZLattice` discharge (Forster 21.4(c) shell, §6.6) @@ -27,6 +30,8 @@ Main declarations: `RS.span_real_periodSubgroup`, `RS.isZLattice_periodSubgroup_ `RS.finrank_int_periodSubgroup`. -/ +@[expose] public section + open scoped ContDiff Manifold noncomputable section diff --git a/LeanPool/JacobianDiffgeo/PeriodLattice/GenericPoints.lean b/LeanPool/JacobianDiffgeo/PeriodLattice/GenericPoints.lean index 1539622290..b7e3d355b2 100644 --- a/LeanPool/JacobianDiffgeo/PeriodLattice/GenericPoints.lean +++ b/LeanPool/JacobianDiffgeo/PeriodLattice/GenericPoints.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.PeriodLattice.Membership -import LeanPool.JacobianDiffgeo.Path.Perturb +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Periods import LeanPool.JacobianDiffgeo.LocalMultiplicity.ChartBridge -import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv -import Mathlib.Data.Fintype.EquivFin +import LeanPool.JacobianDiffgeo.Path.Perturb +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Generic points (Forster §21.3) @@ -23,6 +24,8 @@ Main declarations: `RS.isOpen_coeffAt_ne_zero`, `RS.exists_coeffAt_ne_zero_notMe `RS.exists_genericPoints`, `RS.det_genericMatrix_ne_zero`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology IsManifold diff --git a/LeanPool/JacobianDiffgeo/PeriodLattice/Membership.lean b/LeanPool/JacobianDiffgeo/PeriodLattice/Membership.lean index 38a4a4a92a..07e104f04c 100644 --- a/LeanPool/JacobianDiffgeo/PeriodLattice/Membership.lean +++ b/LeanPool/JacobianDiffgeo/PeriodLattice/Membership.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.JacobianConstruction.Periods +public import LeanPool.JacobianDiffgeo.JacobianConstruction.Periods +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `periodSubgroup` membership (Forster §21.2) @@ -21,6 +24,8 @@ Main declarations: `RS.periodRange X`, `RS.periodSubgroup_eq_periodRange`, `RS.mem_periodSubgroup_iff`. -/ +@[expose] public section + open scoped ContDiff Manifold noncomputable section diff --git a/LeanPool/JacobianDiffgeo/PeriodLattice/Nondegeneracy.lean b/LeanPool/JacobianDiffgeo/PeriodLattice/Nondegeneracy.lean index 18e5aee436..1a1fed6c67 100644 --- a/LeanPool/JacobianDiffgeo/PeriodLattice/Nondegeneracy.lean +++ b/LeanPool/JacobianDiffgeo/PeriodLattice/Nondegeneracy.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Path.Periods +import LeanPool.JacobianDiffgeo.JacobianConstruction.OfCurve +import LeanPool.JacobianDiffgeo.Path.Planar import LeanPool.JacobianDiffgeo.PeriodLattice.FormIdentity import LeanPool.JacobianDiffgeo.PeriodLattice.Segment -import LeanPool.JacobianDiffgeo.JacobianConstruction.OfCurve import Mathlib.Analysis.Complex.OpenMapping -import Mathlib.Topology.Order.Compact +import Mathlib.CategoryTheory.Category.Init /-! # Nondegeneracy via the maximum principle (Forster 21.4(c), §5.1) @@ -22,6 +25,8 @@ the complex open mapping theorem — no Hodge, no de Rham, no dissection, no 2-f Main declaration: `RS.form1_eq_zero_of_re_period_eq_zero`. -/ +@[expose] public section + open scoped ContDiff Manifold Topology open Set Filter Metric IsManifold diff --git a/LeanPool/JacobianDiffgeo/PeriodLattice/Segment.lean b/LeanPool/JacobianDiffgeo/PeriodLattice/Segment.lean index 1271e58c8d..c602e0836f 100644 --- a/LeanPool/JacobianDiffgeo/PeriodLattice/Segment.lean +++ b/LeanPool/JacobianDiffgeo/PeriodLattice/Segment.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Path.LocalPrimitive -import LeanPool.JacobianDiffgeo.Path.Continuation +public import LeanPool.JacobianDiffgeo.Path.Continuation +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The in-chart segment path (shared helper for §6.3/§6.5) @@ -18,6 +19,8 @@ since both sites need exactly the same construction (design §6.5's `segmentPath Main declarations: `RS.segmentPath`, `RS.pathIntegral_segmentPath`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Metric unitInterval diff --git a/LeanPool/JacobianDiffgeo/PlanarStokes.lean b/LeanPool/JacobianDiffgeo/PlanarStokes.lean index 2a15134c2f..6d144ca5f1 100644 --- a/LeanPool/JacobianDiffgeo/PlanarStokes.lean +++ b/LeanPool/JacobianDiffgeo/PlanarStokes.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.PlanarStokes.Compat -import LeanPool.JacobianDiffgeo.PlanarStokes.CompactSupport -import LeanPool.JacobianDiffgeo.PlanarStokes.AnnulusResidue +public import LeanPool.JacobianDiffgeo.PlanarStokes.Compat +public import LeanPool.JacobianDiffgeo.PlanarStokes.CompactSupport +public import LeanPool.JacobianDiffgeo.PlanarStokes.AnnulusResidue +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # planar-stokes-atoms: compact-support planar Stokes for `dbar` and the smeared residue @@ -52,3 +55,5 @@ prior to summing; no "change of variables for the area integral" atom is designe the three `integral_wirtingerDbar_mul_inv_sub*`/`integrable_wirtingerDbar_mul_inv_sub` exports above for its Lemma-20.3 step — see the build-log entry for this unit for the full account. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/PlanarStokes/AnnulusResidue.lean b/LeanPool/JacobianDiffgeo/PlanarStokes/AnnulusResidue.lean index 1a484aee3f..587ff1b95f 100644 --- a/LeanPool/JacobianDiffgeo/PlanarStokes/AnnulusResidue.lean +++ b/LeanPool/JacobianDiffgeo/PlanarStokes/AnnulusResidue.lean @@ -3,21 +3,19 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.PlanarStokes.CompactSupport -import LeanPool.JacobianDiffgeo.ResidueCalculus.IntegralBridge -import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue -import LeanPool.JacobianDiffgeo.ResidueCalculus.PrincipalPart +public import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue +public import LeanPool.JacobianDiffgeo.Dbar.Wirtinger +public import Mathlib.MeasureTheory.Integral.CircleIntegral import LeanPool.JacobianDiffgeo.Dbar.CauchyKernel +import LeanPool.JacobianDiffgeo.PlanarStokes.Compat +import LeanPool.JacobianDiffgeo.ResidueCalculus.IntegralBridge +import Mathlib.Analysis.Complex.CauchyIntegral import Mathlib.MeasureTheory.Function.Jacobian +import Mathlib.MeasureTheory.Measure.Haar.Unique import Mathlib.RingTheory.Complex import Mathlib.RingTheory.Norm.Transitivity -import Mathlib.Topology.Algebra.Module.Determinant -import Mathlib.Analysis.SpecialFunctions.Complex.Log -import Mathlib.Analysis.SpecialFunctions.Complex.Arg -import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar -import Mathlib.MeasureTheory.Measure.Haar.Unique -import Mathlib.MeasureTheory.Group.MeasurableEquiv /-! # The annulus Stokes identity and the smeared residue theorem @@ -42,6 +40,8 @@ rectangle) — a shorter route to the same identity, using the same mathlib mach the design's own R2 fallback. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Metric open scoped Real diff --git a/LeanPool/JacobianDiffgeo/PlanarStokes/CompactSupport.lean b/LeanPool/JacobianDiffgeo/PlanarStokes/CompactSupport.lean index 3fda08400d..71ff046152 100644 --- a/LeanPool/JacobianDiffgeo/PlanarStokes/CompactSupport.lean +++ b/LeanPool/JacobianDiffgeo/PlanarStokes/CompactSupport.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Dbar.Wirtinger +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.JacobianDiffgeo.PlanarStokes.Compat +import Mathlib.Analysis.Complex.CauchyIntegral /-! # Atom 1: compact-support planar Stokes for `dbar` @@ -19,6 +24,8 @@ corollary (`integral_wirtingerDbar_mul_eq_zero_of_differentiableOn`, Atom 1b) is this chart" case residue-theorem needs for every PoU piece that misses every pole. -/ +@[expose] public section + open Complex MeasureTheory Set noncomputable section diff --git a/LeanPool/JacobianDiffgeo/PlanarStokes/Compat.lean b/LeanPool/JacobianDiffgeo/PlanarStokes/Compat.lean index 7fae7473db..7fa5487fc1 100644 --- a/LeanPool/JacobianDiffgeo/PlanarStokes/Compat.lean +++ b/LeanPool/JacobianDiffgeo/PlanarStokes/Compat.lean @@ -3,15 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Dbar.Wirtinger +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul -import Mathlib.Analysis.Calculus.FDeriv.Congr -import Mathlib.Analysis.Calculus.ContDiff.Defs -import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars import Mathlib.MeasureTheory.Integral.Prod import Mathlib.MeasureTheory.Measure.Lebesgue.Complex -import Mathlib.MeasureTheory.Function.LocallyIntegrable -import LeanPool.JacobianDiffgeo.Dbar.Wirtinger /-! # Compat: Leibniz rule, `ContDiffOn` gluing, and the rectangle ↔ iterated-integral bridge @@ -30,6 +30,8 @@ Unit: planar-stokes-atoms (`docs/design/planar-stokes.md` §5.1). Mathlib-only ( `integral_eq_intervalIntegral_of_tsupport_subset_reProdIm`. -/ +@[expose] public section + open Complex MeasureTheory Set Filter noncomputable section diff --git a/LeanPool/JacobianDiffgeo/ProjectiveLine.lean b/LeanPool/JacobianDiffgeo/ProjectiveLine.lean index f069eb8e04..7c1236bc6e 100644 --- a/LeanPool/JacobianDiffgeo/ProjectiveLine.lean +++ b/LeanPool/JacobianDiffgeo/ProjectiveLine.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.ProjectiveLine.Inversion -import LeanPool.JacobianDiffgeo.ProjectiveLine.Charts -import LeanPool.JacobianDiffgeo.ProjectiveLine.Holomorphy -import LeanPool.JacobianDiffgeo.ProjectiveLine.Sphere -import LeanPool.JacobianDiffgeo.ProjectiveLine.GenusZero +public import LeanPool.JacobianDiffgeo.ProjectiveLine.Inversion +public import LeanPool.JacobianDiffgeo.ProjectiveLine.Charts +public import LeanPool.JacobianDiffgeo.ProjectiveLine.Holomorphy +public import LeanPool.JacobianDiffgeo.ProjectiveLine.Sphere +public import LeanPool.JacobianDiffgeo.ProjectiveLine.GenusZero +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # projective-line (CC5): the Riemann sphere `ℙ¹ := OnePoint ℂ` @@ -44,5 +46,7 @@ basepoints), meromorphic-and-divisors (`contMDiffAt_of_pole` + `ContMDiffAt.oneP two atoms for the future `ℳ.toP1` bridge, junk-value contract `coeChart ∞ = 0`). -/ +@[expose] public section + /-- The Riemann sphere, as the one-point compactification of `ℂ`. -/ scoped[RS.P1] notation "ℙ¹" => OnePoint ℂ diff --git a/LeanPool/JacobianDiffgeo/ProjectiveLine/Charts.lean b/LeanPool/JacobianDiffgeo/ProjectiveLine/Charts.lean index f51982b3b9..fc5918eccd 100644 --- a/LeanPool/JacobianDiffgeo/ProjectiveLine/Charts.lean +++ b/LeanPool/JacobianDiffgeo/ProjectiveLine/Charts.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.ProjectiveLine.Inversion -import LeanPool.JacobianDiffgeo.Surface.ChartedSpaceKit -import Mathlib.Analysis.Analytic.Constructions +public import LeanPool.JacobianDiffgeo.ProjectiveLine.Inversion +public import LeanPool.JacobianDiffgeo.Surface.ChartedSpaceKit /-! # The two-chart complex-manifold structure on `ℙ¹` (CC5) @@ -24,6 +24,8 @@ and `IsManifold 𝓘(ℂ) ω (OnePoint ℂ)` from two charts: literally `id`/`Inv.inv` as total functions (junk values aligned by construction). -/ +@[expose] public section + open scoped ContDiff Manifold OnePoint open Set Filter Topology OnePoint diff --git a/LeanPool/JacobianDiffgeo/ProjectiveLine/GenusZero.lean b/LeanPool/JacobianDiffgeo/ProjectiveLine/GenusZero.lean index 55bc6c74bd..fef8f484fc 100644 --- a/LeanPool/JacobianDiffgeo/ProjectiveLine/GenusZero.lean +++ b/LeanPool/JacobianDiffgeo/ProjectiveLine/GenusZero.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.ProjectiveLine.Charts -import LeanPool.JacobianDiffgeo.Forms +public import LeanPool.JacobianDiffgeo.ProjectiveLine.Charts +public import LeanPool.JacobianDiffgeo.Forms.Genus +import LeanPool.JacobianDiffgeo.Forms.Analyticity import Mathlib.Analysis.Complex.Liouville /-! @@ -18,6 +20,8 @@ decays to `0` at infinity, hence vanishes identically by Liouville; the same tra forces `g ≡ 0`. So there are no nonzero holomorphic 1-forms on `ℙ¹` — the sphere has genus 0. -/ +@[expose] public section + open scoped ContDiff Manifold OnePoint open Set Filter Topology OnePoint diff --git a/LeanPool/JacobianDiffgeo/ProjectiveLine/Holomorphy.lean b/LeanPool/JacobianDiffgeo/ProjectiveLine/Holomorphy.lean index 264965ccdc..961eb9fe17 100644 --- a/LeanPool/JacobianDiffgeo/ProjectiveLine/Holomorphy.lean +++ b/LeanPool/JacobianDiffgeo/ProjectiveLine/Holomorphy.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.ProjectiveLine.Charts +public import LeanPool.JacobianDiffgeo.ProjectiveLine.Charts +public import Mathlib.Analysis.Meromorphic.Order +public import Mathlib.Geometry.Manifold.Diffeomorph import LeanPool.JacobianDiffgeo.Surface.Bridges -import Mathlib.Analysis.Meromorphic.Order -import Mathlib.Geometry.Manifold.Diffeomorph /-! # Holomorphy transfer kit for `ℙ¹` (CC5) @@ -29,6 +30,8 @@ anywhere) this file converts holomorphy of maps `Z → OnePoint ℂ` into planar * `contMDiff_inversion`/`inversionDiffeomorph`: inversion is a biholomorphic involution. -/ +@[expose] public section + open scoped ContDiff Manifold OnePoint open Set Filter Topology OnePoint diff --git a/LeanPool/JacobianDiffgeo/ProjectiveLine/Inversion.lean b/LeanPool/JacobianDiffgeo/ProjectiveLine/Inversion.lean index faeed2694a..23ade874e9 100644 --- a/LeanPool/JacobianDiffgeo/ProjectiveLine/Inversion.lean +++ b/LeanPool/JacobianDiffgeo/ProjectiveLine/Inversion.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import Mathlib.Topology.Compactification.OnePoint.Basic -import Mathlib.Analysis.Normed.Field.Lemmas -import Mathlib.Analysis.Complex.Basic +public import Mathlib.Topology.Compactification.OnePoint.Basic +public import Mathlib.Analysis.Complex.Basic /-! # Inversion on the Riemann sphere (CC5) @@ -23,6 +23,8 @@ Main declarations: `inversion`, `inversion_involutive`, `inversion_eq_infty_iff` `inversionHomeomorph`. -/ +@[expose] public section + open scoped OnePoint open Set Filter Topology OnePoint diff --git a/LeanPool/JacobianDiffgeo/ProjectiveLine/Sphere.lean b/LeanPool/JacobianDiffgeo/ProjectiveLine/Sphere.lean index e3681ae62d..d19c360a58 100644 --- a/LeanPool/JacobianDiffgeo/ProjectiveLine/Sphere.lean +++ b/LeanPool/JacobianDiffgeo/ProjectiveLine/Sphere.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.ProjectiveLine.Charts -import Mathlib.Topology.Compactification.OnePoint.Sphere -import Mathlib.LinearAlgebra.Complex.FiniteDimensional +public import Mathlib.Topology.Compactification.OnePoint.Sphere /-! # The challenge bridge: `ℙ¹ ≃ₜ` the unit 2-sphere (CC5) @@ -22,6 +21,8 @@ space) and `ι := Fin 3` gives exactly the sphere model used by the challenge's `ContinuousLinearEquiv` via `Nonempty.some`); no consumer needs one (see design §3.4). -/ +@[expose] public section + open scoped ContDiff Manifold OnePoint namespace RS.P1 diff --git a/LeanPool/JacobianDiffgeo/ProperDegree.lean b/LeanPool/JacobianDiffgeo/ProperDegree.lean index c105bc40c5..62bbe04ab8 100644 --- a/LeanPool/JacobianDiffgeo/ProperDegree.lean +++ b/LeanPool/JacobianDiffgeo/ProperDegree.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.ProperDegree.ChallengeDegree -import LeanPool.JacobianDiffgeo.ProperDegree.DivisorDegreeZero -import LeanPool.JacobianDiffgeo.ProperDegree.GenusZeroFinisher +public import LeanPool.JacobianDiffgeo.ProperDegree.ChallengeDegree +public import LeanPool.JacobianDiffgeo.ProperDegree.DivisorDegreeZero +public import LeanPool.JacobianDiffgeo.ProperDegree.GenusZeroFinisher +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # proper-map-degree: the challenge degree, `deg(div f) = 0`, and the genus-0 finisher @@ -52,3 +55,5 @@ directly for its forward direction (recommend the orchestrator add `proper-map-d unit's `Builds on:` list, per the design doc's non-blocking flag); final assembly consumes `_root_.ContMDiff.degree` and friends verbatim. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/ProperDegree/ChallengeDegree.lean b/LeanPool/JacobianDiffgeo/ProperDegree/ChallengeDegree.lean index 2a796907de..f07c6fa041 100644 --- a/LeanPool/JacobianDiffgeo/ProperDegree/ChallengeDegree.lean +++ b/LeanPool/JacobianDiffgeo/ProperDegree/ChallengeDegree.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.MappingDegree +public import LeanPool.JacobianDiffgeo.MappingDegree.Degree +public import Mathlib.Geometry.Manifold.ContMDiff.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The challenge-signature mapping degree (proper-map-degree, file 1 of 3) @@ -27,6 +31,8 @@ match "the exact challenge signature" this file declares `f` explicit throughout (dot notation) still works since `f` is fully determined by unification against `hf`'s type. -/ +@[expose] public section + open scoped ContDiff Manifold namespace RS.ProperDegree diff --git a/LeanPool/JacobianDiffgeo/ProperDegree/DivisorDegreeZero.lean b/LeanPool/JacobianDiffgeo/ProperDegree/DivisorDegreeZero.lean index 20f6320d01..449199b575 100644 --- a/LeanPool/JacobianDiffgeo/ProperDegree/DivisorDegreeZero.lean +++ b/LeanPool/JacobianDiffgeo/ProperDegree/DivisorDegreeZero.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Meromorphic.LinearSystem import LeanPool.JacobianDiffgeo.MeromorphicTrace.ArgumentPrinciple -import LeanPool.JacobianDiffgeo.Meromorphic.LinearSystem +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `deg(div φ) = 0` and the unconditional `L(D) = 0` for negative degree (proper-map-degree, file 2 @@ -38,6 +41,8 @@ estimate of 40–60 lines (the extra margin is the constancy-translation case sp declaration, `CONVENTIONS.md` rule 4). -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter diff --git a/LeanPool/JacobianDiffgeo/ProperDegree/GenusZeroFinisher.lean b/LeanPool/JacobianDiffgeo/ProperDegree/GenusZeroFinisher.lean index f4f64dfe2d..4b3b8353bb 100644 --- a/LeanPool/JacobianDiffgeo/ProperDegree/GenusZeroFinisher.lean +++ b/LeanPool/JacobianDiffgeo/ProperDegree/GenusZeroFinisher.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import LeanPool.JacobianDiffgeo.Meromorphic.OrderEval +public import Mathlib.Analysis.InnerProductSpace.PiL2 +import LeanPool.JacobianDiffgeo.MappingDegree.Degree import LeanPool.JacobianDiffgeo.MeromorphicTrace.OrderMultiplicity -import LeanPool.JacobianDiffgeo.MappingDegree import LeanPool.JacobianDiffgeo.ProjectiveLine.Sphere +import LeanPool.JacobianDiffgeo.Surface.Identity +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `homeoSphere_of_exists_simple_pole` (proper-map-degree, file 3 of 3) @@ -24,6 +30,8 @@ itself, cheaper than the general codiscrete-nonconstancy argument. Main declaration: `RS.homeoSphere_of_exists_simple_pole`. -/ +@[expose] public section + open scoped ContDiff Manifold OnePoint open Set Filter diff --git a/LeanPool/JacobianDiffgeo/ResidueCalculus.lean b/LeanPool/JacobianDiffgeo/ResidueCalculus.lean index 6987ae4138..89b38b3f05 100644 --- a/LeanPool/JacobianDiffgeo/ResidueCalculus.lean +++ b/LeanPool/JacobianDiffgeo/ResidueCalculus.lean @@ -3,15 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.ResidueCalculus.TaylorCoeff -import LeanPool.JacobianDiffgeo.ResidueCalculus.LaurentCoeff -import LeanPool.JacobianDiffgeo.ResidueCalculus.PrincipalPart -import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue -import LeanPool.JacobianDiffgeo.ResidueCalculus.ChangeOfVariables -import LeanPool.JacobianDiffgeo.ResidueCalculus.IntegralBridge -import LeanPool.JacobianDiffgeo.ResidueCalculus.GermFunctionals -import LeanPool.JacobianDiffgeo.ResidueCalculus.MittagLeffler +public import LeanPool.JacobianDiffgeo.ResidueCalculus.TaylorCoeff +public import LeanPool.JacobianDiffgeo.ResidueCalculus.LaurentCoeff +public import LeanPool.JacobianDiffgeo.ResidueCalculus.PrincipalPart +public import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue +public import LeanPool.JacobianDiffgeo.ResidueCalculus.ChangeOfVariables +public import LeanPool.JacobianDiffgeo.ResidueCalculus.IntegralBridge +public import LeanPool.JacobianDiffgeo.ResidueCalculus.GermFunctionals +public import LeanPool.JacobianDiffgeo.ResidueCalculus.MittagLeffler /-! # residue-calculus: Laurent coefficients, residues, and the circle-integral bridge (`RS`) @@ -45,3 +46,5 @@ Routing: this unit is the LOCAL, planar input. `∑ Res = 0` (Stokes) lives in r planar-stokes-atoms; the residue functional `H¹(Ω) → ℂ` of Serre duality lives in serre-duality-cech/tails. Neither is built here. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/ResidueCalculus/ChangeOfVariables.lean b/LeanPool/JacobianDiffgeo/ResidueCalculus/ChangeOfVariables.lean index 7863a139e0..f0e2f236dd 100644 --- a/LeanPool/JacobianDiffgeo/ResidueCalculus/ChangeOfVariables.lean +++ b/LeanPool/JacobianDiffgeo/ResidueCalculus/ChangeOfVariables.lean @@ -7,8 +7,10 @@ Authors: Rado Kirov /- Blueprint unit: residue-calculus. Chart invariance of the residue of a 1-form integrand. -/ -import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue -import Mathlib.Analysis.Calculus.Deriv.Inverse +module + +public import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue +import LeanPool.JacobianDiffgeo.ResidueCalculus.PrincipalPart /-! # Change of variables for residues (residue-calculus) @@ -22,6 +24,8 @@ Main export: `RS.resAt_comp_mul_deriv`, and the `=ᶠ`-robust corollary `RS.resAt_comp_mul_deriv_of_eventuallyEq`. -/ +@[expose] public section + open Filter Topology Metric Function namespace RS diff --git a/LeanPool/JacobianDiffgeo/ResidueCalculus/GermFunctionals.lean b/LeanPool/JacobianDiffgeo/ResidueCalculus/GermFunctionals.lean index b08776aec3..a2b15f90fe 100644 --- a/LeanPool/JacobianDiffgeo/ResidueCalculus/GermFunctionals.lean +++ b/LeanPool/JacobianDiffgeo/ResidueCalculus/GermFunctionals.lean @@ -8,8 +8,10 @@ Authors: Rado Kirov Blueprint unit: residue-calculus. Meromorphic germs and Laurent coefficients as linear functionals. -/ -import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue -import Mathlib.Order.Filter.Germ.Basic +module + +public import Mathlib.Order.Filter.Germ.Basic +public import LeanPool.JacobianDiffgeo.ResidueCalculus.LaurentCoeff /-! # Germ packaging of meromorphic functions (residue-calculus) @@ -22,6 +24,8 @@ Main exports: `RS.MeromorphicGerm`, `RS.meromorphicGermsAt`, `RS.laurentCoeffL`, `RS.laurentCoeffL_mk`. -/ +@[expose] public section + open Filter Topology Metric Function namespace RS diff --git a/LeanPool/JacobianDiffgeo/ResidueCalculus/IntegralBridge.lean b/LeanPool/JacobianDiffgeo/ResidueCalculus/IntegralBridge.lean index e7d2aa64c1..2b49a2bb7c 100644 --- a/LeanPool/JacobianDiffgeo/ResidueCalculus/IntegralBridge.lean +++ b/LeanPool/JacobianDiffgeo/ResidueCalculus/IntegralBridge.lean @@ -7,7 +7,11 @@ Authors: Rado Kirov /- Blueprint unit: residue-calculus. The circle-integral / residue bridge. -/ -import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue +module + +public import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue +public import Mathlib.MeasureTheory.Integral.CircleIntegral +import LeanPool.JacobianDiffgeo.ResidueCalculus.PrincipalPart import Mathlib.Analysis.Complex.CauchyIntegral /-! @@ -21,6 +25,8 @@ Main exports: `RS.circleIntegral_eq_two_pi_I_mul_resAt`, `RS.MeromorphicAt.eventually_circleIntegral_eq_two_pi_I_mul_resAt`. -/ +@[expose] public section + open Filter Topology Metric Function Real Complex namespace RS diff --git a/LeanPool/JacobianDiffgeo/ResidueCalculus/LaurentCoeff.lean b/LeanPool/JacobianDiffgeo/ResidueCalculus/LaurentCoeff.lean index 1b8ce6fb8f..5457e0eb07 100644 --- a/LeanPool/JacobianDiffgeo/ResidueCalculus/LaurentCoeff.lean +++ b/LeanPool/JacobianDiffgeo/ResidueCalculus/LaurentCoeff.lean @@ -7,8 +7,10 @@ Authors: Rado Kirov /- Blueprint unit: residue-calculus. Laurent coefficients of planar meromorphic germs. -/ -import LeanPool.JacobianDiffgeo.ResidueCalculus.TaylorCoeff -import Mathlib.Analysis.Meromorphic.TrailingCoefficient +module + +public import LeanPool.JacobianDiffgeo.ResidueCalculus.TaylorCoeff +public import Mathlib.Analysis.Meromorphic.TrailingCoefficient /-! # Laurent coefficients at a point (residue-calculus) @@ -29,6 +31,8 @@ Main exports: * `RS.forall_neg_laurentCoeffAt_eq_zero_iff` — vanishing tail ↔ analytic-after-repair. -/ +@[expose] public section + open Filter Topology Metric Function namespace RS diff --git a/LeanPool/JacobianDiffgeo/ResidueCalculus/MittagLeffler.lean b/LeanPool/JacobianDiffgeo/ResidueCalculus/MittagLeffler.lean index 5bac4e5bb6..da7f2aaa88 100644 --- a/LeanPool/JacobianDiffgeo/ResidueCalculus/MittagLeffler.lean +++ b/LeanPool/JacobianDiffgeo/ResidueCalculus/MittagLeffler.lean @@ -7,9 +7,9 @@ Authors: Rado Kirov /- Blueprint unit: residue-calculus. Mittag-Leffler principal-part data (Forster §17.1-17.2). -/ -import LeanPool.JacobianDiffgeo.ResidueCalculus.PrincipalPart -import Mathlib.Data.Finsupp.Basic -import Mathlib.Analysis.Meromorphic.Basic +module + +public import LeanPool.JacobianDiffgeo.ResidueCalculus.LaurentCoeff /-! # Mittag-Leffler principal-part distributions (residue-calculus) @@ -33,6 +33,8 @@ Main exports: `RS.PrincipalPartData`, `RS.PrincipalPartData.Realizes`, interface. -/ +@[expose] public section + open Filter Topology Metric Function namespace RS diff --git a/LeanPool/JacobianDiffgeo/ResidueCalculus/PrincipalPart.lean b/LeanPool/JacobianDiffgeo/ResidueCalculus/PrincipalPart.lean index 2c7fe753d3..395463d57b 100644 --- a/LeanPool/JacobianDiffgeo/ResidueCalculus/PrincipalPart.lean +++ b/LeanPool/JacobianDiffgeo/ResidueCalculus/PrincipalPart.lean @@ -7,7 +7,9 @@ Authors: Rado Kirov /- Blueprint unit: residue-calculus. Principal parts and the decomposition theorem. -/ -import LeanPool.JacobianDiffgeo.ResidueCalculus.LaurentCoeff +module + +public import LeanPool.JacobianDiffgeo.ResidueCalculus.LaurentCoeff /-! # Principal parts at a point (residue-calculus) @@ -25,6 +27,8 @@ Main exports: * `RS.eq_principalPart_of_eventuallyEq` — uniqueness of tail + analytic decompositions. -/ +@[expose] public section + open Filter Topology Metric Function namespace RS diff --git a/LeanPool/JacobianDiffgeo/ResidueCalculus/Residue.lean b/LeanPool/JacobianDiffgeo/ResidueCalculus/Residue.lean index 5a6bcc55d0..a20b439342 100644 --- a/LeanPool/JacobianDiffgeo/ResidueCalculus/Residue.lean +++ b/LeanPool/JacobianDiffgeo/ResidueCalculus/Residue.lean @@ -7,11 +7,10 @@ Authors: Rado Kirov /- Blueprint unit: residue-calculus. The residue functional `resAt` and its algebra. -/ +module + +public import LeanPool.JacobianDiffgeo.ResidueCalculus.LaurentCoeff import LeanPool.JacobianDiffgeo.ResidueCalculus.PrincipalPart -import Mathlib.Analysis.Calculus.Deriv.ZPow -import Mathlib.Analysis.Calculus.Deriv.Shift -import Mathlib.Analysis.Calculus.FDeriv.Analytic -import Mathlib.Analysis.Calculus.LogDeriv /-! # The residue functional (residue-calculus) @@ -32,6 +31,8 @@ Main exports: (Miranda VI.3 `Res_ω` shape `Σ c_n a_{−1−n}`). -/ +@[expose] public section + open Filter Topology Metric Function namespace RS diff --git a/LeanPool/JacobianDiffgeo/ResidueCalculus/TaylorCoeff.lean b/LeanPool/JacobianDiffgeo/ResidueCalculus/TaylorCoeff.lean index 5150c5b241..d0b6340188 100644 --- a/LeanPool/JacobianDiffgeo/ResidueCalculus/TaylorCoeff.lean +++ b/LeanPool/JacobianDiffgeo/ResidueCalculus/TaylorCoeff.lean @@ -7,10 +7,12 @@ Authors: Rado Kirov /- Blueprint unit: residue-calculus. Taylor-coefficient extractor via iterated `dslope`. -/ +module + +public import Mathlib.Analysis.Calculus.DSlope +public import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.Analytic.IsolatedZeros -import Mathlib.Analysis.Calculus.DSlope import Mathlib.Analysis.Calculus.Deriv.Mul -import Mathlib.Analysis.Complex.Basic /-! # Taylor coefficients via iterated difference quotients (residue-calculus) @@ -26,6 +28,8 @@ Main exports: * `RS.AnalyticAt.exists_taylor_remainder` — exact, pointwise Taylor remainder factorization. -/ +@[expose] public section + open Filter Topology Metric Function namespace RS diff --git a/LeanPool/JacobianDiffgeo/ResidueTheorem.lean b/LeanPool/JacobianDiffgeo/ResidueTheorem.lean index 6df9ec4605..c043954781 100644 --- a/LeanPool/JacobianDiffgeo/ResidueTheorem.lean +++ b/LeanPool/JacobianDiffgeo/ResidueTheorem.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.ResidueTheorem.RationalOnP1 -import LeanPool.JacobianDiffgeo.ResidueTheorem.MFormCompat -import LeanPool.JacobianDiffgeo.ResidueTheorem.Calibrated -import LeanPool.JacobianDiffgeo.ResidueTheorem.P1Assembly -import LeanPool.JacobianDiffgeo.ResidueTheorem.Reduction -import LeanPool.JacobianDiffgeo.ResidueTheorem.Unconditional +public import LeanPool.JacobianDiffgeo.ResidueTheorem.RationalOnP1 +public import LeanPool.JacobianDiffgeo.ResidueTheorem.MFormCompat +public import LeanPool.JacobianDiffgeo.ResidueTheorem.Calibrated +public import LeanPool.JacobianDiffgeo.ResidueTheorem.P1Assembly +public import LeanPool.JacobianDiffgeo.ResidueTheorem.Reduction +public import LeanPool.JacobianDiffgeo.ResidueTheorem.Unconditional +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # residue-theorem (namespaces `RS`/`RS.P1`) — HEADLINE CLOSED @@ -92,3 +95,5 @@ Area-Gluing atom of §3–5 was NOT built, as instructed). * **canonical-forms**: `MFormCompat.lean`'s three lemmas are upstream candidates (requested at design time in `docs/design/residue-theorem.md` §11). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/ResidueTheorem/Calibrated.lean b/LeanPool/JacobianDiffgeo/ResidueTheorem/Calibrated.lean index 20748f609b..4903adcf6b 100644 --- a/LeanPool/JacobianDiffgeo/ResidueTheorem/Calibrated.lean +++ b/LeanPool/JacobianDiffgeo/ResidueTheorem/Calibrated.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.MappingDegree.LocalStructure +public import LeanPool.JacobianDiffgeo.MappingDegree.LocalStructure +import LeanPool.JacobianDiffgeo.LocalMultiplicity.PlanarNormalForm +import LeanPool.JacobianDiffgeo.MappingDegree.Basics +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Calibrated fiber stacks (residue-theorem, general-`X` reduction support) @@ -28,6 +33,8 @@ conclusion `∀ y, A.e' y = chartAt ℂ (F x) y - chartAt ℂ (F x) (F x)` threa recentered `chartAt ℂ y₀`; this discharges `resAtP1_trace_eq_sum`'s `hcal` verbatim. -/ +@[expose] public section + open Filter Set OpenPartialHomeomorph Metric Function open scoped ContDiff Manifold Topology diff --git a/LeanPool/JacobianDiffgeo/ResidueTheorem/MFormCompat.lean b/LeanPool/JacobianDiffgeo/ResidueTheorem/MFormCompat.lean index 5868861d8c..032ab21de8 100644 --- a/LeanPool/JacobianDiffgeo/ResidueTheorem/MFormCompat.lean +++ b/LeanPool/JacobianDiffgeo/ResidueTheorem/MFormCompat.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.CanonicalForms +public import LeanPool.JacobianDiffgeo.CanonicalForms.Quotient +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Compat: small `MForm` helpers needed by residue-theorem (candidates for canonical-forms) @@ -23,6 +26,8 @@ quotient API live in a clearly-marked NEW file rather than editing `Jacobian/Can Request filed in `docs/requests/canonical-forms.md`-spirit: these belong upstream eventually. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology diff --git a/LeanPool/JacobianDiffgeo/ResidueTheorem/P1Assembly.lean b/LeanPool/JacobianDiffgeo/ResidueTheorem/P1Assembly.lean index d2c64ba7ca..72686f5eeb 100644 --- a/LeanPool/JacobianDiffgeo/ResidueTheorem/P1Assembly.lean +++ b/LeanPool/JacobianDiffgeo/ResidueTheorem/P1Assembly.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.ResidueTheorem.RationalOnP1 +public import LeanPool.JacobianDiffgeo.CanonicalForms.Quotient +public import LeanPool.JacobianDiffgeo.ProjectiveLine.Charts +public import LeanPool.JacobianDiffgeo.ResidueCalculus.PrincipalPart import LeanPool.JacobianDiffgeo.ResidueTheorem.MFormCompat +import LeanPool.JacobianDiffgeo.ResidueTheorem.RationalOnP1 import Mathlib.Analysis.Meromorphic.NormalForm +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # residue-theorem: the `ℙ¹` base case, assembled @@ -36,6 +42,8 @@ key honesty input making the `∞`-chart congruences legitimate for a RAW repres forces `R` to be honestly analytic near `∞`. -/ +@[expose] public section + open scoped ContDiff Manifold OnePoint open Set Filter Topology OnePoint Real Complex MeasureTheory diff --git a/LeanPool/JacobianDiffgeo/ResidueTheorem/RationalOnP1.lean b/LeanPool/JacobianDiffgeo/ResidueTheorem/RationalOnP1.lean index bc1f7a68bc..09b675152c 100644 --- a/LeanPool/JacobianDiffgeo/ResidueTheorem/RationalOnP1.lean +++ b/LeanPool/JacobianDiffgeo/ResidueTheorem/RationalOnP1.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.CanonicalForms -import LeanPool.JacobianDiffgeo.ProjectiveLine.Charts -import LeanPool.JacobianDiffgeo.ResidueCalculus.PrincipalPart -import Mathlib.MeasureTheory.Integral.CircleAverage +public import LeanPool.JacobianDiffgeo.ProjectiveLine.Charts +public import LeanPool.JacobianDiffgeo.CanonicalForms.MForm +public import LeanPool.JacobianDiffgeo.ResidueCalculus.Residue +public import Mathlib.MeasureTheory.Integral.CircleIntegral +import LeanPool.JacobianDiffgeo.ResidueCalculus.IntegralBridge +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # residue-theorem: the `ℙ¹` base case — atoms (file 1/1, PARTIAL DELIVERY) @@ -77,6 +82,8 @@ now-known-insufficient `Differentiable ℂ R_mid` hypothesis and would need re-t whichever fix is chosen. -/ +@[expose] public section + open scoped ContDiff Manifold OnePoint open Set Filter Topology OnePoint Real Complex MeasureTheory diff --git a/LeanPool/JacobianDiffgeo/ResidueTheorem/Reduction.lean b/LeanPool/JacobianDiffgeo/ResidueTheorem/Reduction.lean index 28e5c44919..445fe02504 100644 --- a/LeanPool/JacobianDiffgeo/ResidueTheorem/Reduction.lean +++ b/LeanPool/JacobianDiffgeo/ResidueTheorem/Reduction.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.ResidueTheorem.P1Assembly -import LeanPool.JacobianDiffgeo.ResidueTheorem.Calibrated -import LeanPool.JacobianDiffgeo.FormTrace +public import LeanPool.JacobianDiffgeo.CanonicalForms.Differential +public import LeanPool.JacobianDiffgeo.FormTrace.PairForm +public import LeanPool.JacobianDiffgeo.MeromorphicTrace.ToP1 import LeanPool.JacobianDiffgeo.CanonicalForms.Existence +import LeanPool.JacobianDiffgeo.FormTrace.ResidueTraceCompat +import LeanPool.JacobianDiffgeo.ResidueTheorem.Calibrated +import LeanPool.JacobianDiffgeo.ResidueTheorem.MFormCompat +import LeanPool.JacobianDiffgeo.ResidueTheorem.P1Assembly +import LeanPool.JacobianDiffgeo.ResidueTheorem.RationalOnP1 +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # residue-theorem: the general-`X` reduction and THE residue theorem @@ -49,6 +57,8 @@ duplicate the ~90-line proof or require importing residue-theorem back into cano (`import Jacobian.CanonicalForms.Existence`, above) — the call site below is unchanged. -/ +@[expose] public section + open scoped ContDiff Manifold OnePoint open Set Filter Topology OnePoint Function diff --git a/LeanPool/JacobianDiffgeo/ResidueTheorem/Unconditional.lean b/LeanPool/JacobianDiffgeo/ResidueTheorem/Unconditional.lean index dbdf53ae5b..1f40cddcf2 100644 --- a/LeanPool/JacobianDiffgeo/ResidueTheorem/Unconditional.lean +++ b/LeanPool/JacobianDiffgeo/ResidueTheorem/Unconditional.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.ResidueTheorem.Reduction +public import LeanPool.JacobianDiffgeo.CanonicalForms.Differential import LeanPool.JacobianDiffgeo.CanonicalForms.Existence +import LeanPool.JacobianDiffgeo.ResidueTheorem.Reduction +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The unconditional residue theorem (D9 gate now open) @@ -30,6 +34,8 @@ by discharging `hex` with `RS.exists_nonconstant_mero` — each a one-line corol the `Finset`-flexible unconditional corollary. -/ +@[expose] public section + open scoped ContDiff Manifold namespace RS diff --git a/LeanPool/JacobianDiffgeo/RiemannRoch.lean b/LeanPool/JacobianDiffgeo/RiemannRoch.lean index 6f8fc6fdfd..5ccad3f00d 100644 --- a/LeanPool/JacobianDiffgeo/RiemannRoch.lean +++ b/LeanPool/JacobianDiffgeo/RiemannRoch.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.RiemannRoch.Basic +public import LeanPool.JacobianDiffgeo.RiemannRoch.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # riemann-roch (#28): Riemann–Roch (namespace `RS`) @@ -35,3 +38,5 @@ and Serre-duality export bank; no new mathematics, no reference to `T D`/`pairT` * **genus-zero-headline (#30)**: consumes `riemann_inequality` (forward direction: genus `0` ⇒ `l(single P 1) ≥ 2`, extracting a function with a single simple pole). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/RiemannRoch/Basic.lean b/LeanPool/JacobianDiffgeo/RiemannRoch/Basic.lean index 2f1b623efd..dea8c24b48 100644 --- a/LeanPool/JacobianDiffgeo/RiemannRoch/Basic.lean +++ b/LeanPool/JacobianDiffgeo/RiemannRoch/Basic.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.TailDuality +public import LeanPool.JacobianDiffgeo.TailDuality.Duality +import LeanPool.JacobianDiffgeo.TailDuality.ChiLedger +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # riemann-roch: Riemann–Roch, `l(K) = g`, `deg K = 2g − 2`, the Riemann inequality @@ -25,6 +29,8 @@ Serre-duality export bank (`l_sub_eq_h1T`, `h1T_zero_eq_genus`, `h1T_zero_eq_l_K `genus-zero-headline` (#30) consumes. -/ +@[expose] public section + open scoped ContDiff Manifold namespace RS diff --git a/LeanPool/JacobianDiffgeo/SerrePairing.lean b/LeanPool/JacobianDiffgeo/SerrePairing.lean index 334c37bef3..bc8a191770 100644 --- a/LeanPool/JacobianDiffgeo/SerrePairing.lean +++ b/LeanPool/JacobianDiffgeo/SerrePairing.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.SerrePairing.TailSpace -import LeanPool.JacobianDiffgeo.SerrePairing.Pairing -import LeanPool.JacobianDiffgeo.SerrePairing.Duality +public import LeanPool.JacobianDiffgeo.SerrePairing.TailSpace +public import LeanPool.JacobianDiffgeo.SerrePairing.Pairing +public import LeanPool.JacobianDiffgeo.SerrePairing.Duality +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # serre-duality-cech: the Serre pairing at the Čech level (namespace `RS`/`RS.SerrePairing`) @@ -133,3 +136,5 @@ spike-verified here) and citing `exists_tail_pair_ne_zero`'s shape directly; `Ta gets both inequalities for free from its own `resEquiv` bijectivity instead, so this export is offered but not required. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/SerrePairing/Duality.lean b/LeanPool/JacobianDiffgeo/SerrePairing/Duality.lean index fd03cafd10..899450985b 100644 --- a/LeanPool/JacobianDiffgeo/SerrePairing/Duality.lean +++ b/LeanPool/JacobianDiffgeo/SerrePairing/Duality.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.SerrePairing.Pairing -import Mathlib.LinearAlgebra.Dual.Lemmas -import Mathlib.LinearAlgebra.Dimension.StrongRankCondition +public import LeanPool.JacobianDiffgeo.SerrePairing.Pairing +public import LeanPool.JacobianDiffgeo.CanonicalForms.LinearSystems +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.FreeModule.Finite.Matrix +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The injectivity core and the generic dimension inequality (serre-duality-cech, §2 D4–D5) @@ -34,6 +37,8 @@ is now instance-free and `Module.finrank` needs no topology, so both theorems he `CONVENTIONS.md`'s "drop hypotheses lemmas don't need, when free to do so". -/ +@[expose] public section + open scoped ContDiff Manifold noncomputable section diff --git a/LeanPool/JacobianDiffgeo/SerrePairing/Pairing.lean b/LeanPool/JacobianDiffgeo/SerrePairing/Pairing.lean index d51e6f4816..7e03db68ad 100644 --- a/LeanPool/JacobianDiffgeo/SerrePairing/Pairing.lean +++ b/LeanPool/JacobianDiffgeo/SerrePairing/Pairing.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.SerrePairing.TailSpace -import LeanPool.JacobianDiffgeo.CanonicalForms -import Mathlib.LinearAlgebra.Finsupp.LSum +public import LeanPool.JacobianDiffgeo.SerrePairing.TailSpace +public import LeanPool.JacobianDiffgeo.CanonicalForms.Quotient +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # `pair`: the Serre pairing (Miranda's `Res_ω`), purely algebraic (serre-duality-cech, §2 D2) @@ -35,6 +37,8 @@ via representatives + residue-calculus's `laurentCoeffAt_fun_add`/`_const_mul`/` (coordination note filed to `docs/requests/canonical-forms.md`). -/ +@[expose] public section + open scoped ContDiff Manifold noncomputable section diff --git a/LeanPool/JacobianDiffgeo/SerrePairing/TailSpace.lean b/LeanPool/JacobianDiffgeo/SerrePairing/TailSpace.lean index b27c47951c..206697f742 100644 --- a/LeanPool/JacobianDiffgeo/SerrePairing/TailSpace.lean +++ b/LeanPool/JacobianDiffgeo/SerrePairing/TailSpace.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import Mathlib.Data.Finsupp.Defs -import LeanPool.JacobianDiffgeo.Meromorphic +public import LeanPool.JacobianDiffgeo.Meromorphic.Divisor +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `Tail X`: free ambient Laurent-tail data, and `TailSpace D` (serre-duality-cech, §2 D1) @@ -28,6 +30,8 @@ sibling unit laurent-tails independently discovered that a plain `def` wrapping every `Finsupp` instance transport for free), so no manual instances are needed at all. -/ +@[expose] public section + open scoped ContDiff Manifold namespace RS.SerrePairing diff --git a/LeanPool/JacobianDiffgeo/SphereTopology.lean b/LeanPool/JacobianDiffgeo/SphereTopology.lean index 355629bd1a..564bbc2ad4 100644 --- a/LeanPool/JacobianDiffgeo/SphereTopology.lean +++ b/LeanPool/JacobianDiffgeo/SphereTopology.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.SphereTopology.SimplyConnectedP1 -import LeanPool.JacobianDiffgeo.SphereTopology.GlobalPrimitive -import LeanPool.JacobianDiffgeo.SphereTopology.Headline +public import LeanPool.JacobianDiffgeo.SphereTopology.SimplyConnectedP1 +public import LeanPool.JacobianDiffgeo.SphereTopology.GlobalPrimitive +public import LeanPool.JacobianDiffgeo.SphereTopology.Headline +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # sphere-topology: `SimplyConnectedSpace (OnePoint ℂ)` and `genus X = 0` for simply connected `X` @@ -50,3 +52,5 @@ Downstream consumers: `genus-zero-headline` (consumes `genus_eq_zero_of_homeo_sp re-derive the same conclusion from its own chain-continuation `IsPrimitiveAlongMap id η F univ` fact — both routes agree, no dependency is required either way). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/SphereTopology/GlobalPrimitive.lean b/LeanPool/JacobianDiffgeo/SphereTopology/GlobalPrimitive.lean index 985678d98e..84f29c7a12 100644 --- a/LeanPool/JacobianDiffgeo/SphereTopology/GlobalPrimitive.lean +++ b/LeanPool/JacobianDiffgeo/SphereTopology/GlobalPrimitive.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Path -import LeanPool.JacobianDiffgeo.Forms +public import LeanPool.JacobianDiffgeo.Forms.Genus +public import LeanPool.JacobianDiffgeo.Forms.MDifferential +public import LeanPool.JacobianDiffgeo.Path.LocalPrimitive +public import Mathlib.AlgebraicTopology.FundamentalGroupoid.SimplyConnected +import LeanPool.JacobianDiffgeo.Path.HomotopySquare +import LeanPool.JacobianDiffgeo.Path.Planar +import LeanPool.JacobianDiffgeo.Surface.Bridges import Mathlib.Geometry.Manifold.Complex -import Mathlib.Analysis.Convex.PathConnected /-! # The genus-0 engine: simply connected ⇒ every `Form1` has a global primitive (CC-sphere-topology) @@ -29,6 +34,8 @@ Main declarations: instance, and the headline `RS.SphereTopology.genus_eq_zero_of_simplyConnectedSpace`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology IsManifold RS Metric open scoped Convex diff --git a/LeanPool/JacobianDiffgeo/SphereTopology/Headline.lean b/LeanPool/JacobianDiffgeo/SphereTopology/Headline.lean index 18d78ddd3a..037a7e8b7e 100644 --- a/LeanPool/JacobianDiffgeo/SphereTopology/Headline.lean +++ b/LeanPool/JacobianDiffgeo/SphereTopology/Headline.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.SphereTopology.SimplyConnectedP1 +public import LeanPool.JacobianDiffgeo.Forms.Genus +public import Mathlib.Analysis.InnerProductSpace.PiL2 +import LeanPool.JacobianDiffgeo.ProjectiveLine.Sphere import LeanPool.JacobianDiffgeo.SphereTopology.GlobalPrimitive +import LeanPool.JacobianDiffgeo.SphereTopology.SimplyConnectedP1 +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The backward headline: `X ≃ₜ S² ⇒ genus X = 0` (CC-sphere-topology, design §4) @@ -19,6 +24,8 @@ compact Riemann surface has genus `0`) into the exact backward-headline signatur Main declaration: `RS.SphereTopology.genus_eq_zero_of_homeo_sphere`. -/ +@[expose] public section + open scoped ContDiff Manifold namespace RS.SphereTopology diff --git a/LeanPool/JacobianDiffgeo/SphereTopology/SimplyConnectedP1.lean b/LeanPool/JacobianDiffgeo/SphereTopology/SimplyConnectedP1.lean index 6b19b7467e..eb17442c43 100644 --- a/LeanPool/JacobianDiffgeo/SphereTopology/SimplyConnectedP1.lean +++ b/LeanPool/JacobianDiffgeo/SphereTopology/SimplyConnectedP1.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.ProjectiveLine -import LeanPool.JacobianDiffgeo.Path -import Mathlib.AlgebraicTopology.FundamentalGroupoid.SimplyConnected +public import Mathlib.AlgebraicTopology.FundamentalGroupoid.SimplyConnected +public import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.Topology.Compactification.OnePoint.Basic +import LeanPool.JacobianDiffgeo.Path.Perturb +import LeanPool.JacobianDiffgeo.ProjectiveLine.Charts +import LeanPool.JacobianDiffgeo.ProjectiveLine.Sphere import Mathlib.Analysis.Convex.Contractible -import Mathlib.Topology.Connected.LocallyPathConnected +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `SimplyConnectedSpace (OnePoint ℂ)` (CC-sphere-topology, design §2) @@ -34,6 +38,8 @@ Main declarations: * `RS.SphereTopology.simplyConnectedSpace_sphere` (the challenge sphere model). -/ +@[expose] public section + open scoped ContDiff Manifold OnePoint open Set Topology OnePoint RS RS.P1 diff --git a/LeanPool/JacobianDiffgeo/Surface.lean b/LeanPool/JacobianDiffgeo/Surface.lean index 34df6497f8..e2c0405f36 100644 --- a/LeanPool/JacobianDiffgeo/Surface.lean +++ b/LeanPool/JacobianDiffgeo/Surface.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.Surface.Bridges -import LeanPool.JacobianDiffgeo.Surface.RealSmooth -import LeanPool.JacobianDiffgeo.Surface.ChartedSpaceKit -import LeanPool.JacobianDiffgeo.Surface.Identity -import LeanPool.JacobianDiffgeo.Surface.InverseFunction +public import LeanPool.JacobianDiffgeo.Surface.Bridges +public import LeanPool.JacobianDiffgeo.Surface.RealSmooth +public import LeanPool.JacobianDiffgeo.Surface.ChartedSpaceKit +public import LeanPool.JacobianDiffgeo.Surface.Identity +public import LeanPool.JacobianDiffgeo.Surface.InverseFunction +import Mathlib.Combinatorics.Matroid.Init /-! # surfaces-and-charts: foundation unit for Riemann surfaces (namespace `RS`) @@ -36,3 +38,5 @@ API summary (see `docs/design/surfaces-and-charts.md`): (+ `_of_mfderiv_ne_zero`, `mfderiv_ne_zero_iff_deriv_ne_zero`, `map_nhds_eq_of_deriv_ne_zero`). -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/Surface/Bridges.lean b/LeanPool/JacobianDiffgeo/Surface/Bridges.lean index 96307e2dba..6e9cf06bb8 100644 --- a/LeanPool/JacobianDiffgeo/Surface/Bridges.lean +++ b/LeanPool/JacobianDiffgeo/Surface/Bridges.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Geometry.Manifold.ContMDiff.Defs import Mathlib.Geometry.Manifold.ContMDiff.Atlas import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace -import Mathlib.Analysis.Complex.Basic /-! # Bridges: `ContMDiff` over `𝓘(ℂ)` ↔ chart-local `ContDiff`/`AnalyticAt` @@ -28,6 +30,8 @@ manifold smoothness/holomorphy into planar statements about the chart composites `contMDiffOn_iff_analyticOnNhd_of_subset_source`: holomorphy may be read in ANY atlas chart. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology IsManifold diff --git a/LeanPool/JacobianDiffgeo/Surface/ChartedSpaceKit.lean b/LeanPool/JacobianDiffgeo/Surface/ChartedSpaceKit.lean index c8fecc9d89..eb017dc2c4 100644 --- a/LeanPool/JacobianDiffgeo/Surface/ChartedSpaceKit.lean +++ b/LeanPool/JacobianDiffgeo/Surface/ChartedSpaceKit.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import Mathlib.Geometry.Manifold.IsManifold.Basic -import Mathlib.Analysis.Complex.Basic +public import Mathlib.Geometry.Manifold.IsManifold.Basic +public import Mathlib.Analysis.Complex.Basic /-! # Charted-space kit: build `ChartedSpace ℂ Z` + `IsManifold 𝓘(ℂ) ω Z` from a chart family @@ -25,6 +26,8 @@ Toolkit for projective-line (CC5: two charts on `OnePoint ℂ`) and jacobian-con This file is standalone (it does not assume a pre-existing surface). -/ +@[expose] public section + open scoped ContDiff Manifold open Set diff --git a/LeanPool/JacobianDiffgeo/Surface/Identity.lean b/LeanPool/JacobianDiffgeo/Surface/Identity.lean index a444a863a0..89e2bc9361 100644 --- a/LeanPool/JacobianDiffgeo/Surface/Identity.lean +++ b/LeanPool/JacobianDiffgeo/Surface/Identity.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Geometry.Manifold.ContMDiff.Defs import LeanPool.JacobianDiffgeo.Surface.Bridges -import Mathlib.Analysis.Analytic.IsolatedZeros import Mathlib.Analysis.Complex.OpenMapping +import Mathlib.Geometry.Manifold.ContMDiff.Basic /-! # Identity theorem, isolated fibers, open mapping, surjectivity @@ -26,6 +29,8 @@ For holomorphic maps between Riemann surfaces: (Forster 2.7; consumed by mapping-degree and the headline). -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology IsManifold diff --git a/LeanPool/JacobianDiffgeo/Surface/InverseFunction.lean b/LeanPool/JacobianDiffgeo/Surface/InverseFunction.lean index 2ffd2ef9c3..eea981e1b6 100644 --- a/LeanPool/JacobianDiffgeo/Surface/InverseFunction.lean +++ b/LeanPool/JacobianDiffgeo/Surface/InverseFunction.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Geometry.Manifold.ContMDiff.Defs +public import Mathlib.Geometry.Manifold.MFDeriv.Defs import LeanPool.JacobianDiffgeo.Surface.Bridges import Mathlib.Analysis.Calculus.InverseFunctionTheorem.Analytic +import Mathlib.Geometry.Manifold.ContMDiff.Atlas +import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace import Mathlib.Geometry.Manifold.MFDeriv.Basic /-! @@ -26,6 +32,8 @@ The planar input is mathlib's analytic inverse function theorem (`AnalyticAt.analyticAt_localInverse`, `HasStrictFDerivAt.toOpenPartialHomeomorph`). -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology IsManifold diff --git a/LeanPool/JacobianDiffgeo/Surface/RealSmooth.lean b/LeanPool/JacobianDiffgeo/Surface/RealSmooth.lean index 65b253f3c2..23d649ed78 100644 --- a/LeanPool/JacobianDiffgeo/Surface/RealSmooth.lean +++ b/LeanPool/JacobianDiffgeo/Surface/RealSmooth.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module +public import Mathlib.Geometry.Manifold.PartitionOfUnity import LeanPool.JacobianDiffgeo.Surface.Bridges -import Mathlib.Analysis.Analytic.Constructions -import Mathlib.Geometry.Manifold.PartitionOfUnity /-! # CC7: the `𝓘(ℝ, ℂ)` bridge — real smoothness from holomorphy @@ -29,6 +29,8 @@ instance. This file provides, once and for all: * `exists_smoothPartitionOfUnity` on a compact T2 surface. -/ +@[expose] public section + open scoped ContDiff Manifold open Set Filter Topology IsManifold diff --git a/LeanPool/JacobianDiffgeo/TailDuality.lean b/LeanPool/JacobianDiffgeo/TailDuality.lean index 86da0741d9..30b6658494 100644 --- a/LeanPool/JacobianDiffgeo/TailDuality.lean +++ b/LeanPool/JacobianDiffgeo/TailDuality.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.TailDuality.TailOps -import LeanPool.JacobianDiffgeo.TailDuality.Pairing -import LeanPool.JacobianDiffgeo.TailDuality.Counting -import LeanPool.JacobianDiffgeo.TailDuality.Duality -import LeanPool.JacobianDiffgeo.TailDuality.ChiLedger +public import LeanPool.JacobianDiffgeo.TailDuality.TailOps +public import LeanPool.JacobianDiffgeo.TailDuality.Pairing +public import LeanPool.JacobianDiffgeo.TailDuality.Counting +public import LeanPool.JacobianDiffgeo.TailDuality.Duality +public import LeanPool.JacobianDiffgeo.TailDuality.ChiLedger +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # serre-duality-tails: Serre duality via Laurent tails (Miranda VI.3) (namespace `RS.TailDuality`) @@ -97,3 +100,5 @@ a finite-dimensional space). restating at the tail level (through `H1Tail`, not `Cech.H1`) or needs to accept the conditional equivalence as a hypothesis. -/ + +@[expose] public section diff --git a/LeanPool/JacobianDiffgeo/TailDuality/ChiLedger.lean b/LeanPool/JacobianDiffgeo/TailDuality/ChiLedger.lean index f16780f0c3..97ea4691d3 100644 --- a/LeanPool/JacobianDiffgeo/TailDuality/ChiLedger.lean +++ b/LeanPool/JacobianDiffgeo/TailDuality/ChiLedger.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.TailDuality.Duality +public import LeanPool.JacobianDiffgeo.TailDuality.Duality +import LeanPool.JacobianDiffgeo.CanonicalForms.Existence +import LeanPool.JacobianDiffgeo.Cech.SixTerm +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The tail-χ ledger: `chiT` additivity (serre-duality-tails, chiT-ledger closure) @@ -46,6 +51,8 @@ out of scope, per `Comparison.lean`/the root docstring) — it is not used here * **`chiT_eq_chiT_zero_add_degree (D) : chiT D = chiT 0 + D.degree`** — the primary deliverable. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace open RS RS.LaurentTail diff --git a/LeanPool/JacobianDiffgeo/TailDuality/Counting.lean b/LeanPool/JacobianDiffgeo/TailDuality/Counting.lean index 9ca19d96e2..b13c789872 100644 --- a/LeanPool/JacobianDiffgeo/TailDuality/Counting.lean +++ b/LeanPool/JacobianDiffgeo/TailDuality/Counting.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.TailDuality.Pairing +public import LeanPool.JacobianDiffgeo.Finiteness.Chi +public import LeanPool.JacobianDiffgeo.TailDuality.TailOps +import LeanPool.JacobianDiffgeo.CanonicalForms.Existence +import LeanPool.JacobianDiffgeo.Finiteness.H1Finite import LeanPool.JacobianDiffgeo.LaurentTail.Comparison -import LeanPool.JacobianDiffgeo.Finiteness +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.FreeModule.Finite.Matrix +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # `nuPairDual`/Miranda Lemma 3.4: the counting step (serre-duality-tails) @@ -24,6 +30,8 @@ Unit: serre-duality-tails (`docs/design/serre-duality-tails.md` §6 P5, addendum * `exists_mul_functional_eq`: **MIRANDA LEMMA 3.4**. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace open RS RS.LaurentTail diff --git a/LeanPool/JacobianDiffgeo/TailDuality/Duality.lean b/LeanPool/JacobianDiffgeo/TailDuality/Duality.lean index 4eed35fa3b..6da03c00d2 100644 --- a/LeanPool/JacobianDiffgeo/TailDuality/Duality.lean +++ b/LeanPool/JacobianDiffgeo/TailDuality/Duality.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.TailDuality.Counting +public import LeanPool.JacobianDiffgeo.TailDuality.Counting +public import LeanPool.JacobianDiffgeo.TailDuality.Pairing +import LeanPool.JacobianDiffgeo.CanonicalForms.Existence +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Miranda Lemma 3.6, the surjectivity endgame, and Serre duality (serre-duality-tails) @@ -30,6 +35,8 @@ facts proved elementarily (no Čech `H1`/cochain machinery: `H1Tail D` being a l own docstring for the full account. riemann-roch (#28) now consumes `chiT`'s own ledger directly. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace open RS RS.LaurentTail diff --git a/LeanPool/JacobianDiffgeo/TailDuality/Pairing.lean b/LeanPool/JacobianDiffgeo/TailDuality/Pairing.lean index ec994ffeca..bacb66a2e2 100644 --- a/LeanPool/JacobianDiffgeo/TailDuality/Pairing.lean +++ b/LeanPool/JacobianDiffgeo/TailDuality/Pairing.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.TailDuality.TailOps -import LeanPool.JacobianDiffgeo.CanonicalForms -import LeanPool.JacobianDiffgeo.ResidueCalculus.GermFunctionals +public import LeanPool.JacobianDiffgeo.TailDuality.TailOps +public import LeanPool.JacobianDiffgeo.ResidueCalculus.GermFunctionals +public import LeanPool.JacobianDiffgeo.CanonicalForms.LinearSystems +public import LeanPool.JacobianDiffgeo.Meromorphic.CodiscreteBridge import LeanPool.JacobianDiffgeo.ResidueTheorem.Unconditional +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # `pairT`/`resMap`: the residue pairing on the germ model (serre-duality-tails) @@ -31,6 +35,8 @@ functional needs). All PUBLIC lemmas are stated at the `MForm`/`laurentCoeffAt` * `resMap`/`resMap_injective`: the induced map `Ω(-D) →ₗ Dual(H1Tail D)`. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace Filter Topology open RS RS.LaurentTail diff --git a/LeanPool/JacobianDiffgeo/TailDuality/TailOps.lean b/LeanPool/JacobianDiffgeo/TailDuality/TailOps.lean index 12e9e6dd15..fe788ac3ba 100644 --- a/LeanPool/JacobianDiffgeo/TailDuality/TailOps.lean +++ b/LeanPool/JacobianDiffgeo/TailDuality/TailOps.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.JacobianDiffgeo.LaurentTail.Truncation +public import LeanPool.JacobianDiffgeo.LaurentTail.Truncation +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `truncT`/`singleT`/`mulInto`/`nuL`: the truncation and multiplication kit (serre-duality-tails) @@ -20,6 +23,8 @@ Unit: serre-duality-tails (`docs/design/serre-duality-tails.md` §3 D1/D3, §5.1 plus the `μ_{1/f}` inversion identity `nuL_mulInto_inv` the surjectivity endgame needs. -/ +@[expose] public section + open scoped ContDiff Manifold open Set TopologicalSpace open RS RS.LaurentTail diff --git a/LeanPool/JohnsonLindenstraussLean.lean b/LeanPool/JohnsonLindenstraussLean.lean index 068599bd07..7ce4ecb050 100644 --- a/LeanPool/JohnsonLindenstraussLean.lean +++ b/LeanPool/JohnsonLindenstraussLean.lean @@ -3,19 +3,20 @@ Copyright (c) 2026 claytomode. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: claytomode -/ +module -import LeanPool.JohnsonLindenstraussLean.ChiSquared -import LeanPool.JohnsonLindenstraussLean.EndToEnd -import LeanPool.JohnsonLindenstraussLean.GaussianTail -import LeanPool.JohnsonLindenstraussLean.InnerProduct -import LeanPool.JohnsonLindenstraussLean.Lemma -import LeanPool.JohnsonLindenstraussLean.NormPreservation -import LeanPool.JohnsonLindenstraussLean.Projection -import LeanPool.JohnsonLindenstraussLean.QJL -import LeanPool.JohnsonLindenstraussLean.QJLDistortion -import LeanPool.JohnsonLindenstraussLean.Rotation -import LeanPool.JohnsonLindenstraussLean.SquaredGaussian -import LeanPool.JohnsonLindenstraussLean.Verify +public import LeanPool.JohnsonLindenstraussLean.ChiSquared +public import LeanPool.JohnsonLindenstraussLean.EndToEnd +public import LeanPool.JohnsonLindenstraussLean.GaussianTail +public import LeanPool.JohnsonLindenstraussLean.InnerProduct +public import LeanPool.JohnsonLindenstraussLean.Lemma +public import LeanPool.JohnsonLindenstraussLean.NormPreservation +public import LeanPool.JohnsonLindenstraussLean.Projection +public import LeanPool.JohnsonLindenstraussLean.QJL +public import LeanPool.JohnsonLindenstraussLean.QJLDistortion +public import LeanPool.JohnsonLindenstraussLean.Rotation +public import LeanPool.JohnsonLindenstraussLean.SquaredGaussian +public import LeanPool.JohnsonLindenstraussLean.Verify /-! # The Johnson–Lindenstrauss Lemma and Quantized JL @@ -28,6 +29,8 @@ Tags: dimensionality-reduction, random-projection, johnson-lindenstrauss, gaussi MSC: 68W20, 60G15, 68P05 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/JohnsonLindenstraussLean/ChiSquared.lean b/LeanPool/JohnsonLindenstraussLean/ChiSquared.lean index 7145f6aa7b..14903c4f94 100644 --- a/LeanPool/JohnsonLindenstraussLean/ChiSquared.lean +++ b/LeanPool/JohnsonLindenstraussLean/ChiSquared.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 claytomode. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: claytomode -/ -import LeanPool.JohnsonLindenstraussLean.SquaredGaussian +module + +public import LeanPool.JohnsonLindenstraussLean.SquaredGaussian /-! # Chi-squared moment generating function and concentration @@ -25,6 +27,8 @@ The analytic crux is reduced to two scalar logarithmic inequalities, proven by the monotonicity of an explicit auxiliary function. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Real open scoped ENNReal NNReal diff --git a/LeanPool/JohnsonLindenstraussLean/EndToEnd.lean b/LeanPool/JohnsonLindenstraussLean/EndToEnd.lean index d6bd750df2..fb1f288c4c 100644 --- a/LeanPool/JohnsonLindenstraussLean/EndToEnd.lean +++ b/LeanPool/JohnsonLindenstraussLean/EndToEnd.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 claytomode. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: claytomode -/ -import LeanPool.JohnsonLindenstraussLean.Rotation +module + +public import LeanPool.JohnsonLindenstraussLean.Projection +public import Mathlib.Analysis.InnerProductSpace.PiL2 import LeanPool.JohnsonLindenstraussLean.Lemma +import LeanPool.JohnsonLindenstraussLean.Rotation /-! # The end-to-end Gaussian Johnson–Lindenstrauss theorem @@ -29,6 +33,8 @@ The proof combines: is kept as a standalone lemma. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Real namespace JL diff --git a/LeanPool/JohnsonLindenstraussLean/GaussianTail.lean b/LeanPool/JohnsonLindenstraussLean/GaussianTail.lean index 3dc2423aeb..38e81067be 100644 --- a/LeanPool/JohnsonLindenstraussLean/GaussianTail.lean +++ b/LeanPool/JohnsonLindenstraussLean/GaussianTail.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 claytomode. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: claytomode -/ -import Mathlib.Probability.Moments.SubGaussian -import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import Mathlib.Analysis.Calculus.MeanValue -import Mathlib.Analysis.Calculus.DerivativeTest +module + +public import Mathlib.Probability.Moments.SubGaussian +public import Mathlib.Probability.Distributions.Gaussian.Real import LeanPool.JohnsonLindenstraussLean.SquaredGaussian +import Mathlib.Analysis.Calculus.DerivativeTest /-! # Gaussian tail analysis: the centered folded normal is 1-sub-Gaussian @@ -31,6 +32,8 @@ The route is: * `foldedNormal_subgaussian`: assembling the above into `HasSubgaussianMGF (|·| − √(2/π)) 1`. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Real Filter Set open scoped ENNReal NNReal Topology diff --git a/LeanPool/JohnsonLindenstraussLean/InnerProduct.lean b/LeanPool/JohnsonLindenstraussLean/InnerProduct.lean index e1bf1e7cda..35b18a80e5 100644 --- a/LeanPool/JohnsonLindenstraussLean/InnerProduct.lean +++ b/LeanPool/JohnsonLindenstraussLean/InnerProduct.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 claytomode. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: claytomode -/ -import LeanPool.JohnsonLindenstraussLean.NormPreservation +module + +public import Mathlib.Analysis.InnerProductSpace.Defs +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Inner-product preservation (unquantized Gaussian-projection corollary) @@ -22,6 +27,8 @@ mechanism behind QJL's one-bit guarantee, which instead rests on the asymmetric identity (`JL/QJL.lean`). -/ +@[expose] public section + open scoped RealInnerProductSpace namespace JL diff --git a/LeanPool/JohnsonLindenstraussLean/Lemma.lean b/LeanPool/JohnsonLindenstraussLean/Lemma.lean index b1c97d961c..a486b2e469 100644 --- a/LeanPool/JohnsonLindenstraussLean/Lemma.lean +++ b/LeanPool/JohnsonLindenstraussLean/Lemma.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 claytomode. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: claytomode -/ -import LeanPool.JohnsonLindenstraussLean.NormPreservation -import LeanPool.JohnsonLindenstraussLean.Projection +module + +public import Mathlib.MeasureTheory.Measure.Typeclasses.Probability +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # The Johnson–Lindenstrauss embedding-existence theorem @@ -24,6 +28,8 @@ and `hcard` is the union-bound counting condition implied by `k ≥ ⌈8 · log n / (ε² − ε³)⌉`. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Real namespace JL diff --git a/LeanPool/JohnsonLindenstraussLean/NormPreservation.lean b/LeanPool/JohnsonLindenstraussLean/NormPreservation.lean index af0edc290a..dc33e21dea 100644 --- a/LeanPool/JohnsonLindenstraussLean/NormPreservation.lean +++ b/LeanPool/JohnsonLindenstraussLean/NormPreservation.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 claytomode. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: claytomode -/ -import LeanPool.JohnsonLindenstraussLean.ChiSquared +module + +public import LeanPool.JohnsonLindenstraussLean.ChiSquared /-! # Distributional Johnson–Lindenstrauss norm preservation @@ -20,6 +22,8 @@ norm of any fixed vector to within a factor `1 ± ε`, except with the stated fa probability. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Real namespace JL diff --git a/LeanPool/JohnsonLindenstraussLean/Projection.lean b/LeanPool/JohnsonLindenstraussLean/Projection.lean index 9361e1a715..fa16029056 100644 --- a/LeanPool/JohnsonLindenstraussLean/Projection.lean +++ b/LeanPool/JohnsonLindenstraussLean/Projection.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 claytomode. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: claytomode -/ -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.LinearAlgebra.Matrix.DotProduct -import Mathlib.Probability.Distributions.Gaussian.Multivariate -import Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Basic -import Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence +module + +public import Mathlib.Analysis.Real.Sqrt +public import Mathlib.Data.Matrix.Mul +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # The Gaussian random projection @@ -28,6 +30,8 @@ row–vector products. Under the Gaussian law on `A`, each `Aᵢ · x` is `N(0, labeled hypothesis by the existence theorem. -/ +@[expose] public section + open scoped BigOperators namespace JL diff --git a/LeanPool/JohnsonLindenstraussLean/QJL.lean b/LeanPool/JohnsonLindenstraussLean/QJL.lean index c99b2d3256..eb0201f129 100644 --- a/LeanPool/JohnsonLindenstraussLean/QJL.lean +++ b/LeanPool/JohnsonLindenstraussLean/QJL.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 claytomode. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: claytomode -/ -import Mathlib.Basic.Real.Sign -import LeanPool.JohnsonLindenstraussLean.Rotation +module + +import Mathlib.Probability.Distributions.Gaussian.Fernique +import Mathlib.Probability.Independence.Integration +public import Mathlib.Basic.Real.Sign +public import Mathlib.Probability.Distributions.Gaussian.Multivariate +import LeanPool.JohnsonLindenstraussLean.SquaredGaussian +import Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Basic +import Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence /-! # Quantized Johnson–Lindenstrauss (QJL): unbiasedness of the 1-bit estimator @@ -31,6 +38,8 @@ one-bit key quantization. It is built in three increasing layers: product: `E[estimator] = ⟪key/‖key‖, q⟫`. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Real open scoped ENNReal NNReal RealInnerProductSpace diff --git a/LeanPool/JohnsonLindenstraussLean/QJLDistortion.lean b/LeanPool/JohnsonLindenstraussLean/QJLDistortion.lean index 47172ee368..7ae432aff1 100644 --- a/LeanPool/JohnsonLindenstraussLean/QJLDistortion.lean +++ b/LeanPool/JohnsonLindenstraussLean/QJLDistortion.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 claytomode. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: claytomode -/ -import LeanPool.JohnsonLindenstraussLean.QJL +module + + +public import LeanPool.JohnsonLindenstraussLean.QJL +public import Mathlib.Probability.Moments.SubGaussian import LeanPool.JohnsonLindenstraussLean.GaussianTail -import Mathlib.Probability.Moments.Variance -import Mathlib.Probability.Moments.SubGaussian +import Mathlib.Probability.Distributions.Gaussian.Fernique +import Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Basic +import Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Independence /-! # QJL distortion / concentration bound @@ -30,6 +35,8 @@ normalized inner product `⟪key/‖key‖, q⟫` with high probability. It is b so `m = O(‖q‖²/(ε²δ))` sign-bits suffice for additive error `ε` with probability `1−δ`. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Real open scoped ENNReal NNReal RealInnerProductSpace diff --git a/LeanPool/JohnsonLindenstraussLean/Rotation.lean b/LeanPool/JohnsonLindenstraussLean/Rotation.lean index 3796ecf988..47d67a45ab 100644 --- a/LeanPool/JohnsonLindenstraussLean/Rotation.lean +++ b/LeanPool/JohnsonLindenstraussLean/Rotation.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 claytomode. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: claytomode -/ +module + +public import LeanPool.JohnsonLindenstraussLean.Projection +public import LeanPool.JohnsonLindenstraussLean.ChiSquared import LeanPool.JohnsonLindenstraussLean.NormPreservation -import LeanPool.JohnsonLindenstraussLean.Projection +import Mathlib.Probability.Distributions.Gaussian.HasGaussianLaw.Basic +import Mathlib.Probability.Distributions.Gaussian.Multivariate /-! # Gaussian rotation invariance: the projection ↔ chi-squared link @@ -30,6 +35,8 @@ Combining this with the deterministic identity `‖jlMap A x‖² = (1/k)·∑ the projected squared norm `∑ᵢ (jlMap A w i)²` of any fixed `w ≠ 0` (`jlMap_concentration`). -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Real namespace JL diff --git a/LeanPool/JohnsonLindenstraussLean/SquaredGaussian.lean b/LeanPool/JohnsonLindenstraussLean/SquaredGaussian.lean index 2f287a94a5..9447e8ddbe 100644 --- a/LeanPool/JohnsonLindenstraussLean/SquaredGaussian.lean +++ b/LeanPool/JohnsonLindenstraussLean/SquaredGaussian.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 claytomode. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: claytomode -/ -import Mathlib.Probability.Distributions.Gaussian.Real +module + +public import Mathlib.Probability.Distributions.Gaussian.Real /-! # The moment generating function of a squared standard Gaussian @@ -20,6 +22,8 @@ The proof reduces the moment generating function to a Gaussian integral via mathlib's `integral_gaussian`. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Real open scoped ENNReal NNReal diff --git a/LeanPool/JohnsonLindenstraussLean/Verify.lean b/LeanPool/JohnsonLindenstraussLean/Verify.lean index b7ba5d0405..833c0ccd0a 100644 --- a/LeanPool/JohnsonLindenstraussLean/Verify.lean +++ b/LeanPool/JohnsonLindenstraussLean/Verify.lean @@ -3,16 +3,31 @@ Copyright (c) 2026 claytomode. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: claytomode -/ -import LeanPool.JohnsonLindenstraussLean.SquaredGaussian -import LeanPool.JohnsonLindenstraussLean.ChiSquared -import LeanPool.JohnsonLindenstraussLean.Projection -import LeanPool.JohnsonLindenstraussLean.NormPreservation -import LeanPool.JohnsonLindenstraussLean.Rotation -import LeanPool.JohnsonLindenstraussLean.Lemma -import LeanPool.JohnsonLindenstraussLean.EndToEnd -import LeanPool.JohnsonLindenstraussLean.InnerProduct -import LeanPool.JohnsonLindenstraussLean.QJL -import LeanPool.JohnsonLindenstraussLean.QJLDistortion +module + +public import LeanPool.JohnsonLindenstraussLean.QJLDistortion + +public import LeanPool.JohnsonLindenstraussLean.QJL + +public import LeanPool.JohnsonLindenstraussLean.InnerProduct + +public import LeanPool.JohnsonLindenstraussLean.EndToEnd + +public import LeanPool.JohnsonLindenstraussLean.Lemma + +public import LeanPool.JohnsonLindenstraussLean.Rotation + +public import LeanPool.JohnsonLindenstraussLean.NormPreservation + +public import LeanPool.JohnsonLindenstraussLean.Projection + +public import LeanPool.JohnsonLindenstraussLean.ChiSquared + +public import LeanPool.JohnsonLindenstraussLean.SquaredGaussian + +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Verification: sanity instantiations and axiom audit @@ -23,6 +38,8 @@ mathlib's standard axioms (`propext`, `Classical.choice`, `Quot.sound`) — i.e. genuinely `sorry`-free. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Real open scoped RealInnerProductSpace diff --git a/LeanPool/KahnKalai.lean b/LeanPool/KahnKalai.lean index 4850b60522..84894d1b5b 100644 --- a/LeanPool/KahnKalai.lean +++ b/LeanPool/KahnKalai.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Dan Clemens Posch. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dan Clemens Posch -/ +module -import LeanPool.KahnKalai.ParkPham +public import LeanPool.KahnKalai.ParkPham +import LeanPool.KahnKalai.Covering +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Floor.Semifield +import Mathlib.Tactic.Positivity.Finset /-! # Kahn–Kalai expectation-threshold theorem @@ -17,6 +22,8 @@ Tags: probabilistic-combinatorics, random-structures, threshold-phenomena, set-s MSC: 05C80, 60C05 -/ +@[expose] public section + namespace KahnKalai /-- **Tran–Vu, Theorem 2.3.** If `ℓ` is at most the ground-set cardinality, diff --git a/LeanPool/KahnKalai/Basic.lean b/LeanPool/KahnKalai/Basic.lean index da218916e9..795544214c 100644 --- a/LeanPool/KahnKalai/Basic.lean +++ b/LeanPool/KahnKalai/Basic.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Dan Clemens Posch. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dan Clemens Posch -/ -import Mathlib.Analysis.SpecialFunctions.Log.Base +module + +public import Mathlib.Analysis.SpecialFunctions.Log.Base /-! Foundational lemmas for the Tran–Vu covering argument: upset calculus, @@ -11,6 +13,8 @@ cover cost as an attained infimum, and Fact 2.1 (level fractions of an upset are nondecreasing). -/ +@[expose] public section + open Finset namespace KahnKalai diff --git a/LeanPool/KahnKalai/Cost.lean b/LeanPool/KahnKalai/Cost.lean index fe8dc43368..dce8c9f2fc 100644 --- a/LeanPool/KahnKalai/Cost.lean +++ b/LeanPool/KahnKalai/Cost.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Dan Clemens Posch. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dan Clemens Posch -/ -import LeanPool.KahnKalai.Basic +module + +public import LeanPool.KahnKalai.Basic /-! Cover-cost calculus for Tran–Vu: the infimum is a minimum, subadditivity, empty-family / empty-set evaluation, and `⊆`-minimals. -/ +@[expose] public section + open Finset namespace KahnKalai diff --git a/LeanPool/KahnKalai/Covering.lean b/LeanPool/KahnKalai/Covering.lean index de2b384a9e..67f990847e 100644 --- a/LeanPool/KahnKalai/Covering.lean +++ b/LeanPool/KahnKalai/Covering.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Dan Clemens Posch. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dan Clemens Posch -/ -import LeanPool.KahnKalai.DoubleCount +module + +public import LeanPool.KahnKalai.DoubleCount +import Mathlib.Algebra.Order.Floor.Semifield +import Mathlib.Tactic.Positivity.Finset /-! Tran–Vu Theorem 2.3: the covering theorem. -/ +@[expose] public section + open Finset namespace KahnKalai diff --git a/LeanPool/KahnKalai/DoubleCount.lean b/LeanPool/KahnKalai/DoubleCount.lean index 24db951dd6..d7a78c6f87 100644 --- a/LeanPool/KahnKalai/DoubleCount.lean +++ b/LeanPool/KahnKalai/DoubleCount.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Dan Clemens Posch. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dan Clemens Posch -/ -import LeanPool.KahnKalai.Cost -import LeanPool.KahnKalai.Numeric +module + +public import LeanPool.KahnKalai.Cost +public import LeanPool.KahnKalai.Numeric +import Mathlib.Algebra.Order.Floor.Semifield +import Mathlib.Tactic.Positivity.Finset /-! Tran–Vu Lemma 2.4 (double counting of large minimals `G_W`). -/ +@[expose] public section + open Finset namespace KahnKalai diff --git a/LeanPool/KahnKalai/Numeric.lean b/LeanPool/KahnKalai/Numeric.lean index a420f3ec32..d8b56307f6 100644 --- a/LeanPool/KahnKalai/Numeric.lean +++ b/LeanPool/KahnKalai/Numeric.lean @@ -3,21 +3,19 @@ Copyright (c) 2026 Dan Clemens Posch. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dan Clemens Posch -/ +module + +public import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Algebra.Order.Floor.Semifield -import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Data.Nat.Choose.Sum -import Mathlib.Tactic.FieldSimp import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity.Finset /-! Numeric inequalities for Tran–Vu’s covering induction (`L = 1000`). -/ +@[expose] public section + namespace KahnKalai open Nat Finset diff --git a/LeanPool/KahnKalai/ParkPham.lean b/LeanPool/KahnKalai/ParkPham.lean index 8d428e888f..aee6d45260 100644 --- a/LeanPool/KahnKalai/ParkPham.lean +++ b/LeanPool/KahnKalai/ParkPham.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Dan Clemens Posch. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dan Clemens Posch -/ +module + +public import LeanPool.KahnKalai.Basic import LeanPool.KahnKalai.Covering +import Mathlib.Algebra.Order.Floor.Semifield import Mathlib.Analysis.Complex.ExponentialBounds /-! @@ -11,6 +15,8 @@ Tran–Vu Remark 2.5: binomial mixture of level fractions plus a `2^{-X}` Markov tail, yielding Park–Pham from the covering theorem. -/ +@[expose] public section + open Finset namespace KahnKalai diff --git a/LeanPool/KaltonRoberts.lean b/LeanPool/KaltonRoberts.lean index 84d3cff57f..a021b27e1f 100644 --- a/LeanPool/KaltonRoberts.lean +++ b/LeanPool/KaltonRoberts.lean @@ -3,15 +3,21 @@ Copyright (c) 2026 Ho Boon Suan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ho Boon Suan -/ +module -import LeanPool.KaltonRoberts.Defs -import LeanPool.KaltonRoberts.Numerical -import LeanPool.KaltonRoberts.Collections -import LeanPool.KaltonRoberts.Lemmas -import LeanPool.KaltonRoberts.Pipeline -import LeanPool.KaltonRoberts.PipelineEps -import LeanPool.KaltonRoberts.EpsilonRecombination -import LeanPool.KaltonRoberts.MainTheorem +public import LeanPool.KaltonRoberts.Defs +public import LeanPool.KaltonRoberts.Numerical +public import LeanPool.KaltonRoberts.Collections +public import LeanPool.KaltonRoberts.Lemmas +public import LeanPool.KaltonRoberts.Pipeline +public import LeanPool.KaltonRoberts.PipelineEps +public import LeanPool.KaltonRoberts.EpsilonRecombination +public import LeanPool.KaltonRoberts.MainTheorem +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Halving the Kalton-Roberts upper bound @@ -23,3 +29,5 @@ Main declarations: `KaltonRoberts.KR_constant_lt` Tags: functional-analysis, finitely-additive-measures, kalton-roberts MSC: 46B20, 28A12, 05C35 -/ + +@[expose] public section diff --git a/LeanPool/KaltonRoberts/Collections.lean b/LeanPool/KaltonRoberts/Collections.lean index 1b4cfde955..e5be982eb1 100644 --- a/LeanPool/KaltonRoberts/Collections.lean +++ b/LeanPool/KaltonRoberts/Collections.lean @@ -14,7 +14,15 @@ recombination pipeline (Sections 3–5). **Reference**: Lemma 2.3 and Section 5 of the companion paper. -/ -import LeanPool.KaltonRoberts.Defs +module + +public import LeanPool.KaltonRoberts.Defs +public import Mathlib.CategoryTheory.Category.Basic +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Weighted finite collections and certificate mass decomposition @@ -23,6 +31,8 @@ Weighted collections and the positive/negative mass decomposition of a dual certificate for the low-frequency construction and recombination pipeline. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators @@ -346,23 +356,27 @@ Total weight = p + q = 1. Every item has frequency exactly q Symmetrically for the augmented negative collection B. -/ -private noncomputable def augPosWeight +/-- The weights of the augmented positive collection. -/ +noncomputable def augPosWeight {f : Finset U → ℝ} {M : ℝ} (cert : DualCertificate f M) : Finset U ⊕ Finset U → ℝ | Sum.inl S => max (cert.lam S) 0 | Sum.inr S => max (-cert.lam S) 0 -private def augPosSets : Finset U ⊕ Finset U → Finset U +/-- The sets of the augmented positive collection. -/ +def augPosSets : Finset U ⊕ Finset U → Finset U | Sum.inl S => S | Sum.inr S => Sᶜ -private noncomputable def augNegWeight +/-- The weights of the augmented negative collection. -/ +noncomputable def augNegWeight {f : Finset U → ℝ} {M : ℝ} (cert : DualCertificate f M) : Finset U ⊕ Finset U → ℝ | Sum.inl S => max (-cert.lam S) 0 | Sum.inr S => max (cert.lam S) 0 -private def augNegSets : Finset U ⊕ Finset U → Finset U +/-- The sets of the augmented negative collection. -/ +def augNegSets : Finset U ⊕ Finset U → Finset U | Sum.inl S => S | Sum.inr S => Sᶜ diff --git a/LeanPool/KaltonRoberts/Defs.lean b/LeanPool/KaltonRoberts/Defs.lean index b551c09fd1..7c71503e93 100644 --- a/LeanPool/KaltonRoberts/Defs.lean +++ b/LeanPool/KaltonRoberts/Defs.lean @@ -10,34 +10,15 @@ Authors: Ho Boon Suan This file contains the core definitions used throughout the formalization of the companion paper. -/ -import Mathlib.Algebra.BigOperators.Field -import Mathlib.Analysis.Complex.ExponentialBounds -import Mathlib.Analysis.Convex.Combination -import Mathlib.Analysis.Convex.Deriv -import Mathlib.Analysis.LocallyConvex.Separation -import Mathlib.Analysis.SpecialFunctions.Log.Basic +module + +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Algebra.Order.Algebra import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Combinatorics.Hall.Basic -import Mathlib.Data.Fintype.Perm -import Mathlib.Data.Nat.Choose.Cast -import Mathlib.Order.BooleanSubalgebra -import Mathlib.Tactic.Cases -import Mathlib.Tactic.Choose -import Mathlib.Tactic.CongrExclamation -import Mathlib.Tactic.Continuity -import Mathlib.Tactic.Contrapose -import Mathlib.Tactic.Convert -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push -import Mathlib.Tactic.Qify -import Mathlib.Tactic.Ring -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Aesop +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Definitions for the Kalton-Roberts formalization @@ -45,6 +26,8 @@ import Aesop Core definitions used throughout the formalization of the companion paper. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators diff --git a/LeanPool/KaltonRoberts/DualCert.lean b/LeanPool/KaltonRoberts/DualCert.lean index 999687418b..2caed44156 100644 --- a/LeanPool/KaltonRoberts/DualCert.lean +++ b/LeanPool/KaltonRoberts/DualCert.lean @@ -13,7 +13,15 @@ separation theorem. **Reference**: Lemma 2.1 in Section 2 of the companion paper. -/ -import LeanPool.KaltonRoberts.Defs +module + +public import LeanPool.KaltonRoberts.Defs +public import Mathlib.Analysis.Convex.Hull +public import Mathlib.CategoryTheory.Category.Basic +import Mathlib.Analysis.LocallyConvex.Separation +import Mathlib.Analysis.LocallyConvex.WithSeminorms +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.Positivity.Finset /-! # Dual certificate existence @@ -22,6 +30,8 @@ Existence of a dual certificate for best `l∞` approximation from the additive subspace, using geometric Hahn-Banach separation. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators diff --git a/LeanPool/KaltonRoberts/EpsilonRecombination.lean b/LeanPool/KaltonRoberts/EpsilonRecombination.lean index 5a2b8151ff..75511ff0d7 100644 --- a/LeanPool/KaltonRoberts/EpsilonRecombination.lean +++ b/LeanPool/KaltonRoberts/EpsilonRecombination.lean @@ -19,9 +19,16 @@ an additive `|J| · M / N` error in the average deficit, which can be made **Reference**: Lemma 3.2 in Section 3 of the companion paper. -/ -import LeanPool.KaltonRoberts.Defs -import LeanPool.KaltonRoberts.Collections +module + +public import LeanPool.KaltonRoberts.Collections import LeanPool.KaltonRoberts.UniformRecombination +import Mathlib.Algebra.BigOperators.Field +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Epsilon-loss recombination theorems @@ -30,6 +37,8 @@ Bridge from arbitrary real-weighted collections to finite-uniform recombination, with an epsilon loss in the recombination inequality. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators diff --git a/LeanPool/KaltonRoberts/Intersections.lean b/LeanPool/KaltonRoberts/Intersections.lean index 3e08f0295a..015a5b0e0a 100644 --- a/LeanPool/KaltonRoberts/Intersections.lean +++ b/LeanPool/KaltonRoberts/Intersections.lean @@ -12,9 +12,15 @@ collections, proving the frequency and deficit bounds needed for Corollary 3.1. **Reference**: Corollary 3.1 in Section 3 of the companion paper. -/ -import LeanPool.KaltonRoberts.Defs -import LeanPool.KaltonRoberts.Collections +module + +public import LeanPool.KaltonRoberts.Collections import LeanPool.KaltonRoberts.Lemmas +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Product and mixed intersection collections @@ -23,6 +29,8 @@ Product and mixed intersection collections with the frequency and deficit bounds needed for the mixed-intersection step. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators diff --git a/LeanPool/KaltonRoberts/Lemmas.lean b/LeanPool/KaltonRoberts/Lemmas.lean index 05e8539ee2..345cb7913d 100644 --- a/LeanPool/KaltonRoberts/Lemmas.lean +++ b/LeanPool/KaltonRoberts/Lemmas.lean @@ -10,8 +10,16 @@ Authors: Ho Boon Suan This file formalizes the mathematical lemmas from Sections 1–4 of the companion paper. -/ -import LeanPool.KaltonRoberts.Defs +module + +public import Mathlib.Data.Fintype.Order +public import LeanPool.KaltonRoberts.Defs +public import Mathlib.Order.BooleanSubalgebra import LeanPool.KaltonRoberts.DualCert +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Key lemmas from the Kalton-Roberts paper @@ -19,6 +27,8 @@ import LeanPool.KaltonRoberts.DualCert Mathematical lemmas from Sections 1-4 of the companion paper. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators diff --git a/LeanPool/KaltonRoberts/LogBounds.lean b/LeanPool/KaltonRoberts/LogBounds.lean index ac86aaf112..2d94f872d4 100644 --- a/LeanPool/KaltonRoberts/LogBounds.lean +++ b/LeanPool/KaltonRoberts/LogBounds.lean @@ -14,6 +14,9 @@ Each log bound is proved using the atanh series: The decomposition is `log(z) = e * log(2) + log(y)` where `z = 2^e * y` with `1 ≤ y ≤ 2`, and `t = (y-1)/(y+1)`. -/ +module + +public import Mathlib.Analysis.SpecialFunctions.Log.Basic import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.Complex.ExponentialBounds @@ -24,6 +27,8 @@ Numerical logarithm bounds proved via the atanh series and exact rational estimates. -/ +@[expose] public section + namespace KaltonRoberts open Real Finset diff --git a/LeanPool/KaltonRoberts/MainTheorem.lean b/LeanPool/KaltonRoberts/MainTheorem.lean index a3d08fc0be..7ccf0624d7 100644 --- a/LeanPool/KaltonRoberts/MainTheorem.lean +++ b/LeanPool/KaltonRoberts/MainTheorem.lean @@ -14,13 +14,21 @@ The proof reduces to two cases (q ≤ q₀ and q ≥ q₀), applies mixed-inters constructions and two rounds of expander recombination in each case, and balances the resulting inequalities to obtain the bounds C₁ and C₂. -/ -import LeanPool.KaltonRoberts.Defs -import LeanPool.KaltonRoberts.Numerical +module + +public import LeanPool.KaltonRoberts.Defs +public import Mathlib.Order.BooleanSubalgebra +import LeanPool.KaltonRoberts.EpsilonRecombination import LeanPool.KaltonRoberts.Lemmas -import LeanPool.KaltonRoberts.Collections +import LeanPool.KaltonRoberts.Numerical import LeanPool.KaltonRoberts.Pipeline import LeanPool.KaltonRoberts.PipelineEps -import LeanPool.KaltonRoberts.EpsilonRecombination +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Main theorem: the Kalton-Roberts upper bound @@ -28,6 +36,8 @@ import LeanPool.KaltonRoberts.EpsilonRecombination The final proof that the Kalton-Roberts constant is less than `9919 / 500`. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators diff --git a/LeanPool/KaltonRoberts/Numerical.lean b/LeanPool/KaltonRoberts/Numerical.lean index 33c5cd12f6..c939f6f523 100644 --- a/LeanPool/KaltonRoberts/Numerical.lean +++ b/LeanPool/KaltonRoberts/Numerical.lean @@ -12,7 +12,13 @@ Sections 4–5 of the companion paper. All comparisons are between rational numbers and are therefore decidable. -/ -import LeanPool.KaltonRoberts.Defs +module + +public import LeanPool.KaltonRoberts.Defs +import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Numerical verification for the Kalton-Roberts bound @@ -21,6 +27,8 @@ Exact rational-arithmetic verifications for the parameter choices used in the final bound. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators diff --git a/LeanPool/KaltonRoberts/PhiAnalysis.lean b/LeanPool/KaltonRoberts/PhiAnalysis.lean index efb3ffc85f..7e9764bb81 100644 --- a/LeanPool/KaltonRoberts/PhiAnalysis.lean +++ b/LeanPool/KaltonRoberts/PhiAnalysis.lean @@ -10,9 +10,17 @@ Authors: Ho Boon Suan This file provides the analytic tools needed to prove `Phi_neg_Eᵢ` for each row of the expander table. All theorems are fully proved. -/ -import LeanPool.KaltonRoberts.Defs -import LeanPool.KaltonRoberts.PhiDeriv +module + +public import LeanPool.KaltonRoberts.Defs +public import Mathlib.Analysis.Convex.Function import LeanPool.KaltonRoberts.LogBounds +import LeanPool.KaltonRoberts.PhiDeriv +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Phi function analysis @@ -21,6 +29,8 @@ Convexity, endpoint bounds, and interval-negativity proofs for the Phi functions used in the expander table. -/ +@[expose] public section + namespace KaltonRoberts open Real Finset diff --git a/LeanPool/KaltonRoberts/PhiDeriv.lean b/LeanPool/KaltonRoberts/PhiDeriv.lean index 8428c4dd5f..374a8173b8 100644 --- a/LeanPool/KaltonRoberts/PhiDeriv.lean +++ b/LeanPool/KaltonRoberts/PhiDeriv.lean @@ -7,7 +7,17 @@ Authors: Ho Boon Suan /- # Derivative computations for the Phi function -/ -import LeanPool.KaltonRoberts.Defs +module + +public import LeanPool.KaltonRoberts.Defs +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Topology.Algebra.Module.ModuleTopology +import Mathlib.Analysis.Convex.Deriv +import Mathlib.Analysis.SpecialFunctions.Log.Deriv +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Derivative computations for the Phi function @@ -16,6 +26,8 @@ First and second derivative computations for the entropy expressions defining the Phi functions. -/ +@[expose] public section + namespace KaltonRoberts open Real diff --git a/LeanPool/KaltonRoberts/Pipeline.lean b/LeanPool/KaltonRoberts/Pipeline.lean index 42feaa8a93..cf9de9cb1f 100644 --- a/LeanPool/KaltonRoberts/Pipeline.lean +++ b/LeanPool/KaltonRoberts/Pipeline.lean @@ -13,12 +13,18 @@ and expander recombination to the final distance bound. **Reference**: Sections 3 and 5 of the companion paper. -/ -import LeanPool.KaltonRoberts.Defs -import LeanPool.KaltonRoberts.Numerical -import LeanPool.KaltonRoberts.Collections -import LeanPool.KaltonRoberts.Lemmas +module + +public import LeanPool.KaltonRoberts.Collections import LeanPool.KaltonRoberts.Intersections +import LeanPool.KaltonRoberts.Numerical import LeanPool.KaltonRoberts.Pippenger +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Pipeline from intersections to the final bound @@ -27,6 +33,8 @@ Interfaces connecting weighted collections through mixed intersections and expander recombination to the final distance bound. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators diff --git a/LeanPool/KaltonRoberts/PipelineEps.lean b/LeanPool/KaltonRoberts/PipelineEps.lean index 272896d9ef..74fcedb60a 100644 --- a/LeanPool/KaltonRoberts/PipelineEps.lean +++ b/LeanPool/KaltonRoberts/PipelineEps.lean @@ -13,8 +13,18 @@ then concludes the exact `C₂` bound via `∀ ε > 0, M ≤ C₂ + ε ⟹ M ≤ **Reference**: Section 5 of the companion paper. -/ +module + +public import LeanPool.KaltonRoberts.Collections +import LeanPool.KaltonRoberts.Lemmas +import LeanPool.KaltonRoberts.Numerical import LeanPool.KaltonRoberts.Pipeline -import LeanPool.KaltonRoberts.EpsilonRecombination +import Mathlib.Algebra.Order.Algebra +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Epsilon pipeline @@ -22,6 +32,8 @@ import LeanPool.KaltonRoberts.EpsilonRecombination Spine theorems with epsilon-loss recombination and the final exact `C₂` bound. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators diff --git a/LeanPool/KaltonRoberts/Pippenger.lean b/LeanPool/KaltonRoberts/Pippenger.lean index 575b500374..522c47b2ef 100644 --- a/LeanPool/KaltonRoberts/Pippenger.lean +++ b/LeanPool/KaltonRoberts/Pippenger.lean @@ -18,10 +18,18 @@ the companion paper. It provides: **Reference**: Section 4 and the table in Section 5 of the companion paper. -/ -import LeanPool.KaltonRoberts.Defs +module + +public import LeanPool.KaltonRoberts.PippengerProof import LeanPool.KaltonRoberts.Numerical import LeanPool.KaltonRoberts.PhiAnalysis -import LeanPool.KaltonRoberts.PippengerProof +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Convex.Jensen +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Pippenger expander construction @@ -30,6 +38,8 @@ Row certificates and row-specific constructions for the probabilistic expander argument used in the Kalton-Roberts bound. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators diff --git a/LeanPool/KaltonRoberts/PippengerProof.lean b/LeanPool/KaltonRoberts/PippengerProof.lean index 02e0f7a734..6dd33aa764 100644 --- a/LeanPool/KaltonRoberts/PippengerProof.lean +++ b/LeanPool/KaltonRoberts/PippengerProof.lean @@ -10,7 +10,15 @@ Authors: Ho Boon Suan This file contains the probabilistic counting argument proving existence of expanders for the four rows needed by the Kalton-Roberts bound. -/ -import LeanPool.KaltonRoberts.Defs +module + +public import LeanPool.KaltonRoberts.Defs +public import Mathlib.Data.Fintype.Perm +import Mathlib.Algebra.BigOperators.Field +import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Pippenger expander construction proof @@ -19,6 +27,8 @@ Probabilistic counting argument proving existence of expanders for the rows needed by the Kalton-Roberts bound. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators diff --git a/LeanPool/KaltonRoberts/Recombination.lean b/LeanPool/KaltonRoberts/Recombination.lean index 5f9f7fdc08..79a1730fae 100644 --- a/LeanPool/KaltonRoberts/Recombination.lean +++ b/LeanPool/KaltonRoberts/Recombination.lean @@ -12,7 +12,16 @@ from the companion paper. **Reference**: Lemma 3.2 in Section 3 of the companion paper. -/ -import LeanPool.KaltonRoberts.Defs +module + +public import LeanPool.KaltonRoberts.Defs +public import Mathlib.CategoryTheory.Category.Basic +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Combinatorics.Hall.Basic +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # One-sided recombination @@ -21,6 +30,8 @@ Witness-level one-sided recombination theorem for approximate additive functions. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators diff --git a/LeanPool/KaltonRoberts/UniformRecombination.lean b/LeanPool/KaltonRoberts/UniformRecombination.lean index af0402a68c..d1bdfe50c1 100644 --- a/LeanPool/KaltonRoberts/UniformRecombination.lean +++ b/LeanPool/KaltonRoberts/UniformRecombination.lean @@ -13,9 +13,15 @@ and produces a target `WeightedCollection` via expander recombination. **Reference**: Lemma 3.2 in Section 3 of the companion paper. -/ -import LeanPool.KaltonRoberts.Defs -import LeanPool.KaltonRoberts.Collections +module + +public import LeanPool.KaltonRoberts.Collections import LeanPool.KaltonRoberts.Recombination +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Finite-uniform recombination @@ -24,6 +30,8 @@ Finite-uniform version of the one-sided recombination theorem, producing a target weighted collection via expander recombination. -/ +@[expose] public section + namespace KaltonRoberts open Finset BigOperators diff --git a/LeanPool/KasamiCyclicAdditive.lean b/LeanPool/KasamiCyclicAdditive.lean index b5199a05d4..516a77fabf 100644 --- a/LeanPool/KasamiCyclicAdditive.lean +++ b/LeanPool/KasamiCyclicAdditive.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Main +public import LeanPool.KasamiCyclicAdditive.Main +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Carlet's Kasami cyclic-additive conjecture @@ -16,3 +22,5 @@ Main declarations: `KasamiCyclicAdditive.carlet_kasami_cyclic_additive_literatur Tags: finite-fields, coding-theory, APN-functions, difference-sets, character-sums MSC: 11T06, 11T71, 94A60 -/ + +@[expose] public section diff --git a/LeanPool/KasamiCyclicAdditive/Assembly/CoefficientReduction.lean b/LeanPool/KasamiCyclicAdditive/Assembly/CoefficientReduction.lean index 761423f862..551bcc4c7a 100644 --- a/LeanPool/KasamiCyclicAdditive/Assembly/CoefficientReduction.lean +++ b/LeanPool/KasamiCyclicAdditive/Assembly/CoefficientReduction.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import LeanPool.KasamiCyclicAdditive.Counting.Definitions +public import Mathlib.Algebra.GroupWithZero.Units.Fintype import LeanPool.KasamiCyclicAdditive.Assembly.ElementaryInputs import LeanPool.KasamiCyclicAdditive.Statement.CoefficientForm +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Reduction glue @@ -20,6 +26,8 @@ modulus `|Kˣ|` used by the phase argument, and constructs the inverse exponent `D`. -/ +@[expose] public section + namespace KasamiCyclicAdditive variable {K : Type*} [Field K] [Fintype K] [DecidableEq K] diff --git a/LeanPool/KasamiCyclicAdditive/Assembly/ElementaryInputs.lean b/LeanPool/KasamiCyclicAdditive/Assembly/ElementaryInputs.lean index 6fd0935e5b..23019e3b3a 100644 --- a/LeanPool/KasamiCyclicAdditive/Assembly/ElementaryInputs.lean +++ b/LeanPool/KasamiCyclicAdditive/Assembly/ElementaryInputs.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Counting.Definitions -import LeanPool.KasamiCyclicAdditive.Phase.AdditiveCharacter +public import LeanPool.KasamiCyclicAdditive.Counting.Definitions +public import Mathlib.Data.Nat.ModEq +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Elementary inputs @@ -20,6 +25,8 @@ Three bookkeeping inputs the assembled theorem needs: -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/Assembly/GeometricChain.lean b/LeanPool/KasamiCyclicAdditive/Assembly/GeometricChain.lean index a24341d3f9..6a3366d4b0 100644 --- a/LeanPool/KasamiCyclicAdditive/Assembly/GeometricChain.lean +++ b/LeanPool/KasamiCyclicAdditive/Assembly/GeometricChain.lean @@ -3,18 +3,19 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Preliminaries.FiniteAverage -import LeanPool.KasamiCyclicAdditive.Counting.Definitions -import LeanPool.KasamiCyclicAdditive.Phase.DillonKashyapInterface -import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.IncidenceChart -import LeanPool.KasamiCyclicAdditive.Geometry.PointFrobenius -import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.RationalKernel -import LeanPool.KasamiCyclicAdditive.Phase.RootCount -import LeanPool.KasamiCyclicAdditive.Geometry.RootEquation -import LeanPool.KasamiCyclicAdditive.MCM.ComplementTransport +public import LeanPool.KasamiCyclicAdditive.Counting.Definitions +public import LeanPool.KasamiCyclicAdditive.Phase.DillonKashyapInterface +public import LeanPool.KasamiCyclicAdditive.Geometry.RootEquation +public import LeanPool.KasamiCyclicAdditive.Phase.Definitions import LeanPool.KasamiCyclicAdditive.Geometry.EvenCase +import LeanPool.KasamiCyclicAdditive.MCM.ComplementTransport +import LeanPool.KasamiCyclicAdditive.Phase.PowerMap +import LeanPool.KasamiCyclicAdditive.Phase.RootCount +import LeanPool.KasamiCyclicAdditive.Preliminaries.FiniteAverage +import LeanPool.KasamiCyclicAdditive.Preliminaries.FiniteFieldSums +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The assembled Kasami chain @@ -38,6 +39,8 @@ inverting the prime-to-3 isogeny factor `G` on `E(K)` directly preimage over `AlgebraicClosure K`. -/ +@[expose] public section + open Finset open KasamiCyclicAdditive.FermatCubic KasamiCyclicAdditive.PointFrobenius WeierstrassCurve diff --git a/LeanPool/KasamiCyclicAdditive/Assembly/Normalization.lean b/LeanPool/KasamiCyclicAdditive/Assembly/Normalization.lean index 5d4f0bb9bc..51da81f01a 100644 --- a/LeanPool/KasamiCyclicAdditive/Assembly/Normalization.lean +++ b/LeanPool/KasamiCyclicAdditive/Assembly/Normalization.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Preliminaries.Arithmetic -import LeanPool.KasamiCyclicAdditive.Counting.Definitions -import LeanPool.KasamiCyclicAdditive.Statement.CoefficientForm +public import LeanPool.KasamiCyclicAdditive.Statement.Definitions +public import Mathlib.Algebra.CharP.Defs +public import Mathlib.Algebra.Ring.Parity +public import Mathlib.Data.Fintype.Card import LeanPool.KasamiCyclicAdditive.MCM.ComplementTransport +import LeanPool.KasamiCyclicAdditive.Preliminaries.Arithmetic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Normalization and Frobenius coefficient transport @@ -26,6 +33,8 @@ at the *same* slope: Frobenius acts on the coefficients, hence on the slope, as well. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/Assembly/Reduction.lean b/LeanPool/KasamiCyclicAdditive/Assembly/Reduction.lean index 7a9ab43b30..2be11ed6eb 100644 --- a/LeanPool/KasamiCyclicAdditive/Assembly/Reduction.lean +++ b/LeanPool/KasamiCyclicAdditive/Assembly/Reduction.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Assembly.GeometricChain -import LeanPool.KasamiCyclicAdditive.Assembly.ElementaryInputs +public import LeanPool.KasamiCyclicAdditive.Counting.Definitions +public import LeanPool.KasamiCyclicAdditive.Phase.AdditiveCharacter +public import LeanPool.KasamiCyclicAdditive.Phase.Definitions +public import LeanPool.KasamiCyclicAdditive.Phase.DillonKashyapInterface import LeanPool.KasamiCyclicAdditive.Assembly.CoefficientReduction -import LeanPool.KasamiCyclicAdditive.Counting.Average +import LeanPool.KasamiCyclicAdditive.Assembly.ElementaryInputs +import LeanPool.KasamiCyclicAdditive.Assembly.GeometricChain import LeanPool.KasamiCyclicAdditive.Assembly.Normalization +import LeanPool.KasamiCyclicAdditive.Counting.Average import LeanPool.KasamiCyclicAdditive.MCM.PhaseFormula -import LeanPool.KasamiCyclicAdditive.MCM.ComplementTransport /-! # Reduction around the assembled Kasami chain @@ -25,6 +28,8 @@ form, with convenience wrappers taking only the half-size equation (and, in one case, also `DillonKashyapPhaseFormula`) supplied afterwards. -/ +@[expose] public section + namespace KasamiCyclicAdditive variable {K : Type*} [Field K] [Fintype K] [DecidableEq K] [CharP K 2] diff --git a/LeanPool/KasamiCyclicAdditive/Counting/Average.lean b/LeanPool/KasamiCyclicAdditive/Counting/Average.lean index 35619bc5d7..38bd3ce7fe 100644 --- a/LeanPool/KasamiCyclicAdditive/Counting/Average.lean +++ b/LeanPool/KasamiCyclicAdditive/Counting/Average.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Counting.Definitions -import LeanPool.KasamiCyclicAdditive.Assembly.ElementaryInputs +public import LeanPool.KasamiCyclicAdditive.Counting.Definitions +public import LeanPool.KasamiCyclicAdditive.Phase.AdditiveCharacter +public import LeanPool.KasamiCyclicAdditive.Phase.Definitions /-! # The Walsh and average formulas from half-size alone @@ -22,6 +23,8 @@ the average. Both are proved for an arbitrary `Δ : Finset K` and then specialized to `derivativeImage k K`. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/Counting/Definitions.lean b/LeanPool/KasamiCyclicAdditive/Counting/Definitions.lean index 5e9f9ec2e5..c801310552 100644 --- a/LeanPool/KasamiCyclicAdditive/Counting/Definitions.lean +++ b/LeanPool/KasamiCyclicAdditive/Counting/Definitions.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Statement.Definitions -import LeanPool.KasamiCyclicAdditive.Phase.Definitions +public import LeanPool.KasamiCyclicAdditive.Statement.Definitions +public import Mathlib.Algebra.Group.AddChar +public import Mathlib.Basic.Complex.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Counting definitions @@ -21,6 +27,8 @@ form used throughout the proof, indexed by `ρ = v₂/v₁`; relates the two. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/BaseChange.lean b/LeanPool/KasamiCyclicAdditive/Geometry/BaseChange.lean index 098dc6327e..7412f4409d 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/BaseChange.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/BaseChange.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Geometry.PointFrobenius -import LeanPool.KasamiCyclicAdditive.Geometry.IsogenyFactor +public import LeanPool.KasamiCyclicAdditive.Geometry.PointFrobenius +public import LeanPool.KasamiCyclicAdditive.Geometry.IsogenyFactor +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Base change of points along a field extension @@ -18,6 +22,8 @@ on points of the Fermat cubic, built the same way as `frobPt` (via the `G`-preimage identity from `E(K)` to `E(F) = E(AlgebraicClosure K)`. -/ +@[expose] public section + namespace KasamiCyclicAdditive.PointFrobenius open WeierstrassCurve KasamiCyclicAdditive.FermatCubic diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/Descent/Arithmetic.lean b/LeanPool/KasamiCyclicAdditive/Geometry/Descent/Arithmetic.lean index 5df4e9a507..c68b1bebd3 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/Descent/Arithmetic.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/Descent/Arithmetic.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Mathlib.RingTheory.Coprime.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Arithmetic facts for the descent @@ -21,6 +27,8 @@ For even `n`, `c_n = (-2)^(n/2)` is the integer with `π^n = [c_n]`, and `Geometry/FrobeniusAnnihilator.lean`. -/ +@[expose] public section + namespace KasamiCyclicAdditive.Descent diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/EvenCase.lean b/LeanPool/KasamiCyclicAdditive/Geometry/EvenCase.lean index 81949bda1d..c2f95fb261 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/EvenCase.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/EvenCase.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Geometry.RootEquation -import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.IncidenceChart +public import LeanPool.KasamiCyclicAdditive.Geometry.RootEquation +public import LeanPool.KasamiCyclicAdditive.Geometry.PointFrobenius +import LeanPool.KasamiCyclicAdditive.Geometry.BaseChange import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.Quotient import LeanPool.KasamiCyclicAdditive.Geometry.FrobeniusAnnihilator -import LeanPool.KasamiCyclicAdditive.Geometry.BaseChange +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.FieldTheory.Finite.Basic +import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # The even-dimensional root-existence branch: the quotient-first bridge @@ -45,6 +51,8 @@ The quotient-first route to `RootEqSolvable` in even dimension. fixed-field descent theorem is needed. -/ +@[expose] public section + open KasamiCyclicAdditive.FermatCubic KasamiCyclicAdditive.PointFrobenius WeierstrassCurve namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Chart.lean b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Chart.lean index 6f558b0aed..aed0883cd7 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Chart.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Chart.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.Hessian +public import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.Hessian +public import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.Curve +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # The affine Fermat chart and the Hessian addition formula @@ -20,6 +26,8 @@ model `fer`. The main results are vanishes. -/ +@[expose] public section + namespace KasamiCyclicAdditive.FermatCubic open WeierstrassCurve @@ -73,7 +81,8 @@ private lemma fermat_symm {w t : K} (h : w ^ 3 + t ^ 3 = 1) : t ^ 3 + w ^ 3 = 1 linear_combination h /-- Negation on the Fermat cubic swaps the two affine coordinates. -/ -theorem neg_pt {w t : K} (h : w ^ 3 + t ^ 3 = 1) : -(pt w t h) = pt t w (fermat_symm h) := by +theorem neg_pt {w t : K} (h : w ^ 3 + t ^ 3 = 1) : + -(pt w t h) = pt t w (by exact fermat_symm h) := by rw [pt, pt, Affine.Point.neg_some] refine some_eq_some _ _ ?_ ?_ · rw [show t + w = w + t by ring] diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Curve.lean b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Curve.lean index ebecee03fd..46442d78c1 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Curve.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Curve.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.Frobenius +public import Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Point +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # The Fermat cubic `X^3 + Y^3 = Z^3` in characteristic two, via a Weierstrass model @@ -27,6 +31,8 @@ through `x = Z/(X+Y)`, `y = X/(X+Y)`. Under this isomorphism: All group-law statements are proved in this model. -/ +@[expose] public section + namespace KasamiCyclicAdditive.FermatCubic open WeierstrassCurve diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Frobenius.lean b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Frobenius.lean index 25764de89b..de5161a4af 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Frobenius.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Frobenius.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Aesop.BuiltinRules +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Algebra.Group.Nat.Defs import LeanPool.KasamiCyclicAdditive.Preliminaries.Arithmetic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Frobenius periodicity @@ -17,6 +25,8 @@ in the prime field `F_2`. No algebraic closedness is needed: `x^2 = x` already forces `x = 0` or `x = 1` in any field. -/ +@[expose] public section + namespace KasamiCyclicAdditive.FermatCubic variable {K : Type*} [Field K] diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Hessian.lean b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Hessian.lean index 77135ce89c..24a680c40e 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Hessian.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Hessian.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.Curve +public import Mathlib.Algebra.CharP.Defs +public import Mathlib.Algebra.Field.Defs +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # The Hessian addition formulas for the Fermat cubic in characteristic two @@ -24,6 +31,8 @@ This file records the three polynomial identities behind the formula; they are a consequences of the two Fermat equations and of `2 = 0`. -/ +@[expose] public section + namespace KasamiCyclicAdditive.FermatCubic variable {K : Type*} [Field K] [CharP K 2] diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/IncidenceChart.lean b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/IncidenceChart.lean index c94fc9057a..693b1480c6 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/IncidenceChart.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/IncidenceChart.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.Infinity +public import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.Infinity +import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.Frobenius +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Validity of the affine Fermat-incidence chart @@ -24,6 +30,8 @@ The Frobenius-twist hypothesis is stated as `pi^n Q = Q + C` with `C = ptInf c` the three points at infinity are the three points of `K0 = ker (1+pi)`, cf. `neg_ptInf`. -/ +@[expose] public section + namespace KasamiCyclicAdditive.FermatCubic open WeierstrassCurve @@ -84,7 +92,7 @@ variable [DecidableEq K] /-- The `3`-torsion point `t3 = (1,0)`. -/ def t3 (K : Type*) [Field K] [CharP K 2] : (fer K).toAffine.Point := - pt 1 0 t3_fermat + pt 1 0 (by exact t3_fermat) /-- `t3 = (1,0)` is `3`-torsion. -/ lemma three_torsion_t3 : (3 : ℕ) • t3 K = 0 := diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Infinity.lean b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Infinity.lean index 5e8e9c18e4..c4c7d5da45 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Infinity.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Infinity.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.Chart +public import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.Chart +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # The points at infinity of the Fermat cubic and the diagonal translation formula @@ -22,6 +27,8 @@ The main result is the diagonal translation formula: ``` -/ +@[expose] public section + namespace KasamiCyclicAdditive.FermatCubic open WeierstrassCurve @@ -84,7 +91,7 @@ lemma pt_congr {w t w' t' : K} (h : w ^ 3 + t ^ 3 = 1) (h' : w' ^ 3 + t' ^ 3 = 1 /-- **The diagonal translation formula**: `(w,t) + P_a = (a*w, a^{-1}*t)`. -/ theorem add_ptInf {w t a : K} (h : w ^ 3 + t ^ 3 = 1) (ha : a ^ 3 = 1) : - pt w t h + ptInf a ha = pt (a * w) (a ^ 2 * t) (fermat_rotate h ha) := by + pt w t h + ptInf a ha = pt (a * w) (a ^ 2 * t) (private_decl% (fermat_rotate h ha)) := by by_cases ha1 : a = 1 · subst ha1 rw [ptInf_one, add_zero] diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Quotient.lean b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Quotient.lean index 5c3c001212..04264260e9 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Quotient.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/Quotient.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.Hessian +public import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.Hessian +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Explicit quotient coordinates on the Fermat cubic @@ -22,6 +27,8 @@ Frobenius endomorphism, or algebraic closure is involved. Note the direction chosen afterwards. -/ +@[expose] public section + open KasamiCyclicAdditive.FermatCubic namespace KasamiCyclicAdditive.FermatCubic diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/RationalKernel.lean b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/RationalKernel.lean index a27b783b24..40e2ff7bc9 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/RationalKernel.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/FermatCubic/RationalKernel.lean @@ -3,9 +3,19 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Mathlib.FieldTheory.Finite.GaloisField + +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Algebra.Ring.Parity +public import Mathlib.Data.Fintype.Card import LeanPool.KasamiCyclicAdditive.Preliminaries.Arithmetic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.FieldTheory.Finite.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # The rational kernel of `1 + π^k` on the Fermat cubic over `𝔽₂` @@ -54,6 +64,8 @@ in `rational_kernel_odd`, combined with the standard fact that a group homomorph kernel is injective; the group law on `E` itself is not developed here. -/ +@[expose] public section + open scoped BigOperators open scoped Real open scoped Nat diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/FrobeniusAnnihilator.lean b/LeanPool/KasamiCyclicAdditive/Geometry/FrobeniusAnnihilator.lean index 021dd4b62c..de7292f925 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/FrobeniusAnnihilator.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/FrobeniusAnnihilator.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Geometry.PointFrobenius -import LeanPool.KasamiCyclicAdditive.Geometry.Descent.Arithmetic -import LeanPool.KasamiCyclicAdditive.Geometry.IsogenyFactor +public import LeanPool.KasamiCyclicAdditive.Geometry.PointFrobenius +public import LeanPool.KasamiCyclicAdditive.Geometry.Descent.Arithmetic +public import LeanPool.KasamiCyclicAdditive.Geometry.IsogenyFactor +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.FieldTheory.Finite.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # The Frobenius annihilator on `E(K)` @@ -26,6 +31,8 @@ it makes `G` bijective on `E(K)` — no algebraic closure and no kernel decomposition. -/ +@[expose] public section + open KasamiCyclicAdditive.FermatCubic namespace KasamiCyclicAdditive.PointFrobenius diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/IsogenyFactor.lean b/LeanPool/KasamiCyclicAdditive/Geometry/IsogenyFactor.lean index ee59d59138..df231c8438 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/IsogenyFactor.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/IsogenyFactor.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Mathlib.RingTheory.Coprime.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Factoring `1 + π^k` through a prime-to-3 automorphism @@ -21,6 +27,8 @@ with an endomorphism `π` satisfying `π² = [-2]`. No field, curve, Frobenius map or algebraic closure appears. -/ +@[expose] public section + namespace KasamiCyclicAdditive.Isogeny /-- The `n`-fold iterate of `pi`. -/ diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/PointFrobenius.lean b/LeanPool/KasamiCyclicAdditive/Geometry/PointFrobenius.lean index d133b7d3c2..51a7ec0ec4 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/PointFrobenius.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/PointFrobenius.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.IncidenceChart -import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.RationalKernel +public import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.IncidenceChart +public import LeanPool.KasamiCyclicAdditive.Geometry.FermatCubic.RationalKernel +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Frobenius as a group endomorphism of the Fermat cubic, and its kernel @@ -35,6 +39,8 @@ at infinity `ptInf a`, or an affine Fermat point `pt w t`. This is what lets the two charts of `FermatCubic` be used exhaustively. -/ +@[expose] public section + namespace KasamiCyclicAdditive.PointFrobenius open WeierstrassCurve KasamiCyclicAdditive.FermatCubic @@ -71,7 +77,7 @@ lemma curveCast_symm_some {W W' : WeierstrassCurve K} (h : W = W') {x y : K} subst h; rfl /-- The Frobenius `x ↦ x ^ 2`, as a `ℤ`-algebra map. -/ -private noncomputable def frobAlg (K : Type*) [Field K] [CharP K 2] : K →ₐ[ℤ] K := +noncomputable def frobAlg (K : Type*) [Field K] [CharP K 2] : K →ₐ[ℤ] K := (frobenius K 2).toIntAlgHom omit [DecidableEq K] in diff --git a/LeanPool/KasamiCyclicAdditive/Geometry/RootEquation.lean b/LeanPool/KasamiCyclicAdditive/Geometry/RootEquation.lean index ebd8687d97..c222f50105 100644 --- a/LeanPool/KasamiCyclicAdditive/Geometry/RootEquation.lean +++ b/LeanPool/KasamiCyclicAdditive/Geometry/RootEquation.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Aesop.BuiltinRules +public import Mathlib.Algebra.Field.Defs +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # The geometric input, in slope-free form @@ -25,6 +32,8 @@ It lives in its own file so that `Geometry/EvenCase.lean`, which proves `Assembly/GeometricChain.lean` without an import cycle. -/ +@[expose] public section + namespace KasamiCyclicAdditive /-- Solvability of the twisted root equation: at every affine Fermat target diff --git a/LeanPool/KasamiCyclicAdditive/MCM/CharacterArithmetic.lean b/LeanPool/KasamiCyclicAdditive/MCM/CharacterArithmetic.lean index b334c78141..899edcd0ea 100644 --- a/LeanPool/KasamiCyclicAdditive/MCM/CharacterArithmetic.lean +++ b/LeanPool/KasamiCyclicAdditive/MCM/CharacterArithmetic.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Mathlib.Basic.Complex.Basic +public import Mathlib.NumberTheory.MulChar.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc import Mathlib.NumberTheory.MulChar.Lemmas +import Mathlib.Tactic.Positivity.Finset /-! # Arithmetic for the exceptional MCM character case @@ -16,6 +23,8 @@ cubic. This is the exceptional branch complementary to the generic Dickson permutation argument. -/ +@[expose] public section + namespace KasamiCyclicAdditive /-- If `gcd(k,n)=1`, then `gcd(2k,n)` divides `2`. -/ diff --git a/LeanPool/KasamiCyclicAdditive/MCM/ComplementTransport.lean b/LeanPool/KasamiCyclicAdditive/MCM/ComplementTransport.lean index 00101799d7..c9196cdb3e 100644 --- a/LeanPool/KasamiCyclicAdditive/MCM/ComplementTransport.lean +++ b/LeanPool/KasamiCyclicAdditive/MCM/ComplementTransport.lean @@ -3,10 +3,17 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Statement.Definitions -import LeanPool.KasamiCyclicAdditive.Counting.Definitions +public import Mathlib.RingTheory.SimpleRing.Basic + +public import LeanPool.KasamiCyclicAdditive.Statement.Definitions +public import Mathlib.Algebra.CharP.Lemmas +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.FieldTheory.Finite.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Frobenius transport between complementary parameters @@ -22,6 +29,8 @@ the derivative-image half-size equation at both `k` and the complementary parameter `n - k`. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/MCM/DicksonPermutation.lean b/LeanPool/KasamiCyclicAdditive/MCM/DicksonPermutation.lean index e398e2b367..0d93b9306e 100644 --- a/LeanPool/KasamiCyclicAdditive/MCM/DicksonPermutation.lean +++ b/LeanPool/KasamiCyclicAdditive/MCM/DicksonPermutation.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure +public import Mathlib.RingTheory.Polynomial.Dickson +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.FieldTheory.Finite.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Dickson permutation lemmas @@ -25,6 +32,8 @@ consequence that `D_(3h)` and `D_3` have the same value distribution whenever `D_h` is a permutation. -/ +@[expose] public section + open Polynomial namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/MCM/DicksonPhase.lean b/LeanPool/KasamiCyclicAdditive/MCM/DicksonPhase.lean index 1d3e154f50..c77acfbacc 100644 --- a/LeanPool/KasamiCyclicAdditive/MCM/DicksonPhase.lean +++ b/LeanPool/KasamiCyclicAdditive/MCM/DicksonPhase.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Mathlib.RingTheory.Polynomial.Dickson import LeanPool.KasamiCyclicAdditive.MCM.DicksonPermutation +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Dickson value sum for every odd normalized parameter @@ -15,6 +20,8 @@ every odd `k` coprime to `n`, `D_(2^k+1)` and `D_3` have equal sums against any function on `GF(2^n)`, even at the odd-dimensional bad residue `k ≡ 3 (mod 6)`. -/ +@[expose] public section + open Finset Polynomial namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/MCM/Fourier.lean b/LeanPool/KasamiCyclicAdditive/MCM/Fourier.lean index c64cf714c1..e45ebd4220 100644 --- a/LeanPool/KasamiCyclicAdditive/MCM/Fourier.lean +++ b/LeanPool/KasamiCyclicAdditive/MCM/Fourier.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import LeanPool.KasamiCyclicAdditive.MCM.Halfspace +public import Mathlib.NumberTheory.GaussSum +public import Mathlib.RingTheory.Polynomial.Dickson import LeanPool.KasamiCyclicAdditive.Preliminaries.Arithmetic -import LeanPool.KasamiCyclicAdditive.MCM.Halfspace -import LeanPool.KasamiCyclicAdditive.MCM.FrobeniusSum /-! # The MCM Fourier/Dickson reduction @@ -27,6 +28,8 @@ For the complementary case of a nonprincipal cubic `χ` and odd `k`, the MCM map is invisible to `χ`: `χ(M_k s) = χ(s)`. -/ +@[expose] public section + open Finset Polynomial namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/MCM/FrobeniusSum.lean b/LeanPool/KasamiCyclicAdditive/MCM/FrobeniusSum.lean index 6a75b77336..4bc4541612 100644 --- a/LeanPool/KasamiCyclicAdditive/MCM/FrobeniusSum.lean +++ b/LeanPool/KasamiCyclicAdditive/MCM/FrobeniusSum.lean @@ -3,9 +3,19 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Algebra.CharP.Defs +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Algebra.Ring.Parity +public import Mathlib.Data.Fintype.Card import LeanPool.KasamiCyclicAdditive.Preliminaries.Arithmetic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Elementary Frobenius-sum infrastructure @@ -52,6 +62,8 @@ frobSum_one --------------+ ``` -/ +@[expose] public section + namespace KasamiCyclicAdditive variable {K : Type*} [Field K] [Fintype K] [DecidableEq K] [CharP K 2] diff --git a/LeanPool/KasamiCyclicAdditive/MCM/HalfSize.lean b/LeanPool/KasamiCyclicAdditive/MCM/HalfSize.lean index f39dc0fdce..16ed850ef9 100644 --- a/LeanPool/KasamiCyclicAdditive/MCM/HalfSize.lean +++ b/LeanPool/KasamiCyclicAdditive/MCM/HalfSize.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.MCM.Permutation +public import LeanPool.KasamiCyclicAdditive.Statement.Definitions +public import Mathlib.Algebra.CharP.Defs +public import Mathlib.Algebra.Ring.Parity +public import Mathlib.Data.Fintype.Card import LeanPool.KasamiCyclicAdditive.MCM.ComplementTransport +import LeanPool.KasamiCyclicAdditive.MCM.Permutation /-! # Half-size of the Kasami derivative image @@ -22,6 +26,8 @@ Frobenius transport of `MCM/ComplementTransport.lean` preserves the cardinality derivative image. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/MCM/Halfspace.lean b/LeanPool/KasamiCyclicAdditive/MCM/Halfspace.lean index a089bdf484..d5172accff 100644 --- a/LeanPool/KasamiCyclicAdditive/MCM/Halfspace.lean +++ b/LeanPool/KasamiCyclicAdditive/MCM/Halfspace.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Statement.Definitions -import LeanPool.KasamiCyclicAdditive.Phase.AdditiveCharacter -import LeanPool.KasamiCyclicAdditive.MCM.FrobeniusSum +import all Mathlib.NumberTheory.LegendreSymbol.Complex +public import LeanPool.KasamiCyclicAdditive.Statement.Definitions +public import LeanPool.KasamiCyclicAdditive.Phase.AdditiveCharacter +public import LeanPool.KasamiCyclicAdditive.MCM.FrobeniusSum /-! # The MCM half-space packet @@ -27,6 +28,8 @@ and `M_k(s) = T_k(s)^(2^k+1) / s^(2^k)` for the MCM map, the main identities are * consequently sums over `Δ` are half-space sums weighted by `1 + ψ(s)`. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/MCM/Permutation.lean b/LeanPool/KasamiCyclicAdditive/MCM/Permutation.lean index ec7b316aa4..59124f3bdc 100644 --- a/LeanPool/KasamiCyclicAdditive/MCM/Permutation.lean +++ b/LeanPool/KasamiCyclicAdditive/MCM/Permutation.lean @@ -3,14 +3,13 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Preliminaries.Arithmetic -import LeanPool.KasamiCyclicAdditive.MCM.Fourier -import LeanPool.KasamiCyclicAdditive.MCM.FrobeniusSum -import LeanPool.KasamiCyclicAdditive.MCM.DicksonPermutation +public import LeanPool.KasamiCyclicAdditive.MCM.Fourier import LeanPool.KasamiCyclicAdditive.MCM.CharacterArithmetic +import LeanPool.KasamiCyclicAdditive.MCM.DicksonPermutation import LeanPool.KasamiCyclicAdditive.Preliminaries.FiniteCharacterCriterion +import Mathlib.Data.FunLike.Fintype /-! # The MCM permutation theorem @@ -29,6 +28,8 @@ that the MCM map has zero as its unique zero, this makes all multiplicative character sums preserved, hence the MCM map a permutation. -/ +@[expose] public section + open Finset Polynomial namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/MCM/PhaseFormula.lean b/LeanPool/KasamiCyclicAdditive/MCM/PhaseFormula.lean index b4844aa19f..f00d59d402 100644 --- a/LeanPool/KasamiCyclicAdditive/MCM/PhaseFormula.lean +++ b/LeanPool/KasamiCyclicAdditive/MCM/PhaseFormula.lean @@ -3,16 +3,16 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Phase.CharacterSums -import LeanPool.KasamiCyclicAdditive.Counting.Definitions -import LeanPool.KasamiCyclicAdditive.Phase.DillonKashyapInterface -import LeanPool.KasamiCyclicAdditive.Phase.AdditiveCharacter -import LeanPool.KasamiCyclicAdditive.MCM.Fourier -import LeanPool.KasamiCyclicAdditive.MCM.Permutation -import LeanPool.KasamiCyclicAdditive.MCM.DicksonPhase +public import LeanPool.KasamiCyclicAdditive.Phase.DillonKashyapInterface +public import LeanPool.KasamiCyclicAdditive.MCM.Fourier import LeanPool.KasamiCyclicAdditive.MCM.ComplementTransport +import LeanPool.KasamiCyclicAdditive.MCM.DicksonPhase +import LeanPool.KasamiCyclicAdditive.MCM.Permutation +import LeanPool.KasamiCyclicAdditive.Phase.CharacterSums +import LeanPool.KasamiCyclicAdditive.Preliminaries.FiniteFieldSums +import Mathlib.NumberTheory.JacobiSum.Basic /-! # The MCM/Dickson phase formula @@ -22,6 +22,8 @@ from the derivative-image half-size equation plus the MCM/Dickson identities — no Dillon--Kashyap or Dillon--Dobbertin Fourier theorem is imported. -/ +@[expose] public section + open Finset Polynomial namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/Main.lean b/LeanPool/KasamiCyclicAdditive/Main.lean index 422d697e39..8755e7d1b2 100644 --- a/LeanPool/KasamiCyclicAdditive/Main.lean +++ b/LeanPool/KasamiCyclicAdditive/Main.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.MCM.HalfSize +public import LeanPool.KasamiCyclicAdditive.Statement.Definitions +public import Mathlib.Algebra.CharP.Defs +public import Mathlib.Data.Fintype.Card import LeanPool.KasamiCyclicAdditive.Assembly.Reduction +import LeanPool.KasamiCyclicAdditive.MCM.HalfSize import LeanPool.KasamiCyclicAdditive.Statement.ParameterReduction /-! @@ -24,6 +28,8 @@ coprime to `n` to `k % n` using the proved periodicity results in representative is also derived, not assumed. -/ +@[expose] public section + namespace KasamiCyclicAdditive variable {K : Type*} [Field K] [Fintype K] [DecidableEq K] diff --git a/LeanPool/KasamiCyclicAdditive/Phase/AdditiveCharacter.lean b/LeanPool/KasamiCyclicAdditive/Phase/AdditiveCharacter.lean index 65146511bd..c1026cab33 100644 --- a/LeanPool/KasamiCyclicAdditive/Phase/AdditiveCharacter.lean +++ b/LeanPool/KasamiCyclicAdditive/Phase/AdditiveCharacter.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Mathlib.NumberTheory.LegendreSymbol.Complex /-! # Primitive additive-character infrastructure @@ -16,6 +17,8 @@ records the elementary fact that any primitive complex additive character is nonprincipal. -/ +@[expose] public section + namespace KasamiCyclicAdditive variable {K : Type*} [Field K] [Fintype K] [DecidableEq K] diff --git a/LeanPool/KasamiCyclicAdditive/Phase/CharacterSums.lean b/LeanPool/KasamiCyclicAdditive/Phase/CharacterSums.lean index 344bac9a2f..c29d60a1b6 100644 --- a/LeanPool/KasamiCyclicAdditive/Phase/CharacterSums.lean +++ b/LeanPool/KasamiCyclicAdditive/Phase/CharacterSums.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Mathlib.Data.FunLike.Fintype +public import Mathlib.NumberTheory.GaussSum import LeanPool.KasamiCyclicAdditive.Preliminaries.FiniteFieldSums +import Mathlib.Analysis.Complex.Polynomial.Basic +public import Mathlib.NumberTheory.MulChar.Duality +import Mathlib.RingTheory.RootsOfUnity.AlgebraicallyClosed /-! # Character-sum lemmas over a finite field @@ -22,6 +27,8 @@ nonvanishing facts. Primitive-character nontriviality is supplied by `Phase/AdditiveCharacter.lean`. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive.Phase diff --git a/LeanPool/KasamiCyclicAdditive/Phase/Definitions.lean b/LeanPool/KasamiCyclicAdditive/Phase/Definitions.lean index 4b48b0abef..9f8f2845f5 100644 --- a/LeanPool/KasamiCyclicAdditive/Phase/Definitions.lean +++ b/LeanPool/KasamiCyclicAdditive/Phase/Definitions.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Phase.CharacterSums +public import LeanPool.KasamiCyclicAdditive.Phase.CharacterSums +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Objects of the phase-to-root-count identity @@ -14,6 +16,8 @@ primitive additive character of `K` with values in `ℂ` (in the application `ψ x = (-1)^(Tr x)`), and `D` is an exponent inverse to `m` modulo `N = #Kˣ`. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive.Phase diff --git a/LeanPool/KasamiCyclicAdditive/Phase/DillonKashyapInterface.lean b/LeanPool/KasamiCyclicAdditive/Phase/DillonKashyapInterface.lean index 8076bc871d..25e41686eb 100644 --- a/LeanPool/KasamiCyclicAdditive/Phase/DillonKashyapInterface.lean +++ b/LeanPool/KasamiCyclicAdditive/Phase/DillonKashyapInterface.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Statement.Definitions +public import LeanPool.KasamiCyclicAdditive.Statement.Definitions +public import Mathlib.NumberTheory.GaussSum import LeanPool.KasamiCyclicAdditive.Phase.CharacterSums +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The Dillon--Kashyap phase formula, as a hypothesis @@ -25,6 +27,8 @@ difference set as the complement of this same `Δ`; the sign convention here is therefore opposite to theirs. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/Phase/PowerMap.lean b/LeanPool/KasamiCyclicAdditive/Phase/PowerMap.lean index 572cdf0565..8ad4388b37 100644 --- a/LeanPool/KasamiCyclicAdditive/Phase/PowerMap.lean +++ b/LeanPool/KasamiCyclicAdditive/Phase/PowerMap.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Phase.Definitions +public import LeanPool.KasamiCyclicAdditive.Phase.Definitions +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Basic facts: the power map `x ↦ x^D` and the group `μ₃(K)` -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive.Phase diff --git a/LeanPool/KasamiCyclicAdditive/Phase/RootCount.lean b/LeanPool/KasamiCyclicAdditive/Phase/RootCount.lean index 5f228dee9e..a372cb8ef5 100644 --- a/LeanPool/KasamiCyclicAdditive/Phase/RootCount.lean +++ b/LeanPool/KasamiCyclicAdditive/Phase/RootCount.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module +public import LeanPool.KasamiCyclicAdditive.Phase.Definitions import LeanPool.KasamiCyclicAdditive.Phase.PowerMap +import LeanPool.KasamiCyclicAdditive.Preliminaries.FiniteFieldSums +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The phase-to-root-count identity @@ -16,6 +20,8 @@ Assuming the all-character Walsh formula `WalshCharacterFormula`, we prove for `A, B ∈ K^*` with `A³ + B³ = 1` and `A³ ≠ 1`, where `ρ = A³`, `σ = B³`. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive.Phase diff --git a/LeanPool/KasamiCyclicAdditive/Preliminaries/Arithmetic.lean b/LeanPool/KasamiCyclicAdditive/Preliminaries/Arithmetic.lean index d96593dff7..178f6ee971 100644 --- a/LeanPool/KasamiCyclicAdditive/Preliminaries/Arithmetic.lean +++ b/LeanPool/KasamiCyclicAdditive/Preliminaries/Arithmetic.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Algebra.Ring.Parity +public import Mathlib.Data.Fintype.Card +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.FieldTheory.Finite.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Shared Frobenius and power-of-two arithmetic @@ -21,6 +29,8 @@ vice versa. `two_pow_two_mul_sub_one`: elementary arithmetic of `2 ^ k`. -/ +@[expose] public section + namespace KasamiCyclicAdditive /-! ### Fixedness under iterated Frobenius -/ diff --git a/LeanPool/KasamiCyclicAdditive/Preliminaries/FiniteAverage.lean b/LeanPool/KasamiCyclicAdditive/Preliminaries/FiniteAverage.lean index 18d95857ca..34f7e64e92 100644 --- a/LeanPool/KasamiCyclicAdditive/Preliminaries/FiniteAverage.lean +++ b/LeanPool/KasamiCyclicAdditive/Preliminaries/FiniteAverage.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Finset.Card +public import Mathlib.Basic.Real.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Finite-average forcing lemmas @@ -12,6 +20,8 @@ import LeanPool.KasamiCyclicAdditive.Prelude Generic consequences of an average identity and pointwise nonnegativity. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/Preliminaries/FiniteCharacterCriterion.lean b/LeanPool/KasamiCyclicAdditive/Preliminaries/FiniteCharacterCriterion.lean index 6c5b515229..8d03963095 100644 --- a/LeanPool/KasamiCyclicAdditive/Preliminaries/FiniteCharacterCriterion.lean +++ b/LeanPool/KasamiCyclicAdditive/Preliminaries/FiniteCharacterCriterion.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import Mathlib.Analysis.Fourier.FiniteAbelian.PontryaginDuality +public import Mathlib.Algebra.Group.AddChar +public import Mathlib.Basic.Complex.Basic +public import Mathlib.NumberTheory.MulChar.Basic import LeanPool.KasamiCyclicAdditive.Preliminaries.FiniteFieldSums +import Mathlib.Analysis.Fourier.FiniteAbelian.PontryaginDuality +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Finite character-sum criteria for bijectivity @@ -22,6 +28,8 @@ every multiplicative-character sum, restrict it to the unit group and apply the additive criterion to `Additive Kˣ`. -/ +@[expose] public section + open Finset open scoped BigOperators diff --git a/LeanPool/KasamiCyclicAdditive/Preliminaries/FiniteFieldSums.lean b/LeanPool/KasamiCyclicAdditive/Preliminaries/FiniteFieldSums.lean index edfa6d7e05..74e06d6535 100644 --- a/LeanPool/KasamiCyclicAdditive/Preliminaries/FiniteFieldSums.lean +++ b/LeanPool/KasamiCyclicAdditive/Preliminaries/FiniteFieldSums.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Algebra.GroupWithZero.Units.Fintype +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Finite-field sum decompositions @@ -14,6 +21,8 @@ over the whole field. This module is deliberately below the character-sum and MCM layers so that both can use the same finite-field infrastructure. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/Prelude.lean b/LeanPool/KasamiCyclicAdditive/Prelude.lean index 67414fd31d..c8c84be273 100644 --- a/LeanPool/KasamiCyclicAdditive/Prelude.lean +++ b/LeanPool/KasamiCyclicAdditive/Prelude.lean @@ -3,32 +3,39 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import Mathlib.Algebra.BigOperators.Field -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Algebra.Field.Defs -import Mathlib.Algebra.GroupWithZero.Units.Basic -import Mathlib.AlgebraicGeometry.EllipticCurve.Affine.AddSubMap -import Mathlib.AlgebraicGeometry.EllipticCurve.Weierstrass -import Mathlib.Analysis.Fourier.FiniteAbelian.PontryaginDuality -import Mathlib.Analysis.Complex.Polynomial.Basic -import Mathlib.Data.Finset.Image -import Mathlib.Data.Finset.Prod -import Mathlib.Data.FunLike.Fintype -import Mathlib.FieldTheory.Finite.Basic -import Mathlib.FieldTheory.IsSepClosed -import Mathlib.GroupTheory.Exponent -import Mathlib.NumberTheory.LegendreSymbol.Complex -import Mathlib.NumberTheory.MulChar.Lemmas -import Mathlib.NumberTheory.MulChar.Duality -import Mathlib.NumberTheory.GaussSum -import Mathlib.NumberTheory.JacobiSum.Basic -import Mathlib.RingTheory.Coprime.Basic -import Mathlib.RingTheory.Polynomial.Dickson -import Mathlib.RingTheory.RootsOfUnity.AlgebraicallyClosed -import Mathlib.Tactic.Module -import Mathlib.Tactic.NormNum.Eq -import Mathlib.Tactic.Ring.RingNF +public import Mathlib.Algebra.BigOperators.Field +public import Mathlib.Algebra.BigOperators.Group.Finset.Basic +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Algebra.GroupWithZero.Units.Basic +public import Mathlib.AlgebraicGeometry.EllipticCurve.Affine.AddSubMap +public import Mathlib.AlgebraicGeometry.EllipticCurve.Weierstrass +public import Mathlib.Analysis.Fourier.FiniteAbelian.PontryaginDuality +public import Mathlib.Analysis.Complex.Polynomial.Basic +public import Mathlib.Data.Finset.Image +public import Mathlib.Data.Finset.Prod +public import Mathlib.Data.FunLike.Fintype +public import Mathlib.FieldTheory.Finite.Basic +public import Mathlib.FieldTheory.IsSepClosed +public import Mathlib.GroupTheory.Exponent +public import Mathlib.NumberTheory.LegendreSymbol.Complex +public import Mathlib.NumberTheory.MulChar.Lemmas +public import Mathlib.NumberTheory.MulChar.Duality +public import Mathlib.NumberTheory.GaussSum +public import Mathlib.NumberTheory.JacobiSum.Basic +public import Mathlib.RingTheory.Coprime.Basic +public import Mathlib.RingTheory.Polynomial.Dickson +public import Mathlib.RingTheory.RootsOfUnity.AlgebraicallyClosed +public import Mathlib.Tactic.Module +public import Mathlib.Tactic.NormNum.Eq +public import Mathlib.Tactic.Ring.RingNF + +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Explicit Mathlib dependencies for the Kasami development @@ -37,3 +44,5 @@ The source project used `import Mathlib` for convenience. Lean Pool keeps the dependency surface explicit so that the entry point does not pull in the whole Mathlib umbrella. -/ + +@[expose] public section diff --git a/LeanPool/KasamiCyclicAdditive/Statement/CoefficientForm.lean b/LeanPool/KasamiCyclicAdditive/Statement/CoefficientForm.lean index 1138404eda..b42acc23be 100644 --- a/LeanPool/KasamiCyclicAdditive/Statement/CoefficientForm.lean +++ b/LeanPool/KasamiCyclicAdditive/Statement/CoefficientForm.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Counting.Definitions +public import LeanPool.KasamiCyclicAdditive.Counting.Definitions +public import Mathlib.CategoryTheory.Category.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # From slope form to the original coefficient form @@ -23,6 +28,8 @@ this module; `coefficient_form_nat_of_slope_form` is what carries the assembled slope theorem back to the coefficient form of the original conjecture. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/Statement/Definitions.lean b/LeanPool/KasamiCyclicAdditive/Statement/Definitions.lean index 5a2ef0f4c4..d56fbd026a 100644 --- a/LeanPool/KasamiCyclicAdditive/Statement/Definitions.lean +++ b/LeanPool/KasamiCyclicAdditive/Statement/Definitions.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Data.Finset.Prod +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Statement definitions for the cyclic-additive statement surface @@ -16,6 +23,8 @@ agreement with the independently structured literature specification was checked in the source project before this import. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive diff --git a/LeanPool/KasamiCyclicAdditive/Statement/ParameterReduction.lean b/LeanPool/KasamiCyclicAdditive/Statement/ParameterReduction.lean index 68e2f2fceb..32e767af56 100644 --- a/LeanPool/KasamiCyclicAdditive/Statement/ParameterReduction.lean +++ b/LeanPool/KasamiCyclicAdditive/Statement/ParameterReduction.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 D.S. McNeil, Gábor P. Nagy, Attila Vajda. All rights reserve Released under Apache 2.0 license as described in the file LICENSE. Authors: D.S. McNeil, Gábor P. Nagy, Attila Vajda -/ +module -import LeanPool.KasamiCyclicAdditive.Prelude -import LeanPool.KasamiCyclicAdditive.Statement.Definitions +public import LeanPool.KasamiCyclicAdditive.Statement.Definitions +public import Mathlib.Data.Fintype.Card +public import Mathlib.Data.Nat.ModEq +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.FieldTheory.Finite.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Reduction of the Kasami parameter modulo the extension degree @@ -20,6 +27,8 @@ cardinality `2^n`. Thus the normalization used by the proof is a theorem, not an extra hypothesis in the statement. -/ +@[expose] public section + open Finset namespace KasamiCyclicAdditive diff --git a/LeanPool/Koethe.lean b/LeanPool/Koethe.lean index be8cac7989..d80e2f3a29 100644 --- a/LeanPool/Koethe.lean +++ b/LeanPool/Koethe.lean @@ -3,8 +3,21 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ +module -import LeanPool.Koethe.Disproof +public import LeanPool.Koethe.Disproof +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Disproof of the Köthe conjecture (Krempa's matrix form) @@ -17,6 +30,8 @@ Tags: ring-theory, nil-ideals, koethe-conjecture, counterexample, matrix-rings MSC: 16N40, 16S50 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Koethe/Counterexample.lean b/LeanPool/Koethe/Counterexample.lean index 3b83257731..9776cb2b5b 100644 --- a/LeanPool/Koethe/Counterexample.lean +++ b/LeanPool/Koethe/Counterexample.lean @@ -3,15 +3,27 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Algebra.AlgebraicCard -import Mathlib.Algebra.Field.ULift -import Mathlib.Algebra.Field.ZMod -import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure -import Mathlib.Tactic.Ring -import LeanPool.Koethe.Mortality.MaskMortality -import LeanPool.Koethe.MaskSequence.Universal +module + +public import Mathlib.Algebra.Field.ULift +public import Mathlib.Algebra.Field.ZMod +public import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure +public import LeanPool.Koethe.Pencil +public import Mathlib.LinearAlgebra.Matrix.Ideal import LeanPool.Koethe.Linearization.Nil +import LeanPool.Koethe.MaskSequence.Universal +import LeanPool.Koethe.Mortality.MaskMortality import LeanPool.Koethe.ShiftWitness.Witness +import Mathlib.Algebra.AlgebraicCard +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.EReal.Operations +import Mathlib.RingTheory.Flat.TorsionFree +import Mathlib.RingTheory.Henselian +import Mathlib.RingTheory.RegularLocalRing.Defs +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The counterexample: a nil ideal with a non-nilpotent `2 × 2` matrix @@ -25,6 +37,8 @@ in an arbitrary universe, a nil two-sided ideal `I ⊆ R`, and a matrix in `M_2( not nilpotent. -/ +@[expose] public section + noncomputable section universe u diff --git a/LeanPool/Koethe/Disproof.lean b/LeanPool/Koethe/Disproof.lean index 591aa22694..25b8e4f14b 100644 --- a/LeanPool/Koethe/Disproof.lean +++ b/LeanPool/Koethe/Disproof.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Algebra.GroupWithZero.Basic -import Mathlib.Data.SetLike.Basic -import Mathlib.RingTheory.Ideal.Defs -import Mathlib.RingTheory.TwoSidedIdeal.Basic -import Mathlib.RingTheory.TwoSidedIdeal.Lattice +module + +public import Mathlib.LinearAlgebra.Matrix.Ideal import LeanPool.Koethe.Counterexample +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Disproof of the Köthe conjecture in Krempa's matrix form @@ -34,6 +39,8 @@ the conjecture as originally stated. That implication is a standard argument and of this formal development. -/ +@[expose] public section + open Ideal TwoSidedIdeal Polynomial open Matrix diff --git a/LeanPool/Koethe/Linearization/Basic.lean b/LeanPool/Koethe/Linearization/Basic.lean index 70e97fe45d..2fa8fbce5d 100644 --- a/LeanPool/Koethe/Linearization/Basic.lean +++ b/LeanPool/Koethe/Linearization/Basic.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ +module + +public import LeanPool.Koethe.Pencil import Mathlib.Tactic.NoncommRing -import Mathlib.Tactic.Ring -import LeanPool.Koethe.Pencil +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # Finite homogeneous-linear systems @@ -17,6 +20,8 @@ system. We construct this property directly, without needing a matrix inverse or a nilpotence assumption on the ambient algebra. -/ +@[expose] public section + noncomputable section open scoped BigOperators diff --git a/LeanPool/Koethe/Linearization/Nil.lean b/LeanPool/Koethe/Linearization/Nil.lean index 0a5bacef66..6735f24a0f 100644 --- a/LeanPool/Koethe/Linearization/Nil.lean +++ b/LeanPool/Koethe/Linearization/Nil.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Algebra.Algebra.NonUnitalSubalgebra +module + +public import Mathlib.Algebra.Algebra.NonUnitalSubalgebra +public import LeanPool.Koethe.Linearization.Basic import LeanPool.Koethe.Linearization.Pencil +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Nilness of the positive algebra from nilness of all root-row pencils @@ -20,6 +28,8 @@ multiplication by `x` preserves linearizability. At a generator this is the `prepend` construction; the multiplication step is then composition. -/ +@[expose] public section + noncomputable section namespace KoetheCounterexample diff --git a/LeanPool/Koethe/Linearization/Pencil.lean b/LeanPool/Koethe/Linearization/Pencil.lean index dcef5576d8..40f5204633 100644 --- a/LeanPool/Koethe/Linearization/Pencil.lean +++ b/LeanPool/Koethe/Linearization/Pencil.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ +module + +public import Mathlib.Logic.Equiv.Fin.Basic +public import LeanPool.Koethe.Linearization.Basic import Mathlib.Algebra.Polynomial.Degree.Operations -import Mathlib.Logic.Equiv.Fin.Basic import Mathlib.RingTheory.Nilpotent.Basic -import Mathlib.Tactic.Ring -import LeanPool.Koethe.Linearization.Basic /-! # Root-row pencils and the polynomial root-column argument @@ -19,6 +20,8 @@ root column gives `q = 1 + X * C(x) * q`. The coefficients of this polynomial are `x^n`, and their eventual vanishing proves nilpotence of `x`. -/ +@[expose] public section + noncomputable section open scoped BigOperators diff --git a/LeanPool/Koethe/MaskSequence/Basic.lean b/LeanPool/Koethe/MaskSequence/Basic.lean index 62213f58ce..62e178abe3 100644 --- a/LeanPool/Koethe/MaskSequence/Basic.lean +++ b/LeanPool/Koethe/MaskSequence/Basic.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Logic.Equiv.Fin.Basic -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Use -import LeanPool.Koethe.Pencil +module + +public import Mathlib.Logic.Equiv.Fin.Basic +public import LeanPool.Koethe.Pencil +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Sparse periodic masks @@ -22,6 +26,8 @@ preserves this invariant. Thus no limiting density or geometric-series calculation is needed. -/ +@[expose] public section + noncomputable section namespace KoetheCounterexample diff --git a/LeanPool/Koethe/MaskSequence/Chain.lean b/LeanPool/Koethe/MaskSequence/Chain.lean index c8ef1a58b7..9a74fb9a8e 100644 --- a/LeanPool/Koethe/MaskSequence/Chain.lean +++ b/LeanPool/Koethe/MaskSequence/Chain.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Tactic.Choose -import LeanPool.Koethe.MaskSequence.Basic +module + +public import LeanPool.Koethe.MaskSequence.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # A coherent chain of mortal periodic masks @@ -15,6 +21,8 @@ integral sparsity bound is retained. A pointwise choice then produces a nonzero sequence respecting every assignment at every stage. -/ +@[expose] public section + noncomputable section namespace KoetheCounterexample diff --git a/LeanPool/Koethe/MaskSequence/Universal.lean b/LeanPool/Koethe/MaskSequence/Universal.lean index 59bd11be41..f956964ae2 100644 --- a/LeanPool/Koethe/MaskSequence/Universal.lean +++ b/LeanPool/Koethe/MaskSequence/Universal.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import LeanPool.Koethe.MaskSequence.Chain +module + +public import LeanPool.Koethe.MaskSequence.Chain +import Mathlib.Basic.Countable.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Universal mortal sequences from abstract mask mortality @@ -16,6 +24,8 @@ the abstract mortality assumption, and no assertion about the density of an infinite union of masks. -/ +@[expose] public section + noncomputable section namespace KoetheCounterexample diff --git a/LeanPool/Koethe/Mortality/Degree.lean b/LeanPool/Koethe/Mortality/Degree.lean index 1a6f5247da..246b1ba130 100644 --- a/LeanPool/Koethe/Mortality/Degree.lean +++ b/LeanPool/Koethe/Mortality/Degree.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Tactic.Ring -import LeanPool.Koethe.Pencil +module + +public import LeanPool.Koethe.Pencil +public import Mathlib.Algebra.Polynomial.Degree.Defs +public import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import LeanPool.Koethe.Mortality.Minors /-! @@ -16,6 +19,8 @@ make the latter minors zero. Thus a single parameter row contributes at most one to the degree per factor, not the size of the minor. -/ +@[expose] public section + noncomputable section open scoped BigOperators diff --git a/LeanPool/Koethe/Mortality/FormalWord.lean b/LeanPool/Koethe/Mortality/FormalWord.lean index 1f7c586332..4c043bd0b1 100644 --- a/LeanPool/Koethe/Mortality/FormalWord.lean +++ b/LeanPool/Koethe/Mortality/FormalWord.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Tactic.Ring +module + +public import LeanPool.Koethe.Mortality.Homogeneous import LeanPool.Koethe.Mortality.Degree -import LeanPool.Koethe.Mortality.Homogeneous +import LeanPool.Koethe.Mortality.Minors +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Formal letters, specialization, and one scalar minor equation @@ -15,6 +23,8 @@ The common-zero theorem is applied to the coefficients of a single pivot minor. Its equation count is the full word length plus one. -/ +@[expose] public section + noncomputable section open scoped BigOperators diff --git a/LeanPool/Koethe/Mortality/Homogeneous.lean b/LeanPool/Koethe/Mortality/Homogeneous.lean index 0eba60f085..1295f7e613 100644 --- a/LeanPool/Koethe/Mortality/Homogeneous.lean +++ b/LeanPool/Koethe/Mortality/Homogeneous.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Tactic.Convert -import Mathlib.Tactic.Ring -import LeanPool.Koethe.MultiProjective -import LeanPool.Koethe.Pencil +module + +public import LeanPool.Koethe.MultiProjective +public import LeanPool.Koethe.Pencil +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Coefficientwise multihomogeneity for matrix words @@ -16,6 +22,8 @@ ring is a multivariate polynomial ring whose variables are grouped into independent triples. The zero polynomial is homogeneous of every degree. -/ +@[expose] public section + noncomputable section open scoped BigOperators diff --git a/LeanPool/Koethe/Mortality/Mask.lean b/LeanPool/Koethe/Mortality/Mask.lean index e7e5d218cc..efaefc0308 100644 --- a/LeanPool/Koethe/Mortality/Mask.lean +++ b/LeanPool/Koethe/Mortality/Mask.lean @@ -3,7 +3,17 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import LeanPool.Koethe.Mortality.FormalWord +module + +public import LeanPool.Koethe.Mortality.FormalWord +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.RingTheory.Henselian +import Mathlib.RingTheory.RegularLocalRing.Defs +import Mathlib.RingTheory.SimpleRing.Principal +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Periodic masks and independent connector holes @@ -13,6 +23,8 @@ residue classes. In particular a connector of length `m * period` has `m * holes` distinct projective blocks. -/ +@[expose] public section + noncomputable section open scoped BigOperators diff --git a/LeanPool/Koethe/Mortality/MaskMortality.lean b/LeanPool/Koethe/Mortality/MaskMortality.lean index bfbe684ff7..bd3cc674e8 100644 --- a/LeanPool/Koethe/Mortality/MaskMortality.lean +++ b/LeanPool/Koethe/Mortality/MaskMortality.lean @@ -3,8 +3,19 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Tactic.Ring +module + +public import LeanPool.Koethe.Mortality.Minors +public import LeanPool.Koethe.Pencil +public import Mathlib.FieldTheory.IsAlgClosed.Basic import LeanPool.Koethe.Mortality.Mask +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.RingTheory.SimpleRing.Principal +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Mask mortality for one-row pencils over an algebraically closed field @@ -19,6 +30,8 @@ in the constant field, and all products are in the forward word convention of `KoethePencilDefs`. No nilness or countability hypothesis is used. -/ +@[expose] public section + noncomputable section open scoped BigOperators diff --git a/LeanPool/Koethe/Mortality/Minors.lean b/LeanPool/Koethe/Mortality/Minors.lean index d8639f63de..6ecb2c9c65 100644 --- a/LeanPool/Koethe/Mortality/Minors.lean +++ b/LeanPool/Koethe/Mortality/Minors.lean @@ -3,17 +3,12 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Algebra.Field.Defs -import Mathlib.Algebra.Ring.Defs -import Mathlib.Data.Fintype.Defs -import Mathlib.Data.Matrix.Mul -import Mathlib.Data.Nat.Notation -import Mathlib.LinearAlgebra.Matrix.Defs -import Mathlib.LinearAlgebra.Matrix.Determinant.Basic +module + +public import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathlib.LinearAlgebra.Matrix.SchurComplement import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.SimpleRing.Principal -import Mathlib.Tactic.Ring /-! # Determinantal rank and sandwich compression @@ -22,6 +17,8 @@ This avoids choosing bases for exterior powers. All matrix products in this file are ordinary products over a commutative scalar ring. -/ +@[expose] public section + noncomputable section open scoped BigOperators diff --git a/LeanPool/Koethe/MultiProjective.lean b/LeanPool/Koethe/MultiProjective.lean index 3d5fe952a4..dc27d87f0f 100644 --- a/LeanPool/Koethe/MultiProjective.lean +++ b/LeanPool/Koethe/MultiProjective.lean @@ -3,37 +3,21 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Algebra.BigOperators.Group.Finset.Defs -import Mathlib.Algebra.Field.Defs -import Mathlib.Algebra.Group.Finsupp -import Mathlib.Algebra.GroupWithZero.Nat -import Mathlib.Algebra.MvPolynomial.Basic -import Mathlib.Algebra.MvPolynomial.Eval +module + +public import Mathlib.FieldTheory.IsAlgClosed.Basic +public import Mathlib.RingTheory.Ideal.Height import Mathlib.Algebra.MvPolynomial.Monad -import Mathlib.Algebra.Ring.Defs -import Mathlib.Analysis.LocallyConvex.Basic -import Mathlib.Data.Finsupp.Defs -import Mathlib.Data.Nat.Notation -import Mathlib.FieldTheory.IsAlgClosed.Basic -import Mathlib.GroupTheory.GroupAction.Ring -import Mathlib.LinearAlgebra.DFinsupp +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations import Mathlib.Order.CompletePartialOrder -import Mathlib.RingTheory.Adjoin.FG import Mathlib.RingTheory.Henselian -import Mathlib.RingTheory.Ideal.BigOperators -import Mathlib.RingTheory.Ideal.Maps -import Mathlib.RingTheory.Ideal.Operations -import Mathlib.RingTheory.Ideal.Span import Mathlib.RingTheory.Nullstellensatz import Mathlib.RingTheory.RegularLocalRing.Defs import Mathlib.RingTheory.SimpleRing.Principal -import Mathlib.Tactic.ByContra -import Mathlib.Tactic.Choose -import Mathlib.Tactic.Convert -import Mathlib.Tactic.NormNum.Basic -import Mathlib.Tactic.Ring -import Mathlib.Tactic.SplitIfs +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Common zeros on products of projective planes @@ -43,6 +27,8 @@ is homogeneous of every multidegree. No projective intersection theorem is assumed as an axiom. -/ +@[expose] public section + noncomputable section open scoped BigOperators diff --git a/LeanPool/Koethe/Pencil.lean b/LeanPool/Koethe/Pencil.lean index cd7d402ae7..f26d7bcdf6 100644 --- a/LeanPool/Koethe/Pencil.lean +++ b/LeanPool/Koethe/Pencil.lean @@ -3,16 +3,13 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Algebra.Algebra.Defs -import Mathlib.Algebra.Field.Defs -import Mathlib.Algebra.Notation.Pi.Defs -import Mathlib.Algebra.Polynomial.Basic +module + +public import Mathlib.Algebra.Algebra.Defs +public import Mathlib.Algebra.Polynomial.Basic +public import Mathlib.Data.Matrix.Mul +public import Mathlib.Basic.Countable.Defs import Mathlib.Basic.Countable.Basic -import Mathlib.Data.Finset.Card -import Mathlib.Data.Fintype.Basic -import Mathlib.Data.Matrix.Mul -import Mathlib.LinearAlgebra.Matrix.Defs -import Mathlib.Tactic.TypeStar /-! # Pencils, periodic masks and mortality @@ -26,6 +23,8 @@ matrix-mortality property proved in `LeanPool.Koethe.Mortality.MaskMortality`, a `LeanPool.Koethe.MaskSequence.Universal`. -/ +@[expose] public section + noncomputable section namespace KoetheCounterexample diff --git a/LeanPool/Koethe/ShiftWitness/Band.lean b/LeanPool/Koethe/ShiftWitness/Band.lean index b68cc65e27..bbf67b8dfd 100644 --- a/LeanPool/Koethe/ShiftWitness/Band.lean +++ b/LeanPool/Koethe/ShiftWitness/Band.lean @@ -3,15 +3,11 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Algebra.Algebra.Basic -import Mathlib.Algebra.Module.LinearMap.End -import Mathlib.Algebra.Module.Pi +module + +public import Mathlib.Algebra.Algebra.Basic +public import LeanPool.Koethe.Pencil import Mathlib.Algebra.Polynomial.Coeff -import Mathlib.Data.Fintype.Defs -import Mathlib.Data.Matrix.Diagonal -import Mathlib.Data.Nat.Notation -import Mathlib.Tactic.Ring -import LeanPool.Koethe.Pencil /-! # Backward shifts and exact polynomial mortality @@ -20,6 +16,8 @@ The coefficientwise band identity below retains the pencil's independent formal variable. It does not deduce polynomial nilpotence from one specialization. -/ +@[expose] public section + noncomputable section namespace KoetheCounterexample diff --git a/LeanPool/Koethe/ShiftWitness/Eigenvector.lean b/LeanPool/Koethe/ShiftWitness/Eigenvector.lean index 1118d15f8c..b4c68e6611 100644 --- a/LeanPool/Koethe/ShiftWitness/Eigenvector.lean +++ b/LeanPool/Koethe/ShiftWitness/Eigenvector.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.FieldTheory.RatFunc.AsPolynomial -import Mathlib.FieldTheory.RatFunc.Basic -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.Ring -import LeanPool.Koethe.ShiftWitness.Band +module + +public import Mathlib.FieldTheory.RatFunc.AsPolynomial +public import LeanPool.Koethe.ShiftWitness.Band /-! # The rational-function eigenvector of the backward shifts @@ -17,6 +16,8 @@ in `RatFunc k` are invertible. Reciprocal prefix products produce a genuine (non-finitely-supported) eigenvector on the full function space. -/ +@[expose] public section + noncomputable section namespace KoetheCounterexample diff --git a/LeanPool/Koethe/ShiftWitness/Endpoint.lean b/LeanPool/Koethe/ShiftWitness/Endpoint.lean index 332def91ad..c7cc6a0248 100644 --- a/LeanPool/Koethe/ShiftWitness/Endpoint.lean +++ b/LeanPool/Koethe/ShiftWitness/Endpoint.lean @@ -3,21 +3,14 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Algebra.Algebra.Defs -import Mathlib.Algebra.Algebra.NonUnitalSubalgebra +module + +public import Mathlib.Algebra.Algebra.Unitization +public import Mathlib.LinearAlgebra.Matrix.Ideal +public import Mathlib.LinearAlgebra.Matrix.ToLin import Mathlib.Algebra.Algebra.Subalgebra.Unitization -import Mathlib.Algebra.Algebra.Unitization -import Mathlib.Algebra.Field.Defs -import Mathlib.Algebra.Module.Defs -import Mathlib.Algebra.Ring.Defs -import Mathlib.LinearAlgebra.Matrix.Ideal -import Mathlib.LinearAlgebra.Matrix.ToLin import Mathlib.RingTheory.Flat.TorsionFree -import Mathlib.RingTheory.Nilpotent.Defs import Mathlib.RingTheory.SimpleRing.Principal -import Mathlib.RingTheory.TwoSidedIdeal.Kernel -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.Ring /-! # A nil ideal with a nonnilpotent two-by-two matrix @@ -26,6 +19,8 @@ nonzero eigenvalue after inverting `1 - a₀`. Squaring puts every entry in the nil ideal. No matrix-nilness principle is used. -/ +@[expose] public section + noncomputable section namespace KoetheCounterexample diff --git a/LeanPool/Koethe/ShiftWitness/Witness.lean b/LeanPool/Koethe/ShiftWitness/Witness.lean index 2e977483d2..08a3fba609 100644 --- a/LeanPool/Koethe/ShiftWitness/Witness.lean +++ b/LeanPool/Koethe/ShiftWitness/Witness.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Tom Adamczewski and Epoch AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: GPT-6 Astra, Tom Adamczewski -/ -import Mathlib.Tactic.Ring +module + +public import LeanPool.Koethe.ShiftWitness.Band +public import Mathlib.FieldTheory.RatFunc.Basic +public import Mathlib.LinearAlgebra.Matrix.Ideal +public import Mathlib.RingTheory.SimpleRing.Principal import LeanPool.Koethe.ShiftWitness.Eigenvector import LeanPool.Koethe.ShiftWitness.Endpoint @@ -20,6 +25,8 @@ and its nil ideal is the kernel of the scalar projection. The universe of the existential witness is exactly the universe of the ground field. -/ +@[expose] public section + noncomputable section namespace KoetheCounterexample diff --git a/LeanPool/KrafftSieve.lean b/LeanPool/KrafftSieve.lean index c941a43b53..5a2ef9d93a 100644 --- a/LeanPool/KrafftSieve.lean +++ b/LeanPool/KrafftSieve.lean @@ -3,14 +3,19 @@ Copyright (c) 2026 Fernando Portela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fernando Portela -/ +module -import LeanPool.KrafftSieve.Defs -import LeanPool.KrafftSieve.Basic -import LeanPool.KrafftSieve.ThirdHarmonic -import LeanPool.KrafftSieve.Variance -import LeanPool.KrafftSieve.SelbergWeights -import LeanPool.KrafftSieve.OptimalWeights -import LeanPool.KrafftSieve.MainTheorem +public import LeanPool.KrafftSieve.Defs +public import LeanPool.KrafftSieve.Basic +public import LeanPool.KrafftSieve.ThirdHarmonic +public import LeanPool.KrafftSieve.Variance +public import LeanPool.KrafftSieve.SelbergWeights +public import LeanPool.KrafftSieve.OptimalWeights +public import LeanPool.KrafftSieve.MainTheorem +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.NormNum.LegendreSymbol +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.NormNum.RealSqrt /-! # A Conditional Sieve Criterion for Twin Primes via Krafft Geometry @@ -23,6 +28,8 @@ Tags: analytic-number-theory, sieve-theory, twin-primes, optimization MSC: 11N05, 11N35 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/KrafftSieve/Basic.lean b/LeanPool/KrafftSieve/Basic.lean index 7ee9d1a23b..35c73c3e4d 100644 --- a/LeanPool/KrafftSieve/Basic.lean +++ b/LeanPool/KrafftSieve/Basic.lean @@ -13,8 +13,12 @@ Mathlib version: 8f9d9cff6bd728b17a24e163c9402775d9e6a365 To cite Aristotle, tag @Aristotle-Harmonic on GitHub PRs/issues, and add as co-author to commits: Co-authored-by: Aristotle (Harmonic) -/ +module -import LeanPool.KrafftSieve.Defs +public import LeanPool.KrafftSieve.Defs +import Mathlib.NumberTheory.Bertrand +import Mathlib.Tactic.NormNum.LegendreSymbol +import Mathlib.Tactic.NormNum.RealSqrt /-! @@ -24,6 +28,8 @@ This module provides basic bounds and properties for the primes and the primorial $q(n)$ used throughout the Krafft Sieve formalization. -/ +@[expose] public section + namespace KrafftSieve open scoped BigOperators Real Nat Pointwise diff --git a/LeanPool/KrafftSieve/Defs.lean b/LeanPool/KrafftSieve/Defs.lean index f2840e4f59..4fbcdcacdc 100644 --- a/LeanPool/KrafftSieve/Defs.lean +++ b/LeanPool/KrafftSieve/Defs.lean @@ -13,45 +13,15 @@ Mathlib version: 8f9d9cff6bd728b17a24e163c9402775d9e6a365 To cite Aristotle, tag @Aristotle-Harmonic on GitHub PRs/issues, and add as co-author to commits: Co-authored-by: Aristotle (Harmonic) -/ +module -import Mathlib.Algebra.Group.Pointwise.Finset.Basic -import Mathlib.Analysis.Complex.Exponential -import Mathlib.Analysis.SpecialFunctions.Complex.Log -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex -import Mathlib.Basic.Real.Basic -import Mathlib.CategoryTheory.Category.Basic -import Mathlib.Data.Finset.Sort -import Mathlib.Data.Nat.Basic -import Mathlib.Data.Nat.Nth -import Mathlib.Data.Nat.Prime.Basic -import Mathlib.Data.ZMod.QuotientRing -import Mathlib.NumberTheory.ArithmeticFunction.Defs -import Mathlib.NumberTheory.Bertrand -import Mathlib.NumberTheory.PrimeCounting -import Mathlib.Tactic.Cases -import Mathlib.Tactic.Check -import Mathlib.Tactic.Common -import Mathlib.Tactic.Constructor -import Mathlib.Tactic.Eval -import Mathlib.Tactic.Ext -import Mathlib.Tactic.Generalize -import Mathlib.Tactic.HaveI -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum +public import Mathlib.Data.Finset.Sort +public import Mathlib.Basic.Real.Basic +public import Mathlib.Data.ZMod.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Tactic.NormNum.LegendreSymbol import Mathlib.Tactic.NormNum.Prime import Mathlib.Tactic.NormNum.RealSqrt -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.SimpRw -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Tauto -import Mathlib.Tactic.Trace -import Mathlib.Tactic.TypeStar -import Mathlib.Tactic.Use -import Mathlib.Tactic.Variable /-! @@ -65,6 +35,8 @@ This module establishes the foundational definitions for the sieve: - $sum1, sum2$: Weighted sums over the interval. -/ +@[expose] public section + namespace KrafftSieve open scoped BigOperators Real Nat Pointwise diff --git a/LeanPool/KrafftSieve/MainTheorem.lean b/LeanPool/KrafftSieve/MainTheorem.lean index 1b8999bfb4..392499ba84 100644 --- a/LeanPool/KrafftSieve/MainTheorem.lean +++ b/LeanPool/KrafftSieve/MainTheorem.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Fernando Portela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fernando Portela, Google DeepMind -/ +module -import LeanPool.KrafftSieve.OptimalWeights +public import LeanPool.KrafftSieve.OptimalWeights +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.NormNum.LegendreSymbol +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.NormNum.RealSqrt /-! @@ -12,6 +17,8 @@ import LeanPool.KrafftSieve.OptimalWeights -/ +@[expose] public section + namespace KrafftSieve /-- diff --git a/LeanPool/KrafftSieve/OptimalWeights.lean b/LeanPool/KrafftSieve/OptimalWeights.lean index a2005942c1..5d0a0389e9 100644 --- a/LeanPool/KrafftSieve/OptimalWeights.lean +++ b/LeanPool/KrafftSieve/OptimalWeights.lean @@ -13,10 +13,15 @@ Mathlib version: 8f9d9cff6bd728b17a24e163c9402775d9e6a365 To cite Aristotle, tag @Aristotle-Harmonic on GitHub PRs/issues, and add as co-author to commits: Co-authored-by: Aristotle (Harmonic) -/ +module -import LeanPool.KrafftSieve.SelbergWeights -import Mathlib.Analysis.InnerProductSpace.Projection.Submodule +public import LeanPool.KrafftSieve.SelbergWeights +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import LeanPool.KrafftSieve.Basic import Mathlib.Analysis.InnerProductSpace.PiL2 +import Mathlib.Tactic.NormNum.LegendreSymbol +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.NormNum.RealSqrt /-! @@ -26,6 +31,8 @@ This module constructs the truly multidimensional optimal weights $\lambda$ for and explores the properties of the resulting polynomial $P(x)$ and weight $W_\lambda(x)$. -/ +@[expose] public section + namespace KrafftSieve open scoped BigOperators diff --git a/LeanPool/KrafftSieve/SelbergWeights.lean b/LeanPool/KrafftSieve/SelbergWeights.lean index ce0707165c..5d0e41c359 100644 --- a/LeanPool/KrafftSieve/SelbergWeights.lean +++ b/LeanPool/KrafftSieve/SelbergWeights.lean @@ -13,8 +13,14 @@ Mathlib version: 8f9d9cff6bd728b17a24e163c9402775d9e6a365 To cite Aristotle, tag @Aristotle-Harmonic on GitHub PRs/issues, and add as co-author to commits: Co-authored-by: Aristotle (Harmonic) -/ +module -import LeanPool.KrafftSieve.Basic +public import LeanPool.KrafftSieve.Defs +public import LeanPool.KrafftSieve.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.NormNum.LegendreSymbol +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.NormNum.RealSqrt /-! @@ -24,6 +30,8 @@ This module defines the permitted residue classes $localInterval$ and the global as well as the indicator function $f(x)$ for survivors in the Krafft Sieve. -/ +@[expose] public section + namespace KrafftSieve open scoped BigOperators diff --git a/LeanPool/KrafftSieve/ThirdHarmonic.lean b/LeanPool/KrafftSieve/ThirdHarmonic.lean index 448db3f44c..2c4f172fbd 100644 --- a/LeanPool/KrafftSieve/ThirdHarmonic.lean +++ b/LeanPool/KrafftSieve/ThirdHarmonic.lean @@ -13,8 +13,14 @@ Mathlib version: 8f9d9cff6bd728b17a24e163c9402775d9e6a365 To cite Aristotle, tag @Aristotle-Harmonic on GitHub PRs/issues, and add as co-author to commits: Co-authored-by: Aristotle (Harmonic) -/ +module -import LeanPool.KrafftSieve.Basic +public import LeanPool.KrafftSieve.Basic +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.NormNum.LegendreSymbol +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.NormNum.RealSqrt /-! @@ -25,6 +31,8 @@ specifically expanding the hit counts into frequencies and isolating the main te and the key third harmonic contribution. -/ +@[expose] public section + namespace KrafftSieve open scoped BigOperators diff --git a/LeanPool/KrafftSieve/Variance.lean b/LeanPool/KrafftSieve/Variance.lean index 833374550d..b6748343c5 100644 --- a/LeanPool/KrafftSieve/Variance.lean +++ b/LeanPool/KrafftSieve/Variance.lean @@ -8,8 +8,15 @@ Authors: Fernando Portela Portions of this file were generated by Aristotle (https://aristotle.harmonic.fun). -/ +module -import LeanPool.KrafftSieve.SelbergWeights +public import LeanPool.KrafftSieve.SelbergWeights +public import LeanPool.KrafftSieve.Basic +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.NormNum.LegendreSymbol +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.NormNum.RealSqrt /-! @@ -20,6 +27,8 @@ of the survivor distribution in the Krafft Sieve, and proves Parseval's identity to relate the variance to the Fourier coefficients. -/ +@[expose] public section + namespace KrafftSieve open scoped BigOperators diff --git a/LeanPool/Kuramoto.lean b/LeanPool/Kuramoto.lean index 06ecfb6696..cf89519273 100644 --- a/LeanPool/Kuramoto.lean +++ b/LeanPool/Kuramoto.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 Ben Cassie. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ben Cassie -/ +module -import LeanPool.Kuramoto.OrderParameter -import LeanPool.Kuramoto.GradientFlow -import LeanPool.Kuramoto.Contraction -import LeanPool.Kuramoto.Weighted -import LeanPool.Kuramoto.Hebbian -import LeanPool.Kuramoto.Connections -import LeanPool.Kuramoto.WitnessGeometry -import LeanPool.Kuramoto.Frontier +public import LeanPool.Kuramoto.OrderParameter +public import LeanPool.Kuramoto.GradientFlow +public import LeanPool.Kuramoto.Contraction +public import LeanPool.Kuramoto.Weighted +public import LeanPool.Kuramoto.Hebbian +public import LeanPool.Kuramoto.Connections +public import LeanPool.Kuramoto.WitnessGeometry +public import LeanPool.Kuramoto.Frontier +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Finite-N Kuramoto Synchronization @@ -23,3 +26,5 @@ Main declarations: `kuramotoR_norm_le_one`, `weighted_lyapunov_descent` Tags: dynamical-systems, synchronization, kuramoto MSC: 34D06 -/ + +@[expose] public section diff --git a/LeanPool/Kuramoto/Connections.lean b/LeanPool/Kuramoto/Connections.lean index f149a1a906..b338ce9415 100644 --- a/LeanPool/Kuramoto/Connections.lean +++ b/LeanPool/Kuramoto/Connections.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Ben Cassie. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ben Cassie -/ +module -import LeanPool.Kuramoto.Weighted -import LeanPool.Kuramoto.Hebbian +public import LeanPool.Kuramoto.Hebbian +import Mathlib.Analysis.Calculus.Deriv.Add +import Mathlib.Analysis.Calculus.Deriv.Mul +import Mathlib.Analysis.InnerProductSpace.Basic /-! # Connections between the models @@ -14,6 +17,8 @@ Relations between the weighted Kuramoto potential and the Hebbian Lyapunov funct zero weight regularisation they coincide, and the Hebbian penalty is convex in each weight. -/ +@[expose] public section + open Real Finset /-- With zero weight regularisation, the Hebbian Lyapunov function is exactly the weighted diff --git a/LeanPool/Kuramoto/Contraction.lean b/LeanPool/Kuramoto/Contraction.lean index c83ca8737c..e9a3bc78db 100644 --- a/LeanPool/Kuramoto/Contraction.lean +++ b/LeanPool/Kuramoto/Contraction.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Ben Cassie. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ben Cassie -/ +module -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic -import LeanPool.Kuramoto.GradientFlow +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +public import LeanPool.Kuramoto.GradientFlow +import Mathlib.Tactic.Positivity.Finset /-! # Pairwise contraction @@ -14,6 +16,8 @@ The relative velocity of two oscillators and the resulting pairwise contraction: phase gap lies in `(0, π)` and the coupling is positive, the gap is contracting. -/ +@[expose] public section + open Real Finset lemma kuramoto_relative_velocity diff --git a/LeanPool/Kuramoto/Frontier.lean b/LeanPool/Kuramoto/Frontier.lean index 5075afa7e0..5493b3b267 100644 --- a/LeanPool/Kuramoto/Frontier.lean +++ b/LeanPool/Kuramoto/Frontier.lean @@ -3,18 +3,16 @@ Copyright (c) 2026 Ben Cassie. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ben Cassie -/ +module -import Mathlib.Analysis.Calculus.Deriv.MeanValue -import Mathlib.Analysis.Calculus.Deriv.Prod -import Mathlib.Analysis.Calculus.MeanValue +public import LeanPool.Kuramoto.Weighted +public import LeanPool.Kuramoto.OrderParameter +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +public import Mathlib.Topology.Algebra.Module.ModuleTopology import Mathlib.Analysis.ODE.ExistUnique -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv import Mathlib.Data.Nat.Nth -import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import LeanPool.Kuramoto.Weighted -import LeanPool.Kuramoto.Contraction -import LeanPool.Kuramoto.OrderParameter -import LeanPool.Kuramoto.GradientFlow /-! # Kuramoto Frontier: ODE Solutions, Lyapunov Stability, and Synchronisation @@ -30,6 +28,8 @@ We build on the algebraic identities proved in `Weighted.lean`, `Contraction.lea and `GradientFlow.lean`. -/ +@[expose] public section + open Real Finset /-! ## Target 1: Smoothness of the Kuramoto vector field and ODE existence -/ diff --git a/LeanPool/Kuramoto/GradientFlow.lean b/LeanPool/Kuramoto/GradientFlow.lean index 0970dbdeb9..251432e3c7 100644 --- a/LeanPool/Kuramoto/GradientFlow.lean +++ b/LeanPool/Kuramoto/GradientFlow.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Ben Cassie. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ben Cassie -/ +module +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Analysis.Complex.Trigonometric import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv -import LeanPool.Kuramoto.OrderParameter /-! # Kuramoto gradient flow @@ -15,6 +17,8 @@ The Kuramoto potential `kuramotoV` and force field `kuramotoF`, together with th gradient identity expressing the force as the negative phase-derivative of the potential. -/ +@[expose] public section + open Real Finset /-- The Kuramoto potential `V = -(K / (2N)) ∑_{i,j} cos (θ_j - θ_i)`. -/ diff --git a/LeanPool/Kuramoto/Hebbian.lean b/LeanPool/Kuramoto/Hebbian.lean index ed5d8dd20d..1e100ebc2e 100644 --- a/LeanPool/Kuramoto/Hebbian.lean +++ b/LeanPool/Kuramoto/Hebbian.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Ben Cassie. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ben Cassie -/ +module -import LeanPool.Kuramoto.Weighted +public import LeanPool.Kuramoto.Weighted +import Mathlib.Analysis.Calculus.Deriv.Add +import Mathlib.Analysis.Calculus.Deriv.Mul +import Mathlib.Analysis.InnerProductSpace.Basic /-! # Hebbian phase/weight dynamics @@ -13,6 +17,8 @@ A joint phase/weight Lyapunov function `hebbianL` with a Frobenius weight penalt Hebbian weight flow `hebbianWeightF`, and the joint Lyapunov descent property. -/ +@[expose] public section + open Real Finset /-- Update a single weight entry `W i j` to `x` (used to differentiate in that entry). -/ diff --git a/LeanPool/Kuramoto/OrderParameter.lean b/LeanPool/Kuramoto/OrderParameter.lean index 60fe96552a..84a45b3c17 100644 --- a/LeanPool/Kuramoto/OrderParameter.lean +++ b/LeanPool/Kuramoto/OrderParameter.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Ben Cassie. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ben Cassie -/ +module +public import Mathlib.Analysis.Complex.Exponential import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.Complex.Trigonometric @@ -15,6 +17,8 @@ Each oscillator contributes a unit phasor `exp (i θ_k)`, and the main result is bound `‖R‖ ≤ 1` where `R = (∑_k exp (i θ_k)) / N`. -/ +@[expose] public section + open Complex Finset /-- The Kuramoto order parameter `R = (∑_k exp (i θ_k)) / N`. -/ diff --git a/LeanPool/Kuramoto/Weighted.lean b/LeanPool/Kuramoto/Weighted.lean index 727a4364a1..06c8db0dac 100644 --- a/LeanPool/Kuramoto/Weighted.lean +++ b/LeanPool/Kuramoto/Weighted.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Ben Cassie. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ben Cassie -/ +module +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Analysis.Complex.Trigonometric import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv -import LeanPool.Kuramoto.GradientFlow /-! # Weighted Kuramoto model @@ -15,6 +17,8 @@ The weighted Kuramoto potential and vector field, where coupling strengths are g matrix `W`. For the gradient identity the coupling matrix is assumed symmetric. -/ +@[expose] public section + open Real Finset /-- The weighted Kuramoto potential diff --git a/LeanPool/Kuramoto/WitnessGeometry.lean b/LeanPool/Kuramoto/WitnessGeometry.lean index bfc24d283d..ef0a8217bb 100644 --- a/LeanPool/Kuramoto/WitnessGeometry.lean +++ b/LeanPool/Kuramoto/WitnessGeometry.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Ben Cassie. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ben Cassie -/ +module +public import Mathlib.Basic.Real.Basic import Mathlib.Algebra.Order.Archimedean.Real.Basic -import Mathlib.Tactic.Linarith /-! # Witness geometry @@ -15,6 +16,8 @@ distances from the minimum, different quadratic curvatures give different restor magnitudes. -/ +@[expose] public section + open Real /-- Direct force-magnitude form of the one-dimensional barrier-asymmetry claim: at equal diff --git a/LeanPool/LatticeTriangle.lean b/LeanPool/LatticeTriangle.lean index 84a1061646..eed8c2f11e 100644 --- a/LeanPool/LatticeTriangle.lean +++ b/LeanPool/LatticeTriangle.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang. All rights reser Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang -/ +module -import LeanPool.LatticeTriangle.Solution +public import LeanPool.LatticeTriangle.Solution +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan /-! # On the paucity of lattice triangles @@ -17,6 +19,8 @@ Tags: number-theory, combinatorics MSC: 11H06, 11B30 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/LatticeTriangle/Solution.lean b/LeanPool/LatticeTriangle/Solution.lean index bb75ec4e74..9a78f9dd8c 100644 --- a/LeanPool/LatticeTriangle/Solution.lean +++ b/LeanPool/LatticeTriangle/Solution.lean @@ -3,33 +3,19 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang. All rights reser Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang -/ -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith -import Mathlib.Analysis.Fourier.ZMod -import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic -import Mathlib.Analysis.SpecialFunctions.Log.Deriv -import Mathlib.Analysis.SpecificLimits.Basic -import Mathlib.NumberTheory.Divisors -import Mathlib.Data.Nat.Totient -import Mathlib.Data.Nat.Factorization.Basic -import Mathlib.Data.Set.Card.Arithmetic -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds +module + +public import Mathlib.Analysis.Fourier.ZMod import Mathlib.Analysis.Complex.ExponentialBounds -import Mathlib.Data.ZMod.Coprime +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds +import Mathlib.Data.Set.Card.Arithmetic /-! # LeanPool.LatticeTriangle.Solution -/ +@[expose] public section + /-- The largest prime factor of `n`, or `0` if `n` has no prime factors (i.e. `n ≤ 1`). -/ def largestPrimeFactor (n : ℕ) : ℕ := WithBot.unbotD 0 n.primeFactors.max @@ -74,16 +60,13 @@ lemma truncatedObtuseRegion_subset_box (n : ℕ) (η : ℝ) : truncatedObtuseRegion n η ⊆ (Set.Icc (⌈η * (n : ℝ)⌉ - 1 : ℤ) (⌊(n : ℝ) / 2 - η * (n : ℝ)⌋ : ℤ)) ×ˢ (Set.Icc (⌈η * (n : ℝ)⌉ - 1 : ℤ) (⌊(n : ℝ) / 2 - η * (n : ℝ)⌋ : ℤ)) := by - intro ⟨p, q⟩ h - simp only [truncatedObtuseRegion, Set.mem_ofPred_eq, Set.mem_prod, Set.mem_Icc] at h ⊢ - have h₁ : (η * (n : ℝ) : ℝ) ≤ (p : ℝ) := h.1 - have h₂ : (η * (n : ℝ) : ℝ) ≤ (q : ℝ) := h.2.1 - have h₃ : (p : ℝ) + (q : ℝ) < (n : ℝ) / 2 := h.2.2.1 - have hc : ⌈η * (n : ℝ)⌉ ≤ p + 1 ∧ ⌈η * (n : ℝ)⌉ ≤ q + 1 := by - constructor <;> · rw [Int.ceil_le]; push_cast; linarith - have hp : (p : ℤ) ≤ ⌊(n : ℝ) / 2 - η * (n : ℝ)⌋ := by rw [Int.le_floor]; linarith - have hq : (q : ℤ) ≤ ⌊(n : ℝ) / 2 - η * (n : ℝ)⌋ := by rw [Int.le_floor]; linarith - exact ⟨⟨by omega, hp⟩, ⟨by omega, hq⟩⟩ + rintro ⟨p, q⟩ ⟨hp, hq, hpq, _⟩ + refine ⟨⟨(sub_le_self _ zero_le_one).trans (Int.ceil_le.mpr hp), ?_⟩, + ⟨(sub_le_self _ zero_le_one).trans (Int.ceil_le.mpr hq), ?_⟩⟩ + · apply Int.le_floor.mpr + linarith only [hpq, hq] + · apply Int.le_floor.mpr + linarith only [hpq, hp] lemma truncatedObtuseRegion_finite (n : ℕ) (η : ℝ) : (truncatedObtuseRegion n η).Finite := @@ -115,21 +98,14 @@ lemma sum_lt_half_zero_case (p q : ℤ) (hp : p ≤ ⌊((0 : ℕ) : ℝ) / 6⌋) (hq : q ≤ ⌊((0 : ℕ) : ℝ) / 6⌋) (hgcd : Int.gcd p q = 1) : (p : ℝ) + (q : ℝ) < ((0 : ℕ) : ℝ) / 2 := by - have h₁ : ⌊((0 : ℕ) : ℝ) / 6⌋ = 0 := by norm_num [Int.floor_eq_iff] - have h₂ : p ≤ 0 := by rw [h₁] at hp; exact_mod_cast hp - have h₃ : q ≤ 0 := by rw [h₁] at hq; exact_mod_cast hq - have h₉ : p < 0 ∨ q < 0 := by + norm_num only [Nat.cast_zero, zero_div, Int.floor_zero] at hp hq ⊢ + have hsum : p + q < 0 := by by_contra! h - have h₁₀ : p = 0 := by linarith - have h₁₁ : q = 0 := by linarith - simp_all - rcases h₉ with h₉ | h₉ - · have : (p : ℝ) < 0 := by exact_mod_cast h₉ - have : (q : ℝ) ≤ 0 := by exact_mod_cast h₃ - norm_num; linarith - · have : (q : ℝ) < 0 := by exact_mod_cast h₉ - have : (p : ℝ) ≤ 0 := by exact_mod_cast h₂ - norm_num; linarith + have hp0 : p = 0 := by omega + have hq0 : q = 0 := by omega + simp only [hp0, hq0, Int.gcd_zero_left, Int.natAbs_zero] at hgcd + contradiction + exact_mod_cast hsum lemma sum_lt_half_pos_case (n : ℕ) (p q : ℤ) (hn : 1 ≤ n) (hp : p ≤ ⌊(n : ℝ) / 6⌋) (hq : q ≤ ⌊(n : ℝ) / 6⌋) : @@ -177,17 +153,10 @@ lemma Int_Icc_ncard (a b : ℤ) : lemma eta_n_plus_one_le_n_div_six (η : ℝ) (_hη_pos : 0 < η) (hη_lt : η < 1 / 6) : ∃ (N₀ : ℕ), ∀ n : ℕ, N₀ ≤ n → η * (n : ℝ) + 1 ≤ (n : ℝ) / 6 := by - have h_delta_pos : 0 < (1 / 6 : ℝ) - η := by simp_all - set N₀ := ⌈(1 : ℝ) / ((1 / 6 : ℝ) - η)⌉₊ with hN₀_def - use N₀ - intro n hn - have h₂ : (n : ℝ) ≥ (1 : ℝ) / ((1 / 6 : ℝ) - η) := by simp_all - have h₄ : ((1 / 6 : ℝ) - η) * (n : ℝ) ≥ 1 := by - have := mul_le_mul_of_nonneg_left h₂ (le_of_lt h_delta_pos) - rw [mul_div_cancel₀] at this - · linarith - · exact ne_of_gt h_delta_pos - nlinarith + refine ⟨⌈(1 : ℝ) / ((1 / 6 : ℝ) - η)⌉₊, fun n hn => ?_⟩ + have hbound := (Nat.le_ceil ((1 : ℝ) / ((1 / 6 : ℝ) - η))).trans (Nat.cast_le.mpr hn) + have hproduct := (div_le_iff₀ (sub_pos.mpr hη_lt)).mp hbound + linarith only [hproduct] lemma int_expr_real_lower_bound (η : ℝ) (n : ℕ) : (n : ℝ) / 6 - η * (n : ℝ) - 1 < @@ -215,20 +184,10 @@ lemma int_expr_nonneg_for_large_n (η : ℝ) (hη_pos : 0 < η) (hη_lt : η < 1 lemma half_bound_for_large_n (η : ℝ) (_hη_pos : 0 < η) (hη_lt : η < 1 / 6) : ∃ N₀ : ℕ, ∀ n : ℕ, N₀ ≤ n → ((1 / 6 - η) / 2) * (n : ℝ) ≤ (1 / 6 - η) * (n : ℝ) - 1 := by - have h : 0 < (1 / 6 : ℝ) - η := by simp_all - have h_exists_N₀ : ∃ (N₀ : ℕ), (N₀ : ℝ) ≥ (2 : ℝ) / ((1 / 6 : ℝ) - η) := by - exact ⟨⌈(2 : ℝ) / ((1 / 6 : ℝ) - η)⌉₊, by exact_mod_cast Nat.le_ceil _⟩ - obtain ⟨N₀, hN₀⟩ := h_exists_N₀ - use N₀ - intro n hn - have h₁ : (n : ℝ) ≥ (N₀ : ℝ) := by simp_all - have h₂ : (n : ℝ) ≥ (2 : ℝ) / ((1 / 6 : ℝ) - η) := by nlinarith - have h₃ : ((1 / 6 : ℝ) - η) * (n : ℝ) ≥ 2 := by - have := mul_le_mul_of_nonneg_left h₂ (le_of_lt h) - rw [mul_div_cancel₀] at this - · linarith - · exact ne_of_gt h - nlinarith + obtain ⟨N₀, hN₀⟩ := eta_n_plus_one_le_n_div_six ((η + 1 / 6) / 2) + (by linarith only [_hη_pos]) (by linarith only [hη_lt]) + refine ⟨N₀, fun n hn => ?_⟩ + nlinarith only [hN₀ n hn] lemma interval_toNat_lower_bound (η : ℝ) (hη_pos : 0 < η) (hη_lt : η < 1 / 6) : ∃ N₀ : ℕ, ∀ n : ℕ, N₀ ≤ n → @@ -279,24 +238,14 @@ lemma inv_sq_le_inv_pred_mul (k : ℕ) (hk : 2 ≤ k) : lemma telescoping_sum_eq (N : ℕ) (hN : 3 ≤ N) : ∑ k ∈ Finset.Icc 3 N, (1 : ℝ) / ((k - 1 : ℝ) * k) = 1 / 2 - 1 / N := by - have h₁ : ∀ n : ℕ, 3 ≤ n → ∑ k ∈ Finset.Icc 3 n, (1 : ℝ) / ((k - 1 : ℝ) * k) = 1 / 2 - 1 / n := by - intro n hn - induction n, hn using Nat.le_induction with - | base => norm_num [Finset.sum_Icc_succ_top] - | succ n hn IH => - cases n with - | zero => contradiction - | succ n => - cases n with - | zero => contradiction - | succ n => - cases n with - | zero => contradiction - | succ n => - simp_all [Finset.sum_Icc_succ_top, Nat.cast_succ] - field_simp [Nat.cast_add_one_ne_zero] - ring_nf - exact h₁ N hN + induction N, hN using Nat.le_induction with + | base => norm_num + | succ n hn ih => + rw [Finset.sum_Icc_succ_top (by omega : 3 ≤ n.succ), ih] + simp only [Nat.cast_succ, add_sub_cancel_right] + have hn0 : (n : ℝ) ≠ 0 := by exact_mod_cast (by omega : n ≠ 0) + field_simp [hn0] + ring lemma tail_sum_le_half (N : ℕ) : ∑ k ∈ Finset.Icc 3 N, (1 : ℝ) / (k : ℝ) ^ 2 ≤ 1 / 2 := by @@ -597,21 +546,11 @@ lemma quadratic_dominates_linear (δ L n B' : ℝ) (hδ : 0 < δ) (hn : 0 ≤ n) (hL : δ * n ≤ L) (hB' : 5 * B' ≤ 5 * n) (hn_large : 160 / δ ^ 2 ≤ n) : δ ^ 2 / 32 * n ^ 2 ≤ L ^ 2 / 16 - 5 * B' := by - have hL_sq : δ ^ 2 * n ^ 2 ≤ L ^ 2 := by - have h₁ : 0 ≤ δ * n := by positivity - have h₄ : (δ * n) ^ 2 ≤ L ^ 2 := by nlinarith [sq_nonneg (L - δ * n)] - linarith - have h_nδ_ge : n * δ ^ 2 ≥ 160 := by - have h₂ : 0 < δ ^ 2 := by positivity - have h₃ : 160 ≤ n * δ ^ 2 := by - calc - 160 = (160 / δ ^ 2) * δ ^ 2 := by field_simp [h₂.ne'] - _ ≤ n * δ ^ 2 := by nlinarith - linarith - have h_nδ_sq_ge : δ ^ 2 / 32 * n ^ 2 ≥ 5 * n := by - have h₇ : n * (n * δ ^ 2) ≥ n * 160 := by nlinarith - linarith - linarith + have hL_sq : (δ * n) ^ 2 ≤ L ^ 2 := + pow_le_pow_left₀ (mul_nonneg hδ.le hn) hL 2 + have hnδ : 160 ≤ n * δ ^ 2 := (div_le_iff₀ (sq_pos_of_pos hδ)).mp hn_large + have hnδ_sq := mul_le_mul_of_nonneg_left hnδ hn + nlinarith only [hL_sq, hnδ_sq, hB'] lemma ceil_eta_n_pos (η : ℝ) (hη_pos : 0 < η) (n : ℕ) (hn : 1 ≤ n) : 1 ≤ (⌈η * (n : ℝ)⌉ : ℤ) := by @@ -666,31 +605,23 @@ lemma rectangle_coprime_ncard_lower_bound (η : ℝ) (hη_pos : 0 < η) (hη_lt set δ := (1 / 6 - η) / 2 with hδ_def have hδ : 0 < δ := by linarith obtain ⟨N₁, hN₁⟩ := interval_ncard_lower_bound η hη_pos hη_lt - obtain ⟨N₂, hN₂⟩ := interval_ncard_upper_bound η hη_pos obtain ⟨N₃, hN₃⟩ := ceil_le_floor_for_large_n η hη_pos hη_lt - refine ⟨δ ^ 2 / 32, max (max N₁ N₂) (max N₃ (⌈160 / δ ^ 2⌉₊ + 1)), ?_, ?_⟩ + refine ⟨δ ^ 2 / 32, max N₁ (max N₃ (⌈160 / δ ^ 2⌉₊ + 1)), ?_, ?_⟩ · positivity · intro n hn - have hn₁ : N₁ ≤ n := le_of_max_le_left (le_of_max_le_left hn) - have hn₂ : N₂ ≤ n := le_of_max_le_right (le_of_max_le_left hn) + have hn₁ : N₁ ≤ n := le_of_max_le_left hn have hn₃ : N₃ ≤ n := le_of_max_le_left (le_of_max_le_right hn) have hL_lower := hN₁ n hn₁ - have hL_upper := hN₂ n hn₂ have hAB := hN₃ n hn₃ have hn1 : 1 ≤ n := by omega set L := (Set.Icc (⌈η * (n : ℝ)⌉ : ℤ) (⌊(n : ℝ) / 6⌋ : ℤ)).ncard with hL_def have hnn : (0 : ℝ) ≤ (n : ℝ) := Nat.cast_nonneg n - have hn_large : 160 / δ ^ 2 ≤ (n : ℝ) := by - have h4 : (⌈160 / δ ^ 2⌉₊ + 1 : ℕ) ≤ n := le_of_max_le_right (le_of_max_le_right hn) - have : (⌈160 / δ ^ 2⌉₊ : ℝ) ≤ (n : ℝ) := by - calc (⌈160 / δ ^ 2⌉₊ : ℝ) ≤ (⌈160 / δ ^ 2⌉₊ + 1 : ℕ) := by - exact_mod_cast Nat.le_succ _ - _ ≤ (n : ℝ) := Nat.cast_le.mpr h4 - linarith [Nat.le_ceil (160 / δ ^ 2)] + have hn_large : 160 / δ ^ 2 ≤ (n : ℝ) := + (Nat.le_ceil _).trans (Nat.cast_le.mpr (by omega)) have hprime := prime_divisor_bound η hη_pos n hn1 calc δ ^ 2 / 32 * (n : ℝ) ^ 2 ≤ (L : ℝ) ^ 2 / 16 - 5 * (n : ℝ) := - quadratic_dominates_linear δ (L : ℝ) (n : ℝ) (n : ℝ) hδ hnn hL_lower (by linarith) + quadratic_dominates_linear δ (L : ℝ) (n : ℝ) (n : ℝ) hδ hnn hL_lower le_rfl hn_large _ ≤ ({pq : ℤ × ℤ | (⌈η * (n : ℝ)⌉ : ℤ) ≤ pq.1 ∧ pq.1 ≤ (⌊(n : ℝ) / 6⌋ : ℤ) ∧ @@ -997,26 +928,15 @@ lemma product_ge_eta_sq_n_sq (η : ℝ) (hη_pos : 0 < η) (n : ℕ) (hn : 2 ≤ n) (p q : ℤ) (hp : η * (n : ℝ) ≤ (p : ℝ)) (hq : η * (n : ℝ) ≤ (q : ℝ)) : (η * (n : ℝ)) ^ 2 ≤ (2 * (p : ℝ) - 1) * (2 * (q : ℝ) - 1) := by - have h₂ : 0 < η * (n : ℝ) := by positivity - by_cases h₃ : η * (n : ℝ) ≥ 1 - · have h₆ : (2 * (p : ℝ) - 1) * (2 * (q : ℝ) - 1) ≥ (η * (n : ℝ)) * (η * (n : ℝ)) := by - nlinarith - nlinarith - · have h₅ : p ≥ 1 := by - by_contra h₅₁ - have h₅₂ : p ≤ 0 := by linarith - have h₅₃ : (p : ℝ) ≤ 0 := by exact_mod_cast h₅₂ - linarith - have h₆ : q ≥ 1 := by - by_contra h₆₁ - have h₆₂ : q ≤ 0 := by linarith - have h₆₃ : (q : ℝ) ≤ 0 := by exact_mod_cast h₆₂ - linarith - have h₇ : (p : ℝ) ≥ 1 := by exact_mod_cast h₅ - have h₈ : (q : ℝ) ≥ 1 := by exact_mod_cast h₆ - have h₁₁ : (2 * (p : ℝ) - 1) * (2 * (q : ℝ) - 1) ≥ 1 := by nlinarith - have h₁₂ : (η * (n : ℝ)) ^ 2 < 1 := by nlinarith - nlinarith + have hpositive : 0 < η * (n : ℝ) := by positivity + have hp_one : 1 ≤ p := Int.add_one_le_iff.mpr (Int.cast_pos.mp (hpositive.trans_le hp)) + have hq_one : 1 ≤ q := Int.add_one_le_iff.mpr (Int.cast_pos.mp (hpositive.trans_le hq)) + have hp_real : (1 : ℝ) ≤ p := by exact_mod_cast hp_one + have hq_real : (1 : ℝ) ≤ q := by exact_mod_cast hq_one + have hp_bound : η * (n : ℝ) ≤ 2 * (p : ℝ) - 1 := by linarith only [hp, hp_real] + have hq_bound : η * (n : ℝ) ≤ 2 * (q : ℝ) - 1 := by linarith only [hq, hq_real] + rw [pow_two] + exact mul_le_mul hp_bound hq_bound hpositive.le (hpositive.le.trans hp_bound) lemma rearrange_ineq (η : ℝ) (n : ℕ) (hn : 2 ≤ n) (p q : ℤ) (h : (η * (n : ℝ)) ^ 2 ≤ (2 * (p : ℝ) - 1) * (2 * (q : ℝ) - 1)) : @@ -1316,15 +1236,7 @@ lemma mp_valid (n : ℕ) (hn : 2 ≤ n) (p q : ℤ) (hp : 1 ≤ p) (hq : 1 ≤ q lemma mq_valid (n : ℕ) (_hn : 2 ≤ n) (p q : ℤ) (hp : 1 ≤ p) (hq : 1 ≤ q) (hpq : (p : ℝ) + (q : ℝ) < (n : ℝ) / 2) : 1 ≤ (2 * q - 1).toNat ∧ (2 * q - 1).toNat < n := by - have hq' : (q : ℤ) ≥ 1 := by exact_mod_cast hq - have h₁ : (2 * q - 1 : ℤ) ≥ 1 := by linarith - have h₂ : (2 * q - 1 : ℤ) < (n : ℤ) := by - have h₄ : (q : ℝ) < (n : ℝ) / 2 := by - have : (p : ℝ) ≥ 1 := by exact_mod_cast hp - linarith - have : ((2 * q - 1 : ℤ) : ℝ) < (n : ℝ) := by push_cast; linarith - exact_mod_cast this - exact ⟨by omega, by omega⟩ + exact mp_valid n _hn q p hq hp (by rwa [add_comm]) lemma zero_zero_term_eq_main (n : ℕ) [NeZero n] (hn : 2 ≤ n) @@ -1338,11 +1250,9 @@ lemma zero_zero_term_eq_main have hmp := mp_valid n hn p q hp hq hpq have hmq := mq_valid n hn p q hp hq hpq simp only [ZMod.val_zero, Nat.cast_zero, zero_mul, zero_add] - rw [ramanujanSum_zero] - rw [normalizedDFT_intervalIndicator_zero n _ hmp.1 hmp.2] - rw [normalizedDFT_intervalIndicator_zero n _ hmq.1 hmq.2] - have hn_ne : (n : ℂ) ≠ 0 := Nat.cast_ne_zero.mpr (by omega) - field_simp + rw [ramanujanSum_zero, normalizedDFT_intervalIndicator_zero n _ hmp.1 hmp.2, + normalizedDFT_intervalIndicator_zero n _ hmq.1 hmq.2, + div_mul_div_comm, ← pow_two, div_mul_eq_mul_div] lemma full_sum_split_zero_nonzero (n : ℕ) [NeZero n] (F : ZMod n → ZMod n → ℂ) : @@ -2332,27 +2242,15 @@ lemma inv_le_log_ratio (u : ℕ) (hu : 1 ≤ u) : lemma telescoping_log_sum (N : ℕ) (hN : 1 ≤ N) : ∑ u ∈ Finset.Icc 1 N, Real.log ((2 * (u : ℝ) + 1) / (2 * u - 1)) = Real.log (2 * N + 1) := by - have h : ∀ (n : ℕ), 1 ≤ n → ∑ u ∈ Finset.Icc 1 n, - Real.log ((2 * (u : ℝ) + 1) / (2 * u - 1)) = Real.log (2 * n + 1) := by - intro n hn - induction n, hn using Nat.le_induction with - | base => norm_num [Finset.sum_Icc_succ_top] - | succ n hn IH => - rw [Finset.sum_Icc_succ_top (by omega : 1 ≤ n.succ)] - rw [IH] - have h₁ : (n : ℝ) ≥ 1 := by exact_mod_cast hn - have h₂ : (2 * (n : ℝ) + 1 : ℝ) > 0 := by linarith - have h₃ : (2 * (n : ℝ) - 1 : ℝ) > 0 := by linarith - have h₄ : (2 * (n.succ : ℝ) + 1 : ℝ) > 0 := by positivity - have h₅ : (2 * (n.succ : ℝ) - 1 : ℝ) > 0 := by - have h₆ : (n : ℝ) ≥ 1 := by exact_mod_cast hn - norm_num [Nat.cast_add, Nat.cast_one] at h₆ ⊢ - linarith - have h₇ : (2 * (n.succ : ℝ) + 1 : ℝ) = (2 * (n : ℝ) + 3 : ℝ) := by push_cast; ring - have h₈ : (2 * (n.succ : ℝ) - 1 : ℝ) = (2 * (n : ℝ) + 1 : ℝ) := by push_cast; ring - rw [h₇, h₈, Real.log_div (by linarith) (by linarith)] - linarith - exact h N hN + induction N, hN using Nat.le_induction with + | base => norm_num + | succ n hn ih => + rw [Finset.sum_Icc_succ_top (by omega : 1 ≤ n.succ), ih] + have hdenominator : 2 * (n.succ : ℝ) - 1 = 2 * (n : ℝ) + 1 := by + push_cast + ring + rw [hdenominator, Real.log_div (by positivity) (by positivity)] + abel lemma harmonic_Icc_le_log_odd (N : ℕ) (hN : 1 ≤ N) : ∑ u ∈ Finset.Icc 1 N, (u : ℝ)⁻¹ ≤ Real.log (2 * N + 1) := by @@ -2755,7 +2653,7 @@ lemma summand_congr_on_filter then ‖normalizedDFT n (intervalIndicator n mq) l‖ / (2 * min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) else 0)) := by - simp_all + simp only [ne_eq, hk, not_false_eq_true, true_and] lemma sum_restrict_to_nonzero (n d : ℕ) [NeZero n] [NeZero d] @@ -2801,51 +2699,7 @@ lemma split_nonzero_by_divisibility then ‖normalizedDFT n (intervalIndicator n mq) l‖ / (2 * min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) else 0)) := by - have h1 : (∑ k ∈ Finset.univ.filter (fun k : ZMod n => - k ≠ 0), ∑ u : (ZMod d)ˣ, (∑ l : ZMod n, - if (d : ℤ) ∣ (↑(ZMod.val k) * ↑(u : ZMod d).val + ↑(ZMod.val l) * - q) then ‖normalizedDFT n (intervalIndicator n mq) l‖ / (2 * min (ZMod.val k : ℝ) ((n : ℝ) - - ZMod.val k)) else 0)) = (∑ k ∈ Finset.univ.filter (fun k : ZMod n => - k ≠ 0 ∧ ¬((d : ℕ) ∣ ZMod.val k)) ∪ Finset.univ.filter (fun k : ZMod n => - k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k), ∑ u : (ZMod d)ˣ, (∑ l : ZMod n, - if (d : ℤ) ∣ (↑(ZMod.val k) * ↑(u : ZMod d).val + ↑(ZMod.val l) * - q) then ‖normalizedDFT n (intervalIndicator n mq) l‖ / (2 * - min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) else 0)) := by - have h2 : Finset.univ.filter (fun k : ZMod n => - k ≠ 0 ∧ ¬((d : ℕ) ∣ ZMod.val k)) ∪ Finset.univ.filter (fun k : ZMod n => - k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k) = Finset.univ.filter (fun k : ZMod n => k ≠ 0) := by - apply Finset.ext - intro x - simp only [Finset.mem_union, Finset.mem_filter] - constructor - · intro h - by_cases hx : x = 0 <;> by_cases hd : (d : ℕ) ∣ ZMod.val x <;> simp_all - · intro h - by_cases hx : x = 0 <;> by_cases hd : (d : ℕ) ∣ ZMod.val x <;> simp_all - rw [h2] - have h3 : (∑ k ∈ Finset.univ.filter (fun k : ZMod n => - k ≠ 0 ∧ ¬((d : ℕ) ∣ ZMod.val k)) ∪ Finset.univ.filter (fun k : ZMod n => - k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k), ∑ u : (ZMod d)ˣ, (∑ l : ZMod n, - if (d : ℤ) ∣ (↑(ZMod.val k) * ↑(u : ZMod d).val + ↑(ZMod.val l) * - q) then ‖normalizedDFT n (intervalIndicator n mq) l‖ / (2 * - min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) else 0)) = (∑ k ∈ - Finset.univ.filter (fun k : ZMod n => - k ≠ 0 ∧ ¬((d : ℕ) ∣ ZMod.val k)), ∑ u : (ZMod d)ˣ, (∑ l : ZMod n, - if (d : ℤ) ∣ (↑(ZMod.val k) * ↑(u : ZMod d).val + ↑(ZMod.val l) * - q) then ‖normalizedDFT n (intervalIndicator n mq) l‖ / (2 * - min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) else 0)) + (∑ k ∈ - Finset.univ.filter (fun k : ZMod n => - k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k), ∑ u : (ZMod d)ˣ, (∑ l : ZMod n, - if (d : ℤ) ∣ (↑(ZMod.val k) * ↑(u : ZMod d).val + ↑(ZMod.val l) * - q) then ‖normalizedDFT n (intervalIndicator n mq) l‖ / (2 * - min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) else 0)) := by - have h4 : Disjoint (Finset.univ.filter (fun k : ZMod n => - k ≠ 0 ∧ ¬((d : ℕ) ∣ ZMod.val k))) (Finset.univ.filter (fun k : ZMod n => - k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k)) := by - apply Finset.disjoint_left.mpr - simp_all - rw [Finset.sum_union h4] - rw [h1, h3] + rw [← Finset.filter_filter, ← Finset.filter_filter, Finset.sum_filter_not_add_sum_filter] lemma k_sum_split_by_d_divisibility (n d : ℕ) [NeZero n] [NeZero d] @@ -3055,14 +2909,12 @@ lemma weight_sum_multiples_of_d_bound ∑ k ∈ Finset.univ.filter (fun k : ZMod n => k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k), (1 : ℝ) / (2 * min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) ≤ (1 + Real.log (n : ℝ)) / d := by - have hd_cast : (0 : ℝ) < (d : ℝ) := Nat.cast_pos.mpr hd_pos rw [reindex_multiples_of_d n d hd_dvd hd_pos] - have h := symmetric_sum_le_one_plus_log n d hn hd_dvd hd_pos - calc 1 / (d : ℝ) * ∑ j ∈ Finset.Icc 1 (n / d - 1), - (1 : ℝ) / (2 * min (j : ℝ) ((↑(n / d) : ℝ) - j)) - ≤ 1 / (d : ℝ) * (1 + Real.log n) := by - simp_all - _ = (1 + Real.log (n : ℝ)) / d := by ring + calc + _ ≤ 1 / (d : ℝ) * (1 + Real.log n) := + mul_le_mul_of_nonneg_left (symmetric_sum_le_one_plus_log n d hn hd_dvd hd_pos) + (one_div_nonneg.mpr (Nat.cast_nonneg d)) + _ = _ := one_div_mul_eq_div _ _ lemma d_dvd_n (n : ℕ) (_hn : 2 ≤ n) : largestPrimeFactor n ^ n.factorization (largestPrimeFactor n) ∣ n := by @@ -3090,21 +2942,8 @@ lemma simplify_u_sum_when_d_dvd_k if ((d : ℤ) ∣ ↑(ZMod.val l)) then ‖normalizedDFT n (intervalIndicator n mq) l‖ else 0) := by - have h : ∀ u : (ZMod d)ˣ, - (∑ l : ZMod n, - if ((d : ℤ) ∣ (↑(ZMod.val k) * ↑(u : ZMod d).val + ↑(ZMod.val l) * q)) - then ‖normalizedDFT n (intervalIndicator n mq) l‖ - else 0) = - (∑ l : ZMod n, - if ((d : ℤ) ∣ ↑(ZMod.val l)) - then ‖normalizedDFT n (intervalIndicator n mq) l‖ - else 0) := by - intro u - apply Finset.sum_congr rfl - intro l _ - have h := dvd_simplify_multiple_case n d k l u q hdk hq_coprime_d - simp only [h] - simp_all + simp_rw [dvd_simplify_multiple_case n d k _ _ q hdk hq_coprime_d] + simp only [Finset.sum_const, Finset.card_univ, nsmul_eq_mul] lemma restricted_fourier_mass_le (n d : ℕ) [NeZero n] (hn : 2 ≤ n) @@ -3146,37 +2985,14 @@ lemma triple_sum_eq_card_times_product else 0) * (∑ k ∈ Finset.univ.filter (fun k : ZMod n => k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k), (1 : ℝ) / (2 * min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k))) := by - set A := (∑ l : ZMod n, - if ((d : ℤ) ∣ ↑(ZMod.val l)) - then ‖normalizedDFT n (intervalIndicator n mq) l‖ - else 0) with hA_def - set C := (Fintype.card (ZMod d)ˣ : ℝ) with hC_def - have hk_eq : ∀ k ∈ Finset.univ.filter (fun k : ZMod n => k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k), - (∑ u : (ZMod d)ˣ, - (∑ l : ZMod n, - if ((d : ℤ) ∣ (↑(ZMod.val k) * ↑(u : ZMod d).val + ↑(ZMod.val l) * q)) - then ‖normalizedDFT n (intervalIndicator n mq) l‖ / - (2 * min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) - else 0)) = - C * A / (2 * min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) := by - intro k hk - simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hk - rw [factor_weight_from_double_sum n d mq q k hk.1, - simplify_u_sum_when_d_dvd_k n d mq q k hk.2 hq_coprime_d] - have lhs_eq : (∑ k ∈ Finset.univ.filter (fun k : ZMod n => k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k), - (∑ u : (ZMod d)ˣ, - (∑ l : ZMod n, - if ((d : ℤ) ∣ (↑(ZMod.val k) * ↑(u : ZMod d).val + ↑(ZMod.val l) * q)) - then ‖normalizedDFT n (intervalIndicator n mq) l‖ / - (2 * min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) - else 0))) = - C * A * ∑ k ∈ Finset.univ.filter (fun k : ZMod n => k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k), - 1 / (2 * min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) := by - rw [Finset.sum_congr rfl hk_eq] - simp_rw [div_eq_mul_inv] - rw [← Finset.mul_sum] - simp_all - exact le_of_eq lhs_eq + apply le_of_eq + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro k hk + obtain ⟨hk_nonzero, hk_dvd⟩ := (Finset.mem_filter.mp hk).2 + rw [factor_weight_from_double_sum n d mq q k hk_nonzero, + simplify_u_sum_when_d_dvd_k n d mq q k hk_dvd hq_coprime_d] + simp only [div_eq_mul_inv, one_mul] lemma triple_sum_bound_via_factoring (n d : ℕ) [NeZero n] [NeZero d] (hn : 2 ≤ n) @@ -3199,37 +3015,23 @@ lemma triple_sum_bound_via_factoring have h1 := triple_sum_eq_card_times_product n d hn mq q hq_coprime_d hd_dvd have h2 := restricted_fourier_mass_le n d hn mq hmq1 hmq2 have h3 := weight_sum_multiples_of_d_bound n d hn hd_dvd hd_pos - calc (∑ k ∈ Finset.univ.filter (fun k : ZMod n => k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k), - ∑ u : (ZMod d)ˣ, - (∑ l : ZMod n, - if ((d : ℤ) ∣ (↑(ZMod.val k) * ↑(u : ZMod d).val + ↑(ZMod.val l) * q)) - then ‖normalizedDFT n (intervalIndicator n mq) l‖ / - (2 * min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) - else 0)) - ≤ ↑(Fintype.card (ZMod d)ˣ) * - (∑ l : ZMod n, - if ((d : ℤ) ∣ ↑(ZMod.val l)) - then ‖normalizedDFT n (intervalIndicator n mq) l‖ - else 0) * - (∑ k ∈ Finset.univ.filter (fun k : ZMod n => k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k), - (1 : ℝ) / (2 * min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k))) := h1 + refine h1.trans ?_ + calc _ ≤ ↑(Fintype.card (ZMod d)ˣ) * (1 + Real.log ↑n) * ((1 + Real.log ↑n) / ↑d) := by - have hA := h2 - have hB := h3 - have hcard_nonneg : (0 : ℝ) ≤ ↑(Fintype.card (ZMod d)ˣ) := Nat.cast_nonneg _ - have hA_nonneg : (0 : ℝ) ≤ ∑ l : ZMod n, - if ((d : ℤ) ∣ ↑(ZMod.val l)) - then ‖normalizedDFT n (intervalIndicator n mq) l‖ - else 0 := Finset.sum_nonneg (fun l _ => by split_ifs <;> positivity) - have hB_nonneg : (0 : ℝ) ≤ ∑ k ∈ Finset.univ.filter (fun k : ZMod n => - k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k), - (1 : ℝ) / (2 * min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) := - Finset.sum_nonneg (fun k hk => by - have hkne : k ≠ 0 := (Finset.mem_filter.mp hk).2.1 - exact div_nonneg zero_le_one (mul_nonneg (by norm_num) (le_of_lt (min_val_pos n k - hkne)))) - nlinarith [mul_le_mul_of_nonneg_left hA (mul_nonneg hcard_nonneg hB_nonneg), - mul_le_mul_of_nonneg_left hB (mul_nonneg hcard_nonneg (le_trans hA_nonneg hA))] + have hcard_nonneg : (0 : ℝ) ≤ ↑(Fintype.card (ZMod d)ˣ) := Nat.cast_nonneg _ + have hA_nonneg : (0 : ℝ) ≤ ∑ l : ZMod n, + if ((d : ℤ) ∣ ↑(ZMod.val l)) + then ‖normalizedDFT n (intervalIndicator n mq) l‖ + else 0 := Finset.sum_nonneg (fun l _ => by split_ifs <;> positivity) + have hB_nonneg : (0 : ℝ) ≤ ∑ k ∈ Finset.univ.filter (fun k : ZMod n => + k ≠ 0 ∧ (d : ℕ) ∣ ZMod.val k), + (1 : ℝ) / (2 * min (ZMod.val k : ℝ) ((n : ℝ) - ZMod.val k)) := + Finset.sum_nonneg (fun k hk => by + have hkne : k ≠ 0 := (Finset.mem_filter.mp hk).2.1 + exact div_nonneg zero_le_one (mul_nonneg (by norm_num) (le_of_lt (min_val_pos n k + hkne)))) + exact mul_le_mul (mul_le_mul_of_nonneg_left h2 hcard_nonneg) h3 hB_nonneg + (mul_nonneg hcard_nonneg (hA_nonneg.trans h2)) _ = ↑(Fintype.card (ZMod d)ˣ) * ((1 + Real.log ↑n) ^ 2 / ↑d) := by ring lemma multiple_d_weighted_bound @@ -3495,14 +3297,11 @@ lemma fiber_element_lt (s : ℕ) (hs_lt : s < p ^ (α - v)) (j : ℕ) (hj : j < p ^ v) : s + j * p ^ (α - v) < p ^ α := by - have h₂ : p ^ α = p ^ (α - v) * p ^ v := by rw [← pow_add, Nat.sub_add_cancel hv_lt.le] - have h₆ : p ^ (α - v) > 0 := pow_pos hp.pos (α - v) - have hjle : j * p ^ (α - v) ≤ (p ^ v - 1) * p ^ (α - v) := - Nat.mul_le_mul_right (p ^ (α - v)) (by omega) - have hprod : (p ^ v - 1) * p ^ (α - v) + p ^ (α - v) = p ^ (α - v) * p ^ v := by - have : p ^ v - 1 + 1 = p ^ v := by have := pow_pos hp.pos v; omega - nlinarith [this] - rw [h₂]; nlinarith + have hpositive : 0 < p ^ (α - v) := pow_pos hp.pos _ + calc s + j * p ^ (α - v) + < p ^ v * p ^ (α - v) := (Nat.div_lt_iff_lt_mul hpositive).mp (by + rwa [Nat.add_mul_div_right s j hpositive, Nat.div_eq_of_lt hs_lt, Nat.zero_add]) + _ = p ^ α := by rw [Nat.mul_comm, ← pow_add, Nat.sub_add_cancel hv_lt.le] lemma not_p_dvd_fiber_element (p : ℕ) (hp : Nat.Prime p) (α v : ℕ) (hv_lt : v < α) @@ -3907,13 +3706,9 @@ lemma even_step_lhs_eq (k : ℕ) (hk : 1 ≤ k) : (∑ t ∈ Finset.Icc 1 (2 * k - 1), 1 / min ((t : ℝ)) ((2 * k : ℝ) - (t : ℝ))) = 2 * (∑ u ∈ Finset.Icc 1 (k - 1), (u : ℝ)⁻¹) + 1 / (k : ℝ) := by - have h1 : (∑ t ∈ Finset.Icc 1 (2 * k - 1), - 1 / min ((t : ℝ)) ((2 * k : ℝ) - (t : ℝ))) = - 2 * (∑ t ∈ Finset.Icc 1 (2 * k - 1), - (1 : ℝ) / (2 * min (t : ℝ) ((2 * k : ℝ) - t))) := by - have := sum_eq_two_mul_half_sum (2 * k) - simp_all - rw [h1, symmetric_sum_even k hk] + have h := sum_eq_two_mul_half_sum (2 * k) + push_cast at h + rw [h, symmetric_sum_even k hk] exact distribute_two_over_sum k hk lemma lhs_eq_1 (k : ℕ) (hk : 1 ≤ k) : @@ -3952,21 +3747,12 @@ lemma rhs_eq (k : ℕ) (hk : 1 ≤ k) : (∑ t ∈ Finset.Icc 1 (2 * k + 1), 1 / min ((t : ℝ)) ((2 * (k : ℝ) + 1 + 1) - (t : ℝ))) = 2 * ((∑ u ∈ Finset.Icc 1 k, (u : ℝ)⁻¹) + 1 / (2 * ((k : ℝ) + 1))) := by - have hM : (2 * (k + 1) : ℕ) - 1 = 2 * k + 1 := by omega - have h1 := sum_eq_two_mul_half_sum (2 * (k + 1)) - rw [hM] at h1 - conv at h1 => lhs; arg 2; ext t; rw [show (↑(2 * (k + 1)) : ℝ) = 2 * (↑k : ℝ) + 1 + 1 from by - push_cast; ring] - conv at h1 => - rhs; arg 2; arg 2; ext t; rw [show (↑(2 * (k + 1)) : ℝ) = 2 * (↑k : ℝ) + 1 + 1 from by - push_cast; ring] - rw [h1] - have h2 := symmetric_sum_even (k + 1) (by omega : 1 ≤ k + 1) - rw [show 2 * (k + 1) - 1 = 2 * k + 1 from by omega, show k + 1 - 1 = k from by omega] at h2 - congr 1 - conv at h2 => lhs; arg 2; ext t; rw [show (2 * (↑(k + 1) : ℝ) : ℝ) = 2 * (↑k : ℝ) + 1 + 1 from by - push_cast; ring] - simp_all + have hk_next : 1 ≤ k + 1 := hk.trans (Nat.le_succ k) + have h := (even_step_lhs_eq (k + 1) hk_next).trans + (distribute_two_over_sum (k + 1) hk_next).symm + simpa only [show 2 * (k + 1) - 1 = 2 * k + 1 from by omega, Nat.add_sub_cancel, + Nat.cast_add, Nat.cast_one, + show (2 : ℝ) * ((k : ℝ) + 1) = 2 * (k : ℝ) + 1 + 1 from by ring] using h lemma odd_step (k : ℕ) (hk : 1 ≤ k) : (∑ t ∈ Finset.Icc 1 (2 * k), @@ -4519,13 +4305,8 @@ theorem log_two_n_plus_one_le_one_plus_log (n : ℕ) (hn : 2 ≤ n) : theorem sum_range_eq_sum_Icc (M : ℕ) : ∑ j ∈ Finset.range M, (1 : ℝ) / ((j : ℝ) + 1) = ∑ u ∈ Finset.Icc 1 M, (↑u)⁻¹ := by - have h₁ : ∀ j : ℕ, (1 : ℝ) / ((j : ℝ) + 1) = ((j + 1 : ℕ) : ℝ)⁻¹ := by - intro j; push_cast; rw [one_div] - simp_rw [h₁] - symm - apply Finset.sum_bij' (fun (u : ℕ) _ => u - 1) (fun (j : ℕ) _ => j + 1) <;> - simp_all [Finset.mem_Icc, Finset.mem_range] - omega + rw [← Finset.Ico_succ_right_eq_Icc, Finset.sum_Ico_eq_sum_range] + simp only [Nat.succ_eq_succ, Nat.succ_sub_one, Nat.cast_add, Nat.cast_one, one_div, add_comm] lemma harmonic_range_le_one_plus_log (M n : ℕ) (hn : 2 ≤ n) (hM : M ≤ n) : ∑ j ∈ Finset.range M, (1 : ℝ) / ((j : ℝ) + 1) ≤ 1 + Real.log ↑n := by @@ -4894,29 +4675,14 @@ lemma sum_range_le_sum_Icc (n d : ℕ) (hd_pos : 0 < d) (1 : ℝ) / (2 * ((d : ℝ) - b + ((j : ℝ) + 1) * d)) ≤ ∑ j ∈ Finset.Icc 1 (n / (2 * d)), (1 : ℝ) / (2 * ((j : ℝ) * (d : ℝ))) := by - have h₁ : ∑ j ∈ Finset.range (n / (2 * d)), - (1 : ℝ) / (2 * ((d : ℝ) - b + ((j : ℝ) + 1) * d)) = ∑ j ∈ Finset.Icc 1 (n / (2 * d)), - (1 : ℝ) / (2 * ((d : ℝ) - b + ((j : ℝ) - 1 + 1) * d)) := by - apply Eq.symm - apply Finset.sum_bij' (fun j _ => j - 1) (fun j _ => j + 1) <;> - simp_all [Finset.mem_Icc, Finset.mem_range] - omega - rw [h₁] - have h₃ : ∑ j ∈ Finset.Icc 1 (n / (2 * d)), - (1 : ℝ) / (2 * ((d : ℝ) - b + ((j : ℝ) - 1 + 1) * d)) ≤ ∑ j ∈ Finset.Icc 1 (n / (2 * d)), - (1 : ℝ) / (2 * ((j : ℝ) * (d : ℝ))) := by - apply Finset.sum_le_sum - intro j hj - have h₄ : (j : ℕ) ∈ Finset.Icc 1 (n / (2 * d)) := hj - have h₅ : 1 ≤ j := by - simp_all - have h₉ : (d : ℝ) - b ≥ 0 := by - have h₁₀ : (d : ℕ) ≥ b := by omega - simp_all - apply one_div_le_one_div_of_le - · positivity - · nlinarith - linarith + rw [← Finset.Ico_succ_right_eq_Icc, Finset.sum_Ico_eq_sum_range] + simp only [Nat.cast_add, Nat.cast_one] + apply Finset.sum_le_sum + intro j _ + apply one_div_le_one_div_of_le + · positivity + · have hbd : (b : ℝ) ≤ d := by exact_mod_cast hb_lt.le + nlinarith only [hbd] lemma tail_sum_le (n d : ℕ) (hn : 2 ≤ n) (hd_pos : 0 < d) (hd_le : d ≤ n) (b : ℕ) (hb_pos : 1 ≤ b) (hb_lt : b < d) : @@ -5014,25 +4780,18 @@ lemma half_reciprocal_sum_le_min_reciprocal (b d : ℕ) (hb_pos : 1 ≤ b) (hb_lt : b < d) : 1 / (2 * (b : ℝ)) + 1 / (2 * ((d : ℝ) - b)) ≤ 1 / min (b : ℝ) ((d : ℝ) - b) := by - have h₂ : (d : ℝ) - b > 0 := by - simp_all - have hb0 : (0 : ℝ) < (b : ℝ) := by exact_mod_cast hb_pos - by_cases h₄ : (b : ℝ) ≤ (d : ℝ) - b - · rw [min_eq_left h₄] - have h₁₁ : 1 / (2 * ((d : ℝ) - b)) ≤ 1 / (2 * (b : ℝ)) := by - apply one_div_le_one_div_of_le - · positivity - · nlinarith - have h₁₃ : 1 / (2 * (b : ℝ)) + 1 / (2 * (b : ℝ)) = 1 / (b : ℝ) := by field_simp; ring - linarith - · rw [min_eq_right (by linarith)] - have h₁₁ : 1 / (2 * (b : ℝ)) ≤ 1 / (2 * ((d : ℝ) - b)) := by - apply one_div_le_one_div_of_le - · positivity - · nlinarith - have h₁₃ : 1 / (2 * ((d : ℝ) - b)) + 1 / (2 * ((d : ℝ) - b)) = 1 / ((d : ℝ) - b) := by - field_simp; ring - linarith + have hb0 : (0 : ℝ) < b := by exact_mod_cast hb_pos + have hdb : (0 : ℝ) < (d : ℝ) - b := sub_pos.mpr (by exact_mod_cast hb_lt) + have hmin := mul_pos (show (0 : ℝ) < 2 by norm_num) (lt_min hb0 hdb) + calc + _ ≤ 1 / (2 * min (b : ℝ) ((d : ℝ) - b)) + + 1 / (2 * min (b : ℝ) ((d : ℝ) - b)) := + add_le_add + (one_div_le_one_div_of_le hmin + (mul_le_mul_of_nonneg_left (min_le_left _ _) (by norm_num))) + (one_div_le_one_div_of_le hmin + (mul_le_mul_of_nonneg_left (min_le_right _ _) (by norm_num))) + _ = _ := by rw [← add_div, div_mul_eq_div_div]; norm_num lemma fourier_mass_residue_class_bound (n d : ℕ) [NeZero n] [NeZero d] (hn : 2 ≤ n) @@ -5722,41 +5481,22 @@ lemma combine_bounds_arithmetic (hS0 : S0 ≤ (1 + Real.log n_real) / ↑d) (hSneq0 : Sneq0 ≤ 6 * ↑R * (1 + Real.log n_real) ^ 2 / ↑d) : S0 + Sneq0 ≤ 7 * ↑R * (1 + Real.log n_real) ^ 2 / (P : ℝ) := by - have h₂ : (1 + Real.log n_real : ℝ) / ↑d + 6 * ↑R * (1 + Real.log n_real) ^ 2 / ↑d = ((1 + - Real.log n_real) + 6 * ↑R * (1 + Real.log n_real) ^ 2) / ↑d := by - field_simp [hd.ne'] - have h₅ : ((1 + Real.log n_real : ℝ) + 6 * ↑R * (1 + Real.log n_real) ^ 2) / ↑d ≤ (7 * ↑R * (1 + - Real.log n_real) ^ 2 : ℝ) / ↑d := by - have h₅₁ : (1 + Real.log n_real : ℝ) ≤ ↑R * (1 + Real.log n_real) ^ 2 := by - have h₅₂ : (1 : ℝ) ≤ ↑R := by exact_mod_cast hR - nlinarith [sq_nonneg (1 + Real.log n_real - 1)] - calc - ((1 + Real.log n_real : ℝ) + 6 * ↑R * (1 + Real.log n_real) ^ 2) / ↑d ≤ (↑R * (1 + - Real.log n_real) ^ 2 + 6 * ↑R * (1 + Real.log n_real) ^ 2 : ℝ) / ↑d := by - gcongr - _ = (7 * ↑R * (1 + Real.log n_real) ^ 2 : ℝ) / ↑d := by ring_nf - have h₆ : (7 * ↑R * (1 + Real.log n_real) ^ 2 : ℝ) / ↑d ≤ (7 * ↑R * (1 + Real.log n_real) ^ - 2 : ℝ) / (P : ℝ) := by - have h₆₁ : (P : ℝ) ≤ (d : ℝ) := by exact_mod_cast hdP - have h₆₂ : 0 < (P : ℝ) := by positivity - have h₆₃ : 0 < (d : ℝ) := by positivity - have h₆₅ : (1 : ℝ) / (d : ℝ) ≤ (1 : ℝ) / (P : ℝ) := by - apply one_div_le_one_div_of_le - · positivity - · exact h₆₁ - calc - (7 * ↑R * (1 + Real.log n_real) ^ 2 : ℝ) / ↑d = (7 * ↑R * (1 + Real.log n_real) ^ 2 : ℝ) * - (1 / (d : ℝ)) := by - field_simp [h₆₃.ne'] - _ ≤ (7 * ↑R * (1 + Real.log n_real) ^ 2 : ℝ) * (1 / (P : ℝ)) := by gcongr - _ = (7 * ↑R * (1 + Real.log n_real) ^ 2 : ℝ) / (P : ℝ) := by field_simp [h₆₂.ne'] - have h₇ : (S0 : ℝ) + Sneq0 ≤ (7 * ↑R * (1 + Real.log n_real) ^ 2 : ℝ) / (P : ℝ) := by - calc - (S0 : ℝ) + Sneq0 ≤ ((1 + Real.log n_real) + 6 * ↑R * (1 + Real.log n_real) ^ 2) / ↑d := - by linarith - _ ≤ (7 * ↑R * (1 + Real.log n_real) ^ 2 : ℝ) / ↑d := by linarith - _ ≤ (7 * ↑R * (1 + Real.log n_real) ^ 2 : ℝ) / (P : ℝ) := by linarith - exact h₇ + have hR_real : (1 : ℝ) ≤ R := by exact_mod_cast hR + have hbound : 1 + Real.log n_real ≤ (R : ℝ) * (1 + Real.log n_real) ^ 2 := by + calc 1 + Real.log n_real ≤ (1 + Real.log n_real) ^ 2 := by + nlinarith only [hn_log, sq_nonneg (Real.log n_real)] + _ ≤ (R : ℝ) * (1 + Real.log n_real) ^ 2 := + le_mul_of_one_le_left (sq_nonneg _) hR_real + calc S0 + Sneq0 + ≤ ((1 + Real.log n_real) + 6 * (R : ℝ) * (1 + Real.log n_real) ^ 2) / d := by + rw [add_div] + exact add_le_add hS0 hSneq0 + _ ≤ ((R : ℝ) * (1 + Real.log n_real) ^ 2 + + 6 * (R : ℝ) * (1 + Real.log n_real) ^ 2) / d := + div_le_div_of_nonneg_right (add_le_add hbound (le_refl _)) (Nat.cast_pos.mpr hd).le + _ = (7 * (R : ℝ) * (1 + Real.log n_real) ^ 2) / d := by ring + _ ≤ (7 * (R : ℝ) * (1 + Real.log n_real) ^ 2) / P := + div_le_div_of_nonneg_left (by positivity) (Nat.cast_pos.mpr hP) (Nat.cast_le.mpr hdP) lemma combine_k0_kneq0_bounds (n : ℕ) (hn : 2 ≤ n) (d : ℕ) [NeZero d] @@ -6190,10 +5930,7 @@ lemma fourier_markov_residue_bound (η : ℝ) (θ : ℝ) exact ⟨B, hB_card, fun p hp_coprime hpq hp_notinB => by have hE := hB_error p hp_coprime hpq hp_notinB have hM := main_term_lower_bound η hη_pos n hn p q hpq - exact combine_main_and_error η hη_pos n - (countingFunctionS n p q : ℝ) - ((2 * ↑p - 1) * (2 * ↑q - 1) * (Nat.totient n : ℝ) / (n : ℝ) ^ 2) - hM hE⟩ + exact combine_main_and_error η hη_pos n (countingFunctionS n p q : ℝ) _ hM hE⟩ lemma bad_residues_bound (η : ℝ) (θ : ℝ) (hη_pos : 0 < η) (hη_lt : η < 1 / 6) (hθ_pos : 0 < θ) (hθ_lt : θ < 1) (n : ℕ) (hn : 2 ≤ n) @@ -6444,21 +6181,11 @@ theorem product_bound_first_term (n d R : ℕ) (hd_pos : 0 < d) (hR_pos : 0 < R) lemma product_bound_second_term (n d R : ℕ) (hR_pos : 0 < R) (hd_le : d ≤ n) : n / 2 * (d / R) ≤ n ^ 2 / (2 * R) := by - have h₁ : n / 2 * (d / R) ≤ n / 2 * (n / R) := by - have h₂ : d / R ≤ n / R := by - apply Nat.div_le_div_right - linarith - have h₃ : 0 ≤ n / 2 := by positivity - nlinarith - have h₇ : (n / 2) * 2 ≤ n := Nat.div_mul_le_self _ _ - have h₈ : (n / R) * R ≤ n := Nat.div_mul_le_self _ _ - have h₆ : (n / 2) * (n / R) * (2 * R) ≤ n ^ 2 := by - calc (n / 2) * (n / R) * (2 * R) = ((n / 2) * 2) * ((n / R) * R) := by ring - _ ≤ n * n := Nat.mul_le_mul h₇ h₈ - _ = n ^ 2 := by ring - have h₂ : n / 2 * (n / R) ≤ n ^ 2 / (2 * R) := - (Nat.le_div_iff_mul_le (by positivity)).mpr h₆ - linarith + calc + n / 2 * (d / R) ≤ n / 2 * (n / R) := + Nat.mul_le_mul_left _ (Nat.div_le_div_right hd_le) + _ ≤ n ^ 2 / (2 * R) := by + simpa only [pow_two] using nat_div_prod_le n n 2 R (by decide) hR_pos lemma combine_frac_bounds (n R : ℕ) (hR_pos : 0 < R) : n ^ 2 / (4 * R) + n ^ 2 / (2 * R) ≤ 3 * n ^ 2 / (4 * R) := by @@ -6994,19 +6721,11 @@ lemma totient_sq_lower_bound (n : ℕ) (hn : 1 ≤ n) : n ≤ 2 * n.totient ^ 2 lemma totient_tendsto_atTop : ∀ K : ℕ, ∃ N : ℕ, ∀ n : ℕ, N ≤ n → K ≤ Nat.totient n := by intro K - use 2 * K ^ 2 + 1 - intro n hn - by_contra h - push Not at h - have hn1 : 1 ≤ n := by omega - have hbound := totient_sq_lower_bound n hn1 - have hlt : n.totient ≤ K - 1 := by omega - have hsq : n.totient ^ 2 ≤ (K - 1) ^ 2 := Nat.pow_le_pow_left hlt 2 - have : (K - 1) ^ 2 < K ^ 2 := by - rcases K with _ | K - · omega - · simp; nlinarith [Nat.pos_of_ne_zero (by omega : K.succ ≠ 0)] - nlinarith + refine ⟨2 * K ^ 2 + 1, fun n hn => ?_⟩ + by_contra! h + have hbound := totient_sq_lower_bound n (by omega) + have hsq := Nat.pow_le_pow_left h.le 2 + omega lemma totient_large_enough (η : ℝ) (hη_pos : 0 < η) : ∃ N : ℕ, ∀ n : ℕ, N ≤ n → @@ -7129,12 +6848,13 @@ lemma ratio_bound_core (bad Hn c C n2 decay ε : ℝ) (h_lower : c * n2 ≤ Hn) (h_decay : decay < c * ε / C) : bad / Hn < ε := by - have h_C_decay_lt_cε : C * decay < c * ε := by exact (lt_div_iff₀' hC_pos).mp h_decay - have h_Cn2_decay_lt_cεn2 : C * n2 * decay < c * ε * n2 := by nlinarith - have h_cεn2_le_εHn : c * ε * n2 ≤ ε * Hn := by nlinarith - have h_bad_lt_εHn : bad < ε * Hn := by nlinarith - have h_Hn_pos : 0 < Hn := by nlinarith - exact (div_lt_iff₀ h_Hn_pos).mpr h_bad_lt_εHn + apply (div_lt_iff₀ ((mul_pos hc_pos hn2_pos).trans_le h_lower)).mpr + have hdecay := mul_lt_mul_of_pos_right ((lt_div_iff₀' hC_pos).mp h_decay) hn2_pos + have hlower := mul_le_mul_of_nonneg_left h_lower hε_pos.le + calc + bad ≤ C * n2 * decay := h_upper + _ < ε * (c * n2) := by simpa only [mul_assoc, mul_comm, mul_left_comm] using hdecay + _ ≤ ε * Hn := hlower lemma ratio_bound_from_three_lemmas (c C : ℝ) (N₁ N₂ : ℕ) (η θ : ℝ) (hc_pos : 0 < c) (hC_pos : 0 < C) diff --git a/LeanPool/Lean4GlCoalgebras.lean b/LeanPool/Lean4GlCoalgebras.lean index 5aa1f3b710..b30f4fb3e3 100644 --- a/LeanPool/Lean4GlCoalgebras.lean +++ b/LeanPool/Lean4GlCoalgebras.lean @@ -3,22 +3,27 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import LeanPool.Lean4GlCoalgebras.General.Completeness -import LeanPool.Lean4GlCoalgebras.General.Game -import LeanPool.Lean4GlCoalgebras.General.Proof -import LeanPool.Lean4GlCoalgebras.General.Soundness -import LeanPool.Lean4GlCoalgebras.Interpolation.Interpolants -import LeanPool.Lean4GlCoalgebras.Interpolation.Interpolation -import LeanPool.Lean4GlCoalgebras.Split.ProofTransformations -import LeanPool.Lean4GlCoalgebras.Logic.FixedPointTheorem -import LeanPool.Lean4GlCoalgebras.Logic.Semantics -import LeanPool.Lean4GlCoalgebras.Logic.Syntax -import LeanPool.Lean4GlCoalgebras.Pdl.Game -import LeanPool.Lean4GlCoalgebras.Split.Completeness -import LeanPool.Lean4GlCoalgebras.Split.CutProof -import LeanPool.Lean4GlCoalgebras.Split.Game -import LeanPool.Lean4GlCoalgebras.Split.Proof +public import LeanPool.Lean4GlCoalgebras.General.Completeness +public import LeanPool.Lean4GlCoalgebras.General.Game +public import LeanPool.Lean4GlCoalgebras.General.Proof +public import LeanPool.Lean4GlCoalgebras.General.Soundness +public import LeanPool.Lean4GlCoalgebras.Interpolation.Interpolants +public import LeanPool.Lean4GlCoalgebras.Interpolation.Interpolation +public import LeanPool.Lean4GlCoalgebras.Split.ProofTransformations +public import LeanPool.Lean4GlCoalgebras.Logic.FixedPointTheorem +public import LeanPool.Lean4GlCoalgebras.Logic.Semantics +public import LeanPool.Lean4GlCoalgebras.Logic.Syntax +public import LeanPool.Lean4GlCoalgebras.Pdl.Game +public import LeanPool.Lean4GlCoalgebras.Split.Completeness +public import LeanPool.Lean4GlCoalgebras.Split.CutProof +public import LeanPool.Lean4GlCoalgebras.Split.Game +public import LeanPool.Lean4GlCoalgebras.Split.Proof +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Craig Interpolation for Gödel-Löb logic via coalgebraic proofs @@ -30,3 +35,5 @@ Main declarations: `Lean4GlCoalgebras.interpolation` Tags: modal-logic, provability-logic, craig-interpolation, proof-theory MSC: 03B45, 03F45 -/ + +@[expose] public section diff --git a/LeanPool/Lean4GlCoalgebras/General/Completeness.lean b/LeanPool/Lean4GlCoalgebras/General/Completeness.lean index cb6dd0a4ee..f9551bcbc1 100644 --- a/LeanPool/Lean4GlCoalgebras/General/Completeness.lean +++ b/LeanPool/Lean4GlCoalgebras/General/Completeness.lean @@ -3,15 +3,25 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ - -import LeanPool.Lean4GlCoalgebras.General.Game -import LeanPool.Lean4GlCoalgebras.General.Soundness +module + +public import LeanPool.Lean4GlCoalgebras.General.Game +public import LeanPool.Lean4GlCoalgebras.Logic.Semantics +public import Mathlib.Algebra.Group.Nat.Even +public import Mathlib.Data.Fin.Tuple.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! ## Prover winning the GL-game builds a GL-proof. If Prover has a winning strategy in the game starting from `Γ`, then there is a proof of `Γ`, proven in `prover_win_builds_proof`, all other definitions and proofs in this file are helpers. -/ +@[expose] public section + namespace Lean4GlCoalgebras private lemma unDi_mem_D_of_ne {Γ : Sequent} {φ χ : Formula} @@ -546,37 +556,37 @@ def builderMovePremises {Γ : Sequent} {strat : Strategy coalgebraGame Prover} | RuleApp.ax _ _ _ => [] | RuleApp.or Δ φ1 φ2 φ_in => if rep : (Δ \ {φ1 v φ2}) ∪ {φ1, φ2} ∈ Γs - then [repNext Γ g (by convert rep; grind)] + then [repNext (Δ := (Δ \ {φ1 v φ2}) ∪ {φ1, φ2}) Γ g (by convert rep; grind)] else - [nextNext g h (by convert rep; grind) + [nextNext (Δ := (Δ \ {φ1 v φ2}) ∪ {φ1, φ2}) g h (by convert rep; grind) (by subst g_def; simp [RuleApp.sequents, builderRuleApp])] | RuleApp.and Δ φ1 φ2 φ_in => if rep1 : (Δ \ {φ1 & φ2}) ∪ {φ1} ∈ Γs then if rep2 : (Δ \ {φ1 & φ2}) ∪ {φ2} ∈ Γs then - [repNext Γ g (by convert rep1; grind), - repNext Γ g (by convert rep2; grind)] + [repNext (Δ := (Δ \ {φ1 & φ2}) ∪ {φ1}) Γ g (by convert rep1; grind), + repNext (Δ := (Δ \ {φ1 & φ2}) ∪ {φ2}) Γ g (by convert rep2; grind)] else - [repNext Γ g (by convert rep1; grind), - nextNext g h (by convert rep2; grind) + [repNext (Δ := (Δ \ {φ1 & φ2}) ∪ {φ1}) Γ g (by convert rep1; grind), + nextNext (Δ := (Δ \ {φ1 & φ2}) ∪ {φ2}) g h (by convert rep2; grind) (by subst g_def; simp [RuleApp.sequents, builderRuleApp])] else if rep2 : (Δ \ {φ1 & φ2}) ∪ {φ2} ∈ Γs then - [nextNext g h (by convert rep1; grind) + [nextNext (Δ := (Δ \ {φ1 & φ2}) ∪ {φ1}) g h (by convert rep1; grind) (by subst g_def; simp [RuleApp.sequents, builderRuleApp]), - repNext Γ g (by convert rep2; grind)] + repNext (Δ := (Δ \ {φ1 & φ2}) ∪ {φ2}) Γ g (by convert rep2; grind)] else - [nextNext g h (by convert rep1; grind) + [nextNext (Δ := (Δ \ {φ1 & φ2}) ∪ {φ1}) g h (by convert rep1; grind) (by subst g_def; simp [RuleApp.sequents, builderRuleApp]), - nextNext g h (by convert rep2; grind) + nextNext (Δ := (Δ \ {φ1 & φ2}) ∪ {φ2}) g h (by convert rep2; grind) (by subst g_def; simp [RuleApp.sequents, builderRuleApp])] | RuleApp.box Δ φ φ_in => if rep : (Δ \ {□φ}).D ∪ {φ} ∈ Γs - then [repNext Γ g (by convert rep; grind)] + then [repNext (Δ := (Δ \ {□φ}).D ∪ {φ}) Γ g (by convert rep; grind)] else - [nextNext g h (by convert rep; grind) + [nextNext (Δ := (Δ \ {□φ}).D ∪ {φ}) g h (by convert rep; grind) (by subst g_def; simp [RuleApp.sequents, builderRuleApp])] /-- If Prover has a winning strategy in the game starting from `Γ`, then there is a proof diff --git a/LeanPool/Lean4GlCoalgebras/General/Game.lean b/LeanPool/Lean4GlCoalgebras/General/Game.lean index 6c756260fe..b85106efdf 100644 --- a/LeanPool/Lean4GlCoalgebras/General/Game.lean +++ b/LeanPool/Lean4GlCoalgebras/General/Game.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import LeanPool.Lean4GlCoalgebras.Pdl.Game -import LeanPool.Lean4GlCoalgebras.General.Proof +public import LeanPool.Lean4GlCoalgebras.Pdl.Game +public import LeanPool.Lean4GlCoalgebras.General.Proof +public import Mathlib.Data.Finset.Powerset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.Set.Finite.Basic +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! ## The GL-proof game. @@ -14,6 +22,8 @@ plays an applicable sequent `Γ` in order to construct a counter-model. Prover g plays rule applications `R` in order to construct a proof. -/ +@[expose] public section + namespace Lean4GlCoalgebras /-- Auxiliary declaration used in the GL coalgebra development. -/ diff --git a/LeanPool/Lean4GlCoalgebras/General/Proof.lean b/LeanPool/Lean4GlCoalgebras/General/Proof.lean index d38442553e..becfdc412c 100644 --- a/LeanPool/Lean4GlCoalgebras/General/Proof.lean +++ b/LeanPool/Lean4GlCoalgebras/General/Proof.lean @@ -3,26 +3,26 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import LeanPool.Lean4GlCoalgebras.Logic.Syntax -import Mathlib.Data.Set.Defs -import Mathlib.CategoryTheory.Limits.Shapes.IsTerminal -import Mathlib.CategoryTheory.Functor.EpiMono -import Mathlib.CategoryTheory.Functor.Const +public import LeanPool.Lean4GlCoalgebras.Logic.Syntax +public import Mathlib.CategoryTheory.Endofunctor.Algebra +import Mathlib.Algebra.BigOperators.Group.Finset.Basic import Mathlib.Data.Finset.Powerset -import Mathlib.Data.Fintype.Defs -import Mathlib.CategoryTheory.Endofunctor.Algebra -import Mathlib.Data.Finset.Basic -import Mathlib.Data.Nat.Basic -import Aesop -import Mathlib.Data.Setoid.Partition -import Mathlib.Data.Finset.Lattice.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.Set.Finite.Basic +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! ## Defining GL-proof systems. Here we define the GL-proof system along with finitization and basic properties. -/ +@[expose] public section + namespace Lean4GlCoalgebras /-! # Basic components of the GL-proof system.-/ diff --git a/LeanPool/Lean4GlCoalgebras/General/Soundness.lean b/LeanPool/Lean4GlCoalgebras/General/Soundness.lean index bbf19f27c5..c2986637e7 100644 --- a/LeanPool/Lean4GlCoalgebras/General/Soundness.lean +++ b/LeanPool/Lean4GlCoalgebras/General/Soundness.lean @@ -3,16 +3,20 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import Mathlib.Data.Finset.Basic -import Mathlib.Order.CompleteLattice.Basic -import Mathlib.Order.FixedPoints -import Mathlib.Data.Set.Lattice.Indexed -import LeanPool.Lean4GlCoalgebras.Logic.Semantics -import LeanPool.Lean4GlCoalgebras.General.Proof +public import LeanPool.Lean4GlCoalgebras.Logic.Semantics +public import LeanPool.Lean4GlCoalgebras.General.Proof +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! ## Soundness of GL-proof system. -/ +@[expose] public section + namespace Lean4GlCoalgebras open Classical in diff --git a/LeanPool/Lean4GlCoalgebras/Interpolation/Interpolants.lean b/LeanPool/Lean4GlCoalgebras/Interpolation/Interpolants.lean index 8bb79f6451..e1455a95d4 100644 --- a/LeanPool/Lean4GlCoalgebras/Interpolation/Interpolants.lean +++ b/LeanPool/Lean4GlCoalgebras/Interpolation/Interpolants.lean @@ -3,16 +3,31 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import Mathlib.Data.Fintype.Defs -import LeanPool.Lean4GlCoalgebras.Logic.FixedPointTheorem +public import LeanPool.Lean4GlCoalgebras.Logic.Semantics +public import LeanPool.Lean4GlCoalgebras.Split.Proof +public import Mathlib.Algebra.Group.End +public import Mathlib.Algebra.Order.Ring.Int +public import Mathlib.Data.Fintype.EquivFin +public import Mathlib.Tactic.Linarith.Lemmas +public import Mathlib.Tactic.Ring.Basic +public import Mathlib.Tactic.Zify +public import LeanPool.Lean4GlCoalgebras.Logic.FixedPointTheorem import LeanPool.Lean4GlCoalgebras.Split.Completeness +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! ## Finding interpolants Here we show that given a finite GL-split proof, we can always find suitable interpolants. -/ +@[expose] public section + namespace Lean4GlCoalgebras open Split diff --git a/LeanPool/Lean4GlCoalgebras/Interpolation/Interpolation.lean b/LeanPool/Lean4GlCoalgebras/Interpolation/Interpolation.lean index d74645c7fa..54fc2a2546 100644 --- a/LeanPool/Lean4GlCoalgebras/Interpolation/Interpolation.lean +++ b/LeanPool/Lean4GlCoalgebras/Interpolation/Interpolation.lean @@ -3,14 +3,24 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module +public import LeanPool.Lean4GlCoalgebras.Logic.Semantics import LeanPool.Lean4GlCoalgebras.Interpolation.PartialInterpolation +import LeanPool.Lean4GlCoalgebras.Split.Completeness +import LeanPool.Lean4GlCoalgebras.Split.Soundness +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! ## Interpolation We use everything we have proven so far to show that GL has interpolation! -/ +@[expose] public section + namespace Lean4GlCoalgebras /-- Definition of Craig interpolation. -/ diff --git a/LeanPool/Lean4GlCoalgebras/Interpolation/PartialInterpolation.lean b/LeanPool/Lean4GlCoalgebras/Interpolation/PartialInterpolation.lean index 1f2b29a68d..e8ac931935 100644 --- a/LeanPool/Lean4GlCoalgebras/Interpolation/PartialInterpolation.lean +++ b/LeanPool/Lean4GlCoalgebras/Interpolation/PartialInterpolation.lean @@ -3,16 +3,23 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import Mathlib.Data.Fintype.Defs -import LeanPool.Lean4GlCoalgebras.Interpolation.Interpolants -import LeanPool.Lean4GlCoalgebras.Split.ProofTransformations +public import LeanPool.Lean4GlCoalgebras.Interpolation.Interpolants +public import LeanPool.Lean4GlCoalgebras.Split.ProofTransformations +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Partial Left Interpolation Proofs All of the left and right partial interpolation proofs, split apart based on rule application. These are split apart since otherwise the file runs very slow. -/ +@[expose] public section + namespace Lean4GlCoalgebras open Split @@ -209,7 +216,10 @@ noncomputable def partialLeftOrₗ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x : | 1 => simp [Ext.r, Ext.p] root := 0 - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (noInfinitePathOfIncreasing f.2.2 (by + intro i j edge + fin_cases i <;> simp [Ext.edge, Ext.p] at edge ⊢ + omega))} | [] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | y :: z :: l => by have := 𝕏.step x; simp [rule_def] at this; simp_all @@ -226,7 +236,7 @@ noncomputable def partialLeftOrᵣ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x : α u := ⟨Ext.RuleApp.pre y (by simp [p_def]), {}⟩ step := by simp [Ext.r, Ext.p] root := () - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (by simpa [Ext.edge, Ext.p] using f.2.2 0)} | [] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | _ :: _ :: _ => by have := 𝕏.step x; simp [rule_def] at this; simp_all @@ -276,7 +286,9 @@ noncomputable def partialLeftAndₗ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x : | 2 => by simp [Ext.r, Ext.p] | 3 => by simp [Ext.r, Ext.p] root := 0 - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (noInfinitePathOfIncreasing f.2.2 (by + intro i j edge + fin_cases i <;> simp [Ext.edge, Ext.p] at edge ⊢ <;> omega))} else { X := Fin 6 α | 0 => @@ -338,7 +350,9 @@ noncomputable def partialLeftAndₗ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x : | 4 => by simp [Ext.r, Ext.p] | 5 => by simp [Ext.r, Ext.p] root := 0 - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (noInfinitePathOfIncreasing f.2.2 (by + intro i j edge + fin_cases i <;> simp [Ext.edge, Ext.p] at edge ⊢ <;> omega))} | [] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | [_] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | _ :: _ :: _ :: _ => by have := 𝕏.step x; simp [rule_def] at this; simp_all @@ -376,7 +390,10 @@ noncomputable def partialLeftAndᵣ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x : | 1 => by simp [Ext.r, Ext.p] | 2 => by simp [Ext.r, Ext.p] root := 0 - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (noInfinitePathOfIncreasing f.2.2 (by + intro i j edge + fin_cases i <;> simp [Ext.edge, Ext.p] at edge ⊢ + omega))} | [] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | [_] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | _ :: _ :: _ :: _ => by have := 𝕏.step x; simp [rule_def] at this; simp_all @@ -427,7 +444,9 @@ noncomputable def partialLeftBoxₗ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x : induction interpolant 𝕏 (at encodeVar y) <;> simp_all | 2 => by simp [Ext.r, Ext.p] root := 0 - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (noInfinitePathOfIncreasing f.2.2 (by + intro i j edge + fin_cases i <;> simp [Ext.edge, Ext.p] at edge ⊢ <;> omega))} | [] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | _ :: _ :: _ => by have := 𝕏.step x; simp [rule_def] at this; simp_all @@ -461,7 +480,10 @@ noncomputable def partialLeftBoxᵣ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x : cases ψ <;> simp | 1 => by simp [Ext.r, Ext.p] root := 0 - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (noInfinitePathOfIncreasing f.2.2 (by + intro i j edge + fin_cases i <;> simp [Ext.edge, Ext.p] at edge ⊢ + omega))} | [] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | _ :: _ :: _ => by have := 𝕏.step x; simp [rule_def] at this; simp_all @@ -613,7 +635,7 @@ noncomputable def partialRightOrₗ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x : α u := ⟨Ext.RuleApp.pre y (by simp [p_def]), {}⟩ step := by simp [Ext.r, Ext.p] root := () - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (by simpa [Ext.edge, Ext.p] using f.2.2 0)} | [] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | y :: z :: l => by have := 𝕏.step x; simp [rule_def] at this; simp_all @@ -644,7 +666,10 @@ noncomputable def partialRightOrᵣ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x : | 1 => simp [Ext.r, Ext.p] root := 0 - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (noInfinitePathOfIncreasing f.2.2 (by + intro i j edge + fin_cases i <;> simp [Ext.edge, Ext.p] at edge ⊢ + omega))} | [] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | _ :: _ :: _ => by have := 𝕏.step x; simp [rule_def] at this; simp_all @@ -682,7 +707,10 @@ noncomputable def partialRightAndₗ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x | 1 => by simp [Ext.r, Ext.p] | 2 => by simp [Ext.r, Ext.p] root := 0 - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (noInfinitePathOfIncreasing f.2.2 (by + intro i j edge + fin_cases i <;> simp [Ext.edge, Ext.p] at edge ⊢ + omega))} | [] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | [_] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | _ :: _ :: _ :: _ => by have := 𝕏.step x; simp [rule_def] at this; simp_all @@ -733,7 +761,9 @@ noncomputable def partialRightAndᵣ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x | 2 => by simp [Ext.r, Ext.p] | 3 => by simp [Ext.r, Ext.p] root := 0 - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (noInfinitePathOfIncreasing f.2.2 (by + intro i j edge + fin_cases i <;> simp [Ext.edge, Ext.p] at edge ⊢ <;> omega))} else { X := Fin 6 α | 0 => @@ -803,7 +833,9 @@ noncomputable def partialRightAndᵣ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x | 4 => by simp [Ext.r, Ext.p] | 5 => by simp [Ext.r, Ext.p] root := 0 - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (noInfinitePathOfIncreasing f.2.2 (by + intro i j edge + fin_cases i <;> simp [Ext.edge, Ext.p] at edge ⊢ <;> omega))} | [] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | [_] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | _ :: _ :: _ :: _ => by have := 𝕏.step x; simp [rule_def] at this; simp_all @@ -840,7 +872,10 @@ noncomputable def partialRightBoxₗ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x cases ψ <;> simp | 1 => by simp [Ext.r, Ext.p] root := 0 - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (noInfinitePathOfIncreasing f.2.2 (by + intro i j edge + fin_cases i <;> simp [Ext.edge, Ext.p] at edge ⊢ + omega))} | [] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | _ :: _ :: _ => by have := 𝕏.step x; simp [rule_def] at this; simp_all @@ -891,7 +926,9 @@ noncomputable def partialRightBoxᵣ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x induction interpolant 𝕏 (at encodeVar y) <;> simp_all -- MALVIN so weird | 2 => by simp [Ext.r, Ext.p] root := 0 - path z f := by exfalso; simp [Ext.edge, Ext.p] at f; grind} + path z f := False.elim (noInfinitePathOfIncreasing f.2.2 (by + intro i j edge + fin_cases i <;> simp [Ext.edge, Ext.p] at edge ⊢ <;> omega))} | [] => by have := 𝕏.step x; simp [rule_def] at this; simp_all | _ :: _ :: _ => by have := 𝕏.step x; simp [rule_def] at this; simp_all diff --git a/LeanPool/Lean4GlCoalgebras/Logic/FixedPointTheorem.lean b/LeanPool/Lean4GlCoalgebras/Logic/FixedPointTheorem.lean index 2373efef5a..8f9013a912 100644 --- a/LeanPool/Lean4GlCoalgebras/Logic/FixedPointTheorem.lean +++ b/LeanPool/Lean4GlCoalgebras/Logic/FixedPointTheorem.lean @@ -3,14 +3,23 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import LeanPool.Lean4GlCoalgebras.Logic.Semantics +public import LeanPool.Lean4GlCoalgebras.Logic.Semantics +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! ## Fixed-Point Theorem for Box and Diamond Formulas Here we prove the fixed-point theorem for formulas of form `□φ` and `◇φ`. -/ +@[expose] public section + namespace Lean4GlCoalgebras /-- Semantic Substitution Lemma for logics with transitive frames. -/ diff --git a/LeanPool/Lean4GlCoalgebras/Logic/Semantics.lean b/LeanPool/Lean4GlCoalgebras/Logic/Semantics.lean index 7bcb7bd34e..97ac4a4f9c 100644 --- a/LeanPool/Lean4GlCoalgebras/Logic/Semantics.lean +++ b/LeanPool/Lean4GlCoalgebras/Logic/Semantics.lean @@ -3,18 +3,23 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import Mathlib.Data.Finset.Basic -import Mathlib.Order.CompleteLattice.Basic -import Mathlib.Order.FixedPoints -import Mathlib.Data.Set.Lattice.Indexed -import LeanPool.Lean4GlCoalgebras.Logic.Syntax +public import LeanPool.Lean4GlCoalgebras.Logic.Syntax +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! ## Semantics of GL Here we supply the semantics of GL. -/ +@[expose] public section + namespace Lean4GlCoalgebras /-- Kripke models for GL (note: we add the transitivity and con_wf conditions directly into our diff --git a/LeanPool/Lean4GlCoalgebras/Logic/Syntax.lean b/LeanPool/Lean4GlCoalgebras/Logic/Syntax.lean index b116bbd060..67bd53e502 100644 --- a/LeanPool/Lean4GlCoalgebras/Logic/Syntax.lean +++ b/LeanPool/Lean4GlCoalgebras/Logic/Syntax.lean @@ -3,27 +3,28 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import Mathlib.Data.Set.Defs -import Mathlib.CategoryTheory.Limits.Shapes.IsTerminal -import Mathlib.CategoryTheory.Functor.EpiMono -import Mathlib.CategoryTheory.Functor.Const -import Mathlib.Data.Finset.Powerset -import Mathlib.Data.Fintype.Defs -import Mathlib.CategoryTheory.Endofunctor.Algebra -import Mathlib.Algebra.BigOperators.Group.Finset.Basic +public import Mathlib.Data.Finset.Max +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Finset.Union +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.ToAdditive import Mathlib.Algebra.Order.BigOperators.Group.Finset -import Mathlib.Data.Finset.Basic -import Mathlib.Data.Finset.Max -import Mathlib.Data.Nat.Basic -import Aesop -import Mathlib.Tactic.Linarith +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! ## Syntax of Basic Modal Logic Here we supply basic definitions, abbreviations, and lemmas about the syntax of BML. -/ +@[expose] public section + namespace Lean4GlCoalgebras /-- Type of BML Formulas. -/ diff --git a/LeanPool/Lean4GlCoalgebras/Pdl/Game.lean b/LeanPool/Lean4GlCoalgebras/Pdl/Game.lean index cbc4ce39b6..e65bf94ed0 100644 --- a/LeanPool/Lean4GlCoalgebras/Pdl/Game.lean +++ b/LeanPool/Lean4GlCoalgebras/Pdl/Game.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import Mathlib.Data.Finset.Basic +public import Mathlib.Data.Finset.Empty +import Mathlib.Data.Finset.Attr /-! # A General Theory for Determined Two-player Games @@ -14,6 +16,8 @@ must have a winning strategy: `gamedet` at the end. -/ +@[expose] public section + namespace Lean4GlCoalgebras /-! ## Games -/ diff --git a/LeanPool/Lean4GlCoalgebras/Split/Completeness.lean b/LeanPool/Lean4GlCoalgebras/Split/Completeness.lean index b2925e5915..f9c0588f8c 100644 --- a/LeanPool/Lean4GlCoalgebras/Split/Completeness.lean +++ b/LeanPool/Lean4GlCoalgebras/Split/Completeness.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module +public import LeanPool.Lean4GlCoalgebras.Split.Game +public import LeanPool.Lean4GlCoalgebras.Logic.Semantics +public import Mathlib.Algebra.Group.Nat.Even +public import Mathlib.Data.Fin.Tuple.Basic import LeanPool.Lean4GlCoalgebras.Split.Soundness -import LeanPool.Lean4GlCoalgebras.Split.Game +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! ## Prover winning the GL-split game builds a GL-split proof. @@ -13,6 +22,8 @@ If Prover has a winning strategy in the game starting from `Γ`, then there is a of `Γ`, proven in `prover_win_builds_proof`; all other definitions and proofs in this file are helpers. -/ +@[expose] public section + namespace Lean4GlCoalgebras namespace Split @@ -645,7 +656,7 @@ private lemma left_turn_not_builder {Γ : SplitSequent} {Γs : List SplitSequent def builderMovePremises {Γ : SplitSequent} {strat : Strategy coalgebraGame Prover} (g : proof_type Γ strat) (h : winning strat (startPos Γ)) : List (proof_type Γ strat) := match g_def : g with - | ⟨⟨Sum.inl _, _, _⟩, x, y⟩ => False.elim (left_turn_not_builder y) + | ⟨⟨Sum.inl _, _, _⟩, x, y⟩ => False.elim (by exact left_turn_not_builder y) | ⟨⟨Sum.inr R, Γs, Rs⟩, _⟩ => match R with | RuleApp.topₗ _ _ => [] @@ -656,78 +667,90 @@ def builderMovePremises {Γ : SplitSequent} {strat : Strategy coalgebraGame Prov | RuleApp.axᵣᵣ _ _ _ => [] | RuleApp.orₗ Δ φ1 φ2 φ_in => if rep : (Δ \ {Sum.inl (φ1 v φ2)}) ∪ {Sum.inl φ1, Sum.inl φ2} ∈ Γs - then [repNext Γ g (by convert rep; grind)] + then [repNext (Δ := (Δ \ {Sum.inl (φ1 v φ2)}) ∪ {Sum.inl φ1, Sum.inl φ2}) Γ g + (by convert rep; grind)] else - [nextNext g h + [nextNext (Δ := (Δ \ {Sum.inl (φ1 v φ2)}) ∪ {Sum.inl φ1, Sum.inl φ2}) g h (by convert rep; grind) (by subst g_def; simp [RuleApp.splitSequents, builderRuleApp])] | RuleApp.orᵣ Δ φ1 φ2 φ_in => if rep : (Δ \ {Sum.inr (φ1 v φ2)}) ∪ {Sum.inr φ1, Sum.inr φ2} ∈ Γs - then [repNext Γ g (by convert rep; grind)] + then [repNext (Δ := (Δ \ {Sum.inr (φ1 v φ2)}) ∪ {Sum.inr φ1, Sum.inr φ2}) Γ g + (by convert rep; grind)] else - [nextNext g h + [nextNext (Δ := (Δ \ {Sum.inr (φ1 v φ2)}) ∪ {Sum.inr φ1, Sum.inr φ2}) g h (by convert rep; grind) (by subst g_def; simp [RuleApp.splitSequents, builderRuleApp])] | RuleApp.andₗ Δ φ1 φ2 φ_in => if rep1 : (Δ \ {Sum.inl (φ1 & φ2)}) ∪ {Sum.inl φ1} ∈ Γs then if rep2 : (Δ \ {Sum.inl (φ1 & φ2)}) ∪ {Sum.inl φ2} ∈ Γs - then [repNext Γ g (by convert rep1; grind), repNext Γ g (by convert rep2; grind)] + then [repNext (Δ := (Δ \ {Sum.inl (φ1 & φ2)}) ∪ {Sum.inl φ1}) Γ g + (by convert rep1; grind), + repNext (Δ := (Δ \ {Sum.inl (φ1 & φ2)}) ∪ {Sum.inl φ2}) Γ g + (by convert rep2; grind)] else - [repNext Γ g (by convert rep1; grind), - nextNext g h + [repNext (Δ := (Δ \ {Sum.inl (φ1 & φ2)}) ∪ {Sum.inl φ1}) Γ g + (by convert rep1; grind), + nextNext (Δ := (Δ \ {Sum.inl (φ1 & φ2)}) ∪ {Sum.inl φ2}) g h (by convert rep2; grind) (by subst g_def; simp [RuleApp.splitSequents, builderRuleApp])] else if rep2 : (Δ \ {Sum.inl (φ1 & φ2)}) ∪ {Sum.inl φ2} ∈ Γs then - [nextNext g h + [nextNext (Δ := (Δ \ {Sum.inl (φ1 & φ2)}) ∪ {Sum.inl φ1}) g h (by convert rep1; grind) (by subst g_def; simp [RuleApp.splitSequents, builderRuleApp]), - repNext Γ g (by convert rep2; grind)] + repNext (Δ := (Δ \ {Sum.inl (φ1 & φ2)}) ∪ {Sum.inl φ2}) Γ g + (by convert rep2; grind)] else - [nextNext g h + [nextNext (Δ := (Δ \ {Sum.inl (φ1 & φ2)}) ∪ {Sum.inl φ1}) g h (by convert rep1; grind) (by subst g_def; simp [RuleApp.splitSequents, builderRuleApp]), - nextNext g h + nextNext (Δ := (Δ \ {Sum.inl (φ1 & φ2)}) ∪ {Sum.inl φ2}) g h (by convert rep2; grind) (by subst g_def; simp [RuleApp.splitSequents, builderRuleApp])] | RuleApp.andᵣ Δ φ1 φ2 φ_in => if rep1 : (Δ \ {Sum.inr (φ1 & φ2)}) ∪ {Sum.inr φ1} ∈ Γs then if rep2 : (Δ \ {Sum.inr (φ1 & φ2)}) ∪ {Sum.inr φ2} ∈ Γs - then [repNext Γ g (by convert rep1; grind), repNext Γ g (by convert rep2; grind)] + then [repNext (Δ := (Δ \ {Sum.inr (φ1 & φ2)}) ∪ {Sum.inr φ1}) Γ g + (by convert rep1; grind), + repNext (Δ := (Δ \ {Sum.inr (φ1 & φ2)}) ∪ {Sum.inr φ2}) Γ g + (by convert rep2; grind)] else - [repNext Γ g (by convert rep1; grind), - nextNext g h + [repNext (Δ := (Δ \ {Sum.inr (φ1 & φ2)}) ∪ {Sum.inr φ1}) Γ g + (by convert rep1; grind), + nextNext (Δ := (Δ \ {Sum.inr (φ1 & φ2)}) ∪ {Sum.inr φ2}) g h (by convert rep2; grind) (by subst g_def; simp [RuleApp.splitSequents, builderRuleApp])] else if rep2 : (Δ \ {Sum.inr (φ1 & φ2)}) ∪ {Sum.inr φ2} ∈ Γs then - [nextNext g h + [nextNext (Δ := (Δ \ {Sum.inr (φ1 & φ2)}) ∪ {Sum.inr φ1}) g h (by convert rep1; grind) (by subst g_def; simp [RuleApp.splitSequents, builderRuleApp]), - repNext Γ g (by convert rep2; grind)] + repNext (Δ := (Δ \ {Sum.inr (φ1 & φ2)}) ∪ {Sum.inr φ2}) Γ g + (by convert rep2; grind)] else - [nextNext g h + [nextNext (Δ := (Δ \ {Sum.inr (φ1 & φ2)}) ∪ {Sum.inr φ1}) g h (by convert rep1; grind) (by subst g_def; simp [RuleApp.splitSequents, builderRuleApp]), - nextNext g h + nextNext (Δ := (Δ \ {Sum.inr (φ1 & φ2)}) ∪ {Sum.inr φ2}) g h (by convert rep2; grind) (by subst g_def; simp [RuleApp.splitSequents, builderRuleApp])] | RuleApp.boxₗ Δ φ φ_in => if rep : (Δ \ {Sum.inl (□φ)}).D ∪ {Sum.inl φ} ∈ Γs - then [repNext Γ g (by convert rep; grind)] + then [repNext (Δ := (Δ \ {Sum.inl (□φ)}).D ∪ {Sum.inl φ}) Γ g (by convert rep; grind)] else - [nextNext g h + [nextNext (Δ := (Δ \ {Sum.inl (□φ)}).D ∪ {Sum.inl φ}) g h (by convert rep; grind) (by subst g_def; simp [RuleApp.splitSequents, builderRuleApp])] | RuleApp.boxᵣ Δ φ φ_in => if rep : (Δ \ {Sum.inr (□φ)}).D ∪ {Sum.inr φ} ∈ Γs - then [repNext Γ g (by convert rep; grind)] + then [repNext (Δ := (Δ \ {Sum.inr (□φ)}).D ∪ {Sum.inr φ}) Γ g (by convert rep; grind)] else - [nextNext g h + [nextNext (Δ := (Δ \ {Sum.inr (□φ)}).D ∪ {Sum.inr φ}) g h (by convert rep; grind) (by subst g_def; simp [RuleApp.splitSequents, builderRuleApp])] diff --git a/LeanPool/Lean4GlCoalgebras/Split/CutProof.lean b/LeanPool/Lean4GlCoalgebras/Split/CutProof.lean index 740029d862..f7ead45bac 100644 --- a/LeanPool/Lean4GlCoalgebras/Split/CutProof.lean +++ b/LeanPool/Lean4GlCoalgebras/Split/CutProof.lean @@ -3,20 +3,15 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import LeanPool.Lean4GlCoalgebras.Logic.Syntax -import Mathlib.Data.Set.Defs -import Mathlib.CategoryTheory.Limits.Shapes.IsTerminal -import Mathlib.CategoryTheory.Functor.EpiMono -import Mathlib.CategoryTheory.Functor.Const -import Mathlib.Data.Finset.Powerset -import Mathlib.Data.Fintype.Defs -import Mathlib.CategoryTheory.Endofunctor.Algebra -import Mathlib.Data.Finset.Basic -import Mathlib.Data.Nat.Basic -import Aesop -import Mathlib.Data.Setoid.Partition -import Mathlib.Data.Finset.Lattice.Basic +public import LeanPool.Lean4GlCoalgebras.Logic.Syntax +public import Mathlib.CategoryTheory.Types.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! ## Defining GL-ext+skip proof systems. @@ -24,6 +19,8 @@ Here we define the GL-ext proof system along with finitization and basic propert namespace ExtSkip to distinguish from our general GL-proofs. -/ +@[expose] public section + namespace Lean4GlCoalgebras namespace ExtSkip diff --git a/LeanPool/Lean4GlCoalgebras/Split/Game.lean b/LeanPool/Lean4GlCoalgebras/Split/Game.lean index 3f6720a987..47e8791b89 100644 --- a/LeanPool/Lean4GlCoalgebras/Split/Game.lean +++ b/LeanPool/Lean4GlCoalgebras/Split/Game.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import LeanPool.Lean4GlCoalgebras.Pdl.Game -import LeanPool.Lean4GlCoalgebras.Split.Proof +public import LeanPool.Lean4GlCoalgebras.Pdl.Game +public import LeanPool.Lean4GlCoalgebras.Split.Proof +public import Mathlib.Data.Finset.Powerset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.Set.Finite.Basic +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! ## The GL-split game. @@ -14,6 +22,8 @@ plays an applicable sequent `Γ` in order to construct a counter-model. Prover g and plays rule applications `R` in order to construct a proof. -/ +@[expose] public section + namespace Lean4GlCoalgebras namespace Split diff --git a/LeanPool/Lean4GlCoalgebras/Split/Proof.lean b/LeanPool/Lean4GlCoalgebras/Split/Proof.lean index 23cba45fef..02d0debb93 100644 --- a/LeanPool/Lean4GlCoalgebras/Split/Proof.lean +++ b/LeanPool/Lean4GlCoalgebras/Split/Proof.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import Mathlib.Data.List.Chain +public import LeanPool.Lean4GlCoalgebras.Logic.Syntax +public import Mathlib.CategoryTheory.Endofunctor.Algebra +import Mathlib.Algebra.BigOperators.Group.Finset.Basic +import Mathlib.Data.Finset.Powerset +import Mathlib.Data.Rat.Cast.Order import Mathlib.Data.Set.Finite.Basic import Mathlib.Data.Setoid.Basic -import LeanPool.Lean4GlCoalgebras.Logic.Syntax +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! ## Defining GL-split proof systems. @@ -15,6 +23,8 @@ Here we define the GL-split-proof system along with finitization and basic prope namespace Split to distinguish from our general GL-proofs. -/ +@[expose] public section + namespace Lean4GlCoalgebras namespace Split diff --git a/LeanPool/Lean4GlCoalgebras/Split/ProofTransformations.lean b/LeanPool/Lean4GlCoalgebras/Split/ProofTransformations.lean index 97d1af48a7..12e1f20035 100644 --- a/LeanPool/Lean4GlCoalgebras/Split/ProofTransformations.lean +++ b/LeanPool/Lean4GlCoalgebras/Split/ProofTransformations.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ - -import Mathlib.Data.Fintype.Defs -import Mathlib.Data.Sigma.Lex -import LeanPool.Lean4GlCoalgebras.Split.Proof -import LeanPool.Lean4GlCoalgebras.Split.CutProof +module + +public import Mathlib.Data.Sigma.Lex +public import LeanPool.Lean4GlCoalgebras.Split.Proof +public import LeanPool.Lean4GlCoalgebras.Split.CutProof +import Mathlib.Data.Fintype.EquivFin +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! ## Defining GL-ext+pre proof system. @@ -15,6 +21,8 @@ Here we define the GL-ext+pre system. This system is different from the paper, w how we connect non-axiomatic leaf nodes into `RuleApp` directly. -/ +@[expose] public section + namespace Lean4GlCoalgebras namespace Ext @@ -876,6 +884,15 @@ noncomputable def proofTransformation {𝕏 : Proof} {σ} ExtSkip.Proof := { X := (y : 𝕏.X) × (partialProof y).X α := proofTransformationMap partialProof - step := proofTransformation_step partialProof root_prop - path := proofTransformation_path partialProof box_prop } + step := by exact proofTransformation_step partialProof root_prop + path := by exact proofTransformation_path partialProof box_prop } + +/-- A relation that strictly increases a finite preorder has no infinite paths. -/ +theorem noInfinitePathOfIncreasing {α : Type*} [Preorder α] [Finite α] + {relation : α → α → Prop} {f : ℕ → α} + (path : ∀ k, relation (f k) (f (k + 1))) + (increasing : ∀ i j, relation i j → i < j) : False := + not_injective_infinite_finite f + (strictMono_nat_of_lt_succ fun k => increasing _ _ (path k)).injective + end Lean4GlCoalgebras diff --git a/LeanPool/Lean4GlCoalgebras/Split/Soundness.lean b/LeanPool/Lean4GlCoalgebras/Split/Soundness.lean index f201ddf7d1..37b9f00f71 100644 --- a/LeanPool/Lean4GlCoalgebras/Split/Soundness.lean +++ b/LeanPool/Lean4GlCoalgebras/Split/Soundness.lean @@ -3,17 +3,21 @@ Copyright (c) 2026 Madeleine Gignoux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Madeleine Gignoux -/ +module -import Mathlib.Data.Finset.Basic -import Mathlib.Order.CompleteLattice.Basic -import Mathlib.Order.FixedPoints -import Mathlib.Data.Set.Lattice.Indexed -import LeanPool.Lean4GlCoalgebras.Logic.Semantics -import LeanPool.Lean4GlCoalgebras.Split.Proof -import LeanPool.Lean4GlCoalgebras.Split.CutProof +public import LeanPool.Lean4GlCoalgebras.Logic.Semantics +public import LeanPool.Lean4GlCoalgebras.Split.Proof +public import LeanPool.Lean4GlCoalgebras.Split.CutProof +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! ## Soundness of GL-split proof system. -/ +@[expose] public section + namespace Lean4GlCoalgebras namespace ExtSkip diff --git a/LeanPool/Lean4Itree.lean b/LeanPool/Lean4Itree.lean index 03a4f1d4d7..34f9cbcc7c 100644 --- a/LeanPool/Lean4Itree.lean +++ b/LeanPool/Lean4Itree.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Paul Mure, Joonhyup Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Mure, Joonhyup Lee -/ +module -import LeanPool.Lean4Itree.ITree -import LeanPool.Lean4Itree.Paco +public import LeanPool.Lean4Itree.ITree +public import LeanPool.Lean4Itree.Paco /-! # Coinductive Interaction Trees using QPFs @@ -17,3 +18,5 @@ Main declarations: `Lean4Itree.ITree`, `Lean4Itree.ITree.ieq_iff_eq`, `Lean4Itre Tags: coinduction, interaction-trees, monads, qpf, semantics MSC: 68Q55, 18C50, 68N18 -/ + +@[expose] public section diff --git a/LeanPool/Lean4Itree/ITree.lean b/LeanPool/Lean4Itree/ITree.lean index 3f44b1a175..cdd486f776 100644 --- a/LeanPool/Lean4Itree/ITree.lean +++ b/LeanPool/Lean4Itree/ITree.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Paul Mure, Joonhyup Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Mure, Joonhyup Lee -/ -import LeanPool.Lean4Itree.ITree.Basic -import LeanPool.Lean4Itree.ITree.EffectAlgebra -import LeanPool.Lean4Itree.ITree.Monad -import LeanPool.Lean4Itree.ITree.Utils +module + +public import LeanPool.Lean4Itree.ITree.Basic +public import LeanPool.Lean4Itree.ITree.EffectAlgebra +public import LeanPool.Lean4Itree.ITree.Monad +public import LeanPool.Lean4Itree.ITree.Utils /-! # Interaction trees @@ -16,3 +18,5 @@ coinductive definition and bisimulation (`Basic`), supporting utilities (`Utils`), the monad structure (`Monad`), and the effect algebra and interpretation combinators (`EffectAlgebra`). -/ + +@[expose] public section diff --git a/LeanPool/Lean4Itree/ITree/Basic.lean b/LeanPool/Lean4Itree/ITree/Basic.lean index 286826f1fe..eaa7c1baa5 100644 --- a/LeanPool/Lean4Itree/ITree/Basic.lean +++ b/LeanPool/Lean4Itree/ITree/Basic.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Paul Mure, Joonhyup Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Mure, Joonhyup Lee -/ -import Mathlib.Data.QPF.Univariate.Basic -import Mathlib.Data.Vector3 -import LeanPool.Lean4Itree.ITree.Utils +module + +public import LeanPool.Lean4Itree.ITree.Utils /-! # Coinductive interaction trees @@ -17,6 +17,8 @@ injectivity lemmas for the constructors, and the bisimulation equality `IEq` that is proven to coincide with propositional equality (`ieq_iff_eq`). -/ +@[expose] public section + namespace Lean4Itree /-- The node shapes of an interaction tree: a returned value, a silent `tau` diff --git a/LeanPool/Lean4Itree/ITree/EffectAlgebra.lean b/LeanPool/Lean4Itree/ITree/EffectAlgebra.lean index 5c0f12b804..c053e2cf9d 100644 --- a/LeanPool/Lean4Itree/ITree/EffectAlgebra.lean +++ b/LeanPool/Lean4Itree/ITree/EffectAlgebra.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Paul Mure, Joonhyup Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Mure, Joonhyup Lee -/ -import LeanPool.Lean4Itree.ITree.Monad +module + +public import LeanPool.Lean4Itree.ITree.Basic /-! # Effect algebra for interaction trees @@ -15,6 +17,8 @@ and sum effects (`VoidE`, `SumE`), the `MonadIter` class of iterable monads, the against an effect handler into an arbitrary iterable monad. -/ +@[expose] public section + namespace Lean4Itree /-- A natural transformation between effect families: a uniform map `ε1 α → ε2 α`. -/ diff --git a/LeanPool/Lean4Itree/ITree/Monad.lean b/LeanPool/Lean4Itree/ITree/Monad.lean index fcfd4500b6..26d8125b84 100644 --- a/LeanPool/Lean4Itree/ITree/Monad.lean +++ b/LeanPool/Lean4Itree/ITree/Monad.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Paul Mure, Joonhyup Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Mure, Joonhyup Lee -/ -import LeanPool.Lean4Itree.ITree.Basic +module + +public import LeanPool.Lean4Itree.ITree.Basic import LeanPool.Lean4Itree.Paco.PacoDefs import LeanPool.Lean4Itree.Paco.PacoTactics +import Std.Tactic.BVDecide.Normalize.Prop /-! # Monad structure on interaction trees @@ -15,6 +18,8 @@ This module equips `ITree` with its functor and monad operations (`map`, `bind`, `bind_assoc`, using the parameterized-coinduction (Paco) tactics. -/ +@[expose] public section + namespace Lean4Itree namespace ITree diff --git a/LeanPool/Lean4Itree/ITree/Utils.lean b/LeanPool/Lean4Itree/ITree/Utils.lean index 95e57b85bd..d43c9f0c68 100644 --- a/LeanPool/Lean4Itree/ITree/Utils.lean +++ b/LeanPool/Lean4Itree/ITree/Utils.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Paul Mure, Joonhyup Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Mure, Joonhyup Lee -/ -import Mathlib.Data.QPF.Univariate.Basic -import Mathlib.Data.Vector3 +module + +public import Mathlib.Data.Vector3 +public import Mathlib.Data.PFunctor.Univariate.M /-! # ----------------------------------------------------------------------- -/ + +@[expose] public section /-! # --------------------Start Vector3 Utilities---------------------------- -/ /-! # ----------------------------------------------------------------------- -/ diff --git a/LeanPool/Lean4Itree/Paco.lean b/LeanPool/Lean4Itree/Paco.lean index fa9760c03c..cb883aac09 100644 --- a/LeanPool/Lean4Itree/Paco.lean +++ b/LeanPool/Lean4Itree/Paco.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Paul Mure, Joonhyup Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Mure, Joonhyup Lee -/ -import LeanPool.Lean4Itree.Paco.Paco -import LeanPool.Lean4Itree.Paco.PacoDefs -import LeanPool.Lean4Itree.Paco.PacoTactics +module + +public import LeanPool.Lean4Itree.Paco.Paco +public import LeanPool.Lean4Itree.Paco.PacoDefs +public import LeanPool.Lean4Itree.Paco.PacoTactics /-! # Parameterized coinduction (Paco) @@ -15,3 +17,5 @@ the parameterized least fixed point `plfp` and its accumulation principle `plfp_acc` together with the supporting tactics (`PacoTactics`) and notations (`Paco`). -/ + +@[expose] public section diff --git a/LeanPool/Lean4Itree/Paco/Paco.lean b/LeanPool/Lean4Itree/Paco/Paco.lean index 22693964cf..98aca39e50 100644 --- a/LeanPool/Lean4Itree/Paco/Paco.lean +++ b/LeanPool/Lean4Itree/Paco/Paco.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Paul Mure, Joonhyup Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Mure, Joonhyup Lee -/ -import LeanPool.Lean4Itree.Paco.PacoDefs +module + +public import LeanPool.Lean4Itree.Paco.PacoDefs + /-! # Paco notations @@ -14,3 +17,5 @@ development are declared there with a `ₚ` suffix to avoid clashing with the `Lean.Order` complete-lattice notations (`⊤`, `⊓`) that Lean core now brings into scope. -/ + +@[expose] public section diff --git a/LeanPool/Lean4Itree/Paco/PacoDefs.lean b/LeanPool/Lean4Itree/Paco/PacoDefs.lean index 7037c1cea4..090a28170e 100644 --- a/LeanPool/Lean4Itree/Paco/PacoDefs.lean +++ b/LeanPool/Lean4Itree/Paco/PacoDefs.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Paul Mure, Joonhyup Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Mure, Joonhyup Lee -/ -import Lean.Meta -import Lean.Elab +module + +import all Init.Internal.Order.Basic +import Std.Data.DTreeMap.Internal.Balancing +import Std.Tactic.BVDecide.Normalize.Prop + +@[expose] public section namespace Lean.Order.CompleteLattice diff --git a/LeanPool/Lean4Itree/Paco/PacoTactics.lean b/LeanPool/Lean4Itree/Paco/PacoTactics.lean index 838b09ba29..e85c35374e 100644 --- a/LeanPool/Lean4Itree/Paco/PacoTactics.lean +++ b/LeanPool/Lean4Itree/Paco/PacoTactics.lean @@ -3,8 +3,20 @@ Copyright (c) 2026 Paul Mure, Joonhyup Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Mure, Joonhyup Lee -/ -import Lean.Meta -import Lean.Elab +module + +public meta import Lean.Meta.ArgsPacker + +public meta import Lean.Meta.Tactic.Cleanup + + +public meta import Lean.Meta.Tactic.Delta + +public meta import Lean.Elab.Tactic.Basic +public meta import Lean.Meta.Tactic.Apply +import Lean.Exception +import Lean.Meta.ArgsPacker.Basic +public meta import Lean.Meta.Tactic.Rewrite import LeanPool.Lean4Itree.Paco.PacoDefs /-! @@ -16,6 +28,8 @@ The elaborators, macros and syntax that drive parameterized-coinduction proofs point `plfp` and its accumulation principle `plfp_acc` from `PacoDefs`. -/ +public meta section + namespace Lean4Itree -- tactics diff --git a/LeanPool/LeanBooleanfun.lean b/LeanPool/LeanBooleanfun.lean index 9448e2284b..942478f678 100644 --- a/LeanPool/LeanBooleanfun.lean +++ b/LeanPool/LeanBooleanfun.lean @@ -3,12 +3,13 @@ Copyright (c) 2024 Joris Roos. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joris Roos -/ +module -import LeanPool.LeanBooleanfun.AuxLemmas -import LeanPool.LeanBooleanfun.ToMathlib -import LeanPool.LeanBooleanfun.Basic -import LeanPool.LeanBooleanfun.BooleanValued -import LeanPool.LeanBooleanfun.Arrow +public import LeanPool.LeanBooleanfun.AuxLemmas +public import LeanPool.LeanBooleanfun.ToMathlib +public import LeanPool.LeanBooleanfun.Basic +public import LeanPool.LeanBooleanfun.BooleanValued +public import LeanPool.LeanBooleanfun.Arrow /-! # Analysis of Boolean functions in Lean @@ -21,6 +22,8 @@ Tags: boolean-functions, fourier-analysis, social-choice MSC: 06E30, 42C10, 91B14 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/LeanBooleanfun/Arrow.lean b/LeanPool/LeanBooleanfun/Arrow.lean index c9f1975b4a..d0ab8de04e 100644 --- a/LeanPool/LeanBooleanfun/Arrow.lean +++ b/LeanPool/LeanBooleanfun/Arrow.lean @@ -3,7 +3,9 @@ Copyright (c) 2024 Joris Roos. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joris Roos -/ -import LeanPool.LeanBooleanfun.BooleanValued +module + +public import LeanPool.LeanBooleanfun.BooleanValued import LeanPool.LeanBooleanfun.ToMathlib.Finset /-! @@ -28,6 +30,8 @@ This is mainly facilitated by introducing an auxiliary linear operator, see `_Tn * [R. O'Donnell, *Analysis of Boolean functions*][odonnell2014] -/ +@[expose] public section + noncomputable section namespace LeanPool.LeanBooleanfun.BooleanFun.BV @@ -151,7 +155,7 @@ lemma probabilityCondorcetWinner_eq_one (hc : IsCondorcet f) : simp /-- Auxiliary linear operator -/ -private abbrev _Tnae3 : BooleanFunc n →ₗ[ℝ] BooleanFunc n where +abbrev _Tnae3 : BooleanFunc n →ₗ[ℝ] BooleanFunc n where toFun := fun f ↦ fun x ↦ (1/3)^n * ∑ y, f y * ∑ z : Fin n → Fin 2, oneOn (VoteConsistent x y z) map_add' := by diff --git a/LeanPool/LeanBooleanfun/AuxLemmas.lean b/LeanPool/LeanBooleanfun/AuxLemmas.lean index 3f05644e22..6188e13103 100644 --- a/LeanPool/LeanBooleanfun/AuxLemmas.lean +++ b/LeanPool/LeanBooleanfun/AuxLemmas.lean @@ -3,13 +3,19 @@ Copyright (c) 2024 Joris Roos. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joris Roos -/ +module + +public import Mathlib.Basic.Real.Basic +public import Mathlib.Data.Fintype.Powerset +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Algebra.BigOperators.Finprod -import Mathlib.Basic.Real.Basic + /-! General lemmas not specific to analysis of Boolean functions. -/ +@[expose] public section + namespace LeanPool.LeanBooleanfun.BooleanFun open Finset Pi diff --git a/LeanPool/LeanBooleanfun/Basic.lean b/LeanPool/LeanBooleanfun/Basic.lean index 2ad8f470d5..663d8699f1 100644 --- a/LeanPool/LeanBooleanfun/Basic.lean +++ b/LeanPool/LeanBooleanfun/Basic.lean @@ -3,10 +3,10 @@ Copyright (c) 2024 Joris Roos. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joris Roos -/ -import LeanPool.LeanBooleanfun.AuxLemmas -import LeanPool.LeanBooleanfun.ToMathlib.Finset -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Algebra.CharP.Pi +module + +public import LeanPool.LeanBooleanfun.AuxLemmas +public import Mathlib.Analysis.InnerProductSpace.PiL2 /-! # Analysis on Boolean functions @@ -43,6 +43,8 @@ conventions in the context of Boolean functions, and the simplicity of working w * `⋆` denotes convolution -/ +@[expose] public section + namespace LeanPool.LeanBooleanfun.BooleanFun open Real BigOperators Function Finset Pi Module diff --git a/LeanPool/LeanBooleanfun/BooleanValued.lean b/LeanPool/LeanBooleanfun/BooleanValued.lean index 8e30bc4840..4fb8d2e6f0 100644 --- a/LeanPool/LeanBooleanfun/BooleanValued.lean +++ b/LeanPool/LeanBooleanfun/BooleanValued.lean @@ -3,7 +3,9 @@ Copyright (c) 2024 Joris Roos. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joris Roos -/ -import LeanPool.LeanBooleanfun.Basic +module + +public import LeanPool.LeanBooleanfun.Basic /-! # Boolean valued functions @@ -17,6 +19,8 @@ and proves some basic properties specific to Boolean-valued functions. * `almost_character` -- a theorem on BLR linearity testing -/ +@[expose] public section + noncomputable section namespace LeanPool.LeanBooleanfun.BooleanFun diff --git a/LeanPool/LeanBooleanfun/ToMathlib.lean b/LeanPool/LeanBooleanfun/ToMathlib.lean index 89410954e5..e78b4c7ae1 100644 --- a/LeanPool/LeanBooleanfun/ToMathlib.lean +++ b/LeanPool/LeanBooleanfun/ToMathlib.lean @@ -3,7 +3,10 @@ Copyright (c) 2024 Joris Roos. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joris Roos -/ -import LeanPool.LeanBooleanfun.ToMathlib.Finset +module + +public import LeanPool.LeanBooleanfun.ToMathlib.Finset +import Mathlib.Tactic.Bound.Init /-! # Auxiliary lemmas suitable for upstream @@ -11,3 +14,5 @@ import LeanPool.LeanBooleanfun.ToMathlib.Finset This index aggregates small auxiliary results that are not specific to Boolean functions and could plausibly live in Mathlib. -/ + +@[expose] public section diff --git a/LeanPool/LeanBooleanfun/ToMathlib/Finset.lean b/LeanPool/LeanBooleanfun/ToMathlib/Finset.lean index eae017ffa7..7a7f35200e 100644 --- a/LeanPool/LeanBooleanfun/ToMathlib/Finset.lean +++ b/LeanPool/LeanBooleanfun/ToMathlib/Finset.lean @@ -3,7 +3,10 @@ Copyright (c) 2024 Joris Roos. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joris Roos -/ -import Mathlib.Algebra.Order.BigOperators.Group.Finset +module + +public import Mathlib.Data.Finset.BooleanAlgebra +import Mathlib.Tactic.Bound.Init /-! # Auxiliary `Finset` lemmas @@ -11,6 +14,8 @@ import Mathlib.Algebra.Order.BigOperators.Group.Finset Small helper lemmas about `Finset` that are not specific to Boolean functions. -/ +@[expose] public section + namespace Finset variable {α : Type*} diff --git a/LeanPool/LeanComplexAnalysis.lean b/LeanPool/LeanComplexAnalysis.lean index eee2ab3008..c9dd064fad 100644 --- a/LeanPool/LeanComplexAnalysis.lean +++ b/LeanPool/LeanComplexAnalysis.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 seb488, Aristotle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: seb488, Aristotle -/ +module -import LeanPool.LeanComplexAnalysis.Harmonic -import LeanPool.LeanComplexAnalysis.UnivalentFunctions +public import LeanPool.LeanComplexAnalysis.Harmonic +public import LeanPool.LeanComplexAnalysis.UnivalentFunctions +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Formalized Complex Analysis in Lean @@ -18,6 +22,8 @@ Tags: complex-analysis, harmonic-functions, poisson-integral, univalent-function MSC: 30A99, 31A05, 30C55 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/LeanComplexAnalysis/Harmonic.lean b/LeanPool/LeanComplexAnalysis/Harmonic.lean index 42e871b25f..4b638beff1 100644 --- a/LeanPool/LeanComplexAnalysis/Harmonic.lean +++ b/LeanPool/LeanComplexAnalysis/Harmonic.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 seb488, Aristotle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: seb488, Aristotle -/ -import LeanPool.LeanComplexAnalysis.Harmonic.PoissonIntegral -import LeanPool.LeanComplexAnalysis.Harmonic.PoissonIntegral2 -import LeanPool.LeanComplexAnalysis.Harmonic.PoissonIntegralCircleAverage -import LeanPool.LeanComplexAnalysis.Harmonic.Positive +module + +public import LeanPool.LeanComplexAnalysis.Harmonic.PoissonIntegral +public import LeanPool.LeanComplexAnalysis.Harmonic.PoissonIntegral2 +public import LeanPool.LeanComplexAnalysis.Harmonic.PoissonIntegralCircleAverage +public import LeanPool.LeanComplexAnalysis.Harmonic.Positive +import Mathlib.Analysis.SpecialFunctions.Bernstein /-! # Index: harmonic functions @@ -15,3 +18,5 @@ This directory contains formalized results on harmonic functions in the complex including Poisson integral formulas on the unit disc and arbitrary centered discs, plus results about positive harmonic functions on the unit disc. -/ + +@[expose] public section diff --git a/LeanPool/LeanComplexAnalysis/Harmonic/PoissonIntegral.lean b/LeanPool/LeanComplexAnalysis/Harmonic/PoissonIntegral.lean index 81762b1aa2..7328a40da3 100644 --- a/LeanPool/LeanComplexAnalysis/Harmonic/PoissonIntegral.lean +++ b/LeanPool/LeanComplexAnalysis/Harmonic/PoissonIntegral.lean @@ -3,6 +3,11 @@ Copyright (c) 2026 seb488, Aristotle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: seb488, Aristotle -/ +module + +public import Mathlib.Analysis.InnerProductSpace.Harmonic.Basic +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional +public import Mathlib.MeasureTheory.Integral.CircleIntegral import Mathlib.Analysis.Complex.Harmonic.Analytic /-! @@ -47,6 +52,8 @@ The proof follows from the harmonic function, Poisson integral, analytic function, unit disc -/ +@[expose] public section + namespace LeanPool.LeanComplexAnalysis open Complex Metric Real Set diff --git a/LeanPool/LeanComplexAnalysis/Harmonic/PoissonIntegral2.lean b/LeanPool/LeanComplexAnalysis/Harmonic/PoissonIntegral2.lean index 0b49171841..8dcd485bcd 100644 --- a/LeanPool/LeanComplexAnalysis/Harmonic/PoissonIntegral2.lean +++ b/LeanPool/LeanComplexAnalysis/Harmonic/PoissonIntegral2.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 seb488, Aristotle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: seb488, Aristotle -/ +module + +public import Mathlib.MeasureTheory.Integral.CircleAverage +public import Mathlib.Analysis.Calculus.DiffContOnCl +public import Mathlib.Analysis.InnerProductSpace.Harmonic.Basic +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional import LeanPool.LeanComplexAnalysis.Harmonic.PoissonIntegral -import Mathlib.MeasureTheory.Integral.CircleAverage +import Mathlib.Analysis.Complex.Harmonic.Analytic /-! # The Poisson Integral Formula on Disc @@ -47,6 +53,8 @@ The proof follows from ℂ-differentiable function, harmonic function, Poisson integral. -/ +@[expose] public section + open Complex Metric Real Set namespace LeanPool.LeanComplexAnalysis diff --git a/LeanPool/LeanComplexAnalysis/Harmonic/PoissonIntegralCircleAverage.lean b/LeanPool/LeanComplexAnalysis/Harmonic/PoissonIntegralCircleAverage.lean index 6d7f80637c..27d872b0e7 100644 --- a/LeanPool/LeanComplexAnalysis/Harmonic/PoissonIntegralCircleAverage.lean +++ b/LeanPool/LeanComplexAnalysis/Harmonic/PoissonIntegralCircleAverage.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 seb488, Aristotle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: seb488, Aristotle -/ -import LeanPool.LeanComplexAnalysis.Harmonic.PoissonIntegral2 +module + +public import LeanPool.LeanComplexAnalysis.Harmonic.PoissonIntegral2 + +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Circle-average Poisson integral formulas @@ -12,3 +17,5 @@ The upstream `ComplexAnalysis/Harmonic/PoissonIntegral_circleAverage.lean` file circle-average versions of the scaled-disc Poisson integral formulas. In this Lean Pool port, those declarations are provided by `LeanPool.LeanComplexAnalysis.Harmonic.PoissonIntegral2`. -/ + +@[expose] public section diff --git a/LeanPool/LeanComplexAnalysis/Harmonic/Positive.lean b/LeanPool/LeanComplexAnalysis/Harmonic/Positive.lean index dc0c9a9029..6545c89c54 100644 --- a/LeanPool/LeanComplexAnalysis/Harmonic/Positive.lean +++ b/LeanPool/LeanComplexAnalysis/Harmonic/Positive.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 seb488, Aristotle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: seb488, Aristotle -/ -import LeanPool.LeanComplexAnalysis.Harmonic.Positive.HarnackIneq -import LeanPool.LeanComplexAnalysis.Harmonic.Positive.HerglotzRieszRepresentations -import LeanPool.LeanComplexAnalysis.Harmonic.Positive.HerglotzRieszUnique +module + +public import LeanPool.LeanComplexAnalysis.Harmonic.Positive.HarnackIneq +public import LeanPool.LeanComplexAnalysis.Harmonic.Positive.HerglotzRieszRepresentations +public import LeanPool.LeanComplexAnalysis.Harmonic.Positive.HerglotzRieszUnique +import Mathlib.Analysis.SpecialFunctions.Bernstein /-! # Index: positive harmonic functions on the unit disc @@ -14,3 +17,5 @@ This directory contains results about positive harmonic functions on the unit di including Harnack's inequality and the Herglotz–Riesz representation theorem (existence and uniqueness). -/ + +@[expose] public section diff --git a/LeanPool/LeanComplexAnalysis/Harmonic/Positive/HarnackIneq.lean b/LeanPool/LeanComplexAnalysis/Harmonic/Positive/HarnackIneq.lean index dca3057f26..eb7bfed1ab 100644 --- a/LeanPool/LeanComplexAnalysis/Harmonic/Positive/HarnackIneq.lean +++ b/LeanPool/LeanComplexAnalysis/Harmonic/Positive/HarnackIneq.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 seb488, Aristotle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: seb488, Aristotle -/ -import Mathlib.Analysis.InnerProductSpace.Harmonic.Constructions +module + +public import Mathlib.Analysis.InnerProductSpace.Harmonic.Basic +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional import LeanPool.LeanComplexAnalysis.Harmonic.PoissonIntegral +import Mathlib.Analysis.Complex.Harmonic.Analytic +import Mathlib.Analysis.InnerProductSpace.Harmonic.Constructions /-! # Harnack's inequality @@ -18,6 +23,8 @@ A positive harmonic function `u` on the unit disc satisfies the inequalities for all `z` in the unit disc. -/ +@[expose] public section + namespace LeanPool.LeanComplexAnalysis open Complex InnerProductSpace Metric Set Real diff --git a/LeanPool/LeanComplexAnalysis/Harmonic/Positive/HerglotzRieszRepresentations.lean b/LeanPool/LeanComplexAnalysis/Harmonic/Positive/HerglotzRieszRepresentations.lean index 02760c340c..9d3fef8852 100644 --- a/LeanPool/LeanComplexAnalysis/Harmonic/Positive/HerglotzRieszRepresentations.lean +++ b/LeanPool/LeanComplexAnalysis/Harmonic/Positive/HerglotzRieszRepresentations.lean @@ -3,25 +3,23 @@ Copyright (c) 2026 seb488, Aristotle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: seb488, Aristotle -/ +module + +public import Mathlib.Analysis.InnerProductSpace.Harmonic.Basic +public import Mathlib.Analysis.Normed.Module.WeakDual +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import Mathlib.Analysis.SpecialFunctions.Complex.CircleMap +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +public import Mathlib.Topology.ContinuousMap.Ordered +import LeanPool.LeanComplexAnalysis.Harmonic.PoissonIntegral +import LeanPool.LeanComplexAnalysis.Harmonic.Positive.HerglotzRieszUnique import Mathlib.Analysis.Complex.Harmonic.Analytic -import Mathlib.Analysis.InnerProductSpace.Harmonic.Basic import Mathlib.Analysis.InnerProductSpace.Harmonic.Constructions -import Mathlib.Analysis.Normed.Module.WeakDual -import Mathlib.MeasureTheory.Measure.Support +import Mathlib.Analysis.SpecialFunctions.Bernstein import Mathlib.MeasureTheory.Integral.RieszMarkovKakutani.Real -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.Topology.ContinuousMap.SecondCountableSpace -import Mathlib.Topology.ContinuousMap.CompactlySupported -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.LinearCombination -import LeanPool.LeanComplexAnalysis.Harmonic.PoissonIntegral -import LeanPool.LeanComplexAnalysis.Harmonic.Positive.HerglotzRieszUnique +import Mathlib.MeasureTheory.Measure.Support +public import Mathlib.Topology.ContinuousMap.SecondCountableSpace /-! # The Herglotz–Riesz Representation Theorem @@ -73,6 +71,8 @@ Herglotz theorem, Herglotz–Riesz theorem, Poisson integral, positive harmonic positive real part, unit disc -/ +@[expose] public section + namespace LeanPool.LeanComplexAnalysis open Real Complex InnerProductSpace MeasureTheory Metric Set Topology diff --git a/LeanPool/LeanComplexAnalysis/Harmonic/Positive/HerglotzRieszUnique.lean b/LeanPool/LeanComplexAnalysis/Harmonic/Positive/HerglotzRieszUnique.lean index 9213a32c9c..f9c788f8a7 100644 --- a/LeanPool/LeanComplexAnalysis/Harmonic/Positive/HerglotzRieszUnique.lean +++ b/LeanPool/LeanComplexAnalysis/Harmonic/Positive/HerglotzRieszUnique.lean @@ -3,19 +3,13 @@ Copyright (c) 2026 seb488, Aristotle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: seb488, Aristotle -/ -import Mathlib.Analysis.Complex.Harmonic.Analytic -import Mathlib.Analysis.Normed.Group.FunctionSeries -import Mathlib.MeasureTheory.Measure.HasOuterApproxClosed -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +module + +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import Mathlib.Analysis.InnerProductSpace.Basic +import Mathlib.MeasureTheory.Integral.DominatedConvergence +import Mathlib.Topology.Algebra.Module.PerfectSpace import Mathlib.Topology.ContinuousMap.StoneWeierstrass -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.LinearCombination /-! # Uniqueness of the Herglotz–Riesz measure @@ -28,6 +22,8 @@ the two functions ∫ x, (x + z) / (x - z) ∂μ₁ and ∫ x, (x + z) / (x - z) identical on the unit disc, then `μ₁` = `μ₂`. -/ +@[expose] public section + namespace LeanPool.LeanComplexAnalysis open MeasureTheory Metric Complex Topology diff --git a/LeanPool/LeanComplexAnalysis/UnivalentFunctions.lean b/LeanPool/LeanComplexAnalysis/UnivalentFunctions.lean index c149e3dad7..8d9b96382b 100644 --- a/LeanPool/LeanComplexAnalysis/UnivalentFunctions.lean +++ b/LeanPool/LeanComplexAnalysis/UnivalentFunctions.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 seb488, Aristotle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: seb488, Aristotle -/ -import LeanPool.LeanComplexAnalysis.UnivalentFunctions.ClassS +module + +public import LeanPool.LeanComplexAnalysis.UnivalentFunctions.ClassS +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Index: univalent functions @@ -12,3 +16,5 @@ This directory contains formalized results on univalent (injective analytic) fun unit disc, including the classes `S` and `Σ`, the square-root transform of class-`S` functions, and the connection between them. -/ + +@[expose] public section diff --git a/LeanPool/LeanComplexAnalysis/UnivalentFunctions/ClassS.lean b/LeanPool/LeanComplexAnalysis/UnivalentFunctions/ClassS.lean index a0d0cb8260..353edf9122 100644 --- a/LeanPool/LeanComplexAnalysis/UnivalentFunctions/ClassS.lean +++ b/LeanPool/LeanComplexAnalysis/UnivalentFunctions/ClassS.lean @@ -3,16 +3,13 @@ Copyright (c) 2026 seb488, Aristotle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: seb488, Aristotle -/ -import Mathlib.Analysis.Analytic.Basic -import Mathlib.Analysis.Calculus.FDeriv.Defs -import Mathlib.Analysis.Calculus.DSlope -import Mathlib.Analysis.Complex.Basic -import Mathlib.Analysis.SpecialFunctions.Complex.Log -import Mathlib.Analysis.SpecialFunctions.ExpDeriv -import Mathlib.Analysis.SpecialFunctions.Integrals.Basic -import Mathlib.Analysis.Complex.CauchyIntegral +module + +public import Mathlib.Analysis.Calculus.DSlope +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import Mathlib.Analysis.Complex.RemovableSingularity -import Mathlib.Tactic.LinearCombination +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Univalent Function Classes: classS and classSigma @@ -28,6 +25,8 @@ univalent functions on the exterior of the closed unit disk with the expansion - If `f` is in `classS`, then `g(z) = 1/f(1/z)` is in `classSigma`; `inv_f_inv_in_Sigma`. -/ +@[expose] public section + namespace LeanPool.LeanComplexAnalysis open scoped BigOperators diff --git a/LeanPool/LeanModelChecking.lean b/LeanPool/LeanModelChecking.lean index dfd8f7b696..2eb56a08bc 100644 --- a/LeanPool/LeanModelChecking.lean +++ b/LeanPool/LeanModelChecking.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 György Kurucz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: György Kurucz -/ +module -import LeanPool.LeanModelChecking.LTLNBWResult -import LeanPool.LeanModelChecking.SafetyLivenessDecomposition +public import LeanPool.LeanModelChecking.LTLNBWResult +public import LeanPool.LeanModelChecking.SafetyLivenessDecomposition +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Formalizations of theorems related to model checking @@ -17,3 +25,5 @@ Main declarations: `LeanModelChecking.for_any_LTL_formula_exists_an_equivalent_N Tags: model-checking, linear-temporal-logic, buchi-automaton, safety-liveness, omega-automata MSC: 68Q60, 03B44, 68Q45 -/ + +@[expose] public section diff --git a/LeanPool/LeanModelChecking/ABW.lean b/LeanPool/LeanModelChecking/ABW.lean index e513c4265c..5a2977b8b6 100644 --- a/LeanPool/LeanModelChecking/ABW.lean +++ b/LeanPool/LeanModelChecking/ABW.lean @@ -3,6 +3,10 @@ Copyright (c) 2026 György Kurucz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: György Kurucz -/ +module + +public import Mathlib.Data.Nat.Notation +public import Mathlib.Data.Set.Operations import Mathlib.Data.Set.Basic /-! @@ -12,6 +16,8 @@ We define positive Boolean formulas (`PositiveBool`), alternating Büchi automat (`ABW`), their run DAGs (`RunDAG`), and the language they accept. -/ +@[expose] public section + namespace LeanModelChecking /-- A positive Boolean formula over a set of atoms `Q`: a formula built from diff --git a/LeanPool/LeanModelChecking/ABWNBW.lean b/LeanPool/LeanModelChecking/ABWNBW.lean index a4ccfce91f..b9dce935e8 100644 --- a/LeanPool/LeanModelChecking/ABWNBW.lean +++ b/LeanPool/LeanModelChecking/ABWNBW.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 György Kurucz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: György Kurucz -/ -import Mathlib.Data.Set.Operations -import Mathlib.Order.KonigLemma +module + -import LeanPool.LeanModelChecking.LTLNBWStatement -import LeanPool.LeanModelChecking.ABW +public import LeanPool.LeanModelChecking.LTLNBWStatement +public import LeanPool.LeanModelChecking.ABW +public import Mathlib.Order.ConditionallyCompleteLattice.Basic +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.Basic +import Mathlib.Order.KonigLemma /-! # From alternating to nondeterministic Büchi automata @@ -18,6 +22,8 @@ Miyano–Hayashi breakpoint construction (`ABW.toNBW`), and prove `ABW.toNBW.lang_eq`. -/ +@[expose] public section + namespace LeanModelChecking /-- The nondeterministic Büchi automaton obtained from an alternating one `A` by diff --git a/LeanPool/LeanModelChecking/LTLNBWResult.lean b/LeanPool/LeanModelChecking/LTLNBWResult.lean index 26aa6fbcc2..812297b702 100644 --- a/LeanPool/LeanModelChecking/LTLNBWResult.lean +++ b/LeanPool/LeanModelChecking/LTLNBWResult.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 György Kurucz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: György Kurucz -/ -import Mathlib.Basic.Finite.Prod -import Mathlib.Data.Fintype.Powerset +module -import LeanPool.LeanModelChecking.LTLNBWStatement -import LeanPool.LeanModelChecking.LTLNNF -import LeanPool.LeanModelChecking.NNFABW + +public import LeanPool.LeanModelChecking.LTLNBWStatement import LeanPool.LeanModelChecking.ABWNBW +import LeanPool.LeanModelChecking.NNFABW +import Mathlib.Basic.Finite.Prod +import Mathlib.Data.Fintype.Powerset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Every LTL formula has an equivalent finite-state Büchi automaton @@ -22,6 +28,8 @@ the (negation normal form of the) input formula, and the Miyano–Hayashi breakpoint construction squares that state space to pairs of subsets. -/ +@[expose] public section + namespace LeanModelChecking theorem for_any_LTL_formula_exists_an_equivalent_NBW : diff --git a/LeanPool/LeanModelChecking/LTLNBWStatement.lean b/LeanPool/LeanModelChecking/LTLNBWStatement.lean index b3b8c30ae8..f70a62f7a6 100644 --- a/LeanPool/LeanModelChecking/LTLNBWStatement.lean +++ b/LeanPool/LeanModelChecking/LTLNBWStatement.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 György Kurucz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: György Kurucz -/ -import Mathlib.Data.Set.Basic -import Mathlib.Basic.Finite.Defs +module + +public import Mathlib.Basic.Finite.Defs +public import Mathlib.Tactic.ToDual +import Mathlib.Tactic.Finiteness.Attr + /-! # Linear Temporal Logic and Büchi automata @@ -13,6 +17,8 @@ of nondeterministic Büchi automata (`NBW`), and state the theorem that every `LTL` formula has an equivalent finite-state `NBW`. -/ +@[expose] public section + namespace LeanModelChecking /-- A Linear Temporal Logic formula. -/ diff --git a/LeanPool/LeanModelChecking/LTLNNF.lean b/LeanPool/LeanModelChecking/LTLNNF.lean index e0407cd4c2..0485058568 100644 --- a/LeanPool/LeanModelChecking/LTLNNF.lean +++ b/LeanPool/LeanModelChecking/LTLNNF.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 György Kurucz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: György Kurucz -/ -import Mathlib.Data.Set.Basic -import Mathlib.Data.Set.Operations -import Mathlib.Data.Set.Insert -import Mathlib.Order.SetNotation +module -import LeanPool.LeanModelChecking.LTLNBWStatement + +public import LeanPool.LeanModelChecking.LTLNBWStatement +public import Aesop.BuiltinRules +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.Push /-! # Negation normal form for Linear Temporal Logic @@ -18,6 +19,8 @@ We define negation normal form (NNF) formulas, their language, and a translation `LTL.exists_equiv_nnf` shows every `LTL` formula has an equivalent NNF formula. -/ +@[expose] public section + namespace LeanModelChecking /-- Linear temporal logic formulas in negation normal form over atomic diff --git a/LeanPool/LeanModelChecking/NNFABW.lean b/LeanPool/LeanModelChecking/NNFABW.lean index 7e76ec8530..099637aea1 100644 --- a/LeanPool/LeanModelChecking/NNFABW.lean +++ b/LeanPool/LeanModelChecking/NNFABW.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 György Kurucz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: György Kurucz -/ -import Mathlib.Topology.Order.MonotoneConvergence -import Mathlib.Topology.Instances.Discrete +module -import LeanPool.LeanModelChecking.LTLNNF -import LeanPool.LeanModelChecking.ABW + +public import LeanPool.LeanModelChecking.LTLNNF +public import LeanPool.LeanModelChecking.ABW +public import Mathlib.Order.Lattice.Nat +public import Mathlib.Tactic.Continuity +import Mathlib.Topology.Instances.Discrete +import Mathlib.Topology.Order.MonotoneConvergence /-! # From NNF formulas to alternating Büchi automata @@ -16,6 +20,8 @@ We construct, for every negation normal form formula, an alternating Büchi automaton (`ABW`) accepting the same language, establishing `exists_ABW_lang_for_LTL`. -/ +@[expose] public section + namespace LeanModelChecking /-- The subtype `{ x // x ≤ v }` of elements bounded above by `v`. -/ @@ -591,73 +597,46 @@ lemma runDag_p_sat let (q, i) := v ∃ Y, PositiveBool.Sat Y (M.δ q (w i)) ∧ {(q, i)} ×ˢ Y ⊆ (dag leφ₁ leφ₂ M₁.q₀ M₂.q₀ M.q₀ G₁.toDAG G₂.toDAG).E := by - intros v hv - simp only [dag, base, Set.mem_union] at hv - rcases hv with (hv|hv)|hv - · simp only [Set.mem_singleton_iff] at hv; subst hv - obtain ⟨Y₁, p_sat₁, p_sub₁⟩ := G₁.p_sat (M₁.q₀, 0) G₁.p_root - obtain ⟨Y₂, p_sat₂, p_sub₂⟩ := G₂.p_sat (M₂.q₀, 0) G₂.p_root - exists (((Subtype.embedLe leφ₁) '' Y₁) ∪ ((Subtype.embedLe leφ₂) '' Y₂)) - constructor - · grind - · rw [Set.subset_def] - simp only [ - Set.prod_union, Set.mem_union, Set.mem_prod, Set.mem_singleton_iff, - Set.mem_image, Subtype.exists, dag, base, Set.singleton_union, Prod.mk.eta, Prod.mk.injEq, - Functor.map, Prod.exists, Prod.forall, Subtype.forall, - ] - rintro q pq l q' _ - rintro (⟨⟨q_eq, rfl⟩, ⟨pq', q'_in_Y₁⟩⟩|⟨⟨q_eq, rfl⟩, ⟨pq', q'_in_Y₂⟩⟩) - · left; grind - · right; grind - · simp only [Set.mem_image, Set.mem_sdiff, Set.mem_singleton_iff, Prod.exists, Prod.mk.injEq, - not_and, Subtype.exists] at hv - rcases hv with ⟨q, pq, l, ⟨hV₁, not_root⟩, rfl⟩ - obtain ⟨Y₁, p_sat₁, p_sub₁⟩ := G₁.p_sat _ hV₁ - exists Subtype.embedLe leφ₁ '' Y₁ - constructor - · rw [delta_eq_1, PositiveBool.mapSubtypeImp_embed leφ₁] - exact p_sat₁ - · rw [Set.subset_def] - simp only [dag, base] - simp only [Set.mem_image, Subtype.exists, Set.mem_union, Prod.exists, Set.mem_ofPred_eq] - grind - · simp only [Set.mem_image, Set.mem_sdiff, Set.mem_ofPred_eq, not_and, not_or, Prod.exists, - Subtype.exists] at hv - rcases hv with ⟨q, pq, l, ⟨hV₂, not_root⟩, rfl⟩ - by_cases H₁ : (q, l) ∈ (Subtype.val <$> G₁.toDAG).V - · simp only [Functor.map, Set.mem_image, Prod.mk.injEq, Prod.exists, exists_eq_right_right, - Subtype.exists, exists_and_right, exists_eq_right] at H₁ - rcases H₁ with ⟨hq1, hV₁⟩ - obtain ⟨Y₁, p_sat₁, p_sub₁⟩ := G₁.p_sat _ hV₁ - exists Subtype.embedLe leφ₁ '' Y₁ - constructor - · rw [show Subtype.embedLe leφ₂ ⟨q, pq⟩ = Subtype.embedLe leφ₁ ⟨q, hq1⟩ by rfl, - delta_eq_1, PositiveBool.mapSubtypeImp_embed leφ₁] - exact p_sat₁ - · rw [Set.subset_def] - simp only [dag, base] - intros e he - simp only [Set.mem_union, Set.mem_image] - left; left - simp only [Set.mem_prod, Set.mem_singleton_iff, Set.mem_image, Subtype.exists] at he - rcases he with ⟨e1_eq, q', pq', q'_in_Y₁, e2_eq⟩ - exists ((⟨q, hq1⟩, l), ⟨q', pq'⟩) - exists Set.mem_of_subset_of_mem p_sub₁ (by grind) - grind - · obtain ⟨Y₂, p_sat₂, p_sub₂⟩ := G₂.p_sat _ hV₂ - exists Subtype.embedLe leφ₂ '' Y₂ - constructor - · rw [delta_eq_2, PositiveBool.mapSubtypeImp_embed leφ₂] - exact p_sat₂ - · rw [Set.subset_def] - simp only [dag, base] - intros e he - simp at he - simp only [Set.mem_union, Set.mem_image] - left; right - simp only [Subtype.exists] - grind + have first (q : Iic φ₁) (l : ℕ) (hq : (q, l) ∈ G₁.V) + (hne : (q, l) ≠ (M₁.q₀, 0)) : + ∃ Y, PositiveBool.Sat Y (M.δ (q.embedLe leφ₁) (w l)) ∧ + {(q.embedLe leφ₁, l)} ×ˢ Y ⊆ + (dag leφ₁ leφ₂ M₁.q₀ M₂.q₀ M.q₀ G₁.toDAG G₂.toDAG).E := by + obtain ⟨Y, hY, hE⟩ := G₁.p_sat _ hq + refine ⟨Subtype.embedLe leφ₁ '' Y, ?_, ?_⟩ + · rwa [delta_eq_1, PositiveBool.mapSubtypeImp_embed leφ₁] + · rintro ⟨v, q'⟩ ⟨rfl, y, hy, rfl⟩ + exact Or.inl (Or.inl ⟨((q, l), y), hE ⟨rfl, hy⟩, by simp [hne]⟩) + intro v hv + rcases hv with (hv | hv) | hv + · rcases hv with rfl + obtain ⟨Y₁, hY₁, hE₁⟩ := G₁.p_sat _ G₁.p_root + obtain ⟨Y₂, hY₂, hE₂⟩ := G₂.p_sat _ G₂.p_root + refine ⟨Subtype.embedLe leφ₁ '' Y₁ ∪ Subtype.embedLe leφ₂ '' Y₂, + delta_root _ _ hY₁ hY₂, ?_⟩ + rintro ⟨v, q'⟩ ⟨rfl, hq'⟩ + rcases hq' with ⟨y, hy, rfl⟩ | ⟨y, hy, rfl⟩ + · exact Or.inl (Or.inl ⟨((M₁.q₀, 0), y), hE₁ ⟨rfl, hy⟩, by simp⟩) + · exact Or.inr ⟨y, hE₂ ⟨rfl, hy⟩, rfl⟩ + · rcases hv with ⟨⟨q, l⟩, ⟨hq, hne⟩, rfl⟩ + exact first q l hq hne + · rcases hv with ⟨⟨q, l⟩, ⟨hq, hne⟩, rfl⟩ + by_cases hshared : (q.val, l) ∈ (Subtype.val <$> G₁.toDAG).V + · simp only [Functor.map, Set.mem_image, Prod.mk.injEq, Prod.exists, + exists_eq_right_right, Subtype.exists, exists_and_right, exists_eq_right] at hshared + obtain ⟨hq₁, hV₁⟩ := hshared + apply first ⟨q.val, hq₁⟩ l hV₁ + intro h + exact hne ⟨(Prod.mk.inj h).2, Or.inl (congrArg Subtype.val (Prod.mk.inj h).1)⟩ + · obtain ⟨Y, hY, hE⟩ := G₂.p_sat _ hq + refine ⟨Subtype.embedLe leφ₂ '' Y, ?_, ?_⟩ + · rwa [delta_eq_2, PositiveBool.mapSubtypeImp_embed leφ₂] + · rintro ⟨v, q'⟩ ⟨rfl, y, hy, rfl⟩ + refine Or.inl (Or.inr ⟨q, l, y, ⟨hq, hshared, ?_, ?_, hE ⟨rfl, hy⟩⟩, rfl⟩) + · intro h + exact hne ⟨(Prod.mk.inj h).2, Or.inl (Prod.mk.inj h).1⟩ + · intro h + exact hne ⟨(Prod.mk.inj h).2, Or.inr (Prod.mk.inj h).1⟩ /-- Conjoin run DAGs of `M₁` and `M₂` into a run DAG of `M`, witnessing that `M` runs both component automata in parallel from the shared root. -/ @@ -947,26 +926,34 @@ lemma preserves_path by_cases H_spine : op = (fun _ => ⟨Φ, le_refl _⟩); { left; exact H_spine }; right obtain ⟨bp, H_bp⟩ : ∃ i, op i ≠ ⟨Φ, le_refl _⟩ := by grind obtain ⟨n, op_path⟩ := op_path - have bp_branch : (op bp).val ≤ φ := by - simp only [dag, base, E] at op_path - grind + have branch_bounds {j : ℕ} (hj : op j ≠ ⟨Φ, le_refl _⟩) : + (op j).val ≤ φ ∧ (op (j + 1)).val ≤ φ := by + rcases op_path j with ⟨hroot, _⟩ | ⟨_, hp, hp', _⟩ + · exact (hj hroot).elim + · exact ⟨hp, hp'⟩ + have bp_branch := (branch_bounds H_bp).1 have pres_branch : ∀ {i}, (op i).val ≤ φ → ∀ j ≥ i, (op j).val ≤ φ := by - simp only [dag, base, E, Set.mem_union] at op_path - intros _ _ j - induction j - · grind - next n _ => have := op_path n; grind + intro i hi j hij + induction hij with + | refl => exact hi + | @step j _ ih => + apply (branch_bounds ?_).2 + intro hroot + exact ltφ.not_ge (by simpa only [hroot] using ih) let ι := fun i => mini G (⟨(op (bp + i)).val, (pres_branch bp_branch _ (by omega))⟩, n + (bp + i)) have ι_antitone : Antitone ι := by apply antitone_nat_of_succ_le intros n specialize op_path (bp + n) exact mini_not_increasing ltφ _ _ _ _ op_path - obtain ⟨sp, i, hi, _⟩ := antitone_nat_eventually_constant ι_antitone - simp only [dag, base, E] at op_path + obtain ⟨sp, i, hi, hi₀⟩ := antitone_nat_eventually_constant ι_antitone have : i ≤ n + bp := by - have : ι 0 ≤ n + bp := by apply mini_le G _ _; grind - grind + apply hi₀.trans + apply mini_le G _ _ + rcases op_path bp with ⟨hroot, _⟩ | ⟨_, _, _, hV, _⟩ + · exact (H_bp hroot).elim + · exact hV + simp only [dag, base, E] at op_path exists i, bp + sp simp only [DAG.path, Functor.map, Set.mem_image, Prod.mk.injEq, Prod.exists, Subtype.exists, exists_and_right, exists_eq_right_right, exists_eq_right] @@ -975,7 +962,9 @@ lemma preserves_path intros l specialize op_path (bp + sp + l) have not_root : op (bp + sp + l) ≠ ⟨Φ, le_refl _⟩ := by - grind [pres_branch bp_branch (bp + sp + l) (by omega)] + intro hroot + exact ltφ.not_ge (by + simpa only [hroot] using pres_branch bp_branch (bp + sp + l) (by omega)) simp only [ne_eq, exists_prop, exists_and_left, Set.mem_union, Set.mem_ofPred_eq, not_root, false_and, not_false_eq_true, true_and, false_or] at op_path rcases op_path with ⟨p1, _, p2, he⟩ diff --git a/LeanPool/LeanModelChecking/SafetyLivenessDecomposition.lean b/LeanPool/LeanModelChecking/SafetyLivenessDecomposition.lean index d6affb7a00..8e92442886 100644 --- a/LeanPool/LeanModelChecking/SafetyLivenessDecomposition.lean +++ b/LeanPool/LeanModelChecking/SafetyLivenessDecomposition.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 György Kurucz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: György Kurucz -/ -import Mathlib.Data.Set.Basic -import Mathlib.Data.List.OfFn +module + +public import Aesop.BuiltinRules +public import Mathlib.Data.Nat.Notation +public import Mathlib.Data.Set.Defs +public import Mathlib.Tactic.ToDual +import Mathlib.Data.Set.Operations +import Mathlib.Tactic.Attr.Core +import Mathlib.Tactic.Convert +import Mathlib.Tactic.Finiteness.Attr /-! # Safety-liveness decomposition @@ -13,6 +21,8 @@ We prove that every linear-time property decomposes as the intersection of a safety property and a liveness property, following Alpern and Schneider. -/ +@[expose] public section + namespace SafetyLivenessDecomposition -- Theorem statement based on: diff --git a/LeanPool/LeanModularForms.lean b/LeanPool/LeanModularForms.lean index 9a0af08d34..9c6633470e 100644 --- a/LeanPool/LeanModularForms.lean +++ b/LeanPool/LeanModularForms.lean @@ -3,186 +3,188 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ContourIntegral.CrossingLimit -import LeanPool.LeanModularForms.ContourIntegral.PVSplit -import LeanPool.LeanModularForms.ContourIntegral.SegmentFTC -import LeanPool.LeanModularForms.ContourIntegral.WindingNumber -import LeanPool.LeanModularForms.ForMathlib.AtImInfty -import LeanPool.LeanModularForms.ForMathlib.Bounds -import LeanPool.LeanModularForms.ForMathlib.CongruenceSubgroupsCopy -import LeanPool.LeanModularForms.ForMathlib.CongruenceSubgrps -import LeanPool.LeanModularForms.ForMathlib.FunctionsBoundedAtInfty -import LeanPool.LeanModularForms.ForMathlib.Identities -import LeanPool.LeanModularForms.ForMathlib.Instances -import LeanPool.LeanModularForms.ForMathlib.IsBoundedAtImInfty -import LeanPool.LeanModularForms.ForMathlib.LevelOne -import LeanPool.LeanModularForms.ForMathlib.Petersson -import LeanPool.LeanModularForms.ForMathlib.QExpansion -import LeanPool.LeanModularForms.ForMathlib.SlashActions -import LeanPool.LeanModularForms.ForMathlib.UpperHalfPlane -import LeanPool.LeanModularForms.ForMathlib.Hassumunifon -import LeanPool.LeanModularForms.GeneralizedResidueTheory.ArcCalculus -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Bridges -import LeanPool.LeanModularForms.GeneralizedResidueTheory.CauchyPrimitive -import LeanPool.LeanModularForms.GeneralizedResidueTheory.CurveAvoidance -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Cycle -import LeanPool.LeanModularForms.GeneralizedResidueTheory.GeneralizedResidueTheorem -import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.CircleParam -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Integrality -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Invariance -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.ParametricDiff -import LeanPool.LeanModularForms.GeneralizedResidueTheory.LogDerivFTC -import LeanPool.LeanModularForms.GeneralizedResidueTheory.OnCurvePV.Basic -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.AnnulusBounds -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.GammaAnalysis -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.RemainderAnalysis -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.SingularAnnulus -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.StepBounds -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.UniformStepBound -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PiecewiseCurveAPI -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PrincipalValue -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.Flatness -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.BoundaryVanishing -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.CPVExistence -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.CutoffInfrastructure -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.HigherOrderAssembly -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.PerTermVanishing -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.PerTermVanishing.CPVHelpers -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MeasureHelpers -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MeromorphicLaurent -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MeromorphicPrincipalPart -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MultipointPV -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MultipointPV.DominatedConvergence -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.SectorCurve -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.SectorCurveLemma -import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber -import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.CrossingAnalysis -import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Decomposition -import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Defs -import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Proposition22 -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Associativity -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Basic -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Commutativity -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Degree -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Module -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Multiplication -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Ring -import LeanPool.LeanModularForms.HeckeRIngs.GL2.Basic -import LeanPool.LeanModularForms.HeckeRIngs.GL2.CongruenceIndex -import LeanPool.LeanModularForms.HeckeRIngs.GL2.Degree -import LeanPool.LeanModularForms.HeckeRIngs.GL2.HeckeAction -import LeanPool.LeanModularForms.HeckeRIngs.GL2.HeckeModularForm -import LeanPool.LeanModularForms.HeckeRIngs.GL2.MultiplicationTable -import LeanPool.LeanModularForms.HeckeRIngs.GLn.Basic -import LeanPool.LeanModularForms.HeckeRIngs.GLn.CoprimeMul -import LeanPool.LeanModularForms.HeckeRIngs.GLn.CosetDecomposition -import LeanPool.LeanModularForms.HeckeRIngs.GLn.Degree -import LeanPool.LeanModularForms.HeckeRIngs.GLn.DiagonalCosets -import LeanPool.LeanModularForms.HeckeRIngs.GLn.PolynomialRing -import LeanPool.LeanModularForms.HeckeRIngs.GLn.PrimeDecomposition -import LeanPool.LeanModularForms.HeckeRIngs.GLn.SLnTransvection -import LeanPool.LeanModularForms.HeckeRIngs.GLn.TransposeAntiInvolution -import LeanPool.LeanModularForms.Modularforms.AtImInfty -import LeanPool.LeanModularForms.Modularforms.BigO -import LeanPool.LeanModularForms.Modularforms.Cauchylems -import LeanPool.LeanModularForms.Modularforms.Delta -import LeanPool.LeanModularForms.Modularforms.Derivative -import LeanPool.LeanModularForms.Modularforms.DimensionFormulas -import LeanPool.LeanModularForms.Modularforms.E2 -import LeanPool.LeanModularForms.Modularforms.Eisenstein -import LeanPool.LeanModularForms.Modularforms.EisensteinAsymptotics -import LeanPool.LeanModularForms.Modularforms.Eisensteinqexpansions -import LeanPool.LeanModularForms.Modularforms.ForMathlibCusps -import LeanPool.LeanModularForms.Modularforms.ForMathlibFunctionsBoundedAtInfty -import LeanPool.LeanModularForms.Modularforms.ForMathlibSlashActions -import LeanPool.LeanModularForms.Modularforms.ForMathlibUpperHalfPlane -import LeanPool.LeanModularForms.Modularforms.Generators -import LeanPool.LeanModularForms.Modularforms.Generators.Defs -import LeanPool.LeanModularForms.Modularforms.Generators.Injectivity -import LeanPool.LeanModularForms.Modularforms.Generators.Surjectivity -import LeanPool.LeanModularForms.Modularforms.IccIcoLems -import LeanPool.LeanModularForms.Modularforms.IsCuspForm -import LeanPool.LeanModularForms.Modularforms.JacobiTheta -import LeanPool.LeanModularForms.Modularforms.MDifferentiableFunProp -import LeanPool.LeanModularForms.Modularforms.PhiTransform -import LeanPool.LeanModularForms.Modularforms.QExpansion -import LeanPool.LeanModularForms.Modularforms.RamanujanIdentities -import LeanPool.LeanModularForms.Modularforms.ResToImagAxis -import LeanPool.LeanModularForms.Modularforms.SerreDerivativeSlash -import LeanPool.LeanModularForms.Modularforms.SlashActionAuxil -import LeanPool.LeanModularForms.Modularforms.ThetaDerivIdentities -import LeanPool.LeanModularForms.Modularforms.ClogArgLems -import LeanPool.LeanModularForms.Modularforms.Cotangent -import LeanPool.LeanModularForms.Modularforms.Csqrt -import LeanPool.LeanModularForms.Modularforms.Equivs -import LeanPool.LeanModularForms.Modularforms.Eta -import LeanPool.LeanModularForms.Modularforms.EtaCleanup -import LeanPool.LeanModularForms.Modularforms.ExpLems -import LeanPool.LeanModularForms.Modularforms.Iteratedderivs -import LeanPool.LeanModularForms.Modularforms.LimunderLems -import LeanPool.LeanModularForms.Modularforms.LogDerivLems -import LeanPool.LeanModularForms.Modularforms.MultipliableLems -import LeanPool.LeanModularForms.Modularforms.QExpansionLems -import LeanPool.LeanModularForms.Modularforms.RiemannZetalems -import LeanPool.LeanModularForms.Modularforms.SummableLems -import LeanPool.LeanModularForms.Modularforms.Tendstolems -import LeanPool.LeanModularForms.Modularforms.TsumderivWithin -import LeanPool.LeanModularForms.Modularforms.Uniformcts -import LeanPool.LeanModularForms.Modularforms.Upperhalfplane -import LeanPool.LeanModularForms.SpherePacking.PhiHolomorphic -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.LeftEdge -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.RightEdge -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.UnitArc -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.UnitArcHelpers -import LeanPool.LeanModularForms.ValenceFormula.CoreIdentity -import LeanPool.LeanModularForms.ValenceFormula.Definitions -import LeanPool.LeanModularForms.ValenceFormula.InteriorWinding -import LeanPool.LeanModularForms.ValenceFormula.ModularInvariance -import LeanPool.LeanModularForms.ValenceFormula.OnCurvePV.Basic -import LeanPool.LeanModularForms.ValenceFormula.OnCurvePV.EndpointCorner -import LeanPool.LeanModularForms.ValenceFormula.OnCurvePV.Main -import LeanPool.LeanModularForms.ValenceFormula.OrbitPairing -import LeanPool.LeanModularForms.ValenceFormula.OrbitSum -import LeanPool.LeanModularForms.ValenceFormula.PVChain -import LeanPool.LeanModularForms.ValenceFormula.PVChain.ArcContribution -import LeanPool.LeanModularForms.ValenceFormula.PVChain.Assembly -import LeanPool.LeanModularForms.ValenceFormula.PVChain.Assembly.ResidueSide -import LeanPool.LeanModularForms.ValenceFormula.PVChain.Helpers -import LeanPool.LeanModularForms.ValenceFormula.PVChain.OnCurveCapture -import LeanPool.LeanModularForms.ValenceFormula.PVChain.ResidueSideInfra -import LeanPool.LeanModularForms.ValenceFormula.PVChain.Seg5CuspIntegral -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.AngleAnalysis -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.BoundaryHomotopyDerivBounds -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.BoundaryHomotopyDiff -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.BoundaryHomotopySmooth -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.Geometry -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.HomotopyDef -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.MainTheorem -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.MainTheoremBound -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.MainTheoremDerivCont -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.PolygonProps -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.PolygonSlope -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.RadialHomotopy -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.WindingBase -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.WindingProof -import LeanPool.LeanModularForms.ValenceFormula.TextbookExistence -import LeanPool.LeanModularForms.ValenceFormula.TextbookForm -import LeanPool.LeanModularForms.ValenceFormula.TrigLemmas -import LeanPool.LeanModularForms.ValenceFormula.WindingWeights -import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common -import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.I -import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Rho -import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.RhoPlusOne +public import LeanPool.LeanModularForms.ContourIntegral.CrossingLimit +public import LeanPool.LeanModularForms.ContourIntegral.PVSplit +public import LeanPool.LeanModularForms.ContourIntegral.SegmentFTC +public import LeanPool.LeanModularForms.ContourIntegral.WindingNumber +public import LeanPool.LeanModularForms.ForMathlib.AtImInfty +public import LeanPool.LeanModularForms.ForMathlib.Bounds +public import LeanPool.LeanModularForms.ForMathlib.CongruenceSubgroupsCopy +public import LeanPool.LeanModularForms.ForMathlib.CongruenceSubgrps +public import LeanPool.LeanModularForms.ForMathlib.FunctionsBoundedAtInfty +public import LeanPool.LeanModularForms.ForMathlib.Identities +public import LeanPool.LeanModularForms.ForMathlib.Instances +public import LeanPool.LeanModularForms.ForMathlib.IsBoundedAtImInfty +public import LeanPool.LeanModularForms.ForMathlib.LevelOne +public import LeanPool.LeanModularForms.ForMathlib.Petersson +public import LeanPool.LeanModularForms.ForMathlib.QExpansion +public import LeanPool.LeanModularForms.ForMathlib.SlashActions +public import LeanPool.LeanModularForms.ForMathlib.UpperHalfPlane +public import LeanPool.LeanModularForms.ForMathlib.Hassumunifon +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.ArcCalculus +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Bridges +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.CauchyPrimitive +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.CurveAvoidance +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Cycle +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.GeneralizedResidueTheorem +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.CircleParam +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Integrality +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Invariance +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.ParametricDiff +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.LogDerivFTC +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.OnCurvePV.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.AnnulusBounds +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.GammaAnalysis +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.RemainderAnalysis +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.SingularAnnulus +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.StepBounds +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.UniformStepBound +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.PiecewiseCurveAPI +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.PrincipalValue +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.Flatness +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.BoundaryVanishing +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.CPVExistence +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.CutoffInfrastructure +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.HigherOrderAssembly +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.PerTermVanishing +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.PerTermVanishing.CPVHelpers +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MeasureHelpers +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MeromorphicLaurent +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MeromorphicPrincipalPart +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MultipointPV +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MultipointPV.DominatedConvergence +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.SectorCurve +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.SectorCurveLemma +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.CrossingAnalysis +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Decomposition +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Defs +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Proposition22 +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Associativity +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Basic +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Commutativity +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Degree +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Module +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Multiplication +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Ring +public import LeanPool.LeanModularForms.HeckeRIngs.GL2.Basic +public import LeanPool.LeanModularForms.HeckeRIngs.GL2.CongruenceIndex +public import LeanPool.LeanModularForms.HeckeRIngs.GL2.Degree +public import LeanPool.LeanModularForms.HeckeRIngs.GL2.HeckeAction +public import LeanPool.LeanModularForms.HeckeRIngs.GL2.HeckeModularForm +public import LeanPool.LeanModularForms.HeckeRIngs.GL2.MultiplicationTable +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.Basic +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.CoprimeMul +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.CosetDecomposition +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.Degree +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.DiagonalCosets +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.PolynomialRing +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.PrimeDecomposition +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.SLnTransvection +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.TransposeAntiInvolution +public import LeanPool.LeanModularForms.Modularforms.AtImInfty +public import LeanPool.LeanModularForms.Modularforms.BigO +public import LeanPool.LeanModularForms.Modularforms.Cauchylems +public import LeanPool.LeanModularForms.Modularforms.Delta +public import LeanPool.LeanModularForms.Modularforms.Derivative +public import LeanPool.LeanModularForms.Modularforms.DimensionFormulas +public import LeanPool.LeanModularForms.Modularforms.E2 +public import LeanPool.LeanModularForms.Modularforms.Eisenstein +public import LeanPool.LeanModularForms.Modularforms.EisensteinAsymptotics +public import LeanPool.LeanModularForms.Modularforms.Eisensteinqexpansions +public import LeanPool.LeanModularForms.Modularforms.ForMathlibCusps +public import LeanPool.LeanModularForms.Modularforms.ForMathlibFunctionsBoundedAtInfty +public import LeanPool.LeanModularForms.Modularforms.ForMathlibSlashActions +public import LeanPool.LeanModularForms.Modularforms.ForMathlibUpperHalfPlane +public import LeanPool.LeanModularForms.Modularforms.Generators +public import LeanPool.LeanModularForms.Modularforms.Generators.Defs +public import LeanPool.LeanModularForms.Modularforms.Generators.Injectivity +public import LeanPool.LeanModularForms.Modularforms.Generators.Surjectivity +public import LeanPool.LeanModularForms.Modularforms.IccIcoLems +public import LeanPool.LeanModularForms.Modularforms.IsCuspForm +public import LeanPool.LeanModularForms.Modularforms.JacobiTheta +public import LeanPool.LeanModularForms.Modularforms.MDifferentiableFunProp +public import LeanPool.LeanModularForms.Modularforms.PhiTransform +public import LeanPool.LeanModularForms.Modularforms.QExpansion +public import LeanPool.LeanModularForms.Modularforms.RamanujanIdentities +public import LeanPool.LeanModularForms.Modularforms.ResToImagAxis +public import LeanPool.LeanModularForms.Modularforms.SerreDerivativeSlash +public import LeanPool.LeanModularForms.Modularforms.SlashActionAuxil +public import LeanPool.LeanModularForms.Modularforms.ThetaDerivIdentities +public import LeanPool.LeanModularForms.Modularforms.ClogArgLems +public import LeanPool.LeanModularForms.Modularforms.Cotangent +public import LeanPool.LeanModularForms.Modularforms.Csqrt +public import LeanPool.LeanModularForms.Modularforms.Equivs +public import LeanPool.LeanModularForms.Modularforms.Eta +public import LeanPool.LeanModularForms.Modularforms.EtaCleanup +public import LeanPool.LeanModularForms.Modularforms.ExpLems +public import LeanPool.LeanModularForms.Modularforms.Iteratedderivs +public import LeanPool.LeanModularForms.Modularforms.LimunderLems +public import LeanPool.LeanModularForms.Modularforms.LogDerivLems +public import LeanPool.LeanModularForms.Modularforms.MultipliableLems +public import LeanPool.LeanModularForms.Modularforms.QExpansionLems +public import LeanPool.LeanModularForms.Modularforms.RiemannZetalems +public import LeanPool.LeanModularForms.Modularforms.SummableLems +public import LeanPool.LeanModularForms.Modularforms.Tendstolems +public import LeanPool.LeanModularForms.Modularforms.TsumderivWithin +public import LeanPool.LeanModularForms.Modularforms.Uniformcts +public import LeanPool.LeanModularForms.Modularforms.Upperhalfplane +public import LeanPool.LeanModularForms.SpherePacking.PhiHolomorphic +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.LeftEdge +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.RightEdge +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.UnitArc +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.UnitArcHelpers +public import LeanPool.LeanModularForms.ValenceFormula.CoreIdentity +public import LeanPool.LeanModularForms.ValenceFormula.Definitions +public import LeanPool.LeanModularForms.ValenceFormula.InteriorWinding +public import LeanPool.LeanModularForms.ValenceFormula.ModularInvariance +public import LeanPool.LeanModularForms.ValenceFormula.OnCurvePV.Basic +public import LeanPool.LeanModularForms.ValenceFormula.OnCurvePV.EndpointCorner +public import LeanPool.LeanModularForms.ValenceFormula.OnCurvePV.Main +public import LeanPool.LeanModularForms.ValenceFormula.OrbitPairing +public import LeanPool.LeanModularForms.ValenceFormula.OrbitSum +public import LeanPool.LeanModularForms.ValenceFormula.PVChain +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.ArcContribution +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.Assembly +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.Assembly.ResidueSide +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.Helpers +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.OnCurveCapture +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.ResidueSideInfra +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.Seg5CuspIntegral +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.AngleAnalysis +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.BoundaryHomotopyDerivBounds +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.BoundaryHomotopyDiff +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.BoundaryHomotopySmooth +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.Geometry +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.HomotopyDef +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.MainTheorem +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.MainTheoremBound +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.MainTheoremDerivCont +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.PolygonProps +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.PolygonSlope +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.RadialHomotopy +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.WindingBase +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.WindingProof +public import LeanPool.LeanModularForms.ValenceFormula.TextbookExistence +public import LeanPool.LeanModularForms.ValenceFormula.TextbookForm +public import LeanPool.LeanModularForms.ValenceFormula.TrigLemmas +public import LeanPool.LeanModularForms.ValenceFormula.WindingWeights +public import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common +public import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.I +public import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Rho +public import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.RhoPlusOne +import Mathlib.CategoryTheory.Category.Init /-! # Modular forms and the generalized residue theorem @@ -194,3 +196,5 @@ Main declarations: `generalizedResidueTheorem`, `valence_formula_textbook_orbit_ Tags: modular-forms, complex-analysis, residue-theorem, valence-formula MSC: 11F11, 30E20 -/ + +@[expose] public section diff --git a/LeanPool/LeanModularForms/ContourIntegral/CrossingLimit.lean b/LeanPool/LeanModularForms/ContourIntegral/CrossingLimit.lean index c36ab5217e..b263ad3441 100644 --- a/LeanPool/LeanModularForms/ContourIntegral/CrossingLimit.lean +++ b/LeanPool/LeanModularForms/ContourIntegral/CrossingLimit.lean @@ -3,26 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic import LeanPool.LeanModularForms.ContourIntegral.PVSplit -import LeanPool.LeanModularForms.ContourIntegral.SegmentFTC -import Mathlib.Tactic.Common -import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Analysis.Complex.AbsMax -import Mathlib.Analysis.Complex.Periodic -import Mathlib.Analysis.Complex.LocallyUniformLimit -import Mathlib.Analysis.SpecialFunctions.Complex.Circle -import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv -import Mathlib.Analysis.Calculus.FDeriv.Analytic -import Mathlib.Analysis.Calculus.ParametricIntegral -import Mathlib.Analysis.Asymptotics.Defs -import Mathlib.Analysis.Meromorphic.NormalForm -import Mathlib.MeasureTheory.Integral.CircleIntegral -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic -import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import Mathlib.RingTheory.LaurentSeries -import Mathlib.Topology.Homotopy.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Tactic.Positivity.Finset /-! # Crossing Limit Theorem @@ -40,6 +28,8 @@ to reduce PV computation to a single crossing-local limit. ratio at the crossing tends to L -/ +@[expose] public section + open Set MeasureTheory Complex Filter namespace ContourIntegral diff --git a/LeanPool/LeanModularForms/ContourIntegral/PVSplit.lean b/LeanPool/LeanModularForms/ContourIntegral/PVSplit.lean index 71d66558ca..ee82c060d3 100644 --- a/LeanPool/LeanModularForms/ContourIntegral/PVSplit.lean +++ b/LeanPool/LeanModularForms/ContourIntegral/PVSplit.lean @@ -3,25 +3,13 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic -import Mathlib.Tactic.Common -import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Analysis.Complex.AbsMax -import Mathlib.Analysis.Complex.Periodic -import Mathlib.Analysis.Complex.LocallyUniformLimit -import Mathlib.Analysis.SpecialFunctions.Complex.Circle -import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv -import Mathlib.Analysis.Calculus.FDeriv.Analytic -import Mathlib.Analysis.Calculus.ParametricIntegral -import Mathlib.Analysis.Asymptotics.Defs -import Mathlib.Analysis.Meromorphic.NormalForm -import Mathlib.MeasureTheory.Integral.CircleIntegral -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic -import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import Mathlib.RingTheory.LaurentSeries -import Mathlib.Topology.Homotopy.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Tactic.Positivity.Finset /-! # PV Integral Splitting at Crossings @@ -40,6 +28,8 @@ On the far segments, the cutoff condition is satisfied so the integrand equals right integrals of `(γ t - s)⁻¹ * deriv γ t`, where the middle part is zero. -/ +@[expose] public section + open Set MeasureTheory Complex Filter intervalIntegral namespace ContourIntegral diff --git a/LeanPool/LeanModularForms/ContourIntegral/SegmentFTC.lean b/LeanPool/LeanModularForms/ContourIntegral/SegmentFTC.lean index 203a8b435e..25191bdf78 100644 --- a/LeanPool/LeanModularForms/ContourIntegral/SegmentFTC.lean +++ b/LeanPool/LeanModularForms/ContourIntegral/SegmentFTC.lean @@ -3,25 +3,13 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.LogDerivFTC -import Mathlib.Tactic.Common -import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Analysis.Complex.AbsMax -import Mathlib.Analysis.Complex.Periodic -import Mathlib.Analysis.Complex.LocallyUniformLimit -import Mathlib.Analysis.SpecialFunctions.Complex.Circle -import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv -import Mathlib.Analysis.Calculus.FDeriv.Analytic -import Mathlib.Analysis.Calculus.ParametricIntegral -import Mathlib.Analysis.Asymptotics.Defs -import Mathlib.Analysis.Meromorphic.NormalForm -import Mathlib.MeasureTheory.Integral.CircleIntegral -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic -import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import Mathlib.RingTheory.LaurentSeries -import Mathlib.Topology.Homotopy.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Tactic.Positivity.Finset /-! # Telescoping FTC for Log-Derivative on Piecewise Segments @@ -37,6 +25,8 @@ the total integral reduces to log(g(t₀-δ)) - log(g(t₀+δ)). to the log difference at the crossing boundary -/ +@[expose] public section + open Set MeasureTheory Complex open scoped Interval diff --git a/LeanPool/LeanModularForms/ContourIntegral/WindingNumber.lean b/LeanPool/LeanModularForms/ContourIntegral/WindingNumber.lean index aa98bad1f2..85ea43aedd 100644 --- a/LeanPool/LeanModularForms/ContourIntegral/WindingNumber.lean +++ b/LeanPool/LeanModularForms/ContourIntegral/WindingNumber.lean @@ -3,25 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic -import Mathlib.Tactic.Common -import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Analysis.Complex.AbsMax -import Mathlib.Analysis.Complex.Periodic -import Mathlib.Analysis.Complex.LocallyUniformLimit -import Mathlib.Analysis.SpecialFunctions.Complex.Circle -import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv -import Mathlib.Analysis.Calculus.FDeriv.Analytic -import Mathlib.Analysis.Calculus.ParametricIntegral -import Mathlib.Analysis.Asymptotics.Defs -import Mathlib.Analysis.Meromorphic.NormalForm -import Mathlib.MeasureTheory.Integral.CircleIntegral -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic -import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import Mathlib.RingTheory.LaurentSeries -import Mathlib.Topology.Homotopy.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Tactic.Positivity.Finset /-! # Winding Number from PV Integral Limit @@ -36,6 +23,8 @@ This is the final step shared by all winding number computations. * `gWN_eq_neg_sixth_of_pv_tendsto` — specialized: L = -πi/3 implies gWN = -1/6 -/ +@[expose] public section + open Complex namespace ContourIntegral diff --git a/LeanPool/LeanModularForms/ForMathlib/AtImInfty.lean b/LeanPool/LeanModularForms/ForMathlib/AtImInfty.lean index 71161f1f99..bc690b0df4 100644 --- a/LeanPool/LeanModularForms/ForMathlib/AtImInfty.lean +++ b/LeanPool/LeanModularForms/ForMathlib/AtImInfty.lean @@ -3,14 +3,16 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Analysis.Normed.Group.Tannery -import Mathlib.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty +public import Mathlib.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty /- Probably put this at Analysis/Complex/UpperHalfPlane/FunctionsBoundedAtInfty.lean -/ /-! # AtImInfty -/ +@[expose] public section + open UpperHalfPlane diff --git a/LeanPool/LeanModularForms/ForMathlib/Bounds.lean b/LeanPool/LeanModularForms/ForMathlib/Bounds.lean index 954504ed19..3597684b7f 100644 --- a/LeanPool/LeanModularForms/ForMathlib/Bounds.lean +++ b/LeanPool/LeanModularForms/ForMathlib/Bounds.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.NumberTheory.ModularForms.Bounds -import LeanPool.LeanModularForms.ForMathlib.Petersson +public import Mathlib.NumberTheory.ModularForms.Bounds +public import LeanPool.LeanModularForms.ForMathlib.Petersson + +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Bounds for modular forms @@ -16,3 +22,5 @@ All of the lemmas formerly defined here (`truncatedFundamentalDomain`, the famil `Mathlib.NumberTheory.ModularForms.Bounds`, phrased there for an arithmetic `Γ : Subgroup (GL (Fin 2) ℝ)`. This file is now a re-export to keep the historical import path working. -/ + +@[expose] public section diff --git a/LeanPool/LeanModularForms/ForMathlib/CongruenceSubgroupsCopy.lean b/LeanPool/LeanModularForms/ForMathlib/CongruenceSubgroupsCopy.lean index f273e6393a..c1c44bed45 100644 --- a/LeanPool/LeanModularForms/ForMathlib/CongruenceSubgroupsCopy.lean +++ b/LeanPool/LeanModularForms/ForMathlib/CongruenceSubgroupsCopy.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ -import LeanPool.LeanModularForms.ForMathlib.CongruenceSubgrps -import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups +module + +public import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups /-! # Extensions to `Mathlib.NumberTheory.ModularForms.CongruenceSubgroups` @@ -19,6 +20,8 @@ companion and add only the genuinely-local extras (`mem_conjGL'`, to an arbitrary finite-index `Γ`). -/ +@[expose] public section + open ConjAct Matrix.SpecialLinearGroup Matrix ModularGroup CongruenceSubgroup open scoped MatrixGroups Pointwise Real diff --git a/LeanPool/LeanModularForms/ForMathlib/CongruenceSubgrps.lean b/LeanPool/LeanModularForms/ForMathlib/CongruenceSubgrps.lean index 6989a1ce36..68efc496d8 100644 --- a/LeanPool/LeanModularForms/ForMathlib/CongruenceSubgrps.lean +++ b/LeanPool/LeanModularForms/ForMathlib/CongruenceSubgrps.lean @@ -3,12 +3,10 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Basic.Real.Basic +public import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups import Mathlib.GroupTheory.Archimedean -import Mathlib.LinearAlgebra.Matrix.Integer -import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Defs -import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups /-! # Congruence subgroups @@ -20,6 +18,8 @@ It also contains basic results about congruence subgroups. -/ +@[expose] public section + open Matrix.SpecialLinearGroup Matrix ModularGroup CongruenceSubgroup open scoped MatrixGroups Real diff --git a/LeanPool/LeanModularForms/ForMathlib/FunctionsBoundedAtInfty.lean b/LeanPool/LeanModularForms/ForMathlib/FunctionsBoundedAtInfty.lean index 69cd613a4a..50dd74fa99 100644 --- a/LeanPool/LeanModularForms/ForMathlib/FunctionsBoundedAtInfty.lean +++ b/LeanPool/LeanModularForms/ForMathlib/FunctionsBoundedAtInfty.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty +public import Mathlib.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty /-! # FunctionsBoundedAtInfty -/ +@[expose] public section + open UpperHalfPlane diff --git a/LeanPool/LeanModularForms/ForMathlib/Hassumunifon.lean b/LeanPool/LeanModularForms/ForMathlib/Hassumunifon.lean index b9293cca05..183082389c 100644 --- a/LeanPool/LeanModularForms/ForMathlib/Hassumunifon.lean +++ b/LeanPool/LeanModularForms/ForMathlib/Hassumunifon.lean @@ -3,6 +3,7 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module /-! # HasSumUniformlyOn / cotTerm scratch file @@ -15,4 +16,4 @@ name) into Mathlib (`Mathlib.Analysis.Series.LocallyUniform`, `Mathlib.Analysis.Complex.LocallyUniformLimit`, etc.). The remaining purely-local helpers were not imported by any other file in this project, so we retire this file as a stub. The original lemmas remain in git history for reference. --/ +-/@[expose] public section diff --git a/LeanPool/LeanModularForms/ForMathlib/Identities.lean b/LeanPool/LeanModularForms/ForMathlib/Identities.lean index ecabb67307..ec1a116949 100644 --- a/LeanPool/LeanModularForms/ForMathlib/Identities.lean +++ b/LeanPool/LeanModularForms/ForMathlib/Identities.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.NumberTheory.ModularForms.SlashInvariantForms -import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups -import Mathlib.NumberTheory.ModularForms.Identities -import LeanPool.LeanModularForms.ForMathlib.CongruenceSubgrps +public import Mathlib.NumberTheory.ModularForms.SlashInvariantForms +public import LeanPool.LeanModularForms.ForMathlib.CongruenceSubgrps /-! # Identities of ModularForms and SlashInvariantForms @@ -15,6 +14,8 @@ import LeanPool.LeanModularForms.ForMathlib.CongruenceSubgrps Collection of useful identities of modular forms. -/ +@[expose] public section + noncomputable section open ModularForm UpperHalfPlane Matrix MatrixGroups ModularGroup diff --git a/LeanPool/LeanModularForms/ForMathlib/Instances.lean b/LeanPool/LeanModularForms/ForMathlib/Instances.lean index 040a4b3563..d368542e17 100644 --- a/LeanPool/LeanModularForms/ForMathlib/Instances.lean +++ b/LeanPool/LeanModularForms/ForMathlib/Instances.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Complex.Basic /-! # Shared typeclass instances for `ℝ`-scalar-on-`ℂ` @@ -21,13 +22,15 @@ We also provide `IsScalarTower ℝ ℂ ℂ` which was previously redeclared in several files with different proof terms. -/ -private noncomputable instance instNormSMulClassRealComplex : NormSMulClass ℝ ℂ := +@[expose] public section + +noncomputable instance instNormSMulClassRealComplex : NormSMulClass ℝ ℂ := NormedSpace.toNormSMulClass -private noncomputable instance instIsBoundedSMulRealComplex : IsBoundedSMul ℝ ℂ := +noncomputable instance instIsBoundedSMulRealComplex : IsBoundedSMul ℝ ℂ := NormSMulClass.toIsBoundedSMul -private noncomputable instance instContinuousSMulRealComplex : ContinuousSMul ℝ ℂ := +noncomputable instance instContinuousSMulRealComplex : ContinuousSMul ℝ ℂ := IsBoundedSMul.continuousSMul -private instance instIsScalarTowerRealComplexComplex : IsScalarTower ℝ ℂ ℂ := inferInstance +instance instIsScalarTowerRealComplexComplex : IsScalarTower ℝ ℂ ℂ := inferInstance diff --git a/LeanPool/LeanModularForms/ForMathlib/IsBoundedAtImInfty.lean b/LeanPool/LeanModularForms/ForMathlib/IsBoundedAtImInfty.lean index 2879cb5cf8..a89385bc97 100644 --- a/LeanPool/LeanModularForms/ForMathlib/IsBoundedAtImInfty.lean +++ b/LeanPool/LeanModularForms/ForMathlib/IsBoundedAtImInfty.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.NumberTheory.ModularForms.EisensteinSeries.IsBoundedAtImInfty +public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.IsBoundedAtImInfty + +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Boundedness of Eisenstein series @@ -13,3 +21,5 @@ All of the lemmas formerly defined here have been upstreamed into `Mathlib.NumberTheory.ModularForms.EisensteinSeries.IsBoundedAtImInfty`; this file is now a re-export. -/ + +@[expose] public section diff --git a/LeanPool/LeanModularForms/ForMathlib/LevelOne.lean b/LeanPool/LeanModularForms/ForMathlib/LevelOne.lean index 2c06df8620..6342d65a8e 100644 --- a/LeanPool/LeanModularForms/ForMathlib/LevelOne.lean +++ b/LeanPool/LeanModularForms/ForMathlib/LevelOne.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Analysis.Complex.AbsMax -import Mathlib.NumberTheory.Modular -import LeanPool.LeanModularForms.ForMathlib.QExpansion -import LeanPool.LeanModularForms.ForMathlib.CongruenceSubgrps -import LeanPool.LeanModularForms.ForMathlib.Identities -import Mathlib.NumberTheory.ModularForms.LevelOne.Basic +public import Mathlib.Analysis.Complex.AbsMax +public import Mathlib.NumberTheory.Modular +public import LeanPool.LeanModularForms.ForMathlib.QExpansion +public import LeanPool.LeanModularForms.ForMathlib.CongruenceSubgrps +public import LeanPool.LeanModularForms.ForMathlib.Identities +public import Mathlib.NumberTheory.ModularForms.LevelOne.Basic + +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Level one modular forms @@ -19,8 +25,4 @@ TODO: Add finite-dimensionality of these spaces of modular forms. -/ -open UpperHalfPlane ModularGroup SlashInvariantForm ModularForm Complex - CongruenceSubgroup Real Function SlashInvariantFormClass ModularFormClass Periodic - -local notation "𝕢" => qParam - +@[expose] public section diff --git a/LeanPool/LeanModularForms/ForMathlib/Petersson.lean b/LeanPool/LeanModularForms/ForMathlib/Petersson.lean index 6fbdf297ca..fabff9e558 100644 --- a/LeanPool/LeanModularForms/ForMathlib/Petersson.lean +++ b/LeanPool/LeanModularForms/ForMathlib/Petersson.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.NumberTheory.ModularForms.Petersson +public import Mathlib.NumberTheory.ModularForms.Petersson /-! # Petersson inner product (project-local SL(2, ℤ) shims) @@ -16,6 +17,8 @@ with `[Γ.HasDetOne]`, whereas the rest of this project still works with a `Γ : Subgroup SL(2, ℤ)`. We provide thin wrappers that translate the SL version into the GL one. -/ +@[expose] public section + open ModularForm Complex UpperHalfPlane MatrixGroups open scoped Real ComplexConjugate diff --git a/LeanPool/LeanModularForms/ForMathlib/QExpansion.lean b/LeanPool/LeanModularForms/ForMathlib/QExpansion.lean index 42e1821c00..63012a270c 100644 --- a/LeanPool/LeanModularForms/ForMathlib/QExpansion.lean +++ b/LeanPool/LeanModularForms/ForMathlib/QExpansion.lean @@ -3,15 +3,11 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Analysis.Complex.TaylorSeries -import Mathlib.Analysis.Complex.UpperHalfPlane.Exp -import Mathlib.Analysis.Complex.UpperHalfPlane.Manifold -import Mathlib.NumberTheory.ModularForms.Basic -import Mathlib.NumberTheory.ModularForms.Identities -import Mathlib.NumberTheory.ModularForms.QExpansion +public import Mathlib.NumberTheory.ModularForms.QExpansion +public import LeanPool.LeanModularForms.ForMathlib.CongruenceSubgrps import LeanPool.LeanModularForms.ForMathlib.Identities -import Mathlib.RingTheory.PowerSeries.Basic /-! # q-expansions of modular forms (project-local extensions) @@ -23,6 +19,8 @@ variants that are parameterised by `Γ.width ∣ h` rather than `h ∈ Γ.strict the rest of the project still uses. -/ +@[expose] public section + open scoped Real NNReal MatrixGroups CongruenceSubgroup noncomputable section diff --git a/LeanPool/LeanModularForms/ForMathlib/SlashActions.lean b/LeanPool/LeanModularForms/ForMathlib/SlashActions.lean index e45eeaf100..5214268ba7 100644 --- a/LeanPool/LeanModularForms/ForMathlib/SlashActions.lean +++ b/LeanPool/LeanModularForms/ForMathlib/SlashActions.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Analysis.CStarAlgebra.Classes -import Mathlib.NumberTheory.ModularForms.SlashActions +public import Mathlib.NumberTheory.ModularForms.SlashActions /- This is from the Sphere Pack project, so might not actually be for mathlib.-/ @@ -14,6 +14,8 @@ import Mathlib.NumberTheory.ModularForms.SlashActions /-! # SlashActions -/ +@[expose] public section + local notation "GL(" n ", " R ")" "⁺" => @Matrix.GLPos (Fin n) R (instDecidableEqFin n) (Fin.fintype n) Real.linearOrderedCommRing diff --git a/LeanPool/LeanModularForms/ForMathlib/UpperHalfPlane.lean b/LeanPool/LeanModularForms/ForMathlib/UpperHalfPlane.lean index 17939ec947..ff1d9747c3 100644 --- a/LeanPool/LeanModularForms/ForMathlib/UpperHalfPlane.lean +++ b/LeanPool/LeanModularForms/ForMathlib/UpperHalfPlane.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup -import Mathlib.Data.Fintype.Parity +public import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup /- This is from the Sphere Pack project, so might not actually be for mathlib.-/ @@ -14,6 +14,8 @@ import Mathlib.Data.Fintype.Parity /-! # UpperHalfPlane -/ +@[expose] public section + theorem ModularGroup.modular_S_sq : S * S = -1 := by ext i j diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/ArcCalculus.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/ArcCalculus.lean index 2f91a09bde..dba9b9bb0f 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/ArcCalculus.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/ArcCalculus.lean @@ -3,24 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Tactic.Common -import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Analysis.Complex.AbsMax -import Mathlib.Analysis.Complex.Periodic -import Mathlib.Analysis.Complex.LocallyUniformLimit -import Mathlib.Analysis.SpecialFunctions.Complex.Circle -import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv -import Mathlib.Analysis.Calculus.FDeriv.Analytic -import Mathlib.Analysis.Calculus.ParametricIntegral -import Mathlib.Analysis.Asymptotics.Defs -import Mathlib.Analysis.Meromorphic.NormalForm -import Mathlib.MeasureTheory.Integral.CircleIntegral -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic -import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import Mathlib.RingTheory.LaurentSeries -import Mathlib.Topology.Homotopy.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import Mathlib.Analysis.SpecialFunctions.ExpDeriv +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Arc Calculus @@ -40,6 +31,8 @@ Used for computing winding numbers, distances, and derivatives along circular ar * `sin_pos_of_mem_Ioo_zero_pi` - sin is positive on (0, π) -/ +@[expose] public section + open Complex Real Set namespace ArcCalculus diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Basic.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Basic.lean index 21de87257d..fa1a3834ba 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Basic.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Basic.lean @@ -3,16 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Analysis.Asymptotics.Defs -import Mathlib.Analysis.Calculus.ContDiff.Basic -import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Analysis.Complex.LocallyUniformLimit -import Mathlib.Analysis.SpecialFunctions.Complex.Log -import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv -import Mathlib.MeasureTheory.Integral.CircleIntegral -import Mathlib.RingTheory.LaurentSeries -import Mathlib.Topology.Homotopy.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.Analysis.Calculus.MeanValue +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.DominatedConvergence /-! # Basic Definitions for Complex Analysis with Principal Values @@ -21,6 +19,8 @@ Core definitions for piecewise C¹ curves, Cauchy principal value integrals, and generalized winding numbers following Hungerbühler–Wasem. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Bridges.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Bridges.lean index 75ed545561..fc5439a4fa 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Bridges.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Bridges.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic -import Mathlib.Topology.Path +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Tactic.Positivity.Finset /-! # Bridge coercions from PiecewiseC1Curve to mathlib Path / ContinuousMap @@ -14,6 +17,8 @@ We provide `PiecewiseC1Curve.toPath` and `PiecewiseC1Curve.toContinuousMap` that rescale the domain `[a,b]` to the unit interval `[0,1]` via `iccHomeoI`. -/ +@[expose] public section + open Complex Set Topology unitInterval noncomputable section @@ -21,7 +26,7 @@ noncomputable section namespace PiecewiseC1Curve /-- The rescaling homeomorphism from `I = [0,1]` to `[a,b]`, as a subtype-valued map. -/ -private def rescale (γ : PiecewiseC1Curve) : I → Icc γ.a γ.b := +def rescale (γ : PiecewiseC1Curve) : I → Icc γ.a γ.b := (iccHomeoI γ.a γ.b γ.hab).symm private theorem rescale_continuous (γ : PiecewiseC1Curve) : @@ -43,10 +48,10 @@ private theorem rescale_one (γ : PiecewiseC1Curve) : The path goes from `γ(a)` to `γ(b)`. -/ def toPath (γ : PiecewiseC1Curve) : Path (γ.toFun γ.a) (γ.toFun γ.b) where toFun t := γ.toFun (γ.rescale t) - continuous_toFun := - γ.continuous_toFun.comp_continuous γ.rescale_continuous (fun t => γ.rescale_mem_Icc t) - source' := congrArg γ.toFun γ.rescale_zero - target' := congrArg γ.toFun γ.rescale_one + continuous_toFun := by + exact γ.continuous_toFun.comp_continuous γ.rescale_continuous (fun t => γ.rescale_mem_Icc t) + source' := by exact congrArg γ.toFun γ.rescale_zero + target' := by exact congrArg γ.toFun γ.rescale_one /-- Convert a `PiecewiseC1Curve` to a `ContinuousMap` from the unit interval to `ℂ`. -/ def toContinuousMap (γ : PiecewiseC1Curve) : C(I, ℂ) := diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/CauchyPrimitive.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/CauchyPrimitive.lean index f43b8d0476..8015138d19 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/CauchyPrimitive.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/CauchyPrimitive.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Analysis.Calculus.MeanValue +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Topology.Algebra.Module.ModuleTopology import Mathlib.Analysis.Calculus.ParametricIntervalIntegral -import Mathlib.Analysis.Complex.HasPrimitives +import Mathlib.Analysis.Complex.CauchyIntegral import Mathlib.MeasureTheory.Integral.IntervalIntegral.IntegrationByParts @@ -21,6 +24,8 @@ open set S via the segment integral F(z) = ∫₀¹ f(c + t(z-c))·(z-c) dt. * `holomorphic_convex_primitive` — holomorphic on convex open ⇒ has primitive -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/CurveAvoidance.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/CurveAvoidance.lean index c5dfc7ad93..efc4c1d277 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/CurveAvoidance.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/CurveAvoidance.lean @@ -3,25 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic -import Mathlib.Tactic.Common -import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Analysis.Complex.AbsMax -import Mathlib.Analysis.Complex.Periodic -import Mathlib.Analysis.Complex.LocallyUniformLimit -import Mathlib.Analysis.SpecialFunctions.Complex.Circle -import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv -import Mathlib.Analysis.Calculus.FDeriv.Analytic -import Mathlib.Analysis.Calculus.ParametricIntegral -import Mathlib.Analysis.Asymptotics.Defs -import Mathlib.Analysis.Meromorphic.NormalForm -import Mathlib.MeasureTheory.Integral.CircleIntegral -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic -import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import Mathlib.RingTheory.LaurentSeries -import Mathlib.Topology.Homotopy.Basic +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Topology.MetricSpace.HausdorffDistance +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Curve Avoidance API @@ -41,6 +30,8 @@ and establishing slitPlane membership for shifted curves. * `curve_sub_in_slitPlane` - shifted curve lands in slitPlane -/ +@[expose] public section + open Set Complex Metric /-- A continuous curve on [a,b] avoids a point z₀. -/ diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Cycle.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Cycle.lean index ec1b69cf9a..aed80350b4 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Cycle.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Cycle.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.Flatness +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase import LeanPool.LeanModularForms.GeneralizedResidueTheory.GeneralizedResidueTheorem -import Mathlib.Data.Finsupp.Defs +import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.DixonProof +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Integrality +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Contour Cycles @@ -33,6 +42,8 @@ contour integration and winding numbers extended by linearity. * `windingNumberCycle_isInt` -- winding number integrality. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/GeneralizedResidueTheorem.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/GeneralizedResidueTheorem.lean index b94f54ce1d..5e1da128cf 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/GeneralizedResidueTheorem.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/GeneralizedResidueTheorem.lean @@ -3,8 +3,22 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.Flatness +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase +import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.DixonProof +import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.Meromorphic +import LeanPool.LeanModularForms.GeneralizedResidueTheory.PrincipalValue +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.CPVExistence +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.HigherOrderAssembly +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.PerTermVanishing +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.PerTermVanishing.CPVHelpers +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Generalized Residue Theorem -- Public API @@ -26,6 +40,8 @@ All proofs delegate to the machinery in `HomologicalCauchy.lean` and Theorem 3.3. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Finset Real open scoped Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy.lean index f65303e6bf..9a1f4fc5f7 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.Basic -import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.DixonProof -import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.Meromorphic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.DixonProof +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.Meromorphic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Null-Homologous Curves and the Cauchy Integral Theorem @@ -17,3 +22,5 @@ Barrel file re-exporting the three submodules: * `DixonProof` — Dixon's proof: h₁, h₂, Liouville, Cauchy integral formula * `Meromorphic` — meromorphic contour integral vanishing, higher-order cancellation -/ + +@[expose] public section diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy/Basic.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy/Basic.lean index c8e110046f..a3c0479680 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy/Basic.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy/Basic.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic import LeanPool.LeanModularForms.GeneralizedResidueTheory.CauchyPrimitive -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PrincipalValue import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Invariance import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +import Mathlib.Analysis.Calculus.FDeriv.Mul +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus /-! # Null-Homologous Curves: Definitions and Convexity Bridge @@ -29,6 +34,8 @@ condition required by the generalized residue theorem of Hungerbuhler-Wasem. is null-homologous (bridge lemma) -/ +@[expose] public section + open Complex Set Filter Topology MeasureTheory intervalIntegral noncomputable section diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy/DixonProof.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy/DixonProof.lean index c54a361b74..503dc26418 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy/DixonProof.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy/DixonProof.lean @@ -3,18 +3,22 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.Basic +public import Mathlib.Analysis.Calculus.DSlope +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Invariance +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +import Mathlib.Analysis.Calculus.ParametricIntervalIntegral import Mathlib.Analysis.Complex.Liouville -import Mathlib.Analysis.Calculus.DSlope import Mathlib.Analysis.Complex.RemovableSingularity import Mathlib.Analysis.Normed.Group.ZeroAtInfty -import Mathlib.Analysis.Complex.HasPrimitives -import Mathlib.MeasureTheory.Measure.OpenPos -import Mathlib.Topology.MetricSpace.HausdorffDimension -import Mathlib.LinearAlgebra.Complex.FiniteDimensional import Mathlib.Analysis.Normed.Module.Connected -import Mathlib.Analysis.SpecialFunctions.Integrability.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.Complex.FiniteDimensional +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Topology.MetricSpace.HausdorffDimension /-! # Dixon's Proof of the Homological Cauchy Theorem @@ -40,6 +44,8 @@ is exactly mathlib's `dslope f z w`. We use this identification throughout. * `contourIntegral_eq_zero_of_nullHomologous` -- vanishing for holomorphic functions -/ +@[expose] public section + open Complex Set Filter Topology MeasureTheory intervalIntegral noncomputable section diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy/Meromorphic.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy/Meromorphic.lean index 948045b095..5cadf6dac0 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy/Meromorphic.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/HomologicalCauchy/Meromorphic.lean @@ -3,11 +3,23 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.Flatness import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.DixonProof -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +import LeanPool.LeanModularForms.GeneralizedResidueTheory.PrincipalValue import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.CPVExistence -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.HigherOrderAssembly +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.PerTermVanishing +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.PerTermVanishing.CPVHelpers +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MeromorphicPrincipalPart +import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Proposition22 +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Meromorphic Contour Integral Vanishing (Null-Homologous) @@ -28,6 +40,8 @@ zero residues vanish along null-homologous curves. PV residue sum convergence for null-homologous curves -/ +@[expose] public section + open Complex Set Filter Topology MeasureTheory intervalIntegral private lemma regularPart_update_differentiableOn (f : ℂ → ℂ) (s : ℂ) diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/CircleParam.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/CircleParam.lean index 782f97beaf..9cfff5de58 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/CircleParam.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/CircleParam.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Integrality +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +import Mathlib.Analysis.SpecialFunctions.ExpDeriv +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus /-! # Circle Parameterizations @@ -20,6 +25,8 @@ their winding number computations. * `circleParamCW_winding_eq_neg_one` — winding number = -1 -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/Integrality.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/Integrality.lean index 120be7315c..128ba45837 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/Integrality.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/Integrality.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic import Mathlib.Analysis.Calculus.FDeriv.Extend +import Mathlib.Analysis.SpecialFunctions.ExpDeriv +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus /-! # Winding Number Integrality @@ -30,6 +35,8 @@ that winding numbers of closed curves avoiding a point are integers. an integer -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/Invariance.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/Invariance.lean index 51554713c3..814d30375f 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/Invariance.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/Invariance.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Integrality +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Integrality +public import Mathlib.Analysis.Calculus.ContDiff.Defs import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.ParametricDiff +import Mathlib.Analysis.Calculus.MeanValue +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.DominatedConvergence /-! # Homotopy Invariance of Winding Numbers @@ -25,6 +31,8 @@ smooth), plus the classical winding number formula for curves avoiding a point. homotopy for holomorphic integrands -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/MathlibBridge.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/MathlibBridge.lean index a28c4e39c1..ceaf2493c6 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/MathlibBridge.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/MathlibBridge.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import Mathlib.MeasureTheory.Integral.CircleIntegral import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Invariance -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.CircleParam +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # Bridge to Mathlib Circle Integrals @@ -35,6 +39,8 @@ which in turn equals `(2πi)⁻¹ * circleIntegral (· - w)⁻¹ c R`. equals 1, via mathlib's `integral_sub_inv_of_mem_ball` -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/ParametricDiff.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/ParametricDiff.lean index c782b0ad9e..a7c0aa15d5 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/ParametricDiff.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Homotopy/ParametricDiff.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Analysis.Calculus.FDeriv.Symmetric +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import Mathlib.Analysis.Calculus.Deriv.Prod +import Mathlib.Analysis.Calculus.FDeriv.Symmetric import Mathlib.Analysis.Calculus.ParametricIntervalIntegral +import Mathlib.Analysis.Complex.CauchyIntegral /-! # Parametric Differentiation for Homotopy Integrals @@ -28,6 +31,8 @@ homotopy invariance of contour integrals. zero -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/LogDerivFTC.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/LogDerivFTC.lean index 48c9235348..bf9dc5ee79 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/LogDerivFTC.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/LogDerivFTC.lean @@ -3,25 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic -import Mathlib.Tactic.Common -import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Analysis.Complex.AbsMax -import Mathlib.Analysis.Complex.Periodic -import Mathlib.Analysis.Complex.LocallyUniformLimit -import Mathlib.Analysis.SpecialFunctions.Complex.Circle +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv -import Mathlib.Analysis.Calculus.FDeriv.Analytic -import Mathlib.Analysis.Calculus.ParametricIntegral -import Mathlib.Analysis.Asymptotics.Defs -import Mathlib.Analysis.Meromorphic.NormalForm -import Mathlib.MeasureTheory.Integral.CircleIntegral -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import Mathlib.RingTheory.LaurentSeries -import Mathlib.Topology.Homotopy.Basic /-! # FTC for Log-Derivative Integrals @@ -40,6 +29,8 @@ generalizing the specific computations used in winding number calculations. Common.lean version) -/ +@[expose] public section + open Set MeasureTheory Complex open scoped Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/OnCurvePV/Basic.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/OnCurvePV/Basic.lean index 52aa9e942d..d0f2ff5853 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/OnCurvePV/Basic.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/OnCurvePV/Basic.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import Mathlib.Analysis.Calculus.ContDiff.Defs +import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.StepBounds import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.UniformStepBound -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +import Mathlib.Analysis.Calculus.Deriv.Add +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # On-Curve Principal Value: General Infrastructure @@ -15,6 +23,8 @@ measurability of cutout integrands, arc angle injectivity, CPV avoidance and concatenation lemmas. These results work for arbitrary curves and functions. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/AnnulusBounds.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/AnnulusBounds.lean index ae88f7cc23..a439d7b817 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/AnnulusBounds.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/AnnulusBounds.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.GammaAnalysis +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.RemainderAnalysis import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.StepBounds +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # PV Infrastructure: Annulus Bounds @@ -25,6 +29,8 @@ crossing points, used in the dyadic PV convergence proof. bound on singular annulus integral -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/GammaAnalysis.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/GammaAnalysis.lean index 745e8ccd8c..a4b0ce13c3 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/GammaAnalysis.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/GammaAnalysis.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Analysis.Calculus.ContDiff.Basic -import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.Deriv.Slope -import Mathlib.Analysis.Complex.Basic -import Mathlib.Analysis.SpecificLimits.Basic /-! # PV Infrastructure: Gamma Analysis @@ -26,6 +25,8 @@ used in the dyadic PV limit proof for principal value convergence. outside nbhd -/ +@[expose] public section + open Complex Set Filter Topology open scoped Real diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/RemainderAnalysis.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/RemainderAnalysis.lean index 04c91284c2..c9b324bb8a 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/RemainderAnalysis.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/RemainderAnalysis.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.Analysis.InnerProductSpace.Basic import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.GammaAnalysis -import Mathlib.Analysis.Calculus.ContDiff.Defs -import Mathlib.Analysis.Calculus.Taylor -import Mathlib.Analysis.Normed.Operator.NormedSpace -import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.Analysis.Calculus.ContDiff.Comp +import Mathlib.Analysis.Calculus.ContDiff.RCLike +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # PV Infrastructure: Remainder Analysis @@ -25,6 +26,8 @@ The key result `remainder_bounded_of_C2` shows that the remainder * `quadratic_approx_of_contDiffAt_two` — quadratic Taylor approximation -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/SingularAnnulus.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/SingularAnnulus.lean index ba2790e24a..ed6d4113bb 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/SingularAnnulus.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/SingularAnnulus.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.AnnulusBounds +import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.GammaAnalysis +import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.StepBounds +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # PV Infrastructure: Singular Annulus Bounds @@ -20,6 +27,8 @@ bound used in the dyadic PV convergence proof. * `singular_annulus_bound_explicit` — epsilon-independent bound on singular integral -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/StepBounds.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/StepBounds.lean index 38eb5acb47..219e5976ab 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/StepBounds.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/StepBounds.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.GammaAnalysis -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.RemainderAnalysis import Mathlib.Analysis.SpecialFunctions.Integrals.Basic /-! @@ -29,6 +31,8 @@ cutoff integrals converge along dyadic subsequences. integral -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/UniformStepBound.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/UniformStepBound.lean index 999001d5d4..e85e19c66e 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/UniformStepBound.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PVInfrastructure/UniformStepBound.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.AnnulusBounds +import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.GammaAnalysis +import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.RemainderAnalysis import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.SingularAnnulus +import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.StepBounds +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # PV Infrastructure: Uniform Step Bound @@ -20,6 +28,8 @@ annulus bound into a single epsilon-independent estimate. with epsilon-independent constant -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PiecewiseCurveAPI.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PiecewiseCurveAPI.lean index 2ab80a5fa7..ce1ed0b958 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PiecewiseCurveAPI.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PiecewiseCurveAPI.lean @@ -3,25 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic -import Mathlib.Tactic.Common -import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Analysis.Complex.AbsMax -import Mathlib.Analysis.Complex.Periodic -import Mathlib.Analysis.Complex.LocallyUniformLimit -import Mathlib.Analysis.SpecialFunctions.Complex.Circle -import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv -import Mathlib.Analysis.Calculus.FDeriv.Analytic -import Mathlib.Analysis.Calculus.ParametricIntegral -import Mathlib.Analysis.Asymptotics.Defs -import Mathlib.Analysis.Meromorphic.NormalForm -import Mathlib.MeasureTheory.Integral.CircleIntegral -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic -import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import Mathlib.RingTheory.LaurentSeries -import Mathlib.Topology.Homotopy.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Tactic.Positivity.Finset /-! # Piecewise C¹ Curve API @@ -40,6 +27,8 @@ consecutive segment defined by the partition. each consecutive interval [pᵢ, pᵢ₊₁] -/ +@[expose] public section + open Set MeasureTheory Complex namespace PiecewiseC1Curve diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PrincipalValue.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PrincipalValue.lean index 8b8f9d9ecb..e060ce633e 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/PrincipalValue.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/PrincipalValue.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.DominatedConvergence +import Mathlib.Tactic.Positivity.Finset /-! # Cauchy Principal Value Theory @@ -13,6 +18,8 @@ Theory of Cauchy principal value integrals for piecewise C¹ contour integration The principal value approach allows contours to pass through singularities. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue.lean index 60c145b718..c83dcb264a 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import Mathlib.Analysis.Analytic.Basic import LeanPool.LeanModularForms.GeneralizedResidueTheory.CauchyPrimitive import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Invariance -import Mathlib.Topology.Order.ExtendFrom +import Mathlib.Analysis.Complex.RemovableSingularity +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! @@ -30,6 +35,8 @@ generalized residue theorem for piecewise C¹ immersions. * `pv_integral_simple_pole` — PV of c/(z-s) = 2πi · winding · c -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/Flatness.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/Flatness.lean index 20c03df41a..532ee03807 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/Flatness.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/Flatness.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue -import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber -import Mathlib.Analysis.Meromorphic.Order +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +public import Mathlib.Analysis.Meromorphic.Order +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Defs +import Mathlib.Analysis.Calculus.FDeriv.Extend +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Flatness and Higher-Order Pole Conditions (Definition 3.2) @@ -33,6 +38,8 @@ the generalized residue theorem with higher-order poles. Reference: Hungerbuhler-Wasem, arXiv:1808.00997v2, Definition 3.2. -/ +@[expose] public section + open Complex Set Filter Topology Asymptotics open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer.lean index 1f19b35eb4..619ad5e26a 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.Flatness +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase +import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.Meromorphic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Generalized Residue Theorem (Theorem 3.3) -- Convex Domain Corollary @@ -22,6 +29,8 @@ built from `conditionsAB_imply_higherOrderCancel_nh` and conditions (A')+(B), convex domain. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Finset Real open scoped Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/BoundaryVanishing.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/BoundaryVanishing.lean index afde9020de..0b0144c91b 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/BoundaryVanishing.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/BoundaryVanishing.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.Flatness +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.Flatness +import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Proposition22 +import Mathlib.Analysis.Calculus.FDeriv.Extend +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.MeasureTheory.Integral.DivergenceTheorem /-! # Boundary Vanishing for Higher-Order Polar Terms @@ -19,6 +27,8 @@ angle conditions with flatness rate (L3). * `cutoff_zpow_infrastructure`: full infrastructure for cutoff zpow integrals -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Finset Real open scoped Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/CPVExistence.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/CPVExistence.lean index 6a857cbbaa..475b303813 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/CPVExistence.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/CPVExistence.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.HigherOrderAssembly +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.CrossingAnalysis +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.MeasureTheory.Integral.DominatedConvergence +import Mathlib.Tactic.Positivity.Finset /-! # CPV Existence for Inverse along Piecewise C¹ Immersions @@ -19,6 +28,8 @@ null-homologous residue theorems. with a unique crossing through `z₀`. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Finset Real open scoped Interval @@ -52,6 +63,8 @@ private lemma continuousOn_cutoff_integral have hM_nn : 0 ≤ M := (norm_nonneg _).trans (hM γ.a (left_mem_Icc.mpr γ.hab.le)) have hε₀_pos : (0 : ℝ) < ε₀ := hε₀.1 have hε₀_half : (0 : ℝ) < ε₀ / 2 := by linarith + have hbound_nonneg : 0 ≤ (ε₀ / 2)⁻¹ * M := + mul_nonneg (inv_nonneg.mpr hε₀_half.le) hM_nn have h_level_null : volume {t ∈ Icc γ.a γ.b | ‖γ.toFun t - z₀‖ = ε₀} = 0 := by obtain ⟨σ₁, σ₂, hσ₁_ge, hσ₁_lt, hσ₂_gt, hσ₂_le, hσ₁_val, hσ₂_val, h_left, h_right, h_mid⟩ := hbnd ε₀ hε₀ @@ -141,7 +154,7 @@ private lemma continuousOn_cutoff_integral · rw [norm_mul, norm_inv] exact mul_le_mul (inv_anti₀ hε₀_half (le_of_lt (lt_trans hε.1 h))) (hM t ht) (norm_nonneg _) (inv_nonneg.mpr hε₀_half.le) - · simp_all) + · simpa only [norm_zero] using hbound_nonneg) ).aestronglyMeasurable.mono_measure (by rw [Set.uIoc_of_le γ.hab.le]) · filter_upwards [Ioo_mem_nhds (by linarith : ε₀ / 2 < ε₀) @@ -152,7 +165,7 @@ private lemma continuousOn_cutoff_integral rw [norm_mul, norm_inv] exact mul_le_mul (inv_anti₀ hε₀_half (le_of_lt (lt_trans hε.1 h))) (hM t (Ioc_subset_Icc_self ht)) (norm_nonneg _) (inv_nonneg.mpr hε₀_half.le) - · simp_all + · simpa only [norm_zero] using hbound_nonneg · exact intervalIntegrable_const · rw [Set.uIoc_of_le γ.hab.le] have h_ae : ∀ᵐ t ∂volume, @@ -265,7 +278,8 @@ lemma cpv_exists_inv_sub_of_closed_unique rw [← Int.cast_abs] at hz_ball ⊢ exact_mod_cast h1 linarith [mul_le_mul_of_nonneg_right h_int_pos (le_of_lt h2pi_pos)] - · simp_all + · rintro rfl + exact ⟨by simpa only [dist_self] using h2pi_pos, hy⟩ intro ε₁ hε₁ ε₂ hε₂ exact isPreconnected_Ioo.constant_of_mapsTo ⟨hT_disc⟩ h_phi_cont h_maps hε₁ hε₂ have hη2 : η / 2 ∈ Ioo (0 : ℝ) η := ⟨by linarith, by linarith⟩ diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/CutoffInfrastructure.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/CutoffInfrastructure.lean index 772420e9ad..e0935d0bf6 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/CutoffInfrastructure.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/CutoffInfrastructure.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.Flatness import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.BoundaryVanishing +import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.CrossingAnalysis +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Cutoff zpow Infrastructure @@ -20,6 +27,8 @@ vanishing foundations to provide the `cutoff_zpow_infrastructure` lemma. * `cutoff_zpow_infrastructure` — combined FTC + direction infrastructure -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/HigherOrderAssembly.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/HigherOrderAssembly.lean index 37fbadf301..4080b2d6a6 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/HigherOrderAssembly.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/HigherOrderAssembly.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.Flatness +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase +import LeanPool.LeanModularForms.GeneralizedResidueTheory.PrincipalValue import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.PerTermVanishing import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.PerTermVanishing.CPVHelpers import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MeromorphicPrincipalPart +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Higher-Order Cancellation Assembly @@ -24,6 +33,8 @@ The convex-domain specializations (`higherOrderCancel_assembly`, `conditionsAB_imply_higherOrderCancel`) are in `FlatnessTransfer.lean`. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Finset Real open scoped Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/PerTermVanishing.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/PerTermVanishing.lean index 0cf46647bc..b14f1fe594 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/PerTermVanishing.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/PerTermVanishing.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.Flatness +import LeanPool.LeanModularForms.GeneralizedResidueTheory.OnCurvePV.Basic import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.BoundaryVanishing import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.CutoffInfrastructure -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MultipointPV +import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Proposition22 +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Per-Term PV Vanishing and CPV Helpers @@ -22,6 +32,8 @@ integrals, multi-point CPV, holomorphic CPV vanishing, and assembly helpers. * `tendsto_cpv_of_continuousOn_zero_integral`: CPV → 0 for continuous functions with zero integral -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Finset Real open scoped Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/PerTermVanishing/CPVHelpers.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/PerTermVanishing/CPVHelpers.lean index be2437dc8c..ff67196a60 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/PerTermVanishing/CPVHelpers.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/FlatnessTransfer/PerTermVanishing/CPVHelpers.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase +public import Mathlib.Analysis.Meromorphic.Basic +import LeanPool.LeanModularForms.GeneralizedResidueTheory.CauchyPrimitive import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.FlatnessTransfer.PerTermVanishing +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MultipointPV +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Per-Term PV Vanishing: CPV Helpers and Assembly @@ -23,6 +33,8 @@ per-term vanishing into the complete higher-order cancellation. * `cpv_tendsto_zero_of_add_decomposition` — final assembly -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/GeneralizedTheorem.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/GeneralizedTheorem.lean index 5e6de3d156..9e171f9eb4 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/GeneralizedTheorem.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/GeneralizedTheorem.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.GeneralizedResidueTheorem +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.GeneralizedResidueTheorem + +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Residue/GeneralizedTheorem (legacy stub) @@ -15,3 +22,5 @@ The original file under `Residue/GeneralizedTheorem.lean` re-declared parts of the project — `Cycle.lean`, `ViazovskaMagicFunction.lean` — actually import). We retire this duplicate as a re-export. -/ + +@[expose] public section diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/GeneralizedTheoremBase.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/GeneralizedTheoremBase.lean index 49c70a4ab5..50a6ca5c01 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/GeneralizedTheoremBase.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/GeneralizedTheoremBase.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MultipointPV +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +public import Mathlib.MeasureTheory.Integral.CircleIntegral +import LeanPool.LeanModularForms.GeneralizedResidueTheory.CauchyPrimitive +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Integrality +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MeasureHelpers import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MultipointPV.DominatedConvergence -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.Flatness -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.SectorCurveLemma -import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Proposition22 -import Mathlib.Analysis.Meromorphic.Order +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Generalized Residue Theorem -- Base Infrastructure @@ -36,6 +42,8 @@ The convex-domain theorems `generalizedResidueTheorem`, where they are proved as corollaries of the null-homologous versions. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Metric open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MathlibBridge.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MathlibBridge.lean index bcb7407506..586ed10411 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MathlibBridge.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MathlibBridge.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase -import Mathlib.Analysis.Meromorphic.NormalForm +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase +public import Mathlib.Analysis.Meromorphic.Order +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Bridge: Project `residueAt` and Mathlib `MeromorphicAt` @@ -30,6 +36,8 @@ For higher-order poles, the project's `residueAt_eq_laurent_head_coeff` (in Laurent coefficient. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Metric open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MeasureHelpers.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MeasureHelpers.lean index 5d1096bc36..7d6ebaab07 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MeasureHelpers.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MeasureHelpers.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import Mathlib.Analysis.Calculus.Deriv.Inverse +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.MeasureTheory.Measure.Lebesgue.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Measure Theory Helpers for Residue Theory @@ -13,6 +21,8 @@ Countability of isolated point sets and measure-zero results for preimages of singletons under piecewise C¹ immersions. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Metric open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MeromorphicLaurent.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MeromorphicLaurent.lean index b47d391a65..a2729c7256 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MeromorphicLaurent.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MeromorphicLaurent.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MeromorphicPrincipalPart -import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase +public import Mathlib.Analysis.Meromorphic.Basic +import LeanPool.LeanModularForms.GeneralizedResidueTheory.HomologicalCauchy.Meromorphic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Convex-Domain Contour Vanishing for Meromorphic Functions @@ -29,6 +35,8 @@ These are now thin wrappers around: * Mathlib `MeromorphicAt`, `meromorphicOrderAt` -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Metric open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MeromorphicPrincipalPart.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MeromorphicPrincipalPart.lean index 46d0409cac..6af33b2866 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MeromorphicPrincipalPart.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MeromorphicPrincipalPart.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase -import LeanPool.LeanModularForms.GeneralizedResidueTheory.CauchyPrimitive +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase -- Note: Does NOT import FlatnessTransfer to avoid circular dependencies. -- The zpow FTC lemmas used here are reproved locally. +public import Mathlib.Analysis.Meromorphic.Order +import LeanPool.LeanModularForms.GeneralizedResidueTheory.PrincipalValue +import Mathlib.Analysis.Complex.CauchyIntegral import Mathlib.Analysis.Meromorphic.NormalForm -import Mathlib.MeasureTheory.Integral.CircleIntegral +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Meromorphic Laurent Principal Parts @@ -49,6 +55,8 @@ of pp = 0. * Mathlib `MeromorphicAt`, `meromorphicOrderAt` -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Metric open scoped Real Interval @@ -71,11 +79,11 @@ This equals `sum_{j=1}^{N} c_j / (z-s)^j` where `c_j = g^{(N-j)}(s) / (N-j)!`. If `f` is analytic at `s` (order >= 0) or not meromorphic, the principal part is 0. -/ /-- Helper: extract the pole order as a natural number from meromorphic data. -/ -private noncomputable def poleOrderNat (f : ℂ → ℂ) (s : ℂ) : ℕ := +noncomputable def poleOrderNat (f : ℂ → ℂ) (s : ℂ) : ℕ := (-(meromorphicOrderAt f s).untop₀).toNat /-- Helper: extract the analytic factor g from the meromorphic decomposition. -/ -private noncomputable def meromorphicFactor (f : ℂ → ℂ) (s : ℂ) +noncomputable def meromorphicFactor (f : ℂ → ℂ) (s : ℂ) (hf : MeromorphicAt f s) (hne : meromorphicOrderAt f s ≠ ⊤) : ℂ → ℂ := ((meromorphicOrderAt_ne_top_iff hf).mp hne).choose diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MultipointPV.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MultipointPV.lean index adb5963132..6c1e40019b 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MultipointPV.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MultipointPV.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MeasureHelpers -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.MeasureTheory.Integral.DominatedConvergence +import Mathlib.Tactic.Positivity.Finset /-! # Multi-point Principal Value Infrastructure @@ -27,6 +32,8 @@ sums of single-point PVs. sum of single-point PVs when regular integral vanishes -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Metric open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MultipointPV/DominatedConvergence.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MultipointPV/DominatedConvergence.lean index a548167311..c353fc2d40 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MultipointPV/DominatedConvergence.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/MultipointPV/DominatedConvergence.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MultipointPV +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Multi-point PV: Dominated Convergence @@ -21,6 +27,8 @@ a.e. limit, norm bounds, measurability, and the main convergence theorems. single-point PVs when regular integral vanishes -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Metric open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/SectorCurve.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/SectorCurve.lean index 43a1e42279..40c80c9fa9 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/SectorCurve.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/SectorCurve.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PrincipalValue +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # Sector Curve PV Computation (Lemma 3.1) @@ -45,6 +46,8 @@ The PV of `dz/z` along this curve decomposes as: Reference: Hungerbuhler-Wasem, arXiv:1808.00997v2, Lemma 3.1. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/SectorCurveLemma.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/SectorCurveLemma.lean index 2335b407a4..7ff9fe4817 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/SectorCurveLemma.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/Residue/SectorCurveLemma.lean @@ -3,8 +3,20 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ - -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.SectorCurve +module + +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.SectorCurve +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +import LeanPool.LeanModularForms.GeneralizedResidueTheory.CauchyPrimitive +import LeanPool.LeanModularForms.GeneralizedResidueTheory.PrincipalValue +import Mathlib.Analysis.Calculus.Deriv.ZPow +import Mathlib.Analysis.SpecialFunctions.ExpDeriv +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.MeasureTheory.Integral.DivergenceTheorem +import Mathlib.MeasureTheory.Integral.DominatedConvergence /-! # Sector Curve PV Lemmas @@ -21,6 +33,8 @@ model sector-curve defined in `SectorCurve.lean`. * `generalizedWindingNumber_sectorCurve` -- winding number equals `alpha / (2 * pi)` -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber.lean index b033f37cd7..2049ec509b 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Defs -import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.CrossingAnalysis -import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Decomposition +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Defs +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.CrossingAnalysis +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Decomposition +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Winding Number Theory @@ -17,3 +22,5 @@ Barrel file re-exporting the three submodules: * `CrossingAnalysis` — monotonicity, cutoff boundaries, direction convergence * `Decomposition` — H-W Prop 2.2, main decomposition theorems -/ + +@[expose] public section diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/CrossingAnalysis.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/CrossingAnalysis.lean index b5c9158db6..c4c499db9a 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/CrossingAnalysis.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/CrossingAnalysis.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Defs -import Mathlib.Analysis.InnerProductSpace.Calculus +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Defs +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue import Mathlib.Analysis.Calculus.Deriv.MeanValue -import Mathlib.Analysis.SpecialFunctions.Pow.Deriv import Mathlib.Analysis.Calculus.FDeriv.Extend +import Mathlib.Analysis.InnerProductSpace.Calculus +import Mathlib.Analysis.SpecialFunctions.ExpDeriv +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus /-! # Winding Number: Crossing Analysis @@ -25,6 +32,8 @@ Contains the core monotonicity, cutoff boundary, and direction convergence lemma * `tendsto_exp_cutoff_integral_crossing` — exp(R(ε)) → exp(-iα) -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/Decomposition.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/Decomposition.lean index b07ad8b630..fc49e80104 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/Decomposition.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/Decomposition.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Defs +public import Mathlib.Analysis.Calculus.ContDiff.Defs import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.CrossingAnalysis +import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Proposition22 +import Mathlib.Analysis.Calculus.Deriv.Add +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Winding Number: H-W Decomposition Theorems @@ -23,6 +32,8 @@ winding contribution and crossing angle contributions. * `windingNumberWithAngles_union` — additivity over disjoint crossings -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/Defs.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/Defs.lean index d183437bad..25880aa20d 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/Defs.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/Defs.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PrincipalValue -import LeanPool.LeanModularForms.GeneralizedResidueTheory.WindingNumber.Proposition22 -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Integrality +public import Mathlib.Analysis.Calculus.FDeriv.Add + +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # Winding Number: Definitions and Simple Results @@ -30,6 +32,8 @@ including the Hungerbühler-Wasem angle-based approach. * `angleAtCrossing_translate` — translation invariance of crossing angle -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/Proposition22.lean b/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/Proposition22.lean index 7788cc4cce..3bea9273e3 100644 --- a/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/Proposition22.lean +++ b/LeanPool/LeanModularForms/GeneralizedResidueTheory/WindingNumber/Proposition22.lean @@ -3,16 +3,19 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import Mathlib.Analysis.Calculus.ContDiff.Defs import LeanPool.LeanModularForms.GeneralizedResidueTheory.OnCurvePV.Basic -import Mathlib.Topology.Compactness.Compact +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +import Mathlib.Analysis.Calculus.ContDiff.Deriv import Mathlib.Analysis.Calculus.Deriv.Inverse -import Mathlib.Analysis.Calculus.Deriv.Add -import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.MeanValue -import Mathlib.Analysis.Calculus.FDeriv.Comp -import Mathlib.Analysis.Calculus.FDeriv.Linear +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Proposition 2.2: Finite Crossings and Isolated Crossing Intervals @@ -34,6 +37,8 @@ also gives isolation on each side via strict monotonicity of a real projection. The crossing set is closed and has no accumulation points, hence finite by compactness. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing.lean b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing.lean index 27c479e42a..5b73adfcf4 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing.lean @@ -3,14 +3,20 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Basic -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Multiplication -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Module -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Associativity -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Ring -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Degree -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Commutativity +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Basic +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Multiplication +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Module +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Associativity +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Ring +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Degree +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Commutativity +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Construction of Hecke rings following Shimura @@ -25,3 +31,5 @@ This file re-exports the Hecke ring construction, split across: * `Ring` — `Ring (𝕋 P ℤ)` instance and user-facing API * `Degree` — degree ring homomorphism `deg : 𝕋 P ℤ →+* ℤ` (Shimura Prop 3.3) -/ + +@[expose] public section diff --git a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Associativity.lean b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Associativity.lean index b8e8a3921c..d7ee7350d9 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Associativity.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Associativity.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Module +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Module +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Finsupp.Pointwise +import Mathlib.Data.Finsupp.SMul +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Hecke Rings: Associativity @@ -14,6 +22,8 @@ which is equivalent to associativity of multiplication in the Hecke ring. This i Proposition 3.4. -/ +@[expose] public section + open MulOpposite Set DoubleCoset Subgroup Subgroup.Commensurable open scoped Pointwise diff --git a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Basic.lean b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Basic.lean index 7977df8d93..bd6078c579 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Basic.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Basic.lean @@ -3,16 +3,17 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Algebra.Lie.OfAssociative -import Mathlib.Analysis.Normed.Lp.WithLp -import Mathlib.Analysis.Normed.Ring.Lemmas -import Mathlib.Data.Finsupp.Pointwise -import Mathlib.Data.Int.Star -import Mathlib.GroupTheory.Commensurable -import Mathlib.GroupTheory.DoubleCoset +public import Mathlib.GroupTheory.Commensurable +public import Mathlib.GroupTheory.DoubleCoset +public import Mathlib.Algebra.Group.Finsupp +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations import Mathlib.Order.CompletePartialOrder -import Mathlib.Tactic.Group +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Hecke Rings: Basic Definitions @@ -22,6 +23,8 @@ spaces `HeckeCoset` and `HeckeLeftCoset`, the Hecke ring type `𝕋`, and founda lemmas. -/ +@[expose] public section + open MulOpposite Set DoubleCoset Subgroup Subgroup.Commensurable open scoped Pointwise diff --git a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Commutativity.lean b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Commutativity.lean index 352041743e..5569235e7e 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Commutativity.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Commutativity.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ - -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Ring +module + +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Ring +import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Associativity +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Finsupp.SMulWithZero +import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Hecke Rings: Commutativity via Anti-Involution @@ -14,6 +23,8 @@ Shimura Proposition 3.8: if an arithmetic group pair admits an anti-automorphism Hecke ring `𝕋 P ℤ` is commutative. -/ +@[expose] public section + open MulOpposite Set DoubleCoset Subgroup Subgroup.Commensurable Finsupp open scoped Pointwise diff --git a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Degree.lean b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Degree.lean index 22dd52ba61..330d9293d2 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Degree.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Degree.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Ring +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Ring +import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Associativity +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Hecke Rings: Degree Map @@ -36,6 +44,8 @@ result is `coeffSum(f • m) = deg(f) * coeffSum(m)`, which follows from the orb lemma `smulOrbit_card`. -/ +@[expose] public section + open MulOpposite Set DoubleCoset Subgroup Subgroup.Commensurable open scoped Pointwise diff --git a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Module.lean b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Module.lean index 6fd2ec7ab7..2b6c3a3e78 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Module.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Module.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Multiplication +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Multiplication +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Finsupp.Pointwise +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Hecke Rings: Module Action @@ -13,6 +20,8 @@ The module action of `𝕋 P ℤ` on `HeckeModule P ℤ` (formal sums of left co theorem `eq_of_smul_eq_smul_𝕋`. -/ +@[expose] public section + open MulOpposite Set DoubleCoset Subgroup Subgroup.Commensurable open scoped Pointwise diff --git a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Multiplication.lean b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Multiplication.lean index 51faa17668..06ad408534 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Multiplication.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Multiplication.lean @@ -3,8 +3,20 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ - -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Basic +module + +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Basic +public import Mathlib.Algebra.BigOperators.Finsupp.Basic +public import Mathlib.Order.CompletePartialOrder +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.ToAdditive +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Finsupp.SMulWithZero +import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Hecke Rings: Multiplication @@ -14,6 +26,8 @@ on `𝕋 P ℤ`, and the `NonUnitalNonAssocSemiring` instance. Proves that `HeckeCoset.one` is the identity element. -/ +@[expose] public section + open MulOpposite Set DoubleCoset Subgroup Subgroup.Commensurable open scoped Pointwise @@ -109,8 +123,8 @@ of their product `H(σ_i τ_j)H`. -/ noncomputable def mulMap (g₁ g₂ : P.Δ) (i : decompQuot P g₁ × decompQuot P g₂) : HeckeCoset P := ⟦⟨i.1.out * g₁ * (i.2.out * g₂), - Submonoid.mul_mem _ (mul_mem_delta P.H P.Δ i.1.out g₁ P.h₀) - (mul_mem_delta P.H P.Δ i.2.out g₂ P.h₀)⟩⟧ + Submonoid.mul_mem _ (by exact mul_mem_delta P.H P.Δ i.1.out g₁ P.h₀) + (by exact mul_mem_delta P.H P.Δ i.2.out g₂ P.h₀)⟩⟧ /-- Shimura's multiplicity (Proposition 3.2): `heckeMultiplicity(g₁, g₂, d)` counts pairs `(i,j)` such that `σᵢ τⱼ H = ξ H`. -/ diff --git a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Ring.lean b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Ring.lean index f84d0fe6af..348d9000b4 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Ring.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/AbstractHeckeRing/Ring.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Module import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Associativity +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Finsupp.SMul +import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Hecke Rings: Ring Instance and API @@ -12,6 +21,8 @@ import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Associativity The `Ring (𝕋 P ℤ)` instance and user-facing API lemmas for working with Hecke rings. -/ +@[expose] public section + open MulOpposite Set DoubleCoset Subgroup Subgroup.Commensurable open scoped Pointwise diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GL2/Basic.lean b/LeanPool/LeanModularForms/HeckeRIngs/GL2/Basic.lean index 5596266eb1..8c8dc14fa8 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GL2/Basic.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GL2/Basic.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Ring +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.DiagonalCosets +import LeanPool.LeanModularForms.HeckeRIngs.GLn.CoprimeMul import LeanPool.LeanModularForms.HeckeRIngs.GLn.PrimeDecomposition +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # GL₂ Hecke Algebra: Definitions for Theorem 3.24 @@ -23,6 +33,8 @@ structural lemmas for Shimura's Theorem 3.24. * Shimura, Theorem 3.24 -/ +@[expose] public section + open Matrix Subgroup.Commensurable Pointwise HeckeRing DoubleCoset HeckeRing.GLn open scoped Pointwise diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GL2/CongruenceIndex.lean b/LeanPool/LeanModularForms/HeckeRIngs/GL2/CongruenceIndex.lean index d87867bd18..054a62fb7a 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GL2/CongruenceIndex.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GL2/CongruenceIndex.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups -import Mathlib.GroupTheory.Index +public import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups import Mathlib.Data.ZMod.Units /-! @@ -24,6 +24,8 @@ Computes the index `[SL₂(ℤ) : Γ₀(pᵏ)] = pᵏ⁻¹(p + 1)` for prime `p` * Shimura, Theorem 3.24 -/ +@[expose] public section + open Matrix.SpecialLinearGroup Matrix ModularGroup CongruenceSubgroup open scoped MatrixGroups diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GL2/Degree.lean b/LeanPool/LeanModularForms/HeckeRIngs/GL2/Degree.lean index a901fccc52..4800bf9e67 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GL2/Degree.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GL2/Degree.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Degree +public import LeanPool.LeanModularForms.HeckeRIngs.GL2.Basic +public import Mathlib.NumberTheory.ArithmeticFunction.Misc import LeanPool.LeanModularForms.HeckeRIngs.GL2.MultiplicationTable +import LeanPool.LeanModularForms.HeckeRIngs.GLn.Degree +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Degree formulas for GL₂ Hecke operators @@ -23,6 +33,8 @@ Shimura Theorem 3.24, identities 6 and 7: degree formulas for the GL₂ Hecke al * Shimura, *Introduction to the Arithmetic Theory of Automorphic Functions*, Theorem 3.24 -/ +@[expose] public section + open HeckeRing HeckeRing.GLn HeckeRing.GL2 open scoped ArithmeticFunction.sigma diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GL2/HeckeAction.lean b/LeanPool/LeanModularForms/HeckeRIngs/GL2/HeckeAction.lean index 4862c576e0..f5fc1c3d26 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GL2/HeckeAction.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GL2/HeckeAction.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.HeckeRIngs.GL2.Basic -import LeanPool.LeanModularForms.HeckeRIngs.GLn.TransposeAntiInvolution -import Mathlib.NumberTheory.ModularForms.Basic +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.TransposeAntiInvolution +public import Mathlib.NumberTheory.ModularForms.SlashInvariantForms +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Hecke Operators on Modular Forms @@ -35,6 +37,8 @@ anti-involution preserving `Γ` and fixing every double coset (`GL_pair_onHeckeC * Shimura, *Introduction to the Arithmetic Theory of Automorphic Functions*, §3.4, Prop 3.30 -/ +@[expose] public section + open Matrix Matrix.SpecialLinearGroup Subgroup.Commensurable Pointwise open HeckeRing DoubleCoset HeckeRing.GLn open scoped Pointwise ModularForm MatrixGroups UpperHalfPlane diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GL2/HeckeModularForm.lean b/LeanPool/LeanModularForms/HeckeRIngs/GL2/HeckeModularForm.lean index 157c3ade3d..f82a2f6cc0 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GL2/HeckeModularForm.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GL2/HeckeModularForm.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.HeckeRIngs.GL2.HeckeAction +public import LeanPool.LeanModularForms.HeckeRIngs.GL2.HeckeAction +public import Mathlib.NumberTheory.ModularForms.Basic +import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Associativity /-! # Hecke Operators as Endomorphisms of Modular Forms @@ -23,6 +26,8 @@ proving holomorphicity, linearity, and boundedness at cusps. * Shimura, *Introduction to the Arithmetic Theory of Automorphic Functions*, §3.4 -/ +@[expose] public section + open Matrix Matrix.SpecialLinearGroup Subgroup.Commensurable Pointwise open HeckeRing DoubleCoset HeckeRing.GLn HeckeRing.GL2 open scoped Pointwise ModularForm MatrixGroups UpperHalfPlane Manifold diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GL2/MultiplicationTable.lean b/LeanPool/LeanModularForms/HeckeRIngs/GL2/MultiplicationTable.lean index b5e82a6ba0..2d6e705a91 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GL2/MultiplicationTable.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GL2/MultiplicationTable.lean @@ -3,12 +3,22 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.HeckeRIngs.GL2.Basic +public import LeanPool.LeanModularForms.HeckeRIngs.GL2.Basic +import LeanPool.LeanModularForms.HeckeRIngs.GLn.CoprimeMul import LeanPool.LeanModularForms.HeckeRIngs.GLn.Degree +import LeanPool.LeanModularForms.HeckeRIngs.GLn.PrimeDecomposition import LeanPool.LeanModularForms.HeckeRIngs.GLn.TransposeAntiInvolution +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations import Mathlib.Data.Finset.NatDivisors +import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Data.Int.Star import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Shimura Theorem 3.24: Multiplication Table for GL₂ Hecke Algebra @@ -28,6 +38,8 @@ Degree formulas (identities 6--7) are in `GL2.Degree`. * Shimura, *Introduction to the Arithmetic Theory of Automorphic Functions*, Theorem 3.24 -/ +@[expose] public section + open HeckeRing HeckeRing.GLn HeckeRing.GL2 open scoped ArithmeticFunction.sigma @@ -711,7 +723,7 @@ private lemma T_pp_comm_T_sum_ppow (k : ℕ) : TPp p * TSum ⟨p ^ k, pow_pos hp exact T_pp_comm_T_elem p hp _ (fun i' => by fin_cases i' <;> first | exact pow_pos hp.pos i | exact pow_pos hp.pos (k - i)) (fun i' hi' => by (have : i' = 0 := by omega); subst this; simpa using hdvd) - · simp [T_ad_eq_zero h, HA_mul_zero, HA_zero_mul] + · simp [T_ad_eq_zero h] private lemma T_pp_pow_comm_T_sum_ppow (i k : ℕ) : TPp p ^ i * TSum ⟨p ^ k, pow_pos hp.pos k⟩ = TSum ⟨p ^ k, pow_pos hp.pos k⟩ * TPp p ^ i := by diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GLn/Basic.lean b/LeanPool/LeanModularForms/HeckeRIngs/GLn/Basic.lean index 7ec2b21c72..2023a1df24 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GLn/Basic.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GLn/Basic.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Defs -import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup -import Mathlib.GroupTheory.Commensurable -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Basic +public import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Defs +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Basic +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # GL_n HeckePair @@ -30,6 +34,8 @@ This is the foundation for the Hecke ring of GL_n following Shimura §3.2. * `posDetInt_le_commensurator` — `Δ ⊆ commensurator(SL_n(ℤ))` -/ +@[expose] public section + open Matrix Subgroup.Commensurable Pointwise Matrix.SpecialLinearGroup namespace HeckeRing.GLn diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GLn/CoprimeMul.lean b/LeanPool/LeanModularForms/HeckeRIngs/GLn/CoprimeMul.lean index 63915e50a3..0f20cdaf51 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GLn/CoprimeMul.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GLn/CoprimeMul.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.HeckeRIngs.GLn.DiagonalCosets -import LeanPool.LeanModularForms.HeckeRIngs.GLn.CosetDecomposition -import LeanPool.LeanModularForms.HeckeRIngs.GLn.Degree -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Ring +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.DiagonalCosets +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Degree import LeanPool.LeanModularForms.HeckeRIngs.GLn.SLnTransvection +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Tactic.LinearCombination +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Coprime Product and Scalar Multiplication in the Hecke Ring @@ -27,6 +33,8 @@ Scalar double cosets T(c,...,c) act by scaling. * Shimura, *Introduction to the Arithmetic Theory of Automorphic Functions*, §3.2 -/ +@[expose] public section + open Matrix Subgroup.Commensurable Pointwise HeckeRing DoubleCoset Matrix.SpecialLinearGroup open scoped Pointwise diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GLn/CosetDecomposition.lean b/LeanPool/LeanModularForms/HeckeRIngs/GLn/CosetDecomposition.lean index 41125a3092..89655d1739 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GLn/CosetDecomposition.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GLn/CosetDecomposition.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.HeckeRIngs.GLn.DiagonalCosets +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.DiagonalCosets +import Mathlib.Analysis.Normed.Ring.Lemmas /-! # Left Coset Decomposition for GL_n Hecke Ring @@ -34,6 +36,8 @@ distinct left cosets. * Shimura, Proposition 3.22 -/ +@[expose] public section + open Matrix Subgroup.Commensurable Pointwise HeckeRing Matrix.SpecialLinearGroup namespace HeckeRing.GLn diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GLn/Degree.lean b/LeanPool/LeanModularForms/HeckeRIngs/GLn/Degree.lean index 03b5e151c4..3486a3c457 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GLn/Degree.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GLn/Degree.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.HeckeRIngs.GLn.CosetDecomposition -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Degree +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.CosetDecomposition +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Degree import LeanPool.LeanModularForms.HeckeRIngs.GL2.CongruenceIndex /-! @@ -43,6 +44,8 @@ function `ψ(d) = d · ∏_{p | d} (1 + 1/p)`. For the prime-power case needed f * Shimura, Proposition 3.14, 3.18, Theorem 3.24 -/ +@[expose] public section + open HeckeRing HeckeRing.GL2 Finset CongruenceSubgroup Matrix.SpecialLinearGroup Matrix ModularGroup open scoped Pointwise MatrixGroups diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GLn/DiagonalCosets.lean b/LeanPool/LeanModularForms/HeckeRIngs/GLn/DiagonalCosets.lean index c7adf98283..c93270bb7c 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GLn/DiagonalCosets.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GLn/DiagonalCosets.lean @@ -3,14 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.HeckeRIngs.GLn.Basic -import Mathlib.LinearAlgebra.Matrix.Transvection -import Mathlib.LinearAlgebra.FreeModule.PID -import Mathlib.RingTheory.PrincipalIdealDomain -import Mathlib.Algebra.EuclideanDomain.Int -import Mathlib.LinearAlgebra.Matrix.Basis +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.Basic +import Mathlib.Analysis.Normed.Ring.Lemmas import Mathlib.LinearAlgebra.Determinant +import Mathlib.LinearAlgebra.FreeModule.PID /-! # Diagonal Coset Representatives for GL_n Hecke Ring @@ -38,6 +36,8 @@ representative (elementary divisor theorem / Smith normal form). * Shimura, *Introduction to the Arithmetic Theory of Automorphic Functions*, §3.2 -/ +@[expose] public section + open Matrix Subgroup.Commensurable Pointwise HeckeRing Matrix.SpecialLinearGroup namespace HeckeRing.GLn @@ -58,7 +58,7 @@ this is a junk value that simplifies the API by avoiding an explicit positivity noncomputable def diagMat (a : Fin n → ℕ) : GL (Fin n) ℚ := if h : ∀ i, 0 < a i then GeneralLinearGroup.mkOfDetNeZero (Matrix.diagonal (fun i => (a i : ℚ))) - (natDiagDetNeZero n a h) + (by exact natDiagDetNeZero n a h) else 1 @[simp] lemma diagMat_val (a : Fin n → ℕ) (ha : ∀ i, 0 < a i) : @@ -192,7 +192,7 @@ private lemma transvection_det_ne_zero {i j : Fin n} (hij : i ≠ j) (c : ℤ) : noncomputable def transvectionGL {i j : Fin n} (hij : i ≠ j) (c : ℤ) : GL (Fin n) ℚ := GeneralLinearGroup.mkOfDetNeZero ((Matrix.TransvectionStruct.mk i j hij c).toMatrix.map (Int.cast : ℤ → ℚ)) - (transvection_det_ne_zero n hij c) + (by exact transvection_det_ne_zero n hij c) lemma transvectionGL_hasIntEntries {i j : Fin n} (hij : i ≠ j) (c : ℤ) : HasIntEntries n (transvectionGL n hij c) := diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GLn/PolynomialRing.lean b/LeanPool/LeanModularForms/HeckeRIngs/GLn/PolynomialRing.lean index 73183d7046..ee9fd8ba86 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GLn/PolynomialRing.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GLn/PolynomialRing.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.HeckeRIngs.GLn.PrimeDecomposition -import LeanPool.LeanModularForms.HeckeRIngs.GLn.TransposeAntiInvolution +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.PrimeDecomposition +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.TransposeAntiInvolution +public import LeanPool.LeanModularForms.HeckeRIngs.GL2.Basic import LeanPool.LeanModularForms.HeckeRIngs.GL2.MultiplicationTable -import Mathlib.RingTheory.MvPolynomial.Basic +import LeanPool.LeanModularForms.HeckeRIngs.GLn.CoprimeMul +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Polynomial Ring Structure of the p-local Hecke Ring @@ -31,6 +39,8 @@ ring `ℤ[X₁,...,Xₙ]` in `n` variables. * Shimura, *Introduction to the Arithmetic Theory of Automorphic Functions*, §3.2, Theorem 3.20 -/ +@[expose] public section + open Matrix Subgroup.Commensurable Pointwise HeckeRing DoubleCoset open scoped Pointwise diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GLn/PrimeDecomposition.lean b/LeanPool/LeanModularForms/HeckeRIngs/GLn/PrimeDecomposition.lean index af6fd22871..acdef97e55 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GLn/PrimeDecomposition.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GLn/PrimeDecomposition.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Ring +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.DiagonalCosets import LeanPool.LeanModularForms.HeckeRIngs.GLn.CoprimeMul -import Mathlib.Data.Nat.Factorization.Basic -import Mathlib.Data.Nat.GCD.BigOperators +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Prime Decomposition of Hecke Ring Elements @@ -33,6 +39,8 @@ Every `T(a₁,...,aₙ)` factors into a product of p-power `T`-elements via copr * Shimura, *Introduction to the Arithmetic Theory of Automorphic Functions*, §3.2 -/ +@[expose] public section + open Matrix Subgroup.Commensurable Pointwise HeckeRing DoubleCoset open scoped Pointwise @@ -181,7 +189,8 @@ end RpSubring section FullFactorization -private def ppowClosureSet (n : ℕ) [NeZero n] : Set (HeckeAlgebra n) := +/-- The Hecke elements represented by monotone prime-power diagonal matrices. -/ +def ppowClosureSet (n : ℕ) [NeZero n] : Set (HeckeAlgebra n) := { f | ∃ (p : ℕ) (_hp : p.Prime) (e : Fin n → ℕ) (_hmono : Monotone e), f = TElem (ppowDiag n p e) } diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GLn/SLnTransvection.lean b/LeanPool/LeanModularForms/HeckeRIngs/GLn/SLnTransvection.lean index 2bc10502aa..f30f69b1c1 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GLn/SLnTransvection.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GLn/SLnTransvection.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.LinearAlgebra.Matrix.Transvection -import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup +public import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup /-! # SL_n(ℤ) is generated by transvections @@ -19,6 +19,8 @@ transvection matrices `E_{ij}(c) = I + c·e_{ij}`. of transvections. -/ +@[expose] public section + /-- An elementary transvection in `SL_m(ℤ)`: the matrix `I + c·e_{ij}`. -/ def slTransvecG {m : ℕ} (i j : Fin m) (hij : i ≠ j) (c : ℤ) : Matrix.SpecialLinearGroup (Fin m) ℤ := diff --git a/LeanPool/LeanModularForms/HeckeRIngs/GLn/TransposeAntiInvolution.lean b/LeanPool/LeanModularForms/HeckeRIngs/GLn/TransposeAntiInvolution.lean index e8c4c0a4a8..ea49dc0eaf 100644 --- a/LeanPool/LeanModularForms/HeckeRIngs/GLn/TransposeAntiInvolution.lean +++ b/LeanPool/LeanModularForms/HeckeRIngs/GLn/TransposeAntiInvolution.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.HeckeRIngs.GLn.DiagonalCosets -import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Commutativity +public import LeanPool.LeanModularForms.HeckeRIngs.GLn.DiagonalCosets +public import LeanPool.LeanModularForms.HeckeRIngs.AbstractHeckeRing.Commutativity +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # GL_n Hecke Algebra Commutativity via Transpose @@ -21,6 +26,8 @@ gives commutativity of the Hecke ring. * `instCommRingHeckeAlgebra` -- `CommRing (HeckeAlgebra n)` -/ +@[expose] public section + open Matrix HeckeRing HeckeRing.GLn Matrix.SpecialLinearGroup namespace HeckeRing.GLn diff --git a/LeanPool/LeanModularForms/Modularforms/AtImInfty.lean b/LeanPool/LeanModularForms/Modularforms/AtImInfty.lean index 738880413d..afe8af07f6 100644 --- a/LeanPool/LeanModularForms/Modularforms/AtImInfty.lean +++ b/LeanPool/LeanModularForms/Modularforms/AtImInfty.lean @@ -6,7 +6,6 @@ Authors: Chris Birkbeck module -public import Mathlib.Analysis.Normed.Group.Tannery public import Mathlib.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty /-! # AtImInfty -/ diff --git a/LeanPool/LeanModularForms/Modularforms/BigO.lean b/LeanPool/LeanModularForms/Modularforms/BigO.lean index 52eb3489b6..7718e2c7d4 100644 --- a/LeanPool/LeanModularForms/Modularforms/BigO.lean +++ b/LeanPool/LeanModularForms/Modularforms/BigO.lean @@ -6,17 +6,19 @@ Authors: Chris Birkbeck module -public import Mathlib.Algebra.Order.Ring.Star -public import Mathlib.Analysis.CStarAlgebra.Classes -public import Mathlib.Data.Int.Star -public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.UniformConvergence +public import Mathlib.Analysis.Asymptotics.Defs +public import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.CStarAlgebra.Classes +import Mathlib.Data.Int.Star +import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Summable /-! # BigO -/ @[expose] public section -open ModularForm EisensteinSeries UpperHalfPlane TopologicalSpace Set +open EisensteinSeries UpperHalfPlane TopologicalSpace Set Metric Filter Function Complex open scoped Interval Real NNReal ENNReal Topology BigOperators Nat diff --git a/LeanPool/LeanModularForms/Modularforms/Cauchylems.lean b/LeanPool/LeanModularForms/Modularforms/Cauchylems.lean index 9fa472e0aa..8dc288e927 100644 --- a/LeanPool/LeanModularForms/Modularforms/Cauchylems.lean +++ b/LeanPool/LeanModularForms/Modularforms/Cauchylems.lean @@ -6,9 +6,11 @@ Authors: Chris Birkbeck module -public import LeanPool.LeanModularForms.Modularforms.IccIcoLems -public import LeanPool.LeanModularForms.Modularforms.RiemannZetalems public import LeanPool.LeanModularForms.Modularforms.SummableLems +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import LeanPool.LeanModularForms.Modularforms.IccIcoLems +import LeanPool.LeanModularForms.Modularforms.RiemannZetalems +import Mathlib.Data.Int.Star /-! # Cauchylems -/ @@ -16,7 +18,7 @@ public import LeanPool.LeanModularForms.Modularforms.SummableLems @[expose] public section -open ModularForm EisensteinSeries UpperHalfPlane TopologicalSpace Set MeasureTheory intervalIntegral +open EisensteinSeries UpperHalfPlane TopologicalSpace Set MeasureTheory intervalIntegral Metric Filter Function Complex open scoped Interval Real NNReal ENNReal Topology BigOperators Nat diff --git a/LeanPool/LeanModularForms/Modularforms/ClogArgLems.lean b/LeanPool/LeanModularForms/Modularforms/ClogArgLems.lean index c9e4d9a3a1..25a00645b8 100644 --- a/LeanPool/LeanModularForms/Modularforms/ClogArgLems.lean +++ b/LeanPool/LeanModularForms/Modularforms/ClogArgLems.lean @@ -6,12 +6,12 @@ Authors: Chris Birkbeck module -public import Mathlib.Algebra.Order.Ring.Star public import Mathlib.Analysis.CStarAlgebra.Classes public import Mathlib.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty -public import Mathlib.Analysis.SpecialFunctions.Log.Summable -public import Mathlib.LinearAlgebra.Complex.FiniteDimensional -public import Mathlib.Tactic.Cases +public import Mathlib.Analysis.SpecialFunctions.Complex.Log +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.SpecialFunctions.Log.Summable +import Mathlib.LinearAlgebra.Complex.FiniteDimensional /-! # ClogArgLems -/ diff --git a/LeanPool/LeanModularForms/Modularforms/Cotangent.lean b/LeanPool/LeanModularForms/Modularforms/Cotangent.lean index f72ee80ef2..e02031caa0 100644 --- a/LeanPool/LeanModularForms/Modularforms/Cotangent.lean +++ b/LeanPool/LeanModularForms/Modularforms/Cotangent.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Cotangent +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Cotangent + +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Cotangent series expansion @@ -20,3 +26,5 @@ The two downstream consumers in this project (`Modularforms/summable_lems.lean`) import the upstream module directly and resolve `cot_series_rep'` and `pi_mul_cot_pi_q_exp` against Mathlib's versions. -/ + +@[expose] public section diff --git a/LeanPool/LeanModularForms/Modularforms/Csqrt.lean b/LeanPool/LeanModularForms/Modularforms/Csqrt.lean index b9b4576e49..cc229926de 100644 --- a/LeanPool/LeanModularForms/Modularforms/Csqrt.lean +++ b/LeanPool/LeanModularForms/Modularforms/Csqrt.lean @@ -6,21 +6,22 @@ Authors: Chris Birkbeck module -public import Mathlib.Algebra.Group.NatPowAssoc public import Mathlib.Analysis.CStarAlgebra.Classes public import Mathlib.Analysis.Complex.UpperHalfPlane.Basic -public import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv -public import Mathlib.NumberTheory.ArithmeticFunction.Defs -public import Mathlib.NumberTheory.ArithmeticFunction.Moebius -public import Mathlib.NumberTheory.ModularForms.Basic -public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Defs +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Analysis.SpecialFunctions.Complex.Log +import Mathlib.Algebra.Group.NatPowAssoc +import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Csqrt -/ @[expose] public section -open ModularForm EisensteinSeries UpperHalfPlane TopologicalSpace Set MeasureTheory intervalIntegral +open UpperHalfPlane TopologicalSpace Set MeasureTheory Metric Filter Function Complex open scoped Interval Real NNReal ENNReal Topology BigOperators Nat diff --git a/LeanPool/LeanModularForms/Modularforms/Delta.lean b/LeanPool/LeanModularForms/Modularforms/Delta.lean index 077eed828d..79582dbfff 100644 --- a/LeanPool/LeanModularForms/Modularforms/Delta.lean +++ b/LeanPool/LeanModularForms/Modularforms/Delta.lean @@ -6,14 +6,17 @@ Authors: Chris Birkbeck module -public import LeanPool.LeanModularForms.Modularforms.SlashActionAuxil -public import LeanPool.LeanModularForms.Modularforms.ClogArgLems -public import LeanPool.LeanModularForms.Modularforms.Eta -public import LeanPool.LeanModularForms.Modularforms.MultipliableLems public import LeanPool.LeanModularForms.Modularforms.ResToImagAxis -public import Mathlib.NumberTheory.ModularForms.QExpansion +public import Mathlib.NumberTheory.ModularForms.DedekindEta +import LeanPool.LeanModularForms.Modularforms.ClogArgLems +import LeanPool.LeanModularForms.Modularforms.Eta +import LeanPool.LeanModularForms.Modularforms.ExpLems public import LeanPool.LeanModularForms.Modularforms.ForMathlibCusps +import LeanPool.LeanModularForms.Modularforms.MultipliableLems +public import LeanPool.LeanModularForms.Modularforms.SlashActionAuxil +import LeanPool.LeanModularForms.Modularforms.SummableLems +import Mathlib.Analysis.Normed.Group.Tannery /-! # Delta -/ @@ -315,7 +318,7 @@ def Delta : CuspForm (CongruenceSubgroup.Gamma 1) 12 where toFun := DiscriminantSIF slash_action_eq' := DiscriminantSIF.slash_action_eq' holo' := by - rw [mdifferentiable_iff] + rw [UpperHalfPlane.mdifferentiable_iff] simp only [SlashInvariantForm.coe_mk] have he2 : DifferentiableOn ℂ (fun z => (η z) ^ 24) {z | 0 < z.im} := by apply DifferentiableOn.pow @@ -410,7 +413,7 @@ def CuspFormDivDiscriminant (k : ℤ) (f : CuspForm (CongruenceSubgroup.Gamma 1) toFun := f / Delta slash_action_eq' := fun γ hγ => div_Delta_is_SIF _ _ γ hγ holo' := by - rw [mdifferentiable_iff] + rw [UpperHalfPlane.mdifferentiable_iff] simp only [SlashInvariantForm.coe_mk] have : (⇑f / ⇑Delta) ∘ ↑ofComplex = (⇑f ∘ ↑ofComplex) / (Delta ∘ ↑ofComplex) := by rfl rw [this] diff --git a/LeanPool/LeanModularForms/Modularforms/Derivative.lean b/LeanPool/LeanModularForms/Modularforms/Derivative.lean index 5d0e30b828..c162faaf4a 100644 --- a/LeanPool/LeanModularForms/Modularforms/Derivative.lean +++ b/LeanPool/LeanModularForms/Modularforms/Derivative.lean @@ -8,9 +8,11 @@ module public import LeanPool.LeanModularForms.Modularforms.MDifferentiableFunProp -public import LeanPool.LeanModularForms.Modularforms.Eisenstein -public import Mathlib.Analysis.Calculus.DiffContOnCl -public import Mathlib.Analysis.Complex.Liouville +import LeanPool.LeanModularForms.ForMathlib.AtImInfty +import LeanPool.LeanModularForms.Modularforms.ForMathlibCusps +import LeanPool.LeanModularForms.Modularforms.SummableLems +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Complex.Liouville /-! # Derivative -/ diff --git a/LeanPool/LeanModularForms/Modularforms/DimensionFormulas.lean b/LeanPool/LeanModularForms/Modularforms/DimensionFormulas.lean index d01b34c4db..77863a2f1b 100644 --- a/LeanPool/LeanModularForms/Modularforms/DimensionFormulas.lean +++ b/LeanPool/LeanModularForms/Modularforms/DimensionFormulas.lean @@ -6,10 +6,10 @@ Authors: Chris Birkbeck module -public import Mathlib.Data.Rat.Star -public import Mathlib.LinearAlgebra.Dimension.Localization -public import Mathlib.NumberTheory.ModularForms.LevelOne.Basic public import LeanPool.LeanModularForms.Modularforms.Eisenstein +import LeanPool.LeanModularForms.Modularforms.QExpansionLems +import Mathlib.Data.Int.Star +import Mathlib.Data.Rat.Star /-! # DimensionFormulas -/ diff --git a/LeanPool/LeanModularForms/Modularforms/E2.lean b/LeanPool/LeanModularForms/Modularforms/E2.lean index 098a955aec..7531094bce 100644 --- a/LeanPool/LeanModularForms/Modularforms/E2.lean +++ b/LeanPool/LeanModularForms/Modularforms/E2.lean @@ -6,8 +6,10 @@ Authors: Chris Birkbeck module -public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.E2.Transform -public import LeanPool.LeanModularForms.Modularforms.SlashActionAuxil +public import Mathlib.NumberTheory.ArithmeticFunction.Misc +public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.E2.Defs +import LeanPool.LeanModularForms.Modularforms.SlashActionAuxil +import Mathlib.NumberTheory.ModularForms.EisensteinSeries.E2.Transform /-! # E2 -/ diff --git a/LeanPool/LeanModularForms/Modularforms/Eisenstein.lean b/LeanPool/LeanModularForms/Modularforms/Eisenstein.lean index 9df4ae091c..0db6dba017 100644 --- a/LeanPool/LeanModularForms/Modularforms/Eisenstein.lean +++ b/LeanPool/LeanModularForms/Modularforms/Eisenstein.lean @@ -8,7 +8,15 @@ module public import LeanPool.LeanModularForms.Modularforms.Eisensteinqexpansions public import LeanPool.LeanModularForms.Modularforms.IsCuspForm -public import LeanPool.LeanModularForms.Modularforms.SummableLems +public import LeanPool.LeanModularForms.Modularforms.Delta +public import LeanPool.LeanModularForms.Modularforms.E2 +import LeanPool.LeanModularForms.Modularforms.ExpLems +import LeanPool.LeanModularForms.Modularforms.MultipliableLems +import LeanPool.LeanModularForms.Modularforms.QExpansionLems +import LeanPool.LeanModularForms.Modularforms.SummableLems +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Normed.Group.Tannery +import Mathlib.Data.Int.Star /-! # Eisenstein -/ diff --git a/LeanPool/LeanModularForms/Modularforms/EisensteinAsymptotics.lean b/LeanPool/LeanModularForms/Modularforms/EisensteinAsymptotics.lean index 815b597496..34dd656613 100644 --- a/LeanPool/LeanModularForms/Modularforms/EisensteinAsymptotics.lean +++ b/LeanPool/LeanModularForms/Modularforms/EisensteinAsymptotics.lean @@ -6,9 +6,12 @@ Authors: Chris Birkbeck module -public import LeanPool.LeanModularForms.Modularforms.SerreDerivativeSlash -public import LeanPool.LeanModularForms.Modularforms.DimensionFormulas -public import Mathlib.Analysis.Real.Pi.Bounds +public import LeanPool.LeanModularForms.Modularforms.Derivative +import LeanPool.LeanModularForms.ForMathlib.AtImInfty +import LeanPool.LeanModularForms.Modularforms.ForMathlibCusps +import LeanPool.LeanModularForms.Modularforms.SerreDerivativeSlash +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Real.Pi.Bounds /-! # EisensteinAsymptotics -/ diff --git a/LeanPool/LeanModularForms/Modularforms/Eisensteinqexpansions.lean b/LeanPool/LeanModularForms/Modularforms/Eisensteinqexpansions.lean index 8dfbfd03b3..0d6e89664b 100644 --- a/LeanPool/LeanModularForms/Modularforms/Eisensteinqexpansions.lean +++ b/LeanPool/LeanModularForms/Modularforms/Eisensteinqexpansions.lean @@ -6,10 +6,15 @@ Authors: Chris Birkbeck module -public import Mathlib.NumberTheory.LSeries.Dirichlet public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Basic -public import LeanPool.LeanModularForms.Modularforms.Delta +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.NumberTheory.ArithmeticFunction.Misc +public import Mathlib.NumberTheory.LSeries.RiemannZeta +import LeanPool.LeanModularForms.Modularforms.Delta +import LeanPool.LeanModularForms.Modularforms.SummableLems +import Mathlib.Data.Int.Star +import Mathlib.Topology.Separation.CompletelyRegular /-! # Eisensteinqexpansions -/ diff --git a/LeanPool/LeanModularForms/Modularforms/Equivs.lean b/LeanPool/LeanModularForms/Modularforms/Equivs.lean index 10318c6830..55a40290ca 100644 --- a/LeanPool/LeanModularForms/Modularforms/Equivs.lean +++ b/LeanPool/LeanModularForms/Modularforms/Equivs.lean @@ -6,11 +6,17 @@ Authors: Chris Birkbeck module -public import Mathlib.Algebra.Order.Ring.Star -public import Mathlib.Analysis.Normed.Ring.Lemmas -public import Mathlib.Data.Int.Star -public import Mathlib.NumberTheory.TsumDivisorsAntidiagonal -public import Mathlib.Tactic.Common +public import Mathlib.Algebra.Group.End +public import Mathlib.Algebra.Ring.Int.Defs +public import Mathlib.Data.Fin.VecNotation +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.FinCases +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Equivs -/ @@ -20,7 +26,7 @@ public import Mathlib.Tactic.Common open TopologicalSpace Set - Metric Filter Function Complex + Metric Filter Function diff --git a/LeanPool/LeanModularForms/Modularforms/Eta.lean b/LeanPool/LeanModularForms/Modularforms/Eta.lean index a6a34fcb1e..c7470ca78f 100644 --- a/LeanPool/LeanModularForms/Modularforms/Eta.lean +++ b/LeanPool/LeanModularForms/Modularforms/Eta.lean @@ -6,10 +6,10 @@ Authors: Chris Birkbeck module -public import LeanPool.LeanModularForms.Modularforms.E2 public import LeanPool.LeanModularForms.Modularforms.Csqrt -public import LeanPool.LeanModularForms.Modularforms.Upperhalfplane public import Mathlib.NumberTheory.ModularForms.DedekindEta +import LeanPool.LeanModularForms.Modularforms.E2 +import LeanPool.LeanModularForms.Modularforms.Upperhalfplane /-! # Eta -/ diff --git a/LeanPool/LeanModularForms/Modularforms/EtaCleanup.lean b/LeanPool/LeanModularForms/Modularforms/EtaCleanup.lean index 8cf098c2ac..9136f135cd 100644 --- a/LeanPool/LeanModularForms/Modularforms/EtaCleanup.lean +++ b/LeanPool/LeanModularForms/Modularforms/EtaCleanup.lean @@ -3,15 +3,26 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.Modularforms.E2 -import LeanPool.LeanModularForms.Modularforms.Csqrt -import LeanPool.LeanModularForms.Modularforms.LogDerivLems +public import LeanPool.LeanModularForms.Modularforms.E2 +public import LeanPool.LeanModularForms.Modularforms.Csqrt +public import Mathlib.Analysis.Complex.Periodic +public import Mathlib.Topology.Algebra.InfiniteSum.UniformOn import LeanPool.LeanModularForms.Modularforms.ExpLems +import LeanPool.LeanModularForms.Modularforms.LogDerivLems import LeanPool.LeanModularForms.Modularforms.Upperhalfplane +import Mathlib.Analysis.Complex.LocallyUniformLimit +import Mathlib.Analysis.Normed.Module.MultipliableUniformlyOn +import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # EtaCleanup -/ +@[expose] public section + open ModularForm EisensteinSeries UpperHalfPlane TopologicalSpace Set MeasureTheory intervalIntegral Metric Filter Function Complex MatrixGroups diff --git a/LeanPool/LeanModularForms/Modularforms/ForMathlibFunctionsBoundedAtInfty.lean b/LeanPool/LeanModularForms/Modularforms/ForMathlibFunctionsBoundedAtInfty.lean index 12c5e85df4..20a3ba4c3a 100644 --- a/LeanPool/LeanModularForms/Modularforms/ForMathlibFunctionsBoundedAtInfty.lean +++ b/LeanPool/LeanModularForms/Modularforms/ForMathlibFunctionsBoundedAtInfty.lean @@ -3,20 +3,10 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ - module public import Mathlib.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty -/-! # ForMathlibFunctionsBoundedAtInfty -/ - - -@[expose] public section - -open UpperHalfPlane - -theorem isBoundedAtImInfty_neg_iff (f : ℍ → ℂ) : - IsBoundedAtImInfty (-f) ↔ IsBoundedAtImInfty f := by - simp_rw [UpperHalfPlane.isBoundedAtImInfty_iff, Pi.neg_apply, norm_neg] +public import LeanPool.LeanModularForms.ForMathlib.FunctionsBoundedAtInfty -alias ⟨_, IsBoundedAtImInfty.neg⟩ := isBoundedAtImInfty_neg_iff +/-! Compatibility import for the canonical lemmas in `LeanModularForms.ForMathlib`. -/ diff --git a/LeanPool/LeanModularForms/Modularforms/ForMathlibSlashActions.lean b/LeanPool/LeanModularForms/Modularforms/ForMathlibSlashActions.lean index 3182d13e76..e9da4bb397 100644 --- a/LeanPool/LeanModularForms/Modularforms/ForMathlibSlashActions.lean +++ b/LeanPool/LeanModularForms/Modularforms/ForMathlibSlashActions.lean @@ -3,48 +3,11 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ - module public import Mathlib.Analysis.CStarAlgebra.Classes public import Mathlib.NumberTheory.ModularForms.SlashActions -/-! # ForMathlibSlashActions -/ - - -@[expose] public section - --- Maybe this belongs in NumberTheory/ModularForms/SlashActions.lean, next to ModularForm.mul_slash - -local notation "GL(" n ", " R ")" "⁺" => @Matrix.GLPos (Fin n) R (instDecidableEqFin n) - (Fin.fintype n) Real.linearOrderedCommRing - -open ModularForm MatrixGroups UpperHalfPlane - -/- Looks like the way to fix the errors is to replace each GL(n, ℝ)⁺ with - `@Matrix.GLPos (Fin 2) ℝ (instDecidableEqFin 2) (Fin.fintype 2) Real.linearOrderedCommRing : - Subgroup (GL (Fin 2) ℝ)`... but it's just so ugly! --/ - -/-- Slash action under -I₂ as a GL(n, ℝ)⁺ matrix. See `ModularForm.slash_neg_one'` for the SL(2, ℤ) -version. -/ -theorem ModularForm.slash_neg_one {k : ℤ} (f : ℍ → ℂ) (hk : Even k) : - f ∣[k] (-1 : (GL (Fin 2) ℝ)) = - f ∣[k] (1 : (GL (Fin 2) ℝ)) := by simp [slash_def, denom, hk.neg_one_zpow, Matrix.det_neg, σ] - -/-- Slash action under -I₂ as a SL(2, ℤ) matrix. See `ModularForm.slash_neg_one` for the GL(n, ℝ)⁺ -version. -/ -theorem ModularForm.slash_neg_one' {k : ℤ} (f : ℍ → ℂ) (hk : Even k) : - f ∣[k] (-1 : SL(2, ℤ)) = f ∣[k] (1 : SL(2, ℤ)) := by simp [SL_slash_def, denom, hk.neg_one_zpow] - -/-- See `ModularForm.slash_neg'` for the version where `g` is a SL(2, ℤ) matrix. -/ -theorem ModularForm.slash_neg {k : ℤ} (g : GL (Fin 2) ℝ) (f : ℍ → ℂ) (hk : Even k) : - f ∣[k] (-g) = f ∣[k] g := by - rw [← neg_one_mul, SlashAction.slash_mul, slash_neg_one f hk, SlashAction.slash_one] +public import LeanPool.LeanModularForms.ForMathlib.SlashActions -/-- See `ModularForm.slash_neg` for the version where `g` is a GL(n, ℝ)⁺ matrix. -/ -theorem ModularForm.slash_neg' {k : ℤ} (g : SL(2, ℤ)) (f : ℍ → ℂ) (hk : Even k) : - f ∣[k] (-g) = f ∣[k] g := by - rw [SL_slash, ← slash_neg _ _ hk] - congr - aesop +/-! Compatibility import for the canonical lemmas in `LeanModularForms.ForMathlib`. -/ diff --git a/LeanPool/LeanModularForms/Modularforms/ForMathlibUpperHalfPlane.lean b/LeanPool/LeanModularForms/Modularforms/ForMathlibUpperHalfPlane.lean index 1d18e1a7d6..d8e6cee08b 100644 --- a/LeanPool/LeanModularForms/Modularforms/ForMathlibUpperHalfPlane.lean +++ b/LeanPool/LeanModularForms/Modularforms/ForMathlibUpperHalfPlane.lean @@ -7,7 +7,6 @@ Authors: Chris Birkbeck module public import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup -public import Mathlib.Data.Fintype.Parity /-! # ForMathlibUpperHalfPlane -/ diff --git a/LeanPool/LeanModularForms/Modularforms/Generators/Defs.lean b/LeanPool/LeanModularForms/Modularforms/Generators/Defs.lean index e6c3109a53..0528155bee 100644 --- a/LeanPool/LeanModularForms/Modularforms/Generators/Defs.lean +++ b/LeanPool/LeanModularForms/Modularforms/Generators/Defs.lean @@ -6,8 +6,9 @@ Authors: Chris Birkbeck module -public import LeanPool.LeanModularForms.Modularforms.DimensionFormulas public import Mathlib.RingTheory.MvPolynomial.WeightedHomogeneous +public import LeanPool.LeanModularForms.Modularforms.Eisenstein +import LeanPool.LeanModularForms.Modularforms.DimensionFormulas /-! # Generators of the graded ring of level 1 modular forms: Definitions diff --git a/LeanPool/LeanModularForms/Modularforms/Generators/Injectivity.lean b/LeanPool/LeanModularForms/Modularforms/Generators/Injectivity.lean index 8035970b8b..ddfb2498bc 100644 --- a/LeanPool/LeanModularForms/Modularforms/Generators/Injectivity.lean +++ b/LeanPool/LeanModularForms/Modularforms/Generators/Injectivity.lean @@ -6,7 +6,10 @@ Authors: Chris Birkbeck module +public import LeanPool.LeanModularForms.Modularforms.Generators.Defs public import LeanPool.LeanModularForms.Modularforms.Generators.Surjectivity +import LeanPool.LeanModularForms.Modularforms.QExpansionLems +import Mathlib.Data.Int.Star public import Mathlib.Algebra.MvPolynomial.CommRing /-! diff --git a/LeanPool/LeanModularForms/Modularforms/Generators/Surjectivity.lean b/LeanPool/LeanModularForms/Modularforms/Generators/Surjectivity.lean index 66f26e8cd7..47b7b9e1ad 100644 --- a/LeanPool/LeanModularForms/Modularforms/Generators/Surjectivity.lean +++ b/LeanPool/LeanModularForms/Modularforms/Generators/Surjectivity.lean @@ -7,6 +7,9 @@ Authors: Chris Birkbeck module public import LeanPool.LeanModularForms.Modularforms.Generators.Defs +import LeanPool.LeanModularForms.Modularforms.DimensionFormulas +import LeanPool.LeanModularForms.Modularforms.QExpansionLems +import Mathlib.Data.Int.Star /-! # Generators of the graded ring of level 1 modular forms: Surjectivity diff --git a/LeanPool/LeanModularForms/Modularforms/IccIcoLems.lean b/LeanPool/LeanModularForms/Modularforms/IccIcoLems.lean index 0df5e641d3..1015f448af 100644 --- a/LeanPool/LeanModularForms/Modularforms/IccIcoLems.lean +++ b/LeanPool/LeanModularForms/Modularforms/IccIcoLems.lean @@ -6,10 +6,17 @@ Authors: Chris Birkbeck module -public import Mathlib.Algebra.Order.Group.Int -public import Mathlib.Analysis.CStarAlgebra.Classes -public import Mathlib.Data.Int.Star -public import Mathlib.Tactic.Cases +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Basic.Complex.Basic +public import Mathlib.Data.Int.ConditionallyCompleteOrder +public import Mathlib.Data.Int.Interval +public import Mathlib.Order.ConditionallyCompleteLattice.Basic +public import Mathlib.Order.Filter.AtTopBot.Defs +meta import Lean.Meta.Tactic.NormCast +import Mathlib.Algebra.CharP.Defs +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! # IccIcoLems -/ diff --git a/LeanPool/LeanModularForms/Modularforms/IsCuspForm.lean b/LeanPool/LeanModularForms/Modularforms/IsCuspForm.lean index 9044336bd1..3bfdd6513a 100644 --- a/LeanPool/LeanModularForms/Modularforms/IsCuspForm.lean +++ b/LeanPool/LeanModularForms/Modularforms/IsCuspForm.lean @@ -6,10 +6,11 @@ Authors: Chris Birkbeck module -public import Mathlib.Analysis.CStarAlgebra.Module.Defs -public import Mathlib.Geometry.Manifold.Notation -public import LeanPool.LeanModularForms.Modularforms.ForMathlibCusps -public import LeanPool.LeanModularForms.Modularforms.QExpansionLems +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.NumberTheory.ModularForms.QExpansion +import LeanPool.LeanModularForms.Modularforms.ForMathlibCusps +import LeanPool.LeanModularForms.Modularforms.QExpansionLems +import Mathlib.Analysis.SpecialFunctions.Bernstein /-! # IsCuspForm -/ diff --git a/LeanPool/LeanModularForms/Modularforms/Iteratedderivs.lean b/LeanPool/LeanModularForms/Modularforms/Iteratedderivs.lean index 990d0405b9..3dfe52b2fa 100644 --- a/LeanPool/LeanModularForms/Modularforms/Iteratedderivs.lean +++ b/LeanPool/LeanModularForms/Modularforms/Iteratedderivs.lean @@ -7,12 +7,12 @@ Authors: Chris Birkbeck module public import Mathlib.Analysis.CStarAlgebra.Classes -public import Mathlib.Analysis.Calculus.Deriv.Inv -public import Mathlib.Analysis.Calculus.Deriv.Pow public import Mathlib.Analysis.Complex.UpperHalfPlane.Basic -public import Mathlib.Analysis.SpecialFunctions.ExpDeriv public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic -public import Mathlib.Tactic.Cases +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import Mathlib.Analysis.Calculus.Deriv.Inv +import Mathlib.Analysis.Calculus.Deriv.Pow +import Mathlib.Analysis.SpecialFunctions.ExpDeriv /-! # Iteratedderivs -/ diff --git a/LeanPool/LeanModularForms/Modularforms/JacobiTheta.lean b/LeanPool/LeanModularForms/Modularforms/JacobiTheta.lean index 3ba2483057..2c2131bbb9 100644 --- a/LeanPool/LeanModularForms/Modularforms/JacobiTheta.lean +++ b/LeanPool/LeanModularForms/Modularforms/JacobiTheta.lean @@ -6,11 +6,19 @@ Authors: Chris Birkbeck module -public import LeanPool.LeanModularForms.Modularforms.ForMathlibFunctionsBoundedAtInfty public import LeanPool.LeanModularForms.Modularforms.MDifferentiableFunProp -public import LeanPool.LeanModularForms.Modularforms.ForMathlibSlashActions -public import LeanPool.LeanModularForms.Modularforms.ForMathlibUpperHalfPlane -public import LeanPool.LeanModularForms.Modularforms.DimensionFormulas +public import LeanPool.LeanModularForms.Modularforms.SlashActionAuxil +import LeanPool.LeanModularForms.ForMathlib.AtImInfty +import LeanPool.LeanModularForms.ForMathlib.FunctionsBoundedAtInfty +import LeanPool.LeanModularForms.ForMathlib.SlashActions +import LeanPool.LeanModularForms.ForMathlib.UpperHalfPlane +import LeanPool.LeanModularForms.Modularforms.DimensionFormulas +import LeanPool.LeanModularForms.Modularforms.ForMathlibCusps +import LeanPool.LeanModularForms.Modularforms.ForMathlibFunctionsBoundedAtInfty +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Normed.Group.Tannery +import Mathlib.Data.Int.Star +import Mathlib.Order.CompletePartialOrder /-! # JacobiTheta -/ diff --git a/LeanPool/LeanModularForms/Modularforms/LimunderLems.lean b/LeanPool/LeanModularForms/Modularforms/LimunderLems.lean index 0b588317a1..f2de4a4043 100644 --- a/LeanPool/LeanModularForms/Modularforms/LimunderLems.lean +++ b/LeanPool/LeanModularForms/Modularforms/LimunderLems.lean @@ -7,7 +7,7 @@ Authors: Chris Birkbeck module public import Mathlib.Analysis.CStarAlgebra.Classes -public import LeanPool.LeanModularForms.Modularforms.IccIcoLems +import LeanPool.LeanModularForms.Modularforms.IccIcoLems /-! # LimunderLems -/ diff --git a/LeanPool/LeanModularForms/Modularforms/LogDerivLems.lean b/LeanPool/LeanModularForms/Modularforms/LogDerivLems.lean index 8728a9d493..b5256f79b9 100644 --- a/LeanPool/LeanModularForms/Modularforms/LogDerivLems.lean +++ b/LeanPool/LeanModularForms/Modularforms/LogDerivLems.lean @@ -3,17 +3,20 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import Mathlib.Topology.Algebra.InfiniteSum.UniformOn +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Calculus.LogDeriv +public import Mathlib.Analysis.Complex.Exponential import LeanPool.LeanModularForms.Modularforms.Tendstolems -import Mathlib.Algebra.Lie.OfAssociative import Mathlib.Algebra.Order.Ring.Star import Mathlib.Analysis.Complex.LocallyUniformLimit -import Mathlib.Analysis.Convex.PathConnected -import Mathlib.Topology.Algebra.InfiniteSum.UniformOn -import Mathlib.Topology.Separation.CompletelyRegular /-! # LogDerivLems -/ +@[expose] public section + open TopologicalSpace Set MeasureTheory intervalIntegral diff --git a/LeanPool/LeanModularForms/Modularforms/MDifferentiableFunProp.lean b/LeanPool/LeanModularForms/Modularforms/MDifferentiableFunProp.lean index fc6d82b771..f1526d8a24 100644 --- a/LeanPool/LeanModularForms/Modularforms/MDifferentiableFunProp.lean +++ b/LeanPool/LeanModularForms/Modularforms/MDifferentiableFunProp.lean @@ -6,11 +6,6 @@ Authors: Chris Birkbeck module -public import Mathlib.Geometry.Manifold.MFDeriv.Defs -public import Mathlib.Geometry.Manifold.MFDeriv.SpecificFunctions -public import Mathlib.Geometry.Manifold.Notation -public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Basic -public import Mathlib.Tactic.FunProp public import LeanPool.LeanModularForms.Modularforms.Eisenstein diff --git a/LeanPool/LeanModularForms/Modularforms/MultipliableLems.lean b/LeanPool/LeanModularForms/Modularforms/MultipliableLems.lean index 7c99a1342e..27c86e2c61 100644 --- a/LeanPool/LeanModularForms/Modularforms/MultipliableLems.lean +++ b/LeanPool/LeanModularForms/Modularforms/MultipliableLems.lean @@ -6,14 +6,19 @@ Authors: Chris Birkbeck module -public import LeanPool.LeanModularForms.Modularforms.SummableLems +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import LeanPool.LeanModularForms.Modularforms.ExpLems +import LeanPool.LeanModularForms.Modularforms.SummableLems +import Mathlib.Analysis.SpecialFunctions.Log.Summable /-! # MultipliableLems -/ @[expose] public section -open ModularForm EisensteinSeries UpperHalfPlane TopologicalSpace Set MeasureTheory intervalIntegral +open EisensteinSeries UpperHalfPlane TopologicalSpace Set MeasureTheory intervalIntegral Metric Filter Function Complex open scoped Interval Real NNReal ENNReal Topology BigOperators Nat diff --git a/LeanPool/LeanModularForms/Modularforms/PhiTransform.lean b/LeanPool/LeanModularForms/Modularforms/PhiTransform.lean index 6803c227dd..4fd15a169a 100644 --- a/LeanPool/LeanModularForms/Modularforms/PhiTransform.lean +++ b/LeanPool/LeanModularForms/Modularforms/PhiTransform.lean @@ -7,8 +7,6 @@ Authors: Chris Birkbeck module public import LeanPool.LeanModularForms.Modularforms.Eisenstein -public import LeanPool.LeanModularForms.Modularforms.E2 -public import LeanPool.LeanModularForms.Modularforms.Delta /-! # PhiTransform -/ diff --git a/LeanPool/LeanModularForms/Modularforms/QExpansion.lean b/LeanPool/LeanModularForms/Modularforms/QExpansion.lean index fbb4858b12..2db28b1031 100644 --- a/LeanPool/LeanModularForms/Modularforms/QExpansion.lean +++ b/LeanPool/LeanModularForms/Modularforms/QExpansion.lean @@ -6,10 +6,12 @@ Authors: Chris Birkbeck module -public import Mathlib.Analysis.Normed.Group.Tannery -public import Mathlib.NumberTheory.ModularForms.JacobiTheta.Bounds -public import LeanPool.LeanModularForms.Modularforms.JacobiTheta -public import LeanPool.LeanModularForms.Modularforms.AtImInfty +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import LeanPool.LeanModularForms.ForMathlib.AtImInfty +import LeanPool.LeanModularForms.Modularforms.JacobiTheta +import Mathlib.Analysis.Normed.Group.Tannery /-! # QExpansion -/ diff --git a/LeanPool/LeanModularForms/Modularforms/QExpansionLems.lean b/LeanPool/LeanModularForms/Modularforms/QExpansionLems.lean index e1236d0909..5affd4dd57 100644 --- a/LeanPool/LeanModularForms/Modularforms/QExpansionLems.lean +++ b/LeanPool/LeanModularForms/Modularforms/QExpansionLems.lean @@ -7,10 +7,7 @@ Authors: Chris Birkbeck module public import Mathlib.Analysis.CStarAlgebra.Classes -public import Mathlib.Algebra.Order.Star.Real public import Mathlib.NumberTheory.ModularForms.QExpansion -public import Mathlib.Order.CompletePartialOrder -public import Mathlib.Tactic.Cases /-! # QExpansionLems -/ diff --git a/LeanPool/LeanModularForms/Modularforms/RamanujanIdentities.lean b/LeanPool/LeanModularForms/Modularforms/RamanujanIdentities.lean index 6cc2eedf91..723f114c53 100644 --- a/LeanPool/LeanModularForms/Modularforms/RamanujanIdentities.lean +++ b/LeanPool/LeanModularForms/Modularforms/RamanujanIdentities.lean @@ -6,7 +6,10 @@ Authors: Chris Birkbeck module -public import LeanPool.LeanModularForms.Modularforms.EisensteinAsymptotics +public import LeanPool.LeanModularForms.Modularforms.Derivative +import LeanPool.LeanModularForms.Modularforms.DimensionFormulas +import LeanPool.LeanModularForms.Modularforms.EisensteinAsymptotics +import Mathlib.Data.Int.Star /-! # RamanujanIdentities -/ diff --git a/LeanPool/LeanModularForms/Modularforms/ResToImagAxis.lean b/LeanPool/LeanModularForms/Modularforms/ResToImagAxis.lean index 48b60d7c4c..b67593a7c5 100644 --- a/LeanPool/LeanModularForms/Modularforms/ResToImagAxis.lean +++ b/LeanPool/LeanModularForms/Modularforms/ResToImagAxis.lean @@ -6,11 +6,12 @@ Authors: Chris Birkbeck module -public import Mathlib.Geometry.Manifold.Notation -public import Mathlib.NumberTheory.ModularForms.QExpansion -public import LeanPool.LeanModularForms.Modularforms.AtImInfty -public import LeanPool.LeanModularForms.Modularforms.SlashActionAuxil +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.NumberTheory.ModularForms.Basic +import LeanPool.LeanModularForms.ForMathlib.AtImInfty +import LeanPool.LeanModularForms.Modularforms.SlashActionAuxil +import Mathlib.NumberTheory.ModularForms.QExpansion /-! # ResToImagAxis -/ diff --git a/LeanPool/LeanModularForms/Modularforms/RiemannZetalems.lean b/LeanPool/LeanModularForms/Modularforms/RiemannZetalems.lean index 1ed9eeb5ed..b396d62c87 100644 --- a/LeanPool/LeanModularForms/Modularforms/RiemannZetalems.lean +++ b/LeanPool/LeanModularForms/Modularforms/RiemannZetalems.lean @@ -7,7 +7,6 @@ Authors: Chris Birkbeck module public import Mathlib.Analysis.CStarAlgebra.Classes -public import Mathlib.Algebra.Order.Star.Real public import Mathlib.NumberTheory.LSeries.RiemannZeta /-! # RiemannZetalems -/ diff --git a/LeanPool/LeanModularForms/Modularforms/SlashActionAuxil.lean b/LeanPool/LeanModularForms/Modularforms/SlashActionAuxil.lean index f922549530..24f6e0c259 100644 --- a/LeanPool/LeanModularForms/Modularforms/SlashActionAuxil.lean +++ b/LeanPool/LeanModularForms/Modularforms/SlashActionAuxil.lean @@ -6,11 +6,10 @@ Authors: Chris Birkbeck module -public import Mathlib.Algebra.Field.ZMod -public import Mathlib.Analysis.CStarAlgebra.Classes -public import Mathlib.LinearAlgebra.Matrix.FixedDetMatrices public import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups public import Mathlib.NumberTheory.ModularForms.SlashActions +import Mathlib.Algebra.Field.ZMod +import Mathlib.LinearAlgebra.Matrix.FixedDetMatrices /-! # SlashActionAuxil -/ diff --git a/LeanPool/LeanModularForms/Modularforms/SummableLems.lean b/LeanPool/LeanModularForms/Modularforms/SummableLems.lean index 20ca24f2ce..e16f59fa86 100644 --- a/LeanPool/LeanModularForms/Modularforms/SummableLems.lean +++ b/LeanPool/LeanModularForms/Modularforms/SummableLems.lean @@ -6,23 +6,20 @@ Authors: Chris Birkbeck module -public import Mathlib.Algebra.Lie.OfAssociative -public import Mathlib.Algebra.Order.Ring.Star -public import Mathlib.Analysis.CStarAlgebra.Classes -public import Mathlib.Analysis.Normed.Field.Instances -public import Mathlib.Data.Int.Star -public import Mathlib.NumberTheory.ArithmeticFunction.Moebius -public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.UniformConvergence -public import Mathlib.Order.CompletePartialOrder -public import Mathlib.Topology.Algebra.Module.ModuleTopology -public import Mathlib.Topology.EMetricSpace.Paracompact -public import Mathlib.Topology.Separation.CompletelyRegular -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Cotangent -public import LeanPool.LeanModularForms.Modularforms.ExpLems -public import LeanPool.LeanModularForms.Modularforms.Upperhalfplane -public import LeanPool.LeanModularForms.Modularforms.BigO public import LeanPool.LeanModularForms.Modularforms.Equivs public import LeanPool.LeanModularForms.Modularforms.TsumderivWithin +public import Mathlib.NumberTheory.ArithmeticFunction.Misc +public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Summable +import LeanPool.LeanModularForms.Modularforms.BigO +import LeanPool.LeanModularForms.Modularforms.ExpLems +import LeanPool.LeanModularForms.Modularforms.Iteratedderivs +import LeanPool.LeanModularForms.Modularforms.Upperhalfplane +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Cotangent +import Mathlib.Data.Int.Star +import Mathlib.NumberTheory.TsumDivisorsAntidiagonal +import Mathlib.Order.CompletePartialOrder +import Mathlib.Topology.Separation.CompletelyRegular /-! # SummableLems -/ @@ -30,7 +27,7 @@ public import LeanPool.LeanModularForms.Modularforms.TsumderivWithin @[expose] public section -open ModularForm EisensteinSeries UpperHalfPlane TopologicalSpace Set +open EisensteinSeries UpperHalfPlane TopologicalSpace Set Metric Filter Function Complex open scoped Interval Real NNReal ENNReal Topology BigOperators Nat diff --git a/LeanPool/LeanModularForms/Modularforms/Tendstolems.lean b/LeanPool/LeanModularForms/Modularforms/Tendstolems.lean index 8b82359d95..94dc653caf 100644 --- a/LeanPool/LeanModularForms/Modularforms/Tendstolems.lean +++ b/LeanPool/LeanModularForms/Modularforms/Tendstolems.lean @@ -7,8 +7,7 @@ Authors: Chris Birkbeck module public import Mathlib.Analysis.CStarAlgebra.Classes -public import Mathlib.Analysis.SpecificLimits.Normed -public import Mathlib.Topology.EMetricSpace.Paracompact +import Mathlib.Analysis.SpecificLimits.Normed /-! # Tendstolems -/ diff --git a/LeanPool/LeanModularForms/Modularforms/ThetaDerivIdentities.lean b/LeanPool/LeanModularForms/Modularforms/ThetaDerivIdentities.lean index 5af5d83f4f..84b4803992 100644 --- a/LeanPool/LeanModularForms/Modularforms/ThetaDerivIdentities.lean +++ b/LeanPool/LeanModularForms/Modularforms/ThetaDerivIdentities.lean @@ -8,9 +8,10 @@ module public import LeanPool.LeanModularForms.Modularforms.JacobiTheta public import LeanPool.LeanModularForms.Modularforms.Derivative -public import LeanPool.LeanModularForms.Modularforms.DimensionFormulas -public import LeanPool.LeanModularForms.Modularforms.AtImInfty -public import LeanPool.LeanModularForms.Modularforms.EisensteinAsymptotics +import LeanPool.LeanModularForms.Modularforms.DimensionFormulas +import LeanPool.LeanModularForms.Modularforms.EisensteinAsymptotics +import LeanPool.LeanModularForms.Modularforms.ForMathlibCusps +import Mathlib.Data.Int.Star /-! # ThetaDerivIdentities -/ diff --git a/LeanPool/LeanModularForms/Modularforms/TsumderivWithin.lean b/LeanPool/LeanModularForms/Modularforms/TsumderivWithin.lean index ee4a9eb4ac..4888913963 100644 --- a/LeanPool/LeanModularForms/Modularforms/TsumderivWithin.lean +++ b/LeanPool/LeanModularForms/Modularforms/TsumderivWithin.lean @@ -6,12 +6,16 @@ Authors: Chris Birkbeck module -public import Mathlib.Analysis.Calculus.UniformLimitsDeriv -public import Mathlib.Analysis.Normed.Group.FunctionSeries public import Mathlib.Topology.Algebra.Module.ModuleTopology -public import Mathlib.Topology.ContinuousMap.Compact -public import LeanPool.LeanModularForms.Modularforms.ExpLems -public import LeanPool.LeanModularForms.Modularforms.Iteratedderivs +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import LeanPool.LeanModularForms.Modularforms.ExpLems +import LeanPool.LeanModularForms.Modularforms.Iteratedderivs +import Mathlib.Analysis.Calculus.UniformLimitsDeriv +import Mathlib.Analysis.Normed.Group.FunctionSeries +import Mathlib.Analysis.SpecialFunctions.ExpDeriv +import Mathlib.Topology.ContinuousMap.Compact /-! # TsumderivWithin -/ diff --git a/LeanPool/LeanModularForms/Modularforms/Uniformcts.lean b/LeanPool/LeanModularForms/Modularforms/Uniformcts.lean index 676932a857..131a66d083 100644 --- a/LeanPool/LeanModularForms/Modularforms/Uniformcts.lean +++ b/LeanPool/LeanModularForms/Modularforms/Uniformcts.lean @@ -6,13 +6,9 @@ Authors: Chris Birkbeck module -public import Mathlib.Analysis.Complex.ReImTopology -public import Mathlib.Analysis.SpecialFunctions.Complex.LogBounds -public import Mathlib.Analysis.SpecialFunctions.Log.Summable -public import Mathlib.Analysis.SpecificLimits.Normed -public import Mathlib.Analysis.Normed.Group.FunctionSeries -public import Mathlib.Analysis.Normed.Module.MultipliableUniformlyOn -public import Mathlib.Analysis.Complex.Exponential +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Uniformcts -/ diff --git a/LeanPool/LeanModularForms/Modularforms/Upperhalfplane.lean b/LeanPool/LeanModularForms/Modularforms/Upperhalfplane.lean index a4efe4e70c..d991b7b2ac 100644 --- a/LeanPool/LeanModularForms/Modularforms/Upperhalfplane.lean +++ b/LeanPool/LeanModularForms/Modularforms/Upperhalfplane.lean @@ -7,7 +7,6 @@ Authors: Chris Birkbeck module public import Mathlib.Analysis.Complex.UpperHalfPlane.Basic -public import Mathlib.Algebra.Order.Star.Real /-! # Upperhalfplane -/ diff --git a/LeanPool/LeanModularForms/SpherePacking/CuspDecay.lean b/LeanPool/LeanModularForms/SpherePacking/CuspDecay.lean index 07d52c396e..c510bea9c4 100644 --- a/LeanPool/LeanModularForms/SpherePacking/CuspDecay.lean +++ b/LeanPool/LeanModularForms/SpherePacking/CuspDecay.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.Modularforms.AtImInfty -import LeanPool.LeanModularForms.Modularforms.Eisenstein +public import LeanPool.LeanModularForms.Modularforms.Eisenstein +import LeanPool.LeanModularForms.ForMathlib.AtImInfty import LeanPool.LeanModularForms.ForMathlib.QExpansion -import Mathlib.NumberTheory.ModularForms.LevelOne.Basic +import Mathlib.Algebra.Order.Star.Real /-! # Cusp decay for Eisenstein series and the Viazovska integrand @@ -39,6 +40,8 @@ The proof chain is: 7. Combined with `Delta = Theta(exp(-2*pi*Im))`, `phi0` is bounded -/ +@[expose] public section + open Complex Set Filter Topology MeasureTheory ModularFormClass noncomputable section diff --git a/LeanPool/LeanModularForms/SpherePacking/PhiHolomorphic.lean b/LeanPool/LeanModularForms/SpherePacking/PhiHolomorphic.lean index a4f9b4a253..0ade6a1407 100644 --- a/LeanPool/LeanModularForms/SpherePacking/PhiHolomorphic.lean +++ b/LeanPool/LeanModularForms/SpherePacking/PhiHolomorphic.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.Modularforms.EtaCleanup +public import LeanPool.LeanModularForms.Modularforms.EtaCleanup +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # Holomorphicity of E₂ and φ₀ on the upper half-plane @@ -14,6 +18,8 @@ the Dedekind eta function. Since η is holomorphic and nonvanishing on ℍ, `logDeriv(η)` is holomorphic, hence E₂ is holomorphic. -/ +@[expose] public section + open UpperHalfPlane Set Filter Topology Function open scoped Real diff --git a/LeanPool/LeanModularForms/SpherePacking/ViazovskaMagicFunction.lean b/LeanPool/LeanModularForms/SpherePacking/ViazovskaMagicFunction.lean index 5b112f6304..be89db0ab9 100644 --- a/LeanPool/LeanModularForms/SpherePacking/ViazovskaMagicFunction.lean +++ b/LeanPool/LeanModularForms/SpherePacking/ViazovskaMagicFunction.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.GeneralizedResidueTheorem -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Cycle +public import LeanPool.LeanModularForms.Modularforms.Eisenstein import LeanPool.LeanModularForms.GeneralizedResidueTheory.CauchyPrimitive -import LeanPool.LeanModularForms.Modularforms.Eisenstein -import LeanPool.LeanModularForms.SpherePacking.PhiHolomorphic import LeanPool.LeanModularForms.SpherePacking.CuspDecay +import LeanPool.LeanModularForms.SpherePacking.PhiHolomorphic +import Mathlib.Algebra.Order.Star.Real +import Mathlib.CategoryTheory.Category.Init /-! # Viazovska's Magic Function — Original Contour Integrals @@ -86,6 +87,8 @@ singularities directly: residue theorem." arXiv:1808.00997v2. -/ +@[expose] public section + open Complex Set Filter Topology MeasureTheory open scoped Interval diff --git a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Basic.lean b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Basic.lean index 65238432ed..f8733dea16 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Basic.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Basic.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic -import LeanPool.LeanModularForms.ValenceFormula.Definitions +public import LeanPool.LeanModularForms.ValenceFormula.Definitions +import Mathlib.CategoryTheory.Category.Init /-! # Fundamental Domain Boundary – Basic Definitions @@ -24,6 +25,8 @@ for SL₂(ℤ), both at fixed height `heightCutoff` and at variable height `H`. * `seg5QRadiusH` — q-expansion radius e^(-2πH) -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Bounds.lean b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Bounds.lean index 1ab621399c..3f4f0d8bfe 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Bounds.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Bounds.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PiecewiseCurveAPI -import LeanPool.LeanModularForms.GeneralizedResidueTheory.CurveAvoidance +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic import LeanPool.LeanModularForms.GeneralizedResidueTheory.ArcCalculus +import Mathlib.CategoryTheory.Category.Init /-! # Fundamental Domain Boundary – Bounds @@ -23,6 +23,8 @@ fundamental domain boundary. * `fdBoundary_continuous` — continuity of fixed-height boundary -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Smooth.lean b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Smooth.lean index bd84abf861..d0590025e6 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Smooth.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Smooth.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic +import LeanPool.LeanModularForms.GeneralizedResidueTheory.ArcCalculus +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds +import Mathlib.CategoryTheory.Category.Init /-! # Fundamental Domain Boundary – Smoothness @@ -20,6 +25,8 @@ for the fundamental domain boundary. * `fdBoundaryImmersion` — fixed-height boundary as `PiecewiseC1Immersion` -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/Framework.lean b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/Framework.lean index 6c7f0870a4..129bb3b970 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/Framework.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/Framework.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic import LeanPool.LeanModularForms.ContourIntegral.CrossingLimit import LeanPool.LeanModularForms.ContourIntegral.WindingNumber +import Mathlib.Analysis.Calculus.Deriv.Add +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Tactic.Positivity.Finset /-! # Single-Crossing Winding Number Framework @@ -44,6 +50,8 @@ The `SingleCrossingData` structure bundles the 8 obligations of making it easy to instantiate for each geometric case. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology noncomputable section diff --git a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/LeftEdge.lean b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/LeftEdge.lean index 98d257b4ff..cc867f0ed9 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/LeftEdge.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/LeftEdge.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.RightEdge -import LeanPool.LeanModularForms.ContourIntegral.WindingNumber +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic import LeanPool.LeanModularForms.ContourIntegral.CrossingLimit +import LeanPool.LeanModularForms.ContourIntegral.WindingNumber +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.RightEdge +import LeanPool.LeanModularForms.ValenceFormula.TrigLemmas +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Generalized Winding Number at Left Edge Points @@ -15,6 +25,8 @@ Proves `generalizedWindingNumber' (fdBoundaryH H) 0 5 s = -1/2` for points `s` on the left vertical edge of the fundamental domain (`s.re = -1/2`, `√3/2 < s.im < H`). -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm diff --git a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/RightEdge.lean b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/RightEdge.lean index 6caa3f69b4..893745c307 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/RightEdge.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/RightEdge.lean @@ -3,13 +3,20 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.Framework +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic +import LeanPool.LeanModularForms.ContourIntegral.CrossingLimit +import LeanPool.LeanModularForms.ContourIntegral.WindingNumber +import LeanPool.LeanModularForms.GeneralizedResidueTheory.LogDerivFTC +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PrincipalValue +import LeanPool.LeanModularForms.ValenceFormula.TrigLemmas import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common -import LeanPool.LeanModularForms.ContourIntegral.WindingNumber -import LeanPool.LeanModularForms.ContourIntegral.CrossingLimit -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.Framework +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Generalized Winding Number at Right Edge Points @@ -18,6 +25,8 @@ Proves `generalizedWindingNumber' (fdBoundaryH H) 0 5 s = -1/2` for points `s` on the right vertical edge of the fundamental domain (`s.re = 1/2`, `√3/2 < s.im < H`). -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm diff --git a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/UnitArc.lean b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/UnitArc.lean index 9fad1f1102..3f70f41898 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/UnitArc.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/UnitArc.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.UnitArcHelpers -import LeanPool.LeanModularForms.ContourIntegral.WindingNumber +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic import LeanPool.LeanModularForms.ContourIntegral.CrossingLimit +import LeanPool.LeanModularForms.ContourIntegral.WindingNumber +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.RightEdge +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.UnitArcHelpers +import LeanPool.LeanModularForms.ValenceFormula.TrigLemmas +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Unit Arc Winding Number @@ -18,6 +27,8 @@ Uses the helper lemmas from `UnitArcHelpers` together with log ratio/diff tendst and strict norm monotonicity on the arc. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm diff --git a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/UnitArcHelpers.lean b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/UnitArcHelpers.lean index d4821d21e2..0705568216 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/UnitArcHelpers.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/Boundary/Winding/UnitArcHelpers.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.RightEdge +import LeanPool.LeanModularForms.ValenceFormula.TrigLemmas +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Unit Arc Winding Number Helpers @@ -16,6 +25,8 @@ for points `s` on the unit circle arc of the fundamental domain Contains parameterization, separation, slitPlane conditions, and the FTC value computation. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm diff --git a/LeanPool/LeanModularForms/ValenceFormula/CoreIdentity.lean b/LeanPool/LeanModularForms/ValenceFormula/CoreIdentity.lean index 89197789d6..f15c7c6ad5 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/CoreIdentity.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/CoreIdentity.lean @@ -3,14 +3,21 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.ValenceFormula.OrbitPairing import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.LeftEdge import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.RightEdge import LeanPool.LeanModularForms.ValenceFormula.Boundary.Winding.UnitArc import LeanPool.LeanModularForms.ValenceFormula.InteriorWinding -import LeanPool.LeanModularForms.ValenceFormula.OrbitSum import LeanPool.LeanModularForms.ValenceFormula.PVChain -import LeanPool.LeanModularForms.ValenceFormula.WindingWeights +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.I +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Rho +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.RhoPlusOne +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Core Identity for the Valence Formula @@ -22,6 +29,8 @@ The orbit-sum valence formula applied to the canonical zero set `s₀`. * `valence_formula_orbit_sum` — orbit-sum with boundary weight hypothesis -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular MatrixGroups diff --git a/LeanPool/LeanModularForms/ValenceFormula/Definitions.lean b/LeanPool/LeanModularForms/ValenceFormula/Definitions.lean index aa89783075..a5f7c528e0 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/Definitions.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/Definitions.lean @@ -3,14 +3,11 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Analysis.Meromorphic.Order -import Mathlib.NumberTheory.Modular -import Mathlib.NumberTheory.ModularForms.Basic -import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups -import Mathlib.NumberTheory.ModularForms.LevelOne.Basic -import Mathlib.NumberTheory.ModularForms.QExpansion -import Mathlib.RingTheory.PowerSeries.Order +public import Mathlib.NumberTheory.Modular +public import Mathlib.NumberTheory.ModularForms.QExpansion +public import Mathlib.RingTheory.PowerSeries.Order /-! # Valence Formula Definitions @@ -21,6 +18,8 @@ orbifold coefficients, the order of vanishing, and the canonical fundamental dom We use `ModularGroup.fd` (notation `𝒟`) from mathlib for the standard fundamental domain. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular @@ -77,10 +76,10 @@ private lemma rho_plus_one_normSq_eq_one : exact normSq_half_add_sqrt3_half_I (1/2) (by norm_num) theorem ellipticPointRhoPlusOne_norm : ‖ellipticPointRhoPlusOne‖ = 1 := by - change Real.sqrt (Complex.normSq _) = 1; rw [rho_plus_one_normSq_eq_one, Real.sqrt_one] + rw [Complex.norm_def, rho_plus_one_normSq_eq_one, Real.sqrt_one] theorem ellipticPointRho_norm : ‖ellipticPointRho‖ = 1 := by - change Real.sqrt (Complex.normSq _) = 1; rw [rho_normSq_eq_one, Real.sqrt_one] + rw [Complex.norm_def, rho_normSq_eq_one, Real.sqrt_one] theorem ellipticPointI_mem_fd : ellipticPointI' ∈ 𝒟 := by simp only [ModularGroup.fd, ellipticPointI', mem_ofPred_eq] diff --git a/LeanPool/LeanModularForms/ValenceFormula/InteriorWinding.lean b/LeanPool/LeanModularForms/ValenceFormula/InteriorWinding.lean index ca920940e5..772ba7652d 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/InteriorWinding.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/InteriorWinding.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Invariance -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.MainTheorem import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth +import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.MainTheorem +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Interior Winding Number @@ -25,6 +32,8 @@ around any strict interior point equals -1. for any strict interior point with im < H -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/ValenceFormula/ModularInvariance.lean b/LeanPool/LeanModularForms/ValenceFormula/ModularInvariance.lean index 0e063f5940..09d7b298d0 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/ModularInvariance.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/ModularInvariance.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.Definitions -import Mathlib.Analysis.Complex.Convex -import Mathlib.NumberTheory.ModularForms.Identities +public import LeanPool.LeanModularForms.ValenceFormula.Definitions /-! # Modular Invariance of Vanishing Order @@ -20,6 +19,8 @@ We also provide: * Cusp nonvanishing (`exists_height_cusp_nonvanishing`) -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular diff --git a/LeanPool/LeanModularForms/ValenceFormula/OnCurvePV/Basic.lean b/LeanPool/LeanModularForms/ValenceFormula/OnCurvePV/Basic.lean index c793be21a9..3078e1aff9 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/OnCurvePV/Basic.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/OnCurvePV/Basic.lean @@ -3,13 +3,21 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth -import LeanPool.LeanModularForms.GeneralizedResidueTheory.PVInfrastructure.UniformStepBound +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic import LeanPool.LeanModularForms.GeneralizedResidueTheory.OnCurvePV.Basic +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.I import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Rho import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.RhoPlusOne +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # On-Curve PV: Infrastructure @@ -18,6 +26,8 @@ Bridge lemmas, elliptic point CPV, segment geometry helpers, arc injectivity, and CPV helper lemmas (avoidance, concatenation, sub-interval extension, integrability). -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/ValenceFormula/OnCurvePV/EndpointCorner.lean b/LeanPool/LeanModularForms/ValenceFormula/OnCurvePV/EndpointCorner.lean index fd165da4c6..28d172ecf2 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/OnCurvePV/EndpointCorner.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/OnCurvePV/EndpointCorner.lean @@ -3,8 +3,19 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic +import LeanPool.LeanModularForms.GeneralizedResidueTheory.OnCurvePV.Basic +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth import LeanPool.LeanModularForms.ValenceFormula.OnCurvePV.Basic +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # On-Curve PV: Endpoint and Corner CPV @@ -13,6 +24,8 @@ Cauchy principal value existence at the endpoint `1/2 + H*I` and corner `-1/2 + of the fundamental domain boundary `fdBoundaryH H`. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval @@ -28,7 +41,7 @@ private lemma inv_mul_mul_cancel (a b : ℂ) (hb : b ≠ 0) : (a * b)⁻¹ * b = private lemma one_lt_norm_of_one_lt_normSq {s : ℂ} (h : 1 < Complex.normSq s) : 1 < ‖s‖ := calc (1 : ℝ) = Real.sqrt 1 := Real.sqrt_one.symm _ < Real.sqrt (Complex.normSq s) := Real.sqrt_lt_sqrt (by norm_num) h - _ = ‖s‖ := rfl + _ = ‖s‖ := RCLike.sqrt_normSq_eq_norm /-- `∫ t in a..1, t⁻¹ = log 1 - log a` for `0 < a ≤ 1`. -/ private lemma integral_inv_eq_log_sub (a : ℝ) (ha : 0 < a) (ha1 : a ≤ 1) : diff --git a/LeanPool/LeanModularForms/ValenceFormula/OnCurvePV/Main.lean b/LeanPool/LeanModularForms/ValenceFormula/OnCurvePV/Main.lean index 2daa163656..75d33667ad 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/OnCurvePV/Main.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/OnCurvePV/Main.lean @@ -3,8 +3,20 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic +import LeanPool.LeanModularForms.GeneralizedResidueTheory.OnCurvePV.Basic +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth +import LeanPool.LeanModularForms.ValenceFormula.OnCurvePV.Basic import LeanPool.LeanModularForms.ValenceFormula.OnCurvePV.EndpointCorner +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # On-Curve PV: Main Theorem @@ -12,6 +24,8 @@ import LeanPool.LeanModularForms.ValenceFormula.OnCurvePV.EndpointCorner For any point `s` on `fdBoundaryH H`, the CPV integral of `(z - s)⁻¹` exists. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/ValenceFormula/OrbitPairing.lean b/LeanPool/LeanModularForms/ValenceFormula/OrbitPairing.lean index 0d2ab81346..69d3db0688 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/OrbitPairing.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/OrbitPairing.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.Definitions +public import LeanPool.LeanModularForms.ValenceFormula.Definitions import LeanPool.LeanModularForms.ValenceFormula.ModularInvariance /-! @@ -20,6 +21,8 @@ pairing left/right vertical and arc contributions. * `sum_ord_rightArc_eq_sum_ord_leftArc`: Orders on right arc equal orders on left arc. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular diff --git a/LeanPool/LeanModularForms/ValenceFormula/OrbitSum.lean b/LeanPool/LeanModularForms/ValenceFormula/OrbitSum.lean index 3e4d52d98b..93ac75101b 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/OrbitSum.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/OrbitSum.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.OrbitPairing +public import LeanPool.LeanModularForms.ValenceFormula.ModularInvariance import Mathlib.Analysis.Meromorphic.NormalForm import Mathlib.LinearAlgebra.Matrix.FixedDetMatrices @@ -22,6 +23,8 @@ on orbits and establish finite support for the orbit sum. * `finite_support_ordOrbit` — finitely many orbits have nonzero `ordOrbit` -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular MatrixGroups diff --git a/LeanPool/LeanModularForms/ValenceFormula/PVChain.lean b/LeanPool/LeanModularForms/ValenceFormula/PVChain.lean index b3ee78677f..2cf2532e00 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/PVChain.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/PVChain.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.PVChain.Assembly -import LeanPool.LeanModularForms.ValenceFormula.PVChain.Assembly.ResidueSide +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.Assembly +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.Assembly.ResidueSide +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # PV Chain: Residue Side and Modular Side @@ -17,6 +22,8 @@ The key identity `pv_chain_identity` follows by uniqueness of limits: both sides are limits of the same ε-truncated integral, so they are equal. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular MatrixGroups diff --git a/LeanPool/LeanModularForms/ValenceFormula/PVChain/ArcContribution.lean b/LeanPool/LeanModularForms/ValenceFormula/PVChain/ArcContribution.lean index 5189117e85..b3e4e635d1 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/PVChain/ArcContribution.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/PVChain/ArcContribution.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.PVChain.Helpers -import LeanPool.LeanModularForms.ValenceFormula.ModularInvariance +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.Helpers import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Arc Contribution to the PV Chain @@ -27,6 +32,8 @@ where `m(ε) → 2`. * `tendsto_pvIntegral_arc_bridge` — final bridge for Assembly.lean -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular MatrixGroups diff --git a/LeanPool/LeanModularForms/ValenceFormula/PVChain/Assembly.lean b/LeanPool/LeanModularForms/ValenceFormula/PVChain/Assembly.lean index 404450c9d3..a984f27884 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/PVChain/Assembly.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/PVChain/Assembly.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.Helpers +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth +import LeanPool.LeanModularForms.ValenceFormula.PVChain.ArcContribution import LeanPool.LeanModularForms.ValenceFormula.PVChain.OnCurveCapture import LeanPool.LeanModularForms.ValenceFormula.PVChain.Seg5CuspIntegral -import LeanPool.LeanModularForms.ValenceFormula.PVChain.ArcContribution -import LeanPool.LeanModularForms.ValenceFormula.PVChain.ResidueSideInfra -import LeanPool.LeanModularForms.ValenceFormula.ModularInvariance +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # PV Chain Assembly @@ -24,6 +31,8 @@ using `Tendsto` statements for the ε-truncated integrals. `fdBoundaryH H` tends to `-(2πi · (k/12 - ord_∞(f)))`. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular MatrixGroups diff --git a/LeanPool/LeanModularForms/ValenceFormula/PVChain/Assembly/ResidueSide.lean b/LeanPool/LeanModularForms/ValenceFormula/PVChain/Assembly/ResidueSide.lean index f7f6aaf6a7..fdb860b3b8 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/PVChain/Assembly/ResidueSide.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/PVChain/Assembly/ResidueSide.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.ResidueSideInfra +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.Helpers +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth +import LeanPool.LeanModularForms.ValenceFormula.OnCurvePV.Main import LeanPool.LeanModularForms.ValenceFormula.PVChain.OnCurveCapture -import LeanPool.LeanModularForms.ValenceFormula.PVChain.ResidueSideInfra -import LeanPool.LeanModularForms.ValenceFormula.ModularInvariance +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # PV Chain Assembly: Residue Side @@ -20,6 +28,8 @@ integral of `f'/f` around `fdBoundaryH H` tends to `2πi · Σ gWN · ord`. `2πi · Σ gWN · ord` -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular MatrixGroups diff --git a/LeanPool/LeanModularForms/ValenceFormula/PVChain/Helpers.lean b/LeanPool/LeanModularForms/ValenceFormula/PVChain/Helpers.lean index 57b0021fef..30cc8d4868 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/PVChain/Helpers.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/PVChain/Helpers.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic -import LeanPool.LeanModularForms.ValenceFormula.Definitions -import LeanPool.LeanModularForms.ValenceFormula.ModularInvariance +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic +public import LeanPool.LeanModularForms.ValenceFormula.ModularInvariance +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue import LeanPool.LeanModularForms.ValenceFormula.OnCurvePV.Main import LeanPool.LeanModularForms.ValenceFormula.OrbitSum -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # PV Chain Helpers @@ -27,6 +31,8 @@ that are needed to prove `pv_modular_side` and `pv_residue_side`. `fdBoundaryH H` equals `2πi · Σ gWN · ord`. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular MatrixGroups diff --git a/LeanPool/LeanModularForms/ValenceFormula/PVChain/OnCurveCapture.lean b/LeanPool/LeanModularForms/ValenceFormula/PVChain/OnCurveCapture.lean index b05c67f66b..90b5ed0b57 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/PVChain/OnCurveCapture.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/PVChain/OnCurveCapture.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.PVChain.Helpers +public import LeanPool.LeanModularForms.ValenceFormula.PVChain.Helpers +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds import LeanPool.LeanModularForms.ValenceFormula.OrbitSum +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # On-Curve Capture Lemmas @@ -22,6 +29,8 @@ point is captured by one of the singular sets `sArcOfS S` or `sVertOfS S`. * `oncurve_full_capture` — full assembly for all t ∈ [0,5] -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular MatrixGroups diff --git a/LeanPool/LeanModularForms/ValenceFormula/PVChain/ResidueSideInfra.lean b/LeanPool/LeanModularForms/ValenceFormula/PVChain/ResidueSideInfra.lean index f116e811b9..dff1216f35 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/PVChain/ResidueSideInfra.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/PVChain/ResidueSideInfra.lean @@ -3,11 +3,21 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ - -import LeanPool.LeanModularForms.ValenceFormula.PVChain.OnCurveCapture -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.GeneralizedTheoremBase -import LeanPool.LeanModularForms.ValenceFormula.ModularInvariance +module + +public import LeanPool.LeanModularForms.ValenceFormula.ModularInvariance +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Invariance +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Residue.MultipointPV +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth +import LeanPool.LeanModularForms.ValenceFormula.OrbitSum +import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Residue-Side Infrastructure for the PV Chain @@ -25,6 +35,8 @@ Infrastructure lemmas needed to apply `generalizedResidueTheorem'` to * `residueSimplePole_logDeriv_eq_zero_at_nonzero` — residue = 0 at non-zeros -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular MatrixGroups @@ -435,7 +447,7 @@ private lemma fdBoundary_H_eq_fdBoundary_on_13 (H : ℝ) {t : ℝ} omit f hf in private lemma norm_ge_one_of_normSq_ge_one {z : ℂ} (h : normSq z ≥ 1) : ‖z‖ ≥ 1 := - calc ‖z‖ = Real.sqrt (normSq z) := rfl + calc ‖z‖ = Real.sqrt (normSq z) := RCLike.sqrt_normSq_eq_norm.symm _ ≥ Real.sqrt 1 := Real.sqrt_le_sqrt h _ = 1 := Real.sqrt_one diff --git a/LeanPool/LeanModularForms/ValenceFormula/PVChain/Seg5CuspIntegral.lean b/LeanPool/LeanModularForms/ValenceFormula/PVChain/Seg5CuspIntegral.lean index 8ea8318ae2..d5faad294c 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/PVChain/Seg5CuspIntegral.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/PVChain/Seg5CuspIntegral.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.PVChain.Helpers -import LeanPool.LeanModularForms.ValenceFormula.ModularInvariance -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds -import LeanPool.LeanModularForms.GeneralizedResidueTheory.LogDerivFTC +public import LeanPool.LeanModularForms.ValenceFormula.ModularInvariance +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic import LeanPool.LeanModularForms.ForMathlib.QExpansion -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Periodic +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Bounds +import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Seg5 Cusp Integral @@ -36,6 +39,8 @@ circle integral using the factorization `F(q) = q^m · g(q)`: `PVChain.Assembly`. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular MatrixGroups diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/AngleAnalysis.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/AngleAnalysis.lean index bb24a7684d..aaec35d38b 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/AngleAnalysis.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/AngleAnalysis.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.RadialHomotopy +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.RadialHomotopy +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Invariance +import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.PolygonSlope +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Angle analysis and winding number invariance @@ -20,6 +25,8 @@ branch cut crossing on segment 4, constructs a lifted angle that tracks the full * `winding_fdPolygon_center_invariant` — winding number preserved under center translation -/ +@[expose] public section + open Complex Set Metric Filter Topology namespace RectHomotopyProof diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/BoundaryHomotopyDerivBounds.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/BoundaryHomotopyDerivBounds.lean index ca9dd21f28..8c280c27ad 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/BoundaryHomotopyDerivBounds.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/BoundaryHomotopyDerivBounds.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.Geometry import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.HomotopyDef +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Derivative norm bounds for the homotopy segments @@ -13,6 +17,8 @@ Proves that the derivative norm of each segment of `fdBoundaryToPolygonHomotopy` is bounded by 5. -/ +@[expose] public section + open Complex Set Metric Filter Topology namespace RectHomotopyProof diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/BoundaryHomotopyDiff.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/BoundaryHomotopyDiff.lean index 6eb98a90f8..e82dbe86ca 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/BoundaryHomotopyDiff.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/BoundaryHomotopyDiff.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.HomotopyDef +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.Geometry +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Segment differentiability for the homotopy @@ -13,6 +16,8 @@ Proves that each segment of `fdBoundaryToPolygonHomotopy` is differentiable in t. -/ +@[expose] public section + open Complex Set Metric Filter Topology namespace RectHomotopyProof diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/BoundaryHomotopySmooth.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/BoundaryHomotopySmooth.lean index 3fdf8bfaf4..0520fdb956 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/BoundaryHomotopySmooth.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/BoundaryHomotopySmooth.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.Geometry import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.HomotopyDef +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Non-differentiability at partition points and derivative continuity @@ -13,6 +17,8 @@ Proves the homotopy is not differentiable at t ∈ {1, 3, 4} (left/right derivat differ) and that the per-segment derivatives are continuous. -/ +@[expose] public section + open Complex Set Metric Filter Topology namespace RectHomotopyProof diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/Geometry.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/Geometry.lean index 14f871daf0..1e75deabda 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/Geometry.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/Geometry.lean @@ -3,12 +3,10 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.CircleParam -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic -import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Analysis.Convex.Basic -import Mathlib.MeasureTheory.Integral.CircleIntegral +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic +import Mathlib.CategoryTheory.Category.Init /-! # Rect Homotopy: Geometry and Definitions @@ -25,6 +23,8 @@ the winding number of `fdBoundary` around interior points is -1. * `RectHomotopyProof.HHeight` — height parameter (= `heightCutoff`) -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology Metric open scoped Real Interval diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/HomotopyDef.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/HomotopyDef.lean index bc334d8957..e957f40a87 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/HomotopyDef.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/HomotopyDef.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.Geometry +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.Geometry import LeanPool.LeanModularForms.ValenceFormula.TrigLemmas +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Homotopy infrastructure for FD boundary → polygon deformation @@ -20,6 +23,8 @@ continuity and matching at breakpoints, and establishes the main results: * `circleAround` and `polygonToCircleHomotopy` -/ +@[expose] public section + open Complex Set Metric Filter /-- Work around mathlib 4.29-rc8 instance synthesis issue: `NormedSpace.toNormSMulClass` fails diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/MainTheorem.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/MainTheorem.lean index b7c9fdab90..ae023834f6 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/MainTheorem.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/MainTheorem.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.CircleParam +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.Geometry +import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Invariance import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.BoundaryHomotopyDiff +import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.HomotopyDef import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.MainTheoremBound import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.MainTheoremDerivCont import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.WindingProof +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Main winding number theorem for the fundamental domain boundary @@ -17,6 +23,8 @@ The generalized winding number of `fdBoundary` around interior points equals -1 (clockwise). -/ +@[expose] public section + open Complex Set Metric Filter Topology namespace RectHomotopyProof diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/MainTheoremBound.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/MainTheoremBound.lean index 690716d665..d257e77414 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/MainTheoremBound.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/MainTheoremBound.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.Geometry import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.BoundaryHomotopyDerivBounds -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.BoundaryHomotopyDiff import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.BoundaryHomotopySmooth +import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.HomotopyDef +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Uniform derivative bound for the homotopy @@ -15,6 +19,8 @@ Proves a uniform bound `‖deriv_t H(t,s)‖ ≤ 5` for all `(t,s) ∈ [0,5] × handling each segment case and the non-differentiable fallback. -/ +@[expose] public section + open Complex Set Metric Filter Topology namespace RectHomotopyProof diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/MainTheoremDerivCont.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/MainTheoremDerivCont.lean index 7b3042f9d2..113d4a20d8 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/MainTheoremDerivCont.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/MainTheoremDerivCont.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.Geometry import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.BoundaryHomotopySmooth +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Derivative continuity for the homotopy on partition pieces @@ -14,6 +18,8 @@ on each partition piece `(p₁, p₂) × [0, 1]`, where `(p₁, p₂)` avoids th partition points `{1, 2, 3, 4}`. -/ +@[expose] public section + open Complex Set Metric Filter Topology namespace RectHomotopyProof diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/PolygonProps.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/PolygonProps.lean index 9aac8bd95f..1ae9c9e1af 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/PolygonProps.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/PolygonProps.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.HomotopyDef +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.Geometry +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Polygon properties: values, segment functions, derivatives, differentiability @@ -18,6 +21,8 @@ Defines per-segment functions `fdPolygonSeg1`..`fdPolygonSeg5` and proves: * Segment differentiability and `fdPolygon_differentiableAt_off_partition` -/ +@[expose] public section + open Complex Set Metric Filter Topology namespace RectHomotopyProof diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/PolygonSlope.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/PolygonSlope.lean index d1f5d21735..022e23e841 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/PolygonSlope.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/PolygonSlope.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.Geometry import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.PolygonProps +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Polygon slope analysis and derivative bounds @@ -17,6 +21,8 @@ non-differentiability at partition points `{1,2,3,4}`, and global derivative bou * `fdPolygon_deriv_bounded` — `∃ M, ∀ t ∈ Icc 0 5, ‖deriv fdPolygon t‖ ≤ M` -/ +@[expose] public section + open Complex Set Metric Filter Topology namespace RectHomotopyProof diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/RadialHomotopy.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/RadialHomotopy.lean index 200aa14704..8d44df5774 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/RadialHomotopy.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/RadialHomotopy.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Integrality +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.PolygonProps import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.Invariance -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.PolygonSlope +import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.HomotopyDef +import Mathlib.Analysis.Calculus.Deriv.Prod import Mathlib.Analysis.InnerProductSpace.Calculus +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Radial homotopy from polygon to unit circle @@ -21,6 +27,8 @@ of `PiecewiseCurvesHomotopicAvoiding`. * `winding_fdPolygon_eq_radialCircle` — winding numbers are equal -/ +@[expose] public section + open Complex Set Metric Filter Topology namespace RectHomotopyProof diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/WindingBase.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/WindingBase.lean index 70e9b88b05..f40745bc80 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/WindingBase.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/WindingBase.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.AngleAnalysis -import LeanPool.LeanModularForms.GeneralizedResidueTheory.CurveAvoidance +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.AngleAnalysis +import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.HomotopyDef +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Winding number base lemmas @@ -23,6 +26,8 @@ computation for the fundamental domain boundary. * `tendsto_arg_w_left`, `tendsto_arg_w_right` — limits of arg at tL from left/right -/ +@[expose] public section + open Complex Set Metric Filter Topology namespace RectHomotopyProof diff --git a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/WindingProof.lean b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/WindingProof.lean index a4e72513b5..5d62b515b9 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/WindingProof.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/RectHomotopy/WindingProof.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.CircleParam +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.CircleParam +public import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.AngleAnalysis +import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.HomotopyDef import LeanPool.LeanModularForms.ValenceFormula.RectHomotopy.WindingBase +import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Winding number computation @@ -20,6 +26,8 @@ using FTC with lifted angle functions and S1 curve comparisons. * `winding_fdPolygon_eq_circleParamCW` — matches circleParamCW winding -/ +@[expose] public section + open Complex Set Metric Filter Topology MeasureTheory namespace RectHomotopyProof diff --git a/LeanPool/LeanModularForms/ValenceFormula/TextbookExistence.lean b/LeanPool/LeanModularForms/ValenceFormula/TextbookExistence.lean index e067101e26..6a2581cd0a 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/TextbookExistence.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/TextbookExistence.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.OrbitSum +public import LeanPool.LeanModularForms.ValenceFormula.OrbitSum +public import LeanPool.LeanModularForms.ValenceFormula.OrbitPairing /-! # Canonical Representatives for Non-Elliptic Orbits @@ -18,6 +20,8 @@ finsets used by `valence_formula_orbit_sum_s₀`. there exists `p ∈ repCanon f hf` with `orb p = q`. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular MatrixGroups diff --git a/LeanPool/LeanModularForms/ValenceFormula/TextbookForm.lean b/LeanPool/LeanModularForms/ValenceFormula/TextbookForm.lean index 6668c12992..e9e0be0132 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/TextbookForm.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/TextbookForm.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module +public import LeanPool.LeanModularForms.ValenceFormula.TextbookExistence import LeanPool.LeanModularForms.ValenceFormula.CoreIdentity -import LeanPool.LeanModularForms.ValenceFormula.TextbookExistence -import Mathlib.Algebra.BigOperators.Finprod +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Textbook Orbit-Finsum Form of the Valence Formula @@ -19,6 +23,8 @@ non-elliptic orbits of `SL₂(ℤ)` acting on `ℍ`. * `valence_formula_textbook_orbit_finsum` — the valence formula with `∑ᶠ` -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology CongruenceSubgroup open scoped Real Interval UpperHalfPlane ModularForm Modular MatrixGroups diff --git a/LeanPool/LeanModularForms/ValenceFormula/TrigLemmas.lean b/LeanPool/LeanModularForms/ValenceFormula/TrigLemmas.lean index 156790db45..8b6e3d876b 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/TrigLemmas.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/TrigLemmas.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import Mathlib.Analysis.SpecialFunctions.Complex.CircleAddChar +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.Positivity.Finset /-! # Shared Trigonometric Identities @@ -13,6 +19,8 @@ Euler-formula expansion of `exp(θ * I)` and exact values at `2π/3`, used by both `WindingWeights/Common.lean` and `RectHomotopy/HomotopyDef.lean`. -/ +@[expose] public section + open Complex theorem exp_real_angle_I (θ : ℝ) : diff --git a/LeanPool/LeanModularForms/ValenceFormula/WindingWeights.lean b/LeanPool/LeanModularForms/ValenceFormula/WindingWeights.lean index 4d33386de1..221502d2a0 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/WindingWeights.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/WindingWeights.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.I -import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Rho -import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.RhoPlusOne +public import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.I +public import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Rho +public import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.RhoPlusOne +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Winding Number Weights at Elliptic Points @@ -23,6 +27,8 @@ fundamental domain boundary around the elliptic points i, ρ, ρ+1. * `effectiveWinding_i_eq_neg_gWN` — 1/2 = -gWN(i) -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/Common.lean b/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/Common.lean index 50d6497ab9..1fc27274a6 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/Common.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/Common.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.Boundary.Smooth +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic +import LeanPool.LeanModularForms.GeneralizedResidueTheory.ArcCalculus import LeanPool.LeanModularForms.GeneralizedResidueTheory.LogDerivFTC -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds import LeanPool.LeanModularForms.ValenceFormula.TrigLemmas +import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Shared Infrastructure for Winding Weight Computations @@ -17,6 +22,8 @@ trigonometric identities, old-style segment selectors, the unified arc formula, and FTC lemmas for log-derivative integrals. -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/I.lean b/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/I.lean index e0ad103bb2..9bb4d0fc33 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/I.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/I.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common -import LeanPool.LeanModularForms.ContourIntegral.WindingNumber +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic import LeanPool.LeanModularForms.ContourIntegral.CrossingLimit +import LeanPool.LeanModularForms.ContourIntegral.WindingNumber +import LeanPool.LeanModularForms.GeneralizedResidueTheory.ArcCalculus +import LeanPool.LeanModularForms.ValenceFormula.TrigLemmas +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Winding Number Weight at i @@ -20,6 +28,8 @@ around the point i. * `gWN_fdBoundary_H_at_i` — gWN = -1/2 at i -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval @@ -27,27 +37,28 @@ attribute [local instance] Classical.propDecidable noncomputable section -/-- Half-angle factorization of `sin(δπ/6)` used across the i-point trig proofs. -/ +/-- Half-angle factorization of `sin(δπ/6)`. -/ private lemma sin_delta_pi_six_factor (δ : ℝ) : Real.sin (δ * Real.pi / 6) = 2 * Real.sin (δ * Real.pi / 12) * Real.cos (δ * Real.pi / 12) := by rw [show δ * Real.pi / 6 = 2 * (δ * Real.pi / 12) from by ring, Real.sin_two_mul] -/-- Half-angle factorization of `cos(δπ/6) - 1` used across the i-point trig proofs. -/ +/-- Half-angle factorization of `cos(δπ/6) - 1`. -/ private lemma cos_delta_pi_six_sub_one_factor (δ : ℝ) : Real.cos (δ * Real.pi / 6) - 1 = -(2 * Real.sin (δ * Real.pi / 12) * Real.sin (δ * Real.pi / 12)) := by rw [show δ * Real.pi / 6 = 2 * (δ * Real.pi / 12) from by ring, Real.cos_two_mul] nlinarith [Real.sin_sq_add_cos_sq (δ * Real.pi / 12)] -private lemma arg_approach_i_left (hδ : 0 < δ) (hδ_small : δ < 1) : - (fdBoundaryH H (2 - δ) - I).arg = -(δ * Real.pi / 12) := by +/-- Half-angle factorization of the boundary displacement from `i`. -/ +private lemma g_i_factor {δ : ℝ} (hδ_lower : -1 < δ) (hδ_upper : δ < 1) : + fdBoundaryH H (2 - δ) - I = + (2 * Real.sin (δ * Real.pi / 12)) • Complex.exp (↑(-(δ * Real.pi / 12)) * I) := by have h1 : 1 < 2 - δ := by linarith have h3 : 2 - δ < 3 := by linarith - rw [fdBoundary_H_eq_arc h1 h3] + rw [fdBoundary_H_eq_arc h1 h3, exp_real_angle_I] set θ := Real.pi / 2 - δ * Real.pi / 6 with hθ_def rw [show Real.pi * (1 + (2 - δ)) / 6 = θ from by simp only [hθ_def]; ring] - rw [show (↑θ : ℂ) * I = ↑θ * I from rfl, exp_real_angle_I] have h_cos : Real.cos θ = Real.sin (δ * Real.pi / 6) := by rw [hθ_def, Real.cos_pi_div_two_sub] have h_sin : Real.sin θ = Real.cos (δ * Real.pi / 6) := by rw [hθ_def, Real.sin_pi_div_two_sub] have h_re_factor : Real.sin (δ * Real.pi / 6) = @@ -55,130 +66,61 @@ private lemma arg_approach_i_left (hδ : 0 < δ) (hδ_small : δ < 1) : have h_im_factor : Real.cos (δ * Real.pi / 6) - 1 = -(2 * Real.sin (δ * Real.pi / 12) * Real.sin (δ * Real.pi / 12)) := cos_delta_pi_six_sub_one_factor δ - have h_sin_pos : 0 < Real.sin (δ * Real.pi / 12) := - ArcCalculus.sin_pos_of_mem_Ioo_zero_pi (by constructor <;> nlinarith [Real.pi_pos]) - have h_eq : ↑(Real.cos θ) + ↑(Real.sin θ) * I - I = - ↑(2 * Real.sin (δ * Real.pi / 12)) * - (↑(Real.cos (δ * Real.pi / 12)) + ↑(-(Real.sin (δ * Real.pi / 12))) * I) := by - rw [h_cos, h_sin] - apply Complex.ext - · simp only [add_re, sub_re, mul_re, ofReal_re, ofReal_im, I_re, I_im, - mul_zero, zero_mul, sub_zero, add_zero, mul_one]; linarith [h_re_factor] - · simp only [add_im, sub_im, mul_im, ofReal_re, ofReal_im, I_re, I_im, - mul_zero, zero_mul, add_zero, mul_one, zero_add]; linarith [h_im_factor] - rw [h_eq] - have h_trig : (↑(Real.cos (δ * Real.pi / 12)) : ℂ) + - ↑(-(Real.sin (δ * Real.pi / 12))) * I = - Complex.cos ↑(-(δ * Real.pi / 12)) + Complex.sin ↑(-(δ * Real.pi / 12)) * I := by - rw [← Complex.ofReal_cos, ← Complex.ofReal_sin, Real.cos_neg, Real.sin_neg, ofReal_neg] - rw [h_trig] - exact Complex.arg_mul_cos_add_sin_mul_I (mul_pos (by norm_num : (0 : ℝ) < 2) h_sin_pos) - ⟨by nlinarith [Real.pi_pos], by nlinarith [Real.pi_pos]⟩ + rw [Complex.real_smul, exp_real_angle_I, Real.cos_neg, Real.sin_neg, h_cos, h_sin] + apply Complex.ext + · simp only [add_re, sub_re, mul_re, ofReal_re, ofReal_im, I_re, I_im, + mul_zero, zero_mul, sub_zero, add_zero, mul_one]; linarith only [h_re_factor] + · simp only [add_im, sub_im, mul_im, ofReal_re, ofReal_im, I_re, I_im, + mul_zero, zero_mul, add_zero, mul_one, zero_add]; linarith only [h_im_factor] + +private lemma g_i_factor_right {δ : ℝ} (hδ : 0 < δ) (hδ1 : δ < 1) : + fdBoundaryH H (2 + δ) - I = + -(2 * Real.sin (δ * Real.pi / 12)) • Complex.exp (↑(δ * Real.pi / 12) * I) := by + simpa only [sub_neg_eq_add, neg_mul, neg_div, Real.sin_neg, neg_neg, mul_neg] using + (g_i_factor (H := H) (δ := -δ) (by linarith) (by linarith)) + +private lemma sin_i_half_angle_pos {δ : ℝ} (hδ : 0 < δ) (hδ1 : δ < 1) : + 0 < Real.sin (δ * Real.pi / 12) := + ArcCalculus.sin_pos_of_mem_Ioo_zero_pi + ⟨by nlinarith only [hδ, Real.pi_pos], by nlinarith only [hδ1, Real.pi_pos]⟩ + +private lemma arg_approach_i_left (hδ : 0 < δ) (hδ_small : δ < 1) : + (fdBoundaryH H (2 - δ) - I).arg = -(δ * Real.pi / 12) := by + rw [g_i_factor (by linarith) hδ_small, Complex.real_smul, exp_real_angle_I, + Complex.ofReal_cos, Complex.ofReal_sin] + exact Complex.arg_mul_cos_add_sin_mul_I + (mul_pos (by norm_num : (0 : ℝ) < 2) (sin_i_half_angle_pos hδ hδ_small)) + ⟨by nlinarith only [hδ_small, Real.pi_pos], by nlinarith only [hδ, Real.pi_pos]⟩ private lemma arg_approach_i_right (hδ : 0 < δ) (hδ_small : δ < 1) : (fdBoundaryH H (2 + δ) - I).arg = δ * Real.pi / 12 - Real.pi := by - have h1 : 1 < 2 + δ := by linarith - have h3 : 2 + δ < 3 := by linarith - rw [fdBoundary_H_eq_arc h1 h3] - set θ := Real.pi / 2 + δ * Real.pi / 6 with hθ_def - rw [show Real.pi * (1 + (2 + δ)) / 6 = θ from by simp only [hθ_def]; ring] - rw [show (↑θ : ℂ) * I = ↑θ * I from rfl, exp_real_angle_I] - have h_cos : Real.cos θ = -Real.sin (δ * Real.pi / 6) := by - rw [hθ_def, Real.cos_add, Real.cos_pi_div_two, Real.sin_pi_div_two]; ring - have h_sin : Real.sin θ = Real.cos (δ * Real.pi / 6) := by - rw [hθ_def, Real.sin_add, Real.sin_pi_div_two, Real.cos_pi_div_two]; ring - have h_re_factor : -Real.sin (δ * Real.pi / 6) = - -(2 * Real.sin (δ * Real.pi / 12) * Real.cos (δ * Real.pi / 12)) := by - rw [sin_delta_pi_six_factor] - have h_im_factor : Real.cos (δ * Real.pi / 6) - 1 = - -(2 * Real.sin (δ * Real.pi / 12) * Real.sin (δ * Real.pi / 12)) := - cos_delta_pi_six_sub_one_factor δ - have h_sin_pos : 0 < Real.sin (δ * Real.pi / 12) := - ArcCalculus.sin_pos_of_mem_Ioo_zero_pi (by constructor <;> nlinarith [Real.pi_pos]) - set w := (↑(Real.cos (δ * Real.pi / 12)) : ℂ) + - ↑(Real.sin (δ * Real.pi / 12)) * I with hw_def - have h_eq : ↑(Real.cos θ) + ↑(Real.sin θ) * I - I = - -(↑(2 * Real.sin (δ * Real.pi / 12)) * w) := by - rw [h_cos, h_sin] - apply Complex.ext - · simp only [hw_def, add_re, sub_re, neg_re, mul_re, ofReal_re, ofReal_im, I_re, I_im, - mul_zero, zero_mul, sub_zero, add_zero, mul_one]; linarith [h_re_factor] - · simp only [hw_def, add_im, sub_im, neg_im, mul_im, ofReal_re, ofReal_im, I_re, I_im, - mul_zero, zero_mul, add_zero, mul_one, zero_add]; linarith [h_im_factor] - rw [h_eq] + have h_sin_pos := sin_i_half_angle_pos hδ hδ_small + set w := Complex.exp (↑(δ * Real.pi / 12) * I) with hw_def have hw_im_pos : 0 < w.im := by - simp only [hw_def, add_im, ofReal_im, mul_im, ofReal_re, I_re, I_im, - mul_zero, add_zero, mul_one] - linarith + simpa only [hw_def, exp_real_angle_I, add_im, ofReal_im, mul_im, ofReal_re, + I_re, I_im, mul_zero, add_zero, mul_one, zero_add] using h_sin_pos have hw_arg : w.arg = δ * Real.pi / 12 := by - have hw_eq : w = ↑(1 : ℝ) * (Complex.cos ↑(δ * Real.pi / 12) + - Complex.sin ↑(δ * Real.pi / 12) * I) := by - simp_all - rw [hw_eq] - exact Complex.arg_mul_cos_add_sin_mul_I (by norm_num : (0 : ℝ) < 1) - ⟨by nlinarith [Real.pi_pos], by nlinarith [Real.pi_pos]⟩ + rw [hw_def, exp_real_angle_I, Complex.ofReal_cos, Complex.ofReal_sin] + simpa only [ofReal_one, one_mul] using + (Complex.arg_mul_cos_add_sin_mul_I (by norm_num : (0 : ℝ) < 1) + ⟨by nlinarith only [hδ, Real.pi_pos], by nlinarith only [hδ_small, Real.pi_pos]⟩) have hrw_im_pos : 0 < (↑(2 * Real.sin (δ * Real.pi / 12)) * w).im := by rw [Complex.mul_im, Complex.ofReal_re, Complex.ofReal_im] - simp_all - rw [Complex.arg_neg_eq_arg_sub_pi_of_im_pos hrw_im_pos, - Complex.arg_real_mul w (mul_pos (by norm_num : (0 : ℝ) < 2) h_sin_pos), - hw_arg] + simpa only [zero_mul, add_zero] using + mul_pos (mul_pos (by norm_num : (0 : ℝ) < 2) h_sin_pos) hw_im_pos + rw [g_i_factor_right hδ hδ_small, Complex.real_smul, ofReal_neg, neg_mul, + Complex.arg_neg_eq_arg_sub_pi_of_im_pos hrw_im_pos, + Complex.arg_real_mul w (mul_pos (by norm_num : (0 : ℝ) < 2) h_sin_pos), hw_arg] private lemma g_i_norm_left {δ : ℝ} (hδ : 0 < δ) (hδ1 : δ < 1) : ‖fdBoundaryH H (2 - δ) - I‖ = 2 * Real.sin (δ * Real.pi / 12) := by - have h1 : 1 < 2 - δ := by linarith - have h3 : 2 - δ < 3 := by linarith - rw [fdBoundary_H_eq_arc h1 h3, exp_real_angle_I] - set θ := Real.pi / 2 - δ * Real.pi / 6 with hθ_def - rw [show Real.pi * (1 + (2 - δ)) / 6 = θ from by simp only [hθ_def]; ring] - have h_cos : Real.cos θ = Real.sin (δ * Real.pi / 6) := by rw [hθ_def, Real.cos_pi_div_two_sub] - have h_sin : Real.sin θ = Real.cos (δ * Real.pi / 6) := by rw [hθ_def, Real.sin_pi_div_two_sub] - have h_re_factor : Real.sin (δ * Real.pi / 6) = - 2 * Real.sin (δ * Real.pi / 12) * Real.cos (δ * Real.pi / 12) := sin_delta_pi_six_factor δ - have h_im_factor : Real.cos (δ * Real.pi / 6) - 1 = - -(2 * Real.sin (δ * Real.pi / 12) * Real.sin (δ * Real.pi / 12)) := - cos_delta_pi_six_sub_one_factor δ - have h_sin_pos : 0 < Real.sin (δ * Real.pi / 12) := - ArcCalculus.sin_pos_of_mem_Ioo_zero_pi (by constructor <;> nlinarith [Real.pi_pos]) - have h_eq : ↑(Real.cos θ) + ↑(Real.sin θ) * I - I = - (2 * Real.sin (δ * Real.pi / 12)) • Complex.exp (↑(-(δ * Real.pi / 12)) * I) := by - rw [Complex.real_smul, exp_real_angle_I, Real.cos_neg, Real.sin_neg, h_cos, h_sin] - apply Complex.ext - · simp only [add_re, sub_re, mul_re, ofReal_re, ofReal_im, I_re, I_im, - mul_zero, zero_mul, sub_zero, add_zero, mul_one]; linarith [h_re_factor] - · simp only [add_im, sub_im, mul_im, ofReal_re, ofReal_im, I_re, I_im, - mul_zero, zero_mul, add_zero, mul_one, zero_add]; linarith [h_im_factor] - rw [h_eq, norm_smul, Complex.norm_exp_ofReal_mul_I, mul_one, Real.norm_of_nonneg (by linarith)] + rw [g_i_factor (by linarith) hδ1, norm_smul, Complex.norm_exp_ofReal_mul_I, + mul_one, Real.norm_of_nonneg (mul_nonneg (by norm_num) (sin_i_half_angle_pos hδ hδ1).le)] private lemma g_i_norm_right {δ : ℝ} (hδ : 0 < δ) (hδ1 : δ < 1) : ‖fdBoundaryH H (2 + δ) - I‖ = 2 * Real.sin (δ * Real.pi / 12) := by - have h1 : 1 < 2 + δ := by linarith - have h3 : 2 + δ < 3 := by linarith - rw [fdBoundary_H_eq_arc h1 h3, exp_real_angle_I] - set θ := Real.pi / 2 + δ * Real.pi / 6 with hθ_def - rw [show Real.pi * (1 + (2 + δ)) / 6 = θ from by simp only [hθ_def]; ring] - have h_cos : Real.cos θ = -Real.sin (δ * Real.pi / 6) := by - rw [hθ_def, Real.cos_add, Real.cos_pi_div_two, Real.sin_pi_div_two]; ring - have h_sin : Real.sin θ = Real.cos (δ * Real.pi / 6) := by - rw [hθ_def, Real.sin_add, Real.sin_pi_div_two, Real.cos_pi_div_two]; ring - have h_re_factor : -Real.sin (δ * Real.pi / 6) = - -(2 * Real.sin (δ * Real.pi / 12) * Real.cos (δ * Real.pi / 12)) := by - rw [sin_delta_pi_six_factor] - have h_im_factor : Real.cos (δ * Real.pi / 6) - 1 = - -(2 * Real.sin (δ * Real.pi / 12) * Real.sin (δ * Real.pi / 12)) := - cos_delta_pi_six_sub_one_factor δ - have h_sin_pos : 0 < Real.sin (δ * Real.pi / 12) := - ArcCalculus.sin_pos_of_mem_Ioo_zero_pi (by constructor <;> nlinarith [Real.pi_pos]) - have h_eq : ↑(Real.cos θ) + ↑(Real.sin θ) * I - I = - (-(2 * Real.sin (δ * Real.pi / 12))) • Complex.exp (↑(δ * Real.pi / 12) * I) := by - rw [Complex.real_smul, exp_real_angle_I, h_cos, h_sin] - apply Complex.ext - · simp only [add_re, sub_re, mul_re, ofReal_re, ofReal_im, I_re, I_im, - mul_zero, zero_mul, sub_zero, add_zero, mul_one]; linarith [h_re_factor] - · simp only [add_im, sub_im, mul_im, ofReal_re, ofReal_im, I_re, I_im, - mul_zero, zero_mul, add_zero, mul_one, zero_add]; linarith [h_im_factor] - rw [h_eq, norm_smul, Complex.norm_exp_ofReal_mul_I, mul_one, Real.norm_eq_abs, abs_neg, - abs_of_nonneg (by linarith)] + rw [g_i_factor_right hδ hδ1, norm_smul, Complex.norm_exp_ofReal_mul_I, mul_one, + norm_neg, Real.norm_of_nonneg (mul_nonneg (by norm_num) (sin_i_half_angle_pos hδ hδ1).le)] private lemma g_i_norm_ge_seg0 {t : ℝ} (_ht0 : 0 ≤ t) (ht1 : t ≤ 1) : 1 / 2 ≤ ‖fdBoundaryH H t - I‖ := by @@ -647,6 +589,16 @@ private lemma i_delta_lt_one {ε : ℝ} (hε_pos : 0 < ε) mul_lt_mul_of_pos_left harcsin_lt (div_pos (by norm_num) hpi_pos) _ = 1 := by field_simp +/-- The distance from `i` along either adjacent arc increases with the parameter distance. -/ +private lemma strictMonoOn_i_chordLength : + StrictMonoOn (fun δ : ℝ => 2 * Real.sin (δ * Real.pi / 12)) (Icc 0 1) := by + intro x hx y hy hxy + apply mul_lt_mul_of_pos_left _ (by norm_num : (0 : ℝ) < 2) + exact Real.sin_lt_sin_of_lt_of_le_pi_div_two + (by nlinarith only [hx.1, Real.pi_pos]) + (by nlinarith only [hy.2, Real.pi_pos]) + (by nlinarith only [hxy, Real.pi_pos]) + private lemma i_h_far (H : ℝ) (hH : 1 < H) : let threshold := min (min (min (1/2 : ℝ) (H - 1)) (2 * Real.sin (Real.pi / 12))) 1 ∀ ε, 0 < ε → ε < threshold → @@ -688,10 +640,8 @@ private lemma i_h_far (H : ℝ) (hH : 1 < H) : · change ε < ‖fdBoundaryH H t - I‖ rw [g_i_norm_arc_left ht1 (by linarith)] rw [← h_norm_L, g_i_norm_left hδ_pos hδ_lt_one] - apply mul_lt_mul_of_pos_left _ (by norm_num : (0 : ℝ) < 2) - exact Real.sin_lt_sin_of_lt_of_le_pi_div_two - (by nlinarith [Real.pi_pos]) (by nlinarith [Real.pi_pos]) - (by nlinarith [Real.pi_pos]) + exact strictMonoOn_i_chordLength ⟨hδ_pos.le, hδ_lt_one.le⟩ + ⟨by linarith, by linarith⟩ (by linarith) · -- t ≥ 2 - δ and δ < |t - 2|, so t > 2 + δ have h_gt : 2 + δ < t := by rcases le_or_gt (2 : ℝ) t with h2 | h2 @@ -705,10 +655,8 @@ private lemma i_h_far (H : ℝ) (hH : 1 < H) : · change ε < ‖fdBoundaryH H t - I‖ rw [g_i_norm_arc_right (by linarith) ht3] rw [← h_norm_R, g_i_norm_right hδ_pos hδ_lt_one] - apply mul_lt_mul_of_pos_left _ (by norm_num : (0 : ℝ) < 2) - exact Real.sin_lt_sin_of_lt_of_le_pi_div_two - (by nlinarith [Real.pi_pos]) (by nlinarith [Real.pi_pos]) - (by nlinarith [Real.pi_pos]) + exact strictMonoOn_i_chordLength ⟨hδ_pos.le, hδ_lt_one.le⟩ + ⟨by linarith, by linarith⟩ (by linarith) · rcases le_or_gt t 4 with ht4 | ht4 · calc ε < 1 / 2 := hε_lt_half _ ≤ ‖fdBoundaryH H t - I‖ := g_i_norm_ge_seg3 ht3 ht4 @@ -734,8 +682,6 @@ private lemma i_h_near (H : ℝ) : have hδ_pos : 0 < δ := by rw [hδ_def]; positivity have hδ_lt_one : δ < 1 := i_delta_lt_one hε_pos hε_lt_2sin have hδ_angle : δ * Real.pi / 12 = Real.arcsin (ε / 2) := by rw [hδ_def]; field_simp - have hδpi12_le : δ * Real.pi / 12 ≤ Real.pi / 2 := by - rw [hδ_angle]; exact le_of_lt (Real.arcsin_lt_pi_div_two.mpr (by linarith)) -- From h_abs : |t - 2| ≤ δ rw [abs_le] at h_abs -- t ∈ [2-δ, 2+δ] ⊂ (1, 3) for δ < 1 @@ -745,30 +691,18 @@ private lemma i_h_near (H : ℝ) : · have ht1 : 1 < t := by linarith [h_abs.1] rw [g_i_norm_arc_left ht1 ht2'] have h2t_le : 2 - t ≤ δ := by linarith [h_abs.1] - have h2t_nonneg : 0 ≤ (2 - t) * Real.pi / 12 := by nlinarith [Real.pi_pos] - have h2t_le_pi2 : (2 - t) * Real.pi / 12 ≤ Real.pi / 2 := by nlinarith [Real.pi_pos] calc 2 * Real.sin ((2 - t) * Real.pi / 12) ≤ 2 * Real.sin (δ * Real.pi / 12) := - mul_le_mul_of_nonneg_left - (Real.sin_le_sin_of_le_of_le_pi_div_two - (by nlinarith [Real.pi_pos]) - hδpi12_le - (by nlinarith)) - (by norm_num) + strictMonoOn_i_chordLength.monotoneOn ⟨by linarith, by linarith⟩ + ⟨hδ_pos.le, hδ_lt_one.le⟩ h2t_le _ = ε := by rw [hδ_angle, Real.sin_arcsin hε_half_neg hε_half_le]; linarith · have ht3 : t < 3 := by linarith [h_abs.2] rw [g_i_norm_arc_right ht2 ht3] have ht2_le : t - 2 ≤ δ := by linarith [h_abs.2] - have ht2_nonneg : 0 ≤ (t - 2) * Real.pi / 12 := by nlinarith [Real.pi_pos] - have ht2_le_pi2 : (t - 2) * Real.pi / 12 ≤ Real.pi / 2 := by nlinarith [Real.pi_pos] calc 2 * Real.sin ((t - 2) * Real.pi / 12) ≤ 2 * Real.sin (δ * Real.pi / 12) := - mul_le_mul_of_nonneg_left - (Real.sin_le_sin_of_le_of_le_pi_div_two - (by nlinarith [Real.pi_pos]) - hδpi12_le - (by nlinarith)) - (by norm_num) + strictMonoOn_i_chordLength.monotoneOn ⟨by linarith, by linarith⟩ + ⟨hδ_pos.le, hδ_lt_one.le⟩ ht2_le _ = ε := by rw [hδ_angle, Real.sin_arcsin hε_half_neg hε_half_le]; linarith private lemma i_angle_bound {δ ε : ℝ} (H : ℝ) diff --git a/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/Rho.lean b/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/Rho.lean index 41d55fb5b6..4af904e45e 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/Rho.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/Rho.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common -import LeanPool.LeanModularForms.ContourIntegral.WindingNumber +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic import LeanPool.LeanModularForms.ContourIntegral.CrossingLimit +import LeanPool.LeanModularForms.ContourIntegral.WindingNumber +import LeanPool.LeanModularForms.GeneralizedResidueTheory.ArcCalculus +import LeanPool.LeanModularForms.ValenceFormula.TrigLemmas +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Winding Number Weight at ρ @@ -20,6 +28,8 @@ around the elliptic point ρ = e^{2πi/3}. * `gWN_fdBoundary_H_at_rho` — gWN = -1/6 at ρ -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/RhoPlusOne.lean b/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/RhoPlusOne.lean index a3ec78aee6..c2bbe6a38f 100644 --- a/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/RhoPlusOne.lean +++ b/LeanPool/LeanModularForms/ValenceFormula/WindingWeights/RhoPlusOne.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ +module -import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common -import LeanPool.LeanModularForms.ContourIntegral.WindingNumber +public import LeanPool.LeanModularForms.GeneralizedResidueTheory.Basic +public import LeanPool.LeanModularForms.ValenceFormula.Boundary.Basic import LeanPool.LeanModularForms.ContourIntegral.CrossingLimit +import LeanPool.LeanModularForms.ContourIntegral.WindingNumber +import LeanPool.LeanModularForms.GeneralizedResidueTheory.ArcCalculus +import LeanPool.LeanModularForms.ValenceFormula.TrigLemmas +import LeanPool.LeanModularForms.ValenceFormula.WindingWeights.Common +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc /-! # Winding Number Weight at ρ+1 @@ -20,6 +28,8 @@ around the elliptic point ρ+1 = e^{πi/3}. * `gWN_fdBoundary_H_at_rho_plus_one` — gWN = -1/6 at ρ+1 -/ +@[expose] public section + open Complex MeasureTheory Set Filter Topology open scoped Real Interval diff --git a/LeanPool/LeanPolyABC.lean b/LeanPool/LeanPolyABC.lean index ac06957977..ea1c08d17e 100644 --- a/LeanPool/LeanPolyABC.lean +++ b/LeanPool/LeanPolyABC.lean @@ -3,8 +3,23 @@ Copyright (c) 2026 Seewoo Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Seewoo Lee -/ +module -import LeanPool.LeanPolyABC.All +public import LeanPool.LeanPolyABC.Corollaries.FltCatalan + +public import LeanPool.LeanPolyABC.MasonStothers + +public import LeanPool.LeanPolyABC.All +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Basic.NNReal.Defs +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Polynomial ABC (Mason–Stothers) and its corollaries @@ -17,6 +32,8 @@ Tags: number-theory, polynomials, algebra, mason-stothers MSC: 11C08, 12E05 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/LeanPolyABC/All.lean b/LeanPool/LeanPolyABC/All.lean index 6530885359..1639598181 100644 --- a/LeanPool/LeanPolyABC/All.lean +++ b/LeanPool/LeanPolyABC/All.lean @@ -3,18 +3,32 @@ Copyright (c) 2026 Seewoo Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Seewoo Lee -/ +module -import LeanPool.LeanPolyABC.MasonStothers -import LeanPool.LeanPolyABC.Lib.DivRadical -import LeanPool.LeanPolyABC.Lib.Max3 -import LeanPool.LeanPolyABC.Lib.Wronskian -import LeanPool.LeanPolyABC.Lib.Radical -import LeanPool.LeanPolyABC.Corollaries.FltCatalan -import LeanPool.LeanPolyABC.Corollaries.Davenport -import LeanPool.LeanPolyABC.Corollaries.NoParametrization +public import LeanPool.LeanPolyABC.MasonStothers +public import LeanPool.LeanPolyABC.Lib.DivRadical +public import LeanPool.LeanPolyABC.Lib.Max3 +public import LeanPool.LeanPolyABC.Lib.Wronskian +public import LeanPool.LeanPolyABC.Lib.Radical +public import LeanPool.LeanPolyABC.Corollaries.FltCatalan +public import LeanPool.LeanPolyABC.Corollaries.Davenport +public import LeanPool.LeanPolyABC.Corollaries.NoParametrization + +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Basic.NNReal.Defs +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.LeanPolyABC.All Imported Lean Pool material for `LeanPool.LeanPolyABC.All`. -/ + +@[expose] public section diff --git a/LeanPool/LeanPolyABC/Corollaries/Davenport.lean b/LeanPool/LeanPolyABC/Corollaries/Davenport.lean index c010143e09..682e825867 100644 --- a/LeanPool/LeanPolyABC/Corollaries/Davenport.lean +++ b/LeanPool/LeanPolyABC/Corollaries/Davenport.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 Seewoo Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Seewoo Lee -/ +module -import Mathlib.Algebra.CharP.Defs -import Mathlib.Algebra.EuclideanDomain.Defs +public import Mathlib.Algebra.Polynomial.Derivative +public import Mathlib.RingTheory.Coprime.Basic import LeanPool.LeanPolyABC.MasonStothers /-! # LeanPool.LeanPolyABC.Corollaries.Davenport -/ +@[expose] public section + noncomputable section open scoped Polynomial diff --git a/LeanPool/LeanPolyABC/Corollaries/FltCatalan.lean b/LeanPool/LeanPolyABC/Corollaries/FltCatalan.lean index 3d4ef55c2f..85e1bee505 100644 --- a/LeanPool/LeanPolyABC/Corollaries/FltCatalan.lean +++ b/LeanPool/LeanPolyABC/Corollaries/FltCatalan.lean @@ -3,20 +3,21 @@ Copyright (c) 2026 Seewoo Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Seewoo Lee -/ +module -import Mathlib.Algebra.CharP.Defs -import Mathlib.Algebra.EuclideanDomain.Defs -import Mathlib.RingTheory.MvPowerSeries.Basic -import Mathlib.Algebra.Polynomial.Expand -import Mathlib.Algebra.Polynomial.Coeff -import Mathlib.Basic.Logic.Lemmas +public import Mathlib.RingTheory.Coprime.Basic +public import LeanPool.LeanPolyABC.Lib.Max3 +public import Mathlib.Algebra.Polynomial.Derivative import LeanPool.LeanPolyABC.MasonStothers -import Mathlib.RingTheory.Coprime.Basic +import Mathlib.Algebra.Polynomial.Expand +import Mathlib.Data.Sym.Sym2.Init /-! # LeanPool.LeanPolyABC.Corollaries.FltCatalan -/ +@[expose] public section + noncomputable section open scoped Polynomial diff --git a/LeanPool/LeanPolyABC/Corollaries/NoParametrization.lean b/LeanPool/LeanPolyABC/Corollaries/NoParametrization.lean index 878b2df4d9..45d85b4b22 100644 --- a/LeanPool/LeanPolyABC/Corollaries/NoParametrization.lean +++ b/LeanPool/LeanPolyABC/Corollaries/NoParametrization.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Seewoo Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Seewoo Lee -/ +module -import Mathlib.FieldTheory.RatFunc.AsPolynomial +public import Mathlib.FieldTheory.RatFunc.AsPolynomial import LeanPool.LeanPolyABC.Corollaries.FltCatalan @@ -12,6 +13,8 @@ import LeanPool.LeanPolyABC.Corollaries.FltCatalan # LeanPool.LeanPolyABC.Corollaries.NoParametrization -/ +@[expose] public section + noncomputable section open scoped Polynomial diff --git a/LeanPool/LeanPolyABC/Lib/DivRadical.lean b/LeanPool/LeanPolyABC/Lib/DivRadical.lean index bab3e81481..0061c4cc6f 100644 --- a/LeanPool/LeanPolyABC/Lib/DivRadical.lean +++ b/LeanPool/LeanPolyABC/Lib/DivRadical.lean @@ -3,17 +3,18 @@ Copyright (c) 2026 Seewoo Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Seewoo Lee -/ +module -import Mathlib.Algebra.Polynomial.FieldDivision -import Mathlib.Algebra.Ring.Regular +public import LeanPool.LeanPolyABC.Lib.Radical +public import LeanPool.LeanPolyABC.Lib.Wronskian import Mathlib.RingTheory.UniqueFactorizationDomain.Multiplicative -import LeanPool.LeanPolyABC.Lib.Radical -import LeanPool.LeanPolyABC.Lib.Wronskian /-! # LeanPool.LeanPolyABC.Lib.DivRadical -/ +@[expose] public section + /- On `a.divRadical = a / radical a`. The purpose of this file is to prove our "main lemma" that `a.divRadical` divides `a'` for any nonzero polynomial `a`. diff --git a/LeanPool/LeanPolyABC/Lib/Max3.lean b/LeanPool/LeanPolyABC/Lib/Max3.lean index 3a685606e5..c5d4026a39 100644 --- a/LeanPool/LeanPolyABC/Lib/Max3.lean +++ b/LeanPool/LeanPolyABC/Lib/Max3.lean @@ -3,8 +3,8 @@ Copyright (c) 2026 Seewoo Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Seewoo Lee -/ +module -import Init.Data.Nat.Lemmas /-! # LeanPool.LeanPolyABC.Lib.Max3 @@ -12,6 +12,8 @@ import Init.Data.Nat.Lemmas Imported Lean Pool material for `LeanPool.LeanPolyABC.Lib.Max3`. -/ +@[expose] public section + namespace Nat /-- The maximum of three natural numbers, `max (max a b) c`. -/ diff --git a/LeanPool/LeanPolyABC/Lib/Radical.lean b/LeanPool/LeanPolyABC/Lib/Radical.lean index ec8297ddfa..8d79fa5024 100644 --- a/LeanPool/LeanPolyABC/Lib/Radical.lean +++ b/LeanPool/LeanPolyABC/Lib/Radical.lean @@ -3,17 +3,16 @@ Copyright (c) 2026 Seewoo Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Seewoo Lee -/ +module -import Mathlib.Algebra.Polynomial.FieldDivision -import Mathlib.Algebra.Ring.Regular -import Mathlib.RingTheory.Polynomial.Content -import Mathlib.RingTheory.UniqueFactorizationDomain.Basic -import Mathlib.RingTheory.UniqueFactorizationDomain.NormalizedFactors +public import Mathlib.Algebra.Polynomial.FieldDivision /-! # LeanPool.LeanPolyABC.Lib.Radical -/ +@[expose] public section + noncomputable section open Polynomial UniqueFactorizationMonoid diff --git a/LeanPool/LeanPolyABC/Lib/Wronskian.lean b/LeanPool/LeanPolyABC/Lib/Wronskian.lean index 0b6f629fed..0952d0bca5 100644 --- a/LeanPool/LeanPolyABC/Lib/Wronskian.lean +++ b/LeanPool/LeanPolyABC/Lib/Wronskian.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Seewoo Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Seewoo Lee -/ +module -import Mathlib.Algebra.Polynomial.Derivative +public import Mathlib.Algebra.Polynomial.Derivative /-! # LeanPool.LeanPolyABC.Lib.Wronskian -/ +@[expose] public section + noncomputable section open scoped Polynomial diff --git a/LeanPool/LeanPolyABC/MasonStothers.lean b/LeanPool/LeanPolyABC/MasonStothers.lean index 1d0ea053b4..abfb67612f 100644 --- a/LeanPool/LeanPolyABC/MasonStothers.lean +++ b/LeanPool/LeanPolyABC/MasonStothers.lean @@ -3,18 +3,18 @@ Copyright (c) 2026 Seewoo Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Seewoo Lee -/ +module -import Mathlib.Algebra.CharP.Defs -import Mathlib.Algebra.EuclideanDomain.Defs -import Mathlib.Algebra.Polynomial.FieldDivision -import LeanPool.LeanPolyABC.Lib.Wronskian -import LeanPool.LeanPolyABC.Lib.DivRadical -import LeanPool.LeanPolyABC.Lib.Max3 +public import LeanPool.LeanPolyABC.Lib.DivRadical +public import LeanPool.LeanPolyABC.Lib.Max3 +import Mathlib.RingTheory.Polynomial.Content /-! # LeanPool.LeanPolyABC.MasonStothers -/ +@[expose] public section + noncomputable section open scoped Polynomial diff --git a/LeanPool/LeanQuantumAlg.lean b/LeanPool/LeanQuantumAlg.lean index 621a1db4a4..04899e1f0c 100644 --- a/LeanPool/LeanQuantumAlg.lean +++ b/LeanPool/LeanQuantumAlg.lean @@ -12,6 +12,9 @@ public import LeanPool.LeanQuantumAlg.Core public import LeanPool.LeanQuantumAlg.Core.Components public import LeanPool.LeanQuantumAlg.Primitives public import LeanPool.LeanQuantumAlg.Algorithms +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Lean-QuantumAlg diff --git a/LeanPool/LeanQuantumAlg/Algorithms.lean b/LeanPool/LeanQuantumAlg/Algorithms.lean index dbba5b858c..c83a6f568a 100644 --- a/LeanPool/LeanQuantumAlg/Algorithms.lean +++ b/LeanPool/LeanQuantumAlg/Algorithms.lean @@ -7,6 +7,7 @@ Authors: QudeLeap Team module public import LeanPool.LeanQuantumAlg.Init + public import LeanPool.LeanQuantumAlg.Algorithms.QPE public import LeanPool.LeanQuantumAlg.Algorithms.GHZ public import LeanPool.LeanQuantumAlg.Algorithms.SuperdenseCoding diff --git a/LeanPool/LeanQuantumAlg/Algorithms/AmplitudeEstimation.lean b/LeanPool/LeanQuantumAlg/Algorithms/AmplitudeEstimation.lean index 4af9ec8f92..406901b2be 100644 --- a/LeanPool/LeanQuantumAlg/Algorithms/AmplitudeEstimation.lean +++ b/LeanPool/LeanQuantumAlg/Algorithms/AmplitudeEstimation.lean @@ -6,7 +6,6 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Algorithms.QPE public import LeanPool.LeanQuantumAlg.Primitives.AmplitudeAmplification diff --git a/LeanPool/LeanQuantumAlg/Algorithms/BernsteinVazirani.lean b/LeanPool/LeanQuantumAlg/Algorithms/BernsteinVazirani.lean index ec0f374dce..77bf4ddbe0 100644 --- a/LeanPool/LeanQuantumAlg/Algorithms/BernsteinVazirani.lean +++ b/LeanPool/LeanQuantumAlg/Algorithms/BernsteinVazirani.lean @@ -6,7 +6,6 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Primitives.WalshHadamard public import LeanPool.LeanQuantumAlg.Core.Cost diff --git a/LeanPool/LeanQuantumAlg/Algorithms/DeutschJozsa.lean b/LeanPool/LeanQuantumAlg/Algorithms/DeutschJozsa.lean index 2c8765a34d..24e20be5cc 100644 --- a/LeanPool/LeanQuantumAlg/Algorithms/DeutschJozsa.lean +++ b/LeanPool/LeanQuantumAlg/Algorithms/DeutschJozsa.lean @@ -6,10 +6,9 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Primitives.WalshHadamard -public import LeanPool.LeanQuantumAlg.Primitives.PhaseKickback public import LeanPool.LeanQuantumAlg.Core.Cost +import LeanPool.LeanQuantumAlg.Primitives.PhaseKickback /-! # Deutsch-Jozsa algorithm diff --git a/LeanPool/LeanQuantumAlg/Algorithms/GHZ.lean b/LeanPool/LeanQuantumAlg/Algorithms/GHZ.lean index 9a59b3e444..76da39887a 100644 --- a/LeanPool/LeanQuantumAlg/Algorithms/GHZ.lean +++ b/LeanPool/LeanQuantumAlg/Algorithms/GHZ.lean @@ -6,7 +6,6 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Components.Gates /-! diff --git a/LeanPool/LeanQuantumAlg/Algorithms/Grover.lean b/LeanPool/LeanQuantumAlg/Algorithms/Grover.lean index 291778b57b..a428a527d7 100644 --- a/LeanPool/LeanQuantumAlg/Algorithms/Grover.lean +++ b/LeanPool/LeanQuantumAlg/Algorithms/Grover.lean @@ -6,9 +6,7 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Primitives.AmplitudeAmplification -public import LeanPool.LeanQuantumAlg.Core.Cost /-! # Grover search in the good/bad-plane model diff --git a/LeanPool/LeanQuantumAlg/Algorithms/OrderFinding.lean b/LeanPool/LeanQuantumAlg/Algorithms/OrderFinding.lean index 03612a8367..3fe41e4c17 100644 --- a/LeanPool/LeanQuantumAlg/Algorithms/OrderFinding.lean +++ b/LeanPool/LeanQuantumAlg/Algorithms/OrderFinding.lean @@ -6,7 +6,6 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Algorithms.QPE /-! diff --git a/LeanPool/LeanQuantumAlg/Algorithms/QPE.lean b/LeanPool/LeanQuantumAlg/Algorithms/QPE.lean index 0d57e2e0b3..a4501e7e85 100644 --- a/LeanPool/LeanQuantumAlg/Algorithms/QPE.lean +++ b/LeanPool/LeanQuantumAlg/Algorithms/QPE.lean @@ -6,11 +6,9 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import LeanPool.LeanQuantumAlg.Core.Cost public import LeanPool.LeanQuantumAlg.Primitives.QFT -public import LeanPool.LeanQuantumAlg.Primitives.PhaseKickback -public import LeanPool.LeanQuantumAlg.Core.Components.Kets +public import LeanPool.LeanQuantumAlg.Core.Components.Control +import LeanPool.LeanQuantumAlg.Primitives.PhaseKickback /-! # Quantum phase estimation (exact, dyadic eigenphase) diff --git a/LeanPool/LeanQuantumAlg/Algorithms/Simon.lean b/LeanPool/LeanQuantumAlg/Algorithms/Simon.lean index e1f778aff6..2e077dc9db 100644 --- a/LeanPool/LeanQuantumAlg/Algorithms/Simon.lean +++ b/LeanPool/LeanQuantumAlg/Algorithms/Simon.lean @@ -6,10 +6,11 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import Mathlib.Data.ZMod.Basic -public import Mathlib.Algebra.BigOperators.Group.Finset.Basic public import LeanPool.LeanQuantumAlg.Core.Cost +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.ZMod.Defs +import Mathlib.Algebra.BigOperators.Group.Finset.Basic +import Mathlib.Tactic.Bound.Init /-! # Simon's problem diff --git a/LeanPool/LeanQuantumAlg/Algorithms/SuperdenseCoding.lean b/LeanPool/LeanQuantumAlg/Algorithms/SuperdenseCoding.lean index cce55e35b3..cedb125851 100644 --- a/LeanPool/LeanQuantumAlg/Algorithms/SuperdenseCoding.lean +++ b/LeanPool/LeanQuantumAlg/Algorithms/SuperdenseCoding.lean @@ -6,7 +6,6 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Cost public import LeanPool.LeanQuantumAlg.Primitives.BellPair diff --git a/LeanPool/LeanQuantumAlg/Algorithms/Teleportation.lean b/LeanPool/LeanQuantumAlg/Algorithms/Teleportation.lean index 98a673e358..d133eb8d25 100644 --- a/LeanPool/LeanQuantumAlg/Algorithms/Teleportation.lean +++ b/LeanPool/LeanQuantumAlg/Algorithms/Teleportation.lean @@ -6,7 +6,6 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Cost public import LeanPool.LeanQuantumAlg.Primitives.BellPair diff --git a/LeanPool/LeanQuantumAlg/Core.lean b/LeanPool/LeanQuantumAlg/Core.lean index 8fb565ea06..05703cd498 100644 --- a/LeanPool/LeanQuantumAlg/Core.lean +++ b/LeanPool/LeanQuantumAlg/Core.lean @@ -7,6 +7,7 @@ Authors: QudeLeap Team module public import LeanPool.LeanQuantumAlg.Init + public import LeanPool.LeanQuantumAlg.Core.State public import LeanPool.LeanQuantumAlg.Core.Gate public import LeanPool.LeanQuantumAlg.Core.Tensor diff --git a/LeanPool/LeanQuantumAlg/Core/Components.lean b/LeanPool/LeanQuantumAlg/Core/Components.lean index eb6d1dafea..c9af5b34cd 100644 --- a/LeanPool/LeanQuantumAlg/Core/Components.lean +++ b/LeanPool/LeanQuantumAlg/Core/Components.lean @@ -7,6 +7,7 @@ Authors: QudeLeap Team module public import LeanPool.LeanQuantumAlg.Init + public import LeanPool.LeanQuantumAlg.Core.Components.Kets public import LeanPool.LeanQuantumAlg.Core.Components.Gates public import LeanPool.LeanQuantumAlg.Core.Components.Oracle diff --git a/LeanPool/LeanQuantumAlg/Core/Components/Control.lean b/LeanPool/LeanQuantumAlg/Core/Components/Control.lean index 9b6a911d47..205dc75d19 100644 --- a/LeanPool/LeanQuantumAlg/Core/Components/Control.lean +++ b/LeanPool/LeanQuantumAlg/Core/Components/Control.lean @@ -6,7 +6,6 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Components.Gates /-! diff --git a/LeanPool/LeanQuantumAlg/Core/Components/Gates.lean b/LeanPool/LeanQuantumAlg/Core/Components/Gates.lean index 7df430b727..df505dd46d 100644 --- a/LeanPool/LeanQuantumAlg/Core/Components/Gates.lean +++ b/LeanPool/LeanQuantumAlg/Core/Components/Gates.lean @@ -6,10 +6,8 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import LeanPool.LeanQuantumAlg.Core.Tensor public import LeanPool.LeanQuantumAlg.Core.Components.Kets -public import LeanPool.LeanQuantumAlg.Util.Complex +import LeanPool.LeanQuantumAlg.Util.Complex /-! # Named gates diff --git a/LeanPool/LeanQuantumAlg/Core/Components/Kets.lean b/LeanPool/LeanQuantumAlg/Core/Components/Kets.lean index 14202c976d..ef108d0395 100644 --- a/LeanPool/LeanQuantumAlg/Core/Components/Kets.lean +++ b/LeanPool/LeanQuantumAlg/Core/Components/Kets.lean @@ -6,8 +6,8 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Measurement +public import LeanPool.LeanQuantumAlg.Core.Tensor /-! # Named one-qubit kets diff --git a/LeanPool/LeanQuantumAlg/Core/Components/Oracle.lean b/LeanPool/LeanQuantumAlg/Core/Components/Oracle.lean index 60c0b99215..b2f0bfee9c 100644 --- a/LeanPool/LeanQuantumAlg/Core/Components/Oracle.lean +++ b/LeanPool/LeanQuantumAlg/Core/Components/Oracle.lean @@ -6,8 +6,8 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import LeanPool.LeanQuantumAlg.Core.Tensor +public import LeanPool.LeanQuantumAlg.Core.Gate +public import LeanPool.LeanQuantumAlg.Util.FinPow /-! # Boolean (XOR) oracles diff --git a/LeanPool/LeanQuantumAlg/Core/Cost.lean b/LeanPool/LeanQuantumAlg/Core/Cost.lean index bcfe377b59..8786ef2495 100644 --- a/LeanPool/LeanQuantumAlg/Core/Cost.lean +++ b/LeanPool/LeanQuantumAlg/Core/Cost.lean @@ -6,7 +6,7 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init +public import Mathlib.Data.Nat.Notation /-! # Trusted cost annotations diff --git a/LeanPool/LeanQuantumAlg/Core/Gate.lean b/LeanPool/LeanQuantumAlg/Core/Gate.lean index 5357e55fce..767429aced 100644 --- a/LeanPool/LeanQuantumAlg/Core/Gate.lean +++ b/LeanPool/LeanQuantumAlg/Core/Gate.lean @@ -6,9 +6,7 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.State -public import Mathlib.LinearAlgebra.UnitaryGroup public import Mathlib.LinearAlgebra.Matrix.Permutation /-! diff --git a/LeanPool/LeanQuantumAlg/Core/Measurement.lean b/LeanPool/LeanQuantumAlg/Core/Measurement.lean index db5aae206c..a6d582927d 100644 --- a/LeanPool/LeanQuantumAlg/Core/Measurement.lean +++ b/LeanPool/LeanQuantumAlg/Core/Measurement.lean @@ -6,8 +6,8 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import LeanPool.LeanQuantumAlg.Core.Tensor +public import LeanPool.LeanQuantumAlg.Core.Gate +public import LeanPool.LeanQuantumAlg.Util.FinPow /-! # Computational-basis measurement diff --git a/LeanPool/LeanQuantumAlg/Core/State.lean b/LeanPool/LeanQuantumAlg/Core/State.lean index 32645517fa..e90bfe6ac9 100644 --- a/LeanPool/LeanQuantumAlg/Core/State.lean +++ b/LeanPool/LeanQuantumAlg/Core/State.lean @@ -6,7 +6,6 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import Mathlib.Analysis.InnerProductSpace.PiL2 /-! diff --git a/LeanPool/LeanQuantumAlg/Core/Tensor.lean b/LeanPool/LeanQuantumAlg/Core/Tensor.lean index 37b03d71f2..47a64d52c9 100644 --- a/LeanPool/LeanQuantumAlg/Core/Tensor.lean +++ b/LeanPool/LeanQuantumAlg/Core/Tensor.lean @@ -6,10 +6,8 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Gate public import LeanPool.LeanQuantumAlg.Util.FinPow -public import Mathlib.LinearAlgebra.Matrix.Kronecker /-! # Tensor products of vectors, states, operators, and gates diff --git a/LeanPool/LeanQuantumAlg/Init.lean b/LeanPool/LeanQuantumAlg/Init.lean index b96b9ad12c..01a89c5a86 100644 --- a/LeanPool/LeanQuantumAlg/Init.lean +++ b/LeanPool/LeanQuantumAlg/Init.lean @@ -8,6 +8,7 @@ module public import Mathlib.Data.Nat.Notation + /-! # QuantumAlg initialization diff --git a/LeanPool/LeanQuantumAlg/Primitives.lean b/LeanPool/LeanQuantumAlg/Primitives.lean index 5530e8d868..6f60ad9f1c 100644 --- a/LeanPool/LeanQuantumAlg/Primitives.lean +++ b/LeanPool/LeanQuantumAlg/Primitives.lean @@ -7,6 +7,7 @@ Authors: QudeLeap Team module public import LeanPool.LeanQuantumAlg.Init + public import LeanPool.LeanQuantumAlg.Primitives.BellPair public import LeanPool.LeanQuantumAlg.Primitives.WalshHadamard public import LeanPool.LeanQuantumAlg.Primitives.PhaseKickback @@ -20,6 +21,9 @@ public import LeanPool.LeanQuantumAlg.Primitives.AmplitudeAmplification public import LeanPool.LeanQuantumAlg.Primitives.ParameterShift public import LeanPool.LeanQuantumAlg.Primitives.QKernel public import LeanPool.LeanQuantumAlg.Primitives.QNN +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # QuantumAlg primitives diff --git a/LeanPool/LeanQuantumAlg/Primitives/AmplitudeAmplification.lean b/LeanPool/LeanQuantumAlg/Primitives/AmplitudeAmplification.lean index 082601bc6d..58f695c5bb 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/AmplitudeAmplification.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/AmplitudeAmplification.lean @@ -6,9 +6,7 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Components.Gates -public import LeanPool.LeanQuantumAlg.Core.Measurement public import LeanPool.LeanQuantumAlg.Core.Cost /-! diff --git a/LeanPool/LeanQuantumAlg/Primitives/BellPair.lean b/LeanPool/LeanQuantumAlg/Primitives/BellPair.lean index 408131d656..a418c4ffd0 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/BellPair.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/BellPair.lean @@ -6,7 +6,6 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Components.Gates /-! diff --git a/LeanPool/LeanQuantumAlg/Primitives/ControlledTransform.lean b/LeanPool/LeanQuantumAlg/Primitives/ControlledTransform.lean index 9690470481..ebd0cff2f4 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/ControlledTransform.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/ControlledTransform.lean @@ -6,10 +6,11 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Cost -public import LeanPool.LeanQuantumAlg.Primitives.PhaseKickback -public import LeanPool.LeanQuantumAlg.Primitives.QSP +public import LeanPool.LeanQuantumAlg.Core.Components.Control +public import LeanPool.LeanQuantumAlg.Primitives.QSP.Fourier +import LeanPool.LeanQuantumAlg.Primitives.PhaseKickback +import LeanPool.LeanQuantumAlg.Util.Complex /-! # Controlled-unitary transformation (quantum phase processing / QET) diff --git a/LeanPool/LeanQuantumAlg/Primitives/HadamardTest.lean b/LeanPool/LeanQuantumAlg/Primitives/HadamardTest.lean index 16895daa66..cd9acb5dff 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/HadamardTest.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/HadamardTest.lean @@ -6,9 +6,7 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Components.Control -public import LeanPool.LeanQuantumAlg.Core.Components.Kets /-! # The Hadamard test diff --git a/LeanPool/LeanQuantumAlg/Primitives/LCU.lean b/LeanPool/LeanQuantumAlg/Primitives/LCU.lean index 8707bef9dc..8eecc9822e 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/LCU.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/LCU.lean @@ -6,9 +6,7 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Tensor -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic /-! # Linear combination of unitaries (LCU) diff --git a/LeanPool/LeanQuantumAlg/Primitives/ParameterShift.lean b/LeanPool/LeanQuantumAlg/Primitives/ParameterShift.lean index 41708a86fc..2b05a6259b 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/ParameterShift.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/ParameterShift.lean @@ -6,10 +6,10 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Components.Gates -public import LeanPool.LeanQuantumAlg.Core.Measurement -public import LeanPool.LeanQuantumAlg.Util.TrigPolynomial +public import Mathlib.Analysis.Calculus.Deriv.Basic +import LeanPool.LeanQuantumAlg.Util.TrigPolynomial +import Mathlib.Tactic.Positivity.Finset /-! # Parameter-shift rule diff --git a/LeanPool/LeanQuantumAlg/Primitives/PhaseKickback.lean b/LeanPool/LeanQuantumAlg/Primitives/PhaseKickback.lean index f41b0b50ab..70807ea143 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/PhaseKickback.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/PhaseKickback.lean @@ -6,7 +6,6 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Components.Control public import LeanPool.LeanQuantumAlg.Core.Components.Oracle diff --git a/LeanPool/LeanQuantumAlg/Primitives/QFT.lean b/LeanPool/LeanQuantumAlg/Primitives/QFT.lean index c2f1a03527..af9db41705 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QFT.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QFT.lean @@ -6,11 +6,10 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Cost public import LeanPool.LeanQuantumAlg.Core.Gate -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic -public import Mathlib.RingTheory.RootsOfUnity.Complex +public import Mathlib.RingTheory.RootsOfUnity.PrimitiveRoots +import Mathlib.RingTheory.RootsOfUnity.Complex /-! # Quantum Fourier Transform diff --git a/LeanPool/LeanQuantumAlg/Primitives/QKernel.lean b/LeanPool/LeanQuantumAlg/Primitives/QKernel.lean index 6de58266ea..b2ece07867 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QKernel.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QKernel.lean @@ -7,12 +7,16 @@ Authors: QudeLeap Team module public import LeanPool.LeanQuantumAlg.Init + public import LeanPool.LeanQuantumAlg.Primitives.QKernel.Fidelity public import LeanPool.LeanQuantumAlg.Primitives.QKernel.Fourier public import LeanPool.LeanQuantumAlg.Primitives.QKernel.Concentration public import LeanPool.LeanQuantumAlg.Primitives.QKernel.DiscreteLogConcept public import LeanPool.LeanQuantumAlg.Primitives.QKernel.Advantage public import LeanPool.LeanQuantumAlg.Primitives.QKernel.Expressivity +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Quantum kernels diff --git a/LeanPool/LeanQuantumAlg/Primitives/QKernel/Advantage.lean b/LeanPool/LeanQuantumAlg/Primitives/QKernel/Advantage.lean index 65d58bf343..2bd5d3c2b8 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QKernel/Advantage.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QKernel/Advantage.lean @@ -6,10 +6,7 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Primitives.QKernel.DiscreteLogConcept -public import Mathlib.Basic.Real.Basic -public import Mathlib.Tactic.Common /-! # Quantum-kernel learning advantage (Liu, Arunachalam, Temme 2021) diff --git a/LeanPool/LeanQuantumAlg/Primitives/QKernel/Concentration.lean b/LeanPool/LeanQuantumAlg/Primitives/QKernel/Concentration.lean index b6c25a1d4f..ae446a24b9 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QKernel/Concentration.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QKernel/Concentration.lean @@ -6,12 +6,10 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Util.Concentration -public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic -public import Mathlib.MeasureTheory.Integral.Pi -public import Mathlib.MeasureTheory.Constructions.Pi -public import Mathlib.Tactic.Common +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +import Mathlib.MeasureTheory.Integral.Pi /-! # Exponential concentration of the tensor-product RY quantum kernel diff --git a/LeanPool/LeanQuantumAlg/Primitives/QKernel/DiscreteLogConcept.lean b/LeanPool/LeanQuantumAlg/Primitives/QKernel/DiscreteLogConcept.lean index 317a8bb1d3..0390b41911 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QKernel/DiscreteLogConcept.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QKernel/DiscreteLogConcept.lean @@ -6,11 +6,8 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import Mathlib.GroupTheory.SpecificGroups.Cyclic -public import Mathlib.Data.ZMod.Basic public import Mathlib.Basic.Real.Basic -public import Mathlib.Tactic.Common /-! # The discrete-logarithm concept class and its secret-homogeneity diff --git a/LeanPool/LeanQuantumAlg/Primitives/QKernel/Expressivity.lean b/LeanPool/LeanQuantumAlg/Primitives/QKernel/Expressivity.lean index 95f8d4cfc8..a2659fadee 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QKernel/Expressivity.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QKernel/Expressivity.lean @@ -6,11 +6,9 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import Mathlib.LinearAlgebra.Matrix.PosDef -public import Mathlib.Analysis.InnerProductSpace.Basic -public import Mathlib.Analysis.RCLike.Basic -public import Mathlib.Tactic.Common +public import Mathlib.Analysis.Complex.Basic +import Mathlib.Analysis.InnerProductSpace.Basic /-! # Embedding quantum kernels: density-matrix realization (expressivity) diff --git a/LeanPool/LeanQuantumAlg/Primitives/QKernel/Fidelity.lean b/LeanPool/LeanQuantumAlg/Primitives/QKernel/Fidelity.lean index 164383f182..bfac7d1ecd 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QKernel/Fidelity.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QKernel/Fidelity.lean @@ -6,8 +6,6 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import LeanPool.LeanQuantumAlg.Core.State public import LeanPool.LeanQuantumAlg.Core.Tensor public import Mathlib.LinearAlgebra.Matrix.PosDef diff --git a/LeanPool/LeanQuantumAlg/Primitives/QKernel/Fourier.lean b/LeanPool/LeanQuantumAlg/Primitives/QKernel/Fourier.lean index 5c1c92efcc..3614387ab6 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QKernel/Fourier.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QKernel/Fourier.lean @@ -6,10 +6,10 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Util.TrigPolynomial -public import Mathlib.Data.Matrix.Mul -public import Mathlib.Tactic.Common +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Tactic.Positivity.Finset /-! # Fourier representation of the quantum kernel diff --git a/LeanPool/LeanQuantumAlg/Primitives/QNN.lean b/LeanPool/LeanQuantumAlg/Primitives/QNN.lean index ede53d6e0c..f4f30c22a1 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QNN.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QNN.lean @@ -7,6 +7,7 @@ Authors: QudeLeap Team module public import LeanPool.LeanQuantumAlg.Init + public import LeanPool.LeanQuantumAlg.Primitives.QNN.DynamicalLieAlgebra public import LeanPool.LeanQuantumAlg.Primitives.QNN.Overparametrization public import LeanPool.LeanQuantumAlg.Primitives.QNN.Trainability @@ -14,6 +15,9 @@ public import LeanPool.LeanQuantumAlg.Primitives.QNN.LieAlgebraicBP public import LeanPool.LeanQuantumAlg.Primitives.QNN.VarianceFormula public import LeanPool.LeanQuantumAlg.Primitives.QNN.FullDLABasis public import LeanPool.LeanQuantumAlg.Primitives.QNN.PauliPropagation +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # Quantum neural networks: dynamical Lie algebras and trainability diff --git a/LeanPool/LeanQuantumAlg/Primitives/QNN/DynamicalLieAlgebra.lean b/LeanPool/LeanQuantumAlg/Primitives/QNN/DynamicalLieAlgebra.lean index 597f1068d6..e928d25e03 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QNN/DynamicalLieAlgebra.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QNN/DynamicalLieAlgebra.lean @@ -6,11 +6,12 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import LeanPool.LeanQuantumAlg.Core.Gate -public import Mathlib.Algebra.Lie.Matrix public import Mathlib.Algebra.Lie.OfAssociative -public import Mathlib.Algebra.Lie.Subalgebra +public import Mathlib.Basic.Complex.Basic +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # The dynamical Lie algebra diff --git a/LeanPool/LeanQuantumAlg/Primitives/QNN/FullDLABasis.lean b/LeanPool/LeanQuantumAlg/Primitives/QNN/FullDLABasis.lean index e4e7f99926..2d564b903b 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QNN/FullDLABasis.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QNN/FullDLABasis.lean @@ -6,10 +6,13 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Primitives.QNN.VarianceFormula -public import Mathlib.Algebra.Lie.Matrix -public import Mathlib.Analysis.SpecialFunctions.Sqrt +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.CStarAlgebra.Classes +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas +import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition +import Mathlib.Tactic.Positivity.Finset /-! # The full algebra `gl(2ⁿ)` as a dynamical Lie algebra: an exponential barren plateau diff --git a/LeanPool/LeanQuantumAlg/Primitives/QNN/LieAlgebraicBP.lean b/LeanPool/LeanQuantumAlg/Primitives/QNN/LieAlgebraicBP.lean index 37bc143e42..2eb36daee4 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QNN/LieAlgebraicBP.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QNN/LieAlgebraicBP.lean @@ -6,14 +6,15 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import LeanPool.LeanQuantumAlg.Core.Gate public import LeanPool.LeanQuantumAlg.Primitives.QNN.DynamicalLieAlgebra public import LeanPool.LeanQuantumAlg.Primitives.QNN.Trainability -public import Mathlib.Algebra.Lie.Matrix -public import Mathlib.LinearAlgebra.Dimension.Constructions -public import Mathlib.LinearAlgebra.FiniteDimensional.Basic -public import Mathlib.Algebra.DirectSum.Module +public import Mathlib.LinearAlgebra.Dimension.Finrank +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.LinearAlgebra.FiniteDimensional.Basic +import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition +import Mathlib.Tactic.NormNum.GCD /-! # Lie-algebraic barren plateaus from the *real* dynamical Lie algebra diff --git a/LeanPool/LeanQuantumAlg/Primitives/QNN/Overparametrization.lean b/LeanPool/LeanQuantumAlg/Primitives/QNN/Overparametrization.lean index d9e30a984f..cef3799991 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QNN/Overparametrization.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QNN/Overparametrization.lean @@ -6,8 +6,8 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import Mathlib.Order.Monotone.Basic +public import Mathlib.Data.Nat.Basic +public import Mathlib.Order.Monotone.Defs /-! # Overparametrization of quantum neural networks diff --git a/LeanPool/LeanQuantumAlg/Primitives/QNN/PauliPropagation.lean b/LeanPool/LeanQuantumAlg/Primitives/QNN/PauliPropagation.lean index d786ad8f4c..8c9fc730fe 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QNN/PauliPropagation.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QNN/PauliPropagation.lean @@ -6,9 +6,9 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import Mathlib.Basic.Real.Basic -public import Mathlib.Algebra.Order.BigOperators.Group.Finset +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +import Mathlib.Algebra.Order.BigOperators.Group.Finset /-! # Pauli propagation: truncation error diff --git a/LeanPool/LeanQuantumAlg/Primitives/QNN/Trainability.lean b/LeanPool/LeanQuantumAlg/Primitives/QNN/Trainability.lean index 8a0210ae85..3b5ff0eb73 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QNN/Trainability.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QNN/Trainability.lean @@ -6,9 +6,9 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import Mathlib.Analysis.SpecificLimits.Basic -public import Mathlib.Analysis.Normed.Group.Basic +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Analysis.SpecificLimits.Basic /-! # Trainability: exponential concentration and barren plateaus diff --git a/LeanPool/LeanQuantumAlg/Primitives/QNN/VarianceFormula.lean b/LeanPool/LeanQuantumAlg/Primitives/QNN/VarianceFormula.lean index d2a30091b6..32d278e326 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QNN/VarianceFormula.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QNN/VarianceFormula.lean @@ -6,12 +6,14 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import LeanPool.LeanQuantumAlg.Core.Gate -public import LeanPool.LeanQuantumAlg.Primitives.QNN.DynamicalLieAlgebra public import LeanPool.LeanQuantumAlg.Primitives.QNN.LieAlgebraicBP public import LeanPool.LeanQuantumAlg.Util.HilbertSchmidt -public import Mathlib.Algebra.Lie.Matrix +public import Mathlib.Analysis.Complex.Norm +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.CStarAlgebra.Classes +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.LinearAlgebra.Dimension.Constructions +import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition /-! # The Lie-algebraic loss-variance formula (Ragone et al. 2023): foundations diff --git a/LeanPool/LeanQuantumAlg/Primitives/QSP.lean b/LeanPool/LeanQuantumAlg/Primitives/QSP.lean index 1fb7dc0d6c..0f1a5dc8dc 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QSP.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QSP.lean @@ -7,6 +7,7 @@ Authors: QudeLeap Team module public import LeanPool.LeanQuantumAlg.Init + public import LeanPool.LeanQuantumAlg.Primitives.QSP.Chebyshev public import LeanPool.LeanQuantumAlg.Primitives.QSP.Fourier diff --git a/LeanPool/LeanQuantumAlg/Primitives/QSP/Chebyshev.lean b/LeanPool/LeanQuantumAlg/Primitives/QSP/Chebyshev.lean index 99e8acbed2..d9859ee86c 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QSP/Chebyshev.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QSP/Chebyshev.lean @@ -6,10 +6,9 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Components.Gates -public import LeanPool.LeanQuantumAlg.Util.Complex public import LeanPool.LeanQuantumAlg.Util.Polynomial +import LeanPool.LeanQuantumAlg.Util.Complex /-! # Quantum signal processing (single qubit) — Chebyshev basis diff --git a/LeanPool/LeanQuantumAlg/Primitives/QSP/Fourier.lean b/LeanPool/LeanQuantumAlg/Primitives/QSP/Fourier.lean index 7048cf548e..fdd0c744f6 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/QSP/Fourier.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/QSP/Fourier.lean @@ -6,10 +6,9 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Components.Gates -public import LeanPool.LeanQuantumAlg.Util.Complex public import LeanPool.LeanQuantumAlg.Util.Polynomial +import LeanPool.LeanQuantumAlg.Util.Complex /-! # Quantum signal processing (single qubit) — Fourier basis (trigonometric) diff --git a/LeanPool/LeanQuantumAlg/Primitives/SwapTest.lean b/LeanPool/LeanQuantumAlg/Primitives/SwapTest.lean index e4d15a1840..8d1176336b 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/SwapTest.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/SwapTest.lean @@ -6,7 +6,6 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Primitives.HadamardTest /-! diff --git a/LeanPool/LeanQuantumAlg/Primitives/WalshHadamard.lean b/LeanPool/LeanQuantumAlg/Primitives/WalshHadamard.lean index 97903bd291..291be969e1 100644 --- a/LeanPool/LeanQuantumAlg/Primitives/WalshHadamard.lean +++ b/LeanPool/LeanQuantumAlg/Primitives/WalshHadamard.lean @@ -6,7 +6,6 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import LeanPool.LeanQuantumAlg.Core.Components.Oracle public import LeanPool.LeanQuantumAlg.Core.Components.Kets diff --git a/LeanPool/LeanQuantumAlg/Util.lean b/LeanPool/LeanQuantumAlg/Util.lean index d9da908fde..9d09f9d2c3 100644 --- a/LeanPool/LeanQuantumAlg/Util.lean +++ b/LeanPool/LeanQuantumAlg/Util.lean @@ -7,12 +7,14 @@ Authors: QudeLeap Team module public import LeanPool.LeanQuantumAlg.Init + public import LeanPool.LeanQuantumAlg.Util.Complex public import LeanPool.LeanQuantumAlg.Util.Polynomial public import LeanPool.LeanQuantumAlg.Util.FinPow public import LeanPool.LeanQuantumAlg.Util.HilbertSchmidt public import LeanPool.LeanQuantumAlg.Util.TrigPolynomial public import LeanPool.LeanQuantumAlg.Util.Concentration +import Mathlib.Tactic.Positivity.Finset /-! # QuantumAlg utility layer diff --git a/LeanPool/LeanQuantumAlg/Util/Complex.lean b/LeanPool/LeanQuantumAlg/Util/Complex.lean index a4df9e6409..e403dd3ade 100644 --- a/LeanPool/LeanQuantumAlg/Util/Complex.lean +++ b/LeanPool/LeanQuantumAlg/Util/Complex.lean @@ -6,8 +6,8 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import Mathlib.Analysis.SpecialFunctions.Complex.Log +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import Mathlib.Analysis.SpecialFunctions.Complex.Log /-! # Complex exponential and unit-circle helper lemmas (quantum-free) diff --git a/LeanPool/LeanQuantumAlg/Util/Concentration.lean b/LeanPool/LeanQuantumAlg/Util/Concentration.lean index 06e87caf3b..ef883a4767 100644 --- a/LeanPool/LeanQuantumAlg/Util/Concentration.lean +++ b/LeanPool/LeanQuantumAlg/Util/Concentration.lean @@ -6,10 +6,7 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import Mathlib.Probability.Moments.Variance -public import Mathlib.MeasureTheory.Integral.Bochner.Basic -public import Mathlib.Tactic.Common /-! # Probabilistic exponential concentration diff --git a/LeanPool/LeanQuantumAlg/Util/FinPow.lean b/LeanPool/LeanQuantumAlg/Util/FinPow.lean index 279ede6bd6..6e8d30ca08 100644 --- a/LeanPool/LeanQuantumAlg/Util/FinPow.lean +++ b/LeanPool/LeanQuantumAlg/Util/FinPow.lean @@ -6,9 +6,7 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import Mathlib.Logic.Equiv.Fin.Basic -public import Mathlib.Data.Fin.SuccPred public import Mathlib.Algebra.Group.Nat.Defs /-! diff --git a/LeanPool/LeanQuantumAlg/Util/HilbertSchmidt.lean b/LeanPool/LeanQuantumAlg/Util/HilbertSchmidt.lean index 97bd84fb59..b481b9602e 100644 --- a/LeanPool/LeanQuantumAlg/Util/HilbertSchmidt.lean +++ b/LeanPool/LeanQuantumAlg/Util/HilbertSchmidt.lean @@ -6,11 +6,7 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init public import Mathlib.LinearAlgebra.Matrix.Kronecker -public import Mathlib.LinearAlgebra.Matrix.Trace -public import Mathlib.LinearAlgebra.Matrix.ConjTranspose -public import Mathlib.Data.Matrix.Basis public import Mathlib.Basic.Complex.Basic /-! diff --git a/LeanPool/LeanQuantumAlg/Util/Polynomial.lean b/LeanPool/LeanQuantumAlg/Util/Polynomial.lean index b08a64f695..11be5873de 100644 --- a/LeanPool/LeanQuantumAlg/Util/Polynomial.lean +++ b/LeanPool/LeanQuantumAlg/Util/Polynomial.lean @@ -6,11 +6,12 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import Mathlib.Algebra.Polynomial.Degree.Lemmas -public import Mathlib.Algebra.Polynomial.Roots -public import Mathlib.Order.Interval.Set.Infinite -public import LeanPool.LeanQuantumAlg.Util.Complex +public import Mathlib.Algebra.Polynomial.Reverse +public import Mathlib.Analysis.Complex.Exponential +import LeanPool.LeanQuantumAlg.Util.Complex +import Mathlib.Algebra.Polynomial.Roots +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Data.Nat.Totient /-! # Polynomial helper lemmas (quantum-free) diff --git a/LeanPool/LeanQuantumAlg/Util/TrigPolynomial.lean b/LeanPool/LeanQuantumAlg/Util/TrigPolynomial.lean index a47394516f..22e530edbb 100644 --- a/LeanPool/LeanQuantumAlg/Util/TrigPolynomial.lean +++ b/LeanPool/LeanQuantumAlg/Util/TrigPolynomial.lean @@ -6,13 +6,11 @@ Authors: QudeLeap Team module -public import LeanPool.LeanQuantumAlg.Init -public import Mathlib.Analysis.SpecialFunctions.Complex.Circle public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv -public import Mathlib.Algebra.BigOperators.Ring.Finset -public import Mathlib.LinearAlgebra.LinearIndependent.Basic -public import Mathlib.Tactic.Common +public import Mathlib.Analysis.Calculus.Deriv.Basic +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv +import Mathlib.Data.Nat.Totient /-! # Trigonometric polynomials diff --git a/LeanPool/LeanStationaryHarmonicMaps.lean b/LeanPool/LeanStationaryHarmonicMaps.lean index 4457d7dba7..9da9b3cc72 100644 --- a/LeanPool/LeanStationaryHarmonicMaps.lean +++ b/LeanPool/LeanStationaryHarmonicMaps.lean @@ -3,42 +3,44 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module -import LeanPool.LeanStationaryHarmonicMaps.Examples.StationaryMonotonicity -import LeanPool.LeanStationaryHarmonicMaps.Examples.UseMainTheorem -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.API -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BallIntegralAC -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Basic -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BoundaryBasics -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BoundaryFromRadial -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.CenterTranslation -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.EnergyQuantities -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Euclidean -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.FirstVariationBridge -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.L2LocBridge -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MainTheorem -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Monotonicity -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MonotonicityEuclidean -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MonotonicityFinal -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MonotonicityRoutes -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.PrimitiveCutoffs -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialCutoffs -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialGeometry -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialIdentity -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialIntegrability -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialMeasure -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusAnalysis -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusFormulas -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusPrimitive -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusWeightedDerivative -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusWeightedRepresentation -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusWeights -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.SobolevBridge -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.SobolevWitness -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.StationarityBridge -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.StationaryMap -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakGradientBridge -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakStationarity +public import LeanPool.LeanStationaryHarmonicMaps.Examples.StationaryMonotonicity +public import LeanPool.LeanStationaryHarmonicMaps.Examples.UseMainTheorem +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.API +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BallIntegralAC +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Basic +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BoundaryBasics +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BoundaryFromRadial +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.CenterTranslation +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.EnergyQuantities +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Euclidean +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.FirstVariationBridge +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.L2LocBridge +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MainTheorem +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Monotonicity +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MonotonicityEuclidean +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MonotonicityFinal +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MonotonicityRoutes +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.PrimitiveCutoffs +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialCutoffs +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialGeometry +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialIdentity +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialIntegrability +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialMeasure +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusAnalysis +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusFormulas +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusPrimitive +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusWeightedDerivative +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusWeightedRepresentation +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusWeights +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.SobolevBridge +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.SobolevWitness +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.StationarityBridge +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.StationaryMap +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakGradientBridge +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakStationarity +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Monotonicity Formula for Stationary Harmonic Maps @@ -50,3 +52,5 @@ Main declarations: `LeanStationaryHarmonicMaps.StationaryHarmonicMap.StationaryW Tags: analysis, pde, harmonic-maps, monotonicity-formula, sobolev MSC: 58E20, 35J50 -/ + +@[expose] public section diff --git a/LeanPool/LeanStationaryHarmonicMaps/Examples/StationaryMonotonicity.lean b/LeanPool/LeanStationaryHarmonicMaps/Examples/StationaryMonotonicity.lean index 2ef3e26cbe..608d9884a7 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/Examples/StationaryMonotonicity.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/Examples/StationaryMonotonicity.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.API +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.API + +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Minimal use of the public monotonicity API @@ -13,6 +18,8 @@ the public API and apply both the witness-style stationary Sobolev monotonicity formula/theorem and the older componentwise convenience wrappers. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/Examples/UseMainTheorem.lean b/LeanPool/LeanStationaryHarmonicMaps/Examples/UseMainTheorem.lean index 5d8bd3ff09..3abf92637c 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/Examples/UseMainTheorem.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/Examples/UseMainTheorem.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MainTheorem +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MainTheorem + +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Using the main theorem directly @@ -14,6 +19,8 @@ formula and the monotonicity inequality for the weak energy density associated with the package's displayed weak gradient. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/API.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/API.lean index d39c744f32..716e2c1a0f 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/API.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/API.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Euclidean -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MainTheorem +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.EnergyQuantities +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.FirstVariationBridge +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.L2LocBridge +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MainTheorem +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Public API for stationary Sobolev map monotonicity @@ -32,6 +37,8 @@ Implementation-route theorems in the radial/coarea files should normally be treated as internal scaffolding. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/BallIntegralAC.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/BallIntegralAC.lean index 49ef7cd10f..c7e137b3aa 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/BallIntegralAC.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/BallIntegralAC.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusWeightedDerivative +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusAnalysis +import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusPrimitive +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Ball integral absolute continuity @@ -12,6 +16,8 @@ This module contains thin-shell estimates and the resulting absolute continuity of scalar ball-integral radius functions. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/Basic.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/Basic.lean index 4d5ad77e1a..782f98e324 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/Basic.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/Basic.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace -import Mathlib.MeasureTheory.VectorMeasure.WithDensity +module + +public import Mathlib.MeasureTheory.VectorMeasure.WithDensity +public import Mathlib.Analysis.Normed.Lp.MeasurableSpace +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis /-! # Basic definitions for stationary harmonic maps @@ -16,6 +18,8 @@ computation behind the coarea/radial representation, together with the ambient Sobolev setup on which the later files build. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/BoundaryBasics.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/BoundaryBasics.lean index b884521062..6e364ce960 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/BoundaryBasics.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/BoundaryBasics.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusWeights +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialIdentity import Mathlib.Analysis.Distribution.AEEqOfIntegralContDiff -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusWeights -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialIdentity +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Boundary and radius interfaces @@ -18,6 +21,8 @@ boundary and radius statements so the proof can be checked modularly, but they are not intended as the public API of the project. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/BoundaryFromRadial.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/BoundaryFromRadial.lean index 2377f37e2d..45cd873451 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/BoundaryFromRadial.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/BoundaryFromRadial.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusAnalysis import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusFormulas +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Boundary identity from radial stationarity @@ -16,6 +20,8 @@ stationarity to the boundary identity. The recommended public entry point is the final theorem in `MainTheorem.lean`. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/CenterTranslation.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/CenterTranslation.lean index 5edba438d8..e7196db34e 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/CenterTranslation.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/CenterTranslation.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.EnergyQuantities +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakStationarity import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MonotonicityEuclidean +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Center translations @@ -12,6 +17,8 @@ This module starts the passage from the origin-centered theorem to arbitrary centers by isolating the translation identities needed for `weakTheta`. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/EnergyQuantities.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/EnergyQuantities.lean index 79a84a9bcd..6e45022f5a 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/EnergyQuantities.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/EnergyQuantities.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import Mathlib.MeasureTheory.Function.AbsolutelyContinuous -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakStationarity +module + +public import Mathlib.MeasureTheory.Function.AbsolutelyContinuous +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialGeometry +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Energy Quantities -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/Euclidean.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/Euclidean.lean index d3a1fec2ca..fc30b298d0 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/Euclidean.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/Euclidean.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Basic +public import Mathlib.Analysis.SpecialFunctions.Gamma.Basic import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Basic /-! # Euclidean coordinate interface @@ -15,6 +18,8 @@ This file is the local boundary between the project and mathlib's concrete calls to `EuclideanSpace.*`. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/FirstVariationBridge.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/FirstVariationBridge.lean index 598222a29a..1acf75c99f 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/FirstVariationBridge.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/FirstVariationBridge.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakGradientBridge +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakGradientBridge +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # First-variation bridge @@ -16,6 +19,8 @@ stationary Sobolev map hypothesis, even though the formula only depends on test-function interface as the distributional weak-gradient bridge. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/L2LocBridge.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/L2LocBridge.lean index 8af0df122a..b4a0b31aca 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/L2LocBridge.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/L2LocBridge.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakStationarity +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakStationarity +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Local `L²` bridge @@ -16,6 +19,8 @@ energy integrability part, while global a.e. measurability on an arbitrary domain is a separate measurable-cover problem. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MainTheorem.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MainTheorem.lean index 985ecf116a..cca230ea53 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MainTheorem.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MainTheorem.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.StationaryMap +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.StationaryMap +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Main monotonicity theorem @@ -13,6 +16,8 @@ cutoff, and boundary routes are internal scaffolding hidden behind the stationary Sobolev map package. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/Monotonicity.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/Monotonicity.lean index 38c076c363..fc005ae33e 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/Monotonicity.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/Monotonicity.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.CenterTranslation +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.CenterTranslation +import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MonotonicityEuclidean +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Stationary Sobolev map monotonicity @@ -18,6 +22,8 @@ modules should discharge its `WeakStationaryMapIn` hypothesis and then call this theorem, rather than reopening the radial monotonicity proof chain. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MonotonicityEuclidean.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MonotonicityEuclidean.lean index cb1cb088e5..44917aa075 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MonotonicityEuclidean.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MonotonicityEuclidean.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusAnalysis +import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BallIntegralAC +import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BoundaryFromRadial +import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MonotonicityFinal import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MonotonicityRoutes +import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusFormulas +import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusWeightedDerivative import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusWeightedRepresentation +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Euclidean weak monotonicity interfaces @@ -17,6 +26,8 @@ coarea and thin-shell ingredients before `MainTheorem.lean` packages the final user-facing statement. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MonotonicityFinal.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MonotonicityFinal.lean index 2f3793406e..d2bf1b50f0 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MonotonicityFinal.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MonotonicityFinal.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BoundaryFromRadial +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusAnalysis +import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusPrimitive +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.MeasureTheory.Integral.IntervalIntegral.AbsolutelyContinuousFun /-! # Final monotonicity increment @@ -12,6 +17,8 @@ This module contains the final radius integration step and converts the boundary identity into monotonicity of the weak theta quantity. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MonotonicityRoutes.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MonotonicityRoutes.lean index cefa0722d3..a1e57746a1 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MonotonicityRoutes.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/MonotonicityRoutes.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusPrimitive +import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BallIntegralAC +import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BoundaryFromRadial import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.MonotonicityFinal +import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusFormulas +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Packaged monotonicity routes @@ -16,6 +23,8 @@ code should normally import `MainTheorem.lean` or `API.lean` instead of relying on a particular route theorem in this file. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/PrimitiveCutoffs.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/PrimitiveCutoffs.lean index adfdda7ce5..a5d008c313 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/PrimitiveCutoffs.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/PrimitiveCutoffs.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BoundaryBasics +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BoundaryBasics +import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Primitive cutoff realization @@ -12,6 +16,8 @@ This module contains the primitive cutoff realization and the abstract one-dimensional sharp-cutoff inputs. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialCutoffs.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialCutoffs.lean index b215e0fc42..31d002727f 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialCutoffs.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialCutoffs.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialGeometry +module + +public import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialGeometry +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Radial cutoff packages @@ -13,6 +16,8 @@ This module packages the scalar radial cutoffs used to test weak stationarity. It is deliberately independent of the later radial integral identities. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialGeometry.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialGeometry.lean index 77150717fa..b089dff688 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialGeometry.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialGeometry.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Euclidean import Mathlib.Analysis.InnerProductSpace.Calculus -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Euclidean +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Radial Geometry -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialIdentity.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialIdentity.lean index 9c31429bed..b5f3063ee2 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialIdentity.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialIdentity.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialIntegrability +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialIntegrability +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Weak radial stationarity identity @@ -13,6 +16,8 @@ the weak radial integral identity, with integrability side conditions supplied by `RadialIntegrability`. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialIntegrability.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialIntegrability.lean index e6b8e798b8..6e193dfe36 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialIntegrability.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialIntegrability.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.EnergyQuantities -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialCutoffs +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.EnergyQuantities +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialCutoffs +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakStationarity +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Weak radial integrability @@ -13,6 +17,8 @@ This module contains the weak radial integrands and the integrability lemmas that discharge the side conditions in the radial stationarity identity. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialMeasure.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialMeasure.lean index 93fd25237f..043aebc3c6 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialMeasure.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadialMeasure.lean @@ -3,14 +3,19 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Basic +public import Mathlib.MeasureTheory.VectorMeasure.Decomposition.Lebesgue import Mathlib.MeasureTheory.Constructions.HaarToSphere import Mathlib.MeasureTheory.VectorMeasure.Decomposition.RadonNikodym -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Basic /-! # Radial Measure -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusAnalysis.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusAnalysis.lean index b359c5cf6e..660450ff9e 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusAnalysis.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusAnalysis.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.PrimitiveCutoffs +import Mathlib.Data.Nat.Factorial.DoubleFactorial import Mathlib.MeasureTheory.Integral.IntervalIntegral.DerivIntegrable -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.PrimitiveCutoffs -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Euclidean /-! # Radius absolute continuity inputs @@ -18,6 +20,8 @@ coarea and one-dimensional calculus steps can be audited independently, while public users should rely on `MainTheorem.lean`. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusFormulas.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusFormulas.lean index 716baabd16..0af144e82d 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusFormulas.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusFormulas.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusPrimitive import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.BallIntegralAC +import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusWeightedDerivative +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.MeasureTheory.Integral.IntervalIntegral.AbsolutelyContinuousFun /-! # Weak radius formula constructors @@ -12,6 +18,8 @@ This module constructs the weak radius integration and one-dimensional calculus packages from local L2, coarea, and annulus inputs. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusPrimitive.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusPrimitive.lean index f259da3c37..fdf08c558d 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusPrimitive.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusPrimitive.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusAnalysis +import Mathlib.Data.Nat.Factorial.DoubleFactorial import Mathlib.MeasureTheory.Integral.IntervalIntegral.AbsolutelyContinuousFun import Mathlib.Topology.Order.IsLocallyClosed -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusAnalysis /-! # Radius primitive formulas @@ -14,6 +17,8 @@ This module contains primitive, increment, annulus, and interval-indicator forms of the radius derivative calculus. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusWeightedDerivative.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusWeightedDerivative.lean index 4f09ed3a6a..e28cef087f 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusWeightedDerivative.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusWeightedDerivative.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusAnalysis import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusPrimitive +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.MeasureTheory.Integral.IntervalIntegral.DerivIntegrable +import Mathlib.MeasureTheory.Integral.IntervalIntegral.LebesgueDifferentiationThm /-! # Weighted radius derivative formulas @@ -12,6 +18,8 @@ This module upgrades interval-indicator radius derivative formulas to general radius weights and identifies the radial derivative density. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusWeightedRepresentation.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusWeightedRepresentation.lean index 8a5e0f659e..c168d10f7b 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusWeightedRepresentation.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusWeightedRepresentation.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusPrimitive +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadiusAnalysis +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Weighted radial representation @@ -13,6 +16,8 @@ to the measurable, essentially bounded radius weights used by the weak monotonicity argument. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusWeights.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusWeights.lean index 14e97497c1..8af8a6c993 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusWeights.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/RadiusWeights.lean @@ -3,12 +3,20 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialMeasure +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialMeasure +public import Mathlib.Analysis.Calculus.ContDiff.Defs +import Mathlib.Analysis.Calculus.ContDiff.Deriv +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Radius Weights -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/SobolevBridge.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/SobolevBridge.lean index 2d604b88f7..a5452bcad0 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/SobolevBridge.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/SobolevBridge.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakGradientBridge +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.EnergyQuantities +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.L2LocBridge import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Monotonicity -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakGradientBridge +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Sobolev bridge for stationary Sobolev map monotonicity @@ -17,6 +22,8 @@ that their preferred Sobolev assumptions imply `WeakStationaryMapIn`, then call that theorem. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/SobolevWitness.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/SobolevWitness.lean index c0928c5978..211b5a5337 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/SobolevWitness.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/SobolevWitness.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.SobolevBridge +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.SobolevBridge +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Sobolev witnesses @@ -16,6 +19,8 @@ No stationarity or monotonicity theorem is defined here; those live in `StationaryMap.lean` and `MainTheorem.lean`. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/StationarityBridge.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/StationarityBridge.lean index 9571d13307..0fd33b9d20 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/StationarityBridge.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/StationarityBridge.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.SobolevBridge -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.FirstVariationBridge +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.SobolevBridge +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.FirstVariationBridge +import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.Monotonicity +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Stationarity bridge for the monotonicity theorem @@ -16,6 +20,8 @@ compactly supported `C¹` tests. It bridges to the custom `WeakStationaryIn Du interface used by the proved monotonicity theorem. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/StationaryMap.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/StationaryMap.lean index 47a563ef43..a88e52fd4e 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/StationaryMap.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/StationaryMap.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.SobolevWitness -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.StationarityBridge +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.SobolevWitness +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.StationarityBridge +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Stationary Sobolev map package @@ -17,6 +20,8 @@ The target-manifold constraint is intentionally absent. The monotonicity proof uses only this stationary package. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/WeakGradientBridge.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/WeakGradientBridge.lean index 17362f693d..2638f33d19 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/WeakGradientBridge.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/WeakGradientBridge.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.L2LocBridge +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.WeakStationarity +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Weak-gradient bridge @@ -14,6 +17,8 @@ support, and support-in-domain data, so future mathlib distribution/test-functio work has a single interface to refine. -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/WeakStationarity.lean b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/WeakStationarity.lean index 16f485bf51..16ca356eb7 100644 --- a/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/WeakStationarity.lean +++ b/LeanPool/LeanStationaryHarmonicMaps/StationaryHarmonicMap/WeakStationarity.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Wei Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wei Wang -/ -import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialGeometry +module + +public import LeanPool.LeanStationaryHarmonicMaps.StationaryHarmonicMap.RadialGeometry +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Weak Stationarity -/ +@[expose] public section + noncomputable section open MeasureTheory Set diff --git a/LeanPool/LehmerE10.lean b/LeanPool/LehmerE10.lean index de0e86ecdf..75f694dbd2 100644 --- a/LeanPool/LehmerE10.lean +++ b/LeanPool/LehmerE10.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Dillon Ryan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dillon Ryan -/ +module -import LeanPool.LehmerE10.Defs -import LeanPool.LehmerE10.Main +public import LeanPool.LehmerE10.Defs +public import LeanPool.LehmerE10.Main +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Lehmer's Polynomial and the E10 Coxeter Element @@ -18,6 +25,8 @@ Tags: number-theory, mahler-measure, salem-numbers, coxeter-groups MSC: 11R06, 11C08, 20F55 -/ +@[expose] public section + /-! # Lehmer's polynomial and the E10 Coxeter element diff --git a/LeanPool/LehmerE10/CoxeterE8.lean b/LeanPool/LehmerE10/CoxeterE8.lean index a1f7ebdfcf..4bc04ac747 100644 --- a/LeanPool/LehmerE10/CoxeterE8.lean +++ b/LeanPool/LehmerE10/CoxeterE8.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Dillon Ryan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dillon Ryan -/ +module -import LeanPool.LehmerE10.Defs -import LeanPool.LehmerE10.Mahler -import Mathlib.GroupTheory.OrderOfElement +public import Mathlib.GroupTheory.OrderOfElement +public import Mathlib.LinearAlgebra.Matrix.Notation +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.NormNum.Prime /-! # the finite contrast: the E₈ Coxeter element has order 30. @@ -26,6 +34,8 @@ spectrum on the unit circle ⟹ roots of unity ⟹ finite order, versus one eige the circle ⟹ infinite order — with Lehmer's number as the first exit. -/ +@[expose] public section + open Matrix namespace LehmerE10 diff --git a/LeanPool/LehmerE10/CyclotomicKill.lean b/LeanPool/LehmerE10/CyclotomicKill.lean index c06a107a43..ffc5270188 100644 --- a/LeanPool/LehmerE10/CyclotomicKill.lean +++ b/LeanPool/LehmerE10/CyclotomicKill.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Dillon Ryan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dillon Ryan -/ +module +public import LeanPool.LehmerE10.Defs +public import Mathlib.Algebra.Field.ZMod +public import Mathlib.RingTheory.Polynomial.Cyclotomic.Basic import LeanPool.LehmerE10.Kronecker +import Mathlib.MeasureTheory.Integral.Bochner.Basic import Mathlib.RingTheory.Polynomial.Cyclotomic.Eval -import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic -import Mathlib.FieldTheory.Minpoly.Field +import Mathlib.Tactic.NormNum.Prime /-! # no cyclotomic polynomial divides Lehmer's polynomial, and the @@ -24,6 +28,8 @@ Cayley–Hamilton + minimal-polynomial divisibility + degree count. Axiom footprint: `propext`, `Classical.choice`, `Quot.sound` only. -/ +@[expose] public section + namespace LehmerE10 open Polynomial diff --git a/LeanPool/LehmerE10/Defs.lean b/LeanPool/LehmerE10/Defs.lean index 128e8b17c3..b4feb9f866 100644 --- a/LeanPool/LehmerE10/Defs.lean +++ b/LeanPool/LehmerE10/Defs.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Dillon Ryan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dillon Ryan -/ +module -import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic -import Mathlib.LinearAlgebra.Matrix.Notation +public import Mathlib.LinearAlgebra.Matrix.Notation +public import Mathlib.Algebra.Polynomial.Basic +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # the objects of the claim. @@ -16,6 +19,8 @@ lattice in the basis of simple roots, and a Coxeter element as the product of th ten simple reflections. -/ +@[expose] public section + open Polynomial /-- **Lehmer's polynomial** (Lehmer, 1933): diff --git a/LeanPool/LehmerE10/Ergodic.lean b/LeanPool/LehmerE10/Ergodic.lean index 7aa9007714..d0d7909d0b 100644 --- a/LeanPool/LehmerE10/Ergodic.lean +++ b/LeanPool/LehmerE10/Ergodic.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Dillon Ryan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dillon Ryan -/ +module -import LeanPool.LehmerE10.Main +public import LeanPool.LehmerE10.Defs +public import Mathlib.RingTheory.Polynomial.Cyclotomic.Basic import LeanPool.LehmerE10.CyclotomicKill +import LeanPool.LehmerE10.Main +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.NormNum.Prime /-! # the E₁₀ Coxeter element as an ERGODIC toral automorphism. @@ -27,6 +32,8 @@ the moduli space of these automorphisms is uncountable or countable by the same lemma records the *ergodicity* half — provable now — not the entropy value. -/ +@[expose] public section + open Polynomial namespace LehmerE10 diff --git a/LeanPool/LehmerE10/Kronecker.lean b/LeanPool/LehmerE10/Kronecker.lean index c952943652..d7639ef5e4 100644 --- a/LeanPool/LehmerE10/Kronecker.lean +++ b/LeanPool/LehmerE10/Kronecker.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Dillon Ryan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dillon Ryan -/ +module -import LeanPool.LehmerE10.Defs +public import LeanPool.LehmerE10.Defs +public import Mathlib.Analysis.Complex.Norm +public import Mathlib.RingTheory.RootsOfUnity.PrimitiveRoots import Mathlib.NumberTheory.NumberField.InfinitePlace.Embeddings import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots -import Mathlib.Tactic.ComputeDegree import Mathlib.Tactic.NormNum.Prime /-! @@ -25,6 +27,8 @@ Contents: Axiom footprint: `propext`, `Classical.choice`, `Quot.sound` only. -/ +@[expose] public section + namespace LehmerE10 open Polynomial diff --git a/LeanPool/LehmerE10/Mahler.lean b/LeanPool/LehmerE10/Mahler.lean index 091024483b..58bd24bd88 100644 --- a/LeanPool/LehmerE10/Mahler.lean +++ b/LeanPool/LehmerE10/Mahler.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Dillon Ryan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dillon Ryan -/ +module -import LeanPool.LehmerE10.Main -import Mathlib.Analysis.Polynomial.MahlerMeasure +public import LeanPool.LehmerE10.Main +public import Mathlib.Analysis.Polynomial.MahlerMeasure +import LeanPool.LehmerE10.Kronecker +import Mathlib.CategoryTheory.Category.Init +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.NormNum.Prime /-! # the Mahler measure of Lehmer's polynomial, in Mathlib's own API. @@ -32,6 +37,8 @@ series crosses from torsion (spectrum on the unit circle) to a Salem element exa rank 10, and the crossing value is Lehmer's number. -/ +@[expose] public section + open Polynomial namespace LehmerE10 diff --git a/LeanPool/LehmerE10/Main.lean b/LeanPool/LehmerE10/Main.lean index 0f6f40abec..717bd54894 100644 --- a/LeanPool/LehmerE10/Main.lean +++ b/LeanPool/LehmerE10/Main.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Dillon Ryan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dillon Ryan -/ - -import LeanPool.LehmerE10.Defs +module + +public import LeanPool.LehmerE10.Defs +public import LeanPool.LehmerE10.TraceQuintic +public import Mathlib.Algebra.Polynomial.Derivative +public import Mathlib.Algebra.Polynomial.Roots +public import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic +import LeanPool.LehmerE10.CyclotomicKill +import LeanPool.LehmerE10.Kronecker import LeanPool.LehmerE10.UnitCircleFactors -import LeanPool.LehmerE10.TraceQuintic +import Mathlib.Analysis.Complex.Polynomial.Basic +import Mathlib.Tactic.NormNum.Prime /-! # the assembly: @@ -36,6 +44,8 @@ is NOT claimed anywhere in this repository. Axiom footprint: `propext`, `Classical.choice`, `Quot.sound` only. -/ +@[expose] public section + namespace LehmerE10 open Polynomial diff --git a/LeanPool/LehmerE10/SalemSymmetry.lean b/LeanPool/LehmerE10/SalemSymmetry.lean index 879d8882ed..b2f9b64652 100644 --- a/LeanPool/LehmerE10/SalemSymmetry.lean +++ b/LeanPool/LehmerE10/SalemSymmetry.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Dillon Ryan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dillon Ryan -/ +module -import LeanPool.LehmerE10.Defs +public import LeanPool.LehmerE10.Defs +public import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import LeanPool.LehmerE10.Main +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.NumberTheory.ArithmeticFunction.Misc +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # unimodularity and the reciprocal (Salem-pair) symmetry. @@ -20,6 +29,8 @@ element as an integer lattice automorphism: as a conjugate. Equivalently, the Coxeter element and its inverse share a charpoly. -/ +@[expose] public section + open Polynomial Matrix namespace LehmerE10 diff --git a/LeanPool/LehmerE10/TraceQuintic.lean b/LeanPool/LehmerE10/TraceQuintic.lean index f91027190c..52844bbb59 100644 --- a/LeanPool/LehmerE10/TraceQuintic.lean +++ b/LeanPool/LehmerE10/TraceQuintic.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Dillon Ryan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dillon Ryan -/ +module -import Mathlib.Analysis.SpecialFunctions.Complex.Circle -import Mathlib.Topology.Order.IntermediateValue -import Mathlib.Topology.Algebra.Polynomial +public import Mathlib.Analysis.Complex.Norm +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.Positivity.Finset /-! # locating the roots of Lehmer's polynomial via its trace quintic. @@ -20,6 +25,8 @@ carried out here. Axiom footprint: `propext`, `Classical.choice`, `Quot.sound` only. -/ +@[expose] public section + namespace LehmerE10 diff --git a/LeanPool/LehmerE10/UnitCircleFactors.lean b/LeanPool/LehmerE10/UnitCircleFactors.lean index f854726321..817196426b 100644 --- a/LeanPool/LehmerE10/UnitCircleFactors.lean +++ b/LeanPool/LehmerE10/UnitCircleFactors.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Dillon Ryan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dillon Ryan -/ +module +public import LeanPool.LehmerE10.Defs +public import Mathlib.Algebra.Polynomial.Roots +public import Mathlib.Analysis.Complex.Norm import LeanPool.LehmerE10.CyclotomicKill -import Mathlib.Analysis.SpecialFunctions.Complex.Circle +import LeanPool.LehmerE10.Kronecker +import Mathlib.Analysis.Complex.Polynomial.Basic +import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots +import Mathlib.Tactic.NormNum.Prime /-! # no factor of Lehmer's polynomial lives on the unit circle. @@ -23,6 +30,8 @@ Contents: Axiom footprint: `propext`, `Classical.choice`, `Quot.sound` only. -/ +@[expose] public section + namespace LehmerE10 open Polynomial diff --git a/LeanPool/Lentil.lean b/LeanPool/Lentil.lean index 929fce76e4..f56a9b6b77 100644 --- a/LeanPool/Lentil.lean +++ b/LeanPool/Lentil.lean @@ -3,15 +3,17 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.Rules.Basic -import LeanPool.Lentil.Rules.BigOp -import LeanPool.Lentil.Rules.LeadsTo -import LeanPool.Lentil.Rules.StatePred -import LeanPool.Lentil.Rules.WF -import LeanPool.Lentil.ProofMode.Tactics -import LeanPool.Lentil.ProofMode.Display -import LeanPool.Lentil.Tactics.Basic -import LeanPool.Lentil.Tactics.FiniteWindow +module + +public import LeanPool.Lentil.Rules.Basic +public import LeanPool.Lentil.Rules.BigOp +public import LeanPool.Lentil.Rules.LeadsTo +public import LeanPool.Lentil.Rules.StatePred +public import LeanPool.Lentil.Rules.WF +public import LeanPool.Lentil.ProofMode.Tactics +public import LeanPool.Lentil.ProofMode.Display +public import LeanPool.Lentil.Tactics.Basic +public import LeanPool.Lentil.Tactics.FiniteWindow /-! # Lentil: Temporal Logic of Actions in Lean 4 @@ -24,6 +26,8 @@ Tags: temporal-logic, tla, formal-verification, proof-mode MSC: 03B44, 68Q60 -/ +@[expose] public section + /-! # Lentil: Temporal Logic of Actions (TLA) in Lean 4 diff --git a/LeanPool/Lentil/Basic.lean b/LeanPool/Lentil/Basic.lean index b3b46db584..447c584557 100644 --- a/LeanPool/Lentil/Basic.lean +++ b/LeanPool/Lentil/Basic.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import Lean -import Batteries.Util.ExtendedBinder -import LeanPool.Lentil.Util -import LeanPool.Lentil.Foldable +module + +public meta import LeanPool.Lentil.Util + +public meta import LeanPool.Lentil.Utils.SyntaxUtil + +public import Batteries.Util.ExtendedBinder +public import LeanPool.Lentil.Foldable +public meta import Lean.PrettyPrinter.Delaborator.Basic +public import Lean.PrettyPrinter.Delaborator.Basic +public meta import Lean.PrettyPrinter.Parenthesizer + +@[expose] public section open Lean LentilLib @@ -237,14 +246,14 @@ macro_rules /-- Converting a syntax in `term` category into `tlafml`. This is useful in the cases where we want to eliminate the redundant `[tlafml| ... ]` wrapper of some sub-formula when it is inside a `tlafml`. -/ -def TLA.syntaxTermToTlafml [Monad m] [MonadQuotation m] (stx : TSyntax `term) : m (TSyntax `tlafml) := do +meta def TLA.syntaxTermToTlafml [Monad m] [MonadQuotation m] (stx : TSyntax `term) : m (TSyntax `tlafml) := do match stx with | `([tlafml| $f:tlafml ]) => pure f | `(term|$t:term) => `(tlafml| $t:term ) /-- Converting a syntax in `term` category into `tlafml`, by inserting `[tlafml| ... ]` wrapper if needed. -/ -def TLA.syntaxTlafmlToTerm [Monad m] [MonadQuotation m] (stx : TSyntax `tlafml) : m (TSyntax `term) := do +meta def TLA.syntaxTlafmlToTerm [Monad m] [MonadQuotation m] (stx : TSyntax `tlafml) : m (TSyntax `term) := do match stx with | `(tlafml| $t:term ) => pure t | f => `(term|[tlafml| $f:tlafml ]) @@ -252,7 +261,7 @@ def TLA.syntaxTlafmlToTerm [Monad m] [MonadQuotation m] (stx : TSyntax `tlafml) -- taken from https://github.com/leanprover/vstte2024/blob/main/Imp/Expr/Delab.lean open PrettyPrinter.Delaborator SubExpr in /-- Annotate the syntax with term info for the delaborator. -/ -def TLA.annAsTerm {any} (stx : TSyntax any) : DelabM (TSyntax any) := +meta def TLA.annAsTerm {any} (stx : TSyntax any) : DelabM (TSyntax any) := (⟨·⟩) <$> annotateTermInfo ⟨stx.raw⟩ -- heavily inspired by https://github.com/leanprover/vstte2024/blob/main/Imp/Expr/Delab.lean @@ -260,7 +269,7 @@ open PrettyPrinter.Delaborator SubExpr in /-- Delaborate the current expression into `tlafml` syntax. `fuel` bounds the recursion depth; each recursive call descends into a strict subexpression, so seeding it with the expression's depth always suffices. -/ -def TLA.delabTlafmlAux (fuel : Nat) : DelabM (TSyntax `tlafml) := do +meta def TLA.delabTlafmlAux (fuel : Nat) : DelabM (TSyntax `tlafml) := do let e ← getExpr let stx ← do /- NOTE: we could get rid of the nesting of `withAppFn` and `withAppArg` @@ -339,12 +348,12 @@ where open PrettyPrinter.Delaborator SubExpr in /-- Delaborate the current expression into `tlafml` syntax, seeding the depth fuel from the expression's own approximate depth. -/ -def TLA.delabTlafmlInner : DelabM (TSyntax `tlafml) := do +meta def TLA.delabTlafmlInner : DelabM (TSyntax `tlafml) := do TLA.delabTlafmlAux ((← getExpr).approxDepth.toNat + 1) open PrettyPrinter.Delaborator SubExpr in /-- Delaborator turning TLA predicate applications back into `tlafml` notation. -/ -def TLA.delabTlafml : Delab := whenPPOption (fun o => o.get lentil.pp.useDelab.name true) do +meta def TLA.delabTlafml : Delab := whenPPOption (fun o => o.get lentil.pp.useDelab.name true) do let e ← getExpr let fn := e.getAppFn.constName -- need to consider implicit arguments below in comparing `e.getAppNumArgs'` @@ -377,22 +386,22 @@ attribute [delab app.TLA.tlaForall, delab app.TLA.tlaExists] TLA.delabTlafml attribute [delab app.TLA.tlaBigwedge, delab app.TLA.tlaBigvee] TLA.delabTlafml /-- Unexpander rendering `predImplies` as the `|-tla-` sequent notation. -/ -@[app_unexpander TLA.predImplies] def TLA.unexpandPredImplies : Lean.PrettyPrinter.Unexpander +@[app_unexpander TLA.predImplies] meta def TLA.unexpandPredImplies : Lean.PrettyPrinter.Unexpander | `($_ $stx1 $stx2) => do `(($(← TLA.syntaxTermToTlafml stx1)) |-tla- ($(← TLA.syntaxTermToTlafml stx2))) | _ => throw () /-- Unexpander rendering `valid` as the `|-tla-` notation. -/ -@[app_unexpander TLA.valid] def TLA.unexpandValid : Lean.PrettyPrinter.Unexpander +@[app_unexpander TLA.valid] meta def TLA.unexpandValid : Lean.PrettyPrinter.Unexpander | `($_ $stx) => do `(|-tla- ($(← TLA.syntaxTermToTlafml stx))) | _ => throw () /-- Unexpander rendering `satisfies` as the `|=tla=` notation. -/ -@[app_unexpander TLA.exec.satisfies] def TLA.unexpandSatisfies : Lean.PrettyPrinter.Unexpander +@[app_unexpander TLA.exec.satisfies] meta def TLA.unexpandSatisfies : Lean.PrettyPrinter.Unexpander | `($_ $stx1 $stx2) => do `($stx2 |=tla= $(← TLA.syntaxTermToTlafml stx1)) | _ => throw () /-- Unexpander rendering equalities between TLA formulas with `=tla=`. -/ -@[app_unexpander Eq] def TLA.unexpandTlaEq : Lean.PrettyPrinter.Unexpander +@[app_unexpander Eq] meta def TLA.unexpandTlaEq : Lean.PrettyPrinter.Unexpander | `($_ [tlafml| $f1:tlafml ] [tlafml| $f2:tlafml ]) => `(($f1) =tla= ($f2)) | `($_ [tlafml| $f1:tlafml ] $t2:term) => do `(($f1) =tla= ($(← `(tlafml| $t2:term )))) | `($_ $t1:term [tlafml| $f2:tlafml ]) => do `(($(← `(tlafml| $t1:term ))) =tla= ($f2)) @@ -401,7 +410,7 @@ attribute [delab app.TLA.tlaBigwedge, delab app.TLA.tlaBigvee] TLA.delabTlafml -- taken from https://github.com/leanprover/vstte2024/blob/main/Imp/Expr/Syntax.lean open PrettyPrinter Parenthesizer in @[category_parenthesizer tlafml] -def tlafml.parenthesizer : CategoryParenthesizer | prec => do +meta def tlafml.parenthesizer : CategoryParenthesizer | prec => do maybeParenthesize `tlafml true wrapParens prec $ parenthesizeCategoryCore `tlafml prec where diff --git a/LeanPool/Lentil/Expr.lean b/LeanPool/Lentil/Expr.lean index a536cfef80..18006e42f4 100644 --- a/LeanPool/Lentil/Expr.lean +++ b/LeanPool/Lentil/Expr.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import Lean +module + +public import Lean.Meta.Basic import LeanPool.Lentil.Basic +@[expose] public section + namespace TLA.Expr open Lean Meta diff --git a/LeanPool/Lentil/Foldable.lean b/LeanPool/Lentil/Foldable.lean index 41be03660f..cb6274da5f 100644 --- a/LeanPool/Lentil/Foldable.lean +++ b/LeanPool/Lentil/Foldable.lean @@ -3,7 +3,8 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import Lean +module + /-! ## A `Foldable` typeclass for big operators @@ -11,6 +12,8 @@ A small typeclass abstracting collections that can be folded with a commutative-associative operation, used to give big-conjunction and big-disjunction TLA operators a uniform definition. -/ +@[expose] public section + namespace TLA -- HMM this is kind of awkward: we need `Std.Commutative` and `Std.Associative` to be able diff --git a/LeanPool/Lentil/Gadgets/TheoremDeriving.lean b/LeanPool/Lentil/Gadgets/TheoremDeriving.lean index b39013b7dc..8e7901e1d9 100644 --- a/LeanPool/Lentil/Gadgets/TheoremDeriving.lean +++ b/LeanPool/Lentil/Gadgets/TheoremDeriving.lean @@ -3,12 +3,22 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import Lean -import LeanPool.Lentil.Rules.Basic -import LeanPool.Lentil.Expr +module + +public import LeanPool.Lentil.Rules.Basic + +public meta import Batteries.Linter.UnreachableTactic + +public meta import LeanPool.Lentil.Expr + +public import LeanPool.Lentil.Utils.MetaUtil +import Aesop.Frontend.Tactic +import LeanPool.Lentil.Tactics.Basic /-! Gadgets for providing different variants of a proven theorem. -/ +public meta section + namespace TLA.Deriving open Lean Meta Core Elab TLA.Expr LentilLib @@ -85,6 +95,7 @@ def deriveForPredImpliesOrValid (nm : Name) : CoreM Unit := do let info ← getConstInfo nm let ty := info.type let lvlParams := info.levelParams + let levels := lvlParams.toArray.map mkIdent let noncomputable? := isNoncomputable (← getEnv) nm MetaM.run' do let (thmName1, thmStmt1, thmName2, thmStmt2) ← @@ -108,7 +119,7 @@ def deriveForPredImpliesOrValid (nm : Name) : CoreM Unit := do -- to avoid this, we add a separate branch where there is no `have`. (← `(term| by solve | tlaNontemporalSimp; aesop - | have := @$(mkIdent nm); tlaNontemporalSimp; aesop)) noncomputable? + | have := @$(mkIdent nm).{$levels,*}; tlaNontemporalSimp; aesop)) noncomputable? simpleProveTheorem thmName2 lvlParams thmStmt2 (← do let htmp ← mkIdent <$> mkFreshUserName `htmp @@ -116,7 +127,7 @@ def deriveForPredImpliesOrValid (nm : Name) : CoreM Unit := do let introNames ← ty.getForallBinderNames.toArray.mapM (mkIdent <$> mkFreshUserName ·) `(term| by solve | tlaNontemporalSimp; aesop - | intro $introNames*; have $htmp := @$(mkIdent nm) $introNames* + | intro $introNames*; have $htmp := @$(mkIdent nm).{$levels,*} $introNames* (try rw [← TLA.impl_intro] at $htmp:ident) repeat (first | (solve diff --git a/LeanPool/Lentil/Gadgets/TheoremLifting.lean b/LeanPool/Lentil/Gadgets/TheoremLifting.lean index 9347a4058f..1ff5897099 100644 --- a/LeanPool/Lentil/Gadgets/TheoremLifting.lean +++ b/LeanPool/Lentil/Gadgets/TheoremLifting.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import Lean +module + +public import Lean.Expr +public import LeanPool.Lentil.Utils.MetaUtil +import Lean.Data.AssocList +import Lean.Meta.AppBuilder import LeanPool.Lentil.Basic /-! Gadgets for lifting a propositional theorem to the level of temporal logic. -/ +public meta section + namespace TLA.Lifting open Lean Meta Core Elab LentilLib @@ -123,7 +130,7 @@ private def guessWhereToStartAux (es xs : List Expr) : MetaM Nat := /-- Given `thmStmt` being `x₁ → x₂ → ⋯ → xₙ`, find the longest suffix `xₘ → ⋯ → xₙ` such that each `xᵢ` is a `Prop` and independent. -/ -private def guessWhereToStart (thmStmt : Expr) : MetaM Nat := do +def guessWhereToStart (thmStmt : Expr) : MetaM Nat := do forallTelescope thmStmt fun xs body => guessWhereToStartAux [body] xs.reverse.toList diff --git a/LeanPool/Lentil/ProofMode/Basic.lean b/LeanPool/Lentil/ProofMode/Basic.lean index 6d40df9560..897d300814 100644 --- a/LeanPool/Lentil/ProofMode/Basic.lean +++ b/LeanPool/Lentil/ProofMode/Basic.lean @@ -3,7 +3,18 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ +module + +public import LeanPool.Lentil.Tactics.Basic +public import LeanPool.Lentil.Utils.MiscLemmas +import Aesop.Frontend.Tactic +import Aesop.Main +import LeanPool.Lentil.Rules.Basic import LeanPool.Lentil.Rules.BigOp +import LeanPool.Lentil.Util +import Std.Tactic.BVDecide.Normalize.Prop + +@[expose] public section namespace TLA.ProofMode diff --git a/LeanPool/Lentil/ProofMode/Display.lean b/LeanPool/Lentil/ProofMode/Display.lean index 8b8fd3b86d..320adc08c1 100644 --- a/LeanPool/Lentil/ProofMode/Display.lean +++ b/LeanPool/Lentil/ProofMode/Display.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Basic +module + +public meta import LeanPool.Lentil.ProofMode.Basic + +public import LeanPool.Lentil.ProofMode.Basic + +public meta section open Lean diff --git a/LeanPool/Lentil/ProofMode/Location.lean b/LeanPool/Lentil/ProofMode/Location.lean index 9e48f89a24..1e53fccf5f 100644 --- a/LeanPool/Lentil/ProofMode/Location.lean +++ b/LeanPool/Lentil/ProofMode/Location.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Basic +module + +public import Aesop.BuiltinRules +public meta import Lean.Elab.Tactic.Location +public import Lean.Exception +public import LeanPool.Lentil.Utils.MetaUtil +import Lean.Elab.Tactic.Location + +public meta section namespace TLA.ProofMode diff --git a/LeanPool/Lentil/ProofMode/Tactics.lean b/LeanPool/Lentil/ProofMode/Tactics.lean index 46c798eff5..280424804e 100644 --- a/LeanPool/Lentil/ProofMode/Tactics.lean +++ b/LeanPool/Lentil/ProofMode/Tactics.lean @@ -3,29 +3,31 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Tactics.Apply -import LeanPool.Lentil.ProofMode.Tactics.Assumption -import LeanPool.Lentil.ProofMode.Tactics.CheckGoalForm -import LeanPool.Lentil.ProofMode.Tactics.Clear -import LeanPool.Lentil.ProofMode.Tactics.Contradiction -import LeanPool.Lentil.ProofMode.Tactics.CoalesceToPTL -import LeanPool.Lentil.ProofMode.Tactics.Exists -import LeanPool.Lentil.ProofMode.Tactics.Exit -import LeanPool.Lentil.ProofMode.Tactics.Have -import LeanPool.Lentil.ProofMode.Tactics.Intro -import LeanPool.Lentil.ProofMode.Tactics.LeftRight -import LeanPool.Lentil.ProofMode.Tactics.ModalityMisc -import LeanPool.Lentil.ProofMode.Tactics.Monotone -import LeanPool.Lentil.ProofMode.Tactics.Normalize -import LeanPool.Lentil.ProofMode.Tactics.PurePred -import LeanPool.Lentil.ProofMode.Tactics.RCases -import LeanPool.Lentil.ProofMode.Tactics.Rename -import LeanPool.Lentil.ProofMode.Tactics.Revert -import LeanPool.Lentil.ProofMode.Tactics.Rewrite -import LeanPool.Lentil.ProofMode.Tactics.Simp -import LeanPool.Lentil.ProofMode.Tactics.Specialize -import LeanPool.Lentil.ProofMode.Tactics.SplitAnds -import LeanPool.Lentil.ProofMode.Tactics.Start +module + +public import LeanPool.Lentil.ProofMode.Tactics.Apply +public import LeanPool.Lentil.ProofMode.Tactics.Assumption +public import LeanPool.Lentil.ProofMode.Tactics.CheckGoalForm +public import LeanPool.Lentil.ProofMode.Tactics.Clear +public import LeanPool.Lentil.ProofMode.Tactics.Contradiction +public import LeanPool.Lentil.ProofMode.Tactics.CoalesceToPTL +public import LeanPool.Lentil.ProofMode.Tactics.Exists +public import LeanPool.Lentil.ProofMode.Tactics.Exit +public import LeanPool.Lentil.ProofMode.Tactics.Have +public import LeanPool.Lentil.ProofMode.Tactics.Intro +public import LeanPool.Lentil.ProofMode.Tactics.LeftRight +public import LeanPool.Lentil.ProofMode.Tactics.ModalityMisc +public import LeanPool.Lentil.ProofMode.Tactics.Monotone +public import LeanPool.Lentil.ProofMode.Tactics.Normalize +public import LeanPool.Lentil.ProofMode.Tactics.PurePred +public import LeanPool.Lentil.ProofMode.Tactics.RCases +public import LeanPool.Lentil.ProofMode.Tactics.Rename +public import LeanPool.Lentil.ProofMode.Tactics.Revert +public import LeanPool.Lentil.ProofMode.Tactics.Rewrite +public import LeanPool.Lentil.ProofMode.Tactics.Simp +public import LeanPool.Lentil.ProofMode.Tactics.Specialize +public import LeanPool.Lentil.ProofMode.Tactics.SplitAnds +public import LeanPool.Lentil.ProofMode.Tactics.Start /- NOTE: On the soundness theorems corresponding to these tactics: diff --git a/LeanPool/Lentil/ProofMode/Tactics/Apply.lean b/LeanPool/Lentil/ProofMode/Tactics/Apply.lean index 456c65c139..9b197f0f5a 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Apply.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Apply.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Tactics.Have -import LeanPool.Lentil.Expr +module + +public meta import LeanPool.Lentil.Expr + +public import LeanPool.Lentil.ProofMode.Tactics.Have +import LeanPool.Lentil.Rules.Basic + +@[expose] public section namespace TLA.ProofMode @@ -45,10 +51,10 @@ theorem Entails_apply_hyp_closing_goal (h : hyps.getLast?.map NamedPred.pred = s end -private def applyTacDSimps := #[``repeatedAnd, ``LentilLib.List.foldrD, ``List.dropLast, +private meta def applyTacDSimps := #[``repeatedAnd, ``LentilLib.List.foldrD, ``List.dropLast, ``List.foldr] -private def goalDirectedPremisesCut (remainingPremises : List Expr) (goal conclusion : Expr) : MetaM (List Expr) := do +private meta def goalDirectedPremisesCut (remainingPremises : List Expr) (goal conclusion : Expr) : MetaM (List Expr) := do if ← isDefEq goal conclusion then return remainingPremises else diff --git a/LeanPool/Lentil/ProofMode/Tactics/Assumption.lean b/LeanPool/Lentil/ProofMode/Tactics/Assumption.lean index 57ef2c41ca..b52aa4e00b 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Assumption.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Assumption.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Basic +module + +public meta import LeanPool.Lentil.ProofMode.Basic + +public import LeanPool.Lentil.ProofMode.Basic + +@[expose] public section namespace TLA.ProofMode @@ -30,7 +36,7 @@ Outside proof mode, `tla_assumption` falls back to Lean's ordinary syntax (name := tlaAssumptionTac) "tla_assumption" : tactic -- CHECK If in the future Lean has built-in `findIdxMOpt`, use it instead -private def findIdxMOpt (xs : List α) (p : α → TacticM Bool) : TacticM (Option Nat) := +private meta def findIdxMOpt (xs : List α) (p : α → TacticM Bool) : TacticM (Option Nat) := go 0 xs where go (idx : Nat) : List α → TacticM (Option Nat) diff --git a/LeanPool/Lentil/ProofMode/Tactics/CheckGoalForm.lean b/LeanPool/Lentil/ProofMode/Tactics/CheckGoalForm.lean index 17408385ea..ad0ee944c0 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/CheckGoalForm.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/CheckGoalForm.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ +module + +public meta import LeanPool.Lentil.ProofMode.Basic + +public meta import Lean.Elab.SyntheticMVars import LeanPool.Lentil.ProofMode.Basic +public meta section + namespace TLA.ProofMode open Lean Meta Elab Tactic diff --git a/LeanPool/Lentil/ProofMode/Tactics/Clear.lean b/LeanPool/Lentil/ProofMode/Tactics/Clear.lean index 83ec81cc90..0e75dbe947 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Clear.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Clear.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Basic +module + +public meta import LeanPool.Lentil.ProofMode.Basic + +public import LeanPool.Lentil.ProofMode.Basic +import Lean.Meta.Tactic.Simp.BuiltinSimprocs.String + +@[expose] public section namespace TLA.ProofMode @@ -53,11 +60,12 @@ tactic_extension tlaClearTac attribute [tactic_alt tlaClearTac] tlaClearExceptTac -private def clearTacDSimps := #[``List.filter, ``List.contains, ``List.elem, ``or, ``and, ``not, +/-- Reduction rules used after clearing a proof-mode hypothesis. -/ +meta def clearTacDSimps := #[``List.filter, ``List.contains, ``List.elem, ``or, ``and, ``not, ``String.reduceBEq, ``String.reduceBNe, ``Bool.false_or, ``Bool.or_false] /-- Clear the proof-mode hypotheses with the given names. -/ -def tlaClearByName (name : List String) : TacticM Unit := do +meta def tlaClearByName (name : List String) : TacticM Unit := do evalTactic <| ← `(tactic| refine $(mkIdent ``Entails_clear) ($(quote name)) ?_) postDSimpAfterApplyingReflectionTheorem clearTacDSimps diff --git a/LeanPool/Lentil/ProofMode/Tactics/CoalesceToPTL.lean b/LeanPool/Lentil/ProofMode/Tactics/CoalesceToPTL.lean index 89eed4042d..e6b2174fdd 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/CoalesceToPTL.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/CoalesceToPTL.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import Lean.Meta.Tactic.Generalize -import Lean.Meta.CollectFVars -import Lean.Elab.Tactic.Config +module + + +public import Aesop.BuiltinRules +public meta import Lean.Elab.ConfigEval.Basic +public meta import Std.Do.Triple.SpecLemmas +import Lean.Elab.ConfigEval.Commands +public meta import Lean.Elab.ConfigEval.DeriveEvalConfigItem +public meta import Lean.Meta.Tactic.Generalize import LeanPool.Lentil.ProofMode.Basic +public meta import LeanPool.Lentil.ProofMode.Basic + +public meta section namespace TLA.ProofMode diff --git a/LeanPool/Lentil/ProofMode/Tactics/Contradiction.lean b/LeanPool/Lentil/ProofMode/Tactics/Contradiction.lean index 91bc81c737..cefe2880ba 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Contradiction.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Contradiction.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ +module + +public meta import Batteries.Lean.Expr + +public meta import LeanPool.Lentil.ProofMode.Basic +public import LeanPool.Lentil.ProofMode.Basic import LeanPool.Lentil.ProofMode.Tactics.Revert import LeanPool.Lentil.ProofMode.Tactics.Specialize +import LeanPool.Lentil.Rules.Basic + +@[expose] public section namespace TLA.ProofMode diff --git a/LeanPool/Lentil/ProofMode/Tactics/Exists.lean b/LeanPool/Lentil/ProofMode/Tactics/Exists.lean index 4914eca783..c336b32e94 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Exists.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Exists.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Basic +module + +public import LeanPool.Lentil.ProofMode.Basic +import LeanPool.Lentil.Rules.Basic + +@[expose] public section namespace TLA.ProofMode diff --git a/LeanPool/Lentil/ProofMode/Tactics/Exit.lean b/LeanPool/Lentil/ProofMode/Tactics/Exit.lean index 6a811d4a36..6d59cab8d0 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Exit.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Exit.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ +module + +public meta import LeanPool.Lentil.ProofMode.Basic + import LeanPool.Lentil.ProofMode.Basic +import LeanPool.Lentil.Rules.Basic + +@[expose] public section namespace TLA.ProofMode @@ -15,7 +22,7 @@ open Lean Meta Elab Tactic is unreachable from `tla_exit` — that branch goes through `Entails_nil_eq_valid` so the raw goal becomes `valid rhs` instead of the equivalent `(⊤) |-tla- rhs`. -/ -private def buildAndChain (_σ : Expr) : List Expr → MetaM Expr +private meta def buildAndChain (_σ : Expr) : List Expr → MetaM Expr | [] => panic! "buildAndChain: empty list" | [p] => pure p | p :: ps => do mkAppM ``TLA.tlaAnd #[p, ← buildAndChain _σ ps] diff --git a/LeanPool/Lentil/ProofMode/Tactics/Have.lean b/LeanPool/Lentil/ProofMode/Tactics/Have.lean index 2a2fea2e35..0689ddf812 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Have.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Have.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ +module + + +public import LeanPool.Lentil.ProofMode.Tactics.Rename import LeanPool.Lentil.ProofMode.Tactics.Clear -import LeanPool.Lentil.ProofMode.Tactics.Specialize -import LeanPool.Lentil.Expr +public import LeanPool.Lentil.ProofMode.Tactics.Specialize +import LeanPool.Lentil.Rules.Basic + +@[expose] public section namespace TLA.ProofMode @@ -84,9 +90,9 @@ outside `tla_specialize` is finding the first prefix that elaborates as a TLA theorem. -/ -private def haveTacDSimps : Array Name := #[``List.cons_append, ``List.nil_append] +private meta def haveTacDSimps : Array Name := #[``List.cons_append, ``List.nil_append] -private def addValidTermHyp (newHypName : String) (tm : Term) : TacticM Unit := do +private meta def addValidTermHyp (newHypName : String) (tm : Term) : TacticM Unit := do let e ← Term.withoutErrToSorry <| Term.elabTermAndSynthesize tm none Term.synthesizeSyntheticMVarsNoPostponing let ty ← inferType e >>= instantiateMVars @@ -133,7 +139,7 @@ private def addValidTermHyp (newHypName : String) (tm : Term) : TacticM Unit := replaceMainGoal goals postDSimpAfterApplyingReflectionTheorem haveTacDSimps -private def addTheoremPrefix (newHypName : String) (head : Term) (usedArgs : Array Term) (restArgs : List Term) : TacticM (List Term) := do +private meta def addTheoremPrefix (newHypName : String) (head : Term) (usedArgs : Array Term) (restArgs : List Term) : TacticM (List Term) := do let candidate := Syntax.mkApp head usedArgs (do addValidTermHyp newHypName candidate @@ -144,7 +150,7 @@ private def addTheoremPrefix (newHypName : String) (head : Term) (usedArgs : Arr addTheoremPrefix newHypName head (usedArgs.push arg) args) /-- Introduce a new proof-mode hypothesis proved by the given term. -/ -def tlaHaveTerm (newHypName : String) (tm : Term) : TacticM Nat := withMainContext do +meta def tlaHaveTerm (newHypName : String) (tm : Term) : TacticM Nat := withMainContext do (do let some hypsLen ← goalHypsLength | throwError "tla_have: goal is not an Entails sequent" addValidTermHyp newHypName tm @@ -239,7 +245,7 @@ available with an extra temporal hypothesis `h : p ∧ q`. -/ syntax (name := tlaSufficesTac) "tla_suffices" (ppSpace colGt ident) " : " tlafml " by " tacticSeq : tactic -private def haveOrSufficesCommon (h : Ident) (fml : TSyntax `tlafml) : TacticM Unit := do +private meta def haveOrSufficesCommon (h : Ident) (fml : TSyntax `tlafml) : TacticM Unit := do let nameStr := toString h.getId let fmlTerm ← TLA.syntaxTlafmlToTerm fml evalTactic <| ← `(tactic| @@ -258,7 +264,10 @@ elab_rules : tactic haveOrSufficesCommon h fml -- Swap so the `Entails (hyps ++ …) goal` goal is focused, clean up the `++`, -- then close it with the user's tac. - evalTactic <| ← `(tactic| swap) + let goals ← getGoals + match goals with + | first :: second :: rest => setGoals (second :: first :: rest) + | _ => throwError "tla_suffices expected two goals" postDSimpAfterApplyingReflectionTheorem haveTacDSimps Tactic.focusAndDone <| evalTactic <| ← `(tactic| ($tac)) -- Remaining main goal: `Entails hyps fml` (no `++` to clean). diff --git a/LeanPool/Lentil/ProofMode/Tactics/Intro.lean b/LeanPool/Lentil/ProofMode/Tactics/Intro.lean index 4806af5026..8f98f9b07a 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Intro.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Intro.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ +module + +public meta import LeanPool.Lentil.ProofMode.Basic + +public meta import Batteries.Lean.Expr + +public import LeanPool.Lentil.ProofMode.Basic import LeanPool.Lentil.Rules.Basic -import LeanPool.Lentil.ProofMode.Basic +import Std.Tactic.BVDecide.Normalize.Prop + +@[expose] public section namespace TLA.ProofMode @@ -24,10 +33,11 @@ theorem Entails_intro_temporal {σ : Type u} {hyps : List (NamedPred σ)} Entails hyps [tlafml| newHyp → goal ] := by unfold Entails; simp [impl_intro_add_r, repeatedAnd_append]; rfl -private def introTacDSimps := #[``List.cons_append, ``List.nil_append] +/-- Reduction rules used after introducing a proof-mode hypothesis. -/ +meta def introTacDSimps := #[``List.cons_append, ``List.nil_append] /-- Introduce one proof-mode hypothesis with the given name. -/ -def tlaIntroCoreStep (k : SyntaxNodeKind) (name : TSyntax k) +meta def tlaIntroCoreStep (k : SyntaxNodeKind) (name : TSyntax k) (ident? : TSyntax k → TacticM (Option Ident)) (errorMsgPrefix : String) (tacIntroNonTemporalHyp : TSyntax k → TacticM (TSyntax `tactic)) -- (tacIntroTemporalHyp : TSyntax k → TacticM Unit) diff --git a/LeanPool/Lentil/ProofMode/Tactics/LeftRight.lean b/LeanPool/Lentil/ProofMode/Tactics/LeftRight.lean index aee170df27..31ab562709 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/LeftRight.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/LeftRight.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Basic +module + +public import LeanPool.Lentil.ProofMode.Basic +import LeanPool.Lentil.Rules.Basic + +@[expose] public section namespace TLA.ProofMode diff --git a/LeanPool/Lentil/ProofMode/Tactics/ModalityMisc.lean b/LeanPool/Lentil/ProofMode/Tactics/ModalityMisc.lean index 17ae27c959..43598cd195 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/ModalityMisc.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/ModalityMisc.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Tactics.Monotone +module + +public import LeanPool.Lentil.ProofMode.Tactics.Monotone +meta import LeanPool.Lentil.ProofMode.Basic +import LeanPool.Lentil.Rules.Basic + +@[expose] public section namespace TLA.ProofMode @@ -24,13 +30,13 @@ end -- FIXME: The following logic is very similar in `Lentil.ProofMode.Tactics.Monotone`, -- consider unifying them -private def peelAlwaysOpt (p : Expr) : Option Expr := +private meta def peelAlwaysOpt (p : Expr) : Option Expr := if p.getAppFn'.isConstOf ``TLA.always then if h : p.isApp = true then some (p.appArg h) else none else none -private def proofModeToggleGoalUnderAlways : TacticM Unit := withMainContext do +private meta def proofModeToggleGoalUnderAlways : TacticM Unit := withMainContext do let g ← getMainGoal let target ← cleanupAnnotAndMore (← g.getType) let_expr Entails _ hypsExpr goal := target diff --git a/LeanPool/Lentil/ProofMode/Tactics/Monotone.lean b/LeanPool/Lentil/ProofMode/Tactics/Monotone.lean index 78e25c9e98..2ae1632d13 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Monotone.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Monotone.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Basic +module + + +public import LeanPool.Lentil.ProofMode.Basic +meta import LeanPool.Lentil.ProofMode.Basic import LeanPool.Lentil.Rules.Basic +import LeanPool.Lentil.Util +import Std.Tactic.BVDecide.Normalize.Prop + +@[expose] public section namespace TLA.ProofMode @@ -75,7 +83,7 @@ theorem Entails_always_eventually_monotone_single {name : String} {p : pred σ} end -private def monotoneKinds : List ((Expr → Option Expr) × Name) := [ +private meta def monotoneKinds : List ((Expr → Option Expr) × Name) := [ (matchFirstTwo ``TLA.always ``TLA.eventually, ``Entails_always_eventually_monotone_single), (matchFirstTwo ``TLA.eventually ``TLA.always, ``Entails_eventually_always_monotone), (matchFirst ``TLA.later, ``Entails_later_monotone), @@ -88,7 +96,7 @@ where matchFirstTwo (nm1 nm2 : Name) (e : Expr) : Option Expr := matchFirst nm1 e |>.bind (matchFirst nm2) -private def findMonotonePeelOpt (hyps : List (String × Expr)) (goal : Expr) : +private meta def findMonotonePeelOpt (hyps : List (String × Expr)) (goal : Expr) : Option (Name × List (String × Expr) × Expr) := do let recognize (e : Expr) : Option (Name × Expr) := monotoneKinds.findSome? fun (recognizer, nm) => recognizer e |>.map (fun p => (nm, p)) @@ -100,7 +108,7 @@ private def findMonotonePeelOpt (hyps : List (String × Expr)) (goal : Expr) : return (nm, peeledHyps, peeledGoal) /-- A not quite useful fallback to non-proof-mode case. -/ -private def rawMonotone : TacticM Unit := do +private meta def rawMonotone : TacticM Unit := do evalTactic <| ← `(tactic| first | apply TLA.always_eventually_monotone @@ -109,7 +117,7 @@ private def rawMonotone : TacticM Unit := do | apply TLA.always_monotone | apply TLA.eventually_monotone) -private def proofModeMonotone : TacticM Unit := withMainContext do +private meta def proofModeMonotone : TacticM Unit := withMainContext do let g ← getMainGoal let target ← cleanupAnnotAndMore (← g.getType) let_expr Entails _ hypsExpr goal := target | rawMonotone diff --git a/LeanPool/Lentil/ProofMode/Tactics/Normalize.lean b/LeanPool/Lentil/ProofMode/Tactics/Normalize.lean index 196af3709b..c8c7149c3f 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Normalize.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Normalize.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Basic +module + +public import LeanPool.Lentil.Rules.Basic +import LeanPool.Lentil.Util + +@[expose] public section namespace TLA.ProofMode diff --git a/LeanPool/Lentil/ProofMode/Tactics/PurePred.lean b/LeanPool/Lentil/ProofMode/Tactics/PurePred.lean index 4a281d5359..74d9c914c2 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/PurePred.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/PurePred.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Basic +module + +public import LeanPool.Lentil.ProofMode.Basic +public meta import LeanPool.Lentil.ProofMode.Basic +import Lean.Meta.Tactic.Simp.BuiltinSimprocs.String import LeanPool.Lentil.ProofMode.Tactics.Intro import LeanPool.Lentil.ProofMode.Tactics.Revert +import LeanPool.Lentil.Rules.Basic + +@[expose] public section namespace TLA.ProofMode @@ -31,7 +38,7 @@ theorem Entails_pull_pure {σ : Type u} {hyps : List (NamedPred σ)} {goal : pre rw [List.get?Internal_eq_getElem?, heq1]; simp only [Option.elim, heq2] rwa [← Entails_pure_fact_intro] -private def pullPureTacDSimps := #[``List.findIdx, ``List.findIdx.go, ``List.eraseIdx, ``String.reduceBEq, +private meta def pullPureTacDSimps := #[``List.findIdx, ``List.findIdx.go, ``List.eraseIdx, ``String.reduceBEq, ``String.reduceBNe, ``Bool.cond_false, ``Bool.cond_true, ``Option.elim] /-- diff --git a/LeanPool/Lentil/ProofMode/Tactics/RCases.lean b/LeanPool/Lentil/ProofMode/Tactics/RCases.lean index 9df653a27a..515d58f878 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/RCases.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/RCases.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Tactics.Have -import LeanPool.Lentil.ProofMode.Tactics.Clear -import LeanPool.Lentil.ProofMode.Tactics.Rename +module + + +public import LeanPool.Lentil.ProofMode.Tactics.Have +public import LeanPool.Lentil.ProofMode.Tactics.Clear +public import LeanPool.Lentil.ProofMode.Tactics.Intro +import Lean.Elab.Tactic.RCases +import Lean.Meta.Tactic.Simp.BuiltinSimprocs.String import LeanPool.Lentil.ProofMode.Tactics.Revert +import LeanPool.Lentil.Rules.Basic +import LeanPool.Lentil.Util +import Std.Tactic.BVDecide.Normalize.Prop + +@[expose] public section namespace TLA.ProofMode @@ -93,7 +103,7 @@ end end -private def rcasesTacDSimps : Array Name := +private meta def rcasesTacDSimps : Array Name := #[``List.findIdx, ``List.findIdx.go, ``List.get?Internal, ``List.eraseIdx, ``List.cons_append, ``List.nil_append, ``String.reduceBEq, ``String.reduceBNe, @@ -103,7 +113,7 @@ private def rcasesTacDSimps : Array Name := /-- Generate a name for the hyp slot consumed by this pattern: idents land their own name; `_` and tuples get fresh hygienic names that may be re-targeted on the recursive call. -/ -private def nameStrForPat (pat : TSyntax `rcasesPat) : TacticM String := do +private meta def nameStrForPat (pat : TSyntax `rcasesPat) : TacticM String := do match pat with | `(rcasesPat| $name:ident) => return toString name.getId | _ => @@ -114,7 +124,7 @@ private def nameStrForPat (pat : TSyntax `rcasesPat) : TacticM String := do /-- Unwrap a `rcasesPatLo` to a single `rcasesPat`, rejecting `: ty` ascriptions. A genuine `|` alternation is re-wrapped as a parenthesized `rcasesPat`, so it can be carried uniformly and later recognized by `asAlternationOpt`. -/ -private def unwrapPatLo (p : TSyntax ``Lean.Parser.Tactic.rcasesPatLo) : TacticM (TSyntax `rcasesPat) := do +private meta def unwrapPatLo (p : TSyntax ``Lean.Parser.Tactic.rcasesPatLo) : TacticM (TSyntax `rcasesPat) := do match p with | `(rcasesPatLo| $_:rcasesPatMed : $_:term) => throwError "tla_rcases: type ascription ': ty' is not supported" @@ -130,7 +140,7 @@ private def unwrapPatLo (p : TSyntax ``Lean.Parser.Tactic.rcasesPatLo) : TacticM /-- If `pat` is a parenthesized alternation `(p₁ | p₂ | …)` with at least two branches, return its branches; otherwise `none`. -/ -private def asAlternationOpt (pat : TSyntax `rcasesPat) : Option (Array (TSyntax `rcasesPat)) := +private meta def asAlternationOpt (pat : TSyntax `rcasesPat) : Option (Array (TSyntax `rcasesPat)) := match pat with | `(rcasesPat| ( $lo:rcasesPatLo )) => match lo with @@ -148,7 +158,7 @@ private def asAlternationOpt (pat : TSyntax `rcasesPat) : Option (Array (TSyntax -- for a more efficient implementation in the future. /-- Split tuple sub-patterns into (head, tail) with right-associative wrapping for n > 2: `[p₁, p₂, …, pₙ]` becomes `(p₁, ⟨p₂, …, pₙ⟩)`. -/ -private def splitBinaryRightAssoc (pats : Array (TSyntax ``Lean.Parser.Tactic.rcasesPatLo)) +private meta def splitBinaryRightAssoc (pats : Array (TSyntax ``Lean.Parser.Tactic.rcasesPatLo)) : TacticM (TSyntax `rcasesPat × TSyntax `rcasesPat) := do match pats.toList with | [] => throwError "tla_rcases: empty tuple ⟨⟩ is not supported" @@ -161,7 +171,7 @@ private def splitBinaryRightAssoc (pats : Array (TSyntax ``Lean.Parser.Tactic.rc /-- Split alternation branches into (head, tail) with right-associative wrapping for n > 2: `[b₁, b₂, …, bₙ]` becomes `(b₁, (b₂ | … | bₙ))`. -/ -private def splitAltRightAssoc (branches : Array (TSyntax `rcasesPat)) +private meta def splitAltRightAssoc (branches : Array (TSyntax `rcasesPat)) : TacticM (TSyntax `rcasesPat × TSyntax `rcasesPat) := do match branches.toList with | [] | [_] => throwError "tla_rcases: alternation needs at least two branches" @@ -173,7 +183,7 @@ private def splitAltRightAssoc (branches : Array (TSyntax `rcasesPat)) /-- The number of syntax nodes in `stx`; used as a recursion-fuel bound when destructuring `rcasesPat` patterns (each sub-pattern is strictly smaller). -/ -def syntaxNodeCount : Syntax → Nat +meta def syntaxNodeCount : Syntax → Nat | .node _ _ args => args.foldl (fun acc s => acc + syntaxNodeCount s) 1 | _ => 1 @@ -184,7 +194,7 @@ def syntaxNodeCount : Syntax → Nat A tuple `⟨..⟩` destructures `tlaAnd` / `tlaExists`; a parenthesized alternation `(.. | ..)` case-splits a `tlaOr`, producing two subgoals. -/ -def tlaRcasesCoreFocused (fuel : Nat) (currentHyp : TemporalHypLoc) +meta def tlaRcasesCoreFocused (fuel : Nat) (currentHyp : TemporalHypLoc) (pat : TSyntax `rcasesPat) : TacticM Unit := do match fuel with | 0 => throwError "tla_rcases: pattern is nested too deeply" @@ -266,7 +276,7 @@ def tlaRcasesCoreFocused (fuel : Nat) (currentHyp : TemporalHypLoc) /-- Run `tlaRcasesCoreFocused` on every current goal, collecting all resulting goals. Needed because an or-split multiplies goals, and sibling or subsequent patterns must then be applied to each of them. -/ -def tlaRcasesCoreAllGoals (fuel : Nat) (currentHyp : TemporalHypLoc) +meta def tlaRcasesCoreAllGoals (fuel : Nat) (currentHyp : TemporalHypLoc) (pat : TSyntax `rcasesPat) : TacticM Unit := do let perGoal ← (← getGoals).mapM fun g => Tactic.run g (tlaRcasesCoreFocused fuel currentHyp pat) setGoals perGoal.flatten @@ -274,7 +284,7 @@ def tlaRcasesCoreAllGoals (fuel : Nat) (currentHyp : TemporalHypLoc) /-- Destructure the proof-mode hypothesis at `currentHyp` against `pat`, acting on the main goal and leaving any other goals untouched. This is the entry point; the recursive work happens in `tlaRcasesCoreFocused`. -/ -def tlaRcasesCore (currentHyp : TemporalHypLoc) (pat : TSyntax `rcasesPat) : TacticM Unit := +meta def tlaRcasesCore (currentHyp : TemporalHypLoc) (pat : TSyntax `rcasesPat) : TacticM Unit := -- The pattern's syntax-node count bounds the destructuring recursion depth. focus (tlaRcasesCoreFocused (syntaxNodeCount pat.raw + 1) currentHyp pat) diff --git a/LeanPool/Lentil/ProofMode/Tactics/Rename.lean b/LeanPool/Lentil/ProofMode/Tactics/Rename.lean index 0d10c3800a..e0970d8f76 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Rename.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Rename.lean @@ -3,26 +3,37 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Location +module + +public meta import LeanPool.Lentil.ProofMode.Basic + +public import LeanPool.Lentil.ProofMode.Location +public import LeanPool.Lentil.ProofMode.Basic +import Lean.Meta.Tactic.Simp.BuiltinSimprocs.Core +import Lean.Meta.Tactic.Simp.BuiltinSimprocs.String + +@[expose] public section namespace TLA.ProofMode open Lean Meta Elab Tactic -local macro "renameFun" : term => `((fun ⟨_, pred⟩ => ⟨$(mkIdent `newName), pred⟩)) +/-- Change the displayed name of a hypothesis while retaining its predicate. -/ +def renameFun {σ : Type u} (newName : String) (h : NamedPred σ) : NamedPred σ := + ⟨newName, h.pred⟩ section variable {σ : Type u} {hyps hyps' : List (NamedPred σ)} {goal : pred σ} (newName : String) - (idx : Nat) (h : ModifyHypSpecWithIndex hyps hyps' renameFun idx) + (idx : Nat) (h : ModifyHypSpecWithIndex hyps hyps' (renameFun newName) idx) include h private theorem renameHyp_pred_same : hyps'.map NamedPred.pred = hyps.map NamedPred.pred := by rcases h with rfl | ⟨hidx, rfl⟩ - on_goal 1=> rfl - dsimp; rw [List.modify_eq_take_cons_drop hidx] + · rfl + rw [List.modify_eq_take_cons_drop hidx] conv => enter [2, 2]; rw [← LentilLib.List.take_getElem_drop hidx] - simp only [List.map_append, List.map_take, List.map_cons, List.map_drop] + simp only [List.map_append, List.map_take, List.map_cons, List.map_drop, renameFun] private theorem Entails_rename_aux : Entails hyps' goal = Entails hyps goal := by unfold Entails; congr 1; rw [renameHyp_pred_same newName idx h] @@ -31,7 +42,7 @@ end /-- Rename a hypothesis in a hypothesis list. -/ def renameHyp {σ : Type u} (hyps : List (NamedPred σ)) (oldName newName : String) := - modifyHypByName hyps oldName renameFun + modifyHypByName hyps oldName (renameFun newName) section @@ -39,20 +50,21 @@ variable {σ : Type u} {hyps : List (NamedPred σ)} {goal : pred σ} (newName : theorem Entails_rename_by_name (oldName : String) : Entails (renameHyp hyps oldName newName) goal = Entails hyps goal := by - obtain ⟨idx, hspec⟩ := ModifyHypSpec_implies_ModifyHypSpecWithIndex <| modifyHypByName_spec hyps oldName renameFun + obtain ⟨idx, hspec⟩ := ModifyHypSpec_implies_ModifyHypSpecWithIndex <| modifyHypByName_spec hyps oldName (renameFun newName) exact Entails_rename_aux newName idx hspec theorem Entails_rename_by_idx (idx : Nat) : - Entails (hyps.modify idx renameFun) goal = Entails hyps goal := Entails_rename_aux newName idx (ModifyHypSpecWithIndex_modify _ _ _) + Entails (hyps.modify idx (renameFun newName)) goal = Entails hyps goal := Entails_rename_aux newName idx (ModifyHypSpecWithIndex_modify _ _ _) end -private def renameTacDSimps := #[``renameHyp, ``modifyHypByName, ``List.findIdx?, ``List.findIdx?.go, ``String.reduceBEq, ``String.reduceBNe, +/-- Reduction rules used after renaming a proof-mode hypothesis. -/ +meta def renameTacDSimps := #[``renameHyp, ``modifyHypByName, ``List.findIdx?, ``List.findIdx?.go, ``String.reduceBEq, ``String.reduceBNe, ``dreduceIte, ``Option.elim, ``Bool.false_eq_true, ``List.modify, ``List.modifyTailIdx, ``List.modifyTailIdx.go, ``List.modifyHead] /-- Rename the hypothesis at the given location. -/ -def tlaRename (old : TemporalHypLoc) (newStr : String) : TacticM Unit := do +meta def tlaRename (old : TemporalHypLoc) (newStr : String) : TacticM Unit := do let thm := if old matches .byName .. then ``Entails_rename_by_name else ``Entails_rename_by_idx evalTactic <| ← `(tactic| refine ($(mkIdent thm) ($(quote newStr)) ($(quoteTemporalHypLocToTerm old))).$(mkIdent `mp) ?_) diff --git a/LeanPool/Lentil/ProofMode/Tactics/Revert.lean b/LeanPool/Lentil/ProofMode/Tactics/Revert.lean index a69594e91d..37aff903a9 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Revert.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Revert.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ +module + + +public import LeanPool.Lentil.ProofMode.Basic +public meta import LeanPool.Lentil.ProofMode.Basic +import Lean.Meta.Tactic.Simp.BuiltinSimprocs.String import LeanPool.Lentil.ProofMode.Tactics.Intro +import LeanPool.Lentil.Rules.Basic + +@[expose] public section namespace TLA.ProofMode @@ -11,9 +20,10 @@ open Lean Meta Elab Tactic -- NOTE: The following approach to restoring binder names is inspired by -- `binderNameHint` and `resolveBinderNameHint` -private def binderNameHintAsString (_n : String) (p : α → β) : α → β := p +/-- Attach a binder-name hint without changing the underlying function. -/ +def binderNameHintAsString (_n : String) (p : α → β) : α → β := p -private def resolveBinderNameHintAsString (e : Expr) : CoreM Expr := do +private meta def resolveBinderNameHintAsString (e : Expr) : CoreM Expr := do Core.transform e (post := fun e' => do if e'.isAppOfArity' ``binderNameHintAsString 4 then let args := e'.getAppArgs' @@ -63,13 +73,13 @@ theorem Entails_revert_all : end -private def revertTacDSimps := #[``List.findIdx, ``List.findIdx.go, +private meta def revertTacDSimps := #[``List.findIdx, ``List.findIdx.go, ``List.get?Internal, ``List.eraseIdx, ``String.reduceBEq, ``String.reduceBNe, ``Bool.cond_false, ``Bool.cond_true, ``Option.elim] -private def revertAllTacDSimps := #[``repeatedImplies, ``List.map, ``List.foldr] +private meta def revertAllTacDSimps := #[``repeatedImplies, ``List.map, ``List.foldr] -private def restoreBinderNameInForallCase : TacticM Unit := do +private meta def restoreBinderNameInForallCase : TacticM Unit := do let g ← getMainGoal g.withContext do let ty ← getMainTarget diff --git a/LeanPool/Lentil/ProofMode/Tactics/Rewrite.lean b/LeanPool/Lentil/ProofMode/Tactics/Rewrite.lean index bbe7aa6802..0a012a9fe4 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Rewrite.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Rewrite.lean @@ -3,7 +3,19 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Location +module + +public import LeanPool.Lentil.Utils.MetaUtil + + + +public import LeanPool.Lentil.ProofMode.Basic +meta import Batteries.Lean.Expr +meta import LeanPool.Lentil.ProofMode.Basic +meta import LeanPool.Lentil.ProofMode.Location +public import LeanPool.Lentil.ProofMode.Location + +@[expose] public section namespace TLA.ProofMode @@ -65,7 +77,7 @@ target itself. This is the meta-level counterpart of `change Entails [updated hypotheses] updatedGoal`: it reads the rewritten predicate list, patches the original hypothesis list, and builds a fresh literal `Entails` expression. -/ -private def unfoldPartialHiddenTarget (target : Expr) : MetaM (Option Expr) := target.withApp' fun f args => do +private meta def unfoldPartialHiddenTarget (target : Expr) : MetaM (Option Expr) := target.withApp' fun f args => do -- Recognize unless f.isConstOf ``EntailsWithSomePredsExtractedOut do return none @@ -84,7 +96,7 @@ private def unfoldPartialHiddenTarget (target : Expr) : MetaM (Option Expr) := t let hypsExpr ← toHypsList hypTy hyps return some <| ← mkAppOptM ``Entails #[some σ, some hypsExpr, some goal] -private def restorePartiallyHiddenGoals (contFVar : FVarId) : TacticM Unit := do +private meta def restorePartiallyHiddenGoals (contFVar : FVarId) : TacticM Unit := do let gs ← getGoals let gs' ← gs.mapM fun g => g.withContext do unless (← getLCtx).contains contFVar do @@ -104,7 +116,7 @@ private def restorePartiallyHiddenGoals (contFVar : FVarId) : TacticM Unit := do -- NOTE: This is an overkill for the current `tla_rewrite`, but might be useful -- in the future for other things? So just keep it for now. -private def exposeSelectedLocations (hypsExpr goal : Expr) +private meta def exposeSelectedLocations (hypsExpr goal : Expr) (hyps : List (String × Expr)) (loc : RewriteLocation) (mainGoal : MVarId) : TacticM (FVarId × MVarId) := do let predTy ← inferType goal @@ -131,11 +143,11 @@ private def exposeSelectedLocations (hypsExpr goal : Expr) g'.change newTarget return (contFVar, g'') -private inductive RewriteOneLocation where +private meta inductive RewriteOneLocation where | hyp (idx : Nat) | goal -private def exposeOneLocation (hypsExpr goal : Expr) +private meta def exposeOneLocation (hypsExpr goal : Expr) (hyps : List (String × Expr)) (loc : RewriteOneLocation) (mainGoal : MVarId) : TacticM (FVarId × MVarId) := do match loc with @@ -144,7 +156,7 @@ private def exposeOneLocation (hypsExpr goal : Expr) /-- Expose one proof-mode location, run `k`, then restore all generated goals back from the local-`let` view to `Entails`. -/ -private def withExposedLocation (loc : RewriteOneLocation) (k : TacticM Unit) : TacticM Unit := do +private meta def withExposedLocation (loc : RewriteOneLocation) (k : TacticM Unit) : TacticM Unit := do let g ← getMainGoal let target ← cleanupAnnotAndMore (← g.getType) let_expr Entails _ hypsExpr goal := target @@ -157,7 +169,7 @@ private def withExposedLocation (loc : RewriteOneLocation) (k : TacticM Unit) : g'.withContext k restorePartiallyHiddenGoals contFVar -private def rewriteAtProofModeLocations +private meta def rewriteAtProofModeLocations (loc? : Option (TSyntax ``Lean.Parser.Tactic.location)) (k : TacticM Unit) : TacticM Unit := do let some (_, hyps) ← recognizeEntailsHypsFromGoal | throwError "tla_rewrite: goal is not an Entails sequent" diff --git a/LeanPool/Lentil/ProofMode/Tactics/Simp.lean b/LeanPool/Lentil/ProofMode/Tactics/Simp.lean index c016eab28f..a020da0ec3 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Simp.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Simp.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Location +module + + +public meta import Lean.Elab.Tactic.Basic +public meta import LeanPool.Lentil.ProofMode.Basic +public import LeanPool.Lentil.ProofMode.Location +meta import LeanPool.Lentil.ProofMode.Location + +@[expose] public section namespace TLA.ProofMode @@ -24,7 +32,7 @@ For a proof-mode hypothesis at index `i`, the conv path is: The goal predicate is just argument 2 of `Entails`. -/ -private def runConvAtProofModeLocations +private meta def runConvAtProofModeLocations (loc? : Option (TSyntax ``Lean.Parser.Tactic.location)) (mkConv : TacticM (TSyntax `conv)) : TacticM Unit := do let some (_, hyps) ← recognizeEntailsHypsFromGoal diff --git a/LeanPool/Lentil/ProofMode/Tactics/Specialize.lean b/LeanPool/Lentil/ProofMode/Tactics/Specialize.lean index 870403e046..ea67bdfc07 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Specialize.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Specialize.lean @@ -3,7 +3,19 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Tactics.Rename +module + +public meta import LeanPool.Lentil.ProofMode.Basic + +public import LeanPool.Lentil.ProofMode.Basic +public import LeanPool.Lentil.ProofMode.Location +import Lean.Meta.Tactic.Simp.BuiltinSimprocs.Core +import Lean.Meta.Tactic.Simp.BuiltinSimprocs.String +meta import LeanPool.Lentil.ProofMode.Location +import LeanPool.Lentil.Rules.Basic +import LeanPool.Lentil.Util + +@[expose] public section namespace TLA.ProofMode @@ -56,10 +68,10 @@ private theorem Entails_specializeHyp_aux ((repeatedAnd subHyps)) |-tla- (newHyp) → Entails hyps' goal → Entails hyps goal := by intro h1 h2 rcases h with rfl | ⟨hidx, rfl⟩ - on_goal 1=> exact h2 + · exact h2 apply Entails_add_new (newHypName := (hyps[idx]'hidx).name) - on_goal 2=> apply h1 - on_goal 1=> exact hinc + · exact hinc + · exact h1 unfold Entails have htmp2 := repeatedAnd_modifyHyp_reorder hyps _ hidx fun ⟨name, _⟩ => NamedPred.mk name newHyp dsimp only at htmp2 @@ -197,7 +209,7 @@ end end -private def specializeTacDSimps := #[``replaceChosenPred, ``modifyHypByName, ``List.findIdx?, ``List.findIdx?.go, +private meta def specializeTacDSimps := #[``replaceChosenPred, ``modifyHypByName, ``List.findIdx?, ``List.findIdx?.go, ``String.reduceBEq, ``String.reduceBNe, ``dreduceIte, ``Option.elim, ``Bool.false_eq_true, ``List.modify, ``List.modifyTailIdx, ``List.modifyTailIdx.go, ``List.modifyHead] @@ -206,7 +218,7 @@ private def specializeTacDSimps := #[``replaceChosenPred, ``modifyHypByName, ``L hypothesis list back to the literal proof-mode context. Callers build repeated specialization by invoking this after each argument, so each step sees the predicate produced by the previous step. -/ -def tlaSpecializeStep (pos : TemporalHypLoc) (arg : TSyntax `term) : TacticM Unit := withMainContext do +meta def tlaSpecializeStep (pos : TemporalHypLoc) (arg : TSyntax `term) : TacticM Unit := withMainContext do -- FIXME: Repetitively running `recognizeEntailsHypsFromGoal` and `find?` on it -- might be slow in some extreme cases? let some (_, hyps) ← recognizeEntailsHypsFromGoal | throwError "tla_specialize: failed to read the hypotheses from the goal" diff --git a/LeanPool/Lentil/ProofMode/Tactics/SplitAnds.lean b/LeanPool/Lentil/ProofMode/Tactics/SplitAnds.lean index 5ca0a8bbd5..70b3cfee58 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/SplitAnds.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/SplitAnds.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.ProofMode.Basic +module + +public import LeanPool.Lentil.ProofMode.Basic +import Batteries.Tactic.Init +import LeanPool.Lentil.Rules.Basic + +@[expose] public section namespace TLA.ProofMode diff --git a/LeanPool/Lentil/ProofMode/Tactics/Start.lean b/LeanPool/Lentil/ProofMode/Tactics/Start.lean index d2b18b3df1..b7bac67681 100644 --- a/LeanPool/Lentil/ProofMode/Tactics/Start.lean +++ b/LeanPool/Lentil/ProofMode/Tactics/Start.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ +module + +public meta import LeanPool.Lentil.ProofMode.Basic + + +public meta import LeanPool.Lentil.Expr import LeanPool.Lentil.ProofMode.Basic -import LeanPool.Lentil.Expr + +public meta section namespace TLA.ProofMode diff --git a/LeanPool/Lentil/Rules/Basic.lean b/LeanPool/Lentil/Rules/Basic.lean index e753bf9cfa..f4a4f89d61 100644 --- a/LeanPool/Lentil/Rules/Basic.lean +++ b/LeanPool/Lentil/Rules/Basic.lean @@ -3,12 +3,20 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.Basic -import LeanPool.Lentil.Tactics.Basic +module + +public import LeanPool.Lentil.Tactics.Basic +import Aesop.Frontend.Tactic +import Aesop.Main import LeanPool.Lentil.Gadgets.TheoremLifting +import LeanPool.Lentil.Util +import LeanPool.Lentil.Utils.MiscLemmas +import Std.Tactic.BVDecide.Normalize.Prop /-! Basic theorems about TLA. -/ +@[expose] public section + open Classical LentilLib -- lift a bunch of proplemmas first @@ -187,7 +195,7 @@ theorem eventually_idem : (◇ ◇ p) =tla= ◇ p := by theorem always_eventually_always : (□ ◇ □ p) =tla= ◇ □ p := by funext e; ext; constructor - on_goal 1=> apply always_weaken + · apply always_weaken tlaUnfoldSimp; intro kk h k; exists kk; intros k2 have hq : k + kk + k2 = kk + (k + k2) := by omega rw [hq]; apply h @@ -330,7 +338,7 @@ theorem eventually_and_split : (◇ (p ∧ q)) |-tla- (◇ p ∧ ◇ q) := by -- NOTE: this __DOES NOT__ apply if we change `∧` into `∀`, unless, e.g. `α` is finite! theorem eventually_always_and_distrib : (◇ □ (p ∧ q)) =tla= (◇ □ p ∧ ◇ □ q) := by rw [pred_eq_iff_iff]; constructor - on_goal 1=> rw [always_and]; apply eventually_and_split + · rw [always_and]; apply eventually_and_split tlaUnfoldSimp; intro e n1 h1 n2 h2; exists (n1 + n2) intro k specialize h1 (n2 + k); specialize h2 (n1 + k) diff --git a/LeanPool/Lentil/Rules/BigOp.lean b/LeanPool/Lentil/Rules/BigOp.lean index 295a325e6b..9ead1af1c5 100644 --- a/LeanPool/Lentil/Rules/BigOp.lean +++ b/LeanPool/Lentil/Rules/BigOp.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ +module + +public import LeanPool.Lentil.Tactics.Basic +import Aesop.Frontend.Tactic +import Aesop.Main import LeanPool.Lentil.Rules.Basic +import LeanPool.Lentil.Util +import LeanPool.Lentil.Utils.MiscLemmas +import Std.Tactic.BVDecide.Normalize.Prop /-! Theorems about big operators (e.g., `⋀`, `⋁`). -/ +@[expose] public section + open Classical LentilLib namespace TLA diff --git a/LeanPool/Lentil/Rules/LeadsTo.lean b/LeanPool/Lentil/Rules/LeadsTo.lean index 28813bbd61..1a32f634f5 100644 --- a/LeanPool/Lentil/Rules/LeadsTo.lean +++ b/LeanPool/Lentil/Rules/LeadsTo.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import Lean -import LeanPool.Lentil.Rules.Basic +module + +public import LeanPool.Lentil.Tactics.Basic +import Aesop.Frontend.Tactic +import Aesop.Main import LeanPool.Lentil.Gadgets.TheoremDeriving +import LeanPool.Lentil.Rules.Basic +import LeanPool.Lentil.Util /-! Theorems about the leads-to operator. -/ +@[expose] public section + open Classical namespace TLA diff --git a/LeanPool/Lentil/Rules/StatePred.lean b/LeanPool/Lentil/Rules/StatePred.lean index b23c7fbc65..2798b00a94 100644 --- a/LeanPool/Lentil/Rules/StatePred.lean +++ b/LeanPool/Lentil/Rules/StatePred.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.Rules.WF +module + +public import LeanPool.Lentil.Tactics.Basic +import Aesop.Frontend.Tactic +import Aesop.Main +import LeanPool.Lentil.Rules.Basic import LeanPool.Lentil.Tactics.FiniteWindow +import LeanPool.Lentil.Util /-! Theorems specialized for state predicates. Their premises are typically pure Lean propositions involving states before/after an action, instead of being in the form of `|-tla-`. -/ +@[expose] public section + open Classical namespace TLA diff --git a/LeanPool/Lentil/Rules/WF.lean b/LeanPool/Lentil/Rules/WF.lean index 8f774fa0e0..fed70c2480 100644 --- a/LeanPool/Lentil/Rules/WF.lean +++ b/LeanPool/Lentil/Rules/WF.lean @@ -3,13 +3,25 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import LeanPool.Lentil.Rules.Basic +module + +public import LeanPool.Lentil.Tactics.Basic +import Aesop.Frontend.Tactic +import Aesop.Main +import Batteries.Tactic.Init import LeanPool.Lentil.Gadgets.TheoremDeriving -import LeanPool.Lentil.ProofMode.Tactics -import LeanPool.Lentil.ProofMode.Display +import LeanPool.Lentil.ProofMode.Tactics.Apply +import LeanPool.Lentil.ProofMode.Tactics.RCases +import LeanPool.Lentil.ProofMode.Tactics.SplitAnds +import LeanPool.Lentil.ProofMode.Tactics.Start +import LeanPool.Lentil.Rules.Basic +import LeanPool.Lentil.Util +import Std.Tactic.BVDecide.Normalize.Prop /-! Theorems about weak-fairness. -/ +@[expose] public section + open Classical namespace TLA diff --git a/LeanPool/Lentil/Tactics/Basic.lean b/LeanPool/Lentil/Tactics/Basic.lean index 48f44e960b..f78d2daf72 100644 --- a/LeanPool/Lentil/Tactics/Basic.lean +++ b/LeanPool/Lentil/Tactics/Basic.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import Aesop -import Batteries.Tactic.Basic -import LeanPool.Lentil.Basic +module + +public import LeanPool.Lentil.Basic +public import Aesop.BuiltinRules +public import Lean.Elab.Tactic.Basic +public import Lean.Meta.Tactic.Replace +public import Std.Do.Triple.SpecLemmas +import LeanPool.Lentil.Util + +@[expose] public section open Lean Meta Elab Tactic diff --git a/LeanPool/Lentil/Tactics/FiniteWindow.lean b/LeanPool/Lentil/Tactics/FiniteWindow.lean index 3714e780a7..bb47561769 100644 --- a/LeanPool/Lentil/Tactics/FiniteWindow.lean +++ b/LeanPool/Lentil/Tactics/FiniteWindow.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import Lean -import LeanPool.Lentil.Tactics.Basic +module + +public meta import LeanPool.Lentil.Tactics.Basic + +public meta import Lean.Meta.Tactic.Simp.BuiltinSimprocs.Nat +public meta import Lean.Meta.Tactic.Simp.BuiltinSimprocs.Core + +public import LeanPool.Lentil.Tactics.Basic +import LeanPool.Lentil.Util +import Std.Tactic.BVDecide.Normalize.Prop + +@[expose] public section open Lean @@ -368,8 +378,17 @@ instance hasFiniteWindowExists {σ : Type u} {α : Sort v} (p : α → pred σ) HasFiniteWindow (tlaExists p) n where finite := finiteWindowExists p n fun _ => finiteWindowOfHasFiniteWindow +/-- Natural-number addition reduction for finite-window normalization. -/ +dsimproc_decl finiteWindowReduceNatAdd ((_ + _ : Nat)) := Nat.reduceAdd +/-- Natural-number comparison reduction for finite-window normalization. -/ +simproc_decl finiteWindowReduceNatLe ((_ : Nat) ≤ _) := Nat.reduceLeDiff +/-- Definitional conditional reduction for finite-window normalization. -/ +dsimproc_decl finiteWindowDReduceIte (ite _ _ _) := dreduceIte +/-- Conditional simplification for finite-window normalization. -/ +simproc_decl finiteWindowReduceIte (ite _ _ _) := reduceIte + attribute [tla_finite_window_def] - Nat.max_def Nat.reduceAdd Nat.reduceLeDiff + Nat.max_def finiteWindowReduceNatAdd finiteWindowReduceNatLe IteratedForall HasFiniteWindow.finite finiteWindowOfHasFiniteWindow @@ -389,11 +408,11 @@ attribute [tla_finite_window_def] IteratedHomPred.mkForall IteratedHomPred.mkExists IteratedHomPred.mkBinder -attribute [tla_finite_window_def ↓] dreduceIte reduceIte +attribute [tla_finite_window_def ↓] finiteWindowDReduceIte finiteWindowReduceIte open Elab Tactic Meta -private def finiteWindowOf (p : Expr) : MetaM (Expr × Nat) := do +private meta def finiteWindowOf (p : Expr) : MetaM (Expr × Nat) := do let win ← mkFreshExprMVar (some (mkConst ``Nat)) let instTy ← mkAppM ``HasFiniteWindow #[p, win] let inst ← @@ -405,7 +424,7 @@ private def finiteWindowOf (p : Expr) : MetaM (Expr × Nat) := do | throwError "tlaFiniteWindow: synthesized finite window did not reduce to a numeral: {win}" return (inst, n) -private def introFiniteStates (n : Nat) : TacticM Unit := do +private meta def introFiniteStates (n : Nat) : TacticM Unit := do for idx in 0...n do discard <| introFresh (stateName idx) where diff --git a/LeanPool/Lentil/Util.lean b/LeanPool/Lentil/Util.lean index c846091d54..e28f65a7d0 100644 --- a/LeanPool/Lentil/Util.lean +++ b/LeanPool/Lentil/Util.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import Lean -import LeanPool.Lentil.Utils.MetaUtil -import LeanPool.Lentil.Utils.SyntaxUtil -import LeanPool.Lentil.Utils.MiscLemmas +module + +public import Lean.Data.Options +public meta import Lean.Meta.Tactic.Simp.Simproc +meta import Lean.Meta.Tactic.Simp.Attr +import Lean.Meta.Tactic.Simp.RegisterCommand + +@[expose] public section open Lean diff --git a/LeanPool/Lentil/Utils/MetaUtil.lean b/LeanPool/Lentil/Utils/MetaUtil.lean index 00aa5d00bf..855d494d12 100644 --- a/LeanPool/Lentil/Utils/MetaUtil.lean +++ b/LeanPool/Lentil/Utils/MetaUtil.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import Lean +module + +public meta import Lean.Compiler.NoncomputableAttr +public meta import Lean.Elab.Command +public meta import Std.Do.Triple.SpecLemmas +import Lean.Util.Trace + +public meta section open Lean Meta Elab Tactic @@ -21,7 +28,10 @@ def simpleAddTheorem (name : Name) (lvlParams : List Name) (type value : Expr) ( /-- Prove a theorem at the level of `MetaM`, without going into the proof mode. -/ def simpleProveTheorem (name : Name) (lvlParams : List Name) (type : Expr) (proofScript : TSyntax `term) (nonComputable? : Bool) : MetaM Unit := do - let proof ← liftCommandElabM <| Command.liftTermElabM do + let type ← instantiateMVars type + -- Stay in the current elaborator so auxiliary declarations retain their kernel diagnostics. + let (type, proof) ← withDeclNameForAuxNaming name <| + Term.TermElabM.run' (s := { levelNames := lvlParams }) do -- when things go wrong, print the proof goal let proof ← Term.elabTermAndSynthesize proofScript type if proof.hasSorry then @@ -29,7 +39,13 @@ def simpleProveTheorem (name : Name) (lvlParams : List Name) (type : Expr) (proo -- it is **SUPER WEIRD** that without adding this check, `proof` would still contain -- level metavariables, and `instantiateMVars` would not work as expected! check proof - instantiateMVars proof + let type ← instantiateMVars type + if type.hasMVar then + throwError "unresolved metavariables in generated theorem statement {name}" + let proof ← instantiateMVars proof + if proof.hasMVar then + throwError "unresolved metavariables in generated proof {name}" + return (type, proof) simpleAddTheorem name lvlParams type proof nonComputable? -- inspired by [this discussion](https://leanprover.zulipchat.com/#narrow/channel/239415-metaprogramming-.2F-tactics/topic/Generating.20fresh.20names.20for.20universe.20levels) diff --git a/LeanPool/Lentil/Utils/MiscLemmas.lean b/LeanPool/Lentil/Utils/MiscLemmas.lean index 0fb3d57493..3f5308429e 100644 --- a/LeanPool/Lentil/Utils/MiscLemmas.lean +++ b/LeanPool/Lentil/Utils/MiscLemmas.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import Lean +module + +public import Std.Data.HashSet.Basic +import Std.Data.DTreeMap.Internal.Operations +import Std.Tactic.BVDecide.Normalize.Prop + +@[expose] public section namespace LentilLib diff --git a/LeanPool/Lentil/Utils/SyntaxUtil.lean b/LeanPool/Lentil/Utils/SyntaxUtil.lean index bfdf20c5b1..abefa69088 100644 --- a/LeanPool/Lentil/Utils/SyntaxUtil.lean +++ b/LeanPool/Lentil/Utils/SyntaxUtil.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Qiyuan Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Qiyuan Zhao -/ -import Lean +module + +meta import Lean.Parser.Term +import Lean.Parser.Term + +@[expose] public section open Lean diff --git a/LeanPool/LocalComplexGeometry.lean b/LeanPool/LocalComplexGeometry.lean index ff71451386..306b02b4b4 100644 --- a/LeanPool/LocalComplexGeometry.lean +++ b/LeanPool/LocalComplexGeometry.lean @@ -3,17 +3,20 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ - -import LeanPool.LocalComplexGeometry.Analytic.ConstantRank -import LeanPool.LocalComplexGeometry.Analytic.LevelSet -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Examples -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.NormalSum -import LeanPool.LocalComplexGeometry.FiniteProjection.Main -import LeanPool.LocalComplexGeometry.Noetherian.Ruckert -import LeanPool.LocalComplexGeometry.Nullstellensatz.FiberCancellation -import LeanPool.LocalComplexGeometry.Nullstellensatz.Main -import LeanPool.LocalComplexGeometry.Nullstellensatz.OneVariable -import LeanPool.LocalComplexGeometry.Palomar +module + +public import LeanPool.LocalComplexGeometry.Analytic.ConstantRank +public import LeanPool.LocalComplexGeometry.Analytic.LevelSet +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Examples +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.NormalSum +public import LeanPool.LocalComplexGeometry.FiniteProjection.Main +public import LeanPool.LocalComplexGeometry.Noetherian.Ruckert +public import LeanPool.LocalComplexGeometry.Nullstellensatz.FiberCancellation +public import LeanPool.LocalComplexGeometry.Nullstellensatz.Main +public import LeanPool.LocalComplexGeometry.Nullstellensatz.OneVariable +public import LeanPool.LocalComplexGeometry.Palomar +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Foundational local complex-analytic geometry @@ -26,6 +29,8 @@ Tags: complex-analysis, analytic-geometry, nullstellensatz, weierstrass-preparat MSC: 32A05, 32A10, 32B05, 32C25, 13E05 -/ +@[expose] public section + /-! # Local complex-analytic geometry diff --git a/LeanPool/LocalComplexGeometry/Algebra/NoetherianByRemainder.lean b/LeanPool/LocalComplexGeometry/Algebra/NoetherianByRemainder.lean index 00fbc37bff..71e2f0c87e 100644 --- a/LeanPool/LocalComplexGeometry/Algebra/NoetherianByRemainder.lean +++ b/LeanPool/LocalComplexGeometry/Algebra/NoetherianByRemainder.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import Mathlib.RingTheory.Noetherian.Basic -import Mathlib.RingTheory.Finiteness.Defs -import Mathlib.RingTheory.Ideal.Operations -import Mathlib.LinearAlgebra.Span.Basic +public import Mathlib.RingTheory.Noetherian.Defs +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Finite generation from a finite remainder module @@ -17,6 +19,8 @@ contains an element `p` and reduction modulo `p` lands in a Noetherian module, then finitely many lifted remainders together with `p` generate the ideal. -/ +@[expose] public section + open Set diff --git a/LeanPool/LocalComplexGeometry/Analytic/ConstantRank.lean b/LeanPool/LocalComplexGeometry/Analytic/ConstantRank.lean index 8a308f0f75..7849c0839f 100644 --- a/LeanPool/LocalComplexGeometry/Analytic/ConstantRank.lean +++ b/LeanPool/LocalComplexGeometry/Analytic/ConstantRank.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Analytic.ConstantRankLinear +public import LeanPool.LocalComplexGeometry.Analytic.ConstantRankLinear +public import LeanPool.LocalComplexGeometry.Analytic.LocalBiholomorph import Mathlib.Analysis.Calculus.MeanValue +import Mathlib.Topology.Algebra.Module.FiniteDimension /-! # Holomorphic constant-rank theorem @@ -16,6 +19,8 @@ finite-dimensional complements, and the mean-value theorem on the kernel factor. -/ +@[expose] public section + open Filter Metric open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Analytic/ConstantRankLinear.lean b/LeanPool/LocalComplexGeometry/Analytic/ConstantRankLinear.lean index 31e110ccbf..d98523466f 100644 --- a/LeanPool/LocalComplexGeometry/Analytic/ConstantRankLinear.lean +++ b/LeanPool/LocalComplexGeometry/Analytic/ConstantRankLinear.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Analytic.Rank +public import LeanPool.LocalComplexGeometry.Analytic.Rank +public import Mathlib.LinearAlgebra.FiniteDimensional.Defs +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas -import Mathlib.Topology.Algebra.Module.Complement -import Mathlib.Topology.Algebra.Module.FiniteDimension +import Mathlib.RingTheory.SimpleModule.Basic +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Linear algebra for the constant-rank theorem @@ -18,6 +23,8 @@ composition, a vertical-kernel criterion, and canonical product coordinates on `Fin (r + k) → ℂ`. -/ +@[expose] public section + namespace LocalComplexGeometry diff --git a/LeanPool/LocalComplexGeometry/Analytic/LevelSet.lean b/LeanPool/LocalComplexGeometry/Analytic/LevelSet.lean index 4ba3dde5e8..f9b7cdb60a 100644 --- a/LeanPool/LocalComplexGeometry/Analytic/LevelSet.lean +++ b/LeanPool/LocalComplexGeometry/Analytic/LevelSet.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Analytic.ConstantRank +public import LeanPool.LocalComplexGeometry.Germs.Basic +public import Mathlib.Analysis.Calculus.FDeriv.Defs +import LeanPool.LocalComplexGeometry.Analytic.LocalBiholomorph +import Mathlib.Analysis.Calculus.FDeriv.Analytic +import Mathlib.Topology.Algebra.Module.FiniteDimension /-! # Regular holomorphic level sets @@ -16,6 +21,8 @@ an analytic ambient fiber-coordinate map and eventual two-sided inverse laws, so the conclusion is stronger than a dimension count. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Analytic/LocalBiholomorph.lean b/LeanPool/LocalComplexGeometry/Analytic/LocalBiholomorph.lean index 81fa3fe359..2a41520d96 100644 --- a/LeanPool/LocalComplexGeometry/Analytic/LocalBiholomorph.lean +++ b/LeanPool/LocalComplexGeometry/Analytic/LocalBiholomorph.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import Mathlib.Analysis.Analytic.Constructions -import Mathlib.Analysis.Calculus.FDeriv.Analytic -import Mathlib.Analysis.Calculus.InverseFunctionTheorem.FDeriv -import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Analytic.Linear + +public import Mathlib.Analysis.Calculus.InverseFunctionTheorem.FDeriv +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Analytic.Basic +public import Mathlib.Analysis.Calculus.FDeriv.Analytic /-! # Germs of local biholomorphisms @@ -18,6 +21,8 @@ analytic maps in both directions, carrying `a` to `b`, whose two composites agre with the identity on neighborhoods of the relevant base points. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Analytic/Rank.lean b/LeanPool/LocalComplexGeometry/Analytic/Rank.lean index 18bc2ce7e9..490fb933e1 100644 --- a/LeanPool/LocalComplexGeometry/Analytic/Rank.lean +++ b/LeanPool/LocalComplexGeometry/Analytic/Rank.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Analytic.LocalBiholomorph -import LeanPool.LocalComplexGeometry.Germs.Basic +public import LeanPool.LocalComplexGeometry.Germs.Basic +public import Mathlib.Analysis.Calculus.FDeriv.Defs +public import Mathlib.LinearAlgebra.Dimension.Finrank +import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.LinearAlgebra.Dimension.Constructions -import Mathlib.LinearAlgebra.Dimension.StrongRankCondition -import Mathlib.LinearAlgebra.FiniteDimensional.Basic -import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.PiProd +import Mathlib.LinearAlgebra.FiniteDimensional.Defs +import Mathlib.Tactic.Positivity.Finset /-! # Complex rank in finite-dimensional coordinate spaces @@ -20,6 +22,8 @@ definition for arbitrary `n`, `m`, and `r`; its rank is exactly `r` when `r ≤ n` and `r ≤ m`. -/ +@[expose] public section + namespace LocalComplexGeometry diff --git a/LeanPool/LocalComplexGeometry/Analytic/Regularization.lean b/LeanPool/LocalComplexGeometry/Analytic/Regularization.lean index bb9068af0a..b055de4012 100644 --- a/LeanPool/LocalComplexGeometry/Analytic/Regularization.lean +++ b/LeanPool/LocalComplexGeometry/Analytic/Regularization.lean @@ -3,12 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Germs.Coordinates +public import LeanPool.LocalComplexGeometry.Germs.Coordinates import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.ExactOrder -import Mathlib.Analysis.Analytic.Uniqueness -import Mathlib.Data.Fin.Tuple.Basic -import Mathlib.Topology.Algebra.Module.FiniteDimension /-! # Regularizing a nonzero analytic germ @@ -19,6 +17,8 @@ in the last variable. This is the coordinate-change input required before Weierstrass preparation can be applied in Rückert's arguments. -/ +@[expose] public section + open Filter open scoped ENNReal Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/AnalyticSeries.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/AnalyticSeries.lean index bd8d472fb1..9411cb164f 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/AnalyticSeries.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/AnalyticSeries.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.ExactOrder -import Mathlib.Analysis.Analytic.ChangeOrigin +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Basic import Mathlib.Analysis.Analytic.Uniqueness /-! @@ -17,6 +17,8 @@ series at the ambient origin to Taylor coefficients at the moving centers an analytic function of `z`, with all radii controlled by the original series. -/ +@[expose] public section + namespace ClassicalComplexWPT diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Basic.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Basic.lean index af81c5f079..6658299661 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Basic.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Basic.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import Mathlib.Analysis.Analytic.Constructions -import Mathlib.Analysis.Calculus.IteratedDeriv.Defs -import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.Complex.Basic /-! # Basic definitions for classical complex Weierstrass preparation @@ -16,6 +16,8 @@ definitions used by the proof development. The independently audited public statement remains in `Challenge.lean`. -/ +@[expose] public section + open scoped BigOperators Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/EdgeCases.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/EdgeCases.lean index 1c74dcdd81..750eb69f98 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/EdgeCases.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/EdgeCases.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Basic import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.ExactOrder /-! @@ -13,6 +15,8 @@ The degree-zero case is independent of analytic division: the distinguished polynomial is `1`, so the original analytic germ is the unit. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/ExactOrder.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/ExactOrder.lean index b71948e560..5fd1702394 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/ExactOrder.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/ExactOrder.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Basic -import Mathlib.Analysis.Analytic.Order +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Basic +public import Mathlib.Analysis.Analytic.Order /-! # Exact order in the distinguished variable @@ -15,6 +16,8 @@ properties of the distinguished-variable slice. The deeper comparison with analytic order is developed separately from these edge-case lemmas. -/ +@[expose] public section + open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Examples.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Examples.lean index 91739ebecc..c5d5d79614 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Examples.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Examples.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.EdgeCases +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Basic import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas /-! @@ -15,6 +16,8 @@ monicity, genuine parameter dependence, nonconstant units, and the `n = 0` and `d = 0` semantics of the public interface. -/ +@[expose] public section + open scoped BigOperators Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Germs.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Germs.lean index b36cb4a293..a5bb1512a8 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Germs.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Germs.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Basic -import Mathlib.Order.Filter.Germ.Basic +public import Mathlib.Order.Filter.Germ.Basic +public import Mathlib.Analysis.Analytic.Basic +public import Mathlib.Analysis.Complex.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Elementary facts about analytic function germs @@ -15,6 +18,8 @@ lemmas record the corresponding ring-theoretic unit fact without introducing a separate sheaf or stalk API into the public statement. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/L1Division.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/L1Division.lean index 51e5dba29d..57f4d805ed 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/L1Division.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/L1Division.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedSeries -import Mathlib.Analysis.SpecificLimits.Normed +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedSeries +public import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Analytic.Constructions /-! @@ -16,6 +17,8 @@ and the specialized one-variable quotient and remainder operators used in complex-analytic Weierstrass preparation. -/ +@[expose] public section + open Finset open scoped ENNReal NNReal Topology noncomputable section @@ -251,7 +254,7 @@ private lemma norm_neg_divisionPerturbation_lt_one (d : ℕ) (p : L1Coeff (A × noncomputable def divisionInverse (d : ℕ) (p : L1Coeff (A × ℕ)) (hp : ‖p‖ < 1) : L1Coeff (A × ℕ) →L[ℂ] L1Coeff (A × ℕ) := ↑((Units.oneSub (-(divisionPerturbation d p)) - (norm_neg_divisionPerturbation_lt_one d p hp))⁻¹) + (by exact norm_neg_divisionPerturbation_lt_one d p hp))⁻¹) theorem divisionInverse_right (d : ℕ) (p : L1Coeff (A × ℕ)) (hp : ‖p‖ < 1) (b : L1Coeff (A × ℕ)) : @@ -625,7 +628,7 @@ private lemma norm_neg_seqDivisionPerturbation_lt_one (d : ℕ) (p : L1Coeff ℕ noncomputable def seqDivisionInverse (d : ℕ) (p : L1Coeff ℕ) (hp : ‖p‖ < 1) : L1Coeff ℕ →L[ℂ] L1Coeff ℕ := ↑((Units.oneSub (-(seqDivisionPerturbation d p)) - (norm_neg_seqDivisionPerturbation_lt_one d p hp))⁻¹) + (by exact norm_neg_seqDivisionPerturbation_lt_one d p hp))⁻¹) theorem seqDivisionInverse_right (d : ℕ) (p : L1Coeff ℕ) (hp : ‖p‖ < 1) (b : L1Coeff ℕ) : diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/L1PolynomialEvaluation.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/L1PolynomialEvaluation.lean index 76b033d51a..1a3562bca5 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/L1PolynomialEvaluation.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/L1PolynomialEvaluation.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1PowerSeries -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1Division -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.NormalizedCoefficients +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1PowerSeries +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1Division +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.NormalizedCoefficients /-! # Evaluation of finite-support `ℓ¹` coefficient sequences @@ -15,6 +16,8 @@ These lemmas translate the normalized sequence factorization into the monic polynomial identity used by the public preparation witness. -/ +@[expose] public section + open Finset open scoped ENNReal NNReal Topology noncomputable section diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/L1PowerSeries.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/L1PowerSeries.lean index 258de6267e..16334678b6 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/L1PowerSeries.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/L1PowerSeries.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedSeries +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedSeries +public import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Analytic.Constructions /-! @@ -17,6 +19,8 @@ zero. The proof packages the coordinate evaluations into an operator-valued formal multilinear series with radius at least one. -/ +@[expose] public section + open scoped ENNReal NNReal Topology noncomputable section diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Main.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Main.lean index 44991138a1..3a52c47602 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Main.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/Main.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Basic import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.PreparationUniqueness import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.PublicExistence @@ -14,6 +16,8 @@ This module assembles the general analytic existence construction and its full germ uniqueness theorem into the exact independently frozen public result. -/ +@[expose] public section + open Filter open scoped BigOperators Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/NormalSum.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/NormalSum.lean index bd97c037a2..31d691ae36 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/NormalSum.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/NormalSum.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import Mathlib.Analysis.Analytic.ChangeOrigin -import Mathlib.Analysis.Normed.Ring.InfiniteSum +public import Mathlib.Analysis.Analytic.Basic /-! # Normally convergent families of formal multilinear series @@ -16,6 +16,8 @@ with one common positive-radius majorant lets us exchange the family sum and the homogeneous-degree sum and produces a `HasFPowerSeriesOnBall` witness. -/ +@[expose] public section + open Filter open scoped ENNReal NNReal Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/NormalizedCoefficients.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/NormalizedCoefficients.lean index 9349b12702..97f340da2b 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/NormalizedCoefficients.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/NormalizedCoefficients.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.AnalyticSeries -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.ExactOrder -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedSeries -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedCoefficientMap +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedSeries +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedCoefficientMap /-! # Normalized weighted coefficient sequences @@ -18,6 +17,8 @@ degree-`d` monomial in the ordinary complex `ℓ¹` norm. This is the Archimedean tail-scaling estimate needed by the Banach-algebra proof. -/ +@[expose] public section + open Filter open scoped BigOperators ENNReal NNReal Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/PreparationSequences.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/PreparationSequences.lean index 2a627016a6..231e283531 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/PreparationSequences.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/PreparationSequences.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1Division -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.NormalizedCoefficients +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1Division +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.NormalizedCoefficients /-! # Analytic quotient and remainder coefficient sequences @@ -17,6 +18,8 @@ forces the remainder to vanish and the quotient to have constant coefficient one. -/ +@[expose] public section + open Filter open scoped ENNReal NNReal Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/PreparationUniqueness.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/PreparationUniqueness.lean index fa20bd6438..08abf32c2b 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/PreparationUniqueness.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/PreparationUniqueness.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1Division -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1PowerSeries -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Basic +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1Division +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1PowerSeries +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.NormalizedCoefficients import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1PolynomialEvaluation import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.PreparationSequences import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedGermEvaluation @@ -32,6 +33,8 @@ Since both remainders are supported in degrees below `d`, uniqueness of division identifies both the quotient and the remainder. -/ +@[expose] public section + open Filter open scoped ENNReal NNReal Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/PublicExistence.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/PublicExistence.lean index 5b4ec78983..4c4e1b5972 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/PublicExistence.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/PublicExistence.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.PreparationSequences -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedEvaluation +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.PreparationSequences +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1PowerSeries import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1PolynomialEvaluation import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedGermEvaluation @@ -17,6 +18,8 @@ from the normalized `ℓ¹(ℕ)` quotient/remainder supplied by `PreparationSequences`. -/ +@[expose] public section + open Filter open scoped BigOperators ENNReal NNReal Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedCoefficientMap.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedCoefficientMap.lean index aa2ccc0319..ad159d3095 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedCoefficientMap.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedCoefficientMap.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.AnalyticSeries -import Mathlib.Analysis.Normed.Lp.lpSpace +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.AnalyticSeries +public import Mathlib.Analysis.Normed.Lp.lpSpace /-! # Analytic maps into a weighted coefficient space @@ -22,6 +23,8 @@ ultrametric multiplication estimates for restricted or Gauss-norm power series. -/ +@[expose] public section + open scoped NNReal ENNReal Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedEvaluation.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedEvaluation.lean index ac12c230ff..be3d0f9ff8 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedEvaluation.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedEvaluation.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedCoefficientMap -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1PowerSeries +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedCoefficientMap +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1PowerSeries /-! # Reconstruction from weighted `ℓ¹` coefficients @@ -16,6 +17,8 @@ change-of-origin expansion converges. A second theorem identifies the result with any function represented by that series on a ball. -/ +@[expose] public section + open scoped ENNReal NNReal Topology noncomputable section diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedGermEvaluation.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedGermEvaluation.lean index c82126cb56..c594948a6a 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedGermEvaluation.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedGermEvaluation.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1PowerSeries +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedCoefficientMap import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedEvaluation /-! @@ -14,6 +17,8 @@ This file packages their simultaneous neighborhood shrinking into the germ identity needed by preparation and uniqueness. -/ +@[expose] public section + open Filter open scoped ENNReal NNReal Topology diff --git a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedSeries.lean b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedSeries.lean index b730846c50..852aaf4568 100644 --- a/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedSeries.lean +++ b/LeanPool/LocalComplexGeometry/ClassicalComplexWPT/WeightedSeries.lean @@ -3,12 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import Mathlib.Analysis.Normed.Lp.lpSpace -import Mathlib.Analysis.Normed.Operator.NormedSpace -import Mathlib.Analysis.Normed.Ring.InfiniteSum -import Mathlib.Data.Finsupp.Antidiagonal -import Mathlib.Data.Finsupp.Weight +public import Mathlib.Analysis.Normed.Lp.lpSpace +public import Mathlib.Analysis.Normed.Operator.Basic /-! # Weighted `ℓ¹` coefficient infrastructure @@ -19,6 +17,8 @@ high shifts and low cuts have operator norm at most one, and evaluation on the unit polydisc is bounded by the `ℓ¹` norm. -/ +@[expose] public section + open Finset open scoped ENNReal NNReal Topology diff --git a/LeanPool/LocalComplexGeometry/FiniteProjection/Main.lean b/LeanPool/LocalComplexGeometry/FiniteProjection/Main.lean index cfb7236fcd..b3a60f0f1d 100644 --- a/LeanPool/LocalComplexGeometry/FiniteProjection/Main.lean +++ b/LeanPool/LocalComplexGeometry/FiniteProjection/Main.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module +public import LeanPool.LocalComplexGeometry.Geometry.FiniteProjection +public import LeanPool.LocalComplexGeometry.WPTBridge.GermDivision import LeanPool.LocalComplexGeometry.FiniteProjection.PreparedQuotient -import LeanPool.LocalComplexGeometry.Geometry.FiniteProjection +import LeanPool.LocalComplexGeometry.WPTBridge.Preparation import LeanPool.LocalComplexGeometry.WPTBridge.PreparedAssociate -import Mathlib.RingTheory.Ideal.Quotient.Operations +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Finite projection for analytic hypersurface germs @@ -16,6 +20,8 @@ This module exposes the frozen algebraic predicate and combines the prepared quotient power basis with the genuine local proper finite-projection theorem. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/FiniteProjection/PreparedQuotient.lean b/LeanPool/LocalComplexGeometry/FiniteProjection/PreparedQuotient.lean index 3a04a52c29..8dde88102b 100644 --- a/LeanPool/LocalComplexGeometry/FiniteProjection/PreparedQuotient.lean +++ b/LeanPool/LocalComplexGeometry/FiniteProjection/PreparedQuotient.lean @@ -3,12 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.WPTBridge.GermDivision -import Mathlib.LinearAlgebra.Isomorphisms -import Mathlib.LinearAlgebra.Quotient.Basic -import Mathlib.LinearAlgebra.StdBasis -import Mathlib.RingTheory.Ideal.Quotient.Operations +public import LeanPool.LocalComplexGeometry.WPTBridge.GermDivision +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal /-! # The finite-free quotient by a prepared polynomial @@ -19,6 +17,8 @@ Transporting the standard function-space basis gives the classes of `1, w, ..., w^(d-1)`. -/ +@[expose] public section + open scoped BigOperators namespace LocalComplexGeometry.WPTBridge diff --git a/LeanPool/LocalComplexGeometry/Geometry/FiniteProjection.lean b/LeanPool/LocalComplexGeometry/Geometry/FiniteProjection.lean index 24f9140fd4..6016d55314 100644 --- a/LeanPool/LocalComplexGeometry/Geometry/FiniteProjection.lean +++ b/LeanPool/LocalComplexGeometry/Geometry/FiniteProjection.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Germs.Coordinates +public import LeanPool.LocalComplexGeometry.Germs.Coordinates +public import Mathlib.Analysis.InnerProductSpace.Basic import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Main import Mathlib.Analysis.Complex.Polynomial.Basic -import Mathlib.Topology.MetricSpace.ProperSpace -import Mathlib.Topology.Maps.Proper.CompactlyGenerated /-! # Geometric finite projection of a prepared hypersurface @@ -18,6 +18,8 @@ preparation. The source is the actual zero locus in an open vertical tube, and properness is asserted over the open base neighborhood itself. -/ +@[expose] public section + open Filter open scoped BigOperators Topology diff --git a/LeanPool/LocalComplexGeometry/Germs/Basic.lean b/LeanPool/LocalComplexGeometry/Germs/Basic.lean index 73ca69bf26..f02a68cd2d 100644 --- a/LeanPool/LocalComplexGeometry/Germs/Basic.lean +++ b/LeanPool/LocalComplexGeometry/Germs/Basic.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Germs -import Mathlib.Topology.Germ +public import Mathlib.Topology.Germ +public import Mathlib.Analysis.Analytic.Basic +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.RingTheory.LocalRing.MaximalIdeal.Defs +public import Mathlib.Analysis.Analytic.Constructions import Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Holomorphic function germs at the origin @@ -17,6 +22,8 @@ the same `Filter.Germ` model and `AnalyticAt` predicate as the pinned WPT project. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Germs/Coordinates.lean b/LeanPool/LocalComplexGeometry/Germs/Coordinates.lean index 1a07282f97..efda4ea044 100644 --- a/LeanPool/LocalComplexGeometry/Germs/Coordinates.lean +++ b/LeanPool/LocalComplexGeometry/Germs/Coordinates.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Germs.Basic -import Mathlib.Topology.Algebra.Module.FiniteDimension +public import LeanPool.LocalComplexGeometry.Germs.Basic +public import Mathlib.Topology.Algebra.Module.FiniteDimension +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Basic /-! # Coordinates and pullback for holomorphic germs @@ -16,6 +18,8 @@ contravariant pullback homomorphisms on holomorphic germs, the inclusion of lower-dimensional base germs, and the resulting algebra structure. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Germs/Representatives.lean b/LeanPool/LocalComplexGeometry/Germs/Representatives.lean index f2d636801f..00e8483408 100644 --- a/LeanPool/LocalComplexGeometry/Germs/Representatives.lean +++ b/LeanPool/LocalComplexGeometry/Germs/Representatives.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Germs.Basic +public import LeanPool.LocalComplexGeometry.Germs.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Canonical chosen analytic representatives @@ -15,6 +17,8 @@ representative for each germ and retain the theorem identifying its raw function germ. -/ +@[expose] public section + namespace LocalComplexGeometry diff --git a/LeanPool/LocalComplexGeometry/Germs/Ring.lean b/LeanPool/LocalComplexGeometry/Germs/Ring.lean index 1dc8e96879..02ddab5d9f 100644 --- a/LeanPool/LocalComplexGeometry/Germs/Ring.lean +++ b/LeanPool/LocalComplexGeometry/Germs/Ring.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Germs.Basic -import Mathlib.RingTheory.Ideal.Quotient.Operations +public import LeanPool.LocalComplexGeometry.Germs.Basic +public import Mathlib.RingTheory.Ideal.Quotient.Operations +public import Mathlib.Analysis.Analytic.Constructions +public import Mathlib.RingTheory.Noetherian.Defs import Mathlib.RingTheory.Noetherian.Basic import Mathlib.RingTheory.PrincipalIdealDomain +import Mathlib.Tactic.Positivity.Finset /-! # Constant germs and the residue field @@ -16,6 +20,8 @@ This file packages the constant inclusion, identifies the residue field with `ℂ`, and supplies the zero-dimensional base case used by Rückert induction. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Noetherian/Ruckert.lean b/LeanPool/LocalComplexGeometry/Noetherian/Ruckert.lean index 608ecccb0d..5723bda5d2 100644 --- a/LeanPool/LocalComplexGeometry/Noetherian/Ruckert.lean +++ b/LeanPool/LocalComplexGeometry/Noetherian/Ruckert.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module +public import LeanPool.LocalComplexGeometry.Germs.Basic +public import Mathlib.RingTheory.Noetherian.Defs import LeanPool.LocalComplexGeometry.Algebra.NoetherianByRemainder import LeanPool.LocalComplexGeometry.Germs.Ring +import LeanPool.LocalComplexGeometry.WPTBridge.Preparation import LeanPool.LocalComplexGeometry.WPTBridge.PreparedAssociate +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.RingTheory.Finiteness.Ideal /-! @@ -18,6 +23,8 @@ an associated distinguished polynomial, and Weierstrass division maps the ideal into a finite lower-dimensional remainder module. -/ +@[expose] public section + namespace LocalComplexGeometry diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/Coordinates.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/Coordinates.lean index b995cc519a..df942620e5 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/Coordinates.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/Coordinates.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Germs.Coordinates -import LeanPool.LocalComplexGeometry.Noetherian.Ruckert -import LeanPool.LocalComplexGeometry.Nullstellensatz.ZeroSetGerms +public import LeanPool.LocalComplexGeometry.Germs.Coordinates +public import LeanPool.LocalComplexGeometry.Noetherian.Ruckert +public import LeanPool.LocalComplexGeometry.Nullstellensatz.ZeroSetGerms +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal /-! # Coordinate pullback of local set germs @@ -16,6 +18,8 @@ coordinates. This file records that invariance at the predicate-germ level, without evaluating abstract function germs away from the origin. -/ +@[expose] public section + open Filter open scoped Topology @@ -36,7 +40,7 @@ private theorem continuousLinearMap_tendsto_zero {n m : ℕ} def localSetGermPullback {n m : ℕ} (L : ComplexEuclidean n →L[ℂ] ComplexEuclidean m) : LocalSetGerm m → LocalSetGerm n := - fun Z ↦ Z.compTendsto L (continuousLinearMap_tendsto_zero L) + fun Z ↦ Z.compTendsto L (private_decl% (continuousLinearMap_tendsto_zero L)) @[simp] theorem localSetGermPullback_top {n m : ℕ} @@ -64,7 +68,7 @@ theorem localSetGermPullback_mono {n m : ℕ} ((P ∘ L : ComplexEuclidean n → Prop) : LocalSetGerm n) ≤ ((Q ∘ L : ComplexEuclidean n → Prop) : LocalSetGerm n) rw [Filter.Germ.coe_le] - exact (continuousLinearMap_tendsto_zero L).eventually hPQ + exact (private_decl% (continuousLinearMap_tendsto_zero L)).eventually hPQ @[simp] theorem localSetGermPullback_zeroLocus {n m : ℕ} diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/DivisibilitySpecialization.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/DivisibilitySpecialization.lean index 73e4b6ce79..2dc1eb8ce5 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/DivisibilitySpecialization.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/DivisibilitySpecialization.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Nullstellensatz.GenericFiber -import LeanPool.LocalComplexGeometry.Nullstellensatz.PolynomialFibers -import LeanPool.LocalComplexGeometry.Nullstellensatz.QuotientPolynomialSpecialization -import LeanPool.LocalComplexGeometry.Noetherian.Ruckert +public import LeanPool.LocalComplexGeometry.Nullstellensatz.GenericFiber +public import LeanPool.LocalComplexGeometry.Nullstellensatz.PolynomialFibers +public import LeanPool.LocalComplexGeometry.Nullstellensatz.QuotientPolynomialSpecialization +public import LeanPool.LocalComplexGeometry.Noetherian.Ruckert +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Specializing denominator-cleared generic divisibility @@ -19,6 +22,8 @@ denominator, every root of the lifted minimal polynomial is therefore a root of the certified divisible polynomial. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/DivisionRepresentatives.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/DivisionRepresentatives.lean index de9b55b36e..f8c8f688b4 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/DivisionRepresentatives.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/DivisionRepresentatives.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Germs.Representatives +public import LeanPool.LocalComplexGeometry.Germs.Representatives +public import LeanPool.LocalComplexGeometry.WPTBridge.GermDivision +public import LeanPool.LocalComplexGeometry.Geometry.FiniteProjection import LeanPool.LocalComplexGeometry.Nullstellensatz.PreparedRootLocality -import LeanPool.LocalComplexGeometry.WPTBridge.GermDivision +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Representatives of canonical Weierstrass division @@ -17,6 +21,8 @@ prepared-root locality then specializes it simultaneously at every root of a nearby prepared fiber. -/ +@[expose] public section + open Filter open scoped BigOperators Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/FiberCancellation.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/FiberCancellation.lean index e558d9f8bc..c02778df32 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/FiberCancellation.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/FiberCancellation.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Nullstellensatz.PolynomialFibers -import LeanPool.LocalComplexGeometry.Nullstellensatz.ZeroSetGerms +public import LeanPool.LocalComplexGeometry.Nullstellensatz.PolynomialFibers +public import LeanPool.LocalComplexGeometry.Nullstellensatz.ZeroSetGerms +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Removing the exceptional fibers @@ -17,6 +20,8 @@ the good locus, so multiplying by the bad factor extends the conclusion over the exceptional locus as well. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/GenericFiber.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/GenericFiber.lean index d2e3ed2a78..2d5a3d2978 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/GenericFiber.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/GenericFiber.lean @@ -3,17 +3,13 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.FiniteProjection.PreparedQuotient -import LeanPool.LocalComplexGeometry.Germs.Ring -import Mathlib.Algebra.CharP.Algebra -import Mathlib.FieldTheory.Perfect -import Mathlib.LinearAlgebra.Dimension.Localization -import Mathlib.RingTheory.Algebraic.Integral -import Mathlib.RingTheory.Finiteness.Quotient -import Mathlib.RingTheory.IntegralClosure.Algebra.Basic -import Mathlib.RingTheory.Localization.Integral -import Mathlib.RingTheory.Polynomial.Resultant.Basic +public import LeanPool.LocalComplexGeometry.FiniteProjection.PreparedQuotient +public import LeanPool.LocalComplexGeometry.Germs.Ring +public import Mathlib.RingTheory.Polynomial.Resultant.Basic +public import Mathlib.FieldTheory.Separable +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal /-! # The generic fibre of a prepared prime quotient @@ -27,6 +23,8 @@ minimal polynomial. The last section clears all coefficients of that minimal polynomial back to the contracted quotient. -/ +@[expose] public section + namespace LocalComplexGeometry @@ -364,6 +362,18 @@ theorem aeval_contractedPreparedPolynomial {d : ℕ} aeval_preparedGermPolynomial] simp only [Ideal.Quotient.mkₐ_eq_mk] +private theorem aeval_genericPolynomialMap + (p : Polynomial (ContractedGermQuotient P)) : + Polynomial.aeval (genericLastCoordinate P) + (p.map (algebraMap (ContractedGermQuotient P) (ContractedFractionField P))) = + algebraMap (AmbientGermQuotient P) (AmbientFractionField P) + (Polynomial.aeval (lastCoordinateQuotientClass P) p) := by + rw [Polynomial.aeval_map_algebraMap] + change Polynomial.aeval + (algebraMap (AmbientGermQuotient P) (AmbientFractionField P) + (lastCoordinateQuotientClass P)) p = _ + rw [Polynomial.aeval_algebraMap_apply] + @[simp] theorem aeval_genericRemainderPolynomial {d : ℕ} (r : Fin d → HolomorphicGerm n) : @@ -371,12 +381,7 @@ theorem aeval_genericRemainderPolynomial {d : ℕ} (genericRemainderPolynomial P r) = algebraMap (AmbientGermQuotient P) (AmbientFractionField P) (Ideal.Quotient.mk P (WPTBridge.remainderPolynomialGerm r)) := by - rw [genericRemainderPolynomial, Polynomial.aeval_map_algebraMap] - change Polynomial.aeval - (algebraMap (AmbientGermQuotient P) (AmbientFractionField P) - (lastCoordinateQuotientClass P)) - (contractedRemainderPolynomial P r) = _ - rw [Polynomial.aeval_algebraMap_apply, + rw [genericRemainderPolynomial, aeval_genericPolynomialMap, aeval_contractedRemainderPolynomial] @[simp] @@ -387,12 +392,7 @@ theorem aeval_genericPreparedPolynomial {d : ℕ} (genericPreparedPolynomial P a ha) = algebraMap (AmbientGermQuotient P) (AmbientFractionField P) (Ideal.Quotient.mk P (WPTBridge.preparedPolynomialGerm a ha)) := by - rw [genericPreparedPolynomial, Polynomial.aeval_map_algebraMap] - change Polynomial.aeval - (algebraMap (AmbientGermQuotient P) (AmbientFractionField P) - (lastCoordinateQuotientClass P)) - (contractedPreparedPolynomial P a ha) = _ - rw [Polynomial.aeval_algebraMap_apply, + rw [genericPreparedPolynomial, aeval_genericPolynomialMap, aeval_contractedPreparedPolynomial] /-- The prepared polynomial annihilates the generic last-coordinate class. -/ @@ -448,7 +448,7 @@ theorem mem_prime_iff_genericRemainder_aeval_eq_zero {d : ℕ} apply Ideal.Quotient.eq_zero_iff_mem.mp apply IsFractionRing.injective (AmbientGermQuotient P) (AmbientFractionField P) - simpa using hh + simpa only [map_zero] using hh /-- The two fraction fields form a finite-dimensional extension whenever `P` contains the prepared monic equation. -/ diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/IdealRepresentatives.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/IdealRepresentatives.lean index cf2b9e28b0..2d0ea09187 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/IdealRepresentatives.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/IdealRepresentatives.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Germs.Representatives -import LeanPool.LocalComplexGeometry.Nullstellensatz.ZeroSetGerms +public import LeanPool.LocalComplexGeometry.Germs.Representatives +public import LeanPool.LocalComplexGeometry.Nullstellensatz.ZeroSetGerms +public import Mathlib.RingTheory.Ideal.Quotient.Defs +import Mathlib.Tactic.Positivity.Finset /-! # Representatives of a finite ideal generating family @@ -15,6 +18,8 @@ file chooses analytic representatives of those generators and records the exact pointwise predicate representing the ideal's local zero-set germ. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/Main.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/Main.lean index ff4a7b97c7..09effd2932 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/Main.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/Main.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module +public import LeanPool.LocalComplexGeometry.Noetherian.Ruckert +public import LeanPool.LocalComplexGeometry.Nullstellensatz.ZeroSetGerms +public import Mathlib.Analysis.InnerProductSpace.Basic import LeanPool.LocalComplexGeometry.Nullstellensatz.PreparedPrime -import LeanPool.LocalComplexGeometry.Nullstellensatz.RadicalReduction +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Rückert's local analytic Nullstellensatz @@ -15,6 +20,8 @@ dimension. This module exposes its unconditional ideal-theoretic and representative-level consequences. -/ +@[expose] public section + open Filter open scoped BigOperators Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/MinpolyResultant.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/MinpolyResultant.lean index d77a6966a8..475a157419 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/MinpolyResultant.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/MinpolyResultant.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Nullstellensatz.GenericFiber -import LeanPool.LocalComplexGeometry.Nullstellensatz.QuotientPolynomialSpecialization -import LeanPool.LocalComplexGeometry.Nullstellensatz.ResultantSpecialization -import LeanPool.LocalComplexGeometry.Germs.Representatives +public import LeanPool.LocalComplexGeometry.Nullstellensatz.GenericFiber +public import LeanPool.LocalComplexGeometry.Nullstellensatz.QuotientPolynomialSpecialization +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # A nonvanishing resultant for the cleared generic minimal polynomial @@ -19,6 +20,8 @@ away from one analytic exceptional factor, its complex specializations keep their generic degree and have only simple roots. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/OneVariable.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/OneVariable.lean index 655188a962..4538e4e30f 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/OneVariable.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/OneVariable.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Germs.Coordinates -import Mathlib.Analysis.Analytic.Order -import Mathlib.Order.Filter.Finite +public import LeanPool.LocalComplexGeometry.Germs.Basic +public import Mathlib.Topology.Algebra.Module.FiniteDimension +import Mathlib.Analysis.Analytic.IsolatedZeros /-! # The local analytic Nullstellensatz in one complex variable @@ -19,6 +20,8 @@ all generators are zero germs, the common-zero hypothesis forces the target to be the zero germ. -/ +@[expose] public section + open Filter open scoped BigOperators Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/PolynomialFibers.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/PolynomialFibers.lean index 6707cd5c52..da6115a044 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/PolynomialFibers.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/PolynomialFibers.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Geometry.FiniteProjection -import Mathlib.FieldTheory.Separable +public import LeanPool.LocalComplexGeometry.Geometry.FiniteProjection +public import Mathlib.FieldTheory.Separable +import Mathlib.Analysis.Complex.Polynomial.Basic /-! # Polynomial rigidity on simple finite fibers @@ -17,6 +19,8 @@ This file packages that fact for the coefficient-vector convention used by Weierstrass division. -/ +@[expose] public section + open scoped BigOperators diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/PolynomialRepresentativeOperations.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/PolynomialRepresentativeOperations.lean index a0260895bc..7702f0ae4c 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/PolynomialRepresentativeOperations.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/PolynomialRepresentativeOperations.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Nullstellensatz.GenericFiber -import LeanPool.LocalComplexGeometry.Nullstellensatz.PolynomialFibers -import LeanPool.LocalComplexGeometry.Nullstellensatz.QuotientPolynomialSpecialization +public import LeanPool.LocalComplexGeometry.Nullstellensatz.GenericFiber +public import LeanPool.LocalComplexGeometry.Nullstellensatz.PolynomialFibers +public import LeanPool.LocalComplexGeometry.Nullstellensatz.QuotientPolynomialSpecialization +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Concrete polynomial representatives @@ -16,6 +19,8 @@ polynomial shapes occurring in Weierstrass division and records independence of an inessential larger degree bound. -/ +@[expose] public section + open Filter open scoped BigOperators Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/PolynomialSpecialization.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/PolynomialSpecialization.lean index 1e67435212..16e2b34d4f 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/PolynomialSpecialization.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/PolynomialSpecialization.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Germs.Representatives +public import LeanPool.LocalComplexGeometry.Germs.Basic +public import Mathlib.Algebra.Polynomial.Eval.Defs import Mathlib.Algebra.Polynomial.Eval.Coeff -import Mathlib.Order.Filter.Finite +import Mathlib.Tactic.Positivity.Finset /-! # Specializing polynomial identities of function germs @@ -18,6 +20,8 @@ neighborhood. This is the finite-uniformity step needed when cleared generic fiber identities are specialized over the analytic base. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/PreparedPrime.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/PreparedPrime.lean index 8e1854147f..2315324a0d 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/PreparedPrime.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/PreparedPrime.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Nullstellensatz.PreparedPrimeCore +public import LeanPool.LocalComplexGeometry.Nullstellensatz.PreparedPrimeCore +public import LeanPool.LocalComplexGeometry.Nullstellensatz.DivisionRepresentatives +public import LeanPool.LocalComplexGeometry.Nullstellensatz.PolynomialRepresentativeOperations +public import LeanPool.LocalComplexGeometry.Nullstellensatz.PrimeInduction +public import LeanPool.LocalComplexGeometry.Nullstellensatz.DivisibilitySpecialization +public import LeanPool.LocalComplexGeometry.Nullstellensatz.MinpolyResultant +import LeanPool.LocalComplexGeometry.Nullstellensatz.PrimeBase +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Construction of the prepared-prime certificate @@ -13,6 +22,8 @@ This file constructs the finite pointwise certificate from generic-fibre data and closes the prepared-prime induction step. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/PreparedPrimeCore.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/PreparedPrimeCore.lean index ab673d4393..8946387584 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/PreparedPrimeCore.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/PreparedPrimeCore.lean @@ -3,18 +3,17 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Nullstellensatz.GenericFiber -import LeanPool.LocalComplexGeometry.Nullstellensatz.DivisibilitySpecialization -import LeanPool.LocalComplexGeometry.Nullstellensatz.DivisionRepresentatives -import LeanPool.LocalComplexGeometry.Nullstellensatz.MinpolyResultant -import LeanPool.LocalComplexGeometry.Nullstellensatz.PolynomialFibers -import LeanPool.LocalComplexGeometry.Nullstellensatz.PolynomialRepresentativeOperations -import LeanPool.LocalComplexGeometry.Nullstellensatz.PrimeCancellation -import LeanPool.LocalComplexGeometry.Nullstellensatz.PrimeInduction +public import LeanPool.LocalComplexGeometry.Nullstellensatz.GenericFiber +public import LeanPool.LocalComplexGeometry.Nullstellensatz.PolynomialFibers +public import LeanPool.LocalComplexGeometry.Nullstellensatz.ResultantSpecialization +public import LeanPool.LocalComplexGeometry.Germs.Representatives +public import LeanPool.LocalComplexGeometry.Nullstellensatz.RadicalReduction import LeanPool.LocalComplexGeometry.Nullstellensatz.PreparedRootLocality -import LeanPool.LocalComplexGeometry.Nullstellensatz.ResultantSpecialization -import LeanPool.LocalComplexGeometry.Nullstellensatz.PolynomialSpecialization +import LeanPool.LocalComplexGeometry.Nullstellensatz.PrimeCancellation +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The prepared-prime geometric step @@ -25,6 +24,8 @@ finite pointwise information used by the geometric argument. Its fields are later furnished by denominator-cleared minimal-polynomial identities. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/PreparedRootLocality.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/PreparedRootLocality.lean index 9a2b7d35cb..a4ad8af4d6 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/PreparedRootLocality.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/PreparedRootLocality.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Geometry.FiniteProjection +public import LeanPool.LocalComplexGeometry.Geometry.FiniteProjection +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Uniform locality of prepared roots @@ -15,6 +18,8 @@ bridge which allows ambient germ identities to be applied simultaneously to every root of a nearby specialized fiber. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/PrimeBase.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/PrimeBase.lean index 37c9d2ac15..05512df016 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/PrimeBase.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/PrimeBase.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module +public import LeanPool.LocalComplexGeometry.Nullstellensatz.RadicalReduction import LeanPool.LocalComplexGeometry.Germs.Ring -import LeanPool.LocalComplexGeometry.Nullstellensatz.RadicalReduction +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # The zero-dimensional prime case @@ -15,6 +20,8 @@ germ ring there is canonically `ℂ`, so its only prime ideal is zero; the zero ideal has the full neighborhood as its zero-set germ. -/ +@[expose] public section + namespace LocalComplexGeometry diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/PrimeCancellation.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/PrimeCancellation.lean index 39f8ee0b27..dbd1a46ceb 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/PrimeCancellation.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/PrimeCancellation.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Nullstellensatz.RadicalReduction +public import LeanPool.LocalComplexGeometry.Nullstellensatz.RadicalReduction +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Cancellation on a prime analytic zero set @@ -15,6 +20,8 @@ the lower-dimensional prime theorem puts the product in the prime, and primality cancels `D`. -/ +@[expose] public section + namespace LocalComplexGeometry diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/PrimeInduction.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/PrimeInduction.lean index 7b23afd5b6..950a993d62 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/PrimeInduction.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/PrimeInduction.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module +public import LeanPool.LocalComplexGeometry.Nullstellensatz.RadicalReduction +public import LeanPool.LocalComplexGeometry.WPTBridge.GermDivision import LeanPool.LocalComplexGeometry.Nullstellensatz.Coordinates import LeanPool.LocalComplexGeometry.Nullstellensatz.PrimeBase +import LeanPool.LocalComplexGeometry.WPTBridge.Preparation import LeanPool.LocalComplexGeometry.WPTBridge.PreparedAssociate +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal /-! # Reduction of the prime theorem to prepared coordinates @@ -18,6 +23,8 @@ polynomial. Coordinate invariance then reduces the prime zero-set theorem to the prepared-prime step isolated below. -/ +@[expose] public section + namespace LocalComplexGeometry diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/QuotientPolynomialSpecialization.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/QuotientPolynomialSpecialization.lean index 33a3840065..ef88a4fe49 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/QuotientPolynomialSpecialization.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/QuotientPolynomialSpecialization.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Nullstellensatz.IdealRepresentatives -import LeanPool.LocalComplexGeometry.Nullstellensatz.PolynomialSpecialization -import LeanPool.LocalComplexGeometry.Nullstellensatz.ResultantSpecialization +public import LeanPool.LocalComplexGeometry.Nullstellensatz.IdealRepresentatives +public import LeanPool.LocalComplexGeometry.Nullstellensatz.PolynomialSpecialization +public import LeanPool.LocalComplexGeometry.Nullstellensatz.ResultantSpecialization +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Specializing polynomial identities modulo an analytic ideal @@ -17,6 +20,8 @@ fixed-degree family of chosen representatives therefore specializes to equal complex polynomials on the ideal's local zero set, on one common neighborhood. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/RadicalReduction.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/RadicalReduction.lean index d63b7624fa..dc6cda70fd 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/RadicalReduction.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/RadicalReduction.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Noetherian.Ruckert -import LeanPool.LocalComplexGeometry.Nullstellensatz.ZeroSetGerms +public import LeanPool.LocalComplexGeometry.Noetherian.Ruckert +public import LeanPool.LocalComplexGeometry.Nullstellensatz.ZeroSetGerms +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init import Mathlib.RingTheory.Ideal.MinimalPrime.Basic +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Reduction of the analytic Nullstellensatz to prime ideals @@ -17,6 +22,8 @@ for the radical theorem, the finite-family representative-level theorem, and the arbitrary-ideal zero-set equality. -/ +@[expose] public section + open Filter open scoped BigOperators Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/ResultantSpecialization.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/ResultantSpecialization.lean index 79979b18ff..558b2e4f5d 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/ResultantSpecialization.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/ResultantSpecialization.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Geometry.FiniteProjection -import Mathlib.FieldTheory.Separable -import Mathlib.RingTheory.Polynomial.Resultant.Basic +public import LeanPool.LocalComplexGeometry.Geometry.FiniteProjection +public import Mathlib.FieldTheory.Separable +public import Mathlib.RingTheory.Polynomial.Resultant.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Specializing fixed-degree resultants @@ -17,6 +20,8 @@ are part of every definition, so specialization remains valid even when a fiber drops degree. -/ +@[expose] public section + open Filter open scoped BigOperators Topology diff --git a/LeanPool/LocalComplexGeometry/Nullstellensatz/ZeroSetGerms.lean b/LeanPool/LocalComplexGeometry/Nullstellensatz/ZeroSetGerms.lean index 1e5b2da9b4..1c7cf90a0d 100644 --- a/LeanPool/LocalComplexGeometry/Nullstellensatz/ZeroSetGerms.lean +++ b/LeanPool/LocalComplexGeometry/Nullstellensatz/ZeroSetGerms.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Germs.Basic -import Mathlib.RingTheory.Noetherian.Basic +public import LeanPool.LocalComplexGeometry.Germs.Basic +public import Mathlib.RingTheory.Noetherian.Defs +import Mathlib.Tactic.Positivity.Finset /-! # Local zero-set germs and vanishing ideals @@ -15,6 +17,8 @@ function germ at points away from the base point. Only finite intersections are used; arbitrary intersections would not have a uniform neighborhood. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/Palomar.lean b/LeanPool/LocalComplexGeometry/Palomar.lean index 9ea504d2d8..6f8f81908a 100644 --- a/LeanPool/LocalComplexGeometry/Palomar.lean +++ b/LeanPool/LocalComplexGeometry/Palomar.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module +public import LeanPool.LocalComplexGeometry.Geometry.FiniteProjection import LeanPool.LocalComplexGeometry.Analytic.ConstantRank import LeanPool.LocalComplexGeometry.FiniteProjection.Main -import LeanPool.LocalComplexGeometry.Noetherian.Ruckert import LeanPool.LocalComplexGeometry.Nullstellensatz.Main +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Palomar-facing theorem surface @@ -18,6 +21,8 @@ coordinate, quotient-basis, and local-biholomorphism structures remain in the proof development and are eliminated from the public statement surface. -/ +@[expose] public section + open Filter open scoped BigOperators Topology diff --git a/LeanPool/LocalComplexGeometry/WPTBridge/Division.lean b/LeanPool/LocalComplexGeometry/WPTBridge/Division.lean index 243e433c6e..57b844b171 100644 --- a/LeanPool/LocalComplexGeometry/WPTBridge/Division.lean +++ b/LeanPool/LocalComplexGeometry/WPTBridge/Division.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.WPTBridge.DivisionCore +public import LeanPool.LocalComplexGeometry.WPTBridge.DivisionCore +import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1PolynomialEvaluation +import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.PreparationSequences +import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedGermEvaluation /-! # Analytic Weierstrass division @@ -13,6 +17,8 @@ This file reconstructs function-level analytic quotients and polynomial remainders from the sequence-level division operators. -/ +@[expose] public section + open Filter open scoped BigOperators ENNReal NNReal Topology diff --git a/LeanPool/LocalComplexGeometry/WPTBridge/DivisionCore.lean b/LeanPool/LocalComplexGeometry/WPTBridge/DivisionCore.lean index 6c550e34aa..306279d812 100644 --- a/LeanPool/LocalComplexGeometry/WPTBridge/DivisionCore.lean +++ b/LeanPool/LocalComplexGeometry/WPTBridge/DivisionCore.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.PreparationUniqueness +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.PreparationUniqueness /-! # Sequence-level Weierstrass division bridge @@ -13,6 +14,8 @@ This file packages the analytic quotient and remainder sequence operators for prepared divisors so the local complex-geometry development can reuse them. -/ +@[expose] public section + open Filter open scoped ENNReal NNReal Topology diff --git a/LeanPool/LocalComplexGeometry/WPTBridge/DivisionUniqueness.lean b/LeanPool/LocalComplexGeometry/WPTBridge/DivisionUniqueness.lean index d07b0a9e5d..aa609a9f20 100644 --- a/LeanPool/LocalComplexGeometry/WPTBridge/DivisionUniqueness.lean +++ b/LeanPool/LocalComplexGeometry/WPTBridge/DivisionUniqueness.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.WPTBridge.Division +public import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.PreparationUniqueness +import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.L1PolynomialEvaluation +import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.PreparationSequences +import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.WeightedGermEvaluation /-! # Uniqueness in analytic Weierstrass division @@ -13,6 +17,8 @@ This file proves germ-level uniqueness of the analytic quotient and the finite-degree remainder coefficients. -/ +@[expose] public section + open Filter open scoped BigOperators ENNReal NNReal Topology diff --git a/LeanPool/LocalComplexGeometry/WPTBridge/GermDivision.lean b/LeanPool/LocalComplexGeometry/WPTBridge/GermDivision.lean index 69708c2fb9..b1b917a7e7 100644 --- a/LeanPool/LocalComplexGeometry/WPTBridge/GermDivision.lean +++ b/LeanPool/LocalComplexGeometry/WPTBridge/GermDivision.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.Germs.Coordinates +public import LeanPool.LocalComplexGeometry.Germs.Coordinates +import LeanPool.LocalComplexGeometry.WPTBridge.Division import LeanPool.LocalComplexGeometry.WPTBridge.DivisionUniqueness -import Mathlib.RingTheory.Ideal.Operations -import Mathlib.RingTheory.Ideal.Span /-! # Weierstrass division on holomorphic germs @@ -18,6 +18,8 @@ the coefficients of the prepared divisor; its coefficients are analytic and vanish at the origin. -/ +@[expose] public section + open Filter open scoped BigOperators Topology diff --git a/LeanPool/LocalComplexGeometry/WPTBridge/Preparation.lean b/LeanPool/LocalComplexGeometry/WPTBridge/Preparation.lean index ebcf0d8514..c96f5fde26 100644 --- a/LeanPool/LocalComplexGeometry/WPTBridge/Preparation.lean +++ b/LeanPool/LocalComplexGeometry/WPTBridge/Preparation.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module +public import LeanPool.LocalComplexGeometry.Germs.Coordinates import LeanPool.LocalComplexGeometry.Analytic.Regularization +import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.ExactOrder import LeanPool.LocalComplexGeometry.ClassicalComplexWPT.Main +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal /-! # Regularized Weierstrass preparation for holomorphic germs @@ -16,6 +20,8 @@ equality of raw function germs, so downstream commutative-algebra arguments do not depend on a hidden choice of representative. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LocalComplexGeometry/WPTBridge/PreparedAssociate.lean b/LeanPool/LocalComplexGeometry/WPTBridge/PreparedAssociate.lean index d3b08de96c..95a0201d24 100644 --- a/LeanPool/LocalComplexGeometry/WPTBridge/PreparedAssociate.lean +++ b/LeanPool/LocalComplexGeometry/WPTBridge/PreparedAssociate.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 BochaoKong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: BochaoKong -/ +module -import LeanPool.LocalComplexGeometry.WPTBridge.Preparation -import LeanPool.LocalComplexGeometry.WPTBridge.GermDivision +public import LeanPool.LocalComplexGeometry.WPTBridge.GermDivision +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal /-! # The prepared divisor is associate to the regularized germ -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/LongGapsBetweenPrimes.lean b/LeanPool/LongGapsBetweenPrimes.lean index 90cad38b7f..75ea3567aa 100644 --- a/LeanPool/LongGapsBetweenPrimes.lean +++ b/LeanPool/LongGapsBetweenPrimes.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI -/ +module -import LeanPool.LongGapsBetweenPrimes.Main +public import LeanPool.LongGapsBetweenPrimes.Main +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.NumberTheory.Chebyshev +import Mathlib.Tactic.NormNum.Prime /-! # Improved long gaps between consecutive primes @@ -16,3 +20,5 @@ Main declarations: `LongGapsBetweenPrimes.long_prime_gaps` Tags: analytic-number-theory, prime-gaps, sieve-theory, erdos-rankin MSC: 11N05 -/ + +@[expose] public section diff --git a/LeanPool/LongGapsBetweenPrimes/Main.lean b/LeanPool/LongGapsBetweenPrimes/Main.lean index 40cbaffbe3..681941479b 100644 --- a/LeanPool/LongGapsBetweenPrimes/Main.lean +++ b/LeanPool/LongGapsBetweenPrimes/Main.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI -/ +module +public import Mathlib.Data.Nat.ChineseRemainder +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +public import Mathlib.NumberTheory.Primorial +public import Mathlib.NumberTheory.SmoothNumbers import Mathlib.Algebra.Field.ZMod import Mathlib.Algebra.Order.Ring.Star import Mathlib.Algebra.Order.Star.Real @@ -11,7 +16,6 @@ import Mathlib.Algebra.Ring.IsFormallyReal import Mathlib.Analysis.PSeries import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals import Mathlib.Data.Int.CardIntervalMod -import Mathlib.Data.Nat.ChineseRemainder import Mathlib.Data.ZMod.QuotientRing import Mathlib.NumberTheory.Bertrand import Mathlib.NumberTheory.Chebyshev @@ -33,6 +37,8 @@ The main results are `short_translates` (Proposition 1.2) and κ = 1/8, and a larger fixed constant in the auxiliary smoothness cutoff. -/ +@[expose] public section + namespace LongGapsBetweenPrimes noncomputable section diff --git a/LeanPool/LowDimSolvClassification.lean b/LeanPool/LowDimSolvClassification.lean index b9f246a8ab..69b3af8498 100644 --- a/LeanPool/LowDimSolvClassification.lean +++ b/LeanPool/LowDimSolvClassification.lean @@ -3,17 +3,18 @@ Copyright (c) 2026 the LieLean team. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Viviana del Barco, Gustavo Infanti, Exequiel Rivas, Paul Schwahn -/ - -import LeanPool.LowDimSolvClassification.Classification1 -import LeanPool.LowDimSolvClassification.Classification2 -import LeanPool.LowDimSolvClassification.Classification3 -import LeanPool.LowDimSolvClassification.GeneralResults -import LeanPool.LowDimSolvClassification.InstancesConstructions -import LeanPool.LowDimSolvClassification.InstancesLowDim -import LeanPool.LowDimSolvClassification.LemmasDim3 -import LeanPool.LowDimSolvClassification.QuotientSolvable -import LeanPool.LowDimSolvClassification.Semidirect -import LeanPool.LowDimSolvClassification.Tactics +module + +public import LeanPool.LowDimSolvClassification.Classification1 +public import LeanPool.LowDimSolvClassification.Classification2 +public import LeanPool.LowDimSolvClassification.Classification3 +public import LeanPool.LowDimSolvClassification.GeneralResults +public import LeanPool.LowDimSolvClassification.InstancesConstructions +public import LeanPool.LowDimSolvClassification.InstancesLowDim +public import LeanPool.LowDimSolvClassification.LemmasDim3 +public import LeanPool.LowDimSolvClassification.QuotientSolvable +public import LeanPool.LowDimSolvClassification.Semidirect +public import LeanPool.LowDimSolvClassification.Tactics /-! # Classification of low-dimensional solvable Lie algebras @@ -26,6 +27,8 @@ Tags: lie-algebras, solvable, classification MSC: 17B30 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/LowDimSolvClassification/Classification1.lean b/LeanPool/LowDimSolvClassification/Classification1.lean index 59d79bc34e..8a019858d0 100644 --- a/LeanPool/LowDimSolvClassification/Classification1.lean +++ b/LeanPool/LowDimSolvClassification/Classification1.lean @@ -3,22 +3,24 @@ Copyright (c) 2026 the LieLean team. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Viviana del Barco, Gustavo Infanti, Exequiel Rivas, Paul Schwahn -/ -import Mathlib.LinearAlgebra.FiniteDimensional.Basic -import Mathlib.LinearAlgebra.LinearIndependent.Basic -import Mathlib.LinearAlgebra.Dimension.DivisionRing -import Mathlib.LinearAlgebra.Dimension.Finrank -import Mathlib.LinearAlgebra.Dimension.Free -import Mathlib.Algebra.Lie.Basic -import Mathlib.Algebra.Lie.Abelian -import Mathlib.Algebra.Lie.Solvable -import Mathlib.Algebra.Field.Defs +module + +public import Mathlib.LinearAlgebra.Dimension.Finrank +public import Mathlib.Algebra.Lie.Solvable import LeanPool.LowDimSolvClassification.GeneralResults -import LeanPool.LowDimSolvClassification.InstancesLowDim +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.GroupTheory.GroupAction.Ring +import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition +import Mathlib.RingTheory.LocalRing.Basic +import Mathlib.Tactic.NormNum.GCD /-! # LeanPool.LowDimSolvClassification.Classification1 -/ +@[expose] public section + open Module open Submodule diff --git a/LeanPool/LowDimSolvClassification/Classification2.lean b/LeanPool/LowDimSolvClassification/Classification2.lean index 2f8081c386..a9b1b99432 100644 --- a/LeanPool/LowDimSolvClassification/Classification2.lean +++ b/LeanPool/LowDimSolvClassification/Classification2.lean @@ -3,22 +3,17 @@ Copyright (c) 2026 the LieLean team. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Viviana del Barco, Gustavo Infanti, Exequiel Rivas, Paul Schwahn -/ -import Mathlib.LinearAlgebra.FiniteDimensional.Basic -import Mathlib.LinearAlgebra.LinearIndependent.Basic -import Mathlib.LinearAlgebra.Dimension.DivisionRing -import Mathlib.LinearAlgebra.Dimension.Finrank -import Mathlib.LinearAlgebra.Dimension.Free -import Mathlib.Algebra.Lie.Solvable -import Mathlib.Algebra.Lie.Basic -import Mathlib.Algebra.Lie.Abelian -import LeanPool.LowDimSolvClassification.InstancesLowDim -import LeanPool.LowDimSolvClassification.GeneralResults +module + +public import LeanPool.LowDimSolvClassification.InstancesLowDim import LeanPool.LowDimSolvClassification.Classification1 /-! # LeanPool.LowDimSolvClassification.Classification2 -/ +@[expose] public section + open Module open Submodule attribute [local implicit_reducible] LieAlgebra.mkAbelian LieAlgebra.Dim2.Affine diff --git a/LeanPool/LowDimSolvClassification/Classification3.lean b/LeanPool/LowDimSolvClassification/Classification3.lean index 214241001b..27ee296576 100644 --- a/LeanPool/LowDimSolvClassification/Classification3.lean +++ b/LeanPool/LowDimSolvClassification/Classification3.lean @@ -3,24 +3,17 @@ Copyright (c) 2026 the LieLean team. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Viviana del Barco, Gustavo Infanti, Exequiel Rivas, Paul Schwahn -/ -import Mathlib.Algebra.Lie.Semisimple.Defs -import Mathlib.Algebra.Lie.Solvable -import Mathlib.Algebra.Lie.Quotient -import Mathlib.Algebra.Lie.Nilpotent -import Mathlib.LinearAlgebra.Basis.Basic -import Mathlib.Data.Set.Card -import Mathlib.LinearAlgebra.FiniteDimensional.Basic -import Mathlib.Data.Set.Image -import Mathlib.LinearAlgebra.Determinant -import Mathlib.LinearAlgebra.Trace -import LeanPool.LowDimSolvClassification.GeneralResults +module + +public import LeanPool.LowDimSolvClassification.InstancesLowDim import LeanPool.LowDimSolvClassification.LemmasDim3 -import LeanPool.LowDimSolvClassification.InstancesLowDim /-! # LeanPool.LowDimSolvClassification.Classification3 -/ +@[expose] public section + open Module open Submodule attribute [local implicit_reducible] LieAlgebra.mkAbelian LieAlgebra.Dim3.Heisenberg diff --git a/LeanPool/LowDimSolvClassification/GeneralResults.lean b/LeanPool/LowDimSolvClassification/GeneralResults.lean index 38333e04dd..f56834d6a6 100644 --- a/LeanPool/LowDimSolvClassification/GeneralResults.lean +++ b/LeanPool/LowDimSolvClassification/GeneralResults.lean @@ -3,23 +3,17 @@ Copyright (c) 2026 the LieLean team. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Viviana del Barco, Gustavo Infanti, Exequiel Rivas, Paul Schwahn -/ -import Mathlib.LinearAlgebra.LinearIndependent.Basic -import Mathlib.LinearAlgebra.FiniteDimensional.Basic -import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas -import Mathlib.LinearAlgebra.Dimension.Finrank -import Mathlib.LinearAlgebra.Dimension.DivisionRing -import Mathlib.Algebra.Lie.Basic -import Mathlib.Algebra.Lie.Solvable -import Mathlib.Algebra.Lie.Derivation.Basic -import Mathlib.Algebra.Lie.AdjointAction.Derivation -import Mathlib.Algebra.Lie.Submodule -import Mathlib.Algebra.Lie.Ideal -import Mathlib.Algebra.Lie.Nilpotent +module + +public import Mathlib.Algebra.Lie.AdjointAction.Derivation +public import Mathlib.Algebra.Lie.Nilpotent /-! # LeanPool.LowDimSolvClassification.GeneralResults -/ +@[expose] public section + ---possible generalizations to commutative rings instead of fields section linalg diff --git a/LeanPool/LowDimSolvClassification/InstancesConstructions.lean b/LeanPool/LowDimSolvClassification/InstancesConstructions.lean index 652bc8c9b7..dae3786e4b 100644 --- a/LeanPool/LowDimSolvClassification/InstancesConstructions.lean +++ b/LeanPool/LowDimSolvClassification/InstancesConstructions.lean @@ -3,21 +3,19 @@ Copyright (c) 2026 the LieLean team. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Viviana del Barco, Gustavo Infanti, Exequiel Rivas, Paul Schwahn -/ -import Mathlib.Algebra.Lie.Basic -import Mathlib.Algebra.Lie.Abelian -import Mathlib.Algebra.Lie.OfAssociative -import Mathlib.Algebra.Algebra.Basic -import Mathlib.LinearAlgebra.AffineSpace.AffineMap -import Mathlib.Algebra.Lie.DirectSum -import Mathlib.LinearAlgebra.Determinant -import Mathlib.LinearAlgebra.Trace -import LeanPool.LowDimSolvClassification.Semidirect -import LeanPool.LowDimSolvClassification.GeneralResults +module + +public import LeanPool.LowDimSolvClassification.Semidirect +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # LeanPool.LowDimSolvClassification.InstancesConstructions -/ +@[expose] public section + open Module open Submodule diff --git a/LeanPool/LowDimSolvClassification/InstancesLowDim.lean b/LeanPool/LowDimSolvClassification/InstancesLowDim.lean index ede7d23261..58d06a555a 100644 --- a/LeanPool/LowDimSolvClassification/InstancesLowDim.lean +++ b/LeanPool/LowDimSolvClassification/InstancesLowDim.lean @@ -3,20 +3,18 @@ Copyright (c) 2026 the LieLean team. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Viviana del Barco, Gustavo Infanti, Exequiel Rivas, Paul Schwahn -/ -import Mathlib.Algebra.Lie.Basic -import Mathlib.Algebra.Lie.Abelian -import Mathlib.LinearAlgebra.AffineSpace.AffineMap -import Mathlib.Algebra.Lie.DirectSum -import Mathlib.LinearAlgebra.Determinant -import Mathlib.LinearAlgebra.Trace -import LeanPool.LowDimSolvClassification.Semidirect -import LeanPool.LowDimSolvClassification.GeneralResults -import LeanPool.LowDimSolvClassification.InstancesConstructions +module + +public import Mathlib.LinearAlgebra.Determinant +public import Mathlib.LinearAlgebra.Trace +public import LeanPool.LowDimSolvClassification.InstancesConstructions /-! # LeanPool.LowDimSolvClassification.InstancesLowDim -/ +@[expose] public section + open Module open Submodule diff --git a/LeanPool/LowDimSolvClassification/LemmasDim3.lean b/LeanPool/LowDimSolvClassification/LemmasDim3.lean index 36fe88a924..b38ece0f2a 100644 --- a/LeanPool/LowDimSolvClassification/LemmasDim3.lean +++ b/LeanPool/LowDimSolvClassification/LemmasDim3.lean @@ -3,22 +3,18 @@ Copyright (c) 2026 the LieLean team. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Viviana del Barco, Gustavo Infanti, Exequiel Rivas, Paul Schwahn -/ -import Mathlib.Algebra.Lie.Semisimple.Defs -import Mathlib.Algebra.Lie.Solvable -import Mathlib.Algebra.Lie.Quotient -import Mathlib.Algebra.Lie.Nilpotent -import Mathlib.LinearAlgebra.Basis.Basic -import Mathlib.Data.Set.Card -import Mathlib.LinearAlgebra.FiniteDimensional.Basic -import Mathlib.Data.Set.Image -import Mathlib.LinearAlgebra.Dimension.OrzechProperty -import LeanPool.LowDimSolvClassification.GeneralResults +module + +public import LeanPool.LowDimSolvClassification.GeneralResults import LeanPool.LowDimSolvClassification.Classification2 +import Mathlib.LinearAlgebra.Dimension.OrzechProperty /-! # LeanPool.LowDimSolvClassification.LemmasDim3 -/ +@[expose] public section + open Module open Submodule namespace LieAlgebra diff --git a/LeanPool/LowDimSolvClassification/QuotientSolvable.lean b/LeanPool/LowDimSolvClassification/QuotientSolvable.lean index 9b6908a5cc..40870b1075 100644 --- a/LeanPool/LowDimSolvClassification/QuotientSolvable.lean +++ b/LeanPool/LowDimSolvClassification/QuotientSolvable.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 the LieLean team. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Viviana del Barco, Gustavo Infanti, Exequiel Rivas, Paul Schwahn -/ -import Mathlib.Algebra.Lie.Solvable -import Mathlib.Algebra.Lie.Quotient -import Mathlib.Algebra.Lie.Nilpotent +module + +public import Mathlib.Algebra.Lie.Solvable +public import Mathlib.Algebra.Lie.Quotient +import Mathlib.Data.Rat.Floor /-! # LeanPool.LowDimSolvClassification.QuotientSolvable -/ +@[expose] public section + namespace LieIdeal variable {R L : Type*} [CommRing R] [LieRing L] [LieAlgebra R L] diff --git a/LeanPool/LowDimSolvClassification/Semidirect.lean b/LeanPool/LowDimSolvClassification/Semidirect.lean index 7e904ca442..525ad702db 100644 --- a/LeanPool/LowDimSolvClassification/Semidirect.lean +++ b/LeanPool/LowDimSolvClassification/Semidirect.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 the LieLean team. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Viviana del Barco, Gustavo Infanti, Exequiel Rivas, Paul Schwahn -/ -import Mathlib.Algebra.Lie.Derivation.Basic -import LeanPool.LowDimSolvClassification.GeneralResults +module + +public import LeanPool.LowDimSolvClassification.GeneralResults import LeanPool.LowDimSolvClassification.Tactics /-! # LeanPool.LowDimSolvClassification.Semidirect -/ +@[expose] public section + section lie_semidirect variable {K : Type*} (L J : Type*) [CommRing K] [LieRing L] [LieRing J] [LieAlgebra K L] diff --git a/LeanPool/LowDimSolvClassification/Tactics.lean b/LeanPool/LowDimSolvClassification/Tactics.lean index 5003e2bbd4..37035994d9 100644 --- a/LeanPool/LowDimSolvClassification/Tactics.lean +++ b/LeanPool/LowDimSolvClassification/Tactics.lean @@ -3,30 +3,42 @@ Copyright (c) 2026 the LieLean team. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Heather Macbeth, the LieLean team -/ -import Lean.Meta.Tactic.NormCast -import Mathlib.Algebra.Algebra.Tower +module + +public meta import Lean.Meta.Tactic.NormCast +public import Mathlib.Algebra.Lie.Basic +public import Mathlib.Algebra.Algebra.Defs +public import Mathlib.Tactic.Ring.Basic +public import Mathlib.Algebra.Algebra.Tower +public import Mathlib.Tactic.Ring.RingNF import Mathlib.Algebra.BigOperators.GroupWithZero.Action -import Mathlib.Tactic.Ring -import Mathlib.Util.AtomM -import Mathlib.Algebra.Lie.Basic +import Mathlib.Algebra.Order.Group.Nat /-! # LeanPool.LowDimSolvClassification.Tactics + +The reflected Lie expressions retain exposed definitions so the kernel can check proofs +produced by the tactics. The metaprogramming implementation is compiled without exporting +its definition bodies to importing modules. -/ +public section + open Lean hiding Module open Meta Elab Qq Mathlib.Tactic List /-- Pair-or-single carrier used by the Lie-algebra atom store: each atom is either a single expression or a pair of expressions tracked together. -/ -@[implicit_reducible] +@[expose, implicit_reducible] def V (M : Type*) := Sum M (M × M) +meta section + namespace AtomD /-- State of the Lie-algebra atom monad: the running list of atoms collected so far. -/ structure State where - /-- TODO. -/ + /-- Distinct scalar atoms and bracket pairs, in their order of discovery. -/ atoms : Array (V Expr) := #[] end AtomD @@ -41,7 +53,7 @@ def run {α : Type} (m : AtomD α) : MetaM α := m.run' {} -/-- TODO. -/ +/-- Find an existing atom up to definitional equality, or append a new one. -/ def addAtomSimple (e : Expr) : AtomD (Nat × Bool × Expr) := do let c ← get match e with @@ -53,7 +65,7 @@ def addAtomSimple (e : Expr) : AtomD (Nat × Bool × Expr) := do return (i, true, j) | _ => continue modifyGet fun c ↦ ((c.atoms.size, true, e₁), { c with atoms := c.atoms.push (Sum.inl e₁) }) -/-- TODO. -/ +/-- Intern a bracket pair, recording whether it matches the stored orientation. -/ def addAtomDouble (e₁ e₂ : Expr) : AtomD (Nat × Bool × (Expr × Expr)) := do let c ← get let e : Expr × Expr := ⟨ e₁, e₂ ⟩ @@ -72,13 +84,13 @@ def addAtomDouble (e₁ e₂ : Expr) : AtomD (Nat × Bool × (Expr × Expr)) := modifyGet fun c ↦ ((c.atoms.size, true, ⟨e₁,e₂⟩), { c with atoms := c.atoms.push (Sum.inr e) }) open Qq in -/-- TODO. -/ +/-- Intern a quoted atom and retain its definitional equality with the stored expression. -/ def addAtomQ {u : Level} {α : Q(Type u)} (e : Q($α)) : AtomD (Nat × {e' : Q($α) // $e =Q $e'}) := do let (n, _, e') ← AtomD.addAtomSimple e return (n, ⟨e', ⟨⟩⟩) -/-- TODO. -/ +/-- Intern a quoted bracket pair, retaining the equalities for its chosen orientation. -/ def addAtomDoubleQ {u : Level} {α : Q(Type u)} (e₁ e₂ : Q($α)) : AtomD (Nat × Sum {e' : Q($α) × Q($α) // $e₁ =Q $(e'.2) ∧ $e₂ =Q $(e'.1)} {e' : Q($α) × Q($α) // $e₁ =Q $(e'.1) ∧ $e₂ =Q $(e'.2)}) := do @@ -90,27 +102,31 @@ def addAtomDoubleQ {u : Level} {α : Q(Type u)} (e₁ e₂ : Q($α)) : return (n, Sum.inr ⟨⟨e₁',e₂'⟩, ⟨⟨⟩, ⟨⟩⟩⟩) end AtomD +end + namespace Mathlib.Tactic.LieSolver -/-- TODO. -/ +/-- Interpret an atom as an element or as the bracket of two elements. -/ +@[expose] def v {M : Type*} [LieRing M] (x : V M) := Sum.elim (fun m ↦ m) (fun ⟨ m₁ , m₂ ⟩ ↦ ⁅ m₁ , m₂ ⁆) x -/-- TODO. -/ -@[implicit_reducible] +/-- A Lie expression represented as a sum of scalar multiples of atoms. -/ +@[expose, implicit_reducible] def NF (R : Type*) (M : Type*) := List (R × V M) namespace NF variable {S : Type*} {R : Type*} {M : Type*} -/-- TODO. -/ -@[match_pattern] +/-- Prepend a scalar multiple of an atom to a reflected Lie expression. -/ +@[expose, match_pattern] def cons (p : R × V M) (l : NF R M) : NF R M := p :: l -/-- TODO. -/ +/-- Constructor notation for reflected Lie expressions. -/ infixl:100 " ::ᵣ " => cons -/-- TODO. -/ +/-- Evaluate a reflected Lie expression by summing its scalar multiples of atoms. -/ +@[expose] def eval [SMul R M] [LieRing M] (l : NF R M) : M := (l.map (fun (⟨r, x⟩ : R × V M) ↦ r • v x)).sum @@ -271,7 +287,8 @@ theorem eq_of_eval_eq_eval {R₁ R₂ : Type*} [LieRing M] [Semiring R] [Module variable (R) -/-- TODO. -/ +/-- Extend the scalar ring of a reflected Lie expression through an algebra map. -/ +@[expose] def algebraMap [CommSemiring S] [Semiring R] [Algebra S R] (l : NF S M) : NF R M := l.map (fun ⟨s, x⟩ ↦ (Algebra.algebraMap S R s, x)) @@ -286,27 +303,29 @@ theorem eval_algebraMap [CommSemiring S] [Semiring R] [Algebra S R] [LieRing M] end NF +meta section + variable {u v : Level} -/-- TODO. -/ +/-- Quoted scalar-atom pairs with identifiers used to order and combine equal atoms. -/ abbrev qNF (R : Q(Type u)) (M : Q(Type v)) := List ((Q($R) × Q(V $M)) × ℕ) namespace qNF variable {M : Q(Type v)} {R : Q(Type u)} -/-- TODO. -/ +/-- Quote a normal form, discarding the atom identifiers used during normalization. -/ def toNF (l : qNF R M) : Q(NF $R $M) := let l' : List Q($R × V $M) := (l.map Prod.fst).map (fun (a, x) ↦ q(($a, $x))) let qt : List Q($R × V $M) → Q(List ($R × V $M)) := List.rec q([]) (fun e _ l ↦ q($e ::ᵣ $l)) qt l' -/-- TODO. -/ +/-- Apply a quoted function to every coefficient of a normal form. -/ def onScalar {u₁ u₂ : Level} {R₁ : Q(Type u₁)} {R₂ : Q(Type u₂)} (l : qNF R₁ M) (f : Q($R₁ → $R₂)) : qNF R₂ M := l.map fun ((a, x), k) ↦ ((q($f $a), x), k) -/-- TODO. -/ +/-- Merge two normal forms ordered by atom identifier, adding matching coefficients. -/ def add (iR : Q(Semiring $R)) : qNF R M → qNF R M → qNF R M | [], l => l | l, [] => l @@ -318,7 +337,7 @@ def add (iR : Q(Semiring $R)) : qNF R M → qNF R M → qNF R M else ((a₂, x₂), k₂) :: add iR (((a₁, x₁), k₁) :: t₁) t₂ -/-- TODO. -/ +/-- Construct the proof that merging normal forms computes their sum. -/ def mkAddProof {iR : Q(Semiring $R)} {iMM : Q(LieRing $M)} (iRM : Q(Module $R $M)) (l₁ l₂ : qNF R M) : Q(NF.eval $(l₁.toNF) + NF.eval $(l₂.toNF) = NF.eval $((qNF.add iR l₁ l₂).toNF)) := @@ -336,7 +355,7 @@ def mkAddProof {iR : Q(Semiring $R)} {iMM : Q(LieRing $M)} (iRM : Q(Module $R $M let pf := mkAddProof iRM (((a₁, x₁), k₁) :: t₁) t₂ (q(NF.add_eq_eval₃ ($a₂, $x₂) $pf):) -/-- TODO. -/ +/-- Merge two normal forms ordered by atom identifier, subtracting matching coefficients. -/ def sub (iR : Q(Ring $R)) : qNF R M → qNF R M → qNF R M | [], l => l.onScalar q(Neg.neg) | l, [] => l @@ -348,7 +367,7 @@ def sub (iR : Q(Ring $R)) : qNF R M → qNF R M → qNF R M else ((q(-$a₂), x₂), k₂) :: sub iR (((a₁, x₁), k₁) :: t₁) t₂ -/-- TODO. -/ +/-- Construct the proof that subtracting normal forms computes their difference. -/ def mkSubProof (iR : Q(Ring $R)) (iMM : Q(LieRing $M)) (iRM : Q(Module $R $M)) (l₁ l₂ : qNF R M) : Q(NF.eval $(l₁.toNF) - NF.eval $(l₂.toNF) = NF.eval $((qNF.sub iR l₁ l₂).toNF)) := @@ -370,7 +389,7 @@ variable {iMM : Q(LieRing $M)} {u₁ : Level} {R₁ : Q(Type u₁)} {iR₁ : Q(Semiring $R₁)} (iRM₁ : Q(@Module $R₁ $M $iR₁ _)) {u₂ : Level} {R₂ : Q(Type u₂)} (iR₂ : Q(Semiring $R₂)) (iRM₂ : Q(@Module $R₂ $M $iR₂ _)) -/-- TODO. -/ +/-- Move two normal forms to a common scalar ring, retaining proofs of their values. -/ def matchRings (l₁ : qNF R₁ M) (l₂ : qNF R₂ M) (r : Q($R₂)) (x : Q($M)) : MetaM <| Σ u : Level, Σ R : Q(Type u), Σ iR : Q(Semiring $R), Σ _ : Q(@Module $R $M $iR _), (Σ l₁' : qNF R M, Q(NF.eval $(l₁'.toNF) = NF.eval $(l₁.toNF))) @@ -404,10 +423,10 @@ end qNF variable {M : Q(Type v)} -/-- TODO. -/ +/-- Recursion budget for parsing expressions and comparing their coefficients. -/ def parseFuel : Nat := 4096 -/-- TODO. -/ +/-- Normalize a quoted Lie expression with bounded recursion and prove its value. -/ def parseAux (fuel : Nat) (iMM : Q(LieRing $M)) (x : Q($M)) : AtomD (Σ u : Level, Σ R : Q(Type u), Σ iR : Q(Semiring $R), Σ _ : Q(@Module $R $M $iR _), Σ l : qNF R M, Q($x = NF.eval $(l.toNF))) := do @@ -474,7 +493,7 @@ def parseAux (fuel : Nat) (iMM : Q(LieRing $M)) (x : Q($M)) : k)], q(NF.atom_eq_eval $x')⟩ -/-- TODO. -/ +/-- Normalize a quoted Lie expression using the standard recursion budget. -/ def parse (iMM : Q(LieRing $M)) (x : Q($M)) : AtomD (Σ u : Level, Σ R : Q(Type u), Σ iR : Q(Semiring $R), Σ _ : Q(@Module $R $M $iR _), Σ l : qNF R M, Q($x = NF.eval $(l.toNF))) := @@ -483,7 +502,7 @@ def parse (iMM : Q(LieRing $M)) (x : Q($M)) : /-- Section boundary marker (keeps the proof-size linter happy). -/ private theorem _marker_after_parse : True := trivial -/-- TODO. -/ +/-- Reduce equality of normal forms to coefficient equalities with bounded recursion. -/ def reduceCoefficientwiseAux (fuel : Nat) {R : Q(Type u)} {_ : Q(LieRing $M)} {_ : Q(Semiring $R)} (iRM : Q(Module $R $M)) (l₁ l₂ : qNF R M) : MetaM (List MVarId × Q(v (Sum.inl (NF.eval $(l₁.toNF))) = @@ -517,14 +536,14 @@ def reduceCoefficientwiseAux (fuel : Nat) {R : Q(Type u)} {_ : Q(LieRing $M)} {_ let (mvars, pf) ← reduceCoefficientwiseAux fuel iRM (((a₁, x₁), k₁) :: L₁) L₂ pure (mvar.mvarId! :: mvars, (q(NF.eq_const_cons $x₂ $mvar $pf):)) -/-- TODO. -/ +/-- Produce coefficient goals and a proof that solving them equates the normal forms. -/ def reduceCoefficientwise {R : Q(Type u)} {_ : Q(LieRing $M)} {_ : Q(Semiring $R)} (iRM : Q(Module $R $M)) (l₁ l₂ : qNF R M) : MetaM (List MVarId × Q(v (Sum.inl (NF.eval $(l₁.toNF))) = v (Sum.inl (NF.eval $(l₂.toNF))))) := reduceCoefficientwiseAux parseFuel iRM l₁ l₂ -/-- TODO. -/ +/-- Normalize both sides of an equality and replace it with coefficient goals. -/ def matchScalarsAux (g : MVarId) : AtomD (List MVarId) := do let eqData ← do match (← g.getType').eq? with @@ -554,10 +573,10 @@ def matchScalarsAux (g : MVarId) : AtomD (List MVarId) := do g.assign q(NF.eq_of_eval_eq_eval $pf₁ $pf₂ $pf₁' $pf₂' $pf) return mvars -/-- TODO. -/ +/-- Algebra-map identities used to simplify natural, integer, and rational coefficients. -/ def algebraMapThms : Array Name := #[``eq_natCast, ``eq_intCast, ``eq_ratCast] -/-- TODO. -/ +/-- Simplify casts and algebra maps in a generated coefficient goal. -/ def postprocess (mvarId : MVarId) : MetaM MVarId := do let mut thms : SimpTheorems := ← NormCast.pushCastExt.getTheorems for thm in algebraMapThms do @@ -568,7 +587,7 @@ def postprocess (mvarId : MVarId) : MetaM MVarId := do throwError "internal error in match_scalars_lie tactic: postprocessing should not close goals" return r -/-- TODO. -/ +/-- Reduce a Lie equality to coefficient goals and simplify their scalar expressions. -/ def matchScalars (g : MVarId) : MetaM (List MVarId) := do let mvars ← AtomD.run (matchScalarsAux g) mvars.mapM postprocess @@ -583,6 +602,8 @@ elab "module_lie" : tactic => Tactic.liftMetaFinishingTactic fun g ↦ do let l ← matchScalars g discard <| l.mapM fun mvar ↦ AtomM.run .instances (Ring.proveEq mvar) +end + end Mathlib.Tactic.LieSolver /-- `simplify_lie`: unfold Lie-bracket bilinearity and reduce the goal to scalar equalities diff --git a/LeanPool/MRiscX.lean b/LeanPool/MRiscX.lean index d99a785d45..85df9d9748 100644 --- a/LeanPool/MRiscX.lean +++ b/LeanPool/MRiscX.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.Basic -import LeanPool.MRiscX.Examples.Examples -import LeanPool.MRiscX.Examples.OtpProof -import LeanPool.MRiscX.Examples.SingleProofsOTP -import LeanPool.MRiscX.Examples.SpecAutomation +module + +public import LeanPool.MRiscX.Basic +public import LeanPool.MRiscX.Examples.Examples +public import LeanPool.MRiscX.Examples.OtpProof +public import LeanPool.MRiscX.Examples.SingleProofsOTP +public import LeanPool.MRiscX.Examples.SpecAutomation +import Mathlib.Tactic.Finiteness.Attr /-! # MRiscX @@ -20,6 +23,8 @@ Tags: hoare-logic, program-verification, risc-v, assembly, formal-methods MSC: 68Q60 -/ +@[expose] public section + /-! # MRiscX: a Hoare logic for unstructured RISC-V-like assembly in Lean diff --git a/LeanPool/MRiscX/AbstractSyntax/AbstractSyntax.lean b/LeanPool/MRiscX/AbstractSyntax/AbstractSyntax.lean index abb03bf7a2..78ad284368 100644 --- a/LeanPool/MRiscX/AbstractSyntax/AbstractSyntax.lean +++ b/LeanPool/MRiscX/AbstractSyntax/AbstractSyntax.lean @@ -3,16 +3,18 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.AbstractSyntax.Map -import LeanPool.MRiscX.AbstractSyntax.Instr -import LeanPool.MRiscX.Parser.AssemblySyntax -import Lean +module + +public import LeanPool.MRiscX.AbstractSyntax.Map +public import LeanPool.MRiscX.AbstractSyntax.Instr /-! # AbstractSyntax This module provides core abstract-syntax types of the MRiscX assembly language. -/ + +@[expose] public section open Nat open Lean Lean.Elab /-- diff --git a/LeanPool/MRiscX/AbstractSyntax/Instr.lean b/LeanPool/MRiscX/AbstractSyntax/Instr.lean index 59f85ca692..c44cd28768 100644 --- a/LeanPool/MRiscX/AbstractSyntax/Instr.lean +++ b/LeanPool/MRiscX/AbstractSyntax/Instr.lean @@ -3,6 +3,10 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ +module + +@[expose] public section + /-- Definition of the Instructions. -/ diff --git a/LeanPool/MRiscX/AbstractSyntax/MState.lean b/LeanPool/MRiscX/AbstractSyntax/MState.lean index 64e025c583..638f738375 100644 --- a/LeanPool/MRiscX/AbstractSyntax/MState.lean +++ b/LeanPool/MRiscX/AbstractSyntax/MState.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax +module + +public import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax /-! @@ -13,6 +15,8 @@ and a termination flag. The program counter points to the next instruction to be while the termination flag indicates whether the machine state has halted or if further evaluation should continue. -/ + +@[expose] public section /-- The state of the abstract machine: its memory, registers, program counter, loaded code, and termination flag. -/ structure MState where diff --git a/LeanPool/MRiscX/AbstractSyntax/Map.lean b/LeanPool/MRiscX/AbstractSyntax/Map.lean index 65e91d1ad7..5fb5c96e0f 100644 --- a/LeanPool/MRiscX/AbstractSyntax/Map.lean +++ b/LeanPool/MRiscX/AbstractSyntax/Map.lean @@ -12,6 +12,9 @@ These maps are converted from and Hri{\c{t}}cu, C{\u{a}}t{\u{a}}lin and Sj{\"o}berg, Vilhelm and Yorgey, Brent}, journal={Webpage: http://www. cis. upenn. edu/bcpierce/sf/current/index. html}, -/ +module + +@[expose] public section /-- Total map as recursive type with a key type α and value of type β. diff --git a/LeanPool/MRiscX/Basic.lean b/LeanPool/MRiscX/Basic.lean index 9ffb33cf4c..655d42c859 100644 --- a/LeanPool/MRiscX/Basic.lean +++ b/LeanPool/MRiscX/Basic.lean @@ -3,16 +3,20 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.Elab.CodeElaborator -import LeanPool.MRiscX.Semantics.Specification -import LeanPool.MRiscX.Delab.DelabCode -import LeanPool.MRiscX.Elab.HoareElaborator -import LeanPool.MRiscX.Hoare.HoareRules -import LeanPool.MRiscX.Util.BasicTheorems -import LeanPool.MRiscX.Tactics.CodeProofTactics +module + +public import LeanPool.MRiscX.Elab.CodeElaborator +public import LeanPool.MRiscX.Semantics.Specification +public import LeanPool.MRiscX.Delab.DelabCode +public import LeanPool.MRiscX.Elab.HoareElaborator +public import LeanPool.MRiscX.Hoare.HoareRules +public import LeanPool.MRiscX.Util.BasicTheorems +public import LeanPool.MRiscX.Tactics.CodeProofTactics /-! # Basic This module provides the top-level entry point gathering the MRiscX modules. -/ + +@[expose] public section diff --git a/LeanPool/MRiscX/Delab/DelabCode.lean b/LeanPool/MRiscX/Delab/DelabCode.lean index e5c280451e..83eb8c6973 100644 --- a/LeanPool/MRiscX/Delab/DelabCode.lean +++ b/LeanPool/MRiscX/Delab/DelabCode.lean @@ -3,16 +3,20 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax +module + +public import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax +public meta import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax +public import LeanPool.MRiscX.Elab.HandleNumOrIdent import LeanPool.MRiscX.Parser.AssemblySyntax -import LeanPool.MRiscX.Elab.CodeElaborator -import LeanPool.MRiscX.AbstractSyntax.Instr /-! # DelabCode This module provides delaborators rendering MRiscX `Code` back to assembly syntax. -/ + +public meta section open Lean PrettyPrinter Delaborator SubExpr Expr Nat /- @@ -22,7 +26,7 @@ is implemented as unexpander of the Code.mk function. /-- A total map from instruction indices to parsed instruction syntax, used while delaborating a `Code` value back into surface assembly. -/ -def SyntaxInstrMap := TMap UInt64 (TSyntax `mriscxInstr) +@[expose] def SyntaxInstrMap := TMap UInt64 (TSyntax `mriscxInstr) deriving Repr, Inhabited @@ -182,7 +186,7 @@ private def termSyntaxSize : Syntax → Nat | _ => 1 /-- Fuel-bounded core of `termToInstrMap`; `fuel` bounds the syntax-tree recursion. -/ -private def termToInstrMapAux (fuel : Nat) (t : TSyntax `term) : +def termToInstrMapAux (fuel : Nat) (t : TSyntax `term) : UnexpandM SyntaxInstrMap := do match t with | `(TMap.empty $_) => @@ -203,7 +207,7 @@ def termToInstrMap (t: TSyntax `term) : UnexpandM SyntaxInstrMap := termToInstrMapAux (termSyntaxSize t) t /-- Fuel-bounded core of `termToLabelMap`; `fuel` bounds the syntax-tree recursion. -/ -private def termToLabelMapAux (fuel : Nat) (t : TSyntax `term) : LabelMap := +def termToLabelMapAux (fuel : Nat) (t : TSyntax `term) : LabelMap := match t with | `(PMap.empty) => PMap.empty | `(EmptyLabels) => PMap.empty diff --git a/LeanPool/MRiscX/Delab/DelabHoare.lean b/LeanPool/MRiscX/Delab/DelabHoare.lean index e9d51f69fa..4de31a882d 100644 --- a/LeanPool/MRiscX/Delab/DelabHoare.lean +++ b/LeanPool/MRiscX/Delab/DelabHoare.lean @@ -3,15 +3,22 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.Hoare.HoareCore +module + +public import LeanPool.MRiscX.Hoare.HoareCore +public import LeanPool.MRiscX.Elab.HandleNumOrIdent +public meta import Lean.PrettyPrinter.Delaborator.Builtins import LeanPool.MRiscX.Parser.HoareSyntax -import LeanPool.MRiscX.Elab.HandleNumOrIdent +import Mathlib.Data.Quot +import Mathlib.Tactic.Finiteness.Attr /-! # DelabHoare This module provides delaborators for MRiscX Hoare triples. -/ + +public meta section open Lean PrettyPrinter SubExpr Expr Nat Elab /- diff --git a/LeanPool/MRiscX/Elab/CodeElaborator.lean b/LeanPool/MRiscX/Elab/CodeElaborator.lean index 0613891406..b4cf763cad 100644 --- a/LeanPool/MRiscX/Elab/CodeElaborator.lean +++ b/LeanPool/MRiscX/Elab/CodeElaborator.lean @@ -3,19 +3,22 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.Parser.AssemblySyntax +module + +public meta import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax +public import LeanPool.MRiscX.Elab.HandleNumOrIdent +public import LeanPool.MRiscX.Parser.AssemblySyntax +import Lean.Exception import LeanPool.MRiscX.AbstractSyntax.Map -import LeanPool.MRiscX.AbstractSyntax.Instr -import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax -import LeanPool.MRiscX.Elab.HandleNumOrIdent -import Lean /-! # CodeElaborator This module provides the elaborator turning MRiscX assembly syntax into `Code`. -/ -open Lean.Elab Command Term + +public meta section +open Lean.Elab Term open Nat open Lean Lean.Expr Lean.Meta Lean.Parser diff --git a/LeanPool/MRiscX/Elab/HandleExpr.lean b/LeanPool/MRiscX/Elab/HandleExpr.lean index 533b06e9f0..ebe4d31805 100644 --- a/LeanPool/MRiscX/Elab/HandleExpr.lean +++ b/LeanPool/MRiscX/Elab/HandleExpr.lean @@ -3,14 +3,20 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ +module + +public meta import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax +public meta import Lean.Meta.Basic +import Lean.Elab.Tactic.RCases import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax -import Lean /-! # HandleExpr This module provides helpers reflecting Lean `Expr`s into MRiscX data. -/ + +public meta section open Lean Meta Elab /- diff --git a/LeanPool/MRiscX/Elab/HandleNumOrIdent.lean b/LeanPool/MRiscX/Elab/HandleNumOrIdent.lean index 5d1f7dcf65..996674230d 100644 --- a/LeanPool/MRiscX/Elab/HandleNumOrIdent.lean +++ b/LeanPool/MRiscX/Elab/HandleNumOrIdent.lean @@ -3,15 +3,21 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ +module + +public meta import Lean.Elab.Term.TermElabM +public meta import Std.Do.Triple.SpecLemmas +import Lean.Exception import LeanPool.MRiscX.Parser.AssemblySyntax -import Lean /-! # HandleNumOrIdent This module provides elaboration helpers for numeric/identifier operands. -/ -open Nat Lean PrettyPrinter Expr Meta Elab + +public meta section +open Nat Lean PrettyPrinter Expr Meta Elab Term /- Next, we introduce utility functions to streamline the conversion of syntax into an Expr. diff --git a/LeanPool/MRiscX/Elab/HoareElaborator.lean b/LeanPool/MRiscX/Elab/HoareElaborator.lean index df8ca741a3..d651b9f2dd 100644 --- a/LeanPool/MRiscX/Elab/HoareElaborator.lean +++ b/LeanPool/MRiscX/Elab/HoareElaborator.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.Hoare.HoareCore -import LeanPool.MRiscX.Elab.CodeElaborator -import LeanPool.MRiscX.Parser.HoareSyntax +module + +public import LeanPool.MRiscX.Elab.CodeElaborator +public import LeanPool.MRiscX.Hoare.EvalLabelInHoare +public import LeanPool.MRiscX.Hoare.HoareAssignmentElab +public import LeanPool.MRiscX.Parser.HoareSyntax +public meta import Mathlib.Tactic.ToAdditive +public meta import Mathlib.Tactic.ToDual +public import LeanPool.MRiscX.Hoare.HoareCore +import Mathlib.Tactic.Finiteness.Attr /-! # HoareElaborator @@ -13,6 +20,8 @@ import LeanPool.MRiscX.Parser.HoareSyntax This module provides the elaborator for MRiscX Hoare-triple syntax. -/ +public meta section + open Lean Meta Elab diff --git a/LeanPool/MRiscX/Examples/Examples.lean b/LeanPool/MRiscX/Examples/Examples.lean index 2097ce1979..3141a61bcc 100644 --- a/LeanPool/MRiscX/Examples/Examples.lean +++ b/LeanPool/MRiscX/Examples/Examples.lean @@ -3,13 +3,26 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.Basic -import LeanPool.MRiscX.Tactics.ApplySpec +module + +public import LeanPool.MRiscX.Tactics.ApplySpec + +public import LeanPool.MRiscX.Basic + +public import Aesop.BuiltinRules +public import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax +import LeanPool.MRiscX.Elab.HoareElaborator +import LeanPool.MRiscX.Tactics.CodeProofTactics +import LeanPool.MRiscX.Tactics.GeneralCustomTactics +import Mathlib.Data.Set.Defs +import Mathlib.Tactic.Finiteness.Attr /-! New Code Proofs -/ +@[expose] public section + attribute [local implicit_reducible] Registers Memory /- diff --git a/LeanPool/MRiscX/Examples/OtpProof.lean b/LeanPool/MRiscX/Examples/OtpProof.lean index 600ab3bfb5..a90cdf832c 100644 --- a/LeanPool/MRiscX/Examples/OtpProof.lean +++ b/LeanPool/MRiscX/Examples/OtpProof.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.Elab.CodeElaborator -import LeanPool.MRiscX.Semantics.Specification -import LeanPool.MRiscX.Delab.DelabCode -import LeanPool.MRiscX.Elab.HoareElaborator +module + +public import LeanPool.MRiscX.Hoare.HoareCore +import LeanPool.MRiscX.Examples.SingleProofsOTP import LeanPool.MRiscX.Hoare.HoareRules +import LeanPool.MRiscX.Semantics.MsTheory +import LeanPool.MRiscX.Semantics.Specification +import LeanPool.MRiscX.Tactics.CodeProofTactics +import LeanPool.MRiscX.Tactics.GeneralCustomTactics +import LeanPool.MRiscX.Tactics.HelpCodeProofTactics import LeanPool.MRiscX.Util.BasicTheorems -import LeanPool.MRiscX.Examples.SingleProofsOTP -import Mathlib.Tactic.NthRewrite +import Std.Tactic.BVDecide.Normalize.Prop /-! # OtpProof @@ -18,6 +22,8 @@ import Mathlib.Tactic.NthRewrite This module provides the end-to-end One-Time-Pad correctness proof. -/ +@[expose] public section + /-- The precondition of the One-Time-Pad correctness proof, constraining the diff --git a/LeanPool/MRiscX/Examples/SingleProofsOTP.lean b/LeanPool/MRiscX/Examples/SingleProofsOTP.lean index 36ff597580..3f796479e8 100644 --- a/LeanPool/MRiscX/Examples/SingleProofsOTP.lean +++ b/LeanPool/MRiscX/Examples/SingleProofsOTP.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.Elab.CodeElaborator -import LeanPool.MRiscX.Semantics.Specification -import LeanPool.MRiscX.Delab.DelabCode -import LeanPool.MRiscX.Elab.HoareElaborator +module + +public import LeanPool.MRiscX.Hoare.HoareCore import LeanPool.MRiscX.Hoare.HoareRules +import LeanPool.MRiscX.Semantics.MsTheory +import LeanPool.MRiscX.Semantics.Specification +import LeanPool.MRiscX.Tactics.HelpCodeProofTactics import LeanPool.MRiscX.Util.BasicTheorems -import LeanPool.MRiscX.Tactics.CodeProofTactics +import Std.Tactic.BVDecide.Normalize.Prop /-! # SingleProofsOTP @@ -17,6 +19,8 @@ import LeanPool.MRiscX.Tactics.CodeProofTactics This module provides the per-instruction lemmas of the One-Time-Pad proof. -/ +@[expose] public section + attribute [local implicit_reducible] Registers Memory -- import Mathlib.Algebra.Order.Sub.Unbundled.Basic diff --git a/LeanPool/MRiscX/Examples/SpecAutomation.lean b/LeanPool/MRiscX/Examples/SpecAutomation.lean index c7b8b91b13..78ba07450e 100644 --- a/LeanPool/MRiscX/Examples/SpecAutomation.lean +++ b/LeanPool/MRiscX/Examples/SpecAutomation.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.Basic -import LeanPool.MRiscX.Tactics.ApplySpec +module + +public import LeanPool.MRiscX.Tactics.ApplySpec + +public import LeanPool.MRiscX.Basic + +import LeanPool.MRiscX.Elab.HoareElaborator +import LeanPool.MRiscX.Tactics.CodeProofTactics +import Mathlib.Data.Set.Defs +import Mathlib.Tactic.Finiteness.Attr /-! # SpecAutomation @@ -15,6 +23,8 @@ each branch of the instruction-dispatch in `Tactics/ApplySpec.lean` is covered b proved Hoare triple. -/ +@[expose] public section + /- Store via the inferred specification (`specification_StoreWordImmediate`). -/ diff --git a/LeanPool/MRiscX/Hoare/EvalLabelInHoare.lean b/LeanPool/MRiscX/Hoare/EvalLabelInHoare.lean index b7718d54f2..8b5d1966c2 100644 --- a/LeanPool/MRiscX/Hoare/EvalLabelInHoare.lean +++ b/LeanPool/MRiscX/Hoare/EvalLabelInHoare.lean @@ -3,15 +3,22 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ +module + +public meta import Lean.Elab.Term.TermElabM +public import LeanPool.MRiscX.Elab.HandleExpr +public meta import Std.Do.Triple.SpecLemmas +import Lean.Elab.Term.TermElabM import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax -import LeanPool.MRiscX.Elab.HandleExpr /-! # EvalLabelInHoare This module provides label resolution inside MRiscX Hoare syntax. -/ -open Lean Elab + +public meta section +open Lean Elab Term /- This file contains a logic to replace the labelname with the actual pc index diff --git a/LeanPool/MRiscX/Hoare/HoareAssignmentElab.lean b/LeanPool/MRiscX/Hoare/HoareAssignmentElab.lean index af4f5cc46c..2578534931 100644 --- a/LeanPool/MRiscX/Hoare/HoareAssignmentElab.lean +++ b/LeanPool/MRiscX/Hoare/HoareAssignmentElab.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import Lean -import LeanPool.MRiscX.Elab.HandleNumOrIdent +module + +public import LeanPool.MRiscX.Elab.HandleNumOrIdent +import Lean.Elab.Term.TermElabM import LeanPool.MRiscX.Parser.HoareSyntax /-! @@ -12,7 +14,9 @@ import LeanPool.MRiscX.Parser.HoareSyntax This module provides elaboration of MRiscX Hoare assignment chains. -/ -open Lean Elab + +public meta section +open Lean Elab Term /-- The total number of nodes in a syntax tree, an upper bound on its depth. -/ private def assignmentSyntaxSize : Syntax → Nat diff --git a/LeanPool/MRiscX/Hoare/HoareCore.lean b/LeanPool/MRiscX/Hoare/HoareCore.lean index 18da8c9918..9fa85e7fb0 100644 --- a/LeanPool/MRiscX/Hoare/HoareCore.lean +++ b/LeanPool/MRiscX/Hoare/HoareCore.lean @@ -3,13 +3,13 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.AbstractSyntax.MState -import LeanPool.MRiscX.Semantics.Run -import LeanPool.MRiscX.Hoare.EvalLabelInHoare -import LeanPool.MRiscX.Hoare.HoareAssignmentElab -import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax -import Mathlib.Data.Set.Basic -import Mathlib.Data.Set.BooleanAlgebra +module + +public import LeanPool.MRiscX.Semantics.Run +public import Aesop.BuiltinRules +public import Mathlib.Data.Set.Defs +public import Mathlib.Tactic.ToDual +import Mathlib.Tactic.Finiteness.Attr /-! @@ -32,6 +32,8 @@ assertions, we define Hoare triples, which make claims about the state before and after the execution of a command. This can be used to perform a structured proof later. -/ + +@[expose] public section /-- An assertion is a predicate on machine states. -/ abbrev Assertion : Type := MState → Prop diff --git a/LeanPool/MRiscX/Hoare/HoareRules.lean b/LeanPool/MRiscX/Hoare/HoareRules.lean index 08b913db4b..581e5a1dfc 100644 --- a/LeanPool/MRiscX/Hoare/HoareRules.lean +++ b/LeanPool/MRiscX/Hoare/HoareRules.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ +module + +public import Mathlib.Data.Set.BooleanAlgebra +public import LeanPool.MRiscX.Elab.HoareElaborator +public import LeanPool.MRiscX.Hoare.HoareCore import LeanPool.MRiscX.Hoare.HoareTheory -import LeanPool.MRiscX.Delab.DelabHoare -import Mathlib.Data.Set.BooleanAlgebra +import LeanPool.MRiscX.Semantics.MsTheory +import LeanPool.MRiscX.Util.BasicTheorems +import Std.Tactic.BVDecide.Normalize.Prop /-! This file contains the hoare rules from the paper of lundberg et al. @@ -24,6 +30,8 @@ These statements must be valid in order for the conditions for applying the assu TODO: prove of S_LOOP -/ +@[expose] public section + /-- Allows to weaken the Hoare triple by removing a set `L` from `L_B` without any restrictions diff --git a/LeanPool/MRiscX/Hoare/HoareTheory.lean b/LeanPool/MRiscX/Hoare/HoareTheory.lean index 7ab6b0bfbe..151ecfc147 100644 --- a/LeanPool/MRiscX/Hoare/HoareTheory.lean +++ b/LeanPool/MRiscX/Hoare/HoareTheory.lean @@ -3,16 +3,20 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.Elab.HoareElaborator -import LeanPool.MRiscX.Delab.DelabCode -import LeanPool.MRiscX.Semantics.MsTheory -import LeanPool.MRiscX.Util.BasicTheorems +module + +public import LeanPool.MRiscX.Hoare.HoareCore +public import Mathlib.Data.Nat.Notation +import Mathlib.Data.Set.Basic +import Std.Tactic.BVDecide.Normalize.Prop /-! This file contains some minor lemmas to ease the prove in the "main" file "HoareRules". Also, those lemmas can be used to deepen the understanding of the weak function. -/ +@[expose] public section + theorem weak_with_less_BL_weakens : ∀ (s s' : MState) (L_w L_b L : Set UInt64) (c : Code), weak s s' L_w L_b c → weak s s' L_w (L_b \ L) c diff --git a/LeanPool/MRiscX/Parser/AssemblySyntax.lean b/LeanPool/MRiscX/Parser/AssemblySyntax.lean index 48a9d5f0ab..be93961602 100644 --- a/LeanPool/MRiscX/Parser/AssemblySyntax.lean +++ b/LeanPool/MRiscX/Parser/AssemblySyntax.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import Lean +module + +public meta import Lean.Parser.Term /-! # AssemblySyntax This module provides the parser/grammar for MRiscX assembly syntax. -/ + +@[expose] public section open Lean Parser /- In this file, we extend Lean by introducing a new term. This term allows diff --git a/LeanPool/MRiscX/Parser/HoareSyntax.lean b/LeanPool/MRiscX/Parser/HoareSyntax.lean index 3cbc94a66a..9195fa58fc 100644 --- a/LeanPool/MRiscX/Parser/HoareSyntax.lean +++ b/LeanPool/MRiscX/Parser/HoareSyntax.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.Parser.AssemblySyntax +module + +public import LeanPool.MRiscX.Parser.AssemblySyntax /-! Syntax for hoare terms -/ + +@[expose] public section /-- Syntax category for a full MRiscX Hoare triple together with its program. -/ declare_syntax_cat hoareTerm diff --git a/LeanPool/MRiscX/Semantics/MsTheory.lean b/LeanPool/MRiscX/Semantics/MsTheory.lean index 9c01865a14..40bfffd710 100644 --- a/LeanPool/MRiscX/Semantics/MsTheory.lean +++ b/LeanPool/MRiscX/Semantics/MsTheory.lean @@ -3,13 +3,22 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax -import LeanPool.MRiscX.AbstractSyntax.MState -import LeanPool.MRiscX.Semantics.Run -import LeanPool.MRiscX.Util.BasicTheorems +module + +public import LeanPool.MRiscX.Semantics.Run +public import Aesop.BuiltinRules +public import Mathlib.Data.Nat.Notation +public import Mathlib.Data.Set.Defs +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.Basic +public import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToDual +import LeanPool.MRiscX.Util.BasicTheorems +import Mathlib.Algebra.Group.Nat.Defs import Mathlib.Data.Set.Basic -import Lean.Elab.Command +import Std.Tactic.BVDecide.Normalize.BitVec +import Std.Tactic.BVDecide.Normalize.Prop /-! Basic theorems @@ -22,6 +31,8 @@ the `@[simp]`. This can shorten proofs because lean can apply these theorems with simp automatically. -/ +@[expose] public section + namespace MState diff --git a/LeanPool/MRiscX/Semantics/Run.lean b/LeanPool/MRiscX/Semantics/Run.lean index 8e42515afb..75875189f8 100644 --- a/LeanPool/MRiscX/Semantics/Run.lean +++ b/LeanPool/MRiscX/Semantics/Run.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax -import LeanPool.MRiscX.AbstractSyntax.MState +module + +public import LeanPool.MRiscX.AbstractSyntax.MState /-! # Run @@ -12,6 +13,8 @@ import LeanPool.MRiscX.AbstractSyntax.MState This module provides the operational `run` semantics of MRiscX. -/ +@[expose] public section + open Nat /- diff --git a/LeanPool/MRiscX/Semantics/Specification.lean b/LeanPool/MRiscX/Semantics/Specification.lean index f6c2e95502..9daab7de62 100644 --- a/LeanPool/MRiscX/Semantics/Specification.lean +++ b/LeanPool/MRiscX/Semantics/Specification.lean @@ -3,17 +3,26 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ +module + +public import LeanPool.MRiscX.Hoare.HoareCore +import LeanPool.MRiscX.Elab.HoareElaborator import LeanPool.MRiscX.Semantics.MsTheory +import LeanPool.MRiscX.Tactics.GeneralCustomTactics import LeanPool.MRiscX.Tactics.SpecificationTactics -import LeanPool.MRiscX.Elab.HoareElaborator -import LeanPool.MRiscX.Elab.CodeElaborator -import LeanPool.MRiscX.Delab.DelabHoare +import Mathlib.Algebra.GroupWithZero.Nat +import Mathlib.Algebra.Order.ZeroLEOne +import Mathlib.Data.Set.Insert +import Std.Tactic.BVDecide.Normalize.BitVec +import Std.Tactic.BVDecide.Normalize.Prop /-! # Specification This module provides the per-instruction Hoare specifications. -/ + +@[expose] public section open Lean Elab Tactic /- diff --git a/LeanPool/MRiscX/Tactics/ApplySpec.lean b/LeanPool/MRiscX/Tactics/ApplySpec.lean index 96f633adf0..9c313bcec1 100644 --- a/LeanPool/MRiscX/Tactics/ApplySpec.lean +++ b/LeanPool/MRiscX/Tactics/ApplySpec.lean @@ -3,17 +3,19 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import Lean.Elab.Tactic.Basic -import LeanPool.MRiscX.AbstractSyntax.Instr -import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax -import LeanPool.MRiscX.Semantics.Specification -import LeanPool.MRiscX.Elab.HandleNumOrIdent -import LeanPool.MRiscX.Elab.HandleExpr -import LeanPool.MRiscX.Tactics.TacticUtil -import LeanPool.MRiscX.Tactics.GeneralCustomTactics -import LeanPool.MRiscX.Tactics.HelpCodeProofTactics +module -import Mathlib.Data.Set.Basic +public import LeanPool.MRiscX.Semantics.Specification + +public meta import LeanPool.MRiscX.Tactics.TacticUtil + +public import LeanPool.MRiscX.Elab.HandleExpr + +public meta import Mathlib.Tactic.ToAdditive +public meta import Mathlib.Tactic.ToDual +public meta import Std.Do.Triple.SpecLemmas +public import LeanPool.MRiscX.Tactics.HelpCodeProofTactics +import Mathlib.Tactic.Finiteness.Attr /-! # ApplySpec @@ -21,6 +23,8 @@ import Mathlib.Data.Set.Basic This module provides the tactic applying per-instruction specifications. -/ +public meta section + open Lean Meta Elab Parser Tactic Syntax Term diff --git a/LeanPool/MRiscX/Tactics/CodeProofTactics.lean b/LeanPool/MRiscX/Tactics/CodeProofTactics.lean index 7c46f52adc..8d40eae14a 100644 --- a/LeanPool/MRiscX/Tactics/CodeProofTactics.lean +++ b/LeanPool/MRiscX/Tactics/CodeProofTactics.lean @@ -3,17 +3,26 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ +module -import Lean.Elab.Tactic.Basic -import LeanPool.MRiscX.AbstractSyntax.Map -import LeanPool.MRiscX.Semantics.MsTheory -import LeanPool.MRiscX.Util.BasicTheorems -import LeanPool.MRiscX.Hoare.HoareCore -import LeanPool.MRiscX.Tactics.SplitLastSeq -import LeanPool.MRiscX.Tactics.ApplySpec -import LeanPool.MRiscX.Tactics.GeneralCustomTactics +public import LeanPool.MRiscX.Hoare.HoareCore -import LeanPool.MRiscX.Tactics.HelpCodeProofTactics +public import LeanPool.MRiscX.Util.BasicTheorems + +public import LeanPool.MRiscX.Semantics.MsTheory + +public import LeanPool.MRiscX.AbstractSyntax.Map + +public import Lean.Elab.Tactic.Basic + + +public meta import Mathlib.Tactic.ToAdditive +public meta import Mathlib.Tactic.ToDual +public import LeanPool.MRiscX.Tactics.ApplySpec +public import LeanPool.MRiscX.Tactics.GeneralCustomTactics +public import LeanPool.MRiscX.Tactics.HelpCodeProofTactics +public import LeanPool.MRiscX.Tactics.SplitLastSeq +import Mathlib.Tactic.Finiteness.Attr /-! # CodeProofTactics @@ -21,6 +30,8 @@ import LeanPool.MRiscX.Tactics.HelpCodeProofTactics This module provides tactics for discharging MRiscX code-proof goals. -/ +@[expose] public section + open Lean Meta Elab Parser Tactic RCases /- diff --git a/LeanPool/MRiscX/Tactics/GeneralCustomTactics.lean b/LeanPool/MRiscX/Tactics/GeneralCustomTactics.lean index 24a679a841..eaafb880ae 100644 --- a/LeanPool/MRiscX/Tactics/GeneralCustomTactics.lean +++ b/LeanPool/MRiscX/Tactics/GeneralCustomTactics.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import Lean.Elab.Tactic.Basic -import Mathlib.Tactic.Push -import Mathlib.Data.Set.Basic +module + +public meta import Lean.Elab.Tactic.Basic +import Mathlib.Tactic.Finiteness.Attr /-! # GeneralCustomTactics @@ -13,6 +14,8 @@ import Mathlib.Data.Set.Basic This module provides general-purpose custom tactics for MRiscX. -/ +@[expose] public section + open Lean Elab Tactic Meta /- diff --git a/LeanPool/MRiscX/Tactics/HelpCodeProofTactics.lean b/LeanPool/MRiscX/Tactics/HelpCodeProofTactics.lean index 2db8b0bcc8..35c547aef3 100644 --- a/LeanPool/MRiscX/Tactics/HelpCodeProofTactics.lean +++ b/LeanPool/MRiscX/Tactics/HelpCodeProofTactics.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ +module -import Lean.Elab.Tactic.Basic -import LeanPool.MRiscX.Elab.HandleExpr -import LeanPool.MRiscX.Hoare.HoareCore +public import LeanPool.MRiscX.Semantics.MsTheory + +public import LeanPool.MRiscX.AbstractSyntax.MState + +public import LeanPool.MRiscX.Hoare.HoareCore + +public import LeanPool.MRiscX.Elab.HandleExpr +public meta import Lean.Elab.Tactic.RCases +public meta import Std.Do.Triple.SpecLemmas +import Lean.Elab.Tactic.RCases +import Mathlib.Tactic.Finiteness.Attr /-! # HelpCodeProofTactics @@ -14,6 +23,8 @@ import LeanPool.MRiscX.Hoare.HoareCore This module provides auxiliary helpers for the MRiscX code-proof tactics. -/ +public meta section + open Lean Elab Parser Tactic RCases diff --git a/LeanPool/MRiscX/Tactics/SpecificationTactics.lean b/LeanPool/MRiscX/Tactics/SpecificationTactics.lean index 071966dd50..ec3fa02645 100644 --- a/LeanPool/MRiscX/Tactics/SpecificationTactics.lean +++ b/LeanPool/MRiscX/Tactics/SpecificationTactics.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ +module + +public import LeanPool.MRiscX.AbstractSyntax.MState + +public meta import Lean.Elab.Tactic.Basic import LeanPool.MRiscX.Tactics.GeneralCustomTactics -import LeanPool.MRiscX.AbstractSyntax.Instr -import LeanPool.MRiscX.AbstractSyntax.MState +import Mathlib.Tactic.Finiteness.Attr /-! # SpecificationTactics @@ -13,6 +17,8 @@ import LeanPool.MRiscX.AbstractSyntax.MState This module provides tactics proving the per-instruction specifications. -/ +@[expose] public section + open Lean Elab Tactic /- The proof for most specifications of instructions -/ diff --git a/LeanPool/MRiscX/Tactics/SplitLastSeq.lean b/LeanPool/MRiscX/Tactics/SplitLastSeq.lean index 9b4b3fbf7a..b0c6ee8682 100644 --- a/LeanPool/MRiscX/Tactics/SplitLastSeq.lean +++ b/LeanPool/MRiscX/Tactics/SplitLastSeq.lean @@ -3,20 +3,26 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import Lean.Elab.Tactic.Basic -import LeanPool.MRiscX.Hoare.HoareCore +module + +public meta import LeanPool.MRiscX.Tactics.TacticUtil + +public import LeanPool.MRiscX.Elab.HandleNumOrIdent +public import LeanPool.MRiscX.Elab.HandleExpr +public meta import Lean.Elab.SyntheticMVars +public meta import Lean.Meta.Tactic.Apply +public meta import Mathlib.Lean.Expr.Basic import LeanPool.MRiscX.AbstractSyntax.Instr -import LeanPool.MRiscX.AbstractSyntax.AbstractSyntax -import LeanPool.MRiscX.Elab.HandleNumOrIdent -import LeanPool.MRiscX.Elab.HandleExpr -import LeanPool.MRiscX.Tactics.TacticUtil -import Mathlib.Data.Set.Basic +import Mathlib.Data.Set.Defs +import Mathlib.Tactic.Finiteness.Attr /-! # SplitLastSeq This module provides a tactic splitting the last instruction off a code sequence. -/ + +public meta section open Lean Meta Elab Parser Tactic diff --git a/LeanPool/MRiscX/Tactics/TacticUtil.lean b/LeanPool/MRiscX/Tactics/TacticUtil.lean index 1f9da12d3e..04656118e1 100644 --- a/LeanPool/MRiscX/Tactics/TacticUtil.lean +++ b/LeanPool/MRiscX/Tactics/TacticUtil.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import Lean +module + +public import Lean.Meta.Basic /-! # TacticUtil This module provides small utilities shared by the MRiscX tactics. -/ + +@[expose] public section open Lean Meta /-- Find the type of the local hypothesis named `n` in `ctx`, if present. -/ diff --git a/LeanPool/MRiscX/Util/BasicTheorems.lean b/LeanPool/MRiscX/Util/BasicTheorems.lean index 7e63b9d09a..4d11974999 100644 --- a/LeanPool/MRiscX/Util/BasicTheorems.lean +++ b/LeanPool/MRiscX/Util/BasicTheorems.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Julius Marx. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julius Marx -/ -import LeanPool.MRiscX.Hoare.HoareCore -import Mathlib.Tactic.NthRewrite -import Mathlib.Algebra.Order.Sub.Unbundled.Basic +module + + +public import Aesop.BuiltinRules +public import Mathlib.Order.RelClasses +import Batteries.Data.UInt import Mathlib.Data.Nat.ModEq +import Std.Tactic.BVDecide.Normalize.Prop /-! This file contains a list of theorems required during the implementation of this dsl @@ -15,6 +19,8 @@ Some of them might actually already exists in the mathlib but i had trouble finding them. -/ +@[expose] public section + theorem excluded_middle_implication : ∀ (P Q C : Prop), (P ∧ Q → C) ∧ (P ∧ ¬Q → C) → P → diff --git a/LeanPool/MatchingLogic.lean b/LeanPool/MatchingLogic.lean index e63b7f5a61..be098157a6 100644 --- a/LeanPool/MatchingLogic.lean +++ b/LeanPool/MatchingLogic.lean @@ -3,20 +3,22 @@ Copyright (c) 2026 Aurélien Eveil. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aurélien Eveil, Anthropic, OpenAI -/ +module -import LeanPool.MatchingLogic.Applicative -import LeanPool.MatchingLogic.BoxesControl -import LeanPool.MatchingLogic.Definedness -import LeanPool.MatchingLogic.EntryIII.All -import LeanPool.MatchingLogic.EntryIII.AlphaFreshWitnessed -import LeanPool.MatchingLogic.EntryIII.EmbeddingSemantics -import LeanPool.MatchingLogic.EntryIII.Injection -import LeanPool.MatchingLogic.EntryIII.WitnessSupply -import LeanPool.MatchingLogic.Independence -import LeanPool.MatchingLogic.Necessity -import LeanPool.MatchingLogic.Sanity -import LeanPool.MatchingLogic.SetVariables -import LeanPool.MatchingLogic.SortedProof +public import LeanPool.MatchingLogic.Applicative +public import LeanPool.MatchingLogic.BoxesControl +public import LeanPool.MatchingLogic.Definedness +public import LeanPool.MatchingLogic.EntryIII.All +public import LeanPool.MatchingLogic.EntryIII.AlphaFreshWitnessed +public import LeanPool.MatchingLogic.EntryIII.EmbeddingSemantics +public import LeanPool.MatchingLogic.EntryIII.Injection +public import LeanPool.MatchingLogic.EntryIII.WitnessSupply +public import LeanPool.MatchingLogic.Independence +public import LeanPool.MatchingLogic.Necessity +public import LeanPool.MatchingLogic.Sanity +public import LeanPool.MatchingLogic.SetVariables +public import LeanPool.MatchingLogic.SortedProof +import Mathlib.Tactic.Bound.Init /-! # Global completeness of one-sorted definedness-free matching logic @@ -28,3 +30,5 @@ Main declarations: `MatchingLogic.global_completeness_entryIII` Tags: matching-logic, mathematical-logic, modal-logic, completeness, formal-methods MSC: 03B45, 03B70 -/ + +@[expose] public section diff --git a/LeanPool/MatchingLogic/Applicative.lean b/LeanPool/MatchingLogic/Applicative.lean index 5d6de44ffd..4c5376b62c 100644 --- a/LeanPool/MatchingLogic/Applicative.lean +++ b/LeanPool/MatchingLogic/Applicative.lean @@ -27,13 +27,18 @@ those two coordinates. Statements pinned before any proof was attempted. -/ -import Mathlib.Data.Fin.VecNotation +module + +public import Mathlib.Data.Fin.VecNotation +public import LeanPool.MatchingLogic.Localization import LeanPool.MatchingLogic.Composite /-! # MatchingLogic.Applicative -/ +@[expose] public section + namespace MatchingLogic namespace Applicative diff --git a/LeanPool/MatchingLogic/Boxes.lean b/LeanPool/MatchingLogic/Boxes.lean index ec701c1c35..ab05a7e015 100644 --- a/LeanPool/MatchingLogic/Boxes.lean +++ b/LeanPool/MatchingLogic/Boxes.lean @@ -11,12 +11,22 @@ Coordinates, boxes, and word-indexed reachability Definitions are written by the coordinating session from the paper; the statements below were pinned before any proof was attempted. -/ -import LeanPool.MatchingLogic.Semantics +module + +public import LeanPool.MatchingLogic.Semantics +public import Mathlib.Logic.Relation +import Mathlib.Data.Set.Lattice.Bounded +import Mathlib.Data.Set.Lattice.Disjoint +import Mathlib.Data.Set.Lattice.Image +import Mathlib.Data.Set.Lattice.Indexed +import Mathlib.Data.Set.Lattice.Order /-! # MatchingLogic.Boxes -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} diff --git a/LeanPool/MatchingLogic/BoxesControl.lean b/LeanPool/MatchingLogic/BoxesControl.lean index 3b53782eba..b413e45e9f 100644 --- a/LeanPool/MatchingLogic/BoxesControl.lean +++ b/LeanPool/MatchingLogic/BoxesControl.lean @@ -15,12 +15,18 @@ consistent: a position swap in `dia`, or an order flip in `boxes` / `reachWord`, has to be OBSERVABLE somewhere or the definitions are not pinned by anything. -/ -import LeanPool.MatchingLogic.Boxes +module + +public import LeanPool.MatchingLogic.Boxes +public import Mathlib.Basic.IsEmpty.Defs +import Mathlib.Order.BooleanAlgebra.Set /-! # MatchingLogic.BoxesControl -/ +@[expose] public section + namespace MatchingLogic namespace BoxesControl diff --git a/LeanPool/MatchingLogic/Completeness.lean b/LeanPool/MatchingLogic/Completeness.lean index 5f52229884..65ff2d3ad4 100644 --- a/LeanPool/MatchingLogic/Completeness.lean +++ b/LeanPool/MatchingLogic/Completeness.lean @@ -16,12 +16,18 @@ dependence stays visible in the statement and `#print axioms` stays meaningful. Statements pinned before any proof was attempted. -/ -import LeanPool.MatchingLogic.ProofSystem +module + +public import LeanPool.MatchingLogic.ProofSystem +public import LeanPool.MatchingLogic.Localization +import LeanPool.MatchingLogic.Composite /-! # MatchingLogic.Completeness -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/Composite.lean b/LeanPool/MatchingLogic/Composite.lean index 00e481786c..49e46fd95b 100644 --- a/LeanPool/MatchingLogic/Composite.lean +++ b/LeanPool/MatchingLogic/Composite.lean @@ -13,13 +13,18 @@ countermodel into a *global* one. Statements pinned before any proof was attempted. -/ -import LeanPool.MatchingLogic.DoubleCover -import LeanPool.MatchingLogic.Localization +module + +public import LeanPool.MatchingLogic.DoubleCover +public import LeanPool.MatchingLogic.Localization +import LeanPool.MatchingLogic.Locality /-! # MatchingLogic.Composite -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/Core.lean b/LeanPool/MatchingLogic/Core.lean index bbb4339a36..90bf8a302a 100644 --- a/LeanPool/MatchingLogic/Core.lean +++ b/LeanPool/MatchingLogic/Core.lean @@ -30,18 +30,23 @@ Representation rulings (fixed before any proof was written): structural recursor. * Denotations are `Set M`, i.e. `M → Prop`, classically. -/ -import Mathlib.Data.Set.Basic +module + +public import Aesop.BuiltinRules +public import Mathlib.Order.SetNotation +public import Mathlib.Tactic.ToAdditive import Mathlib.Data.Set.Lattice.Bounded import Mathlib.Data.Set.Lattice.Disjoint import Mathlib.Data.Set.Lattice.Image import Mathlib.Data.Set.Lattice.Indexed import Mathlib.Data.Set.Lattice.Order -import Mathlib.Logic.Function.Basic /-! # MatchingLogic.Core -/ +@[expose] public section + namespace MatchingLogic universe u diff --git a/LeanPool/MatchingLogic/Definedness.lean b/LeanPool/MatchingLogic/Definedness.lean index 4d67d657d8..c107f85f5c 100644 --- a/LeanPool/MatchingLogic/Definedness.lean +++ b/LeanPool/MatchingLogic/Definedness.lean @@ -33,12 +33,19 @@ DESIGN RULINGS: Statements pinned before any proof was attempted. -/ +module + +public import LeanPool.MatchingLogic.ProofSystem import LeanPool.MatchingLogic.EntryPoints +import LeanPool.MatchingLogic.Soundness +import Mathlib.Data.Set.Insert /-! # MatchingLogic.Definedness -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/DoubleCover.lean b/LeanPool/MatchingLogic/DoubleCover.lean index 624824a48e..b05b1372a3 100644 --- a/LeanPool/MatchingLogic/DoubleCover.lean +++ b/LeanPool/MatchingLogic/DoubleCover.lean @@ -21,12 +21,19 @@ copy only would break Lemma 11 at `ψ = σ`. The uniform clause below reproduce this automatically: the unmixedness condition `∀ j, (A j).2 = p.2` is vacuous when the arity is `0`, so both copies are populated. -/ +module + +public import LeanPool.MatchingLogic.Core +public import Mathlib.Data.Set.Basic import LeanPool.MatchingLogic.Locality +import Mathlib.Data.Set.Insert /-! # MatchingLogic.DoubleCover -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/EntryIII/All.lean b/LeanPool/MatchingLogic/EntryIII/All.lean index 241fe454a7..ee004ea38d 100644 --- a/LeanPool/MatchingLogic/EntryIII/All.lean +++ b/LeanPool/MatchingLogic/EntryIII/All.lean @@ -5,9 +5,18 @@ Authors: Aurélien Eveil, Anthropic, OpenAI -/ /- Public aggregate for the source-faithful entry-point (iii) development. -/ -import LeanPool.MatchingLogic.EntryIII.Conclusion -import LeanPool.MatchingLogic.EntryIII.Regression +module + +public import LeanPool.MatchingLogic.EntryIII.Conclusion +public import LeanPool.MatchingLogic.EntryIII.Regression + +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # MatchingLogic.EntryIII.All -/ + +@[expose] public section diff --git a/LeanPool/MatchingLogic/EntryIII/Alpha.lean b/LeanPool/MatchingLogic/EntryIII/Alpha.lean index cb443c3844..e8550c5541 100644 --- a/LeanPool/MatchingLogic/EntryIII/Alpha.lean +++ b/LeanPool/MatchingLogic/EntryIII/Alpha.lean @@ -12,13 +12,17 @@ uses raw names and a partial, side-conditioned variable substitution. The lemmas below recover the source's binder-renaming step when the replacement name is absent from `allVars`, hence absent both free and bound. -/ -import LeanPool.MatchingLogic.EntryIII.Fresh -import LeanPool.MatchingLogic.ProofSystem +module + +public import LeanPool.MatchingLogic.EntryIII.Fresh +public import LeanPool.MatchingLogic.ProofSystem /-! # MatchingLogic.EntryIII.Alpha -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} diff --git a/LeanPool/MatchingLogic/EntryIII/AlphaFreshWitnessed.lean b/LeanPool/MatchingLogic/EntryIII/AlphaFreshWitnessed.lean index f95bac3c45..368c193d81 100644 --- a/LeanPool/MatchingLogic/EntryIII/AlphaFreshWitnessed.lean +++ b/LeanPool/MatchingLogic/EntryIII/AlphaFreshWitnessed.lean @@ -8,15 +8,22 @@ Authors: Aurélien Eveil, Anthropic, OpenAI Whether the gap between ordinary and fresh witnessedness survives the proof-theoretic alpha bridge. -/ +module + +public import LeanPool.MatchingLogic.EntryIII.WitnessedCollapse import LeanPool.MatchingLogic.EntryIII.Conclusion -import LeanPool.MatchingLogic.EntryIII.WitnessedCollapse +import LeanPool.MatchingLogic.EntryIII.MCSAlpha import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Algebra.Order.Ring.Nat +import Mathlib.Data.Nat.SuccPred import Mathlib.Tactic.FinCases /-! # MatchingLogic.EntryIII.AlphaFreshWitnessed -/ +@[expose] public section + namespace MatchingLogic open Set diff --git a/LeanPool/MatchingLogic/EntryIII/CanonicalChoice.lean b/LeanPool/MatchingLogic/EntryIII/CanonicalChoice.lean index e7422ad724..d4093ebfee 100644 --- a/LeanPool/MatchingLogic/EntryIII/CanonicalChoice.lean +++ b/LeanPool/MatchingLogic/EntryIII/CanonicalChoice.lean @@ -13,12 +13,17 @@ below makes the same joint choice coordinate by coordinate; the final theorem returns one total Boolean function and one application in which every coordinate has been strengthened according to that function. -/ +module + +public import LeanPool.MatchingLogic.EntryIII.LocalTheory import LeanPool.MatchingLogic.EntryIII.MCSAlpha /-! # MatchingLogic.EntryIII.CanonicalChoice -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} diff --git a/LeanPool/MatchingLogic/EntryIII/CanonicalConstruction.lean b/LeanPool/MatchingLogic/EntryIII/CanonicalConstruction.lean index 9f669cc271..fbc4360df3 100644 --- a/LeanPool/MatchingLogic/EntryIII/CanonicalConstruction.lean +++ b/LeanPool/MatchingLogic/EntryIII/CanonicalConstruction.lean @@ -5,14 +5,19 @@ Authors: Aurélien Eveil, Anthropic, OpenAI -/ /- The recursive simultaneous stage construction for Theorem 73. -/ +module + +public import LeanPool.MatchingLogic.EntryIII.CanonicalExistence import LeanPool.MatchingLogic.EntryIII.CanonicalChoice -import LeanPool.MatchingLogic.EntryIII.CanonicalExistence +import LeanPool.MatchingLogic.EntryIII.MCSAlpha import LeanPool.MatchingLogic.EntryIII.WitnessElim /-! # MatchingLogic.EntryIII.CanonicalConstruction -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} diff --git a/LeanPool/MatchingLogic/EntryIII/CanonicalCore.lean b/LeanPool/MatchingLogic/EntryIII/CanonicalCore.lean index f8a1b64f93..71d40a3b9e 100644 --- a/LeanPool/MatchingLogic/EntryIII/CanonicalCore.lean +++ b/LeanPool/MatchingLogic/EntryIII/CanonicalCore.lean @@ -12,13 +12,17 @@ the stronger fresh-witness invariant delivered by the Henkin construction, the source's universal symbol interpretation, and the local consistency fact needed to start the simultaneous argument-theory extension. -/ -import LeanPool.MatchingLogic.EntryIII.Witnessed +module + +public import LeanPool.MatchingLogic.EntryIII.Witnessed import LeanPool.MatchingLogic.EntryIII.MCSAlpha /-! # MatchingLogic.EntryIII.CanonicalCore -/ +@[expose] public section + namespace MatchingLogic open Set diff --git a/LeanPool/MatchingLogic/EntryIII/CanonicalExistence.lean b/LeanPool/MatchingLogic/EntryIII/CanonicalExistence.lean index 48d9faaa98..9a9fa3cbfa 100644 --- a/LeanPool/MatchingLogic/EntryIII/CanonicalExistence.lean +++ b/LeanPool/MatchingLogic/EntryIII/CanonicalExistence.lean @@ -12,12 +12,17 @@ boundary lemma. Keeping the zero-arity case explicit is important: the paper's definition says that a constant is interpreted by the worlds which contain that constant, and no argument-world construction may be smuggled in. -/ -import LeanPool.MatchingLogic.EntryIII.CanonicalCore +module + +public import LeanPool.MatchingLogic.EntryIII.CanonicalCore +import LeanPool.MatchingLogic.EntryIII.MCSAlpha /-! # MatchingLogic.EntryIII.CanonicalExistence -/ +@[expose] public section + namespace MatchingLogic open Set @@ -70,7 +75,8 @@ existential body and of all finite-stage component conjunctions. -/ def tupleAllVars (p : Pattern S Nat) (Phi : Fin n → Pattern S Nat) : Finset Nat := p.allVars ∪ Finset.univ.biUnion (fun i => (Phi i).allVars) -private def tupleFreshBase (p : Pattern S Nat) (Phi : Fin n → Pattern S Nat) : Nat := +/-- An upper bound on all variable indices in a pattern and its tuple of parameters. -/ +def tupleFreshBase (p : Pattern S Nat) (Phi : Fin n → Pattern S Nat) : Nat := (insert 0 (tupleAllVars p Phi)).max' (by simp) /-- The source's tuple of pairwise distinct fresh variables, constructed from diff --git a/LeanPool/MatchingLogic/EntryIII/CaptureAvoiding.lean b/LeanPool/MatchingLogic/EntryIII/CaptureAvoiding.lean index 05b4c3dd01..9d56e3a867 100644 --- a/LeanPool/MatchingLogic/EntryIII/CaptureAvoiding.lean +++ b/LeanPool/MatchingLogic/EntryIII/CaptureAvoiding.lean @@ -13,6 +13,11 @@ partial `substVar`, guarded by `CaptureFree`. This additive module alpha-rename binders named `y`, then applies `substVar`, and proves that the result has the source operation's proof-theoretic and semantic properties. -/ +module + +public import LeanPool.MatchingLogic.EntryIII.Fresh +public import LeanPool.MatchingLogic.ProofSystem +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import LeanPool.MatchingLogic.EntryIII.Alpha import LeanPool.MatchingLogic.EntryIII.LocalTheory import LeanPool.MatchingLogic.Soundness @@ -22,6 +27,8 @@ import Mathlib.Algebra.BigOperators.Group.Finset.Basic # MatchingLogic.EntryIII.CaptureAvoiding -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} diff --git a/LeanPool/MatchingLogic/EntryIII/Compactness.lean b/LeanPool/MatchingLogic/EntryIII/Compactness.lean index 21630b2e22..fef24feb84 100644 --- a/LeanPool/MatchingLogic/EntryIII/Compactness.lean +++ b/LeanPool/MatchingLogic/EntryIII/Compactness.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Aurélien Eveil. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aurélien Eveil, Anthropic, OpenAI -/ +module -import LeanPool.MatchingLogic.Semantics -import Mathlib.ModelTheory.Satisfiability +public import LeanPool.MatchingLogic.Semantics +public import Mathlib.ModelTheory.Satisfiability /-! # MatchingLogic.EntryIII.Compactness -/ +@[expose] public section + namespace MatchingLogic.EntryIII open FirstOrder diff --git a/LeanPool/MatchingLogic/EntryIII/Completion.lean b/LeanPool/MatchingLogic/EntryIII/Completion.lean index 3d8c9b8629..fb13a0d6d5 100644 --- a/LeanPool/MatchingLogic/EntryIII/Completion.lean +++ b/LeanPool/MatchingLogic/EntryIII/Completion.lean @@ -13,12 +13,16 @@ generated world. Thus this is definitionally a generated-world copy plus at most one star, and the star exists exactly in the source's missing-variable case. -/ -import LeanPool.MatchingLogic.EntryIII.Generated +module + +public import LeanPool.MatchingLogic.EntryIII.Generated /-! # MatchingLogic.EntryIII.Completion -/ +@[expose] public section + namespace MatchingLogic open Set diff --git a/LeanPool/MatchingLogic/EntryIII/Conclusion.lean b/LeanPool/MatchingLogic/EntryIII/Conclusion.lean index e4420f9a97..7e02c586b5 100644 --- a/LeanPool/MatchingLogic/EntryIII/Conclusion.lean +++ b/LeanPool/MatchingLogic/EntryIII/Conclusion.lean @@ -12,16 +12,23 @@ by a finite countertheory. This avoids a countability assumption on the ambient symbol type. The result over `Nat` is then transported to every countably infinite element-variable type. -/ +module + +public import LeanPool.MatchingLogic.EntryIII.Countertheory +public import Mathlib.Basic.Denumerable import LeanPool.MatchingLogic.EntryIII.CanonicalConstruction import LeanPool.MatchingLogic.EntryIII.ModelExistence -import LeanPool.MatchingLogic.EntryIII.SignatureReduction import LeanPool.MatchingLogic.EntryIII.Renaming +import LeanPool.MatchingLogic.EntryIII.SignatureReduction import LeanPool.MatchingLogic.EntryPoints +import Mathlib.Tactic.Bound.Init /-! # MatchingLogic.EntryIII.Conclusion -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} diff --git a/LeanPool/MatchingLogic/EntryIII/Countertheory.lean b/LeanPool/MatchingLogic/EntryIII/Countertheory.lean index 3d93aee71b..6b6445a3c4 100644 --- a/LeanPool/MatchingLogic/EntryIII/Countertheory.lean +++ b/LeanPool/MatchingLogic/EntryIII/Countertheory.lean @@ -11,13 +11,22 @@ This isolates the remaining canonical-model obligation: it is enough to build a pointed model for every locally consistent finite-list theory. The reduction itself is purely propositional plus the already pinned finite semantic bridge. -/ -import LeanPool.MatchingLogic.EntryIII.LocalTheory -import LeanPool.MatchingLogic.EntryIII.FiniteReduction +module + +public import LeanPool.MatchingLogic.EntryIII.LocalTheory +public import LeanPool.MatchingLogic.EntryIII.FiniteReduction +import Mathlib.Algebra.GroupWithZero.Nat +import Mathlib.Algebra.NeZero +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.SetLike /-! # MatchingLogic.EntryIII.Countertheory -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/EntryIII/EmbeddingSemantics.lean b/LeanPool/MatchingLogic/EntryIII/EmbeddingSemantics.lean index c46945fa36..f487fa53b2 100644 --- a/LeanPool/MatchingLogic/EntryIII/EmbeddingSemantics.lean +++ b/LeanPool/MatchingLogic/EntryIII/EmbeddingSemantics.lean @@ -6,8 +6,16 @@ Authors: Aurélien Eveil, Anthropic, OpenAI /- Semantic invariance under injective variable embeddings is implemented by the shared renaming stack. This module remains as its source-compatible import. -/ -import LeanPool.MatchingLogic.EntryIII.Injection +module + +public import LeanPool.MatchingLogic.EntryIII.Injection + +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # MatchingLogic.EntryIII.EmbeddingSemantics -/ + +@[expose] public section diff --git a/LeanPool/MatchingLogic/EntryIII/FiniteReduction.lean b/LeanPool/MatchingLogic/EntryIII/FiniteReduction.lean index c80d7480a4..1a07f5075b 100644 --- a/LeanPool/MatchingLogic/EntryIII/FiniteReduction.lean +++ b/LeanPool/MatchingLogic/EntryIII/FiniteReduction.lean @@ -3,14 +3,19 @@ Copyright (c) 2026 Aurélien Eveil. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aurélien Eveil, Anthropic, OpenAI -/ +module +public import LeanPool.MatchingLogic.ProofSystem +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.Basic import LeanPool.MatchingLogic.EntryIII.Compactness -import LeanPool.MatchingLogic.ProofSystem /-! # MatchingLogic.EntryIII.FiniteReduction -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/EntryIII/Fresh.lean b/LeanPool/MatchingLogic/EntryIII/Fresh.lean index da2ad202af..8d0ef36ad7 100644 --- a/LeanPool/MatchingLogic/EntryIII/Fresh.lean +++ b/LeanPool/MatchingLogic/EntryIII/Fresh.lean @@ -11,15 +11,19 @@ Unlike `FV`, `allVars` records bound names too. Freshness from `allVars` is the side condition needed when making the paper's implicit alpha-renaming steps explicit over the raw named syntax of the verified base. -/ -import LeanPool.MatchingLogic.Semantics -import Mathlib.Data.Finset.Max -import Mathlib.Data.Finset.Union -import Mathlib.Data.Fintype.Basic +module + +public import LeanPool.MatchingLogic.Semantics +public import Mathlib.Data.Finset.Max +public import Mathlib.Data.Finset.Union +public import Mathlib.Data.Fintype.Basic /-! # MatchingLogic.EntryIII.Fresh -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/EntryIII/FreshWitnessElim.lean b/LeanPool/MatchingLogic/EntryIII/FreshWitnessElim.lean index 385d973f2e..bfbcbe0366 100644 --- a/LeanPool/MatchingLogic/EntryIII/FreshWitnessElim.lean +++ b/LeanPool/MatchingLogic/EntryIII/FreshWitnessElim.lean @@ -12,13 +12,19 @@ absent from every raw occurrence of the body being instantiated. This makes the substitution-composition step below an equality, including the otherwise awkward self-substitution case. -/ -import LeanPool.MatchingLogic.EntryIII.WitnessPush -import LeanPool.MatchingLogic.EntryIII.Witnessed +module + +public import LeanPool.MatchingLogic.EntryIII.WitnessPush +public import LeanPool.MatchingLogic.EntryIII.Witnessed +import LeanPool.MatchingLogic.EntryIII.Alpha +import LeanPool.MatchingLogic.EntryIII.MCSAlpha /-! # MatchingLogic.EntryIII.FreshWitnessElim -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} diff --git a/LeanPool/MatchingLogic/EntryIII/Generated.lean b/LeanPool/MatchingLogic/EntryIII/Generated.lean index 0ec493eb44..1c591b1a06 100644 --- a/LeanPool/MatchingLogic/EntryIII/Generated.lean +++ b/LeanPool/MatchingLogic/EntryIII/Generated.lean @@ -14,13 +14,17 @@ their symbol arguments. Generating paths retain the source's explicit list of symbol/position pairs, and their contexts fill every sibling position with `top`, exactly as in Definition 76. -/ -import LeanPool.MatchingLogic.EntryIII.CanonicalCore -import Mathlib.Logic.Relation +module + +public import LeanPool.MatchingLogic.EntryIII.CanonicalCore +import LeanPool.MatchingLogic.EntryIII.MCSAlpha /-! # MatchingLogic.EntryIII.Generated -/ +@[expose] public section + namespace MatchingLogic open Set diff --git a/LeanPool/MatchingLogic/EntryIII/Injection.lean b/LeanPool/MatchingLogic/EntryIII/Injection.lean index 20c523fb08..f367209efa 100644 --- a/LeanPool/MatchingLogic/EntryIII/Injection.lean +++ b/LeanPool/MatchingLogic/EntryIII/Injection.lean @@ -8,8 +8,16 @@ Authors: Aurélien Eveil, Anthropic, OpenAI Compatibility import for the injective variable-renaming API, whose shared implementation lives with the bijective specialization in `Renaming`. -/ -import LeanPool.MatchingLogic.EntryIII.Renaming +module + +public import LeanPool.MatchingLogic.EntryIII.Renaming + +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # MatchingLogic.EntryIII.Injection -/ + +@[expose] public section diff --git a/LeanPool/MatchingLogic/EntryIII/Lindenbaum.lean b/LeanPool/MatchingLogic/EntryIII/Lindenbaum.lean index 7eef5d85d8..26bafa08eb 100644 --- a/LeanPool/MatchingLogic/EntryIII/Lindenbaum.lean +++ b/LeanPool/MatchingLogic/EntryIII/Lindenbaum.lean @@ -12,13 +12,17 @@ every locally consistent set lies in a maximal locally consistent set. It does not claim witnessedness, which is the genuinely fresh-variable-dependent part of TR Lemma 71. -/ -import LeanPool.MatchingLogic.EntryIII.LocalTheory +module + +public import LeanPool.MatchingLogic.EntryIII.LocalTheory import Mathlib.Order.Zorn /-! # MatchingLogic.EntryIII.Lindenbaum -/ +@[expose] public section + namespace MatchingLogic open Set diff --git a/LeanPool/MatchingLogic/EntryIII/LocalTheory.lean b/LeanPool/MatchingLogic/EntryIII/LocalTheory.lean index 916a76bc45..146d363c29 100644 --- a/LeanPool/MatchingLogic/EntryIII/LocalTheory.lean +++ b/LeanPool/MatchingLogic/EntryIII/LocalTheory.lean @@ -12,12 +12,17 @@ substitution-normalisation argument. It transcribes Definitions 67--68 and Proposition 69 of Chen--Rosu's technical report using the repository's pinned right-associated finite-list conjunction `conj`. -/ -import LeanPool.MatchingLogic.ProofSystem +module + +public import LeanPool.MatchingLogic.ProofSystem +public import Mathlib.Data.Set.BooleanAlgebra /-! # MatchingLogic.EntryIII.LocalTheory -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/EntryIII/MCSAlpha.lean b/LeanPool/MatchingLogic/EntryIII/MCSAlpha.lean index a9c134ed50..f940e5f699 100644 --- a/LeanPool/MatchingLogic/EntryIII/MCSAlpha.lean +++ b/LeanPool/MatchingLogic/EntryIII/MCSAlpha.lean @@ -12,13 +12,17 @@ module turns those derivations, and the Nat-specific monotonicity rules used to construct them, into reusable MCS membership facts. It is independent of the later witnessed-MCS construction. -/ -import LeanPool.MatchingLogic.EntryIII.CaptureAvoiding -import LeanPool.MatchingLogic.EntryIII.LocalTheory +module + +public import LeanPool.MatchingLogic.EntryIII.CaptureAvoiding +public import LeanPool.MatchingLogic.EntryIII.LocalTheory /-! # MatchingLogic.EntryIII.MCSAlpha -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} diff --git a/LeanPool/MatchingLogic/EntryIII/ModelExistence.lean b/LeanPool/MatchingLogic/EntryIII/ModelExistence.lean index bdb20f31ea..50423db4f9 100644 --- a/LeanPool/MatchingLogic/EntryIII/ModelExistence.lean +++ b/LeanPool/MatchingLogic/EntryIII/ModelExistence.lean @@ -12,13 +12,19 @@ The only remaining mathematical premise is the separately isolated canonical Existence Lemma. All model construction, completion, valuation, and Truth Lemma steps are discharged below without strengthening that premise. -/ +module + +public import LeanPool.MatchingLogic.EntryIII.Countertheory +public import LeanPool.MatchingLogic.EntryIII.CanonicalExistence import LeanPool.MatchingLogic.EntryIII.Truth -import LeanPool.MatchingLogic.EntryIII.Countertheory +import Mathlib.Tactic.Bound.Init /-! # MatchingLogic.EntryIII.ModelExistence -/ +@[expose] public section + namespace MatchingLogic open Set diff --git a/LeanPool/MatchingLogic/EntryIII/Regression.lean b/LeanPool/MatchingLogic/EntryIII/Regression.lean index 27ace24c17..80ead66d9f 100644 --- a/LeanPool/MatchingLogic/EntryIII/Regression.lean +++ b/LeanPool/MatchingLogic/EntryIII/Regression.lean @@ -12,12 +12,24 @@ constant and a unary symbol, and use an explicit two-point model to rule out easy completeness escapes. They also instantiate the result at an ambient signature whose symbol type is not assumed countable. -/ +module + +public import LeanPool.MatchingLogic.EntryIII.Completion +public import LeanPool.MatchingLogic.EntryIII.Countertheory +public import Mathlib.Logic.Equiv.List +import LeanPool.MatchingLogic.EntryIII.CanonicalConstruction import LeanPool.MatchingLogic.EntryIII.Conclusion +import LeanPool.MatchingLogic.EntryIII.SignatureRestriction +import LeanPool.MatchingLogic.Soundness +import Mathlib.Algebra.Order.Ring.Nat +import Mathlib.Data.Nat.SuccPred /-! # MatchingLogic.EntryIII.Regression -/ +@[expose] public section + namespace MatchingLogic.EntryIIIRegression open Set diff --git a/LeanPool/MatchingLogic/EntryIII/Renaming.lean b/LeanPool/MatchingLogic/EntryIII/Renaming.lean index 8a6cf2d62c..42e6bdde3b 100644 --- a/LeanPool/MatchingLogic/EntryIII/Renaming.lean +++ b/LeanPool/MatchingLogic/EntryIII/Renaming.lean @@ -13,13 +13,17 @@ raw named syntax instead. This additive layer supplies the first missing bridge: transport of syntax, contexts, derivations, semantics, and strong local completeness along an equivalence of variable types. -/ -import LeanPool.MatchingLogic.ProofSystem -import Mathlib.Basic.Denumerable +module + +public import LeanPool.MatchingLogic.ProofSystem +public import Mathlib.Basic.Denumerable /-! # MatchingLogic.EntryIII.Renaming -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var Var' Var'' : Type} diff --git a/LeanPool/MatchingLogic/EntryIII/SignatureReduction.lean b/LeanPool/MatchingLogic/EntryIII/SignatureReduction.lean index c24239d66a..ae22c77fbe 100644 --- a/LeanPool/MatchingLogic/EntryIII/SignatureReduction.lean +++ b/LeanPool/MatchingLogic/EntryIII/SignatureReduction.lean @@ -12,13 +12,18 @@ symbols it uses, obtains a pointed model there, and extends that model with empty interpretations for every other ambient symbol. This file verifies that bridge for the raw syntax and semantics in the base development. -/ -import LeanPool.MatchingLogic.EntryIII.Countertheory -import LeanPool.MatchingLogic.EntryIII.SignatureRestriction +module + +public import LeanPool.MatchingLogic.EntryIII.Countertheory +public import LeanPool.MatchingLogic.EntryIII.SignatureRestriction +import Mathlib.Tactic.Bound.Init /-! # MatchingLogic.EntryIII.SignatureReduction -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/EntryIII/SignatureRestriction.lean b/LeanPool/MatchingLogic/EntryIII/SignatureRestriction.lean index fee233d953..7a017ee22f 100644 --- a/LeanPool/MatchingLogic/EntryIII/SignatureRestriction.lean +++ b/LeanPool/MatchingLogic/EntryIII/SignatureRestriction.lean @@ -13,13 +13,17 @@ explicit for the raw named syntax used by the base development, then shows that a derivation over the finite sub-signature can be replayed over the ambient signature. -/ -import LeanPool.MatchingLogic.EntryIII.SymbolSupport -import Mathlib.Logic.Equiv.List +module + +public import LeanPool.MatchingLogic.EntryIII.SymbolSupport +public import Mathlib.Logic.Equiv.List /-! # MatchingLogic.EntryIII.SignatureRestriction -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/EntryIII/SymbolSupport.lean b/LeanPool/MatchingLogic/EntryIII/SymbolSupport.lean index e9de30da8f..620432ce1c 100644 --- a/LeanPool/MatchingLogic/EntryIII/SymbolSupport.lean +++ b/LeanPool/MatchingLogic/EntryIII/SymbolSupport.lean @@ -5,14 +5,18 @@ Authors: Aurélien Eveil, Anthropic, OpenAI -/ /- Finite symbol support for reducing arbitrary signatures to finite ones. -/ -import LeanPool.MatchingLogic.ProofSystem -import Mathlib.Data.Finset.Union -import Mathlib.Data.Fintype.Basic +module + +public import LeanPool.MatchingLogic.ProofSystem +public import Mathlib.Data.Finset.Union +public import Mathlib.Data.Fintype.Basic /-! # MatchingLogic.EntryIII.SymbolSupport -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} diff --git a/LeanPool/MatchingLogic/EntryIII/Truth.lean b/LeanPool/MatchingLogic/EntryIII/Truth.lean index a6693c975f..ccfad40f5a 100644 --- a/LeanPool/MatchingLogic/EntryIII/Truth.lean +++ b/LeanPool/MatchingLogic/EntryIII/Truth.lean @@ -12,14 +12,19 @@ is otherwise complete and proceeds by strong induction on the name-insensitive pattern complexity, which is essential because total capture-avoiding substitution preserves that complexity without being a structural subterm. -/ -import LeanPool.MatchingLogic.EntryIII.Completion -import LeanPool.MatchingLogic.EntryIII.CanonicalExistence +module + +public import LeanPool.MatchingLogic.EntryIII.Completion +public import LeanPool.MatchingLogic.EntryIII.CanonicalExistence +import LeanPool.MatchingLogic.EntryIII.MCSAlpha import Mathlib.Algebra.Order.BigOperators.Group.Finset /-! # MatchingLogic.EntryIII.Truth -/ +@[expose] public section + namespace MatchingLogic open Set diff --git a/LeanPool/MatchingLogic/EntryIII/WitnessElim.lean b/LeanPool/MatchingLogic/EntryIII/WitnessElim.lean index 0cc0db88c5..03a8970dea 100644 --- a/LeanPool/MatchingLogic/EntryIII/WitnessElim.lean +++ b/LeanPool/MatchingLogic/EntryIII/WitnessElim.lean @@ -11,13 +11,21 @@ The source silently computes modulo alpha equivalence. Sequentially instantiating the nested existentials produced by Lemma 80 therefore requires an explicit normalization theorem for total capture-avoiding substitution. -/ -import LeanPool.MatchingLogic.EntryIII.WitnessPush +module + +public import LeanPool.MatchingLogic.EntryIII.WitnessPush +public import LeanPool.MatchingLogic.EntryIII.Witnessed +import LeanPool.MatchingLogic.EntryIII.Alpha import LeanPool.MatchingLogic.EntryIII.FreshWitnessElim +import LeanPool.MatchingLogic.EntryIII.MCSAlpha +import LeanPool.MatchingLogic.Soundness /-! # MatchingLogic.EntryIII.WitnessElim -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} diff --git a/LeanPool/MatchingLogic/EntryIII/WitnessPush.lean b/LeanPool/MatchingLogic/EntryIII/WitnessPush.lean index cc486a8447..3b13dc17e1 100644 --- a/LeanPool/MatchingLogic/EntryIII/WitnessPush.lean +++ b/LeanPool/MatchingLogic/EntryIII/WitnessPush.lean @@ -13,12 +13,18 @@ that operation. In particular, the public theorem below keeps the source's free-variable freshness condition; it does not strengthen it to freshness from bound names merely to fit the raw representation. -/ -import LeanPool.MatchingLogic.EntryIII.MCSAlpha +module + +public import LeanPool.MatchingLogic.EntryIII.CaptureAvoiding +import LeanPool.MatchingLogic.EntryIII.Alpha +import LeanPool.MatchingLogic.EntryIII.LocalTheory /-! # MatchingLogic.EntryIII.WitnessPush -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} diff --git a/LeanPool/MatchingLogic/EntryIII/WitnessSupply.lean b/LeanPool/MatchingLogic/EntryIII/WitnessSupply.lean index 0fd0fd2e1a..0eb58c0ecd 100644 --- a/LeanPool/MatchingLogic/EntryIII/WitnessSupply.lean +++ b/LeanPool/MatchingLogic/EntryIII/WitnessSupply.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 Aurélien Eveil. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aurélien Eveil, Anthropic, OpenAI -/ +module -import LeanPool.MatchingLogic.EntryIII.Witnessed -import LeanPool.MatchingLogic.EntryIII.WitnessedCollapse +public import LeanPool.MatchingLogic.EntryIII.WitnessedCollapse +import LeanPool.MatchingLogic.EntryIII.Lindenbaum import Mathlib.Data.Set.Finite.Basic /-! # MatchingLogic.EntryIII.WitnessSupply -/ +@[expose] public section + /-! The variable-supply hypothesis separating ordinary and fresh witnessedness. diff --git a/LeanPool/MatchingLogic/EntryIII/Witnessed.lean b/LeanPool/MatchingLogic/EntryIII/Witnessed.lean index 422f745ad6..50bbb7715c 100644 --- a/LeanPool/MatchingLogic/EntryIII/Witnessed.lean +++ b/LeanPool/MatchingLogic/EntryIII/Witnessed.lean @@ -12,14 +12,20 @@ a fresh Henkin implication. Here the implication uses the total capture-avoiding substitution from `CaptureAvoiding`; freshness is required only for the conservative-extension proof, not for the public operation. -/ -import LeanPool.MatchingLogic.EntryIII.CaptureAvoiding +module + +public import LeanPool.MatchingLogic.EntryIII.CaptureAvoiding +public import Mathlib.Basic.Countable.Defs +public import LeanPool.MatchingLogic.EntryIII.LocalTheory +import LeanPool.MatchingLogic.EntryIII.Alpha import LeanPool.MatchingLogic.EntryIII.Lindenbaum -import Mathlib.Basic.Countable.Defs /-! # MatchingLogic.EntryIII.Witnessed -/ +@[expose] public section + namespace MatchingLogic open Set diff --git a/LeanPool/MatchingLogic/EntryIII/WitnessedCollapse.lean b/LeanPool/MatchingLogic/EntryIII/WitnessedCollapse.lean index 01431e75af..679a3f2de0 100644 --- a/LeanPool/MatchingLogic/EntryIII/WitnessedCollapse.lean +++ b/LeanPool/MatchingLogic/EntryIII/WitnessedCollapse.lean @@ -8,13 +8,17 @@ Authors: Aurélien Eveil, Anthropic, OpenAI The ordinary witnessed condition does not collapse to fresh witnessedness on raw named syntax, even for maximal locally consistent sets. -/ -import LeanPool.MatchingLogic.EntryIII.MCSAlpha -import LeanPool.MatchingLogic.EntryIII.Witnessed +module + +public import LeanPool.MatchingLogic.EntryIII.Witnessed +import LeanPool.MatchingLogic.Soundness /-! # MatchingLogic.EntryIII.WitnessedCollapse -/ +@[expose] public section + namespace MatchingLogic open Set diff --git a/LeanPool/MatchingLogic/EntryPoints.lean b/LeanPool/MatchingLogic/EntryPoints.lean index 9c7a0fd096..b8684ce787 100644 --- a/LeanPool/MatchingLogic/EntryPoints.lean +++ b/LeanPool/MatchingLogic/EntryPoints.lean @@ -12,13 +12,19 @@ Corollary 15 with (L) and (S) assumed. But (S) is not an assumption in this development -- `soundness` (in `Soundness.lean`) proves it -- so it can be supplied rather than hypothesised. That is what this file records. -/ -import LeanPool.MatchingLogic.Soundness +module + +public import LeanPool.MatchingLogic.ProofSystem import LeanPool.MatchingLogic.Completeness +import LeanPool.MatchingLogic.Soundness +import Mathlib.Tactic.Finiteness.Attr /-! # MatchingLogic.EntryPoints -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/Independence.lean b/LeanPool/MatchingLogic/Independence.lean index 20dd9de77b..006450861a 100644 --- a/LeanPool/MatchingLogic/Independence.lean +++ b/LeanPool/MatchingLogic/Independence.lean @@ -28,12 +28,21 @@ come apart. Statements pinned before any proof was attempted. -/ -import LeanPool.MatchingLogic.Composite +module + +public import LeanPool.MatchingLogic.Localization +import Mathlib.Data.Set.Lattice.Bounded +import Mathlib.Data.Set.Lattice.Disjoint +import Mathlib.Data.Set.Lattice.Image +import Mathlib.Data.Set.Lattice.Indexed +import Mathlib.Data.Set.Lattice.Order /-! # MatchingLogic.Independence -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/Locality.lean b/LeanPool/MatchingLogic/Locality.lean index 82ad5fc23f..40160acf26 100644 --- a/LeanPool/MatchingLogic/Locality.lean +++ b/LeanPool/MatchingLogic/Locality.lean @@ -17,12 +17,17 @@ independently by two lanes in different model families against that same pinned statement. The proof below is the in-house one. `locality` is byte-identical to the pinned form; only the proof body was supplied. -/ -import LeanPool.MatchingLogic.Core +module + +public import LeanPool.MatchingLogic.Core +import Mathlib.Data.Set.Insert /-! # MatchingLogic.Locality -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/Localization.lean b/LeanPool/MatchingLogic/Localization.lean index 2c484fc6f6..6eb661bc35 100644 --- a/LeanPool/MatchingLogic/Localization.lean +++ b/LeanPool/MatchingLogic/Localization.lean @@ -18,12 +18,17 @@ semantically, directly from Lemma 4, and that is the route taken here -- so this file needs no proof system. Lemma 5 itself belongs with the proof system and is not in this file. -/ -import LeanPool.MatchingLogic.Boxes +module + +public import LeanPool.MatchingLogic.Boxes +import Mathlib.Data.Set.Basic /-! # MatchingLogic.Localization -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/Necessity.lean b/LeanPool/MatchingLogic/Necessity.lean index 192627adbf..2a9c76e3ae 100644 --- a/LeanPool/MatchingLogic/Necessity.lean +++ b/LeanPool/MatchingLogic/Necessity.lean @@ -18,12 +18,17 @@ The example is the smallest one that works: `M \ C` must have two points, since `AgreeOn` forces the two valuations to agree whenever their common value lies in `C`, and a one-point complement leaves them equal. -/ -import LeanPool.MatchingLogic.Locality +module + +public import LeanPool.MatchingLogic.Locality +import Mathlib.Data.Set.Insert /-! # MatchingLogic.Necessity -/ +@[expose] public section + namespace MatchingLogic namespace Necessity diff --git a/LeanPool/MatchingLogic/ProofSystem.lean b/LeanPool/MatchingLogic/ProofSystem.lean index a5d6262ee8..88e1837d23 100644 --- a/LeanPool/MatchingLogic/ProofSystem.lean +++ b/LeanPool/MatchingLogic/ProofSystem.lean @@ -43,12 +43,17 @@ DESIGN DECISIONS, fixed before any proof was written: Statements pinned before any proof was attempted. -/ -import LeanPool.MatchingLogic.Composite +module + +public import LeanPool.MatchingLogic.Boxes +import Mathlib.Data.Set.Insert /-! # MatchingLogic.ProofSystem -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/Sanity.lean b/LeanPool/MatchingLogic/Sanity.lean index 56a7d83b82..8cd062cfed 100644 --- a/LeanPool/MatchingLogic/Sanity.lean +++ b/LeanPool/MatchingLogic/Sanity.lean @@ -10,12 +10,19 @@ These are not part of the paper; they exist so that a wrong definition cannot pass unnoticed. Each one would FAIL if the corresponding clause of Section 2 were mis-encoded. -/ -import LeanPool.MatchingLogic.Core +module + +import Mathlib.Data.Set.Insert + +public import LeanPool.MatchingLogic.Core +import Mathlib.Data.Set.Basic /-! # MatchingLogic.Sanity -/ +@[expose] public section + namespace MatchingLogic namespace Model @@ -62,7 +69,7 @@ example : intro S M h have : (false : Bool) ∈ ({true} : Set Bool) := h (by rfl) ⟨(), fun _ => false, ⟨0, Nat.zero_lt_one⟩, trivial, rfl⟩ - simp at this + exact Bool.noConfusion (Set.mem_singleton_iff.mp this) end Model end MatchingLogic diff --git a/LeanPool/MatchingLogic/Semantics.lean b/LeanPool/MatchingLogic/Semantics.lean index 1293a13841..6435c3d6a3 100644 --- a/LeanPool/MatchingLogic/Semantics.lean +++ b/LeanPool/MatchingLogic/Semantics.lean @@ -11,12 +11,17 @@ Free variables, closed patterns, and the three consequence relations Definitions are written by the coordinating session from the paper; the statements below were pinned before any proof was attempted. -/ -import LeanPool.MatchingLogic.Core +module + +public import LeanPool.MatchingLogic.Core +import Mathlib.Data.Set.Insert /-! # MatchingLogic.Semantics -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MatchingLogic/SetVariables.lean b/LeanPool/MatchingLogic/SetVariables.lean index 61f63b2673..11df145544 100644 --- a/LeanPool/MatchingLogic/SetVariables.lean +++ b/LeanPool/MatchingLogic/SetVariables.lean @@ -25,12 +25,17 @@ keeps definedness out of the base language. Statements pinned before any proof was attempted. -/ -import LeanPool.MatchingLogic.EntryPoints +module + +public import LeanPool.MatchingLogic.Semantics +import Mathlib.Data.Set.Insert /-! # MatchingLogic.SetVariables -/ +@[expose] public section + namespace MatchingLogic namespace SetVariables diff --git a/LeanPool/MatchingLogic/Sorted.lean b/LeanPool/MatchingLogic/Sorted.lean index fd22140259..1e115d24b2 100644 --- a/LeanPool/MatchingLogic/Sorted.lean +++ b/LeanPool/MatchingLogic/Sorted.lean @@ -30,12 +30,23 @@ valuation update, which is confined to `mupdate` below. Statements pinned before any proof was attempted. -/ -import LeanPool.MatchingLogic.Core +module + +public import Aesop.BuiltinRules +public import Mathlib.Order.SetNotation +public import Mathlib.Tactic.ToAdditive +import Mathlib.Data.Set.Lattice.Bounded +import Mathlib.Data.Set.Lattice.Disjoint +import Mathlib.Data.Set.Lattice.Image +import Mathlib.Data.Set.Lattice.Indexed +import Mathlib.Data.Set.Lattice.Order /-! # MatchingLogic.Sorted -/ +@[expose] public section + namespace MatchingLogic namespace Sorted diff --git a/LeanPool/MatchingLogic/SortedProof.lean b/LeanPool/MatchingLogic/SortedProof.lean index fbe9bf8264..bd96ac80ed 100644 --- a/LeanPool/MatchingLogic/SortedProof.lean +++ b/LeanPool/MatchingLogic/SortedProof.lean @@ -43,14 +43,23 @@ DESIGN RULINGS: Statements pinned before any proof was attempted. -/ -import LeanPool.MatchingLogic.Sorted -import LeanPool.MatchingLogic.ProofSystem -- for PForm and PForm.Taut +module + +public import LeanPool.MatchingLogic.Sorted +public import LeanPool.MatchingLogic.ProofSystem -- for PForm and PForm.Taut import LeanPool.MatchingLogic.EntryPoints +import Mathlib.Data.Set.Lattice.Bounded +import Mathlib.Data.Set.Lattice.Disjoint +import Mathlib.Data.Set.Lattice.Image +import Mathlib.Data.Set.Lattice.Indexed +import Mathlib.Data.Set.Lattice.Order /-! # MatchingLogic.SortedProof -/ +@[expose] public section + -- `PForm` lives in ProofSystem.lean. Without this import, `autoImplicit` turns -- every mention of it into a fresh type VARIABLE and the file still elaborates -- most of the way, failing later with an unrelated-looking pattern-match error. diff --git a/LeanPool/MatchingLogic/Soundness.lean b/LeanPool/MatchingLogic/Soundness.lean index 1f7d41d27c..a513274df3 100644 --- a/LeanPool/MatchingLogic/Soundness.lean +++ b/LeanPool/MatchingLogic/Soundness.lean @@ -15,13 +15,18 @@ removes one of the two black boxes from Corollary 15. Statement pinned before any proof was attempted. -/ -import LeanPool.MatchingLogic.ProofSystem +module + +public import LeanPool.MatchingLogic.ProofSystem import LeanPool.MatchingLogic.Sanity +import Mathlib.Data.Set.BooleanAlgebra /-! # MatchingLogic.Soundness -/ +@[expose] public section + namespace MatchingLogic variable {S : Signature} {Var : Type} [DecidableEq Var] diff --git a/LeanPool/MetricCodes.lean b/LeanPool/MetricCodes.lean index a3ae88298d..00226faf8a 100644 --- a/LeanPool/MetricCodes.lean +++ b/LeanPool/MetricCodes.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.Conclusion +public import LeanPool.MetricCodes.Conclusion /-! # Improved asymptotic bounds for binary and spherical codes @@ -17,6 +18,8 @@ Tags: coding-theory, spherical-codes, kissing-number, harmonic-analysis, asympto MSC: 94B65, 52C17, 41A60 -/ +@[expose] public section + /-! ## Provenance diff --git a/LeanPool/MetricCodes/Binary.lean b/LeanPool/MetricCodes/Binary.lean index 6bf963dda0..e6c9dd0f14 100644 --- a/LeanPool/MetricCodes/Binary.lean +++ b/LeanPool/MetricCodes/Binary.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.Foundations +public import LeanPool.MetricCodes.Foundations +import all Mathlib.Analysis.SpecialFunctions.BinaryEntropy /-! # Binary-code asymptotics @@ -12,6 +14,8 @@ import LeanPool.MetricCodes.Foundations Asymptotic Johnson-scheme estimates and the binary-code variational bound. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable namespace MetricCodes @@ -934,13 +938,16 @@ section open scoped BigOperators InnerProductSpace Matrix -private def complementNegEquiv {n w : ℕ} (x : JohnsonSphere n w) : +/-- The identification of complement coordinates with coordinates outside the binary word's +support. -/ +def complementNegEquiv {n w : ℕ} (x : JohnsonSphere n w) : ComplementCoordinates x ≃ {i : Fin n // i ∉ MetricCodes.wordSupport (x : BinaryWord n)} := Equiv.subtypeEquivRight (fun i => by simp only [Finset.mem_sdiff, Finset.mem_univ, mem_wordSupport, Bool.not_eq_true, true_and]) -private def coordinateSumEquiv {n w : ℕ} (x : JohnsonSphere n w) : +/-- The partition of all word coordinates into support and complement coordinates. -/ +def coordinateSumEquiv {n w : ℕ} (x : JohnsonSphere n w) : SupportCoordinates x ⊕ ComplementCoordinates x ≃ Fin n := (Equiv.sumCongr (Equiv.refl (SupportCoordinates x)) (complementNegEquiv x)).trans @@ -961,7 +968,8 @@ private def coordinateSumEquiv {n w : ℕ} (x : JohnsonSphere n w) : simpa only [hi] using (coordinateSumEquiv x).symm_apply_apply (Sum.inr i) -private def coordinateSplitEquiv {n w : ℕ} (x : JohnsonSphere n w) : +/-- The equivalence splitting a finite coordinate set into its support and complement parts. -/ +def coordinateSplitEquiv {n w : ℕ} (x : JohnsonSphere n w) : Finset (Fin n) ≃ Finset (SupportCoordinates x) × Finset (ComplementCoordinates x) := @@ -1021,7 +1029,8 @@ theorem coordinateSplitEquiv_insert_complement {n w : ℕ} simp only [Equiv.finsetCongr_apply, Finset.map_insert, Function.Embedding.coeFn_mk, coordinateSumEquiv_symm_complement, Finset.toRight_insert_inr] -private def supportRaisedFunction {n w p : ℕ} +/-- A raised Boolean harmonic basis function transported to the support coordinates of `x`. -/ +def supportRaisedFunction {n w p : ℕ} (x : JohnsonSphere n w) (hp : 2 * p ≤ w) (a : Fin (MetricCodes.hammingFibreDimension w p)) (r : ℕ) : Finset (SupportCoordinates x) → ℝ := @@ -1030,7 +1039,8 @@ private def supportRaisedFunction {n w p : ℕ} (MetricCodes.Boolean.harmonicBasisFunction w p hp a) ((supportCoordinateEquiv x).finsetCongr S) -private def complementRaisedFunction {n w q : ℕ} +/-- A raised Boolean harmonic basis function transported to the complement coordinates of `x`. -/ +def complementRaisedFunction {n w q : ℕ} (x : JohnsonSphere n w) (hq : 2 * q ≤ n - w) (a : Fin (MetricCodes.hammingFibreDimension (n - w) q)) (r : ℕ) : Finset (ComplementCoordinates x) → ℝ := @@ -1154,7 +1164,8 @@ theorem supportRaisedFunction_cross_orthogonal {n w p : ℕ} · rw [supportRaisedFunction_eq_zero_of_card_ne x hp a r S hS, zero_mul] -private def splitTensor {n w p q : ℕ} +/-- The product of raised support and complement harmonics after splitting a coordinate set. -/ +def splitTensor {n w p q : ℕ} (x : JohnsonSphere n w) (hp : 2 * p ≤ w) (hq : 2 * q ≤ n - w) (a : HarmonicFibreIndex n w p q) (r s : ℕ) : @@ -1257,7 +1268,8 @@ theorem splitTensor_cross_orthogonal {n w p q : ℕ} supportRaisedFunction_cross_orthogonal x hp a.1 b.1 r r' hrr', zero_mul] -private def clebschCoefficient (w N p q t : ℕ) : ℕ → ℝ +/-- The recursively defined Clebsch coupling coefficients, normalized to start at one. -/ +def clebschCoefficient (w N p q t : ℕ) : ℕ → ℝ | 0 => 1 | r + 1 => -clebschCoefficient w N p q t r * @@ -1282,7 +1294,8 @@ theorem clebschCoefficient_succ_mul {w N p q t r : ℕ} simp only [clebschCoefficient] field_simp [hnonzero] -private def clebschNormSq (w N p q t : ℕ) : ℝ := +/-- The sum of squared Clebsch coefficients used to normalize a coupled tensor. -/ +def clebschNormSq (w N p q t : ℕ) : ℝ := ∑ r : Fin (t + 1), clebschCoefficient w N p q t r.val ^ 2 @@ -1298,7 +1311,8 @@ theorem clebschNormSq_pos (w N p q t : ℕ) : change 0 < clebschCoefficient w N p q t 0 ^ 2 norm_num [clebschCoefficient] -private def coupledTensor {n w p q : ℕ} +/-- The sum of split harmonic tensors weighted by Clebsch coupling coefficients. -/ +def coupledTensor {n w p q : ℕ} (x : JohnsonSphere n w) (hp : 2 * p ≤ w) (hq : 2 * q ≤ n - w) (a : HarmonicFibreIndex n w p q) (t : ℕ) : @@ -1532,7 +1546,8 @@ theorem coupledHarmonic_dot {n w p q t : ℕ} change (i : Fin n) ∈ S ↔ (i : Fin n) ∈ S rfl -private def coordinateLower {α : Type*} [Fintype α] [DecidableEq α] +/-- The Boolean lowering operator, summing over all one-element extensions of a coordinate set. -/ +def coordinateLower {α : Type*} [Fintype α] [DecidableEq α] (f : Finset α → ℝ) (S : Finset α) : ℝ := ∑ i : α, if i ∈ S then 0 else f (insert i S) @@ -2263,7 +2278,8 @@ def johnsonProjectionFamily {n w p q L : ℕ} johnsonFibreMatrix_transpose_mul h v hv x] simp only [Matrix.trace_one, Fintype.card_fin] -private def johnsonHarmonicGap (n j : ℕ) : ℝ := +/-- The harmonic gap `n - 2 * j` controlling the Johnson channel normalizations. -/ +def johnsonHarmonicGap (n j : ℕ) : ℝ := (n : ℝ) - 2 * (j : ℝ) theorem johnsonHarmonicGap_pos {n j : ℕ} @@ -2274,12 +2290,14 @@ theorem johnsonHarmonicGap_pos {n j : ℕ} unfold johnsonHarmonicGap linarith -private def johnsonMiddleScale (n j : ℕ) : ℝ := +/-- The squared norm factor used to normalize the middle Johnson channel. -/ +def johnsonMiddleScale (n j : ℕ) : ℝ := (j : ℝ) * johnsonHarmonicGap n j * ((n : ℝ) - (j : ℝ) + 1) / ((n : ℝ) * (johnsonHarmonicGap n j + 2)) -private def johnsonUpperScale (n j : ℕ) : ℝ := +/-- The squared norm factor used to normalize the upper Johnson channel. -/ +def johnsonUpperScale (n j : ℕ) : ℝ := (johnsonHarmonicGap n j - 1) * ((n : ℝ) - (j : ℝ) + 1) / (johnsonHarmonicGap n j + 1) @@ -2415,7 +2433,9 @@ theorem johnsonBooleanLower_sub {n : ℕ} MetricCodes.Boolean.lowerLinear n g exact map_sub (MetricCodes.Boolean.lowerLinear n) f g -private def johnsonMiddleRaw {n : ℕ} (j : ℕ) +/-- The unnormalized middle Johnson channel at coordinate `a`, with lower-degree components +removed. -/ +def johnsonMiddleRaw {n : ℕ} (j : ℕ) (a : Fin n) (f : MetricCodes.Boolean.Function n) : MetricCodes.Boolean.Function n := MetricCodes.Boolean.raiseAt a (MetricCodes.Boolean.lowerAt a f) - @@ -2492,7 +2512,8 @@ theorem johnsonMiddleRaw_isHarmonic {n j : ℕ} smul_eq_mul, Pi.zero_apply, mul_zero, sub_zero] field_simp [hden]; simp only [sub_self, mul_zero] -private def johnsonUpperRaw {n : ℕ} (j : ℕ) +/-- The unnormalized upper Johnson channel obtained by correcting coordinate raising terms. -/ +def johnsonUpperRaw {n : ℕ} (j : ℕ) (a : Fin n) (f : MetricCodes.Boolean.Function n) : MetricCodes.Boolean.Function n := MetricCodes.Boolean.raiseAt a f - @@ -3065,7 +3086,9 @@ theorem johnsonMiddleRaw_coordinateDot {n j : ℕ} unfold johnsonHarmonicGap ring -private def johnsonMiddleChannel {n : ℕ} (j : ℕ) +/-- The coordinate family of middle Johnson channels normalized by the square root of its norm +factor. -/ +def johnsonMiddleChannel {n : ℕ} (j : ℕ) (f : MetricCodes.Boolean.Function n) : MetricCodes.Boolean.CoordinateFunction n := fun a => @@ -3432,7 +3455,9 @@ theorem johnsonUpperRaw_coordinateDot {n j : ℕ} unfold johnsonHarmonicGap ring -private def johnsonUpperChannel {n : ℕ} (j : ℕ) +/-- The coordinate family of upper Johnson channels normalized by the square root of its norm +factor. -/ +def johnsonUpperChannel {n : ℕ} (j : ℕ) (f : MetricCodes.Boolean.Function n) : MetricCodes.Boolean.CoordinateFunction n := fun a => @@ -3501,7 +3526,8 @@ theorem johnsonUpperChannel_isometry {n j : ℕ} _ = MetricCodes.Boolean.dot f g := by rw [hscalar, one_mul] -private def johnsonLowerChannel {n : ℕ} (j : ℕ) +/-- The lower Johnson channel, given by the normalized Boolean deletion channel. -/ +def johnsonLowerChannel {n : ℕ} (j : ℕ) (f : MetricCodes.Boolean.Function n) : MetricCodes.Boolean.CoordinateFunction n := MetricCodes.Boolean.deleteChannel j f @@ -3859,7 +3885,8 @@ theorem johnsonUpperChannel_isHarmonic {n j : ℕ} (johnsonUpperRaw_isHarmonic f hf hhalf a) (Real.sqrt (johnsonUpperScale n j))⁻¹ -private def johnsonDiagonalChannelSign +/-- The sign of the Johnson diagonal coefficient, taking value one when the coefficient is zero. -/ +def johnsonDiagonalChannelSign (n w p q j : ℕ) : ℝ := if 0 ≤ MetricCodes.johnsonDiagonal n w p q j then 1 else -1 @@ -4256,19 +4283,23 @@ def johnsonAxisTensor {n w : ℕ} MetricCodes.Boolean.CoordinateFunction n := fun a => (geometricAxis x a) • f -private def johnsonAxisRaise {n w : ℕ} +/-- The sum of coordinate-raising operators weighted by the geometric axis of `x`. -/ +def johnsonAxisRaise {n w : ℕ} (x : JohnsonSphere n w) (f : MetricCodes.Boolean.Function n) : MetricCodes.Boolean.Function n := fun S => ∑ a : Fin n, geometricAxis x a * MetricCodes.Boolean.raiseAt a f S -private def johnsonAxisLower {n w : ℕ} +/-- The sum of coordinate-lowering operators weighted by the geometric axis of `x`. -/ +def johnsonAxisLower {n w : ℕ} (x : JohnsonSphere n w) (f : MetricCodes.Boolean.Function n) : MetricCodes.Boolean.Function n := fun S => ∑ a : Fin n, geometricAxis x a * MetricCodes.Boolean.lowerAt a f S -private def johnsonAxisMembership {n w : ℕ} +/-- The geometric-axis-weighted coordinate membership operator, expressed by raising after +lowering. -/ +def johnsonAxisMembership {n w : ℕ} (x : JohnsonSphere n w) (f : MetricCodes.Boolean.Function n) : MetricCodes.Boolean.Function n := fun S => ∑ a : Fin n, @@ -4774,7 +4805,9 @@ theorem coordinateSplitEquiv_erase_complement {n w : ℕ} coordinateSumEquiv_symm_complement, Finset.mem_toRight, Finset.mem_erase, ne_eq, Sum.inr.injEq, Finset.mem_map_equiv, Equiv.symm_symm] -private def coordinateRaise {α : Type*} [Fintype α] [DecidableEq α] +/-- The Boolean raising operator, summing the function over one-element deletions of a +coordinate set. -/ +def coordinateRaise {α : Type*} [Fintype α] [DecidableEq α] (f : Finset α → ℝ) (S : Finset α) : ℝ := ∑ i : α, if i ∈ S then f (S.erase i) else 0 @@ -5127,13 +5160,15 @@ theorem sum_coordinateIndicator_mul_function {n w : ℕ} (MetricCodes.wordSupport (x : BinaryWord n)) (fun i => Iff.rfl) F -private def johnsonSupportRaise {n w : ℕ} +/-- The sum of Boolean raising operators over coordinates in the support of `x`. -/ +def johnsonSupportRaise {n w : ℕ} (x : JohnsonSphere n w) (f : MetricCodes.Boolean.Function n) : MetricCodes.Boolean.Function n := fun S => ∑ i : SupportCoordinates x, MetricCodes.Boolean.raiseAt (i : Fin n) f S -private def johnsonSupportLower {n w : ℕ} +/-- The sum of Boolean lowering operators over coordinates in the support of `x`. -/ +def johnsonSupportLower {n w : ℕ} (x : JohnsonSphere n w) (f : MetricCodes.Boolean.Function n) : MetricCodes.Boolean.Function n := fun S => ∑ i : SupportCoordinates x, @@ -5814,11 +5849,13 @@ theorem clebschCoefficient_sq_succ_mul rw [mul_pow, Real.sq_sqrt hsecond] ring -private def clebschFirstMoment (w N p q t : ℕ) : ℝ := +/-- The unnormalized first moment of the degree index weighted by squared Clebsch coefficients. -/ +def clebschFirstMoment (w N p q t : ℕ) : ℝ := ∑ r : Fin (t + 1), (r.val : ℝ) * clebschCoefficient w N p q t r.val ^ 2 -private def clebschSecondMoment (w N p q t : ℕ) : ℝ := +/-- The unnormalized second moment of the degree index weighted by squared Clebsch coefficients. -/ +def clebschSecondMoment (w N p q t : ℕ) : ℝ := ∑ r : Fin (t + 1), (r.val : ℝ) ^ 2 * clebschCoefficient w N p q t r.val ^ 2 @@ -7862,7 +7899,8 @@ theorem johnsonSourceChannelCoefficient_sq rw [Real.sq_sqrt hsource, Real.sq_sqrt htarget] ring -private def johnsonAdjacentRawScalar +/-- The scalar coupling adjacent Clebsch degrees before Johnson channel normalization. -/ +def johnsonAdjacentRawScalar (n w p q t : ℕ) : ℝ := Real.sqrt ((n : ℝ) / ((w : ℝ) * ((n - w : ℕ) : ℝ))) * @@ -7871,12 +7909,14 @@ private def johnsonAdjacentRawScalar (Real.sqrt (clebschNormSq w (n - w) p q t) / Real.sqrt (clebschNormSq w (n - w) p q (t + 1))) -private def johnsonLowerOffDiagonalScalar +/-- The adjacent-degree coupling scalar normalized for the lower Johnson channel. -/ +def johnsonLowerOffDiagonalScalar (n w p q t : ℕ) : ℝ := (Real.sqrt (((p + q + (t + 1) : ℕ) : ℝ)))⁻¹ * johnsonAdjacentRawScalar n w p q t -private def johnsonUpperOffDiagonalScalar +/-- The adjacent-degree coupling scalar normalized for the upper Johnson channel. -/ +def johnsonUpperOffDiagonalScalar (n w p q t : ℕ) : ℝ := (Real.sqrt (johnsonUpperScale n (p + q + t)))⁻¹ * johnsonAdjacentRawScalar n w p q t diff --git a/LeanPool/MetricCodes/Branching.lean b/LeanPool/MetricCodes/Branching.lean index 7f7e76898a..1ef328cd9e 100644 --- a/LeanPool/MetricCodes/Branching.lean +++ b/LeanPool/MetricCodes/Branching.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.MatrixPerron -import LeanPool.MetricCodes.Representation -import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected -import Mathlib.RingTheory.MvPolynomial.Groebner -import Mathlib.RingTheory.Regular.RegularSequence +public import LeanPool.MetricCodes.MatrixPerron +public import LeanPool.MetricCodes.Representation +public import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected +public import Mathlib.RingTheory.MvPolynomial.Groebner +public import Mathlib.RingTheory.Regular.RegularSequence /-! # Harmonic Young branching @@ -16,6 +17,8 @@ import Mathlib.RingTheory.Regular.RegularSequence Trace ideals, Clebsch decompositions, and arbitrary-rank branching constructions. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable namespace MetricCodes @@ -684,7 +687,8 @@ theorem FiniteInterlacing.antitone_ambient {r n : ℕ} intro i exact (h.2 i).2.trans (h.2 i).1 -private def pairEdgeRatio {r : ℕ} +/-- The ratio of pair factors when the selected shifted ambient coordinate is increased by one. -/ +def pairEdgeRatio {r : ℕ} (L : Fin (r + 1) → ℝ) (ℓ j : Fin (r + 1)) : ℝ := ((L ℓ + 1) ^ 2 - L j ^ 2) / (L ℓ ^ 2 - L j ^ 2) @@ -809,7 +813,8 @@ theorem incidentPairProduct {r : ℕ} · simp only [hlt, ↓reduceIte, ne_of_lt hlt] · simp only [hlt, ↓reduceIte] -private def rowEdgeRatio {r : ℕ} (n : ℕ) +/-- The row factor in the Weyl-dimension ratio for increasing row `ℓ` by one. -/ +def rowEdgeRatio {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (ℓ : Fin (r + 1)) : ℝ := let L := ambientShift n lam ℓ let rho := wallShift n r @@ -1051,7 +1056,8 @@ def nextVertex {r m : ℕ} (v : BoxVertex r m) (i : Fin (r + 1)) (h : (v i).val < m) : BoxVertex r m := Function.update v i ⟨(v i).val + 1, by omega⟩ -private def forwardMatrix {r m : ℕ} +/-- The weighted forward adjacency matrix of the rectangular box of signatures. -/ +def forwardMatrix {r m : ℕ} (edge : BoxVertex r m → Fin (r + 1) → ℝ) : Matrix (BoxVertex r m) (BoxVertex r m) ℝ := Matrix.of fun v w => @@ -1060,7 +1066,8 @@ private def forwardMatrix {r m : ℕ} if w = nextVertex v i h then edge v i else 0 else 0 -private def adjacencyMatrix {r m : ℕ} +/-- The symmetric box adjacency matrix obtained by adding the forward matrix to its transpose. -/ +def adjacencyMatrix {r m : ℕ} (edge : BoxVertex r m → Fin (r + 1) → ℝ) : Matrix (BoxVertex r m) (BoxVertex r m) ℝ := forwardMatrix edge + (forwardMatrix edge)ᵀ @@ -1161,7 +1168,8 @@ theorem adjacencyMatrix_sum {r m : ℕ} rw [htranspose, forwardMatrix_sum] ring -private def constantRayleigh {r m : ℕ} +/-- The Rayleigh quotient of the constant vector for the weighted box adjacency matrix. -/ +def constantRayleigh {r m : ℕ} (edge : BoxVertex r m → Fin (r + 1) → ℝ) : ℝ := (∑ v : BoxVertex r m, ∑ w : BoxVertex r m, adjacencyMatrix edge v w) / @@ -1380,7 +1388,8 @@ theorem eventually_finiteInterlacing_all {r m : ℕ} intro v exact ⟨hstable, (hn v).interlaces⟩ -private def correctedSignature {r m : ℕ} +/-- The signature when it is dominant, with the floored ambient weight as a dominant fallback. -/ +def correctedSignature {r m : ℕ} (a : Fin (r + 1) → ℝ) (v : ℕ → Vertex r m) (n : ℕ) : Fin (r + 1) → ℕ := if Antitone (signature a n (v n)) then @@ -2238,7 +2247,8 @@ def probability {r m : ℕ} forwardMatrix (plusEdge (m := m) a b n) v w + forwardMatrix (minusEdge (m := m) a b n) w v -private def vertexWeylDimension {r m : ℕ} +/-- The Weyl dimension evaluated at the signature attached to a rectangular-box vertex. -/ +def vertexWeylDimension {r m : ℕ} (a : Fin (r + 1) → ℝ) (n : ℕ) (v : Vertex r m) : ℝ := Weyl.dimension n (signature a n v) @@ -2471,7 +2481,8 @@ namespace HigherHierarchyBoxPerron open MetricCodes.Spherical.HigherHierarchy open MetricCodes.Spherical.HigherHierarchyBoxSpectral -private def constantVector (r m : ℕ) : +/-- The vector with every box-vertex coordinate equal to one. -/ +def constantVector (r m : ℕ) : HigherHierarchyFinitePerron.Space (BoxVertex r m) := WithLp.toLp 2 fun _ : BoxVertex r m => (1 : ℝ) @@ -3075,7 +3086,8 @@ abbrev YoungCoordinateAmbient {I : Type*} {r : ℕ} (n : ℕ) (lam : I → Fin (r + 1) → ℕ) := SpherePacking.Euclidean n ⊗[ℝ] YoungAmbient n lam -private def coordinateInclusion {I : Type*} [Fintype I] [DecidableEq I] +/-- The tensor-product inclusion of one Young vertex into the full coordinate ambient space. -/ +def coordinateInclusion {I : Type*} [Fintype I] [DecidableEq I] {r n : ℕ} (lam : I → Fin (r + 1) → ℕ) (i : I) : (SpherePacking.Euclidean n ⊗[ℝ] YoungVertex (n := n) lam i) →ₗᵢ[ℝ] YoungCoordinateAmbient n lam := @@ -3161,7 +3173,9 @@ theorem coordinateInclusion_orthogonal rw [coordinateInclusion_orthogonal lam hij] rfl -private def liftChannel {I : Type*} [Fintype I] [DecidableEq I] +/-- The ambient channel obtained by projecting to a source vertex and including the target +tensor space. -/ +def liftChannel {I : Type*} [Fintype I] [DecidableEq I] {r n : ℕ} (lam : I → Fin (r + 1) → ℕ) (target source : I) (T : YoungVertex (n := n) lam source →ₗᵢ[ℝ] (SpherePacking.Euclidean n ⊗[ℝ] YoungVertex (n := n) lam target)) : @@ -3340,7 +3354,9 @@ theorem liftChannel_adjoint_axis_ne rw [coordinateInclusion_adjoint_axis_ne lam target j h, map_zero, map_zero] -private def actualYoungChannel +/-- The lifted Young edge channel when its transition probability is positive, and zero +otherwise. -/ +def actualYoungChannel {I : Type*} [Fintype I] [DecidableEq I] {r n : ℕ} (lam : I → Fin (r + 1) → ℕ) (probability : I → I → ℝ) @@ -3354,7 +3370,9 @@ private def actualYoungChannel liftChannel lam target source (edge target source h) else 0 -private def actualYoungHilbertGraph +/-- The realized Hilbert graph assembled from Young vertex fibres and their isometric edge +channels. -/ +def actualYoungHilbertGraph {I : Type*} [Fintype I] [DecidableEq I] {r n : ℕ} {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] @@ -3684,7 +3702,8 @@ theorem BoxRepresentationData.detailed_balance {r m n : ℕ} ((Fintype.equivFin (RectangularVertices.Vertex (r + 1) m)).symm source) -private def indexedEigenvector {r m : ℕ} +/-- The box eigenvector reindexed by the canonical finite enumeration of rectangular vertices. -/ +def indexedEigenvector {r m : ℕ} (x : RectangularVertices.Vertex r m → ℝ) (i : BoxIndex r m) : ℝ := x ((Fintype.equivFin (RectangularVertices.Vertex r m)).symm i) @@ -4385,7 +4404,8 @@ def gramPivotExponent {r n : ℕ} (hn : 2 * r < n) Finsupp.single (variableIndex z.val.1 (gramPivot hn z)) 1 + Finsupp.single (variableIndex z.val.2 (gramPivot hn z)) 1 -private def gramSummandExponent {r n : ℕ} +/-- The monomial exponent of one coordinate summand in a Gram pairing. -/ +def gramSummandExponent {r n : ℕ} (z : UpperGramPair r) (k : Fin n) : Fin ((r + 1) * n) →₀ ℕ := Finsupp.single (variableIndex z.val.1 k) 1 + @@ -4454,12 +4474,14 @@ theorem coeff_gramPairPolynomial_pivot {r n : ℕ} hk ((gramSummandExponent_eq_pivot_iff hn z k).mp h)) · simp only [Finset.mem_univ, not_true_eq_false, IsEmpty.forall_iff] -private def gramVariableWeight (r n : ℕ) +/-- The quadratic integer variable weight used to distinguish the leading Gram monomial. -/ +def gramVariableWeight (r n : ℕ) (i : Fin (r + 1)) (k : Fin n) : ℤ := ((n + 2 * r : ℕ) : ℤ) ^ 2 - ((k.val : ℤ) - 2 * (i.val : ℤ)) ^ 2 -private def gramSummandWeight {r n : ℕ} +/-- The sum of the two variable weights in a coordinate summand of a Gram pairing. -/ +def gramSummandWeight {r n : ℕ} (z : UpperGramPair r) (k : Fin n) : ℤ := gramVariableWeight r n z.val.1 k + gramVariableWeight r n z.val.2 k @@ -4499,19 +4521,22 @@ section open Finsupp open scoped MonomialOrder -private def YoungWeightedLex {σ : Type*} (_w : σ → ℕ) := σ →₀ ℕ +/-- A copy of exponent vectors carrying the weighted lexicographic ordering. -/ +def YoungWeightedLex {σ : Type*} (_w : σ → ℕ) := σ →₀ ℕ -private def toYoungWeightedLex {σ : Type*} (w : σ → ℕ) : +/-- The identity equivalence from exponent vectors to their weighted-lexicographic copy. -/ +def toYoungWeightedLex {σ : Type*} (w : σ → ℕ) : (σ →₀ ℕ) ≃ YoungWeightedLex w := Equiv.refl _ -private def ofYoungWeightedLex {σ : Type*} (w : σ → ℕ) : +/-- The identity equivalence from the weighted-lexicographic copy back to exponent vectors. -/ +def ofYoungWeightedLex {σ : Type*} (w : σ → ℕ) : YoungWeightedLex w ≃ (σ →₀ ℕ) := Equiv.refl _ namespace YoungWeightedLex variable {σ : Type*} (w : σ → ℕ) -noncomputable instance : AddCommMonoid (YoungWeightedLex w) := +noncomputable instance instAddCommMonoidYoungWeightedLex : AddCommMonoid (YoungWeightedLex w) := (ofYoungWeightedLex w).addCommMonoid @[simp] theorem toYoungWeightedLex_add (a b : σ →₀ ℕ) : @@ -4526,21 +4551,22 @@ section LinearOrder variable [LinearOrder σ] -private def key_metriccodes2_a7f44027 (a : YoungWeightedLex w) : Lex (ℕ × Lex (σ →₀ ℕ)) := +/-- The lexicographic key comparing total weight first and then the exponent vector. -/ +def key (a : YoungWeightedLex w) : Lex (ℕ × Lex (σ →₀ ℕ)) := toLex ((Finsupp.weight w) (ofYoungWeightedLex w a), toLex (ofYoungWeightedLex w a)) omit [LinearOrder σ] in -private theorem key_injective_metriccodes2_a7f44027 : Function.Injective - (key_metriccodes2_a7f44027 w) := by +theorem key_injective_metriccodes2_a7f44027 : Function.Injective + (key w) := by intro a b hab have h := congrArg (fun z : Lex (ℕ × Lex (σ →₀ ℕ)) => (ofLex z).2) hab exact (ofYoungWeightedLex w).injective ((toLex (α := σ →₀ ℕ)).injective h) -noncomputable instance : LinearOrder (YoungWeightedLex w) := - LinearOrder.lift' (key_metriccodes2_a7f44027 w) (key_injective_metriccodes2_a7f44027 w) +noncomputable instance instLinearOrderYoungWeightedLex : LinearOrder (YoungWeightedLex w) := + LinearOrder.lift' (key w) (key_injective_metriccodes2_a7f44027 w) theorem lt_iff {a b : YoungWeightedLex w} : a < b ↔ @@ -4550,7 +4576,7 @@ theorem lt_iff {a b : YoungWeightedLex w} : (Finsupp.weight w) (ofYoungWeightedLex w b) ∧ toLex (ofYoungWeightedLex w a) < toLex (ofYoungWeightedLex w b) := by - change key_metriccodes2_a7f44027 w a < key_metriccodes2_a7f44027 w b ↔ _ + change key w a < key w b ↔ _ exact Prod.Lex.toLex_lt_toLex theorem le_iff {a b : YoungWeightedLex w} : @@ -4561,10 +4587,11 @@ theorem le_iff {a b : YoungWeightedLex w} : (Finsupp.weight w) (ofYoungWeightedLex w b) ∧ toLex (ofYoungWeightedLex w a) ≤ toLex (ofYoungWeightedLex w b) := by - change key_metriccodes2_a7f44027 w a ≤ key_metriccodes2_a7f44027 w b ↔ _ + change key w a ≤ key w b ↔ _ exact Prod.Lex.toLex_le_toLex -instance : IsOrderedCancelAddMonoid (YoungWeightedLex w) where +instance instIsOrderedCancelAddMonoidYoungWeightedLex : + IsOrderedCancelAddMonoid (YoungWeightedLex w) where le_of_add_le_add_left a b c h := by rw [le_iff] at h ⊢ simpa only [ofYoungWeightedLex_add, map_add, add_lt_add_iff_left, @@ -4576,7 +4603,7 @@ instance : IsOrderedCancelAddMonoid (YoungWeightedLex w) where variable [WellFoundedGT σ] -instance : WellFoundedLT (YoungWeightedLex w) := by +instance instWellFoundedLTYoungWeightedLex : WellFoundedLT (YoungWeightedLex w) := by have hlex : WellFounded (Finsupp.Lex (α := σ) (· < ·) (· < ·)) := Finsupp.Lex.wellFounded' (fun _ => Nat.not_lt_zero _) (inferInstance : WellFoundedLT ℕ) wellFounded_gt @@ -4941,7 +4968,9 @@ theorem mem_ofList_iff_exists_linearCombination refine ⟨g, ?_⟩ simpa only [Finsupp.sum, Finsupp.linearCombination_apply, smul_eq_mul] using hg -private def representationDegree {σ K ι : Type*} [Field K] +/-- The maximum monomial-order degree of the summands in a finitely supported polynomial +representation. -/ +def representationDegree {σ K ι : Type*} [Field K] (m : MonomialOrder σ) (b : ι → MvPolynomial σ K) (g : ι →₀ MvPolynomial σ K) : m.syn := @@ -5789,7 +5818,9 @@ theorem finsupp_le_add_of_disjoint_support (Finsupp.mem_support_iff.mpr hb) simpa only [ge_iff_le, Finsupp.coe_add, Pi.add_apply, hb, zero_add] using hle k -private def IsLeadingGroebnerFamily +/-- The leading-degree condition that every nonzero ideal element has degree above some +generator. -/ +def IsLeadingGroebnerFamily {σ K : Type*} [Field K] (m : MonomialOrder σ) (fs : List (MvPolynomial σ K)) : Prop := ∀ p : MvPolynomial σ K, p ∈ Ideal.ofList fs → p ≠ 0 → diff --git a/LeanPool/MetricCodes/Conclusion.lean b/LeanPool/MetricCodes/Conclusion.lean index cd07b44b50..f93fcccccd 100644 --- a/LeanPool/MetricCodes/Conclusion.lean +++ b/LeanPool/MetricCodes/Conclusion.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.SpectralDecomposition +public import LeanPool.MetricCodes.SpectralDecomposition /-! # Binary and spherical code bounds @@ -12,6 +13,8 @@ import LeanPool.MetricCodes.SpectralDecomposition The unconditional characteristic-minor argument and the final headline theorems. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable namespace MetricCodes @@ -87,7 +90,9 @@ theorem fixedLevelHierarchyCodeBound_of_extraStrongCanonicalFischerRecurrence (canonicalBoxReverseAxisRange_of_strongStable a b hstable hgram hnstrong low high row hrow) -private def ActualBoxAxisCharacteristicMinor +/-- The characteristic-minor identity for a box fibre: the compressed minor equals the inner- +product constant times the channel numerator polynomial. -/ +def ActualBoxAxisCharacteristicMinor {r m n : ℕ} (a : Fin (r + 2) → ℝ) (b : Fin (r + 1) → ℝ) (hstable : ∀ v : RectangularVertices.Vertex (r + 1) m, @@ -112,7 +117,9 @@ private def ActualBoxAxisCharacteristicMinor (HigherChannel.stabilizerShift (n + 1) (Weyl.flooredWeight b (n + 1))) -private def ActualBoxSelectedAxisProjectorAgreement +/-- Agreement of the Cartan characteristic projector and the selected Clebsch range projector on +the canonical box-axis tensor image. -/ +def ActualBoxSelectedAxisProjectorAgreement {r m n : ℕ} (a : Fin (r + 2) → ℝ) (b : Fin (r + 1) → ℝ) (hstable : ∀ v : RectangularVertices.Vertex (r + 1) m, @@ -1176,7 +1183,8 @@ theorem gtStabilizerRelativeCasimir_lowerTarget_eigenvalue {r n : ℕ} (n := n) mu nu row hnu linarith -private def gtStabilizerShiftedRelativeCasimir {r n : ℕ} +/-- The stabilizer relative Casimir shifted by one half of the identity. -/ +def gtStabilizerShiftedRelativeCasimir {r n : ℕ} (nu : Fin (r + 1) → ℕ) : Module.End ℝ (SpherePacking.Euclidean n ⊗[ℝ] HarmonicYoungSpace (n := n) nu) := @@ -1250,7 +1258,8 @@ open MetricCodes.Spherical.HigherHarmonicYoung.MixedSignature open MetricCodes.Spherical.HigherRepresentationGraph open MetricCodes.Spherical.HigherYoungAllRankGTArrowheadSchurComplement -private def gtTransverseEuclidean (n : ℕ) : +/-- The linear embedding of Euclidean space obtained by appending a zero coordinate. -/ +def gtTransverseEuclidean (n : ℕ) : SpherePacking.Euclidean n →ₗ[ℝ] SpherePacking.Euclidean (n + 1) where toFun x := WithLp.toLp 2 (Fin.snoc (WithLp.ofLp x) 0) map_add' x y := by @@ -1283,7 +1292,8 @@ theorem gtTransverseEuclidean_inner rw [PiLp.inner_apply, Fin.sum_univ_castSucc] simp [PiLp.inner_apply] -private def gtTransverseEuclideanIsometry (n : ℕ) : +/-- The isometric embedding of Euclidean space obtained by appending a zero coordinate. -/ +def gtTransverseEuclideanIsometry (n : ℕ) : SpherePacking.Euclidean n →ₗᵢ[ℝ] SpherePacking.Euclidean (n + 1) := (gtTransverseEuclidean n).isometryOfInner (gtTransverseEuclidean_inner n) @@ -1306,7 +1316,9 @@ theorem gtTransverseEuclideanIsometry_orthogonal_last rw [EuclideanSpace.inner_basisFun_real, gtTransverseEuclideanIsometry_last] -private def gtTransverseTensorEmbedding +/-- The tensor isometry combining the transverse Euclidean inclusion with a canonical +Gelfand–Tsetlin fibre. -/ +def gtTransverseTensorEmbedding {r n : ℕ} (lam : Fin (r + 2) → ℕ) (nu : Fin (r + 1) → ℕ) (h : Interlaces lam nu) @@ -1350,7 +1362,9 @@ theorem gtTransverseTensorEmbedding_axis_inner_eq_zero | add x y hx hy => rw [map_add, inner_add_left, hx, hy, zero_add] -private def gtTransverseNegativeSector +/-- The transverse negative-sector map obtained by composing Clebsch raising with the transverse +tensor embedding. -/ +def gtTransverseNegativeSector {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (row : Fin (r + 1)) (hnu : Interlaces lam (raiseWeight mu row)) @@ -1364,7 +1378,9 @@ private def gtTransverseNegativeSector (youngClebschRaise (raiseWeight mu row) mu (sum_raiseWeight mu row) row) -private def gtTransversePositiveSector +/-- The transverse positive-sector map obtained by composing Clebsch lowering with the +transverse tensor embedding. -/ +def gtTransversePositiveSector {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu nu : Fin (r + 1) → ℕ) (row : Fin (r + 1)) (hmu : mu = raiseWeight nu row) @@ -1882,7 +1898,9 @@ theorem gtTransverseNegativeSector_gram_pos canonicalEdgeRaisingGram mu kappa row hfinite hraise simpa only [heq] using hc -private def normalizedGTTransverseNegativeSector +/-- The transverse negative-sector map normalized by its positive Gram scalar to a linear +isometry. -/ +def normalizedGTTransverseNegativeSector {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (kappa : Fin r → ℕ) (row : Fin (r + 1)) @@ -1973,7 +1991,9 @@ theorem gtTransversePositiveSector_gram_pos exact canonicalEdge_raiseWeight_strictly_removable nu hdominant row j hj -private def normalizedGTTransversePositiveSector +/-- The transverse positive-sector map normalized by its positive Gram scalar to a linear +isometry. -/ +def normalizedGTTransversePositiveSector {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu nu : Fin (r + 1) → ℕ) (row : Fin (r + 1)) (hmunu : mu = raiseWeight nu row) @@ -2330,7 +2350,9 @@ private theorem appendZeroWeight_antitone_metriccodes2_021c7d5c {r : ℕ} have hle : i ≤ j := by simpa only [Fin.castSucc_le_castSucc_iff] using hij simpa only [appendZeroWeight_castSucc, ge_iff_le] using hmu hle -private def paddedPhysicalStabilizerTensor +/-- A physical stabilizer tensor map transported through two appended zero rows in its source +and one in its target. -/ +def paddedPhysicalStabilizerTensor {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (B : HarmonicYoungSpace (n := n) mu →ₗ[ℝ] @@ -2882,7 +2904,9 @@ theorem exists_fullBranchSignature_wall_of_last_pos {r : ℕ} simpa [signature, raiseWeight, Fin.castSucc_ne_last] using (h i).2 exact ⟨gtWallFullBranchOfSignature lam signature hupper hlower, rfl⟩ -private def gtWallFullBranch +/-- A chosen full branch whose signature is the appended stabilizer weight raised in its last +coordinate. -/ +def gtWallFullBranch {r : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (h : Interlaces lam mu) (hlast : 0 < lam (Fin.last (r + 1))) : FullBranchWeight lam := @@ -2898,7 +2922,8 @@ private def gtWallFullBranch Classical.choose_spec (exists_fullBranchSignature_wall_of_last_pos lam mu h hlast) -private def gtWallCanonicalFullBranchFibre +/-- The canonical full-branch fibre corresponding to the wall signature. -/ +def gtWallCanonicalFullBranchFibre {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (h : Interlaces lam mu) (hn : 2 * (r + 1) + 5 ≤ n + 1) @@ -2909,7 +2934,9 @@ private def gtWallCanonicalFullBranchFibre (gtWallFullBranch_signature lam mu h hlast) ▸ canonicalFullBranchFibre lam hn (gtWallFullBranch lam mu h hlast) -private def gtTransverseWallTensorEmbedding +/-- The tensor isometry combining the transverse Euclidean inclusion with the canonical wall +fibre. -/ +def gtTransverseWallTensorEmbedding {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (h : Interlaces lam mu) (hn : 2 * (r + 1) + 5 ≤ n + 1) @@ -2922,7 +2949,9 @@ private def gtTransverseWallTensorEmbedding TensorProduct.mapIsometry (gtTransverseEuclideanIsometry n) (gtWallCanonicalFullBranchFibre lam mu h hn hlast) -private def gtTransverseWallSector +/-- The transverse wall-sector map obtained by composing Clebsch raising with the wall tensor +embedding. -/ +def gtTransverseWallSector {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (h : Interlaces lam mu) (hn : 2 * (r + 1) + 5 ≤ n + 1) @@ -3119,7 +3148,9 @@ theorem stabilizerIsometry_rotation_adjoint_compression rw [← hF a b, ← LinearMap.comp_assoc, F.adjoint_comp_self', LinearMap.id_comp] -private def transverseTensorEmbeddingOfStabilizerIsometry +/-- The tensor isometry combining the transverse Euclidean inclusion with a supplied stabilizer +isometry. -/ +def transverseTensorEmbeddingOfStabilizerIsometry {s r n : ℕ} (lam : Fin (r + 1) → ℕ) (nu : Fin (s + 1) → ℕ) (F : HarmonicYoungSpace (n := n) nu →ₗᵢ[ℝ] @@ -3482,7 +3513,8 @@ open MetricCodes.Spherical.HigherHarmonicYoung.AllRankGTWallTransverseCompressio open MetricCodes.Spherical.HigherRepresentationGraph (Interlaces) open MetricCodes.Spherical.HigherYoungMixedGapAxisProbability -private def normalizedGTTransverseWallSector +/-- The transverse wall-sector map normalized by its positive Gram scalar to a linear isometry. -/ +def normalizedGTTransverseWallSector {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (h : Interlaces lam mu) (hn : 2 * (r + 1) + 5 ≤ n + 1) @@ -3790,7 +3822,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung.AllRankOrthogonalBranchCompletene open MetricCodes.Spherical.HigherHarmonicYoung.BranchingDimension open MetricCodes.Spherical.HigherYoungAllRankCanonicalGelfandTsetlinCompleteness -private def gtFullTransverseInternalEmbedding {r n : ℕ} +/-- The tensor isometry induced by a canonical full-branch fibre while retaining the Euclidean +tensor factor. -/ +def gtFullTransverseInternalEmbedding {r n : ℕ} (lam : Fin (r + 1) → ℕ) (hn : 2 * r + 5 ≤ n + 1) (mu : FullBranchWeight lam) : (SpherePacking.Euclidean n ⊗[ℝ] @@ -3889,7 +3923,9 @@ theorem gtFullTransverseInternalEmbedding_iSup_range_eq_top (gtFullTransverseInternalEmbedding_orthogonal lam hn) (gtFullTransverseInternalEmbedding_finrank_sum lam hn hdom) -private def gtFullTransverseAmbientInclusion {r n : ℕ} +/-- The tensor isometry induced by the transverse Euclidean inclusion while retaining the +harmonic Young factor. -/ +def gtFullTransverseAmbientInclusion {r n : ℕ} (lam : Fin (r + 1) → ℕ) : (SpherePacking.Euclidean n ⊗[ℝ] HarmonicYoungSpace (n := n + 1) lam) →ₗᵢ[ℝ] @@ -3900,7 +3936,9 @@ private def gtFullTransverseAmbientInclusion {r n : ℕ} HarmonicYoungSpace (n := n + 1) lam →ₗᵢ[ℝ] HarmonicYoungSpace (n := n + 1) lam) -private def gtFullTransverseEmbedding {r n : ℕ} +/-- The tensor isometry combining the transverse Euclidean inclusion with a canonical full- +branch fibre. -/ +def gtFullTransverseEmbedding {r n : ℕ} (lam : Fin (r + 1) → ℕ) (hn : 2 * r + 5 ≤ n + 1) (mu : FullBranchWeight lam) : (SpherePacking.Euclidean n ⊗[ℝ] @@ -4002,7 +4040,8 @@ theorem euclidean_eq_gtTransverse_add_last_axis {n : ℕ} Fin.castSucc_ne_last, not_false_eq_true, PiLp.single_eq_of_ne, smul_eq_mul, mul_zero, add_zero] -private def gtFullAxisAmbientInclusion {r n : ℕ} +/-- The isometry sending a harmonic Young vector to its tensor with the last coordinate axis. -/ +def gtFullAxisAmbientInclusion {r n : ℕ} (lam : Fin (r + 1) → ℕ) : HarmonicYoungSpace (n := n + 1) lam →ₗᵢ[ℝ] (SpherePacking.Euclidean (n + 1) ⊗[ℝ] @@ -4051,7 +4090,9 @@ theorem gtFullAxisAmbientInclusion_sup_transverse_range_eq_top simp only [TensorProduct.tmul_smul, TensorProduct.smul_tmul] | add x y hx hy => exact Submodule.add_mem _ (hx trivial) (hy trivial) -private def gtFullAxisEmbedding {r n : ℕ} +/-- The isometry obtained by embedding a full-branch fibre and tensoring with the last +coordinate axis. -/ +def gtFullAxisEmbedding {r n : ℕ} (lam : Fin (r + 1) → ℕ) (hn : 2 * r + 5 ≤ n + 1) (mu : FullBranchWeight lam) : HarmonicYoungSpace (n := n) (fullBranchSignature mu) →ₗᵢ[ℝ] @@ -4275,7 +4316,8 @@ open MetricCodes.Spherical.HigherHarmonicYoung.AllRankGTRelativeCasimirCompresse open MetricCodes.Spherical.HigherHarmonicYoung.AllRankGTRelativeCasimirProjector open MetricCodes.Spherical.HigherRepresentationGraph (Interlaces) -private def canonicalGelfandTsetlinAxisIsometry +/-- The canonical Gelfand–Tsetlin axis tensor map bundled as a linear isometry. -/ +def canonicalGelfandTsetlinAxisIsometry {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (h : Interlaces lam mu) (hgram : PositiveGelfandTsetlinFischerGram (n := n) lam mu h) : @@ -4437,7 +4479,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung.AllRankGTRelativeCasimirProjector open MetricCodes.Spherical.HigherHarmonicYoung.AllRankGTRelativeCasimirCompressedResolvent open MetricCodes.Spherical.HigherRepresentationGraph (Interlaces) -private def gtTransverseAxisCrossBlock +/-- The cross block of the relative Casimir from a supplied tensor map to the canonical +Gelfand–Tsetlin axis image. -/ +def gtTransverseAxisCrossBlock {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (h : Interlaces lam mu) (hgram : PositiveGelfandTsetlinFischerGram (n := n) lam mu h) @@ -6618,7 +6662,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung.AllRankGTRelativeCasimirProjector open MetricCodes.Spherical.HigherRepresentationGraph (Interlaces) open MetricCodes.Spherical.HigherYoungAllRankGTCharacteristicResidue -private def signedCharacteristicAdjugate {r : ℕ} {V : Type*} +/-- The signed characteristic adjugate expressed as a sum of characteristic projectors weighted +by the nodal polynomials with one node removed. -/ +def signedCharacteristicAdjugate {r : ℕ} {V : Type*} [AddCommGroup V] [Module ℝ V] (L : Fin (r + 1) → ℝ) (T : Module.End ℝ V) (z : ℝ) : Module.End ℝ V := @@ -7072,7 +7118,8 @@ namespace AllRankGTAdjacentCommonInterlacing open MetricCodes.Spherical.HigherChannel -private def gtSelectedPrefixWeight {r : ℕ} +/-- The prefix of a stabilizer weight obtained by dropping its final coordinate. -/ +def gtSelectedPrefixWeight {r : ℕ} (mu : Fin (r + 1) → ℕ) : Fin r → ℕ := fun j => mu j.castSucc diff --git a/LeanPool/MetricCodes/Foundations.lean b/LeanPool/MetricCodes/Foundations.lean index a1b4e08c83..0d38f8ab6c 100644 --- a/LeanPool/MetricCodes/Foundations.lean +++ b/LeanPool/MetricCodes/Foundations.lean @@ -3,19 +3,21 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ - -import LeanPool.MetricCodes.MatrixPerron -import Mathlib.InformationTheory.Hamming -import Mathlib.Algebra.Order.Chebyshev -import Mathlib.Algebra.Ring.IsFormallyReal -import Mathlib.Analysis.SpecialFunctions.BinaryEntropy -import Mathlib.Analysis.SpecialFunctions.Stirling -import Mathlib.Data.Nat.Dist -import Mathlib.LinearAlgebra.Matrix.PosDef -import Mathlib.LinearAlgebra.Matrix.Rank -import Mathlib.Algebra.Order.Floor.Semifield -import Mathlib.Algebra.Order.Star.Real -import Mathlib.Analysis.SpecialFunctions.Log.Base +module + +public import LeanPool.MetricCodes.MatrixPerron +public import Mathlib.InformationTheory.Hamming +public import Mathlib.Algebra.Order.Chebyshev +public import Mathlib.Algebra.Ring.IsFormallyReal +public import Mathlib.Analysis.SpecialFunctions.BinaryEntropy +import all Mathlib.Analysis.SpecialFunctions.BinaryEntropy +public import Mathlib.Analysis.SpecialFunctions.Stirling +public import Mathlib.Data.Nat.Dist +public import Mathlib.LinearAlgebra.Matrix.PosDef +public import Mathlib.LinearAlgebra.Matrix.Rank +public import Mathlib.Algebra.Order.Floor.Semifield +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Analysis.SpecialFunctions.Log.Base /-! # Foundations for binary and spherical code bounds @@ -23,6 +25,8 @@ import Mathlib.Analysis.SpecialFunctions.Log.Base Elementary coding-theory definitions, projection certificates, and the finite Johnson bound. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable namespace MetricCodes @@ -660,7 +664,8 @@ theorem lower_raised_succ_of_harmonic {k : ℕ} raised f (r + 1)) S := by simp only [raised_succ, Pi.smul_apply, smul_eq_mul] -private def toggle (a : Fin n) (S : Finset (Fin n)) : Finset (Fin n) := +/-- Toggle membership of the coordinate `a` in a finite subset. -/ +def toggle (a : Fin n) (S : Finset (Fin n)) : Finset (Fin n) := if a ∈ S then S.erase a else insert a S @[simp] theorem toggle_toggle (a : Fin n) (S : Finset (Fin n)) : @@ -1097,7 +1102,8 @@ def sign (b : Bool) : ℝ := if b then -1 else 1 @[simp] theorem sign_mul_self (b : Bool) : sign b * sign b = 1 := by cases b <;> simp [sign] -private def character (x : BinaryWord n) (S : Finset (Fin n)) : ℝ := +/-- The Boolean character given by the product of the signs of `x` on `S`. -/ +def character (x : BinaryWord n) (S : Finset (Fin n)) : ℝ := ∏ a ∈ S, sign (x a) @[simp] theorem character_mul_self @@ -1110,7 +1116,8 @@ private def character (x : BinaryWord n) (S : Finset (Fin n)) : ℝ := intro a _ exact sign_mul_self (x a) -private def twist (x : BinaryWord n) (f : Function n) (S : Finset (Fin n)) : ℝ := +/-- Multiply a function pointwise by the Boolean character of `x`. -/ +def twist (x : BinaryWord n) (f : Function n) (S : Finset (Fin n)) : ℝ := character x S * f S theorem twist_smul (x : BinaryWord n) (c : ℝ) (f : Function n) : @@ -1148,7 +1155,8 @@ def coordinateDot (f g : CoordinateFunction n) : ℝ := def deleteChannel (i : ℕ) (f : Function n) : CoordinateFunction n := fun a => (Real.sqrt (i : ℝ))⁻¹ • lowerAt a f -private def addChannel (i : ℕ) (f : Function n) : CoordinateFunction n := +/-- The coordinate raising channels scaled by the inverse square root of `n - i`. -/ +def addChannel (i : ℕ) (f : Function n) : CoordinateFunction n := fun a => (Real.sqrt ((n : ℝ) - (i : ℝ)))⁻¹ • raiseAt a f theorem sum_not_mem_indicator (S : Finset (Fin n)) (z : ℝ) : @@ -1355,7 +1363,8 @@ theorem layerExtend_injective {k : ℕ} : have := congrArg (layerRestrict k) h simpa only [layerRestrict_layerExtend] using this -private def layerExtendLinear (n k : ℕ) : +/-- Extend a function on the `k`th layer by zero, bundled as a linear map. -/ +def layerExtendLinear (n k : ℕ) : LayerFunction n k →ₗ[ℝ] Function n where toFun := layerExtend map_add' := by @@ -1369,7 +1378,8 @@ private def layerExtendLinear (n k : ℕ) : by_cases hS : S.card = k <;> simp [layerExtend, hS, Pi.smul_apply, smul_eq_mul] -private def layerRestrictLinear (n k : ℕ) : +/-- Restrict a function to the `k`th layer, bundled as a linear map. -/ +def layerRestrictLinear (n k : ℕ) : Function n →ₗ[ℝ] LayerFunction n k where toFun := layerRestrict k map_add' := by @@ -1379,12 +1389,14 @@ private def layerRestrictLinear (n k : ℕ) : intro c f rfl -private def layerUp (n k : ℕ) : +/-- The raising map from layer `k` to layer `k + 1`, obtained by extending and restricting. -/ +def layerUp (n k : ℕ) : LayerFunction n k →ₗ[ℝ] LayerFunction n (k + 1) := (layerRestrictLinear n (k + 1)).comp ((raiseLinear n).comp (layerExtendLinear n k)) -private def layerDown (n k : ℕ) : +/-- The lowering map from layer `k + 1` to layer `k`, obtained by extending and restricting. -/ +def layerDown (n k : ℕ) : LayerFunction n (k + 1) →ₗ[ℝ] LayerFunction n k := (layerRestrictLinear n k).comp ((lowerLinear n).comp (layerExtendLinear n (k + 1))) @@ -1725,7 +1737,8 @@ theorem dot_raised_of_harmonic {k : ℕ} def harmonicEmbedding (k r : ℕ) (f : Function n) : Function n := (Real.sqrt (harmonicNormFactor n k r))⁻¹ • raised f r -private def wordHarmonicEmbedding (x : BinaryWord n) (k r : ℕ) +/-- The normalized harmonic embedding twisted by the Boolean character of `x`. -/ +def wordHarmonicEmbedding (x : BinaryWord n) (k r : ℕ) (f : Function n) : Function n := twist x (harmonicEmbedding k r f) @@ -1908,10 +1921,12 @@ theorem harmonicBasisFunction_isHarmonic rw [hcoef] exact hg -private def hammingWindowDimension (n k L : ℕ) : ℕ := +/-- The sum of the layer dimensions over the offsets in `Fin (L - k + 1)`. -/ +def hammingWindowDimension (n k L : ℕ) : ℕ := ∑ j ∈ Finset.range (L - k + 1), n.choose (k + j) -private abbrev HammingWindowIndex (n k L : ℕ) := +/-- Indices consisting of a window offset and a subset in its corresponding Hamming layer. -/ +abbrev HammingWindowIndex (n k L : ℕ) := Σ j : Fin (L - k + 1), Level n (k + j.val) theorem hammingWindowIndex_card (n k L : ℕ) : @@ -1931,22 +1946,26 @@ theorem hammingWindowIndex_card (n k L : ℕ) : · intro j _ rfl -private def hammingWindowIndexEquiv (n k L : ℕ) : +/-- Enumerate the Hamming window indices by their total dimension. -/ +def hammingWindowIndexEquiv (n k L : ℕ) : HammingWindowIndex n k L ≃ Fin (hammingWindowDimension n k L) := Fintype.equivOfCardEq (by simpa only [Fintype.card_sigma, Fintype.card_finset_len, Fintype.card_fin] using hammingWindowIndex_card n k L) -private def hammingRecurrenceWeight +/-- A recurrence coordinate weighted by the square root of its Hamming layer dimension. -/ +def hammingRecurrenceWeight (n k L : ℕ) (v : EuclideanSpace ℝ (Fin (L - k + 1))) (j : Fin (L - k + 1)) : ℝ := Real.sqrt (n.choose (k + j.val) : ℝ) * v j -private def hammingRecurrenceNormalization +/-- The sum of the dimension-weighted Hamming recurrence coordinates. -/ +def hammingRecurrenceNormalization (n k L : ℕ) (v : EuclideanSpace ℝ (Fin (L - k + 1))) : ℝ := ∑ j : Fin (L - k + 1), hammingRecurrenceWeight n k L v j -private def hammingFibreAmplitude +/-- The square root of a normalized Hamming recurrence weight, used as a fibre amplitude. -/ +def hammingFibreAmplitude (n k L : ℕ) (v : EuclideanSpace ℝ (Fin (L - k + 1))) (j : Fin (L - k + 1)) : ℝ := Real.sqrt @@ -2040,7 +2059,8 @@ theorem dot_eq_layerDot_of_level {i : ℕ} layerExtend_layerRestrict_of_level f hf, layerExtend_layerRestrict_of_level g hg] -private def hammingWindowFibreMatrix +/-- The matrix of twisted harmonic basis embeddings weighted by their window fibre amplitudes. -/ +def hammingWindowFibreMatrix (n k L : ℕ) (hk : 2 * k ≤ n) (v : EuclideanSpace ℝ (Fin (L - k + 1))) (x : BinaryWord n) : @@ -2152,7 +2172,8 @@ theorem hammingWindowFibreMatrix_transpose_mul · simp only [hpq, ↓reduceIte, mul_one, hammingFibreAmplitude_sq_sum hkL hLn v hunit hv] · simp only [hpq, ↓reduceIte, mul_zero, Finset.sum_const_zero] -private def hammingFibreMatrix +/-- The Hamming window fibre matrix with its rows enumerated by the window dimension. -/ +def hammingFibreMatrix (n k L : ℕ) (hk : 2 * k ≤ n) (v : EuclideanSpace ℝ (Fin (L - k + 1))) (x : BinaryWord n) : @@ -2262,7 +2283,8 @@ theorem sum_sign_mul_eq_hammingDist rw [hcount] simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, mul_one] -private def hammingAxis (x : BinaryWord n) : EuclideanSpace ℝ (Fin n) := +/-- The Euclidean sign vector of a binary word, scaled by the inverse square root of `n`. -/ +def hammingAxis (x : BinaryWord n) : EuclideanSpace ℝ (Fin n) := WithLp.toLp 2 (fun a : Fin n => (Real.sqrt (n : ℝ))⁻¹ * sign (x a)) @@ -2350,7 +2372,8 @@ theorem raiseAt_twist ring · simp only [raiseAt, ha, ↓reduceIte, Pi.smul_apply, twist, mul_zero, smul_eq_mul] -private def matrixHilbertSchmidtFeature +/-- The Euclidean vector of matrix entries used to express the Hilbert–Schmidt inner product. -/ +def matrixHilbertSchmidtFeature {ι ρ : Type*} (A : Matrix ι ρ ℝ) : EuclideanSpace ℝ (ι × ρ) := WithLp.toLp 2 (fun p : ι × ρ => A p.1 p.2) @@ -2414,7 +2437,8 @@ theorem matrixAxisLift_transpose_mul intro r _ ring -private def matrixAxisResidual +/-- The axis-lifted projection minus the scaled channel image of that projection. -/ +def matrixAxisResidual {X κ : Type*} {D d : ℕ} (P : MetricCodes.ProjectionFamily X D d) (axis : X → κ → ℝ) @@ -2585,7 +2609,9 @@ theorem lower_harmonicEmbedding {k : ℕ} field_simp [hfactorne, hcoefficientne]; nlinarith [Real.sq_sqrt hcoefficient.le] -private def hammingSourceChannelCoefficient +/-- The Hamming Jacobi entry rescaled by the square roots of the source and target layer +dimensions. -/ +def hammingSourceChannelCoefficient (n k L : ℕ) (m i : Fin (L - k + 1)) : ℝ := MetricCodes.hammingJacobiMatrix n k L m i * @@ -2707,7 +2733,9 @@ theorem hammingFibreAmplitude_pos_of_pos (hammingRecurrenceNormalization_pos hkL hLn v hunit (fun j => (hv j).le)) -private def hammingAdjacentBlockCoefficient +/-- The square-root weight for an adjacent channel block, normalized by the eigenvalue and +source recurrence weight. -/ +def hammingAdjacentBlockCoefficient (n k L : ℕ) (v : EuclideanSpace ℝ (Fin (L - k + 1))) (lam : ℝ) @@ -2879,7 +2907,8 @@ theorem IsLevel.raiseAt {i : ℕ} {f : Function n} · change (if a ∈ S then f (S.erase a) else 0) = 0 rw [ite_eq_right ha] -private def hammingWindowBasis (n k L : ℕ) +/-- The indicator function of the subset specified by a Hamming window index. -/ +def hammingWindowBasis (n k L : ℕ) (T : HammingWindowIndex n k L) : Function n := fun S => if S = T.2.val then 1 else 0 @@ -2913,7 +2942,8 @@ theorem dot_hammingWindowBasis (n k L : ℕ) simp only [dot, hammingWindowBasis, mul_ite, mul_one, mul_zero, Finset.sum_ite_eq', Finset.mem_univ, ↓reduceIte, h', h] -private def hammingAdjacentChannel (n k L : ℕ) +/-- The deletion or insertion channel between adjacent window levels, and zero otherwise. -/ +def hammingAdjacentChannel (n k L : ℕ) (target source : Fin (L - k + 1)) (f : Function n) : CoordinateFunction n := if target.val + 1 = source.val then @@ -3061,7 +3091,8 @@ theorem hammingSourceChannelCoefficient_eq_zero_of_not_adjacent simp only [hammingSourceChannelCoefficient, hammingJacobiMatrix, hforward, ↓reduceIte, hbackward, zero_mul, zero_div] -private def hammingWindowChannelMatrix +/-- The weighted adjacent-channel matrix in the Hamming window basis. -/ +def hammingWindowChannelMatrix (n k L : ℕ) (v : EuclideanSpace ℝ (Fin (L - k + 1))) (lam : ℝ) : @@ -3222,7 +3253,9 @@ theorem hammingWindowChannelMatrix_transpose_mul (hammingWindowBasis n k L ⟨other, T⟩)] ring -private def hammingChannelMatrix +/-- The Hamming window channel matrix with both window indices enumerated by their total +dimension. -/ +def hammingChannelMatrix (n k L : ℕ) (v : EuclideanSpace ℝ (Fin (L - k + 1))) (lam : ℝ) : @@ -3330,12 +3363,16 @@ theorem hammingPositiveRadicalSymmetrization rw [Real.sqrt_mul ha.le] ring -private def hammingDeletionChannelSquare (n k i : ℕ) : ℝ := +/-- The squared deletion-channel coefficient relating levels `i` and `i + 1` in harmonic degree +`k`. -/ +def hammingDeletionChannelSquare (n k i : ℕ) : ℝ := (((i : ℝ) - (k : ℝ) + 1) * ((n : ℝ) - (i : ℝ) - (k : ℝ))) / ((n : ℝ) * ((i : ℝ) + 1)) -private def hammingInsertionChannelSquare (n k i : ℕ) : ℝ := +/-- The squared insertion-channel coefficient relating levels `i` and `i + 1` in harmonic degree +`k`. -/ +def hammingInsertionChannelSquare (n k i : ℕ) : ℝ := (((i : ℝ) - (k : ℝ) + 1) * ((n : ℝ) - (i : ℝ) - (k : ℝ))) / ((n : ℝ) * ((n : ℝ) - (i : ℝ))) @@ -3471,7 +3508,8 @@ theorem sum_dot_twist_lowerAt rw [Finset.sum_comm] simp only [Finset.mul_sum] -private def hammingAxisTensor (x : BinaryWord n) (f : Function n) : +/-- The coordinate-valued function obtained by tensoring `f` with the Hamming axis of `x`. -/ +def hammingAxisTensor (x : BinaryWord n) (f : Function n) : CoordinateFunction n := fun a => hammingAxis x a • f @@ -4017,7 +4055,8 @@ def wordSupport {n : ℕ} (x : BinaryWord n) : Finset (Fin n) := i ∈ wordSupport x ↔ x i = true := by simp only [wordSupport, mem_filter, mem_univ, true_and] -private def wordOfSupport {n : ℕ} (s : Finset (Fin n)) : BinaryWord n := +/-- The binary word whose true coordinates are exactly the elements of `s`. -/ +def wordOfSupport {n : ℕ} (s : Finset (Fin n)) : BinaryWord n := fun i => decide (i ∈ s) @[simp] theorem wordOfSupport_apply {n : ℕ} (s : Finset (Fin n)) (i : Fin n) : @@ -4104,7 +4143,8 @@ theorem johnsonDist_eq_weight_sub_inter {n w : ℕ} rw [Finset.card_sdiff, Finset.inter_comm] rw [← binaryWeight_eq_card_wordSupport, x.property] -private def binaryTranslate {n : ℕ} (x y : BinaryWord n) : BinaryWord n := +/-- Translate a binary word by coordinatewise exclusive-or with `x`. -/ +def binaryTranslate {n : ℕ} (x y : BinaryWord n) : BinaryWord n := fun i => Bool.xor (x i) (y i) @[simp] theorem binaryTranslate_involutive {n : ℕ} (x y : BinaryWord n) : @@ -4132,7 +4172,8 @@ theorem binaryWeight_binaryTranslate {n : ℕ} (x y : BinaryWord n) : ext i simp only [binaryTranslate, bne_iff_ne, ne_eq, mem_filter, mem_univ, true_and] -private def weightShell (n w : ℕ) : Finset (BinaryWord n) := +/-- The finite set of length-`n` binary words of weight `w`. -/ +def weightShell (n w : ℕ) : Finset (BinaryWord n) := Finset.univ.filter fun x => binaryWeight x = w @[simp] theorem mem_weightShell {n w : ℕ} (x : BinaryWord n) : @@ -4162,7 +4203,8 @@ theorem card_weightShell (n w : ℕ) : Finset.card_powersetCard] simp only [card_univ, Fintype.card_fin] -private def hammingSphere {n : ℕ} (x : BinaryWord n) (r : ℕ) : +/-- The finite set of binary words at Hamming distance exactly `r` from `x`. -/ +def hammingSphere {n : ℕ} (x : BinaryWord n) (r : ℕ) : Finset (BinaryWord n) := Finset.univ.filter fun y => hammingDist x y = r @@ -4192,7 +4234,8 @@ theorem card_hammingSphere {n : ℕ} (x : BinaryWord n) (r : ℕ) : Finset.card_image_of_injective _ (binaryTranslate_injective x), card_weightShell] -private def localizedCode {n : ℕ} (C : Finset (BinaryWord n)) +/-- The words of `C` whose translate by `z` has weight `w`. -/ +def localizedCode {n : ℕ} (C : Finset (BinaryWord n)) (z : BinaryWord n) (w : ℕ) : Finset (BinaryWord n) := C.filter fun x => binaryWeight (binaryTranslate z x) = w @@ -4202,7 +4245,8 @@ private def localizedCode {n : ℕ} (C : Finset (BinaryWord n)) x ∈ C ∧ binaryWeight (binaryTranslate z x) = w := by simp only [localizedCode, mem_filter] -private def translateLocalizedCode {n : ℕ} (C : Finset (BinaryWord n)) +/-- Translate the localized code by `z` into the weight-`w` shell. -/ +def translateLocalizedCode {n : ℕ} (C : Finset (BinaryWord n)) (z : BinaryWord n) (w : ℕ) : Finset (BinaryWord n) := (localizedCode C z w).image (binaryTranslate z) @@ -4379,7 +4423,8 @@ section open Filter Real open scoped Nat Topology -private def factorialLogError (n : ℕ) : ℝ := +/-- The error in the normalized factorial-log approximation `log (n!) / n = log n - 1`. -/ +def factorialLogError (n : ℕ) : ℝ := Real.log (n.factorial : ℝ) / (n : ℝ) - Real.log (n : ℝ) + 1 theorem tendsto_log_natCast_div_natCast : @@ -4575,7 +4620,8 @@ open scoped BigOperators InnerProductSpace Topology namespace Hamming -private noncomputable def validCodes (n d : ℕ) : Finset (Finset (BinaryWord n)) := by +/-- The finite family of length-`n` binary codes with minimum distance at least `d`. -/ +noncomputable def validCodes (n d : ℕ) : Finset (Finset (BinaryWord n)) := by classical exact Finset.univ.filter (MetricCodes.IsBinaryCode d) @@ -5155,10 +5201,12 @@ theorem hammingGamma_classicalParameter {δ : ℝ} Real.sqrt_sq (by linarith : 0 ≤ (1 : ℝ) / 2 - δ)] ring -private def improvementSlope (a : ℝ) : ℝ := +/-- The slope `2 / (1 - 2 * a) + 1` used to perturb the Hamming bound parameters. -/ +def improvementSlope (a : ℝ) : ℝ := 2 / (1 - 2 * a) + 1 -private def improvementPath (a b : ℝ) : ℝ := +/-- The affine perturbation of `a` with slope `improvementSlope a` and parameter `b`. -/ +def improvementPath (a b : ℝ) : ℝ := a + improvementSlope a * b theorem improvementSlope_gt_one {a : ℝ} (ha : a < (1 : ℝ) / 2) : @@ -5176,7 +5224,9 @@ theorem tendsto_improvementPath_zero (a : ℝ) : simpa only [improvementPath, mul_zero, add_zero] using (hcontinuous.continuousAt (x := (0 : ℝ))).tendsto.mono_left nhdsWithin_le_nhds -private def spectralMarginPolynomial (a c b : ℝ) : ℝ := +/-- The cubic factor remaining after extracting `b` from the difference of the squared spectral- +bound expressions. -/ +def spectralMarginPolynomial (a c b : ℝ) : ℝ := let r := a * (1 - a) let p := c * (1 - 2 * a) - 1 let q := c ^ 2 - 1 @@ -6766,7 +6816,8 @@ section open scoped BigOperators InnerProductSpace Matrix -private def binaryCodeFamily (n d : ℕ) : Finset (Finset (BinaryWord n)) := by +/-- The finite family of binary codes of length `n` and minimum distance at least `d`. -/ +def binaryCodeFamily (n d : ℕ) : Finset (Finset (BinaryWord n)) := by classical exact (Finset.univ : Finset (BinaryWord n)).powerset.filter (fun C => IsBinaryCode d C) @@ -6801,7 +6852,8 @@ theorem exists_binaryCodeNumber (n d : ℕ) : (binaryCodeFamily_nonempty n d) (fun C => C.card) exact ⟨C, (mem_binaryCodeFamily C).mp hC, hmax.symm⟩ -private def shellCodeFamily (n w d : ℕ) : Finset (Finset (BinaryWord n)) := by +/-- The finite family of minimum-distance-`d` codes contained in the weight-`w` shell. -/ +def shellCodeFamily (n w d : ℕ) : Finset (Finset (BinaryWord n)) := by classical exact (weightShell n w).powerset.filter (fun C => IsBinaryCode d C) @@ -6819,7 +6871,8 @@ theorem shellCodeFamily_nonempty (n w d : ℕ) : rw [mem_shellCodeFamily] exact ⟨Finset.empty_subset _, fun {_} hx => (Finset.notMem_empty _ hx).elim⟩ -private def shellCodeNumber (n w d : ℕ) : ℕ := +/-- The largest cardinality of a minimum-distance-`d` code in the weight-`w` shell. -/ +def shellCodeNumber (n w d : ℕ) : ℕ := (shellCodeFamily n w d).sup (fun C => C.card) theorem card_le_shellCodeNumber {n w d : ℕ} @@ -6872,15 +6925,18 @@ theorem binaryCodeNumber_eq_hamming (n d : ℕ) : rw [← hcard] exact card_le_binaryCodeNumber C hC -private def words {n w : ℕ} (C : Finset (JohnsonSphere n w)) : +/-- Forget the weight proof on each point of a finite Johnson-sphere code. -/ +def words {n w : ℕ} (C : Finset (JohnsonSphere n w)) : Finset (BinaryWord n) := C.image Subtype.val -private def IsCode {n w : ℕ} (d : ℕ) +/-- The minimum-distance condition on the underlying binary words of a Johnson-sphere code. -/ +def IsCode {n w : ℕ} (d : ℕ) (C : Finset (JohnsonSphere n w)) : Prop := IsBinaryCode d (words C) -private def asSubtype {n w : ℕ} (C : Finset (BinaryWord n)) +/-- Regard a code contained in the weight-`w` shell as a finite set of Johnson-sphere points. -/ +def asSubtype {n w : ℕ} (C : Finset (BinaryWord n)) (hweight : C ⊆ weightShell n w) : Finset (JohnsonSphere n w) := by classical @@ -8060,7 +8116,8 @@ theorem johnsonAdjacentBlockCoefficient_sq_sum (mul_pos hlam (johnsonRecurrenceWeight_pos_of_pos h v hv source)).ne' -private def johnsonRecurrenceNormalization +/-- The sum of the Johnson recurrence weights over the admissible index range. -/ +def johnsonRecurrenceNormalization (n w p q L : ℕ) (v : Space p q L) : ℝ := ∑ i : Index p q L, johnsonRecurrenceWeight n w p q L v i @@ -8743,7 +8800,8 @@ theorem mrrwObjective_zero_fibre_boundary {δ α u : ℝ} mrrwG_variance ha.le, shellRate_zero_fibre] ring -private def mrrwRateSet (δ : ℝ) : Set ℝ := +/-- The values of the MRRW objective as `r` ranges from zero to `1 - 2 * δ`. -/ +def mrrwRateSet (δ : ℝ) : Set ℝ := {t | ∃ r : ℝ, 0 ≤ r ∧ r ≤ 1 - 2 * δ ∧ t = mrrwObjective δ r} diff --git a/LeanPool/MetricCodes/HarmonicAnalysis.lean b/LeanPool/MetricCodes/HarmonicAnalysis.lean index 1c909d6e4d..40b6713cf8 100644 --- a/LeanPool/MetricCodes/HarmonicAnalysis.lean +++ b/LeanPool/MetricCodes/HarmonicAnalysis.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.Rates -import Mathlib.Algebra.Order.Antidiag.FinsuppEquiv -import Mathlib.Analysis.InnerProductSpace.Trace -import Mathlib.RingTheory.MvPolynomial.EulerIdentity -import Mathlib.Topology.MetricSpace.CoveringNumbers +public import LeanPool.MetricCodes.Rates +public import Mathlib.Algebra.Order.Antidiag.FinsuppEquiv +public import Mathlib.Analysis.InnerProductSpace.Trace +public import Mathlib.RingTheory.MvPolynomial.EulerIdentity +public import Mathlib.Topology.MetricSpace.CoveringNumbers /-! # Harmonic analysis for spherical codes @@ -16,6 +17,8 @@ import Mathlib.Topology.MetricSpace.CoveringNumbers Harmonic polynomial, Gegenbauer, Perron, and adjacent-channel constructions. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable section @@ -175,11 +178,13 @@ structure SphericalCode (n : ℕ) (s : ℝ) where inner_le : ∀ x ∈ points, ∀ y ∈ points, x ≠ y → ⟪x, y⟫_ℝ ≤ s -private def PositiveDefiniteKernel {α : Type*} (K : α → α → ℝ) : Prop := +/-- Nonnegativity of every finite weighted quadratic form of the kernel. -/ +def PositiveDefiniteKernel {α : Type*} (K : α → α → ℝ) : Prop := ∀ (C : Finset α) (w : α → ℝ), 0 ≤ ∑ x ∈ C, ∑ y ∈ C, w x * w y * K x y -private def unitSphere (n : ℕ) : Set (Euclidean n) := +/-- The unit sphere in the Euclidean space of dimension `n`. -/ +def unitSphere (n : ℕ) : Set (Euclidean n) := {x | ‖x‖ = 1} theorem weighted_gram_sum_eq_norm_sq {α E : Type*} @@ -302,7 +307,8 @@ theorem harmonicPolynomial_euler {n k : ℕ} exact (mem_harmonicHomogeneousSubmodule (p : MvPolynomial (Fin n) ℝ)).mp p.property |>.1 -private def finiteHilbertSchmidtKernel {α ι F E : Type*} +/-- The Hilbert–Schmidt Gram kernel of a family of linear maps, computed in the basis `b`. -/ +def finiteHilbertSchmidtKernel {α ι F E : Type*} [Fintype ι] [NormedAddCommGroup F] [InnerProductSpace ℝ F] [NormedAddCommGroup E] [InnerProductSpace ℝ E] @@ -404,7 +410,8 @@ theorem finiteHilbertSchmidtKernel_three_channel (∑ i : ι, ⟪R x (basis i), R y (basis i)⟫_ℝ) := by simp_rw [Finset.sum_add_distrib, Finset.mul_sum] -private def mixedHilbertSchmidtKernel +/-- The Hilbert–Schmidt kernel of the compositions `A x ∘ (B x).adjoint`. -/ +def mixedHilbertSchmidtKernel {α ι F E G : Type*} [Fintype ι] [NormedAddCommGroup F] [InnerProductSpace ℝ F] [NormedAddCommGroup E] [InnerProductSpace ℝ E] @@ -426,13 +433,16 @@ open scoped BigOperators namespace Gegenbauer -private def recurrenceDenominator (n i : ℕ) : ℝ := +/-- The common denominator `i + n - 2` in the normalized Gegenbauer recurrence. -/ +def recurrenceDenominator (n i : ℕ) : ℝ := (i : ℝ) + (n : ℝ) - 2 -private def forwardCoefficient (n i : ℕ) : ℝ := +/-- The coefficient of `X * normalized n i` in the Gegenbauer recurrence. -/ +def forwardCoefficient (n i : ℕ) : ℝ := (2 * (i : ℝ) + (n : ℝ) - 2) / recurrenceDenominator n i -private def backwardCoefficient (n i : ℕ) : ℝ := +/-- The coefficient of the preceding polynomial in the Gegenbauer recurrence. -/ +def backwardCoefficient (n i : ℕ) : ℝ := (i : ℝ) / recurrenceDenominator n i /-- The normalized used in the spherical-code argument. -/ @@ -640,7 +650,9 @@ theorem jacobiCoefficient_pos {n k i : ℕ} have h₄ : 0 < 2 * (i : ℝ) + (n : ℝ) := by linarith exact mul_pos (mul_pos (mul_pos h₁ h₂) h₃) h₄ -private def jacobiMatrix (n k L : ℕ) : +/-- The symmetric tridiagonal matrix with Gegenbauer Jacobi coefficients between adjacent +degrees. -/ +def jacobiMatrix (n k L : ℕ) : Matrix (Fin (L - k + 1)) (Fin (L - k + 1)) ℝ := fun p q => if p.val + 1 = q.val then @@ -701,7 +713,8 @@ def directionalDerivative (n : ℕ) (x : Euclidean n) : simp only [directionalDerivative, LinearMap.coe_sum, LinearMap.coe_smul, Derivation.coeFn_coe, Finset.sum_apply, Pi.smul_apply] -private def directionalDerivation (n : ℕ) (x : Euclidean n) : +/-- Directional differentiation of multivariate polynomials, bundled as a derivation. -/ +def directionalDerivation (n : ℕ) (x : Euclidean n) : Derivation ℝ (MvPolynomial (Fin n) ℝ) (MvPolynomial (Fin n) ℝ) := ∑ i : Fin n, x i • MvPolynomial.pderiv i @@ -1319,7 +1332,8 @@ theorem coefficientEmbedding_injective (n m : ℕ) : · rw [MvPolynomial.IsHomogeneous.coeff_eq_zero p.property ha, MvPolynomial.IsHomogeneous.coeff_eq_zero q.property ha] -private def harmonicCoefficientEmbedding (n m : ℕ) : +/-- The coefficient embedding restricted to homogeneous harmonic polynomials. -/ +def harmonicCoefficientEmbedding (n m : ℕ) : SpherePacking.harmonicHomogeneousSubmodule n m →ₗ[ℝ] CoefficientSpace n m := (coefficientEmbedding n m).comp @@ -1536,7 +1550,8 @@ theorem harmonicInner_eq_polynomialInner (n m : ℕ) apply hf simpa only [map_zero] using hzero -@[implicit_reducible] private def harmonicInnerCore (n m : ℕ) : +/-- The Fischer inner product core on harmonic polynomials, pulled back from coefficient space. -/ +@[implicit_reducible] def harmonicInnerCore (n m : ℕ) : InnerProductSpace.Core ℝ (SpherePacking.harmonicHomogeneousSubmodule n m) := embeddingInnerCore (harmonicCoefficientEmbedding n m) @@ -1552,7 +1567,8 @@ theorem tangentHarmonicSubmodule_le_harmonic SpherePacking.harmonicHomogeneousSubmodule n m exact inf_le_left -private def tangentCoefficientEmbedding +/-- The coefficient embedding restricted further to the tangent harmonic subspace at `x`. -/ +def tangentCoefficientEmbedding (n m : ℕ) (x : SpherePacking.Euclidean n) : SpherePacking.tangentHarmonicSubmodule n m x →ₗ[ℝ] CoefficientSpace n m := @@ -1575,7 +1591,8 @@ theorem tangent_finiteDimensional (tangentCoefficientEmbedding n m x) (tangentCoefficientEmbedding_injective n m x) -private def tangentInner (n m : ℕ) (x : SpherePacking.Euclidean n) +/-- The inner product on tangent harmonics induced by their coefficient embedding. -/ +def tangentInner (n m : ℕ) (x : SpherePacking.Euclidean n) (p q : SpherePacking.tangentHarmonicSubmodule n m x) : ℝ := @inner ℝ (CoefficientSpace n m) _ (tangentCoefficientEmbedding n m x p) @@ -1601,7 +1618,8 @@ theorem tangentInner_eq_polynomialInner (q : MvPolynomial (Fin n) ℝ) := by exact harmonicInner_eq_polynomialInner n m hp hq -@[implicit_reducible] private def tangentInnerCore +/-- The inner product core induced by the injective tangent coefficient embedding. -/ +@[implicit_reducible] def tangentInnerCore (n m : ℕ) (x : SpherePacking.Euclidean n) : InnerProductSpace.Core ℝ (SpherePacking.tangentHarmonicSubmodule n m x) := @@ -1703,7 +1721,8 @@ theorem polynomialLaplacian_isHomogeneous {n m : ℕ} intro i hi exact (hp.pderiv (i := i)).pderiv (i := i) -private def homogeneousExponentFinset (n m : ℕ) : +/-- The finite set of exponent vectors of total degree `m` in `n` variables. -/ +def homogeneousExponentFinset (n m : ℕ) : Finset (Fin n →₀ ℕ) := (Finset.univ : Finset (Fin n)).finsuppAntidiag m @@ -1766,7 +1785,8 @@ theorem finrank_homogeneousSubmodule (n m : ℕ) : _ = (n + m - 1).choose m := homogeneousExponentFinset_card n m -private def homogeneousRadialMultiplication (n m : ℕ) : +/-- Multiplication by the radial polynomial, from homogeneous degree `m` to degree `m + 2`. -/ +def homogeneousRadialMultiplication (n m : ℕ) : MvPolynomial.homogeneousSubmodule (Fin n) ℝ m →ₗ[ℝ] MvPolynomial.homogeneousSubmodule (Fin n) ℝ (m + 2) := (LinearMap.mulLeft ℝ (radialPolynomial n)).restrict @@ -1825,7 +1845,8 @@ theorem surjective_of_injective_inner_adjoint rw [hadj, LinearMap.finrank_range_adjoint, LinearMap.finrank_range_of_inj hinj] -private def homogeneousLaplacian (n m : ℕ) : +/-- The polynomial Laplacian restricted from homogeneous degree `m + 2` to degree `m`. -/ +def homogeneousLaplacian (n m : ℕ) : MvPolynomial.homogeneousSubmodule (Fin n) ℝ (m + 2) →ₗ[ℝ] MvPolynomial.homogeneousSubmodule (Fin n) ℝ m := LinearMap.codRestrict @@ -2393,7 +2414,8 @@ theorem polynomialLaplacian_axis_mul_for_tangent intro i hi exact MvPolynomial.C_mul' -private def harmonicAxisProjectionDenominator (n k : ℕ) : ℝ := +/-- The denominator `2 * k + n` used to remove the radial part of an axis projection. -/ +def harmonicAxisProjectionDenominator (n k : ℕ) : ℝ := 2 * (k : ℝ) + (n : ℝ) theorem harmonicAxisProjectionDenominator_pos @@ -3140,7 +3162,8 @@ theorem tendsto_nat_sequence_sub_cast_div rw [Nat.cast_sub hn, sub_div] simpa only [sub_zero] using hsub.congr' heq -private def harmonicEntropyBase (u : ℝ) (N : ℕ → ℕ) (n : ℕ) : ℕ := +/-- The binomial coefficient bounding harmonic dimensions in the entropy estimate. -/ +def harmonicEntropyBase (u : ℝ) (N : ℕ → ℕ) (n : ℕ) : ℕ := (⌊u * (n : ℝ)⌋₊ + (N n - 2)).choose ⌊u * (n : ℝ)⌋₊ theorem harmonicEntropyBase_pos (u : ℝ) (N : ℕ → ℕ) (n : ℕ) : @@ -3965,23 +3988,29 @@ section open Filter open scoped BigOperators InnerProductSpace -private abbrev CertificateFibre (n k : ℕ) := +/-- The Euclidean model of the certificate fibre of dimension `Gegenbauer.fibreDimension n k`. -/ +abbrev CertificateFibre (n k : ℕ) := Euclidean (Gegenbauer.fibreDimension n k) -private abbrev CertificateAmbient (n k L : ℕ) := +/-- The Euclidean ambient space for the certificate truncated to degrees `k` through `L`. -/ +abbrev CertificateAmbient (n k L : ℕ) := Euclidean (truncatedHarmonicDimension n k L) -private def certificateFibreBasis (n k : ℕ) : +/-- The standard orthonormal coordinate basis of the certificate fibre. -/ +def certificateFibreBasis (n k : ℕ) : OrthonormalBasis (Fin (Gegenbauer.fibreDimension n k)) ℝ (CertificateFibre n k) := EuclideanSpace.basisFun (Fin (Gegenbauer.fibreDimension n k)) ℝ -private def certificateAmbientBasis (n k L : ℕ) : +/-- The standard orthonormal coordinate basis of the truncated certificate ambient space. -/ +def certificateAmbientBasis (n k L : ℕ) : OrthonormalBasis (Fin (truncatedHarmonicDimension n k L)) ℝ (CertificateAmbient n k L) := EuclideanSpace.basisFun (Fin (truncatedHarmonicDimension n k L)) ℝ -private def isometricPackingKernel {n k L : ℕ} +/-- The Hilbert–Schmidt overlap kernel associated with a family of isometric certificate +embeddings. -/ +def isometricPackingKernel {n k L : ℕ} (f : Euclidean n → CertificateFibre n k →ₗᵢ[ℝ] CertificateAmbient n k L) (x y : Euclidean n) : ℝ := @@ -4043,27 +4072,32 @@ theorem isometric_mixed_kernel_diag simp only [LinearMap.IsSymmetric.id, LinearMap.IsSymmetric.adjoint_eq, LinearMap.comp_id, LinearMap.trace_id] -private abbrev CertificateDegreeAmbient (n k L : ℕ) +/-- The Euclidean model for the harmonic degree `k + i.val` summand of the certificate. -/ +abbrev CertificateDegreeAmbient (n k L : ℕ) (i : Jacobi.Index k L) := Euclidean (Gegenbauer.harmonicDimension n (k + i.val)) -private def finiteGramRecurrenceWeight +/-- A Jacobi coordinate weighted by the square root of its harmonic degree dimension. -/ +def finiteGramRecurrenceWeight (n k L : ℕ) (v : Jacobi.Space k L) (i : Jacobi.Index k L) : ℝ := Real.sqrt (Gegenbauer.harmonicDimension n (k + i.val) : ℝ) * v i -private def finiteGramRecurrenceNormalization +/-- The sum of the dimension-weighted Jacobi coordinates used to normalize fibre amplitudes. -/ +def finiteGramRecurrenceNormalization (n k L : ℕ) (v : Jacobi.Space k L) : ℝ := ∑ i : Jacobi.Index k L, finiteGramRecurrenceWeight n k L v i -private def finiteGramFibreAmplitude +/-- The square root of a normalized recurrence weight, giving the amplitude of one degree fibre. -/ +def finiteGramFibreAmplitude (n k L : ℕ) (v : Jacobi.Space k L) (i : Jacobi.Index k L) : ℝ := Real.sqrt (finiteGramRecurrenceWeight n k L v i / finiteGramRecurrenceNormalization n k L v) -private def finiteGramFibreAmplitudeVector +/-- The vector of normalized fibre amplitudes in the Euclidean Jacobi space. -/ +def finiteGramFibreAmplitudeVector (n k L : ℕ) (v : Jacobi.Space k L) : Jacobi.Space k L := WithLp.toLp 2 (finiteGramFibreAmplitude n k L v) @@ -4220,7 +4254,8 @@ structure FiniteGramCertificate (n k L : ℕ) where ⟪boundary x (certificateFibreBasis n k i), remainder y (certificateFibreBasis n k i)⟫_ℝ = 0 -private def auxiliaryFiniteGramKernel {n k L : ℕ} +/-- The certificate overlap kernel multiplied by the inner-product shift `⟪x, y⟫ - s`. -/ +def auxiliaryFiniteGramKernel {n k L : ℕ} (certificate : FiniteGramCertificate n k L) (s : ℝ) (x y : Euclidean n) : ℝ := (⟪x, y⟫_ℝ - s) * @@ -4473,11 +4508,14 @@ open scoped BigOperators InnerProductSpace namespace HarmonicCertificateAssembly -private abbrev DegreeBlockIndex (n k L : ℕ) := +/-- Coordinates indexed jointly by a truncated degree and a harmonic basis vector in that +degree. -/ +abbrev DegreeBlockIndex (n k L : ℕ) := Σ i : Jacobi.Index k L, Fin (Gegenbauer.harmonicDimension n (k + i.val)) -private abbrev DegreeBlockPi (n k L : ℕ) := +/-- The orthogonal product of the Euclidean harmonic degree summands. -/ +abbrev DegreeBlockPi (n k L : ℕ) := PiLp 2 (fun i : Jacobi.Index k L => CertificateDegreeAmbient n k L i) @@ -4518,21 +4556,26 @@ theorem degreeBlockIndex_card simp only [Fintype.card_fin] exact degreeBlock_dimension_sum n k L hkl -private def degreeBlockIndexEquiv +/-- An enumeration of all degree-block coordinates by the truncated harmonic dimension. -/ +def degreeBlockIndexEquiv (n k L : ℕ) (hkl : k ≤ L) : DegreeBlockIndex n k L ≃ Fin (truncatedHarmonicDimension n k L) := Fintype.equivOfCardEq (by simpa only [Fintype.card_sigma, Fintype.card_fin] using degreeBlockIndex_card n k L hkl) -private def degreeBlockReindex +/-- The coordinate reindexing isometry from the degree-block basis to the certificate ambient +space. -/ +def degreeBlockReindex (n k L : ℕ) (hkl : k ≤ L) : EuclideanSpace ℝ (DegreeBlockIndex n k L) ≃ₗᵢ[ℝ] CertificateAmbient n k L := LinearIsometryEquiv.piLpCongrLeft 2 ℝ ℝ (degreeBlockIndexEquiv n k L hkl) -private def degreeBlockSingle +/-- The isometric inclusion of one degree summand into the orthogonal product of all degree +blocks. -/ +def degreeBlockSingle (n k L : ℕ) (i : Jacobi.Index k L) : CertificateDegreeAmbient n k L i →ₗᵢ[ℝ] DegreeBlockPi n k L := by @@ -4556,7 +4599,9 @@ private def degreeBlockSingle (fun j : Jacobi.Index k L => CertificateDegreeAmbient n k L j) i v -private def degreeBlockFlatten (n k L : ℕ) : +/-- The isometry flattening the product of degree spaces into joint degree-and-coordinate +indices. -/ +def degreeBlockFlatten (n k L : ℕ) : DegreeBlockPi n k L ≃ₗᵢ[ℝ] EuclideanSpace ℝ (DegreeBlockIndex n k L) := (LinearIsometryEquiv.piLpCurry ℝ 2 @@ -4564,14 +4609,17 @@ private def degreeBlockFlatten (n k L : ℕ) : (_ : Fin (Gegenbauer.harmonicDimension n (k + i.val))) => ℝ)).symm -private def degreeBlockTransport +/-- The isometry identifying the orthogonal product of degree blocks with the certificate +ambient space. -/ +def degreeBlockTransport (n k L : ℕ) (hkl : k ≤ L) : DegreeBlockPi n k L →ₗᵢ[ℝ] CertificateAmbient n k L := (degreeBlockReindex n k L hkl).toLinearIsometry.comp (degreeBlockFlatten n k L).toLinearIsometry -private def degreeBlockInclusion +/-- The inclusion of a single harmonic degree summand into the certificate ambient space. -/ +def degreeBlockInclusion (n k L : ℕ) (hkl : k ≤ L) (i : Jacobi.Index k L) : CertificateDegreeAmbient n k L i →ₗᵢ[ℝ] CertificateAmbient n k L := @@ -4611,7 +4659,8 @@ theorem degreeBlockInclusion_orthogonal rw [(degreeBlockTransport n k L hkl).inner_map_map] exact degreeBlockSingle_orthogonal n k L i j hij u v -private def weightedDegreeLinearMap +/-- The weighted sum of degree-fibre embeddings into mutually orthogonal ambient degree blocks. -/ +def weightedDegreeLinearMap (n k L : ℕ) (hkl : k ≤ L) (weights : Jacobi.Space k L) (degreeFibre : (i : Jacobi.Index k L) → Euclidean n → @@ -4686,7 +4735,8 @@ theorem weightedDegreeLinearMap_inner_of_unit rw [weightedDegreeLinearMap_inner, Perron.unit_coordinate_sq_sum hweights, one_mul] -private def weightedDegreeIsometry +/-- The weighted degree embedding bundled as an isometry when the weight vector has unit norm. -/ +def weightedDegreeIsometry (n k L : ℕ) (hkl : k ≤ L) (weights : Jacobi.Space k L) (hweights : ‖weights‖ = 1) (degreeFibre : (i : Jacobi.Index k L) → Euclidean n → @@ -4715,7 +4765,8 @@ private def weightedDegreeIsometry degreeBlockInclusion n k L hkl i (degreeFibre i x v) := by exact weightedDegreeLinearMap_apply n k L hkl weights degreeFibre x v -private def harmonicPerronWeights +/-- A chosen nonnegative unit eigenvector for the largest Gegenbauer Jacobi eigenvalue. -/ +def harmonicPerronWeights (n k L : ℕ) (hn : 3 ≤ n) : Jacobi.Space k L := Classical.choose (Perron.exists_nonnegative_unit_topEigenvector hn k L) @@ -4740,13 +4791,15 @@ theorem harmonicPerronWeights_nonneg (Classical.choose_spec (Perron.exists_nonnegative_unit_topEigenvector hn k L)).2.2 i -private def harmonicRecurrenceWeight +/-- The dimension-weighted recurrence coordinate of the chosen harmonic Perron eigenvector. -/ +def harmonicRecurrenceWeight (n k L : ℕ) (hn : 3 ≤ n) (i : Jacobi.Index k L) : ℝ := finiteGramRecurrenceWeight n k L (harmonicPerronWeights n k L hn) i -private def harmonicRecurrenceNormalization +/-- The normalization sum for the recurrence weights of the harmonic Perron eigenvector. -/ +def harmonicRecurrenceNormalization (n k L : ℕ) (hn : 3 ≤ n) : ℝ := finiteGramRecurrenceNormalization n k L (harmonicPerronWeights n k L hn) @@ -4759,7 +4812,8 @@ theorem harmonicRecurrenceNormalization_pos (harmonicPerronWeights_unit n k L hn) (harmonicPerronWeights_nonneg n k L hn) -private def harmonicFibreAmplitudes +/-- The unit fibre-amplitude vector obtained from the harmonic Perron eigenvector. -/ +def harmonicFibreAmplitudes (n k L : ℕ) (hn : 3 ≤ n) : Jacobi.Space k L := finiteGramFibreAmplitudeVector n k L (harmonicPerronWeights n k L hn) @@ -4789,7 +4843,9 @@ theorem harmonicFibreAmplitudes_sq (harmonicPerronWeights_unit n k L hn) (harmonicPerronWeights_nonneg n k L hn) i -private def harmonicWeightedFibre +/-- The certificate fibre isometry assembled with amplitudes from the harmonic Perron +eigenvector. -/ +def harmonicWeightedFibre (n k L : ℕ) (hn : 3 ≤ n) (hkl : k ≤ L) (degreeFibre : (i : Jacobi.Index k L) → Euclidean n → CertificateFibre n k →ₗᵢ[ℝ] @@ -4817,20 +4873,25 @@ private def harmonicWeightedFibre (harmonicFibreAmplitudes_unit n k L hn) degreeFibre x v -private def harmonicPolynomialEuclideanEquiv +/-- An orthonormal coordinate identification of homogeneous harmonic polynomials with Euclidean +space. -/ +def harmonicPolynomialEuclideanEquiv (n m : ℕ) (hn : 0 < n) : harmonicHomogeneousSubmodule n m ≃ₗᵢ[ℝ] Euclidean (Gegenbauer.harmonicDimension n m) := ((stdOrthonormalBasis ℝ (harmonicHomogeneousSubmodule n m)).reindex (finCongr (finrank_harmonicHomogeneousSubmodule hn m))).repr -private def harmonicDegreeEuclideanEquiv +/-- The harmonic polynomial coordinate isometry for one degree of the truncated certificate. -/ +def harmonicDegreeEuclideanEquiv (n k L : ℕ) (hn : 0 < n) (i : Jacobi.Index k L) : harmonicHomogeneousSubmodule n (k + i.val) ≃ₗᵢ[ℝ] CertificateDegreeAmbient n k L i := harmonicPolynomialEuclideanEquiv n (k + i.val) hn -private def tangentPolynomialEuclideanEquiv +/-- An orthonormal identification of tangent harmonics with the certificate fibre, using its +dimension. -/ +def tangentPolynomialEuclideanEquiv (n k : ℕ) (x : Euclidean n) (hdimension : Module.finrank ℝ (tangentHarmonicSubmodule n k x) = @@ -5184,7 +5245,9 @@ theorem solidHarmonicAxisLift_fischer_inner ihr, solidHarmonicAxisFischerScale_succ] ring -private def solidHarmonicAxisPolynomialLift +/-- The solid harmonic axis lift restricted from tangent harmonics to the target harmonic +degree. -/ +def solidHarmonicAxisPolynomialLift {n : ℕ} (k r : ℕ) (x : Euclidean n) (hx : ‖x‖ = 1) : tangentHarmonicSubmodule n k x →ₗ[ℝ] harmonicHomogeneousSubmodule n (k + r) := @@ -5246,7 +5309,8 @@ def solidHarmonicAxisPolynomialIsometry field_simp [ne_of_gt hsqrt] rw [hsquare] -private def harmonicReferenceUnitAxis +/-- The first standard coordinate vector, chosen as a reference unit axis. -/ +def harmonicReferenceUnitAxis {n : ℕ} (hn : 0 < n) : Euclidean n := EuclideanSpace.single (⟨0, hn⟩ : Fin n) (1 : ℝ) @@ -5255,7 +5319,8 @@ private def harmonicReferenceUnitAxis ‖harmonicReferenceUnitAxis hn‖ = 1 := by simp only [harmonicReferenceUnitAxis, PiLp.norm_single, norm_one] -private def unitHarmonicDegreeFibre +/-- The isometric degree-fibre embedding obtained by a solid harmonic lift along a unit axis. -/ +def unitHarmonicDegreeFibre {n : ℕ} (hn : 3 ≤ n) (k L : ℕ) (i : Jacobi.Index k L) (x : Euclidean n) (hx : ‖x‖ = 1) : @@ -5478,7 +5543,8 @@ theorem betaSq_sqrt_harmonicDimension push_cast convert h using 1 <;> ring_nf -private def sourceChannelCoefficient +/-- The squared Gegenbauer channel coefficient between adjacent source and target degrees. -/ +def sourceChannelCoefficient (n k L : ℕ) (m i : Jacobi.Index k L) : ℝ := if i.val + 1 = m.val then Gegenbauer.alphaSq n k (k + i.val) @@ -5818,18 +5884,23 @@ open scoped BigOperators InnerProductSpace namespace HarmonicCoordinateChannels -private abbrev MatrixCoordinateIndex (n k L : ℕ) := +/-- The pair of ambient coordinate indices used to flatten a projection matrix. -/ +abbrev MatrixCoordinateIndex (n k L : ℕ) := Σ _ : Fin (truncatedHarmonicDimension n k L), Fin (truncatedHarmonicDimension n k L) -private abbrev ProjectionMatrixSpace (n k L : ℕ) := +/-- The Euclidean space of projection matrices, represented as a family of ambient column +vectors. -/ +abbrev ProjectionMatrixSpace (n k L : ℕ) := PiLp 2 (fun _ : Fin (truncatedHarmonicDimension n k L) => CertificateAmbient n k L) -private abbrev HarmonicRowChannelSpace (n k L : ℕ) := +/-- The Euclidean space of `n` ambient row-channel vectors. -/ +abbrev HarmonicRowChannelSpace (n k L : ℕ) := PiLp 2 (fun _ : Fin n => CertificateAmbient n k L) -private abbrev HarmonicDegreeRowChannelSpace +/-- The row-channel space restricted to one harmonic degree summand. -/ +abbrev HarmonicDegreeRowChannelSpace (n k L : ℕ) (i : Jacobi.Index k L) := PiLp 2 (fun _ : Fin n => CertificateDegreeAmbient n k L i) @@ -5857,7 +5928,9 @@ theorem sourceChannelCoefficient_nonneg exact mul_nonneg hmatrix (Real.sqrt_nonneg _) nlinarith -private def sourceAdjacentBlockCoefficient +/-- The adjacent-block amplitude normalized by Perron recurrence weights and the top Jacobi +eigenvalue. -/ +def sourceAdjacentBlockCoefficient (n k L : ℕ) (hn : 3 ≤ n) (target source : Jacobi.Index k L) : ℝ := Real.sqrt @@ -6007,14 +6080,17 @@ theorem sourceAdjacentBlockCoefficient_amplitude_sum sourceAdjacentBlockCoefficient_sq_sum hn hkl] simp only [one_mul, HarmonicCertificateAssembly.harmonicFibreAmplitudes_apply] -private def harmonicDegreeBlockEquiv +/-- The isometric equivalence between the orthogonal degree blocks and the certificate ambient +space. -/ +def harmonicDegreeBlockEquiv (n k L : ℕ) (hkl : k ≤ L) : HarmonicCertificateAssembly.DegreeBlockPi n k L ≃ₗᵢ[ℝ] CertificateAmbient n k L := (HarmonicCertificateAssembly.degreeBlockFlatten n k L).trans (HarmonicCertificateAssembly.degreeBlockReindex n k L hkl) -private def harmonicDegreeAxisTensor +/-- The linear map sending a degree vector `u` to the row family `a ↦ x a • u`. -/ +def harmonicDegreeAxisTensor (n k L : ℕ) (i : Jacobi.Index k L) (x : Euclidean n) : CertificateDegreeAmbient n k L i →ₗ[ℝ] @@ -6070,11 +6146,13 @@ structure SourceAdjacentChannelData n k L source target) • degreeFibre source x u -private abbrev SourceTargetRowSpace (n k L : ℕ) := +/-- The orthogonal product of row-channel spaces over all target degrees. -/ +abbrev SourceTargetRowSpace (n k L : ℕ) := PiLp 2 (fun target : Jacobi.Index k L => HarmonicDegreeRowChannelSpace n k L target) -private def sourceAdjacentTargetLinearMap +/-- The weighted adjacent-channel map from source degree blocks to target row-channel blocks. -/ +def sourceAdjacentTargetLinearMap {n k L : ℕ} (hn : 3 ≤ n) (degreeFibre : (i : Jacobi.Index k L) → Euclidean n → CertificateFibre n k →ₗᵢ[ℝ] @@ -6196,7 +6274,9 @@ theorem sourceAdjacentTargetLinearMap_inner one_mul] rw [PiLp.inner_apply] -private def sourceAdjacentTargetIsometry +/-- The adjacent source-to-target map bundled as an isometry using the channel inner-product +identity. -/ +def sourceAdjacentTargetIsometry {n k L : ℕ} (hn : 3 ≤ n) (hkl : k < L) (degreeFibre : (i : Jacobi.Index k L) → Euclidean n → CertificateFibre n k →ₗᵢ[ℝ] @@ -6207,7 +6287,8 @@ private def sourceAdjacentTargetIsometry (sourceAdjacentTargetLinearMap hn degreeFibre adjacent).isometryOfInner (sourceAdjacentTargetLinearMap_inner hn hkl degreeFibre adjacent) -private def sourceTargetRowTransportLinearMap +/-- The linear map that assembles target degree components separately in each ambient row. -/ +def sourceTargetRowTransportLinearMap (n k L : ℕ) (hkl : k ≤ L) : SourceTargetRowSpace n k L →ₗ[ℝ] HarmonicRowChannelSpace n k L where @@ -6277,14 +6358,16 @@ theorem sourceTargetRowTransportLinearMap_inner intro target htarget rw [PiLp.inner_apply] -private def sourceTargetRowTransport +/-- The isometry assembling the target degree row blocks into ambient row channels. -/ +def sourceTargetRowTransport (n k L : ℕ) (hkl : k ≤ L) : SourceTargetRowSpace n k L →ₗᵢ[ℝ] HarmonicRowChannelSpace n k L := (sourceTargetRowTransportLinearMap n k L hkl).isometryOfInner (sourceTargetRowTransportLinearMap_inner n k L hkl) -private def sourceAdjacentHarmonicRow +/-- The adjacent-channel isometry expressed in certificate ambient coordinates. -/ +def sourceAdjacentHarmonicRow {n k L : ℕ} (hn : 3 ≤ n) (hkl : k < L) (degreeFibre : (i : Jacobi.Index k L) → Euclidean n → CertificateFibre n k →ₗᵢ[ℝ] @@ -6297,7 +6380,8 @@ private def sourceAdjacentHarmonicRow (harmonicDegreeBlockEquiv n k L (Nat.le_of_lt hkl)).symm.toLinearIsometry) -private abbrev ProjectionChannelSpace (n k L : ℕ) := +/-- The orthogonal product of `n + 1` projection-matrix channels. -/ +abbrev ProjectionChannelSpace (n k L : ℕ) := PiLp 2 (fun _ : Fin (n + 1) => ProjectionMatrixSpace n k L) /-- The harmonic axis tensor used in the spherical-code argument. -/ @@ -6548,7 +6632,9 @@ theorem sourceAdjacentHarmonicRow_inner_axis_fibre _ = _ := by rw [harmonicWeightedFibre_ambient_inner] -private def spectralMatrixEmbeddingLinearMap +/-- The linear embedding applying a row isometry to each matrix column, with a zero leading +channel. -/ +def spectralMatrixEmbeddingLinearMap (n k L : ℕ) (row : CertificateAmbient n k L →ₗᵢ[ℝ] HarmonicRowChannelSpace n k L) : @@ -6606,7 +6692,8 @@ theorem spectralMatrixEmbeddingLinearMap_inner ⟪M j, N j⟫_ℝ rw [← PiLp.inner_apply, row.inner_map_map] -private def spectralMatrixEmbedding +/-- The projection-matrix embedding bundled as an isometry into the enlarged channel space. -/ +def spectralMatrixEmbedding (n k L : ℕ) (row : CertificateAmbient n k L →ₗᵢ[ℝ] HarmonicRowChannelSpace n k L) : @@ -6618,20 +6705,24 @@ private def spectralMatrixEmbedding rw [norm_eq_sqrt_real_inner, norm_eq_sqrt_real_inner, spectralMatrixEmbeddingLinearMap_inner n k L row] -private abbrev ProjectionChannelIndex (n k L : ℕ) := +/-- Coordinates indexed by a channel and a pair of ambient matrix coordinates. -/ +abbrev ProjectionChannelIndex (n k L : ℕ) := Σ _ : Fin (n + 1), MatrixCoordinateIndex n k L -private def projectionChannelDimension (n k L : ℕ) : ℕ := +/-- The total number of coordinates in the projection channel space. -/ +def projectionChannelDimension (n k L : ℕ) : ℕ := Fintype.card (ProjectionChannelIndex n k L) -private def fibreProjection {n k L : ℕ} +/-- The orthogonal projection onto the image of the isometric fibre embedding at `x`. -/ +def fibreProjection {n k L : ℕ} (f : Euclidean n → CertificateFibre n k →ₗᵢ[ℝ] CertificateAmbient n k L) (x : Euclidean n) : CertificateAmbient n k L →ₗ[ℝ] CertificateAmbient n k L := (f x).toLinearMap ∘ₗ (f x).adjoint -private def projectionMatrixFeature {n k L : ℕ} +/-- The matrix columns of the fibre projection in the standard certificate ambient basis. -/ +def projectionMatrixFeature {n k L : ℕ} (f : Euclidean n → CertificateFibre n k →ₗᵢ[ℝ] CertificateAmbient n k L) (x : Euclidean n) : ProjectionMatrixSpace n k L := @@ -6647,14 +6738,16 @@ theorem projectionMatrixFeature_inner {n k L : ℕ} isometricPackingKernel f x y := by rfl -private def projectionMatrixFlatten (n k L : ℕ) : +/-- The isometry flattening a projection matrix into joint row-and-column coordinates. -/ +def projectionMatrixFlatten (n k L : ℕ) : ProjectionMatrixSpace n k L ≃ₗᵢ[ℝ] EuclideanSpace ℝ (MatrixCoordinateIndex n k L) := (LinearIsometryEquiv.piLpCurry ℝ 2 (fun (_ : Fin (truncatedHarmonicDimension n k L)) (_ : Fin (truncatedHarmonicDimension n k L)) => ℝ)).symm -private def projectionChannelFlatten (n k L : ℕ) : +/-- The isometry flattening all projection channels into a single coordinate space. -/ +def projectionChannelFlatten (n k L : ℕ) : ProjectionChannelSpace n k L ≃ₗᵢ[ℝ] EuclideanSpace ℝ (ProjectionChannelIndex n k L) := (LinearIsometryEquiv.piLpCongrRight 2 @@ -6663,14 +6756,17 @@ private def projectionChannelFlatten (n k L : ℕ) : (fun (_ : Fin (n + 1)) (_ : MatrixCoordinateIndex n k L) => ℝ)).symm -private def projectionChannelEuclideanEquiv (n k L : ℕ) : +/-- The coordinate isometry from projection channels to Euclidean space of their total +dimension. -/ +def projectionChannelEuclideanEquiv (n k L : ℕ) : ProjectionChannelSpace n k L ≃ₗᵢ[ℝ] Euclidean (projectionChannelDimension n k L) := (projectionChannelFlatten n k L).trans (LinearIsometryEquiv.piLpCongrLeft 2 ℝ ℝ (Fintype.equivFin (ProjectionChannelIndex n k L))) -private def rawLiftChannel {n k L : ℕ} +/-- The axis-weighted projection-matrix feature, preceded by a zero channel. -/ +def rawLiftChannel {n k L : ℕ} (f : Euclidean n → CertificateFibre n k →ₗᵢ[ℝ] CertificateAmbient n k L) (x : Euclidean n) : ProjectionChannelSpace n k L := @@ -6723,11 +6819,13 @@ theorem rawLiftChannel_inner {n k L : ℕ} intro a ha simp only [RCLike.inner_apply, Real.ringHom_apply, mul_comm] -private def firstFibreIndex (n k : ℕ) (hn : 3 ≤ n) : +/-- The zero coordinate index in the nonempty certificate fibre. -/ +def firstFibreIndex (n k : ℕ) (hn : 3 ≤ n) : Fin (Gegenbauer.fibreDimension n k) := ⟨0, Gegenbauer.fibreDimension_pos hn k⟩ -private def firstFibreVector (n k : ℕ) (hn : 3 ≤ n) : +/-- The first standard orthonormal vector of the certificate fibre. -/ +def firstFibreVector (n k : ℕ) (hn : 3 ≤ n) : CertificateFibre n k := certificateFibreBasis n k (firstFibreIndex n k hn) @@ -6741,7 +6839,9 @@ private def firstFibreVector (n k : ℕ) (hn : 3 ≤ n) : EuclideanSpace.inner_single_left, Real.ringHom_apply, PiLp.single_apply, eq_comm, mul_ite, mul_one, mul_zero] -private def rankOneChannelMap +/-- The rank-one map extracting the first fibre coordinate and multiplying a prescribed channel +vector. -/ +def rankOneChannelMap (n k L : ℕ) (hn : 3 ≤ n) (v : ProjectionChannelSpace n k L) : CertificateFibre n k →ₗ[ℝ] ProjectionChannelSpace n k L where @@ -6778,7 +6878,8 @@ theorem rankOneChannelMap_kernel · simp only [Finset.mem_univ, not_true_eq_false, rankOneChannelMap_apply, firstFibreVector_inner_basis, ↓reduceIte, one_smul, IsEmpty.forall_iff] -private def embeddedBulkChannel {n k L : ℕ} +/-- The fibre projection feature transported into the channel space by an isometric embedding. -/ +def embeddedBulkChannel {n k L : ℕ} (embedding : ProjectionMatrixSpace n k L →ₗᵢ[ℝ] ProjectionChannelSpace n k L) (f : Euclidean n → @@ -6931,7 +7032,8 @@ theorem sourceSpectralBulk_lift_inner rw [← Finset.mul_sum, ← PiLp.inner_apply, projectionMatrixFeature_inner] -private def euclideanChannelFeatureMap +/-- The rank-one channel feature map expressed in ordinary Euclidean coordinates. -/ +def euclideanChannelFeatureMap (n k L : ℕ) (hn : 3 ≤ n) (v : ProjectionChannelSpace n k L) : CertificateFibre n k →ₗ[ℝ] @@ -6984,7 +7086,8 @@ theorem euclideanChannelFeatureMap_kernel _ = ⟪v x, v y⟫_ℝ := rankOneChannelMap_kernel n k L hn v x y -private def bulkCoordinateMap {n k L : ℕ} +/-- The Euclidean feature map for an isometrically embedded bulk projection channel. -/ +def bulkCoordinateMap {n k L : ℕ} (hn : 3 ≤ n) (embedding : ProjectionMatrixSpace n k L →ₗᵢ[ℝ] ProjectionChannelSpace n k L) @@ -6996,7 +7099,8 @@ private def bulkCoordinateMap {n k L : ℕ} euclideanChannelFeatureMap n k L hn (embeddedBulkChannel embedding f x) -private def liftCoordinateMap {n k L : ℕ} +/-- The Euclidean feature map for the axis-weighted lifted projection channel. -/ +def liftCoordinateMap {n k L : ℕ} (hn : 3 ≤ n) (f : Euclidean n → CertificateFibre n k →ₗᵢ[ℝ] CertificateAmbient n k L) @@ -7123,7 +7227,8 @@ structure SpectralChannelRemainder ⟪boundary x (certificateFibreBasis n k i), remainder y (certificateFibreBasis n k i)⟫_ℝ = 0 -private def sourceSpectralResidual +/-- The lifted coordinate map minus the prescribed spectral multiple of the bulk coordinate map. -/ +def sourceSpectralResidual {n k L : ℕ} (hn : 3 ≤ n) (fibre : Euclidean n → CertificateFibre n k →ₗᵢ[ℝ] CertificateAmbient n k L) @@ -7264,13 +7369,16 @@ end HarmonicCoordinateChannels namespace HarmonicCoordinateOperators -private abbrev HarmonicSpace (n m : ℕ) := +/-- The Fischer inner product space of homogeneous harmonic polynomials of degree `m`. -/ +abbrev HarmonicSpace (n m : ℕ) := SpherePacking.harmonicHomogeneousSubmodule n m -private abbrev CoordinateHarmonicSpace (n m : ℕ) := +/-- The orthogonal product of one harmonic polynomial space for each coordinate direction. -/ +abbrev CoordinateHarmonicSpace (n m : ℕ) := PiLp 2 (fun _ : Fin n => HarmonicSpace n m) -private def coordinateAxis (n : ℕ) (j : Fin n) : SpherePacking.Euclidean n := +/-- The standard unit vector in coordinate direction `j`. -/ +def coordinateAxis (n : ℕ) (j : Fin n) : SpherePacking.Euclidean n := EuclideanSpace.single j (1 : ℝ) @[simp] theorem axisPolynomial_coordinateAxis @@ -7290,7 +7398,8 @@ theorem directionalDerivative_coordinateAxis simp only [coordinateAxis, EuclideanSpace.single, directionalDerivative_apply, PiLp.single_apply, ite_smul, one_smul, zero_smul, Finset.sum_ite_eq', Finset.mem_univ, ↓reduceIte] -private def harmonicCoordinateDerivative +/-- Coordinate differentiation restricted from harmonic degree `m + 1` to degree `m`. -/ +def harmonicCoordinateDerivative (n m : ℕ) (j : Fin n) : HarmonicSpace n (m + 1) →ₗ[ℝ] HarmonicSpace n m := SpherePacking.harmonicDirectionalDerivative n m (coordinateAxis n j) @@ -7307,7 +7416,8 @@ private def harmonicCoordinateDerivative (p : MvPolynomial (Fin n) ℝ) = _ exact directionalDerivative_coordinateAxis n j p -private def harmonicGradient (n m : ℕ) : +/-- The vector of coordinate derivatives of a homogeneous harmonic polynomial. -/ +def harmonicGradient (n m : ℕ) : HarmonicSpace n (m + 1) →ₗ[ℝ] CoordinateHarmonicSpace n m where toFun p := @@ -7431,11 +7541,13 @@ theorem harmonicGradient_inner _ = ((m + 1 : ℕ) : ℝ) * ⟪p, q⟫_ℝ := by rw [hpq] -private def harmonicCoordinateRaising (n m : ℕ) (j : Fin n) : +/-- The Fischer adjoint of coordinate differentiation, raising the harmonic degree by one. -/ +def harmonicCoordinateRaising (n m : ℕ) (j : Fin n) : HarmonicSpace n m →ₗ[ℝ] HarmonicSpace n (m + 1) := (harmonicCoordinateDerivative n m j).adjoint -private def harmonicCoGradient (n m : ℕ) : +/-- The vector of Fischer adjoint coordinate-raising operators. -/ +def harmonicCoGradient (n m : ℕ) : HarmonicSpace n m →ₗ[ℝ] CoordinateHarmonicSpace n (m + 1) where toFun p := @@ -7541,10 +7653,12 @@ theorem harmonicGradient_coGradient_orthogonal exact SpherePacking.fischer_polynomialInner_zero_right n (q : MvPolynomial (Fin n) ℝ) -private def upperChannelDenominator (n m : ℕ) : ℝ := +/-- The factor `2 * m + n` used to normalize the upper and lower harmonic channels. -/ +def upperChannelDenominator (n m : ℕ) : ℝ := 2 * (m : ℝ) + (n : ℝ) -private def upperChannelWeight (n m : ℕ) : ℝ := +/-- The squared norm factor `(m + 1) / (2 * m + n)` of the upper channel adjoint. -/ +def upperChannelWeight (n m : ℕ) : ℝ := ((m + 1 : ℕ) : ℝ) / upperChannelDenominator n m theorem upperChannelDenominator_pos @@ -7562,13 +7676,15 @@ theorem upperChannelWeight_pos · exact_mod_cast Nat.zero_lt_succ m · exact upperChannelDenominator_pos hn m -private def upperChannelAdjoint (n m : ℕ) : +/-- The harmonic gradient scaled by the inverse square root of the channel denominator. -/ +def upperChannelAdjoint (n m : ℕ) : HarmonicSpace n (m + 1) →ₗ[ℝ] CoordinateHarmonicSpace n m := (Real.sqrt (upperChannelDenominator n m))⁻¹ • harmonicGradient n m -private def upperChannel (n m : ℕ) : +/-- The Fischer adjoint of the scaled harmonic gradient. -/ +def upperChannel (n m : ℕ) : CoordinateHarmonicSpace n m →ₗ[ℝ] HarmonicSpace n (m + 1) := (upperChannelAdjoint n m).adjoint @@ -7646,7 +7762,8 @@ def normalizedChannelIsometry rw [Real.sq_sqrt hc.le] simp only [ne_eq, ne_of_gt hc, not_false_eq_true, div_self, one_mul] -private def upperChannelIsometry +/-- The upper channel adjoint normalized to an isometry from harmonics to coordinate harmonics. -/ +def upperChannelIsometry {n : ℕ} (hn : 0 < n) (m : ℕ) : HarmonicSpace n (m + 1) →ₗᵢ[ℝ] CoordinateHarmonicSpace n m := @@ -7656,7 +7773,8 @@ private def upperChannelIsometry (upperChannelWeight_pos hn m) (upperChannelAdjoint_inner hn m) -private def lowerChannelWeight (n m : ℕ) : ℝ := +/-- The squared norm factor `(m + n - 2) / (2 * m + n - 2)` of the lower channel adjoint. -/ +def lowerChannelWeight (n m : ℕ) : ℝ := ((m : ℝ) + (n : ℝ) - 2) / (2 * (m : ℝ) + (n : ℝ) - 2) @@ -7668,13 +7786,15 @@ theorem lowerChannelWeight_pos have hmreal : 0 ≤ (m : ℝ) := by positivity apply div_pos <;> linarith -private def lowerChannelAdjoint (n m : ℕ) : +/-- The harmonic co-gradient scaled by the inverse square root of the channel denominator. -/ +def lowerChannelAdjoint (n m : ℕ) : HarmonicSpace n m →ₗ[ℝ] CoordinateHarmonicSpace n (m + 1) := (Real.sqrt (upperChannelDenominator n m))⁻¹ • harmonicCoGradient n m -private def lowerChannel (n m : ℕ) : +/-- The Fischer adjoint of the scaled harmonic co-gradient. -/ +def lowerChannel (n m : ℕ) : CoordinateHarmonicSpace n (m + 1) →ₗ[ℝ] HarmonicSpace n m := (lowerChannelAdjoint n m).adjoint @@ -7748,7 +7868,8 @@ theorem harmonicCoordinateMultiplication_derivative_sum Nat.cast_smul_eq_nsmul, Nat.cast_smul_eq_nsmul, add_nsmul] -private def harmonicCoordinateRaisingZero +/-- Coordinate multiplication restricted from constant harmonics to degree-one harmonics. -/ +def harmonicCoordinateRaisingZero (n : ℕ) (j : Fin n) : HarmonicSpace n 0 →ₗ[ℝ] HarmonicSpace n 1 := by refine (LinearMap.mulLeft ℝ @@ -7840,7 +7961,8 @@ theorem harmonicCoordinateRaising_apply_polynomial directionalDerivative_coordinateAxis] simp only [harmonicAxisProjectionDenominator, upperChannelDenominator, add_tsub_cancel_right] -private def lowerFischerGradientWeight (n m : ℕ) : ℝ := +/-- The Fischer squared norm factor for the harmonic co-gradient before channel normalization. -/ +def lowerFischerGradientWeight (n m : ℕ) : ℝ := ((n + m : ℕ) : ℝ) - (upperChannelDenominator n (m - 1))⁻¹ * (2 * (m : ℝ)) @@ -8045,7 +8167,9 @@ theorem lowerChannelAdjoint_inner rw [Real.sq_sqrt hden.le] field_simp -private def lowerChannelIsometry +/-- The lower channel adjoint normalized to an isometry into the next coordinate-harmonic +degree. -/ +def lowerChannelIsometry {n : ℕ} (hn : 3 ≤ n) (m : ℕ) : HarmonicSpace n m →ₗᵢ[ℝ] CoordinateHarmonicSpace n (m + 1) := @@ -8089,7 +8213,8 @@ def harmonicAxisTensor (n m : ℕ) (x : SpherePacking.Euclidean n) : intro j exact smul_comm (x j) c p -private def solidHarmonicSource +/-- The solid harmonic axis isometry followed by tensoring with the source axis. -/ +def solidHarmonicSource {n : ℕ} (hn : 3 ≤ n) (k r : ℕ) (x : SpherePacking.Euclidean n) (hx : ‖x‖ = 1) : SpherePacking.tangentHarmonicSubmodule n k x →ₗ[ℝ] @@ -8201,7 +8326,9 @@ theorem solidHarmonicAxisLift_axis_pairing SpherePacking.fischer_polynomialInner_constant_mul_left, hrad, mul_zero, sub_zero] -private def solidHarmonicSourceUpperCoefficient (n k r : ℕ) : ℝ := +/-- The coefficient of the upper-channel image of a solid harmonic source, in Fischer +normalization. -/ +def solidHarmonicSourceUpperCoefficient (n k r : ℕ) : ℝ := Real.sqrt (SpherePacking.solidHarmonicAxisFischerScale n k (r + 1)) / ((2 * (r : ℝ) + SpherePacking.harmonicAxisParameter n k - 2) * @@ -8303,7 +8430,8 @@ theorem solidHarmonicSourceUpperCoefficient_pos (Real.sqrt_pos.mpr (upperChannelDenominator_pos (by omega : 0 < n) (k + r))) -private def solidHarmonicSourceUpperIsometryCoefficient +/-- The upper solid-harmonic source coefficient adjusted to the normalized channel isometry. -/ +def solidHarmonicSourceUpperIsometryCoefficient (n k r : ℕ) : ℝ := solidHarmonicSourceUpperCoefficient n k r / Real.sqrt (upperChannelWeight n (k + r)) @@ -8560,7 +8688,9 @@ theorem lowerChannel_harmonicAxisTensor_inner SpherePacking.Fischer.polynomialInner_sum_left, Finset.mul_sum] -private def solidHarmonicSourceLowerCoefficient (n k r : ℕ) : ℝ := +/-- The coefficient of the lower-channel image of a solid harmonic source, in Fischer +normalization. -/ +def solidHarmonicSourceLowerCoefficient (n k r : ℕ) : ℝ := (((r : ℝ) + 1) * ((r : ℝ) + SpherePacking.harmonicAxisParameter n k - 2) * Real.sqrt (SpherePacking.solidHarmonicAxisFischerScale n k r)) / @@ -8640,7 +8770,8 @@ theorem lowerChannel_solidHarmonicSource field_simp [hsqrt, hsqrt_next, hsqrt_den] ring -private def solidHarmonicSourceLowerIsometryCoefficient +/-- The lower solid-harmonic source coefficient adjusted to the normalized channel isometry. -/ +def solidHarmonicSourceLowerIsometryCoefficient (n k r : ℕ) : ℝ := solidHarmonicSourceLowerCoefficient n k r / Real.sqrt (lowerChannelWeight n (k + r)) @@ -8853,7 +8984,8 @@ open HarmonicCertificateAssembly open HarmonicCoordinateChannels open HarmonicCoordinateOperators -private def harmonicDegreeCastLinearMap +/-- The identity on underlying polynomials transported along an equality of harmonic degrees. -/ +def harmonicDegreeCastLinearMap (n r s : ℕ) (h : r = s) : HarmonicSpace n r →ₗ[ℝ] HarmonicSpace n s where toFun p := ⟨p.1, by simpa only [mem_harmonicHomogeneousSubmodule, h] using p.property⟩ @@ -8876,7 +9008,8 @@ theorem harmonicDegreeCastLinearMap_inner Fischer.harmonicInner_eq_polynomialInner] rfl -private def harmonicDegreeCast +/-- The isometric degree cast on harmonic polynomials. -/ +def harmonicDegreeCast (n r s : ℕ) (h : r = s) : HarmonicSpace n r →ₗᵢ[ℝ] HarmonicSpace n s := (harmonicDegreeCastLinearMap n r s h).isometryOfInner @@ -8929,7 +9062,8 @@ theorem transportedIsometry_adjoint (A.toLinearMap.adjoint z) simpa only [e.apply_symm_apply] using he.symm -private def coordinateHarmonicDegreeCastLinearMap +/-- The linear map applying the harmonic degree cast in every coordinate direction. -/ +def coordinateHarmonicDegreeCastLinearMap (n r s : ℕ) (h : r = s) : CoordinateHarmonicSpace n r →ₗ[ℝ] CoordinateHarmonicSpace n s where @@ -8955,7 +9089,8 @@ theorem coordinateHarmonicDegreeCastLinearMap_inner intro a _ exact (harmonicDegreeCast n r s h).inner_map_map (z a) (w a) -private def coordinateHarmonicDegreeCast +/-- The isometric degree cast on coordinate families of harmonic polynomials. -/ +def coordinateHarmonicDegreeCast (n r s : ℕ) (h : r = s) : CoordinateHarmonicSpace n r →ₗᵢ[ℝ] CoordinateHarmonicSpace n s := @@ -8987,7 +9122,9 @@ theorem coordinateHarmonicDegreeCast_axis x a • harmonicDegreeCast n r s h p exact (harmonicDegreeCast n r s h).map_smul (x a) p -private def coordinateDegreeTransportLinearMap +/-- The linear map expressing each coordinate harmonic polynomial in its degree-fibre Euclidean +basis. -/ +def coordinateDegreeTransportLinearMap {n : ℕ} (hn : 3 ≤ n) (k L : ℕ) (i : Jacobi.Index k L) : CoordinateHarmonicSpace n (k + i.val) →ₗ[ℝ] @@ -9019,7 +9156,8 @@ theorem coordinateDegreeTransportLinearMap_inner exact (harmonicDegreeEuclideanEquiv n k L (by omega) i).inner_map_map (z a) (w a) -private def coordinateDegreeTransport +/-- The coordinatewise harmonic-to-Euclidean degree transport bundled as an isometry. -/ +def coordinateDegreeTransport {n : ℕ} (hn : 3 ≤ n) (k L : ℕ) (i : Jacobi.Index k L) : CoordinateHarmonicSpace n (k + i.val) →ₗᵢ[ℝ] @@ -9046,7 +9184,8 @@ theorem coordinateDegreeTransport_axis exact (harmonicDegreeEuclideanEquiv n k L (by omega) i).map_smul (x a) p -private def upperAdjacentChannel +/-- The normalized upper channel transported between adjacent Euclidean degree fibres. -/ +def upperAdjacentChannel {n : ℕ} (hn : 3 ≤ n) (k L : ℕ) (target source : Jacobi.Index k L) (hadjacent : target.val + 1 = source.val) : @@ -9060,7 +9199,8 @@ private def upperAdjacentChannel (harmonicDegreeEuclideanEquiv n k L (by omega) source).symm.toLinearIsometry)) -private def lowerAdjacentChannel +/-- The normalized lower channel transported between adjacent Euclidean degree fibres. -/ +def lowerAdjacentChannel {n : ℕ} (hn : 3 ≤ n) (k L : ℕ) (target source : Jacobi.Index k L) (hadjacent : source.val + 1 = target.val) : @@ -9074,7 +9214,8 @@ private def lowerAdjacentChannel (harmonicDegreeEuclideanEquiv n k L (by omega) source).symm.toLinearIsometry)) -private def adjacentChannel +/-- The appropriate upper or lower adjacent-degree channel, and zero for nonadjacent degrees. -/ +def adjacentChannel {n : ℕ} (hn : 3 ≤ n) (k L : ℕ) (target source : Jacobi.Index k L) : CertificateDegreeAmbient n k L source →ₗ[ℝ] @@ -9195,7 +9336,8 @@ theorem adjacentChannel_orthogonal · simp only [LinearIsometry.coe_toLinearMap, LinearMap.zero_apply, inner_zero_right] · simp only [LinearMap.zero_apply, inner_zero_left] -private def sourceTangentPolynomial +/-- The tangent harmonic polynomial represented by a certificate fibre vector at a unit axis. -/ +def sourceTangentPolynomial {n : ℕ} (hn : 3 ≤ n) (k : ℕ) (x : Euclidean n) (hx : ‖x‖ = 1) (u : CertificateFibre n k) : diff --git a/LeanPool/MetricCodes/Hierarchy.lean b/LeanPool/MetricCodes/Hierarchy.lean index f1f71faa64..45b1bba569 100644 --- a/LeanPool/MetricCodes/Hierarchy.lean +++ b/LeanPool/MetricCodes/Hierarchy.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.HarmonicAnalysis +public import LeanPool.MetricCodes.HarmonicAnalysis /-! # Spherical-code hierarchy @@ -12,6 +13,8 @@ import LeanPool.MetricCodes.HarmonicAnalysis General spectral bounds, localization, compactification, and strict hierarchy estimates. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable namespace MetricCodes @@ -530,11 +533,13 @@ open scoped InnerProductSpace namespace SpherePacking -private def spherePointEmbedding_metriccodes2_d60650ef (n : ℕ) : MetricCodes.Sphere n ↪ +/-- The inclusion of unit sphere points into the ambient Euclidean space. -/ +def spherePointEmbedding (n : ℕ) : MetricCodes.Sphere n ↪ Euclidean n := ⟨Subtype.val, Subtype.val_injective⟩ -private def attachedSphereEmbedding_metriccodes2_d60650ef {n : ℕ} {s : ℝ} +/-- The embedding of a spherical code's attached point set into the unit sphere. -/ +def attachedSphereEmbedding {n : ℕ} {s : ℝ} (C : SphericalCode n s) : {x : Euclidean n // x ∈ C.points} ↪ MetricCodes.Sphere n where toFun x := ⟨x.1, C.unit_norm x.1 x.2⟩ @@ -558,7 +563,7 @@ private theorem codesSphericalCode_ext_metriccodes2_d60650ef {n : ℕ} {s : ℝ} /-- The to codes used in the spherical-code argument. -/ def SphericalCode.toCodes {n : ℕ} {s : ℝ} (C : SphericalCode n s) : MetricCodes.SphericalCode n s where - points := C.points.attach.map (attachedSphereEmbedding_metriccodes2_d60650ef C) + points := C.points.attach.map (attachedSphereEmbedding C) inner_le := by intro x hx y hy hxy obtain ⟨x', _, hx'⟩ := Finset.mem_map.mp hx @@ -573,7 +578,7 @@ def SphericalCode.toCodes {n : ℕ} {s : ℝ} /-- The of codes used in the spherical-code argument. -/ def SphericalCode.ofCodes {n : ℕ} {s : ℝ} (C : MetricCodes.SphericalCode n s) : SphericalCode n s where - points := C.points.map (spherePointEmbedding_metriccodes2_d60650ef n) + points := C.points.map (spherePointEmbedding n) unit_norm := by intro x hx obtain ⟨x', _, rfl⟩ := Finset.mem_map.mp hx @@ -604,7 +609,7 @@ private def sphericalCodeEquiv (n : ℕ) (s : ℝ) : left_inv := by intro C apply sphericalCode_ext_metriccodes2_d60650ef - change (C.toCodes.points.map (spherePointEmbedding_metriccodes2_d60650ef n)) = C.points + change (C.toCodes.points.map (spherePointEmbedding n)) = C.points ext x constructor · intro hx @@ -616,7 +621,7 @@ private def sphericalCodeEquiv (n : ℕ) (s : ℝ) : · intro hx let w : {u : Euclidean n // u ∈ C.points} := ⟨x, hx⟩ let z : MetricCodes.Sphere n := - attachedSphereEmbedding_metriccodes2_d60650ef C w + attachedSphereEmbedding C w exact Finset.mem_map.mpr ⟨z, Finset.mem_map.mpr ⟨w, Finset.mem_attach _ _, rfl⟩, rfl⟩ right_inv := by @@ -625,7 +630,7 @@ private def sphericalCodeEquiv (n : ℕ) (s : ℝ) : ext x change x ∈ (SphericalCode.ofCodes C).points.attach.map - (attachedSphereEmbedding_metriccodes2_d60650ef (SphericalCode.ofCodes C)) ↔ + (attachedSphereEmbedding (SphericalCode.ofCodes C)) ↔ x ∈ C.points constructor · intro hx @@ -1074,10 +1079,12 @@ section open Filter Topology open scoped BigOperators Topology -private def appendAmbient {r : ℕ} (a : Fin (r + 1) → ℝ) : Fin (r + 2) → ℝ := +/-- Extend the ambient parameter row by appending a zero coordinate. -/ +def appendAmbient {r : ℕ} (a : Fin (r + 1) → ℝ) : Fin (r + 2) → ℝ := Fin.snoc a 0 -private def appendStabilizer {r : ℕ} (b : Fin r → ℝ) (ε : ℝ) : Fin (r + 1) → ℝ := +/-- Extend the stabilizer parameter row by appending the coordinate `ε`. -/ +def appendStabilizer {r : ℕ} (b : Fin r → ℝ) (ε : ℝ) : Fin (r + 1) → ℝ := Fin.snoc b ε theorem interlacing_append {r : ℕ} @@ -1133,7 +1140,8 @@ theorem lagrangeWeight_append_castSucc {r : ℕ} lagrangeDenominator_append_castSucc] field_simp [hquad, hden] -private def appendSpectralLoss {r : ℕ} +/-- The weighted spectral loss coefficient associated with appending a stabilizer parameter. -/ +def appendSpectralLoss {r : ℕ} (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ) : ℝ := ∑ i : Fin (r + 1), lagrangeWeight a b i * spectralAtom (a i) / @@ -1185,7 +1193,8 @@ theorem Phi_append {r : ℕ} mul_zero, Real.logb_zero, sub_self] ring -private def scaleCoordinate (c u : ℝ) : ℝ := +/-- The square-root coordinate change that scales the quadratic weight `u * (1 + u)` by `c`. -/ +def scaleCoordinate (c u : ℝ) : ℝ := (Real.sqrt (1 + 4 * c * (u * (1 + u))) - 1) / 2 theorem scaleCoordinate_nonneg {c u : ℝ} @@ -1243,10 +1252,12 @@ theorem scaleCoordinate_pos {c u : ℝ} (hc : 0 < c) (hu : 0 < u) : scaleCoordinate_strictMonoOn hc (show (0 : ℝ) ∈ Set.Ici 0 by simp) (show u ∈ Set.Ici 0 from hu.le) hu -private def scaleAmbient {r : ℕ} (c : ℝ) (a : Fin (r + 1) → ℝ) : Fin (r + 1) → ℝ := +/-- Apply the quadratic-weight scaling coordinate change to every ambient parameter. -/ +def scaleAmbient {r : ℕ} (c : ℝ) (a : Fin (r + 1) → ℝ) : Fin (r + 1) → ℝ := fun i => scaleCoordinate c (a i) -private def scaleStabilizer {r : ℕ} (c : ℝ) (b : Fin r → ℝ) : Fin r → ℝ := +/-- Apply the quadratic-weight scaling coordinate change to every stabilizer parameter. -/ +def scaleStabilizer {r : ℕ} (c : ℝ) (b : Fin r → ℝ) : Fin r → ℝ := fun i => scaleCoordinate c (b i) theorem Interlacing.scale {r : ℕ} @@ -1406,7 +1417,8 @@ theorem spectralAtom_scale_sub_lower_bound {c u : ℝ} dsimp [x, Q, q] at hfractions hfactor hsq ⊢ linarith -private def scalingGainCoefficient {r : ℕ} +/-- The positive weighted coefficient controlling the spectral gain under parameter scaling. -/ +def scalingGainCoefficient {r : ℕ} (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ) : ℝ := ∑ i : Fin (r + 1), lagrangeWeight a b i * @@ -1451,7 +1463,8 @@ theorem Gamma_scale_sub_lower_bound {r : ℕ} dsimp [scaleAmbient] convert hweighted using 1 <;> ring -private def appendSpectralLossUpper {r : ℕ} +/-- The reciprocal quadratic-weight sum bounding the spectral loss from appending a parameter. -/ +def appendSpectralLossUpper {r : ℕ} (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ) : ℝ := ∑ i : Fin (r + 1), lagrangeWeight a b i / (2 * ((a i) * (1 + (a i)))) @@ -1509,7 +1522,8 @@ theorem append_scaled_spectralLoss_le {r : ℕ} mul_nonneg (mul_nonneg he hweight.le) (sub_nonneg.mpr hatom.le)] -private def compensatedScalingSlope {r : ℕ} +/-- The scaling slope chosen to exceed the upper bound on the appended spectral loss. -/ +def compensatedScalingSlope {r : ℕ} (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ) : ℝ := (appendSpectralLossUpper a b + 1) / scalingGainCoefficient a b @@ -1521,7 +1535,8 @@ theorem compensatedScalingSlope_pos {r : ℕ} exact div_pos (by linarith [appendSpectralLossUpper_pos h hlast]) (scalingGainCoefficient_pos h hlast) -private def compensatedScalingFactor {r : ℕ} +/-- The parameter scaling factor compensating for an appended stabilizer coordinate `ε`. -/ +def compensatedScalingFactor {r : ℕ} (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ) (ε : ℝ) : ℝ := 1 + compensatedScalingSlope a b * (ε * (1 + ε)) @@ -1594,7 +1609,8 @@ theorem scaleCoordinate_compensated_differentiableAt_zero {r : ℕ} unfold scaleCoordinate exact ((hinner.sqrt hrad).sub_const 1).div_const 2 -private def compensatedPhiPath {r : ℕ} +/-- The entropy objective evaluated along the compensated parameter-scaling path. -/ +def compensatedPhiPath {r : ℕ} (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ) (ε : ℝ) : ℝ := Phi (scaleAmbient (compensatedScalingFactor a b ε) a) (scaleStabilizer (compensatedScalingFactor a b ε) b) @@ -1798,7 +1814,9 @@ theorem Interlacing.Phi_nonneg_refinement {r : ℕ} simpa only [sphericalEntropy, sub_nonneg, ge_iff_le, add_zero, Real.logb_one, mul_zero, Real.logb_zero, sub_self] using hmono -private def levelRateSet (r : ℕ) (s : ℝ) : Set ℝ := +/-- The entropy values of rank-`r` interlacing certificates whose spectral value strictly +exceeds `s`. -/ +def levelRateSet (r : ℕ) (s : ℝ) : Set ℝ := {R | ∃ (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ), Interlacing a b ∧ s < 2 * Gamma a b ∧ R = Phi a b} @@ -1878,7 +1896,8 @@ theorem localizedEnvelope_lt_of_minimizer _ = MetricCodes.Spherical.SidelnikovLocalization.localizedEnvelope κ s := hmin.symm -private def openingAmbient {r : ℕ} +/-- Subtract `x` from the first ambient entry, then set the last ambient entry to `z`. -/ +def openingAmbient {r : ℕ} (a : Fin (r + 1) → ℝ) (x z : ℝ) : Fin (r + 1) → ℝ := Function.update (Function.update a 0 (a 0 - x)) (Fin.last r) z @@ -1896,7 +1915,8 @@ theorem zero_ne_last_of_level_pos {r : ℕ} (hr : 0 < r) : simp only [Fin.coe_ofNat_eq_mod, Nat.zero_mod, Fin.val_last] at hval omega -private def ScaledOpeningDerivative (η : ℝ) (f g : ℝ → ℝ) : Prop := +/-- Equality of initial values together with derivatives at zero related by the factor `η`. -/ +def ScaledOpeningDerivative (η : ℝ) (f g : ℝ → ℝ) : Prop := f 0 = g 0 ∧ ∃ d : ℝ, HasDerivAt f (η * d) 0 ∧ HasDerivAt g d 0 theorem ScaledOpeningDerivative.const (η k : ℝ) : @@ -2097,7 +2117,8 @@ theorem lagrangeWeight_opening_scaledDerivative {r : ℕ} exact h.lagrangeDenominator_ne_zero i simpa only using hnum.div hden (by simpa [zero_pow (by norm_num : 2 ≠ 0)] using hnonzero) -private def openingRegularGamma {r : ℕ} +/-- The spectral sum over the regular ambient entries along the boundary-opening path. -/ +def openingRegularGamma {r : ℕ} (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ) (η t : ℝ) : ℝ := ∑ i : Fin r, lagrangeWeight (openingAmbient a (η * t) (t ^ 2)) b i.castSucc * @@ -2359,7 +2380,8 @@ theorem eventually_Phi_opening_lt {r : ℕ} have hphi := Phi_opening_eq (b := b) hr hzero η t linarith -private def openingContractionSpeed {r : ℕ} +/-- The positive opening speed bounded using the derivative of the regular spectral sum. -/ +def openingContractionSpeed {r : ℕ} (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ) : ℝ := lagrangeWeight a b (Fin.last r) / (2 * (|deriv (openingRegularGamma a b 1) 0| + 1)) @@ -3008,10 +3030,13 @@ theorem tendsto_sphericalEntropy_sub_of_ratio simp only [Function.comp_apply] ring -private def normalizedBoundaryQuadratic (s u : ℝ) : ℝ := +/-- The boundary quadratic expressed in the reciprocal-scale parameter used for +compactification. -/ +def normalizedBoundaryQuadratic (s u : ℝ) : ℝ := 1 + u - (s / 2) * (u + 2) * Real.sqrt (1 + u) -private def normalizedBoundaryDegree (s u : ℝ) : ℝ := +/-- The square-root solution of the normalized boundary quadratic equation. -/ +def normalizedBoundaryDegree (s u : ℝ) : ℝ := (Real.sqrt (u ^ 2 + 4 * normalizedBoundaryQuadratic s u) - u) / 2 theorem sqrt_degree_mul_one_add_eq @@ -3114,7 +3139,8 @@ section open Filter Topology open scoped BigOperators Topology -private def compactifiedHierarchyCoordinate (u : ℝ) : ℝ := (1 + u)⁻¹ +/-- The compactifying coordinate transformation `u ↦ 1 / (1 + u)`. -/ +def compactifiedHierarchyCoordinate (u : ℝ) : ℝ := (1 + u)⁻¹ theorem compactifiedHierarchyCoordinate_mem_Ioc {u : ℝ} (hu : 0 ≤ u) : compactifiedHierarchyCoordinate u ∈ Set.Ioc (0 : ℝ) 1 := by @@ -3227,15 +3253,19 @@ theorem levelRate_minimizing_sequence_bddAbove {r : ℕ} Phi (a k) (b k) ≤ Phi (a 0) (b 0) := hanti (Nat.zero_le k) -private abbrev HierarchyCompactIndex (r : ℕ) := Fin (r + 1) ⊕ Fin r +/-- The combined index type for the ambient and stabilizer coordinates of a fixed hierarchy +level. -/ +abbrev HierarchyCompactIndex (r : ℕ) := Fin (r + 1) ⊕ Fin r -private def compactifiedHierarchyTuple {r : ℕ} +/-- The tuple obtained by compactifying all ambient and stabilizer parameters. -/ +def compactifiedHierarchyTuple {r : ℕ} (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ) : HierarchyCompactIndex r → ℝ := Sum.elim (fun i => compactifiedHierarchyCoordinate (a i)) (fun i => compactifiedHierarchyCoordinate (b i)) -private def hierarchyCompactCube (r : ℕ) : Set (HierarchyCompactIndex r → ℝ) := +/-- The unit cube containing the compactified ambient and stabilizer parameter tuples. -/ +def hierarchyCompactCube (r : ℕ) : Set (HierarchyCompactIndex r → ℝ) := Set.univ.pi (fun _ => Set.Icc (0 : ℝ) 1) theorem compactifiedHierarchyTuple_mem_cube {r : ℕ} @@ -3409,7 +3439,9 @@ section open Set Filter Topology -private def FixedLevelCompactifiedCertificateClosure (r : ℕ) : Prop := +/-- Closure of the fixed-level rate bound under convergent spectral thresholds and entropy upper +bounds. -/ +def FixedLevelCompactifiedCertificateClosure (r : ℕ) : Prop := ∀ {s R : ℝ}, 0 < s → s < 1 → ∀ (u : ℕ → ℝ) (a : ℕ → Fin (r + 1) → ℝ) @@ -3480,11 +3512,13 @@ section open Filter Topology open scoped BigOperators Topology -private def prependAmbient {r : ℕ} (u : ℝ) (a : Fin (r + 1) → ℝ) : +/-- Extend the ambient parameter row by prepending `u`. -/ +def prependAmbient {r : ℕ} (u : ℝ) (a : Fin (r + 1) → ℝ) : Fin (r + 2) → ℝ := Fin.cons u a -private def prependStabilizer {r : ℕ} (v : ℝ) (b : Fin r → ℝ) : +/-- Extend the stabilizer parameter row by prepending `v`. -/ +def prependStabilizer {r : ℕ} (v : ℝ) (b : Fin r → ℝ) : Fin (r + 1) → ℝ := Fin.cons v b @@ -4151,7 +4185,8 @@ section open scoped BigOperators -private def WeakInterlacing {r : ℕ} +/-- Interlacing with non-strict inequalities and a nonnegative final ambient coordinate. -/ +def WeakInterlacing {r : ℕ} (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ) : Prop := 0 ≤ a (Fin.last r) ∧ ∀ i : Fin r, b i ≤ a i.castSucc ∧ a i.succ ≤ b i @@ -4205,7 +4240,8 @@ theorem WeakInterlacing.drop_second {r : ℕ} | succ i => simpa only [Fin.tail, Fin.castSucc_succ, Fin.cons_succ] using h.2 i.succ.succ -private def hierarchyStieltjesRatio {r : ℕ} +/-- The ratio of stabilizer and ambient products of shifted quadratic weights. -/ +def hierarchyStieltjesRatio {r : ℕ} (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ) (t : ℝ) : ℝ := (∏ i : Fin r, (t + ((b i) * (1 + (b i))))) / (∏ i : Fin (r + 1), (t + ((a i) * (1 + (a i))))) @@ -4521,12 +4557,14 @@ section open Set Filter Topology open scoped BigOperators Topology -private def compactifiedAmbientSuffix {r k j : ℕ} +/-- The ambient suffix remaining after the first `k` compactified coordinates are removed. -/ +def compactifiedAmbientSuffix {r k j : ℕ} (h : k + j = r) (A : Fin (r + 1) → ℝ) : Fin (j + 1) → ℝ := fun i => A ⟨k + i.val, by omega⟩ -private def compactifiedStabilizerSuffix {r k j : ℕ} +/-- The stabilizer suffix remaining after the first `k` compactified coordinates are removed. -/ +def compactifiedStabilizerSuffix {r k j : ℕ} (h : k + j = r) (B : Fin r → ℝ) : Fin j → ℝ := fun i => B ⟨k + i.val, by omega⟩ @@ -5031,7 +5069,8 @@ section open scoped BigOperators -private def compactifiedEscapingRatioProduct {r k j : ℕ} +/-- The product of the first `k` compactified escaping-coordinate ratios. -/ +def compactifiedEscapingRatioProduct {r k j : ℕ} (hkj : k + j = r) (d : Fin r → ℝ) : ℝ := ∏ i : Fin k, d ⟨i.val, by omega⟩ @@ -5950,7 +5989,9 @@ theorem compactified_certificate_residual_threshold_le hφ hthreshold hfeasible hspectral nlinarith -private def FixedLevelForwardCompactifiedResidualLimit (r : ℕ) : Prop := +/-- Subsequential compactification of fixed-level families with bounded entropy into a residual +hierarchy. -/ +def FixedLevelForwardCompactifiedResidualLimit (r : ℕ) : Prop := ∀ {C : ℝ} (a : ℕ → Fin (r + 1) → ℝ) (b : ℕ → Fin r → ℝ), @@ -6466,7 +6507,8 @@ theorem levelRate_succ_lt (fun A B hAB hstrict hlevels => levelRate_le_compactified_datum hs hs' hc A B hAB hstrict hlevels) -private def oneRowBoundaryObjective (s a : ℝ) : ℝ := +/-- The one-row boundary entropy difference between the ambient and boundary degrees. -/ +def oneRowBoundaryObjective (s a : ℝ) : ℝ := MetricCodes.sphericalEntropy a - MetricCodes.sphericalEntropy (MetricCodes.Spherical.boundaryDegree s a) @@ -7180,7 +7222,9 @@ section open Filter Topology open scoped BigOperators Topology -private def closedHierarchyRateSet (s : ℝ) : Set ℝ := +/-- The entropy values of interlacing certificates at any rank satisfying the closed spectral +constraint. -/ +def closedHierarchyRateSet (s : ℝ) : Set ℝ := {z | ∃ (r : ℕ) (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ), Interlacing a b ∧ s ≤ 2 * Gamma a b ∧ z = Phi a b} @@ -7345,7 +7389,8 @@ end section -private def compactificationCapFactor (s t : ℝ) : ℝ := +/-- The square-root contraction factor comparing the cap thresholds `s` and `t`. -/ +def compactificationCapFactor (s t : ℝ) : ℝ := Real.sqrt ((1 - s) / (1 - t)) theorem compactificationCapFactor_pos @@ -7485,7 +7530,8 @@ end section -private def GenuineCompactifiedHierarchyTransfer : Prop := +/-- Transfer of a finite hierarchy certificate to the variational bound after cap contraction. -/ +def GenuineCompactifiedHierarchyTransfer : Prop := ∀ {r : ℕ} {s c : ℝ}, 0 < c → c < 1 → ∀ (a : Fin (r + 1) → ℝ) (b : Fin r → ℝ), diff --git a/LeanPool/MetricCodes/HighestWeights.lean b/LeanPool/MetricCodes/HighestWeights.lean index 4b67b0492b..489894c1c3 100644 --- a/LeanPool/MetricCodes/HighestWeights.lean +++ b/LeanPool/MetricCodes/HighestWeights.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.Interlacing +public import LeanPool.MetricCodes.Interlacing /-! # Highest-weight identities @@ -12,6 +13,8 @@ import LeanPool.MetricCodes.Interlacing Diamond relations, Lie irreducibility, and isotropic highest-weight constructions. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable namespace MetricCodes @@ -168,7 +171,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung.AllRankArbitraryRowBranchingOpera open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowFirstAxisIntertwining open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowSameAxisDiamondGapShift -private def diamondPathOperator {r n : ℕ} +/-- The lowering polarization path followed by multiplication by its starting coordinate +variable. -/ +def diamondPathOperator {r n : ℕ} (target : Fin (r + 1)) (k : Fin n) (S : Finset (Fin (r + 1))) : PolynomialSpace r n →ₗ[ℝ] PolynomialSpace r n := @@ -183,7 +188,8 @@ private def diamondPathOperator {r n : ℕ} MvPolynomial.X (variableIndex (polarizationPathStart target S) k) * lowerPolarizationPath ((S.sort (· ≤ ·)) ++ [target]) p := rfl -private def diamondOmittedRowOperator {r n : ℕ} +/-- The weighted sum of diamond paths omitting a specified raised row. -/ +def diamondOmittedRowOperator {r n : ℕ} (lam : Fin (r + 1) → ℕ) (target raised : Fin (r + 1)) (k : Fin n) : PolynomialSpace r n →ₗ[ℝ] PolynomialSpace r n := @@ -323,7 +329,9 @@ open MetricCodes.Spherical.HigherYoungArbitraryRankInterlacingGapSchedule open MetricCodes.Spherical.HigherYoungArbitraryRankInterlacingLegalSchedule open MetricCodes.Spherical.ThreeRowYoungBranching -private def DominantSameAxisDiamond (r n : ℕ) : Prop := +/-- Commutation of the two same-axis axial raises, with updated dominant weights, for every pair +of rows. -/ +def DominantSameAxisDiamond (r n : ℕ) : Prop := ∀ (lam : Fin (r + 1) → ℕ) (_ : Antitone lam) (i j : Fin (r + 1)) (_ : i < j) (k : Fin n) (p : PolynomialSpace r n), @@ -332,7 +340,8 @@ private def DominantSameAxisDiamond (r n : ℕ) : Prop := arbitraryRowAxialRaise (raiseWeight lam j) i k (arbitraryRowAxialRaise lam j k p) -private def DominantSameAxisRowDiamond {r : ℕ} (n : ℕ) +/-- The same-axis axial-raising diamond identity with the larger row fixed. -/ +def DominantSameAxisRowDiamond {r : ℕ} (n : ℕ) (row : Fin (r + 1)) : Prop := ∀ (lam : Fin (r + 1) → ℕ) (_ : Antitone lam) (i : Fin (r + 1)) (_ : i < row) (k : Fin n) @@ -513,7 +522,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowMickelssonWeightHomog open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowUnconditionalBranch open MetricCodes.Spherical.HigherRepresentationGraph -private def canonicalAdjacentProjectedRaiseCoefficient +/-- The adjacent projected raising coefficient computed from the canonical positive Fischer Gram +data. -/ +def canonicalAdjacentProjectedRaiseCoefficient {r n : ℕ} (low : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (row : Fin (r + 2)) (hlow : Interlaces low mu) @@ -657,7 +668,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowFirstAxisIntertwining open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowMickelssonPathRecurrence open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowSameAxisDiamondPathCommutator -private def diamondPairResidual {r n : ℕ} +/-- The paired diamond-path commutator residual after subtracting the shifted omitted-path +terms. -/ +def diamondPairResidual {r n : ℕ} (lam : Fin (r + 1) → ℕ) (target raised : Fin (r + 1)) (k : Fin n) (S : Finset (Fin (r + 1))) : @@ -820,7 +833,9 @@ theorem polarization_axialCoordinate_mul_lowerPolarizationPath_sub polarization_lowerPolarizationPath_commutator] split_ifs <;> ring -private def axialCoordinateLowerPath +/-- A lowering polarization path followed by multiplication by the chosen starting axis +coordinate. -/ +def axialCoordinateLowerPath {r n : ℕ} (start : Fin (r + 1)) (k : Fin n) (path : List (Fin (r + 1))) : PolynomialSpace r n →ₗ[ℝ] PolynomialSpace r n := @@ -1010,11 +1025,13 @@ open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowSameAxisDiamondFullCo open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowSameAxisDiamondRootCommutator open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowSameAxisDiamondSuffixRootCommute -private def precedingDiamondSubset {r : ℕ} +/-- The rows of a diamond subset lying strictly before the pivot. -/ +def precedingDiamondSubset {r : ℕ} (pivot : Fin (r + 1)) (S : Finset (Fin (r + 1))) : Finset (Fin (r + 1)) := S.filter (fun a => a < pivot) -private def succeedingDiamondSubset {r : ℕ} +/-- The rows of a diamond subset lying strictly after the pivot. -/ +def succeedingDiamondSubset {r : ℕ} (pivot : Fin (r + 1)) (S : Finset (Fin (r + 1))) : Finset (Fin (r + 1)) := S.filter (fun a => pivot < a) @@ -1136,7 +1153,8 @@ theorem sort_insert_eq_preceding_cons_succeeding have hcanonical := (List.toFinset_sort (r := (· ≤ ·)) hnodup).mpr hsorted simpa only [hfin] using hcanonical -private def omittedDiamondPrefix {r n : ℕ} +/-- The axial lowering-path prefix with the pivot omitted. -/ +def omittedDiamondPrefix {r n : ℕ} (target : Fin (r + 1)) (k : Fin n) (S : Finset (Fin (r + 1))) (front : List (Fin (r + 1))) (next : Fin (r + 1)) : @@ -1144,7 +1162,9 @@ private def omittedDiamondPrefix {r n : ℕ} axialCoordinateLowerPath (polarizationPathStart target S) k (front ++ [next]) -private def insertedDiamondPrefix {r n : ℕ} +/-- The axial lowering-path prefix with the pivot inserted, followed by its connecting +polarization. -/ +def insertedDiamondPrefix {r n : ℕ} (target pivot : Fin (r + 1)) (k : Fin n) (S : Finset (Fin (r + 1))) (front : List (Fin (r + 1))) (next : Fin (r + 1)) : @@ -1186,7 +1206,8 @@ theorem diamondPathOperator_eq_insertedPrefix_comp_suffix lowerPolarizationPath_append_cons_apply front pivot (next :: tail)] rfl -private def diamondPrefixResidual {r n : ℕ} +/-- The commutator residual comparing the inserted and omitted diamond prefixes. -/ +def diamondPrefixResidual {r n : ℕ} (lam : Fin (r + 1) → ℕ) (target pivot : Fin (r + 1)) (k : Fin n) (S : Finset (Fin (r + 1))) @@ -1256,13 +1277,15 @@ open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowMickelssonPathCommuta open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowSameAxisDiamondPathCommutator open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowSameAxisDiamondGapDifference -private def spectralPathCoeff {r : ℕ} +/-- The signed product of spectrally shifted row gaps outside the selected path subset. -/ +def spectralPathCoeff {r : ℕ} (lam : Fin (r + 1) → ℕ) (pivot : Fin (r + 1)) (t : ℝ) (S : Finset (Fin (r + 1))) : ℝ := (-1 : ℝ) ^ S.card * ∏ a ∈ precedingRows pivot \ S, (shiftedRowGap lam pivot a + t) -private def spectralPathOperator {r n : ℕ} +/-- The sum of diamond path operators weighted by their spectrally shifted coefficients. -/ +def spectralPathOperator {r n : ℕ} (lam : Fin (r + 1) → ℕ) (pivot target : Fin (r + 1)) (k : Fin n) (t : ℝ) : PolynomialSpace r n →ₗ[ℝ] PolynomialSpace r n := @@ -1517,7 +1540,8 @@ theorem diamondSubset_eq_preceding_union_succeeding · exact ha · exact ha -private def diamondSucceedingRows {r : ℕ} +/-- The rows strictly between the pivot and the target. -/ +def diamondSucceedingRows {r : ℕ} (target pivot : Fin (r + 1)) : Finset (Fin (r + 1)) := (precedingRows target).filter (fun a => pivot < a) @@ -1555,7 +1579,8 @@ theorem diamondOmittedRows_eq_preceding_union_succeeding · exact (ne_of_gt hahigh) heq · exact hnot ⟨haS, hahigh⟩ -private def upperDiamondPathCoefficient {r : ℕ} +/-- The signed product of row gaps contributed by the upper part of a diamond path. -/ +def upperDiamondPathCoefficient {r : ℕ} (lam : Fin (r + 1) → ℕ) (target pivot : Fin (r + 1)) (S : Finset (Fin (r + 1))) : ℝ := @@ -1831,11 +1856,13 @@ theorem polarizationPathCoefficient_insert_union_factor ((mem_diamondSucceedingRows target pivot a).mp (hU ha)).2⟩ rw [hupper, hself] -private def diamondUpperSuffixNext {r : ℕ} +/-- The first row in the sorted upper suffix, with the target appended as a final row. -/ +def diamondUpperSuffixNext {r : ℕ} (target : Fin (r + 1)) (U : Finset (Fin (r + 1))) : Fin (r + 1) := ((U.sort (· ≤ ·)) ++ [target]).headD target -private def diamondUpperSuffixTail {r : ℕ} +/-- The remaining rows after removing the first row of the upper diamond suffix. -/ +def diamondUpperSuffixTail {r : ℕ} (target : Fin (r + 1)) (U : Finset (Fin (r + 1))) : List (Fin (r + 1)) := ((U.sort (· ≤ ·)) ++ [target]).tail @@ -1927,7 +1954,8 @@ theorem insertedDiamondPrefix_union_eq_lowerPath_comp_root rw [polarizationPathStart_insert_union_eq_lower_pivot target pivot L U hL hU] -private def localSpectralDiamondResidual {r n : ℕ} +/-- The local commutator residual for a diamond prefix ending at the next suffix row. -/ +def localSpectralDiamondResidual {r n : ℕ} (lam : Fin (r + 1) → ℕ) (target pivot next : Fin (r + 1)) (k : Fin n) (L : Finset (Fin (r + 1))) : @@ -1940,7 +1968,8 @@ private def localSpectralDiamondResidual {r n : ℕ} shiftedRowGap lam target pivot • (omitted.comp Z - Z.comp omitted)) - omitted.comp Z -private def spectralDiamondPrefixResidual {r n : ℕ} +/-- The spectral-path commutator residual associated with a diamond prefix and its next row. -/ +def spectralDiamondPrefixResidual {r n : ℕ} (lam : Fin (r + 1) → ℕ) (target pivot next : Fin (r + 1)) (k : Fin n) : PolynomialSpace r n →ₗ[ℝ] PolynomialSpace r n := @@ -1953,7 +1982,9 @@ private def spectralDiamondPrefixResidual {r n : ℕ} h • (offdiagonal.comp Z - Z.comp offdiagonal)) - offdiagonal.comp Z -private def spectralDiamondResidualTransform {r n : ℕ} +/-- The linear transformation combining diagonal and off-diagonal operators into a diamond +residual. -/ +def spectralDiamondResidualTransform {r n : ℕ} (lam : Fin (r + 1) → ℕ) (target pivot next : Fin (r + 1)) (k : Fin n) : ((PolynomialSpace r n →ₗ[ℝ] PolynomialSpace r n) × @@ -4013,7 +4044,8 @@ theorem sourceRowRoot_sourceHighestWeightPolynomial_upper {r : ℕ} sourceRowRoot_sourceLeadingMinor_upper i j hij k] simp only [smul_eq_mul, mul_zero, nsmul_zero] -private def sourceDiagonalEvaluation {m : ℕ} : Fin m × Fin m → ℂ := +/-- The identity-matrix assignment to the source polynomial variables. -/ +def sourceDiagonalEvaluation {m : ℕ} : Fin m × Fin m → ℂ := fun z => if z.1 = z.2 then 1 else 0 theorem eval_sourceLeadingMinor {r : ℕ} (k : Fin (r + 1)) : @@ -4435,7 +4467,8 @@ def operatorWordSpan (R : I → V →ₗ[K] V) (v : V) : Submodule K V := Submodule.span K (Set.range (fun w : List I => rootOperatorWord R w v)) -private def operatorWordPairSpan +/-- The sum of the operator-word cyclic submodules generated by two vectors. -/ +def operatorWordPairSpan {K V I : Type*} [Semiring K] [AddCommMonoid V] [Module K V] (R : I → V →ₗ[K] V) (v w : V) : Submodule K V := @@ -5128,7 +5161,8 @@ theorem sourceColumnRoot_sourceHighestWeightPolynomial_upper {r : ℕ} sourceColumnRoot_sourceLeadingMinor_upper i j hij k] simp only [smul_eq_mul, mul_zero, nsmul_zero] -private def sourceHighestKernel {r : ℕ} (lam : Fin (r + 1) → ℕ) : +/-- The simultaneous source row and column highest-weight equations for the weight `lam`. -/ +def sourceHighestKernel {r : ℕ} (lam : Fin (r + 1) → ℕ) : Submodule ℂ (SourceMatrix (r + 1)) := (⨅ i : Fin (r + 1), LinearMap.ker ((sourceRowRoot i i).toLinearMap - @@ -5184,7 +5218,9 @@ namespace HigherYoungAllRankSourceDiagonalBalance open MetricCodes.Spherical.HigherHarmonicYoung.BideterminantHighestLine -private def sourceDiagonalExponent {m : ℕ} (lam : Fin m → ℕ) : +/-- The exponent vector supported on diagonal entries, with diagonal multiplicities prescribed +by `lam`. -/ +def sourceDiagonalExponent {m : ℕ} (lam : Fin m → ℕ) : Fin m × Fin m →₀ ℕ := ∑ i : Fin m, Finsupp.single (i, i) (lam i) @@ -5326,7 +5362,8 @@ open MetricCodes.Spherical.HigherHarmonicYoung.BideterminantHighestLine open MetricCodes.Spherical.HigherYoungAllRankSourceHighestKernel open MetricCodes.Spherical.HigherYoungAllRankSourceDiagonalBalance -private def belowDiagonalWeight {m : ℕ} (z : Fin m × Fin m) : ℕ := +/-- The row-minus-column offset, truncated to zero on and above the diagonal. -/ +def belowDiagonalWeight {m : ℕ} (z : Fin m × Fin m) : ℕ := z.1.val - z.2.val /-- The below diagonal mass used in the spherical-code argument. -/ @@ -5360,12 +5397,16 @@ theorem belowDiagonalMass_sub_single_add {m : ℕ} (d - Finsupp.single z 1) z 1 simpa only [mul_one, heq] using hmass.symm -private def upperRootTargetExponent {m : ℕ} +/-- Move one exponent unit from the lower-triangular entry `(j, i)` to the diagonal entry `(i, +i)`. -/ +def upperRootTargetExponent {m : ℕ} (d : Fin m × Fin m →₀ ℕ) (i j : Fin m) : Fin m × Fin m →₀ ℕ := d - Finsupp.single (j, i) 1 + Finsupp.single (i, i) 1 -private def upperRootSourceExponent {m : ℕ} +/-- The upper-root source exponent obtained by moving one unit between rows of the target +exponent. -/ +def upperRootSourceExponent {m : ℕ} (d : Fin m × Fin m →₀ ℕ) (i j k : Fin m) : Fin m × Fin m →₀ ℕ := upperRootTargetExponent d i j - @@ -6368,7 +6409,8 @@ section open scoped BigOperators open MetricCodes.Spherical.HigherYoungTwoRowLieIrreducibility -private def weightedPolynomialFiltration {σ : Type*} (weight : σ → ℕ) (k : ℕ) : +/-- The polynomial submodule supported on monomials of weighted degree at most `k`. -/ +def weightedPolynomialFiltration {σ : Type*} (weight : σ → ℕ) (k : ℕ) : Submodule ℂ (MvPolynomial σ ℂ) := MvPolynomial.restrictSupport ℂ {d : σ →₀ ℕ | Finsupp.weight weight d ≤ k} @@ -6392,7 +6434,8 @@ theorem monomial_mem_weightedPolynomialFiltration {σ : Type*} · simp [hed] · exact (he rfl).elim -private def strictWeightedPolynomialFiltration {σ : Type*} +/-- The polynomial submodule supported on monomials of weighted degree strictly below `k`. -/ +def strictWeightedPolynomialFiltration {σ : Type*} (weight : σ → ℕ) (k : ℕ) : Submodule ℂ (MvPolynomial σ ℂ) := MvPolynomial.restrictSupport ℂ {d : σ →₀ ℕ | Finsupp.weight weight d + 1 ≤ k} @@ -6663,7 +6706,9 @@ def isotropicCoordinateGenerator {r n : ℕ} (h : 2 * (r + 1) ≤ n) simp only [isotropicCoordinateGenerator, variableIndex, Equiv.symm_apply_apply, not_lt_of_ge ht, ↓reduceDIte] -private def inverseIsotropicCoordinateGenerator {r n : ℕ} +/-- The polynomial substitution expressing an original coordinate in the inverse isotropic +coordinates. -/ +def inverseIsotropicCoordinateGenerator {r n : ℕ} (h : 2 * (r + 1) ≤ n) (v : Fin ((r + 1) * n)) : MvPolynomial (Fin ((r + 1) * n)) ℂ := let a := ((finProdFinEquiv (m := r + 1) (n := n)).symm v).1 @@ -6722,12 +6767,14 @@ private def inverseIsotropicCoordinateGenerator {r n : ℕ} simp only [inverseIsotropicCoordinateGenerator, variableIndex, Equiv.symm_apply_apply, not_lt_of_ge ht, ↓reduceDIte] -private def isotropicCoordinateHom {r n : ℕ} (h : 2 * (r + 1) ≤ n) : +/-- The algebra map substituting the isotropic coordinate generators. -/ +def isotropicCoordinateHom {r n : ℕ} (h : 2 * (r + 1) ≤ n) : MvPolynomial (Fin ((r + 1) * n)) ℂ →ₐ[ℂ] MvPolynomial (Fin ((r + 1) * n)) ℂ := MvPolynomial.aeval (isotropicCoordinateGenerator h) -private def inverseIsotropicCoordinateHom {r n : ℕ} +/-- The algebra map substituting the inverse isotropic coordinate generators. -/ +def inverseIsotropicCoordinateHom {r n : ℕ} (h : 2 * (r + 1) ≤ n) : MvPolynomial (Fin ((r + 1) * n)) ℂ →ₐ[ℂ] MvPolynomial (Fin ((r + 1) * n)) ℂ := diff --git a/LeanPool/MetricCodes/Interlacing.lean b/LeanPool/MetricCodes/Interlacing.lean index 3cd9b2287f..3352d30920 100644 --- a/LeanPool/MetricCodes/Interlacing.lean +++ b/LeanPool/MetricCodes/Interlacing.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.Branching -import Mathlib.Algebra.Lie.Basic -import Mathlib.RingTheory.Derivation.Basic +public import LeanPool.MetricCodes.Branching +public import Mathlib.Algebra.Lie.Basic +public import Mathlib.RingTheory.Derivation.Basic /-! # Arbitrary-rank interlacing @@ -14,6 +15,8 @@ import Mathlib.RingTheory.Derivation.Basic Mickelsson operators, interlacing schedules, and canonical projected-axis witnesses. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable namespace MetricCodes @@ -506,7 +509,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung.AllRankArbitraryRowBranchingOpera open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowMickelssonPathCommutator open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowMickelssonSimpleRoot -private def simpleRootToggleBridge {r n : ℕ} +/-- The intermediate polarization expression linking the front and tail paths in simple-root +toggle identities. -/ +def simpleRootToggleBridge {r n : ℕ} (front : List (Fin (r + 1))) (i a b j : Fin (r + 1)) (tail : List (Fin (r + 1))) (p : PolynomialSpace r n) : PolynomialSpace r n := @@ -690,7 +695,8 @@ open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowMickelssonPathCommuta open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowMickelssonSimpleRoot open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowMickelssonPathToggle -private def coordinateToggleBridge {r n : ℕ} +/-- Multiply the simple-root toggle bridge by the coordinate at the path's starting row. -/ +def coordinateToggleBridge {r n : ℕ} (start : Fin (r + 1)) (k : Fin n) (front : List (Fin (r + 1))) (i a b j : Fin (r + 1)) (tail : List (Fin (r + 1))) (p : PolynomialSpace r n) : @@ -840,7 +846,8 @@ theorem simpleRoot_coordinate_path_four_states simpleRoot_coordinate_path_both front start i a b j k tail hstart hia hab hbj hfront hbefore htail hafter p A B hp ha hb⟩ -private def coordinateToggleBridgeNoFront {r n : ℕ} +/-- The coordinate toggle bridge with no front path, using the coordinate in row `a`. -/ +def coordinateToggleBridgeNoFront {r n : ℕ} (a b j : Fin (r + 1)) (k : Fin n) (tail : List (Fin (r + 1))) (p : PolynomialSpace r n) : PolynomialSpace r n := @@ -990,7 +997,9 @@ theorem rowEuler_lowerPolarizationPath_suffix_of_ne simpa only [ne_eq, List.headD_eq_head?_getD] using hastart simp only [hatarget, ↓reduceIte, add_zero, List.headD_eq_head?_getD, hastart', sub_zero] -private def actualMickelssonPathTerm {r n : ℕ} +/-- The coordinate-weighted lowering path through the sorted rows of `S` and then the terminal +row. -/ +def actualMickelssonPathTerm {r n : ℕ} (row : Fin (r + 1)) (k : Fin n) (S : Finset (Fin (r + 1))) (p : PolynomialSpace r n) : PolynomialSpace r n := @@ -1744,7 +1753,8 @@ theorem sum_powerset_eq_zero_of_pair_states rw [sum_powerset_pair s a b ha hb hab f] exact Finset.sum_eq_zero hstates -private def arbitraryRowMickelssonPathTerm {r n : ℕ} +/-- The coordinate-weighted lowering-path summand in the arbitrary-row axial raising operator. -/ +def arbitraryRowMickelssonPathTerm {r n : ℕ} (row : Fin (r + 1)) (k : Fin n) (S : Finset (Fin (r + 1))) (p : PolynomialSpace r n) : PolynomialSpace r n := @@ -1938,7 +1948,8 @@ open MetricCodes.Spherical.HigherYoungArbitraryRankInterlacingGapSchedule open MetricCodes.Spherical.HigherYoungArbitraryRankInterlacingLegalSchedule open MetricCodes.Spherical.ThreeRowYoungBranching -private def DominantAxialSchedule {r : ℕ} +/-- Every prefix of the axial raising schedule leaves the current weight antitone. -/ +def DominantAxialSchedule {r : ℕ} (lam : Fin (r + 1) → ℕ) (rows : List (Fin (r + 1))) : Prop := ∀ pref suff : List (Fin (r + 1)), rows = pref ++ suff → Antitone (arbitraryRowPathWeight lam pref) @@ -2050,13 +2061,16 @@ namespace HigherYoungArbitraryRowAxialFiltrationIdeal open MetricCodes.Spherical.HigherHarmonicYoung open MetricCodes.Spherical.HigherHarmonicYoung.AllRankArbitraryRowBranchingOperator -private def lowerAxisIdeal {r n : ℕ} (k : Fin n) (row : Fin (r + 1)) : +/-- The ideal generated by the axis coordinates in rows strictly before `row`. -/ +def lowerAxisIdeal {r n : ℕ} (k : Fin n) (row : Fin (r + 1)) : Ideal (PolynomialSpace r n) := Ideal.span {p : PolynomialSpace r n | ∃ i : Fin (r + 1), i < row ∧ p = MvPolynomial.X (variableIndex i k)} -private def lowerAxisGramIdeal {r n : ℕ} (k : Fin n) (row : Fin (r + 1)) : +/-- The ideal generated jointly by the Gram radial relations and the earlier-row axis +coordinates. -/ +def lowerAxisGramIdeal {r n : ℕ} (k : Fin n) (row : Fin (r + 1)) : Ideal (PolynomialSpace r n) := youngGramRadialIdeal r n ⊔ lowerAxisIdeal k row @@ -2197,7 +2211,8 @@ open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowMickelssonGramIdeal open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowAxialLeadingOrder open MetricCodes.Spherical.HigherYoungArbitraryRowAxialFiltrationIdeal -private def positiveLeadingAxialSchedule {r : ℕ} +/-- Each successive axial raising step has a positive leading scalar at its current weight. -/ +def positiveLeadingAxialSchedule {r : ℕ} (lam : Fin (r + 1) → ℕ) : List (Fin (r + 1)) → Prop | [] => True | row :: rows => @@ -2379,7 +2394,8 @@ open MetricCodes.Spherical.HigherYoungArbitraryRowAxialFiltrationIdeal open MetricCodes.Spherical.HigherYoungCoprimeLeadingBuchberger open MetricCodes.Spherical.HigherYoungCoprimeLeadingRegularSequence -private def lowerAxisPolynomialList +/-- The list of axis-coordinate polynomials in rows strictly before `row`. -/ +def lowerAxisPolynomialList {r n : ℕ} (k : Fin n) (row : Fin (r + 1)) : List (PolynomialSpace r n) := ((Finset.univ.filter (fun i : Fin (r + 1) => i < row)).toList).map @@ -2409,7 +2425,8 @@ theorem lowerAxisPolynomialList_ideal ext p exact mem_lowerAxisPolynomialList_iff k row p -private def lowerAxisGramPolynomialList +/-- The list of Gram quadratics followed by the earlier-row axis-coordinate generators. -/ +def lowerAxisGramPolynomialList {r n : ℕ} (k : Fin n) (row : Fin (r + 1)) : List (PolynomialSpace r n) := gramQuadraticList r n ++ lowerAxisPolynomialList k row @@ -2602,7 +2619,9 @@ open MetricCodes.Spherical.HigherYoungArbitraryRowAxialFiltrationIdeal open MetricCodes.Spherical.HigherYoungIteratedAxialProjectionSemigroup open MetricCodes.Spherical.ThreeRowYoungBranching -private def axialTransverseCoordinate {r n : ℕ} : +/-- Retain the old row coordinates as polynomial variables and send the additional row and +coordinate to zero. -/ +def axialTransverseCoordinate {r n : ℕ} : Fin ((r + 2) * (n + 1)) → PolynomialSpace r n := fun a => let z := (finProdFinEquiv @@ -2613,7 +2632,9 @@ private def axialTransverseCoordinate {r n : ℕ} : (fun j : Fin n => MvPolynomial.X (variableIndex i j)) z.2) z.1 -private def axialTransverseRetraction {r n : ℕ} : +/-- The polynomial retraction obtained by setting the additional row and transverse coordinate +to zero. -/ +def axialTransverseRetraction {r n : ℕ} : PolynomialSpace (r + 1) (n + 1) →ₐ[ℝ] PolynomialSpace r n := MvPolynomial.aeval axialTransverseCoordinate @@ -3132,7 +3153,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRankInterlacingTriangula open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRankReverseInterlacingPolynomialSeed open MetricCodes.Spherical.HigherRepresentationGraph -private def reverseInterlacingHighestWeightSeed +/-- The reverse interlacing polynomial seed bundled as a map to homogeneous highest-weight +space. -/ +def reverseInterlacingHighestWeightSeed {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (h : Interlaces lam mu) : HarmonicYoungSpace (n := n) mu →ₗ[ℝ] @@ -3211,7 +3234,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRankGelfandTsetlinHarmon open MetricCodes.Spherical.HigherRepresentationGraph open SpherePacking.HarmonicCoordinateOperators -private def normalizedGelfandTsetlinFibre +/-- The reverse interlacing harmonic branch normalized to an isometry using its positive Gram +scalar. -/ +def normalizedGelfandTsetlinFibre {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (h : Interlaces lam mu) (c : ℝ) (hc : 0 < c) @@ -3357,7 +3382,8 @@ def ambientRotation {r n : ℕ} (a b : Fin n) : ambientCoordinateDerivation (r := r) a b p - ambientCoordinateDerivation (r := r) b a p := rfl -private def rowPolarizationDerivation {r n : ℕ} (i j : Fin (r + 1)) : +/-- The row polarization operator expressed as a sum of coordinate-weighted partial derivations. -/ +def rowPolarizationDerivation {r n : ℕ} (i j : Fin (r + 1)) : Derivation ℝ (PolynomialSpace r n) (PolynomialSpace r n) := ∑ a : Fin n, (MvPolynomial.X (variableIndex i a) : PolynomialSpace r n) • @@ -3384,7 +3410,8 @@ theorem rowPolarizationDerivation_X {r n : ℕ} rw [rowPolarizationDerivation_apply] exact polarization_X_euler i j k a -private def derivationCommutator {r n : ℕ} +/-- The commutator of two polynomial derivations, bundled again as a derivation. -/ +def derivationCommutator {r n : ℕ} (D₁ D₂ : Derivation ℝ (PolynomialSpace r n) (PolynomialSpace r n)) : Derivation ℝ (PolynomialSpace r n) (PolynomialSpace r n) := Derivation.mk' @@ -3395,7 +3422,7 @@ private def derivationCommutator {r n : ℕ} Derivation.coeFn_coe, map_add, Derivation.leibniz, smul_eq_mul] ring -private instance derivationBracket {r n : ℕ} : +instance derivationBracket {r n : ℕ} : Bracket (Derivation ℝ (PolynomialSpace r n) (PolynomialSpace r n)) (Derivation ℝ (PolynomialSpace r n) (PolynomialSpace r n)) := @@ -4060,7 +4087,8 @@ open MetricCodes.Spherical.HigherYoungMixedGapAxisProbability open MetricCodes.Spherical.HigherProjectionInstantiation open MetricCodes.Spherical.HigherYoungMovingFibres -private def phaseNegatedChannel +/-- Negate the output of a channel isometry by precomposing it with negation. -/ +def phaseNegatedChannel {E F : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [NormedAddCommGroup F] [InnerProductSpace ℝ F] @@ -4127,7 +4155,8 @@ def youngAmbientCasimir {r n : ℕ} (lam : Fin (r + 1) → ℕ) : -((youngAmbientRotation lam a b).comp (youngAmbientRotation lam a b)) -private def ambientCasimirPolynomial {r n : ℕ} (p : PolynomialSpace r n) : +/-- The polynomial Casimir operator, one half of the negative sum of squared ambient rotations. -/ +def ambientCasimirPolynomial {r n : ℕ} (p : PolynomialSpace r n) : PolynomialSpace r n := (2 : ℝ)⁻¹ • ∑ a : Fin n, ∑ b : Fin n, @@ -4481,7 +4510,8 @@ section open scoped BigOperators InnerProductSpace -private def IsYoungAmbientRotationIntertwiner {r n : ℕ} +/-- A linear map between harmonic Young spaces that intertwines every ambient rotation operator. -/ +def IsYoungAmbientRotationIntertwiner {r n : ℕ} (lam mu : Fin (r + 1) → ℕ) (A : HarmonicYoungSpace (n := n) lam →ₗ[ℝ] HarmonicYoungSpace (n := n) mu) : Prop := @@ -5482,7 +5512,8 @@ def boxAxis (n : ℕ) (hn : 0 < n) : SpherePoint n := by refine ⟨EuclideanSpace.single (Fin.last d) (1 : ℝ), ?_⟩ simp only [PiLp.norm_single, norm_one] -private def phaseCorrectedYoungChannel {E G : Type*} +/-- Choose the channel or its negation according to the sign of the axis coefficient `c`. -/ +def phaseCorrectedYoungChannel {E G : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [NormedAddCommGroup G] [InnerProductSpace ℝ G] (A : E →ₗᵢ[ℝ] G) (c : ℝ) : E →ₗᵢ[ℝ] G := @@ -5645,7 +5676,9 @@ structure BoxRaisingProjectedAxisWitness {r m n : ℕ} (fibre target v) = coefficient • fibre source v -private def coherentBoxLowerSector {r m n : ℕ} +/-- The coherent sector obtained by normalizing a lowering channel from its projected-axis +witness. -/ +def coherentBoxLowerSector {r m n : ℕ} (a : Fin (r + 2) → ℝ) (b : Fin (r + 1) → ℝ) (o : SpherePoint n) (fibre : (i : BoxIndex (r + 1) m) → @@ -5680,7 +5713,9 @@ private def coherentBoxLowerSector {r m n : ℕ} hdeg row o (fibre target) (fibre source) D.coefficient D.projected_axis x v, smul_smul] -private def coherentBoxRaiseSector {r m n : ℕ} +/-- The coherent sector obtained by normalizing a raising channel from its projected-axis +witness. -/ +def coherentBoxRaiseSector {r m n : ℕ} (a : Fin (r + 2) → ℝ) (b : Fin (r + 1) → ℝ) (o : SpherePoint n) (fibre : (i : BoxIndex (r + 1) m) → @@ -5737,7 +5772,8 @@ inductive BoxProjectedAxisWitness {r m n : ℕ} (data : BoxRaisingProjectedAxisWitness a b o fibre target source h row hdeg) -private def coherentBoxSector_of_projectedAxisWitness {r m n : ℕ} +/-- Construct a coherent box sector from either a lowering or a raising projected-axis witness. -/ +def coherentBoxSectorOfProjectedAxisWitness {r m n : ℕ} (a : Fin (r + 2) → ℝ) (b : Fin (r + 1) → ℝ) (o : SpherePoint n) (fibre : (i : BoxIndex (r + 1) m) → @@ -5753,7 +5789,7 @@ private def coherentBoxSector_of_projectedAxisWitness {r m n : ℕ} | raise row hdeg data => exact coherentBoxRaiseSector a b o fibre target source h row hdeg data -private theorem coherentBoxSector_of_projectedAxisWitness_axis {r m n : ℕ} +theorem coherentBoxSector_of_projectedAxisWitness_axis {r m n : ℕ} (a : Fin (r + 2) → ℝ) (b : Fin (r + 1) → ℝ) (o : SpherePoint n) (fibre : (i : BoxIndex (r + 1) m) → @@ -5764,9 +5800,9 @@ private theorem coherentBoxSector_of_projectedAxisWitness_axis {r m n : ℕ} (D : BoxProjectedAxisWitness a b o fibre target source h) (x : SpherePoint n) (v : BoxStabilizer n b) : (phaseCorrectedYoungChannel - (coherentBoxSector_of_projectedAxisWitness + (coherentBoxSectorOfProjectedAxisWitness a b o fibre target source h D).channel - (coherentBoxSector_of_projectedAxisWitness + (coherentBoxSectorOfProjectedAxisWitness a b o fibre target source h D).coefficient).adjoint (x.val ⊗ₜ[ℝ] movingYoungFibre (boxSignature (m := m) a n target) @@ -5775,10 +5811,12 @@ private theorem coherentBoxSector_of_projectedAxisWitness_axis {r m n : ℕ} movingYoungFibre (boxSignature (m := m) a n source) o (fibre source) x v := coherentBoxSector_phaseCorrected_axis a b o fibre target source h - (coherentBoxSector_of_projectedAxisWitness + (coherentBoxSectorOfProjectedAxisWitness a b o fibre target source h D) x v -private def boxRepresentationData_of_coherentSectors {r m n : ℕ} +/-- Assemble box representation data from coherent sectors, compatible axis identities, and Weyl +dimension certificates. -/ +def boxRepresentationDataOfCoherentSectors {r m n : ℕ} (a : Fin (r + 2) → ℝ) (b : Fin (r + 1) → ℝ) (hstable : ∀ v : RectangularVertices.Vertex (r + 1) m, FiniteInterlacing n (RectangularVertices.signature a n v) @@ -5854,12 +5892,12 @@ def boxRepresentationDataOfProjectedAxisWitnesses {r m n : ℕ} (h : 0 < boxProbability a b n target source) → BoxProjectedAxisWitness a b o fibre target source h) : BoxRepresentationData (m := m) (n := n) a b := - boxRepresentationData_of_coherentSectors a b hstable + boxRepresentationDataOfCoherentSectors a b hstable (boxWeylDimensions_of_actualWeyl a b hstable hweyl).1 (boxWeylDimensions_of_actualWeyl a b hstable hweyl).2 o fibre (fun target source h => - coherentBoxSector_of_projectedAxisWitness a b o fibre + coherentBoxSectorOfProjectedAxisWitness a b o fibre target source h (witness target source h)) (fun target source h x v => coherentBoxSector_of_projectedAxisWitness_axis a b o fibre @@ -6192,7 +6230,9 @@ open MetricCodes.Spherical.HigherYoungArbitraryRankReverseInterlacingRotationInt open MetricCodes.Spherical.HigherYoungMixedGapLieGram open MetricCodes.Spherical.HigherRepresentationGraph -private def reverseInterlacingHarmonicBranchGram +/-- The Gram operator of the reverse interlacing harmonic branch, its adjoint composed with the +branch. -/ +def reverseInterlacingHarmonicBranchGram {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (h : Interlaces lam mu) : HarmonicYoungSpace (n := n) mu →ₗ[ℝ] @@ -6866,7 +6906,8 @@ open MetricCodes.Spherical.HigherHarmonicYoung open MetricCodes.Spherical.HigherHarmonicYoung.BGGRootComplex open MetricCodes.Spherical.HigherYoungPenultimateRowProjectedLower -private def downstreamShift {r : ℕ} +/-- The difference of row weights corrected by the difference of their indices. -/ +def downstreamShift {r : ℕ} (lam : Fin (r + 1) → ℕ) (a i : Fin (r + 1)) : ℝ := (lam a : ℝ) - (lam i : ℝ) + (i.val : ℝ) - (a.val : ℝ) @@ -6890,7 +6931,8 @@ theorem downstreamShift_ne_zero {r : ℕ} downstreamShift lam a i ≠ 0 := ne_of_gt (downstreamShift_pos lam a i hai hdom) -private def downstreamCorrectedDerivative +/-- The row derivative recursively corrected by polarizations of derivatives in later rows. -/ +def downstreamCorrectedDerivative {r n : ℕ} (lam : Fin (r + 1) → ℕ) (a : Fin (r + 1)) (p : HarmonicYoungSpace (n := n) lam) (k : Fin n) @@ -6941,7 +6983,8 @@ namespace ArbitraryRankInternalRowLowerGram open MetricCodes.Spherical.HigherHarmonicYoung open MetricCodes.Spherical.HigherYoungInternalRowPolarizationDescent -private def downstreamRows {r : ℕ} +/-- The finite set of rows strictly after the selected row. -/ +def downstreamRows {r : ℕ} (row : Fin (r + 1)) : Finset (Fin (r + 1)) := Finset.univ.filter (fun q => row < q) @@ -6949,12 +6992,16 @@ private def downstreamRows {r : ℕ} (row q : Fin (r + 1)) : q ∈ downstreamRows row ↔ row < q := by simp only [downstreamRows, Finset.mem_filter, Finset.mem_univ, true_and] -private def downstreamNumerator {r : ℕ} +/-- The numerator in a downstream Gram factor, combining truncated weight and row-gap +differences. -/ +def downstreamNumerator {r : ℕ} (lam : Fin (r + 1) → ℕ) (row q : Fin (r + 1)) : ℝ := ((lam row - lam q : ℕ) : ℝ) + ((q.val - row.val - 1 : ℕ) : ℝ) -private def downstreamDenominator {r : ℕ} +/-- The denominator in a downstream Gram factor, combining truncated weight and row-index +differences. -/ +def downstreamDenominator {r : ℕ} (lam : Fin (r + 1) → ℕ) (row q : Fin (r + 1)) : ℝ := ((lam row - lam q : ℕ) : ℝ) + ((q.val - row.val : ℕ) : ℝ) @@ -7034,7 +7081,9 @@ namespace ArbitraryRowProjectedLowerOperator open MetricCodes.Spherical.HigherHarmonicYoung open MetricCodes.Spherical.HigherHarmonicYoung.AllRankArbitraryRowBranchingOperator -private def upperPolarizationPath {r n : ℕ} : +/-- Compose upper polarization operators along a row path, with the empty and singleton paths +acting identically. -/ +def upperPolarizationPath {r n : ℕ} : List (Fin (r + 1)) → (PolynomialSpace r n →ₗ[ℝ] PolynomialSpace r n) | [] => LinearMap.id @@ -7066,7 +7115,9 @@ theorem lowerPolarizationPath_fischer_adjoint rw [polynomialInner_polarization_harmonicLift] exact ih p (polarization r n i j q) -private def arbitraryRowAxialLower {r n : ℕ} +/-- The weighted sum of coordinate derivatives followed by upper polarization paths, adjoint to +axial raising. -/ +def arbitraryRowAxialLower {r n : ℕ} (lam : Fin (r + 1) → ℕ) (row : Fin (r + 1)) (k : Fin n) : PolynomialSpace r n →ₗ[ℝ] PolynomialSpace r n := ∑ S ∈ (precedingRows row).powerset, @@ -7316,7 +7367,8 @@ open MetricCodes.Spherical.HigherHarmonicYoung.BGGRootComplex open MetricCodes.Spherical.HigherYoungPenultimateRowProjectedLower open MetricCodes.Spherical.HigherYoungArbitraryRowDownstreamCorrection -private def loweredRowEigenvalue {r : ℕ} +/-- The row-Euler eigenvalue obtained by subtracting one precisely in the lowered row. -/ +def loweredRowEigenvalue {r : ℕ} (lam : Fin (r + 1) → ℕ) (i c : Fin (r + 1)) : ℝ := (lam c : ℝ) - if c = i then 1 else 0 @@ -7481,7 +7533,8 @@ end HigherYoungArbitraryRowDownstreamHarmonicMembership namespace HigherHarmonicYoung.ArbitraryRowDownstreamScalarTelescoping -private def downstreamScalarFactor (A B : ℝ) (i : ℕ) : ℝ := +/-- The ratio of two successive shifted row differences used in the downstream scalar product. -/ +def downstreamScalarFactor (A B : ℝ) (i : ℕ) : ℝ := (A - B + (i : ℝ)) / (A - B + ((i + 1 : ℕ) : ℝ)) theorem downstreamScalar_backward_step @@ -7509,10 +7562,12 @@ open scoped BigOperators namespace HigherYoungDownstreamFiniteIntervalSums -private def strictDownstreamRows {m : ℕ} (i : Fin m) : Finset (Fin m) := +/-- The finite set of rows strictly greater than `i`. -/ +def strictDownstreamRows {m : ℕ} (i : Fin m) : Finset (Fin m) := Finset.univ.filter (fun j => i < j) -private def strictBetweenRows {m : ℕ} (i d : Fin m) : Finset (Fin m) := +/-- The finite set of rows strictly between `i` and `d`. -/ +def strictBetweenRows {m : ℕ} (i d : Fin m) : Finset (Fin m) := Finset.univ.filter (fun j => i < j ∧ j < d) @[simp] theorem mem_strictDownstreamRows {m : ℕ} (i j : Fin m) : @@ -7934,7 +7989,9 @@ theorem youngClebschLower_arbitrary_inner_eq_cross_sum_of_simpleRoots downstreamCorrectedDerivative_source_mem_harmonicYoung_of_simpleRoots lam a ha p k (hsimple p k)) p q -private def downstreamFischerCrossSum +/-- The sum of Fischer pairings between row derivatives and their downstream-corrected +counterparts. -/ +def downstreamFischerCrossSum {r n : ℕ} (lam : Fin (r + 1) → ℕ) (a : Fin (r + 1)) (p q : HarmonicYoungSpace (n := n) lam) @@ -8623,7 +8680,8 @@ structure GenuineLoweringFibreAxisData {r m n : ℕ} (fibre target v) = coefficient • fibre source v -private def boxLoweringProjectedAxisWitness_of_actualGT +/-- Construct the lowering projected-axis witness from genuine Gelfand–Tsetlin fibre-axis data. -/ +def boxLoweringProjectedAxisWitnessOfActualGT {r m n : ℕ} (a : Fin (r + 2) → ℝ) (b : Fin (r + 1) → ℝ) (hstable : ∀ v : RectangularVertices.Vertex (r + 1) m, @@ -8700,7 +8758,9 @@ open MetricCodes.Spherical.HigherYoungActualGraphAssembly open MetricCodes.Spherical.HigherYoungAllRankActualBoxInstantiation open MetricCodes.Spherical.HigherYoungMovingFibres -private def arbitraryRowBoxRaisingProjectedAxisWitness_of_minusProbability +/-- Construct the raising projected-axis witness from a positive Gram scalar, the minus- +probability identity, and the projected-axis identity. -/ +def arbitraryRowBoxRaisingProjectedAxisWitnessOfMinusProbability {r m n : ℕ} (a : Fin (r + 2) → ℝ) (b : Fin (r + 1) → ℝ) (o : SpherePoint n) @@ -8784,7 +8844,9 @@ theorem reverseCoefficient_sq_of_forward_sq_and_weylRatio plusProbability_eq_weylEdgeRatio_mul_minus row h hraise] ring -private def boxRaisingProjectedAxisWitness_of_forwardGT_and_reverseRange +/-- Construct the raising projected-axis witness from the forward Gelfand–Tsetlin coefficient, +the Weyl Gram ratio, and the reverse projected-axis identity. -/ +def boxRaisingProjectedAxisWitnessOfForwardGTAndReverseRange {r m n : ℕ} (a : Fin (r + 2) → ℝ) (b : Fin (r + 1) → ℝ) (hstable : ∀ v : RectangularVertices.Vertex (r + 1) m, @@ -8846,7 +8908,7 @@ private def boxRaisingProjectedAxisWitness_of_forwardGT_and_reverseRange raisingGram coefficient · simpa only [hsig] using hforward' · simpa only [hrow] using hgramRatio - exact arbitraryRowBoxRaisingProjectedAxisWitness_of_minusProbability + exact arbitraryRowBoxRaisingProjectedAxisWitnessOfMinusProbability a b o fibre target source h row hrow hdeg raisingGram hraisingGram hraisingInner coefficient hreverseSquare hreverse @@ -8975,7 +9037,7 @@ def canonicalBoxProjectedAxisWitness {r m n : ℕ} · let D := haxis target source row hrow exact BoxProjectedAxisWitness.lower row (by rw [hrow]; exact sum_raiseWeight _ row) - (boxLoweringProjectedAxisWitness_of_actualGT + (boxLoweringProjectedAxisWitnessOfActualGT a b hstable o (canonicalBoxGelfandTsetlinFibre a b hstable hgram) target source h row hrow D.forward) @@ -8985,7 +9047,7 @@ def canonicalBoxProjectedAxisWitness {r m n : ℕ} let D := haxis source target row hrow' refine BoxProjectedAxisWitness.raise row (by rw [hrow']; exact sum_raiseWeight _ row) ?_ - refine boxRaisingProjectedAxisWitness_of_forwardGT_and_reverseRange + refine boxRaisingProjectedAxisWitnessOfForwardGTAndReverseRange a b hstable o (canonicalBoxGelfandTsetlinFibre a b hstable hgram) target source h row hrow' @@ -9022,7 +9084,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowMickelssonHighest open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowMickelssonWeightHomogeneity open MetricCodes.Spherical.HigherHarmonicYoung.GelfandTsetlin -private def FixedAxisInitialSimpleRootCancellation +/-- The initial simple-root operators annihilate the fixed-axis raised highest-weight +polynomials before the selected row. -/ +def FixedAxisInitialSimpleRootCancellation {r n : ℕ} (lam : Fin (r + 1) → ℕ) (row : Fin (r + 1)) (k : Fin n) : Prop := ∀ (p : homogeneousYoungHighestWeightSubmodule (n := n) lam) @@ -9032,7 +9096,9 @@ private def FixedAxisInitialSimpleRootCancellation (((p.val : SpherePacking.Fischer.Homogeneous ((r + 1) * n) (∑ i, lam i)) : PolynomialSpace r n))) = 0 -private def arbitraryRowHighestWeightRaiseOfSimpleRoots +/-- The axial raising map on homogeneous highest-weight space constructed from initial simple- +root cancellation. -/ +def arbitraryRowHighestWeightRaiseOfSimpleRoots {r n : ℕ} (lam : Fin (r + 1) → ℕ) (row : Fin (r + 1)) (k : Fin n) (hsimple : FixedAxisInitialSimpleRootCancellation lam row k) : @@ -9092,7 +9158,8 @@ theorem fixedAxisInitialSimpleRootCancellation_of_antitone change a.val < a.val + 1 omega -private def arbitraryRowHighestWeightRaise +/-- The axial raising map on homogeneous highest-weight space for an antitone initial weight. -/ +def arbitraryRowHighestWeightRaise {r n : ℕ} (lam : Fin (r + 1) → ℕ) (hdom : Antitone lam) (row : Fin (r + 1)) (k : Fin n) : homogeneousYoungHighestWeightSubmodule (n := n) lam →ₗ[ℝ] diff --git a/LeanPool/MetricCodes/MatrixPerron.lean b/LeanPool/MetricCodes/MatrixPerron.lean index f0639c5864..1f9cebd2ce 100644 --- a/LeanPool/MetricCodes/MatrixPerron.lean +++ b/LeanPool/MetricCodes/MatrixPerron.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import Mathlib.Algebra.Order.Archimedean.Real.Hom -import Mathlib.Analysis.InnerProductSpace.Rayleigh -import Mathlib.Analysis.Matrix.Hermitian -import Mathlib.Combinatorics.Quiver.ConnectedComponent +public import Mathlib.Algebra.Order.Archimedean.Real.Hom +public import Mathlib.Analysis.InnerProductSpace.Rayleigh +public import Mathlib.Analysis.Matrix.Hermitian +public import Mathlib.Combinatorics.Quiver.ConnectedComponent /-! # Perron eigenvectors of finite nonnegative symmetric matrices @@ -17,6 +18,8 @@ bounds. It requires no coding-theory definitions. Positivity is propagated along positive matrix entries, allowing arbitrary finite index sets rather than just tridiagonal grids. -/ +@[expose] public section + noncomputable section open Metric diff --git a/LeanPool/MetricCodes/Rates.lean b/LeanPool/MetricCodes/Rates.lean index d9340e8eda..b459a11cd1 100644 --- a/LeanPool/MetricCodes/Rates.lean +++ b/LeanPool/MetricCodes/Rates.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.Binary -import Mathlib.Tactic.NormNum.RealSqrt -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.Orthogonality -import Mathlib.Analysis.SpecialFunctions.Trigonometric.InverseDeriv -import Mathlib.LinearAlgebra.Lagrange -import Mathlib.Probability.Distributions.Beta +public import LeanPool.MetricCodes.Binary +public import Mathlib.Tactic.NormNum.RealSqrt +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.Orthogonality +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.InverseDeriv +public import Mathlib.LinearAlgebra.Lagrange +public import Mathlib.Probability.Distributions.Beta /-! # Strict rate improvements @@ -17,6 +18,8 @@ import Mathlib.Probability.Distributions.Beta The MRRW comparison and the first spherical hierarchy and numerical bounds. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable namespace MetricCodes @@ -44,10 +47,12 @@ theorem hasDerivAt_mul_continuous_zero field_simp [hrzero] simpa only [zero_add, zero_mul, sub_zero, smul_eq_mul] using hquotient -private def inverseDegree (r : ℝ) : ℝ := +/-- The smaller-branch inverse degree expression `(1 - sqrt (1 - r ^ 2)) / 2`. -/ +def inverseDegree (r : ℝ) : ℝ := (1 - Real.sqrt (1 - r ^ 2)) / 2 -private def inverseVarianceFactor (r : ℝ) : ℝ := +/-- The reciprocal variance factor appearing in the inverse-degree entropy expansion. -/ +def inverseVarianceFactor (r : ℝ) : ℝ := (2 * (1 + Real.sqrt (1 - r ^ 2)))⁻¹ theorem inverseVarianceFactor_continuous : @@ -74,7 +79,8 @@ theorem inverseDegree_eq_sq_mul_factor field_simp [hdenominator] nlinarith -private def inverseEntropyFactor (r : ℝ) : ℝ := +/-- The combination of negative logarithmic terms used in the inverse-degree entropy estimate. -/ +def inverseEntropyFactor (r : ℝ) : ℝ := inverseVarianceFactor r * Real.negMulLog r + Real.negMulLog (r * inverseVarianceFactor r) @@ -166,13 +172,16 @@ theorem hasDerivAt_mrrwG_sq_zero : rw [hfunctions] exact hentropy -private def lowerEndpointRoot (δ : ℝ) : ℝ := +/-- The square-root term `sqrt (1 - 2 * δ)` in the MRRW lower-endpoint parameterization. -/ +def lowerEndpointRoot (δ : ℝ) : ℝ := Real.sqrt (1 - 2 * δ) -private def lowerEndpointWeight (δ : ℝ) : ℝ := +/-- The lower-endpoint weight `(1 - sqrt (1 - 2 * δ)) / 2`. -/ +def lowerEndpointWeight (δ : ℝ) : ℝ := (1 - lowerEndpointRoot δ) / 2 -private def lowerEndpointDerivative (δ : ℝ) : ℝ := +/-- The logarithmic derivative expression at the MRRW lower-endpoint weight. -/ +def lowerEndpointDerivative (δ : ℝ) : ℝ := δ * (Real.log (1 - lowerEndpointWeight δ) - Real.log (lowerEndpointWeight δ)) / @@ -569,16 +578,21 @@ section open Filter Topology open scoped Topology -private def interiorSlope (a u : ℝ) : ℝ := +/-- The reciprocal slope factor defining the interior perturbation of the shell weight. -/ +def interiorSlope (a u : ℝ) : ℝ := (Real.sqrt (u * (1 - u)) * (1 - 2 * a))⁻¹ -private def interiorWeight (a u e : ℝ) : ℝ := +/-- The shell weight perturbed linearly from `a` with the prescribed interior slope. -/ +def interiorWeight (a u e : ℝ) : ℝ := a - interiorSlope a u * e -private def interiorSupport (a u e : ℝ) : ℝ := +/-- The support-degree parameter along the interior perturbation, equal to the weight times `e`. -/ +def interiorSupport (a u e : ℝ) : ℝ := interiorWeight a u e * e -private def interiorComplement (a u e : ℝ) : ℝ := +/-- The complement-degree parameter along the interior perturbation, equal to the complement +weight times `e`. -/ +def interiorComplement (a u e : ℝ) : ℝ := (1 - interiorWeight a u e) * e @[simp] theorem interiorWeight_zero (a u : ℝ) : @@ -709,7 +723,8 @@ theorem eventually_shellRate_interior_improvement 1 - MetricCodes.binaryEntropy a + MetricCodes.binaryEntropy u linarith -private def interiorSpectralMargin (δ a u e : ℝ) : ℝ := +/-- The perturbed Johnson spectral limit minus its asymptotic code-distance threshold. -/ +def interiorSpectralMargin (δ a u e : ℝ) : ℝ := MetricCodes.Johnson.spectralLimit (interiorWeight a u e) (interiorSupport a u e) @@ -1180,7 +1195,9 @@ section open scoped BigOperators InnerProductSpace Matrix -private def johnsonWindowBasis {n w p q L : ℕ} +/-- The Boolean harmonic basis function indexed by a degree and basis coordinate in the shell +window. -/ +def johnsonWindowBasis {n w p q L : ℕ} (h : AdmissibleDegrees n w p q L) (Q : ShellWindowIndex n p q L) : MetricCodes.Boolean.Function n := @@ -1195,7 +1212,8 @@ theorem johnsonWindowBasis_isHarmonic {n w p q L : ℕ} exact MetricCodes.Boolean.harmonicBasisFunction_isHarmonic n (p + q + Q.1.val) (h.window_degree_half Q.1) Q.2 -private def johnsonHarmonicCoordinates {n j : ℕ} +/-- The orthonormal coordinates of a harmonic Boolean function in its global degree space. -/ +def johnsonHarmonicCoordinates {n j : ℕ} (hj : 2 * j ≤ n) (f : MetricCodes.Boolean.Function n) (hf : MetricCodes.Boolean.IsHarmonic j f) : @@ -1305,7 +1323,8 @@ theorem johnsonWindowBasis_dot_coupled (h.supportResidual_bound source) (h.complementResidual_bound source) a) b -private def johnsonWindowChannelMatrix {n w p q L : ℕ} +/-- The adjacent Johnson channel matrix indexed by shell-window harmonic coordinates. -/ +def johnsonWindowChannelMatrix {n w p q L : ℕ} (h : AdmissibleDegrees n w p q L) (hstrict : 2 * w < n) (v : Space p q L) (lam : ℝ) : @@ -1495,7 +1514,8 @@ theorem johnsonWindowChannelMatrix_transpose_mul (johnsonWindowBasis_isHarmonic h ⟨other, b⟩)] ring -private def johnsonChannelMatrix {n w p q L : ℕ} +/-- The shell-window channel matrix reindexed by the total Johnson ambient dimension. -/ +def johnsonChannelMatrix {n w p q L : ℕ} (h : AdmissibleDegrees n w p q L) (hstrict : 2 * w < n) (v : Space p q L) (lam : ℝ) : @@ -1891,11 +1911,14 @@ theorem johnsonChannelMatrix_transpose_axis_projection h hstrict v hv lam hlam heigen haxis x, Matrix.smul_mul] -private def johnsonGramIndexEquiv (n D : ℕ) : +/-- The enumeration flattening a coordinate and two ambient indices into one finite Gram index. -/ +def johnsonGramIndexEquiv (n D : ℕ) : ((Fin n × Fin D) × Fin D) ≃ Fin (n * D * D) := Fintype.equivOfCardEq (by simp only [Fintype.card_prod, Fintype.card_fin]) -private def johnsonProjectionGramFeature +/-- The Euclidean Gram feature built from Johnson fibre projections, geometric axes, and channel +matrices. -/ +def johnsonProjectionGramFeature {n w p q L : ℕ} (h : AdmissibleDegrees n w p q L) (hstrict : 2 * w < n) @@ -2042,7 +2065,8 @@ open Filter Topology open scoped BigOperators Topology open MetricCodes.Johnson.Asymptotics -private def terminalIndex (u : ℝ) (r n : ℕ) : ℕ := +/-- The terminal degree shifted downward by a fixed window offset `r`. -/ +def terminalIndex (u : ℝ) (r n : ℕ) : ℕ := terminalDegree u n - r theorem tendsto_terminalIndex_ratio @@ -2200,7 +2224,9 @@ theorem tendsto_johnsonDelta_ratio unfold MetricCodes.johnsonDelta ring -private def normalizedMu (j₁ j₂ j m e : ℝ) : ℝ := +/-- The dimensionless expression for the Johnson mu coefficient after scaling by the word +length. -/ +def normalizedMu (j₁ j₂ j m e : ℝ) : ℝ := (m / 2) * (j₂ * (j₂ + e) - j₁ * (j₁ + e)) / (j * (j + e)) @@ -2220,7 +2246,8 @@ theorem johnsonMu_div_eq_normalized unfold MetricCodes.johnsonMu normalizedMu field_simp [hnreal.ne', hj, hj'] -private def muLimit (a b g u : ℝ) : ℝ := +/-- The limiting Johnson mu coefficient under proportional shell and degree scaling. -/ +def muLimit (a b g u : ℝ) : ℝ := (1 - 2 * a) * (1 - 2 * b - 2 * g) * MetricCodes.Johnson.centeredEta a b g / @@ -2327,7 +2354,8 @@ theorem tendsto_johnsonMu_div (complementDegree g n) (terminalIndex u r n) hn hjn.ne' (by positivity)).symm -private def normalizedDiagonal +/-- The dimensionless Johnson diagonal expression in terms of the normalized mu coefficient. -/ +def normalizedDiagonal (j₁ j₂ j m e x y : ℝ) : ℝ := (normalizedMu j₁ j₂ j m e - m ^ 2) / (x * y) @@ -2354,7 +2382,8 @@ theorem johnsonDiagonal_eq_normalized unfold MetricCodes.johnsonDiagonal field_simp [hnreal.ne', hwreal.ne', hc.ne'] -private def diagonalLimit (a b g u : ℝ) : ℝ := +/-- The limiting Johnson diagonal coefficient under proportional shell and degree scaling. -/ +def diagonalLimit (a b g u : ℝ) : ℝ := (1 - 2 * a) * ((1 - 2 * b - 2 * g) * MetricCodes.Johnson.centeredEta a b g - @@ -2429,7 +2458,8 @@ theorem tendsto_johnsonDiagonal rw [← hmuidentity] at hnormalized exact hnormalized.symm -private def normalizedNu (j m eta sigma e : ℝ) : ℝ := +/-- The homogeneous square-root expression used to scale the Johnson nu coefficient. -/ +def normalizedNu (j m eta sigma e : ℝ) : ℝ := Real.sqrt ((j ^ 2 - m ^ 2) * (j ^ 2 - eta ^ 2) * @@ -2502,7 +2532,8 @@ theorem johnsonNu_div_eq_normalized (MetricCodes.johnsonDelta n w p q) (MetricCodes.johnsonSigma n w p q) hnreal hstep -private def nuLimit (a b g u : ℝ) : ℝ := +/-- The limiting normalized Johnson nu coefficient under proportional degree scaling. -/ +def nuLimit (a b g u : ℝ) : ℝ := Real.sqrt (((1 - 2 * u) ^ 2 - (1 - 2 * a) ^ 2) * @@ -2647,7 +2678,8 @@ theorem tendsto_johnsonNu_div (complementDegree g n) (terminalIndex u r n) hn hstep').symm -private def edgeLimit (a b g u : ℝ) : ℝ := +/-- The limiting Johnson edge coefficient under proportional shell and degree scaling. -/ +def edgeLimit (a b g u : ℝ) : ℝ := Real.sqrt (((1 - 2 * u) ^ 2 - (1 - 2 * a) ^ 2) * @@ -2724,7 +2756,8 @@ theorem zeroFibreParameters · simpa only [sub_zero, add_zero] using h.degree_lt_weight · nlinarith [h.degree_lt_weight, h.weight_lt_half] -private def hattedDiagonalLimit (a b g u : ℝ) : ℝ := +/-- The limiting hatted Johnson diagonal coefficient under proportional degree scaling. -/ +def hattedDiagonalLimit (a b g u : ℝ) : ℝ := ((1 - 2 * b - 2 * g) * MetricCodes.Johnson.centeredEta a b g - (1 - 2 * a) * @@ -2733,7 +2766,8 @@ private def hattedDiagonalLimit (a b g u : ℝ) : ℝ := (1 - (1 - 2 * a) ^ 2) * (1 - (1 - 2 * u) ^ 2)) -private def hattedEdgeLimit (a b g u : ℝ) : ℝ := +/-- The limiting hatted Johnson edge coefficient under proportional degree scaling. -/ +def hattedEdgeLimit (a b g u : ℝ) : ℝ := (((1 - 2 * u) ^ 2 - MetricCodes.Johnson.centeredEta a b g ^ 2) * ((1 - 2 * b - 2 * g) ^ 2 - @@ -3170,7 +3204,9 @@ theorem terminal_rayleigh_le_top exact MetricCodes.Johnson.rayleigh_le_top n w p q L (terminalVector p q L m) (terminalVector_ne_zero p q L m) -private def terminalRayleigh (a b g u : ℝ) (m n : ℕ) : ℝ := +/-- The Rayleigh quotient of the constant vector on a terminal window of `m + 1` Johnson +degrees. -/ +def terminalRayleigh (a b g u : ℝ) (m n : ℕ) : ℝ := ((∑ r ∈ Finset.range (m + 1), MetricCodes.johnsonHattedDiagonal n (shellWeight a n) (supportDegree b n) (complementDegree g n) @@ -3402,7 +3438,9 @@ namespace Rate open MetricCodes.Johnson.Asymptotics open MetricCodes.Johnson.SpectralAsymptotics -private def certificateConstant (d a b g u : ℝ) : ℝ := +/-- The ratio of the threshold numerator to the positive spectral gap in the Johnson rate +certificate. -/ +def certificateConstant (d a b g u : ℝ) : ℝ := (2 - MetricCodes.Johnson.asymptoticThreshold d a) / spectralGap d a b g u @@ -3654,9 +3692,11 @@ open scoped BigOperators namespace Numerics -private def kissingA : ℝ := 0.08570143806746 +/-- The fixed first parameter used in the certified numerical kissing-number estimate. -/ +def kissingA : ℝ := 0.08570143806746 -private def kissingB : ℝ := 0.00370282933568 +/-- The fixed second parameter used in the certified numerical kissing-number estimate. -/ +def kissingB : ℝ := 0.00370282933568 /-- The log series lower used in the metric-code argument. -/ def logSeriesLower (x : ℝ) (m : ℕ) : ℝ := @@ -3991,7 +4031,8 @@ theorem sphericalImprovementSlope_gt_one {a : ℝ} (ha : 0 < a) : 1 < (4 * a + 3) := by linarith -private def sphericalSpectralMarginPolynomial (a c b : ℝ) : ℝ := +/-- The polynomial expression used to certify positivity of the spherical spectral margin. -/ +def sphericalSpectralMarginPolynomial (a c b : ℝ) : ℝ := let T := a * (1 + a) let l := 1 + 2 * a let p := c * l - 1 @@ -4418,7 +4459,8 @@ theorem Interlacing.lagrangeWeight_nonneg {r : ℕ} (h : Interlacing a b) (ℓ : Fin (r + 1)) : 0 ≤ lagrangeWeight a b ℓ := (h.lagrangeWeight_pos ℓ).le -private def stabilizerPolynomial {r : ℕ} (b : Fin r → ℝ) : Polynomial ℝ := +/-- The monic polynomial with roots `b m * (1 + b m)` for the stabilizer parameters. -/ +def stabilizerPolynomial {r : ℕ} (b : Fin r → ℝ) : Polynomial ℝ := ∏ m : Fin r, (Polynomial.X - Polynomial.C (((b m) * (1 + (b m))))) theorem stabilizerPolynomial_monic {r : ℕ} (b : Fin r → ℝ) : @@ -4873,7 +4915,8 @@ open scoped BigOperators namespace HigherHierarchyChebyshev -private def zeroAngle (N j : ℕ) : ℝ := +/-- The angle `j * π / N` used to parameterize the Chebyshev zeros. -/ +def zeroAngle (N j : ℕ) : ℝ := ((j : ℝ) * Real.pi) / (N : ℝ) /-- The zero used in the spherical-code argument. -/ diff --git a/LeanPool/MetricCodes/Representation.lean b/LeanPool/MetricCodes/Representation.lean index 222fb920e6..0ce98730b4 100644 --- a/LeanPool/MetricCodes/Representation.lean +++ b/LeanPool/MetricCodes/Representation.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.Hierarchy -import Mathlib.Algebra.MvPolynomial.Funext -import Mathlib.Algebra.MvPolynomial.Monad -import Mathlib.Analysis.InnerProductSpace.TensorProduct +public import LeanPool.MetricCodes.Hierarchy +public import Mathlib.Algebra.MvPolynomial.Funext +public import Mathlib.Algebra.MvPolynomial.Monad +public import Mathlib.Analysis.InnerProductSpace.TensorProduct /-! # Representation-theoretic foundations @@ -15,6 +16,8 @@ import Mathlib.Analysis.InnerProductSpace.TensorProduct Associated Gegenbauer systems, harmonic Young spaces, and higher projection graphs. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable namespace MetricCodes @@ -28,7 +31,9 @@ open scoped BigOperators Nat namespace AssociatedGegenbauer -private def normalizedSequence (n : ℕ) (hn : 2 ≤ n) : Polynomial.Sequence ℝ where +/-- The normalized Gegenbauer polynomials bundled as a polynomial sequence with degree equal to +the index. -/ +def normalizedSequence (n : ℕ) (hn : 2 ≤ n) : Polynomial.Sequence ℝ where elems' := SpherePacking.Gegenbauer.normalized n degree_eq' := by intro i @@ -46,7 +51,8 @@ theorem normalizedSequence_leadingCoeff_isUnit exact Polynomial.leadingCoeff_ne_zero.mpr (Polynomial.Sequence.ne_zero (normalizedSequence n hn) i) -private def normalizedBasis (n : ℕ) (hn : 2 ≤ n) : +/-- The basis of real polynomials given by the normalized Gegenbauer sequence. -/ +def normalizedBasis (n : ℕ) (hn : 2 ≤ n) : Basis ℕ ℝ (Polynomial ℝ) := (normalizedSequence n hn).basis (normalizedSequence_leadingCoeff_isUnit n hn) @@ -56,11 +62,14 @@ def coefficient (n : ℕ) (hn : 2 ≤ n) (r : ℕ) (p : Polynomial ℝ) : ℝ := ((normalizedBasis n hn).repr p) r -private def derivativeValue (n i j : ℕ) (t : ℝ) : ℝ := +/-- Evaluate the `j`th derivative of the degree-`i` normalized Gegenbauer polynomial at `t`. -/ +def derivativeValue (n i j : ℕ) (t : ℝ) : ℝ := ((Polynomial.derivative^[j]) (SpherePacking.Gegenbauer.normalized n i)).eval t -private def generatorTerm (n i k : ℕ) (t : ℝ) (l : ℕ) : Polynomial ℝ := +/-- The `l`th shifted-power term in the associated Gegenbauer generator, with its derivative and +combinatorial coefficient. -/ +def generatorTerm (n i k : ℕ) (t : ℝ) (l : ℕ) : Polynomial ℝ := Polynomial.C (((k.choose l : ℕ) : ℝ) ^ 2 * (l.factorial : ℝ) * @@ -68,7 +77,8 @@ private def generatorTerm (n i k : ℕ) (t : ℝ) (l : ℕ) : Polynomial ℝ := derivativeValue n i (2 * k - l) t) * (Polynomial.C t + Polynomial.X) ^ l -private def generator (n i k : ℕ) (t : ℝ) : Polynomial ℝ := +/-- The sum of the generator terms normalized by `k!` times the `k`th derivative at one. -/ +def generator (n i k : ℕ) (t : ℝ) : Polynomial ℝ := Polynomial.C (((k.factorial : ℝ) * derivativeValue n i k 1)⁻¹) * ∑ l ∈ Finset.range (k + 1), generatorTerm n i k t l @@ -471,7 +481,8 @@ def polarization (r n : ℕ) (i j : Fin (r + 1)) : {r n : ℕ} (i : Fin (r + 1)) : polarization r n i i = rowEuler r n i := rfl -private def rowWeightSubmodule {r n : ℕ} (lam : Fin (r + 1) → ℕ) : +/-- The simultaneous row-Euler eigenspace with eigenvalues specified by `lam`. -/ +def rowWeightSubmodule {r n : ℕ} (lam : Fin (r + 1) → ℕ) : Submodule ℝ (PolynomialSpace r n) := ⨅ i : Fin (r + 1), (rowEuler r n i - (lam i : ℝ) • LinearMap.id).ker @@ -495,7 +506,8 @@ def traceFreeSubmodule (r n : ℕ) : ∀ i j : Fin (r + 1), traceOperator r n i j p = 0 := by simp only [traceFreeSubmodule, Submodule.mem_iInf, LinearMap.mem_ker, traceOperator_apply] -private def highestWeightSubmodule (r n : ℕ) : +/-- The intersection of the kernels of the upper-row polarization operators. -/ +def highestWeightSubmodule (r n : ℕ) : Submodule ℝ (PolynomialSpace r n) := ⨅ i : Fin (r + 1), ⨅ j : Fin (r + 1), ⨅ (_ : i < j), (polarization r n i j).ker @@ -544,10 +556,12 @@ instance harmonicYoungSpace_finiteDimensional (Fin ((r + 1) * n)) ℝ (∑ i, lam i) => (z : PolynomialSpace r n)) hpq -private abbrev RowEuclideanSpace (r n : ℕ) := +/-- The Euclidean product of `r + 1` rows, each with `n` coordinates. -/ +abbrev RowEuclideanSpace (r n : ℕ) := PiLp 2 (fun _ : Fin (r + 1) => SpherePacking.Euclidean n) -private def rowEuclideanEquiv (r n : ℕ) : +/-- The isometry regrouping a flat Euclidean coordinate vector into its rows. -/ +def rowEuclideanEquiv (r n : ℕ) : SpherePacking.Euclidean ((r + 1) * n) ≃ₗᵢ[ℝ] RowEuclideanSpace r n := (LinearIsometryEquiv.piLpCongrLeft 2 ℝ ℝ @@ -570,7 +584,8 @@ theorem rowEuclideanEquiv_symm_apply ((rowEuclideanEquiv r n).apply_symm_apply x) simpa only [rowEuclideanEquiv_apply] using h -private def blockIsometry {r n : ℕ} +/-- Apply the same Euclidean isometry independently to every row of a flat coordinate vector. -/ +def blockIsometry {r n : ℕ} (U : SpherePacking.Euclidean n ≃ₗᵢ[ℝ] SpherePacking.Euclidean n) : SpherePacking.Euclidean ((r + 1) * n) ≃ₗᵢ[ℝ] @@ -646,14 +661,17 @@ theorem blockIsometry_single · rw [row_of_single_ne i h j heq, map_zero] rfl -private def polynomialAction {r n : ℕ} +/-- The polynomial algebra action induced by applying the orthogonal transformation to every +row. -/ +def polynomialAction {r n : ℕ} (U : SpherePacking.Euclidean n ≃ₗᵢ[ℝ] SpherePacking.Euclidean n) : PolynomialSpace r n ≃ₐ[ℝ] PolynomialSpace r n := MetricCodes.Spherical.OrthogonalPolynomialTransport.polynomialEquiv (blockIsometry (r := r) U) -private def rowVector {r n : ℕ} (i : Fin (r + 1)) +/-- Embed a Euclidean vector into row `i`, with every other row zero. -/ +def rowVector {r n : ℕ} (i : Fin (r + 1)) (v : SpherePacking.Euclidean n) : SpherePacking.Euclidean ((r + 1) * n) := (rowEuclideanEquiv r n).symm (PiLp.single 2 i v) @@ -830,7 +848,8 @@ theorem youngHomogeneousEmbedding_injective {r n : ℕ} (fun z : SpherePacking.Fischer.Homogeneous ((r + 1) * n) (∑ i, lam i) => (z : PolynomialSpace r n)) h -private def youngCoefficientEmbedding {r n : ℕ} +/-- The Fischer coefficient embedding restricted to the harmonic Young space of weight `lam`. -/ +def youngCoefficientEmbedding {r n : ℕ} (lam : Fin (r + 1) → ℕ) : HarmonicYoungSpace (n := n) lam →ₗ[ℝ] SpherePacking.Fischer.CoefficientSpace @@ -846,7 +865,8 @@ theorem youngCoefficientEmbedding_injective {r n : ℕ} ((r + 1) * n) (∑ i, lam i)).comp (youngHomogeneousEmbedding_injective lam) -private def youngFischerInner {r n : ℕ} +/-- The Fischer inner product of harmonic Young polynomials through their homogeneous embedding. -/ +def youngFischerInner {r n : ℕ} (lam : Fin (r + 1) → ℕ) (p q : HarmonicYoungSpace (n := n) lam) : ℝ := SpherePacking.Fischer.homogeneousInner @@ -865,7 +885,9 @@ theorem youngFischerInner_eq_polynomialInner {r n : ℕ} (youngHomogeneousEmbedding lam p) (youngHomogeneousEmbedding lam q) -@[implicit_reducible] private def youngFischerCore {r n : ℕ} +/-- The inner product core on the harmonic Young space induced by its injective coefficient +embedding. -/ +@[implicit_reducible] def youngFischerCore {r n : ℕ} (lam : Fin (r + 1) → ℕ) : InnerProductSpace.Core ℝ (HarmonicYoungSpace (n := n) lam) := SpherePacking.Fischer.embeddingInnerCore @@ -1087,7 +1109,9 @@ theorem polynomialAction_symm_apply_apply {r n : ℕ} exact DFunLike.congr_fun hcomp p -private def youngOrthogonalLinearEquiv {r n : ℕ} +/-- The linear equivalence on harmonic Young space induced by the rowwise orthogonal polynomial +action. -/ +def youngOrthogonalLinearEquiv {r n : ℕ} (U : SpherePacking.Euclidean n ≃ₗᵢ[ℝ] SpherePacking.Euclidean n) (lam : Fin (r + 1) → ℕ) : @@ -1131,14 +1155,18 @@ section open scoped BigOperators InnerProductSpace -private def youngCoefficientRange {r n : ℕ} +/-- The subspace of Fischer coefficients arising from harmonic Young polynomials of weight +`lam`. -/ +def youngCoefficientRange {r n : ℕ} (lam : Fin (r + 1) → ℕ) : Submodule ℝ (SpherePacking.Fischer.CoefficientSpace ((r + 1) * n) (∑ i, lam i)) := LinearMap.range (youngCoefficientEmbedding lam) -private def youngProjection {r n : ℕ} +/-- Project coefficient space orthogonally onto the harmonic Young coefficient range and recover +its polynomial. -/ +def youngProjection {r n : ℕ} (lam : Fin (r + 1) → ℕ) : SpherePacking.Fischer.CoefficientSpace ((r + 1) * n) (∑ i, lam i) →ₗ[ℝ] @@ -1232,7 +1260,8 @@ def projectedCoordinateLower {r n : ℕ} (youngHomogeneousProjection mu).comp (rowDirectionalHomogeneous mu lam hdeg i v) -private def youngCoefficientIsometry {r n : ℕ} +/-- The harmonic Young coefficient embedding bundled as a linear isometry. -/ +def youngCoefficientIsometry {r n : ℕ} (lam : Fin (r + 1) → ℕ) : HarmonicYoungSpace (n := n) lam →ₗᵢ[ℝ] SpherePacking.Fischer.CoefficientSpace @@ -1299,7 +1328,8 @@ theorem youngHomogeneousProjection_inner {r n : ℕ} exact SpherePacking.Fischer.homogeneousInner_eq_polynomialInner ((r + 1) * n) (∑ i, lam i) v (youngHomogeneousEmbedding lam p) -private def youngHomogeneousAction {r n : ℕ} +/-- The rowwise orthogonal polynomial action restricted to homogeneous degree `k`. -/ +def youngHomogeneousAction {r n : ℕ} (U : SpherePacking.Euclidean n ≃ₗᵢ[ℝ] SpherePacking.Euclidean n) (k : ℕ) : @@ -2129,7 +2159,8 @@ namespace HigherRepresentationGraph /-- The ambient weight used in the spherical-code argument. -/ abbrev AmbientWeight (r : ℕ) := Fin (r + 1) → ℕ -private abbrev StabilizerWeight (r : ℕ) := Fin r → ℕ +/-- A stabilizer weight with `r` natural-number coordinates. -/ +abbrev StabilizerWeight (r : ℕ) := Fin r → ℕ /-- The interlaces used in the spherical-code argument. -/ def Interlaces {r : ℕ} @@ -2159,7 +2190,9 @@ def raise {r : ℕ} (lam : AmbientWeight r) (i : Fin (r + 1)) : AmbientWeight r := fun j => if j = i then lam j + 1 else lam j -private def Adjacent {r : ℕ} (lam ν : AmbientWeight r) : Prop := +/-- Adjacency of ambient weights when either is obtained from the other by raising one +coordinate. -/ +def Adjacent {r : ℕ} (lam ν : AmbientWeight r) : Prop := ∃ i : Fin (r + 1), ν = raise lam i ∨ lam = raise ν i theorem Adjacent.symm {r : ℕ} {lam ν : AmbientWeight r} @@ -2576,7 +2609,8 @@ theorem weight_pos (i : I) : 0 < A.weight i := by (Real.sqrt_pos.2 (by exact_mod_cast A.dimension_pos i)) (A.eigenvector_pos i) -private def normalization : ℝ := ∑ i, A.weight i +/-- The sum of the positive vertex weights used to normalize the graph amplitudes. -/ +def normalization : ℝ := ∑ i, A.weight i theorem normalization_pos [Nonempty I] : 0 < A.normalization := by unfold normalization @@ -2657,7 +2691,8 @@ theorem weighted_eigenvector_equation (source : I) : A.eigenvector source) ring -private def amplitude (i : I) : ℝ := +/-- The square root of the vertex weight divided by the total weight. -/ +def amplitude (i : I) : ℝ := Real.sqrt (A.weight i / A.normalization) theorem amplitude_pos [Nonempty I] (i : I) : 0 < A.amplitude i := by @@ -2711,7 +2746,8 @@ theorem fibre_orthogonal {i j : I} (hij : i ≠ j) (x y : X) : simp only [Matrix.mul_assoc] _ = 0 := by rw [A.block_orthogonal i j hij]; simp only [Matrix.zero_mul, Matrix.mul_zero] -private def combinedFibre (x : X) : Matrix (Fin D) (Fin d) ℝ := +/-- The sum of the fibre matrices weighted by their normalized amplitudes. -/ +def combinedFibre (x : X) : Matrix (Fin D) (Fin d) ℝ := ∑ i, A.amplitude i • A.fibre i x private theorem weighted_matrix_transpose_mul_metriccodes2_81758290 @@ -2746,7 +2782,8 @@ theorem combinedFibre_isometry [Nonempty I] (x : X) : one_smul] using congrArg (fun r : ℝ => r • (1 : Matrix (Fin d) (Fin d) ℝ)) hsum -private def combinedProjection (x : X) : Matrix (Fin D) (Fin D) ℝ := +/-- The projection matrix obtained by multiplying the combined fibre matrix by its transpose. -/ +def combinedProjection (x : X) : Matrix (Fin D) (Fin D) ℝ := A.combinedFibre x * (A.combinedFibre x)ᵀ theorem combinedProjection_symmetric (x : X) : @@ -2768,13 +2805,16 @@ theorem combinedProjection_trace [Nonempty I] (x : X) : Matrix.trace_one] simp only [Fintype.card_fin] -private def projectionFamily [Nonempty I] : MetricCodes.ProjectionFamily X D d where +/-- The projection family assembled from the weighted orthogonal fibres. -/ +def projectionFamily [Nonempty I] : MetricCodes.ProjectionFamily X D d where projection := A.combinedProjection symmetric := A.combinedProjection_symmetric idempotent := A.combinedProjection_idempotent trace_eq := A.combinedProjection_trace -private def edgeCoefficient (target source : I) : ℝ := +/-- The edge-channel coefficient scaled by the target-to-source amplitude ratio and the square +root of the eigenvalue. -/ +def edgeCoefficient (target source : I) : ℝ := Real.sqrt (A.probability target source) * A.amplitude target / (Real.sqrt A.eigenvalue * A.amplitude source) @@ -2795,7 +2835,8 @@ theorem edgeCoefficient_sq_sum [Nonempty I] (source : I) : (mul_ne_zero A.eigenvalue_pos.ne' (pow_ne_zero _ (A.amplitude_pos source).ne')) -private def assembledChannel : Matrix (Fin Q) (Fin D) ℝ := +/-- The sum of all edge channels weighted by their edge coefficients. -/ +def assembledChannel : Matrix (Fin Q) (Fin D) ℝ := ∑ e : I × I, A.edgeCoefficient e.1 e.2 • A.channel e.1 e.2 theorem edgeCoefficient_smul_channelGram @@ -3040,7 +3081,8 @@ theorem remainder_transpose_mul [Nonempty I] (x y : X) : (A.combinedProjection x * A.combinedProjection y) i j := by ring _ = _ := by rw [hroot] -private def matrixFeature (M : Matrix (Fin Q) (Fin D) ℝ) : +/-- The Euclidean vector of matrix entries used for the graph's Hilbert–Schmidt features. -/ +def matrixFeature (M : Matrix (Fin Q) (Fin D) ℝ) : EuclideanSpace ℝ (Fin Q × Fin D) := WithLp.toLp 2 (fun i : Fin Q × Fin D => M i.1 i.2) @@ -3053,7 +3095,8 @@ theorem matrixFeature_inner (M N : Matrix (Fin Q) (Fin D) ℝ) : Matrix.transpose_apply, Fintype.sum_prod_type] rw [Finset.sum_comm] -private def remainderFeature (x : X) : +/-- The Euclidean matrix-entry feature of the graph remainder at `x`. -/ +def remainderFeature (x : X) : EuclideanSpace ℝ (Fin Q × Fin D) := matrixFeature (A.remainder x) @@ -3180,13 +3223,16 @@ variable [NormedAddCommGroup V] [InnerProductSpace ℝ V] variable [NormedAddCommGroup F] [InnerProductSpace ℝ F] [FiniteDimensional ℝ F] -private abbrev euclideanBasis_metriccodes2_851911c7 (T : Type*) +/-- The standard orthonormal basis indexed by the finite dimension of the real inner product +space. -/ +abbrev euclideanBasis (T : Type*) [NormedAddCommGroup T] [InnerProductSpace ℝ T] [FiniteDimensional ℝ T] : OrthonormalBasis (Fin (Module.finrank ℝ T)) ℝ T := stdOrthonormalBasis ℝ T -private def coordinateMatrix_metriccodes2_851911c7 {U T : Type*} +/-- The matrix of a linear map in the standard orthonormal bases of its source and target. -/ +def coordinateMatrix {U T : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [FiniteDimensional ℝ U] [NormedAddCommGroup T] [InnerProductSpace ℝ T] @@ -3194,8 +3240,8 @@ private def coordinateMatrix_metriccodes2_851911c7 {U T : Type*} (f : U →ₗ[ℝ] T) : Matrix (Fin (Module.finrank ℝ T)) (Fin (Module.finrank ℝ U)) ℝ := - LinearMap.toMatrix (euclideanBasis_metriccodes2_851911c7 U).toBasis - (euclideanBasis_metriccodes2_851911c7 T).toBasis f + LinearMap.toMatrix (euclideanBasis U).toBasis + (euclideanBasis T).toBasis f private theorem coordinateMatrix_adjoint_metriccodes2_851911c7 {U T : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] @@ -3203,12 +3249,12 @@ private theorem coordinateMatrix_adjoint_metriccodes2_851911c7 {U T : Type*} [NormedAddCommGroup T] [InnerProductSpace ℝ T] [FiniteDimensional ℝ T] (f : U →ₗ[ℝ] T) : - coordinateMatrix_metriccodes2_851911c7 f.adjoint = (coordinateMatrix_metriccodes2_851911c7 + coordinateMatrix f.adjoint = (coordinateMatrix f)ᵀ := by - simpa only [coordinateMatrix_metriccodes2_851911c7, + simpa only [coordinateMatrix, Matrix.conjTranspose_eq_transpose_of_trivial] using - LinearMap.toMatrix_adjoint (euclideanBasis_metriccodes2_851911c7 U) - (euclideanBasis_metriccodes2_851911c7 T) f + LinearMap.toMatrix_adjoint (euclideanBasis U) + (euclideanBasis T) f private theorem coordinateMatrix_comp_metriccodes2_851911c7 {U T Z : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] @@ -3218,18 +3264,18 @@ private theorem coordinateMatrix_comp_metriccodes2_851911c7 {U T Z : Type*} [NormedAddCommGroup Z] [InnerProductSpace ℝ Z] [FiniteDimensional ℝ Z] (f : T →ₗ[ℝ] Z) (g : U →ₗ[ℝ] T) : - coordinateMatrix_metriccodes2_851911c7 (f.comp g) = - coordinateMatrix_metriccodes2_851911c7 f * coordinateMatrix_metriccodes2_851911c7 g := by + coordinateMatrix (f.comp g) = + coordinateMatrix f * coordinateMatrix g := by exact LinearMap.toMatrix_comp - (euclideanBasis_metriccodes2_851911c7 U).toBasis (euclideanBasis_metriccodes2_851911c7 + (euclideanBasis U).toBasis (euclideanBasis T).toBasis - (euclideanBasis_metriccodes2_851911c7 Z).toBasis f g + (euclideanBasis Z).toBasis f g private theorem coordinateMatrix_id_metriccodes2_851911c7 {T : Type*} [NormedAddCommGroup T] [InnerProductSpace ℝ T] [FiniteDimensional ℝ T] : - coordinateMatrix_metriccodes2_851911c7 (LinearMap.id : T →ₗ[ℝ] T) = 1 := by - exact LinearMap.toMatrix_id (euclideanBasis_metriccodes2_851911c7 T).toBasis + coordinateMatrix (LinearMap.id : T →ₗ[ℝ] T) = 1 := by + exact LinearMap.toMatrix_id (euclideanBasis T).toBasis /-- The to finite data used in the spherical-code argument. -/ def toFiniteData (G : RealizedHilbertGraph I X E V F) : @@ -3238,28 +3284,28 @@ def toFiniteData (G : RealizedHilbertGraph I X E V F) : (Module.finrank ℝ F) where dimension := G.dimension dimension_pos := G.dimension_pos - block i := coordinateMatrix_metriccodes2_851911c7 (G.block i) + block i := coordinateMatrix (G.block i) block_symmetric i := by rw [← coordinateMatrix_adjoint_metriccodes2_851911c7, G.block_adjoint] block_idempotent i := by rw [← coordinateMatrix_comp_metriccodes2_851911c7, G.block_idempotent] block_orthogonal i j hij := by rw [← coordinateMatrix_comp_metriccodes2_851911c7, G.block_orthogonal i j hij] - simp only [coordinateMatrix_metriccodes2_851911c7, map_zero] + simp only [coordinateMatrix, map_zero] block_complete := by change (∑ i, LinearMap.toMatrix - (euclideanBasis_metriccodes2_851911c7 V).toBasis (euclideanBasis_metriccodes2_851911c7 + (euclideanBasis V).toBasis (euclideanBasis V).toBasis (G.block i)) = 1 rw [← map_sum, G.block_complete, LinearMap.toMatrix_id] block_trace i := by - unfold coordinateMatrix_metriccodes2_851911c7 + unfold coordinateMatrix rw [← LinearMap.trace_eq_matrix_trace ℝ - (euclideanBasis_metriccodes2_851911c7 V).toBasis] + (euclideanBasis V).toBasis] exact G.block_trace i - fibre i x := coordinateMatrix_metriccodes2_851911c7 (G.fibre i x).toLinearMap + fibre i x := coordinateMatrix (G.fibre i x).toLinearMap fibre_isometry i x := by rw [← coordinateMatrix_adjoint_metriccodes2_851911c7, ← coordinateMatrix_comp_metriccodes2_851911c7, @@ -3267,37 +3313,37 @@ def toFiniteData (G : RealizedHilbertGraph I X E V F) : fibre_support i x := by rw [← coordinateMatrix_comp_metriccodes2_851911c7, G.fibre_support] correlation := G.correlation - axis x := coordinateMatrix_metriccodes2_851911c7 (G.axis x) + axis x := coordinateMatrix (G.axis x) axis_inner x y := by rw [← coordinateMatrix_adjoint_metriccodes2_851911c7, ← coordinateMatrix_comp_metriccodes2_851911c7, G.axis_inner] change - LinearMap.toMatrix (euclideanBasis_metriccodes2_851911c7 V).toBasis - (euclideanBasis_metriccodes2_851911c7 V).toBasis + LinearMap.toMatrix (euclideanBasis V).toBasis + (euclideanBasis V).toBasis (G.correlation x y • (LinearMap.id : V →ₗ[ℝ] V)) = _ rw [map_smul, LinearMap.toMatrix_id] probability := G.probability probability_nonneg := G.probability_nonneg balance := G.balance channel target source := - coordinateMatrix_metriccodes2_851911c7 (G.channel target source) + coordinateMatrix (G.channel target source) channel_isometry target source := by rw [← coordinateMatrix_adjoint_metriccodes2_851911c7, ← coordinateMatrix_comp_metriccodes2_851911c7, G.channel_isometry] - split_ifs <;> simp [coordinateMatrix_metriccodes2_851911c7] + split_ifs <;> simp [coordinateMatrix] channel_orthogonal target source target' source' h := by rw [← coordinateMatrix_adjoint_metriccodes2_851911c7, ← coordinateMatrix_comp_metriccodes2_851911c7, G.channel_orthogonal target source target' source' h] - simp only [coordinateMatrix_metriccodes2_851911c7, map_zero] + simp only [coordinateMatrix, map_zero] channel_axis target source j x := by rw [← coordinateMatrix_adjoint_metriccodes2_851911c7, ← coordinateMatrix_comp_metriccodes2_851911c7, ← coordinateMatrix_comp_metriccodes2_851911c7, LinearMap.comp_assoc, G.channel_axis] - split_ifs <;> simp [coordinateMatrix_metriccodes2_851911c7] + split_ifs <;> simp [coordinateMatrix] eigenvalue := G.eigenvalue eigenvalue_pos := G.eigenvalue_pos eigenvector := G.eigenvector @@ -3307,7 +3353,8 @@ def toFiniteData (G : RealizedHilbertGraph I X E V F) : end RealizedHilbertGraph -private def codePoints {n : ℕ} {s : ℝ} +/-- The points of a spherical code bundled with their unit-norm proofs. -/ +def codePoints {n : ℕ} {s : ℝ} (C : SpherePacking.SphericalCode n s) : Finset (SpherePoint n) := by classical @@ -3847,7 +3894,8 @@ namespace YoungPolynomialFrame variable {r n : ℕ} {lam : Fin (r + 1) → ℕ} {ι : Type*} -private def vector (F : YoungPolynomialFrame n lam ι) (i : ι) : +/-- The harmonic Young vector obtained from a frame polynomial and its defining certificates. -/ +def vector (F : YoungPolynomialFrame n lam ι) (i : ι) : HarmonicYoungSpace (n := n) lam := ⟨F.polynomial i, (mem_harmonicYoungSubmodule lam _).2 ⟨F.homogeneous i, F.rowEuler i, F.traceFree i, @@ -4111,7 +4159,8 @@ def homogeneousTraceFreeSubmodule (r n m : ℕ) : change (p : PolynomialSpace r n) ∈ traceFreeSubmodule r n ↔ _ exact mem_traceFreeSubmodule (p : PolynomialSpace r n) -private def homogeneousTraceFreeCoefficientEmbedding (r n m : ℕ) : +/-- The coefficient embedding restricted to homogeneous trace-free polynomials. -/ +def homogeneousTraceFreeCoefficientEmbedding (r n m : ℕ) : homogeneousTraceFreeSubmodule r n m →ₗ[ℝ] SpherePacking.Fischer.CoefficientSpace ((r + 1) * n) m := (SpherePacking.Fischer.coefficientEmbedding ((r + 1) * n) m).comp @@ -4125,12 +4174,15 @@ theorem homogeneousTraceFreeCoefficientEmbedding_injective ((r + 1) * n) m).comp (homogeneousTraceFreeSubmodule r n m).subtype_injective -private def homogeneousTraceFreeCoefficientRange (r n m : ℕ) : +/-- The range of the homogeneous trace-free coefficient embedding. -/ +def homogeneousTraceFreeCoefficientRange (r n m : ℕ) : Submodule ℝ (SpherePacking.Fischer.CoefficientSpace ((r + 1) * n) m) := LinearMap.range (homogeneousTraceFreeCoefficientEmbedding r n m) -private def simultaneousHarmonicCoefficientProjection (r n m : ℕ) : +/-- Orthogonally project coefficient space to the homogeneous trace-free range and recover the +polynomial. -/ +def simultaneousHarmonicCoefficientProjection (r n m : ℕ) : SpherePacking.Fischer.CoefficientSpace ((r + 1) * n) m →ₗ[ℝ] homogeneousTraceFreeSubmodule r n m := by let e := homogeneousTraceFreeCoefficientEmbedding r n m @@ -4249,7 +4301,8 @@ theorem polarization_isHomogeneous_harmonicLift {r n m : ℕ} (MvPolynomial.isHomogeneous_X ℝ (variableIndex i k)).mul (hp.pderiv (i := variableIndex j k)) -private def homogeneousPolarization (r n m : ℕ) +/-- The row polarization operator restricted to homogeneous degree `m`. -/ +def homogeneousPolarization (r n m : ℕ) (i j : Fin (r + 1)) : SpherePacking.Fischer.Homogeneous ((r + 1) * n) m →ₗ[ℝ] SpherePacking.Fischer.Homogeneous ((r + 1) * n) m := @@ -4276,7 +4329,8 @@ theorem homogeneousPolarization_mem_traceFree {r n m : ℕ} (p : PolynomialSpace r n) ((mem_traceFreeSubmodule _).mpr hp)) -private def traceFreeHomogeneousPolarization (r n m : ℕ) +/-- The row polarization operator restricted further to homogeneous trace-free polynomials. -/ +def traceFreeHomogeneousPolarization (r n m : ℕ) (i j : Fin (r + 1)) : homogeneousTraceFreeSubmodule r n m →ₗ[ℝ] homogeneousTraceFreeSubmodule r n m := @@ -5064,11 +5118,13 @@ theorem finrank_harmonicYoung_pos_of_complexWitness {r n : ℕ} exact Module.finrank_pos_iff_exists_ne_zero.mpr (exists_nonzero_harmonicYoung_of_complexWitness w) -private def nullEvenCoordinate {m n : ℕ} (hn : 2 * m ≤ n) +/-- The even coordinate `2 * i` in the ambient space reserved for a null-coordinate pair. -/ +def nullEvenCoordinate {m n : ℕ} (hn : 2 * m ≤ n) (i : Fin m) : Fin n := ⟨2 * i.val, by have hi := i.isLt; omega⟩ -private def nullOddCoordinate {m n : ℕ} (hn : 2 * m ≤ n) +/-- The odd coordinate `2 * i + 1` in the ambient space reserved for a null-coordinate pair. -/ +def nullOddCoordinate {m n : ℕ} (hn : 2 * m ≤ n) (i : Fin m) : Fin n := ⟨2 * i.val + 1, by have hi := i.isLt; omega⟩ @@ -5104,7 +5160,9 @@ theorem nullEvenCoordinate_ne_nullOddCoordinate {m n : ℕ} dsimp [nullEvenCoordinate, nullOddCoordinate] at hval omega -private def nullCoordinateCoefficient {m n : ℕ} (hn : 2 * m ≤ n) +/-- The complex coefficients `1` and `I` on the even and odd coordinates of a null pair, and +zero elsewhere. -/ +def nullCoordinateCoefficient {m n : ℕ} (hn : 2 * m ≤ n) (i : Fin m) (k : Fin n) : ℂ := if k = nullEvenCoordinate hn i then 1 else if k = nullOddCoordinate hn i then Complex.I @@ -5324,7 +5382,9 @@ theorem nullRowLinearForm_eq_even_add_I_odd {r m n : ℕ} add_zero] simp_rw [hsplit, Finset.sum_add_distrib, Fintype.sum_ite_eq'] -private def nullRetraction {r m n : ℕ} (hn : 2 * m ≤ n) : +/-- The polynomial retraction retaining the selected even coordinates as variables and sending +the other coordinates to zero. -/ +def nullRetraction {r m n : ℕ} (hn : 2 * m ≤ n) : MvPolynomial (Fin ((r + 1) * n)) ℂ →ₐ[ℂ] MvPolynomial (Fin (r + 1) × Fin m) ℂ := MvPolynomial.aeval fun z => @@ -5606,7 +5666,8 @@ def minorIndex {r : ℕ} (k : Fin (r + 1)) (i : Fin (k.val + 1)) : Fin (r + 1) := ⟨i.val, by have := i.isLt; have := k.isLt; omega⟩ -private def leadingMinor {r n : ℕ} (h : 2 * (r + 1) ≤ n) +/-- The determinant of the leading `(k + 1)`-square matrix of isotropic variables. -/ +def leadingMinor {r n : ℕ} (h : 2 * (r + 1) ≤ n) (k : Fin (r + 1)) : MvPolynomial (Fin ((r + 1) * n)) ℂ := Matrix.det (Matrix.of fun i j : Fin (k.val + 1) => isotropicVariable h (minorIndex k i) (minorIndex k j)) @@ -7070,7 +7131,9 @@ namespace ThreeRowYoungBranching open MetricCodes.Spherical.HigherHarmonicYoung open MetricCodes.Spherical.HigherHarmonicYoung.GelfandTsetlin -private def transverseVariableIndex {r n : ℕ} +/-- Embed a row-variable index into the larger array with one additional row and one additional +coordinate. -/ +def transverseVariableIndex {r n : ℕ} (a : Fin ((r + 1) * n)) : Fin ((r + 2) * (n + 1)) := let z := finProdFinEquiv.symm a variableIndex (r := r + 1) z.1.castSucc z.2.castSucc @@ -7258,7 +7321,8 @@ theorem transversePolynomial_mem_harmonicYoung {r n : ℕ} rw [polarization_transversePolynomial_castSucc, hp.2.2.2 i j hij', map_zero] -private def appendZeroYoungEmbedding {r n : ℕ} +/-- Embed harmonic Young space by appending a zero weight and adding a transverse coordinate. -/ +def appendZeroYoungEmbedding {r n : ℕ} (mu : Fin (r + 1) → ℕ) : HarmonicYoungSpace (n := n) mu →ₗ[ℝ] HarmonicYoungSpace (n := n + 1) (appendZeroWeight mu) where @@ -7275,7 +7339,8 @@ private def appendZeroYoungEmbedding {r n : ℕ} exact map_smul (transversePolynomial n) c (p : PolynomialSpace r n) -private def appendZeroYoungIsometry {r n : ℕ} +/-- The transverse embedding with an appended zero weight, bundled as a linear isometry. -/ +def appendZeroYoungIsometry {r n : ℕ} (mu : Fin (r + 1) → ℕ) : HarmonicYoungSpace (n := n) mu →ₗᵢ[ℝ] HarmonicYoungSpace (n := n + 1) (appendZeroWeight mu) := @@ -7297,7 +7362,9 @@ private def appendZeroYoungIsometry {r n : ℕ} (p : PolynomialSpace r n) (q : PolynomialSpace r n) _ = ⟪p, q⟫_ℝ := (young_inner_eq_polynomialInner mu p q).symm) -private def zeroRowVariableIndex {r n : ℕ} +/-- Embed a row-variable index into the larger array with one additional row and the same +coordinate dimension. -/ +def zeroRowVariableIndex {r n : ℕ} (a : Fin ((r + 1) * n)) : Fin ((r + 2) * n) := let z := finProdFinEquiv.symm a variableIndex (r := r + 1) z.1.castSucc z.2 @@ -7478,7 +7545,9 @@ theorem zeroRowPolynomial_mem_harmonicYoung_iff {r n : ℕ} map_zero] · exact zeroRowPolynomial_mem_harmonicYoung mu p -private def appendZeroRowEmbedding {r n : ℕ} +/-- Embed harmonic Young space by appending a zero row weight while retaining the coordinate +dimension. -/ +def appendZeroRowEmbedding {r n : ℕ} (mu : Fin (r + 1) → ℕ) : HarmonicYoungSpace (n := n) mu →ₗ[ℝ] HarmonicYoungSpace (n := n) (appendZeroWeight mu) where @@ -7546,7 +7615,8 @@ theorem appendZeroRowEmbedding_surjective {r n : ℕ} apply Subtype.ext exact hq' -private def appendZeroRowIsometry {r n : ℕ} +/-- The embedding that appends a zero row weight, bundled as a linear isometry. -/ +def appendZeroRowIsometry {r n : ℕ} (mu : Fin (r + 1) → ℕ) : HarmonicYoungSpace (n := n) mu →ₗᵢ[ℝ] HarmonicYoungSpace (n := n) (appendZeroWeight mu) := @@ -8077,7 +8147,9 @@ instance jointHarmonicWeightSpace_finiteDimensional (jointHarmonicWeightSubmodule n lam).subtype (jointHarmonicWeightSubmodule n lam).subtype_injective -private def jointHarmonicWeightHomogeneousEmbedding {r : ℕ} +/-- Regard a joint harmonic weight polynomial as homogeneous of degree equal to the sum of its +row weights. -/ +def jointHarmonicWeightHomogeneousEmbedding {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) : JointHarmonicWeightSpace n lam →ₗ[ℝ] SpherePacking.Fischer.Homogeneous ((r + 1) * n) (∑ i, lam i) where @@ -8101,7 +8173,8 @@ theorem jointHarmonicWeightHomogeneousEmbedding_injective ((r + 1) * n) (∑ i, lam i) => (z : PolynomialSpace r n)) h -private def jointHarmonicWeightCoefficientEmbedding {r : ℕ} +/-- The Fischer coefficient embedding of the joint harmonic weight space. -/ +def jointHarmonicWeightCoefficientEmbedding {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) : JointHarmonicWeightSpace n lam →ₗ[ℝ] SpherePacking.Fischer.CoefficientSpace @@ -8418,7 +8491,8 @@ abbrev YoungGramRadialWeightQuotient {r : ℕ} (youngMultihomogeneousSubmodule n lam) ⧸ youngGramRadialWeightSubmodule n lam -private def youngMultihomogeneousHomogeneousEmbedding {r : ℕ} +/-- Regard a polynomial of the prescribed row multidegrees as homogeneous of their total degree. -/ +def youngMultihomogeneousHomogeneousEmbedding {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) : youngMultihomogeneousSubmodule n lam →ₗ[ℝ] SpherePacking.Fischer.Homogeneous @@ -8442,7 +8516,8 @@ theorem youngMultihomogeneousHomogeneousEmbedding_injective ((r + 1) * n) (∑ i, lam i) => (z : PolynomialSpace r n)) hpq -private def youngMultihomogeneousCoefficientEmbedding {r : ℕ} +/-- The Fischer coefficient embedding restricted to the prescribed row multidegrees. -/ +def youngMultihomogeneousCoefficientEmbedding {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) : youngMultihomogeneousSubmodule n lam →ₗ[ℝ] SpherePacking.Fischer.CoefficientSpace @@ -8459,7 +8534,9 @@ theorem youngMultihomogeneousCoefficientEmbedding_injective ((r + 1) * n) (∑ i, lam i)).comp (youngMultihomogeneousHomogeneousEmbedding_injective n lam) -@[implicit_reducible] private def youngMultihomogeneousFischerCore +/-- The inner product core on row-multihomogeneous polynomials induced by their coefficient +embedding. -/ +@[implicit_reducible] def youngMultihomogeneousFischerCore {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) : InnerProductSpace.Core ℝ (youngMultihomogeneousSubmodule n lam) := SpherePacking.Fischer.embeddingInnerCore diff --git a/LeanPool/MetricCodes/Rigidity.lean b/LeanPool/MetricCodes/Rigidity.lean index 7c52518e11..14a77c8278 100644 --- a/LeanPool/MetricCodes/Rigidity.lean +++ b/LeanPool/MetricCodes/Rigidity.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.Weyl +public import LeanPool.MetricCodes.Weyl /-! # All-rank harmonic rigidity @@ -12,6 +13,8 @@ import LeanPool.MetricCodes.Weyl Completion of the root complex and rigidity of harmonic highest-weight vectors. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable namespace MetricCodes @@ -226,7 +229,8 @@ theorem fullRootExteriorBracket_weightedAtom_swap rw [rootStructureConstant_swap, fullRootExteriorBracketAtom_swap] simp only [smul_neg, neg_smul, neg_neg] -private def fullRootExteriorBracketUnordered (r n : ℕ) : +/-- Sum the exterior bracket atoms over all ordered root triples with their structure constants. -/ +def fullRootExteriorBracketUnordered (r n : ℕ) : Module.End ℝ (FullRootExteriorPolynomialChain r n) := ∑ α : PositiveRoot r, ∑ β : PositiveRoot r, ∑ γ : PositiveRoot r, @@ -1099,7 +1103,9 @@ section open scoped BigOperators open MetricCodes.Spherical.HigherHarmonicYoung -private def fullRootExteriorCubicIncidenceOne (r n : ℕ) : +/-- The cubic bracket contribution in which the second structure constant outputs the first +input root. -/ +def fullRootExteriorCubicIncidenceOne (r n : ℕ) : Module.End ℝ (FullRootExteriorPolynomialChain r n) := ∑ α : PositiveRoot r, ∑ β : PositiveRoot r, ∑ γ : PositiveRoot r, ∑ δ : PositiveRoot r, @@ -1110,7 +1116,9 @@ private def fullRootExteriorCubicIncidenceOne (r n : ℕ) : (actualExteriorRootContraction (PolynomialSpace r n) ε * actualExteriorRootContraction (PolynomialSpace r n) δ))) -private def fullRootExteriorCubicIncidenceTwo (r n : ℕ) : +/-- The cubic bracket contribution in which the second structure constant outputs the second +input root. -/ +def fullRootExteriorCubicIncidenceTwo (r n : ℕ) : Module.End ℝ (FullRootExteriorPolynomialChain r n) := ∑ α : PositiveRoot r, ∑ β : PositiveRoot r, ∑ γ : PositiveRoot r, ∑ δ : PositiveRoot r, @@ -1121,7 +1129,9 @@ private def fullRootExteriorCubicIncidenceTwo (r n : ℕ) : (actualExteriorRootContraction (PolynomialSpace r n) ε * actualExteriorRootContraction (PolynomialSpace r n) δ))) -private def fullRootExteriorCubicIncidenceThree (r n : ℕ) : +/-- The cubic bracket contribution using the first bracket's output as the next bracket's first +input. -/ +def fullRootExteriorCubicIncidenceThree (r n : ℕ) : Module.End ℝ (FullRootExteriorPolynomialChain r n) := ∑ α : PositiveRoot r, ∑ β : PositiveRoot r, ∑ γ : PositiveRoot r, ∑ ε : PositiveRoot r, @@ -1132,7 +1142,9 @@ private def fullRootExteriorCubicIncidenceThree (r n : ℕ) : (actualExteriorRootContraction (PolynomialSpace r n) β * actualExteriorRootContraction (PolynomialSpace r n) α))) -private def fullRootExteriorCubicIncidenceFour (r n : ℕ) : +/-- The cubic bracket contribution using the first bracket's output as the next bracket's second +input. -/ +def fullRootExteriorCubicIncidenceFour (r n : ℕ) : Module.End ℝ (FullRootExteriorPolynomialChain r n) := ∑ α : PositiveRoot r, ∑ β : PositiveRoot r, ∑ γ : PositiveRoot r, ∑ δ : PositiveRoot r, @@ -2181,7 +2193,8 @@ theorem fullRootExteriorUpperPolynomialAction_contraction_commute actualExteriorRootContraction_apply] split_ifs <;> simp -private def fullRootExteriorUpperActionAtom (r n : ℕ) (α : PositiveRoot r) : +/-- The upper polynomial action composed with exterior creation of the same root. -/ +def fullRootExteriorUpperActionAtom (r n : ℕ) (α : PositiveRoot r) : Module.End ℝ (FullRootExteriorPolynomialChain r n) := fullRootExteriorUpperPolynomialAction r n α * actualExteriorRootCreation (PolynomialSpace r n) α @@ -2423,7 +2436,9 @@ section open scoped BigOperators open MetricCodes.Spherical.HigherHarmonicYoung -private def rootJointHarmonicActionBracketMixed {r : ℕ} +/-- The two mixed compositions of the action coboundary and bracket boundary on joint harmonic +chains. -/ +def rootJointHarmonicActionBracketMixed {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (k : ℕ) : RootJointHarmonicChain n lam (k + 1) →ₗ[ℝ] RootJointHarmonicChain n lam (k + 1) := @@ -2432,7 +2447,8 @@ private def rootJointHarmonicActionBracketMixed {r : ℕ} (weightedRootBracketBoundary n lam (k + 1)).comp (weightedExteriorActionCoboundary n lam (k + 1)) -private def rootJointHarmonicFullMixedHodge {r : ℕ} +/-- The four mixed action-bracket terms in the weighted Hodge operator on joint harmonic chains. -/ +def rootJointHarmonicFullMixedHodge {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (k : ℕ) : RootJointHarmonicChain n lam (k + 1) →ₗ[ℝ] RootJointHarmonicChain n lam (k + 1) := @@ -2494,7 +2510,8 @@ section open MetricCodes.Spherical.HigherHarmonicYoung -private def rootPolynomialActionBracketMixed (r n k : ℕ) : +/-- The mixed action-coboundary and bracket-boundary operator on polynomial chains. -/ +def rootPolynomialActionBracketMixed (r n k : ℕ) : RootPolynomialChain r n (k + 1) →ₗ[ℝ] RootPolynomialChain r n (k + 1) := (rootActionCoboundary r n k).comp (rootBracketBoundary r n k) + @@ -2541,7 +2558,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung attribute [local instance] Classical.propDecidable -private def fullRootExteriorUpperRootStructureIncidence (r n : ℕ) : +/-- The structure-constant sum coupling upper polynomial action, root creation, and root +contraction. -/ +def fullRootExteriorUpperRootStructureIncidence (r n : ℕ) : Module.End ℝ (FullRootExteriorPolynomialChain r n) := ∑ α : PositiveRoot r, ∑ β : PositiveRoot r, ∑ γ : PositiveRoot r, rootStructureConstant β γ α • @@ -2987,7 +3006,9 @@ section open MetricCodes.Spherical.HigherHarmonicYoung -private def weightedChevalleyEilenbergCoboundary {r : ℕ} +/-- The weighted Chevalley-Eilenberg coboundary, combining the action and root-bracket +coboundaries. -/ +def weightedChevalleyEilenbergCoboundary {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (k : ℕ) : RootJointHarmonicChain n lam k →ₗ[ℝ] RootJointHarmonicChain n lam (k + 1) := @@ -3448,11 +3469,14 @@ namespace HigherYoungArbitraryRankColumnHighestCoefficientDescent open MetricCodes.Spherical.HigherHarmonicYoung.BideterminantHighestLine open MetricCodes.Spherical.HigherYoungAllRankSourceCoefficientStraightening -private def sourceMatrixTranspose (m : ℕ) : +/-- The polynomial-algebra automorphism that transposes the two indices of each source matrix +variable. -/ +def sourceMatrixTranspose (m : ℕ) : SourceMatrix m ≃ₐ[ℂ] SourceMatrix m := MvPolynomial.renameEquiv ℂ (Equiv.prodComm (Fin m) (Fin m)) -private def sourceExponentTranspose {m : ℕ} +/-- Transpose the row and column indices of a source matrix monomial's exponent vector. -/ +def sourceExponentTranspose {m : ℕ} (d : Fin m × Fin m →₀ ℕ) : Fin m × Fin m →₀ ℕ := Finsupp.mapDomain (Equiv.prodComm (Fin m) (Fin m)) d @@ -3554,7 +3578,8 @@ namespace HigherYoungArbitraryRankTriangularMarginDominance open MetricCodes.Spherical.HigherHarmonicYoung.BideterminantHighestLine -private def sourceMarginPrefix {m : ℕ} (f : Fin m → ℕ) (k : ℕ) : ℕ := +/-- The sum of the first `k` entries of a row or column margin. -/ +def sourceMarginPrefix {m : ℕ} (f : Fin m → ℕ) (k : ℕ) : ℕ := ∑ i : Fin m, if i.val < k then f i else 0 theorem sourceColumnPrefix_le_sourceRowPrefix_of_upper @@ -3688,7 +3713,8 @@ namespace ArbitraryRankColumnWeightProjection open MetricCodes.Spherical.HigherHarmonicYoung.BideterminantHighestLine -private def columnVariableWeight (m : ℕ) : +/-- Assign each source matrix variable unit weight in its column coordinate. -/ +def columnVariableWeight (m : ℕ) : (Fin m × Fin m) → (Fin m → ℕ) := fun z => Pi.single z.2 1 @@ -3706,7 +3732,8 @@ theorem columnVariableWeight_weight {m : ℕ} Nat.cast_id, Pi.single_apply, mul_ite, mul_one, mul_zero, Fintype.sum_prod_type, Finset.sum_ite_eq, Finset.mem_univ, ↓reduceIte, sourceColumnDegree] -private def columnWeightComponent {m : ℕ} (ν : Fin m → ℕ) +/-- Project a source matrix polynomial to the component with column-degree vector `ν`. -/ +def columnWeightComponent {m : ℕ} (ν : Fin m → ℕ) (p : SourceMatrix m) : SourceMatrix m := MvPolynomial.weightedHomogeneousComponent (columnVariableWeight m) ν p @@ -4452,19 +4479,23 @@ open MetricCodes.Spherical.HigherHarmonicYoung.DeterminantVectors open MetricCodes.Spherical.HigherYoungAmbientCartanIsotropicEigenvalues open MetricCodes.Spherical.HigherYoungAmbientRootNilpotence -private def totalYoungRowEuler {r n : ℕ} : +/-- The total Euler derivation obtained by summing the diagonal derivations of all Young rows. -/ +def totalYoungRowEuler {r n : ℕ} : Derivation ℂ (MvPolynomial (Fin ((r + 1) * n)) ℂ) (MvPolynomial (Fin ((r + 1) * n)) ℂ) := ∑ a : Fin (r + 1), rowDerivation a a -private def antiholomorphicEulerDefect {r n : ℕ} +/-- The Euler contribution from conjugate isotropic variables and their antiholomorphic +derivatives. -/ +def antiholomorphicEulerDefect {r n : ℕ} (h : 2 * (r + 1) ≤ n) : Derivation ℂ (MvPolynomial (Fin ((r + 1) * n)) ℂ) (MvPolynomial (Fin ((r + 1) * n)) ℂ) := ∑ a : Fin (r + 1), ∑ p : Fin (r + 1), conjugateIsotropicVariable h a p • antiholomorphicDerivative h a p -private def unusedCoordinateEulerDefect {r n : ℕ} : +/-- The Euler contribution of ambient coordinates outside the chosen isotropic pairs. -/ +def unusedCoordinateEulerDefect {r n : ℕ} : Derivation ℂ (MvPolynomial (Fin ((r + 1) * n)) ℂ) (MvPolynomial (Fin ((r + 1) * n)) ℂ) := ∑ a : Fin (r + 1), @@ -5019,7 +5050,8 @@ open MetricCodes.Spherical.HigherHarmonicYoung open MetricCodes.Spherical.HigherHarmonicYoung.DeterminantVectors open MetricCodes.Spherical.HigherYoungAmbientRootRotationDecomposition -private def unusedAmbientCoordinates {r n : ℕ} : Finset (Fin n) := +/-- The ambient coordinates beyond the `r + 1` selected even-odd pairs. -/ +def unusedAmbientCoordinates {r n : ℕ} : Finset (Fin n) := Finset.univ.filter (fun t : Fin n => 2 * (r + 1) ≤ t.val) @[simp] theorem mem_unusedAmbientCoordinates {r n : ℕ} @@ -5146,7 +5178,8 @@ section open MetricCodes.Spherical.HigherHarmonicYoung open MetricCodes.Spherical.HigherHarmonicYoung.DeterminantVectors -private def holomorphicDerivative {r n : ℕ} +/-- The even-coordinate partial derivative minus `i` times the paired odd-coordinate derivative. -/ +def holomorphicDerivative {r n : ℕ} (h : 2 * (r + 1) ≤ n) (a p : Fin (r + 1)) : Derivation ℂ (MvPolynomial (Fin ((r + 1) * n)) ℂ) (MvPolynomial (Fin ((r + 1) * n)) ℂ) := @@ -6267,7 +6300,9 @@ theorem triangularResidual_eq_rowTail_add_columnTail {r : ℕ} have hp := p.isLt omega -private def harmonicHighestTriangularCoefficient {r : ℕ} +/-- The triangular coercivity coefficient combining unused coordinates, row weights, and root +indices. -/ +def harmonicHighestTriangularCoefficient {r : ℕ} (n : ℕ) (lam mu : Fin (r + 1) → ℕ) (b p : Fin (r + 1)) : ℕ := @@ -6803,7 +6838,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung open MetricCodes.Spherical.HigherHarmonicYoung.DeterminantVectors open MetricCodes.Spherical.HigherYoungTwoRowLieIrreducibility -private def ambientShortNegativeRoot {r n : ℕ} +/-- The negative short-root derivation formed from the two rotations of an isotropic coordinate +pair. -/ +def ambientShortNegativeRoot {r n : ℕ} (h : 2 * (r + 1) ≤ n) (p : Fin (r + 1)) (t : Fin n) : Derivation ℂ (MvPolynomial (Fin ((r + 1) * n)) ℂ) (MvPolynomial (Fin ((r + 1) * n)) ℂ) := @@ -6827,7 +6864,9 @@ open MetricCodes.Spherical.HigherYoungArbitraryRankDominantHighestLinePreservati open MetricCodes.Spherical.HigherYoungAllRankShortNegativeRootNilpotence open MetricCodes.Spherical.HigherYoungTwoRowLieIrreducibility -private def complexDerivationCommutator {r n : ℕ} +/-- The commutator of two complex polynomial derivations, given by the difference of their +compositions. -/ +def complexDerivationCommutator {r n : ℕ} (D₁ D₂ : Derivation ℂ (MvPolynomial (Fin ((r + 1) * n)) ℂ) (MvPolynomial (Fin ((r + 1) * n)) ℂ)) : @@ -6842,7 +6881,7 @@ private def complexDerivationCommutator {r n : ℕ} Derivation.coeFn_coe, map_add, Derivation.leibniz, smul_eq_mul] ring -private instance complexDerivationBracket {r n : ℕ} : +instance complexDerivationBracket {r n : ℕ} : Bracket (Derivation ℂ (MvPolynomial (Fin ((r + 1) * n)) ℂ) @@ -7225,7 +7264,9 @@ namespace HigherHarmonicYoung.ArbitraryRankAmbientSignedWeightProjection open MetricCodes.Spherical.HigherHarmonicYoung.DeterminantVectors open MetricCodes.Spherical.HigherYoungAmbientRootNilpotence -private def ambientSignedVariableWeight {r n : ℕ} +/-- The signed coordinate weight: positive on even isotropic indices, negative on odd ones, and +zero elsewhere. -/ +def ambientSignedVariableWeight {r n : ℕ} (v : Fin ((r + 1) * n)) : Fin (r + 1) → ℤ := let t := ((finProdFinEquiv (m := r + 1) (n := n)).symm v).2 if ht : t.val < 2 * (r + 1) then @@ -7270,7 +7311,9 @@ private def ambientSignedVariableWeight {r n : ℕ} simp only [ambientSignedVariableWeight, variableIndex, Equiv.symm_apply_apply, not_lt_of_ge ht, ↓reduceDIte] -private def ambientSignedWeightComponent {r n : ℕ} +/-- Project to signed ambient weight `mu` after changing to isotropic coordinates, then change +back. -/ +def ambientSignedWeightComponent {r n : ℕ} (h : 2 * (r + 1) ≤ n) (mu : Fin (r + 1) → ℤ) (f : MvPolynomial (Fin ((r + 1) * n)) ℂ) : @@ -7372,7 +7415,8 @@ namespace HigherYoungArbitraryRankSignedDiagonalDerivation open MetricCodes.Spherical.HigherYoungMaximalCartanNullSubstitutionRange -private def signedDiagonalDerivation {ι : Type*} {m : ℕ} +/-- The diagonal derivation sending variable `i` to `2 * w i p` times that variable. -/ +def signedDiagonalDerivation {ι : Type*} {m : ℕ} (w : ι → Fin m → ℤ) (p : Fin m) : Derivation ℂ (MvPolynomial ι ℂ) (MvPolynomial ι ℂ) := MvPolynomial.mkDerivation ℂ @@ -7803,7 +7847,8 @@ theorem derivation_weightedHomogeneousComponent_shift exact heq (add_right_cancel h) simp only [heq, ↓reduceIte, map_zero, hshift] -private def orthogonalPositiveRootSignedCharge +/-- The signed coordinate charge of a difference, sum, or short positive orthogonal root. -/ +def orthogonalPositiveRootSignedCharge {r n : ℕ} (alpha : OrthogonalPositiveRoot r n) : Fin (r + 1) → ℤ := match alpha with | .difference p q _ => Pi.single p 1 - Pi.single q 1 diff --git a/LeanPool/MetricCodes/RootComplex.lean b/LeanPool/MetricCodes/RootComplex.lean index 315b27e422..5ce601fca0 100644 --- a/LeanPool/MetricCodes/RootComplex.lean +++ b/LeanPool/MetricCodes/RootComplex.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.HighestWeights -import Mathlib.Algebra.Lie.OfAssociative -import Mathlib.Algebra.Polynomial.Degree.IsMonicOfDegree -import Mathlib.Algebra.Polynomial.Homogenize -import Mathlib.Data.Set.PowersetCard +public import LeanPool.MetricCodes.HighestWeights +public import Mathlib.Algebra.Lie.OfAssociative +public import Mathlib.Algebra.Polynomial.Degree.IsMonicOfDegree +public import Mathlib.Algebra.Polynomial.Homogenize +public import Mathlib.Data.Set.PowersetCard /-! # Universal root complexes @@ -16,6 +17,8 @@ import Mathlib.Data.Set.PowersetCard Orthogonal root kernels and the universal BGG complex used in the all-rank argument. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable section @@ -53,7 +56,8 @@ def orthogonalPositiveRootDerivation {r n : ℕ} | .sum p q _ => ambientSumPositiveRoot h p q | .short p t _ => ambientShortPositiveRoot h p t -private def isotropicCoordinateCoheight {r n : ℕ} +/-- The isotropic coordinate coheight used in the positive-root weighted filtration. -/ +def isotropicCoordinateCoheight {r n : ℕ} (v : Fin ((r + 1) * n)) : ℕ := let t := ((finProdFinEquiv (m := r + 1) (n := n)).symm v).2 if ht : t.val < 2 * (r + 1) then @@ -716,7 +720,9 @@ open MetricCodes.Spherical.HigherYoungIsotropicAdjoinRange open MetricCodes.Spherical.HigherYoungIsotropicCoordinateHomogeneity open MetricCodes.Spherical.HigherYoungEvenCoordinateHolomorphicAdjoin -private def isotropicCoordinateDefect {r n : ℕ} +/-- The isotropic defect weight: zero on even paired coordinates, two on odd ones, and one +elsewhere. -/ +def isotropicCoordinateDefect {r n : ℕ} (v : Fin ((r + 1) * n)) : ℕ := let t := ((finProdFinEquiv (m := r + 1) (n := n)).symm v).2 if t.val < 2 * (r + 1) then @@ -757,7 +763,8 @@ private def isotropicCoordinateDefect {r n : ℕ} simp only [isotropicCoordinateDefect, variableIndex, Equiv.symm_apply_apply, not_lt_of_ge ht, ↓reduceIte] -private def naturalDiagonalDerivation {ι : Type*} (w : ι → ℕ) : +/-- The diagonal polynomial derivation sending each variable to its natural weight times itself. -/ +def naturalDiagonalDerivation {ι : Type*} (w : ι → ℕ) : Derivation ℂ (MvPolynomial ι ℂ) (MvPolynomial ι ℂ) := MvPolynomial.mkDerivation ℂ (fun i => (w i : ℂ) • MvPolynomial.X i) @@ -1831,7 +1838,8 @@ def rootBracket {r : ℕ} (α β : PositiveRoot r) : RootVector r := simp only [rootBracket, Finsupp.smul_single, smul_eq_mul, mul_one, Finsupp.coe_finsetSum, Finset.sum_apply, Finsupp.single_apply, Finset.sum_ite_eq', Finset.mem_univ, ↓reduceIte] -private def rootAction {r : ℕ} (n : ℕ) : +/-- The linear extension of positive-root operators from finitely supported root vectors. -/ +def rootAction {r : ℕ} (n : ℕ) : RootVector r →ₗ[ℝ] (PolynomialSpace r n →ₗ[ℝ] PolynomialSpace r n) := Finsupp.linearCombination ℝ (positiveRootOperator n) @@ -2069,7 +2077,8 @@ theorem lowerRootWeight_other {r : ℕ} lowerRootWeight μ α i = μ i := by simp only [lowerRootWeight, hfirst, ↓reduceIte, hsecond] -private def rootTransferBase {r : ℕ} (μ : Fin (r + 1) → ℕ) +/-- The row weight obtained by subtracting one at the first endpoint of a positive root. -/ +def rootTransferBase {r : ℕ} (μ : Fin (r + 1) → ℕ) (α : PositiveRoot r) : Fin (r + 1) → ℕ := Function.update μ (positiveRootFirst α) (μ (positiveRootFirst α) - 1) @@ -2391,16 +2400,19 @@ open ArbitraryRankMixedTraceRegularity attribute [local instance] MvPolynomial.weightedGradedAlgebra -private def youngGramPrefixIdeal (r n k : ℕ) : Ideal (PolynomialSpace r n) := +/-- The ideal generated by the first `k` Gram quadratic relations. -/ +def youngGramPrefixIdeal (r n k : ℕ) : Ideal (PolynomialSpace r n) := Ideal.ofList ((gramQuadraticList r n).take k) -private def youngGramPrefixWeightSubmodule {r : ℕ} +/-- The multihomogeneous weight submodule lying in the ideal of the first `k` Gram relations. -/ +def youngGramPrefixWeightSubmodule {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (k : ℕ) : Submodule ℝ (youngMultihomogeneousSubmodule n lam) := ((youngGramPrefixIdeal r n k).restrictScalars ℝ).comap (youngMultihomogeneousSubmodule n lam).subtype -private abbrev YoungGramPrefixWeightQuotient {r : ℕ} +/-- The multihomogeneous weight space modulo the first `k` Gram relations. -/ +abbrev YoungGramPrefixWeightQuotient {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (k : ℕ) := (youngMultihomogeneousSubmodule n lam) ⧸ youngGramPrefixWeightSubmodule n lam k @@ -2422,12 +2434,14 @@ private abbrev YoungGramPrefixWeightQuotient {r : ℕ} simp only [mem_youngGramPrefixWeightSubmodule, youngGramPrefixIdeal_zero, Submodule.mem_bot, ZeroMemClass.coe_eq_zero] -private def youngVariableRowWeight (r n : ℕ) : +/-- The row multidegree of a polynomial variable, given by one in its row and zero elsewhere. -/ +def youngVariableRowWeight (r n : ℕ) : Fin ((r + 1) * n) → (Fin (r + 1) → ℕ) := fun x => Pi.single ((finProdFinEquiv (m := r + 1) (n := n)).symm x).1 1 -private def youngGramPairDegree {r : ℕ} +/-- The row multidegree of the Gram pairing between rows `i` and `j`. -/ +def youngGramPairDegree {r : ℕ} (i j : Fin (r + 1)) : Fin (r + 1) → ℕ := Pi.single i 1 + Pi.single j 1 @@ -2609,7 +2623,8 @@ theorem youngWeightedComponent_gram_mul rw [MvPolynomial.coeff_weightedHomogeneousComponent, ite_eq_right hb, mul_zero] -private def youngGramPairWeightMultiplication +/-- Multiplication by a Gram pairing, with the corresponding increase in row multidegree. -/ +def youngGramPairWeightMultiplication {r : ℕ} (n : ℕ) (i j : Fin (r + 1)) (mu : Fin (r + 1) → ℕ) : youngMultihomogeneousSubmodule n mu →ₗ[ℝ] @@ -2657,7 +2672,8 @@ theorem youngGramPrefixWeightSubmodule_le_succ intro p hp exact youngGramPrefixIdeal_le_succ hk hp -private def youngGramPrefixQuotientNext +/-- The natural quotient map obtained by imposing the next Gram relation. -/ +def youngGramPrefixQuotientNext {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (k : ℕ) (hk : k < (ArbitraryRankMixedTraceRegularity.gramQuadraticList r n).length) : YoungGramPrefixWeightQuotient n lam k →ₗ[ℝ] @@ -2677,7 +2693,8 @@ theorem youngGramPrefixQuotientNext_surjective refine ⟨(youngGramPrefixWeightSubmodule n lam k).mkQ p, ?_⟩ rfl -private def youngGramPairPrefixQuotientMultiplication +/-- Multiplication by a Gram pairing induced on the quotient by the first `k` Gram relations. -/ +def youngGramPairPrefixQuotientMultiplication {r : ℕ} (n : ℕ) (i j : Fin (r + 1)) (mu : Fin (r + 1) → ℕ) (k : ℕ) : YoungGramPrefixWeightQuotient n mu k →ₗ[ℝ] @@ -3097,7 +3114,8 @@ def fullGramKoszulCoefficient {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) : ℤ := gramKoszulCoefficient n lam (Finset.univ : Finset (UpperGramPair r)) -private def gramPrefixPairFinset (r k : ℕ) : Finset (UpperGramPair r) := +/-- The first `k` upper Gram pairs in the fixed finite enumeration. -/ +def gramPrefixPairFinset (r k : ℕ) : Finset (UpperGramPair r) := ((Finset.univ : Finset (UpperGramPair r)).toList.take k).toFinset @[simp] theorem gramPrefixPairFinset_zero (r : ℕ) : @@ -3113,7 +3131,8 @@ private def gramPrefixPairFinset (r k : ℕ) : Finset (UpperGramPair r) := unfold gramPrefixPairFinset rw [hlen, List.take_length, Finset.toList_toFinset] -private def gramPairAt {r : ℕ} (k : Fin (Fintype.card (UpperGramPair r))) : +/-- The upper Gram pair at position `k` in the fixed finite enumeration. -/ +def gramPairAt {r : ℕ} (k : Fin (Fintype.card (UpperGramPair r))) : UpperGramPair r := ((Finset.univ : Finset (UpperGramPair r)).toList).get ⟨k, by simp⟩ @@ -3630,8 +3649,9 @@ section open scoped BigOperators open scoped InnerProductSpace +/-- The inner product core on a finite product, obtained by summing the component Fischer cores. -/ @[implicit_reducible] -private def finitePiFischerCore {ι : Type*} [Fintype ι] +def finitePiFischerCore {ι : Type*} [Fintype ι] (V : ι → Type*) [∀ i, AddCommGroup (V i)] [∀ i, Module ℝ (V i)] (c : ∀ i, InnerProductSpace.Core ℝ (V i)) : @@ -3871,7 +3891,8 @@ theorem activePositiveRoot_fischer_adjoint {r n : ℕ} (positiveRootSecond α.val) (positiveRootFirst α.val) (p.val : PolynomialSpace r n) (q.val : PolynomialSpace r n) -private def positiveRootFischerLaplacian {r : ℕ} +/-- The finite Fischer Laplacian associated with the active positive-root raising maps. -/ +def positiveRootFischerLaplacian {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) : JointHarmonicWeightSpace n lam →ₗ[ℝ] JointHarmonicWeightSpace n lam := @@ -4049,7 +4070,8 @@ def rootDegreeZeroPositiveCochain {r : ℕ} activePositiveRootRaise n lam α (rootJointHarmonicDegreeZeroEquiv n lam p) := rfl -private def rootDegreeZeroFischerLaplacian {r : ℕ} +/-- The positive-root Fischer Laplacian transported to root-chain degree zero. -/ +def rootDegreeZeroFischerLaplacian {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) : RootJointHarmonicChain n lam 0 →ₗ[ℝ] RootJointHarmonicChain n lam 0 := @@ -4617,7 +4639,8 @@ theorem positiveRoot_vandermonde {r : ℕ} : rw [← Matrix.det_transpose, Matrix.det_apply] simp only [Matrix.transpose_apply, Matrix.vandermonde_apply, Units.smul_def, zsmul_eq_mul] -private def shiftedPolynomialWeightFunctional {r : ℕ} +/-- The coefficient-weighted sum of `F` evaluated at the shifted weights `lam i + m i - i.val`. -/ +def shiftedPolynomialWeightFunctional {r : ℕ} (lam : Fin (r + 1) → ℕ) (F : (Fin (r + 1) → ℤ) → ℤ) : MvPolynomial (Fin (r + 1)) ℤ →ₗ[ℤ] ℤ := @@ -4641,7 +4664,9 @@ private def shiftedPolynomialWeightFunctional {r : ℕ} (Finsupp.single m c) = _ exact Finsupp.lsum_single ℤ _ m c -private def rootSelectedExponent {r : ℕ} +/-- The exponent choosing the first endpoint of each selected root and the second endpoint +otherwise. -/ +def rootSelectedExponent {r : ℕ} (S : Finset (PositiveRoot r)) : Fin (r + 1) →₀ ℕ := (∑ α ∈ (Finset.univ \ S), Finsupp.single (positiveRootSecond α) 1) + @@ -4775,7 +4800,8 @@ theorem rootFamily_selectedMonomial {r : ℕ} rw [hsecond', hfirst'] simp [rootSelectedExponent] -private def rootPermutationExponent {r : ℕ} +/-- The exponent vector whose coordinate at `i` is the value of the permutation at `i`. -/ +def rootPermutationExponent {r : ℕ} (σ : Equiv.Perm (Fin (r + 1))) : Fin (r + 1) →₀ ℕ := Finsupp.equivFunOnFinite.symm (fun i => (σ i).val) diff --git a/LeanPool/MetricCodes/SpectralDecomposition.lean b/LeanPool/MetricCodes/SpectralDecomposition.lean index 35c43df13c..0dd136ec3d 100644 --- a/LeanPool/MetricCodes/SpectralDecomposition.lean +++ b/LeanPool/MetricCodes/SpectralDecomposition.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.Rigidity +public import LeanPool.MetricCodes.Rigidity /-! # Canonical spectral decomposition @@ -12,6 +13,8 @@ import LeanPool.MetricCodes.Rigidity Gelfand--Tsetlin completeness, Pieri channels, and projected-axis sufficiency. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable namespace MetricCodes @@ -130,7 +133,8 @@ theorem orthogonalPositiveRootDerivation_youngComplexPolynomialSpan_mem exact ambientShortPositiveRoot_youngComplexPolynomialSpan_mem h lam W hW p t f hf -private def orthogonalPositiveRootLinearFamily +/-- The orthogonal positive-root derivations, viewed as a family of complex linear maps. -/ +def orthogonalPositiveRootLinearFamily {r n : ℕ} (h : 2 * (r + 1) ≤ n) : OrthogonalPositiveRoot r n → MvPolynomial (Fin ((r + 1) * n)) ℂ →ₗ[ℂ] @@ -676,7 +680,9 @@ open MetricCodes.Spherical.HigherYoungArbitraryRowLoweringProjectedAxisWitness open MetricCodes.Spherical.HigherYoungCyclicHighestSchur open MetricCodes.Spherical.HigherYoungMovingFibres -private def CanonicalBoxReverseAxisRange {r m n : ℕ} +/-- The reverse axis-range condition: projected lowering of the higher box fibre lands in the +lower box fibre. -/ +def CanonicalBoxReverseAxisRange {r m n : ℕ} (a : Fin (r + 2) → ℝ) (b : Fin (r + 1) → ℝ) (hstable : ∀ v : RectangularVertices.Vertex (r + 1) m, FiniteInterlacing (n + 1) @@ -700,7 +706,9 @@ private def CanonicalBoxReverseAxisRange {r m n : ℕ} LinearMap.range (canonicalBoxGelfandTsetlinFibre a b hstable hgram low).toLinearMap -private def canonicalBoxEdgeAxisData_of_forward_and_raisingGram +/-- Canonical box-edge axis data assembled from forward lowering data, a positive raising Gram +scalar, and the reverse range condition. -/ +def canonicalBoxEdgeAxisDataOfForwardAndRaisingGram {r m n : ℕ} (a : Fin (r + 2) → ℝ) (b : Fin (r + 1) → ℝ) (hstable : ∀ v : RectangularVertices.Vertex (r + 1) m, @@ -805,7 +813,7 @@ def canonicalBoxEdgeAxisDataOfPolynomialData (RectangularVertices.Vertex (r + 1) m)).symm high) have hraising := canonicalEdgeRaisingGram_of_signature_eq lowSignature highSignature stabilizer row hrow hlow hhigh - refine canonicalBoxEdgeAxisData_of_forward_and_raisingGram + refine canonicalBoxEdgeAxisDataOfForwardAndRaisingGram a b hstable hgram low high row hrow (canonicalBoxGenuineForwardAxisData a b hstable hgram low high row hrow D) ?_ hreverse @@ -976,7 +984,9 @@ theorem rotationIntertwiner_complexRotation_eigen_of_signatures simpa only [Fin.sum_univ_succ, Fin.sum_univ_zero, add_zero] using heigen) simpa only [Fin.sum_univ_succ, Fin.sum_univ_zero, add_zero] using h -private def youngIntertwinerHighestPolynomial +/-- The complex polynomial obtained by applying an intertwiner to the real and imaginary parts +of a dominant highest vector. -/ +def youngIntertwinerHighestPolynomial {r n : ℕ} (hn : 2 * (r + 1) ≤ n) (mu nu : Fin (r + 1) → ℕ) (hdom : Antitone mu) (A : HarmonicYoungSpace (n := n) mu →ₗ[ℝ] @@ -1353,7 +1363,8 @@ variable {E : ι → Type*} [∀ i, InnerProductSpace ℝ (E i)] [∀ i, FiniteDimensional ℝ (E i)] -private def orthogonalBranchSum (f : (i : ι) → E i →ₗᵢ[ℝ] V) : +/-- The linear map summing the images of a finite family of isometric branch embeddings. -/ +def orthogonalBranchSum (f : (i : ι) → E i →ₗᵢ[ℝ] V) : ((i : ι) → E i) →ₗ[ℝ] V := by classical exact LinearMap.lsum ℝ E ℝ (fun i => (f i).toLinearMap) @@ -1526,7 +1537,8 @@ section namespace HigherYoungAllRankWeylBranchingRowDifference -private def adjacentRowDifference {R : Type*} [CommRing R] {r : ℕ} +/-- The matrix of adjacent row differences, with the final row retained. -/ +def adjacentRowDifference {R : Type*} [CommRing R] {r : ℕ} (M : Matrix (Fin (r + 1)) (Fin (r + 1)) R) : Matrix (Fin (r + 1)) (Fin (r + 1)) R := fun i j => @@ -1571,7 +1583,9 @@ end HigherYoungAllRankWeylBranchingRowDifference namespace HigherHarmonicYoung.BranchingDimension -private def branchLower {r : ℕ} (lam : Fin (r + 1) → ℕ) +/-- The lower endpoint of a branching coordinate: the next weight entry, or zero in the final +position. -/ +def branchLower {r : ℕ} (lam : Fin (r + 1) → ℕ) (i : Fin (r + 1)) : ℕ := Fin.lastCases 0 (fun j : Fin r => lam j.succ) i @@ -1649,7 +1663,9 @@ theorem sum_det_eq_det_rowSum Matrix.det (fun i j => ∑ a : κ i, row i a j) := (det_rowSum_eq_sum_det row).symm -private def branchJacobiTrudiRow {r : ℕ} (n : ℕ) +/-- A Jacobi–Trudi row evaluated at an allowed branching coordinate using the coefficients in +ambient dimension `n`. -/ +def branchJacobiTrudiRow {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (i : Fin (r + 1)) (x : {a : Fin (lam i + 1) // branchLower lam i ≤ a.val}) (j : Fin (r + 1)) : ℤ := @@ -1855,11 +1871,14 @@ open MetricCodes.Spherical.HigherWeylAllRankJacobiTrudiWeylEvaluation open MetricCodes.Spherical.HigherWeylBinomialDeterminant open MetricCodes.Spherical.HigherHierarchy -private abbrev OrthogonalBranchCoordinate {r : ℕ} +/-- An integer branching coordinate between `branchLower lam i` and `lam i`, inclusive. -/ +abbrev OrthogonalBranchCoordinate {r : ℕ} (lam : Fin (r + 1) → ℕ) (i : Fin (r + 1)) := {a : Fin (lam i + 1) // branchLower lam i ≤ a.val} -private def orthogonalBranchRow {r : ℕ} (n : ℕ) +/-- A Jacobi–Trudi row at an allowed branching coordinate, using the coefficients in ambient +dimension `n - 1`. -/ +def orthogonalBranchRow {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (i : Fin (r + 1)) (a : OrthogonalBranchCoordinate lam i) (j : Fin (r + 1)) : ℤ := @@ -2355,7 +2374,9 @@ open MetricCodes.Spherical.HigherYoungAllRankSelectedBranchSignature open MetricCodes.Spherical.HigherYoungAllRankZeroRowRotationEquivariance open MetricCodes.Spherical.ThreeRowYoungBranching -private def canonicalBranchProjectedLowerCrossGram +/-- The cross-Gram map from a canonical Gelfand–Tsetlin fibre to a full branch after projected +lowering along the last coordinate axis. -/ +def canonicalBranchProjectedLowerCrossGram {r n : ℕ} (low high : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (hhigh : Interlaces high mu) @@ -2508,7 +2529,9 @@ open MetricCodes.Spherical.HigherYoungAllRankSelectedBranchSignature open MetricCodes.Spherical.HigherYoungAllRankZeroRowRotationEquivariance open MetricCodes.Spherical.ThreeRowYoungBranching -private def canonicalGelfandTsetlinFullBranchCrossGram +/-- The cross-Gram map between a canonical Gelfand–Tsetlin fibre and a full branch, after +removing the appended zero row. -/ +def canonicalGelfandTsetlinFullBranchCrossGram {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (h : Interlaces lam mu) (hn : 2 * (r + 1) + 5 ≤ n + 1) @@ -3127,7 +3150,8 @@ open MetricCodes.Spherical.HigherHarmonicYoung.MixedSignature open MetricCodes.Spherical.HigherChannel open MetricCodes.Spherical.HigherYoungAllRankGTCharacteristicResidue -private def cartanCharacteristicInterpolationProjector +/-- The Lagrange interpolation polynomial for node `i`, evaluated at the endomorphism `T`. -/ +def cartanCharacteristicInterpolationProjector {ι V : Type*} [Fintype ι] [DecidableEq ι] [AddCommGroup V] [Module ℝ V] (nodes : ι → ℝ) (T : Module.End ℝ V) (i : ι) : @@ -3184,7 +3208,9 @@ open MetricCodes.Spherical.HigherChannel open MetricCodes.Spherical.HigherHarmonicYoung open MetricCodes.Spherical.HigherHarmonicYoung.MixedSignature -private def gtTensorCasimir {r n : ℕ} (lam : Fin (r + 1) → ℕ) : +/-- The tensor Casimir operator, one half of the sum of the negative squares of the tensor +ambient rotations. -/ +def gtTensorCasimir {r n : ℕ} (lam : Fin (r + 1) → ℕ) : Module.End ℝ (SpherePacking.Euclidean n ⊗[ℝ] HarmonicYoungSpace (n := n) lam) := (2 : ℝ)⁻¹ • ∑ a : Fin n, ∑ b : Fin n, @@ -3446,7 +3472,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung.ClebschRotation open MetricCodes.Spherical.HigherHarmonicYoung.MixedSignature open MetricCodes.Spherical.HigherHarmonicYoung.AllRankGTRelativeCasimirProjector -private def gtEuclideanCasimir (n : ℕ) : +/-- The Euclidean Casimir operator, one half of the sum of the negative squares of the ambient +rotations. -/ +def gtEuclideanCasimir (n : ℕ) : Module.End ℝ (SpherePacking.Euclidean n) := (2 : ℝ)⁻¹ • ∑ a : Fin n, ∑ b : Fin n, -((euclideanAmbientRotation a b).comp @@ -3944,7 +3972,8 @@ open MetricCodes.Spherical.HigherYoungArbitraryRowLoweringProjectedAxisWitness open MetricCodes.Spherical.HigherYoungPenultimateRowProjectedLower open MetricCodes.Spherical.HigherRepresentationGraph -private def gtYoungAxisTensor {r n : ℕ} +/-- The linear map sending a harmonic Young vector `p` to the pure tensor `axis ⊗ₜ p`. -/ +def gtYoungAxisTensor {r n : ℕ} (lam : Fin (r + 1) → ℕ) (axis : SpherePacking.Euclidean n) : HarmonicYoungSpace (n := n) lam →ₗ[ℝ] (SpherePacking.Euclidean n ⊗[ℝ] @@ -4318,7 +4347,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowMickelssonWeightHomog open MetricCodes.Spherical.HigherRepresentationGraph (Interlaces) open MetricCodes.Spherical.HigherYoungAllRankGTCharacteristicResidue -private def gtSelectedProjectorCompression +/-- The signed characteristic projector for `(row, true)`, compressed along the canonical +Gelfand–Tsetlin axis tensor map. -/ +def gtSelectedProjectorCompression {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (h : Interlaces lam mu) (hgram : PositiveGelfandTsetlinFischerGram (n := n) lam mu h) @@ -4400,7 +4431,9 @@ theorem gtSelectedProjectorCompression_eq_plusProbability_of_minor rw [SpherePacking.Fischer.polynomialInner_smul_right] ring -private def gtSelectedPhysicalAxisCompression +/-- The selected Clebsch range projector compressed along tensoring with the last coordinate +axis. -/ +def gtSelectedPhysicalAxisCompression {r n : ℕ} (lam : Fin (r + 2) → ℕ) (row : Fin (r + 2)) : Module.End ℝ (HarmonicYoungSpace (n := n + 1) lam) := (gtYoungAxisTensor lam @@ -4843,7 +4876,9 @@ namespace HigherYoungAllRankOrthogonalTensorPieriCoefficient open MetricCodes.Spherical.HigherWeylBinomialDeterminant -private def orthogonalTensorPieriCoefficient (n : ℕ) (z j : ℤ) : ℤ := +/-- The difference of orthogonal complete symmetric coefficients at indices `z + j` and `z - j - +2` used in the tensor Pieri formula. -/ +def orthogonalTensorPieriCoefficient (n : ℕ) (z j : ℤ) : ℤ := orthogonalCompleteSymmetricCoefficient n (z + j) - orthogonalCompleteSymmetricCoefficient n (z - j - 2) @@ -5154,12 +5189,16 @@ open MetricCodes.Spherical.HigherYoungAllRankOrthogonalTensorPieriCoefficient open MetricCodes.Spherical.HigherYoungAllRankOrthogonalTensorPieriInvalidRows open MetricCodes.Spherical.HigherYoungPenultimateRowProjectedLower -private def orthogonalTensorPieriRaiseRow {r : ℕ} (n : ℕ) +/-- The tensor Pieri coefficient row obtained by raising the shifted weight coordinate `lam i - +i` by one. -/ +def orthogonalTensorPieriRaiseRow {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (i : Fin (r + 1)) : Fin (r + 1) → ℤ := fun j => orthogonalTensorPieriCoefficient n (((lam i : ℤ) - (i.val : ℤ)) + 1) (j.val : ℤ) -private def orthogonalTensorPieriLowerRow {r : ℕ} (n : ℕ) +/-- The tensor Pieri coefficient row obtained by lowering the shifted weight coordinate `lam i - +i` by one. -/ +def orthogonalTensorPieriLowerRow {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (i : Fin (r + 1)) : Fin (r + 1) → ℤ := fun j => orthogonalTensorPieriCoefficient n (((lam i : ℤ) - (i.val : ℤ)) - 1) (j.val : ℤ) @@ -5893,7 +5932,8 @@ open MetricCodes.Spherical.HigherYoungAllRankOrthogonalTensorPieriBoundaryColumn open MetricCodes.Spherical.HigherYoungAllRankOrthogonalTensorPieriRowFiltering open MetricCodes.Spherical.HigherYoungPenultimateRowProjectedLower -private def orthogonalTensorPieriSignedShiftMatrix {r : ℕ} (n : ℕ) +/-- The matrix whose rows sum the raised and lowered tensor Pieri coefficient rows. -/ +def orthogonalTensorPieriSignedShiftMatrix {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) : Matrix (Fin (r + 1)) (Fin (r + 1)) ℤ := fun i j => @@ -5902,12 +5942,14 @@ private def orthogonalTensorPieriSignedShiftMatrix {r : ℕ} (n : ℕ) orthogonalTensorPieriCoefficient n (((lam i : ℤ) - (i.val : ℤ)) - 1) (j.val : ℤ) -private def orthogonalTensorPieriNextColumn {r : ℕ} (n : ℕ) +/-- The tensor Pieri coefficient column with the column index shifted up by one. -/ +def orthogonalTensorPieriNextColumn {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (j : Fin (r + 1)) : Fin (r + 1) → ℤ := fun i => orthogonalTensorPieriCoefficient n ((lam i : ℤ) - (i.val : ℤ)) ((j.val : ℤ) + 1) -private def orthogonalTensorPieriPrevColumn {r : ℕ} (n : ℕ) +/-- The tensor Pieri coefficient column with the column index shifted down by one. -/ +def orthogonalTensorPieriPrevColumn {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (j : Fin (r + 1)) : Fin (r + 1) → ℤ := fun i => orthogonalTensorPieriCoefficient n ((lam i : ℤ) - (i.val : ℤ)) ((j.val : ℤ) - 1) @@ -6240,7 +6282,7 @@ private theorem lowered_target_tail_finiteInterlacing_metriccodes2_9210a270 · simp only [loweredInternalYoungWeight, ne_eq, hrow, not_false_eq_true, Function.update_of_ne, Std.le_refl] -private theorem existsNormalizedPaddedPieriRaising_metriccodes2_9210a270 +theorem existsNormalizedPaddedPieriRaising_metriccodes2_9210a270 {r n : ℕ} (hn : 2 * r + 4 ≤ n) (target : Fin (r + 1) → ℕ) (hdom : Antitone target) (row : PaddedPieriLowerRow target) : @@ -6274,7 +6316,9 @@ private theorem existsNormalizedPaddedPieriRaising_metriccodes2_9210a270 exact boundaryNormalizedYoungClebschRaise_rotation_intertwine target low hdegree row.val c hc hinner a b -private def normalizedPaddedPieriRaising +/-- A chosen normalized isometric Pieri raising map from the lowered internal Young weight into +the tensor representation. -/ +def normalizedPaddedPieriRaising {r n : ℕ} (hn : 2 * r + 4 ≤ n) (target : Fin (r + 1) → ℕ) (hdom : Antitone target) (row : PaddedPieriLowerRow target) : @@ -8060,7 +8104,9 @@ open MetricCodes.Spherical.HigherHarmonicYoung.AllRankGTRelativeCasimirProjector open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRowMickelssonWeightHomogeneity open MetricCodes.Spherical.HigherRepresentationGraph -private def gtSelectedPhysicalSignedSpan {r n : ℕ} +/-- The span of the selected physical Clebsch range and all signed Casimir eigenspaces other +than the selected channel. -/ +def gtSelectedPhysicalSignedSpan {r n : ℕ} (low : Fin (r + 1) → ℕ) (row : Fin (r + 1)) : Submodule ℝ (SpherePacking.Euclidean n ⊗[ℝ] @@ -8377,7 +8423,9 @@ theorem originalPaddedSelectedAxisTensor_rotation_intertwine ((congrArg (fun q => T (A q)) hZ).trans ((congrArg T hA).trans hT)) -private def originalAppendedFullBranchAxisCrossGram +/-- The cross-Gram map between the original padded selected-axis tensor and an appended full- +branch Pieri lowering map. -/ +def originalAppendedFullBranchAxisCrossGram {r n : ℕ} (lam : Fin (r + 2) → ℕ) (mu : Fin (r + 1) → ℕ) (h : Interlaces lam mu) (hgram : PositiveGelfandTsetlinFischerGram (n := n) lam mu h) diff --git a/LeanPool/MetricCodes/Weyl.lean b/LeanPool/MetricCodes/Weyl.lean index efe25ad524..53e6dd79ad 100644 --- a/LeanPool/MetricCodes/Weyl.lean +++ b/LeanPool/MetricCodes/Weyl.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.MetricCodes.RootComplex +public import LeanPool.MetricCodes.RootComplex /-! # Weyl and root-complex identities @@ -12,6 +13,8 @@ import LeanPool.MetricCodes.RootComplex Euler groupings, orthogonal denominator formulas, and all-rank Weyl evaluations. -/ +@[expose] public section + noncomputable section MetricCodesNoncomputable namespace MetricCodes @@ -118,7 +121,9 @@ section open scoped BigOperators open MetricCodes.Spherical.HigherHarmonicYoung -private def weightedExteriorRootEdgeAdjoint {r k : ℕ} +/-- The adjoint root operator along an admissible wedge insertion, with its weight spaces +identified. -/ +def weightedExteriorRootEdgeAdjoint {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (T : AdmissibleRootWedge lam k) (α : PositiveRoot r) (hα : α ∉ T.val.val) @@ -212,7 +217,8 @@ theorem weightedExteriorRootEdge_fischer_adjoint {r n k : ℕ} (p.val : PolynomialSpace r n) (q.val : PolynomialSpace r n) -private def weightedExteriorRootEdgeAdjointAt {r k : ℕ} +/-- Transport the adjoint insertion-edge operator to a specified equal target wedge. -/ +def weightedExteriorRootEdgeAdjointAt {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (T : AdmissibleRootWedge lam k) (α : PositiveRoot r) (hα : α ∉ T.val.val) @@ -304,7 +310,8 @@ section open scoped BigOperators open MetricCodes.Spherical.HigherHarmonicYoung -private def rootAdmissibleErase {r k : ℕ} +/-- Erase a root from an admissible wedge when the resulting signed weight remains nonnegative. -/ +def rootAdmissibleErase {r k : ℕ} (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam (k + 1)) (α : PositiveRoot r) (hα : α ∈ S.val.val) @@ -391,7 +398,9 @@ theorem rootAdmissibleInsert_eq_iff_erase {r k : ℕ} rw [LinearMap.comp_apply, LinearEquiv.coe_coe, jointHarmonicWeightCast_coe, weightedExteriorRootEdgeAdjoint_coe] -private def weightedExteriorRootEdgeAdjointErase {r k : ℕ} +/-- The adjoint insertion-edge operator viewed from the wedge with one root erased back to the +original wedge. -/ +def weightedExteriorRootEdgeAdjointErase {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam (k + 1)) (α : PositiveRoot r) (hα : α ∈ S.val.val) @@ -846,7 +855,8 @@ private theorem degreeZero_realExteriorRootSign_singleton_metriccodes2_89cbd172 simp only [realExteriorRootSign, exteriorRootSign, Int.reduceNeg, Finset.filter_singleton, lt_self_iff_false, ↓reduceIte, Finset.card_empty, pow_zero, Int.cast_one] -private def activeAdmissibleRootWedge {r : ℕ} +/-- The admissible singleton wedge associated with an active positive root. -/ +def activeAdmissibleRootWedge {r : ℕ} (lam : Fin (r + 1) → ℕ) (α : ActivePositiveRoot lam) : AdmissibleRootWedge lam 1 := by refine ⟨rootWedgeSingleton α.val, ?_⟩ @@ -1083,7 +1093,8 @@ namespace HigherWeylGramAlternantCoefficient open MetricCodes.Spherical.HigherHarmonicYoung open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRankMixedTraceRegularity -private def weylTargetExponent {r : ℕ} +/-- The exponent vector `lam i + r - i` used for the target Weyl coefficient. -/ +def weylTargetExponent {r : ℕ} (lam : Fin (r + 1) → ℕ) : Fin (r + 1) →₀ ℕ := Finsupp.equivFunOnFinite.symm fun i => lam i + r - i.val @@ -1092,7 +1103,8 @@ private def weylTargetExponent {r : ℕ} weylTargetExponent lam i = lam i + r - i.val := by simp only [weylTargetExponent, Finsupp.equivFunOnFinite_symm_apply_apply] -private def reversePermutationExponent {r : ℕ} +/-- The reversed staircase exponent vector permuted by `σ`. -/ +def reversePermutationExponent {r : ℕ} (σ : Equiv.Perm (Fin (r + 1))) : Fin (r + 1) →₀ ℕ := Finsupp.equivFunOnFinite.symm fun i => r - (σ i).val @@ -1101,7 +1113,8 @@ private def reversePermutationExponent {r : ℕ} reversePermutationExponent σ i = r - (σ i).val := by simp only [reversePermutationExponent, Finsupp.equivFunOnFinite_symm_apply_apply] -private def boundedExponent {r B : ℕ} +/-- Convert bounded finite coordinates to a finitely supported natural exponent vector. -/ +def boundedExponent {r B : ℕ} (d : Fin (r + 1) → Fin (B + 1)) : Fin (r + 1) →₀ ℕ := Finsupp.equivFunOnFinite.symm fun i => (d i).val @@ -1119,7 +1132,9 @@ theorem boundedExponent_injective {r B : ℕ} : apply Fin.ext exact congrFun (congrArg DFunLike.coe h) i -private def ambientBinomialPolynomial {r : ℕ} +/-- The polynomial of coordinatewise bounded exponents with coefficients given by products of +ambient binomial dimensions. -/ +def ambientBinomialPolynomial {r : ℕ} (n B : ℕ) : MvPolynomial (Fin (r + 1)) ℤ := ∑ d : Fin (r + 1) → Fin (B + 1), MvPolynomial.monomial (boundedExponent d) @@ -1148,7 +1163,8 @@ theorem coeff_ambientBinomialPolynomial_of_le {r n B : ℕ} · simp only [Finset.mem_univ, not_true_eq_false, MvPolynomial.coeff_monomial, ite_eq_right_iff, IsEmpty.forall_iff] -private def gramPairExponent {r : ℕ} +/-- The row-degree exponent vector of one Gram pair, counting each of its two coordinates. -/ +def gramPairExponent {r : ℕ} (z : UpperGramPair r) : Fin (r + 1) →₀ ℕ := Finsupp.single z.val.1 1 + Finsupp.single z.val.2 1 @@ -1159,7 +1175,8 @@ private def gramPairExponent {r : ℕ} simp only [gramPairExponent, Finsupp.coe_add, Pi.add_apply, Finsupp.single_apply, eq_comm, gramPairRowDegree] -private def gramFamilyExponent {r : ℕ} +/-- The sum of the row-degree exponent vectors of a finite family of Gram pairs. -/ +def gramFamilyExponent {r : ℕ} (s : Finset (UpperGramPair r)) : Fin (r + 1) →₀ ℕ := ∑ z ∈ s, gramPairExponent z @@ -1169,7 +1186,8 @@ private def gramFamilyExponent {r : ℕ} simp only [gramFamilyExponent, Finsupp.coe_finsetSum, Finset.sum_apply, gramPairExponent_apply, gramFamilyRowDegree] -private def gramEquationPolynomial (r : ℕ) : +/-- The product of `1 - Xᵢ * Xⱼ` over the upper Gram pairs. -/ +def gramEquationPolynomial (r : ℕ) : MvPolynomial (Fin (r + 1)) ℤ := ∏ z : UpperGramPair r, (1 - MvPolynomial.X z.val.1 * MvPolynomial.X z.val.2) @@ -1264,7 +1282,8 @@ open MetricCodes.Spherical.HigherHarmonicYoung open MetricCodes.Spherical.HigherHarmonicYoung.ArbitraryRankMixedTraceRegularity open MetricCodes.Spherical.HigherWeylGramAlternantCoefficient -private def reversedWeylPolynomial (r : ℕ) : +/-- The determinant alternant whose columns have powers in descending order from `r` to zero. -/ +def reversedWeylPolynomial (r : ℕ) : MvPolynomial (Fin (r + 1)) ℤ := Matrix.det (Matrix.of fun i j : Fin (r + 1) => (MvPolynomial.X i : MvPolynomial (Fin (r + 1)) ℤ) ^ (r - j.val)) @@ -1638,7 +1657,8 @@ end HigherWeylGramOrthogonalJacobiTrudi namespace HigherWeylGeneralRowNormalization -private def risingFactorProduct (M q : ℕ) : ℝ := +/-- The product of the `q` consecutive factors starting at `M + 1`, viewed as a real number. -/ +def risingFactorProduct (M q : ℕ) : ℝ := ∏ a ∈ Finset.range q, (((M + a + 1 : ℕ) : ℝ)) theorem risingFactorProduct_eq_ascFactorial (M q : ℕ) : @@ -1730,7 +1750,9 @@ open MetricCodes.Spherical.HigherHierarchy open MetricCodes.Spherical.HigherWeylBinomialDeterminant open MetricCodes.Spherical.HigherWeylGeneralRowNormalization -private def orthogonalRowScale {r : ℕ} (n : ℕ) +/-- The orthogonal row normalization combining its complete-symmetric coefficient, linear +factor, and rising-factor denominator. -/ +def orthogonalRowScale {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (i : Fin (r + 1)) : ℝ := (orthogonalCompleteSymmetricCoefficient n ((lam i + Weyl.rowTail i : ℕ) : ℤ) : ℝ) * @@ -1897,7 +1919,8 @@ namespace HigherWeylAllRankCommonInvariantPolynomial open Polynomial -private def commonInvariantPolynomial (n : ℝ) (r k : ℕ) : Polynomial ℝ := +/-- The monic product of `k` shifted linear factors in the common quadratic invariant. -/ +def commonInvariantPolynomial (n : ℝ) (r k : ℕ) : Polynomial ℝ := ∏ q ∈ Finset.range k, (X + C (((r : ℝ) - (q : ℝ)) * (n - (r : ℝ) - 2 + (q : ℝ)))) @@ -1945,7 +1968,9 @@ end HigherWeylAllRankCommonInvariantPolynomial namespace HigherWeylMiddleProductClosedForm -private def middleProducts (n z : ℝ) : ℕ → (ℝ × ℝ) +/-- The paired middle products generated by successively adjoining the two outer factors in each +component. -/ +def middleProducts (n z : ℝ) : ℕ → (ℝ × ℝ) | 0 => ((n + z - 2) * (n + z - 1), (z - 1) * z) | j + 1 => ((middleProducts n z j).1 * @@ -1953,7 +1978,8 @@ private def middleProducts (n z : ℝ) : ℕ → (ℝ × ℝ) (middleProducts n z j).2 * ((z - (j : ℝ) - 2) * (z + (j : ℝ) + 1))) -private def centeredProduct (x : ℝ) (j : ℕ) : ℝ := +/-- The product of consecutive factors from `x + j` down to `x - j - 1`. -/ +def centeredProduct (x : ℝ) (j : ℕ) : ℝ := ∏ s ∈ Finset.range (2 * j + 2), (x + (j : ℝ) - (s : ℝ)) @@ -2373,7 +2399,9 @@ theorem orthogonalJacobiTrudiDimension_zero rw [orthogonalCompleteSymmetricCoefficient_of_neg n hneg] norm_num [orthogonalCompleteSymmetricCoefficient] -private def middlePolynomials (n : ℝ) : ℕ → (Polynomial ℝ × Polynomial ℝ) +/-- The recursively coupled pair of polynomials used to express the middle-product sum and +difference. -/ +def middlePolynomials (n : ℝ) : ℕ → (Polynomial ℝ × Polynomial ℝ) | 0 => (Polynomial.C (n - 1), Polynomial.C 2 * Polynomial.X + @@ -2503,7 +2531,9 @@ theorem middlePolynomials_natDegree (n : ℝ) (j : ℕ) : omega _ = j + 1 + 1 := by omega -private def orthogonalColumnPolynomial (n : ℝ) (r : ℕ) +/-- The column polynomial formed from the common invariant factor and the first middle +polynomial. -/ +def orthogonalColumnPolynomial (n : ℝ) (r : ℕ) (j : Fin (r + 1)) : Polynomial ℝ := commonInvariantPolynomial n r (r - j.val) * (middlePolynomials n j.val).1 @@ -2516,7 +2546,8 @@ theorem orthogonalColumnPolynomial_natDegree_le · omega · exact (middlePolynomials_natDegree n j.val).1 -private def shiftedSquare {r : ℕ} (n : ℕ) +/-- The quadratic invariant `z * (z + n - 2)` at the shifted row weight `z = lam i - i`. -/ +def shiftedSquare {r : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (i : Fin (r + 1)) : ℝ := ((lam i : ℝ) - (i.val : ℝ)) * (((lam i : ℝ) - (i.val : ℝ)) + (n : ℝ) - 2) @@ -2888,7 +2919,8 @@ theorem orthogonalJacobiTrudiMatrix_entry_of_factored_transport field_simp [hD] nlinarith [hfact] -private def orthogonalReflectedBracket (n z : ℝ) (r j : ℕ) : ℝ := +/-- The difference of the two reflected factorial products in an orthogonal determinant entry. -/ +def orthogonalReflectedBracket (n z : ℝ) (r j : ℕ) : ℝ := ((∏ q ∈ Finset.range (r - j), (z + (r : ℝ) - (q : ℝ))) * (∏ q ∈ Finset.range (2 * r + 2 - (r - j)), @@ -3384,7 +3416,9 @@ theorem rootStructureConstant_lower_cross_sum {r n : ℕ} rw [sum_positiveRootOperator_eq_polarization_of_pair] · simp only [h, false_and, ↓reduceIte, zero_smul, Finset.sum_const_zero] -private def positiveRootCartanOperator {r : ℕ} (n : ℕ) (α : PositiveRoot r) : +/-- The difference of the diagonal row-polarization operators at the endpoints of a positive +root. -/ +def positiveRootCartanOperator {r : ℕ} (n : ℕ) (α : PositiveRoot r) : PolynomialSpace r n →ₗ[ℝ] PolynomialSpace r n := polarization r n (positiveRootFirst α) (positiveRootFirst α) - polarization r n (positiveRootSecond α) (positiveRootSecond α) @@ -3666,7 +3700,9 @@ theorem weightedExteriorActionDifferential_coboundary_apply_coe · simp only [map_zero, smul_zero] · rfl -private def rootPolynomialActionCoboundaryDifferentialIncidence +/-- The signed polynomial-action term obtained by erasing `α` and inserting `β`, or zero when +either step is inadmissible. -/ +def rootPolynomialActionCoboundaryDifferentialIncidence {r n k : ℕ} (lam : Fin (r + 1) → ℕ) (f : RootJointHarmonicChain n lam (k + 1)) (S : AdmissibleRootWedge lam (k + 1)) @@ -3703,7 +3739,9 @@ private def rootPolynomialActionCoboundaryDifferentialIncidence else 0 else 0 -private def rootPolynomialActionDifferentialCoboundaryIncidence +/-- The signed polynomial-action term obtained by inserting `β` and erasing `α`, or zero when +either step is inadmissible. -/ +def rootPolynomialActionDifferentialCoboundaryIncidence {r n k : ℕ} (lam : Fin (r + 1) → ℕ) (f : RootJointHarmonicChain n lam (k + 1)) (S : AdmissibleRootWedge lam (k + 1)) @@ -3825,7 +3863,8 @@ theorem sum_rootIncidence_pair_eq_diagonal_add_offDiagonal _ = _ := sum_rootIncidence_eq_diagonal_add_offDiagonal (fun a b => F a b + G b a) -private def rootPolynomialActionHodgeDiagonalIncidence +/-- The sum of the equal-root incidence terms in the polynomial-action Hodge operator. -/ +def rootPolynomialActionHodgeDiagonalIncidence {r n k : ℕ} (lam : Fin (r + 1) → ℕ) (f : RootJointHarmonicChain n lam (k + 1)) (S : AdmissibleRootWedge lam (k + 1)) : PolynomialSpace r n := @@ -3833,7 +3872,8 @@ private def rootPolynomialActionHodgeDiagonalIncidence (rootPolynomialActionCoboundaryDifferentialIncidence lam f S α α + rootPolynomialActionDifferentialCoboundaryIncidence lam f S α α) -private def rootPolynomialActionHodgeOffDiagonalIncidence +/-- The sum of the distinct-root incidence terms in the polynomial-action Hodge operator. -/ +def rootPolynomialActionHodgeOffDiagonalIncidence {r n k : ℕ} (lam : Fin (r + 1) → ℕ) (f : RootJointHarmonicChain n lam (k + 1)) (S : AdmissibleRootWedge lam (k + 1)) : PolynomialSpace r n := @@ -3964,7 +4004,9 @@ def rootSwapUpperStructureEdge {r k : ℕ} ⟨γ, rootAdmissibleSwap_upper_second_pos lam S α β γ hα hβ hadm hstructure⟩) -private def rootSwapLowerStructureEdge {r k : ℕ} +/-- The lowering root operator from a swapped wedge's weight space back to the original weight +space, using a nonzero structure constant. -/ +def rootSwapLowerStructureEdge {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam k) (α β γ : PositiveRoot r) @@ -4280,7 +4322,9 @@ theorem weightedPositiveRootOperator_fischer_energy_ge_gap (p.val : PolynomialSpace r n)) linarith -private abbrev IncludedDescendingPositiveRoot {r k : ℕ} +/-- Roots included in the wedge whose first endpoint has strictly larger weight than their +second endpoint. -/ +abbrev IncludedDescendingPositiveRoot {r k : ℕ} (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam k) := {α : PositiveRoot r // @@ -4304,7 +4348,9 @@ theorem includedDescendingPositiveRoot_first_pos 0 < rootWedgeWeight lam S (positiveRootFirst α.val) := by omega -private def includedDescendingPositiveRootOperator +/-- The weighted lowering operator for an included root with strictly descending endpoint +weights. -/ +def includedDescendingPositiveRootOperator {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam k) (α : IncludedDescendingPositiveRoot lam S) : @@ -4314,7 +4360,9 @@ private def includedDescendingPositiveRootOperator weightedPositiveRootOperator n (rootWedgeWeight lam S) α.val (includedDescendingPositiveRoot_first_pos lam S α) -private def includedDescendingPositiveRootOperatorStar +/-- The Fischer adjoint of the lowering operator for an included root with descending endpoint +weights. -/ +def includedDescendingPositiveRootOperatorStar {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam k) (α : IncludedDescendingPositiveRoot lam S) : @@ -4342,7 +4390,9 @@ theorem includedDescendingPositiveRoot_fischer_adjoint (positiveRootFirst α.val) (positiveRootSecond α.val) (p.val : PolynomialSpace r n) (q.val : PolynomialSpace r n) -private def includedDescendingPositiveRootFischerLaplacian +/-- The finite Fischer root Laplacian summed over the included roots with descending endpoint +weights. -/ +def includedDescendingPositiveRootFischerLaplacian {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam k) : JointHarmonicWeightSpace n (rootWedgeWeight lam S) →ₗ[ℝ] @@ -4493,7 +4543,9 @@ section open scoped BigOperators InnerProductSpace open MetricCodes.Spherical.HigherHarmonicYoung -private abbrev IncludedNondescendingPositiveRoot {r k : ℕ} +/-- Included roots whose first endpoint has positive weight no larger than the second endpoint's +weight. -/ +abbrev IncludedNondescendingPositiveRoot {r k : ℕ} (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam k) := {α : PositiveRoot r // @@ -4502,14 +4554,17 @@ private abbrev IncludedNondescendingPositiveRoot {r k : ℕ} rootWedgeWeight lam S (positiveRootFirst α) ≤ rootWedgeWeight lam S (positiveRootSecond α)} -private abbrev ExcludedActivePositiveRoot {r k : ℕ} +/-- Roots absent from the wedge whose second endpoint has positive weight. -/ +abbrev ExcludedActivePositiveRoot {r k : ℕ} (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam k) := {α : PositiveRoot r // α ∉ S.val.val ∧ 0 < rootWedgeWeight lam S (positiveRootSecond α)} -private def includedNondescendingPositiveRootOperator +/-- The weighted lowering operator for an included root with positive, nondescending endpoint +weights. -/ +def includedNondescendingPositiveRootOperator {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam k) (α : IncludedNondescendingPositiveRoot lam S) : @@ -4519,7 +4574,9 @@ private def includedNondescendingPositiveRootOperator weightedPositiveRootOperator n (rootWedgeWeight lam S) α.val α.property.2.1 -private def includedNondescendingPositiveRootOperatorStar +/-- The Fischer adjoint of the lowering operator for an included root with nondescending +endpoint weights. -/ +def includedNondescendingPositiveRootOperatorStar {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam k) (α : IncludedNondescendingPositiveRoot lam S) : @@ -4547,7 +4604,9 @@ theorem includedNondescendingPositiveRoot_fischer_adjoint (positiveRootFirst α.val) (positiveRootSecond α.val) (p.val : PolynomialSpace r n) (q.val : PolynomialSpace r n) -private def includedNondescendingPositiveRootFischerLaplacian +/-- The finite Fischer root Laplacian summed over the included roots with nondescending endpoint +weights. -/ +def includedNondescendingPositiveRootFischerLaplacian {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam k) : JointHarmonicWeightSpace n (rootWedgeWeight lam S) →ₗ[ℝ] @@ -4561,7 +4620,8 @@ private def includedNondescendingPositiveRootFischerLaplacian (includedNondescendingPositiveRootOperator n lam S) (includedNondescendingPositiveRootOperatorStar n lam S) -private def excludedActivePositiveRootOperator +/-- The active raising operator for a root absent from the wedge. -/ +def excludedActivePositiveRootOperator {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam k) (α : ExcludedActivePositiveRoot lam S) : @@ -4572,7 +4632,8 @@ private def excludedActivePositiveRootOperator activePositiveRootRaise n (rootWedgeWeight lam S) ⟨α.val, α.property.2⟩ -private def excludedActivePositiveRootOperatorStar +/-- The Fischer adjoint lowering operator for an active root absent from the wedge. -/ +def excludedActivePositiveRootOperatorStar {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam k) (α : ExcludedActivePositiveRoot lam S) : @@ -4600,7 +4661,8 @@ theorem excludedActivePositiveRoot_fischer_adjoint activePositiveRoot_fischer_adjoint (rootWedgeWeight lam S) ⟨α.val, α.property.2⟩ p q -private def excludedActivePositiveRootFischerLaplacian +/-- The finite Fischer root Laplacian summed over active roots absent from the wedge. -/ +def excludedActivePositiveRootFischerLaplacian {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam k) : JointHarmonicWeightSpace n (rootWedgeWeight lam S) →ₗ[ℝ] @@ -6589,7 +6651,9 @@ section open scoped BigOperators open MetricCodes.Spherical.HigherHarmonicYoung -private def weightedRootBracketEdgeAdjoint {r k : ℕ} +/-- The reverse weight-space identification for a wedge edge with nonzero root-bracket boundary +coefficient. -/ +def weightedRootBracketEdgeAdjoint {r k : ℕ} (n : ℕ) (lam : Fin (r + 1) → ℕ) (S : AdmissibleRootWedge lam (k + 1)) (T : AdmissibleRootWedge lam k) @@ -7221,7 +7285,8 @@ section open scoped BigOperators open MetricCodes.Spherical.HigherHarmonicYoung -private def rootWedgeErase {r k : ℕ} +/-- Erase a specified member of a root wedge, reducing its cardinality by one. -/ +def rootWedgeErase {r k : ℕ} (S : RootWedge r (k + 1)) (α : PositiveRoot r) (hα : α ∈ S.val) : RootWedge r k := by refine ⟨S.val.erase α, ?_⟩ diff --git a/LeanPool/MinModulusUniqueMultisetSum.lean b/LeanPool/MinModulusUniqueMultisetSum.lean index 15bab17df2..6493e667f6 100644 --- a/LeanPool/MinModulusUniqueMultisetSum.lean +++ b/LeanPool/MinModulusUniqueMultisetSum.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 José A. R. Fonollosa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: José A. R. Fonollosa -/ +module -import LeanPool.MinModulusUniqueMultisetSum.UniqueSums -import LeanPool.MinModulusUniqueMultisetSum.ElemAbelian2 +public import LeanPool.MinModulusUniqueMultisetSum.UniqueSums +public import LeanPool.MinModulusUniqueMultisetSum.ElemAbelian2 +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Rat.Floor +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.Continuity.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Minimum modulus for the unique multiset-sum problem @@ -17,3 +26,5 @@ Main declarations: `MinModulus.nmin_eq`, `MinModulus.elementaryAbelianTwoGroups_ Tags: additive-combinatorics, multiset-sums, finite-groups, permanent MSC: 11B75, 05D99 -/ + +@[expose] public section diff --git a/LeanPool/MinModulusUniqueMultisetSum/ElemAbelian2.lean b/LeanPool/MinModulusUniqueMultisetSum/ElemAbelian2.lean index b2c9696dbd..02dd635186 100644 --- a/LeanPool/MinModulusUniqueMultisetSum/ElemAbelian2.lean +++ b/LeanPool/MinModulusUniqueMultisetSum/ElemAbelian2.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Jose Fonollosa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jose Fonollosa -/ +module -import Mathlib.Algebra.Field.ZMod +public import Mathlib.Algebra.Field.ZMod +public import Mathlib.Algebra.Group.Action.Pi import Mathlib.RingTheory.PicardGroup /-! @@ -17,6 +19,8 @@ the all-ones multiset — then `n - 1 ≤ k` the elementary-abelian case of the minimum-modulus problem. -/ +@[expose] public section + namespace MinModulus open scoped BigOperators diff --git a/LeanPool/MinModulusUniqueMultisetSum/UniqueSums.lean b/LeanPool/MinModulusUniqueMultisetSum/UniqueSums.lean index 07a70f347e..8d654507dd 100644 --- a/LeanPool/MinModulusUniqueMultisetSum/UniqueSums.lean +++ b/LeanPool/MinModulusUniqueMultisetSum/UniqueSums.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Jose Fonollosa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jose Fonollosa -/ +module +public import Mathlib.Data.Nat.Log +public import Mathlib.Data.Nat.ModEq +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Algebra.Order.Ring.Star -import Mathlib.Data.Nat.Log -import Mathlib.Data.Nat.ModEq import Mathlib.Data.Nat.SuccPred import Mathlib.Tactic.NormNum.Ineq import Mathlib.Tactic.Ring.RingNF @@ -42,6 +44,8 @@ Contents: no axioms beyond propext / Classical.choice / Quot.sound** -/ +@[expose] public section + namespace MinModulus open Finset diff --git a/LeanPool/MinimumDegreeMatching.lean b/LeanPool/MinimumDegreeMatching.lean index e2afbc6b17..a51292c077 100644 --- a/LeanPool/MinimumDegreeMatching.lean +++ b/LeanPool/MinimumDegreeMatching.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Juan Pablo Traverso Gianini and Aristotle contributors. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Juan Pablo Traverso Gianini, Aristotle -/ +module -import LeanPool.MinimumDegreeMatching.Basic -import LeanPool.MinimumDegreeMatching.Spread -import LeanPool.MinimumDegreeMatching.BKLO +public import LeanPool.MinimumDegreeMatching.Basic +public import LeanPool.MinimumDegreeMatching.Spread +public import LeanPool.MinimumDegreeMatching.BKLO /-! # BKLO simultaneous perfect matchings and spread matchings diff --git a/LeanPool/MinimumDegreeMatching/BKLO.lean b/LeanPool/MinimumDegreeMatching/BKLO.lean index 16389541e5..1e8e248bd6 100644 --- a/LeanPool/MinimumDegreeMatching/BKLO.lean +++ b/LeanPool/MinimumDegreeMatching/BKLO.lean @@ -3,15 +3,11 @@ Copyright (c) 2026 Juan Pablo Traverso Giannini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Juan Pablo Traverso Giannini, Aristotle -/ -import LeanPool.MinimumDegreeMatching.BKLOSelection -import Mathlib.Basic.Real.Basic -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring +module +public import LeanPool.MinimumDegreeMatching.BKLOSelection +public import Mathlib.Analysis.Complex.Exponential import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Combinatorics.SimpleGraph.Init /-! # BKLO Lemma 10.7 for matchings @@ -27,6 +23,8 @@ greedy process. The formal proof instead uses the deterministic pessimistic-esti `BKLOSelection`. -/ +@[expose] public section + open Finset namespace BKLOK2 @@ -40,40 +38,33 @@ theorem exists_threshold_sq_le_exp {a : ℝ} (ha : 0 < a) {k : ℕ} (hk : 0 < k) have hkR : (0 : ℝ) < k := by exact_mod_cast hk set b : ℝ := a / (3 * k) with hb have hbpos : 0 < b := by positivity - have hbk : 3 * (b * (k : ℝ)) = a := by rw [hb]; field_simp refine ⟨⌈Real.exp a / b ^ 3⌉₊ + 1, ?_⟩ intro n hn - have hn1 : 1 ≤ n := le_trans (Nat.le_add_left 1 _) hn - have hnpos : (0 : ℝ) < n := by exact_mod_cast hn1 have hnge : Real.exp a / b ^ 3 ≤ (n : ℝ) := by - have h1 : Real.exp a / b ^ 3 ≤ (⌈Real.exp a / b ^ 3⌉₊ : ℝ) := Nat.le_ceil _ - have h2 : ((⌈Real.exp a / b ^ 3⌉₊ : ℕ) : ℝ) ≤ (n : ℝ) := by - exact_mod_cast le_trans (Nat.le_succ _) hn - linarith + exact (Nat.le_ceil _).trans (by exact_mod_cast le_trans (Nat.le_succ _) hn) have hbn : Real.exp a ≤ b ^ 3 * n := by - rw [div_le_iff₀ (by positivity)] at hnge - linarith + simpa only [mul_comm] using (div_le_iff₀ (pow_pos hbpos 3)).mp hnge have hcube : (b * n) ^ 3 ≤ Real.exp (a * (n : ℝ) / k) := by have h1 : b * n ≤ Real.exp (b * n) := by - have := Real.add_one_le_exp (b * (n : ℝ)); linarith + exact (le_add_of_nonneg_right zero_le_one).trans (Real.add_one_le_exp _) have h2 : (b * n) ^ 3 ≤ (Real.exp (b * (n : ℝ))) ^ 3 := pow_le_pow_left₀ (by positivity) h1 3 have h3 : (Real.exp (b * (n : ℝ))) ^ 3 = Real.exp (a * (n : ℝ) / k) := by - rw [← Real.exp_nat_mul] + rw [← Real.exp_nat_mul, hb] congr 1 - field_simp push_cast - nlinarith only [hbk] - linarith only [h3 ▸ h2] + field_simp + exact h3 ▸ h2 have hexp : Real.exp (a * ((n : ℝ) / k - 1)) = Real.exp (a * (n : ℝ) / k) / Real.exp a := by rw [← Real.exp_sub] congr 1 ring rw [hexp, le_div_iff₀ (Real.exp_pos a)] - have h4 : (n : ℝ) ^ 2 * Real.exp a ≤ (n : ℝ) ^ 2 * (b ^ 3 * n) := - mul_le_mul_of_nonneg_left hbn (by positivity) - have heq : (n : ℝ) ^ 2 * (b ^ 3 * n) = (b * n) ^ 3 := by ring - linarith [hcube] + calc + (n : ℝ) ^ 2 * Real.exp a ≤ (n : ℝ) ^ 2 * (b ^ 3 * n) := + mul_le_mul_of_nonneg_left hbn (sq_nonneg _) + _ = (b * n) ^ 3 := by ring + _ ≤ Real.exp (a * (n : ℝ) / k) := hcube /-! ### Parameter bookkeeping -/ @@ -110,7 +101,6 @@ theorem pot_empty_lt_of_hyps {V : Type} [DecidableEq V] {ρ t q : ℝ} {k s : (hiv : ∀ y ∈ W, (degTo H y U : ℝ) ≤ 2 * (k : ℝ) * ρ * (W.card : ℝ)) (hSsq : ((S.card : ℝ)) ^ 2 ≤ Real.exp (t * (W.card : ℝ))) : pot H W q ∅ U < 2 ^ (s + 1) := by - have hWnn : (0 : ℝ) ≤ (W.card : ℝ) := by positivity have hTW : 0 ≤ t * (W.card : ℝ) := by positivity set E : ℝ := Real.exp (4 * (t * (W.card : ℝ)) / 9) with hE have hEpos : 0 < E := Real.exp_pos _ @@ -119,20 +109,19 @@ theorem pot_empty_lt_of_hyps {V : Type} [DecidableEq V] {ρ t q : ℝ} {k s : intro x hx y hy have h0 : usedCnt H W ∅ x y = 0 := by simp [usedCnt, edgesIn, edeg] rw [h0, pow_zero, one_mul] - have hle : 1 + q ≤ Real.exp q := by linarith only [Real.add_one_le_exp q] + have hle : 1 + q ≤ Real.exp q := by + simpa only [add_comm] using Real.add_one_le_exp q have h1 : (1 + q) ^ degTo H y U ≤ (Real.exp q) ^ degTo H y U := - pow_le_pow_left₀ (by linarith) hle _ + pow_le_pow_left₀ (add_nonneg zero_le_one hqpos.le) hle _ have h2 : (Real.exp q) ^ degTo H y U = Real.exp (q * (degTo H y U : ℝ)) := by - rw [← Real.exp_nat_mul] - ring_nf + rw [← Real.exp_nat_mul, mul_comm] have h3 : q * (degTo H y U : ℝ) ≤ 4 * (t * (W.card : ℝ)) / 9 := by have hyW : y ∈ W := nbhdIn_subset H x W hy - have hd := hiv y hyW have hqe : q * (2 * (k : ℝ) * ρ * (W.card : ℝ)) = 4 * (t * (W.card : ℝ)) / 9 := by rw [hq, hts] field_simp ring - nlinarith [hqpos] + exact (mul_le_mul_of_nonneg_left (hiv y hyW) hqpos.le).trans_eq hqe calc (1 + q) ^ degTo H y U ≤ Real.exp (q * (degTo H y U : ℝ)) := by rw [← h2]; exact h1 _ ≤ E := by rw [hE]; exact Real.exp_le_exp.2 h3 @@ -141,14 +130,14 @@ theorem pot_empty_lt_of_hyps {V : Type} [DecidableEq V] {ρ t q : ℝ} {k s : ∑ y ∈ nbhdIn H x W, (2 : ℝ) ^ usedCnt H W ∅ x y * (1 + q) ^ degTo H y U ≤ (S.card : ℝ) * E := by intro x hx - have h1 : ∑ y ∈ nbhdIn H x W, - (2 : ℝ) ^ usedCnt H W ∅ x y * (1 + q) ^ degTo H y U ≤ - ∑ _y ∈ nbhdIn H x W, E := Finset.sum_le_sum (fun y hy => hterm x hx y hy) - have h2 : ∑ _y ∈ nbhdIn H x W, E = (nbhdIn H x W).card * E := by - rw [Finset.sum_const, nsmul_eq_mul] - have h3 : ((nbhdIn H x W).card : ℝ) ≤ (S.card : ℝ) := by - exact_mod_cast Finset.card_le_card ((nbhdIn_subset H x W).trans hWS) - nlinarith [hEpos] + calc + ∑ y ∈ nbhdIn H x W, + (2 : ℝ) ^ usedCnt H W ∅ x y * (1 + q) ^ degTo H y U + ≤ (nbhdIn H x W).card * E := by + simpa only [nsmul_eq_mul] using + Finset.sum_le_card_nsmul (nbhdIn H x W) _ E (hterm x hx) + _ ≤ (S.card : ℝ) * E := mul_le_mul_of_nonneg_right + (by exact_mod_cast Finset.card_le_card ((nbhdIn_subset H x W).trans hWS)) hEpos.le have h6 : (U.card : ℝ) ≤ (S.card : ℝ) := by exact_mod_cast Finset.card_le_card hUS calc pot H W q ∅ U ≤ ∑ _x ∈ U, (S.card : ℝ) * E := Finset.sum_le_sum hinner @@ -166,12 +155,12 @@ theorem pot_empty_lt_of_hyps {V : Type} [DecidableEq V] {ρ t q : ℝ} {k s : have hA : 9 * (k : ℝ) * t * (W.card : ℝ) * Real.log 2 < ((s : ℝ) + 1) * Real.log 2 := mul_lt_mul_of_pos_right hfloor (by linarith) have hkl : (1.5 : ℝ) ≤ 9 * (k : ℝ) * Real.log 2 := by nlinarith only [hlog, hk1] - have hB : 1.5 * (t * (W.card : ℝ)) ≤ - (9 * (k : ℝ) * Real.log 2) * (t * (W.card : ℝ)) := - mul_le_mul_of_nonneg_right hkl hTW - have hC2 : (9 * (k : ℝ) * Real.log 2) * (t * (W.card : ℝ)) = - 9 * (k : ℝ) * t * (W.card : ℝ) * Real.log 2 := by ring - linarith + calc + 1.5 * (t * (W.card : ℝ)) ≤ + (9 * (k : ℝ) * Real.log 2) * (t * (W.card : ℝ)) := + mul_le_mul_of_nonneg_right hkl hTW + _ = 9 * (k : ℝ) * t * (W.card : ℝ) * Real.log 2 := by ring + _ < ((s : ℝ) + 1) * Real.log 2 := hA have hfin : ((S.card : ℝ)) ^ 2 * E < 2 ^ (s + 1) := by have hE' : E ≤ Real.exp (0.5 * (t * (W.card : ℝ))) := by rw [hE] @@ -180,12 +169,15 @@ theorem pot_empty_lt_of_hyps {V : Type} [DecidableEq V] {ρ t q : ℝ} {k s : Real.exp (t * (W.card : ℝ)) * Real.exp (0.5 * (t * (W.card : ℝ))) := mul_le_mul hSsq hE' hEpos.le (Real.exp_pos _).le have hB : Real.exp (t * (W.card : ℝ)) * Real.exp (0.5 * (t * (W.card : ℝ))) = - Real.exp (1.5 * (t * (W.card : ℝ))) := by rw [← Real.exp_add]; ring_nf + Real.exp (1.5 * (t * (W.card : ℝ))) := by + rw [← Real.exp_add] + congr 1 + ring rw [h2s] calc ((S.card : ℝ)) ^ 2 * E ≤ Real.exp (1.5 * (t * (W.card : ℝ))) := by rw [← hB]; exact hA _ < Real.exp (((s : ℝ) + 1) * Real.log 2) := Real.exp_lt_exp.2 hkey - linarith + exact hbound.trans_lt hfin /-! ### The `r = 2` simultaneous factor theorem -/ diff --git a/LeanPool/MinimumDegreeMatching/BKLOInfrastructure.lean b/LeanPool/MinimumDegreeMatching/BKLOInfrastructure.lean index 42bbe1732c..fd1343c9cb 100644 --- a/LeanPool/MinimumDegreeMatching/BKLOInfrastructure.lean +++ b/LeanPool/MinimumDegreeMatching/BKLOInfrastructure.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Juan Pablo Traverso Giannini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Juan Pablo Traverso Giannini, Aristotle -/ -import LeanPool.MinimumDegreeMatching.Spread -import Mathlib.Tactic.Order -import Mathlib.Tactic.Push +module +public import Mathlib.Data.Finset.Sym +import Mathlib.Tactic.Bound.Init +import Mathlib.Combinatorics.SimpleGraph.Init /-! # Finite edge-set infrastructure for BKLO Lemma 10.7 at `r = 2` @@ -15,6 +16,8 @@ matching theorem. It is extracted from the independently frozen Paper III develo separate from the theorem-facing API. -/ +@[expose] public section + open Finset namespace BKLOK2 diff --git a/LeanPool/MinimumDegreeMatching/BKLOSelection.lean b/LeanPool/MinimumDegreeMatching/BKLOSelection.lean index 6f185e3854..e90e6165b0 100644 --- a/LeanPool/MinimumDegreeMatching/BKLOSelection.lean +++ b/LeanPool/MinimumDegreeMatching/BKLOSelection.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Juan Pablo Traverso Giannini. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Juan Pablo Traverso Giannini, Aristotle -/ -import LeanPool.MinimumDegreeMatching.BKLOInfrastructure -import Mathlib.Basic.Real.Basic -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Order -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +module +public import LeanPool.MinimumDegreeMatching.BKLOInfrastructure +public import Mathlib.Basic.Real.Basic +import LeanPool.MinimumDegreeMatching.Spread +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.Ring.RingNF /-! # Deterministic simultaneous matching selection @@ -19,6 +23,8 @@ keeping all previously selected matching edges disjoint. This is the determinist the `r = 2` specialization of BKLO Lemma 10.7. -/ +@[expose] public section + open Finset namespace BKLOK2 diff --git a/LeanPool/MinimumDegreeMatching/Basic.lean b/LeanPool/MinimumDegreeMatching/Basic.lean index 1b744ad6a6..83c9e77bf8 100644 --- a/LeanPool/MinimumDegreeMatching/Basic.lean +++ b/LeanPool/MinimumDegreeMatching/Basic.lean @@ -3,6 +3,8 @@ Copyright (c) 2026 Juan Pablo Traverso Gianini and Aristotle contributors. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Juan Pablo Traverso Gianini, Aristotle -/ +module +public import Mathlib.Combinatorics.SimpleGraph.Matching import LeanPool.MinimumDegreeMatching.Spread /-! @@ -28,6 +30,8 @@ reduced to it by adjoining a universal apex vertex and deleting that vertex from perfect matching. Both public formulations therefore share one proof of the degree criterion. -/ +@[expose] public section + namespace SimpleGraph open Finset diff --git a/LeanPool/MinimumDegreeMatching/Spread.lean b/LeanPool/MinimumDegreeMatching/Spread.lean index e7438afda0..c00a31c09b 100644 --- a/LeanPool/MinimumDegreeMatching/Spread.lean +++ b/LeanPool/MinimumDegreeMatching/Spread.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Aristotle contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aristotle -/ -import Mathlib.Combinatorics.SimpleGraph.Matching +module +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Combinatorics.SimpleGraph.Matching /-! # Spread perfect matchings in Dirac graphs @@ -46,6 +48,8 @@ the matching could be augmented), so the partner involution injects the neighbou the complement of the neighbourhood of `v`, contradicting the degree hypothesis. -/ +@[expose] public section + open Finset namespace SimpleGraph diff --git a/LeanPool/MisereGames/AugmentedForm.lean b/LeanPool/MisereGames/AugmentedForm.lean index 8cb74f8de6..5247efeb9b 100644 --- a/LeanPool/MisereGames/AugmentedForm.lean +++ b/LeanPool/MisereGames/AugmentedForm.lean @@ -5,9 +5,10 @@ Authors: Alfie Davies, Tomasz Maciosowski -/ module -public import LeanPool.MisereGames.Form public import LeanPool.MisereGames.GameForm -public import LeanPool.MisereGames.Form.Misere.Outcome +public import Mathlib.Basic.Countable.Small +import Mathlib.Basic.UnivLE +import Mathlib.Tactic.Bound.Init /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/AugmentedForm/Lift.lean b/LeanPool/MisereGames/AugmentedForm/Lift.lean index 69659b3c0b..f57256b657 100644 --- a/LeanPool/MisereGames/AugmentedForm/Lift.lean +++ b/LeanPool/MisereGames/AugmentedForm/Lift.lean @@ -7,7 +7,7 @@ module public import LeanPool.MisereGames.AugmentedForm public import LeanPool.MisereGames.Form.Misere.Outcome -public import LeanPool.MisereGames.Form.Misere.Adjoint +public import LeanPool.MisereGames.Form.Adjoint /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Form.lean b/LeanPool/MisereGames/Form.lean index b193c9ab3a..d391efff65 100644 --- a/LeanPool/MisereGames/Form.lean +++ b/LeanPool/MisereGames/Form.lean @@ -6,16 +6,9 @@ Authors: Alfie Davies, Tomasz Maciosowski module public import LeanPool.MisereGames.OfSets -public import Mathlib.Logic.Small.Set -public import LeanPool.MisereGames.Mathlib.Small -public import LeanPool.MisereGames.Outcome -public import LeanPool.MisereGames.Player public import Mathlib.Algebra.Group.Pointwise.Set.Small -public import Mathlib.Algebra.Group.Pointwise.Set.Basic public import Mathlib.Algebra.CharZero.Defs -public import Mathlib.Data.Nat.Cast.Defs -public import Mathlib.Logic.Small.Defs -public import Mathlib.Order.SetNotation +import LeanPool.MisereGames.Mathlib.Small /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Form/Adjoint.lean b/LeanPool/MisereGames/Form/Adjoint.lean index 19803234e8..ddda10f3f4 100644 --- a/LeanPool/MisereGames/Form/Adjoint.lean +++ b/LeanPool/MisereGames/Form/Adjoint.lean @@ -6,6 +6,7 @@ Authors: Alfie Davies, Tomasz Maciosowski module public import LeanPool.MisereGames.Form.Short +import Mathlib.Data.Set.Finite.Range /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Form/Misere/Outcome.lean b/LeanPool/MisereGames/Form/Misere/Outcome.lean index 0acc75f4dd..ba2c94fd13 100644 --- a/LeanPool/MisereGames/Form/Misere/Outcome.lean +++ b/LeanPool/MisereGames/Form/Misere/Outcome.lean @@ -6,7 +6,9 @@ Authors: Alfie Davies, Tomasz Maciosowski module public import LeanPool.MisereGames.Form.Classes -public import LeanPool.MisereGames.Form.Birthday +public import LeanPool.MisereGames.Outcome +public meta import Mathlib.Tactic.ToDual +import LeanPool.MisereGames.Form.Birthday /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Form/Short.lean b/LeanPool/MisereGames/Form/Short.lean index 7782467660..464a5b7b84 100644 --- a/LeanPool/MisereGames/Form/Short.lean +++ b/LeanPool/MisereGames/Form/Short.lean @@ -5,9 +5,12 @@ Authors: Alfie Davies, Tomasz Maciosowski, Kim Morrison, Violeta Hernández Pala -/ module -public import LeanPool.MisereGames.GameForm.Birthday public import LeanPool.MisereGames.Form.Classes import Mathlib.Data.Fintype.Order +public import LeanPool.MisereGames.Form.Birthday +public import LeanPool.MisereGames.GameForm +import LeanPool.MisereGames.GameForm.Birthday +import Mathlib.Order.Lattice.Nat /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/GameForm.lean b/LeanPool/MisereGames/GameForm.lean index 73133f4768..cb0bdaa54f 100644 --- a/LeanPool/MisereGames/GameForm.lean +++ b/LeanPool/MisereGames/GameForm.lean @@ -5,16 +5,9 @@ Authors: Reid Barton, Mario Carneiro, Alfie Davies, contributors -/ module -public import LeanPool.MisereGames.Mathlib.Small -public import LeanPool.MisereGames.OfSets public import LeanPool.MisereGames.Form -public import Mathlib.Algebra.Group.Pointwise.Set.Small -public import Mathlib.Algebra.Order.Group.Nat -public import Mathlib.Algebra.Order.Group.Unbundled.Basic -public import Mathlib.Algebra.Ring.Int.Defs public import Mathlib.Data.QPF.Univariate.Basic -public import Mathlib.Logic.Small.Defs -public import Mathlib.Logic.Small.Set +import LeanPool.MisereGames.Mathlib.Small /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/GameForm/Birthday.lean b/LeanPool/MisereGames/GameForm/Birthday.lean index 76f165d980..ec56241f33 100644 --- a/LeanPool/MisereGames/GameForm/Birthday.lean +++ b/LeanPool/MisereGames/GameForm/Birthday.lean @@ -7,8 +7,6 @@ module public import LeanPool.MisereGames.Form.Birthday public import LeanPool.MisereGames.GameForm -public import LeanPool.MisereGames.Mathlib.NatOrdinal -public import Mathlib.Data.Set.Defs /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Literature/OnSumsOfPFreeFormsUnderMiserePlay.lean b/LeanPool/MisereGames/Literature/OnSumsOfPFreeFormsUnderMiserePlay.lean index 0a119a5cde..1ec11b8963 100644 --- a/LeanPool/MisereGames/Literature/OnSumsOfPFreeFormsUnderMiserePlay.lean +++ b/LeanPool/MisereGames/Literature/OnSumsOfPFreeFormsUnderMiserePlay.lean @@ -5,9 +5,8 @@ Authors: Tomasz Maciosowski -/ module -public import LeanPool.MisereGames.Misere.Comparison public import LeanPool.MisereGames.Misere.PFreeBlocking -public import LeanPool.MisereGames.Tactic.DocAlias +import LeanPool.MisereGames.Tactic.DocAlias /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Mathlib/NatOrdinal.lean b/LeanPool/MisereGames/Mathlib/NatOrdinal.lean index 4e186fce7f..0c19fc5429 100644 --- a/LeanPool/MisereGames/Mathlib/NatOrdinal.lean +++ b/LeanPool/MisereGames/Mathlib/NatOrdinal.lean @@ -5,9 +5,9 @@ Authors: Violeta Hernández Palacios -/ module -public import Mathlib.Order.Lattice.Nat -public import Mathlib.SetTheory.Ordinal.Family -import Mathlib.Tactic.Abel +public import Mathlib.SetTheory.Ordinal.Basic +import Mathlib.SetTheory.Ordinal.Family +import Mathlib.Tactic.NormNum.Basic /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Mathlib/SimpleGraph.lean b/LeanPool/MisereGames/Mathlib/SimpleGraph.lean index 755acfda16..80937c3627 100644 --- a/LeanPool/MisereGames/Mathlib/SimpleGraph.lean +++ b/LeanPool/MisereGames/Mathlib/SimpleGraph.lean @@ -5,9 +5,8 @@ Authors: Tomasz Maciosowski -/ module -public import Mathlib.Combinatorics.SimpleGraph.Basic -public import Mathlib.Combinatorics.SimpleGraph.Connectivity.Subgraph -public import Mathlib.Combinatorics.SimpleGraph.Finite +public import Mathlib.Combinatorics.SimpleGraph.Walk.Basic +import Mathlib.Tactic.Bound.Init /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Mathlib/Small.lean b/LeanPool/MisereGames/Mathlib/Small.lean index bd1eeb9545..43fe81717e 100644 --- a/LeanPool/MisereGames/Mathlib/Small.lean +++ b/LeanPool/MisereGames/Mathlib/Small.lean @@ -7,8 +7,6 @@ module public import Mathlib.Logic.Small.Defs import Mathlib.Logic.Small.Set -import Mathlib.Logic.Relation -import Mathlib.Order.SetNotation /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/Ambient.lean b/LeanPool/MisereGames/Misere/Ambient.lean index e43ec0091f..7c7f86f0bc 100644 --- a/LeanPool/MisereGames/Misere/Ambient.lean +++ b/LeanPool/MisereGames/Misere/Ambient.lean @@ -7,6 +7,7 @@ Authors: Alfie Davies, Tomasz Maciosowski module public import LeanPool.MisereGames.Misere.Separation +import Mathlib.Data.Set.Finite.Range /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/Comparison.lean b/LeanPool/MisereGames/Misere/Comparison.lean index 747859e672..1c3c1968f1 100644 --- a/LeanPool/MisereGames/Misere/Comparison.lean +++ b/LeanPool/MisereGames/Misere/Comparison.lean @@ -7,6 +7,7 @@ module public import LeanPool.MisereGames.Misere.Ambient public import LeanPool.MisereGames.Misere.Universe +public import LeanPool.MisereGames.Misere.Hereditary.MaintenanceProviso /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/DeadEnding.lean b/LeanPool/MisereGames/Misere/DeadEnding.lean index 407a0db55e..35684de064 100644 --- a/LeanPool/MisereGames/Misere/DeadEnding.lean +++ b/LeanPool/MisereGames/Misere/DeadEnding.lean @@ -6,9 +6,8 @@ Authors: Alfie Davies, Tomasz Maciosowski module public import LeanPool.MisereGames.Misere.Comparison -public import LeanPool.MisereGames.Misere.PFree -public import LeanPool.MisereGames.Misere.Universe public import LeanPool.MisereGames.Misere.OutcomeStable.PropertyX +import Mathlib.Algebra.Ring.Int.Defs /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/Hereditary/MaintenanceProviso.lean b/LeanPool/MisereGames/Misere/Hereditary/MaintenanceProviso.lean index 2f5157780f..3471e1de8b 100644 --- a/LeanPool/MisereGames/Misere/Hereditary/MaintenanceProviso.lean +++ b/LeanPool/MisereGames/Misere/Hereditary/MaintenanceProviso.lean @@ -7,6 +7,7 @@ module public import LeanPool.MisereGames.Form.Misere.Outcome public import LeanPool.MisereGames.GameForm +import Mathlib.Tactic.Bound.Init /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/LiftIncomparable.lean b/LeanPool/MisereGames/Misere/LiftIncomparable.lean index 8c3ca3b7c3..5bc7caa6b1 100644 --- a/LeanPool/MisereGames/Misere/LiftIncomparable.lean +++ b/LeanPool/MisereGames/Misere/LiftIncomparable.lean @@ -6,7 +6,8 @@ Authors: Tomasz Maciosowski module public import LeanPool.MisereGames.AugmentedForm.Lift -public import LeanPool.MisereGames.Misere.Comparison +public import LeanPool.MisereGames.Misere.Universe +import LeanPool.MisereGames.Misere.Comparison /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/NonInvertible.lean b/LeanPool/MisereGames/Misere/NonInvertible.lean index 5c2f99351b..53cf4a6e22 100644 --- a/LeanPool/MisereGames/Misere/NonInvertible.lean +++ b/LeanPool/MisereGames/Misere/NonInvertible.lean @@ -6,8 +6,9 @@ Authors: Tomasz Maciosowski module public import LeanPool.MisereGames.Form.Misere.Outcome -public import LeanPool.MisereGames.Form.Misere.Adjoint import Mathlib.Data.Set.Finite.Range +public import LeanPool.MisereGames.Form.Short +import LeanPool.MisereGames.Form.Misere.Adjoint /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/Normal.lean b/LeanPool/MisereGames/Misere/Normal.lean index 7e83927365..634b912599 100644 --- a/LeanPool/MisereGames/Misere/Normal.lean +++ b/LeanPool/MisereGames/Misere/Normal.lean @@ -8,8 +8,7 @@ module public import LeanPool.MisereGames.AugmentedForm public import LeanPool.MisereGames.Misere.Comparison public import LeanPool.MisereGames.Misere.Quotients -public import Mathlib.Algebra.Group.Subgroup.Basic -public import Mathlib.Algebra.Group.Units.Basic +public import Mathlib.Algebra.Group.Subgroup.Defs /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/OutcomeStable.lean b/LeanPool/MisereGames/Misere/OutcomeStable.lean index ded100b033..b5fcb7a53d 100644 --- a/LeanPool/MisereGames/Misere/OutcomeStable.lean +++ b/LeanPool/MisereGames/Misere/OutcomeStable.lean @@ -7,6 +7,8 @@ module public import LeanPool.MisereGames.Misere.PFree public import LeanPool.MisereGames.Misere.TippingPoints +import Mathlib.Algebra.Ring.Int.Defs +import Mathlib.Data.Nat.SuccPred /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/OutcomeStable/PropertyX.lean b/LeanPool/MisereGames/Misere/OutcomeStable/PropertyX.lean index 3a0acdd981..ea569d17c4 100644 --- a/LeanPool/MisereGames/Misere/OutcomeStable/PropertyX.lean +++ b/LeanPool/MisereGames/Misere/OutcomeStable/PropertyX.lean @@ -6,6 +6,7 @@ Authors: Tomasz Maciosowski module public import LeanPool.MisereGames.Misere.IntegerInvertible +import Mathlib.Algebra.Order.Group.Nat /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/PFree.lean b/LeanPool/MisereGames/Misere/PFree.lean index a30ccaa4de..1ac1767ca8 100644 --- a/LeanPool/MisereGames/Misere/PFree.lean +++ b/LeanPool/MisereGames/Misere/PFree.lean @@ -5,9 +5,9 @@ Authors: Alfie Davies, Tomasz Maciosowski -/ module -public import LeanPool.MisereGames.Form.Misere.Outcome -public import LeanPool.MisereGames.GameForm public import LeanPool.MisereGames.Misere.Hereditary.MaintenanceProviso +import LeanPool.MisereGames.Form.Birthday +import Mathlib.Algebra.Ring.Int.Defs /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/PFreeDeadEnding.lean b/LeanPool/MisereGames/Misere/PFreeDeadEnding.lean index 0b3a29e5c2..65d0b33bc6 100644 --- a/LeanPool/MisereGames/Misere/PFreeDeadEnding.lean +++ b/LeanPool/MisereGames/Misere/PFreeDeadEnding.lean @@ -6,6 +6,8 @@ Authors: Tomasz Maciosowski module public import LeanPool.MisereGames.Misere.DeadEnding +import Mathlib.Algebra.Ring.Int.Defs +import Mathlib.Order.Lattice.Nat /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/Quotients.lean b/LeanPool/MisereGames/Misere/Quotients.lean index 91af403ce0..f795fcacff 100644 --- a/LeanPool/MisereGames/Misere/Quotients.lean +++ b/LeanPool/MisereGames/Misere/Quotients.lean @@ -5,8 +5,9 @@ Authors: Alfie Davies, Tomasz Maciosowski -/ module -public import LeanPool.MisereGames.Misere.Universe public import Mathlib.Algebra.Order.Monoid.Defs +public import LeanPool.MisereGames.Form.Misere.Outcome +import Mathlib.Tactic.Bound.Init /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/Separation.lean b/LeanPool/MisereGames/Misere/Separation.lean index 9c3be5a189..7dd4ec5210 100644 --- a/LeanPool/MisereGames/Misere/Separation.lean +++ b/LeanPool/MisereGames/Misere/Separation.lean @@ -6,7 +6,6 @@ Authors: Alfie Davies module public import LeanPool.MisereGames.Form.Misere.Adjoint -public import LeanPool.MisereGames.Misere.Hereditary.MaintenanceProviso /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/ShortIncomparable.lean b/LeanPool/MisereGames/Misere/ShortIncomparable.lean index 6cae926d88..48e8977c96 100644 --- a/LeanPool/MisereGames/Misere/ShortIncomparable.lean +++ b/LeanPool/MisereGames/Misere/ShortIncomparable.lean @@ -6,9 +6,11 @@ Authors: Tomasz Maciosowski module import LeanPool.MisereGames.AugmentedForm.Short -public import LeanPool.MisereGames.AugmentedForm.Lift -public import LeanPool.MisereGames.Misere.Comparison -import LeanPool.MisereGames.Misere.LiftIncomparable -- for docs +public import LeanPool.MisereGames.AugmentedForm +public import LeanPool.MisereGames.Form.Adjoint +public import LeanPool.MisereGames.Form.Misere.Outcome +public import LeanPool.MisereGames.Misere.Universe +import LeanPool.MisereGames.Misere.Comparison /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/Stride.lean b/LeanPool/MisereGames/Misere/Stride.lean index 78850f1dc9..f3ce8b0e36 100644 --- a/LeanPool/MisereGames/Misere/Stride.lean +++ b/LeanPool/MisereGames/Misere/Stride.lean @@ -5,13 +5,11 @@ Authors: Tomasz Maciosowski -/ module -public import LeanPool.MisereGames.GameForm -public import LeanPool.MisereGames.Form.Misere.Outcome -public import LeanPool.MisereGames.Misere.PFree public import LeanPool.MisereGames.Misere.DeadEnding public import LeanPool.MisereGames.Misere.Quotients -public import LeanPool.MisereGames.Misere.Closures public import LeanPool.MisereGames.Ruleset +import Mathlib.Algebra.Order.Group.Nat +import Mathlib.Algebra.Ring.Int.Defs /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/TippingPoints.lean b/LeanPool/MisereGames/Misere/TippingPoints.lean index 5935ba15e2..abd269d204 100644 --- a/LeanPool/MisereGames/Misere/TippingPoints.lean +++ b/LeanPool/MisereGames/Misere/TippingPoints.lean @@ -7,6 +7,7 @@ module public import LeanPool.MisereGames.Form.Misere.Outcome public import LeanPool.MisereGames.Form.Short +import Mathlib.Algebra.Order.Group.Nat /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Misere/Universe.lean b/LeanPool/MisereGames/Misere/Universe.lean index 0e86b7dedd..21be41b6e2 100644 --- a/LeanPool/MisereGames/Misere/Universe.lean +++ b/LeanPool/MisereGames/Misere/Universe.lean @@ -6,10 +6,8 @@ Authors: Alfie Davies, Tomasz Maciosowski module public import LeanPool.MisereGames.Misere.Closures -public import LeanPool.MisereGames.Misere.Hereditary.MaintenanceProviso -public import Mathlib.Data.Set.Finite.Lattice public import Mathlib.Order.CompleteLatticeIntervals -public import Mathlib.Order.Directed +import Mathlib.Data.Set.Finite.Lattice /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Outcome.lean b/LeanPool/MisereGames/Outcome.lean index aefb7c4a0d..118b59ff93 100644 --- a/LeanPool/MisereGames/Outcome.lean +++ b/LeanPool/MisereGames/Outcome.lean @@ -6,7 +6,6 @@ Authors: Tomasz Maciosowski module public import LeanPool.MisereGames.Player -public import Mathlib.Order.Defs.PartialOrder /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Player.lean b/LeanPool/MisereGames/Player.lean index 726e20bea5..a917c05639 100644 --- a/LeanPool/MisereGames/Player.lean +++ b/LeanPool/MisereGames/Player.lean @@ -5,9 +5,7 @@ Authors: Yuyang Zhao -/ module -public import Mathlib.Data.Fintype.Defs public import Mathlib.Data.Fintype.OfMap -import Mathlib.Tactic.DeriveFintype public import Mathlib.Algebra.Group.Defs /-! diff --git a/LeanPool/MisereGames/Ruleset/Hackenbush.lean b/LeanPool/MisereGames/Ruleset/Hackenbush.lean index 4cff1e186f..e5060ac1c3 100644 --- a/LeanPool/MisereGames/Ruleset/Hackenbush.lean +++ b/LeanPool/MisereGames/Ruleset/Hackenbush.lean @@ -7,10 +7,15 @@ module public import LeanPool.MisereGames.GameGraph public import LeanPool.MisereGames.Misere.Stride -public import LeanPool.MisereGames.Mathlib.SimpleGraph -import Mathlib.Tactic.Cases -import Mathlib.Tactic.NormNum -import Mathlib.Order.RelClasses +public import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected +import LeanPool.MisereGames.Mathlib.SimpleGraph +import Mathlib.Data.Nat.SuccPred +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Ruleset/Strip.lean b/LeanPool/MisereGames/Ruleset/Strip.lean index 6d8993bb6c..80a9aeed55 100644 --- a/LeanPool/MisereGames/Ruleset/Strip.lean +++ b/LeanPool/MisereGames/Ruleset/Strip.lean @@ -9,9 +9,12 @@ public import LeanPool.MisereGames.GameGraph public import LeanPool.MisereGames.Misere.Stride import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.Order.BigOperators.Group.Finset -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.Cases -import Mathlib.Tactic.Linarith +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! Misere combinatorial games. diff --git a/LeanPool/MisereGames/Tactic/DocAlias.lean b/LeanPool/MisereGames/Tactic/DocAlias.lean index 98b1f9f972..e11f350a7d 100644 --- a/LeanPool/MisereGames/Tactic/DocAlias.lean +++ b/LeanPool/MisereGames/Tactic/DocAlias.lean @@ -6,7 +6,7 @@ Authors: Alfie Davies module public meta import Lean.Elab.Command -public meta import Batteries.Tactic.Alias +import Batteries.Tactic.Alias /-! # The `doc_alias` command diff --git a/LeanPool/Monlib4.lean b/LeanPool/Monlib4.lean index 950717ccaa..b0579bf293 100644 --- a/LeanPool/Monlib4.lean +++ b/LeanPool/Monlib4.lean @@ -3,8 +3,22 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.Monlib +public import LeanPool.Monlib4.QuantumGraph.Basic + +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul + +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic + +public import LeanPool.Monlib4.RepTheory.AutMat + +public import LeanPool.Monlib4.Monlib +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Tactic.Measurability.Init +import Mathlib.Tactic.NormNum.GCD /-! # Monlib4 Operator-Algebra and Quantum-Set Core @@ -17,6 +31,8 @@ Tags: linear-algebra, operator-algebras, quantum-sets, quantum-graphs, represent MSC: 15A69, 16W20 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Monlib4/LinearAlgebra.lean b/LeanPool/Monlib4/LinearAlgebra.lean index c63470d122..0602b591dd 100644 --- a/LeanPool/Monlib4/LinearAlgebra.lean +++ b/LeanPool/Monlib4/LinearAlgebra.lean @@ -3,33 +3,36 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.Coalgebra -import LeanPool.Monlib4.LinearAlgebra.DirectSumFromTo -import LeanPool.Monlib4.LinearAlgebra.End -import LeanPool.Monlib4.LinearAlgebra.InnerAut -import LeanPool.Monlib4.LinearAlgebra.InvariantSubmodule -import LeanPool.Monlib4.LinearAlgebra.Ips -import LeanPool.Monlib4.LinearAlgebra.IsProjPrime -import LeanPool.Monlib4.LinearAlgebra.IsReal -import LeanPool.Monlib4.LinearAlgebra.KroneckerToTensor -import LeanPool.Monlib4.LinearAlgebra.LinearMapOp -import LeanPool.Monlib4.LinearAlgebra.LmulRmul -import LeanPool.Monlib4.LinearAlgebra.Matrix -import LeanPool.Monlib4.LinearAlgebra.MulPrimePrime -import LeanPool.Monlib4.LinearAlgebra.MyBimodule -import LeanPool.Monlib4.LinearAlgebra.MySpec -import LeanPool.Monlib4.LinearAlgebra.Nacgor -import LeanPool.Monlib4.LinearAlgebra.OfNorm -import LeanPool.Monlib4.LinearAlgebra.PiDirectSum -import LeanPool.Monlib4.LinearAlgebra.PiStarOrderedRing -import LeanPool.Monlib4.LinearAlgebra.PosMapIsReal -import LeanPool.Monlib4.LinearAlgebra.QuantumSet -import LeanPool.Monlib4.LinearAlgebra.TensorProduct -import LeanPool.Monlib4.LinearAlgebra.ToMatrixOfEquiv +public import LeanPool.Monlib4.LinearAlgebra.Coalgebra +public import LeanPool.Monlib4.LinearAlgebra.DirectSumFromTo +public import LeanPool.Monlib4.LinearAlgebra.End +public import LeanPool.Monlib4.LinearAlgebra.InnerAut +public import LeanPool.Monlib4.LinearAlgebra.InvariantSubmodule +public import LeanPool.Monlib4.LinearAlgebra.Ips +public import LeanPool.Monlib4.LinearAlgebra.IsProjPrime +public import LeanPool.Monlib4.LinearAlgebra.IsReal +public import LeanPool.Monlib4.LinearAlgebra.KroneckerToTensor +public import LeanPool.Monlib4.LinearAlgebra.LinearMapOp +public import LeanPool.Monlib4.LinearAlgebra.LmulRmul +public import LeanPool.Monlib4.LinearAlgebra.Matrix +public import LeanPool.Monlib4.LinearAlgebra.MulPrimePrime +public import LeanPool.Monlib4.LinearAlgebra.MyBimodule +public import LeanPool.Monlib4.LinearAlgebra.MySpec +public import LeanPool.Monlib4.LinearAlgebra.Nacgor +public import LeanPool.Monlib4.LinearAlgebra.OfNorm +public import LeanPool.Monlib4.LinearAlgebra.PiDirectSum +public import LeanPool.Monlib4.LinearAlgebra.PiStarOrderedRing +public import LeanPool.Monlib4.LinearAlgebra.PosMapIsReal +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet +public import LeanPool.Monlib4.LinearAlgebra.TensorProduct +public import LeanPool.Monlib4.LinearAlgebra.ToMatrixOfEquiv /-! # LinearAlgebra Import-only index for the `LinearAlgebra` directory of the monlib4 import. -/ + +@[expose] public section diff --git a/LeanPool/Monlib4/LinearAlgebra/Coalgebra.lean b/LeanPool/Monlib4/LinearAlgebra/Coalgebra.lean index ab5bf3c1b5..913e8bd2e3 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Coalgebra.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Coalgebra.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.Coalgebra.FiniteDimensional -import LeanPool.Monlib4.LinearAlgebra.Coalgebra.Lemmas -import LeanPool.Monlib4.LinearAlgebra.Coalgebra.MulOpposite +public import LeanPool.Monlib4.LinearAlgebra.Coalgebra.FiniteDimensional +public import LeanPool.Monlib4.LinearAlgebra.Coalgebra.Lemmas +public import LeanPool.Monlib4.LinearAlgebra.Coalgebra.MulOpposite +import Mathlib.Tactic.Positivity.Finset /-! # Coalgebra @@ -14,3 +16,5 @@ import LeanPool.Monlib4.LinearAlgebra.Coalgebra.MulOpposite Import-only index for the `LinearAlgebra/Coalgebra` directory of the monlib4 import. -/ + +@[expose] public section diff --git a/LeanPool/Monlib4/LinearAlgebra/Coalgebra/FiniteDimensional.lean b/LeanPool/Monlib4/LinearAlgebra/Coalgebra/FiniteDimensional.lean index ad6298821f..684c1ca5f0 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Coalgebra/FiniteDimensional.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Coalgebra/FiniteDimensional.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.Coalgebra.Lemmas -import Mathlib.RingTheory.Coalgebra.Equiv -import Mathlib.Analysis.InnerProductSpace.Basic -import LeanPool.Monlib4.LinearAlgebra.Nacgor +public import LeanPool.Monlib4.LinearAlgebra.Coalgebra.Lemmas +public import LeanPool.Monlib4.LinearAlgebra.Nacgor +public import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne +public import Mathlib.Analysis.InnerProductSpace.TensorProduct import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert -import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne import LeanPool.Monlib4.LinearAlgebra.MulPrimePrime +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas +import Mathlib.RingTheory.Coalgebra.CoassocSimps +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.Monlib4.LinearAlgebra.Coalgebra.FiniteDimensional @@ -18,6 +21,8 @@ import LeanPool.Monlib4.LinearAlgebra.MulPrimePrime Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.Coalgebra.FiniteDimensional`. -/ +@[expose] public section + variable {R A : Type*} local notation "lT" => LinearMap.lTensor local notation "rT" => LinearMap.rTensor diff --git a/LeanPool/Monlib4/LinearAlgebra/Coalgebra/Lemmas.lean b/LeanPool/Monlib4/LinearAlgebra/Coalgebra/Lemmas.lean index 9e7f6891c7..ef70b71810 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Coalgebra/Lemmas.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Coalgebra/Lemmas.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import Mathlib.RingTheory.Coalgebra.Basic +public import Mathlib.RingTheory.Coalgebra.Basic +public import Mathlib.Algebra.Algebra.Bilinear import Mathlib.RingTheory.Coalgebra.CoassocSimps -import Mathlib.Algebra.Algebra.Bilinear -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas /-! # LeanPool.Monlib4.LinearAlgebra.Coalgebra.Lemmas @@ -15,6 +15,8 @@ import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.Coalgebra.Lemmas`. -/ +@[expose] public section + theorem TensorProduct.map_left_up {R A B C D : Type*} [CommSemiring R] [AddCommMonoid A] [AddCommMonoid B] [AddCommMonoid C] [AddCommMonoid D] diff --git a/LeanPool/Monlib4/LinearAlgebra/Coalgebra/MulOpposite.lean b/LeanPool/Monlib4/LinearAlgebra/Coalgebra/MulOpposite.lean index ed37fef5c3..b283c23e37 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Coalgebra/MulOpposite.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Coalgebra/MulOpposite.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Lemmas -import LeanPool.Monlib4.LinearAlgebra.LinearMapOp +public import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Lemmas +public import LeanPool.Monlib4.LinearAlgebra.LinearMapOp +public import Mathlib.RingTheory.Coalgebra.Basic import LeanPool.Monlib4.LinearAlgebra.Coalgebra.Lemmas -import Mathlib.LinearAlgebra.TensorProduct.Opposite +import Mathlib.RingTheory.Coalgebra.CoassocSimps /-! # LeanPool.Monlib4.LinearAlgebra.Coalgebra.MulOpposite @@ -15,6 +17,8 @@ import Mathlib.LinearAlgebra.TensorProduct.Opposite Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.Coalgebra.MulOpposite`. -/ +@[expose] public section + open scoped TensorProduct /-- The tensor product of multiplicative opposites as the opposite of a tensor product. -/ @@ -208,7 +212,7 @@ noncomputable def MulOpposite.coalgebra {R A : Type*} [CommSemiring R] [AddCommMonoid A] [Module R A] [Coalgebra R A] : Coalgebra R Aᵐᵒᵖ where - coassoc := MulOpposite_coassoc + coassoc := by exact MulOpposite_coassoc rTensor_counit_comp_comul := by rw [comul_def', counit_def, ← LinearMap.comp_assoc, LinearMap.rTensor_comp_map, LinearMap.comp_assoc, diff --git a/LeanPool/Monlib4/LinearAlgebra/DirectSumFromTo.lean b/LeanPool/Monlib4/LinearAlgebra/DirectSumFromTo.lean index 982d39c15b..aa6e5aa38d 100644 --- a/LeanPool/Monlib4/LinearAlgebra/DirectSumFromTo.lean +++ b/LeanPool/Monlib4/LinearAlgebra/DirectSumFromTo.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Algebra.Algebra.Pi -import Mathlib.LinearAlgebra.Pi +module + +public import Mathlib.LinearAlgebra.Pi -- import Mathlib.LinearAlgebra.ProjectiveSpace.Basic -import LeanPool.Monlib4.Preq.Ites +import Mathlib.Tactic.NormNum.Basic /-! @@ -16,6 +17,8 @@ import LeanPool.Monlib4.Preq.Ites -/ +@[expose] public section + /-- Composition of the `i`-th injection and the `j`-th projection of a dependent direct sum, giving a linear map `M₁ i →ₗ[R] M₁ j`. -/ diff --git a/LeanPool/Monlib4/LinearAlgebra/End.lean b/LeanPool/Monlib4/LinearAlgebra/End.lean index fe7888650a..d59a712fc5 100644 --- a/LeanPool/Monlib4/LinearAlgebra/End.lean +++ b/LeanPool/Monlib4/LinearAlgebra/End.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.LinearAlgebra.Eigenspace.Basic +module + +public import Mathlib.LinearAlgebra.Eigenspace.Basic /-! # Some obvious lemmas on module.End @@ -11,6 +13,8 @@ import Mathlib.LinearAlgebra.Eigenspace.Basic This file contains some obvious lemmas on `module.End`. -/ +@[expose] public section + open scoped BigOperators diff --git a/LeanPool/Monlib4/LinearAlgebra/InnerAut.lean b/LeanPool/Monlib4/LinearAlgebra/InnerAut.lean index 90134fd2f9..348a6a176a 100644 --- a/LeanPool/Monlib4/LinearAlgebra/InnerAut.lean +++ b/LeanPool/Monlib4/LinearAlgebra/InnerAut.lean @@ -3,17 +3,16 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module +public import LeanPool.Monlib4.LinearAlgebra.Matrix.IsAlmostHermitian +public import Mathlib.Analysis.Matrix.Spectrum +public import Mathlib.LinearAlgebra.Matrix.PosDef +import LeanPool.Monlib4.LinearAlgebra.End import LeanPool.Monlib4.LinearAlgebra.MySpec -import LeanPool.Monlib4.LinearAlgebra.Matrix.Basic -import LeanPool.Monlib4.LinearAlgebra.Matrix.IsAlmostHermitian import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas import LeanPool.Monlib4.RepTheory.AutMat -import Mathlib.Algebra.Star.Pi -import Mathlib.Algebra.Star.UnitaryStarAlgAut import Mathlib.Analysis.Matrix.Order -import Mathlib.LinearAlgebra.Matrix.Hermitian -import Mathlib.LinearAlgebra.UnitaryGroup /-! # Inner Automorphisms @@ -25,6 +24,8 @@ names for the matrix-algebra specialization and its trace, spectrum, and Hermitian-preservation lemmas. -/ +@[expose] public section + open scoped ComplexOrder lemma RCLike.neg_ofReal {𝕜 : Type*} [RCLike 𝕜] (a : ℝ) : diff --git a/LeanPool/Monlib4/LinearAlgebra/InvariantSubmodule.lean b/LeanPool/Monlib4/LinearAlgebra/InvariantSubmodule.lean index 5aff52946f..9d792a0efa 100644 --- a/LeanPool/Monlib4/LinearAlgebra/InvariantSubmodule.lean +++ b/LeanPool/Monlib4/LinearAlgebra/InvariantSubmodule.lean @@ -3,11 +3,13 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import Mathlib.Basic.Complex.Basic -import Mathlib.LinearAlgebra.Projection -import Mathlib.LinearAlgebra.TensorProduct.Basic -import Mathlib.Topology.Algebra.StarSubalgebra +public import Mathlib.Basic.Complex.Basic +public import Mathlib.LinearAlgebra.Projection +public import Mathlib.Algebra.Star.Subalgebra +import Mathlib.Data.Rat.Floor +import Mathlib.Tactic.Continuity.Init /-! # Invariant submodules @@ -15,6 +17,8 @@ import Mathlib.Topology.Algebra.StarSubalgebra This file defines and proves basic results on invariant submodules. -/ +@[expose] public section + namespace Submodule variable {E R : Type _} [Ring R] [AddCommGroup E] [Module R E] diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips.lean b/LeanPool/Monlib4/LinearAlgebra/Ips.lean index 09a6a232a5..323e4b490f 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips.lean @@ -3,24 +3,28 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.Ips.Basic -import LeanPool.Monlib4.LinearAlgebra.Ips.Frob -import LeanPool.Monlib4.LinearAlgebra.Ips.Functional -import LeanPool.Monlib4.LinearAlgebra.Ips.Ips -import LeanPool.Monlib4.LinearAlgebra.Ips.MatIps -import LeanPool.Monlib4.LinearAlgebra.Ips.MinimalProj -import LeanPool.Monlib4.LinearAlgebra.Ips.MulOp -import LeanPool.Monlib4.LinearAlgebra.Ips.Nontracial -import LeanPool.Monlib4.LinearAlgebra.Ips.OpUnop -import LeanPool.Monlib4.LinearAlgebra.Ips.Pos -import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne -import LeanPool.Monlib4.LinearAlgebra.Ips.Strict -import LeanPool.Monlib4.LinearAlgebra.Ips.Symm -import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert -import LeanPool.Monlib4.LinearAlgebra.Ips.Vn +module + +public import LeanPool.Monlib4.LinearAlgebra.Ips.Basic +public import LeanPool.Monlib4.LinearAlgebra.Ips.Frob +public import LeanPool.Monlib4.LinearAlgebra.Ips.Functional +public import LeanPool.Monlib4.LinearAlgebra.Ips.Ips +public import LeanPool.Monlib4.LinearAlgebra.Ips.MatIps +public import LeanPool.Monlib4.LinearAlgebra.Ips.MinimalProj +public import LeanPool.Monlib4.LinearAlgebra.Ips.MulOp +public import LeanPool.Monlib4.LinearAlgebra.Ips.Nontracial +public import LeanPool.Monlib4.LinearAlgebra.Ips.OpUnop +public import LeanPool.Monlib4.LinearAlgebra.Ips.Pos +public import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne +public import LeanPool.Monlib4.LinearAlgebra.Ips.Strict +public import LeanPool.Monlib4.LinearAlgebra.Ips.Symm +public import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +public import LeanPool.Monlib4.LinearAlgebra.Ips.Vn /-! # LeanPool.Monlib4.LinearAlgebra.Ips Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.Ips`. -/ + +@[expose] public section diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/Basic.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/Basic.lean index 96dcada8fd..4f5f6d7967 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/Basic.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/Basic.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module + +public import Mathlib.Analysis.InnerProductSpace.Adjoint import LeanPool.Monlib4.LinearAlgebra.Ips.Symm import LeanPool.Monlib4.Preq.RCLikeLe @@ -14,6 +17,8 @@ This files provides some useful and obvious results for linear maps and continuo -/ +@[expose] public section + theorem _root_.ext_inner_left_iff {𝕜 E : Type _} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] (x y : E) : x = y ↔ ∀ v : E, inner 𝕜 x v = inner 𝕜 y v := by diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/Frob.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/Frob.lean index 0f30c98bb7..ed64f19d7c 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/Frob.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/Frob.lean @@ -3,11 +3,16 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert -import LeanPool.Monlib4.LinearAlgebra.Ips.Nontracial -import LeanPool.Monlib4.LinearAlgebra.DirectSumFromTo -import LeanPool.Monlib4.LinearAlgebra.PiDirectSum -import LeanPool.Monlib4.LinearAlgebra.Coalgebra.FiniteDimensional +module + +public import LeanPool.Monlib4.LinearAlgebra.PiDirectSum +public import LeanPool.Monlib4.LinearAlgebra.Ips.MatIps +public import LeanPool.Monlib4.LinearAlgebra.KroneckerToTensor +public import LeanPool.Monlib4.LinearAlgebra.Nacgor +import LeanPool.Monlib4.LinearAlgebra.MulPrimePrime +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas +import LeanPool.Monlib4.Preq.Dite +import LeanPool.Monlib4.Preq.Ites /-! # Frobenius equations @@ -15,6 +20,8 @@ import LeanPool.Monlib4.LinearAlgebra.Coalgebra.FiniteDimensional This file contains the proof of the Frobenius equations. -/ +@[expose] public section + variable {n p : Type _} [Fintype n] [Fintype p] [DecidableEq n] [DecidableEq p] {φ : Module.Dual ℂ (Matrix n n ℂ)} (hφ : φ.IsFaithfulPosMap) {ψ : Module.Dual ℂ (Matrix p p ℂ)} diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/Functional.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/Functional.lean index d37895e7dc..289d655cd5 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/Functional.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/Functional.lean @@ -3,12 +3,13 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.Matrix.PosEqLinearMapIsPositive +module + +public import LeanPool.Monlib4.LinearAlgebra.Matrix.IncludeBlock +public import LeanPool.Monlib4.LinearAlgebra.PosMapIsReal +import LeanPool.Monlib4.Preq.Dite +import LeanPool.Monlib4.Preq.Ites import LeanPool.Monlib4.Preq.RCLikeLe -import LeanPool.Monlib4.LinearAlgebra.IsReal -import LeanPool.Monlib4.LinearAlgebra.Matrix.IncludeBlock -import LeanPool.Monlib4.LinearAlgebra.PosMapIsReal -import LeanPool.Monlib4.LinearAlgebra.Matrix.Cast /-! @@ -26,6 +27,8 @@ This file contains results for linear functionals on the set of $n \times n$ mat -/ +@[expose] public section + open scoped Matrix BigOperators diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/Ips.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/Ips.lean index 54ffb2570c..8a42ae7cdb 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/Ips.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/Ips.lean @@ -3,10 +3,12 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.InvariantSubmodule -import Mathlib.Analysis.InnerProductSpace.Adjoint -import Mathlib.Analysis.InnerProductSpace.Spectrum -import LeanPool.Monlib4.LinearAlgebra.Ips.Symm +module + +public import LeanPool.Monlib4.LinearAlgebra.InvariantSubmodule +public import Mathlib.Analysis.InnerProductSpace.Adjoint +public import Mathlib.LinearAlgebra.Eigenspace.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Finite-dimensional inner product spaces @@ -21,6 +23,8 @@ and `↥P _` for the extended orthogonal projection `orthogonal_projection' _`. We let $V$ be an inner product space over $\mathbb{k}$. -/ +@[expose] public section + variable {V 𝕜 : Type _} [RCLike 𝕜] [NormedAddCommGroup V] [InnerProductSpace 𝕜 V] diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/MatIps.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/MatIps.lean index c95043b50a..d8626da812 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/MatIps.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/MatIps.lean @@ -3,12 +3,14 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.Ips.Functional -import LeanPool.Monlib4.LinearAlgebra.Matrix.PosDefRpow -import LeanPool.Monlib4.LinearAlgebra.MulPrimePrime +module + +public import LeanPool.Monlib4.LinearAlgebra.Ips.Functional +public import Mathlib.Analysis.InnerProductSpace.TensorProduct +import LeanPool.Monlib4.LinearAlgebra.End import LeanPool.Monlib4.LinearAlgebra.Ips.Basic -import LeanPool.Monlib4.LinearAlgebra.PiDirectSum -import LeanPool.Monlib4.LinearAlgebra.ToMatrixOfEquiv +import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas /-! @@ -18,6 +20,8 @@ This file contains some basic results on the inner product space on finite dimen -/ +@[expose] public section + open scoped TensorProduct @@ -566,19 +570,12 @@ protected theorem toMatrixLinEquiv_symm_apply (hφ : φ.IsFaithfulPosMap) (hψ : (x (i, j) (k, l) : ℂ) • | hψ.basis (i, j)⟩⟨ hφ.basis (k, l)|)) := by rw [IsFaithfulPosMap.toMatrixLinEquiv, LinearMap.ext_iff] intro a - simp_rw [LinearMap.toMatrix_symm, toLin_apply, mulVec, dotProduct, + simp only [LinearMap.toMatrix_symm, toLin_apply, mulVec, dotProduct, IsFaithfulPosMap.basis_repr_apply, ContinuousLinearMap.toLinearMap_sum, LinearMap.sum_apply, ContinuousLinearMap.toLinearMap_smul, LinearMap.smul_apply, ContinuousLinearMap.coe_coe, rankOne_apply, - IsFaithfulPosMap.basis_apply, Finset.sum_smul] - symm - repeat' - nth_rw 1 [← Finset.sum_product'] - rw [Finset.univ_product_univ] - apply Finset.sum_congr rfl - intro ij _ - simp_rw [smul_smul] + Finset.sum_smul, Fintype.sum_prod_type, smul_smul] @@ -1108,19 +1105,17 @@ theorem Qam.Nontracial.mul_comp_mul_adjoint [hφ : φ.IsFaithfulPosMap] : withMatrixInner[φ] (LinearMap.mul' ℂ ℍ ∘ₗ LinearMap.adjoint (LinearMap.mul' ℂ ℍ) = trace (φ.matrix⁻¹) • 1) := by mat_inner_instances φ - simp_rw [LinearMap.ext_iff, LinearMap.comp_apply] - intro x - simp_rw [← Matrix.ext_iff, LinearMap.mul'_adjoint, - map_sum, _root_.map_smul, LinearMap.mul'_apply, - Matrix.sum_apply, LinearMap.smul_apply, Matrix.smul_apply, - smul_eq_mul, Module.End.one_apply, mul_apply, single, of_apply, - boole_mul, Finset.mul_sum, mul_ite, MulZeroClass.mul_zero, mul_one, ite_and] - intro i j - simp only [Finset.sum_ite_irrel, Finset.sum_const_zero, Finset.sum_ite_eq, Finset.sum_ite_eq', - Finset.mem_univ, ite_true] - simp_rw [← Finset.mul_sum, ← trace_iff φ.matrix⁻¹, mul_comm] - - + ext x : 1 + simp only [LinearMap.comp_apply, LinearMap.mul'_adjoint, map_sum, _root_.map_smul, + LinearMap.mul'_apply, single_hMul, mul_one, ite_smul, one_smul, zero_smul, + smul_ite, smul_zero] + simp only [Finset.sum_ite_irrel, Finset.sum_const_zero, Finset.sum_ite_eq, + Finset.mem_univ, ite_true, LinearMap.smul_apply, Module.End.one_apply] + simp_rw [mul_comm (x _ _), mul_smul, ← Finset.smul_sum, ← Finset.sum_smul] + rw [← trace_iff, ← Finset.smul_sum] + congr 1 + simp only [Matrix.smul_single, smul_eq_mul, mul_one] + exact Matrix.sum_sum_single x theorem LinearMap.mulLeft_toMatrix (hφ : φ.IsFaithfulPosMap) (x : Matrix n n ℂ) : @@ -1287,14 +1282,9 @@ theorem LinearMap.pi_mul'_comp_mul'_adjoint [hψ : ∀ i, (ψ i).IsFaithfulPosMa lemma Matrix.smul_inj_mul_one {n : Type*} [DecidableEq n] [Nonempty n] (x y : ℂ) : x • (1 : Matrix n n ℂ) = y • (1 : Matrix n n ℂ) ↔ x = y := by - simp_rw [← Matrix.ext_iff, Matrix.smul_apply, Matrix.one_apply, smul_ite, - smul_zero, smul_eq_mul, mul_one] - constructor - · intro h - let i : n := Nonempty.some ‹_› - specialize h i i - simp_all - · simp_all + rw [smul_one_eq_diagonal, smul_one_eq_diagonal] + exact (diagonal_injective.comp Function.const_injective).eq_iff + open scoped Classical in omit [DecidableEq k] in diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/MinimalProj.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/MinimalProj.lean index b0b56225ff..88a6072351 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/MinimalProj.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/MinimalProj.lean @@ -3,16 +3,12 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.Ips.Pos -import LeanPool.Monlib4.LinearAlgebra.Ips.Ips -import LeanPool.Monlib4.LinearAlgebra.Ips.Symm -import LeanPool.Monlib4.RepTheory.AutMat -import LeanPool.Monlib4.LinearAlgebra.KroneckerToTensor -import Mathlib.LinearAlgebra.Matrix.Hermitian -import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne +module + +public import LeanPool.Monlib4.LinearAlgebra.Ips.Pos +public import LeanPool.Monlib4.LinearAlgebra.LmulRmul import LeanPool.Monlib4.LinearAlgebra.Ips.Basic -import LeanPool.Monlib4.LinearAlgebra.IsProjPrime -import Mathlib.Analysis.InnerProductSpace.Orthogonal +import LeanPool.Monlib4.LinearAlgebra.Ips.Ips /-! @@ -55,6 +51,8 @@ we finally have (i) if and only if (iv) for idempotent self-adjoint operators on -/ +@[expose] public section + open Module.End section diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/MulOp.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/MulOp.lean index 6609a8e341..015a364d49 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/MulOp.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/MulOp.lean @@ -3,13 +3,11 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Data.Opposite -import Mathlib.LinearAlgebra.FiniteDimensional.Basic -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Analysis.InnerProductSpace.MulOpposite -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Analysis.InnerProductSpace.Adjoint -import LeanPool.Monlib4.LinearAlgebra.LinearMapOp +module + +public import Mathlib.Analysis.InnerProductSpace.MulOpposite +public import Mathlib.Analysis.InnerProductSpace.Adjoint +public import LeanPool.Monlib4.LinearAlgebra.LinearMapOp /-! @@ -20,6 +18,8 @@ opposite inner product space. -/ +@[expose] public section + open Module diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/Nontracial.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/Nontracial.lean index 4868d3832f..e2951662d5 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/Nontracial.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/Nontracial.lean @@ -3,19 +3,18 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.MulPrimePrime -import LeanPool.Monlib4.LinearAlgebra.Matrix.PosDefRpow -import LeanPool.Monlib4.LinearAlgebra.InnerAut -import LeanPool.Monlib4.LinearAlgebra.Matrix.Reshape -import LeanPool.Monlib4.LinearAlgebra.ToMatrixOfEquiv -import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert -import LeanPool.Monlib4.LinearAlgebra.Ips.Functional -import LeanPool.Monlib4.LinearAlgebra.Ips.MatIps +module + +public import LeanPool.Monlib4.LinearAlgebra.Ips.MatIps +public import LeanPool.Monlib4.LinearAlgebra.Ips.OpUnop +public import LeanPool.Monlib4.LinearAlgebra.PiDirectSum +public import LeanPool.Monlib4.LinearAlgebra.KroneckerToTensor +public import LeanPool.Monlib4.LinearAlgebra.LmulRmul +public import Mathlib.LinearAlgebra.Basis.MulOpposite +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.Ips.Basic import LeanPool.Monlib4.LinearAlgebra.Ips.MulOp -import LeanPool.Monlib4.LinearAlgebra.Matrix.IncludeBlock -import LeanPool.Monlib4.LinearAlgebra.Ips.OpUnop -import LeanPool.Monlib4.LinearAlgebra.PiDirectSum -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas +import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert import LeanPool.Monlib4.Preq.Finset /-! @@ -27,6 +26,8 @@ This file contains some results on the Hilbert space on finite-dimensional C*-al -/ +@[expose] public section + variable {n : Type _} [Fintype n] @@ -582,7 +583,8 @@ theorem Pi.transposeAlgEquiv_symm_op_apply (A : PiMat ℂ k s) : (Pi.transposeAlgEquiv k s).symm (MulOpposite.op A) = fun i => (A i)ᵀ := rfl -private noncomputable def f₂_equiv : +/-- Distribute the tensor product of matrix families over pairs of indices. -/ +noncomputable def f₂Equiv : (PiMat ℂ k s) ⊗[ℂ] (PiMat ℂ k s) ≃ₐ[ℂ] (Π i : k × k, Matrix (s i.1) (s i.1) ℂ ⊗[ℂ] Matrix (s i.2) (s i.2) ℂ) := by let this := @@ -591,7 +593,8 @@ private noncomputable def f₂_equiv : (fun i => Matrix.instAlgebra) fun i => Matrix.instAlgebra exact this -private noncomputable def f₃_equiv : +/-- Identify each tensor product of matrix blocks with a matrix on product indices. -/ +noncomputable def f₃Equiv : (Π i : k × k, Matrix (s i.1) (s i.1) ℂ ⊗[ℂ] Matrix (s i.2) (s i.2) ℂ) ≃ₐ[ℂ] (Π i : k × k, Matrix (s i.1 × s i.2) (s i.1 × s i.2) ℂ) := by apply AlgEquiv.piCongrRight @@ -604,7 +607,7 @@ noncomputable def tensorProductMulOpEquiv : Matrix (s i.1 × s i.2) (s i.1 × s i.2) ℂ) := (AlgEquiv.TensorProduct.map (1 : PiMat ℂ k s ≃ₐ[ℂ] PiMat ℂ k s) (Pi.transposeAlgEquiv k s : PiMat ℂ k s ≃ₐ[ℂ] (PiMat ℂ k s)ᵐᵒᵖ).symm).trans - (f₂_equiv.trans f₃_equiv) + (f₂Equiv.trans f₃Equiv) /-- Inverse map underlying `psi` for faithful positive functionals on matrix-block products. -/ noncomputable def Module.Dual.pi.IsFaithfulPosMap.psiInvFun' diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/OpUnop.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/OpUnop.lean index e5f4a0228e..586fc702a0 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/OpUnop.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/OpUnop.lean @@ -3,11 +3,9 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.LinearAlgebra.TensorProduct.Basic -import Mathlib.Algebra.Algebra.Basic -import Mathlib.Data.Opposite -import Mathlib.Algebra.Star.Basic -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Lemmas +module + +public import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Lemmas /-! @@ -21,6 +19,8 @@ swaps the tensor factors while keeping the `ᵒᵖ` in place. -/ +@[expose] public section + variable {R A : Type _} [CommSemiring R] [AddCommMonoid A] [Module R A] diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/Pos.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/Pos.lean index 00a317e2c9..17810134e6 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/Pos.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/Pos.lean @@ -3,12 +3,13 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Analysis.InnerProductSpace.Adjoint -import Mathlib.Analysis.InnerProductSpace.Spectrum -import LeanPool.Monlib4.LinearAlgebra.InvariantSubmodule -import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne +module + +public import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne +public import Mathlib.Analysis.InnerProductSpace.Positive import LeanPool.Monlib4.LinearAlgebra.End -import Mathlib.Analysis.InnerProductSpace.Positive +import LeanPool.Monlib4.LinearAlgebra.InvariantSubmodule +import LeanPool.Monlib4.LinearAlgebra.Ips.Basic import LeanPool.Monlib4.Preq.RCLikeLe /-! @@ -27,6 +28,8 @@ for linear maps: -/ +@[expose] public section + open InnerProductSpace RCLike open scoped InnerProduct ComplexConjugate diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/RankOne.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/RankOne.lean index 0703c0e8ce..d7b6e68901 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/RankOne.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/RankOne.lean @@ -3,9 +3,11 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Analysis.InnerProductSpace.Adjoint +module + +public import Mathlib.Analysis.InnerProductSpace.Adjoint +public import LeanPool.Monlib4.LinearAlgebra.IsProjPrime import LeanPool.Monlib4.LinearAlgebra.Ips.Basic -import LeanPool.Monlib4.LinearAlgebra.IsProjPrime /-! @@ -16,6 +18,8 @@ This defines the rank one operator $| x \rangle\langle y |$ for continuous linea -/ +@[expose] public section + section rankOne diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/Strict.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/Strict.lean index 790b01acb9..abb6d0cfb9 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/Strict.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/Strict.lean @@ -3,13 +3,16 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.LinearAlgebra.TensorProduct.Associator -import Mathlib.Algebra.Algebra.Bilinear +module + +public import Mathlib.LinearAlgebra.TensorProduct.Associator /-! # Strict tensor product (wip) -/ +@[expose] public section + variable {R E F G : Type _} [CommSemiring R] [AddCommGroup E] [AddCommGroup F] [AddCommGroup G] [Module R E] [Module R F] [Module R G] diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/Symm.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/Symm.lean index 8ddaeb1af0..8778961a70 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/Symm.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/Symm.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Analysis.InnerProductSpace.Symmetric -import Mathlib.Analysis.InnerProductSpace.Adjoint +module + +public import Mathlib.Analysis.InnerProductSpace.Adjoint /-! @@ -15,6 +16,8 @@ This file provides the polarization identity for self adjoint continuous linear -/ +@[expose] public section + variable {𝕜 E : Type _} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/TensorHilbert.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/TensorHilbert.lean index 4c048c9d3f..9acb11b53f 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/TensorHilbert.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/TensorHilbert.lean @@ -3,8 +3,9 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Analysis.InnerProductSpace.TensorProduct -import Mathlib.LinearAlgebra.FiniteDimensional.Defs +module + +public import Mathlib.Analysis.InnerProductSpace.TensorProduct /-! @@ -15,6 +16,8 @@ inner product space structure now lives in Mathlib. -/ +@[expose] public section + open scoped TensorProduct BigOperators namespace TensorProduct diff --git a/LeanPool/Monlib4/LinearAlgebra/Ips/Vn.lean b/LeanPool/Monlib4/LinearAlgebra/Ips/Vn.lean index bb1cd381e1..1e3fbebfd1 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Ips/Vn.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Ips/Vn.lean @@ -3,12 +3,12 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.InvariantSubmodule -import LeanPool.Monlib4.LinearAlgebra.Ips.Basic -import LeanPool.Monlib4.LinearAlgebra.Ips.Ips -import Mathlib.Analysis.VonNeumannAlgebra.Basic +module + +public import LeanPool.Monlib4.LinearAlgebra.InvariantSubmodule +public import Mathlib.Analysis.VonNeumannAlgebra.Basic +public import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne import LeanPool.Monlib4.LinearAlgebra.Ips.MinimalProj -import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne /-! @@ -18,6 +18,8 @@ This file contains two simple results about von Neumann algebras. -/ +@[expose] public section + namespace VonNeumannAlgebra diff --git a/LeanPool/Monlib4/LinearAlgebra/IsProjPrime.lean b/LeanPool/Monlib4/LinearAlgebra/IsProjPrime.lean index 01b67ffda9..c3d2ecde79 100644 --- a/LeanPool/Monlib4/LinearAlgebra/IsProjPrime.lean +++ b/LeanPool/Monlib4/LinearAlgebra/IsProjPrime.lean @@ -3,7 +3,9 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module +public import Mathlib.Analysis.InnerProductSpace.Projection.Basic import Mathlib.Analysis.InnerProductSpace.Projection.Submodule /-! @@ -13,6 +15,8 @@ This file contains the definition of `linear_map.is_proj'` and lemmas relating t essentially `linear_map.is_proj` but as a linear map from `E` to `U`. -/ +@[expose] public section + section variable {R E : Type _} [Ring R] [AddCommGroup E] [Module R E] {U : Submodule R E} diff --git a/LeanPool/Monlib4/LinearAlgebra/IsReal.lean b/LeanPool/Monlib4/LinearAlgebra/IsReal.lean index c57df058b5..fcd174361f 100644 --- a/LeanPool/Monlib4/LinearAlgebra/IsReal.lean +++ b/LeanPool/Monlib4/LinearAlgebra/IsReal.lean @@ -3,15 +3,12 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import Mathlib.Algebra.Algebra.Basic -import Mathlib.Algebra.Algebra.Bilinear -import Mathlib.Algebra.Algebra.Spectrum.Basic -import Mathlib.Algebra.Star.BigOperators -import Mathlib.Algebra.Star.StarAlgHom -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Analysis.RCLike.Basic +public import Mathlib.Analysis.InnerProductSpace.Defs +public import Mathlib.LinearAlgebra.Eigenspace.Basic import LeanPool.Monlib4.LinearAlgebra.End +import Mathlib.Analysis.Complex.Order /-! # Real Linear Maps @@ -21,6 +18,8 @@ This file defines `LinearMap.real`, the star-conjugate of a linear map, when `φ = φ.real`. -/ +@[expose] public section + /-- A function-like map is real if it commutes with star. -/ def LinearMap.IsReal {M₁ M₂ : Type*} {F : Type*} [FunLike F M₁ M₂] [Star M₁] [Star M₂] (φ : F) : Prop := diff --git a/LeanPool/Monlib4/LinearAlgebra/KroneckerToTensor.lean b/LeanPool/Monlib4/LinearAlgebra/KroneckerToTensor.lean index ec62097234..b062705cda 100644 --- a/LeanPool/Monlib4/LinearAlgebra/KroneckerToTensor.lean +++ b/LeanPool/Monlib4/LinearAlgebra/KroneckerToTensor.lean @@ -3,11 +3,14 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.RingTheory.MatrixAlgebra -import Mathlib.LinearAlgebra.TensorProduct.Matrix +module + +public import Mathlib.RingTheory.MatrixAlgebra +public import Mathlib.Logic.Equiv.PartialEquiv +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.LinearAlgebra.TensorProduct.Finiteness -import LeanPool.Monlib4.LinearAlgebra.Matrix.Basic -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.FiniteDimensional +import Mathlib.Tactic.Positivity.Finset /-! # Kronecker product to the tensor product @@ -17,6 +20,8 @@ This file contains the definition of `tensorToKronecker` and -/ +@[expose] public section + open scoped TensorProduct BigOperators Kronecker diff --git a/LeanPool/Monlib4/LinearAlgebra/LinearMapOp.lean b/LeanPool/Monlib4/LinearAlgebra/LinearMapOp.lean index 7e9d0af737..13fe661c12 100644 --- a/LeanPool/Monlib4/LinearAlgebra/LinearMapOp.lean +++ b/LeanPool/Monlib4/LinearAlgebra/LinearMapOp.lean @@ -3,11 +3,9 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Algebra.Opposites -import Mathlib.Algebra.Module.LinearMap.Basic -import Mathlib.Data.Opposite -import Mathlib.Algebra.Algebra.Equiv -import Mathlib.Algebra.Algebra.Opposite +module + +public import Mathlib.Algebra.Algebra.Opposite /-! # LeanPool.Monlib4.LinearAlgebra.LinearMapOp @@ -15,6 +13,8 @@ import Mathlib.Algebra.Algebra.Opposite Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.LinearMapOp`. -/ +@[expose] public section + /-- Push a semilinear map between modules through the multiplicative opposite. -/ @[simps] def LinearMap.op {R S : Type*} [Semiring R] [Semiring S] {σ : R →+* S} diff --git a/LeanPool/Monlib4/LinearAlgebra/LmulRmul.lean b/LeanPool/Monlib4/LinearAlgebra/LmulRmul.lean index 7265c36cf6..239b778e15 100644 --- a/LeanPool/Monlib4/LinearAlgebra/LmulRmul.lean +++ b/LeanPool/Monlib4/LinearAlgebra/LmulRmul.lean @@ -3,9 +3,12 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Algebra.Algebra.Bilinear -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas -import LeanPool.Monlib4.LinearAlgebra.LinearMapOp +module + +public import Mathlib.Algebra.Algebra.Bilinear +public import LeanPool.Monlib4.LinearAlgebra.LinearMapOp +import Mathlib.Tactic.NormNum.Ineq +import Mathlib.Tactic.NormNum.Pow /-! # lmul and rmul @@ -15,6 +18,8 @@ The left and right multiplication maps, copied from `LinearMap.mulLeft` and -/ +@[expose] public section + section diff --git a/LeanPool/Monlib4/LinearAlgebra/Matrix.lean b/LeanPool/Monlib4/LinearAlgebra/Matrix.lean index 14504048ab..eab62cf1a5 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Matrix.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Matrix.lean @@ -3,21 +3,24 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.Matrix.Basic -import LeanPool.Monlib4.LinearAlgebra.Matrix.Cast -import LeanPool.Monlib4.LinearAlgebra.Matrix.Conj -import LeanPool.Monlib4.LinearAlgebra.Matrix.IncludeBlock -import LeanPool.Monlib4.LinearAlgebra.Matrix.IsAlmostHermitian -import LeanPool.Monlib4.LinearAlgebra.Matrix.PiMat -import LeanPool.Monlib4.LinearAlgebra.Matrix.PosDefRpow -import LeanPool.Monlib4.LinearAlgebra.Matrix.PosEqLinearMapIsPositive -import LeanPool.Monlib4.LinearAlgebra.Matrix.Reshape -import LeanPool.Monlib4.LinearAlgebra.Matrix.Spectra -import LeanPool.Monlib4.LinearAlgebra.Matrix.StarOrderedRing +public import LeanPool.Monlib4.LinearAlgebra.Matrix.Basic +public import LeanPool.Monlib4.LinearAlgebra.Matrix.Cast +public import LeanPool.Monlib4.LinearAlgebra.Matrix.Conj +public import LeanPool.Monlib4.LinearAlgebra.Matrix.IncludeBlock +public import LeanPool.Monlib4.LinearAlgebra.Matrix.IsAlmostHermitian +public import LeanPool.Monlib4.LinearAlgebra.Matrix.PiMat +public import LeanPool.Monlib4.LinearAlgebra.Matrix.PosDefRpow +public import LeanPool.Monlib4.LinearAlgebra.Matrix.PosEqLinearMapIsPositive +public import LeanPool.Monlib4.LinearAlgebra.Matrix.Reshape +public import LeanPool.Monlib4.LinearAlgebra.Matrix.Spectra +public import LeanPool.Monlib4.LinearAlgebra.Matrix.StarOrderedRing /-! # Matrix Import-only index for the `Matrix` directory of the monlib4 import. -/ + +@[expose] public section diff --git a/LeanPool/Monlib4/LinearAlgebra/Matrix/Basic.lean b/LeanPool/Monlib4/LinearAlgebra/Matrix/Basic.lean index 77f9a90fd0..2c377ccad1 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Matrix/Basic.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Matrix/Basic.lean @@ -3,15 +3,12 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.LinearAlgebra.Matrix.ToLin -import Mathlib.LinearAlgebra.TensorProduct.Matrix -import Mathlib.LinearAlgebra.Trace -import Mathlib.LinearAlgebra.Matrix.Hermitian -import Mathlib.Analysis.Matrix.Spectrum -import Mathlib.LinearAlgebra.UnitaryGroup -import Mathlib.Analysis.RCLike.Basic -import LeanPool.Monlib4.LinearAlgebra.Matrix.Conj -import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne +module + +public import Mathlib.Analysis.Matrix.Spectrum +public import LeanPool.Monlib4.LinearAlgebra.Matrix.Conj +public import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne +import LeanPool.Monlib4.Preq.Ites /-! # Matrix basics @@ -20,6 +17,8 @@ Basic matrix lemmas used by the monlib4 automorphism-of-matrix-algebras formalization. -/ +@[expose] public section + namespace Matrix open scoped BigOperators Matrix Kronecker diff --git a/LeanPool/Monlib4/LinearAlgebra/Matrix/Cast.lean b/LeanPool/Monlib4/LinearAlgebra/Matrix/Cast.lean index 5f7f79c990..ee101d2c70 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Matrix/Cast.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Matrix/Cast.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Data.Matrix.Basic +module + +public import Mathlib.Data.Matrix.Mul /-! # LeanPool.Monlib4.LinearAlgebra.Matrix.Cast @@ -11,6 +13,8 @@ import Mathlib.Data.Matrix.Basic Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.Matrix.Cast`. -/ +@[expose] public section + variable {R k : Type*} {s : k → Type _} theorem Matrix.cast_apply {i j : k} (x : Matrix (s i) (s i) R) (h : i = j) (p q : s j) : diff --git a/LeanPool/Monlib4/LinearAlgebra/Matrix/Conj.lean b/LeanPool/Monlib4/LinearAlgebra/Matrix/Conj.lean index 8a0150f567..61de7e287d 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Matrix/Conj.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Matrix/Conj.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Data.Matrix.Basic -import Mathlib.LinearAlgebra.Matrix.Hermitian +module + +public import Mathlib.LinearAlgebra.Matrix.Hermitian import LeanPool.Monlib4.Preq.Ites /-! @@ -14,6 +15,8 @@ This file defines the conjugate of a matrix, `matrix.conj` with the notation ` (i.e., `xᴴᵀ i j = star (x i j)`), and shows basic properties about it. -/ +@[expose] public section + namespace Matrix diff --git a/LeanPool/Monlib4/LinearAlgebra/Matrix/IncludeBlock.lean b/LeanPool/Monlib4/LinearAlgebra/Matrix/IncludeBlock.lean index 983f339567..cc56de28cb 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Matrix/IncludeBlock.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Matrix/IncludeBlock.lean @@ -3,15 +3,12 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.LinearAlgebra.Matrix.Block -import Mathlib.LinearAlgebra.Matrix.Trace -import Mathlib.Data.Matrix.Basis +module + +public import LeanPool.Monlib4.LinearAlgebra.ToMatrixOfEquiv +public import LeanPool.Monlib4.LinearAlgebra.Matrix.PiMat import LeanPool.Monlib4.Preq.Dite -import Mathlib.LinearAlgebra.Matrix.Hermitian -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas -import Mathlib.LinearAlgebra.Matrix.Kronecker -import LeanPool.Monlib4.LinearAlgebra.ToMatrixOfEquiv -import LeanPool.Monlib4.LinearAlgebra.Matrix.PiMat +import Mathlib.Analysis.SpecialFunctions.Bernstein /-! @@ -24,6 +21,8 @@ import LeanPool.Monlib4.LinearAlgebra.Matrix.PiMat -/ +@[expose] public section + open scoped BigOperators diff --git a/LeanPool/Monlib4/LinearAlgebra/Matrix/IsAlmostHermitian.lean b/LeanPool/Monlib4/LinearAlgebra/Matrix/IsAlmostHermitian.lean index f5e296688e..897ee587b6 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Matrix/IsAlmostHermitian.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Matrix/IsAlmostHermitian.lean @@ -3,13 +3,14 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Basic.Complex.Basic -import Mathlib.LinearAlgebra.Matrix.Block -import Mathlib.LinearAlgebra.Matrix.Hermitian -import Mathlib.LinearAlgebra.Matrix.Kronecker -import Mathlib.Tactic.Common -import LeanPool.Monlib4.LinearAlgebra.Matrix.Basic -import LeanPool.Monlib4.LinearAlgebra.Matrix.Conj +module + +public import Mathlib.Basic.Complex.Basic +public import Mathlib.LinearAlgebra.Matrix.Block +public import LeanPool.Monlib4.LinearAlgebra.Matrix.Conj +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # Almost Hermitian Matrices @@ -19,6 +20,8 @@ import LeanPool.Monlib4.LinearAlgebra.Matrix.Conj We say a matrix `x` is `is_almost_hermitian` if there exists some scalar `α ∈ ℂ`. -/ +@[expose] public section + namespace Matrix @@ -96,7 +99,7 @@ theorem isAlmostHermitian_iff (x : Matrix n n ℂ) : x.IsAlmostHermitian ↔ (x rw [← mul_left_inj' hβ', inv_mul_cancel₀ hβ', ← Complex.normSq_eq_conj_mul_self] norm_cast simp_rw [Complex.normSq_eq_norm_sq, ← Complex.norm_pow, hβ] - exact Hα'.symm + simpa only [RCLike.sqrt_normSq_eq_norm] using Hα'.symm have hαβ : β * α⁻¹ = β⁻¹ := by rw [← hβ, pow_two, mul_inv, ← mul_assoc, mul_inv_cancel₀ hβ', one_mul] use β diff --git a/LeanPool/Monlib4/LinearAlgebra/Matrix/PiMat.lean b/LeanPool/Monlib4/LinearAlgebra/Matrix/PiMat.lean index 8359b53769..0ffcd5fe10 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Matrix/PiMat.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Matrix/PiMat.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import Mathlib.Data.Matrix.Basic +public import Mathlib.LinearAlgebra.Matrix.Defs +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.SetLike /-! # LeanPool.Monlib4.LinearAlgebra.Matrix.PiMat @@ -12,6 +16,8 @@ import Mathlib.Data.Matrix.Basic Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.Matrix.PiMat`. -/ +@[expose] public section + /-- Square matrices over `R` indexed by `n`. -/ abbrev Mat (R n : Type*) := Matrix n n R diff --git a/LeanPool/Monlib4/LinearAlgebra/Matrix/PosDefRpow.lean b/LeanPool/Monlib4/LinearAlgebra/Matrix/PosDefRpow.lean index a0cabfd5a6..c7e0b41213 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Matrix/PosDefRpow.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Matrix/PosDefRpow.lean @@ -3,10 +3,13 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.Matrix.PosEqLinearMapIsPositive -import LeanPool.Monlib4.LinearAlgebra.InnerAut -import LeanPool.Monlib4.LinearAlgebra.Matrix.StarOrderedRing +public import LeanPool.Monlib4.LinearAlgebra.Matrix.PosEqLinearMapIsPositive +public import LeanPool.Monlib4.LinearAlgebra.InnerAut +public import LeanPool.Monlib4.LinearAlgebra.Matrix.Basic +import LeanPool.Monlib4.Preq.RCLikeLe +import LeanPool.Monlib4.RepTheory.AutMat /-! # Real powers of positive definite matrices @@ -16,6 +19,8 @@ semidefinite and positive definite matrices. The definitions are stated in terms of the current Mathlib Hermitian spectral theorem. -/ +@[expose] public section + namespace Matrix variable {n 𝕜 : Type _} [RCLike 𝕜] [Fintype n] [DecidableEq n] @@ -119,6 +124,8 @@ noncomputable def _root_.Matrix.PosDef.eigenvaluesInvertible' {Q : Matrix n n (hQ : Q.PosDef) : Invertible (RCLike.ofReal ∘ (IsHermitian.eigenvalues hQ.1) : n → 𝕜) := by letI := hQ.eigenvaluesInvertible + letI (i : n) : Invertible (hQ.1.eigenvalues i) := + invertibleOfNonzero (ne_of_gt (hQ.pos_eigenvalues i)) use (RCLike.ofReal ∘ (IsHermitian.eigenvalues hQ.1)⁻¹ : n → 𝕜) <;> · ext i simp only [Pi.mul_def, Function.comp_apply, ← RCLike.ofReal_mul, Pi.inv_def, diff --git a/LeanPool/Monlib4/LinearAlgebra/Matrix/PosEqLinearMapIsPositive.lean b/LeanPool/Monlib4/LinearAlgebra/Matrix/PosEqLinearMapIsPositive.lean index b49f236f0b..819a179554 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Matrix/PosEqLinearMapIsPositive.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Matrix/PosEqLinearMapIsPositive.lean @@ -3,15 +3,11 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Analysis.InnerProductSpace.Positive -import Mathlib.Analysis.Matrix.Order -import Mathlib.Analysis.Matrix.PosDef -import Mathlib.LinearAlgebra.Matrix.NonsingularInverse -import LeanPool.Monlib4.LinearAlgebra.End -import LeanPool.Monlib4.LinearAlgebra.Ips.Pos -import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne +module + +public import LeanPool.Monlib4.LinearAlgebra.Ips.Pos +public import Mathlib.Analysis.Matrix.Order import LeanPool.Monlib4.LinearAlgebra.Matrix.Basic -import LeanPool.Monlib4.Preq.Ites import LeanPool.Monlib4.Preq.RCLikeLe /-! @@ -20,6 +16,8 @@ import LeanPool.Monlib4.Preq.RCLikeLe Compatibility wrappers for the part of Monlib's matrix-positive API now covered by Mathlib. -/ +@[expose] public section + namespace Matrix variable {𝕜 m n : Type*} [RCLike 𝕜] diff --git a/LeanPool/Monlib4/LinearAlgebra/Matrix/Reshape.lean b/LeanPool/Monlib4/LinearAlgebra/Matrix/Reshape.lean index 4ced5db843..a4be00e264 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Matrix/Reshape.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Matrix/Reshape.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.Matrix.Conj +module + +public import LeanPool.Monlib4.LinearAlgebra.Matrix.Conj /-! @@ -14,6 +16,8 @@ and shows some obvious properties of this identification. -/ +@[expose] public section + namespace Matrix diff --git a/LeanPool/Monlib4/LinearAlgebra/Matrix/Spectra.lean b/LeanPool/Monlib4/LinearAlgebra/Matrix/Spectra.lean index e50bc36193..9118ea04ee 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Matrix/Spectra.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Matrix/Spectra.lean @@ -3,10 +3,10 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Analysis.Matrix.Spectrum -import LeanPool.Monlib4.LinearAlgebra.Matrix.Basic -import LeanPool.Monlib4.LinearAlgebra.Matrix.IsAlmostHermitian -import LeanPool.Monlib4.LinearAlgebra.InnerAut +module + +public import LeanPool.Monlib4.LinearAlgebra.InnerAut +import Mathlib.Analysis.SpecialFunctions.Bernstein /-! # Matrix Spectra @@ -14,6 +14,8 @@ import LeanPool.Monlib4.LinearAlgebra.InnerAut Spectral helpers for Hermitian and almost-Hermitian matrices. -/ +@[expose] public section + instance multisetCoe {α β : Type _} [Coe α β] : Coe (Multiset α) (Multiset β) where coe s := s.map (Coe.coe : α → β) diff --git a/LeanPool/Monlib4/LinearAlgebra/Matrix/StarOrderedRing.lean b/LeanPool/Monlib4/LinearAlgebra/Matrix/StarOrderedRing.lean index 15c3f2d6e2..021cf67401 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Matrix/StarOrderedRing.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Matrix/StarOrderedRing.lean @@ -3,16 +3,14 @@ Copyright (c) 2024 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.PiStarOrderedRing -import LeanPool.Monlib4.LinearAlgebra.PiDirectSum -import LeanPool.Monlib4.LinearAlgebra.InnerAut +public import LeanPool.Monlib4.LinearAlgebra.InnerAut +public import LeanPool.Monlib4.LinearAlgebra.Matrix.PiMat +public import Mathlib.Analysis.Matrix.Order import LeanPool.Monlib4.LinearAlgebra.Matrix.PosEqLinearMapIsPositive -import LeanPool.Monlib4.LinearAlgebra.KroneckerToTensor -import LeanPool.Monlib4.Preq.Complex -import LeanPool.Monlib4.LinearAlgebra.Matrix.PiMat -import LeanPool.Monlib4.LinearAlgebra.Matrix.Spectra -import Mathlib.Analysis.InnerProductSpace.Basic +import LeanPool.Monlib4.LinearAlgebra.MySpec +import LeanPool.Monlib4.Preq.RCLikeLe /-! # Matrix algebras as star ordered rings @@ -23,6 +21,8 @@ order and `StarOrderedRing` instance, so this file restores the Monlib-facing negative definiteness definitions, spectral criteria, and compatibility names. -/ +@[expose] public section + namespace Matrix open scoped ComplexOrder MatrixOrder diff --git a/LeanPool/Monlib4/LinearAlgebra/MulPrimePrime.lean b/LeanPool/Monlib4/LinearAlgebra/MulPrimePrime.lean index 544cda4170..e0e62b6473 100644 --- a/LeanPool/Monlib4/LinearAlgebra/MulPrimePrime.lean +++ b/LeanPool/Monlib4/LinearAlgebra/MulPrimePrime.lean @@ -3,11 +3,13 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Algebra.Algebra.Bilinear -import LeanPool.Monlib4.LinearAlgebra.KroneckerToTensor -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas -import LeanPool.Monlib4.LinearAlgebra.Nacgor +module + +public import LeanPool.Monlib4.LinearAlgebra.Nacgor +public import Mathlib.Analysis.InnerProductSpace.TensorProduct import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +import LeanPool.Monlib4.LinearAlgebra.Matrix.Basic +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas /-! @@ -17,6 +19,8 @@ this defines the multiplication map $M_{n\times n} \to M_n$ -/ +@[expose] public section + open Matrix @@ -123,7 +127,8 @@ theorem Matrix.KroneckerProduct.ext_iff {R P n₁ n₂ : Type _} [Finite n₁] [ rw [Matrix.kmul_representation x] simp_rw [map_sum, _root_.map_smul, h _ _] -private def mul_map_aux (𝕜 X : Type _) [RCLike 𝕜] [NormedAddCommGroupOfRing X] [NormedSpace 𝕜 X] +/-- Multiplication as a linear map into continuous linear endomorphisms. -/ +def mulMapAux (𝕜 X : Type _) [RCLike 𝕜] [NormedAddCommGroupOfRing X] [NormedSpace 𝕜 X] [SMulCommClass 𝕜 X X] [IsScalarTower 𝕜 X X] [FiniteDimensional 𝕜 X] : X →ₗ[𝕜] X →L[𝕜] X where toFun x := @@ -143,7 +148,7 @@ namespace LinearMap def mulToClm (𝕜 X : Type _) [RCLike 𝕜] [NormedAddCommGroupOfRing X] [NormedSpace 𝕜 X] [SMulCommClass 𝕜 X X] [IsScalarTower 𝕜 X X] [FiniteDimensional 𝕜 X] : X →L[𝕜] X →L[𝕜] X where - toFun := mul_map_aux 𝕜 X + toFun := mulMapAux 𝕜 X map_add' := map_add _ map_smul' := _root_.map_smul _ cont := map_continuous _ diff --git a/LeanPool/Monlib4/LinearAlgebra/MyBimodule.lean b/LeanPool/Monlib4/LinearAlgebra/MyBimodule.lean index 895084450b..990f301f27 100644 --- a/LeanPool/Monlib4/LinearAlgebra/MyBimodule.lean +++ b/LeanPool/Monlib4/LinearAlgebra/MyBimodule.lean @@ -3,14 +3,15 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Algebra.Algebra.Bilinear -import Mathlib.LinearAlgebra.Basis.VectorSpace -import Mathlib.LinearAlgebra.TensorProduct.Basis -import Mathlib.RingTheory.TensorProduct.Basic -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas +module + +public import Mathlib.RingTheory.TensorProduct.Basic +public import LeanPool.Monlib4.LinearAlgebra.LmulRmul +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.ToAdditive import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas import LeanPool.Monlib4.Preq.Finset -import LeanPool.Monlib4.LinearAlgebra.LmulRmul /-! # (A-A)-Bimodules @@ -19,6 +20,8 @@ We define (A-A)-bimodules, where A is a commutative semiring, and show basic properties of them. -/ +@[expose] public section + variable {R H₁ H₂ : Type _} [CommSemiring R] [Semiring H₁] [Semiring H₂] [Algebra R H₁] [Algebra R H₂] diff --git a/LeanPool/Monlib4/LinearAlgebra/MySpec.lean b/LeanPool/Monlib4/LinearAlgebra/MySpec.lean index a1e8a75fcf..7207cb35d6 100644 --- a/LeanPool/Monlib4/LinearAlgebra/MySpec.lean +++ b/LeanPool/Monlib4/LinearAlgebra/MySpec.lean @@ -3,6 +3,10 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module + +public import Mathlib.Algebra.Algebra.Spectrum.Basic +public import Mathlib.LinearAlgebra.FiniteDimensional.Defs import LeanPool.Monlib4.LinearAlgebra.End /-! @@ -11,6 +15,8 @@ import LeanPool.Monlib4.LinearAlgebra.End This file just proves that the spectrum of a linear map is commutative. -/ +@[expose] public section + theorem isUnit_comm (K E : Type _) [DivisionRing K] [AddCommGroup E] [Module K E] [FiniteDimensional K E] (x y : E →ₗ[K] E) : IsUnit (x ∘ₗ y) ↔ IsUnit (y ∘ₗ x) := by diff --git a/LeanPool/Monlib4/LinearAlgebra/Nacgor.lean b/LeanPool/Monlib4/LinearAlgebra/Nacgor.lean index 03f67d882b..b0401d4d88 100644 --- a/LeanPool/Monlib4/LinearAlgebra/Nacgor.lean +++ b/LeanPool/Monlib4/LinearAlgebra/Nacgor.lean @@ -3,9 +3,9 @@ Copyright (c) 2024 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Analysis.Normed.Group.Basic -import Mathlib.Analysis.Normed.Lp.PiLp -import Mathlib.Analysis.InnerProductSpace.Basic +module + +public import Mathlib.Analysis.Normed.Lp.PiLp /-! # Normed additive commutative groups of rings @@ -14,6 +14,8 @@ This file contains the `NormedAddCommGroupOfRing` class, which bundles the ring structure together with the normed additive commutative group structure. -/ +@[expose] public section + open scoped BigOperators /-- A ring whose additive group is a normed additive commutative group. -/ diff --git a/LeanPool/Monlib4/LinearAlgebra/OfNorm.lean b/LeanPool/Monlib4/LinearAlgebra/OfNorm.lean index 0da8112bad..2be3de54f8 100644 --- a/LeanPool/Monlib4/LinearAlgebra/OfNorm.lean +++ b/LeanPool/Monlib4/LinearAlgebra/OfNorm.lean @@ -3,16 +3,16 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.Ips.Basic -import LeanPool.Monlib4.LinearAlgebra.Ips.Ips -import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne +public import Mathlib.Analysis.Convex.Extreme +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.Normed.Operator.BoundedLinearMaps import LeanPool.Monlib4.Preq.RCLikeLe -import Mathlib.Topology.Algebra.Module.Spaces.WeakDual -import Mathlib.Analysis.Normed.Module.Dual +import Mathlib.Analysis.InnerProductSpace.Symmetric import Mathlib.Analysis.Normed.Module.HahnBanach -import Mathlib.Analysis.InnerProductSpace.Adjoint -import Mathlib.Analysis.Convex.Extreme +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.Monlib4.LinearAlgebra.OfNorm @@ -20,6 +20,8 @@ import Mathlib.Analysis.Convex.Extreme Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.OfNorm`. -/ +@[expose] public section + open scoped ComplexOrder section Ex4 diff --git a/LeanPool/Monlib4/LinearAlgebra/PiDirectSum.lean b/LeanPool/Monlib4/LinearAlgebra/PiDirectSum.lean index 1c5f798c41..1d1a6be6ab 100644 --- a/LeanPool/Monlib4/LinearAlgebra/PiDirectSum.lean +++ b/LeanPool/Monlib4/LinearAlgebra/PiDirectSum.lean @@ -3,12 +3,14 @@ Copyright (c) 2024 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Algebra.DirectSum.Module -import Mathlib.Data.Fintype.BigOperators -import Mathlib.Data.Fintype.Prod -import Mathlib.RingTheory.TensorProduct.Basic -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas -import LeanPool.Monlib4.LinearAlgebra.DirectSumFromTo +module + +public import Mathlib.RingTheory.TensorProduct.Basic +public import LeanPool.Monlib4.LinearAlgebra.DirectSumFromTo +public import Mathlib.Algebra.Algebra.Pi +public import Mathlib.Algebra.DirectSum.Basic +import Mathlib.Tactic.NormNum.Ineq +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.Monlib4.LinearAlgebra.PiDirectSum @@ -16,6 +18,8 @@ import LeanPool.Monlib4.LinearAlgebra.DirectSumFromTo Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.PiDirectSum`. -/ +@[expose] public section + open scoped TensorProduct local notation x " ⊗ₘ " y => TensorProduct.map x y diff --git a/LeanPool/Monlib4/LinearAlgebra/PiStarOrderedRing.lean b/LeanPool/Monlib4/LinearAlgebra/PiStarOrderedRing.lean index 76194d7480..4f5b2530c6 100644 --- a/LeanPool/Monlib4/LinearAlgebra/PiStarOrderedRing.lean +++ b/LeanPool/Monlib4/LinearAlgebra/PiStarOrderedRing.lean @@ -3,11 +3,14 @@ Copyright (c) 2024 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Algebra.Order.Star.Basic -import Mathlib.Algebra.Group.Subgroup.Basic -import Mathlib.Data.Fintype.Pi -import Mathlib.Algebra.Star.Pi -import Mathlib.Basic.Complex.Basic +module + +public import Mathlib.Algebra.Order.Star.Basic +public import Mathlib.Algebra.Star.Pi +import Mathlib.Algebra.Order.AbsoluteValue.Basic +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # pi.star_ordered_ring @@ -15,6 +18,8 @@ import Mathlib.Basic.Complex.Basic This file contains the definition of `pi.star_ordered_ring`. -/ +@[expose] public section + /-- Coordinate projection of a set of dependent functions along `Pi.single`. -/ def Set.ofPi {ι : Type _} {B : ι → Type _} [DecidableEq ι] [∀ i, Zero (B i)] (s : Set (∀ i, B i)) : ∀ i, Set (B i) := fun i x => Pi.single i x ∈ s diff --git a/LeanPool/Monlib4/LinearAlgebra/PosMapIsReal.lean b/LeanPool/Monlib4/LinearAlgebra/PosMapIsReal.lean index 646aeb2c87..d76070dd1c 100644 --- a/LeanPool/Monlib4/LinearAlgebra/PosMapIsReal.lean +++ b/LeanPool/Monlib4/LinearAlgebra/PosMapIsReal.lean @@ -3,19 +3,20 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.InnerAut -import LeanPool.Monlib4.LinearAlgebra.Matrix.IncludeBlock -import LeanPool.Monlib4.LinearAlgebra.InvariantSubmodule + + +public import LeanPool.Monlib4.LinearAlgebra.Matrix.PosDefRpow +public import LeanPool.Monlib4.LinearAlgebra.IsReal +public import LeanPool.Monlib4.LinearAlgebra.Matrix.PiMat +import LeanPool.Monlib4.LinearAlgebra.Ips.Basic +import LeanPool.Monlib4.LinearAlgebra.Ips.Ips import LeanPool.Monlib4.LinearAlgebra.Ips.MinimalProj -import LeanPool.Monlib4.LinearAlgebra.Nacgor -import Mathlib.Analysis.InnerProductSpace.StarOrder -import LeanPool.Monlib4.LinearAlgebra.OfNorm import LeanPool.Monlib4.LinearAlgebra.Matrix.StarOrderedRing -import LeanPool.Monlib4.LinearAlgebra.Matrix.PosDefRpow import LeanPool.Monlib4.LinearAlgebra.ToMatrixOfEquiv -import Mathlib.Analysis.InnerProductSpace.Positive -import Mathlib.Analysis.CStarAlgebra.Matrix +import LeanPool.Monlib4.RepTheory.AutMat +import Mathlib.Analysis.InnerProductSpace.StarOrder /-! # LeanPool.Monlib4.LinearAlgebra.PosMapIsReal @@ -23,6 +24,8 @@ import Mathlib.Analysis.CStarAlgebra.Matrix Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.PosMapIsReal`. -/ +@[expose] public section + variable {A : Type _} [Ring A] [StarRing A] [Algebra ℂ A] [StarModule ℂ A] [PartialOrder A] [_root_.StarOrderedRing A] @@ -129,6 +132,8 @@ by rw [← ContinuousLinearMap.toLinearMapAlgEquiv_apply, AlgEquiv.spectrum_eq] variable {B : Type*} [NormedAddCommGroup B] [InnerProductSpace ℂ B] [FiniteDimensional ℂ B] +local instance : CompleteSpace B := FiniteDimensional.complete ℂ B + open scoped MatrixOrder ComplexOrder FiniteDimensional theorem ContinuousLinearMap.nonneg_iff_isSelfAdjoint_and_nonneg_spectrum (T : B →L[ℂ] B) : diff --git a/LeanPool/Monlib4/LinearAlgebra/QuantumSet.lean b/LeanPool/Monlib4/LinearAlgebra/QuantumSet.lean index 620d563a6f..fbc621e457 100644 --- a/LeanPool/Monlib4/LinearAlgebra/QuantumSet.lean +++ b/LeanPool/Monlib4/LinearAlgebra/QuantumSet.lean @@ -3,20 +3,24 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.DeltaForm -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Instances -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.PhiMap -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Pi -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.QIso -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMulTensor -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Subset -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Symm -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.TensorProduct +module + +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.DeltaForm +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Instances +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.PhiMap +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Pi +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.QIso +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMulTensor +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Subset +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Symm +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.TensorProduct /-! # LeanPool.Monlib4.LinearAlgebra.QuantumSet Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.QuantumSet`. -/ + +@[expose] public section diff --git a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Basic.lean b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Basic.lean index c11146c017..f02b5df07d 100644 --- a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Basic.lean +++ b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Basic.lean @@ -3,19 +3,22 @@ Copyright (c) 2024 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ - -import Mathlib.Analysis.InnerProductSpace.Adjoint -import Mathlib.Analysis.InnerProductSpace.Orthonormal -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Analysis.RCLike.Basic -import Mathlib.Basic.Complex.Basic -import Mathlib.LinearAlgebra.FiniteDimensional.Basic -import Mathlib.LinearAlgebra.TensorProduct.Basis -import Mathlib.Tactic.Ring -import LeanPool.Monlib4.LinearAlgebra.Coalgebra.FiniteDimensional +module + +public import LeanPool.Monlib4.LinearAlgebra.Coalgebra.FiniteDimensional +public import LeanPool.Monlib4.LinearAlgebra.Ips.OpUnop +public import LeanPool.Monlib4.LinearAlgebra.LmulRmul +public import LeanPool.Monlib4.LinearAlgebra.IsReal +public import LeanPool.Monlib4.Preq.StarAlgEquiv +public import Mathlib.LinearAlgebra.Basis.MulOpposite +public import Mathlib.LinearAlgebra.Trace +public import Mathlib.RingTheory.Coalgebra.CoassocSimps +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.Ips.Basic import LeanPool.Monlib4.LinearAlgebra.Ips.MulOp -import LeanPool.Monlib4.LinearAlgebra.Ips.OpUnop -import LeanPool.Monlib4.LinearAlgebra.LmulRmul +import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas +import Mathlib.Tactic.Positivity.Finset /-! # Quantum Sets @@ -27,6 +30,8 @@ comultiplication on `ℂ`, and the `Psi`/`Upsilon` equivalences used by downstream quantum-graph files. -/ +@[expose] public section + /-- A star algebra over `ℂ` equipped with a real-parameter modular automorphism group. -/ class starAlgebra (A : Type _) extends Ring A, Algebra ℂ A, StarRing A, StarModule ℂ A where diff --git a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/DeltaForm.lean b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/DeltaForm.lean index d4dc4023ab..27f289e60a 100644 --- a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/DeltaForm.lean +++ b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/DeltaForm.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic -import Mathlib.RingTheory.Coalgebra.Basic +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.Monlib4.LinearAlgebra.QuantumSet.DeltaForm @@ -13,6 +14,8 @@ import Mathlib.RingTheory.Coalgebra.Basic Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.QuantumSet.DeltaForm`. -/ +@[expose] public section + open scoped ComplexOrder open Coalgebra diff --git a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Instances.lean b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Instances.lean index 02c19c6981..0f28eec414 100644 --- a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Instances.lean +++ b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Instances.lean @@ -3,16 +3,20 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic -import LeanPool.Monlib4.LinearAlgebra.Ips.MatIps -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Pi -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.DeltaForm +module + +public import LeanPool.Monlib4.LinearAlgebra.Ips.MatIps +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.DeltaForm +import LeanPool.Monlib4.Preq.RCLikeLe +import LeanPool.Monlib4.RepTheory.AutMat /-! # LeanPool.Monlib4.LinearAlgebra.QuantumSet.Instances Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.QuantumSet.Instances`. -/ + +@[expose] public section -- import LeanPool.Monlib4.LinearAlgebra.Ips.Frob variable {n : Type*} [Fintype n] [DecidableEq n] {φ : Module.Dual ℂ (Matrix n n ℂ)} @@ -435,7 +439,8 @@ variable {k : Type*} [Fintype k] [DecidableEq k] {s : k → Type*} [Π i, Fintyp -private noncomputable def piSig (hψ : ∀ i, (ψ i).IsFaithfulPosMap) +/-- Apply the modular automorphism to each matrix block in a family. -/ +noncomputable def piSig (hψ : ∀ i, (ψ i).IsFaithfulPosMap) (z : ℝ) : PiMat ℂ k s ≃ₐ[ℂ] PiMat ℂ k s where toFun x i := sig (hψ i) z (x i) invFun x i := (sig (hψ i) z).symm (x i) @@ -486,8 +491,8 @@ private theorem piSig_star (hψ : ∀ i, (ψ i).IsFaithfulPosMap) noncomputable def PiMat.isStarAlgebra [_hψ : ∀ i, (ψ i).IsFaithfulPosMap] : starAlgebra (PiMat ℂ k s) where modAut := piSig _hψ - modAut_trans := piSig_trans_sig - modAut_star := piSig_star _hψ + modAut_trans := by exact piSig_trans_sig + modAut_star := by exact piSig_star _hψ -- attribute [-instance] Pi.module.Dual.isNormedAddCommGroupOfRing @@ -668,7 +673,15 @@ theorem Pi.Qam.Nontracial.delta_ne_zero [Nonempty k] [∀ i, Nontrivial (s i)] { @[reducible] noncomputable def Matrix.quantumSetDeltaForm [Nonempty n] {φ : Module.Dual ℂ (Matrix n n ℂ)} - [hφ : φ.IsFaithfulPosMap] := by + [hφ : φ.IsFaithfulPosMap] : + letI : starAlgebra (Matrix n n ℂ) := Matrix.isStarAlgebra (φ := φ) + letI : QuantumSet (Matrix n n ℂ) := + Module.Dual.IsFaithfulPosMap.quantumSet (φ := φ) + letI : _root_.NormedAddCommGroup (Matrix n n ℂ) := Module.Dual.NormedAddCommGroup φ + letI : _root_.InnerProductSpace ℂ (Matrix n n ℂ) := + Module.Dual.InnerProductSpace (φ := φ) + letI : Coalgebra ℂ (Matrix n n ℂ) := Coalgebra.ofFiniteDimensionalHilbertAlgebra + QuantumSetDeltaForm (Matrix n n ℂ) := by letI : starAlgebra (Matrix n n ℂ) := Matrix.isStarAlgebra (φ := φ) letI : QuantumSet (Matrix n n ℂ) := Module.Dual.IsFaithfulPosMap.quantumSet (φ := φ) @@ -685,7 +698,18 @@ def Matrix.quantumSetDeltaForm [Nonempty n] {φ : Module.Dual ℂ (Matrix n n @[reducible] noncomputable def PiMat.quantumSetDeltaForm [Nonempty k] [∀ i, Nontrivial (s i)] {d : ℂ} {φ : Π i, Module.Dual ℂ (Matrix (s i) (s i) ℂ)} - [hφ : ∀ i, (φ i).IsFaithfulPosMap] [hφ₂ : Fact (∀ i, (φ i).matrix⁻¹.trace = d)] := by + [hφ : ∀ i, (φ i).IsFaithfulPosMap] [hφ₂ : Fact (∀ i, (φ i).matrix⁻¹.trace = d)] : + letI : starAlgebra (PiMat ℂ k s) := PiMat.isStarAlgebra (ψ := φ) + letI : QuantumSet (PiMat ℂ k s) := + Module.Dual.pi.IsFaithfulPosMap.quantumSet (ψ := φ) + letI : _root_.NormedAddCommGroup (PiMat ℂ k s) := + Module.Dual.PiNormedAddCommGroup (φ := φ) + letI : _root_.SeminormedAddCommGroup (PiMat ℂ k s) := + (Module.Dual.PiNormedAddCommGroup (φ := φ)).toSeminormedAddCommGroup + letI : _root_.InnerProductSpace ℂ (PiMat ℂ k s) := + Module.Dual.pi.InnerProductSpace (φ := φ) + letI : Coalgebra ℂ (PiMat ℂ k s) := Coalgebra.ofFiniteDimensionalHilbertAlgebra + QuantumSetDeltaForm (PiMat ℂ k s) := by letI : starAlgebra (PiMat ℂ k s) := PiMat.isStarAlgebra (ψ := φ) letI : QuantumSet (PiMat ℂ k s) := Module.Dual.pi.IsFaithfulPosMap.quantumSet (ψ := φ) diff --git a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/PhiMap.lean b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/PhiMap.lean index bb00142b57..66d79e2510 100644 --- a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/PhiMap.lean +++ b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/PhiMap.lean @@ -3,9 +3,13 @@ Copyright (c) 2024 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic -import LeanPool.Monlib4.LinearAlgebra.MyBimodule +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic +public import LeanPool.Monlib4.LinearAlgebra.MyBimodule +public import Mathlib.Analysis.InnerProductSpace.MulOpposite +import LeanPool.Monlib4.LinearAlgebra.Ips.MulOp +import Mathlib.Tactic.Positivity.Finset /-! # The Phi Map @@ -15,6 +19,8 @@ equivalence and records the one-vector inner-product identities used by downstream quantum graph files. -/ +@[expose] public section + /-- The `Upsilon` equivalence viewed through the tensor-product bimodule map API. -/ noncomputable abbrev PhiMap {A B : Type*} [starAlgebra B] [starAlgebra A] [QuantumSet A] [QuantumSet B] := diff --git a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Pi.lean b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Pi.lean index b368d8d2c0..a65e544915 100644 --- a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Pi.lean +++ b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Pi.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import Mathlib.Algebra.Algebra.TransferInstance +public import Mathlib.Algebra.Algebra.TransferInstance -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Quantum Sets on Finite Products @@ -15,6 +17,8 @@ This file restores the finite-product quantum set instance from upstream `Monlib.LinearAlgebra.QuantumSet.Pi`. -/ +@[expose] public section + open scoped BigOperators InnerProductSpace section Pi diff --git a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/QIso.lean b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/QIso.lean index ccab56d574..e633ddab86 100644 --- a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/QIso.lean +++ b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/QIso.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.Monlib4.LinearAlgebra.QuantumSet.QIso @@ -12,6 +17,8 @@ import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.QuantumSet.QIso`. -/ +@[expose] public section + local notation "lT" => LinearMap.lTensor local notation "rT" => LinearMap.rTensor diff --git a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/SchurMul.lean b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/SchurMul.lean index 0e8b6c526c..9a0f355bf1 100644 --- a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/SchurMul.lean +++ b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/SchurMul.lean @@ -3,10 +3,14 @@ Copyright (c) 2024 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic -import Mathlib.RingTheory.Coalgebra.Basic -import Mathlib.RingTheory.Coalgebra.Hom +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic +public import Mathlib.RingTheory.Coalgebra.Hom +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas +import Mathlib.Tactic.Positivity.Finset /-! # Schur Product Operator @@ -17,6 +21,8 @@ Hilbert-algebra coalgebra instance and tensor-product infrastructure that are no in the current monlib4 slice. -/ +@[expose] public section + open scoped TensorProduct BigOperators local notation "m" x => LinearMap.mul' ℂ x @@ -148,17 +154,9 @@ theorem bra_comp_linearMap {𝕜 E₁ E₂ : Type*} [RCLike 𝕜] [NormedAddCommGroup E₁] [InnerProductSpace 𝕜 E₁] [NormedAddCommGroup E₂] [InnerProductSpace 𝕜 E₂] [FiniteDimensional 𝕜 E₁] [FiniteDimensional 𝕜 E₂] (x : E₂) (f : E₁ →ₗ[𝕜] E₂) : - (bra 𝕜 x).toLinearMap.comp f = (bra 𝕜 (LinearMap.adjoint f x)).toLinearMap := - letI := FiniteDimensional.complete 𝕜 E₁ - letI := FiniteDimensional.complete 𝕜 E₂ - calc - (bra 𝕜 x).toLinearMap ∘ₗ f = - ((bra 𝕜 x) ∘L LinearMap.toContinuousLinearMap f).toLinearMap := rfl - _ = - (bra 𝕜 - (ContinuousLinearMap.adjoint (LinearMap.toContinuousLinearMap f) x)).toLinearMap := by - rw [bra_comp_continuousLinearMap] - _ = (bra 𝕜 (LinearMap.adjoint f x)).toLinearMap := rfl + (bra 𝕜 x).toLinearMap.comp f = (bra 𝕜 (LinearMap.adjoint f x)).toLinearMap := by + ext y + exact (LinearMap.adjoint_inner_left f y x).symm theorem linearMap_comp_ket {𝕜 E₁ E₂ : Type*} [RCLike 𝕜] [NormedAddCommGroup E₁] [InnerProductSpace 𝕜 E₁] [NormedAddCommGroup E₂] @@ -210,60 +208,26 @@ theorem schurMul_one_one_left (x : A →ₗ[ℂ] B) : theorem schurMul_one_right_rankOne (a b : A) : (rankOne ℂ a b).toLinearMap •ₛ (1 : A →ₗ[ℂ] A) = lmul a ∘ₗ LinearMap.adjoint (lmul b) := by - let e := stdOrthonormalBasis ℂ A - calc - (rankOne ℂ a b).toLinearMap •ₛ (1 : A →ₗ[ℂ] A) - = (rankOne ℂ a b).toLinearMap •ₛ - (∑ i, (rankOne ℂ (e i) (e i)).toLinearMap) := by - rw [rankOne.sum_orthonormalBasis_eq_id_lm e] - _ = ∑ i, (rankOne ℂ (a * e i) (b * e i)).toLinearMap := by - rw [map_sum] - apply Finset.sum_congr rfl - intro i _ - rw [schurMul.apply_rankOne] - _ = ∑ i, lmul a ∘ₗ - ((rankOne ℂ (e i) (e i)).toLinearMap ∘ₗ LinearMap.adjoint (lmul b)) := by - apply Finset.sum_congr rfl - intro i _ - rw [LinearMap.rankOne_comp', LinearMap.comp_rankOne] - rfl - _ = lmul a ∘ₗ - ((∑ i, (rankOne ℂ (e i) (e i)).toLinearMap) ∘ₗ - LinearMap.adjoint (lmul b)) := by - rw [← LinearMap.comp_sum, ← LinearMap.sum_comp] - _ = lmul a ∘ₗ LinearMap.adjoint (lmul b) := by - rw [rankOne.sum_orthonormalBasis_eq_id_lm e] - ext x - rfl + trans lmul a ∘ₗ ((1 : A →ₗ[ℂ] A) ∘ₗ LinearMap.adjoint (lmul b)) + · simp only [← rankOne.sum_orthonormalBasis_eq_id_lm (stdOrthonormalBasis ℂ A), + map_sum, LinearMap.sum_comp, LinearMap.comp_sum] + apply Finset.sum_congr rfl + intro i _ + rw [schurMul.apply_rankOne, LinearMap.rankOne_comp', LinearMap.comp_rankOne] + rfl + · rfl theorem schurMul_one_left_rankOne (a b : A) : (1 : A →ₗ[ℂ] A) •ₛ (rankOne ℂ a b).toLinearMap = rmul a ∘ₗ LinearMap.adjoint (rmul b) := by - let e := stdOrthonormalBasis ℂ A - calc - (1 : A →ₗ[ℂ] A) •ₛ (rankOne ℂ a b).toLinearMap - = (∑ i, (rankOne ℂ (e i) (e i)).toLinearMap) •ₛ - (rankOne ℂ a b).toLinearMap := by - rw [rankOne.sum_orthonormalBasis_eq_id_lm e] - _ = ∑ i, (rankOne ℂ (e i * a) (e i * b)).toLinearMap := by - rw [map_sum, LinearMap.sum_apply] - apply Finset.sum_congr rfl - intro i _ - rw [schurMul.apply_rankOne] - _ = ∑ i, rmul a ∘ₗ - ((rankOne ℂ (e i) (e i)).toLinearMap ∘ₗ LinearMap.adjoint (rmul b)) := by - apply Finset.sum_congr rfl - intro i _ - rw [LinearMap.rankOne_comp', LinearMap.comp_rankOne] - rfl - _ = rmul a ∘ₗ - ((∑ i, (rankOne ℂ (e i) (e i)).toLinearMap) ∘ₗ - LinearMap.adjoint (rmul b)) := by - rw [← LinearMap.comp_sum, ← LinearMap.sum_comp] - _ = rmul a ∘ₗ LinearMap.adjoint (rmul b) := by - rw [rankOne.sum_orthonormalBasis_eq_id_lm e] - ext x - rfl + trans rmul a ∘ₗ ((1 : A →ₗ[ℂ] A) ∘ₗ LinearMap.adjoint (rmul b)) + · simp only [← rankOne.sum_orthonormalBasis_eq_id_lm (stdOrthonormalBasis ℂ A), + map_sum, LinearMap.sum_apply, LinearMap.sum_comp, LinearMap.comp_sum] + apply Finset.sum_congr rfl + intro i _ + rw [schurMul.apply_rankOne, LinearMap.rankOne_comp', LinearMap.comp_rankOne] + rfl + · rfl theorem schurMul_adjoint (x y : A →ₗ[ℂ] B) : LinearMap.adjoint (x •ₛ y) = LinearMap.adjoint x •ₛ LinearMap.adjoint y := by @@ -284,19 +248,11 @@ theorem schurMul_real {A B : Type*} [starAlgebra A] [starAlgebra B] theorem Psi.schurMul {A B : Type*} [starAlgebra A] [starAlgebra B] [hA : QuantumSet A] [QuantumSet B] (r₁ r₂ : ℝ) (f g : A →ₗ[ℂ] B) : hA.Psi r₁ r₂ (f •ₛ g) = hA.Psi r₁ r₂ f * hA.Psi r₁ r₂ g := by - suffices ∀ (a c : B) (b d : A), - hA.Psi r₁ r₂ ((rankOne ℂ a b).toLinearMap •ₛ (rankOne ℂ c d).toLinearMap) = - hA.Psi r₁ r₂ (rankOne ℂ a b).toLinearMap * - hA.Psi r₁ r₂ (rankOne ℂ c d).toLinearMap by - obtain ⟨α, β, rfl⟩ := LinearMap.exists_sum_rankOne f - obtain ⟨γ, δ, rfl⟩ := LinearMap.exists_sum_rankOne g - simp only [map_sum, LinearMap.sum_apply, Finset.mul_sum, Finset.sum_mul] - simp_all - intro a c b d - rw [schurMul.apply_rankOne] - repeat rw [QuantumSet.Psi_apply] - repeat rw [QuantumSet.PsiToFun_apply] - simp_all + obtain ⟨α, β, rfl⟩ := LinearMap.exists_sum_rankOne f + obtain ⟨γ, δ, rfl⟩ := LinearMap.exists_sum_rankOne g + simp only [map_sum, LinearMap.sum_apply, Finset.mul_sum, Finset.sum_mul] + simp_rw [schurMul.apply_rankOne, QuantumSet.Psi_apply, QuantumSet.PsiToFun_apply, + map_mul, StarMul.star_mul, MulOpposite.op_mul, Algebra.TensorProduct.tmul_mul_tmul] theorem schurMul_assoc {A B : Type*} [starAlgebra A] [starAlgebra B] [hA : QuantumSet A] [QuantumSet B] (f g h : A →ₗ[ℂ] B) : diff --git a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/SchurMulTensor.lean b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/SchurMulTensor.lean index fbdcaf9527..b87751730b 100644 --- a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/SchurMulTensor.lean +++ b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/SchurMulTensor.lean @@ -3,10 +3,12 @@ Copyright (c) 2024 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.TensorProduct -import Mathlib.RingTheory.Coalgebra.TensorProduct +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.TensorProduct +public import Mathlib.RingTheory.Coalgebra.TensorProduct +import Mathlib.Tactic.Positivity.Finset /-! # Schur Multiplication on Tensor Products @@ -15,6 +17,8 @@ This file relates Schur multiplication on tensor-product coalgebras to the fourfold tensor shuffle used by the Monlib4 quantum-set tensor product. -/ +@[expose] public section + open scoped TensorProduct /-- The Mathlib tensor-product factor swap agrees with Monlib4's tensor shuffle. -/ diff --git a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Subset.lean b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Subset.lean index e877f76acd..5b22c090e2 100644 --- a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Subset.lean +++ b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Subset.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.TensorProduct -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.TensorProduct +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.Monlib4.LinearAlgebra.QuantumSet.Subset @@ -14,6 +17,8 @@ import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.QuantumSet.Subset`. -/ +@[expose] public section + /-- Type synonym for a quantum set with its modular exponent shifted to `k`. -/ def QuantumSet.toSubset (k : ℝ) (A : Type*) : Type _ := let _ : ℝ := k diff --git a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Symm.lean b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Symm.lean index 4749d525e9..f428b541b8 100644 --- a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Symm.lean +++ b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/Symm.lean @@ -3,13 +3,16 @@ Copyright (c) 2024 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.IsReal -- import LeanPool.Monlib4.LinearAlgebra.MyIps.Nontracial -import LeanPool.Monlib4.LinearAlgebra.Ips.OpUnop -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic -import LeanPool.Monlib4.LinearAlgebra.Ips.MulOp -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.FiniteDimensional +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic +public import LeanPool.Monlib4.LinearAlgebra.Ips.MulOp +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.Ips.Basic +import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +import Mathlib.FieldTheory.Finiteness +import Mathlib.Tactic.Positivity.Finset /-! # Symmetry Maps for Quantum Sets @@ -18,6 +21,8 @@ This file restores the upstream symmetry map on linear maps between quantum sets, together with its interaction with modular automorphisms and `Psi`. -/ +@[expose] public section + /-- The symmetry map sends a linear map to the adjoint of its real conjugate. -/ @[simps] noncomputable def symmMap (R : Type _) [RCLike R] (M₁ M₂ : Type _) [NormedAddCommGroup M₁] diff --git a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/TensorProduct.lean b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/TensorProduct.lean index c136ab8ef2..f8c1ee3ac3 100644 --- a/LeanPool/Monlib4/LinearAlgebra/QuantumSet/TensorProduct.lean +++ b/LeanPool/Monlib4/LinearAlgebra/QuantumSet/TensorProduct.lean @@ -3,9 +3,13 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.OrthonormalBasis +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Basic +import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.FiniteDimensional +import Mathlib.Tactic.Positivity.Finset /-! # Tensor Products of Quantum Sets @@ -14,6 +18,8 @@ This file restores the upstream tensor-product quantum-set instance and the fourfold tensor-shuffle lemmas used by later quantum-graph files. -/ +@[expose] public section + variable {A : Type*} [ha : starAlgebra A] {B : Type*} [hb : starAlgebra B] diff --git a/LeanPool/Monlib4/LinearAlgebra/TensorProduct.lean b/LeanPool/Monlib4/LinearAlgebra/TensorProduct.lean index 8292d9d10b..cad05d9777 100644 --- a/LeanPool/Monlib4/LinearAlgebra/TensorProduct.lean +++ b/LeanPool/Monlib4/LinearAlgebra/TensorProduct.lean @@ -3,15 +3,19 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.FiniteDimensional -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Lemmas -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.OrthonormalBasis -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Submodule +public import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas +public import LeanPool.Monlib4.LinearAlgebra.TensorProduct.FiniteDimensional +public import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Lemmas +public import LeanPool.Monlib4.LinearAlgebra.TensorProduct.OrthonormalBasis +public import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Submodule +import Mathlib.Analysis.SpecialFunctions.Bernstein /-! # TensorProduct Import-only index for the `TensorProduct` directory of the monlib4 import. -/ + +@[expose] public section diff --git a/LeanPool/Monlib4/LinearAlgebra/TensorProduct/BasicLemmas.lean b/LeanPool/Monlib4/LinearAlgebra/TensorProduct/BasicLemmas.lean index db425a38ff..5f4561834e 100644 --- a/LeanPool/Monlib4/LinearAlgebra/TensorProduct/BasicLemmas.lean +++ b/LeanPool/Monlib4/LinearAlgebra/TensorProduct/BasicLemmas.lean @@ -3,16 +3,18 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import Mathlib.Algebra.Algebra.Bilinear +public import Mathlib.LinearAlgebra.TensorProduct.Basis +public import Mathlib.RingTheory.TensorProduct.Maps import Mathlib.LinearAlgebra.Basis.VectorSpace -import Mathlib.LinearAlgebra.TensorProduct.Basis -import Mathlib.RingTheory.TensorProduct.Maps /-! # Some lemmas about `tensor_product` -/ +@[expose] public section + open scoped TensorProduct BigOperators namespace TensorProduct diff --git a/LeanPool/Monlib4/LinearAlgebra/TensorProduct/FiniteDimensional.lean b/LeanPool/Monlib4/LinearAlgebra/TensorProduct/FiniteDimensional.lean index f8c14ebd53..111eb9e71f 100644 --- a/LeanPool/Monlib4/LinearAlgebra/TensorProduct/FiniteDimensional.lean +++ b/LeanPool/Monlib4/LinearAlgebra/TensorProduct/FiniteDimensional.lean @@ -3,16 +3,11 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.LinearAlgebra.TensorProduct.Basis -import Mathlib.LinearAlgebra.FiniteDimensional.Basic -import Mathlib.Analysis.RCLike.Basic -import Mathlib.Algebra.Star.TensorProduct -import Mathlib.RingTheory.TensorProduct.Finite -import LeanPool.Monlib4.LinearAlgebra.IsReal -import LeanPool.Monlib4.LinearAlgebra.Ips.OpUnop -import LeanPool.Monlib4.LinearAlgebra.Ips.MulOp -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Lemmas +module + +public import LeanPool.Monlib4.LinearAlgebra.IsReal +public import LeanPool.Monlib4.LinearAlgebra.Ips.OpUnop +public import LeanPool.Monlib4.LinearAlgebra.Ips.MulOp /-! @@ -23,6 +18,8 @@ star modules and proves compatibility lemmas for tensor-product maps. -/ +@[expose] public section + open scoped TensorProduct BigOperators diff --git a/LeanPool/Monlib4/LinearAlgebra/TensorProduct/Lemmas.lean b/LeanPool/Monlib4/LinearAlgebra/TensorProduct/Lemmas.lean index 28d7b6fdd7..99108f8fc7 100644 --- a/LeanPool/Monlib4/LinearAlgebra/TensorProduct/Lemmas.lean +++ b/LeanPool/Monlib4/LinearAlgebra/TensorProduct/Lemmas.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import Mathlib.LinearAlgebra.TensorProduct.Map -import Mathlib.RingTheory.TensorProduct.Maps -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas -import LeanPool.Monlib4.Preq.StarAlgEquiv +public import Mathlib.RingTheory.TensorProduct.Maps +public import Mathlib.LinearAlgebra.DFinsupp /-! # Tensor-product map lemmas @@ -16,6 +15,8 @@ This file contains compatibility lemmas and equivalences for tensor-product maps used by the Monlib4 port. -/ +@[expose] public section + open scoped TensorProduct theorem Algebra.TensorProduct.map_apply_map_apply {R : Type _} [CommSemiring R] diff --git a/LeanPool/Monlib4/LinearAlgebra/TensorProduct/OrthonormalBasis.lean b/LeanPool/Monlib4/LinearAlgebra/TensorProduct/OrthonormalBasis.lean index 8424d45eea..872f915afb 100644 --- a/LeanPool/Monlib4/LinearAlgebra/TensorProduct/OrthonormalBasis.lean +++ b/LeanPool/Monlib4/LinearAlgebra/TensorProduct/OrthonormalBasis.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.FiniteDimensional -import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +public import Mathlib.LinearAlgebra.TensorProduct.Basis +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Orthonormal Bases of Tensor Products @@ -15,6 +19,8 @@ including `OrthonormalBasis.tensorProduct` and its simp lemmas, are already avai from current Mathlib through the imports above. -/ +@[expose] public section + open scoped TensorProduct namespace Basis diff --git a/LeanPool/Monlib4/LinearAlgebra/TensorProduct/Submodule.lean b/LeanPool/Monlib4/LinearAlgebra/TensorProduct/Submodule.lean index 766c59ba41..1213d1853a 100644 --- a/LeanPool/Monlib4/LinearAlgebra/TensorProduct/Submodule.lean +++ b/LeanPool/Monlib4/LinearAlgebra/TensorProduct/Submodule.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ - -import LeanPool.Monlib4.LinearAlgebra.Ips.MinimalProj -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.OrthonormalBasis -import Mathlib.LinearAlgebra.TensorProduct.Finiteness -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul -import Mathlib.LinearAlgebra.TensorProduct.RightExactness -import LeanPool.Monlib4.LinearAlgebra.PiDirectSum -import LeanPool.Monlib4.LinearAlgebra.Matrix.Reshape +module + +public import LeanPool.Monlib4.LinearAlgebra.PiDirectSum +public import LeanPool.Monlib4.LinearAlgebra.Matrix.Reshape +public import LeanPool.Monlib4.LinearAlgebra.Ips.RankOne +public import Mathlib.Analysis.InnerProductSpace.TensorProduct +public import Mathlib.RingTheory.Coalgebra.CoassocSimps +import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.FieldTheory.Finiteness /-! # LeanPool.Monlib4.LinearAlgebra.TensorProduct.Submodule @@ -18,6 +21,8 @@ import LeanPool.Monlib4.LinearAlgebra.Matrix.Reshape Imported Lean Pool material for `LeanPool.Monlib4.LinearAlgebra.TensorProduct.Submodule`. -/ +@[expose] public section + open scoped TensorProduct /-- The submodule of a tensor product generated by tensors from two submodules. -/ diff --git a/LeanPool/Monlib4/LinearAlgebra/ToMatrixOfEquiv.lean b/LeanPool/Monlib4/LinearAlgebra/ToMatrixOfEquiv.lean index 4534249a38..63327058de 100644 --- a/LeanPool/Monlib4/LinearAlgebra/ToMatrixOfEquiv.lean +++ b/LeanPool/Monlib4/LinearAlgebra/ToMatrixOfEquiv.lean @@ -3,15 +3,12 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import Mathlib.Algebra.Algebra.Equiv -import Mathlib.Analysis.Complex.Basic -import Mathlib.Analysis.InnerProductSpace.Adjoint -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Analysis.RCLike.Basic -import LeanPool.Monlib4.LinearAlgebra.InnerAut -import LeanPool.Monlib4.LinearAlgebra.Matrix.Reshape -import LeanPool.Monlib4.Preq.StarAlgEquiv +public import LeanPool.Monlib4.LinearAlgebra.InnerAut +public import LeanPool.Monlib4.LinearAlgebra.Matrix.Reshape +public import LeanPool.Monlib4.Preq.StarAlgEquiv +import Mathlib.Analysis.SpecialFunctions.Bernstein /-! # Linear equivalence conjugation compatibility @@ -20,6 +17,8 @@ Mathlib's `LinearEquiv.conjAlgEquiv` is the current version of the upstream `LinearEquiv.innerConj` construction used by the Monlib4 `IncludeBlock` slice. -/ +@[expose] public section + open scoped BigOperators open Matrix Module.End InnerProductSpace diff --git a/LeanPool/Monlib4/Monlib.lean b/LeanPool/Monlib4/Monlib.lean index a99e7f01e0..3c2e42f91b 100644 --- a/LeanPool/Monlib4/Monlib.lean +++ b/LeanPool/Monlib4/Monlib.lean @@ -3,15 +3,24 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra -import LeanPool.Monlib4.Other -import LeanPool.Monlib4.Preq -import LeanPool.Monlib4.QuantumGraph -import LeanPool.Monlib4.RepTheory +public import LeanPool.Monlib4.LinearAlgebra +public import LeanPool.Monlib4.Other +public import LeanPool.Monlib4.Preq +public import LeanPool.Monlib4.QuantumGraph +public import LeanPool.Monlib4.RepTheory + +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Combinatorics.SimpleGraph.Init +import Mathlib.Tactic.Measurability.Init +import Mathlib.Tactic.NormNum.GCD /-! # Monlib4 import root Compatibility root corresponding to upstream `Monlib.lean`. -/ + +@[expose] public section diff --git a/LeanPool/Monlib4/Other.lean b/LeanPool/Monlib4/Other.lean index fba49c9b9f..c75cac7108 100644 --- a/LeanPool/Monlib4/Other.lean +++ b/LeanPool/Monlib4/Other.lean @@ -3,11 +3,20 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.Other.Sonia +public import LeanPool.Monlib4.Other.Sonia +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Measurability.Init +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Other Import-only index for miscellaneous self-contained monlib4 files. -/ + +@[expose] public section diff --git a/LeanPool/Monlib4/Other/Sonia.lean b/LeanPool/Monlib4/Other/Sonia.lean index cbfa881733..317b6d0212 100644 --- a/LeanPool/Monlib4/Other/Sonia.lean +++ b/LeanPool/Monlib4/Other/Sonia.lean @@ -3,22 +3,17 @@ Copyright (c) 2024 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module + +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Fintype.Basic import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel -import Init.Data.Nat.Lemmas +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Measurability.Init +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! @@ -39,6 +34,8 @@ In both of the following results, `b` is a natural number greater than `1`. -/ +@[expose] public section + open scoped BigOperators diff --git a/LeanPool/Monlib4/Preq.lean b/LeanPool/Monlib4/Preq.lean index 86997f99cf..7e30094817 100644 --- a/LeanPool/Monlib4/Preq.lean +++ b/LeanPool/Monlib4/Preq.lean @@ -3,18 +3,24 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.Preq.Complex -import LeanPool.Monlib4.Preq.Dite -import LeanPool.Monlib4.Preq.Equiv -import LeanPool.Monlib4.Preq.Finset -import LeanPool.Monlib4.Preq.Ites -import LeanPool.Monlib4.Preq.RCLikeLe -import LeanPool.Monlib4.Preq.Set -import LeanPool.Monlib4.Preq.StarAlgEquiv +public import LeanPool.Monlib4.Preq.Complex +public import LeanPool.Monlib4.Preq.Dite +public import LeanPool.Monlib4.Preq.Equiv +public import LeanPool.Monlib4.Preq.Finset +public import LeanPool.Monlib4.Preq.Ites +public import LeanPool.Monlib4.Preq.RCLikeLe +public import LeanPool.Monlib4.Preq.Set +public import LeanPool.Monlib4.Preq.StarAlgEquiv +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # Preq Import-only index for the `Preq` directory of the monlib4 import. -/ + +@[expose] public section diff --git a/LeanPool/Monlib4/Preq/Complex.lean b/LeanPool/Monlib4/Preq/Complex.lean index f22ad505c1..533bda99a0 100644 --- a/LeanPool/Monlib4/Preq/Complex.lean +++ b/LeanPool/Monlib4/Preq/Complex.lean @@ -3,8 +3,9 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Basic.Complex.Basic -import Mathlib.Analysis.Complex.Norm +module + +public import Mathlib.Analysis.Complex.Norm import Mathlib.Algebra.BigOperators.Fin import Mathlib.Basic.Complex.BigOperators @@ -16,6 +17,8 @@ This file contains some basic lemmas about complex numbers. -/ +@[expose] public section + open scoped ComplexConjugate BigOperators diff --git a/LeanPool/Monlib4/Preq/Dite.lean b/LeanPool/Monlib4/Preq/Dite.lean index 7039d174ff..bee6e8da96 100644 --- a/LeanPool/Monlib4/Preq/Dite.lean +++ b/LeanPool/Monlib4/Preq/Dite.lean @@ -3,15 +3,17 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Basic.Logic.Basic -import Mathlib.Algebra.Group.Defs -import Mathlib.Algebra.Star.Basic -import Mathlib.LinearAlgebra.TensorProduct.Basic +module + +public import Mathlib.Algebra.Star.Basic +public import Mathlib.LinearAlgebra.TensorProduct.Defs /-! # Some stuff on dites -/ +@[expose] public section + theorem ite_eq_ite_iff {α : Type _} (a b c : α) : (∀ {p : Prop} [hp : Decidable p], @ite α p hp a c = @ite α p hp b c) ↔ a = b := by diff --git a/LeanPool/Monlib4/Preq/Equiv.lean b/LeanPool/Monlib4/Preq/Equiv.lean index d4a5802332..66ed1cf522 100644 --- a/LeanPool/Monlib4/Preq/Equiv.lean +++ b/LeanPool/Monlib4/Preq/Equiv.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.LinearAlgebra.Matrix.Basic -import Mathlib.Data.Matrix.PEquiv -import Mathlib.LinearAlgebra.UnitaryGroup +public import Mathlib.Data.Matrix.PEquiv +public import Mathlib.LinearAlgebra.UnitaryGroup +import LeanPool.Monlib4.Preq.Ites +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.Monlib4.Preq.Equiv @@ -14,6 +18,8 @@ import Mathlib.LinearAlgebra.UnitaryGroup Imported Lean Pool material for `LeanPool.Monlib4.Preq.Equiv`. -/ +@[expose] public section + theorem Equiv.Perm.ToPequiv.toMatrix_mem_unitaryGroup {n : Type _} [DecidableEq n] [Fintype n] {𝕜 : Type _} [CommRing 𝕜] [StarRing 𝕜] (σ : Equiv.Perm n) : (Equiv.toPEquiv σ).toMatrix ∈ Matrix.unitaryGroup n 𝕜 := by diff --git a/LeanPool/Monlib4/Preq/Finset.lean b/LeanPool/Monlib4/Preq/Finset.lean index 18f1f1d9c2..8eedd117b5 100644 --- a/LeanPool/Monlib4/Preq/Finset.lean +++ b/LeanPool/Monlib4/Preq/Finset.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Algebra.Group.Defs -import Mathlib.Data.Finset.Basic +module + +public import Mathlib.Data.Fintype.Prod +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import Mathlib.Algebra.BigOperators.Group.Finset.Sigma -import Mathlib.Data.Fintype.Prod /-! @@ -16,6 +17,8 @@ In this file we provide some elementary results for summations -/ +@[expose] public section + namespace Finset diff --git a/LeanPool/Monlib4/Preq/Ites.lean b/LeanPool/Monlib4/Preq/Ites.lean index 3649aa0fd3..ce9120fa1f 100644 --- a/LeanPool/Monlib4/Preq/Ites.lean +++ b/LeanPool/Monlib4/Preq/Ites.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Algebra.Star.Basic -import Mathlib.Algebra.Module.LinearMap.Basic -import Mathlib.LinearAlgebra.TensorProduct.Basic -import Mathlib.LinearAlgebra.TensorProduct.Map +module + +public import Mathlib.Algebra.Star.Basic +public import Mathlib.LinearAlgebra.TensorProduct.Map /-! # Some stuff on ites @@ -14,6 +14,8 @@ import Mathlib.LinearAlgebra.TensorProduct.Map Some lemmas about `ite` and `coe` for `star` and `tensor_product`. -/ +@[expose] public section + @[simp] theorem star_ite {α : Type _} [InvolutiveStar α] (P : Prop) [Decidable P] (a b : α) : diff --git a/LeanPool/Monlib4/Preq/RCLikeLe.lean b/LeanPool/Monlib4/Preq/RCLikeLe.lean index 367fd76e21..5f7ccf1f81 100644 --- a/LeanPool/Monlib4/Preq/RCLikeLe.lean +++ b/LeanPool/Monlib4/Preq/RCLikeLe.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Analysis.RCLike.Basic +module + +public import Mathlib.Analysis.RCLike.Basic /-! # Extra lemmas on RCLike @@ -11,6 +13,8 @@ import Mathlib.Analysis.RCLike.Basic This file contains extra lemmas on `RCLike`. -/ +@[expose] public section + namespace RCLike variable {𝕜 : Type _} [RCLike 𝕜] diff --git a/LeanPool/Monlib4/Preq/Set.lean b/LeanPool/Monlib4/Preq/Set.lean index f81f2353d6..389b1fa98d 100644 --- a/LeanPool/Monlib4/Preq/Set.lean +++ b/LeanPool/Monlib4/Preq/Set.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.GroupTheory.Subsemigroup.Center -import Mathlib.Algebra.Group.Prod +module + +public import Mathlib.GroupTheory.Subsemigroup.Center +public import Mathlib.Algebra.Group.Prod + +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # Set center lemmas @@ -12,3 +17,5 @@ import Mathlib.Algebra.Group.Prod `Set.center_prod` and `Set.center_pi` are now in Mathlib; this file only re-exports the relevant imports for downstream files. -/ + +@[expose] public section diff --git a/LeanPool/Monlib4/Preq/StarAlgEquiv.lean b/LeanPool/Monlib4/Preq/StarAlgEquiv.lean index c17bdc7691..662612ce26 100644 --- a/LeanPool/Monlib4/Preq/StarAlgEquiv.lean +++ b/LeanPool/Monlib4/Preq/StarAlgEquiv.lean @@ -3,10 +3,11 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Algebra.Star.StarAlgHom -import Mathlib.Algebra.Algebra.Equiv +module + +public import Mathlib.Algebra.Star.StarAlgHom +public import Mathlib.LinearAlgebra.Span.Defs import Mathlib.LinearAlgebra.Span.Basic -import Mathlib.Algebra.Star.Pi /-! # Some stuff on star algebra equivalences @@ -14,6 +15,8 @@ import Mathlib.Algebra.Star.Pi This file contains some obvious definitions and lemmas on star algebra equivalences. -/ +@[expose] public section + theorem AlgEquiv.comp_inj {R A B C : Type _} [CommSemiring R] [Semiring A] [Semiring B] [Semiring C] [Algebra R A] [Algebra R B] [Algebra R C] (f : B ≃ₐ[R] C) (S T : A →ₗ[R] B) : diff --git a/LeanPool/Monlib4/QuantumGraph.lean b/LeanPool/Monlib4/QuantumGraph.lean index c5a95674be..fdad422a1f 100644 --- a/LeanPool/Monlib4/QuantumGraph.lean +++ b/LeanPool/Monlib4/QuantumGraph.lean @@ -3,22 +3,26 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.QuantumGraph.Basic -import LeanPool.Monlib4.QuantumGraph.Degree -import LeanPool.Monlib4.QuantumGraph.Example -import LeanPool.Monlib4.QuantumGraph.Grad -import LeanPool.Monlib4.QuantumGraph.Iso -import LeanPool.Monlib4.QuantumGraph.Matrix -import LeanPool.Monlib4.QuantumGraph.Nontracial -import LeanPool.Monlib4.QuantumGraph.OfClassicalGraph -import LeanPool.Monlib4.QuantumGraph.PiMat -import LeanPool.Monlib4.QuantumGraph.PiMatFinTwo -import LeanPool.Monlib4.QuantumGraph.QamA -import LeanPool.Monlib4.QuantumGraph.QamAExample -import LeanPool.Monlib4.QuantumGraph.ToProjections +module + +public import LeanPool.Monlib4.QuantumGraph.Basic +public import LeanPool.Monlib4.QuantumGraph.Degree +public import LeanPool.Monlib4.QuantumGraph.Example +public import LeanPool.Monlib4.QuantumGraph.Grad +public import LeanPool.Monlib4.QuantumGraph.Iso +public import LeanPool.Monlib4.QuantumGraph.Matrix +public import LeanPool.Monlib4.QuantumGraph.Nontracial +public import LeanPool.Monlib4.QuantumGraph.OfClassicalGraph +public import LeanPool.Monlib4.QuantumGraph.PiMat +public import LeanPool.Monlib4.QuantumGraph.PiMatFinTwo +public import LeanPool.Monlib4.QuantumGraph.QamA +public import LeanPool.Monlib4.QuantumGraph.QamAExample +public import LeanPool.Monlib4.QuantumGraph.ToProjections /-! # LeanPool.Monlib4.QuantumGraph Imported Lean Pool material for `LeanPool.Monlib4.QuantumGraph`. -/ + +@[expose] public section diff --git a/LeanPool/Monlib4/QuantumGraph/Basic.lean b/LeanPool/Monlib4/QuantumGraph/Basic.lean index d274f61e48..d3fa298c56 100644 --- a/LeanPool/Monlib4/QuantumGraph/Basic.lean +++ b/LeanPool/Monlib4/QuantumGraph/Basic.lean @@ -3,18 +3,22 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Symm -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Lemmas -import LeanPool.Monlib4.LinearAlgebra.Ips.MinimalProj -import LeanPool.Monlib4.LinearAlgebra.PosMapIsReal -import LeanPool.Monlib4.LinearAlgebra.MyBimodule -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Submodule -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.PhiMap -import LeanPool.Monlib4.LinearAlgebra.Ips.Functional -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.TensorProduct -import Mathlib.LinearAlgebra.TensorProduct.Opposite +module + +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Symm +public import LeanPool.Monlib4.LinearAlgebra.Ips.MinimalProj +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.PhiMap +public import LeanPool.Monlib4.LinearAlgebra.Ips.Functional +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.TensorProduct +public import Mathlib.LinearAlgebra.TensorProduct.Opposite +public import LeanPool.Monlib4.LinearAlgebra.TensorProduct.FiniteDimensional +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.Ips.Basic +import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Subset +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas +import LeanPool.Monlib4.Preq.Finset /-! # LeanPool.Monlib4.QuantumGraph.Basic @@ -22,6 +26,8 @@ import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Subset Imported Lean Pool material for `LeanPool.Monlib4.QuantumGraph.Basic`. -/ +@[expose] public section + local notation x " ⊗ₘ " y => TensorProduct.map x y instance FiniteDimensional.innerProductSpace.complete {E : Type*} [NormedAddCommGroup E] diff --git a/LeanPool/Monlib4/QuantumGraph/Degree.lean b/LeanPool/Monlib4/QuantumGraph/Degree.lean index 9349d3d7fb..83b712e9b7 100644 --- a/LeanPool/Monlib4/QuantumGraph/Degree.lean +++ b/LeanPool/Monlib4/QuantumGraph/Degree.lean @@ -3,10 +3,15 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.PhiMap -import LeanPool.Monlib4.QuantumGraph.Basic -import Mathlib.LinearAlgebra.TensorProduct.Opposite -import LeanPool.Monlib4.QuantumGraph.Example +module + +public import LeanPool.Monlib4.QuantumGraph.Basic +public import LeanPool.Monlib4.QuantumGraph.Example +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Subset +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.Ips.Basic +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Submodule +import LeanPool.Monlib4.Preq.RCLikeLe /-! # LeanPool.Monlib4.QuantumGraph.Degree @@ -14,6 +19,8 @@ import LeanPool.Monlib4.QuantumGraph.Example Imported Lean Pool material for `LeanPool.Monlib4.QuantumGraph.Degree`. -/ +@[expose] public section + open scoped InnerProductSpace ComplexOrder theorem schurProjection.innerOne_map_one_nonneg diff --git a/LeanPool/Monlib4/QuantumGraph/Example.lean b/LeanPool/Monlib4/QuantumGraph/Example.lean index cfb70cc1f8..a4ec4c2e51 100644 --- a/LeanPool/Monlib4/QuantumGraph/Example.lean +++ b/LeanPool/Monlib4/QuantumGraph/Example.lean @@ -3,12 +3,20 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.QuantumGraph.Basic -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Pi -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.TensorProduct -import LeanPool.Monlib4.LinearAlgebra.Ips.MatIps -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Instances -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.DeltaForm +module + +public import Mathlib.Analysis.Normed.Module.FiniteDimension + +public import Mathlib.Analysis.InnerProductSpace.Adjoint + +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.DeltaForm +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Symm +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.Ips.Basic +import LeanPool.Monlib4.LinearAlgebra.Matrix.PiMat +import LeanPool.Monlib4.Preq.RCLikeLe +import Mathlib.Analysis.SpecialFunctions.Bernstein /-! # Basic examples on quantum adjacency matrices @@ -17,12 +25,14 @@ import LeanPool.Monlib4.LinearAlgebra.QuantumSet.DeltaForm such as the complete graph and the trivial graph. -/ +@[expose] public section + -- import quantum_graph.basic -- import quantum_graph.basic open TensorProduct Matrix -open scoped TensorProduct BigOperators Kronecker Matrix Functional +open scoped TensorProduct BigOperators Kronecker Matrix variable {p : Type _} [Fintype p] [DecidableEq p] {n : p → Type _} [∀ i, Fintype (n i)] [∀ i, DecidableEq (n i)] @@ -98,7 +108,11 @@ lemma Qam.Nontracial.CompleteGraph.adjoint_eq {E₁ E₂ : Type _} [NormedAddCom [NormedAddCommGroupOfRing E₂] [InnerProductSpace ℂ E₁] [InnerProductSpace ℂ E₂] [FiniteDimensional ℂ E₁] [FiniteDimensional ℂ E₂] : LinearMap.adjoint (Qam.completeGraph E₁ E₂) = Qam.completeGraph E₂ E₁ := -by rw [completeGraph_eq, ContinuousLinearMap.linearMap_adjoint, rankOne_adjoint]; rfl +by + let := FiniteDimensional.complete ℂ E₁ + let := FiniteDimensional.complete ℂ E₂ + rw [completeGraph_eq, ContinuousLinearMap.linearMap_adjoint, rankOne_adjoint] + rfl theorem Qam.Nontracial.CompleteGraph.isSelfAdjoint {E : Type _} [One E] [NormedAddCommGroup E] [InnerProductSpace ℂ E] [FiniteDimensional ℂ E] : diff --git a/LeanPool/Monlib4/QuantumGraph/Grad.lean b/LeanPool/Monlib4/QuantumGraph/Grad.lean index 170d8bb498..b0260c2806 100644 --- a/LeanPool/Monlib4/QuantumGraph/Grad.lean +++ b/LeanPool/Monlib4/QuantumGraph/Grad.lean @@ -3,8 +3,11 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.QuantumGraph.Basic -import LeanPool.Monlib4.QuantumGraph.Degree +module + +public import LeanPool.Monlib4.QuantumGraph.Degree +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert /-! # LeanPool.Monlib4.QuantumGraph.Grad @@ -12,6 +15,8 @@ import LeanPool.Monlib4.QuantumGraph.Degree Imported Lean Pool material for `LeanPool.Monlib4.QuantumGraph.Grad`. -/ +@[expose] public section + variable {B : Type*} [starAlgebra B] [QuantumSet B] open scoped TensorProduct diff --git a/LeanPool/Monlib4/QuantumGraph/Iso.lean b/LeanPool/Monlib4/QuantumGraph/Iso.lean index f22b010cbf..65fc2494be 100644 --- a/LeanPool/Monlib4/QuantumGraph/Iso.lean +++ b/LeanPool/Monlib4/QuantumGraph/Iso.lean @@ -3,8 +3,16 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.QuantumGraph.Basic -import LeanPool.Monlib4.QuantumGraph.Example +module + +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Instances +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Symm +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.TensorProduct +import LeanPool.Monlib4.LinearAlgebra.Ips.Basic +import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +import LeanPool.Monlib4.LinearAlgebra.MulPrimePrime +import LeanPool.Monlib4.LinearAlgebra.MySpec /-! # Isomorphisms between quantum graphs @@ -12,6 +20,8 @@ import LeanPool.Monlib4.QuantumGraph.Example This file defines isomorphisms between quantum graphs. -/ +@[expose] public section + open TensorProduct Matrix diff --git a/LeanPool/Monlib4/QuantumGraph/Matrix.lean b/LeanPool/Monlib4/QuantumGraph/Matrix.lean index 327e8d9d40..1aba7aaae6 100644 --- a/LeanPool/Monlib4/QuantumGraph/Matrix.lean +++ b/LeanPool/Monlib4/QuantumGraph/Matrix.lean @@ -3,7 +3,11 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.QuantumGraph.PiMatFinTwo +module + +public import LeanPool.Monlib4.QuantumGraph.PiMatFinTwo +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.Preq.Finset /-! # LeanPool.Monlib4.QuantumGraph.Matrix @@ -11,6 +15,8 @@ import LeanPool.Monlib4.QuantumGraph.PiMatFinTwo Imported Lean Pool material for `LeanPool.Monlib4.QuantumGraph.Matrix`. -/ +@[expose] public section + open scoped Functional MatrixOrder ComplexOrder TensorProduct Matrix open scoped Kronecker @@ -627,6 +633,31 @@ theorem counit_eq_traceLinearMap_of_counit_eq_piMat_traceLinearMap simp only [LinearMap.coe_comp, Function.comp_apply, AlgHom.toLinearMap_apply, traceLinearMap_apply, blockDiagonal'AlgHom_apply, blockDiagonal'_includeBlock_trace'] +/-- A reflexive self-adjoint quantum graph on at least two nonzero matrix blocks cannot have +exactly one edge when the counit is the trace. -/ +theorem QuantumGraph.Real.numOfEdges_ne_one_of_isSelfAdjoint_and_reflexive + {ι : Type*} [Fintype ι] [DecidableEq ι] [Nontrivial ι] + {p : ι → Type*} [∀ i, Fintype (p i)] [∀ i, DecidableEq (p i)] [∀ i, Nonempty (p i)] + {φ : Π i, Module.Dual ℂ (Matrix (p i) (p i) ℂ)} [hφ : Π i, (φ i).IsFaithfulPosMap] : + withPiBlockCoalgebraQuantum[φ] + (Coalgebra.counit (R := ℂ) (A := PiMat ℂ ι p) = PiMat.traceLinearMap) → + ∀ {A : PiMat ℂ ι p →ₗ[ℂ] PiMat ℂ ι p}, (hA : QuantumGraph.Real _ A) → + LinearMap.adjoint A = A → A •ₛ 1 = 1 → QuantumGraph.NumOfEdges A ≠ 1 := by + withPiBlockCoalgebraQuantumCtx[φ] + intro hc A hA hself href hdim + rw [← QuantumGraph.dimOfPiMatSubmodule_eq_numOfEdges_of_trace_counit hc hA.toQuantumGraph, + Nat.cast_eq_one] at hdim + obtain ⟨i, hi, _⟩ := + hA.exists_unique_includeMap_of_adjoint_and_dim_ofPiMatSubmodule_eq_one hself hdim + obtain ⟨j, hji⟩ := exists_ne i + have hproj : LinearMap.proj j ∘ₗ A = 0 := by + rw [← hi, ← LinearMap.comp_assoc, LinearMap.proj_adjoint, + LinearMap.proj_comp_single_ne _ _ _ _ hji, LinearMap.zero_comp] + have hzero := schurMul_proj_comp A 1 j + rw [hproj, href, LinearMap.comp_one] at hzero + have hone := LinearMap.congr_fun hzero (1 : PiMat ℂ ι p) + simp at hone + theorem QuantumGraph.Real.PiMatFinTwo_same_isSelfAdjoint_reflexive_and_numOfEdges_eq_one {φ : Π i, Module.Dual ℂ (Matrix (PiFinTwoSame n i) (PiFinTwoSame n i) ℂ)} [hφ : Π i, (φ i).IsFaithfulPosMap] @@ -659,53 +690,7 @@ theorem QuantumGraph.Real.PiMatFinTwo_same_isSelfAdjoint_reflexive_and_numOfEdge let := fun i => (Matrix.quantumSetDeltaForm (φ := φ i) : QuantumSetDeltaForm (Mat ℂ (PiFinTwoSame n i))) intro hc A hA hA₂ hA₃ hA₄ - obtain (hf | hf) := hA.piFinTwo_same_exists_matrix_map_eq_map_of_adjoint_and_dim_eq_one hA₂ - (by rw [← Nat.cast_inj (R := ℂ), - QuantumGraph.dimOfPiMatSubmodule_eq_numOfEdges_of_trace_counit (hφ := hφ) hc, hA₄, - Nat.cast_one]) - on_goal 1 => - let i : Fin 2 := 0 - let f := LinearMap.proj i ∘ₗ A ∘ₗ LinearMap.adjoint (LinearMap.proj i) - left - on_goal 2 => - let i : Fin 2 := 1 - let f := LinearMap.proj i ∘ₗ A ∘ₗ LinearMap.adjoint (LinearMap.proj i) - right - all_goals - have hf₁ : f = LinearMap.proj i ∘ₗ A ∘ₗ LinearMap.adjoint (LinearMap.proj i) := rfl - have hf₂ : QuantumGraph.Real _ f := QuantumGraph.Real.conj_proj_isReal hA _ - have hf₃ : f •ₛ 1 = 1 := by - let proj : PiMat ℂ (Fin 2) (PiFinTwoSame n) →ₗ[ℂ] Mat ℂ (PiFinTwoSame n i) := - LinearMap.proj i - let adj : Mat ℂ (PiFinTwoSame n i) →ₗ[ℂ] PiMat ℂ (Fin 2) (PiFinTwoSame n) := - LinearMap.adjoint proj - have hcomp : (proj ∘ₗ A ∘ₗ adj) •ₛ (proj ∘ₗ adj) = - (proj ∘ₗ (A •ₛ 1)) ∘ₗ adj := by - calc - (proj ∘ₗ A ∘ₗ adj) •ₛ (proj ∘ₗ adj) - = ((proj ∘ₗ A) •ₛ proj) ∘ₗ adj := by - simpa only [proj, adj, LinearMap.comp_assoc] using - (schurMul_comp_proj_adjoint (hφ := hφ) (LinearMap.proj i ∘ₗ A) - (LinearMap.proj i) i) - _ = (proj ∘ₗ (A •ₛ 1)) ∘ₗ adj := by - congr 1 - simpa only [proj, LinearMap.comp_one] using - (schurMul_proj_comp A 1 i) - rw [hf₁] - change (proj ∘ₗ A ∘ₗ adj) •ₛ LinearMap.id = LinearMap.id - simpa only [proj, adj, hA₃, LinearMap.one_comp, LinearMap.comp_one, LinearMap.proj_adjoint, - LinearMap.proj_comp_single_same] using hcomp - have hf₄ : QuantumGraph.NumOfEdges f = 1 := by - rw [QuantumGraph.NumOfEdges_eq, ← hf] at hA₄ - simp only [LinearMap.comp_apply, LinearMap.adjoint_inner_right] at hA₄ - simp only [← LinearMap.comp_apply, ← LinearMap.comp_assoc] at hA₄ - rw [LinearMap.comp_assoc _ A _, ← hf₁, LinearMap.comp_apply, LinearMap.proj_apply, - Pi.one_apply] at hA₄ - exact hA₄ - rw [reflexive_matrix_numOfEdges_eq_one_iff_eq_trivialGraph_of_counit_eq_trace - (counit_eq_traceLinearMap_of_counit_eq_piMat_traceLinearMap hc _) hf₂ (by rw [hf₃])] at hf₄ - rw [← hf₄, hf₁] - simp only [i, LinearMap.comp_assoc, hf] + exact (hA.numOfEdges_ne_one_of_isSelfAdjoint_and_reflexive hc hA₂ hA₃ hA₄).elim /-- Isomorphism data between two quantum graphs via a star-algebra equivalence. -/ class QuantumGraph.equiv @@ -845,70 +830,4 @@ theorem (R := ℂ) (A := Mat ℂ (PiFinTwoSame n i)) : Coalgebra ℂ (Mat ℂ (PiFinTwoSame n i))) intro hc A hA hA₂ hA₃ hA₄ - rw [← QuantumGraph.dimOfPiMatSubmodule_eq_numOfEdges_of_trace_counit hc hA.toQuantumGraph, - Nat.cast_eq_one] at hA₄ - obtain ⟨i, hi, hf⟩ := - hA.exists_unique_includeMap_of_adjoint_and_dim_ofPiMatSubmodule_eq_one hA₂ hA₄ - let p : (j : Fin 2) → PiMat ℂ (Fin 2) (PiFinTwoSame n) →ₗ[ℂ] - Mat ℂ (PiFinTwoSame n j) := fun j => LinearMap.proj j - have hp : ∀ j, p j = LinearMap.proj j := fun j => rfl - have : ∀ j, p j ∘ₗ LinearMap.adjoint (p j) = 1 := - fun j => by - simp only [LinearMap.proj_adjoint, p, Module.End.one_eq_id, LinearMap.proj_comp_single_same] - have this' : ∀ j, (p j ∘ₗ A ∘ₗ LinearMap.adjoint (p j)) •ₛ 1 = 1 := - fun j => by - calc (p j ∘ₗ A ∘ₗ LinearMap.adjoint (p j)) •ₛ 1 - = (p j ∘ₗ A ∘ₗ LinearMap.adjoint (p j) ∘ₗ 1) •ₛ (p j ∘ₗ 1 ∘ₗ LinearMap.adjoint (p j)) := - by simp only [LinearMap.one_comp, LinearMap.comp_one, this] - _ = p j ∘ₗ ((A ∘ₗ LinearMap.adjoint (p j)) •ₛ (1 ∘ₗ LinearMap.adjoint (p j))) := by - simp only [p] - rw [schurMul_proj_comp] - simp only [LinearMap.comp_one] - _ = p j ∘ₗ (A •ₛ 1) ∘ₗ LinearMap.adjoint (p j) := by - simp only [p] - rw [schurMul_comp_proj_adjoint (hφ := fun _ => hφ)] - _ = 1 := by simp only [hA₃, LinearMap.one_comp, this] - have := - calc - LinearMap.adjoint (p i) ∘ₗ p i + ∑ j ∈ Finset.univ \ {i}, LinearMap.adjoint (p j) ∘ₗ p j - = ∑ j, LinearMap.adjoint (p j) ∘ₗ p j := by - simp_all - _ = 1 := by - rw [Module.End.one_eq_id, ← LinearMap.sum_single_comp_proj] - simp only [p, LinearMap.proj_adjoint] - _ = A •ₛ 1 := hA₃.symm - _ = ∑ j, (LinearMap.adjoint (p i) ∘ₗ (p i) ∘ₗ A ∘ₗ LinearMap.adjoint (p i) ∘ₗ (p i)) - •ₛ (LinearMap.adjoint (p j) ∘ₗ 1 ∘ₗ p j) := by - simp only [p, hi] - simp_rw [← map_sum, - LinearMap.one_comp] - congr - rw [Module.End.one_eq_id, ← LinearMap.sum_single_comp_proj] - simp only [LinearMap.proj_adjoint] - _ = (LinearMap.adjoint (p i) ∘ₗ (p i) ∘ₗ A ∘ₗ LinearMap.adjoint (p i) ∘ₗ (p i)) - •ₛ (LinearMap.adjoint (p i) ∘ₗ 1 ∘ₗ p i) - + ∑ j ∈ Finset.univ \ {i}, - (LinearMap.adjoint (p i) ∘ₗ (p i) ∘ₗ A ∘ₗ LinearMap.adjoint (p i) ∘ₗ (p i)) - •ₛ (LinearMap.adjoint (p j) ∘ₗ 1 ∘ₗ p j) := by - simp_all - _ = LinearMap.adjoint (p i) ∘ₗ p i := by - simp only [p, schurMul_proj_adjoint_comp] - simp only [← LinearMap.comp_assoc, schurMul_comp_proj] - simp only [LinearMap.comp_assoc, ← hp, this'] - simp only [LinearMap.one_comp, add_eq_left] - apply Finset.sum_eq_zero - simp only [Finset.mem_sdiff, Finset.mem_univ, Finset.mem_singleton, true_and] - push Not - intro j hj - rw [schurMul_proj_adjoint_comp_of_ne_eq_zero (hφ := fun _ => hφ) hj.symm] - simp only [Finset.subset_univ, Finset.sum_sdiff_eq_sub, Fin.sum_univ_two, Fin.isValue, - Finset.sum_singleton, add_sub_cancel, LinearMap.ext_iff, LinearMap.add_apply, - LinearMap.comp_apply, LinearMap.proj_apply, LinearMap.proj_adjoint_apply, funext_iff, - Pi.add_apply, p] at this - have hii : i = 0 ∨ i = 1 := Fin.exists_fin_two.mp ⟨i, rfl⟩ - specialize this 1 (if i = 0 then 1 else 0) - rcases hii with (hii | hii) - <;> rw [hii] at this - <;> simp only [add_eq_left, add_eq_right, includeBlock_apply, dite_eq_right_iff] at this - <;> simp only [Fin.isValue, ↓reduceIte, ↓dreduceIte, Pi.one_apply, eq_mp_eq_cast, cast_eq, - one_ne_zero, imp_false, not_true_eq_false] at this + exact (hA.numOfEdges_ne_one_of_isSelfAdjoint_and_reflexive hc hA₂ hA₃ hA₄).elim diff --git a/LeanPool/Monlib4/QuantumGraph/Nontracial.lean b/LeanPool/Monlib4/QuantumGraph/Nontracial.lean index a8d22bf428..f82b3f1552 100644 --- a/LeanPool/Monlib4/QuantumGraph/Nontracial.lean +++ b/LeanPool/Monlib4/QuantumGraph/Nontracial.lean @@ -3,17 +3,10 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.LinearAlgebra.Ips.MatIps -import LeanPool.Monlib4.LinearAlgebra.Ips.Nontracial -import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert -import LeanPool.Monlib4.LinearAlgebra.IsReal -import LeanPool.Monlib4.LinearAlgebra.Ips.Frob -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.FiniteDimensional -import LeanPool.Monlib4.LinearAlgebra.Ips.OpUnop -import LeanPool.Monlib4.LinearAlgebra.LmulRmul -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.SchurMul -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Symm -import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Instances +module + +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Symm +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Instances /-! # Quantum graphs: quantum adjacency matrices @@ -21,6 +14,8 @@ import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Instances This file defines the quantum adjacency matrix of a quantum graph. -/ +@[expose] public section + variable {n p : Type _} [Fintype n] [Fintype p] [DecidableEq n] [DecidableEq p] diff --git a/LeanPool/Monlib4/QuantumGraph/OfClassicalGraph.lean b/LeanPool/Monlib4/QuantumGraph/OfClassicalGraph.lean index 78891dc566..bebaa496d3 100644 --- a/LeanPool/Monlib4/QuantumGraph/OfClassicalGraph.lean +++ b/LeanPool/Monlib4/QuantumGraph/OfClassicalGraph.lean @@ -3,10 +3,13 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Combinatorics.SimpleGraph.AdjMatrix -import LeanPool.Monlib4.QuantumGraph.Basic -import LeanPool.Monlib4.QuantumGraph.Example -import LeanPool.Monlib4.QuantumGraph.Grad +module + +public import Mathlib.Combinatorics.SimpleGraph.AdjMatrix +public import LeanPool.Monlib4.QuantumGraph.Basic +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Pi +import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +import LeanPool.Monlib4.Preq.Ites /-! # LeanPool.Monlib4.QuantumGraph.OfClassicalGraph @@ -14,6 +17,8 @@ import LeanPool.Monlib4.QuantumGraph.Grad Imported Lean Pool material for `LeanPool.Monlib4.QuantumGraph.OfClassicalGraph`. -/ +@[expose] public section + noncomputable instance {n : Type*} : starAlgebra (PiQ (fun _ : n => ℂ)) := piStarAlgebra diff --git a/LeanPool/Monlib4/QuantumGraph/PiMat.lean b/LeanPool/Monlib4/QuantumGraph/PiMat.lean index 8b5f0ef84f..10a0126645 100644 --- a/LeanPool/Monlib4/QuantumGraph/PiMat.lean +++ b/LeanPool/Monlib4/QuantumGraph/PiMat.lean @@ -3,12 +3,22 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.QuantumGraph.Basic -import LeanPool.Monlib4.QuantumGraph.Example -import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Submodule +module + +public import LeanPool.Monlib4.QuantumGraph.Basic +public import LeanPool.Monlib4.QuantumGraph.Example +public import LeanPool.Monlib4.LinearAlgebra.TensorProduct.Submodule +public import LeanPool.Monlib4.LinearAlgebra.Ips.TensorHilbert +public import LeanPool.Monlib4.LinearAlgebra.KroneckerToTensor +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Instances +public import LeanPool.Monlib4.LinearAlgebra.QuantumSet.Pi +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.Ips.Basic +import LeanPool.Monlib4.LinearAlgebra.Matrix.StarOrderedRing +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas +import LeanPool.Monlib4.Preq.Finset +import LeanPool.Monlib4.Preq.Ites import LeanPool.Monlib4.RepTheory.AutMat -import Mathlib.LinearAlgebra.TensorProduct.Basis -import Mathlib.LinearAlgebra.TensorProduct.Finiteness /-! # LeanPool.Monlib4.QuantumGraph.PiMat @@ -16,6 +26,8 @@ import Mathlib.LinearAlgebra.TensorProduct.Finiteness Imported Lean Pool material for `LeanPool.Monlib4.QuantumGraph.PiMat`. -/ +@[expose] public section + variable {ι : Type*} {p : ι → Type*} [Fintype ι] [DecidableEq ι] [Π i, Fintype (p i)] [Π i, DecidableEq (p i)] {φ : Π i, Module.Dual ℂ (Matrix (p i) (p i) ℂ)} @@ -585,9 +597,9 @@ theorem EuclideanSpace.prod_exists_finset {n m : Type*} [Fintype n] [DecidableEq ∃ S : Finset ((EuclideanSpace ℂ n) × EuclideanSpace ℂ m), x = ∑ s ∈ S, euclideanSpaceTensor' (R := ℂ) (s.1 ⊗ₜ[ℂ] s.2) := by obtain ⟨S, hS⟩ := TensorProduct.exists_finset ((euclideanSpaceTensor' (R:=ℂ)).symm x) - use S - apply_fun (euclideanSpaceTensor' (R:=ℂ)).symm using LinearEquiv.injective _ - simp only [map_sum, LinearIsometryEquiv.symm_apply_apply, hS] + refine ⟨S, ?_⟩ + simpa only [map_sum, LinearIsometryEquiv.apply_symm_apply] using + congrArg (euclideanSpaceTensor' (R := ℂ)) hS theorem QuantumSet.PiMat_n : withPiQuantum[φ] @@ -754,21 +766,12 @@ theorem EuclideanSpace.prodChoose_spec {n m : Type*} [Fintype n] [DecidableEq n] [Fintype m] [DecidableEq m] (x : EuclideanSpace ℂ (n × m)) : x = ∑ s : n × m, euclideanSpaceTensor' (R:=ℂ) (((EuclideanSpace.prodChoose x s).1) ⊗ₜ ((EuclideanSpace.prodChoose x s).2)) := by - have := TensorProduct.of_basis_eq_span ((euclideanSpaceTensor' (R := - ℂ)).symm x) (EuclideanSpace.basisFun n ℂ).toBasis (EuclideanSpace.basisFun m ℂ).toBasis - apply_fun (euclideanSpaceTensor' (R := ℂ)).symm using LinearIsometryEquiv.injective _ - simp only [map_sum, LinearIsometryEquiv.symm_apply_apply] - rw [this, ← Finset.sum_product'] - simp only [Finset.univ_product_univ, ← TensorProduct.tmul_smul] - simp only [← TensorProduct.smul_tmul] - let p₁ := (EuclideanSpace.basisFun n ℂ).toBasis - let p₂ := (EuclideanSpace.basisFun m ℂ).toBasis - let a := fun i : n × m => (((p₁.tensorProduct p₂).repr ((euclideanSpaceTensor' (R := - ℂ)).symm x)) i • p₁ i.1) - have ha : ∀ i, a i = (((p₁.tensorProduct p₂).repr ((euclideanSpaceTensor' (R := - ℂ)).symm x)) i • p₁ i.1) := fun i => rfl - simp only [p₁, p₂, ← ha] - rfl + let b := (EuclideanSpace.basisFun n ℂ).toBasis.tensorProduct + (EuclideanSpace.basisFun m ℂ).toBasis + simpa only [b, Module.Basis.tensorProduct_apply', TensorProduct.smul_tmul', + map_sum, LinearIsometryEquiv.apply_symm_apply, EuclideanSpace.prodChoose] using + (congrArg (euclideanSpaceTensor' (R := ℂ)) + (b.sum_repr ((euclideanSpaceTensor' (R := ℂ)).symm x))).symm omit [Fintype ι] in private theorem PiMat_eq_left_block_miss {a b c : ι} (h : a ≠ b) @@ -1450,14 +1453,9 @@ theorem QuantumGraph.Real.PiMat_conj_unitary_submodule_eq_map : LinearIsometryEquiv.symm_symm] simp only [LinearIsometryEquiv.coe_toLinearEquiv, LinearEquiv.coe_toLinearMap, LinearMap.coe_toContinuousLinearMap, unitaryTensorEuclidean_apply'] - simp only [Matrix.includeBlock_apply, Matrix.dite_kronecker, Pi.star_apply, star_zero, - apply_dite, Matrix.transpose_zero, - map_zero, Matrix.kronecker_zero] + simp only [Matrix.includeBlock_conjTranspose, Matrix.conj_conjTranspose] rw [Fintype.sum_eq_single i] - · simp only [↓reduceDIte] - simp only [ - eq_mp_eq_cast, cast_eq, - Matrix.star_eq_conjTranspose, Matrix.conj_conjTranspose, + · simp only [Matrix.includeBlock_apply_same, Matrix.transpose_transpose, Matrix.vecMulVec_kronecker_vecMulVec, Matrix.toEuclideanStarAlgEquiv_coe] congr @@ -1469,13 +1467,13 @@ theorem QuantumGraph.Real.PiMat_conj_unitary_submodule_eq_map : refine Finset.sum_eq_zero fun _ _ => Finset.sum_eq_zero fun _ _ => Finset.sum_eq_zero fun _ _ => ?_ rcases x with ⟨x₁, x₂⟩ - by_cases h₂ : x₂ = i.2 - · by_cases h₁ : x₁ = i.1 - · exfalso - apply hx - ext <;> assumption - · simp [h₂, h₁] - · simp [h₂] + by_cases h₁ : x₁ = i.1 + · subst x₁ + have h₂ : x₂ ≠ i.2 := fun h₂ => hx (Prod.ext rfl h₂) + simp only [Matrix.includeBlock_apply_ne_same _ h₂, Matrix.transpose_zero, + Matrix.kronecker_zero, map_zero] + · simp only [Matrix.includeBlock_apply_ne_same _ h₁, + Matrix.zero_kronecker, map_zero] theorem orthogonalProjection'_bot {𝕜 E : Type*} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] : @@ -1503,7 +1501,7 @@ lemma _root_.PiMat.modAut_includeBlock : ext i by_cases h : j = i · subst i - simp [Matrix.includeBlock_apply_same, modAut, sig_apply] + simp [Matrix.includeBlock_apply_same, modAut, piSig, sig_apply] · simp [PiMat.modAut, Matrix.includeBlock_apply_ne_same _ h] omit [Fintype ι] [DecidableEq ι] in diff --git a/LeanPool/Monlib4/QuantumGraph/PiMatFinTwo.lean b/LeanPool/Monlib4/QuantumGraph/PiMatFinTwo.lean index 98f38d64f3..26646db27c 100644 --- a/LeanPool/Monlib4/QuantumGraph/PiMatFinTwo.lean +++ b/LeanPool/Monlib4/QuantumGraph/PiMatFinTwo.lean @@ -3,8 +3,13 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.QuantumGraph.PiMat +module + +public import LeanPool.Monlib4.QuantumGraph.PiMat +public import LeanPool.Monlib4.RepTheory.AutMat import LeanPool.Monlib4.LinearAlgebra.Ips.Nontracial +import LeanPool.Monlib4.LinearAlgebra.TensorProduct.BasicLemmas +import LeanPool.Monlib4.Preq.Finset /-! # LeanPool.Monlib4.QuantumGraph.PiMatFinTwo @@ -12,6 +17,8 @@ import LeanPool.Monlib4.LinearAlgebra.Ips.Nontracial Imported Lean Pool material for `LeanPool.Monlib4.QuantumGraph.PiMatFinTwo`. -/ +@[expose] public section + open scoped Functional MatrixOrder ComplexOrder TensorProduct Matrix /-- Elaborate a product-of-blocks statement with matrix quantum-set instances on each block. -/ @@ -403,42 +410,12 @@ theorem Finset.sum_nat_eq_one_iff_exists_unique_eq_one (h : ∑ i, f i = 1) : (∃! i : ι, f i = 1) := by classical - have this1 : ∀ i : ι, f i ≤ 1 := by - intro i - by_contra! - have := - calc 1 = ∑ j, f j := h.symm - _ = f i - + ∑ j ∈ Finset.univ \ {i}, f j := - by rw [Finset.sum_eq_add_sum_sdiff_singleton_of_mem (Finset.mem_univ _)] - _ > 1 + ∑ j ∈ Finset.univ \ {i}, f j := by - nlinarith - _ ≥ 1 := by norm_num - linarith - have : ∃! i, 1 ≤ f i := by - apply existsUnique_of_exists_of_unique - · by_contra! - simp_all - · intro y₁ y₂ hy hd - by_contra! - have := - calc - 1 = ∑ i : ι, f i := h.symm - _ = f y₁ + f y₂ - + ∑ i ∈ (Finset.univ \ {y₁}) \ {y₂}, f i := by - have : y₂ ∈ Finset.univ \ {y₁} := by simp [this.symm] - rw [Finset.sum_eq_add_sum_sdiff_singleton_of_mem (Finset.mem_univ y₁), - Finset.sum_eq_add_sum_sdiff_singleton_of_mem this, add_assoc] - _ ≥ 1 + 1 - + ∑ i ∈ (Finset.univ \ {y₁}) \ {y₂}, f i := by - apply LE.le.ge - linarith - _ ≥ 2 := by norm_num - linarith - obtain ⟨i, ⟨hi, hii⟩⟩ := this - simp_rw [le_antisymm_iff] - use i - simpa only [this1, true_and, hi] using hii + obtain ⟨i, _, hi⟩ := Finset.sum_pos_iff.mp (show 0 < ∑ i, f i from h.symm ▸ Nat.zero_lt_one) + have hfi : f i = 1 := le_antisymm + (h ▸ Finset.single_le_sum (fun _ _ => Nat.zero_le _) (Finset.mem_univ i)) hi + refine ⟨i, hfi, fun j hj => ?_⟩ + by_contra hji + exact Nat.one_ne_zero (hj.symm.trans (Pi.nat_eq_zero_of_sum_eq_one_and_unique_one h hfi hji)) theorem QuantumGraph.Real.dimOfPiMatSubmodule_eq_zero_iff_eq_zero {ι : Type*} {p : ι → Type*} [Fintype ι] [DecidableEq ι] diff --git a/LeanPool/Monlib4/QuantumGraph/QamA.lean b/LeanPool/Monlib4/QuantumGraph/QamA.lean index 4b9a7287b1..9899aa1c40 100644 --- a/LeanPool/Monlib4/QuantumGraph/QamA.lean +++ b/LeanPool/Monlib4/QuantumGraph/QamA.lean @@ -3,7 +3,14 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.QuantumGraph.ToProjections +module + +public import LeanPool.Monlib4.QuantumGraph.ToProjections +public import LeanPool.Monlib4.QuantumGraph.Iso +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.Ips.Basic +import LeanPool.Monlib4.Preq.Finset +import LeanPool.Monlib4.QuantumGraph.Nontracial /-! @@ -13,6 +20,8 @@ This file defines the single-edged quantum graph, and proves that it is a `QAM`. -/ +@[expose] public section + variable {n : Type _} [Fintype n] [DecidableEq n] @@ -113,14 +122,14 @@ theorem qamA.toMatrix [hφ : φ.IsFaithfulPosMap] (x : { x : ℍ // x ≠ 0 }) : rw [Matrix.conj, ← this, ← _root_.map_mul] @[reducible, instance] -private noncomputable def has_smul.units_matrix_ne_zero : SMul ℂˣ { x : Matrix n n ℂ // x ≠ 0 } +noncomputable def hasSmul.unitsMatrixNeZero : SMul ℂˣ { x : Matrix n n ℂ // x ≠ 0 } where smul α x := (⟨((α : ℂ) • x.1 : Matrix n n ℂ), smul_ne_zero (Units.ne_zero α) (Set.mem_ofPred.mp (Subtype.mem x))⟩ : { x : Matrix n n ℂ // x ≠ 0 }) omit [Fintype n] [DecidableEq n] in -private theorem has_smul.units_matrix_ne_zero_coe (x : { x : Matrix n n ℂ // x ≠ 0 }) (α : ℂˣ) : +private theorem hasSmul.units_matrix_ne_zero_coe (x : { x : Matrix n n ℂ // x ≠ 0 }) (α : ℂˣ) : (α • x : { x : Matrix n n ℂ // x ≠ 0 }).1 = (α : ℂ) • x.1 := rfl @@ -144,7 +153,7 @@ theorem qamA.ne_zero [hφ : φ.IsFaithfulPosMap] (x : { x : Matrix n n ℂ // x theorem qamA.smul [hφ : φ.IsFaithfulPosMap] (x : { x : Matrix n n ℂ // x ≠ 0 }) (α : ℂˣ) : qamA hφ (α • x) = qamA hφ x := by withMatrixQuantumCtx[φ] - simp_rw [qamA_eq, has_smul.units_matrix_ne_zero_coe, norm_smul, smul_mul, Matrix.mul_smul, + simp_rw [qamA_eq, hasSmul.units_matrix_ne_zero_coe, norm_smul, smul_mul, Matrix.mul_smul, LinearMap.mulRight_smul, LinearMap.adjoint_smul, LinearMap.mulLeft_smul, smul_mul_smul, smul_smul, Complex.mul_conj, Complex.ofReal_mul, mul_pow, ← one_div_mul_one_div_rev, mul_assoc, ← Complex.ofReal_pow, Complex.normSq_eq_norm_sq] diff --git a/LeanPool/Monlib4/QuantumGraph/QamAExample.lean b/LeanPool/Monlib4/QuantumGraph/QamAExample.lean index a976d128ba..e07579f23b 100644 --- a/LeanPool/Monlib4/QuantumGraph/QamAExample.lean +++ b/LeanPool/Monlib4/QuantumGraph/QamAExample.lean @@ -3,12 +3,12 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import LeanPool.Monlib4.QuantumGraph.Nontracial -import LeanPool.Monlib4.QuantumGraph.Iso -import LeanPool.Monlib4.LinearAlgebra.ToMatrixOfEquiv -import LeanPool.Monlib4.LinearAlgebra.Ips.MatIps -import LeanPool.Monlib4.QuantumGraph.QamA -import LeanPool.Monlib4.LinearAlgebra.Matrix.Spectra +module + +public import LeanPool.Monlib4.QuantumGraph.QamA +public import LeanPool.Monlib4.LinearAlgebra.Matrix.Spectra +import LeanPool.Monlib4.LinearAlgebra.End +import LeanPool.Monlib4.LinearAlgebra.Ips.Basic /-! # LeanPool.Monlib4.QuantumGraph.QamAExample @@ -16,6 +16,8 @@ import LeanPool.Monlib4.LinearAlgebra.Matrix.Spectra Imported Lean Pool material for `LeanPool.Monlib4.QuantumGraph.QamAExample`. -/ +@[expose] public section + section /-! diff --git a/LeanPool/Monlib4/QuantumGraph/ToProjections.lean b/LeanPool/Monlib4/QuantumGraph/ToProjections.lean index f1da707b22..b56cca4e5b 100644 --- a/LeanPool/Monlib4/QuantumGraph/ToProjections.lean +++ b/LeanPool/Monlib4/QuantumGraph/ToProjections.lean @@ -3,10 +3,12 @@ Copyright (c) 2023 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module + +public import LeanPool.Monlib4.QuantumGraph.PiMatFinTwo +public import LeanPool.Monlib4.LinearAlgebra.Ips.Nontracial +import LeanPool.Monlib4.Preq.Finset import LeanPool.Monlib4.QuantumGraph.Nontracial -import LeanPool.Monlib4.LinearAlgebra.Ips.MinimalProj -import LeanPool.Monlib4.QuantumGraph.Iso -import LeanPool.Monlib4.QuantumGraph.PiMatFinTwo /-! @@ -16,6 +18,8 @@ This file contains the definition of a quantum graph as a projection, and the pr -/ +@[expose] public section + variable {p : Type _} [Fintype p] [DecidableEq p] {n : p → Type _} [∀ i, Fintype (n i)] [∀ i, DecidableEq (n i)] diff --git a/LeanPool/Monlib4/RepTheory.lean b/LeanPool/Monlib4/RepTheory.lean index 299e63b62c..dfbf4c9121 100644 --- a/LeanPool/Monlib4/RepTheory.lean +++ b/LeanPool/Monlib4/RepTheory.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ +module -import LeanPool.Monlib4.RepTheory.AutMat +public import LeanPool.Monlib4.RepTheory.AutMat /-! # RepTheory Import-only index for the `RepTheory` directory of the monlib4 import. -/ + +@[expose] public section diff --git a/LeanPool/Monlib4/RepTheory/AutMat.lean b/LeanPool/Monlib4/RepTheory/AutMat.lean index 7d4504cbbb..d69b7c522c 100644 --- a/LeanPool/Monlib4/RepTheory/AutMat.lean +++ b/LeanPool/Monlib4/RepTheory/AutMat.lean @@ -3,15 +3,11 @@ Copyright (c) 2026 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ -import Mathlib.Algebra.Module.LinearMap.Basic -import Mathlib.LinearAlgebra.Matrix.NonsingularInverse -import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv -import Mathlib.LinearAlgebra.Matrix.Trace -import LeanPool.Monlib4.LinearAlgebra.Matrix.Basic -import LeanPool.Monlib4.LinearAlgebra.Matrix.Cast -import LeanPool.Monlib4.LinearAlgebra.Matrix.PiMat -import LeanPool.Monlib4.LinearAlgebra.LmulRmul -import LeanPool.Monlib4.Preq.Set +module + +public import LeanPool.Monlib4.LinearAlgebra.Matrix.Basic +public import LeanPool.Monlib4.LinearAlgebra.Matrix.PiMat +public import LeanPool.Monlib4.LinearAlgebra.LmulRmul import LeanPool.Monlib4.Preq.StarAlgEquiv /-! @@ -23,6 +19,8 @@ corollaries package the implementing matrix as a linear equivalence or as an element of the general linear group. -/ +@[expose] public section + open scoped BigOperators Matrix variable {n R 𝕜 : Type _} [Field 𝕜] [Fintype n] diff --git a/LeanPool/Monsky.lean b/LeanPool/Monsky.lean index fc0b50538c..ca380b7e1c 100644 --- a/LeanPool/Monsky.lean +++ b/LeanPool/Monsky.lean @@ -3,18 +3,21 @@ Copyright (c) 2026 Dhyan Aranha and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhyan Aranha, contributors -/ +module -import LeanPool.Monsky.Appendix -import LeanPool.Monsky.RainbowTriangles -import LeanPool.Monsky.TriangleCorollary -import LeanPool.Monsky.BasicDefinitions -import LeanPool.Monsky.MainStatement -import LeanPool.Monsky.Miscellaneous -import LeanPool.Monsky.MonskyEven -import LeanPool.Monsky.SegmentCounting -import LeanPool.Monsky.SegmentTriangle -import LeanPool.Monsky.SimplexBasic -import LeanPool.Monsky.Square +public import LeanPool.Monsky.Appendix +public import LeanPool.Monsky.RainbowTriangles +public import LeanPool.Monsky.TriangleCorollary +public import LeanPool.Monsky.BasicDefinitions +public import LeanPool.Monsky.MainStatement +public import LeanPool.Monsky.Miscellaneous +public import LeanPool.Monsky.MonskyEven +public import LeanPool.Monsky.SegmentCounting +public import LeanPool.Monsky.SegmentTriangle +public import LeanPool.Monsky.SimplexBasic +public import LeanPool.Monsky.Square +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Monsky's Theorem @@ -27,6 +30,8 @@ Tags: geometry, combinatorics, measure-theory MSC: 52C20, 05B45 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Monsky/Appendix.lean b/LeanPool/Monsky/Appendix.lean index d5c70af701..551ef97c45 100644 --- a/LeanPool/Monsky/Appendix.lean +++ b/LeanPool/Monsky/Appendix.lean @@ -3,24 +3,13 @@ Copyright (c) 2026 Dhyan Aranha and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhyan Aranha, contributors -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel -import Mathlib.RingTheory.Valuation.Basic -import Mathlib.RingTheory.Valuation.ValuationSubring +public import Mathlib.RingTheory.Valuation.ValuationSubring +public import Mathlib.Basic.Real.Basic +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.Monsky.Appendix @@ -28,6 +17,8 @@ import Mathlib.RingTheory.Valuation.ValuationSubring Imported Lean Pool material for `LeanPool.Monsky.Appendix`. -/ +@[expose] public section + namespace LeanPool.Monsky noncomputable section diff --git a/LeanPool/Monsky/BasicDefinitions.lean b/LeanPool/Monsky/BasicDefinitions.lean index bf45e008e0..228e9dd91e 100644 --- a/LeanPool/Monsky/BasicDefinitions.lean +++ b/LeanPool/Monsky/BasicDefinitions.lean @@ -3,23 +3,10 @@ Copyright (c) 2026 Dhyan Aranha and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhyan Aranha, contributors -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel -import LeanPool.Monsky.SegmentTriangle +public import LeanPool.Monsky.SegmentTriangle +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.Monsky.BasicDefinitions @@ -27,6 +14,8 @@ import LeanPool.Monsky.SegmentTriangle Imported Lean Pool material for `LeanPool.Monsky.BasicDefinitions`. -/ +@[expose] public section + namespace LeanPool.Monsky local notation "ℝ²" => EuclideanSpace ℝ (Fin 2) diff --git a/LeanPool/Monsky/MainStatement.lean b/LeanPool/Monsky/MainStatement.lean index be071bc320..55088c5811 100644 --- a/LeanPool/Monsky/MainStatement.lean +++ b/LeanPool/Monsky/MainStatement.lean @@ -3,25 +3,17 @@ Copyright (c) 2026 Dhyan Aranha and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhyan Aranha, contributors -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel +public import LeanPool.Monsky.Square +public import Mathlib.Analysis.Normed.Lp.MeasurableSpace +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import LeanPool.Monsky.Appendix +import LeanPool.Monsky.MonskyEven import LeanPool.Monsky.SegmentCounting import LeanPool.Monsky.TriangleCorollary -import LeanPool.Monsky.MonskyEven +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # LeanPool.Monsky.MainStatement @@ -29,6 +21,8 @@ import LeanPool.Monsky.MonskyEven Imported Lean Pool material for `LeanPool.Monsky.MainStatement`. -/ +@[expose] public section + namespace LeanPool.Monsky local notation "Triangle" => Fin 3 → (EuclideanSpace ℝ (Fin 2)) diff --git a/LeanPool/Monsky/Miscellaneous.lean b/LeanPool/Monsky/Miscellaneous.lean index 90cd09cfb4..7c4f1d6e4b 100644 --- a/LeanPool/Monsky/Miscellaneous.lean +++ b/LeanPool/Monsky/Miscellaneous.lean @@ -3,23 +3,11 @@ Copyright (c) 2026 Dhyan Aranha and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhyan Aranha, contributors -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Basic.Real.Sign -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel +public import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.Basic.Real.Sign +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.Monsky.Miscellaneous @@ -27,6 +15,8 @@ import Mathlib.Tactic.Abel Imported Lean Pool material for `LeanPool.Monsky.Miscellaneous`. -/ +@[expose] public section + namespace LeanPool.Monsky open BigOperators open Finset diff --git a/LeanPool/Monsky/MonskyEven.lean b/LeanPool/Monsky/MonskyEven.lean index b8fcad7419..10e3db1958 100644 --- a/LeanPool/Monsky/MonskyEven.lean +++ b/LeanPool/Monsky/MonskyEven.lean @@ -3,27 +3,11 @@ Copyright (c) 2026 Dhyan Aranha and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhyan Aranha, contributors -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel -import LeanPool.Monsky.SimplexBasic -import LeanPool.Monsky.SegmentTriangle -import LeanPool.Monsky.BasicDefinitions -import LeanPool.Monsky.RainbowTriangles -import LeanPool.Monsky.Square +public import LeanPool.Monsky.Square +import Mathlib.Tactic.Measurability.Init +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.Monsky.MonskyEven @@ -31,6 +15,8 @@ import LeanPool.Monsky.Square Imported Lean Pool material for `LeanPool.Monsky.MonskyEven`. -/ +@[expose] public section + namespace LeanPool.Monsky diff --git a/LeanPool/Monsky/RainbowTriangles.lean b/LeanPool/Monsky/RainbowTriangles.lean index d6abd3bf03..a71b5324fc 100644 --- a/LeanPool/Monsky/RainbowTriangles.lean +++ b/LeanPool/Monsky/RainbowTriangles.lean @@ -3,25 +3,12 @@ Copyright (c) 2026 Dhyan Aranha and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhyan Aranha, contributors -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel +public import LeanPool.Monsky.SegmentTriangle +public import Mathlib.RingTheory.Valuation.Basic import LeanPool.Monsky.Appendix -import LeanPool.Monsky.SimplexBasic -import LeanPool.Monsky.SegmentTriangle +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.Monsky.RainbowTriangles @@ -29,6 +16,8 @@ import LeanPool.Monsky.SegmentTriangle Imported Lean Pool material for `LeanPool.Monsky.RainbowTriangles`. -/ +@[expose] public section + namespace LeanPool.Monsky /-! diff --git a/LeanPool/Monsky/SegmentCounting.lean b/LeanPool/Monsky/SegmentCounting.lean index 10ff03cdde..343cb27cf4 100644 --- a/LeanPool/Monsky/SegmentCounting.lean +++ b/LeanPool/Monsky/SegmentCounting.lean @@ -3,27 +3,12 @@ Copyright (c) 2026 Dhyan Aranha and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhyan Aranha, contributors -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel -import LeanPool.Monsky.SimplexBasic -import LeanPool.Monsky.SegmentTriangle -import LeanPool.Monsky.BasicDefinitions -import LeanPool.Monsky.RainbowTriangles -import LeanPool.Monsky.Square +public import LeanPool.Monsky.RainbowTriangles +public import LeanPool.Monsky.Square +import Mathlib.Tactic.Measurability.Init +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.Monsky.SegmentCounting @@ -31,6 +16,8 @@ import LeanPool.Monsky.Square Imported Lean Pool material for `LeanPool.Monsky.SegmentCounting`. -/ +@[expose] public section + namespace LeanPool.Monsky local notation "ℝ²" => EuclideanSpace ℝ (Fin 2) diff --git a/LeanPool/Monsky/SegmentTriangle.lean b/LeanPool/Monsky/SegmentTriangle.lean index e6dc0a4286..892c8cc26b 100644 --- a/LeanPool/Monsky/SegmentTriangle.lean +++ b/LeanPool/Monsky/SegmentTriangle.lean @@ -3,24 +3,13 @@ Copyright (c) 2026 Dhyan Aranha and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhyan Aranha, contributors -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel -import LeanPool.Monsky.SimplexBasic +import Mathlib.Algebra.Order.Interval.Set.Group + +public import LeanPool.Monsky.SimplexBasic import LeanPool.Monsky.Miscellaneous +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.Monsky.SegmentTriangle @@ -28,6 +17,8 @@ import LeanPool.Monsky.Miscellaneous Imported Lean Pool material for `LeanPool.Monsky.SegmentTriangle`. -/ +@[expose] public section + namespace LeanPool.Monsky local notation "ℝ²" => EuclideanSpace ℝ (Fin 2) diff --git a/LeanPool/Monsky/SimplexBasic.lean b/LeanPool/Monsky/SimplexBasic.lean index 4fa2ea3c61..e81112ee15 100644 --- a/LeanPool/Monsky/SimplexBasic.lean +++ b/LeanPool/Monsky/SimplexBasic.lean @@ -3,22 +3,10 @@ Copyright (c) 2026 Dhyan Aranha and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhyan Aranha, contributors -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel +public import Mathlib.Analysis.InnerProductSpace.PiL2 +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.Monsky.SimplexBasic @@ -26,6 +14,8 @@ import Mathlib.Tactic.Abel Imported Lean Pool material for `LeanPool.Monsky.SimplexBasic`. -/ +@[expose] public section + namespace LeanPool.Monsky local notation "ℝ²" => EuclideanSpace ℝ (Fin 2) diff --git a/LeanPool/Monsky/Square.lean b/LeanPool/Monsky/Square.lean index 2908035d49..d63520f98f 100644 --- a/LeanPool/Monsky/Square.lean +++ b/LeanPool/Monsky/Square.lean @@ -3,26 +3,11 @@ Copyright (c) 2026 Dhyan Aranha and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhyan Aranha, contributors -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel -import LeanPool.Monsky.SimplexBasic -import LeanPool.Monsky.SegmentTriangle +public import LeanPool.Monsky.BasicDefinitions import LeanPool.Monsky.Miscellaneous -import LeanPool.Monsky.BasicDefinitions +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.Monsky.Square @@ -30,6 +15,8 @@ import LeanPool.Monsky.BasicDefinitions Imported Lean Pool material for `LeanPool.Monsky.Square`. -/ +@[expose] public section + namespace LeanPool.Monsky diff --git a/LeanPool/Monsky/TriangleCorollary.lean b/LeanPool/Monsky/TriangleCorollary.lean index a2ca024f1a..2eff7a7555 100644 --- a/LeanPool/Monsky/TriangleCorollary.lean +++ b/LeanPool/Monsky/TriangleCorollary.lean @@ -3,33 +3,14 @@ Copyright (c) 2026 Dhyan Aranha and contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dhyan Aranha, contributors -/ +module - -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel -import Mathlib.Order.Basic +public import LeanPool.Monsky.Square +public import Mathlib.Analysis.Normed.Lp.MeasurableSpace +public import Mathlib.MeasureTheory.Measure.Lebesgue.Basic +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace import Mathlib.MeasureTheory.Measure.Lebesgue.Integral -import Mathlib.Analysis.SpecialFunctions.Integrability.Basic -import Mathlib.Analysis.SpecialFunctions.Integrals.Basic -import Mathlib.Dynamics.Ergodic.MeasurePreserving -import LeanPool.Monsky.BasicDefinitions -import LeanPool.Monsky.SimplexBasic -import LeanPool.Monsky.SegmentTriangle -import LeanPool.Monsky.Square /-! # LeanPool.Monsky.TriangleCorollary @@ -37,6 +18,8 @@ import LeanPool.Monsky.Square Imported Lean Pool material for `LeanPool.Monsky.TriangleCorollary`. -/ +@[expose] public section + namespace LeanPool.Monsky local notation "ℝ²" => EuclideanSpace ℝ (Fin 2) diff --git a/LeanPool/MoserLatticeColorings.lean b/LeanPool/MoserLatticeColorings.lean index 084c74a63f..baa42cd1d6 100644 --- a/LeanPool/MoserLatticeColorings.lean +++ b/LeanPool/MoserLatticeColorings.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.MoserLatticeColorings.Ring +public import LeanPool.MoserLatticeColorings.Ring +import Mathlib.Tactic.NormNum.Irrational +import Mathlib.Tactic.Positivity.Finset /-! # Geometric Four-Colorings of the Moser Lattice and Ring @@ -16,3 +19,5 @@ Main declarations: `LeanPool.MoserLatticeColorings.MoserRing.both_colorings_are_ Tags: combinatorics, graph-coloring, discrete-geometry, unit-distance-graphs, moser-lattice MSC: 05C15 -/ + +@[expose] public section diff --git a/LeanPool/MoserLatticeColorings/Basic.lean b/LeanPool/MoserLatticeColorings/Basic.lean index 9d3cf96c73..3343f29dec 100644 --- a/LeanPool/MoserLatticeColorings/Basic.lean +++ b/LeanPool/MoserLatticeColorings/Basic.lean @@ -3,16 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Combinatorics.SimpleGraph.Coloring.Vertex -import Mathlib.NumberTheory.Real.Irrational -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.NormNum +public import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.Combinatorics.SimpleGraph.Coloring.Vertex import Mathlib.Tactic.NormNum.Irrational -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity.Finset /-! # Geometric four-colorings of the Moser lattice @@ -25,6 +21,8 @@ the paper, and proves that each is proper and geometric on the whole lattice. The uniqueness assertion in Theorem 3.2 is not formalized here. -/ +@[expose] public section + namespace LeanPool.MoserLatticeColorings open SimpleGraph diff --git a/LeanPool/MoserLatticeColorings/Ring.lean b/LeanPool/MoserLatticeColorings/Ring.lean index 4c426f22d1..4d6664e6da 100644 --- a/LeanPool/MoserLatticeColorings/Ring.lean +++ b/LeanPool/MoserLatticeColorings/Ring.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.MoserLatticeColorings.Basic +public import LeanPool.MoserLatticeColorings.Basic +import Mathlib.Tactic.NormNum.Irrational +import Mathlib.Tactic.Positivity.Finset /-! # Extension to the Moser ring @@ -21,6 +24,8 @@ six-chromatic witness, but it does not determine the chromatic number of the plane. -/ +@[expose] public section + namespace LeanPool.MoserLatticeColorings /-- A representative `x / 3^k` of a point in the Moser ring, with `x` in diff --git a/LeanPool/MulticolorTriangleRamsey.lean b/LeanPool/MulticolorTriangleRamsey.lean index 60e815017c..5868db29ca 100644 --- a/LeanPool/MulticolorTriangleRamsey.lean +++ b/LeanPool/MulticolorTriangleRamsey.lean @@ -3,21 +3,15 @@ Copyright (c) 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI -/ +module -import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics -import Mathlib.Analysis.SpecialFunctions.Stirling +public import Mathlib.Combinatorics.SimpleGraph.Coloring.EdgeLabeling +public import Mathlib.Combinatorics.SimpleGraph.Coloring.Vertex +public import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Analysis.Complex.ExponentialBounds import Mathlib.Analysis.Real.Pi.Bounds +import Mathlib.Analysis.SpecialFunctions.Stirling import Mathlib.Combinatorics.Pigeonhole -import Mathlib.Combinatorics.SimpleGraph.Clique -import Mathlib.Combinatorics.SimpleGraph.Coloring.EdgeLabeling -import Mathlib.Combinatorics.SimpleGraph.Coloring.Vertex -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring /-! # Superexponential lower bounds for multicolor triangle Ramsey numbers @@ -30,6 +24,8 @@ Tags: extremal-combinatorics, ramsey-theory, graph-coloring, erdos-problems MSC: 05D10, 05C55 -/ +@[expose] public section + namespace ErdosProblems.MulticolourTriangleRamsey open Filter Finset SimpleGraph diff --git a/LeanPool/NashWilliams.lean b/LeanPool/NashWilliams.lean index 6227c03ef3..75e23e45a3 100644 --- a/LeanPool/NashWilliams.lean +++ b/LeanPool/NashWilliams.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import LeanPool.NashWilliams.Combinatorics -import LeanPool.NashWilliams.Data -import LeanPool.NashWilliams.Order +module + +public import LeanPool.NashWilliams.Combinatorics +public import LeanPool.NashWilliams.Data +public import LeanPool.NashWilliams.Order +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Nash-Williams fronts and 2-better-quasi-orders @@ -17,3 +24,5 @@ Main declarations: `Front.IsFront.nash_williams`, `TwoBQO.wellQuasiOrdered` Tags: infinitary-combinatorics, ramsey-theory, better-quasi-orders, well-quasi-orders, ordinal-ranks MSC: 03E05, 05D10, 06A07 -/ + +@[expose] public section diff --git a/LeanPool/NashWilliams/Combinatorics.lean b/LeanPool/NashWilliams/Combinatorics.lean index 8d530039e3..f7002545e8 100644 --- a/LeanPool/NashWilliams/Combinatorics.lean +++ b/LeanPool/NashWilliams/Combinatorics.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import LeanPool.NashWilliams.Combinatorics.Front -import LeanPool.NashWilliams.Combinatorics.Ramsey +module + +public import LeanPool.NashWilliams.Combinatorics.Front +public import LeanPool.NashWilliams.Combinatorics.Ramsey /-! Combinatorial results about fronts and infinite Ramsey theory. -/ + +@[expose] public section diff --git a/LeanPool/NashWilliams/Combinatorics/Front.lean b/LeanPool/NashWilliams/Combinatorics/Front.lean index e8652b26dc..f790d61d46 100644 --- a/LeanPool/NashWilliams/Combinatorics/Front.lean +++ b/LeanPool/NashWilliams/Combinatorics/Front.lean @@ -3,6 +3,10 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import LeanPool.NashWilliams.Combinatorics.Front.NashWilliams +module + +public import LeanPool.NashWilliams.Combinatorics.Front.NashWilliams /-! Nash-Williams fronts, their ranks and restrictions, and the Nash-Williams theorem. -/ + +@[expose] public section diff --git a/LeanPool/NashWilliams/Combinatorics/Front/Defs.lean b/LeanPool/NashWilliams/Combinatorics/Front/Defs.lean index 035a3e931e..83b43b8357 100644 --- a/LeanPool/NashWilliams/Combinatorics/Front/Defs.lean +++ b/LeanPool/NashWilliams/Combinatorics/Front/Defs.lean @@ -3,7 +3,18 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import LeanPool.NashWilliams.Data.Nat.Nth +module + +public import Aesop.BuiltinRules +public import Mathlib.Data.Nat.Basic +public import Mathlib.Order.Monotone.Defs +public import Mathlib.Order.SetNotation +import Mathlib.Algebra.GroupWithZero.Nat +import Mathlib.Algebra.Order.Group.Nat +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Set.Insert +import Mathlib.Tactic.SetLike +import Mathlib.Tactic.Widget.Calc /-! # Nash-Williams Fronts @@ -46,6 +57,8 @@ increasing enumeration (a sorted `List ℕ`) and bridge to `Finset ℕ` only at `Finset`-based (e.g. Ramsey) statements, via `Finset.sort` / `List.toFinset`. -/ +@[expose] public section + open Set List noncomputable section diff --git a/LeanPool/NashWilliams/Combinatorics/Front/NashWilliams.lean b/LeanPool/NashWilliams/Combinatorics/Front/NashWilliams.lean index 79c25d0d7e..94a1d45766 100644 --- a/LeanPool/NashWilliams/Combinatorics/Front/NashWilliams.lean +++ b/LeanPool/NashWilliams/Combinatorics/Front/NashWilliams.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ +module + +public import LeanPool.NashWilliams.Combinatorics.Front.Shrink import LeanPool.NashWilliams.Combinatorics.Front.Ray -import LeanPool.NashWilliams.Combinatorics.Front.Shrink import LeanPool.NashWilliams.Data.Fintype.Pigeonhole +import LeanPool.NashWilliams.Data.Nat.Nth +import Mathlib.Data.Finset.Sort /-! # The Nash-Williams theorem @@ -37,6 +41,8 @@ import that one. The only lemmas the two developments share are the generic help `NashWilliams.Data`. -/ +@[expose] public section + open Set List noncomputable section diff --git a/LeanPool/NashWilliams/Combinatorics/Front/Rank.lean b/LeanPool/NashWilliams/Combinatorics/Front/Rank.lean index 66babc782b..e0de7c0995 100644 --- a/LeanPool/NashWilliams/Combinatorics/Front/Rank.lean +++ b/LeanPool/NashWilliams/Combinatorics/Front/Rank.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import LeanPool.NashWilliams.Combinatorics.Front.Defs -import Mathlib.SetTheory.Ordinal.Rank +module + +public import LeanPool.NashWilliams.Combinatorics.Front.Defs +public import Mathlib.SetTheory.Ordinal.Rank +import Mathlib.Order.Lattice.Nat /-! # The tree of a front is well-founded @@ -31,6 +34,8 @@ strictly longer. * `Front.schreier_rank`: the Schreier front has rank `ω`. -/ +@[expose] public section + open Set List Ordinal universe u diff --git a/LeanPool/NashWilliams/Combinatorics/Front/Ray.lean b/LeanPool/NashWilliams/Combinatorics/Front/Ray.lean index 97e4aad54a..e3b034c1eb 100644 --- a/LeanPool/NashWilliams/Combinatorics/Front/Ray.lean +++ b/LeanPool/NashWilliams/Combinatorics/Front/Ray.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import LeanPool.NashWilliams.Combinatorics.Front.Rank +module + +public import LeanPool.NashWilliams.Combinatorics.Front.Rank +public import Mathlib.Order.Lattice.Nat /-! # The ray of a front @@ -39,6 +42,8 @@ The trivial front is `{[]}` (rank `0`). For a front, `[] ∉ F`, `F ≠ {[]}`, ` (see `IsFront.nil_not_mem_iff`). -/ +@[expose] public section + open Set List noncomputable section diff --git a/LeanPool/NashWilliams/Combinatorics/Front/Shrink.lean b/LeanPool/NashWilliams/Combinatorics/Front/Shrink.lean index 86ac71d4e8..7d03965a35 100644 --- a/LeanPool/NashWilliams/Combinatorics/Front/Shrink.lean +++ b/LeanPool/NashWilliams/Combinatorics/Front/Shrink.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import LeanPool.NashWilliams.Combinatorics.Front.Rank +module + +public import LeanPool.NashWilliams.Combinatorics.Front.Rank /-! # Restricting a front to an infinite subset @@ -27,6 +29,8 @@ formalized here.) * `Front.shrink_isFront` : `shrink F (M ∘ E)` is a front on `M ∘ E`. -/ +@[expose] public section + open Set List noncomputable section diff --git a/LeanPool/NashWilliams/Combinatorics/Ramsey.lean b/LeanPool/NashWilliams/Combinatorics/Ramsey.lean index 0534666e5d..9d8470ce60 100644 --- a/LeanPool/NashWilliams/Combinatorics/Ramsey.lean +++ b/LeanPool/NashWilliams/Combinatorics/Ramsey.lean @@ -3,6 +3,10 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import LeanPool.NashWilliams.Combinatorics.Ramsey.Infinite +module + +public import LeanPool.NashWilliams.Combinatorics.Ramsey.Infinite /-! Infinite Ramsey theory for finite colorings. -/ + +@[expose] public section diff --git a/LeanPool/NashWilliams/Combinatorics/Ramsey/Infinite.lean b/LeanPool/NashWilliams/Combinatorics/Ramsey/Infinite.lean index f3d4f65344..3031d1e477 100644 --- a/LeanPool/NashWilliams/Combinatorics/Ramsey/Infinite.lean +++ b/LeanPool/NashWilliams/Combinatorics/Ramsey/Infinite.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ +module + +public import Mathlib.Data.Finset.Card import LeanPool.NashWilliams.Data.Fintype.Pigeonhole import LeanPool.NashWilliams.Data.Nat.Nth +import Mathlib.Order.Lattice.Nat /-! # The infinite Ramsey theorem @@ -36,6 +40,8 @@ instantiating the Nash-Williams theorem at the uniform front `[M]^k`. Both are k file imports the other: they share only the generic helpers in `NashWilliams.Data`. -/ +@[expose] public section + open Set noncomputable section diff --git a/LeanPool/NashWilliams/Data.lean b/LeanPool/NashWilliams/Data.lean index ee7d2623c9..a117369ee0 100644 --- a/LeanPool/NashWilliams/Data.lean +++ b/LeanPool/NashWilliams/Data.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import LeanPool.NashWilliams.Data.Fintype -import LeanPool.NashWilliams.Data.Nat +module + +public import LeanPool.NashWilliams.Data.Fintype +public import LeanPool.NashWilliams.Data.Nat +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! Supporting results for finite types and natural numbers. -/ + +@[expose] public section diff --git a/LeanPool/NashWilliams/Data/Fintype.lean b/LeanPool/NashWilliams/Data/Fintype.lean index 3e1aafce5b..76b43586a8 100644 --- a/LeanPool/NashWilliams/Data/Fintype.lean +++ b/LeanPool/NashWilliams/Data/Fintype.lean @@ -3,6 +3,13 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import LeanPool.NashWilliams.Data.Fintype.Pigeonhole +module + +public import LeanPool.NashWilliams.Data.Fintype.Pigeonhole +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! Infinite-pigeonhole helpers for finite codomains. -/ + +@[expose] public section diff --git a/LeanPool/NashWilliams/Data/Fintype/Pigeonhole.lean b/LeanPool/NashWilliams/Data/Fintype/Pigeonhole.lean index 31bc10f067..609820ba79 100644 --- a/LeanPool/NashWilliams/Data/Fintype/Pigeonhole.lean +++ b/LeanPool/NashWilliams/Data/Fintype/Pigeonhole.lean @@ -3,6 +3,10 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ +module + +public import Aesop.BuiltinRules +public import Mathlib.Basic.Finite.Defs import Mathlib.Data.Fintype.Pigeonhole /-! @@ -20,6 +24,8 @@ is kept here rather than in either of them. Upstream target: `Mathlib/Data/Fintype/Pigeonhole.lean`. -/ +@[expose] public section + /-- **Infinite pigeonhole.** A sequence `f : ℕ → κ` with `κ` finite takes some value `k` on an infinite set of indices. -/ theorem exists_infinite_fiber_nat {κ : Type*} [Finite κ] (f : ℕ → κ) : diff --git a/LeanPool/NashWilliams/Data/Nat.lean b/LeanPool/NashWilliams/Data/Nat.lean index edf74dc76a..46fe25b2df 100644 --- a/LeanPool/NashWilliams/Data/Nat.lean +++ b/LeanPool/NashWilliams/Data/Nat.lean @@ -3,6 +3,13 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import LeanPool.NashWilliams.Data.Nat.Nth +module + +public import LeanPool.NashWilliams.Data.Nat.Nth +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! Strictly monotone enumerations of infinite sets of natural numbers. -/ + +@[expose] public section diff --git a/LeanPool/NashWilliams/Data/Nat/Nth.lean b/LeanPool/NashWilliams/Data/Nat/Nth.lean index fee528ef74..09ad7182a1 100644 --- a/LeanPool/NashWilliams/Data/Nat/Nth.lean +++ b/LeanPool/NashWilliams/Data/Nat/Nth.lean @@ -3,6 +3,12 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ +module + +public import Aesop.BuiltinRules +public import Mathlib.Basic.Finite.Defs +public import Mathlib.Data.Nat.Basic +public import Mathlib.Order.Monotone.Defs import Mathlib.Data.Nat.Nth /-! @@ -23,6 +29,8 @@ what turns the `Set`-valued conclusion of `infinite_ramsey` into the sequence fo Upstream target: `Mathlib/Data/Nat/Nth.lean`. -/ +@[expose] public section + /-- **Enumeration bridge.** Every infinite set of naturals is the range of its (unique) strictly monotone enumeration. This recovers, from a set-valued carrier `X`, the enumeration `N` on which the enumeration-first machinery (`Front.shrink`, ranks, …) operates. -/ diff --git a/LeanPool/NashWilliams/Order.lean b/LeanPool/NashWilliams/Order.lean index 1a1fa130a2..cdf6251946 100644 --- a/LeanPool/NashWilliams/Order.lean +++ b/LeanPool/NashWilliams/Order.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import LeanPool.NashWilliams.Order.TwoBQO -import LeanPool.NashWilliams.Order.WellQuasiOrder +module + +public import LeanPool.NashWilliams.Order.TwoBQO +public import LeanPool.NashWilliams.Order.WellQuasiOrder +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! Results about well- and better-quasi-orders. -/ + +@[expose] public section diff --git a/LeanPool/NashWilliams/Order/TwoBQO.lean b/LeanPool/NashWilliams/Order/TwoBQO.lean index 9882ece8ef..acc6acf719 100644 --- a/LeanPool/NashWilliams/Order/TwoBQO.lean +++ b/LeanPool/NashWilliams/Order/TwoBQO.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import Mathlib.SetTheory.Ordinal.Basic -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Push +module + +public import Mathlib.SetTheory.Ordinal.Basic +public import LeanPool.NashWilliams.Order.WellQuasiOrder.Regular import LeanPool.NashWilliams.Combinatorics.Ramsey.Infinite -import LeanPool.NashWilliams.Order.WellQuasiOrder.Regular +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # 2-better-quasi-orders (2-BQO) @@ -48,6 +52,8 @@ embedding relation (`TwoBQO.embedForAll_wqo`). * `TwoBQO.embedForAll_wqo`: `EmbedForAll r` is WQO on `ℕ → Q` whenever `r` is 2-BQO on `Q`. -/ +@[expose] public section + open Set Preorder noncomputable section @@ -98,7 +104,7 @@ theorem perfect_or_bad {α : Type*} (r : α → α → Prop) (f : PairSeq α) : end PairSeq /-- `r` is **2-BQO** if there is no bad pair-sequence for `r`. -/ -private def TwoBQO_n {α : Type*} (r : α → α → Prop) : Prop := +def TwoBQON {α : Type*} (r : α → α → Prop) : Prop := ¬ ∃ f : PairSeq α, PairSeq.IsBad r f /-- `r` is **2-BQO** if every pair-sequence has a good triple `m < n < l`, i.e. @@ -106,8 +112,8 @@ private def TwoBQO_n {α : Type*} (r : α → α → Prop) : Prop := def TwoBQO {α : Type*} (r : α → α → Prop) : Prop := ∀ f : PairSeq α, ∃ m n l : ℕ, ∃ (hmn : m < n) (hnl : n < l), r (f m n hmn) (f n l hnl) -theorem TwoBQO.iff_noBad {α : Type*} (r : α → α → Prop) : TwoBQO r ↔ TwoBQO_n r := by - simp only [TwoBQO_n, PairSeq.IsBad, not_exists, not_forall, not_not] +theorem TwoBQO.iff_noBad {α : Type*} (r : α → α → Prop) : TwoBQO r ↔ TwoBQON r := by + simp only [TwoBQON, PairSeq.IsBad, not_exists, not_forall, not_not] exact Iff.symm (Eq.to_iff rfl) /-! diff --git a/LeanPool/NashWilliams/Order/WellQuasiOrder.lean b/LeanPool/NashWilliams/Order/WellQuasiOrder.lean index 9b06d72aee..d581d11ac1 100644 --- a/LeanPool/NashWilliams/Order/WellQuasiOrder.lean +++ b/LeanPool/NashWilliams/Order/WellQuasiOrder.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import LeanPool.NashWilliams.Order.WellQuasiOrder.Basic -import LeanPool.NashWilliams.Order.WellQuasiOrder.Regular +module + +public import LeanPool.NashWilliams.Order.WellQuasiOrder.Basic +public import LeanPool.NashWilliams.Order.WellQuasiOrder.Regular /-! Monotone subsequences and regular sequences in well-quasi-orders. -/ + +@[expose] public section diff --git a/LeanPool/NashWilliams/Order/WellQuasiOrder/Basic.lean b/LeanPool/NashWilliams/Order/WellQuasiOrder/Basic.lean index 47efddceec..01f108b9d7 100644 --- a/LeanPool/NashWilliams/Order/WellQuasiOrder/Basic.lean +++ b/LeanPool/NashWilliams/Order/WellQuasiOrder/Basic.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ -import Mathlib.Order.WellQuasiOrder +module + +public import Mathlib.Order.WellQuasiOrder import LeanPool.NashWilliams.Combinatorics.Ramsey.Infinite /-! @@ -26,6 +28,8 @@ property of a WQO does not need the preorder (in particular transitivity) hypoth the current Mathlib `WellQuasiOrdered.exists_monotone_subseq`. -/ +@[expose] public section + open Set noncomputable section diff --git a/LeanPool/NashWilliams/Order/WellQuasiOrder/Regular.lean b/LeanPool/NashWilliams/Order/WellQuasiOrder/Regular.lean index 826504e920..960abb1255 100644 --- a/LeanPool/NashWilliams/Order/WellQuasiOrder/Regular.lean +++ b/LeanPool/NashWilliams/Order/WellQuasiOrder/Regular.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Yann Pequignot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yann Pequignot -/ +module + +public import Mathlib.Order.WellQuasiOrder import Mathlib.Order.WellFoundedSet /-! @@ -31,6 +34,8 @@ many later terms. This file shows that in a WQO every sequence has a regular tai * `WellQuasiOrdered.sublistForall₂`: Higman's order is a WQO on `List Q` when `r` is a WQO on `Q`. -/ +@[expose] public section + open Set Preorder noncomputable section diff --git a/LeanPool/Neukirch.lean b/LeanPool/Neukirch.lean index a535529ac0..234a6a98df 100644 --- a/LeanPool/Neukirch.lean +++ b/LeanPool/Neukirch.lean @@ -3,9 +3,11 @@ Copyright (c) 2023 Hu Yongle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Hu Yongle -/ +module -import LeanPool.Neukirch.ExtensionOfDedekindDomains -import LeanPool.Neukirch.HilbertRamificationTheory +public import LeanPool.Neukirch.ExtensionOfDedekindDomains +public import LeanPool.Neukirch.HilbertRamificationTheory +import Mathlib.Tactic.Measurability.Init /-! # Neukirch's Algebraic Number Theory: Hilbert ramification theory @@ -18,6 +20,8 @@ Tags: number-theory, algebraic-number-theory, ramification, galois-theory MSC: 11R32, 11S15, 13B25 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Neukirch/ExtensionOfDedekindDomains.lean b/LeanPool/Neukirch/ExtensionOfDedekindDomains.lean index 671228b248..93d710c916 100644 --- a/LeanPool/Neukirch/ExtensionOfDedekindDomains.lean +++ b/LeanPool/Neukirch/ExtensionOfDedekindDomains.lean @@ -3,26 +3,13 @@ Copyright (c) 2023 Hu Yongle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Hu Yongle -/ -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel -import Mathlib.NumberTheory.KummerDedekind -import Mathlib.LinearAlgebra.Dimension.DivisionRing -import Mathlib.RingTheory.Ideal.Norm.AbsNorm -import Mathlib.NumberTheory.RamificationInertia.Ramification -import Mathlib.NumberTheory.RamificationInertia.Inertia -import Mathlib.RingTheory.DedekindDomain.Factorization +module + +public import Mathlib.NumberTheory.RamificationInertia.Ramification +public import Mathlib.NumberTheory.RamificationInertia.Inertia +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.Neukirch.ExtensionOfDedekindDomains @@ -30,6 +17,8 @@ import Mathlib.RingTheory.DedekindDomain.Factorization Imported Lean Pool material for `LeanPool.Neukirch.ExtensionOfDedekindDomains`. -/ +@[expose] public section + open IsDedekindDomain Algebra UniqueFactorizationMonoid Ideal.IsDedekindDomain Multiset Module diff --git a/LeanPool/Neukirch/HilbertRamificationTheory.lean b/LeanPool/Neukirch/HilbertRamificationTheory.lean index aa9e3b2411..03e3b892c5 100644 --- a/LeanPool/Neukirch/HilbertRamificationTheory.lean +++ b/LeanPool/Neukirch/HilbertRamificationTheory.lean @@ -3,30 +3,15 @@ Copyright (c) 2023 Hu Yongle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Hu Yongle -/ -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel +module + + +public import LeanPool.Neukirch.ExtensionOfDedekindDomains +public import Mathlib.NumberTheory.NumberField.Basic import Mathlib.FieldTheory.Finite.GaloisField import Mathlib.NumberTheory.NumberField.Norm -import Mathlib.LinearAlgebra.Dimension.DivisionRing -import Mathlib.RingTheory.Ideal.Norm.AbsNorm import Mathlib.RingTheory.RamificationInertia.Basic -import Mathlib.FieldTheory.Galois.IsGaloisGroup -import Mathlib.NumberTheory.RamificationInertia.Ramification -import Mathlib.NumberTheory.RamificationInertia.Inertia - -import LeanPool.Neukirch.ExtensionOfDedekindDomains +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.Neukirch.HilbertRamificationTheory @@ -34,6 +19,8 @@ import LeanPool.Neukirch.ExtensionOfDedekindDomains Imported Lean Pool material for `LeanPool.Neukirch.HilbertRamificationTheory`. -/ +@[expose] public section + open Algebra open scoped BigOperators @@ -834,20 +821,19 @@ open Classical in theorem DecompositionGroup_card_eq_ramificationIdx_mul_inertiaDeg [IsGalois K L] : Fintype.card (DecompositionGroup p P) = ramificationIdxOfIsGalois p L * inertiaDegOfIsGalois p L := by - apply mul_left_cancel₀ (primesOver_card_ne_zero p L) have : Fintype (orbit (L ≃ₐ[K] L) (primesOverMk p P)) := Set.fintypeRange fun m ↦ m • primesOverMk p P + have horbit : orbit (L ≃ₐ[K] L) (primesOverMk p P) = Set.univ := by + apply Set.eq_univ_of_forall + intro Q + obtain ⟨σ, hs⟩ := IsMaximal_conjugates p P Q.1 + exact ⟨σ, by rw [← Subtype.val_inj, ← hs]; rfl⟩ + apply mul_left_cancel₀ (primesOver_card_ne_zero p L) rw [ramificationIdx_mul_inertiaDegOfIsGalois, ← IsGalois.card_aut_eq_finrank, Nat.card_eq_fintype_card, DecompositionGroup, ← MulAction.card_orbit_mul_card_stabilizer_eq_card_group (L ≃ₐ[K] L) (primesOverMk p P)] - congr 1 - · rw [Fintype.card_of_finset' (@Finset.univ (primesOver p L) _), Finset.card_univ] - · exact (Fintype.card_coe (primesOver p L)).symm - · intro Q - simp only [Finset.univ_eq_attach, Finset.mem_attach, true_iff, MulAction.mem_orbit_iff] - rcases IsMaximal_conjugates p P Q.1 with ⟨σ, hs⟩ - exact ⟨σ, by rw [← Subtype.val_inj, ← hs]; rfl⟩ - · simp_all + simp only [horbit, Fintype.card_setUniv, Fintype.card_coe] + congr! open Classical in theorem Extension_degree_over_DecompositionField_eq_ramificationIdx_mul_inertiaDeg @@ -1057,8 +1043,8 @@ theorem ResidueGaloisHom_surjective [hn : Normal K L] : let τ := ((IntermediateField.adjoin.powerBasis (hn.isIntegral a.1)).lift b.1 h).fieldRangeToAlgEquiv.liftNormal L use τ - refine AlgEquiv.coe_toAlgHom_injective ((@PowerBasis.liftEquiv E _ F _ _ E _ _ e).injective ?_) - apply Subtype.val_inj.mp + apply AlgEquiv.coe_toAlgHom_injective + apply e.algHom_ext change ((ResidueGaloisHom p P) τ) e.gen = σ e.gen simp only [← ha] calc _ = ϕP ((GalAlgEquiv τ) a) := rfl @@ -1070,9 +1056,7 @@ theorem ResidueGaloisHom_surjective [hn : Normal K L] : rw [← PowerBasis.lift_gen (IntermediateField.adjoin.powerBasis (hn.isIntegral a.1)) b.1 h, GalAlgEquiv_apply, ha, AlgEquiv.liftNormal_intermediateField_commutes] rfl - _ = _ := by - change (e.liftEquiv σ.toAlgHom).1 = σ (ϕP a) - simp_all + _ = _ := congrArg σ ha.symm @@ -1205,12 +1189,9 @@ theorem inertiaDeg_over_InertiaIdeal_eq_one_of_unique (p : Ideal (𝓞 K)) (P : inertiaDeg_eq_of_isMaximal (InertiaIdeal' K P) P, ← card_aut_eq_finrank, ← Nat.card_congr <| MulEquiv.toEquiv <| autQuoutientInertiaGroupEquivResidueFieldAut (InertiaIdeal' K P) P, - Nat.card_eq_fintype_card] - have hm := Subgroup.card_eq_card_quotient_mul_card_subgroup (InertiaGroup (InertiaField' K P) P) - nth_rw 1 [(Subgroup.card_eq_iff_eq_top (InertiaGroup (InertiaField' K P) P)).mpr <| - InertiaGroup_InertiaIdeal_top K P, ← one_mul (Nat.card (L ≃ₐ[InertiaField' K P] L))] at hm - simp only [Nat.card_eq_fintype_card] at hm - exact mul_right_cancel₀ Fintype.card_ne_zero hm.symm + InertiaGroup_InertiaIdeal_top K P] + let := QuotientGroup.subsingleton_quotient_top (G := L ≃ₐ[InertiaField' K P] L) + exact Nat.card_unique theorem ramificationIdx_over_InertiaIdeal_eq_ramificationIdx_of_unique : ramificationIdxOfIsGalois (InertiaIdeal' K P) L = ramificationIdxOfIsGalois p L := by diff --git a/LeanPool/OSforGFF.lean b/LeanPool/OSforGFF.lean index 990d34d975..82816c46d1 100644 --- a/LeanPool/OSforGFF.lean +++ b/LeanPool/OSforGFF.lean @@ -3,17 +3,20 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import LeanPool.OSforGFF.Bochner -import LeanPool.OSforGFF.Covariance -import LeanPool.OSforGFF.GaussianField -import LeanPool.OSforGFF.General -import LeanPool.OSforGFF.KolmogorovExtension4 -import LeanPool.OSforGFF.Measure -import LeanPool.OSforGFF.Minlos -import LeanPool.OSforGFF.OS -import LeanPool.OSforGFF.Schwinger -import LeanPool.OSforGFF.Spacetime +public import LeanPool.OSforGFF.Bochner +public import LeanPool.OSforGFF.Covariance +public import LeanPool.OSforGFF.GaussianField +public import LeanPool.OSforGFF.General +public import LeanPool.OSforGFF.KolmogorovExtension4 +public import LeanPool.OSforGFF.Measure +public import LeanPool.OSforGFF.Minlos +public import LeanPool.OSforGFF.OS +public import LeanPool.OSforGFF.Schwinger +public import LeanPool.OSforGFF.Spacetime +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # Osterwalder-Schrader Axioms for the Gaussian Free Field @@ -25,3 +28,5 @@ Main declarations: `OSforGFF.gaussianFreeField_satisfies_all_OS_axioms` Tags: analysis, measure-theory, probability, mathematical-physics MSC: 81T08, 60G15, 46G12 -/ + +@[expose] public section diff --git a/LeanPool/OSforGFF/Bochner.lean b/LeanPool/OSforGFF/Bochner.lean index bfac56ace8..386a99793c 100644 --- a/LeanPool/OSforGFF/Bochner.lean +++ b/LeanPool/OSforGFF/Bochner.lean @@ -3,14 +3,19 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.Bochner.FejerPD -import LeanPool.OSforGFF.Bochner.Main -import LeanPool.OSforGFF.Bochner.PositiveDefinite -import LeanPool.OSforGFF.Bochner.Sazonov +public import LeanPool.OSforGFF.Bochner.FejerPD +public import LeanPool.OSforGFF.Bochner.Main +public import LeanPool.OSforGFF.Bochner.PositiveDefinite +public import LeanPool.OSforGFF.Bochner.Sazonov +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # `LeanPool.OSforGFF.Bochner` index Import aggregator for the `Bochner` directory. -/ + +@[expose] public section diff --git a/LeanPool/OSforGFF/Bochner/FejerPD.lean b/LeanPool/OSforGFF/Bochner/FejerPD.lean index 7d6d74004a..df68dd312c 100644 --- a/LeanPool/OSforGFF/Bochner/FejerPD.lean +++ b/LeanPool/OSforGFF/Bochner/FejerPD.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ - - -import LeanPool.OSforGFF.Bochner.PositiveDefinite -import Mathlib.Analysis.Fourier.FourierTransform -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.MeasureTheory.Measure.Haar.NormedSpace -import Mathlib.MeasureTheory.Measure.Prod +module + +public import LeanPool.OSforGFF.Bochner.PositiveDefinite +public import Mathlib.Analysis.Fourier.FourierTransform +public import Mathlib.Analysis.CStarAlgebra.Classes +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Bernstein import Mathlib.MeasureTheory.Integral.DominatedConvergence /-! @@ -40,6 +41,8 @@ The kernel → 1 pointwise and is bounded by 1, so DCT gives J_R → ∫ ψ. - Folland, *A Course in Abstract Harmonic Analysis*, §4.2, Lemma 4.8 -/ +@[expose] public section + open MeasureTheory Complex Filter Topology BigOperators open scoped Real FourierTransform InnerProductSpace diff --git a/LeanPool/OSforGFF/Bochner/Main.lean b/LeanPool/OSforGFF/Bochner/Main.lean index 730bdce6da..5a3b9f002f 100644 --- a/LeanPool/OSforGFF/Bochner/Main.lean +++ b/LeanPool/OSforGFF/Bochner/Main.lean @@ -3,20 +3,22 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module +import Mathlib.MeasureTheory.Measure.LevyProkhorovMetric -import LeanPool.OSforGFF.Bochner.PositiveDefinite +public import LeanPool.OSforGFF.Bochner.PositiveDefinite +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import Mathlib.MeasureTheory.Measure.CharacteristicFunction.Basic +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.MeasureTheory.Measure.Tight import LeanPool.OSforGFF.Bochner.FejerPD -import Mathlib.Analysis.Fourier.FourierTransform +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.Fourier.Inversion -import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.MeasureTheory.Measure.CharacteristicFunction.Basic -import Mathlib.MeasureTheory.Integral.DominatedConvergence -import Mathlib.MeasureTheory.Measure.Haar.NormedSpace +import Mathlib.MeasureTheory.Measure.IntegralCharFun import Mathlib.MeasureTheory.Measure.Prokhorov import Mathlib.MeasureTheory.Measure.TightNormed -import Mathlib.MeasureTheory.Measure.IntegralCharFun /-! # Bochner's Theorem @@ -67,6 +69,8 @@ avoiding the Riesz-Markov-Kakutani theorem entirely: - G.B. Folland, *A Course in Abstract Harmonic Analysis*, CRC Press (2016), §4.2 -/ +@[expose] public section + open MeasureTheory Complex Filter Topology open scoped Real InnerProductSpace FourierTransform diff --git a/LeanPool/OSforGFF/Bochner/PositiveDefinite.lean b/LeanPool/OSforGFF/Bochner/PositiveDefinite.lean index 53b236ad88..e9cc928d23 100644 --- a/LeanPool/OSforGFF/Bochner/PositiveDefinite.lean +++ b/LeanPool/OSforGFF/Bochner/PositiveDefinite.lean @@ -3,20 +3,10 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module - -import Mathlib.Basic.Complex.Basic -import Mathlib.Analysis.Complex.Order -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Data.Fintype.Basic -import Mathlib.Algebra.Module.LinearMap.Defs -import Mathlib.Analysis.Normed.Group.Basic -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.LinearAlgebra.Matrix.PosDef -import Mathlib.LinearAlgebra.Matrix.Kronecker -import Mathlib.Analysis.Matrix.Hermitian +public import Mathlib.Analysis.Complex.Norm import Mathlib.Analysis.Matrix.Order -import Mathlib.Analysis.SpecialFunctions.Complex.Circle /-! # Positive Definite Functions @@ -48,6 +38,8 @@ but that weaker condition does not imply Hermitian symmetry. - `isPositiveDefinite_precomp_linear`: composition with linear maps preserves PD -/ +@[expose] public section + open Complex BigOperators open scoped Kronecker open scoped ComplexOrder diff --git a/LeanPool/OSforGFF/Bochner/Sazonov.lean b/LeanPool/OSforGFF/Bochner/Sazonov.lean index e912ed9330..930499ed6b 100644 --- a/LeanPool/OSforGFF/Bochner/Sazonov.lean +++ b/LeanPool/OSforGFF/Bochner/Sazonov.lean @@ -3,13 +3,11 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Analysis.InnerProductSpace.Adjoint -import Mathlib.Analysis.InnerProductSpace.Positive -import Mathlib.Analysis.InnerProductSpace.l2Space -import Mathlib.Analysis.LocallyConvex.WithSeminorms -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import Mathlib.Analysis.InnerProductSpace.Positive +public import Mathlib.Analysis.InnerProductSpace.l2Space +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Sazonov Topology @@ -40,6 +38,8 @@ whenever √⟪x-y, S(x-y)⟫ < 1. * Da Prato-Zabczyk, "Stochastic Equations in Infinite Dimensions", §1.2 -/ +@[expose] public section + open MeasureTheory Complex Filter Topology Set InnerProductSpace open scoped Real diff --git a/LeanPool/OSforGFF/Covariance.lean b/LeanPool/OSforGFF/Covariance.lean index f564aba7c2..4639cdc521 100644 --- a/LeanPool/OSforGFF/Covariance.lean +++ b/LeanPool/OSforGFF/Covariance.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import LeanPool.OSforGFF.Covariance.Momentum -import LeanPool.OSforGFF.Covariance.Parseval -import LeanPool.OSforGFF.Covariance.Position -import LeanPool.OSforGFF.Covariance.RealForm +public import LeanPool.OSforGFF.Covariance.Momentum +public import LeanPool.OSforGFF.Covariance.Parseval +public import LeanPool.OSforGFF.Covariance.Position +public import LeanPool.OSforGFF.Covariance.RealForm +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp /-! # `LeanPool.OSforGFF.Covariance` index Import aggregator for the `Covariance` directory. -/ + +@[expose] public section diff --git a/LeanPool/OSforGFF/Covariance/Momentum.lean b/LeanPool/OSforGFF/Covariance/Momentum.lean index bf71aec5fd..0fd659f4c6 100644 --- a/LeanPool/OSforGFF/Covariance/Momentum.lean +++ b/LeanPool/OSforGFF/Covariance/Momentum.lean @@ -3,29 +3,19 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.Analysis.Fourier.FourierTransform +-- Import our basic definitions +public import LeanPool.OSforGFF.Spacetime.Basic +public import LeanPool.OSforGFF.General.FunctionalAnalysis +public import LeanPool.OSforGFF.General.BesselFunction import Mathlib.Analysis.SpecialFunctions.Bernstein -import Mathlib.Analysis.SpecialFunctions.Gamma.Basic -import Mathlib.Data.Nat.Factorial.DoubleFactorial -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.Basic.Complex.Basic -import Mathlib.Analysis.Complex.Exponential -import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform -import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals -import Mathlib.MeasureTheory.Integral.Prod +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.MeasureTheory.Constructions.HaarToSphere import Mathlib.Probability.Moments.IntegrableExpMul --- Import our basic definitions -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Spacetime.Euclidean -import LeanPool.OSforGFF.General.FunctionalAnalysis -import LeanPool.OSforGFF.General.BesselFunction - /-! # Momentum Space Propagator for Gaussian Free Field @@ -48,6 +38,8 @@ via Fourier transform. - `freePropagator_pos`, `freePropagator_bounded`: Propagator is positive and bounded -/ +@[expose] public section + open MeasureTheory Complex Real Filter open TopologicalSpace open scoped Real InnerProductSpace BigOperators diff --git a/LeanPool/OSforGFF/Covariance/Parseval.lean b/LeanPool/OSforGFF/Covariance/Parseval.lean index 9f9ec773d7..d9ed1c1d33 100644 --- a/LeanPool/OSforGFF/Covariance/Parseval.lean +++ b/LeanPool/OSforGFF/Covariance/Parseval.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module +public import LeanPool.OSforGFF.Covariance.Momentum +public import Mathlib.Analysis.Distribution.SchwartzSpace.Fourier import LeanPool.OSforGFF.General.FourierTransforms -import LeanPool.OSforGFF.Covariance.Momentum +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.MeasureTheory.Function.SpecialFunctions.Inner /-! # Parseval Identity for Covariance @@ -49,6 +53,8 @@ where: - Fubini requires showing the triple integral is absolutely convergent -/ +@[expose] public section + section ParsevalCovariance open MeasureTheory Complex Real SchwartzMap diff --git a/LeanPool/OSforGFF/Covariance/Position.lean b/LeanPool/OSforGFF/Covariance/Position.lean index 90087e965b..882da1a580 100644 --- a/LeanPool/OSforGFF/Covariance/Position.lean +++ b/LeanPool/OSforGFF/Covariance/Position.lean @@ -3,27 +3,15 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.Analysis.Fourier.FourierTransform -import Mathlib.Analysis.SpecialFunctions.Bernstein -import Mathlib.Analysis.SpecialFunctions.Gamma.Basic -import Mathlib.Data.Nat.Factorial.DoubleFactorial -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.Basic.Complex.Basic -import Mathlib.Analysis.Complex.Exponential -import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral - -- Import our basic definitions -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Spacetime.Euclidean -import LeanPool.OSforGFF.Spacetime.DiscreteSymmetry -import LeanPool.OSforGFF.Schwinger.Defs -import LeanPool.OSforGFF.General.FunctionalAnalysis -import LeanPool.OSforGFF.Covariance.Momentum -import LeanPool.OSforGFF.Covariance.Parseval +public import LeanPool.OSforGFF.Spacetime.Euclidean +public import LeanPool.OSforGFF.Spacetime.DiscreteSymmetry +public import LeanPool.OSforGFF.Covariance.Parseval +public import LeanPool.OSforGFF.Spacetime.ComplexTestFunction +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp /-! # Position-Space Free Covariance @@ -42,6 +30,8 @@ C(x,y) = ∫₀^∞ e^{−sm²} H(s,|x−y|) ds via the heat kernel. - `covariance_timeReflection_invariant`: Time reflection invariance -/ +@[expose] public section + open MeasureTheory Complex Real Filter open TopologicalSpace open scoped Real InnerProductSpace BigOperators diff --git a/LeanPool/OSforGFF/Covariance/RealForm.lean b/LeanPool/OSforGFF/Covariance/RealForm.lean index 36c36fa998..759f1941c4 100644 --- a/LeanPool/OSforGFF/Covariance/RealForm.lean +++ b/LeanPool/OSforGFF/Covariance/RealForm.lean @@ -3,23 +3,12 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.Analysis.Fourier.FourierTransform -import Mathlib.Analysis.SpecialFunctions.Bernstein -import Mathlib.Analysis.SpecialFunctions.Gamma.Basic -import Mathlib.Data.Nat.Factorial.DoubleFactorial -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.Basic.Complex.Basic - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Spacetime.PositiveTimeTestFunction -import LeanPool.OSforGFF.Spacetime.DiscreteSymmetry -import LeanPool.OSforGFF.Covariance.Position -import LeanPool.OSforGFF.Spacetime.ComplexTestFunction -import LeanPool.OSforGFF.Covariance.Momentum +public import LeanPool.OSforGFF.Spacetime.PositiveTimeTestFunction +public import LeanPool.OSforGFF.Covariance.Position +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp /-! # Real Covariance Form and Square Root Propagator Embedding @@ -35,6 +24,8 @@ square root propagator embedding theorem. - `freeCovarianceFormR_pos`: Positivity of the quadratic form -/ +@[expose] public section + open MeasureTheory Complex Matrix open scoped Real InnerProductSpace BigOperators ComplexConjugate @@ -371,7 +362,7 @@ lemma embeddingMap_norm_sq (m : ℝ) [Fact (0 < m)] (f : TestFunction) : conv_rhs => arg 2; rw [← coe_nnnorm, ENNReal.ofReal_coe_nnreal] /-- ℝ-linear view of the Lp multiplication CLM (avoiding `restrictScalars`). -/ -private noncomputable def momentumWeightSqrt_mathlib_mul_CLM_real (m : ℝ) [Fact (0 < m)] : +noncomputable def momentumWeightSqrtMathlibMulCLMReal (m : ℝ) [Fact (0 < m)] : Lp ℂ 2 (volume : Measure SpaceTime) →L[ℝ] Lp ℂ 2 (volume : Measure SpaceTime) where toLinearMap := @@ -384,7 +375,7 @@ private noncomputable def momentumWeightSqrt_mathlib_mul_CLM_real (m : ℝ) [Fac /-- Continuous linear map obtained by composing the proven building blocks. -/ noncomputable def embeddingMapCLM (m : ℝ) [Fact (0 < m)] : TestFunction →L[ℝ] Lp ℂ 2 (volume : Measure SpaceTime) := - ((momentumWeightSqrt_mathlib_mul_CLM_real m).comp (schwartzToL2CLMReal m)).comp + ((momentumWeightSqrtMathlibMulCLMReal m).comp (schwartzToL2CLMReal m)).comp ((fourierTransformCLMReal).comp toComplexCLM) lemma embeddingMapCLM_apply (m : ℝ) [Fact (0 < m)] (f : TestFunction) : diff --git a/LeanPool/OSforGFF/GaussianField.lean b/LeanPool/OSforGFF/GaussianField.lean index 2811a7662d..c4b7ffc7ae 100644 --- a/LeanPool/OSforGFF/GaussianField.lean +++ b/LeanPool/OSforGFF/GaussianField.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.GaussianField.Nuclear -import LeanPool.OSforGFF.GaussianField.SchwartzNuclear +public import LeanPool.OSforGFF.GaussianField.Nuclear +public import LeanPool.OSforGFF.GaussianField.SchwartzNuclear +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # `LeanPool.OSforGFF.GaussianField` index Import aggregator for the `GaussianField` directory. -/ + +@[expose] public section diff --git a/LeanPool/OSforGFF/GaussianField/Nuclear.lean b/LeanPool/OSforGFF/GaussianField/Nuclear.lean index aadc5e665b..b70316d02f 100644 --- a/LeanPool/OSforGFF/GaussianField/Nuclear.lean +++ b/LeanPool/OSforGFF/GaussianField/Nuclear.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.GaussianField.Nuclear.DyninMityagin -import LeanPool.OSforGFF.GaussianField.Nuclear.NuclearSpace -import LeanPool.OSforGFF.GaussianField.Nuclear.NuclearTensorProduct +public import LeanPool.OSforGFF.GaussianField.Nuclear.DyninMityagin +public import LeanPool.OSforGFF.GaussianField.Nuclear.NuclearSpace +public import LeanPool.OSforGFF.GaussianField.Nuclear.NuclearTensorProduct +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal /-! # `LeanPool.OSforGFF.GaussianField.Nuclear` index Import aggregator for the `GaussianField/Nuclear` directory. -/ + +@[expose] public section diff --git a/LeanPool/OSforGFF/GaussianField/Nuclear/DyninMityagin.lean b/LeanPool/OSforGFF/GaussianField/Nuclear/DyninMityagin.lean index 6632e66ee4..682da046ca 100644 --- a/LeanPool/OSforGFF/GaussianField/Nuclear/DyninMityagin.lean +++ b/LeanPool/OSforGFF/GaussianField/Nuclear/DyninMityagin.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.InnerProductSpace.Defs import Mathlib.Analysis.InnerProductSpace.LinearMap -import Mathlib.Analysis.LocallyConvex.WithSeminorms -import Mathlib.Topology.Algebra.Module.Basic /-! # Dynin-Mityagin Space Typeclass @@ -31,6 +30,8 @@ not just Schwartz spaces. - Gel'fand-Vilenkin, "Generalized Functions" Vol. 4, Ch. 3-4 -/ +@[expose] public section + noncomputable section namespace GaussianField diff --git a/LeanPool/OSforGFF/GaussianField/Nuclear/NuclearSpace.lean b/LeanPool/OSforGFF/GaussianField/Nuclear/NuclearSpace.lean index 4af3d3c966..c47bc01d34 100644 --- a/LeanPool/OSforGFF/GaussianField/Nuclear/NuclearSpace.lean +++ b/LeanPool/OSforGFF/GaussianField/Nuclear/NuclearSpace.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.GaussianField.Nuclear.DyninMityagin +public import LeanPool.OSforGFF.GaussianField.Nuclear.DyninMityagin import Mathlib.Analysis.Convex.Cone.Extension -import Mathlib.Analysis.Normed.Group.InfiniteSum import Mathlib.Analysis.PSeries /-! @@ -40,6 +40,8 @@ DM structure directly from the Hermite basis. - Gel'fand-Vilenkin, "Generalized Functions" Vol. 4 -/ +@[expose] public section + noncomputable section namespace GaussianField diff --git a/LeanPool/OSforGFF/GaussianField/Nuclear/NuclearTensorProduct.lean b/LeanPool/OSforGFF/GaussianField/Nuclear/NuclearTensorProduct.lean index e56de642da..21674ac98a 100644 --- a/LeanPool/OSforGFF/GaussianField/Nuclear/NuclearTensorProduct.lean +++ b/LeanPool/OSforGFF/GaussianField/Nuclear/NuclearTensorProduct.lean @@ -3,14 +3,12 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.GaussianField.Nuclear.DyninMityagin +public import LeanPool.OSforGFF.GaussianField.Nuclear.DyninMityagin +public import Mathlib.Analysis.InnerProductSpace.Basic import LeanPool.OSforGFF.GaussianField.Nuclear.NuclearSpace -import Mathlib.Analysis.LocallyConvex.WithSeminorms import Mathlib.Analysis.PSeries -import Mathlib.Topology.Algebra.InfiniteSum.Basic -import Mathlib.Topology.Algebra.InfiniteSum.Order -import Mathlib.Topology.Algebra.InfiniteSum.Ring /-! # Nuclear Tensor Product via Köthe Sequence Spaces @@ -38,6 +36,8 @@ The tensor product s(ℕ) ⊗̂ s(ℕ) ≅ s(ℕ²) ≅ s(ℕ) via Cantor pairin - Gel'fand-Vilenkin, "Generalized Functions" Vol. 4 -/ +@[expose] public section + noncomputable section namespace GaussianField @@ -1236,7 +1236,7 @@ private lemma lift_norm_bound _ = K * RapidDecaySeq.rapidDecaySeminorm N a := by rfl /-- The underlying linear map for `lift`. -/ -private def liftLM +def liftLM (B : E₁ →ₗ[ℝ] E₂ →ₗ[ℝ] G) {C : ℝ} {s₁ : Finset (@DyninMityaginSpace.ι E₁ _ _ _ _ _ _)} {s₂ : Finset (@DyninMityaginSpace.ι E₂ _ _ _ _ _ _)} @@ -1389,7 +1389,7 @@ end Lift /-! ### Bilinear evaluation: tensor product of functionals -/ /-- The bilinear multiplication form `(x, y) ↦ x * y` as a bilinear map ℝ →ₗ ℝ →ₗ ℝ. -/ -private def mulBilin : ℝ →ₗ[ℝ] ℝ →ₗ[ℝ] ℝ where +def mulBilin : ℝ →ₗ[ℝ] ℝ →ₗ[ℝ] ℝ where toFun x := { toFun := fun y => x * y map_add' := fun y₁ y₂ => mul_add x y₁ y₂ @@ -1400,7 +1400,7 @@ private def mulBilin : ℝ →ₗ[ℝ] ℝ →ₗ[ℝ] ℝ where section Eval /-- Compose the multiplication bilinear form with CLMs on each factor. -/ -private def compBilin (φ₁ : E₁ →L[ℝ] ℝ) (φ₂ : E₂ →L[ℝ] ℝ) : +def compBilin (φ₁ : E₁ →L[ℝ] ℝ) (φ₂ : E₂ →L[ℝ] ℝ) : E₁ →ₗ[ℝ] E₂ →ₗ[ℝ] ℝ := (mulBilin.comp φ₁.toLinearMap).compl₂ φ₂.toLinearMap @@ -1440,7 +1440,7 @@ def _root_.GaussianField.NuclearTensorProduct.evalCLM ((normSeminorm ℝ ℝ).comp φ₂.toLinearMap) hq₂ -- The bilinear bound: ‖φ₁ e₁ * φ₂ e₂‖ ≤ (C₁ * C₂) * (s₁.sup p) e₁ * (s₂.sup p) e₂ have hC_pos : (0 : ℝ) < C₁ * C₂ := by positivity - exact lift (compBilin φ₁ φ₂) hC_pos (fun e₁ e₂ => by + exact lift (s₁ := s₁) (s₂ := s₂) (compBilin φ₁ φ₂) hC_pos (fun e₁ e₂ => by simp only [compBilin_apply] rw [Real.norm_eq_abs, abs_mul] have h₁ : |φ₁ e₁| ≤ C₁ * (s₁.sup DyninMityaginSpace.p) e₁ := by diff --git a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear.lean b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear.lean index 96dab3f198..643afb66d4 100644 --- a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear.lean +++ b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear.lean @@ -3,17 +3,23 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.Basis1D -import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.HermiteFunctions -import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.HermiteNuclear -import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.HermiteTensorProduct -import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.ParametricCalculus -import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.SchwartzHermiteExpansion -import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.SchwartzSlicing +public import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.Basis1D +public import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.HermiteFunctions +public import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.HermiteNuclear +public import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.HermiteTensorProduct +public import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.ParametricCalculus +public import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.SchwartzHermiteExpansion +public import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.SchwartzSlicing +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # `LeanPool.OSforGFF.GaussianField.SchwartzNuclear` index Import aggregator for the `GaussianField/SchwartzNuclear` directory. -/ + +@[expose] public section diff --git a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/Basis1D.lean b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/Basis1D.lean index 4b2f84604d..d6bf1ffbe6 100644 --- a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/Basis1D.lean +++ b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/Basis1D.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.SchwartzHermiteExpansion +public import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.SchwartzHermiteExpansion +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # Nuclear Schauder Basis for S(ℝ, ℝ) — 1D Case @@ -19,6 +22,8 @@ All three are proved from theorems in `HermiteFunctions.lean` and `SchwartzHermiteExpansion.lean`. No axioms. -/ +@[expose] public section + open MeasureTheory Real SchwartzMap noncomputable section diff --git a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/HermiteFunctions.lean b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/HermiteFunctions.lean index 82e2b94134..9d34a3a7b6 100644 --- a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/HermiteFunctions.lean +++ b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/HermiteFunctions.lean @@ -3,15 +3,15 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import Mathlib.RingTheory.Polynomial.Hermite.Basic -import Mathlib.RingTheory.Polynomial.Hermite.Gaussian -import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.Analysis.PSeries -import Mathlib.Analysis.Calculus.LineDeriv.IntegrationByParts +public import Mathlib.RingTheory.Polynomial.Hermite.Basic +public import Mathlib.Analysis.Distribution.SchwartzSpace.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Analysis.Distribution.AEEqOfIntegralContDiff import Mathlib.Analysis.Distribution.SchwartzSpace.Fourier +import Mathlib.Analysis.PSeries +import Mathlib.RingTheory.Polynomial.Hermite.Gaussian /-! # Hermite Functions and Nuclear Structure of Schwartz Space @@ -38,6 +38,8 @@ The polynomial infrastructure is available in - DLMF Chapter 18 (Orthogonal Polynomials) -/ +@[expose] public section + open MeasureTheory Polynomial Real open scoped ContDiff diff --git a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/HermiteNuclear.lean b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/HermiteNuclear.lean index 90373d3514..9a827d58a4 100644 --- a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/HermiteNuclear.lean +++ b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/HermiteNuclear.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.HermiteTensorProduct +public import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.HermiteTensorProduct +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Choose.Multinomial /-! # DyninMityaginSpace Instance for Schwartz Space @@ -19,6 +23,8 @@ isomorphism `SchwartzMap D ℝ ≃L[ℝ] RapidDecaySeq` constructed in on any nontrivial finite-dimensional real normed space. -/ +@[expose] public section + noncomputable section open GaussianField TopologicalSpace diff --git a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/HermiteTensorProduct.lean b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/HermiteTensorProduct.lean index 15f821bd90..eb2edf8750 100644 --- a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/HermiteTensorProduct.lean +++ b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/HermiteTensorProduct.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module + +public import LeanPool.OSforGFF.GaussianField.Nuclear.NuclearTensorProduct +public import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.SchwartzSlicing +public import Mathlib.Analysis.InnerProductSpace.EuclideanDist import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.Basis1D -import LeanPool.OSforGFF.GaussianField.Nuclear.NuclearTensorProduct -import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.SchwartzSlicing import Mathlib.Algebra.Order.Chebyshev +import Mathlib.Analysis.Calculus.ContDiff.Bounds +import Mathlib.Analysis.Calculus.SmoothSeries +import Mathlib.Analysis.PSeries +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic import Mathlib.MeasureTheory.Integral.Pi /-! @@ -36,6 +44,8 @@ the continuous linear equivalence. - Thangavelu, "Lectures on Hermite and Laguerre Expansions", Ch. 1 -/ +@[expose] public section + noncomputable section open GaussianField MeasureTheory Real SchwartzMap @@ -163,15 +173,15 @@ private theorem hermiteCoeff_rapid_decay (f : SchwartzMap ℝ ℝ) (k : ℕ) : /-- The forward linear map of the 1D Hermite isomorphism: `f ↦ (hermiteCoeff1D n f)ₙ` as a rapid decay sequence. -/ -private def toRapidDecay1DLM : SchwartzMap ℝ ℝ →ₗ[ℝ] RapidDecaySeq where - toFun f := ⟨fun n => hermiteCoeff1D n f, hermiteCoeff_rapid_decay f⟩ +def toRapidDecay1DLM : SchwartzMap ℝ ℝ →ₗ[ℝ] RapidDecaySeq where + toFun f := ⟨fun n => hermiteCoeff1D n f, by exact hermiteCoeff_rapid_decay f⟩ map_add' f g := RapidDecaySeq.ext fun n => (hermiteCoeff1D_linear n).map_add f g map_smul' r f := RapidDecaySeq.ext fun n => by simp only [RapidDecaySeq.smul_val, RingHom.id_apply] exact (hermiteCoeff1D_linear n).map_smul r f /-- The forward CLM: Schwartz → RapidDecaySeq via Hermite coefficients. -/ -private noncomputable def toRapidDecay1DCLM : SchwartzMap ℝ ℝ →L[ℝ] RapidDecaySeq where +noncomputable def toRapidDecay1DCLM : SchwartzMap ℝ ℝ →L[ℝ] RapidDecaySeq where toLinearMap := toRapidDecay1DLM cont := by -- Each rapidDecaySeminorm k on the output is bounded by Schwartz seminorms on the input @@ -470,7 +480,7 @@ private theorem rapidDecay_hermite_summable (a : RapidDecaySeq) : ⟨_, rapidDecay_hermite_hasSum a⟩ /-- The backward linear map (underlying `LinearMap`). -/ -private noncomputable def fromRapidDecay1DLM : RapidDecaySeq →ₗ[ℝ] SchwartzMap ℝ ℝ where +noncomputable def fromRapidDecay1DLM : RapidDecaySeq →ₗ[ℝ] SchwartzMap ℝ ℝ where toFun := fun a => ∑' n, a.val n • schwartzHermiteBasis1D n map_add' := fun a b => by simp only [RapidDecaySeq.add_val] @@ -528,10 +538,10 @@ private lemma fromRapidDecay1DLM_isBounded : exact hbound a⟩ /-- The backward CLM: `RapidDecaySeq → SchwartzMap ℝ ℝ` via Hermite expansion. -/ -private noncomputable def fromRapidDecay1DCLM : RapidDecaySeq →L[ℝ] SchwartzMap ℝ ℝ where +noncomputable def fromRapidDecay1DCLM : RapidDecaySeq →L[ℝ] SchwartzMap ℝ ℝ where toLinearMap := fromRapidDecay1DLM - cont := - WithSeminorms.continuous_of_isBounded RapidDecaySeq.rapidDecay_withSeminorms + cont := by + exact WithSeminorms.continuous_of_isBounded RapidDecaySeq.rapidDecay_withSeminorms (schwartz_withSeminorms ℝ ℝ ℝ) fromRapidDecay1DLM fromRapidDecay1DLM_isBounded /-- The 1D Hermite isomorphism: `SchwartzMap ℝ ℝ ≃L[ℝ] RapidDecaySeq`. -/ @@ -1046,8 +1056,8 @@ private lemma hermiteFunctionNd_decay (d : ℕ) (α : MultiIndex d) (k n : ℕ) noncomputable def schwartzHermiteBasisNd (d : ℕ) (α : MultiIndex d) : SchwartzMap (EuclideanSpace ℝ (Fin d)) ℝ where toFun := hermiteFunctionNd d α - smooth' := hermiteFunctionNd_contDiff d α - decay' := hermiteFunctionNd_decay d α + smooth' := by exact hermiteFunctionNd_contDiff d α + decay' := by exact hermiteFunctionNd_decay d α /-- The coefficient of a Schwartz function against a multidimensional Hermite function. -/ noncomputable def hermiteCoeffNd (d : ℕ) (α : MultiIndex d) @@ -2037,12 +2047,12 @@ private theorem hermiteCoeffNd_rapid_decayFlat (d' : ℕ) /-- The forward linear map for the multi-d Hermite expansion. Maps `S(ℝ^{d'+1})` to `s(ℕ)` via flattened Hermite coefficients. -/ -private noncomputable def toRapidDecayNdLM (d' : ℕ) : +noncomputable def toRapidDecayNdLM (d' : ℕ) : SchwartzMap (EuclideanSpace ℝ (Fin (d' + 1))) ℝ →ₗ[ℝ] RapidDecaySeq where toFun f := ⟨fun n => hermiteCoeffNd (d' + 1) ((multiIndexEquiv d').symm n) f, - hermiteCoeffNd_rapid_decayFlat d' f⟩ - map_add' f g := RapidDecaySeq.ext fun n => - (hermiteCoeffNd_linear (d' + 1) _).map_add f g + by exact hermiteCoeffNd_rapid_decayFlat d' f⟩ + map_add' f g := by + exact RapidDecaySeq.ext fun n => (hermiteCoeffNd_linear (d' + 1) _).map_add f g map_smul' r f := RapidDecaySeq.ext fun n => by simp only [RapidDecaySeq.smul_val, RingHom.id_apply] exact (hermiteCoeffNd_linear (d' + 1) _).map_smul r f @@ -2083,13 +2093,13 @@ noncomputable def toRapidDecayNdCLM (d : ℕ) : cont := WithSeminorms.continuous_of_isBounded (schwartz_withSeminorms ℝ (EuclideanSpace ℝ (Fin (d' + 1))) ℝ) RapidDecaySeq.rapidDecay_withSeminorms - _ (toRapidDecayNdLM_isBounded d') + _ (by exact toRapidDecayNdLM_isBounded d') } /-! ### Multi-Dimensional Backward Map Construction -/ /-- The flattened multi-d Hermite basis: the n-th basis function via `multiIndexEquiv`. -/ -private noncomputable def flatBasisNd (d : ℕ) (n : ℕ) : +noncomputable def flatBasisNd (d : ℕ) (n : ℕ) : SchwartzMap (EuclideanSpace ℝ (Fin (d + 1))) ℝ := schwartzHermiteBasisNd (d + 1) ((multiIndexEquiv d).symm n) @@ -2200,15 +2210,15 @@ private lemma rapidDecay_pointwise_seminorm_leNd (d : ℕ) (a : RapidDecaySeq) ( h_ptwise (rapidDecay_seminorm_summableNd d a k l) /-- The Schwartz function from a rapid-decay multi-d Hermite expansion. -/ -private noncomputable def rapidDecay_schwartzMapNd (d : ℕ) (a : RapidDecaySeq) : +noncomputable def rapidDecaySchwartzMapNd (d : ℕ) (a : RapidDecaySeq) : SchwartzMap (EuclideanSpace ℝ (Fin (d + 1))) ℝ where toFun x := ∑' n, a.val n * flatBasisNd d n x - smooth' := rapidDecay_hermite_contDiffNd d a - decay' k l := ⟨_, rapidDecay_pointwise_seminorm_leNd d a k l⟩ + smooth' := by exact rapidDecay_hermite_contDiffNd d a + decay' k l := by exact ⟨_, rapidDecay_pointwise_seminorm_leNd d a k l⟩ private lemma rapidDecay_schwartzMapNd_apply (d : ℕ) (a : RapidDecaySeq) (x : EuclideanSpace ℝ (Fin (d + 1))) : - rapidDecay_schwartzMapNd d a x = ∑' n, a.val n * flatBasisNd d n x := rfl + rapidDecaySchwartzMapNd d a x = ∑' n, a.val n * flatBasisNd d n x := rfl private noncomputable instance schwartzMapNd_T2Space (d : ℕ) : T2Space (SchwartzMap (EuclideanSpace ℝ (Fin d)) ℝ) := by @@ -2218,12 +2228,12 @@ private noncomputable instance schwartzMapNd_T2Space (d : ℕ) : norm_le_zero_iff.mp ((SchwartzMap.norm_le_seminorm ℝ f x).trans (le_of_eq h)))⟩ exact inferInstance -/-- The multi-d Hermite expansion converges to `rapidDecay_schwartzMapNd d a` +/-- The multi-d Hermite expansion converges to `rapidDecaySchwartzMapNd d a` in the Schwartz topology. -/ private theorem rapidDecay_hermite_hasSumNd (d : ℕ) (a : RapidDecaySeq) : - HasSum (fun n => a.val n • flatBasisNd d n) (rapidDecay_schwartzMapNd d a) := - rapidDecay_hasSum_generic (flatBasisNd d) a (rapidDecay_schwartzMapNd d a) + HasSum (fun n => a.val n • flatBasisNd d n) (rapidDecaySchwartzMapNd d a) := + rapidDecay_hasSum_generic (flatBasisNd d) a (rapidDecaySchwartzMapNd d a) (rapidDecay_schwartzMapNd_apply d a) (rapidDecay_seminorm_summableNd d a) (fun c n l x => scalar_flatBasisNd_iFDeriv_bound d c n l x) @@ -2232,9 +2242,10 @@ private theorem rapidDecay_hermite_summableNd (d : ℕ) (a : RapidDecaySeq) : Summable (fun n => a.val n • flatBasisNd d n) := ⟨_, rapidDecay_hermite_hasSumNd d a⟩ -private noncomputable def fromRapidDecayNdLM (d : ℕ) : +/-- The linear map reconstructing a multidimensional Schwartz function from its coefficients. -/ +noncomputable def fromRapidDecayNdLM (d : ℕ) : RapidDecaySeq →ₗ[ℝ] SchwartzMap (EuclideanSpace ℝ (Fin (d + 1))) ℝ where - toFun := rapidDecay_schwartzMapNd d + toFun := rapidDecaySchwartzMapNd d map_add' a b := SchwartzMap.ext fun x => by change ∑' n, (a + b).val n * flatBasisNd d n x = (∑' n, a.val n * flatBasisNd d n x) + (∑' n, b.val n * flatBasisNd d n x) @@ -2301,7 +2312,7 @@ noncomputable def fromRapidDecayNdCLM (d : ℕ) : cont := WithSeminorms.continuous_of_isBounded RapidDecaySeq.rapidDecay_withSeminorms (schwartz_withSeminorms ℝ (EuclideanSpace ℝ (Fin (d' + 1))) ℝ) - _ (fromRapidDecayNdLM_isBounded d') + _ (by exact fromRapidDecayNdLM_isBounded d') } /-! ### Left Inverse and Completeness via Injectivity -/ @@ -2311,9 +2322,9 @@ Schwartz function exactly match the input sequence. -/ private lemma hermiteCoeffNd_rapidDecay_schwartzMapNd (d' : ℕ) (a : RapidDecaySeq) (n : ℕ) : hermiteCoeffNd (d' + 1) ((multiIndexEquiv d').symm n) - (rapidDecay_schwartzMapNd d' a) = a.val n := by + (rapidDecaySchwartzMapNd d' a) = a.val n := by -- Rewrite the pointwise-tsum Schwartz map to the module-level tsum - rw [show (rapidDecay_schwartzMapNd d' a : SchwartzMap _ _) = + rw [show (rapidDecaySchwartzMapNd d' a : SchwartzMap _ _) = ∑' m, a.val m • flatBasisNd d' m from (rapidDecay_hermite_hasSumNd d' a).tsum_eq.symm] -- Push hermiteCoeffNd (as CLM) through the tsum @@ -2370,8 +2381,8 @@ noncomputable def schwartzRapidDecayEquivNd (d' : ℕ) : (toRapidDecayNdCLM (d' + 1)) (fromRapidDecayNdCLM (d' + 1)) -- Left inverse: from(to(f)) = f - (fun f => - (rapidDecay_hermite_hasSumNd d' (toRapidDecayNdLM d' f)).unique + (fun f => by + exact (rapidDecay_hermite_hasSumNd d' (toRapidDecayNdLM d' f)).unique (schwartz_hermite_completeness_nd d' f)) -- Right inverse: to(from(a)) = a (fun a => by @@ -2389,10 +2400,10 @@ theorem schwartzRapidDecayEquivNd_symm_apply (d' : ℕ) (a : RapidDecaySeq) simp only [schwartzRapidDecayEquivNd] -- Now the goal is fromRapidDecayNdCLM (d'+1) a x = tsum -- fromRapidDecayNdCLM (d'+1) for d'+1 ≥ 1 gives fromRapidDecayNdLM d' a - -- which is rapidDecay_schwartzMapNd d' a + -- which is rapidDecaySchwartzMapNd d' a change fromRapidDecayNdCLM (d' + 1) a x = _ - -- Unfold fromRapidDecayNdCLM to fromRapidDecayNdLM, then to rapidDecay_schwartzMapNd - change rapidDecay_schwartzMapNd d' a x = _ + -- Unfold fromRapidDecayNdCLM to fromRapidDecayNdLM, then to rapidDecaySchwartzMapNd + change rapidDecaySchwartzMapNd d' a x = _ -- By definition, this is ∑' n, a.val n * flatBasisNd d' n x change ∑' n, a.val n * flatBasisNd d' n x = _ -- flatBasisNd d' n = schwartzHermiteBasisNd (d'+1) ((multiIndexEquiv d').symm n) diff --git a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/ParametricCalculus.lean b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/ParametricCalculus.lean index 3f4a83c174..022ba503d8 100644 --- a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/ParametricCalculus.lean +++ b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/ParametricCalculus.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import Mathlib.Analysis.Distribution.SchwartzSpace.Basic -import Mathlib.Analysis.Calculus.ContDiff.FTaylorSeries +import Mathlib.Analysis.Calculus.ContDiff.Operations + +public import Mathlib.Analysis.Distribution.SchwartzSpace.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Analysis.Calculus.ParametricIntegral /-! @@ -23,6 +26,8 @@ not yet available in Mathlib. Used as building blocks in the SchwartzNuclear pro the result is C^∞ and derivatives commute with the integral. -/ +@[expose] public section + open MeasureTheory SchwartzMap open scoped ContDiff diff --git a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/SchwartzHermiteExpansion.lean b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/SchwartzHermiteExpansion.lean index 32145465d8..8756d92f73 100644 --- a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/SchwartzHermiteExpansion.lean +++ b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/SchwartzHermiteExpansion.lean @@ -3,14 +3,14 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import Mathlib.Analysis.InnerProductSpace.Basic +public import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.HermiteFunctions +import Mathlib.Analysis.Calculus.SmoothSeries import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap import Mathlib.Analysis.PSeries -import Mathlib.Topology.Algebra.InfiniteSum.Module -import Mathlib.Analysis.Distribution.TemperateGrowth -import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.HermiteFunctions +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # Schwartz Hermite Expansion (1D) @@ -43,6 +43,8 @@ to be exported: - `hermiteFunction_contDiff` (smoothness) -/ +@[expose] public section + open MeasureTheory Real SchwartzMap open scoped BigOperators diff --git a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/SchwartzSlicing.lean b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/SchwartzSlicing.lean index 94c584dcde..209976f99c 100644 --- a/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/SchwartzSlicing.lean +++ b/LeanPool/OSforGFF/GaussianField/SchwartzNuclear/SchwartzSlicing.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module +public import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.SchwartzHermiteExpansion +public import Mathlib.Analysis.Normed.Lp.MeasurableSpace import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.ParametricCalculus -import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.SchwartzHermiteExpansion +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # Schwartz Function Slicing and Partial Hermite Coefficients @@ -36,6 +40,8 @@ constructions used in the multi-dimensional Hermite expansion proof. - `schwartz_slice_partial_seminorm_bound` — seminorm bound for scalarized slices -/ +@[expose] public section + open MeasureTheory Real SchwartzMap Measure open scoped ContDiff @@ -183,11 +189,11 @@ noncomputable def schwartzSlice (d : ℕ) (y : EuclideanSpace ℝ (Fin (d + 1))) : SchwartzMap ℝ ℝ where toFun t := f (euclideanSnoc (d + 1) y t) - smooth' := - (compCLMOfAntilipschitz ℝ (euclideanSnoc_hasTemperateGrowth d y) + smooth' := by + exact (compCLMOfAntilipschitz ℝ (euclideanSnoc_hasTemperateGrowth d y) (euclideanSnoc_antilipschitz d y) f).smooth' - decay' := - (compCLMOfAntilipschitz ℝ (euclideanSnoc_hasTemperateGrowth d y) + decay' := by + exact (compCLMOfAntilipschitz ℝ (euclideanSnoc_hasTemperateGrowth d y) (euclideanSnoc_antilipschitz d y) f).decay' /-! ## A2: Partial Hermite coefficient is Schwartz @@ -497,8 +503,9 @@ private lemma schwartz_partial_hermiteCoeff_decay (d : ℕ) -- 4. Integrate against |ψ_n(t)| dt (finite since ψ_n is Schwartz) exact ⟨f.seminorm ℝ k m * ∫ t, ‖hermiteFunction n t‖, fun y => by obtain ⟨_, h_comm⟩ := contDiff_parametric_hermiteCoeff d f n - change ‖y‖ ^ k * ‖iteratedFDeriv ℝ m - (fun y' => ∫ t, f (euclideanSnoc (d + 1) y' t) * hermiteFunction n t) y‖ ≤ _ + have hslice (y') (t : ℝ) : + schwartzSlice d f y' t = f (euclideanSnoc (d + 1) y' t) := rfl + simp only [hermiteCoeff1D, hslice] rw [h_comm] -- Factor hermiteFunction n t out of iteratedFDeriv using const_smul have h_factor : ∀ t, iteratedFDeriv ℝ m @@ -546,8 +553,8 @@ noncomputable def schwartzPartialHermiteCoeff (d : ℕ) (n : ℕ) : SchwartzMap (EuclideanSpace ℝ (Fin (d + 1))) ℝ where toFun y := hermiteCoeff1D n (schwartzSlice d f y) - smooth' := schwartz_partial_hermiteCoeff_smooth d f n - decay' := schwartz_partial_hermiteCoeff_decay d f n + smooth' := by exact schwartz_partial_hermiteCoeff_smooth d f n + decay' := by exact schwartz_partial_hermiteCoeff_decay d f n -- A3b: Partial coefficient relates to 1D slice (definitionally true) lemma schwartz_partial_hermiteCoeff_eq_1D (d : ℕ) diff --git a/LeanPool/OSforGFF/General.lean b/LeanPool/OSforGFF/General.lean index f8a76a298d..d343ce73aa 100644 --- a/LeanPool/OSforGFF/General.lean +++ b/LeanPool/OSforGFF/General.lean @@ -3,22 +3,29 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import LeanPool.OSforGFF.General.BesselFunction -import LeanPool.OSforGFF.General.FourierTransforms -import LeanPool.OSforGFF.General.FrobeniusPositivity -import LeanPool.OSforGFF.General.FunctionalAnalysis -import LeanPool.OSforGFF.General.GaussianRBF -import LeanPool.OSforGFF.General.HadamardExp -import LeanPool.OSforGFF.General.L2TimeIntegral -import LeanPool.OSforGFF.General.LaplaceIntegral -import LeanPool.OSforGFF.General.PositiveDefinite -import LeanPool.OSforGFF.General.QuantitativeDecay -import LeanPool.OSforGFF.General.SchurProduct -import LeanPool.OSforGFF.General.SchwartzTranslationDecay +public import LeanPool.OSforGFF.General.BesselFunction +public import LeanPool.OSforGFF.General.FourierTransforms +public import LeanPool.OSforGFF.General.FrobeniusPositivity +public import LeanPool.OSforGFF.General.FunctionalAnalysis +public import LeanPool.OSforGFF.General.GaussianRBF +public import LeanPool.OSforGFF.General.HadamardExp +public import LeanPool.OSforGFF.General.L2TimeIntegral +public import LeanPool.OSforGFF.General.LaplaceIntegral +public import LeanPool.OSforGFF.General.PositiveDefinite +public import LeanPool.OSforGFF.General.QuantitativeDecay +public import LeanPool.OSforGFF.General.SchurProduct +public import LeanPool.OSforGFF.General.SchwartzTranslationDecay +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # `LeanPool.OSforGFF.General` index Import aggregator for the `General` directory. -/ + +@[expose] public section diff --git a/LeanPool/OSforGFF/General/BesselFunction.lean b/LeanPool/OSforGFF/General/BesselFunction.lean index 02101fd63b..a006463b6e 100644 --- a/LeanPool/OSforGFF/General/BesselFunction.lean +++ b/LeanPool/OSforGFF/General/BesselFunction.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import LeanPool.OSforGFF.Spacetime.Euclidean +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp -import Mathlib.MeasureTheory.Integral.IntegralEqImproper -import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Modified Bessel Function K₁ @@ -40,6 +43,8 @@ For the massive scalar field in 4D Euclidean space, the exact formula is: C(x,y) = (m / (4π² |x-y|)) · K₁(m |x-y|) -/ +@[expose] public section + open MeasureTheory Set Filter Asymptotics Real /-- The modified Bessel function K₁(z) via cosh integral representation. diff --git a/LeanPool/OSforGFF/General/FourierTransforms.lean b/LeanPool/OSforGFF/General/FourierTransforms.lean index 4cf07c2a3c..63ae86267e 100644 --- a/LeanPool/OSforGFF/General/FourierTransforms.lean +++ b/LeanPool/OSforGFF/General/FourierTransforms.lean @@ -3,17 +3,12 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.Analysis.Fourier.FourierTransform +public import Mathlib.Analysis.Fourier.FourierTransform +public import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Fourier.Inversion -import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals -import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.MeasureTheory.Integral.CircleIntegral -import Mathlib.MeasureTheory.Integral.Prod -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.Analysis.Distribution.SchwartzSpace.Fourier -import Mathlib.MeasureTheory.Measure.Haar.NormedSpace -import Mathlib.MeasureTheory.Function.SpecialFunctions.Inner +import Mathlib.Analysis.SpecialFunctions.Bernstein /-! # Fourier Transforms for QFT @@ -55,6 +50,8 @@ The 1D result follows from Fourier inversion: 3. Apply Fourier inversion to derive the Lorentzian result -/ +@[expose] public section + open MeasureTheory Complex Real open scoped BigOperators FourierTransform diff --git a/LeanPool/OSforGFF/General/FrobeniusPositivity.lean b/LeanPool/OSforGFF/General/FrobeniusPositivity.lean index 30f6d25b01..e1cdf51532 100644 --- a/LeanPool/OSforGFF/General/FrobeniusPositivity.lean +++ b/LeanPool/OSforGFF/General/FrobeniusPositivity.lean @@ -3,17 +3,9 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.Data.Matrix.Basic -import Mathlib.LinearAlgebra.Matrix.PosDef -import Mathlib.Analysis.Matrix.Spectrum -import Mathlib.Data.Finset.Basic -import Mathlib.LinearAlgebra.Matrix.Diagonal -import Mathlib.LinearAlgebra.Matrix.Orthogonal -import Mathlib.LinearAlgebra.UnitaryGroup -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Data.Matrix.Mul -import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.LinearAlgebra.Matrix.PosDef import Mathlib.Analysis.Matrix.Order /-! @@ -25,6 +17,8 @@ inner product `⟪G, B⟫ = ∑ j l, G j l * B j l` is strictly positive. The pr nonzero), and reduces to `⟪G, B⟫ = tr(H D) = ∑ i, λᵢ Hᵢᵢ > 0`. -/ +@[expose] public section + open Matrix open scoped BigOperators MatrixOrder diff --git a/LeanPool/OSforGFF/General/FunctionalAnalysis.lean b/LeanPool/OSforGFF/General/FunctionalAnalysis.lean index 99fc670a60..a34839f8bb 100644 --- a/LeanPool/OSforGFF/General/FunctionalAnalysis.lean +++ b/LeanPool/OSforGFF/General/FunctionalAnalysis.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ - -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.MeasureTheory.Function.Holder -import Mathlib.Analysis.Fourier.Inversion -import Mathlib.Analysis.Calculus.BumpFunction.Normed -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +module + +public import Mathlib.Analysis.Convolution +public import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct + +public import Mathlib.MeasureTheory.Function.Holder +public import Mathlib.Analysis.Calculus.BumpFunction.Normed +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import Mathlib.Analysis.Distribution.SchwartzSpace.Basic +public import Mathlib.Analysis.Normed.Lp.MeasurableSpace +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial import Mathlib.MeasureTheory.Constructions.HaarToSphere /-! @@ -61,9 +67,10 @@ focusing on integrability, Schwartz function properties, and L² embeddings. - `sub_const_hasTemperateGrowth`: Translation has temperate growth -/ +@[expose] public section + open MeasureTheory NNReal ENNReal Complex open TopologicalSpace Measure -open scoped FourierTransform noncomputable section @@ -151,18 +158,11 @@ complex Lp functions, with support on the real subspace. noncomputable def liftMeasureRealToComplex (dμ_real : ProbabilityMeasure (Lp ℝ 2 μ)) : ProbabilityMeasure (Lp ℂ 2 μ) := - let dμ_complex_measure : Measure (Lp ℂ 2 μ) := - Measure.map embeddingRealToComplex dμ_real - have h_ae : AEMeasurable embeddingRealToComplex dμ_real := by + ⟨Measure.map embeddingRealToComplex dμ_real, by + refine (Measure.isProbabilityMeasure_map_iff ?_).mpr inferInstance apply Continuous.aemeasurable unfold embeddingRealToComplex composedFunction - have : - Continuous - (fun φ : Lp ℝ 2 μ => Complex.ofRealCLM.compLp φ : Lp ℝ 2 μ → Lp ℂ 2 μ) := - Complex.ofRealCLM_continuous_compLp - exact this - have h_is_prob := (Measure.isProbabilityMeasure_map_iff h_ae).mpr inferInstance - ⟨dμ_complex_measure, h_is_prob⟩ + exact Complex.ofRealCLM_continuous_compLp⟩ end LiftMeasure diff --git a/LeanPool/OSforGFF/General/GaussianRBF.lean b/LeanPool/OSforGFF/General/GaussianRBF.lean index e134671086..a006bbd394 100644 --- a/LeanPool/OSforGFF/General/GaussianRBF.lean +++ b/LeanPool/OSforGFF/General/GaussianRBF.lean @@ -3,18 +3,16 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import LeanPool.OSforGFF.General.PositiveDefinite -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Analysis.SpecialFunctions.Exp -import Mathlib.Analysis.Complex.Basic -import Mathlib.LinearAlgebra.Matrix.PosDef -import Mathlib.Analysis.Matrix.Order -import Mathlib.LinearAlgebra.Matrix.Kronecker -import Mathlib.Analysis.Complex.Order -import Mathlib.Data.Matrix.Basic -import Mathlib.Data.Matrix.Mul +public import LeanPool.OSforGFF.General.PositiveDefinite +public import Mathlib.LinearAlgebra.Matrix.PosDef +public import Mathlib.Analysis.Complex.Exponential +public import Mathlib.Analysis.InnerProductSpace.Defs import LeanPool.OSforGFF.General.HadamardExp +import Mathlib.Analysis.InnerProductSpace.Basic +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Gaussian RBF Kernel is Positive Definite @@ -27,6 +25,8 @@ definiteness via the Hadamard series in `HadamardExp.lean`; (3) the Gaussian ker the RBF to the inner product kernel. -/ +@[expose] public section + open Complex BigOperators Real InnerProductSpace Matrix variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℝ H] diff --git a/LeanPool/OSforGFF/General/HadamardExp.lean b/LeanPool/OSforGFF/General/HadamardExp.lean index 6375fb8589..067f322c4b 100644 --- a/LeanPool/OSforGFF/General/HadamardExp.lean +++ b/LeanPool/OSforGFF/General/HadamardExp.lean @@ -3,16 +3,15 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import LeanPool.OSforGFF.General.SchurProduct -import Mathlib.Analysis.SpecialFunctions.Exp -import Mathlib.Analysis.Normed.Algebra.Exponential +public import LeanPool.OSforGFF.General.SchurProduct +public import Mathlib.Analysis.Complex.Exponential +public import Mathlib.Topology.Instances.Matrix +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.CStarAlgebra.Classes import Mathlib.Analysis.Complex.TaylorSeries -import Mathlib.Analysis.SpecialFunctions.ExpDeriv -import Mathlib.Topology.Basic -import Mathlib.Order.Filter.Defs -import Mathlib.Order.Filter.Basic -import Mathlib.Topology.Constructions +import Mathlib.Analysis.SpecialFunctions.Bernstein /-! # Entrywise Exponential of PSD Matrices @@ -25,6 +24,8 @@ coefficients `1/n!` yields a PD matrix. The PSD case follows by a continuity arg exponential. -/ +@[expose] public section + open Complex open scoped BigOperators diff --git a/LeanPool/OSforGFF/General/L2TimeIntegral.lean b/LeanPool/OSforGFF/General/L2TimeIntegral.lean index 52af406011..be4b9889c9 100644 --- a/LeanPool/OSforGFF/General/L2TimeIntegral.lean +++ b/LeanPool/OSforGFF/General/L2TimeIntegral.lean @@ -3,19 +3,13 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.MeasureTheory.Integral.Prod -import Mathlib.MeasureTheory.Integral.Bochner.Set -import Mathlib.MeasureTheory.Function.L2Space -import Mathlib.MeasureTheory.Integral.MeanInequalities -import Mathlib.MeasureTheory.Function.LocallyIntegrable -import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic -import Mathlib.Analysis.Normed.Field.Basic -import Mathlib.MeasureTheory.Group.Integral -import Mathlib.MeasureTheory.Measure.Haar.Unique +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals -import Mathlib.MeasureTheory.Integral.IntegrableOn -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.MeasureTheory.Function.L2Space /-! # L² Bounds for Time Integrals @@ -47,6 +41,8 @@ The key tools are: - Folland "Real Analysis", Thm. 2.37 (Fubini-Tonelli) -/ +@[expose] public section + open MeasureTheory Set Filter open scoped ENNReal NNReal Topology diff --git a/LeanPool/OSforGFF/General/LaplaceIntegral.lean b/LeanPool/OSforGFF/General/LaplaceIntegral.lean index 79fde696ec..be31f3d62b 100644 --- a/LeanPool/OSforGFF/General/LaplaceIntegral.lean +++ b/LeanPool/OSforGFF/General/LaplaceIntegral.lean @@ -3,14 +3,13 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral -import Mathlib.MeasureTheory.Integral.IntegralEqImproper -import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Analysis.SpecialFunctions.Pow.Continuity -import Mathlib.Analysis.Calculus.Deriv.Inv -import Mathlib.MeasureTheory.Function.Jacobian /-! # Proof of the Laplace Integral Identity (Bessel K_{1/2}) @@ -36,6 +35,8 @@ This is a special case of the modified Bessel function K_{1/2} identity. - Glasser, M.L. "A remarkable property of definite integrals" (1983) -/ +@[expose] public section + open Real Set MeasureTheory Filter Topology open scoped ENNReal NNReal diff --git a/LeanPool/OSforGFF/General/PositiveDefinite.lean b/LeanPool/OSforGFF/General/PositiveDefinite.lean index 3d5a0cab9a..08277d97e4 100644 --- a/LeanPool/OSforGFF/General/PositiveDefinite.lean +++ b/LeanPool/OSforGFF/General/PositiveDefinite.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import Mathlib.Basic.Complex.Basic +public import Mathlib.Basic.Complex.Basic +public import Mathlib.Data.Fintype.Basic +public import Mathlib.Algebra.Module.LinearMap.Defs +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Data.Fintype.Basic -import Mathlib.Algebra.Module.LinearMap.Defs /-! Positive Definite Functions @@ -24,6 +25,8 @@ Key lemmas: - `isPositiveDefinite_precomp_linear`: Composition with linear map preserves PD -/ +@[expose] public section + open Complex open BigOperators diff --git a/LeanPool/OSforGFF/General/QuantitativeDecay.lean b/LeanPool/OSforGFF/General/QuantitativeDecay.lean index a4e9852248..ab1fa59fd0 100644 --- a/LeanPool/OSforGFF/General/QuantitativeDecay.lean +++ b/LeanPool/OSforGFF/General/QuantitativeDecay.lean @@ -3,16 +3,13 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.MeasureTheory.Integral.Bochner.Set -import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Analysis.SpecialFunctions.ExpDeriv +public import LeanPool.OSforGFF.General.SchwartzTranslationDecay import Mathlib.Analysis.SpecialFunctions.JapaneseBracket -import Mathlib.Topology.MetricSpace.Bounded +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.MeasureTheory.Measure.Haar.Unique import Mathlib.Probability.Moments.IntegrableExpMul -import LeanPool.OSforGFF.General.SchwartzTranslationDecay /-! # Quantitative Decay for Schwartz Bilinear Forms @@ -44,6 +41,8 @@ for any α > 0. - Glimm-Jaffe "Quantum Physics" Sec. 6.2 (clustering bounds) -/ +@[expose] public section + open MeasureTheory Complex SchwartzMap Filter Set Function Metric open scoped Real Topology @@ -427,7 +426,8 @@ def convolutionPolynomialDecay (hv_decay : PolynomialDecayBound v N) (hu_int : Integrable u) (hv_int : Integrable v) : PolynomialDecayBound (fun x => ∫ y, u y * v (x - y)) N := - (convolution_polynomial_decay_exists hN_dim hu_decay hv_decay hu_int hv_int).choose + (private_decl% + (convolution_polynomial_decay_exists hN_dim hu_decay hv_decay hu_int hv_int)).choose /-! ## Phase 4: Kernel Decomposition Bounds -/ @@ -600,7 +600,7 @@ def convolutionCompactSupportDecay (f : SchwartzMap E ℂ) (K : E → ℝ) (R₀ (hR₀ : R₀ > 0) (hK_loc : LocallyIntegrable K volume) (N : ℕ) (_hN : N > 0) : PolynomialDecayBound (fun y => ∫ x, f x * (kernelSingular K R₀ (x - y) : ℂ)) (N : ℝ) := - (convolution_compactSupport_decay_exists f K R₀ hR₀ hK_loc N _hN).choose + (private_decl% (convolution_compactSupport_decay_exists f K R₀ hR₀ hK_loc N _hN)).choose /-- The convolution of a Schwartz function with the tail part of the kernel (exponentially decaying) has polynomial decay at any rate. @@ -722,8 +722,8 @@ def convolutionExpDecayPolynomialDecay (f : SchwartzMap E ℂ) (K : E → ℝ) (hK_bdd : ∃ M : ℝ, ∀ z : E, |kernelTail K R₀ z| ≤ M) (N : ℝ) (hN_dim : N > Module.finrank ℝ E) (hN : N > 0) : PolynomialDecayBound (fun y => ∫ x, f x * (kernelTail K R₀ (x - y) : ℂ)) N := - (convolution_expDecay_polynomial_decay_exists f K R₀ m C_K hR₀ hm hC_K hK_loc - hK_decay hK_bdd N hN_dim hN).choose + (private_decl% (convolution_expDecay_polynomial_decay_exists f K R₀ m C_K hR₀ hm hC_K hK_loc + hK_decay hK_bdd N hN_dim hN)).choose /-! ## Phase 5: Main Theorem Assembly -/ diff --git a/LeanPool/OSforGFF/General/SchurProduct.lean b/LeanPool/OSforGFF/General/SchurProduct.lean index 451bd2bbd1..687486c551 100644 --- a/LeanPool/OSforGFF/General/SchurProduct.lean +++ b/LeanPool/OSforGFF/General/SchurProduct.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.LinearAlgebra.Matrix.Hadamard -import Mathlib.LinearAlgebra.Matrix.Kronecker +public import Mathlib.LinearAlgebra.Matrix.PosDef import Mathlib.Analysis.Matrix.Order -import Mathlib.LinearAlgebra.Matrix.PosDef /-! # Schur Product Theorem @@ -20,6 +19,8 @@ the diagonal embedding of `x` into `ι × ι`. Used in the OS3 reflection positi to transfer PSD properties through the matrix exponential via `HadamardExp.lean`. -/ +@[expose] public section + open scoped BigOperators open scoped Kronecker diff --git a/LeanPool/OSforGFF/General/SchwartzTranslationDecay.lean b/LeanPool/OSforGFF/General/SchwartzTranslationDecay.lean index fe22f764dc..8639b8de8b 100644 --- a/LeanPool/OSforGFF/General/SchwartzTranslationDecay.lean +++ b/LeanPool/OSforGFF/General/SchwartzTranslationDecay.lean @@ -3,17 +3,15 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.Analysis.Convolution -import Mathlib.Topology.ContinuousMap.ZeroAtInfty -import Mathlib.Topology.Order.Basic -import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.MeasureTheory.Integral.DominatedConvergence +public import Mathlib.Analysis.Distribution.SchwartzSpace.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import Mathlib.MeasureTheory.Covering.Besicovitch import Mathlib.MeasureTheory.Group.Integral -import Mathlib.Analysis.Normed.Operator.Mul -- For ContinuousLinearMap.mul +import Mathlib.MeasureTheory.Integral.Prod +import Mathlib.MeasureTheory.Integral.DominatedConvergence +import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar /-! # Schwartz Bilinear Translation Decay @@ -45,7 +43,9 @@ Apply this pattern three times: - Reed-Simon Vol. II, Ch. X (decay of correlations) -/ -open MeasureTheory Complex SchwartzMap Filter Convolution Set Function Metric +@[expose] public section + +open MeasureTheory Complex SchwartzMap Filter Set Function Metric open scoped Real Topology Pointwise noncomputable section diff --git a/LeanPool/OSforGFF/KolmogorovExtension4.lean b/LeanPool/OSforGFF/KolmogorovExtension4.lean index 9f8f48d745..8f46809c0e 100644 --- a/LeanPool/OSforGFF/KolmogorovExtension4.lean +++ b/LeanPool/OSforGFF/KolmogorovExtension4.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 Rémy Degenne, Peter Pfaffelhuber. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne, Peter Pfaffelhuber -/ +module -import LeanPool.OSforGFF.KolmogorovExtension4.AuxLemmas -import LeanPool.OSforGFF.KolmogorovExtension4.CompactSystem -import LeanPool.OSforGFF.KolmogorovExtension4.KolmogorovExtension -import LeanPool.OSforGFF.KolmogorovExtension4.RegularContent -import LeanPool.OSforGFF.KolmogorovExtension4.Semiring +public import LeanPool.OSforGFF.KolmogorovExtension4.AuxLemmas +public import LeanPool.OSforGFF.KolmogorovExtension4.CompactSystem +public import LeanPool.OSforGFF.KolmogorovExtension4.KolmogorovExtension +public import LeanPool.OSforGFF.KolmogorovExtension4.RegularContent +public import LeanPool.OSforGFF.KolmogorovExtension4.Semiring /-! # `LeanPool.OSforGFF.KolmogorovExtension4` index Import aggregator for the `KolmogorovExtension4` directory. -/ + +@[expose] public section diff --git a/LeanPool/OSforGFF/KolmogorovExtension4/AuxLemmas.lean b/LeanPool/OSforGFF/KolmogorovExtension4/AuxLemmas.lean index 85faaf1fba..3fa5dd2bd7 100644 --- a/LeanPool/OSforGFF/KolmogorovExtension4/AuxLemmas.lean +++ b/LeanPool/OSforGFF/KolmogorovExtension4/AuxLemmas.lean @@ -3,15 +3,22 @@ Copyright (c) 2026 Rémy Degenne, Peter Pfaffelhuber. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne, Peter Pfaffelhuber -/ +module -import Mathlib.Analysis.SpecificLimits.Basic -import Mathlib.MeasureTheory.MeasurableSpace.Defs +public import Mathlib.MeasureTheory.MeasurableSpace.Defs +public import Mathlib.Order.SetAccumulate +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! THIS FILE IS NOT USED FOR THE MAIN RESULT -/ +@[expose] public section + open Finset Set Filter open scoped ENNReal NNReal Topology diff --git a/LeanPool/OSforGFF/KolmogorovExtension4/CompactSystem.lean b/LeanPool/OSforGFF/KolmogorovExtension4/CompactSystem.lean index df93b765d1..a41fd929d4 100644 --- a/LeanPool/OSforGFF/KolmogorovExtension4/CompactSystem.lean +++ b/LeanPool/OSforGFF/KolmogorovExtension4/CompactSystem.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Rémy Degenne, Peter Pfaffelhuber. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne, Peter Pfaffelhuber -/ +module -import Mathlib.MeasureTheory.Constructions.ClosedCompactCylinders -import Mathlib.Topology.Compactness.CompactSystem +public import Mathlib.MeasureTheory.Constructions.ClosedCompactCylinders +public import Mathlib.Topology.Compactness.CompactSystem import Mathlib.Topology.IsClosedRestrict /-! @@ -14,6 +15,8 @@ import Mathlib.Topology.IsClosedRestrict Auxiliary compact-system lemmas for the Kolmogorov extension construction. -/ +@[expose] public section + open Set MeasureTheory section definition diff --git a/LeanPool/OSforGFF/KolmogorovExtension4/KolmogorovExtension.lean b/LeanPool/OSforGFF/KolmogorovExtension4/KolmogorovExtension.lean index 9827266864..126bf35ff7 100644 --- a/LeanPool/OSforGFF/KolmogorovExtension4/KolmogorovExtension.lean +++ b/LeanPool/OSforGFF/KolmogorovExtension4/KolmogorovExtension.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Rémy Degenne, Peter Pfaffelhuber. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne, Peter Pfaffelhuber -/ +module +public import Mathlib.MeasureTheory.Constructions.ProjectiveFamilyContent +public import Mathlib.MeasureTheory.OuterMeasure.OfAddContent +public import Mathlib.MeasureTheory.Constructions.ClosedCompactCylinders +public import Mathlib.MeasureTheory.Measure.Regular +public import Mathlib.Topology.MetricSpace.Polish import LeanPool.OSforGFF.KolmogorovExtension4.RegularContent -import Mathlib.MeasureTheory.Constructions.ProjectiveFamilyContent -import Mathlib.MeasureTheory.Measure.RegularityCompacts -import Mathlib.MeasureTheory.OuterMeasure.OfAddContent -import Mathlib.Topology.MetricSpace.Polish +public import Mathlib.MeasureTheory.Measure.RegularityCompacts /-! # Kolmogorov Extension @@ -16,6 +19,8 @@ import Mathlib.Topology.MetricSpace.Polish Auxiliary statements for constructing measures from projective finite-dimensional marginals. -/ +@[expose] public section + open Set open scoped ENNReal diff --git a/LeanPool/OSforGFF/KolmogorovExtension4/RegularContent.lean b/LeanPool/OSforGFF/KolmogorovExtension4/RegularContent.lean index a23ff894d3..7724e59617 100644 --- a/LeanPool/OSforGFF/KolmogorovExtension4/RegularContent.lean +++ b/LeanPool/OSforGFF/KolmogorovExtension4/RegularContent.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Rémy Degenne, Peter Pfaffelhuber. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne, Peter Pfaffelhuber -/ +module -import LeanPool.OSforGFF.KolmogorovExtension4.CompactSystem -import Mathlib.MeasureTheory.Measure.AddContent +public import LeanPool.OSforGFF.KolmogorovExtension4.CompactSystem +public import Mathlib.MeasureTheory.Measure.AddContent /-! # Regular Contents @@ -13,6 +14,8 @@ import Mathlib.MeasureTheory.Measure.AddContent Regularity lemmas for additive contents used in the Kolmogorov extension construction. -/ +@[expose] public section + open scoped ENNReal namespace MeasureTheory diff --git a/LeanPool/OSforGFF/KolmogorovExtension4/Semiring.lean b/LeanPool/OSforGFF/KolmogorovExtension4/Semiring.lean index 2176f989a1..cd8cbbc891 100644 --- a/LeanPool/OSforGFF/KolmogorovExtension4/Semiring.lean +++ b/LeanPool/OSforGFF/KolmogorovExtension4/Semiring.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Rémy Degenne, Peter Pfaffelhuber. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne, Peter Pfaffelhuber -/ +module -import Mathlib.MeasureTheory.SetSemiring +public import Mathlib.MeasureTheory.SetSemiring /-! # Semirings of sets @@ -14,6 +15,8 @@ for all `s, t ∈ C`, `t \ s` is equal to a disjoint union of finitely many sets THIS FILE IS NOT USED FOR THE MAIN RESULT -/ +@[expose] public section + variable {α : Type*} {C : Set (Set α)} {s t : Set α} {J : Finset (Set α)} diff --git a/LeanPool/OSforGFF/Measure.lean b/LeanPool/OSforGFF/Measure.lean index 13ce671187..e78d3bea9e 100644 --- a/LeanPool/OSforGFF/Measure.lean +++ b/LeanPool/OSforGFF/Measure.lean @@ -3,16 +3,21 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import LeanPool.OSforGFF.Measure.Construct -import LeanPool.OSforGFF.Measure.GaussianFreeField -import LeanPool.OSforGFF.Measure.IsGaussian -import LeanPool.OSforGFF.Measure.Minlos -import LeanPool.OSforGFF.Measure.MinlosAnalytic -import LeanPool.OSforGFF.Measure.NuclearSpace +public import LeanPool.OSforGFF.Measure.Construct +public import LeanPool.OSforGFF.Measure.GaussianFreeField +public import LeanPool.OSforGFF.Measure.IsGaussian +public import LeanPool.OSforGFF.Measure.Minlos +public import LeanPool.OSforGFF.Measure.MinlosAnalytic +public import LeanPool.OSforGFF.Measure.NuclearSpace +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # `LeanPool.OSforGFF.Measure` index Import aggregator for the `Measure` directory. -/ + +@[expose] public section diff --git a/LeanPool/OSforGFF/Measure/Construct.lean b/LeanPool/OSforGFF/Measure/Construct.lean index cab798c90d..f17cfab0f2 100644 --- a/LeanPool/OSforGFF/Measure/Construct.lean +++ b/LeanPool/OSforGFF/Measure/Construct.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ - - +module + +public import LeanPool.OSforGFF.Schwinger.Defs +public import LeanPool.OSforGFF.Measure.Minlos +public import LeanPool.OSforGFF.Covariance.RealForm +public import LeanPool.OSforGFF.Measure.MinlosAnalytic +public import Mathlib.Probability.Distributions.Gaussian.Real +import LeanPool.OSforGFF.Measure.NuclearSpace +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial import Mathlib.Probability.Distributions.Gaussian.Fernique -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Schwinger.Defs -import LeanPool.OSforGFF.Measure.Minlos -import LeanPool.OSforGFF.Covariance.RealForm -import LeanPool.OSforGFF.Measure.MinlosAnalytic /-! # GFF Measure Construction via Minlos Theorem @@ -34,6 +37,8 @@ then using Mathlib's `memLp_id_gaussianReal`. - `constructGaussianMeasureMinlosFree`: the GFF measure for mass m > 0 -/ +@[expose] public section + open MeasureTheory Complex QFT ProbabilityTheory open TopologicalSpace SchwartzMap @@ -116,7 +121,7 @@ noncomputable def constructGaussianMeasureMinlosFree (m : ℝ) [Fact (0 < m)] : -- Continuity, symmetry, and normalization have h_cont := freeCovarianceFormR_continuous m have h_symm : ∀ f, freeCovarianceFormR m (-f) (-f) = freeCovarianceFormR m f f := - freeCovarianceFormR_neg_neg m + private_decl% (freeCovarianceFormR_neg_neg m) have h_zero : freeCovarianceFormR m (0) (0) = 0 := by simp [freeCovarianceFormR] -- Use Minlos: directly obtain a ProbabilityMeasure with the Gaussian characteristic functional have h_minlos := @@ -156,7 +161,7 @@ theorem gff_real_characteristic (m : ℝ) [Fact (0 < m)] : Classical.choose_spec ex4 have h_cont := freeCovarianceFormR_continuous m have h_symm : ∀ f, freeCovarianceFormR m (-f) (-f) = freeCovarianceFormR m f f := - freeCovarianceFormR_neg_neg m + private_decl% (freeCovarianceFormR_neg_neg m) have h_zero : freeCovarianceFormR m (0) (0) = 0 := by simp [freeCovarianceFormR] have h_minlos := gaussian_measure_characteristic_functional @@ -342,7 +347,7 @@ lemma freeCovarianceFormR_gaussian_cf_pd (m : ℝ) [Fact (0 < m)] : freeCovarianceFormR m f f = ‖T f‖^2 := Classical.choose_spec ex4 have h_symm : ∀ f, freeCovarianceFormR m (-f) (-f) = freeCovarianceFormR m f f := - freeCovarianceFormR_neg_neg m + private_decl% (freeCovarianceFormR_neg_neg m) exact gaussian_positive_definite_bochner T (freeCovarianceFormR m) h_eq h_symm /-- The free covariance form as a MinlosAnalytic.CovarianceForm structure. -/ diff --git a/LeanPool/OSforGFF/Measure/GaussianFreeField.lean b/LeanPool/OSforGFF/Measure/GaussianFreeField.lean index 91c593e0fc..ef34e39fb7 100644 --- a/LeanPool/OSforGFF/Measure/GaussianFreeField.lean +++ b/LeanPool/OSforGFF/Measure/GaussianFreeField.lean @@ -3,24 +3,13 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.Analysis.Analytic.Basic -import Mathlib.Analysis.Analytic.Constructions -import Mathlib.Analysis.SpecialFunctions.Complex.Analytic -import Mathlib.LinearAlgebra.BilinearMap -import Mathlib.Basic.Complex.Basic -import Mathlib.Data.Finset.Basic -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.OS.Axioms -import LeanPool.OSforGFF.Measure.Construct -import LeanPool.OSforGFF.Spacetime.Euclidean -import LeanPool.OSforGFF.Spacetime.DiscreteSymmetry -import LeanPool.OSforGFF.Schwinger.Defs +public import LeanPool.OSforGFF.OS.Axioms +public import LeanPool.OSforGFF.Measure.Construct +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # Gaussian Free Field Assembly @@ -32,6 +21,8 @@ Defines muGFF m as a ProbabilityMeasure and proves two OS axioms for general Gau - OS2 (Euclidean invariance): Z[gf] = Z[f] when covariance is E(4)-invariant -/ +@[expose] public section + open MeasureTheory Complex open TopologicalSpace SchwartzMap diff --git a/LeanPool/OSforGFF/Measure/IsGaussian.lean b/LeanPool/OSforGFF/Measure/IsGaussian.lean index 0c870d5537..2afbd6c6ad 100644 --- a/LeanPool/OSforGFF/Measure/IsGaussian.lean +++ b/LeanPool/OSforGFF/Measure/IsGaussian.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - +public import LeanPool.OSforGFF.Measure.Construct import LeanPool.OSforGFF.OS.OS0Analyticity import LeanPool.OSforGFF.Schwinger.GaussianMoments +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # Gaussianity Verification @@ -27,6 +30,8 @@ interchange, not because of OS0-specific infrastructure. - `isGaussianGJ_gaussianFreeField_free`: the free GFF is Gaussian -/ +@[expose] public section + open MeasureTheory Complex QFT noncomputable section diff --git a/LeanPool/OSforGFF/Measure/Minlos.lean b/LeanPool/OSforGFF/Measure/Minlos.lean index a90e6adac3..957cafdd78 100644 --- a/LeanPool/OSforGFF/Measure/Minlos.lean +++ b/LeanPool/OSforGFF/Measure/Minlos.lean @@ -3,27 +3,20 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import Mathlib.Basic.Complex.Basic -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import LeanPool.OSforGFF.General.PositiveDefinite -import LeanPool.OSforGFF.General.GaussianRBF -import Mathlib.Data.Finset.Basic -import Mathlib.Data.Fintype.Basic -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Analysis.LocallyConvex.Basic -import Mathlib.Topology.Algebra.Module.Spaces.WeakDual -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import LeanPool.OSforGFF.Measure.NuclearSpace -import Mathlib.Data.Matrix.Basic -import Mathlib.LinearAlgebra.Matrix.PosDef -import Mathlib.Analysis.InnerProductSpace.EuclideanDist -import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import LeanPool.OSforGFF.General.PositiveDefinite -- Bochner library imports for proven Minlos theorem +public import LeanPool.OSforGFF.Bochner.PositiveDefinite +public import LeanPool.OSforGFF.Minlos.NuclearSpace +public import Mathlib.Analysis.CStarAlgebra.Classes +import LeanPool.OSforGFF.General.GaussianRBF import LeanPool.OSforGFF.Minlos.Main -import LeanPool.OSforGFF.Bochner.PositiveDefinite +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # Minlos Theorem and Gaussian Measure Construction @@ -44,6 +37,8 @@ the proven Minlos theorem. - `gaussian_measure_symmetry`: covariance-preserving maps induce measure symmetries -/ +@[expose] public section + open Complex MeasureTheory Matrix TopologicalSpace open BigOperators diff --git a/LeanPool/OSforGFF/Measure/MinlosAnalytic.lean b/LeanPool/OSforGFF/Measure/MinlosAnalytic.lean index fffc12a9e8..bea5f3c6b2 100644 --- a/LeanPool/OSforGFF/Measure/MinlosAnalytic.lean +++ b/LeanPool/OSforGFF/Measure/MinlosAnalytic.lean @@ -3,23 +3,17 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.Basic.Complex.Basic -import Mathlib.Analysis.LocallyConvex.Basic -import Mathlib.Topology.Algebra.Module.Spaces.WeakDual -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.Analysis.Calculus.FDeriv.Basic -import Mathlib.Topology.Algebra.Algebra -import Mathlib.Topology.Basic -import Mathlib.Order.Filter.Basic -import Mathlib.Topology.Constructions -import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic - -import LeanPool.OSforGFF.Spacetime.Basic +public import LeanPool.OSforGFF.Spacetime.Basic +public import LeanPool.OSforGFF.Bochner.PositiveDefinite +public import Mathlib.Analysis.CStarAlgebra.Classes import LeanPool.OSforGFF.Measure.Minlos -import Mathlib.MeasureTheory.Measure.Map -import Mathlib.MeasureTheory.Measure.Typeclasses.Probability +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # Minlos Analyticity — Symmetry and Moments for Gaussian Measures @@ -30,6 +24,8 @@ This file provides infrastructure for Gaussian measures constructed via Minlos' - `moment_zero_from_realCF`: Zero mean from characteristic functional symmetry -/ +@[expose] public section + open TopologicalSpace MeasureTheory Complex Filter /-! ## Contents diff --git a/LeanPool/OSforGFF/Measure/NuclearSpace.lean b/LeanPool/OSforGFF/Measure/NuclearSpace.lean index 67e9f2e364..820ef3d6c1 100644 --- a/LeanPool/OSforGFF/Measure/NuclearSpace.lean +++ b/LeanPool/OSforGFF/Measure/NuclearSpace.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback -/ +module -import LeanPool.OSforGFF.Minlos.NuclearSpace -import LeanPool.OSforGFF.Minlos.PietschBridge -import LeanPool.OSforGFF.Minlos.Main +public import LeanPool.OSforGFF.Minlos.PietschBridge +public import LeanPool.OSforGFF.GaussianField.Nuclear.NuclearSpace +public import Mathlib.Analysis.Distribution.SchwartzSpace.Basic import LeanPool.OSforGFF.GaussianField.SchwartzNuclear.HermiteNuclear -import LeanPool.OSforGFF.GaussianField.Nuclear.NuclearSpace +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # Nuclear Space Infrastructure for Schwartz Space @@ -29,6 +33,8 @@ the bochner library (Minlos theorem). - Gel'fand-Vilenkin, "Generalized Functions" Vol. 4, Ch. 3-4 -/ +@[expose] public section + /-! ### WithSeminorms reindexing A general reindexing lemma: if `p` generates the topology and `e` is an equivalence, diff --git a/LeanPool/OSforGFF/Minlos.lean b/LeanPool/OSforGFF/Minlos.lean index b9474139c4..152149897b 100644 --- a/LeanPool/OSforGFF/Minlos.lean +++ b/LeanPool/OSforGFF/Minlos.lean @@ -3,18 +3,24 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.Minlos.FinDimMarginals -import LeanPool.OSforGFF.Minlos.Main -import LeanPool.OSforGFF.Minlos.MeasurableModification -import LeanPool.OSforGFF.Minlos.MinlosConcentration -import LeanPool.OSforGFF.Minlos.NuclearSpace -import LeanPool.OSforGFF.Minlos.PietschBridge -import LeanPool.OSforGFF.Minlos.ProjectiveFamily -import LeanPool.OSforGFF.Minlos.SazonovTightness +public import LeanPool.OSforGFF.Minlos.FinDimMarginals +public import LeanPool.OSforGFF.Minlos.Main +public import LeanPool.OSforGFF.Minlos.MeasurableModification +public import LeanPool.OSforGFF.Minlos.MinlosConcentration +public import LeanPool.OSforGFF.Minlos.NuclearSpace +public import LeanPool.OSforGFF.Minlos.PietschBridge +public import LeanPool.OSforGFF.Minlos.ProjectiveFamily +public import LeanPool.OSforGFF.Minlos.SazonovTightness +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # `LeanPool.OSforGFF.Minlos` index Import aggregator for the `Minlos` directory. -/ + +@[expose] public section diff --git a/LeanPool/OSforGFF/Minlos/FinDimMarginals.lean b/LeanPool/OSforGFF/Minlos/FinDimMarginals.lean index baddd79e6e..e076d29abf 100644 --- a/LeanPool/OSforGFF/Minlos/FinDimMarginals.lean +++ b/LeanPool/OSforGFF/Minlos/FinDimMarginals.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module +public import LeanPool.OSforGFF.Bochner.PositiveDefinite +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.MeasureTheory.Measure.CharacteristicFunction.Basic +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure import LeanPool.OSforGFF.Bochner.Main +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Finite-Dimensional Marginals for Minlos' Theorem @@ -25,6 +32,8 @@ measure μ_F on ℝⁿ. - `marginal_measure_exists` — Bochner gives a probability measure with matching CF -/ +@[expose] public section + open BigOperators MeasureTheory Complex noncomputable section diff --git a/LeanPool/OSforGFF/Minlos/Main.lean b/LeanPool/OSforGFF/Minlos/Main.lean index deafbc6da3..ee3de9111e 100644 --- a/LeanPool/OSforGFF/Minlos/Main.lean +++ b/LeanPool/OSforGFF/Minlos/Main.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module +public import LeanPool.OSforGFF.Bochner.PositiveDefinite +public import LeanPool.OSforGFF.Minlos.NuclearSpace +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure import LeanPool.OSforGFF.Minlos.MeasurableModification +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Minlos' Theorem @@ -34,6 +42,8 @@ probability measure on the topological dual E' = WeakDual ℝ E. - Degenne-Pfaffelhuber, KolmogorovExtension4 (formalized Kolmogorov extension) -/ +@[expose] public section + open BigOperators MeasureTheory Complex TopologicalSpace noncomputable section diff --git a/LeanPool/OSforGFF/Minlos/MeasurableModification.lean b/LeanPool/OSforGFF/Minlos/MeasurableModification.lean index 5cc602c24e..0279028bf6 100644 --- a/LeanPool/OSforGFF/Minlos/MeasurableModification.lean +++ b/LeanPool/OSforGFF/Minlos/MeasurableModification.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.Minlos.ProjectiveFamily +public import LeanPool.OSforGFF.Minlos.ProjectiveFamily +public import LeanPool.OSforGFF.Minlos.NuclearSpace import LeanPool.OSforGFF.Minlos.MinlosConcentration -import Mathlib.Topology.Bases -import Mathlib.Topology.ExtendFrom -import Mathlib.Data.Finsupp.Basic +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp import Mathlib.Data.Finsupp.Encodable +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner /-! # Measurable Modification for Minlos' Theorem @@ -45,6 +49,8 @@ P : (E → ℝ) → WeakDual ℝ E that agrees with the identity on "good paths" - Minlos, "Generalized random processes and their extension to measures" (1959) -/ +@[expose] public section + open BigOperators MeasureTheory Complex TopologicalSpace Finsupp noncomputable section @@ -495,10 +501,10 @@ noncomputable def extensionCLM [SeparableSpace E] [IsHilbertNuclear E] [Nonempty (ω : E → ℝ) (hω : ω ∈ goodPaths d p) : WeakDual ℝ E := ⟨{ toFun := extensionFun d hd p ω hω - map_add' := extensionFun_map_add d hd p hp_top ω hω + map_add' := by exact extensionFun_map_add d hd p hp_top ω hω map_smul' := fun r x => by simp [extensionFun_map_smul d hd p hp_top ω hω r x, smul_eq_mul] }, - extensionFun_continuous d hd p hp_top ω hω⟩ + (by exact extensionFun_continuous d hd p hp_top ω hω)⟩ /-- The extension agrees with ω on the dense sequence. Follows from the BLT construction: Dense.extend agrees with ω on range(d). diff --git a/LeanPool/OSforGFF/Minlos/MinlosConcentration.lean b/LeanPool/OSforGFF/Minlos/MinlosConcentration.lean index 5e164d285e..1d0b7ce193 100644 --- a/LeanPool/OSforGFF/Minlos/MinlosConcentration.lean +++ b/LeanPool/OSforGFF/Minlos/MinlosConcentration.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.Minlos.SazonovTightness -import LeanPool.OSforGFF.Minlos.NuclearSpace +public import LeanPool.OSforGFF.Minlos.NuclearSpace +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.MeasureTheory.Integral.Bochner.Basic import LeanPool.OSforGFF.Minlos.PietschBridge +import LeanPool.OSforGFF.Minlos.SazonovTightness +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp import Mathlib.Data.Finsupp.Encodable +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner /-! # Minlos Concentration Bound @@ -40,6 +47,8 @@ nuclear cylindrical measures. `minlos_concentration` is a convenience wrapper. - Trèves, "Topological Vector Spaces", Ch. 50-51 -/ +@[expose] public section + open BigOperators MeasureTheory Complex TopologicalSpace Finsupp noncomputable section diff --git a/LeanPool/OSforGFF/Minlos/NuclearSpace.lean b/LeanPool/OSforGFF/Minlos/NuclearSpace.lean index f633042b61..be8771d75a 100644 --- a/LeanPool/OSforGFF/Minlos/NuclearSpace.lean +++ b/LeanPool/OSforGFF/Minlos/NuclearSpace.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback -/ +module -import Mathlib.Analysis.LocallyConvex.WithSeminorms -import Mathlib.Topology.Algebra.Module.Spaces.WeakDual -import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv +public import Mathlib.Topology.Algebra.Module.Spaces.WeakDual +public import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.Normed.Operator.Basic +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Nuclear Operators and Nuclear Spaces @@ -22,6 +25,8 @@ via Hilbert-Schmidt embeddings. Adapted from OSforGFF/IsHilbertNuclear.lean. - Reed-Simon, "Methods of Modern Mathematical Physics" Vol. 1, §V.3 -/ +@[expose] public section + open scoped BigOperators noncomputable section diff --git a/LeanPool/OSforGFF/Minlos/PietschBridge.lean b/LeanPool/OSforGFF/Minlos/PietschBridge.lean index ff11067f30..436e5b30fd 100644 --- a/LeanPool/OSforGFF/Minlos/PietschBridge.lean +++ b/LeanPool/OSforGFF/Minlos/PietschBridge.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.Minlos.NuclearSpace -import Mathlib.Topology.Instances.RealVectorSpace +public import LeanPool.OSforGFF.Minlos.NuclearSpace +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Bridge: Pietsch Nuclearity → Bochner IsHilbertNuclear @@ -33,6 +35,8 @@ expansion `p(x) ≤ Σₖ |fₖ(x)| · cₖ` with `|fₖ| ≤ q`), we: - Trèves, "Topological Vector Spaces", Ch. 50-51 -/ +@[expose] public section + open scoped BigOperators noncomputable section diff --git a/LeanPool/OSforGFF/Minlos/ProjectiveFamily.lean b/LeanPool/OSforGFF/Minlos/ProjectiveFamily.lean index ced46eda14..7a31f5868f 100644 --- a/LeanPool/OSforGFF/Minlos/ProjectiveFamily.lean +++ b/LeanPool/OSforGFF/Minlos/ProjectiveFamily.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.Minlos.FinDimMarginals -import LeanPool.OSforGFF.KolmogorovExtension4.KolmogorovExtension +public import LeanPool.OSforGFF.Minlos.FinDimMarginals +public import LeanPool.OSforGFF.KolmogorovExtension4.KolmogorovExtension +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Bridge: Bochner Marginals → Projective Measure Family @@ -20,6 +23,8 @@ by `Finset E`), enabling application of the Kolmogorov extension theorem. - `marginalFamily_isProjective` — the family is projective (consistent under restriction) -/ +@[expose] public section + open BigOperators MeasureTheory Complex noncomputable section diff --git a/LeanPool/OSforGFF/Minlos/SazonovTightness.lean b/LeanPool/OSforGFF/Minlos/SazonovTightness.lean index f4db4ce5e2..3dd40018a3 100644 --- a/LeanPool/OSforGFF/Minlos/SazonovTightness.lean +++ b/LeanPool/OSforGFF/Minlos/SazonovTightness.lean @@ -3,19 +3,15 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.OSforGFF.Bochner.Sazonov -import LeanPool.OSforGFF.Bochner.PositiveDefinite -import Mathlib.MeasureTheory.Measure.CharacteristicFunction.Basic -import Mathlib.MeasureTheory.Measure.Tight -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Analysis.InnerProductSpace.Adjoint -import Mathlib.Analysis.InnerProductSpace.l2Space +public import LeanPool.OSforGFF.Bochner.Sazonov +public import LeanPool.OSforGFF.Bochner.PositiveDefinite +public import Mathlib.MeasureTheory.Measure.CharacteristicFunction.Basic +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure import Mathlib.Analysis.InnerProductSpace.Trace import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp -import Mathlib.Analysis.InnerProductSpace.Positive -import Mathlib.MeasureTheory.Integral.Prod import Mathlib.MeasureTheory.Function.SpecialFunctions.RCLike /-! # Sazonov Tightness @@ -36,6 +32,8 @@ spectral decomposition, and Chebyshev inequalities. - `sazonov_tight_marginals_apply`: Explicit tightness bound via Gaussian averaging -/ +@[expose] public section + open MeasureTheory Complex Filter Topology Set InnerProductSpace Function open scoped Real FourierTransform @@ -807,7 +805,7 @@ lemma scaled_tail_bound /-! ## Restriction of Operators to Marginal Subspaces -/ /-- The embedding t ↦ ∑ tᵢvᵢ from EuclideanSpace to H. -/ -private def embedON {n : ℕ} (v : Fin n → H) : EuclideanSpace ℝ (Fin n) →ₗ[ℝ] H := +def embedON {n : ℕ} (v : Fin n → H) : EuclideanSpace ℝ (Fin n) →ₗ[ℝ] H := { toFun := fun t => ∑ i, t i • v i map_add' := fun x y => by simp [add_smul, Finset.sum_add_distrib] map_smul' := fun r x => by @@ -815,7 +813,7 @@ private def embedON {n : ℕ} (v : Fin n → H) : EuclideanSpace ℝ (Fin n) → congr 1; ext i; simp [smul_smul, mul_comm r] } /-- The projection x ↦ (⟪vᵢ, x⟫)ᵢ from H to EuclideanSpace. -/ -private def projON {n : ℕ} (v : Fin n → H) : H →ₗ[ℝ] EuclideanSpace ℝ (Fin n) := +def projON {n : ℕ} (v : Fin n → H) : H →ₗ[ℝ] EuclideanSpace ℝ (Fin n) := { toFun := fun x => EuclideanSpace.equiv (Fin n) ℝ |>.symm (fun i => @inner ℝ H _ (v i) x) map_add' := fun x y => by ext i; simp [inner_add_right] map_smul' := fun r x => by ext i; simp [inner_smul_right] } diff --git a/LeanPool/OSforGFF/OS.lean b/LeanPool/OSforGFF/OS.lean index b996394a23..3e7b5883d0 100644 --- a/LeanPool/OSforGFF/OS.lean +++ b/LeanPool/OSforGFF/OS.lean @@ -3,23 +3,28 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import LeanPool.OSforGFF.OS.Axioms -import LeanPool.OSforGFF.OS.Master -import LeanPool.OSforGFF.OS.NonTrivial -import LeanPool.OSforGFF.OS.OS0Analyticity -import LeanPool.OSforGFF.OS.OS1Regularity -import LeanPool.OSforGFF.OS.OS2Invariance -import LeanPool.OSforGFF.OS.OS3CovarianceRP -import LeanPool.OSforGFF.OS.OS3MixedRep -import LeanPool.OSforGFF.OS.OS3MixedRepInfra -import LeanPool.OSforGFF.OS.OS3ReflectionPositivity -import LeanPool.OSforGFF.OS.OS4Clustering -import LeanPool.OSforGFF.OS.OS4Ergodicity -import LeanPool.OSforGFF.OS.OS4MGF +public import LeanPool.OSforGFF.OS.Axioms +public import LeanPool.OSforGFF.OS.Master +public import LeanPool.OSforGFF.OS.NonTrivial +public import LeanPool.OSforGFF.OS.OS0Analyticity +public import LeanPool.OSforGFF.OS.OS1Regularity +public import LeanPool.OSforGFF.OS.OS2Invariance +public import LeanPool.OSforGFF.OS.OS3CovarianceRP +public import LeanPool.OSforGFF.OS.OS3MixedRep +public import LeanPool.OSforGFF.OS.OS3MixedRepInfra +public import LeanPool.OSforGFF.OS.OS3ReflectionPositivity +public import LeanPool.OSforGFF.OS.OS4Clustering +public import LeanPool.OSforGFF.OS.OS4Ergodicity +public import LeanPool.OSforGFF.OS.OS4MGF +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # `LeanPool.OSforGFF.OS` index Import aggregator for the `OS` directory. -/ + +@[expose] public section diff --git a/LeanPool/OSforGFF/OS/Axioms.lean b/LeanPool/OSforGFF/OS/Axioms.lean index f2ccf0ea5f..21d6d91bcb 100644 --- a/LeanPool/OSforGFF/OS/Axioms.lean +++ b/LeanPool/OSforGFF/OS/Axioms.lean @@ -3,69 +3,21 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Abel -import Mathlib.Tactic.FunProp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Push -import Mathlib.Tactic.Tauto -import Mathlib.Tactic.ApplyFun -import Mathlib.Tactic.Convert -import Mathlib.Tactic.Common -import Mathlib.Tactic.Cases -import Mathlib.Tactic.Choose -import Mathlib.Tactic.SimpRw -import Mathlib.Tactic.SuppressCompilation -import Mathlib.Tactic.Use -import Mathlib.Tactic.Set -import Mathlib.Tactic.Polyrith -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Generalize -import Mathlib.Basic.Complex.Basic -import Mathlib.Analysis.Complex.Exponential -import Mathlib.Algebra.Group.Support -import Mathlib.Analysis.InnerProductSpace.LinearMap -import Mathlib.Analysis.Complex.Basic -import Mathlib.Analysis.Analytic.Basic -import Mathlib.Analysis.Analytic.Constructions -import Mathlib.Analysis.SpecialFunctions.Complex.Analytic -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.Analysis.Calculus.BumpFunction.Convolution - -import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.PiProd - -import Mathlib.MeasureTheory.Measure.Decomposition.RadonNikodym -import Mathlib.MeasureTheory.Measure.Haar.OfBasis -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.MeasureTheory.Function.LpSpace.Basic -import Mathlib.MeasureTheory.Function.L2Space -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.MeasureTheory.Measure.FiniteMeasureExt - -import Mathlib.Probability.Independence.Basic -import Mathlib.Probability.Density - -import Mathlib.Analysis.RCLike.Basic -import Mathlib.Analysis.Normed.Module.RCLike.Basic -import Mathlib.Analysis.Normed.Module.RCLike.Real - -import Mathlib.Topology.Basic -import Mathlib.Order.Filter.Basic - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.General.FunctionalAnalysis -import LeanPool.OSforGFF.Spacetime.Euclidean -import LeanPool.OSforGFF.Spacetime.DiscreteSymmetry -import LeanPool.OSforGFF.Spacetime.PositiveTimeTestFunction -import LeanPool.OSforGFF.Spacetime.ComplexTestFunction -import LeanPool.OSforGFF.Spacetime.TimeTranslation -import LeanPool.OSforGFF.Schwinger.TwoPoint + + + + + +public import LeanPool.OSforGFF.Spacetime.Euclidean +public import LeanPool.OSforGFF.Spacetime.PositiveTimeTestFunction +public import LeanPool.OSforGFF.Spacetime.TimeTranslation +public import LeanPool.OSforGFF.Schwinger.TwoPoint +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! ## Osterwalder-Schrader Axioms @@ -83,6 +35,8 @@ Following Glimm-Jaffe formulation using probability measures on field configurat Glimm and Jaffe, Quantum Physics, pp. 89-90 -/ +@[expose] public section + open MeasureTheory NNReal ENNReal open TopologicalSpace Measure QFT open DFunLike (coe) diff --git a/LeanPool/OSforGFF/OS/Master.lean b/LeanPool/OSforGFF/OS/Master.lean index a3b67cf3a6..1fa854da08 100644 --- a/LeanPool/OSforGFF/OS/Master.lean +++ b/LeanPool/OSforGFF/OS/Master.lean @@ -3,14 +3,19 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import LeanPool.OSforGFF.Measure.GaussianFreeField -import LeanPool.OSforGFF.OS.OS3ReflectionPositivity +public import LeanPool.OSforGFF.Measure.Construct +public import LeanPool.OSforGFF.OS.Axioms +import LeanPool.OSforGFF.Measure.IsGaussian import LeanPool.OSforGFF.OS.OS0Analyticity import LeanPool.OSforGFF.OS.OS1Regularity import LeanPool.OSforGFF.OS.OS2Invariance +import LeanPool.OSforGFF.OS.OS3ReflectionPositivity import LeanPool.OSforGFF.OS.OS4Clustering import LeanPool.OSforGFF.OS.OS4Ergodicity +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # Master Theorem @@ -28,6 +33,8 @@ Assembles OS0–OS4 into `gaussianFreeField_satisfies_all_OS_axioms`: Unconditional theorem: only requires m > 0. -/ +@[expose] public section + open scoped BigOperators namespace OSforGFF diff --git a/LeanPool/OSforGFF/OS/NonTrivial.lean b/LeanPool/OSforGFF/OS/NonTrivial.lean index 4cc8b1e440..dad18323b4 100644 --- a/LeanPool/OSforGFF/OS/NonTrivial.lean +++ b/LeanPool/OSforGFF/OS/NonTrivial.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import LeanPool.OSforGFF.Measure.Construct -import LeanPool.OSforGFF.Covariance.RealForm -import LeanPool.OSforGFF.Spacetime.ComplexTestFunction -import Mathlib.Analysis.Distribution.SchwartzSpace.Fourier +public import LeanPool.OSforGFF.Measure.Construct +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # Nontriviality of the Gaussian Free Field @@ -48,6 +50,8 @@ Injectivity of T follows from: - Reed–Simon, *Methods of Modern Mathematical Physics* II, §IX.8 -/ +@[expose] public section + open MeasureTheory Complex QFT open scoped Real BigOperators SchwartzMap diff --git a/LeanPool/OSforGFF/OS/OS0Analyticity.lean b/LeanPool/OSforGFF/OS/OS0Analyticity.lean index 54f39fc14a..3fc6a5c8b8 100644 --- a/LeanPool/OSforGFF/OS/OS0Analyticity.lean +++ b/LeanPool/OSforGFF/OS/OS0Analyticity.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.OS.Axioms -import LeanPool.OSforGFF.Measure.Construct -import LeanPool.OSforGFF.Spacetime.ComplexTestFunction +public import LeanPool.OSforGFF.OS.Axioms +public import LeanPool.OSforGFF.Measure.Construct +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # OS0 — Analyticity of the Generating Functional @@ -43,6 +44,8 @@ L(t) = Z[f_re + t·f_im] and R(t) = exp(-½ Q(t)), show L = R on ℝ (from - `gaussianFreeField_satisfies_OS0` -/ +@[expose] public section + noncomputable section open MeasureTheory Complex BigOperators SchwartzMap diff --git a/LeanPool/OSforGFF/OS/OS1Regularity.lean b/LeanPool/OSforGFF/OS/OS1Regularity.lean index 1ac4c4efd0..0c792a7319 100644 --- a/LeanPool/OSforGFF/OS/OS1Regularity.lean +++ b/LeanPool/OSforGFF/OS/OS1Regularity.lean @@ -3,15 +3,14 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.OS.Axioms -import LeanPool.OSforGFF.Covariance.Position -import LeanPool.OSforGFF.Covariance.Momentum -import LeanPool.OSforGFF.Covariance.RealForm -import LeanPool.OSforGFF.Measure.Construct +public import LeanPool.OSforGFF.OS.Axioms +public import LeanPool.OSforGFF.Measure.Construct import LeanPool.OSforGFF.Measure.IsGaussian +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # OS1 — Regularity (Exponential Bounds) @@ -33,6 +32,8 @@ the Bessel K₁ asymptotics: (m/4π²|x|)K₁(m|x|) is locally integrable in 4D. - `gaussianFreeField_satisfies_OS1_revised` -/ +@[expose] public section + open MeasureTheory Complex BigOperators SchwartzMap Real QFT open scoped MeasureTheory ENNReal diff --git a/LeanPool/OSforGFF/OS/OS2Invariance.lean b/LeanPool/OSforGFF/OS/OS2Invariance.lean index 8be6cbafe1..39bc5a10d2 100644 --- a/LeanPool/OSforGFF/OS/OS2Invariance.lean +++ b/LeanPool/OSforGFF/OS/OS2Invariance.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - +public import LeanPool.OSforGFF.Measure.GaussianFreeField import LeanPool.OSforGFF.Measure.IsGaussian -import LeanPool.OSforGFF.Covariance.Position -import LeanPool.OSforGFF.Spacetime.Euclidean -import LeanPool.OSforGFF.Measure.GaussianFreeField +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # OS2 — Euclidean Invariance @@ -26,6 +26,8 @@ Hence S(Ef) = ∫∫ f*(x) C(x,y) f(y) dx dy = S(f). - `CovarianceEuclideanInvariantℂ_μ_GFF` -/ +@[expose] public section + open MeasureTheory Complex Real Filter open scoped Real BigOperators diff --git a/LeanPool/OSforGFF/OS/OS3CovarianceRP.lean b/LeanPool/OSforGFF/OS/OS3CovarianceRP.lean index 84a9c40051..1ec138f711 100644 --- a/LeanPool/OSforGFF/OS/OS3CovarianceRP.lean +++ b/LeanPool/OSforGFF/OS/OS3CovarianceRP.lean @@ -3,16 +3,14 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Spacetime.PositiveTimeTestFunction -import LeanPool.OSforGFF.Covariance.Momentum -import LeanPool.OSforGFF.OS.OS3MixedRep -import LeanPool.OSforGFF.OS.OS3MixedRepInfra -import LeanPool.OSforGFF.Covariance.Parseval +public import LeanPool.OSforGFF.Spacetime.PositiveTimeTestFunction +public import LeanPool.OSforGFF.Covariance.Parseval +public import LeanPool.OSforGFF.Spacetime.ComplexTestFunction import LeanPool.OSforGFF.Covariance.Position -import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap +import LeanPool.OSforGFF.OS.OS3MixedRep +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp /-! # OS3 — Covariance Reflection Positivity @@ -32,6 +30,8 @@ perfect square ∫ (1/ω)|F_ω(kbar)|² dkbar with F_ω(kbar) = ∫ ftilde(t,kba - `freeCovariance_reflection_positive_real`: real-valued version -/ +@[expose] public section + namespace QFT open MeasureTheory Complex Real Filter diff --git a/LeanPool/OSforGFF/OS/OS3MixedRep.lean b/LeanPool/OSforGFF/OS/OS3MixedRep.lean index af6f9de1d2..630dd6948b 100644 --- a/LeanPool/OSforGFF/OS/OS3MixedRep.lean +++ b/LeanPool/OSforGFF/OS/OS3MixedRep.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import LeanPool.OSforGFF.OS.OS3MixedRepInfra +public import LeanPool.OSforGFF.OS.OS3MixedRepInfra +import LeanPool.OSforGFF.General.FourierTransforms +import LeanPool.OSforGFF.General.LaplaceIntegral +import LeanPool.OSforGFF.Spacetime.Decomposition +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp /-! # OS3 — Mixed Representation via Schwinger Parametrization @@ -42,6 +48,8 @@ The mixed representation exhibits: - Haag, "Local Quantum Physics" (1996), §V.3 -/ +@[expose] public section + open MeasureTheory Complex Real Filter QFT LaplaceIntegral open TopologicalSpace open scoped Real InnerProductSpace BigOperators diff --git a/LeanPool/OSforGFF/OS/OS3MixedRepInfra.lean b/LeanPool/OSforGFF/OS/OS3MixedRepInfra.lean index 40ebd768c1..b809718f43 100644 --- a/LeanPool/OSforGFF/OS/OS3MixedRepInfra.lean +++ b/LeanPool/OSforGFF/OS/OS3MixedRepInfra.lean @@ -3,24 +3,18 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import Mathlib.MeasureTheory.Integral.Gamma -import Mathlib.Analysis.SpecialFunctions.Gamma.Beta -import Mathlib.Analysis.Real.Pi.Bounds -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Spacetime.Euclidean -import LeanPool.OSforGFF.Spacetime.DiscreteSymmetry -import LeanPool.OSforGFF.Schwinger.Defs -import LeanPool.OSforGFF.General.FunctionalAnalysis -import LeanPool.OSforGFF.Covariance.Momentum -import LeanPool.OSforGFF.Covariance.Position -import LeanPool.OSforGFF.General.FourierTransforms -import LeanPool.OSforGFF.OS.Axioms -import LeanPool.OSforGFF.Spacetime.ProdIntegrable -import LeanPool.OSforGFF.Spacetime.Decomposition +public import LeanPool.OSforGFF.Spacetime.DiscreteSymmetry +public import LeanPool.OSforGFF.Covariance.Momentum import LeanPool.OSforGFF.Spacetime.Tonelli -import LeanPool.OSforGFF.General.LaplaceIntegral +import Mathlib.Analysis.Real.Pi.Bounds +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.BohrMollerup +import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.MeasureTheory.Function.SpecialFunctions.Inner +import Mathlib.MeasureTheory.Integral.Gamma /-! # OS3 Infrastructure — Schwinger Parametrization and Fubini Theorems @@ -41,6 +35,8 @@ bounds use |f(x)||f(y)| ≤ C · x₀y₀ / (1+|xbar|²)^N(1+|ybar|²)^N for pos test functions, combined with Gaussian moment formulas for the time integrals. -/ +@[expose] public section + open MeasureTheory Complex Real Filter QFT open TopologicalSpace open scoped Real InnerProductSpace BigOperators diff --git a/LeanPool/OSforGFF/OS/OS3ReflectionPositivity.lean b/LeanPool/OSforGFF/OS/OS3ReflectionPositivity.lean index 4515614033..8207fa11ae 100644 --- a/LeanPool/OSforGFF/OS/OS3ReflectionPositivity.lean +++ b/LeanPool/OSforGFF/OS/OS3ReflectionPositivity.lean @@ -3,17 +3,17 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Spacetime.PositiveTimeTestFunction -import LeanPool.OSforGFF.Spacetime.DiscreteSymmetry -import LeanPool.OSforGFF.OS.Axioms -import LeanPool.OSforGFF.Measure.Construct +public import LeanPool.OSforGFF.OS.Axioms +public import LeanPool.OSforGFF.Measure.Construct import LeanPool.OSforGFF.General.HadamardExp -import LeanPool.OSforGFF.Covariance.RealForm -import LeanPool.OSforGFF.OS.OS3CovarianceRP import LeanPool.OSforGFF.Measure.IsGaussian +import LeanPool.OSforGFF.OS.OS3CovarianceRP +import Mathlib.Analysis.Matrix.Order +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.LinearAlgebra.Complex.FiniteDimensional /-! # OS3 — Reflection Positivity for the GFF @@ -43,6 +43,8 @@ exponential PSD theorem. - `gaussianFreeField_OS3`: `os3ReflectionPositivity (muGFF m)` (complex) -/ +@[expose] public section + open MeasureTheory Complex Matrix open scoped Real InnerProductSpace BigOperators diff --git a/LeanPool/OSforGFF/OS/OS4Clustering.lean b/LeanPool/OSforGFF/OS/OS4Clustering.lean index 9f4329a806..a3019aaa65 100644 --- a/LeanPool/OSforGFF/OS/OS4Clustering.lean +++ b/LeanPool/OSforGFF/OS/OS4Clustering.lean @@ -3,23 +3,18 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Schwinger.Defs -import LeanPool.OSforGFF.Measure.Construct -import LeanPool.OSforGFF.Measure.IsGaussian -import LeanPool.OSforGFF.Measure.GaussianFreeField -- For gaussian_satisfies_OS2 -import LeanPool.OSforGFF.OS.OS2Invariance -- For CovarianceEuclideanInvariantℂ_μ_GFF -import LeanPool.OSforGFF.Covariance.Position -- For freeCovarianceℂ_bilinear_symm -import LeanPool.OSforGFF.Covariance.Momentum -import LeanPool.OSforGFF.OS.Axioms -import LeanPool.OSforGFF.General.FunctionalAnalysis -import LeanPool.OSforGFF.Spacetime.ComplexTestFunction -import LeanPool.OSforGFF.General.QuantitativeDecay +public import LeanPool.OSforGFF.Measure.Construct +public import LeanPool.OSforGFF.OS.Axioms -- For schwartz_bilinear_translation_decay_polynomial_proof -import LeanPool.OSforGFF.Spacetime.TimeTranslation -- For time translation on distributions -import LeanPool.OSforGFF.OS.OS4MGF -- For shared OS4 infrastructure (no sorries) +import LeanPool.OSforGFF.General.QuantitativeDecay +import LeanPool.OSforGFF.Measure.IsGaussian +import LeanPool.OSforGFF.OS.OS2Invariance +import LeanPool.OSforGFF.OS.OS4MGF +import LeanPool.OSforGFF.Schwinger.GaussianMoments +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # OS4 — Polynomial Clustering @@ -42,6 +37,8 @@ The proof follows Steps 1–6 of §4.4.5: - `gaussianFreeField_satisfies_OS4` -/ +@[expose] public section + open MeasureTheory Complex open scoped Real BigOperators SchwartzMap diff --git a/LeanPool/OSforGFF/OS/OS4Ergodicity.lean b/LeanPool/OSforGFF/OS/OS4Ergodicity.lean index f0f143e886..13a98be08a 100644 --- a/LeanPool/OSforGFF/OS/OS4Ergodicity.lean +++ b/LeanPool/OSforGFF/OS/OS4Ergodicity.lean @@ -3,56 +3,19 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.Analysis.Distribution.TemperateGrowth -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.MeasureTheory.Integral.MeanInequalities -import Mathlib.Topology.Algebra.Module.Spaces.WeakDual -import Mathlib.Analysis.SpecialFunctions.ExpDeriv -import Mathlib.Analysis.Calculus.ContDiff.Basic -import Mathlib.Topology.Algebra.InfiniteSum.NatInt -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Abel -import Mathlib.Tactic.FunProp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Push -import Mathlib.Tactic.Tauto -import Mathlib.Tactic.ApplyFun -import Mathlib.Tactic.Convert -import Mathlib.Tactic.Common -import Mathlib.Tactic.Cases -import Mathlib.Tactic.Choose -import Mathlib.Tactic.SimpRw -import Mathlib.Tactic.SuppressCompilation -import Mathlib.Tactic.Use -import Mathlib.Tactic.Set -import Mathlib.Tactic.Polyrith -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Generalize - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Schwinger.Defs -import LeanPool.OSforGFF.Measure.Construct -import LeanPool.OSforGFF.Measure.IsGaussian -import LeanPool.OSforGFF.OS.OS0Analyticity -import LeanPool.OSforGFF.Spacetime.ComplexTestFunction -import LeanPool.OSforGFF.Spacetime.TimeTranslation -import LeanPool.OSforGFF.Covariance.Momentum -import LeanPool.OSforGFF.OS.Axioms +public import LeanPool.OSforGFF.Measure.Construct +public import LeanPool.OSforGFF.OS.Axioms import LeanPool.OSforGFF.General.L2TimeIntegral import LeanPool.OSforGFF.General.SchwartzTranslationDecay +import LeanPool.OSforGFF.Measure.IsGaussian +import LeanPool.OSforGFF.OS.OS0Analyticity import LeanPool.OSforGFF.OS.OS4MGF -import Mathlib.Analysis.Complex.Basic -import Mathlib.Algebra.Order.Chebyshev -import Mathlib.MeasureTheory.Group.Measure +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # OS4 — Ergodicity from Polynomial Clustering @@ -73,6 +36,8 @@ Uses α = 6 from the spatial dimension d = 3 (mass gap). - `OS4_PolynomialClustering_implies_OS4_Ergodicity` -/ +@[expose] public section + open MeasureTheory Real open TopologicalSpace open scoped BigOperators diff --git a/LeanPool/OSforGFF/OS/OS4MGF.lean b/LeanPool/OSforGFF/OS/OS4MGF.lean index 69522264ea..f8eea75959 100644 --- a/LeanPool/OSforGFF/OS/OS4MGF.lean +++ b/LeanPool/OSforGFF/OS/OS4MGF.lean @@ -3,51 +3,15 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.Analysis.Distribution.TemperateGrowth -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.MeasureTheory.Integral.MeanInequalities -import Mathlib.Topology.Algebra.Module.Spaces.WeakDual -import Mathlib.Analysis.SpecialFunctions.ExpDeriv -import Mathlib.Analysis.Calculus.ContDiff.Basic -import Mathlib.Topology.Algebra.InfiniteSum.NatInt -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Abel -import Mathlib.Tactic.FunProp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Push -import Mathlib.Tactic.Tauto -import Mathlib.Tactic.ApplyFun -import Mathlib.Tactic.Convert -import Mathlib.Tactic.Common -import Mathlib.Tactic.Cases -import Mathlib.Tactic.Choose -import Mathlib.Tactic.SimpRw -import Mathlib.Tactic.SuppressCompilation -import Mathlib.Tactic.Use -import Mathlib.Tactic.Set -import Mathlib.Tactic.Polyrith -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Generalize -import Mathlib.Analysis.Complex.Basic -import Mathlib.Algebra.Order.Chebyshev - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Schwinger.Defs -import LeanPool.OSforGFF.Measure.Construct +public import LeanPool.OSforGFF.Measure.Construct +public import LeanPool.OSforGFF.Spacetime.TimeTranslation import LeanPool.OSforGFF.Measure.IsGaussian import LeanPool.OSforGFF.OS.OS2Invariance -import LeanPool.OSforGFF.Spacetime.ComplexTestFunction -import LeanPool.OSforGFF.Spacetime.TimeTranslation -import LeanPool.OSforGFF.OS.Axioms +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # OS4 — Shared Infrastructure @@ -60,6 +24,8 @@ Shared lemmas for os4Clustering and OS4Ergodicity: - Exponential bound: |e^z − 1| ≤ |z| · e^{|z|} -/ +@[expose] public section + open MeasureTheory Real open TopologicalSpace open scoped BigOperators diff --git a/LeanPool/OSforGFF/Schwinger.lean b/LeanPool/OSforGFF/Schwinger.lean index c2f073af92..0a2ad4a2d3 100644 --- a/LeanPool/OSforGFF/Schwinger.lean +++ b/LeanPool/OSforGFF/Schwinger.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import LeanPool.OSforGFF.Schwinger.Defs -import LeanPool.OSforGFF.Schwinger.GaussianMoments -import LeanPool.OSforGFF.Schwinger.TwoPoint +public import LeanPool.OSforGFF.Schwinger.Defs +public import LeanPool.OSforGFF.Schwinger.GaussianMoments +public import LeanPool.OSforGFF.Schwinger.TwoPoint +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! # `LeanPool.OSforGFF.Schwinger` index Import aggregator for the `Schwinger` directory. -/ + +@[expose] public section diff --git a/LeanPool/OSforGFF/Schwinger/Defs.lean b/LeanPool/OSforGFF/Schwinger/Defs.lean index 7033455554..421c1be2af 100644 --- a/LeanPool/OSforGFF/Schwinger/Defs.lean +++ b/LeanPool/OSforGFF/Schwinger/Defs.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import LeanPool.OSforGFF.Spacetime.Basic +public import LeanPool.OSforGFF.Spacetime.Basic import LeanPool.OSforGFF.Spacetime.ComplexTestFunction +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Generating Functional and Schwinger Functions @@ -18,6 +20,8 @@ For centered Gaussian measures: Z[J] = exp(−½⟨J,CJ⟩) and all Sₙ are determined by Wick's theorem from the two-point function S₂ = C. -/ +@[expose] public section + open MeasureTheory Complex open TopologicalSpace diff --git a/LeanPool/OSforGFF/Schwinger/GaussianMoments.lean b/LeanPool/OSforGFF/Schwinger/GaussianMoments.lean index cdc5845e01..50f76df927 100644 --- a/LeanPool/OSforGFF/Schwinger/GaussianMoments.lean +++ b/LeanPool/OSforGFF/Schwinger/GaussianMoments.lean @@ -3,19 +3,12 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.MeasureTheory.Integral.IntegrableOn -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.Data.Matrix.Basic -import Mathlib.Data.Finset.Basic -import Mathlib.Basic.ENNReal.Holder -import Mathlib.MeasureTheory.Function.LpSeminorm.CompareExp - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Schwinger.Defs -import LeanPool.OSforGFF.Measure.Construct +public import LeanPool.OSforGFF.Measure.Construct +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Data.Nat.Choose.Multinomial /-! ## Gaussian Moments and n-Point Integrability @@ -39,6 +32,8 @@ This generalizes `gaussian_pairing_product_integrable_free_core` to arbitrary n, providing a unified foundation for all Schwinger function computations. -/ +@[expose] public section + open MeasureTheory Complex Finset open TopologicalSpace SchwartzMap diff --git a/LeanPool/OSforGFF/Schwinger/TwoPoint.lean b/LeanPool/OSforGFF/Schwinger/TwoPoint.lean index 50da412e0b..ed17d074ae 100644 --- a/LeanPool/OSforGFF/Schwinger/TwoPoint.lean +++ b/LeanPool/OSforGFF/Schwinger/TwoPoint.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Schwinger.Defs +public import LeanPool.OSforGFF.Schwinger.Defs +public import LeanPool.OSforGFF.General.FunctionalAnalysis +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! ## Schwinger Two-Point Function @@ -21,6 +23,8 @@ For mollifiers φ_ε (smooth, nonnegative, integral 1, support shrinking to 0): For the GFF with covariance kernel C, this equals C(x) by `double_mollifier_convergence`. -/ +@[expose] public section + open MeasureTheory open scoped MeasureTheory diff --git a/LeanPool/OSforGFF/Spacetime.lean b/LeanPool/OSforGFF/Spacetime.lean index 49b3a6a50a..cd1040e1f1 100644 --- a/LeanPool/OSforGFF/Spacetime.lean +++ b/LeanPool/OSforGFF/Spacetime.lean @@ -3,19 +3,25 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Spacetime.ComplexTestFunction -import LeanPool.OSforGFF.Spacetime.Decomposition -import LeanPool.OSforGFF.Spacetime.DiscreteSymmetry -import LeanPool.OSforGFF.Spacetime.Euclidean -import LeanPool.OSforGFF.Spacetime.PositiveTimeTestFunction -import LeanPool.OSforGFF.Spacetime.ProdIntegrable -import LeanPool.OSforGFF.Spacetime.TimeTranslation -import LeanPool.OSforGFF.Spacetime.Tonelli +public import LeanPool.OSforGFF.Spacetime.Basic +public import LeanPool.OSforGFF.Spacetime.ComplexTestFunction +public import LeanPool.OSforGFF.Spacetime.Decomposition +public import LeanPool.OSforGFF.Spacetime.DiscreteSymmetry +public import LeanPool.OSforGFF.Spacetime.Euclidean +public import LeanPool.OSforGFF.Spacetime.PositiveTimeTestFunction +public import LeanPool.OSforGFF.Spacetime.ProdIntegrable +public import LeanPool.OSforGFF.Spacetime.TimeTranslation +public import LeanPool.OSforGFF.Spacetime.Tonelli +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # `LeanPool.OSforGFF.Spacetime` index Import aggregator for the `Spacetime` directory. -/ + +@[expose] public section diff --git a/LeanPool/OSforGFF/Spacetime/Basic.lean b/LeanPool/OSforGFF/Spacetime/Basic.lean index d13f0e0232..85caa076d1 100644 --- a/LeanPool/OSforGFF/Spacetime/Basic.lean +++ b/LeanPool/OSforGFF/Spacetime/Basic.lean @@ -6,9 +6,17 @@ Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -- Import our functional analysis utilities -import LeanPool.OSforGFF.General.FunctionalAnalysis +module + -- Bochner library provides the cylinder σ-algebra MeasurableSpace instance on WeakDual -import LeanPool.OSforGFF.Minlos.NuclearSpace +public import LeanPool.OSforGFF.Minlos.NuclearSpace +public import Mathlib.Analysis.Distribution.SchwartzSpace.Basic +public import Mathlib.Analysis.Normed.Lp.MeasurableSpace +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import LeanPool.OSforGFF.General.FunctionalAnalysis +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Basic Definitions @@ -22,6 +30,8 @@ Core type definitions for the formalization: - `GJGeneratingFunctional` = Z[J] = ∫ exp(i⟨ω, J⟩) dμ(ω) -/ +@[expose] public section + /-- Spacetime dimension. Currently set to 4 (Euclidean ℝ⁴). Changing this value requires corresponding changes throughout the project; see `docs/dimension_dependence.md` for a detailed inventory. diff --git a/LeanPool/OSforGFF/Spacetime/ComplexTestFunction.lean b/LeanPool/OSforGFF/Spacetime/ComplexTestFunction.lean index b575420b19..ddeb059701 100644 --- a/LeanPool/OSforGFF/Spacetime/ComplexTestFunction.lean +++ b/LeanPool/OSforGFF/Spacetime/ComplexTestFunction.lean @@ -3,14 +3,13 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.Basic.Complex.Basic -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.Topology.Algebra.Module.Multilinear.Basic +public import LeanPool.OSforGFF.Spacetime.Basic import Mathlib.Analysis.Complex.OperatorNorm - -import LeanPool.OSforGFF.Spacetime.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! ## Complex Test Function Linearity @@ -36,6 +35,8 @@ These results are essential for proving bilinearity of Schwinger functions and other quantum field theory constructions. -/ +@[expose] public section + open Complex MeasureTheory /-! ## Main definitions @@ -86,11 +87,7 @@ lemma ω_re_decompose_linear -- Evaluate pointwise scalar multiplication and addition simp only [add_apply, smul_apply, smul_eq_mul, reCLM_apply, add_re, mul_re, imCLM_apply] - -- Switch CLMs to the scalar functions and finish with the algebraic identity - change Complex.re (t * f x + s * g x) - = t.re * Complex.re (f x) - t.im * Complex.im (f x) - + s.re * Complex.re (g x) - s.im * Complex.im (g x) - simpa using re_of_complex_combination t s (f x) (g x) + ring -- Apply ω (a real-linear functional) to both sides simp_all @@ -119,11 +116,7 @@ lemma ω_im_decompose_linear -- Evaluate pointwise scalar multiplication and addition simp only [add_apply, smul_apply, smul_eq_mul, imCLM_apply, add_im, mul_im, reCLM_apply] - -- Switch CLMs to scalar functions and finish with the algebraic identity - change Complex.im (t * f x + s * g x) - = t.re * Complex.im (f x) + t.im * Complex.re (f x) - + s.re * Complex.im (g x) + s.im * Complex.re (g x) - simpa using im_of_complex_combination t s (f x) (g x) + ring -- Apply ω (a real-linear functional) to both sides simp_all diff --git a/LeanPool/OSforGFF/Spacetime/Decomposition.lean b/LeanPool/OSforGFF/Spacetime/Decomposition.lean index 28b985d9e8..27af09de58 100644 --- a/LeanPool/OSforGFF/Spacetime/Decomposition.lean +++ b/LeanPool/OSforGFF/Spacetime/Decomposition.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Spacetime.ProdIntegrable +public import LeanPool.OSforGFF.Spacetime.ProdIntegrable +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Spacetime Decomposition @@ -26,6 +27,8 @@ time and spatial components: SpaceTime ≃ᵐ ℝ × SpatialCoords. * `spacetime_norm_sq_decompose` - Norm decomposition: ‖k‖² = k₀² + ‖k_sp‖² -/ +@[expose] public section + open MeasureTheory MeasureSpace FiniteDimensional Real /-! ### Integral Decomposition for SpaceTime diff --git a/LeanPool/OSforGFF/Spacetime/DiscreteSymmetry.lean b/LeanPool/OSforGFF/Spacetime/DiscreteSymmetry.lean index 614aafde11..5caa9c9df2 100644 --- a/LeanPool/OSforGFF/Spacetime/DiscreteSymmetry.lean +++ b/LeanPool/OSforGFF/Spacetime/DiscreteSymmetry.lean @@ -3,65 +3,19 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module + + + -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Abel -import Mathlib.Tactic.FunProp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Push -import Mathlib.Tactic.Tauto -import Mathlib.Tactic.ApplyFun -import Mathlib.Tactic.Convert -import Mathlib.Tactic.Common -import Mathlib.Tactic.Cases -import Mathlib.Tactic.Choose -import Mathlib.Tactic.SimpRw -import Mathlib.Tactic.SuppressCompilation -import Mathlib.Tactic.Use -import Mathlib.Tactic.Set -import Mathlib.Tactic.Polyrith -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Generalize -import Mathlib.Basic.Complex.Basic -import Mathlib.Analysis.Complex.Exponential -import Mathlib.Algebra.Group.Support -import Mathlib.Algebra.Star.Basic -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Analysis.InnerProductSpace.LinearMap -import Mathlib.Analysis.Complex.Basic -import Mathlib.Analysis.Analytic.Basic -import Mathlib.Analysis.Analytic.Constructions -import Mathlib.Analysis.SpecialFunctions.Complex.Analytic -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.Analysis.InnerProductSpace.PiL2 - -import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.PiProd -import Mathlib.Topology.MetricSpace.Isometry - -import Mathlib.MeasureTheory.Measure.Decomposition.RadonNikodym -import Mathlib.MeasureTheory.Measure.Haar.OfBasis -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.MeasureTheory.Function.LpSpace.Basic -import Mathlib.MeasureTheory.Function.L2Space -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.MeasureTheory.Measure.FiniteMeasureExt - -import Mathlib.Probability.Independence.Basic -import Mathlib.Probability.Density - -import Mathlib.Analysis.RCLike.Basic -import Mathlib.Analysis.Normed.Module.RCLike.Basic -import Mathlib.Analysis.Normed.Module.RCLike.Real --import Mathlib.LinearAlgebra.TensorAlgebra.Basic -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Spacetime.Euclidean +public import LeanPool.OSforGFF.Spacetime.Basic +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Time Reflection Θ and Discrete Symmetries @@ -73,6 +27,8 @@ Induced actions on test functions: (Θf)(x) = f(Θx) = f(−t, xbar). Foundation for the OS3 reflection positivity axiom. -/ +@[expose] public section + open MeasureTheory namespace QFT @@ -176,7 +132,7 @@ private lemma timeReflection_hg_upper : noncomputable def compTimeReflection : TestFunctionℂ →L[ℝ] TestFunctionℂ := SchwartzMap.compCLM (𝕜 := ℝ) (hg := timeReflectionCLM.hasTemperateGrowth) - (hg_upper := timeReflection_hg_upper) + (hg_upper := by exact timeReflection_hg_upper) /-- Composition with time reflection as a continuous linear map on **real-valued** test functions. This version will be used when working with positive-time @@ -186,7 +142,7 @@ noncomputable def compTimeReflection : TestFunctionℂ →L[ℝ] TestFunctionℂ noncomputable def compTimeReflectionReal : TestFunction →L[ℝ] TestFunction := SchwartzMap.compCLM (𝕜 := ℝ) (hg := timeReflectionCLM.hasTemperateGrowth) - (hg_upper := timeReflection_hg_upper) + (hg_upper := by exact timeReflection_hg_upper) /-- Time reflection is linear on real test functions. -/ lemma compTimeReflectionReal_linear_combination {n : ℕ} (f : Fin n → TestFunction) (c : Fin n → ℝ) : diff --git a/LeanPool/OSforGFF/Spacetime/Euclidean.lean b/LeanPool/OSforGFF/Spacetime/Euclidean.lean index ba15e47c53..7b871f87e0 100644 --- a/LeanPool/OSforGFF/Spacetime/Euclidean.lean +++ b/LeanPool/OSforGFF/Spacetime/Euclidean.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import LeanPool.OSforGFF.Spacetime.Basic +public import LeanPool.OSforGFF.Spacetime.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Euclidean Group E(4) and Its Actions @@ -18,6 +20,8 @@ pullbacks (needed for Schwartz space), and continuity of all actions. Foundation for the OS2 axiom. -/ +@[expose] public section + open MeasureTheory NNReal ENNReal open TopologicalSpace Measure diff --git a/LeanPool/OSforGFF/Spacetime/PositiveTimeTestFunction.lean b/LeanPool/OSforGFF/Spacetime/PositiveTimeTestFunction.lean index 043f22ec36..717a459584 100644 --- a/LeanPool/OSforGFF/Spacetime/PositiveTimeTestFunction.lean +++ b/LeanPool/OSforGFF/Spacetime/PositiveTimeTestFunction.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module +public import LeanPool.OSforGFF.Spacetime.DiscreteSymmetry +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial import Mathlib.LinearAlgebra.Complex.FiniteDimensional -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Spacetime.DiscreteSymmetry /-! # Positive Time Test Functions and Star Operations @@ -28,6 +31,8 @@ the star operation (complex conjugation composed with time reflection) for test * `Star TestFunctionℂ`: Star instance for complex test functions -/ +@[expose] public section + noncomputable section open TopologicalSpace Function SchwartzMap QFT diff --git a/LeanPool/OSforGFF/Spacetime/ProdIntegrable.lean b/LeanPool/OSforGFF/Spacetime/ProdIntegrable.lean index 355f0f80c2..14a7305ca4 100644 --- a/LeanPool/OSforGFF/Spacetime/ProdIntegrable.lean +++ b/LeanPool/OSforGFF/Spacetime/ProdIntegrable.lean @@ -3,17 +3,12 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv -import Mathlib.Analysis.SpecialFunctions.JapaneseBracket -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.MeasureTheory.Measure.Lebesgue.Basic -import Mathlib.MeasureTheory.Integral.IntegrableOn -import Mathlib.MeasureTheory.Integral.Prod -import Mathlib.Analysis.Calculus.MeanValue -import Mathlib.Analysis.Calculus.Deriv.Basic +public import LeanPool.OSforGFF.Spacetime.Basic import LeanPool.OSforGFF.General.FunctionalAnalysis -import LeanPool.OSforGFF.Spacetime.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! ## SpaceTime-specialized version @@ -22,6 +17,8 @@ For SpaceTime = EuclideanSpace ℝ (Fin 4), the time coordinate is accessed via This specialized version matches the signature needed in OS3_MixedRepInfra.lean. -/ +@[expose] public section + open MeasureTheory SchwartzMap Real Set Metric open scoped ENNReal diff --git a/LeanPool/OSforGFF/Spacetime/TimeTranslation.lean b/LeanPool/OSforGFF/Spacetime/TimeTranslation.lean index a71ee49549..a0f209cfa9 100644 --- a/LeanPool/OSforGFF/Spacetime/TimeTranslation.lean +++ b/LeanPool/OSforGFF/Spacetime/TimeTranslation.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import LeanPool.OSforGFF.Spacetime.Basic +public import LeanPool.OSforGFF.Spacetime.Basic +import Mathlib.Analysis.Calculus.ContDiff.WithLp +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Time Translation Operators @@ -40,6 +43,8 @@ that time translation acts continuously on Schwartz space (a standard textbook f from Reed-Simon V.3 and Hörmander Ch. 7). -/ +@[expose] public section + open MeasureTheory Real open TopologicalSpace open scoped BigOperators diff --git a/LeanPool/OSforGFF/Spacetime/Tonelli.lean b/LeanPool/OSforGFF/Spacetime/Tonelli.lean index d92f321977..27d5767d78 100644 --- a/LeanPool/OSforGFF/Spacetime/Tonelli.lean +++ b/LeanPool/OSforGFF/Spacetime/Tonelli.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim. All r Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas, Sarah Hoback, Anna Mei, Ron Nissim -/ +module - -import LeanPool.OSforGFF.Spacetime.Basic -import LeanPool.OSforGFF.Spacetime.Decomposition -import Mathlib.Analysis.SpecialFunctions.JapaneseBracket +public import LeanPool.OSforGFF.Spacetime.Decomposition +import LeanPool.OSforGFF.General.FunctionalAnalysis +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Schwartz Tonelli Factorization @@ -26,6 +27,8 @@ depends only on the time coordinates. * Folland, "Real Analysis", Chapter 2 (Fubini-Tonelli theorem) -/ +@[expose] public section + open MeasureTheory MeasureSpace FiniteDimensional Real /-! ### Auxiliary Lemmas -/ diff --git a/LeanPool/OddPrimeValuationDistribution.lean b/LeanPool/OddPrimeValuationDistribution.lean index 0612af7fff..cd283a687a 100644 --- a/LeanPool/OddPrimeValuationDistribution.lean +++ b/LeanPool/OddPrimeValuationDistribution.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module -import LeanPool.OddPrimeValuationDistribution.LowValuations +public import LeanPool.OddPrimeValuationDistribution.GeneratingFunction + +public import LeanPool.OddPrimeValuationDistribution.LowValuations +import Mathlib.Data.Sym.Sym2.Init /-! # Exact odd-prime distributions of central-binomial valuations @@ -16,3 +20,5 @@ Main declarations: `OddPrimeValuationDistribution.oddPrimeValuationGeneratingSer Tags: central-binomial-coefficients, p-adic-valuations, digit-carries, generating-functions MSC: 11A63, 11B65 -/ + +@[expose] public section diff --git a/LeanPool/OddPrimeValuationDistribution/CarryArithmetic.lean b/LeanPool/OddPrimeValuationDistribution/CarryArithmetic.lean index 26cd681bf2..8304baf899 100644 --- a/LeanPool/OddPrimeValuationDistribution/CarryArithmetic.lean +++ b/LeanPool/OddPrimeValuationDistribution/CarryArithmetic.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module + +public import Mathlib.Data.Nat.Choose.Central +public import Mathlib.Data.Nat.Digits.Defs +public import Mathlib.Data.Nat.MaxPowDiv +public import Mathlib.Data.Nat.PadicValNat +public import Mathlib.Data.Nat.Prime.Defs import LeanPool.OddPrimeValuationDistribution.Kummer import Mathlib.Data.Nat.Digits.Lemmas -import Mathlib.Tactic.Ring /-! # Doubling carries in an arbitrary odd base @@ -16,6 +22,8 @@ the base is prime, the carry count is exactly the prime-adic valuation of the central binomial coefficient. -/ +@[expose] public section + namespace OddPrimeValuationDistribution open Nat diff --git a/LeanPool/OddPrimeValuationDistribution/CarryPolynomial.lean b/LeanPool/OddPrimeValuationDistribution/CarryPolynomial.lean index 348e40f6aa..654b742628 100644 --- a/LeanPool/OddPrimeValuationDistribution/CarryPolynomial.lean +++ b/LeanPool/OddPrimeValuationDistribution/CarryPolynomial.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.OddPrimeValuationDistribution.CarryArithmetic -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Algebra.Polynomial.Coeff -import Mathlib.Data.Fintype.Vector -import Mathlib.Tactic.Ring +module + +public import LeanPool.OddPrimeValuationDistribution.CarryArithmetic +public import Mathlib.Algebra.Polynomial.Basic +public import Mathlib.Logic.Equiv.Fin.Basic +import Mathlib.Data.Nat.SuccPred /-! # Carry polynomials in an arbitrary odd base @@ -18,6 +19,8 @@ the carry threshold gives a two-state transfer matrix and its scalar second-order recurrence. -/ +@[expose] public section + namespace OddPrimeValuationDistribution open Polynomial diff --git a/LeanPool/OddPrimeValuationDistribution/GeneratingFunction.lean b/LeanPool/OddPrimeValuationDistribution/GeneratingFunction.lean index ac0f037059..8c1e7816fd 100644 --- a/LeanPool/OddPrimeValuationDistribution/GeneratingFunction.lean +++ b/LeanPool/OddPrimeValuationDistribution/GeneratingFunction.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.OddPrimeValuationDistribution.ValuationBlocks -import Mathlib.RingTheory.PowerSeries.Basic +module + +public import LeanPool.OddPrimeValuationDistribution.ValuationBlocks +public import Mathlib.RingTheory.PowerSeries.Basic /-! # Bivariate generating function for odd-prime valuation distributions @@ -16,6 +18,8 @@ denominator-cleared, subtraction-free form of `(1 - X * T) / (1 - (half + 1) * (1 + X) * T + p * X * T ^ 2)`. -/ +@[expose] public section + namespace OddPrimeValuationDistribution /-- Bivariate generating series for complete odd-base valuation blocks. -/ diff --git a/LeanPool/OddPrimeValuationDistribution/Kummer.lean b/LeanPool/OddPrimeValuationDistribution/Kummer.lean index 24bf0b8bc6..8a8ba60d49 100644 --- a/LeanPool/OddPrimeValuationDistribution/Kummer.lean +++ b/LeanPool/OddPrimeValuationDistribution/Kummer.lean @@ -3,6 +3,13 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ +module + +public import Mathlib.Data.Nat.Choose.Central +public import Mathlib.Data.Nat.Digits.Defs +public import Mathlib.Data.Nat.MaxPowDiv +public import Mathlib.Data.Nat.PadicValNat +public import Mathlib.Data.Nat.Prime.Defs import Mathlib.NumberTheory.Padics.PadicVal.Basic /-! @@ -12,6 +19,8 @@ This module specializes Kummer's theorem to `Nat.centralBinom`, providing the arithmetic bridge used by the odd-prime carry enumerator. -/ +@[expose] public section + namespace OddPrimeValuationDistribution open Nat diff --git a/LeanPool/OddPrimeValuationDistribution/LowValuations.lean b/LeanPool/OddPrimeValuationDistribution/LowValuations.lean index 50f6563d85..2cdd1b831e 100644 --- a/LeanPool/OddPrimeValuationDistribution/LowValuations.lean +++ b/LeanPool/OddPrimeValuationDistribution/LowValuations.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.OddPrimeValuationDistribution.GeneratingFunction -import Mathlib.Tactic.Ring +module + +public import LeanPool.OddPrimeValuationDistribution.ValuationBlocks +import Mathlib.Algebra.Polynomial.Coeff +import Mathlib.Data.Sym.Sym2.Init /-! # Closed low-valuation counts for every odd prime @@ -14,6 +17,8 @@ one. These are arithmetic counts on the complete block below `p ^ k`, not asymptotic estimates. -/ +@[expose] public section + namespace OddPrimeValuationDistribution open Polynomial diff --git a/LeanPool/OddPrimeValuationDistribution/ValuationBlocks.lean b/LeanPool/OddPrimeValuationDistribution/ValuationBlocks.lean index c0b1dad272..9b3a829982 100644 --- a/LeanPool/OddPrimeValuationDistribution/ValuationBlocks.lean +++ b/LeanPool/OddPrimeValuationDistribution/ValuationBlocks.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Egor Lyfar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Egor Lyfar -/ -import LeanPool.OddPrimeValuationDistribution.CarryPolynomial -import Mathlib.Data.Fintype.EquivFin +module + +public import LeanPool.OddPrimeValuationDistribution.CarryPolynomial +import Mathlib.Algebra.Polynomial.Coeff /-! # Exact central-binomial valuation distributions for odd primes @@ -15,6 +17,8 @@ the word carry count into the exact value of `ν_p (centralBinom n)`, so the transfer recurrence becomes an arithmetic distribution theorem. -/ +@[expose] public section + namespace OddPrimeValuationDistribution open Nat Polynomial diff --git a/LeanPool/Odlyzko.lean b/LeanPool/Odlyzko.lean index f0263d9d90..1f7f50f588 100644 --- a/LeanPool/Odlyzko.lean +++ b/LeanPool/Odlyzko.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 The FLT Project. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: The FLT Project, √2 -/ +module -import LeanPool.Odlyzko.ExplicitFormula.PoitouEstimate +public import LeanPool.Odlyzko.ExplicitFormula.PoitouEstimate +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Tactic.ArithMult.Init /-! # Poitou's Explicit Odlyzko Bound for Root Discriminants @@ -17,6 +20,8 @@ Tags: number-theory, discriminants, number-fields, explicit-formula MSC: 11R29, 11R42 -/ +@[expose] public section + /-! # Odlyzko's bound for totally complex number fields diff --git a/LeanPool/Odlyzko/CompletedZeta/ClassRepresentatives.lean b/LeanPool/Odlyzko/CompletedZeta/ClassRepresentatives.lean index 183d7ad1bd..fab1995566 100644 --- a/LeanPool/Odlyzko/CompletedZeta/ClassRepresentatives.lean +++ b/LeanPool/Odlyzko/CompletedZeta/ClassRepresentatives.lean @@ -6,8 +6,11 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.FundamentalConeSeries -public import LeanPool.Odlyzko.DedekindZeta.IdealSeries -public import Mathlib.Data.Fintype.BigOperators +import LeanPool.Odlyzko.DedekindZeta.Convergence +import LeanPool.Odlyzko.DedekindZeta.FiniteFiberSeries +import LeanPool.Odlyzko.DedekindZeta.IdealSeries +import Mathlib.NumberTheory.LSeries.Linearity +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenter.lean b/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenter.lean index dd83ae0293..9f648282e9 100644 --- a/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenter.lean +++ b/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenter.lean @@ -5,8 +5,9 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.ClassThetaRadial -public import LeanPool.Odlyzko.CompletedZeta.LogarithmicMellinHalfIntegral +public import LeanPool.Odlyzko.CompletedZeta.ClassThetaPoisson +public import LeanPool.Odlyzko.CompletedZeta.FractionalShapeTheta +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredContinuation.lean b/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredContinuation.lean index 8e253b3db4..0d8df41c6e 100644 --- a/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredContinuation.lean +++ b/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredContinuation.lean @@ -7,6 +7,9 @@ module public import LeanPool.Odlyzko.CompletedZeta.ClassThetaCenteredReflection public import LeanPool.Odlyzko.CompletedZeta.ClassThetaIntegral +public import LeanPool.Odlyzko.CompletedZeta.ClassThetaRadial +import LeanPool.Odlyzko.CompletedZeta.ShapeThetaPeriodicity +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredHolomorphy.lean b/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredHolomorphy.lean index a95b87462b..ac0fc2e24e 100644 --- a/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredHolomorphy.lean +++ b/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredHolomorphy.lean @@ -5,8 +5,9 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.ClassThetaCenteredRepresentative -public import Mathlib.Analysis.Calculus.ParametricIntegral +public import LeanPool.Odlyzko.CompletedZeta.ClassThetaCenteredContinuation +import LeanPool.Odlyzko.CompletedZeta.ClassThetaCenteredRepresentative +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredReflection.lean b/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredReflection.lean index 4efd459b43..f754944a09 100644 --- a/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredReflection.lean +++ b/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredReflection.lean @@ -6,6 +6,11 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.ClassThetaCenter +public import LeanPool.Odlyzko.CompletedZeta.ShapeMellinTranslation +public import LeanPool.Odlyzko.CompletedZeta.UnitSlabRadial +import LeanPool.Odlyzko.CompletedZeta.LogarithmicMellinHalfIntegral +import LeanPool.Odlyzko.CompletedZeta.ShapeThetaPeriodicity +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredRepresentative.lean b/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredRepresentative.lean index b187b86464..a712b87de1 100644 --- a/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredRepresentative.lean +++ b/LeanPool/Odlyzko/CompletedZeta/ClassThetaCenteredRepresentative.lean @@ -6,6 +6,7 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.ClassThetaCenteredContinuation +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/ClassThetaIntegral.lean b/LeanPool/Odlyzko/CompletedZeta/ClassThetaIntegral.lean index 0f807f6d96..2b5e7b7098 100644 --- a/LeanPool/Odlyzko/CompletedZeta/ClassThetaIntegral.lean +++ b/LeanPool/Odlyzko/CompletedZeta/ClassThetaIntegral.lean @@ -7,7 +7,9 @@ module public import LeanPool.Odlyzko.CompletedZeta.ClassRepresentatives public import LeanPool.Odlyzko.CompletedZeta.ShapeMellinTranslation -public import LeanPool.Odlyzko.CompletedZeta.TotallyComplex +public import LeanPool.Odlyzko.CompletedZeta.Defs +import LeanPool.Odlyzko.CompletedZeta.TotallyComplex +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/ClassThetaPoisson.lean b/LeanPool/Odlyzko/CompletedZeta/ClassThetaPoisson.lean index 9c243d04eb..3f38c99ef3 100644 --- a/LeanPool/Odlyzko/CompletedZeta/ClassThetaPoisson.lean +++ b/LeanPool/Odlyzko/CompletedZeta/ClassThetaPoisson.lean @@ -5,8 +5,14 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.ClassThetaIntegral -public import LeanPool.Odlyzko.CompletedZeta.TraceDualClass +public import Mathlib.NumberTheory.NumberField.InfinitePlace.TotallyRealComplex + +public import LeanPool.Odlyzko.Theta.TraceDualIdeal +public import Mathlib.Analysis.Real.Sqrt +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ @@ -14,13 +20,11 @@ public import LeanPool.Odlyzko.CompletedZeta.TraceDualClass noncomputable section -open Complex NumberField NumberField.InfinitePlace NumberField.Units - NumberField.Units.dirichletUnitTheorem +open Complex NumberField NumberField.InfinitePlace open scoped nonZeroDivisors namespace NumberField.Odlyzko -open mixedEmbedding mixedEmbedding.fundamentalCone variable (K : Type*) [Field K] [NumberField K] [IsTotallyComplex K] diff --git a/LeanPool/Odlyzko/CompletedZeta/ClassThetaRadial.lean b/LeanPool/Odlyzko/CompletedZeta/ClassThetaRadial.lean index 1242a68331..49db7182d5 100644 --- a/LeanPool/Odlyzko/CompletedZeta/ClassThetaRadial.lean +++ b/LeanPool/Odlyzko/CompletedZeta/ClassThetaRadial.lean @@ -5,8 +5,8 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.ClassThetaPoisson -public import LeanPool.Odlyzko.CompletedZeta.UnitSlabRadial +public import LeanPool.Odlyzko.CompletedZeta.ShapeMellinTranslation +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/ConeGaussianRadial.lean b/LeanPool/Odlyzko/CompletedZeta/ConeGaussianRadial.lean index 2f1da1d63e..bb8c0158d8 100644 --- a/LeanPool/Odlyzko/CompletedZeta/ConeGaussianRadial.lean +++ b/LeanPool/Odlyzko/CompletedZeta/ConeGaussianRadial.lean @@ -5,8 +5,9 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.ConeGaussianInterchange -public import LeanPool.Odlyzko.CompletedZeta.UnitDecomposition +public import LeanPool.Odlyzko.CompletedZeta.UnitAveragedGaussian +import Mathlib.RingTheory.Flat.FaithfullyFlat.Algebra +import Mathlib.RingTheory.Flat.TorsionFree /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/FractionalShapeTheta.lean b/LeanPool/Odlyzko/CompletedZeta/FractionalShapeTheta.lean index dddf6586c7..8fc340fe7a 100644 --- a/LeanPool/Odlyzko/CompletedZeta/FractionalShapeTheta.lean +++ b/LeanPool/Odlyzko/CompletedZeta/FractionalShapeTheta.lean @@ -6,9 +6,7 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.RadialKernelFormula -public import LeanPool.Odlyzko.Theta.PoissonSummation public import LeanPool.Odlyzko.Theta.TraceDualLattice -public import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/FunctionalEquation.lean b/LeanPool/Odlyzko/CompletedZeta/FunctionalEquation.lean index 31db2a768c..a78ec7af30 100644 --- a/LeanPool/Odlyzko/CompletedZeta/FunctionalEquation.lean +++ b/LeanPool/Odlyzko/CompletedZeta/FunctionalEquation.lean @@ -6,6 +6,9 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.ClassThetaCenteredHolomorphy +public import LeanPool.Odlyzko.CompletedZeta.TraceDualClass +import LeanPool.Odlyzko.CompletedZeta.ClassThetaCenteredRepresentative +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/FunctionalEquationLogDeriv.lean b/LeanPool/Odlyzko/CompletedZeta/FunctionalEquationLogDeriv.lean index 3ddb5125f9..3f179fa827 100644 --- a/LeanPool/Odlyzko/CompletedZeta/FunctionalEquationLogDeriv.lean +++ b/LeanPool/Odlyzko/CompletedZeta/FunctionalEquationLogDeriv.lean @@ -6,7 +6,9 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.FunctionalEquation -public import LeanPool.Odlyzko.CompletedZeta.RightHalfPlane +public import LeanPool.Odlyzko.DedekindZeta.PrimePowerExpansion +import LeanPool.Odlyzko.CompletedZeta.RightHalfPlane +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/FundamentalConeSeries.lean b/LeanPool/Odlyzko/CompletedZeta/FundamentalConeSeries.lean index cfb2248614..00a80c58fc 100644 --- a/LeanPool/Odlyzko/CompletedZeta/FundamentalConeSeries.lean +++ b/LeanPool/Odlyzko/CompletedZeta/FundamentalConeSeries.lean @@ -5,10 +5,10 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.DedekindZeta.Convergence -public import LeanPool.Odlyzko.DedekindZeta.FiniteFiberSeries -public import Mathlib.NumberTheory.LSeries.Linearity -public import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.FundamentalCone +public import LeanPool.Odlyzko.DedekindZeta.Coefficients +import LeanPool.Odlyzko.DedekindZeta.Convergence +import LeanPool.Odlyzko.DedekindZeta.FiniteFiberSeries +import Mathlib.NumberTheory.LSeries.Linearity /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/GammaFactor.lean b/LeanPool/Odlyzko/CompletedZeta/GammaFactor.lean index cd03730be2..2d12cb6396 100644 --- a/LeanPool/Odlyzko/CompletedZeta/GammaFactor.lean +++ b/LeanPool/Odlyzko/CompletedZeta/GammaFactor.lean @@ -5,9 +5,9 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.Defs -public import Mathlib.Analysis.Calculus.LogDeriv public import Mathlib.Analysis.SpecialFunctions.Gamma.Digamma +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/IdealElementDecomposition.lean b/LeanPool/Odlyzko/CompletedZeta/IdealElementDecomposition.lean index 043a730e79..41792c9cf0 100644 --- a/LeanPool/Odlyzko/CompletedZeta/IdealElementDecomposition.lean +++ b/LeanPool/Odlyzko/CompletedZeta/IdealElementDecomposition.lean @@ -5,7 +5,9 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.ConeGaussianRadial +public import LeanPool.Odlyzko.CompletedZeta.ConeGaussianIntegral +import LeanPool.Odlyzko.CompletedZeta.ConeGaussianInterchange +import LeanPool.Odlyzko.CompletedZeta.UnitDecomposition /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/IdealThetaUnfolding.lean b/LeanPool/Odlyzko/CompletedZeta/IdealThetaUnfolding.lean index 9edd7ed0b3..77615c3746 100644 --- a/LeanPool/Odlyzko/CompletedZeta/IdealThetaUnfolding.lean +++ b/LeanPool/Odlyzko/CompletedZeta/IdealThetaUnfolding.lean @@ -6,6 +6,8 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.IdealElementDecomposition +public import LeanPool.Odlyzko.CompletedZeta.ConeGaussianRadial +import LeanPool.Odlyzko.CompletedZeta.ConeGaussianInterchange /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/LogarithmicMellinHalfIntegral.lean b/LeanPool/Odlyzko/CompletedZeta/LogarithmicMellinHalfIntegral.lean index 0c6ffc6063..07717153e7 100644 --- a/LeanPool/Odlyzko/CompletedZeta/LogarithmicMellinHalfIntegral.lean +++ b/LeanPool/Odlyzko/CompletedZeta/LogarithmicMellinHalfIntegral.lean @@ -6,7 +6,8 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.ShapeMellinTranslation -public import LeanPool.Odlyzko.CompletedZeta.UnitSlabRadialIntegral +public import LeanPool.Odlyzko.CompletedZeta.UnitSlabRadial +import LeanPool.Odlyzko.CompletedZeta.UnitSlabRadialIntegral /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/RadialKernelFormula.lean b/LeanPool/Odlyzko/CompletedZeta/RadialKernelFormula.lean index fefc0bc4f3..6b1cb7da93 100644 --- a/LeanPool/Odlyzko/CompletedZeta/RadialKernelFormula.lean +++ b/LeanPool/Odlyzko/CompletedZeta/RadialKernelFormula.lean @@ -5,9 +5,10 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.IdealThetaUnfolding -public import Mathlib.MeasureTheory.Function.LpSpace.InfiniteSum -public import Mathlib.MeasureTheory.Integral.DominatedConvergence +public import LeanPool.Odlyzko.CompletedZeta.ConeGaussianRadial +public import LeanPool.Odlyzko.CompletedZeta.IdealElementDecomposition +import LeanPool.Odlyzko.CompletedZeta.IdealThetaUnfolding +import Mathlib.MeasureTheory.Function.LpSpace.InfiniteSum /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/RightHalfPlane.lean b/LeanPool/Odlyzko/CompletedZeta/RightHalfPlane.lean index e7a3c7fdd4..19a2ee2524 100644 --- a/LeanPool/Odlyzko/CompletedZeta/RightHalfPlane.lean +++ b/LeanPool/Odlyzko/CompletedZeta/RightHalfPlane.lean @@ -6,11 +6,16 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.Defs -public import LeanPool.Odlyzko.CompletedZeta.TotallyComplex -public import LeanPool.Odlyzko.DedekindZeta.Convergence public import LeanPool.Odlyzko.DedekindZeta.PrimePowerExpansion -public import Mathlib.Analysis.Calculus.LogDeriv public import Mathlib.NumberTheory.LSeries.Deriv +public import LeanPool.Odlyzko.DedekindZeta.Coefficients +public import Mathlib.Analysis.SpecialFunctions.Gamma.Digamma +import LeanPool.Odlyzko.CompletedZeta.GammaFactor +import LeanPool.Odlyzko.CompletedZeta.TotallyComplex +import LeanPool.Odlyzko.DedekindZeta.Convergence +import LeanPool.Odlyzko.DedekindZeta.PrimeIdealEulerProduct +import LeanPool.Odlyzko.DedekindZeta.PrimeIdealSummability +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/ShapeMellinTranslation.lean b/LeanPool/Odlyzko/CompletedZeta/ShapeMellinTranslation.lean index 929578bf4c..5c8be50fb5 100644 --- a/LeanPool/Odlyzko/CompletedZeta/ShapeMellinTranslation.lean +++ b/LeanPool/Odlyzko/CompletedZeta/ShapeMellinTranslation.lean @@ -5,7 +5,8 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.ShapeThetaPeriodicity +public import LeanPool.Odlyzko.CompletedZeta.FractionalShapeTheta +public import LeanPool.Odlyzko.CompletedZeta.UnitSlabTranslation /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/ShapeThetaPeriodicity.lean b/LeanPool/Odlyzko/CompletedZeta/ShapeThetaPeriodicity.lean index 9e72a788de..9d526f2e62 100644 --- a/LeanPool/Odlyzko/CompletedZeta/ShapeThetaPeriodicity.lean +++ b/LeanPool/Odlyzko/CompletedZeta/ShapeThetaPeriodicity.lean @@ -6,7 +6,6 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.FractionalShapeTheta -public import LeanPool.Odlyzko.CompletedZeta.UnitSlabTranslation /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/TotallyComplex.lean b/LeanPool/Odlyzko/CompletedZeta/TotallyComplex.lean index b731bee2b2..d9304a2908 100644 --- a/LeanPool/Odlyzko/CompletedZeta/TotallyComplex.lean +++ b/LeanPool/Odlyzko/CompletedZeta/TotallyComplex.lean @@ -5,8 +5,9 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.GammaFactor -public import Mathlib.NumberTheory.NumberField.InfinitePlace.TotallyRealComplex +public import LeanPool.Odlyzko.CompletedZeta.Defs +public import Mathlib.Analysis.SpecialFunctions.Gamma.Digamma +import LeanPool.Odlyzko.CompletedZeta.GammaFactor /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/TraceDualClass.lean b/LeanPool/Odlyzko/CompletedZeta/TraceDualClass.lean index 98fed3caaa..4eacd42b47 100644 --- a/LeanPool/Odlyzko/CompletedZeta/TraceDualClass.lean +++ b/LeanPool/Odlyzko/CompletedZeta/TraceDualClass.lean @@ -5,9 +5,14 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.ClassRepresentatives -public import LeanPool.Odlyzko.CompletedZeta.FractionalShapeTheta +public import Mathlib.NumberTheory.NumberField.InfinitePlace.TotallyRealComplex + public import LeanPool.Odlyzko.Theta.TraceDualIdeal +public import Mathlib.RingTheory.ClassGroup.Basic +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/UnitAveragedGaussian.lean b/LeanPool/Odlyzko/CompletedZeta/UnitAveragedGaussian.lean index 59819bcc01..fe8ce84821 100644 --- a/LeanPool/Odlyzko/CompletedZeta/UnitAveragedGaussian.lean +++ b/LeanPool/Odlyzko/CompletedZeta/UnitAveragedGaussian.lean @@ -7,10 +7,7 @@ module public import LeanPool.Odlyzko.CompletedZeta.GammaFactor public import LeanPool.Odlyzko.CompletedZeta.UnitFundamentalDomain -public import Mathlib.Analysis.MellinTransform -public import Mathlib.Analysis.SpecialFunctions.Gamma.Basic -public import Mathlib.MeasureTheory.Integral.Pi -public import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic +public import Mathlib.NumberTheory.NumberField.InfinitePlace.TotallyRealComplex /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/UnitFundamentalDomain.lean b/LeanPool/Odlyzko/CompletedZeta/UnitFundamentalDomain.lean index 40ec1ddf39..786b539d51 100644 --- a/LeanPool/Odlyzko/CompletedZeta/UnitFundamentalDomain.lean +++ b/LeanPool/Odlyzko/CompletedZeta/UnitFundamentalDomain.lean @@ -6,7 +6,6 @@ Authors: The FLT Project module public import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.NormLeOne -public import Mathlib.Algebra.Order.Floor.Ring /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/UnitSlabRadial.lean b/LeanPool/Odlyzko/CompletedZeta/UnitSlabRadial.lean index dfbc5f4e17..51312115dc 100644 --- a/LeanPool/Odlyzko/CompletedZeta/UnitSlabRadial.lean +++ b/LeanPool/Odlyzko/CompletedZeta/UnitSlabRadial.lean @@ -6,7 +6,6 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.UnitSlabTranslation -public import Mathlib.MeasureTheory.Measure.Lebesgue.Integral /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/UnitSlabRadialIntegral.lean b/LeanPool/Odlyzko/CompletedZeta/UnitSlabRadialIntegral.lean index 6113b07f40..90bd8e1035 100644 --- a/LeanPool/Odlyzko/CompletedZeta/UnitSlabRadialIntegral.lean +++ b/LeanPool/Odlyzko/CompletedZeta/UnitSlabRadialIntegral.lean @@ -6,7 +6,6 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.UnitSlabRadial -public import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/UnitSlabTranslation.lean b/LeanPool/Odlyzko/CompletedZeta/UnitSlabTranslation.lean index 21bc5e2da4..000e735ab8 100644 --- a/LeanPool/Odlyzko/CompletedZeta/UnitSlabTranslation.lean +++ b/LeanPool/Odlyzko/CompletedZeta/UnitSlabTranslation.lean @@ -6,7 +6,6 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.UnitFundamentalDomain -public import Mathlib.MeasureTheory.Integral.IntegrableOn /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/CompletedZeta/VerticalGrowth.lean b/LeanPool/Odlyzko/CompletedZeta/VerticalGrowth.lean index 021af194af..49fc0ff649 100644 --- a/LeanPool/Odlyzko/CompletedZeta/VerticalGrowth.lean +++ b/LeanPool/Odlyzko/CompletedZeta/VerticalGrowth.lean @@ -5,8 +5,9 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.ClassThetaCenteredHolomorphy public import LeanPool.Odlyzko.CompletedZeta.FunctionalEquation +import LeanPool.Odlyzko.CompletedZeta.ClassThetaCenteredRepresentative +import Mathlib.Tactic.ArithMult.Init /-! # Vertical Growth diff --git a/LeanPool/Odlyzko/CompletedZeta/VerticalLowerBound.lean b/LeanPool/Odlyzko/CompletedZeta/VerticalLowerBound.lean index 28badd47aa..b123713a9e 100644 --- a/LeanPool/Odlyzko/CompletedZeta/VerticalLowerBound.lean +++ b/LeanPool/Odlyzko/CompletedZeta/VerticalLowerBound.lean @@ -6,13 +6,13 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.CompletedZeta.FunctionalEquation -public import LeanPool.Odlyzko.CompletedZeta.GammaFactor -public import LeanPool.Odlyzko.CompletedZeta.TotallyComplex -public import LeanPool.Odlyzko.DedekindZeta.PrimeIdealEulerProduct -public import LeanPool.Odlyzko.DedekindZeta.PrimeIdealSummability -public import Mathlib.Analysis.SpecialFunctions.Gamma.Beta -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp -public import Mathlib.Topology.Algebra.InfiniteSum.Order +public import LeanPool.Odlyzko.DedekindZeta.PrimeIdealFactor +import LeanPool.Odlyzko.CompletedZeta.TotallyComplex +import LeanPool.Odlyzko.DedekindZeta.PrimeIdealEulerProduct +import LeanPool.Odlyzko.DedekindZeta.PrimeIdealSummability +import Mathlib.Analysis.SpecialFunctions.Log.Summable +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Tactic.ArithMult.Init /-! # Vertical Lower Bound diff --git a/LeanPool/Odlyzko/DedekindZeta/Convergence.lean b/LeanPool/Odlyzko/DedekindZeta/Convergence.lean index c80992c5af..a6ae62c5f7 100644 --- a/LeanPool/Odlyzko/DedekindZeta/Convergence.lean +++ b/LeanPool/Odlyzko/DedekindZeta/Convergence.lean @@ -6,8 +6,6 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.DedekindZeta.Coefficients -public import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics -public import Mathlib.NumberTheory.LSeries.SumCoeff /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/DedekindZeta/FiniteFiberSeries.lean b/LeanPool/Odlyzko/DedekindZeta/FiniteFiberSeries.lean index 1c97d1e8f1..7d766b7951 100644 --- a/LeanPool/Odlyzko/DedekindZeta/FiniteFiberSeries.lean +++ b/LeanPool/Odlyzko/DedekindZeta/FiniteFiberSeries.lean @@ -6,7 +6,6 @@ Authors: The FLT Project module public import Mathlib.NumberTheory.LSeries.Basic -public import Mathlib.Topology.Algebra.InfiniteSum.Constructions /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/DedekindZeta/IdealPrimeFactorization.lean b/LeanPool/Odlyzko/DedekindZeta/IdealPrimeFactorization.lean index 3bd7a51840..1e5501c0f7 100644 --- a/LeanPool/Odlyzko/DedekindZeta/IdealPrimeFactorization.lean +++ b/LeanPool/Odlyzko/DedekindZeta/IdealPrimeFactorization.lean @@ -5,8 +5,11 @@ Authors: The FLT Project -/ module -public import Mathlib.RingTheory.DedekindDomain.Factorization public import Mathlib.NumberTheory.NumberField.Basic +public import Mathlib.RingTheory.DedekindDomain.Ideal.Lemmas +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Rat.Floor +import Mathlib.Tactic.Continuity.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/DedekindZeta/IdealSeries.lean b/LeanPool/Odlyzko/DedekindZeta/IdealSeries.lean index 1a023e88ab..b089844f10 100644 --- a/LeanPool/Odlyzko/DedekindZeta/IdealSeries.lean +++ b/LeanPool/Odlyzko/DedekindZeta/IdealSeries.lean @@ -5,12 +5,12 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.DedekindZeta.Convergence -public import LeanPool.Odlyzko.DedekindZeta.FiniteFiberSeries public import LeanPool.Odlyzko.DedekindZeta.IdealPrimeFactorization -public import LeanPool.Odlyzko.DedekindZeta.PrimeIdealSummability -public import Mathlib.NumberTheory.EulerProduct.Basic -public import Mathlib.Topology.Algebra.InfiniteSum.Constructions +public import LeanPool.Odlyzko.DedekindZeta.Coefficients +import LeanPool.Odlyzko.DedekindZeta.Convergence +import LeanPool.Odlyzko.DedekindZeta.FiniteFiberSeries +import LeanPool.Odlyzko.DedekindZeta.PrimeIdealSummability +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/DedekindZeta/LocalFactor.lean b/LeanPool/Odlyzko/DedekindZeta/LocalFactor.lean index 44d1d3ee8a..8705f72030 100644 --- a/LeanPool/Odlyzko/DedekindZeta/LocalFactor.lean +++ b/LeanPool/Odlyzko/DedekindZeta/LocalFactor.lean @@ -5,8 +5,13 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.DedekindZeta.Coefficients -public import Mathlib.Analysis.SpecialFunctions.Pow.Deriv +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +public import Mathlib.Topology.Algebra.Module.ModuleTopology +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Local Factor diff --git a/LeanPool/Odlyzko/DedekindZeta/PrimeIdealEulerProduct.lean b/LeanPool/Odlyzko/DedekindZeta/PrimeIdealEulerProduct.lean index 3c165f1e3a..e699877588 100644 --- a/LeanPool/Odlyzko/DedekindZeta/PrimeIdealEulerProduct.lean +++ b/LeanPool/Odlyzko/DedekindZeta/PrimeIdealEulerProduct.lean @@ -6,15 +6,13 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.DedekindZeta.IdealPrimeFactorization -public import LeanPool.Odlyzko.DedekindZeta.IdealSeries public import LeanPool.Odlyzko.DedekindZeta.PrimeIdealFactor -public import LeanPool.Odlyzko.DedekindZeta.PrimeIdealSummability -public import Mathlib.Data.Nat.Factorization.Basic -public import Mathlib.Data.Nat.Prime.Nth -public import Mathlib.Logic.Equiv.Set -public import Mathlib.NumberTheory.EulerProduct.Basic public import Mathlib.RingTheory.UniqueFactorizationDomain.Nat -public import Mathlib.Topology.Algebra.InfiniteSum.Constructions +public import Mathlib.Data.Nat.Nth +public import Mathlib.NumberTheory.NumberField.DedekindZeta +import LeanPool.Odlyzko.DedekindZeta.IdealSeries +import LeanPool.Odlyzko.DedekindZeta.PrimeIdealSummability +import Mathlib.NumberTheory.EulerProduct.Basic /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/DedekindZeta/PrimeIdealFactor.lean b/LeanPool/Odlyzko/DedekindZeta/PrimeIdealFactor.lean index 4be9bba017..2c19344dd4 100644 --- a/LeanPool/Odlyzko/DedekindZeta/PrimeIdealFactor.lean +++ b/LeanPool/Odlyzko/DedekindZeta/PrimeIdealFactor.lean @@ -6,7 +6,11 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.DedekindZeta.LocalFactor -public import Mathlib.RingTheory.DedekindDomain.Ideal.Lemmas +public import Mathlib.Algebra.CharZero.Infinite +public import Mathlib.NumberTheory.NumberField.Basic +public import Mathlib.RingTheory.Ideal.Norm.AbsNorm +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/DedekindZeta/PrimeIdealSummability.lean b/LeanPool/Odlyzko/DedekindZeta/PrimeIdealSummability.lean index 7836bd208b..f827ee4fee 100644 --- a/LeanPool/Odlyzko/DedekindZeta/PrimeIdealSummability.lean +++ b/LeanPool/Odlyzko/DedekindZeta/PrimeIdealSummability.lean @@ -5,10 +5,9 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.DedekindZeta.Convergence public import LeanPool.Odlyzko.DedekindZeta.PrimeIdealFactor -public import Mathlib.Analysis.SpecialFunctions.Log.Summable -public import Mathlib.Topology.Algebra.InfiniteSum.Real +import LeanPool.Odlyzko.DedekindZeta.Convergence +import Mathlib.Analysis.SpecialFunctions.Log.Summable /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/DedekindZeta/PrimePowerExpansion.lean b/LeanPool/Odlyzko/DedekindZeta/PrimePowerExpansion.lean index 9ead6c56ad..32b93215c7 100644 --- a/LeanPool/Odlyzko/DedekindZeta/PrimePowerExpansion.lean +++ b/LeanPool/Odlyzko/DedekindZeta/PrimePowerExpansion.lean @@ -5,14 +5,14 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.DedekindZeta.LocalFactor -public import LeanPool.Odlyzko.DedekindZeta.PrimeIdealEulerProduct public import LeanPool.Odlyzko.DedekindZeta.PrimeIdealFactor -public import LeanPool.Odlyzko.DedekindZeta.PrimeIdealSummability -public import Mathlib.Analysis.Calculus.LogDeriv -public import Mathlib.Analysis.Calculus.LogDerivUniformlyOn -public import Mathlib.Analysis.Normed.Module.MultipliableUniformlyOn -public import Mathlib.Topology.Algebra.InfiniteSum.Real +public import Mathlib.NumberTheory.NumberField.DedekindZeta +public import Mathlib.Topology.Algebra.InfiniteSum.UniformOn +import LeanPool.Odlyzko.DedekindZeta.PrimeIdealEulerProduct +import LeanPool.Odlyzko.DedekindZeta.PrimeIdealSummability +import Mathlib.Analysis.Calculus.LogDerivUniformlyOn +import Mathlib.Analysis.Normed.Module.MultipliableUniformlyOn +import Mathlib.Tactic.ArithMult.Init /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/ECanonicalDecomposition.lean b/LeanPool/Odlyzko/ECanonicalDecomposition.lean index e7f089de0f..16c0d7d82f 100644 --- a/LeanPool/Odlyzko/ECanonicalDecomposition.lean +++ b/LeanPool/Odlyzko/ECanonicalDecomposition.lean @@ -9,6 +9,11 @@ public import Mathlib.Analysis.Complex.CanonicalDecomposition public import Mathlib.Analysis.Meromorphic.TrailingCoefficient public import Mathlib.Analysis.Normed.Module.Connected +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Tactic.Measurability.Init +import Mathlib.Tactic.Positivity.Finset + /-! # Extended canonical decomposition compatibility import diff --git a/LeanPool/Odlyzko/ExplicitFormula/CompletedZetaCenterLogBound.lean b/LeanPool/Odlyzko/ExplicitFormula/CompletedZetaCenterLogBound.lean index dae677cde2..f3c8471b11 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/CompletedZetaCenterLogBound.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/CompletedZetaCenterLogBound.lean @@ -7,17 +7,14 @@ module public import LeanPool.Odlyzko.CompletedZeta.VerticalGrowth public import LeanPool.Odlyzko.CompletedZeta.VerticalLowerBound -public import LeanPool.Odlyzko.ECanonicalDecomposition public import LeanPool.Odlyzko.ExplicitFormula.CompletedZetaRectangle -public import LeanPool.Odlyzko.ExplicitFormula.FiniteSetAvoidance -public import Mathlib.Analysis.Calculus.LogDeriv -public import Mathlib.Analysis.Complex.AbsMax -public import Mathlib.Analysis.Complex.BorelCaratheodory public import Mathlib.Analysis.Complex.CanonicalDecomposition -public import Mathlib.Analysis.Complex.HasPrimitives -public import Mathlib.Analysis.Complex.JensenFormula -public import Mathlib.Analysis.Complex.Liouville -public import Mathlib.Analysis.SpecialFunctions.Complex.Log +import LeanPool.Odlyzko.CompletedZeta.FunctionalEquationLogDeriv +import LeanPool.Odlyzko.ExplicitFormula.FiniteSetAvoidance +import Mathlib.Analysis.Complex.BorelCaratheodory +import Mathlib.Analysis.Complex.JensenFormula +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Tactic.ArithMult.Init /-! # Completed Zeta Center Log Bound diff --git a/LeanPool/Odlyzko/ExplicitFormula/CompletedZetaRectangle.lean b/LeanPool/Odlyzko/ExplicitFormula/CompletedZetaRectangle.lean index 94a72f5a4d..12141a39d7 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/CompletedZetaRectangle.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/CompletedZetaRectangle.lean @@ -5,10 +5,11 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.FunctionalEquationLogDeriv -public import LeanPool.Odlyzko.ExplicitFormula.WeightedDiskArgumentPrinciple -public import LeanPool.Odlyzko.ExplicitFormula.WeightedRectangleArgumentPrinciple -public import LeanPool.Odlyzko.FromPrimeNumberTheoremAnd.LogDerivativeResidue +public import LeanPool.Odlyzko.CompletedZeta.FunctionalEquation +public import LeanPool.Odlyzko.FromPrimeNumberTheoremAnd.RectangleIntegral +import LeanPool.Odlyzko.CompletedZeta.FunctionalEquationLogDeriv +import LeanPool.Odlyzko.ExplicitFormula.WeightedRectangleArgumentPrinciple +import Mathlib.Tactic.ArithMult.Init /-! # Completed Zeta Rectangle diff --git a/LeanPool/Odlyzko/ExplicitFormula/FiniteSetAvoidance.lean b/LeanPool/Odlyzko/ExplicitFormula/FiniteSetAvoidance.lean index 042d2952fd..3b91045771 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/FiniteSetAvoidance.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/FiniteSetAvoidance.lean @@ -5,8 +5,10 @@ Authors: The FLT Project -/ module -public import Mathlib.MeasureTheory.Measure.Real -public import Mathlib.MeasureTheory.Measure.Lebesgue.Basic +public import Mathlib.Data.Finset.Card +public import Mathlib.Basic.Real.Basic +import Mathlib.MeasureTheory.Measure.Lebesgue.Basic +import Mathlib.MeasureTheory.Measure.Real /-! # Finite Set Avoidance diff --git a/LeanPool/Odlyzko/ExplicitFormula/GaussDigammaEqDigamma.lean b/LeanPool/Odlyzko/ExplicitFormula/GaussDigammaEqDigamma.lean index 26c1aa495e..5ece9d5580 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/GaussDigammaEqDigamma.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/GaussDigammaEqDigamma.lean @@ -5,12 +5,9 @@ Authors: The FLT Project -/ module -public import Mathlib.Analysis.Complex.LocallyUniformLimit -public import Mathlib.Analysis.Normed.Field.Lemmas -public import Mathlib.Analysis.PSeries -public import Mathlib.Analysis.SpecialFunctions.Gamma.Beta public import Mathlib.Analysis.SpecialFunctions.Gamma.Digamma -public import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals +import Mathlib.Analysis.Complex.LocallyUniformLimit +import Mathlib.Analysis.PSeries /-! # Gauss Digamma Eq Digamma diff --git a/LeanPool/Odlyzko/ExplicitFormula/PoitouEstimate.lean b/LeanPool/Odlyzko/ExplicitFormula/PoitouEstimate.lean index 00bbe62d30..7af45453ba 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/PoitouEstimate.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/PoitouEstimate.lean @@ -6,13 +6,14 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.ExplicitFormula.CompletedZetaCenterLogBound -public import LeanPool.Odlyzko.ExplicitFormula.CompletedZetaRectangle public import LeanPool.Odlyzko.ExplicitFormula.FiniteSetAvoidance public import LeanPool.Odlyzko.ExplicitFormula.RegularizedPoitouContourLimit -public import LeanPool.Odlyzko.ExplicitFormula.RegularizedPoitouQuadraticDecay -public import LeanPool.Odlyzko.ExplicitFormula.ZeroFreeRectangles -public import LeanPool.Odlyzko.FromPrimeNumberTheoremAnd.RectangleIntegral -public import Mathlib.Analysis.Fourier.RiemannLebesgueLemma +import LeanPool.Odlyzko.CompletedZeta.FunctionalEquationLogDeriv +import LeanPool.Odlyzko.ExplicitFormula.RegularizedTartarTransform +import LeanPool.Odlyzko.ExplicitFormula.ZeroFreeRectangles +import Mathlib.Analysis.Fourier.RiemannLebesgueLemma +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Tactic.ArithMult.Init /-! # Poitou Estimate diff --git a/LeanPool/Odlyzko/ExplicitFormula/PoitouTransform.lean b/LeanPool/Odlyzko/ExplicitFormula/PoitouTransform.lean index c1e0452d17..199adf85df 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/PoitouTransform.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/PoitouTransform.lean @@ -6,6 +6,9 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.TestFunction.ComplexFourier +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Poitou Transform diff --git a/LeanPool/Odlyzko/ExplicitFormula/RegularizedPoitouContourLimit.lean b/LeanPool/Odlyzko/ExplicitFormula/RegularizedPoitouContourLimit.lean index 64d5381ac1..85d13076ad 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/RegularizedPoitouContourLimit.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/RegularizedPoitouContourLimit.lean @@ -5,27 +5,26 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.CompletedZeta.FunctionalEquationLogDeriv -public import LeanPool.Odlyzko.CompletedZeta.RightHalfPlane public import LeanPool.Odlyzko.ExplicitFormula.GaussDigammaEqDigamma -public import LeanPool.Odlyzko.ExplicitFormula.RegularizedPoitouQuadraticDecay public import LeanPool.Odlyzko.ExplicitFormula.RegularizedPrimePowerSeriesIntegral -public import LeanPool.Odlyzko.ExplicitFormula.RegularizedTartarTransform -public import LeanPool.Odlyzko.ExplicitFormula.TartarPoitouTransform -public import LeanPool.Odlyzko.ExplicitFormula.WeightedRectangleArgumentPrinciple -public import LeanPool.Odlyzko.ExplicitFormula.ZeroFreeRectangles -public import LeanPool.Odlyzko.FromPrimeNumberTheoremAnd.RectangleIntegral public import LeanPool.Odlyzko.Numerics.Degree public import LeanPool.Odlyzko.Numerics.Integrability -public import LeanPool.Odlyzko.Numerics.IntegralTail -public import LeanPool.Odlyzko.Reduction -public import Mathlib.Analysis.Complex.PhragmenLindelof -public import Mathlib.Analysis.Real.Pi.Bounds -public import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform -public import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals -public import Mathlib.MeasureTheory.Integral.IntegralEqImproper -public import Mathlib.MeasureTheory.Integral.Prod -public import Mathlib.NumberTheory.Harmonic.EulerMascheroni +public import LeanPool.Odlyzko.ExplicitFormula.CompletedZetaRectangle +import LeanPool.Odlyzko.CompletedZeta.FunctionalEquationLogDeriv +import LeanPool.Odlyzko.CompletedZeta.TotallyComplex +import LeanPool.Odlyzko.DedekindZeta.PrimeIdealEulerProduct +import LeanPool.Odlyzko.ExplicitFormula.RegularizedTartarTransform +import LeanPool.Odlyzko.ExplicitFormula.WeightedRectangleArgumentPrinciple +import LeanPool.Odlyzko.ExplicitFormula.ZeroFreeRectangles +import LeanPool.Odlyzko.Numerics.IntegralTail +import LeanPool.Odlyzko.Numerics.Tail +import LeanPool.Odlyzko.Reduction +import LeanPool.Odlyzko.TestFunction.Fourier +import LeanPool.Odlyzko.TestFunction.Quadratic +import Mathlib.Analysis.Complex.PhragmenLindelof +import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Tactic.ArithMult.Init /-! # Regularized Poitou Contour Limit diff --git a/LeanPool/Odlyzko/ExplicitFormula/RegularizedPoitouQuadraticDecay.lean b/LeanPool/Odlyzko/ExplicitFormula/RegularizedPoitouQuadraticDecay.lean index c914d4816c..e5c1fe8ad5 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/RegularizedPoitouQuadraticDecay.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/RegularizedPoitouQuadraticDecay.lean @@ -5,14 +5,13 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.ExplicitFormula.PoitouTransform -public import LeanPool.Odlyzko.ExplicitFormula.RegularizedTartarTransform public import LeanPool.Odlyzko.TestFunction.TartarDerivativeBounds -public import Mathlib.Analysis.Calculus.FDeriv.Measurable -public import Mathlib.Analysis.Complex.RealDeriv -public import Mathlib.Analysis.Fourier.FourierTransformDeriv -public import Mathlib.Analysis.Fourier.RiemannLebesgueLemma -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import LeanPool.Odlyzko.ExplicitFormula.RegularizedTartarTransform +import LeanPool.Odlyzko.TestFunction.Fourier +import Mathlib.Analysis.Calculus.ParametricIntegral +import Mathlib.Analysis.Fourier.FourierTransformDeriv +import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp /-! # Regularized Poitou Quadratic Decay diff --git a/LeanPool/Odlyzko/ExplicitFormula/RegularizedPrimePowerSeriesIntegral.lean b/LeanPool/Odlyzko/ExplicitFormula/RegularizedPrimePowerSeriesIntegral.lean index 7b00d71c8f..061ebf6abe 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/RegularizedPrimePowerSeriesIntegral.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/RegularizedPrimePowerSeriesIntegral.lean @@ -7,10 +7,11 @@ module public import LeanPool.Odlyzko.DedekindZeta.PrimePowerExpansion public import LeanPool.Odlyzko.ExplicitFormula.RegularizedPoitouQuadraticDecay -public import Mathlib.Analysis.Fourier.Inversion -public import Mathlib.Analysis.Real.Pi.Bounds -public import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals -public import Mathlib.MeasureTheory.Integral.DominatedConvergence +import LeanPool.Odlyzko.DedekindZeta.PrimeIdealEulerProduct +import Mathlib.Analysis.Fourier.Inversion +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +import Mathlib.Tactic.ArithMult.Init /-! # Regularized Prime Power Series Integral diff --git a/LeanPool/Odlyzko/ExplicitFormula/RegularizedTartar.lean b/LeanPool/Odlyzko/ExplicitFormula/RegularizedTartar.lean index f946350f50..be2496a267 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/RegularizedTartar.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/RegularizedTartar.lean @@ -6,6 +6,10 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.ExplicitFormula.TartarPoitouTransform +import LeanPool.Odlyzko.TestFunction.Fourier +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Regularized Tartar diff --git a/LeanPool/Odlyzko/ExplicitFormula/RegularizedTartarTransform.lean b/LeanPool/Odlyzko/ExplicitFormula/RegularizedTartarTransform.lean index b1723fdfa8..268956c446 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/RegularizedTartarTransform.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/RegularizedTartarTransform.lean @@ -6,8 +6,13 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.ExplicitFormula.RegularizedTartar -public import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +public import Mathlib.Analysis.Analytic.Basic +import LeanPool.Odlyzko.TestFunction.Fourier +import Mathlib.Analysis.Calculus.ParametricIntegral +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp /-! # Regularized Tartar Transform diff --git a/LeanPool/Odlyzko/ExplicitFormula/TartarPoitouTransform.lean b/LeanPool/Odlyzko/ExplicitFormula/TartarPoitouTransform.lean index 9ff976ab63..de1ca7da51 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/TartarPoitouTransform.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/TartarPoitouTransform.lean @@ -6,7 +6,11 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.ExplicitFormula.PoitouTransform -public import Mathlib.Analysis.Calculus.ParametricIntegral +public import Mathlib.Analysis.Calculus.Deriv.Basic +import LeanPool.Odlyzko.TestFunction.Bounds +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Tartar Poitou Transform diff --git a/LeanPool/Odlyzko/ExplicitFormula/WeightedDiskArgumentPrinciple.lean b/LeanPool/Odlyzko/ExplicitFormula/WeightedDiskArgumentPrinciple.lean index 26e48dcc50..c06511482b 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/WeightedDiskArgumentPrinciple.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/WeightedDiskArgumentPrinciple.lean @@ -5,8 +5,10 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.FromPrimeNumberTheoremAnd.LogDerivativeResidue -public import Mathlib.Analysis.Analytic.IsolatedZeros +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.Meromorphic.Order +import LeanPool.Odlyzko.FromPrimeNumberTheoremAnd.LogDerivativeResidue +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Weighted Disk Argument Principle diff --git a/LeanPool/Odlyzko/ExplicitFormula/WeightedRectangleArgumentPrinciple.lean b/LeanPool/Odlyzko/ExplicitFormula/WeightedRectangleArgumentPrinciple.lean index 80766ef8fc..1688b9aeff 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/WeightedRectangleArgumentPrinciple.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/WeightedRectangleArgumentPrinciple.lean @@ -7,6 +7,9 @@ module public import LeanPool.Odlyzko.FromPrimeNumberTheoremAnd.RectangleIntegral public import LeanPool.Odlyzko.ExplicitFormula.WeightedDiskArgumentPrinciple +import Mathlib.Analysis.Complex.CauchyIntegral +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Weighted Rectangle Argument Principle diff --git a/LeanPool/Odlyzko/ExplicitFormula/ZeroFreeRectangles.lean b/LeanPool/Odlyzko/ExplicitFormula/ZeroFreeRectangles.lean index ecd7746ce0..8639274a2f 100644 --- a/LeanPool/Odlyzko/ExplicitFormula/ZeroFreeRectangles.lean +++ b/LeanPool/Odlyzko/ExplicitFormula/ZeroFreeRectangles.lean @@ -5,8 +5,9 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.ExplicitFormula.CompletedZetaRectangle -public import Mathlib.Order.Interval.Set.Infinite +public import LeanPool.Odlyzko.CompletedZeta.FunctionalEquation +import LeanPool.Odlyzko.CompletedZeta.FunctionalEquationLogDeriv +import Mathlib.Tactic.ArithMult.Init /-! # Zero Free Rectangles diff --git a/LeanPool/Odlyzko/FromPrimeNumberTheoremAnd/LogDerivativeResidue.lean b/LeanPool/Odlyzko/FromPrimeNumberTheoremAnd/LogDerivativeResidue.lean index 2acbb9c299..bee3b808a8 100644 --- a/LeanPool/Odlyzko/FromPrimeNumberTheoremAnd/LogDerivativeResidue.lean +++ b/LeanPool/Odlyzko/FromPrimeNumberTheoremAnd/LogDerivativeResidue.lean @@ -5,10 +5,9 @@ Authors: The FLT Project -/ module -public import Mathlib.Analysis.Calculus.LogDeriv -public import Mathlib.Analysis.Complex.CauchyIntegral -public import Mathlib.Analysis.Meromorphic.Divisor -public import Mathlib.Analysis.Meromorphic.NormalForm +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.Meromorphic.Order +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! Adapted from [PNT+](https://github.com/AlexKontorovich/PrimeNumberTheoremAnd) by Alex Kontorovich and Terence Tao: diff --git a/LeanPool/Odlyzko/FromPrimeNumberTheoremAnd/RectangleIntegral.lean b/LeanPool/Odlyzko/FromPrimeNumberTheoremAnd/RectangleIntegral.lean index 513750339f..064c61fc8f 100644 --- a/LeanPool/Odlyzko/FromPrimeNumberTheoremAnd/RectangleIntegral.lean +++ b/LeanPool/Odlyzko/FromPrimeNumberTheoremAnd/RectangleIntegral.lean @@ -5,8 +5,8 @@ Authors: The FLT Project -/ module -public import Mathlib.Analysis.Complex.CauchyIntegral -public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic /-! Adapted from [PNT+](https://github.com/AlexKontorovich/PrimeNumberTheoremAnd) by Alex Kontorovich and Terence Tao: diff --git a/LeanPool/Odlyzko/Numerics/Degree.lean b/LeanPool/Odlyzko/Numerics/Degree.lean index 79d0b2072d..80425dfec6 100644 --- a/LeanPool/Odlyzko/Numerics/Degree.lean +++ b/LeanPool/Odlyzko/Numerics/Degree.lean @@ -5,7 +5,10 @@ Authors: The FLT Project -/ module -public import Mathlib.Analysis.Real.Pi.Bounds +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.Tactic.Positivity.Finset /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/Numerics/Integrability.lean b/LeanPool/Odlyzko/Numerics/Integrability.lean index 3709346c70..4b34944e89 100644 --- a/LeanPool/Odlyzko/Numerics/Integrability.lean +++ b/LeanPool/Odlyzko/Numerics/Integrability.lean @@ -5,11 +5,17 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.Numerics.Tail -public import LeanPool.Odlyzko.TestFunction.Amplitude -public import LeanPool.Odlyzko.TestFunction.Quadratic -public import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals -public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +public import LeanPool.Odlyzko.TestFunction.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import LeanPool.Odlyzko.Numerics.Tail +import LeanPool.Odlyzko.TestFunction.Amplitude +import LeanPool.Odlyzko.TestFunction.Fourier +import LeanPool.Odlyzko.TestFunction.Quadratic +import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/Numerics/IntegralTail.lean b/LeanPool/Odlyzko/Numerics/IntegralTail.lean index 03f852cb05..b47e29b8d3 100644 --- a/LeanPool/Odlyzko/Numerics/IntegralTail.lean +++ b/LeanPool/Odlyzko/Numerics/IntegralTail.lean @@ -7,12 +7,15 @@ module public import LeanPool.Odlyzko.Numerics.Degree public import LeanPool.Odlyzko.Numerics.Integrability -public import LeanPool.Odlyzko.Numerics.Tail -public import LeanPool.Odlyzko.TestFunction.Bounds public import LeanPool.Odlyzko.TestFunction.TaylorBound -public import Mathlib.Analysis.Calculus.Deriv.Polynomial -public import Mathlib.Analysis.Complex.ExponentialBounds -public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +import LeanPool.Odlyzko.Numerics.Tail +import LeanPool.Odlyzko.TestFunction.Amplitude +import LeanPool.Odlyzko.TestFunction.Bounds +import LeanPool.Odlyzko.TestFunction.Fourier +import Mathlib.Analysis.Calculus.Deriv.Polynomial +import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/Numerics/Tail.lean b/LeanPool/Odlyzko/Numerics/Tail.lean index 67dab10f6b..03ea2a7d06 100644 --- a/LeanPool/Odlyzko/Numerics/Tail.lean +++ b/LeanPool/Odlyzko/Numerics/Tail.lean @@ -5,8 +5,9 @@ Authors: The FLT Project -/ module -public import Mathlib.Analysis.Complex.ExponentialBounds -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp +public import Mathlib.Analysis.Complex.Trigonometric +import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Analysis.SpecialFunctions.Trigonometric.DerivHyp /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/TestFunction/Amplitude.lean b/LeanPool/Odlyzko/TestFunction/Amplitude.lean index 169b03d64d..8bb81a9de0 100644 --- a/LeanPool/Odlyzko/TestFunction/Amplitude.lean +++ b/LeanPool/Odlyzko/TestFunction/Amplitude.lean @@ -7,6 +7,7 @@ module public import LeanPool.Odlyzko.TestFunction.Basic public import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/TestFunction/Basic.lean b/LeanPool/Odlyzko/TestFunction/Basic.lean index 7ac2c46892..b37e5d119b 100644 --- a/LeanPool/Odlyzko/TestFunction/Basic.lean +++ b/LeanPool/Odlyzko/TestFunction/Basic.lean @@ -5,8 +5,8 @@ Authors: The FLT Project -/ module -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic -public import Mathlib.Topology.Order.Lattice +public import Mathlib.Analysis.Complex.Trigonometric +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/TestFunction/Bounds.lean b/LeanPool/Odlyzko/TestFunction/Bounds.lean index d6ecd0dc86..72912f55e0 100644 --- a/LeanPool/Odlyzko/TestFunction/Bounds.lean +++ b/LeanPool/Odlyzko/TestFunction/Bounds.lean @@ -5,9 +5,12 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.TestFunction.Fourier -public import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds +public import LeanPool.Odlyzko.TestFunction.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import LeanPool.Odlyzko.TestFunction.Amplitude +import LeanPool.Odlyzko.TestFunction.Fourier +import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals /-! # Bounds diff --git a/LeanPool/Odlyzko/TestFunction/ComplexFourier.lean b/LeanPool/Odlyzko/TestFunction/ComplexFourier.lean index efd4bade8e..3670e68969 100644 --- a/LeanPool/Odlyzko/TestFunction/ComplexFourier.lean +++ b/LeanPool/Odlyzko/TestFunction/ComplexFourier.lean @@ -5,13 +5,14 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.TestFunction.Amplitude -public import LeanPool.Odlyzko.TestFunction.Bounds -public import Mathlib.Analysis.Calculus.LHopital -public import Mathlib.Analysis.Fourier.Convolution public import Mathlib.Analysis.Fourier.FourierTransform -public import Mathlib.Analysis.Fourier.Inversion -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Sinc +public import LeanPool.Odlyzko.TestFunction.Basic +public import Mathlib.Analysis.Convolution +import LeanPool.Odlyzko.TestFunction.Amplitude +import LeanPool.Odlyzko.TestFunction.Bounds +import LeanPool.Odlyzko.TestFunction.Fourier +import Mathlib.Analysis.Calculus.LHopital +import Mathlib.Analysis.Fourier.Convolution /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/TestFunction/Fourier.lean b/LeanPool/Odlyzko/TestFunction/Fourier.lean index 9f211c492e..29c1126fd1 100644 --- a/LeanPool/Odlyzko/TestFunction/Fourier.lean +++ b/LeanPool/Odlyzko/TestFunction/Fourier.lean @@ -5,9 +5,10 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.TestFunction.Amplitude public import LeanPool.Odlyzko.TestFunction.Basic -public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import LeanPool.Odlyzko.TestFunction.Amplitude +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/TestFunction/Quadratic.lean b/LeanPool/Odlyzko/TestFunction/Quadratic.lean index cdf58c24af..a27ed92390 100644 --- a/LeanPool/Odlyzko/TestFunction/Quadratic.lean +++ b/LeanPool/Odlyzko/TestFunction/Quadratic.lean @@ -5,9 +5,11 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.TestFunction.Fourier -public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds +public import LeanPool.Odlyzko.TestFunction.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import LeanPool.Odlyzko.TestFunction.Fourier +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/TestFunction/TartarDerivativeBounds.lean b/LeanPool/Odlyzko/TestFunction/TartarDerivativeBounds.lean index 2e602a48cb..f201ee5b29 100644 --- a/LeanPool/Odlyzko/TestFunction/TartarDerivativeBounds.lean +++ b/LeanPool/Odlyzko/TestFunction/TartarDerivativeBounds.lean @@ -6,9 +6,11 @@ Authors: The FLT Project module public import LeanPool.Odlyzko.ExplicitFormula.RegularizedTartar -public import LeanPool.Odlyzko.TestFunction.Fourier -public import Mathlib.Analysis.Calculus.ParametricIntegral -public import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral +import LeanPool.Odlyzko.TestFunction.Fourier +import Mathlib.Analysis.Calculus.ParametricIntegral +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Tartar Derivative Bounds diff --git a/LeanPool/Odlyzko/TestFunction/TaylorBound.lean b/LeanPool/Odlyzko/TestFunction/TaylorBound.lean index 749e9b57b5..69c688b8aa 100644 --- a/LeanPool/Odlyzko/TestFunction/TaylorBound.lean +++ b/LeanPool/Odlyzko/TestFunction/TaylorBound.lean @@ -5,9 +5,11 @@ Authors: The FLT Project -/ module -public import LeanPool.Odlyzko.TestFunction.Quadratic public import Mathlib.Analysis.Calculus.Taylor -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv +public import LeanPool.Odlyzko.TestFunction.Basic +import LeanPool.Odlyzko.TestFunction.Fourier +import LeanPool.Odlyzko.TestFunction.Quadratic +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/Theta/PoissonSummation.lean b/LeanPool/Odlyzko/Theta/PoissonSummation.lean index 5e9617064a..f3052083f3 100644 --- a/LeanPool/Odlyzko/Theta/PoissonSummation.lean +++ b/LeanPool/Odlyzko/Theta/PoissonSummation.lean @@ -6,12 +6,10 @@ Authors: The FLT Project module public import Mathlib.Algebra.Module.ZLattice.Covolume -public import Mathlib.Algebra.Module.ZLattice.Summable public import Mathlib.Analysis.Fourier.AddCircleMulti -public import Mathlib.Analysis.InnerProductSpace.Dual -public import Mathlib.Analysis.SpecialFunctions.Gaussian.PoissonSummation public import Mathlib.LinearAlgebra.BilinearForm.DualLattice -public import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace +import Mathlib.Algebra.Module.ZLattice.Summable +import Mathlib.Analysis.SpecialFunctions.Gaussian.PoissonSummation /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/Theta/TraceDualIdeal.lean b/LeanPool/Odlyzko/Theta/TraceDualIdeal.lean index 1895f59f62..f64607a425 100644 --- a/LeanPool/Odlyzko/Theta/TraceDualIdeal.lean +++ b/LeanPool/Odlyzko/Theta/TraceDualIdeal.lean @@ -5,7 +5,10 @@ Authors: The FLT Project -/ module -public import Mathlib.NumberTheory.NumberField.Discriminant.Different +public import Mathlib.NumberTheory.NumberField.Discriminant.Defs +public import Mathlib.RingTheory.DedekindDomain.Different +public import Mathlib.RingTheory.FractionalIdeal.Norm +import Mathlib.NumberTheory.NumberField.Discriminant.Different /-! TODO: Add doc-string. -/ diff --git a/LeanPool/Odlyzko/Theta/TraceDualLattice.lean b/LeanPool/Odlyzko/Theta/TraceDualLattice.lean index 5d689a983e..030b6c4e6b 100644 --- a/LeanPool/Odlyzko/Theta/TraceDualLattice.lean +++ b/LeanPool/Odlyzko/Theta/TraceDualLattice.lean @@ -8,8 +8,7 @@ module public import LeanPool.Odlyzko.Theta.PoissonSummation public import LeanPool.Odlyzko.Theta.TraceDualIdeal public import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic -public import Mathlib.NumberTheory.NumberField.Discriminant.Basic -public import Mathlib.RingTheory.Trace.Basic +import Mathlib.NumberTheory.NumberField.Discriminant.Basic /-! TODO: Add doc-string. -/ diff --git a/LeanPool/OrderPQ.lean b/LeanPool/OrderPQ.lean index f4b287b615..d689211886 100644 --- a/LeanPool/OrderPQ.lean +++ b/LeanPool/OrderPQ.lean @@ -3,15 +3,22 @@ Copyright (c) 2026 Scott Harper, Peiran Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Harper, Peiran Wu -/ +module -import LeanPool.OrderPQ.Basic -import LeanPool.OrderPQ.IsCyclic -import LeanPool.OrderPQ.Main -import LeanPool.OrderPQ.MonoidHom -import LeanPool.OrderPQ.MulZMod -import LeanPool.OrderPQ.PrimeOrder -import LeanPool.OrderPQ.SemidirectProduct -import LeanPool.OrderPQ.TorsionBy +public import LeanPool.OrderPQ.Basic +public import LeanPool.OrderPQ.IsCyclic +public import LeanPool.OrderPQ.Main +public import LeanPool.OrderPQ.MonoidHom +public import LeanPool.OrderPQ.MulZMod +public import LeanPool.OrderPQ.PrimeOrder +public import LeanPool.OrderPQ.SemidirectProduct +public import LeanPool.OrderPQ.TorsionBy +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Classification of groups of order p * q @@ -24,6 +31,8 @@ Tags: group-theory, finite-groups, semidirect-products MSC: 20D20, 20E22, 20D60 -/ +@[expose] public section + /-! ## Provenance and scope diff --git a/LeanPool/OrderPQ/Basic.lean b/LeanPool/OrderPQ/Basic.lean index ff9ffd3145..9edcda8ee5 100644 --- a/LeanPool/OrderPQ/Basic.lean +++ b/LeanPool/OrderPQ/Basic.lean @@ -3,15 +3,28 @@ Copyright (c) 2026 Scott Harper, Peiran Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Harper, Peiran Wu -/ +module -import Mathlib.GroupTheory.Sylow -import LeanPool.OrderPQ.MulZMod +public import Mathlib.GroupTheory.Sylow +public import LeanPool.OrderPQ.MulZMod +public import Mathlib.GroupTheory.SemidirectProduct +import LeanPool.OrderPQ.IsCyclic +import LeanPool.OrderPQ.MonoidHom +import LeanPool.OrderPQ.PrimeOrder import LeanPool.OrderPQ.SemidirectProduct +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # LeanPool.OrderPQ.Basic -/ +@[expose] public section + attribute [local implicit_reducible] MulZMod instMulMulZMod instMulOneClassMulZMod instGroupMulZMod diff --git a/LeanPool/OrderPQ/IsCyclic.lean b/LeanPool/OrderPQ/IsCyclic.lean index 45392ff5f8..3eec13eec5 100644 --- a/LeanPool/OrderPQ/IsCyclic.lean +++ b/LeanPool/OrderPQ/IsCyclic.lean @@ -3,14 +3,21 @@ Copyright (c) 2026 Scott Harper, Peiran Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Harper, Peiran Wu -/ -import Mathlib.GroupTheory.SpecificGroups.Cyclic +module + +public import Mathlib.GroupTheory.SpecificGroups.Cyclic +public import LeanPool.OrderPQ.TorsionBy import LeanPool.OrderPQ.MonoidHom -import LeanPool.OrderPQ.TorsionBy +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.OrderPQ.IsCyclic -/ +@[expose] public section + section MulEquiv namespace IsCyclic diff --git a/LeanPool/OrderPQ/Main.lean b/LeanPool/OrderPQ/Main.lean index 5dec3e3679..4a5df5fd43 100644 --- a/LeanPool/OrderPQ/Main.lean +++ b/LeanPool/OrderPQ/Main.lean @@ -3,13 +3,24 @@ Copyright (c) 2026 Scott Harper, Peiran Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Harper, Peiran Wu -/ +module +public import LeanPool.OrderPQ.MulZMod +public import Mathlib.GroupTheory.SemidirectProduct import LeanPool.OrderPQ.Basic +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # LeanPool.OrderPQ.Main -/ +@[expose] public section + attribute [local implicit_reducible] MulZMod instMulMulZMod instMulOneClassMulZMod instGroupMulZMod diff --git a/LeanPool/OrderPQ/MonoidHom.lean b/LeanPool/OrderPQ/MonoidHom.lean index bfb96c5400..605eb3fc06 100644 --- a/LeanPool/OrderPQ/MonoidHom.lean +++ b/LeanPool/OrderPQ/MonoidHom.lean @@ -3,24 +3,23 @@ Copyright (c) 2026 Scott Harper, Peiran Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Harper, Peiran Wu -/ -import Mathlib.Algebra.Group.Hom.Defs -import Mathlib.Algebra.Group.Subgroup.Basic -import Mathlib.GroupTheory.OrderOfElement +module + +public import Mathlib.GroupTheory.OrderOfElement +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order import Mathlib.Data.ZMod.QuotientGroup -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.OrderPQ.MonoidHom -/ +@[expose] public section + lemma Set.nat_card_range_of_injective {α β : Type*} (f : α → β) (hf : Function.Injective f) : Nat.card (range f) = Nat.card α := Eq.symm <| Nat.card_congr <| Equiv.ofInjective f hf diff --git a/LeanPool/OrderPQ/MulZMod.lean b/LeanPool/OrderPQ/MulZMod.lean index 91c580575a..d23a2e9555 100644 --- a/LeanPool/OrderPQ/MulZMod.lean +++ b/LeanPool/OrderPQ/MulZMod.lean @@ -3,14 +3,28 @@ Copyright (c) 2026 Scott Harper, Peiran Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Harper, Peiran Wu -/ -import LeanPool.OrderPQ.PrimeOrder -import Mathlib.Data.ZMod.Aut -import Mathlib.RingTheory.ZMod.UnitsCyclic +module + +public import Mathlib.Data.ZMod.Aut +public import Mathlib.Algebra.Field.ZMod +public import Mathlib.Algebra.Group.TypeTags.Finite +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Data.ZMod.Units +import Mathlib.RingTheory.IntegralDomain +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # LeanPool.OrderPQ.MulZMod -/ +@[expose] public section + section MulZMod /-- `ZMod n` viewed as a multiplicative group. -/ diff --git a/LeanPool/OrderPQ/PrimeOrder.lean b/LeanPool/OrderPQ/PrimeOrder.lean index 8c133a03ed..3eb4ff0000 100644 --- a/LeanPool/OrderPQ/PrimeOrder.lean +++ b/LeanPool/OrderPQ/PrimeOrder.lean @@ -3,12 +3,23 @@ Copyright (c) 2026 Scott Harper, Peiran Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Harper, Peiran Wu -/ +module + +public import Mathlib.Algebra.Group.Subgroup.ZPowers.Basic +public import Mathlib.Data.Nat.Prime.Defs +public import Mathlib.GroupTheory.Subgroup.Simple +public import Mathlib.SetTheory.Cardinal.Finite import LeanPool.OrderPQ.IsCyclic +import LeanPool.OrderPQ.MonoidHom +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.OrderPQ.PrimeOrder -/ +@[expose] public section + lemma ne_iff_eq_of_or_and_ne {α : Type*} {a b c : α} (h1 : a = b ∨ a = c) (h2 : b ≠ c) : a ≠ b ↔ a = c := ⟨h1.resolve_left, fun h3 => ne_of_eq_of_ne h3 h2.symm⟩ diff --git a/LeanPool/OrderPQ/SemidirectProduct.lean b/LeanPool/OrderPQ/SemidirectProduct.lean index 39705899e8..37f199e941 100644 --- a/LeanPool/OrderPQ/SemidirectProduct.lean +++ b/LeanPool/OrderPQ/SemidirectProduct.lean @@ -3,16 +3,17 @@ Copyright (c) 2026 Scott Harper, Peiran Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Harper, Peiran Wu -/ -import Mathlib.SetTheory.Cardinal.Finite -import Mathlib.GroupTheory.SemidirectProduct -import Mathlib.GroupTheory.GroupAction.ConjAct -import Mathlib.Algebra.Group.Subgroup.Pointwise -import Mathlib.Tactic.Group +module + +public import Mathlib.GroupTheory.SemidirectProduct +public import Mathlib.Tactic.Group /-! # LeanPool.OrderPQ.SemidirectProduct -/ +@[expose] public section + variable {N₁ N₂ H₁ H₂ : Type*} [Group N₁] [Group N₂] [Group H₁] [Group H₂] variable {G : Type*} [Group G] diff --git a/LeanPool/OrderPQ/TorsionBy.lean b/LeanPool/OrderPQ/TorsionBy.lean index 6c2e3d5063..538ac57a46 100644 --- a/LeanPool/OrderPQ/TorsionBy.lean +++ b/LeanPool/OrderPQ/TorsionBy.lean @@ -3,21 +3,22 @@ Copyright (c) 2026 Scott Harper, Peiran Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Harper, Peiran Wu -/ -import Mathlib.Algebra.Group.Subgroup.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +module + +public import Mathlib.Algebra.Group.Subgroup.Defs +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.OrderPQ.TorsionBy -/ +@[expose] public section + variable {α : Type*} [CommGroup α] variable (α) in diff --git a/LeanPool/PCFTheory.lean b/LeanPool/PCFTheory.lean index 82ef27454c..d24c4353c3 100644 --- a/LeanPool/PCFTheory.lean +++ b/LeanPool/PCFTheory.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 YnirPaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: YnirPaz -/ +module -import LeanPool.PCFTheory.Background -import LeanPool.PCFTheory.ClubGuessing +public import LeanPool.PCFTheory.Background +public import LeanPool.PCFTheory.ClubGuessing /-! # PCF Theory @@ -18,6 +19,8 @@ Tags: set-theory, cardinal-arithmetic, club-guessing MSC: 03E04, 03E10, 03E55 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/PCFTheory/Background.lean b/LeanPool/PCFTheory/Background.lean index 3f75efd860..0ac8ac86b2 100644 --- a/LeanPool/PCFTheory/Background.lean +++ b/LeanPool/PCFTheory/Background.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 YnirPaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: YnirPaz -/ +module -import LeanPool.PCFTheory.Background.Club -import LeanPool.PCFTheory.Background.Cofinality -import LeanPool.PCFTheory.Background.Ordinal -import LeanPool.PCFTheory.Background.Topology +public import LeanPool.PCFTheory.Background.Club +public import LeanPool.PCFTheory.Background.Cofinality +public import LeanPool.PCFTheory.Background.Ordinal +public import LeanPool.PCFTheory.Background.Topology /-! # Background Import-only index for the `Background` directory of the PCF-theory import. -/ + +@[expose] public section diff --git a/LeanPool/PCFTheory/Background/Club.lean b/LeanPool/PCFTheory/Background/Club.lean index d8f9092897..4d5cae7f78 100644 --- a/LeanPool/PCFTheory/Background/Club.lean +++ b/LeanPool/PCFTheory/Background/Club.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 YnirPaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: YnirPaz -/ +module +public import LeanPool.PCFTheory.Background.Topology +public import Mathlib.SetTheory.Cardinal.Cofinality.Ordinal import LeanPool.PCFTheory.Background.Cofinality -import LeanPool.PCFTheory.Background.Topology +import LeanPool.PCFTheory.Background.Ordinal /-! # Club and stationary sets @@ -24,6 +27,8 @@ This file sets up the basic theory of clubs (closed and unbounded sets) and stat * `isClub_sInter`: The intersection of fewer than `o.cof` clubs in `o` is a club in `o`. -/ +@[expose] public section + noncomputable section open Cardinal Set Order Filter diff --git a/LeanPool/PCFTheory/Background/Cofinality.lean b/LeanPool/PCFTheory/Background/Cofinality.lean index 8137e98b83..80ad876d5b 100644 --- a/LeanPool/PCFTheory/Background/Cofinality.lean +++ b/LeanPool/PCFTheory/Background/Cofinality.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 YnirPaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: YnirPaz -/ +module -import Mathlib.SetTheory.Cardinal.Cofinality.Ordinal -import LeanPool.PCFTheory.Background.Ordinal +public import Mathlib.SetTheory.Cardinal.Cofinality.Ordinal /-! # Cofinality results for indexed suprema @@ -14,6 +14,8 @@ A more general universe version of `iSup_lt_ord_lift` and a related corollary phrased in terms of `Iio`. -/ +@[expose] public section + universe u v open Cardinal Set diff --git a/LeanPool/PCFTheory/Background/Ordinal.lean b/LeanPool/PCFTheory/Background/Ordinal.lean index bd9c55b4ab..2128a5cc4a 100644 --- a/LeanPool/PCFTheory/Background/Ordinal.lean +++ b/LeanPool/PCFTheory/Background/Ordinal.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 YnirPaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: YnirPaz -/ +module -import Mathlib.SetTheory.Ordinal.Arithmetic -import Mathlib.SetTheory.Cardinal.Cofinality.Ordinal -import Mathlib.Order.SuccPred.Limit +public import Mathlib.SetTheory.Ordinal.Arithmetic +import Mathlib.SetTheory.Ordinal.Family /-! # Background lemmas on ordinals @@ -15,6 +15,8 @@ Auxiliary results about ordinals and recursion on bounded ordinals used in the PCF-theory formalization. -/ +@[expose] public section + noncomputable section universe u v w diff --git a/LeanPool/PCFTheory/Background/Topology.lean b/LeanPool/PCFTheory/Background/Topology.lean index 7855cb8b32..942b6d4e1c 100644 --- a/LeanPool/PCFTheory/Background/Topology.lean +++ b/LeanPool/PCFTheory/Background/Topology.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 YnirPaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: YnirPaz -/ +module -import Mathlib.SetTheory.Ordinal.Topology -import Mathlib.Topology.DerivedSet -import LeanPool.PCFTheory.Background.Ordinal +public import Mathlib.SetTheory.Ordinal.Topology +public import Mathlib.Topology.DerivedSet /-! # Topological results on ordinals @@ -14,6 +14,8 @@ import LeanPool.PCFTheory.Background.Ordinal A handful of order-topological facts used to set up the theory of clubs. -/ +@[expose] public section + open Set Order Cardinal Filter Set.Notation universe u v diff --git a/LeanPool/PCFTheory/ClubGuessing.lean b/LeanPool/PCFTheory/ClubGuessing.lean index e4f90f9a30..42b73f68d6 100644 --- a/LeanPool/PCFTheory/ClubGuessing.lean +++ b/LeanPool/PCFTheory/ClubGuessing.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 YnirPaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: YnirPaz -/ +module -import LeanPool.PCFTheory.Background.Club +public import LeanPool.PCFTheory.Background.Club +public import LeanPool.PCFTheory.Background.Ordinal /-! # Club guessing @@ -36,6 +38,8 @@ There are many existence results on club guessing sequences. The one we need is below `Ϟ`. -/ +@[expose] public section + noncomputable section open Cardinal Order Set diff --git a/LeanPool/PFR.lean b/LeanPool/PFR.lean index b66a308c05..9c68e0a5dc 100644 --- a/LeanPool/PFR.lean +++ b/LeanPool/PFR.lean @@ -7,6 +7,7 @@ Authors: PFR contributors module public import LeanPool.PFR.Solution +import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Measure /-! # The polynomial Freiman–Ruzsa conjecture diff --git a/LeanPool/PFR/AddCombi/BSG.lean b/LeanPool/PFR/AddCombi/BSG.lean index 338c7ba557..f4c41e7246 100644 --- a/LeanPool/PFR/AddCombi/BSG.lean +++ b/LeanPool/PFR/AddCombi/BSG.lean @@ -5,18 +5,20 @@ Authors: Yaël Dillies, Bhavik Mehta -/ module -public import LeanPool.PFR.AddCombi.Mathlib.Combinatorics.Additive.Energy -public import Mathlib.Basic.Real.Basic - -public import LeanPool.PFR.AddCombi.Convolution.Finite.Order -public import LeanPool.PFR.AddCombi.Mathlib.Algebra.Star.Pi -public import LeanPool.PFR.AddCombi.Mathlib.Algebra.Order.GroupWithZero.Indicator -public import Mathlib.Algebra.BigOperators.Field -public import Mathlib.Algebra.Group.Pointwise.Finset.Density -public import Mathlib.Algebra.Order.Star.Real -public import Mathlib.Data.Finset.CastCard -public import Mathlib.Data.NNRat.BigOperators -public import Mathlib.Tactic.Positivity + +public import LeanPool.PFR.AddCombi.Convolution.Finite.Defs +public import Mathlib.Analysis.Real.Sqrt +public import Mathlib.Basic.Real.Star +import LeanPool.PFR.AddCombi.Convolution.Finite.Order +import LeanPool.PFR.AddCombi.Mathlib.Algebra.Order.GroupWithZero.Indicator +import LeanPool.PFR.AddCombi.Mathlib.Algebra.Star.Pi +import LeanPool.PFR.AddCombi.Mathlib.Data.Finset.Density +import Mathlib.Algebra.BigOperators.Field +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Complex.Order +import Mathlib.Analysis.RCLike.Basic +import Mathlib.Data.Rat.Star +import Mathlib.Tactic.Positivity.Finset /-! # The Balog-Szemerédi-Gowers theorem diff --git a/LeanPool/PFR/AddCombi/Convolution/Finite/Defs.lean b/LeanPool/PFR/AddCombi/Convolution/Finite/Defs.lean index 727712d05d..ae396262f1 100644 --- a/LeanPool/PFR/AddCombi/Convolution/Finite/Defs.lean +++ b/LeanPool/PFR/AddCombi/Convolution/Finite/Defs.lean @@ -7,18 +7,20 @@ Authors: Yaël Dillies module public import LeanPool.PFR.AddCombi.Mathlib.Algebra.Notation.Indicator public import LeanPool.PFR.AddCombi.Mathlib.Combinatorics.Additive.Energy -public import Mathlib.Algebra.Group.Action.Pointwise.Finset public import Mathlib.Algebra.Group.Translate public import Mathlib.Algebra.Star.Conjneg -public import Mathlib.Analysis.RCLike.Basic -public import Mathlib.Basic.Complex.Basic -public import Mathlib.Basic.NNReal.Star - -public import LeanPool.PFR.AddCombi.Mathlib.Algebra.GroupWithZero.Indicator -public import LeanPool.PFR.AddCombi.Mathlib.Algebra.Star.Pi -public import Mathlib.Algebra.BigOperators.Field -public import Mathlib.Algebra.Group.Pointwise.Finset.Density -public import Mathlib.Analysis.Complex.Basic + +public import Mathlib.Algebra.BigOperators.Expect +public import Mathlib.Algebra.Star.SelfAdjoint +import LeanPool.PFR.AddCombi.Mathlib.Algebra.Star.Pi +import Mathlib.Algebra.Algebra.Basic +import Mathlib.Algebra.BigOperators.Field +import Mathlib.Algebra.Field.IsField +import Mathlib.Algebra.Group.Pointwise.Finset.Density +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Complex.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset /-! # Convolution in the compact normalisation diff --git a/LeanPool/PFR/AddCombi/Convolution/Finite/Order.lean b/LeanPool/PFR/AddCombi/Convolution/Finite/Order.lean index dd67c9761b..6475612666 100644 --- a/LeanPool/PFR/AddCombi/Convolution/Finite/Order.lean +++ b/LeanPool/PFR/AddCombi/Convolution/Finite/Order.lean @@ -7,10 +7,14 @@ Authors: Yaël Dillies module public import LeanPool.PFR.AddCombi.Convolution.Finite.Defs -public import Mathlib.Algebra.Order.Ring.Star -public import Mathlib.Algebra.Order.Star.Conjneg -public import Mathlib.Analysis.Complex.Order -public import Mathlib.Data.Rat.Star +public import Mathlib.Algebra.Order.Star.Basic +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Algebra.Order.Star.Conjneg +import Mathlib.Algebra.Star.Module +import Mathlib.Analysis.Complex.Order +import Mathlib.Data.Rat.Star +import Mathlib.Tactic.Positivity.Finset /-! # Ordered finite convolution estimates diff --git a/LeanPool/PFR/AddCombi/Mathlib/Algebra/GroupWithZero/Indicator.lean b/LeanPool/PFR/AddCombi/Mathlib/Algebra/GroupWithZero/Indicator.lean index a882eb7dd5..4be2951ee5 100644 --- a/LeanPool/PFR/AddCombi/Mathlib/Algebra/GroupWithZero/Indicator.lean +++ b/LeanPool/PFR/AddCombi/Mathlib/Algebra/GroupWithZero/Indicator.lean @@ -10,6 +10,8 @@ public import LeanPool.PFR.AddCombi.Mathlib.Algebra.Notation.Indicator public import Mathlib.Algebra.GroupWithZero.Indicator public import Mathlib.Algebra.GroupWithZero.Hom +import Mathlib.Tactic.Finiteness.Attr + /-! # Indicator functions valued in groups with zero -/ diff --git a/LeanPool/PFR/AddCombi/Mathlib/Algebra/Order/GroupWithZero/Indicator.lean b/LeanPool/PFR/AddCombi/Mathlib/Algebra/Order/GroupWithZero/Indicator.lean index fa61a3835b..69beffa9b0 100644 --- a/LeanPool/PFR/AddCombi/Mathlib/Algebra/Order/GroupWithZero/Indicator.lean +++ b/LeanPool/PFR/AddCombi/Mathlib/Algebra/Order/GroupWithZero/Indicator.lean @@ -6,15 +6,14 @@ Authors: AddCombi contributors module -public import LeanPool.PFR.AddCombi.Mathlib.Algebra.Notation.Indicator -public import Mathlib.Algebra.Order.Group.Indicator public import Mathlib.Algebra.Order.ZeroLEOne +public import Mathlib.Algebra.Notation.Indicator +import Mathlib.Algebra.Order.Group.Indicator /-! # Ordered indicator functions -/ -open scoped Indicator namespace Set variable {α M : Type*} [Zero M] [One M] diff --git a/LeanPool/PFR/AddCombi/Mathlib/Algebra/Order/Ring/NNRat.lean b/LeanPool/PFR/AddCombi/Mathlib/Algebra/Order/Ring/NNRat.lean index 891a43cf16..71620d76f6 100644 --- a/LeanPool/PFR/AddCombi/Mathlib/Algebra/Order/Ring/NNRat.lean +++ b/LeanPool/PFR/AddCombi/Mathlib/Algebra/Order/Ring/NNRat.lean @@ -6,9 +6,11 @@ Authors: AddCombi contributors module -public import Mathlib.Algebra.Order.Ring.NNRat -public import Mathlib.Algebra.Order.Sub.Unbundled.Basic -public import Mathlib.Data.Rat.Cast.CharZero +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Data.NNRat.Defs +import Mathlib.Algebra.Order.Ring.NNRat +import Mathlib.Algebra.Order.Sub.Unbundled.Basic +import Mathlib.Data.Rat.Cast.CharZero /-! # Cast lemmas for nonnegative rational numbers diff --git a/LeanPool/PFR/AddCombi/Mathlib/Algebra/Star/Pi.lean b/LeanPool/PFR/AddCombi/Mathlib/Algebra/Star/Pi.lean index 27d752ff50..978f555c3c 100644 --- a/LeanPool/PFR/AddCombi/Mathlib/Algebra/Star/Pi.lean +++ b/LeanPool/PFR/AddCombi/Mathlib/Algebra/Star/Pi.lean @@ -7,7 +7,7 @@ Authors: AddCombi contributors module public import LeanPool.PFR.AddCombi.Mathlib.Algebra.Notation.Indicator -public import Mathlib.Algebra.Star.Pi +public import Mathlib.Algebra.Star.Basic /-! # Star operations on indicator functions diff --git a/LeanPool/PFR/AddCombi/Mathlib/Combinatorics/Additive/Energy.lean b/LeanPool/PFR/AddCombi/Mathlib/Combinatorics/Additive/Energy.lean index a6915c6a7f..a30e935b16 100644 --- a/LeanPool/PFR/AddCombi/Mathlib/Combinatorics/Additive/Energy.lean +++ b/LeanPool/PFR/AddCombi/Mathlib/Combinatorics/Additive/Energy.lean @@ -5,13 +5,16 @@ Authors: Yaël Dillies, Ella Yu -/ module -public import LeanPool.PFR.AddCombi.Mathlib.Data.Finset.Density public import Mathlib.Algebra.BigOperators.Group.Finset.Defs public import Mathlib.Combinatorics.Additive.Convolution -public import Mathlib.Algebra.Order.BigOperators.Ring.Finset -public import Mathlib.Tactic.FieldSimp -public import Mathlib.Tactic.Positivity +public import Mathlib.Data.Finset.Density +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.ToAdditive +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Positivity.Finset /-! # Additive energy diff --git a/LeanPool/PFR/AddCombi/Mathlib/Data/Finset/Density.lean b/LeanPool/PFR/AddCombi/Mathlib/Data/Finset/Density.lean index f94023f195..c7bd3741d7 100644 --- a/LeanPool/PFR/AddCombi/Mathlib/Data/Finset/Density.lean +++ b/LeanPool/PFR/AddCombi/Mathlib/Data/Finset/Density.lean @@ -9,7 +9,7 @@ module public import Mathlib.Data.Finset.Density public import Mathlib.Data.Fintype.Prod -public import LeanPool.PFR.AddCombi.Mathlib.Algebra.Order.Ring.NNRat +import LeanPool.PFR.AddCombi.Mathlib.Algebra.Order.Ring.NNRat /-! # Density lemmas for finite sets diff --git a/LeanPool/PFR/ApproxHomPFR.lean b/LeanPool/PFR/ApproxHomPFR.lean index db268a41e6..d8c35105b0 100644 --- a/LeanPool/PFR/ApproxHomPFR.lean +++ b/LeanPool/PFR/ApproxHomPFR.lean @@ -6,11 +6,22 @@ Authors: PFR contributors module -public import Mathlib.Data.FunLike.Fintype -public import Mathlib.Data.Int.Lemmas -public import LeanPool.PFR.HomPFR -public import LeanPool.PFR.Mathlib.Data.Finset.Basic -public import LeanPool.PFR.AddCombi.BSG +public import Mathlib.LinearAlgebra.Dual.Lemmas + +public import Mathlib.Algebra.Algebra.Defs +public import Mathlib.Algebra.Field.ZMod +public import Mathlib.Algebra.Module.ZMod +public import Mathlib.Data.Finset.Density +public import Mathlib.Basic.Real.Basic +public import Mathlib.LinearAlgebra.Dual.Defs +import LeanPool.PFR.AddCombi.BSG +import LeanPool.PFR.HomPFR +import LeanPool.PFR.Main +import LeanPool.PFR.Mathlib.Data.Finset.Basic +import LeanPool.PFR.RhoFunctional +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Data.FunLike.Fintype +import Mathlib.Data.Int.Lemmas /-! # The approximate homomorphism form of PFR diff --git a/LeanPool/PFR/BoundingMutual.lean b/LeanPool/PFR/BoundingMutual.lean index 81e40e432e..5828762b94 100644 --- a/LeanPool/PFR/BoundingMutual.lean +++ b/LeanPool/PFR/BoundingMutual.lean @@ -6,9 +6,12 @@ Authors: PFR contributors module -public import Mathlib.Algebra.BigOperators.Group.Multiset.Defs -public import LeanPool.PFR.Mathlib.Data.Fin.Basic public import LeanPool.PFR.MultiTauFunctional +import LeanPool.PFR.ForMathlib.Entropy.Group +import LeanPool.PFR.ForMathlib.FiniteRange.IdentDistrib +import LeanPool.PFR.Mathlib.Data.Fin.Basic +import LeanPool.PFR.Mathlib.MeasureTheory.Group.Arithmetic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic /-! # Bounding the mutual information @@ -88,21 +91,8 @@ lemma condMultiDist_of_cast {m m' : ℕ} (h : m' = m) {Ω : Fin m → Type*} {G S : Type*} [MeasurableFinGroup G] [Fintype S] (X : ∀ i, Ω i → G) (Y : ∀ i, Ω i → S) : D[fun i ↦ X (i.cast h) | fun i ↦ Y (i.cast h); fun i ↦ hΩ (i.cast h)] = D[X | Y; hΩ] := by - unfold condMultiDist - let ι : (Fin m' → S) → (Fin m → S) := fun x i ↦ x (i.cast h.symm) - have hι : Function.Bijective ι := by - constructor - · intro f g h'; ext i; replace h' := congrFun h' (i.cast h); simpa [ι] using h' - intro f; use f ∘ (Fin.cast h); ext i; simp [ι] - convert Function.Bijective.sum_comp hι _ with y _ - congr 1 - · convert Function.Bijective.prod_comp (Fin.cast_bijective h) _ with i _ - rfl - convert multiDist_of_cast h _ _ X with i hmes i - · simp; congr - intros - simp only - infer_instance + subst m' + rfl private lemma row_entropy_le {G Ωₒ : Type u} [MeasurableFinGroup G] [MeasureSpace Ωₒ] {p : multiRefPackage G Ωₒ} {Ω : Type u} [hΩ : MeasureSpace Ω] @@ -290,6 +280,26 @@ private lemma final_to_row_rdist_le {G Ω : Type u} [MeasurableFinGroup G] simp [T, T'] at h h' order +/-- The mutual-information chain rule with any index size at least two. -/ +private lemma mutualInfo_le_multiDist_chain {G Ω : Type u} [MeasurableFinGroup G] + [hΩ : MeasureSpace Ω] [IsProbabilityMeasure (ℙ : Measure Ω)] {m : ℕ} (hm : m ≥ 2) + (X : Fin m × Fin m → Ω → G) (hX : ∀ i j, Measurable (X (i, j))) + (hIndependent : iIndepFun X) : + I[fun ω ↦ fun j ↦ ∑ i, X (i, j) ω : fun ω ↦ fun i ↦ ∑ j, X (i, j) ω | + fun ω ↦ ∑ i, ∑ j, X (i, j) ω] ≤ + ∑ j ∈ Finset.Iio (finalIndex hm), + (D[fun i ↦ X (i, j); fun _ ↦ hΩ] - + D[fun i ↦ X (i, j) | fun i ↦ rowTail X i j; fun _ ↦ hΩ]) + + (D[fun i ↦ X (i, finalIndex hm); fun _ ↦ hΩ] - + D[fun i ↦ ∑ j, X (i, j); fun _ ↦ hΩ]) := by + cases m with + | zero => omega + | succ m => + have hlast : finalIndex hm = Fin.last m := rfl + simpa only [hlast, rowTail, Fin.Iio_last_eq_map, Finset.sum_map, Fin.castSuccEmb_apply, + Fintype.sum_prod_type, Finset.sum_fn, add_sub_assoc, Fin.top_eq_last] using + cor_multiDist_chainRule hΩ X (fun i ↦ hX i.1 i.2) hIndependent + -- Spelling here is *very* janky. Feel free to respell /-- Suppose that $X_{i, j}$, $1 \leq i, j \leq m$, are jointly independent $G$-valued random variables, such that for each $j = 1,\dots,m$, the random variables $(X_{i, j})_{i = 1}^m$ @@ -328,64 +338,8 @@ lemma mutual_information_le {G Ωₒ : Type u} [MeasurableFinGroup G] [MeasureSp - D[ column j | fun i ↦ S i j; fun _ ↦ hΩ'] set B : ℝ := D[ column last; fun _ ↦ hΩ'] - D[ fun i ω ↦ ∑ j, X' (i, j) ω; fun _ ↦ hΩ'] have h1 : I₀ ≤ ∑ j ∈ .Iio last, A j + B := by - -- significant dependent type hell here because `p.m` is not defeq of the form `m+1`. - -- One might refactor the rest of the argument to do this, but I think this claim is - -- the only place where it is a serious issue. - set m := p.m - 1 - have hm' : m+1 = p.m := by omega - let X'' : Fin (m+1) × Fin (m+1) → Ω' → G := fun (i, j) ↦ X' (i.cast hm', j.cast hm') - convert cor_multiDist_chainRule _ X'' (by fun_prop) _ using 1 <;> try infer_instance - · let ι : (Fin (m+1) → G) → (Fin p.m → G) := fun f ↦ f ∘ (Fin.cast hm'.symm) - have hι : Function.Injective ι := by - intro f g h; ext i; replace h := congrFun h (i.cast hm'); simpa [ι] using h - observe hid : Function.Injective (id: G → G) - have hA : ι ∘ (fun ω ↦ (fun j ↦ ∑ i, X'' (i, j) ω)) = fun ω ↦ (fun j ↦ ∑ i, X' (i, j) ω) := by - ext ω j - simp only [Function.comp_apply] - apply Function.Bijective.sum_comp (Fin.cast_bijective hm') (fun i ↦ X' (i, j) ω) - have hB : ι ∘ (fun ω ↦ (fun i ↦ ∑ j, X'' (i, j) ω)) = fun ω ↦ (fun i ↦ ∑ j, X' (i, j) ω) := by - ext ω i - simp only [Function.comp_apply] - apply Function.Bijective.sum_comp (Fin.cast_bijective hm') (fun j ↦ X' (i, j) ω) - have hC : (id : G → G) ∘ (∑ p, X'' p) = fun ω ↦ ∑ i, ∑ j, X' (i, j) ω := by - ext ω - simp only [Function.comp_apply, Finset.sum_apply, ← Finset.sum_product'] - apply Function.Bijective.sum_comp ⟨_, _⟩ (fun x ↦ X' x ω) - · intro ⟨_, _⟩ ⟨_, _⟩ h - simpa using h - intro ⟨i, j⟩ - use ⟨i.cast hm'.symm, j.cast hm'.symm⟩ - simp - rw [← condMutualInfo_of_inj' ?_ ?_ ?_ _ hι hι hid, hA, hB, hC] <;> fun_prop - · rw [add_sub_assoc]; congr 1 - · convert Finset.sum_image (g := fun j:Fin m ↦ j.castSucc.cast hm') - (f := A) (s := Finset.univ) _ using 2 with _ _ n _ - · ext ⟨n, hn⟩ - simp only [Finset.mem_Iio, Fin.mk_lt_mk, Finset.mem_image, Finset.mem_univ, true_and, - last] - constructor - · intro h; use ⟨n, by omega⟩; simp - rintro ⟨⟨n', hn'⟩, h⟩; simp at h; omega - · simp only [X'', A, column, S] - congr 1 - · convert multiDist_of_cast hm' (fun _ ↦ hΩ') inferInstance _ with i - rfl - convert condMultiDist_of_cast hm' (fun _ ↦ hΩ') (fun i ↦ X' (i, Fin.cast hm' n.castSucc)) - (fun i ↦ ∑ k ∈ Finset.Ici (Fin.cast hm' n.castSucc), X' (i, k)) using 2 - ext i ω - simp only [Finset.sum_apply] - convert! Finset.sum_map _ (finCongr hm'.symm).toEmbedding _ - ext i; simp - simpa [Function.comp_def] using (Fin.cast_injective _).comp (Fin.castSucc_injective _) - simp only [Fin.cast_top, B, column, X'']; congr 1 - · symm; convert multiDist_of_cast hm' (fun _ ↦ hΩ') inferInstance _ with i - rfl - symm; convert multiDist_of_cast hm' (fun _ ↦ hΩ') inferInstance _ with i - ext ω - simp only [Finset.sum_apply] - apply Function.Bijective.sum_comp (Fin.cast_bijective hm') (fun j ↦ X' (Fin.cast hm' i, j) ω) - apply ProbabilityTheory.iIndepFun.precomp _ h_indep' - intro ⟨i, j⟩ ⟨i', j'⟩ h; simpa using h + simpa only [I₀, A, B, column, S, last, finalIndex, rowTail, Finset.sum_fn] using + mutualInfo_le_multiDist_chain p.hm X' hX' h_indep' have hD (j: Fin p.m) : D[column j; fun x ↦ hΩ'] = k := by obtain ⟨e, he⟩ := hperm j calc diff --git a/LeanPool/PFR/Endgame.lean b/LeanPool/PFR/Endgame.lean index f867687af2..d1e2c7e121 100644 --- a/LeanPool/PFR/Endgame.lean +++ b/LeanPool/PFR/Endgame.lean @@ -6,8 +6,11 @@ Authors: PFR contributors module -public import LeanPool.PFR.FirstEstimate -public import LeanPool.PFR.SecondEstimate +public import LeanPool.PFR.TauFunctional +import LeanPool.PFR.FirstEstimate +import LeanPool.PFR.ForMathlib.Entropy.Group +import LeanPool.PFR.ForMathlib.FourVariables +import LeanPool.PFR.SecondEstimate /-! # Endgame @@ -286,31 +289,9 @@ lemma sum_dist_diff_le [IsProbabilityMeasure (ℙ : Measure Ω)] [Module (ZMod 2 -- Put everything together to bound the sum of the `c` terms have ineq7 : c[U|S # U|S] + c[V|S # V|S] + c[W|S # W|S] ≤ 3 * H[S; ℙ] - 3/2 * H[X₁; ℙ] -3/2 * H[X₂; ℙ] := by - have step₁ : c[U|S # U|S] ≤ H[S; ℙ] - (H[X₁; ℙ] + H[X₂; ℙ])/2 := - calc - _ = (d[p.X₀₁ # U|S] - d[p.X₀₁ # X₁]) + (d[p.X₀₂ # U|S] - d[p.X₀₂ # X₂]) := by ring - _ ≤ (H[S; ℙ] - H[X₁; ℙ])/2 + (H[S; ℙ] - H[X₂; ℙ])/2 := add_le_add ineq1 ineq2 - _ = H[S; ℙ] - (H[X₁; ℙ] + H[X₂; ℙ])/2 := by ring - have step₂ : c[V|S # V|S] ≤ H[S; ℙ] - (H[X₁; ℙ] + H[X₂; ℙ])/2 := - calc c[V|S # V|S] - _ = d[p.X₀₁ # V|S] - d[p.X₀₁ # X₁] + (d[p.X₀₂ # V|S] - d[p.X₀₂ # X₂]) := by ring - _ ≤ (H[S; ℙ] - H[X₁; ℙ])/2 + (H[S; ℙ] - H[X₂; ℙ])/2 := add_le_add ineq3 ineq4 - _ = H[S; ℙ] - (H[X₁; ℙ] + H[X₂; ℙ])/2 := by ring - have step₃ : c[W|S # W|S] ≤ H[S; ℙ] - (H[X₁; ℙ] + H[X₂; ℙ])/2 := - calc c[W|S # W|S] = (d[X₀₁ # W | S] - d[X₀₁ # X₁]) + (d[X₀₂ # W' | S] - d[X₀₂ # X₂]) := - by rw [dist_eq] - _ ≤ (H[S; ℙ] + H[W; ℙ] - H[X₁; ℙ] - H[W'; ℙ])/2 - + (H[S; ℙ] + H[W'; ℙ] - H[X₂; ℙ] - H[W; ℙ])/2 := add_le_add ineq5 ineq6 - _ = H[S; ℙ] - (H[X₁; ℙ] + H[X₂; ℙ])/2 := by ring - calc c[U|S # U|S] + c[V|S # V|S] + c[W|S # W|S] ≤ (H[S; ℙ] - (H[X₁; ℙ] + H[X₂; ℙ])/2) + - (H[S; ℙ] - (H[X₁; ℙ] + H[X₂; ℙ])/2) + (H[S; ℙ] - (H[X₁; ℙ] + H[X₂; ℙ])/2) := - add_le_add (add_le_add step₁ step₂) step₃ - _ = 3 * H[S; ℙ] - 3/2 * H[X₁; ℙ] -3/2 * H[X₂; ℙ] := by ring - have h_indep' : iIndepFun ![X₁, X₂, X₂', X₁'] := by - refine .of_precomp (Equiv.swap (2 : Fin 4) 3).surjective ?_ - convert h_indep using 1 - ext x - fin_cases x; all_goals { aesop } + rw [dist_eq] at ineq6 + linarith only [ineq1, ineq2, ineq3, ineq4, ineq5, ineq6] + have h_indep' : iIndepFun ![X₁, X₂, X₂', X₁'] := h_indep.reindex_four_abdc have ineq8 : 3 * H[S; ℙ] ≤ 3/2 * (H[X₁; ℙ] + H[X₂; ℙ]) + 3*(2+p.η)*k - 3*I₁ := calc 3 * H[S; ℙ] ≤ 3 * (H[X₁; ℙ] / 2 + H[X₂; ℙ] / 2 + (2+p.η)*k - I₁) := by gcongr @@ -502,15 +483,7 @@ theorem tau_strictly_decreases_aux [IsProbabilityMeasure (ℙ : Measure Ω)] [Mo (show Measurable W by fun_prop) (show Measurable S by fun_prop) have h1 := sum_condMutual_le p X₁ X₂ X₁' X₂' hX₁ hX₂ hX₁' hX₂' h₁ h₂ h_indep h_min have h2 := sum_dist_diff_le p X₁ X₂ X₁' X₂' hX₁ hX₂ hX₁' hX₂' h₁ h₂ h_indep h_min - have h_indep' : iIndepFun ![X₁, X₂, X₂', X₁'] := by - let σ : Fin 4 ≃ Fin 4 := - { toFun := ![0, 1, 3, 2] - invFun := ![0, 1, 3, 2] - left_inv := by intro i; fin_cases i <;> rfl - right_inv := by intro i; fin_cases i <;> rfl } - refine .of_precomp σ.symm.surjective ?_ - convert h_indep using 1 - ext i; fin_cases i <;> rfl + have h_indep' : iIndepFun ![X₁, X₂, X₂', X₁'] := h_indep.reindex_four_abdc have h3 := first_estimate p X₁ X₂ X₁' X₂' hX₁ hX₂ hX₁' hX₂' h₁ h₂ h_indep' h_min have hk : 0 ≤ k := rdist_nonneg hX₁ hX₂ rw [hpη] at * diff --git a/LeanPool/PFR/EntropyPFR.lean b/LeanPool/PFR/EntropyPFR.lean index d04564c5f4..76fa9b148b 100644 --- a/LeanPool/PFR/EntropyPFR.lean +++ b/LeanPool/PFR/EntropyPFR.lean @@ -6,10 +6,10 @@ Authors: PFR contributors module -public import Mathlib.Algebra.Module.ZMod public import LeanPool.PFR.TauFunctional -public import LeanPool.PFR.HundredPercent -public import LeanPool.PFR.Endgame +import LeanPool.PFR.Endgame +import LeanPool.PFR.HundredPercent +import Mathlib.Algebra.Module.ZMod /-! # Entropic version of polynomial Freiman-Ruzsa conjecture diff --git a/LeanPool/PFR/Fibring.lean b/LeanPool/PFR/Fibring.lean index ec22512246..99e31af97f 100644 --- a/LeanPool/PFR/Fibring.lean +++ b/LeanPool/PFR/Fibring.lean @@ -7,6 +7,7 @@ Authors: PFR contributors module public import LeanPool.PFR.ForMathlib.Entropy.RuzsaDist +import LeanPool.PFR.ForMathlib.FiniteRange.IdentDistrib /-! # The fibring identity diff --git a/LeanPool/PFR/FirstEstimate.lean b/LeanPool/PFR/FirstEstimate.lean index 1ffae06d9c..c413fdbb29 100644 --- a/LeanPool/PFR/FirstEstimate.lean +++ b/LeanPool/PFR/FirstEstimate.lean @@ -6,8 +6,8 @@ Authors: PFR contributors module -public import LeanPool.PFR.Fibring public import LeanPool.PFR.TauFunctional +import LeanPool.PFR.Fibring /-! # First estimate diff --git a/LeanPool/PFR/ForMathlib/AffineSpaceDim.lean b/LeanPool/PFR/ForMathlib/AffineSpaceDim.lean index 18d1620b27..bf1e5c899f 100644 --- a/LeanPool/PFR/ForMathlib/AffineSpaceDim.lean +++ b/LeanPool/PFR/ForMathlib/AffineSpaceDim.lean @@ -6,10 +6,11 @@ Authors: PFR contributors module -public import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace.Basic -public import Mathlib.LinearAlgebra.Dimension.Constructions -public import Mathlib.LinearAlgebra.Dimension.Finite public import LeanPool.PFR.Mathlib.LinearAlgebra.Dimension.Finrank +public import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace.Defs +public import Mathlib.LinearAlgebra.InvariantBasisNumber +import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace.Basic +import Mathlib.LinearAlgebra.Dimension.Constructions /-! # Dimensions of affine spaces diff --git a/LeanPool/PFR/ForMathlib/Entropy/Group.lean b/LeanPool/PFR/ForMathlib/Entropy/Group.lean index e389eeb50c..729663955b 100644 --- a/LeanPool/PFR/ForMathlib/Entropy/Group.lean +++ b/LeanPool/PFR/ForMathlib/Entropy/Group.lean @@ -7,7 +7,6 @@ Authors: PFR contributors module public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic -public import LeanPool.PFR.ForMathlib.Entropy.Kernel.Group /-! # Entropy identities in additive groups diff --git a/LeanPool/PFR/ForMathlib/Entropy/Kernel/Group.lean b/LeanPool/PFR/ForMathlib/Entropy/Kernel/Group.lean index 2f27a5663c..269218245e 100644 --- a/LeanPool/PFR/ForMathlib/Entropy/Kernel/Group.lean +++ b/LeanPool/PFR/ForMathlib/Entropy/Kernel/Group.lean @@ -7,7 +7,6 @@ Authors: PFR contributors module public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Kernel.MutualInfo -public import Mathlib.MeasureTheory.Group.Arithmetic /-! # Kernel entropy and mutual information in a commutative group diff --git a/LeanPool/PFR/ForMathlib/Entropy/Kernel/RuzsaDist.lean b/LeanPool/PFR/ForMathlib/Entropy/Kernel/RuzsaDist.lean index e7dbe17243..d07db4b2dd 100644 --- a/LeanPool/PFR/ForMathlib/Entropy/Kernel/RuzsaDist.lean +++ b/LeanPool/PFR/ForMathlib/Entropy/Kernel/RuzsaDist.lean @@ -6,7 +6,11 @@ Authors: PFR contributors module -public import LeanPool.PFR.ForMathlib.Entropy.Kernel.Group +public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Kernel.Basic +import LeanPool.PFR.ForMathlib.Entropy.Kernel.Group +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Prod +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Real +import Mathlib.MeasureTheory.Integral.Prod /-! # Ruzsa distance between kernels diff --git a/LeanPool/PFR/ForMathlib/Entropy/RuzsaDist.lean b/LeanPool/PFR/ForMathlib/Entropy/RuzsaDist.lean index fc10d95545..6d3429bb7a 100644 --- a/LeanPool/PFR/ForMathlib/Entropy/RuzsaDist.lean +++ b/LeanPool/PFR/ForMathlib/Entropy/RuzsaDist.lean @@ -6,11 +6,20 @@ Authors: PFR contributors module -public import Mathlib.MeasureTheory.Measure.FiniteMeasureProd -public import LeanPool.PFR.ForMathlib.Entropy.Group public import LeanPool.PFR.ForMathlib.Entropy.Kernel.RuzsaDist -public import LeanPool.PFR.ForMathlib.FiniteRange.IdentDistrib -public import LeanPool.PFR.Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +import LeanPool.PFR.ForMathlib.Entropy.Group +import LeanPool.PFR.ForMathlib.FiniteRange.IdentDistrib +import LeanPool.PFR.Mathlib.MeasureTheory.Measure.ProbabilityMeasure +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Basic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Dirac +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Prod +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Real +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.ConditionalProbability +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic +import Mathlib.MeasureTheory.Integral.Prod +import Mathlib.MeasureTheory.Measure.FiniteMeasureProd /-! # Ruzsa distance diff --git a/LeanPool/PFR/ForMathlib/Entropy/RuzsaSetDist.lean b/LeanPool/PFR/ForMathlib/Entropy/RuzsaSetDist.lean index 0746875bb5..89eb133935 100644 --- a/LeanPool/PFR/ForMathlib/Entropy/RuzsaSetDist.lean +++ b/LeanPool/PFR/ForMathlib/Entropy/RuzsaSetDist.lean @@ -7,6 +7,8 @@ Authors: PFR contributors module public import LeanPool.PFR.ForMathlib.Entropy.RuzsaDist +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Basic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.UniformOn /-! # Ruzsa distance for finite sets diff --git a/LeanPool/PFR/ForMathlib/FiniteRange/IdentDistrib.lean b/LeanPool/PFR/ForMathlib/FiniteRange/IdentDistrib.lean index a90920a6dd..ddb6ab5f42 100644 --- a/LeanPool/PFR/ForMathlib/FiniteRange/IdentDistrib.lean +++ b/LeanPool/PFR/ForMathlib/FiniteRange/IdentDistrib.lean @@ -8,6 +8,7 @@ module public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.IdentDistrib public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.FiniteRange.Defs +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic /-! # Identically distributed finite-range random variables diff --git a/LeanPool/PFR/ForMathlib/FourVariables.lean b/LeanPool/PFR/ForMathlib/FourVariables.lean index 9b7858ada4..7dd88ab515 100644 --- a/LeanPool/PFR/ForMathlib/FourVariables.lean +++ b/LeanPool/PFR/ForMathlib/FourVariables.lean @@ -6,7 +6,8 @@ Authors: PFR contributors module -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic +public import Mathlib.Probability.Independence.Basic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic /-! # Consequences of four-way independence diff --git a/LeanPool/PFR/ForMathlib/ThreeVariables.lean b/LeanPool/PFR/ForMathlib/ThreeVariables.lean index 06686785a3..9d76975874 100644 --- a/LeanPool/PFR/ForMathlib/ThreeVariables.lean +++ b/LeanPool/PFR/ForMathlib/ThreeVariables.lean @@ -6,8 +6,9 @@ Authors: PFR contributors module -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Pair +public import Mathlib.Probability.Independence.Basic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic /-! # Consequences of three-way independence diff --git a/LeanPool/PFR/HomPFR.lean b/LeanPool/PFR/HomPFR.lean index 7287d80dfa..71e60c2143 100644 --- a/LeanPool/PFR/HomPFR.lean +++ b/LeanPool/PFR/HomPFR.lean @@ -7,9 +7,10 @@ Authors: PFR contributors module public import Mathlib.Algebra.Field.ZMod -public import Mathlib.Data.Set.Card -public import LeanPool.PFR.Mathlib.LinearAlgebra.Basis.VectorSpace -public import LeanPool.PFR.RhoFunctional +public import Mathlib.Algebra.Module.Prod +public import Mathlib.Algebra.Module.Submodule.Defs +import LeanPool.PFR.Mathlib.LinearAlgebra.Basis.VectorSpace +import LeanPool.PFR.RhoFunctional /-! # The homomorphism form of PFR diff --git a/LeanPool/PFR/HundredPercent.lean b/LeanPool/PFR/HundredPercent.lean index 33032a0724..b521c8d679 100644 --- a/LeanPool/PFR/HundredPercent.lean +++ b/LeanPool/PFR/HundredPercent.lean @@ -7,6 +7,7 @@ Authors: PFR contributors module public import LeanPool.PFR.ForMathlib.Entropy.RuzsaDist +import LeanPool.PFR.ForMathlib.Entropy.Group /-! # The 100% version of entropic PFR diff --git a/LeanPool/PFR/ImprovedPFR.lean b/LeanPool/PFR/ImprovedPFR.lean index 8199f333ee..7bc43316da 100644 --- a/LeanPool/PFR/ImprovedPFR.lean +++ b/LeanPool/PFR/ImprovedPFR.lean @@ -6,7 +6,19 @@ Authors: PFR contributors module -public import LeanPool.PFR.Main +public import LeanPool.PFR.TauFunctional +import LeanPool.PFR.Endgame +import LeanPool.PFR.Fibring +import LeanPool.PFR.FirstEstimate +import LeanPool.PFR.ForMathlib.Entropy.Group +import LeanPool.PFR.ForMathlib.FourVariables +import LeanPool.PFR.HundredPercent +import LeanPool.PFR.SecondEstimate +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.ConditionalProbability +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic +import Mathlib.Algebra.Module.ZMod +import Mathlib.MeasureTheory.Measure.LevyProkhorovMetric +import Mathlib.MeasureTheory.Measure.Prokhorov /-! # Improved PFR @@ -479,6 +491,20 @@ lemma averaged_construct_good : have : IsProbabilityMeasure (ℙ[|S ⁻¹' {i}]) := cond_isProbabilityMeasure_of_real h'i linarith [construct_good_improved'' h_min (ℙ[|S ⁻¹' {i}]) hUVW hU hV hW] +include h₁ h₂ h_indep in +omit [AddCommGroup G] [Finite G] [MeasurableSingletonClass G] [Module (ZMod 2) G] in +/-- Replacing either or both independent coordinates by their copies preserves their joint law. -/ +private lemma identDistrib_copy_pairs : + IdentDistrib (⟨X₁', X₂⟩) (⟨X₁, X₂⟩) ∧ + IdentDistrib (⟨X₁, X₂'⟩) (⟨X₁, X₂⟩) ∧ + IdentDistrib (⟨X₁', X₂'⟩) (⟨X₁, X₂⟩) := by + exact ⟨h₁.symm.prodMk (IdentDistrib.refl h₂.aemeasurable_fst) + (h_indep.indepFun (show 3 ≠ 1 by decide)) (h_indep.indepFun zero_ne_one), + (IdentDistrib.refl h₁.aemeasurable_fst).prodMk h₂.symm + (h_indep.indepFun (show 0 ≠ 2 by decide)) (h_indep.indepFun zero_ne_one), + h₁.symm.prodMk h₂.symm + (h_indep.indepFun (show 3 ≠ 2 by decide)) (h_indep.indepFun zero_ne_one)⟩ + variable (p) include hX₁ hX₂ hX₁' hX₂' h_indep h₁ h₂ in @@ -490,6 +516,7 @@ lemma dist_diff_bound_1 : + (d[p.X₀₁ # W | ⟨U, S⟩] - d[p.X₀₁ # X₁]) + (d[p.X₀₁ # W | ⟨V, S⟩] - d[p.X₀₁ # X₁]) ≤ (16 * k + 6 * d[X₁ # X₁] + 2 * d[X₂ # X₂]) / 4 + (H[X₁ + X₁'] - H[X₂ + X₂']) / 4 + (H[X₂ | X₂ + X₂'] - H[X₁ | X₁ + X₁']) / 4 := by + obtain ⟨hFirstCopy, hSecondCopy, hBothCopies⟩ := identDistrib_copy_pairs h₁ h₂ h_indep have I1 := gen_ineq_01 p.X₀₁ p.hmeas1 X₁ X₂ X₂' X₁' hX₁ hX₂ hX₂' hX₁' h_indep.reindex_four_abcd have I2 := gen_ineq_00 p.X₀₁ p.hmeas1 X₁ X₂ X₁' X₂' hX₁ hX₂ hX₁' hX₂' h_indep.reindex_four_abdc have I3 := gen_ineq_10 p.X₀₁ p.hmeas1 X₁ X₂' X₂ X₁' hX₁ hX₂' hX₂ hX₁' h_indep.reindex_four_acbd @@ -511,9 +538,7 @@ lemma dist_diff_bound_1 : have C14 : d[X₁' # X₂] = d[X₁ # X₂] := h₁.symm.rdist_congr_left hX₂.aemeasurable have C15 : H[X₁' + X₂'] = H[U] := by apply ProbabilityTheory.IdentDistrib.entropy_congr - have I : IdentDistrib (⟨X₁, X₂⟩) (⟨X₁', X₂'⟩) := h₁.prodMk h₂ (h_indep.indepFun zero_ne_one) - (h_indep.indepFun (show 3 ≠ 2 by decide)) - exact I.symm.comp measurable_add + exact hBothCopies.comp measurable_add have C16 : H[X₂'] = H[X₂] := h₂.symm.entropy_congr have C17 : H[X₁'] = H[X₁] := h₁.symm.entropy_congr have C18 : d[X₂' # X₁'] = d[X₁' # X₂'] := rdist_symm @@ -521,35 +546,21 @@ lemma dist_diff_bound_1 : have C20 : d[X₂' # X₂] = d[X₂ # X₂] := h₂.symm.rdist_congr_left hX₂.aemeasurable have C21 : H[V] = H[U] := by apply ProbabilityTheory.IdentDistrib.entropy_congr - have I : IdentDistrib (⟨X₁', X₂⟩) (⟨X₁, X₂⟩) := by - apply h₁.symm.prodMk (.refl hX₂.aemeasurable) - (h_indep.indepFun (show 3 ≠ 1 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp measurable_add + exact hFirstCopy.comp measurable_add have C22 : H[X₁ + X₂'] = H[X₁ + X₂] := by apply ProbabilityTheory.IdentDistrib.entropy_congr - have I : IdentDistrib (⟨X₁, X₂'⟩) (⟨X₁, X₂⟩) := by - apply (IdentDistrib.refl hX₁.aemeasurable).prodMk h₂.symm - (h_indep.indepFun (show 0 ≠ 2 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp measurable_add + exact hSecondCopy.comp measurable_add have C23 : X₂' + X₂ = X₂ + X₂' := by abel have C24 : H[X₁ | X₁ + X₂'] = H[X₁ | X₁ + X₂] := by apply IdentDistrib.condEntropy_eq hX₁ (hX₁.add hX₂') hX₁ (hX₁.add hX₂) - have I : IdentDistrib (⟨X₁, X₂'⟩) (⟨X₁, X₂⟩) := by - exact (IdentDistrib.refl hX₁.aemeasurable).prodMk h₂.symm - (h_indep.indepFun (show 0 ≠ 2 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp (measurable_fst.prodMk measurable_add) + exact hSecondCopy.comp (measurable_fst.prodMk measurable_add) have C25 : H[X₂ | V] = H[X₂ | X₁ + X₂] := by apply IdentDistrib.condEntropy_eq hX₂ (hX₁'.add hX₂) hX₂ (hX₁.add hX₂) - have I : IdentDistrib (⟨X₁', X₂⟩) (⟨X₁, X₂⟩) := by - exact h₁.symm.prodMk (IdentDistrib.refl hX₂.aemeasurable) - (h_indep.indepFun (show 3 ≠ 1 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp (measurable_snd.prodMk measurable_add) + exact hFirstCopy.comp (measurable_snd.prodMk measurable_add) have C26 : H[X₂' | X₂' + X₁'] = H[X₂ | X₁ + X₂] := by rw [add_comm] apply IdentDistrib.condEntropy_eq hX₂' (hX₁'.add hX₂') hX₂ (hX₁.add hX₂) - have I : IdentDistrib (⟨X₁', X₂'⟩) (⟨X₁, X₂⟩) := h₁.symm.prodMk h₂.symm - (h_indep.indepFun (show 3 ≠ 2 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp (measurable_snd.prodMk measurable_add) + exact hBothCopies.comp (measurable_snd.prodMk measurable_add) have C27 : H[X₂' | X₂ + X₂'] = H[X₂ | X₂ + X₂'] := by conv_lhs => rw [add_comm] apply IdentDistrib.condEntropy_eq hX₂' (hX₂'.add hX₂) hX₂ (hX₂.add hX₂') @@ -558,15 +569,10 @@ lemma dist_diff_bound_1 : exact I.comp (measurable_fst.prodMk measurable_add) have C28 : H[X₁' | X₁' + X₂'] = H[X₁ | X₁ + X₂] := by apply IdentDistrib.condEntropy_eq hX₁' (hX₁'.add hX₂') hX₁ (hX₁.add hX₂) - have I : IdentDistrib (⟨X₁', X₂'⟩) (⟨X₁, X₂⟩) := h₁.symm.prodMk h₂.symm - (h_indep.indepFun (show 3 ≠ 2 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp (measurable_fst.prodMk measurable_add) + exact hBothCopies.comp (measurable_fst.prodMk measurable_add) have C29 : H[X₁' | V] = H[X₁ | X₁ + X₂] := by apply IdentDistrib.condEntropy_eq hX₁' (hX₁'.add hX₂) hX₁ (hX₁.add hX₂) - have I : IdentDistrib (⟨X₁', X₂⟩) (⟨X₁, X₂⟩) := - h₁.symm.prodMk (IdentDistrib.refl hX₂.aemeasurable) - (h_indep.indepFun (show 3 ≠ 1 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp (measurable_fst.prodMk measurable_add) + exact hFirstCopy.comp (measurable_fst.prodMk measurable_add) have C30 : H[X₂ | X₁ + X₂] = H[X₁ | X₁ + X₂] := by have := condEntropy_of_injective ℙ hX₁ (hX₁.add hX₂) _ (fun p ↦ add_right_injective p) convert! this with ω @@ -584,6 +590,7 @@ lemma dist_diff_bound_2 : + (d[p.X₀₂ # W | ⟨U, S⟩] - d[p.X₀₂ # X₂]) + (d[p.X₀₂ # W | ⟨V, S⟩] - d[p.X₀₂ # X₂])) ≤ (16 * k + 6 * d[X₂ # X₂] + 2 * d[X₁ # X₁]) / 4 + (H[X₂ + X₂'] - H[X₁ + X₁']) / 4 + (H[X₁ | X₁ + X₁'] - H[X₂ | X₂ + X₂']) / 4 := by + obtain ⟨hFirstCopy, hSecondCopy, hBothCopies⟩ := identDistrib_copy_pairs h₁ h₂ h_indep have I1 := gen_ineq_01 p.X₀₂ p.hmeas2 X₂ X₁ X₂' X₁' hX₂ hX₁ hX₂' hX₁' h_indep.reindex_four_bacd have I2 := gen_ineq_00 p.X₀₂ p.hmeas2 X₂ X₁ X₁' X₂' hX₂ hX₁ hX₁' hX₂' h_indep.reindex_four_badc have I3 := gen_ineq_10 p.X₀₂ p.hmeas2 X₂ X₂' X₁ X₁' hX₂ hX₂' hX₁ hX₁' h_indep.reindex_four_bcad @@ -609,18 +616,13 @@ lemma dist_diff_bound_2 : have C15 : d[X₁' # X₂'] = d[X₁ # X₂] := h₁.symm.rdist_congr h₂.symm have C16 : H[X₁' + X₂'] = H[X₁ + X₂] := by apply ProbabilityTheory.IdentDistrib.entropy_congr - have I : IdentDistrib (⟨X₁, X₂⟩) (⟨X₁', X₂'⟩) := h₁.prodMk h₂ (h_indep.indepFun zero_ne_one) - (h_indep.indepFun (show 3 ≠ 2 by decide)) - exact I.symm.comp measurable_add + exact hBothCopies.comp measurable_add have C17 : H[X₂' + X₁'] = H[X₁ + X₂] := by rw [add_comm]; exact C16 have C18 : H[X₁'] = H[X₁] := h₁.symm.entropy_congr have C19 : H[X₂'] = H[X₂] := h₂.symm.entropy_congr have C20 : H[X₁ + X₂'] = H[X₁ + X₂] := by apply ProbabilityTheory.IdentDistrib.entropy_congr - have I : IdentDistrib (⟨X₁, X₂'⟩) (⟨X₁, X₂⟩) := - (IdentDistrib.refl hX₁.aemeasurable).prodMk h₂.symm - (h_indep.indepFun (show 0 ≠ 2 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp measurable_add + exact hSecondCopy.comp measurable_add have C21 : H[X₁' | W] = H[X₁ | W] := by conv_rhs => rw [add_comm] apply IdentDistrib.condEntropy_eq hX₁' (hX₁'.add hX₁) hX₁ (hX₁.add hX₁') @@ -630,50 +632,31 @@ lemma dist_diff_bound_2 : have C22 : H[X₂' | X₂' + X₁] = H[X₂ | X₁ + X₂] := by rw [add_comm] apply IdentDistrib.condEntropy_eq hX₂' (hX₁.add hX₂') hX₂ (hX₁.add hX₂) - have I : IdentDistrib (⟨X₁, X₂'⟩) (⟨X₁, X₂⟩) := - (IdentDistrib.refl hX₁.aemeasurable).prodMk h₂.symm - (h_indep.indepFun (show 0 ≠ 2 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp (measurable_snd.prodMk measurable_add) + exact hSecondCopy.comp (measurable_snd.prodMk measurable_add) have C23 : H[X₁ | X₁ + X₂'] = H[X₁ | X₁ + X₂] := by apply IdentDistrib.condEntropy_eq hX₁ (hX₁.add hX₂') hX₁ (hX₁.add hX₂) - have I : IdentDistrib (⟨X₁, X₂'⟩) (⟨X₁, X₂⟩) := - (IdentDistrib.refl hX₁.aemeasurable).prodMk h₂.symm - (h_indep.indepFun (show 0 ≠ 2 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp (measurable_fst.prodMk measurable_add) + exact hSecondCopy.comp (measurable_fst.prodMk measurable_add) have C24 : H[X₂ | V] = H[X₂ | X₁ + X₂] := by apply IdentDistrib.condEntropy_eq hX₂ (hX₁'.add hX₂) hX₂ (hX₁.add hX₂) - have I : IdentDistrib (⟨X₁', X₂⟩) (⟨X₁, X₂⟩) := - h₁.symm.prodMk (IdentDistrib.refl hX₂.aemeasurable) - (h_indep.indepFun (show 3 ≠ 1 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp (measurable_snd.prodMk measurable_add) + exact hFirstCopy.comp (measurable_snd.prodMk measurable_add) have C25 : H[X₂' | X₂' + X₁'] = H[X₂ | X₁ + X₂] := by rw [add_comm] apply IdentDistrib.condEntropy_eq hX₂' (hX₁'.add hX₂') hX₂ (hX₁.add hX₂) - have I : IdentDistrib (⟨X₁', X₂'⟩) (⟨X₁, X₂⟩) := h₁.symm.prodMk h₂.symm - (h_indep.indepFun (show 3 ≠ 2 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp (measurable_snd.prodMk measurable_add) + exact hBothCopies.comp (measurable_snd.prodMk measurable_add) have C26 : H[X₁' | X₁' + X₂'] = H[X₁ | X₁ + X₂] := by apply IdentDistrib.condEntropy_eq hX₁' (hX₁'.add hX₂') hX₁ (hX₁.add hX₂) - have I : IdentDistrib (⟨X₁', X₂'⟩) (⟨X₁, X₂⟩) := h₁.symm.prodMk h₂.symm - (h_indep.indepFun (show 3 ≠ 2 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp (measurable_fst.prodMk measurable_add) + exact hBothCopies.comp (measurable_fst.prodMk measurable_add) have C27 : H[X₂ | X₁ + X₂] = H[X₁ | X₁ + X₂] := by have := condEntropy_of_injective ℙ hX₁ (hX₁.add hX₂) _ (fun p ↦ add_right_injective p) convert! this with ω simp [add_comm (X₁ ω), add_assoc (X₂ ω), ZModModule.add_self] have C28 : H[V] = H[U] := by apply ProbabilityTheory.IdentDistrib.entropy_congr - have I : IdentDistrib (⟨X₁', X₂⟩) (⟨X₁, X₂⟩) := - h₁.symm.prodMk (IdentDistrib.refl hX₂.aemeasurable) - (h_indep.indepFun (show 3 ≠ 1 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp measurable_add + exact hFirstCopy.comp measurable_add have C29 : H[X₂' + X₁] = H[X₁ + X₂] := by rw [add_comm] apply ProbabilityTheory.IdentDistrib.entropy_congr - have I : IdentDistrib (⟨X₁, X₂'⟩) (⟨X₁, X₂⟩) := - (IdentDistrib.refl hX₁.aemeasurable).prodMk h₂.symm - (h_indep.indepFun (show 0 ≠ 2 by decide)) (h_indep.indepFun zero_ne_one) - exact I.comp measurable_add + exact hSecondCopy.comp measurable_add have C30 : d[X₁ # X₁'] = d[X₁ # X₁] := h₁.symm.rdist_congr_right hX₁.aemeasurable have C31 : d[X₂ # X₂'] = d[X₂ # X₂] := h₂.symm.rdist_congr_right hX₂.aemeasurable simp only [C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, diff --git a/LeanPool/PFR/Kullback.lean b/LeanPool/PFR/Kullback.lean index d7774f55f1..8a2d511307 100644 --- a/LeanPool/PFR/Kullback.lean +++ b/LeanPool/PFR/Kullback.lean @@ -6,11 +6,10 @@ Authors: PFR contributors module -public import Mathlib.Probability.IdentDistrib public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic -public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.FiniteRange.Defs -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Analysis.SpecialFunctions.NegMulLog -public import LeanPool.PFR.Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +import LeanPool.PFR.Mathlib.MeasureTheory.Measure.ProbabilityMeasure +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Analysis.SpecialFunctions.NegMulLog /-! # Kullback-Leibler divergence diff --git a/LeanPool/PFR/Main.lean b/LeanPool/PFR/Main.lean index 64d3b72028..5fad1b0e16 100644 --- a/LeanPool/PFR/Main.lean +++ b/LeanPool/PFR/Main.lean @@ -6,11 +6,11 @@ Authors: PFR contributors module -public import Mathlib.Algebra.Group.Pointwise.Set.Card -public import Mathlib.Algebra.Module.ZMod -public import Mathlib.Combinatorics.Additive.RuzsaCovering -public import Mathlib.GroupTheory.Complement -public import LeanPool.PFR.EntropyPFR +public import LeanPool.PFR.ForMathlib.Entropy.RuzsaDist +import LeanPool.PFR.EntropyPFR +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic +import Mathlib.Algebra.Module.ZMod +import Mathlib.Combinatorics.Additive.RuzsaCovering /-! # Polynomial Freiman-Ruzsa conjecture diff --git a/LeanPool/PFR/Mathlib/Algebra/BigOperators/Fin.lean b/LeanPool/PFR/Mathlib/Algebra/BigOperators/Fin.lean index e55e55c660..7d1c6d07ec 100644 --- a/LeanPool/PFR/Mathlib/Algebra/BigOperators/Fin.lean +++ b/LeanPool/PFR/Mathlib/Algebra/BigOperators/Fin.lean @@ -6,7 +6,10 @@ Authors: PFR contributors module -public import Mathlib.Algebra.BigOperators.Fin +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Order.Interval.Finset.Fin +import Mathlib.Algebra.BigOperators.Group.Finset.Basic +import Mathlib.Data.Fintype.Fin /-! # Finite sums indexed by `Fin` diff --git a/LeanPool/PFR/Mathlib/Algebra/Group/Action/Pointwise/Set/Basic.lean b/LeanPool/PFR/Mathlib/Algebra/Group/Action/Pointwise/Set/Basic.lean index 3b679dcde1..06ef95664f 100644 --- a/LeanPool/PFR/Mathlib/Algebra/Group/Action/Pointwise/Set/Basic.lean +++ b/LeanPool/PFR/Mathlib/Algebra/Group/Action/Pointwise/Set/Basic.lean @@ -6,7 +6,9 @@ Authors: PFR contributors module -public import Mathlib.Algebra.Group.Action.Pointwise.Set.Basic +public import Mathlib.Algebra.Group.Action.Defs +public import Mathlib.Algebra.Group.Pointwise.Set.Basic +public import Mathlib.Algebra.Group.Pointwise.Set.Scalar /-! # Pointwise set operations diff --git a/LeanPool/PFR/Mathlib/Data/Fin/Basic.lean b/LeanPool/PFR/Mathlib/Data/Fin/Basic.lean index e716820494..da887c23a4 100644 --- a/LeanPool/PFR/Mathlib/Data/Fin/Basic.lean +++ b/LeanPool/PFR/Mathlib/Data/Fin/Basic.lean @@ -6,7 +6,9 @@ Authors: PFR contributors module -public import Mathlib.Data.Fin.Basic +public import Aesop.BuiltinRules +public import Mathlib.Data.Nat.Notation +public import Mathlib.Logic.Function.Defs /-! # Elementary lemmas about finite types diff --git a/LeanPool/PFR/Mathlib/Data/Finset/Basic.lean b/LeanPool/PFR/Mathlib/Data/Finset/Basic.lean index ef327e0050..eb78f5dd2c 100644 --- a/LeanPool/PFR/Mathlib/Data/Finset/Basic.lean +++ b/LeanPool/PFR/Mathlib/Data/Finset/Basic.lean @@ -6,7 +6,8 @@ Authors: PFR contributors module -public import Mathlib.Data.Finset.Basic +public import Mathlib.Data.Finset.Empty +import Mathlib.Data.Finset.Attr /-! # Elementary lemmas about finite sets diff --git a/LeanPool/PFR/Mathlib/LinearAlgebra/Basis/VectorSpace.lean b/LeanPool/PFR/Mathlib/LinearAlgebra/Basis/VectorSpace.lean index 185a37a707..e35f2808ef 100644 --- a/LeanPool/PFR/Mathlib/LinearAlgebra/Basis/VectorSpace.lean +++ b/LeanPool/PFR/Mathlib/LinearAlgebra/Basis/VectorSpace.lean @@ -6,8 +6,9 @@ Authors: PFR contributors module -public import Mathlib.Algebra.Module.Projective -public import Mathlib.LinearAlgebra.Basis.VectorSpace +public import Mathlib.LinearAlgebra.DFinsupp +import Mathlib.Algebra.Module.Projective +import Mathlib.LinearAlgebra.Basis.VectorSpace /-! # Decompositions of submodules of product spaces diff --git a/LeanPool/PFR/Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean b/LeanPool/PFR/Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean index e8193699ea..2aa5d14687 100644 --- a/LeanPool/PFR/Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean +++ b/LeanPool/PFR/Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean @@ -6,7 +6,8 @@ Authors: PFR contributors module -public import Mathlib.LinearAlgebra.Dimension.FreeAndStrongRankCondition +public import Mathlib.LinearAlgebra.InvariantBasisNumber +import Mathlib.LinearAlgebra.Dimension.FreeAndStrongRankCondition /-! # Cardinality bounds for finite-dimensional modules diff --git a/LeanPool/PFR/Mathlib/LinearAlgebra/Quotient/Basic.lean b/LeanPool/PFR/Mathlib/LinearAlgebra/Quotient/Basic.lean index f2574c5184..0e766bd6b4 100644 --- a/LeanPool/PFR/Mathlib/LinearAlgebra/Quotient/Basic.lean +++ b/LeanPool/PFR/Mathlib/LinearAlgebra/Quotient/Basic.lean @@ -6,7 +6,9 @@ Authors: PFR contributors module -public import Mathlib.LinearAlgebra.Quotient.Basic +public import Mathlib.Basic.Finite.Defs +public import Mathlib.LinearAlgebra.Quotient.Defs +import Mathlib.LinearAlgebra.Quotient.Basic /-! # Finiteness of quotient modules diff --git a/LeanPool/PFR/Mathlib/Order/Interval/Finset/Defs.lean b/LeanPool/PFR/Mathlib/Order/Interval/Finset/Defs.lean index 3c4bd7fcc1..1a607d0eda 100644 --- a/LeanPool/PFR/Mathlib/Order/Interval/Finset/Defs.lean +++ b/LeanPool/PFR/Mathlib/Order/Interval/Finset/Defs.lean @@ -8,6 +8,10 @@ module public import Mathlib.Order.Interval.Finset.Defs +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike + /-! # Finite order intervals -/ diff --git a/LeanPool/PFR/MoreRuzsaDist.lean b/LeanPool/PFR/MoreRuzsaDist.lean index 45553e7468..3e88397bf5 100644 --- a/LeanPool/PFR/MoreRuzsaDist.lean +++ b/LeanPool/PFR/MoreRuzsaDist.lean @@ -7,11 +7,15 @@ Authors: PFR contributors module public import LeanPool.PFR.ForMathlib.Entropy.RuzsaDist -public import LeanPool.PFR.HundredPercent -public import LeanPool.PFR.Mathlib.Algebra.BigOperators.Fin -public import LeanPool.PFR.Mathlib.Data.Fin.Basic -public import LeanPool.PFR.Mathlib.MeasureTheory.Group.Arithmetic -public import LeanPool.PFR.Mathlib.Order.Interval.Finset.Fin +import LeanPool.PFR.ForMathlib.Entropy.Group +import LeanPool.PFR.ForMathlib.FiniteRange.IdentDistrib +import LeanPool.PFR.HundredPercent +import LeanPool.PFR.Mathlib.Algebra.BigOperators.Fin +import LeanPool.PFR.Mathlib.Data.Fin.Basic +import LeanPool.PFR.Mathlib.MeasureTheory.Group.Arithmetic +import LeanPool.PFR.Mathlib.Order.Interval.Finset.Fin +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Constructions.Pi +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic /-! # More results about Ruzsa distance @@ -405,19 +409,8 @@ lemma kvm_ineq_III_aux' {X Y Z : Ω → G} [FiniteRange X] [FiniteRange Y] d[X; μ # Y + Z; μ] ≤ d[X; μ # Y; μ] + (2 : ℝ)⁻¹ * (H[Y + Z; μ] - H[Y; μ]) := by obtain ⟨Ω', hΩ', μ', X', Y', Z', hprob, h_indep', hX', hY', hZ', hident_X, hident_Y, hident_Z, hfin_X, hfin_Y, hfin_Z⟩ := independent_copies3_nondep_finiteRange hX hY hZ μ μ μ - -- the argument below could be extracted into a Mathlib lemma - have hident_YZ : IdentDistrib (⟨Y',Z'⟩) (⟨Y, Z⟩) μ' μ := { - aemeasurable_fst := by fun_prop - aemeasurable_snd := by fun_prop - map_eq := by - replace h_indep' : IndepFun Y' Z' μ' := h_indep'.indepFun (show 1 ≠ 2 by simp) - rw [indepFun_iff_map_prod_eq_prod_map_map] at h_indep h_indep' <;> try fun_prop - rw [h_indep, h_indep']; congr 1 - · exact hident_Y.map_eq - exact hident_Z.map_eq - } - replace hident_YZ : IdentDistrib (Y' + Z') (Y + Z) μ' μ := by - convert! hident_YZ.comp measurable_add + have hident_YZ : IdentDistrib (Y' + Z') (Y + Z) μ' μ := + hident_Y.add hident_Z (h_indep'.indepFun (show 1 ≠ 2 by simp)) h_indep rw [←IdentDistrib.rdist_congr hident_X hident_Y, ←IdentDistrib.rdist_congr hident_X hident_YZ, ←IdentDistrib.entropy_congr hident_Y, ←IdentDistrib.entropy_congr hident_YZ] apply kvm_ineq_III_aux _ _ _ h_indep' <;> fun_prop diff --git a/LeanPool/PFR/MultiTauFunctional.lean b/LeanPool/PFR/MultiTauFunctional.lean index 61bdfe4de8..547d1285ed 100644 --- a/LeanPool/PFR/MultiTauFunctional.lean +++ b/LeanPool/PFR/MultiTauFunctional.lean @@ -6,9 +6,9 @@ Authors: PFR contributors module -public import Mathlib.MeasureTheory.Measure.FiniteMeasurePi -public import Mathlib.MeasureTheory.Measure.Prokhorov public import LeanPool.PFR.MoreRuzsaDist +import Mathlib.MeasureTheory.Measure.FiniteMeasurePi +import Mathlib.MeasureTheory.Measure.Prokhorov /-! # The tau functional for multidistance diff --git a/LeanPool/PFR/RhoFunctional.lean b/LeanPool/PFR/RhoFunctional.lean index 415156e1f2..279aa2c0e1 100644 --- a/LeanPool/PFR/RhoFunctional.lean +++ b/LeanPool/PFR/RhoFunctional.lean @@ -6,9 +6,26 @@ Authors: PFR contributors module -public import LeanPool.PFR.ForMathlib.ThreeVariables public import LeanPool.PFR.Kullback -public import LeanPool.PFR.Main +public import LeanPool.PFR.ForMathlib.Entropy.RuzsaDist +import LeanPool.PFR.Endgame +import LeanPool.PFR.Fibring +import LeanPool.PFR.FirstEstimate +import LeanPool.PFR.ForMathlib.Entropy.Group +import LeanPool.PFR.ForMathlib.FourVariables +import LeanPool.PFR.ForMathlib.ThreeVariables +import LeanPool.PFR.HundredPercent +import LeanPool.PFR.Main +import LeanPool.PFR.Mathlib.MeasureTheory.Measure.ProbabilityMeasure +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Analysis.SpecialFunctions.NegMulLog +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Prod +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.ConditionalProbability +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.UniformOn +import Mathlib.Algebra.Module.ZMod +import Mathlib.Combinatorics.Additive.RuzsaCovering +import Mathlib.MeasureTheory.Measure.FiniteMeasureProd +import Mathlib.MeasureTheory.Measure.Prokhorov /-! # The rho functional @@ -237,6 +254,26 @@ private lemma rhoMinus_continuous_aux2 (hA : A.Nonempty) {μ : ProbabilityMeasur contrapose hy exact map_prod_uniformOn_ne_zero hA (fun x ↦ (ν_pos x).ne') +omit [AddCommGroup G] [Finite G] [DiscreteMeasurableSpace G] in +private lemma KLDiv_eq_neg_entropy_sub_sum [Fintype G] + {Ω' : Type*} [MeasurableSpace Ω'] {μ' : Measure Ω'} {Y : Ω' → G} + [IsZeroOrProbabilityMeasure μ] [IsFiniteMeasure μ'] + (habs : ∀ g, μ'.map Y {g} = 0 → μ.map X {g} = 0) : + KL[X; μ # Y; μ'] = + -H[X; μ] - ∑ g, (μ.map X).real {g} * log ((μ'.map Y).real {g}) := by + rw [KLDiv_eq_sum, entropy_eq_sum, tsum_fintype, ← Finset.sum_neg_distrib, + ← Finset.sum_sub_distrib] + congr with g + simp only [negMulLog, neg_mul] + rcases eq_or_ne ((μ.map X).real {g}) 0 with h | h + · simp [h] + rw [log_div] + · ring + · exact h + · contrapose! h + simp only [measureReal_def, ENNReal.toReal_eq_zero_iff, measure_ne_top, or_false] at h ⊢ + exact habs g h + private lemma rhoMinus_continuous_aux3 (hA : A.Nonempty) {μ : ProbabilityMeasure G} {ε : ℝ} (hε : 0 < ε) [TopologicalSpace G] [DiscreteTopology G] : ∀ᶠ (μ' : ProbabilityMeasure G) in 𝓝 μ, ρ⁻[id; μ # A] < ρ⁻[id; μ' # A] + ε := by @@ -298,11 +335,11 @@ private lemma rhoMinus_continuous_aux3 (hA : A.Nonempty) {μ : ProbabilityMeasur have h₃ g (hg : μ.toMeasure.real {g} ≠ 0) : c/2 ≤ μ'.toMeasure.real {g} := by have : c ≤ μ.toMeasure.real {g} := hc _ hg linarith [neg_le_of_abs_le (h₂ g).le] - have : ρ⁻[id; μ' # A] < ρ⁻[id; μ' # A] + δ := by linarith - have : ∃ b ∈ rhoMinusSet id A μ', b < ρ⁻[id; μ' # A] + δ := - (csInf_lt_iff (bddBelow_rhoMinusSet (μ := μ') measurable_id (A := A)) - (nonempty_rhoMinusSet hA (X := id) (μ := μ'))).1 this - rcases this with ⟨-, ⟨ν, νP, h'_abs, rfl⟩, h⟩ + obtain ⟨_, ⟨ν, νP, h'_abs, rfl⟩, h⟩ : + ∃ b ∈ rhoMinusSet id A (μ' : Measure G), b < ρ⁻[id; μ' # A] + δ := + (csInf_lt_iff (s := rhoMinusSet id A (μ' : Measure G)) + (bddBelow_rhoMinusSet (μ := (μ' : Measure G)) (A := A) measurable_id) + (nonempty_rhoMinusSet (μ := (μ' : Measure G)) (X := id) hA)).mp (lt_add_of_pos_right _ δpos) simp only [Measure.map_id] at h'_abs set m := Measure.map (Prod.fst + Prod.snd) (ν.prod (uniformOn A)) with hm have m_nonpos g : log (m {g}).toReal ≤ 0 := by @@ -320,18 +357,9 @@ private lemma rhoMinus_continuous_aux3 (hA : A.Nonempty) {μ : ProbabilityMeasur linarith have I₀ : KL[id; μ' # Prod.fst + Prod.snd; ν.prod (uniformOn A)] = - H[id; (μ' : Measure G)] - ∑ g, μ'.toMeasure.real {g} * log (m.real {g}) := by - rw [KLDiv_eq_sum, entropy_eq_sum, tsum_fintype, ← Finset.sum_neg_distrib, - ← Finset.sum_sub_distrib] - congr with g - simp only [Measure.map_id, negMulLog, neg_mul] - rcases eq_or_ne (μ'.toMeasure.real {g}) 0 with h | h - · simp [h] - rw [log_div, hm] - · ring - · exact h - · contrapose! h - simp only [ne_eq, measure_ne_top, not_false_eq_true, measureReal_eq_zero_iff] at h ⊢ - apply h'_abs _ (by simpa [ENNReal.toReal_eq_zero_iff] using h) + rw [KLDiv_eq_neg_entropy_sub_sum] + · simp only [Measure.map_id, hm] + · simpa only [Measure.map_id] using h'_abs have M g (hg : μ.toMeasure.real {g} ≠ 0) : |log (m.real {g})| ≤ C := by rw [le_div_iff₀' (by positivity)] calc @@ -357,18 +385,9 @@ private lemma rhoMinus_continuous_aux3 (hA : A.Nonempty) {μ : ProbabilityMeasur _ ≤ KL[id; μ # Prod.fst + Prod.snd; ν.prod (uniformOn A)] := rhoMinus_le_def measurable_id (by simpa using h_abs) _ = - H[id; (μ : Measure G)] - ∑ g, μ.toMeasure.real {g} * log (m.real {g}) := by - rw [KLDiv_eq_sum, entropy_eq_sum, tsum_fintype, ← Finset.sum_neg_distrib, - ← Finset.sum_sub_distrib] - congr with g - simp only [Measure.map_id, negMulLog, neg_mul] - rcases eq_or_ne (μ.toMeasure.real {g}) 0 with h | h - · simp [h] - rw [log_div, hm] - · ring - · exact h - · contrapose! h - simp only [measureReal_def, ENNReal.toReal_eq_zero_iff, measure_ne_top, or_false] at h ⊢ - exact h_abs _ h + rw [KLDiv_eq_neg_entropy_sub_sum] + · simp only [Measure.map_id, hm] + · simpa only [Measure.map_id] using h_abs _ ≤ - H[id; (μ : Measure G)] - ∑ g ∈ {g | μ.toMeasure.real {g} ≠ 0}, μ.toMeasure.real {g} * log (m.real {g}) := by gcongr @@ -1913,7 +1932,10 @@ lemma dist_of_min_eq_zero' (hA : A.Nonempty) (hη' : η < 1 / 8) : d[X₁ # X₂ have : 0 ≤ D := sub_nonneg_of_le (I_one_le hη h_min h₁ h₂ h_indep hX₁ hX₂ hX₁' hX₂' hA) apply mul_nonneg _ this exact div_nonneg (by linarith) (by linarith) - have : k ≤ 0 := by nlinarith + have : k ≤ 0 := by + have hfactor : 0 < 1 - 8 * η := by linarith only [hη'] + apply (mul_le_mul_iff_of_pos_left hfactor).mp + linarith only [J₅] exact le_antisymm this (rdist_nonneg hX₁ hX₂) include hX₁ hX₂ h_min hη in diff --git a/LeanPool/PFR/SecondEstimate.lean b/LeanPool/PFR/SecondEstimate.lean index 2b08dcbe0c..6d5ad2ec55 100644 --- a/LeanPool/PFR/SecondEstimate.lean +++ b/LeanPool/PFR/SecondEstimate.lean @@ -6,8 +6,10 @@ Authors: PFR contributors module -public import LeanPool.PFR.ForMathlib.FourVariables -public import LeanPool.PFR.FirstEstimate +public import LeanPool.PFR.TauFunctional +import LeanPool.PFR.Fibring +import LeanPool.PFR.FirstEstimate +import LeanPool.PFR.ForMathlib.FourVariables /-! # Second estimate diff --git a/LeanPool/PFR/Solution.lean b/LeanPool/PFR/Solution.lean index c9d2926406..830f8f41f8 100644 --- a/LeanPool/PFR/Solution.lean +++ b/LeanPool/PFR/Solution.lean @@ -5,13 +5,18 @@ Authors: Terence Tao -/ module -public import Mathlib.Combinatorics.Additive.PluenneckeRuzsa -public import LeanPool.PFR.ApproxHomPFR -public import LeanPool.PFR.HomPFR -public import LeanPool.PFR.Main -public import LeanPool.PFR.RhoFunctional -public import LeanPool.PFR.TorsionEndgame -public import LeanPool.PFR.WeakPFR +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +public import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace.Defs +public import Mathlib.LinearAlgebra.Dimension.Finrank +public import Mathlib.RingTheory.Finiteness.Defs +import LeanPool.PFR.ApproxHomPFR +import LeanPool.PFR.HomPFR +import LeanPool.PFR.Main +import LeanPool.PFR.RhoFunctional +import LeanPool.PFR.TorsionEndgame +import LeanPool.PFR.WeakPFR +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Combinatorics.Additive.PluenneckeRuzsa /-! # Marton's conjecture: proofs diff --git a/LeanPool/PFR/TauFunctional.lean b/LeanPool/PFR/TauFunctional.lean index 867db18841..3ea5c66924 100644 --- a/LeanPool/PFR/TauFunctional.lean +++ b/LeanPool/PFR/TauFunctional.lean @@ -6,8 +6,9 @@ Authors: PFR contributors module -public import Mathlib.MeasureTheory.Measure.Prokhorov public import LeanPool.PFR.ForMathlib.Entropy.RuzsaDist +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.ConditionalProbability +import Mathlib.MeasureTheory.Measure.Prokhorov /-! # The tau functional diff --git a/LeanPool/PFR/TorsionEndgame.lean b/LeanPool/PFR/TorsionEndgame.lean index bf406103aa..3d71d56459 100644 --- a/LeanPool/PFR/TorsionEndgame.lean +++ b/LeanPool/PFR/TorsionEndgame.lean @@ -6,12 +6,16 @@ Authors: PFR contributors module -public import Mathlib.Data.Set.Card -public import Mathlib.Algebra.Group.Pointwise.Finset.BigOperators -public import LeanPool.PFR.Main -public import LeanPool.PFR.Mathlib.Order.Interval.Finset.Defs public import LeanPool.PFR.MultiTauFunctional -public import LeanPool.PFR.BoundingMutual +import LeanPool.PFR.BoundingMutual +import LeanPool.PFR.ForMathlib.Entropy.Group +import LeanPool.PFR.ForMathlib.FiniteRange.IdentDistrib +import LeanPool.PFR.Main +import LeanPool.PFR.Mathlib.MeasureTheory.Group.Arithmetic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic +import Mathlib.Algebra.Group.Pointwise.Finset.BigOperators +import Mathlib.Combinatorics.Additive.RuzsaCovering +import Mathlib.Data.SetLike.Fintype /-! # Endgame for the Torsion PFR theorem @@ -119,19 +123,12 @@ lemma mutual_information_le_t_23 : I[Z2 : Z3 | W] ≤ p.m * (4*p.m+1) * p.η * k let zero : Fin p.m := ⟨0, by linarith [hm]⟩ let X' : Fin p.m × Fin p.m → Ω' → G := fun (i, j) ω ↦ Y (i-j, j) ω have hX'_indep : iIndepFun X' := by - let S : Fin p.m × Fin p.m → Finset (Fin p.m × Fin p.m) := fun (i,j) ↦ {(i-j,j)} - let φ : (q:Fin p.m × Fin p.m) → ((_: S q) → G) → G := fun q x ↦ x ⟨(q.1-q.2,q.2), by simp [S]⟩ - convert iIndepFun.finsets_comp S _ h_indep (by fun_prop) φ (by fun_prop) with i ω - rw [Finset.pairwiseDisjoint_iff]; rintro ⟨i,j⟩ _ ⟨i',j'⟩ _ ⟨⟨i₀, j₀⟩, hij⟩ - simp only [Finset.mem_inter, Finset.mem_singleton, Prod.mk.injEq, S] at hij - obtain ⟨⟨rfl, rfl⟩, h1, rfl⟩ := hij - simpa using h1 - have hindep_j (j: Fin p.m) : iIndepFun (fun i ↦ X' (i, j)) := by - let S : Fin p.m → Finset (Fin p.m × Fin p.m) := fun i ↦ {(i,j)} - let φ : (i:Fin p.m) → ((_: S i) → G) → G := fun i x ↦ x ⟨(i,j), by simp [S]⟩ - convert iIndepFun.finsets_comp S _ hX'_indep (by fun_prop) φ (by fun_prop) with i ω - rw [Finset.pairwiseDisjoint_iff]; rintro _ _ _ _ ⟨⟨_, _⟩, hij⟩ - simp [S] at hij; omega + apply h_indep.precomp (g := fun q : Fin p.m × Fin p.m ↦ (q.1 - q.2, q.2)) + rintro ⟨i, j⟩ ⟨i', j'⟩ h + obtain ⟨hij, rfl⟩ := Prod.mk.inj h + exact Prod.ext (by simpa using hij) rfl + have hindep_j (j : Fin p.m) : iIndepFun (fun i ↦ X' (i, j)) := + hX'_indep.precomp (g := fun i ↦ (i, j)) (fun _ _ h ↦ congrArg Prod.fst h) have := mutual_information_le (by fun_prop) (indep_yj h_mes h_indep zero) ?_ (by fun_prop) hX'_indep ?_ · have k_eq : k = D[fun i ω ↦ Y (i, zero) ω; fun x ↦ hΩ'] := by @@ -184,19 +181,12 @@ lemma mutual_information_le_t_13 : I[Z1 : Z3 | W] ≤ p.m * (4*p.m+1) * p.η * k let zero : Fin p.m := ⟨0, by linarith [hm]⟩ let X' : Fin p.m × Fin p.m → Ω' → G := fun (i, j) ω ↦ Y (i, j-i) ω have hX'_indep : iIndepFun X' := by - let S : Fin p.m × Fin p.m → Finset (Fin p.m × Fin p.m) := fun (i,j) ↦ {(i,j-i)} - let φ : (q:Fin p.m × Fin p.m) → ((_: S q) → G) → G := fun q x ↦ x ⟨(q.1,q.2-q.1), by simp [S]⟩ - convert iIndepFun.finsets_comp S _ h_indep (by fun_prop) φ (by fun_prop) with i ω - rw [Finset.pairwiseDisjoint_iff]; rintro ⟨i,j⟩ _ ⟨i',j'⟩ _ ⟨⟨i₀, j₀⟩, hij⟩ - simp only [Finset.mem_inter, Finset.mem_singleton, Prod.mk.injEq, S] at hij - obtain ⟨⟨rfl, rfl⟩, rfl, h2⟩ := hij - simpa using h2 - have hindep_j (j: Fin p.m) : iIndepFun (fun i ↦ X' (i, j)) := by - let S : Fin p.m → Finset (Fin p.m × Fin p.m) := fun i ↦ {(i,j)} - let φ : (i:Fin p.m) → ((_: S i) → G) → G := fun i x ↦ x ⟨(i,j), by simp [S]⟩ - convert iIndepFun.finsets_comp S _ hX'_indep (by fun_prop) φ (by fun_prop) with i ω - rw [Finset.pairwiseDisjoint_iff]; rintro _ _ _ _ ⟨⟨_, _⟩, hij⟩ - simp [S] at hij; omega + apply h_indep.precomp (g := fun q : Fin p.m × Fin p.m ↦ (q.1, q.2 - q.1)) + rintro ⟨i, j⟩ ⟨i', j'⟩ h + obtain ⟨rfl, hij⟩ := Prod.mk.inj h + exact Prod.ext rfl (by simpa using hij) + have hindep_j (j : Fin p.m) : iIndepFun (fun i ↦ X' (i, j)) := + hX'_indep.precomp (g := fun i ↦ (i, j)) (fun _ _ h ↦ congrArg Prod.fst h) have hindep_yj (j: Fin p.m) : iIndepFun (fun i ↦ Y (i, j)) := indep_yj h_mes h_indep j have := mutual_information_le (by fun_prop) (hindep_yj zero) ?_ (by fun_prop) hX'_indep ?_ · have k_eq : k = D[fun i ω ↦ Y (i, zero) ω; fun x ↦ hΩ'] := by @@ -494,13 +484,12 @@ lemma sum_of_conditional_distance_le : ∑ i, d[ X i # Z2 | W] ≤ 4 * (p.m^3 - rw [← hident₁.entropy_congr, ← hident₀.rdist_congr hident₁, ← hident₀.rdist_congr (.refl (by fun_prop))] convert kvm_ineq_III hs₀ hs₁ h01 Y' h_mes_Y' _ - let S : Fin p.m × Fin p.m → Finset (Fin p.m × Fin p.m) := fun q ↦ {q} - let φ : (q:Fin p.m × Fin p.m) → ((_: S q) → G) → G := - fun q x ↦ if q = i₀ then x ⟨q, by simp [S]⟩ else q.2.val • x ⟨q, by simp [S]⟩ - convert iIndepFun.finsets_comp S _ h_indep (by fun_prop) φ (by fun_prop) with q ω - · by_cases h : q = i₀ <;> simp [φ,Y',h] - rw [Finset.pairwiseDisjoint_iff]; rintro _ _ _ _ ⟨⟨_, _⟩, hij⟩ - simp [S] at hij; grind + convert h_indep.comp (fun q (x : G) ↦ if q = i₀ then x else q.2.val • x) + (fun q ↦ by + by_cases hq : q = i₀ <;> + simp only [hq, ite_true, ite_false] <;> fun_prop) using 1 + funext q ω + by_cases hq : q = i₀ <;> simp [Y', hq] exact mutual_of_W_Z_two_le _ h_mes h_indep hident _ = _ := by ring _ = ∑ i, d[ X i # X i] + p.m * H[Z2] / 2 - (∑ i, H[X i]) / 2 + p.m * (p.m -1) * k := by diff --git a/LeanPool/PFR/WeakPFR.lean b/LeanPool/PFR/WeakPFR.lean index 2c0b642cc2..1bd87b6d39 100644 --- a/LeanPool/PFR/WeakPFR.lean +++ b/LeanPool/PFR/WeakPFR.lean @@ -6,17 +6,17 @@ Authors: PFR contributors module -public import Mathlib.GroupTheory.Coset.Card -public import Mathlib.LinearAlgebra.Dimension.FreeAndStrongRankCondition -public import Mathlib.LinearAlgebra.FreeModule.ModN -public import Mathlib.LinearAlgebra.FreeModule.PID public import Mathlib.MeasureTheory.Constructions.SubmoduleQuotient public import LeanPool.PFR.ForMathlib.AffineSpaceDim public import LeanPool.PFR.ForMathlib.Entropy.RuzsaSetDist -public import LeanPool.PFR.ImprovedPFR -public import LeanPool.PFR.Mathlib.Algebra.Group.Action.Pointwise.Set.Basic -public import LeanPool.PFR.Mathlib.LinearAlgebra.Dimension.FreeAndStrongRankCondition -public import LeanPool.PFR.Mathlib.LinearAlgebra.Quotient.Basic +import LeanPool.PFR.Fibring +import LeanPool.PFR.ForMathlib.FiniteRange.IdentDistrib +import LeanPool.PFR.ImprovedPFR +import LeanPool.PFR.Mathlib.Algebra.Group.Action.Pointwise.Set.Basic +import LeanPool.PFR.Mathlib.LinearAlgebra.Dimension.FreeAndStrongRankCondition +import LeanPool.PFR.Mathlib.LinearAlgebra.Quotient.Basic +import Mathlib.LinearAlgebra.FreeModule.ModN +import Mathlib.LinearAlgebra.FreeModule.PID /-! # Weak PFR over the integers diff --git a/LeanPool/PLAcceleratedNesterovLean.lean b/LeanPool/PLAcceleratedNesterovLean.lean index 19e95e94ca..7edaa53c85 100644 --- a/LeanPool/PLAcceleratedNesterovLean.lean +++ b/LeanPool/PLAcceleratedNesterovLean.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core -import LeanPool.PLAcceleratedNesterovLean.MorseBott -import LeanPool.PLAcceleratedNesterovLean.Convergence -import LeanPool.PLAcceleratedNesterovLean.MainTheorem +public import LeanPool.PLAcceleratedNesterovLean.Core +public import LeanPool.PLAcceleratedNesterovLean.MorseBott +public import LeanPool.PLAcceleratedNesterovLean.Convergence +public import LeanPool.PLAcceleratedNesterovLean.MainTheorem /-! # Accelerated Nesterov convergence under local Polyak-Lojasiewicz conditions @@ -20,6 +21,8 @@ Tags: optimization, numerical-analysis, gradient-methods, polyak-lojasiewicz, di MSC: 49M37, 65K05, 58C15 -/ +@[expose] public section + /-! This project formalizes accelerated Nesterov convergence under a local Polyak-Lojasiewicz condition near a smooth minimizer manifold, including public diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence.lean index 58cd5e9491..6ed1ab8dc3 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence.lean @@ -3,22 +3,25 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Convergence.Bootstrap -import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity -import LeanPool.PLAcceleratedNesterovLean.Convergence.ConvergenceHelpers -import LeanPool.PLAcceleratedNesterovLean.Convergence.CurvAbsorb -import LeanPool.PLAcceleratedNesterovLean.Convergence.GenLocalArgument -import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalArgument -import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction -import LeanPool.PLAcceleratedNesterovLean.Convergence.MainTheoremInternal -import LeanPool.PLAcceleratedNesterovLean.Convergence.MotionError -import LeanPool.PLAcceleratedNesterovLean.Convergence.NesterovConvergence -import LeanPool.PLAcceleratedNesterovLean.Convergence.PhaseSchedule -import LeanPool.PLAcceleratedNesterovLean.Convergence.RateArithmetic -import LeanPool.PLAcceleratedNesterovLean.Convergence.StateContraction +public import LeanPool.PLAcceleratedNesterovLean.Convergence.Bootstrap +public import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity +public import LeanPool.PLAcceleratedNesterovLean.Convergence.ConvergenceHelpers +public import LeanPool.PLAcceleratedNesterovLean.Convergence.CurvAbsorb +public import LeanPool.PLAcceleratedNesterovLean.Convergence.GenLocalArgument +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalArgument +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction +public import LeanPool.PLAcceleratedNesterovLean.Convergence.MainTheoremInternal +public import LeanPool.PLAcceleratedNesterovLean.Convergence.MotionError +public import LeanPool.PLAcceleratedNesterovLean.Convergence.NesterovConvergence +public import LeanPool.PLAcceleratedNesterovLean.Convergence.PhaseSchedule +public import LeanPool.PLAcceleratedNesterovLean.Convergence.RateArithmetic +public import LeanPool.PLAcceleratedNesterovLean.Convergence.StateContraction /-! # Convergence proof for PL-accelerated Nesterov convergence -/ + +@[expose] public section diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap.lean index 1632b8c20f..43652c1062 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Convergence.Bootstrap.Main -import LeanPool.PLAcceleratedNesterovLean.Convergence.Bootstrap.Step1 -import LeanPool.PLAcceleratedNesterovLean.Convergence.Bootstrap.Step2 +public import LeanPool.PLAcceleratedNesterovLean.Convergence.Bootstrap.Main +public import LeanPool.PLAcceleratedNesterovLean.Convergence.Bootstrap.Step1 +public import LeanPool.PLAcceleratedNesterovLean.Convergence.Bootstrap.Step2 /-! # Bootstrap estimates for PL-accelerated Nesterov convergence -/ + +@[expose] public section diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap/Main.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap/Main.lean index 36e9a9a300..5fe156d784 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap/Main.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap/Main.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs import LeanPool.PLAcceleratedNesterovLean.Convergence.Bootstrap.Step1 import LeanPool.PLAcceleratedNesterovLean.Convergence.Bootstrap.Step2 @@ -17,6 +18,8 @@ all iterates remain in the controlled region Ω and the Lyapunov function decays geometrically. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap/Step1.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap/Step1.lean index 341c89ab48..03a1c8abb7 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap/Step1.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap/Step1.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +public import LeanPool.PLAcceleratedNesterovLean.Core.Defs /-! # Bootstrap Step 1: Geometric Decay by Induction @@ -19,6 +20,8 @@ S_a = Σ_{k=0}^∞ (1-a/2)^{k/2} = 1/(1-√(1-a/2)) is finite for a > 0. Σ_{k=1}^n ‖h_k‖ ≤ C_h √η Σ_{k=1}^n √L_k ≤ C_h √η · R · S_a -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap/Step2.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap/Step2.lean index 04b25c56ad..a9d89dcf36 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap/Step2.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/Bootstrap/Step2.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +public import LeanPool.PLAcceleratedNesterovLean.Core.Defs /-! # Bootstrap Step 2: Choosing α and Closing the Induction @@ -22,6 +23,8 @@ Assuming all iterates up to n stay in Ω with Lyapunov ≤ R²: So x_{n+1} ∈ Ω -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity.lean index 05012932b0..7bea6c65c1 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Core -import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Main -import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Step1 -import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Step2 +public import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Core +public import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Main +public import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Step1 +public import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Step2 /-! # Lyapunov coercivity estimates -/ + +@[expose] public section diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Core.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Core.lean index 5ca47ca883..fcf022fcde 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Core.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Core.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import Mathlib.Basic.Real.Basic import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Step2 +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Coercivity Core Bound @@ -13,6 +20,8 @@ Proves that `(1 - a)² * (V² + μ' * E²) ≤ 60 * Ln` by resolving coupled norm inequalities from the Nesterov accelerated gradient descent analysis. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Main.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Main.lean index 49abda8073..6a8ca61c07 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Main.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Main.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Step1 -import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Step2 +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Core -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen +import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Step1 /-! # Lyapunov Coercivity @@ -16,6 +16,8 @@ The Lyapunov function L_n controls the physical quantities ‖v_n‖² + μ'‖e and the potential Ψ(x_n). The constants depend only on a = √(μ'·η). -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Step1.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Step1.lean index 6972eceb31..57dcc0a6b1 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Step1.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Step1.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen /-! # Coercivity Step 1: Extract Component Bounds from Lyapunov Definition @@ -21,6 +21,8 @@ Then from u_n = P⊥v_n + √μ' e_n (triangle inequality): And T_n := ‖P v_n‖ ≤ √(L_n/λ). -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Step2.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Step2.lean index 3ffbb70afb..0c53e30276 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Step2.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/Coercivity/Step2.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +public import Mathlib.Basic.Real.Basic +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Coercivity Step 2: Resolve Coupled Bounds on A_n and B_n @@ -27,6 +33,8 @@ Finally: Also: Ψ(x_n) ≤ C_Ψ · L_n follows from dist(x_n, M) ≤ √η‖v_n‖ + ‖e_n‖. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/ConvergenceHelpers.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/ConvergenceHelpers.lean index 710ac60435..e6f83f3f08 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/ConvergenceHelpers.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/ConvergenceHelpers.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import LeanPool.PLAcceleratedNesterovLean.Convergence.PhaseSchedule +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs import LeanPool.PLAcceleratedNesterovLean.Convergence.GenLocalArgument -import LeanPool.PLAcceleratedNesterovLean.Convergence.PhaseSchedule -import LeanPool.PLAcceleratedNesterovLean.Convergence.RateArithmetic -import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Step1 /-! # Helpers for single-phase convergence proof @@ -21,6 +22,8 @@ bounds and phase transitions. 2. `gen_at_every_phase` — gen theorem at any m ∈ S for any phase k ≥ 1 -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/CurvAbsorb.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/CurvAbsorb.lean index 25dc4fd2c5..85313a2572 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/CurvAbsorb.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/CurvAbsorb.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Convergence.CurvAbsorb.Algebraic -import LeanPool.PLAcceleratedNesterovLean.Convergence.CurvAbsorb.Assembly +public import LeanPool.PLAcceleratedNesterovLean.Convergence.CurvAbsorb.Algebraic +public import LeanPool.PLAcceleratedNesterovLean.Convergence.CurvAbsorb.Assembly /-! # Curvature absorption estimates -/ + +@[expose] public section diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/CurvAbsorb/Algebraic.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/CurvAbsorb/Algebraic.lean index 0e89b259b1..4a724f5ad4 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/CurvAbsorb/Algebraic.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/CurvAbsorb/Algebraic.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +import Mathlib.Analysis.Calculus.MeanValue /-! @@ -17,6 +19,8 @@ These establish the key perturbation bounds: 3. Kills-normal bound: ‖P en‖ ≤ ε₁·‖en‖ -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/CurvAbsorb/Assembly.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/CurvAbsorb/Assembly.lean index ac417b7caa..18c2a70b76 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/CurvAbsorb/Assembly.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/CurvAbsorb/Assembly.lean @@ -8,10 +8,11 @@ Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster Copyright (c) 2025. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. -/ +module + +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen import LeanPool.PLAcceleratedNesterovLean.Convergence.CurvAbsorb.Algebraic -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen import LeanPool.PLAcceleratedNesterovLean.Convergence.StateContraction.AuxVarRecursion -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.AuxVar /-! # Curvature Absorption Assembly @@ -23,6 +24,8 @@ The key idea: Dπ is continuous at m⋆, so for small enough R, all perturbation terms are O(ε₁ · Ln) with ε₁ = sup ‖Dπ-P‖ → 0. -/ +@[expose] public section + open scoped NNReal noncomputable section @@ -33,423 +36,73 @@ variable {d : ℕ} -- Notation for ℝ^d local notation "E" => EuclideanSpace ℝ (Fin d) --- Assembly involves many sub-lemma calls requiring extra elaboration -/-- Assembly of the curvature absorption bound. +private theorem leSqrtMulSqrtOfSquareLe {a C L : ℝ} (ha : 0 ≤ a) (hC : 0 ≤ C) + (hab : a ^ 2 ≤ C * L) : a ≤ Real.sqrt C * Real.sqrt L := by + calc a = Real.sqrt (a ^ 2) := (Real.sqrt_sq ha).symm + _ ≤ Real.sqrt (C * L) := Real.sqrt_le_sqrt hab + _ = Real.sqrt C * Real.sqrt L := Real.sqrt_mul hC L -Given coercivity bounds, Dπ continuity at m⋆, and the algebraic lemmas -(xi_bound_mvt, proj_normal_bound, nesterov_step_bound, auxVar_recursion), -choose R_abs > 0 so that within B(m⋆, R_abs) with L_n ≤ R_abs², -the total perturbation δ_curv + proj_err ≤ θ·a · L_n. +private theorem existsScaledRadius (a b c e M : ℝ) + (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) (he : 0 < e) (hM : 1 ≤ M) : + ∃ radius > 0, radius ≤ a ∧ M * radius < b ∧ M * radius < c ∧ M * radius < e := by + let δ := min (min (min a b) c) e + have hδ : 0 < δ := lt_min (lt_min (lt_min ha hb) hc) he + have hden : 0 < M + 1 := by linarith + let radius := δ / (M + 1) + have hradius : 0 < radius := div_pos hδ hden + have hscaled : (M + 1) * radius = δ := mul_div_cancel₀ _ (ne_of_gt hden) + have hsmall : M * radius < δ := by nlinarith + have hle : radius ≤ δ := div_le_self (le_of_lt hδ) (by linarith) + have hδa : δ ≤ a := (min_le_left _ _).trans ((min_le_left _ _).trans (min_le_left _ _)) + have hδb : δ ≤ b := (min_le_left _ _).trans ((min_le_left _ _).trans (min_le_right _ _)) + have hδc : δ ≤ c := (min_le_left _ _).trans (min_le_right _ _) + exact ⟨radius, hradius, hle.trans hδa, hsmall.trans_le hδb, hsmall.trans_le hδc, + hsmall.trans_le (min_le_right _ _)⟩ -This is the formal curvature-absorption step: continuity -of `Dπ` near the base minimizer makes both the curvature error and the -projector-freezing term smaller than the chosen `θ`-fraction of the affine -decrement. -/ -private abbrev curvAbsorbAssemblyProof - (f : E → ℝ) (L : ℝ≥0) (hL : 0 < (L : ℝ)) - (μ' : ℝ) (hμ' : 0 < μ') - (θ : ℝ) (hθ_pos : 0 < θ) - (η ρ : ℝ) - (hη_pos : 0 < η) - (hμη_lt1 : μ' * η < 1) - (hρ_eq : ρ = (1 - Real.sqrt (μ' * η)) / (1 + Real.sqrt (μ' * η))) - (S : Set E) - (π : E → E) - (P : E →L[ℝ] E) +private theorem orthogonalCombinationBound (P : E →L[ℝ] E) (hP_ortho : ∀ v : E, ‖v‖ ^ 2 = ‖P v‖ ^ 2 + ‖v - P v‖ ^ 2) - (mstar : E) (hmstar : mstar ∈ S) - (hP_eq : P = fderiv ℝ π mstar) - (U_plus : Set E) (hU_open : IsOpen U_plus) (hm_in : mstar ∈ U_plus) - (U : Set E) (hU_isopen : IsOpen U) (hU_sub : closure U_plus ⊆ U) - (hf_lip : LipschitzOnWith L (gradient f) U) - (hS_sub_U : S ⊆ U) - (hmstar_U : mstar ∈ U) - (hπ_on_U : ∀ x ∈ U, π x ∈ S ∧ dist x (π x) = Metric.infDist x S) - (hDπ_cont : ContinuousAt (fun x => fderiv ℝ π x) mstar) - (C_coer : ℝ) (hC_coer : 0 < C_coer) - (hcoer_bound : ∀ (x₁ : E) (n : ℕ), - (nesterovSeq f η ρ x₁ n).x ∈ U_plus → - (nesterovSeq f η ρ x₁ n).lookahead η ∈ U_plus → - ‖(nesterovSeq f η ρ x₁ n).v‖ ^ 2 + - μ' * ‖normalDisp π f η ρ x₁ n‖ ^ 2 ≤ - C_coer * lyapunov P μ' π f η ρ x₁ n) - (hπ_kills_normal : ∀ x ∈ U_plus, fderiv ℝ π (π x) (x - π x) = 0) - (hgrad_zero : ∀ x ∈ S, gradient f x = 0) - (hπ_diff_near : ∃ δ_diff > 0, ∀ z ∈ Metric.ball mstar δ_diff, DifferentiableAt ℝ π z) : - ∃ R_abs : ℝ, 0 < R_abs ∧ ∀ (x₁ : E) (n : ℕ), - (nesterovSeq f η ρ x₁ n).x ∈ Metric.ball mstar R_abs → - (nesterovSeq f η ρ x₁ n).lookahead η ∈ Metric.ball mstar R_abs → - lyapunov P μ' π f η ρ x₁ n ≤ R_abs ^ 2 → - let sn := nesterovSeq f η ρ x₁ n - let gn := gradient f (sn.lookahead η) - let en := sn.lookahead η - π (sn.lookahead η) - let ξn := curvatureError (↑P) π f η ρ x₁ n - let un1 := auxVar P μ' π f η ρ x₁ (n + 1) - let wn := un1 - Real.sqrt μ' • ξn - let δ_curv := Real.sqrt μ' * @inner ℝ _ _ wn ξn + - (Real.sqrt μ') ^ 2 / 2 * ‖ξn‖ ^ 2 - let a := Real.sqrt (μ' * η) - let Ln := lyapunov P μ' π f η ρ x₁ n - let proj_err := a * abs (@inner ℝ _ _ gn (P en)) - δ_curv + proj_err ≤ θ * a * Ln := by - -- Derived positivity - have hη_nn : (0 : ℝ) ≤ η := le_of_lt hη_pos - have hμ'_pos : (0 : ℝ) < μ' := hμ' - set sm := Real.sqrt μ' - set sa := Real.sqrt (μ' * η) - have hsm_pos : (0 : ℝ) < sm := Real.sqrt_pos_of_pos hμ'_pos - have hsm_nn : (0 : ℝ) ≤ sm := le_of_lt hsm_pos - have hsa_pos : (0 : ℝ) < sa := Real.sqrt_pos_of_pos (mul_pos hμ'_pos hη_pos) - have hsa_lt1 : sa < 1 := by - calc sa < Real.sqrt 1 := Real.sqrt_lt_sqrt (le_of_lt (mul_pos hμ'_pos hη_pos)) hμη_lt1 - _ = 1 := Real.sqrt_one - -- Energy constants from coercivity: ‖v‖² + μ'·‖e‖² ≤ C_coer·Ln - let Ce := Real.sqrt (C_coer / μ') - let Cg := (↑L : ℝ) * Ce - let Cv := Real.sqrt C_coer - let Ch := η * Cg + Real.sqrt η * |ρ| * (Cv + Real.sqrt η * Cg) - let Cw := Cv + sm * Ce + Real.sqrt η * Cg - have hCe_nn : (0 : ℝ) ≤ Ce := Real.sqrt_nonneg _ - have hCg_nn : (0 : ℝ) ≤ Cg := mul_nonneg (NNReal.coe_nonneg L) hCe_nn - have hCv_nn : (0 : ℝ) ≤ Cv := Real.sqrt_nonneg _ - have hCh_nn : (0 : ℝ) ≤ Ch := - add_nonneg (mul_nonneg hη_nn hCg_nn) - (mul_nonneg (mul_nonneg (Real.sqrt_nonneg η) (abs_nonneg ρ)) - (add_nonneg hCv_nn (mul_nonneg (Real.sqrt_nonneg η) hCg_nn))) - have hCw_nn : (0 : ℝ) ≤ Cw := - add_nonneg (add_nonneg hCv_nn (mul_nonneg hsm_nn hCe_nn)) - (mul_nonneg (Real.sqrt_nonneg η) hCg_nn) - -- K: total perturbation constant (with +1 slack for strict inequality) - let K := sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2 + sa * Cg * Ce + 1 - have hK_pos : (0 : ℝ) < K := by - change (0 : ℝ) < sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2 + sa * Cg * Ce + 1 - have := mul_nonneg (mul_nonneg hsm_nn hCw_nn) hCh_nn - have := mul_nonneg (div_nonneg (sq_nonneg sm) (by norm_num : (0:ℝ) ≤ 2)) (sq_nonneg Ch) - have := mul_nonneg (mul_nonneg (le_of_lt hsa_pos) hCg_nn) hCe_nn - linarith - -- ε₁ = min(1, θ·sa/K) - let ε₁ := min 1 (θ * sa / K) - have hε₁_pos : (0 : ℝ) < ε₁ := lt_min one_pos (div_pos (mul_pos hθ_pos hsa_pos) hK_pos) - have hε₁_le1 : ε₁ ≤ 1 := min_le_left _ _ - have hε₁K_le : ε₁ * K ≤ θ * sa := by - calc ε₁ * K ≤ θ * sa / K * K := by gcongr; exact min_le_right _ _ - _ = θ * sa := by - rw [div_mul_cancel₀ _ (ne_of_gt hK_pos)] - -- Get δ_Dπ from Dπ continuity at mstar - -- Since P = fderiv ℝ π mstar, this gives ‖fderiv ℝ π z - P‖ < ε₁ near mstar - rw [Metric.continuousAt_iff] at hDπ_cont - obtain ⟨δ_Dπ, hδ_Dπ_pos, hδ_Dπ⟩ := hDπ_cont ε₁ hε₁_pos - -- Get δ_Up with B(mstar, δ_Up) ⊆ U_plus - obtain ⟨δ_Up, hδ_Up_pos, hδ_Up_sub⟩ := Metric.isOpen_iff.mp hU_open mstar hm_in - -- Get δ_U with B(mstar, δ_U) ⊆ U - obtain ⟨δ_U, hδ_U_pos, hδ_U_sub⟩ := Metric.isOpen_iff.mp hU_isopen mstar hmstar_U - -- Get δ_diff with differentiability on B(mstar, δ_diff) - obtain ⟨δ_diff, hδ_diff_pos, hπ_diff_ball⟩ := hπ_diff_near - -- Expansion factor: dist(πx, m*) ≤ 2·dist(x, m*), dist(x'n1, m*) ≤ (1+Ch)·R - let M := 2 + Ch + 1 - have hM_ge3 : (3 : ℝ) ≤ M := by linarith [hCh_nn] - -- R₀ ensures all relevant points are in B(mstar, δ_Dπ) ∩ U ∩ diff ball - let R₀ := min (min (min δ_Up δ_U) δ_Dπ) δ_diff / (M + 1) - have hMp1_pos : (0 : ℝ) < M + 1 := by linarith [hCh_nn] - have hR₀_pos : (0 : ℝ) < R₀ := - div_pos (lt_min (lt_min (lt_min hδ_Up_pos hδ_U_pos) hδ_Dπ_pos) hδ_diff_pos) hMp1_pos - refine ⟨R₀, hR₀_pos, ?_⟩ - intro x₁ n hsx hslx hLn_le - -- Abbreviations - set sn := nesterovSeq f η ρ x₁ n - set x'n := sn.lookahead η - set gn := gradient f x'n - set en := x'n - π x'n - set hn := nesterovH f η ρ x₁ n - set ξn := curvatureError (↑P) π f η ρ x₁ n - set un1 := auxVar P μ' π f η ρ x₁ (n + 1) - set wn := un1 - sm • ξn - set Ln := lyapunov P μ' π f η ρ x₁ n - -- R₀ ≤ various δ's - have hMp1R₀ : (M + 1) * R₀ = min (min (min δ_Up δ_U) δ_Dπ) δ_diff := - mul_div_cancel₀ _ (ne_of_gt hMp1_pos) - have hR₀_le_δUp : R₀ ≤ δ_Up := by - calc R₀ ≤ (M + 1) * R₀ := - le_mul_of_one_le_left (le_of_lt hR₀_pos) (by linarith [hCh_nn]) - _ = min (min (min δ_Up δ_U) δ_Dπ) δ_diff := hMp1R₀ - _ ≤ min (min δ_Up δ_U) δ_Dπ := min_le_left _ _ - _ ≤ min δ_Up δ_U := min_le_left _ _ - _ ≤ δ_Up := min_le_left _ _ - have hMR₀_lt_min : M * R₀ < min (min (min δ_Up δ_U) δ_Dπ) δ_diff := by - linarith [hR₀_pos] - have hMR₀_lt_δDπ : M * R₀ < δ_Dπ := - lt_of_lt_of_le hMR₀_lt_min - ((min_le_left _ _).trans (min_le_right _ _)) - have hMR₀_lt_δU : M * R₀ < δ_U := - lt_of_lt_of_le hMR₀_lt_min - ((min_le_left _ _).trans - ((min_le_left _ _).trans (min_le_right _ _))) - have hMR₀_lt_δdiff : M * R₀ < δ_diff := - lt_of_lt_of_le hMR₀_lt_min (min_le_right _ _) - -- Location in U_plus and U - have hx'n_Up : x'n ∈ U_plus := - hδ_Up_sub (Metric.ball_subset_ball hR₀_le_δUp hslx) - have hx'n_U : x'n ∈ U := hU_sub (subset_closure hx'n_Up) - have hsx_Up : sn.x ∈ U_plus := - hδ_Up_sub (Metric.ball_subset_ball hR₀_le_δUp hsx) - -- Dπ bound: any z with dist(z, m*) < M·R₀ has ‖Dπ(z) - P‖ ≤ ε₁ and z ∈ U - have hDπ_in_MR₀ : ∀ z, dist z mstar < M * R₀ → - ‖fderiv ℝ π z - P‖ ≤ ε₁ ∧ z ∈ U := by - intro z hz - constructor - · have h := hδ_Dπ (lt_trans hz hMR₀_lt_δDπ) - rw [dist_eq_norm, ← hP_eq] at h; exact le_of_lt h - · exact hδ_U_sub (Metric.mem_ball.mpr (lt_trans hz hMR₀_lt_δU)) - -- Coercivity at step n - have hcoer := hcoer_bound x₁ n hsx_Up hx'n_Up - have hnd : normalDisp π f η ρ x₁ n = en := rfl - rw [hnd] at hcoer - -- ‖v‖² ≤ C_coer·Ln, ‖e‖² ≤ C_coer/μ'·Ln - have hv_sq : ‖sn.v‖ ^ 2 ≤ C_coer * Ln := by - have := mul_nonneg (le_of_lt hμ'_pos) (sq_nonneg ‖en‖); linarith - have he_sq : ‖en‖ ^ 2 ≤ C_coer / μ' * Ln := by - have h1 : μ' * ‖en‖ ^ 2 ≤ C_coer * Ln := by have := sq_nonneg ‖sn.v‖; linarith - rw [div_mul_eq_mul_div] - exact (le_div_iff₀ hμ'_pos).mpr (by linarith) - -- Ln ≥ 0 - have hLn_nn : (0 : ℝ) ≤ Ln := by - have h1 := sq_nonneg ‖sn.v‖ - have h2 := mul_nonneg (le_of_lt hμ'_pos) (sq_nonneg ‖en‖) - exact nonneg_of_mul_nonneg_left (by linarith) hC_coer - -- √Ln ≤ R₀ - have hLn_sqrt : Real.sqrt Ln ≤ R₀ := by - calc Real.sqrt Ln ≤ Real.sqrt (R₀ ^ 2) := Real.sqrt_le_sqrt hLn_le - _ = R₀ := Real.sqrt_sq (le_of_lt hR₀_pos) - -- Key helper: √Ln * √Ln = Ln - have hsqrt_sq : Real.sqrt Ln * Real.sqrt Ln = Ln := Real.mul_self_sqrt hLn_nn - -- Helper: a² ≤ C·L → a ≤ √C · √L - have sqrt_bound : ∀ {a C L : ℝ}, 0 ≤ a → 0 ≤ C → 0 ≤ L → - a ^ 2 ≤ C * L → a ≤ Real.sqrt C * Real.sqrt L := by - intro a C L ha hC hL hab - calc a = Real.sqrt (a ^ 2) := (Real.sqrt_sq ha).symm - _ ≤ Real.sqrt (C * L) := Real.sqrt_le_sqrt hab - _ = Real.sqrt C * Real.sqrt L := Real.sqrt_mul hC L - -- ‖e‖ ≤ Ce·√Ln, ‖v‖ ≤ Cv·√Ln - have he_bound : ‖en‖ ≤ Ce * Real.sqrt Ln := - sqrt_bound (norm_nonneg _) (div_nonneg (le_of_lt hC_coer) (le_of_lt hμ'_pos)) hLn_nn he_sq - have hv_bound : ‖sn.v‖ ≤ Cv * Real.sqrt Ln := - sqrt_bound (norm_nonneg _) (le_of_lt hC_coer) hLn_nn hv_sq - -- ‖g‖ ≤ L·‖e‖ (gradient Lipschitz + ∇f|_S = 0) - have hgn_bound : ‖gn‖ ≤ (↑L : ℝ) * ‖en‖ := by - have := hf_lip.dist_le_mul x'n (hU_sub (subset_closure hx'n_Up)) - (π x'n) (hS_sub_U (hπ_on_U x'n hx'n_U).1) - rwa [hgrad_zero (π x'n) (hπ_on_U x'n hx'n_U).1, dist_zero_right, dist_eq_norm] at this - have hg_bound : ‖gn‖ ≤ Cg * Real.sqrt Ln := by - calc ‖gn‖ ≤ (↑L : ℝ) * ‖en‖ := hgn_bound - _ ≤ (↑L : ℝ) * (Ce * Real.sqrt Ln) := by gcongr - _ = Cg * Real.sqrt Ln := by ring - -- ‖h‖ ≤ Ch·√Ln (nesterov_step_bound) - have hhn_bound : ‖hn‖ ≤ Ch * Real.sqrt Ln := by - change ‖nesterovH f η ρ x₁ n‖ ≤ _ - unfold nesterovH - rw [show nesterovSeq f η ρ x₁ (n + 1) = - nesterovStep f η ρ (nesterovSeq f η ρ x₁ n) from rfl] - calc ‖(nesterovStep f η ρ (nesterovSeq f η ρ x₁ n)).lookahead η - - (nesterovSeq f η ρ x₁ n).lookahead η‖ - ≤ η * ‖gradient f ((nesterovSeq f η ρ x₁ n).lookahead η)‖ + - Real.sqrt η * |ρ| * (‖(nesterovSeq f η ρ x₁ n).v‖ + - Real.sqrt η * ‖gradient f ((nesterovSeq f η ρ x₁ n).lookahead η)‖) := - nesterov_step_bound f η ρ (nesterovSeq f η ρ x₁ n) hη_nn - _ ≤ η * (Cg * Real.sqrt Ln) + Real.sqrt η * |ρ| * - (Cv * Real.sqrt Ln + Real.sqrt η * (Cg * Real.sqrt Ln)) := by - gcongr - _ = Ch * Real.sqrt Ln := by ring - -- ── π(x'n) ∈ B(mstar, 2R₀) ── - have hπx'n_dist : dist (π x'n) mstar < 2 * R₀ := by - have hd1 := Metric.mem_ball.mp hslx - have := (hπ_on_U x'n hx'n_U).2 - have hπe : dist x'n (π x'n) ≤ dist x'n mstar := - this ▸ Metric.infDist_le_dist_of_mem hmstar - linarith [dist_triangle (π x'n) x'n mstar, dist_comm (π x'n) x'n] - -- ── x'_{n+1} ∈ B(mstar, (1+Ch)·R₀) ── - have hx'n1_eq : (nesterovSeq f η ρ x₁ (n + 1)).lookahead η = x'n + hn := by - change (nesterovSeq f η ρ x₁ (n + 1)).lookahead η = - (nesterovSeq f η ρ x₁ n).lookahead η + nesterovH f η ρ x₁ n - unfold nesterovH; abel - have hx'n1_dist : dist (x'n + hn) mstar < (1 + Ch) * R₀ := by - have hd1 := Metric.mem_ball.mp hslx - have hhn_le : ‖hn‖ ≤ Ch * R₀ := - le_trans hhn_bound (mul_le_mul_of_nonneg_left hLn_sqrt hCh_nn) - linarith [dist_triangle (x'n + hn) x'n mstar, - show dist (x'n + hn) x'n = ‖hn‖ from by rw [dist_eq_norm, add_sub_cancel_left]] - -- Both points in Dπ-controlled region (dist < M·R₀) - have hMR₀_ge_2R₀ : 2 * R₀ ≤ M * R₀ := - mul_le_mul_of_nonneg_right (by linarith [hM_ge3]) (le_of_lt hR₀_pos) - have hMR₀_ge_1ChR₀ : (1 + Ch) * R₀ ≤ M * R₀ := - mul_le_mul_of_nonneg_right (by linarith [hCh_nn]) (le_of_lt hR₀_pos) - have hπx'n_ctrl : dist (π x'n) mstar < M * R₀ := by - linarith [hπx'n_dist] - have hx'n_ctrl : dist x'n mstar < M * R₀ := by - have := Metric.mem_ball.mp hslx; linarith - have hx'n1_ctrl : dist (x'n + hn) mstar < M * R₀ := by - linarith [hx'n1_dist] - -- ‖Dπ(π(x'n)) - P‖ ≤ ε₁ - have hDπ_πx'n : ‖fderiv ℝ π (π x'n) - P‖ ≤ ε₁ := - (hDπ_in_MR₀ (π x'n) hπx'n_ctrl).1 - -- ── ‖P en‖ ≤ ε₁·‖en‖ ── - have hPen : ‖P en‖ ≤ ε₁ * ‖en‖ := - proj_normal_bound P π x'n (hπ_kills_normal x'n hx'n_Up) ε₁ hDπ_πx'n - -- ── ‖ξn‖ ≤ ε₁·‖hn‖ ── - have hξn_bound : ‖ξn‖ ≤ ε₁ * ‖hn‖ := by - -- First get the MVT bound - have hmvt := xi_bound_mvt P π x'n (x'n + hn) mstar (M * R₀) - (Metric.mem_ball.mpr hx'n_ctrl) (Metric.mem_ball.mpr hx'n1_ctrl) - (fun z hz => hπ_diff_ball z (Metric.ball_subset_ball (le_of_lt hMR₀_lt_δdiff) hz)) ε₁ - (fun z hz => (hDπ_in_MR₀ z (Metric.mem_ball.mp hz)).1) - -- hmvt : ‖P ((x'n + hn) - x'n) - (π (x'n + hn) - π x'n)‖ ≤ ε₁ * ‖(x'n + hn) - x'n‖ - simp only [add_sub_cancel_left] at hmvt - -- hmvt : ‖P hn - (π (x'n + hn) - π x'n)‖ ≤ ε₁ * ‖hn‖ - -- Now show ξn equals P hn - (π(x'n+hn) - π x'n) - suffices hsuff : (ξn : E) = P hn - (π (x'n + hn) - π x'n) by rw [hsuff]; exact hmvt - change curvatureError (↑P) π f η ρ x₁ n = _ - unfold curvatureError normalDisp - rw [hx'n1_eq] - simp only [] - -- After clearing lets: LHS is in terms of x'n, hn, π, (↑P) - -- RHS is P hn - (π(x'n+hn) - π x'n) - -- These are equal by algebra (↑P and P are definitionally equal) - abel - -- ── ‖wn‖ ≤ Cw·√Ln (via auxVar_recursion) ── - have hwn_eq : (wn : E) = (1 - sa) • (sn.v - P sn.v) + - sm • en - Real.sqrt η • (gn - P gn) := by - change un1 - sm • ξn = _ - have h_av := auxVar_recursion P μ' η ρ π f x₁ n hρ_eq hsa_pos hη_pos hμ'_pos - have : (un1 : E) = ((1 - sa) • (sn.v - P sn.v) + sm • en - - Real.sqrt η • (gn - P gn)) + sm • ξn := by - change auxVar P μ' π f η ρ x₁ (n + 1) = _; exact h_av - rw [this]; abel - have hwn_bound : ‖wn‖ ≤ Cw * Real.sqrt Ln := by - rw [hwn_eq] - have h1 : ‖(1 - sa) • (sn.v - P sn.v)‖ ≤ ‖sn.v - P sn.v‖ := by - rw [norm_smul, Real.norm_eq_abs] - calc |1 - sa| * ‖sn.v - P sn.v‖ ≤ 1 * ‖sn.v - P sn.v‖ := by - gcongr; rw [abs_le]; exact ⟨by linarith [hsa_pos], by linarith [hsa_lt1]⟩ - _ = ‖sn.v - P sn.v‖ := one_mul _ - have hPv_sub : ‖sn.v - P sn.v‖ ≤ ‖sn.v‖ := by - rw [← Real.sqrt_sq (norm_nonneg sn.v), ← Real.sqrt_sq (norm_nonneg (sn.v - P sn.v))] - exact Real.sqrt_le_sqrt (by have := hP_ortho sn.v; have := sq_nonneg ‖P sn.v‖; linarith) - have hPg_sub : ‖gn - P gn‖ ≤ ‖gn‖ := by - rw [← Real.sqrt_sq (norm_nonneg gn), ← Real.sqrt_sq (norm_nonneg (gn - P gn))] - exact Real.sqrt_le_sqrt (by have := hP_ortho gn; have := sq_nonneg ‖P gn‖; linarith) - calc ‖(1 - sa) • (sn.v - P sn.v) + sm • en - Real.sqrt η • (gn - P gn)‖ - ≤ ‖(1 - sa) • (sn.v - P sn.v)‖ + ‖sm • en‖ + ‖Real.sqrt η • (gn - P gn)‖ := by - calc ‖(1 - sa) • (sn.v - P sn.v) + sm • en - Real.sqrt η • (gn - P gn)‖ - ≤ ‖(1 - sa) • (sn.v - P sn.v) + sm • en‖ + - ‖Real.sqrt η • (gn - P gn)‖ := norm_sub_le _ _ - _ ≤ (‖(1 - sa) • (sn.v - P sn.v)‖ + ‖sm • en‖) + - ‖Real.sqrt η • (gn - P gn)‖ := by gcongr; exact norm_add_le _ _ - _ ≤ ‖sn.v‖ + sm * ‖en‖ + Real.sqrt η * ‖gn‖ := by - have hsm_e : ‖sm • en‖ = sm * ‖en‖ := by - rw [norm_smul, Real.norm_of_nonneg hsm_nn] - have hη_g : ‖Real.sqrt η • (gn - P gn)‖ = Real.sqrt η * ‖gn - P gn‖ := by - rw [norm_smul, Real.norm_of_nonneg (Real.sqrt_nonneg η)] - have hh1 : ‖(1 - sa) • (sn.v - P sn.v)‖ ≤ ‖sn.v‖ := h1.trans hPv_sub - have hh3 : Real.sqrt η * ‖gn - P gn‖ ≤ Real.sqrt η * ‖gn‖ := - mul_le_mul_of_nonneg_left hPg_sub (Real.sqrt_nonneg η) - linarith [hsm_e, hη_g, hh1, hh3] - _ ≤ Cv * Real.sqrt Ln + sm * (Ce * Real.sqrt Ln) + - Real.sqrt η * (Cg * Real.sqrt Ln) := by gcongr - _ = Cw * Real.sqrt Ln := by ring - -- ── Bound δ_curv + proj_err ── - have hCS_wξ := real_inner_le_norm wn ξn - -- ‖ξn‖² ≤ ε₁ · Ch² · Ln - have hξn_sq : ‖ξn‖ ^ 2 ≤ ε₁ * Ch ^ 2 * Ln := by - have h1 : ‖ξn‖ ≤ ε₁ * (Ch * Real.sqrt Ln) := by - calc ‖ξn‖ ≤ ε₁ * ‖hn‖ := hξn_bound - _ ≤ ε₁ * (Ch * Real.sqrt Ln) := by gcongr - have h2 : ‖ξn‖ ^ 2 ≤ (ε₁ * (Ch * Real.sqrt Ln)) ^ 2 := - sq_le_sq' (by linarith [norm_nonneg ξn]) h1 - have h3 : (ε₁ * (Ch * Real.sqrt Ln)) ^ 2 = ε₁ ^ 2 * Ch ^ 2 * Ln := by - calc (ε₁ * (Ch * Real.sqrt Ln)) ^ 2 - = ε₁ ^ 2 * Ch ^ 2 * (Real.sqrt Ln * Real.sqrt Ln) := by ring - _ = ε₁ ^ 2 * Ch ^ 2 * Ln := by rw [hsqrt_sq] - have h4 : ε₁ ^ 2 ≤ ε₁ := by - calc ε₁ ^ 2 = ε₁ * ε₁ := sq ε₁ - _ ≤ ε₁ * 1 := mul_le_mul_of_nonneg_left hε₁_le1 (le_of_lt hε₁_pos) - _ = ε₁ := mul_one ε₁ - calc ‖ξn‖ ^ 2 ≤ ε₁ ^ 2 * Ch ^ 2 * Ln := by linarith - _ ≤ ε₁ * Ch ^ 2 * Ln := by - have h5 := mul_le_mul_of_nonneg_right h4 (mul_nonneg (sq_nonneg Ch) hLn_nn) - linarith - -- δ_curv bound - have hδ_curv : sm * @inner ℝ _ _ wn ξn + sm ^ 2 / 2 * ‖ξn‖ ^ 2 ≤ - ε₁ * (sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2) * Ln := by - have ht1 : sm * @inner ℝ _ _ wn ξn ≤ ε₁ * (sm * Cw * Ch) * Ln := by - have h1 : sm * @inner ℝ _ _ wn ξn ≤ sm * (‖wn‖ * ‖ξn‖) := - mul_le_mul_of_nonneg_left hCS_wξ hsm_nn - have h2 : ‖wn‖ * ‖ξn‖ ≤ (Cw * Real.sqrt Ln) * (ε₁ * (Ch * Real.sqrt Ln)) := by - gcongr - calc ‖ξn‖ ≤ ε₁ * ‖hn‖ := hξn_bound - _ ≤ ε₁ * (Ch * Real.sqrt Ln) := by gcongr - have h3 : (Cw * Real.sqrt Ln) * (ε₁ * (Ch * Real.sqrt Ln)) = - ε₁ * Cw * Ch * Ln := by - calc (Cw * Real.sqrt Ln) * (ε₁ * (Ch * Real.sqrt Ln)) - = ε₁ * Cw * Ch * (Real.sqrt Ln * Real.sqrt Ln) := by ring - _ = ε₁ * Cw * Ch * Ln := by rw [hsqrt_sq] - have h4 : sm * (‖wn‖ * ‖ξn‖) ≤ sm * (ε₁ * Cw * Ch * Ln) := - mul_le_mul_of_nonneg_left (le_trans h2 (le_of_eq h3)) hsm_nn - calc sm * @inner ℝ _ _ wn ξn - ≤ sm * (‖wn‖ * ‖ξn‖) := h1 - _ ≤ sm * (ε₁ * Cw * Ch * Ln) := h4 - _ = ε₁ * (sm * Cw * Ch) * Ln := by ring - have ht2 : sm ^ 2 / 2 * ‖ξn‖ ^ 2 ≤ ε₁ * (sm ^ 2 / 2 * Ch ^ 2) * Ln := by - have hsm2 : (0:ℝ) ≤ sm ^ 2 / 2 := div_nonneg (sq_nonneg sm) (by norm_num : (0:ℝ) ≤ 2) - calc sm ^ 2 / 2 * ‖ξn‖ ^ 2 - ≤ sm ^ 2 / 2 * (ε₁ * Ch ^ 2 * Ln) := mul_le_mul_of_nonneg_left hξn_sq hsm2 - _ = ε₁ * (sm ^ 2 / 2 * Ch ^ 2) * Ln := by ring - calc sm * @inner ℝ _ _ wn ξn + sm ^ 2 / 2 * ‖ξn‖ ^ 2 - ≤ ε₁ * (sm * Cw * Ch) * Ln + ε₁ * (sm ^ 2 / 2 * Ch ^ 2) * Ln := - add_le_add ht1 ht2 - _ = ε₁ * (sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2) * Ln := by ring - -- proj_err bound - have hproj : sa * |@inner ℝ _ _ gn (P en)| ≤ ε₁ * (sa * Cg * Ce) * Ln := by - have hCS_gPe := abs_real_inner_le_norm gn (P en) - have h1 : ‖gn‖ * ‖P en‖ ≤ ‖gn‖ * (ε₁ * ‖en‖) := - mul_le_mul_of_nonneg_left hPen (norm_nonneg _) - have h2 : ‖gn‖ * (ε₁ * ‖en‖) ≤ (Cg * Real.sqrt Ln) * (ε₁ * (Ce * Real.sqrt Ln)) := by - gcongr - have h3 : (Cg * Real.sqrt Ln) * (ε₁ * (Ce * Real.sqrt Ln)) = ε₁ * Cg * Ce * Ln := by - calc (Cg * Real.sqrt Ln) * (ε₁ * (Ce * Real.sqrt Ln)) - = ε₁ * Cg * Ce * (Real.sqrt Ln * Real.sqrt Ln) := by ring - _ = ε₁ * Cg * Ce * Ln := by rw [hsqrt_sq] - calc sa * |@inner ℝ _ _ gn (P en)| - ≤ sa * (ε₁ * Cg * Ce * Ln) := - mul_le_mul_of_nonneg_left (by linarith) (le_of_lt hsa_pos) - _ = ε₁ * (sa * Cg * Ce) * Ln := by ring - -- Assembly: total ≤ ε₁·K·Ln ≤ θ·sa·Ln - calc sm * @inner ℝ _ _ wn ξn + sm ^ 2 / 2 * ‖ξn‖ ^ 2 + - sa * |@inner ℝ _ _ gn (P en)| - ≤ ε₁ * (sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2) * Ln + - ε₁ * (sa * Cg * Ce) * Ln := add_le_add hδ_curv hproj - _ = ε₁ * (sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2 + sa * Cg * Ce) * Ln := by ring - _ ≤ ε₁ * K * Ln := - mul_le_mul_of_nonneg_right - (mul_le_mul_of_nonneg_left - (by change sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2 + sa * Cg * Ce ≤ - sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2 + sa * Cg * Ce + 1; linarith) - (le_of_lt hε₁_pos)) - hLn_nn - _ ≤ θ * sa * Ln := - mul_le_mul_of_nonneg_right hε₁K_le hLn_nn - -/-- Assembly of the curvature absorption bound. - -Given coercivity bounds, Dπ continuity at m⋆, and the algebraic lemmas -(xi_bound_mvt, proj_normal_bound, nesterov_step_bound, auxVarOfState_step), -choose R_abs > 0 so that within B(m⋆, R_abs) with L_n ≤ R_abs², -the total perturbation δ_curv + proj_err ≤ θ·a · L_n. - -This is the state-based curvature-absorption step. The -budget-split parameter θ ∈ (0,1) controls what fraction of the affine decrement -is reserved for the curvature and projector-freezing errors. + (v en gn : E) (sm sa η Cv Ce Cg Ln : ℝ) + (hsm_nn : 0 ≤ sm) (hsa_pos : 0 < sa) (hsa_lt1 : sa < 1) + (hv_bound : ‖v‖ ≤ Cv * Real.sqrt Ln) + (he_bound : ‖en‖ ≤ Ce * Real.sqrt Ln) + (hg_bound : ‖gn‖ ≤ Cg * Real.sqrt Ln) : + ‖(1 - sa) • (v - P v) + sm • en - Real.sqrt η • (gn - P gn)‖ ≤ + (Cv + sm * Ce + Real.sqrt η * Cg) * Real.sqrt Ln := by + have h1 : ‖(1 - sa) • (v - P v)‖ ≤ ‖v - P v‖ := by + rw [norm_smul, Real.norm_eq_abs] + calc |1 - sa| * ‖v - P v‖ ≤ 1 * ‖v - P v‖ := by + gcongr; rw [abs_le]; exact ⟨by linarith [hsa_pos], by linarith [hsa_lt1]⟩ + _ = ‖v - P v‖ := one_mul _ + have hPv_sub : ‖v - P v‖ ≤ ‖v‖ := by + rw [← Real.sqrt_sq (norm_nonneg v), ← Real.sqrt_sq (norm_nonneg (v - P v))] + exact Real.sqrt_le_sqrt (by have := hP_ortho v; have := sq_nonneg ‖P v‖; linarith) + have hPg_sub : ‖gn - P gn‖ ≤ ‖gn‖ := by + rw [← Real.sqrt_sq (norm_nonneg gn), ← Real.sqrt_sq (norm_nonneg (gn - P gn))] + exact Real.sqrt_le_sqrt (by have := hP_ortho gn; have := sq_nonneg ‖P gn‖; linarith) + calc ‖(1 - sa) • (v - P v) + sm • en - Real.sqrt η • (gn - P gn)‖ + ≤ ‖(1 - sa) • (v - P v)‖ + ‖sm • en‖ + ‖Real.sqrt η • (gn - P gn)‖ := by + calc ‖(1 - sa) • (v - P v) + sm • en - Real.sqrt η • (gn - P gn)‖ + ≤ ‖(1 - sa) • (v - P v) + sm • en‖ + + ‖Real.sqrt η • (gn - P gn)‖ := norm_sub_le _ _ + _ ≤ (‖(1 - sa) • (v - P v)‖ + ‖sm • en‖) + + ‖Real.sqrt η • (gn - P gn)‖ := by gcongr; exact norm_add_le _ _ + _ ≤ ‖v‖ + sm * ‖en‖ + Real.sqrt η * ‖gn‖ := by + have hsm_e : ‖sm • en‖ = sm * ‖en‖ := by + rw [norm_smul, Real.norm_of_nonneg hsm_nn] + have hη_g : ‖Real.sqrt η • (gn - P gn)‖ = Real.sqrt η * ‖gn - P gn‖ := by + rw [norm_smul, Real.norm_of_nonneg (Real.sqrt_nonneg η)] + have hh1 : ‖(1 - sa) • (v - P v)‖ ≤ ‖v‖ := h1.trans hPv_sub + have hh3 : Real.sqrt η * ‖gn - P gn‖ ≤ Real.sqrt η * ‖gn‖ := + mul_le_mul_of_nonneg_left hPg_sub (Real.sqrt_nonneg η) + linarith [hsm_e, hη_g, hh1, hh3] + _ ≤ Cv * Real.sqrt Ln + sm * (Ce * Real.sqrt Ln) + + Real.sqrt η * (Cg * Real.sqrt Ln) := by gcongr + _ = (Cv + sm * Ce + Real.sqrt η * Cg) * Real.sqrt Ln := by ring -Generalized to arbitrary initial state s₀ (not just zero velocity). -/ -private abbrev curvAbsorbAssemblyGenProof +/-- A common radius controls the curvature error uniformly over any family of states +satisfying the same coercivity bound. -/ +private theorem curvAbsorbAssemblyFamily {ι : Type*} + (states : ι → NesterovState d) (f : E → ℝ) (L : ℝ≥0) (hL : 0 < (L : ℝ)) (μ' : ℝ) (hμ' : 0 < μ') (θ : ℝ) (hθ_pos : 0 < θ) @@ -471,20 +124,20 @@ private abbrev curvAbsorbAssemblyGenProof (hπ_on_U : ∀ x ∈ U, π x ∈ S ∧ dist x (π x) = Metric.infDist x S) (hDπ_cont : ContinuousAt (fun x => fderiv ℝ π x) mstar) (C_coer : ℝ) (hC_coer : 0 < C_coer) - (hcoer_bound : ∀ (s : NesterovState d), - s.x ∈ U_plus → - s.lookahead η ∈ U_plus → - ‖s.v‖ ^ 2 + - μ' * ‖normalDispOfState π η s‖ ^ 2 ≤ - C_coer * lyapunovOfState P μ' π f η s) + (hcoer_bound : ∀ i, + (states i).x ∈ U_plus → + (states i).lookahead η ∈ U_plus → + ‖(states i).v‖ ^ 2 + + μ' * ‖normalDispOfState π η (states i)‖ ^ 2 ≤ + C_coer * lyapunovOfState P μ' π f η (states i)) (hπ_kills_normal : ∀ x ∈ U_plus, fderiv ℝ π (π x) (x - π x) = 0) (hgrad_zero : ∀ x ∈ S, gradient f x = 0) (hπ_diff_near : ∃ δ_diff > 0, ∀ z ∈ Metric.ball mstar δ_diff, DifferentiableAt ℝ π z) : - ∃ R_abs : ℝ, 0 < R_abs ∧ ∀ (s₀ : NesterovState d) (n : ℕ), - (nesterovSeqGen f η ρ s₀ n).x ∈ Metric.ball mstar R_abs → - (nesterovSeqGen f η ρ s₀ n).lookahead η ∈ Metric.ball mstar R_abs → - lyapunovOfState P μ' π f η (nesterovSeqGen f η ρ s₀ n) ≤ R_abs ^ 2 → - let sn := nesterovSeqGen f η ρ s₀ n + ∃ R_abs : ℝ, 0 < R_abs ∧ ∀ i, + (states i).x ∈ Metric.ball mstar R_abs → + (states i).lookahead η ∈ Metric.ball mstar R_abs → + lyapunovOfState P μ' π f η (states i) ≤ R_abs ^ 2 → + let sn := states i let gn := gradient f (sn.lookahead η) let en := sn.lookahead η - π (sn.lookahead η) let ξn := curvatureErrorOfState (↑P) π f η ρ sn @@ -498,14 +151,13 @@ private abbrev curvAbsorbAssemblyGenProof δ_curv + proj_err ≤ θ * a * Ln := by -- Derived positivity have hη_nn : (0 : ℝ) ≤ η := le_of_lt hη_pos - have hμ'_pos : (0 : ℝ) < μ' := hμ' set sm := Real.sqrt μ' set sa := Real.sqrt (μ' * η) - have hsm_pos : (0 : ℝ) < sm := Real.sqrt_pos_of_pos hμ'_pos + have hsm_pos : (0 : ℝ) < sm := Real.sqrt_pos_of_pos hμ' have hsm_nn : (0 : ℝ) ≤ sm := le_of_lt hsm_pos - have hsa_pos : (0 : ℝ) < sa := Real.sqrt_pos_of_pos (mul_pos hμ'_pos hη_pos) + have hsa_pos : (0 : ℝ) < sa := Real.sqrt_pos_of_pos (mul_pos hμ' hη_pos) have hsa_lt1 : sa < 1 := by - calc sa < Real.sqrt 1 := Real.sqrt_lt_sqrt (le_of_lt (mul_pos hμ'_pos hη_pos)) hμη_lt1 + calc sa < Real.sqrt 1 := Real.sqrt_lt_sqrt (le_of_lt (mul_pos hμ' hη_pos)) hμη_lt1 _ = 1 := Real.sqrt_one -- Energy constants from coercivity: ‖v‖² + μ'·‖e‖² ≤ C_coer·Ln let Ce := Real.sqrt (C_coer / μ') @@ -524,13 +176,10 @@ private abbrev curvAbsorbAssemblyGenProof add_nonneg (add_nonneg hCv_nn (mul_nonneg hsm_nn hCe_nn)) (mul_nonneg (Real.sqrt_nonneg η) hCg_nn) -- K: total perturbation constant (with +1 slack for strict inequality) - let K := sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2 + sa * Cg * Ce + 1 + let K := (sm ^ 2 * Cw ^ 2 + Ch ^ 2) / 2 + sm ^ 2 / 2 * Ch ^ 2 + sa * Cg * Ce + 1 have hK_pos : (0 : ℝ) < K := by - change (0 : ℝ) < sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2 + sa * Cg * Ce + 1 - have := mul_nonneg (mul_nonneg hsm_nn hCw_nn) hCh_nn - have := mul_nonneg (div_nonneg (sq_nonneg sm) (by norm_num : (0:ℝ) ≤ 2)) (sq_nonneg Ch) - have := mul_nonneg (mul_nonneg (le_of_lt hsa_pos) hCg_nn) hCe_nn - linarith + dsimp [K] + positivity -- ε₁ = min(1, θ·sa/K) let ε₁ := min 1 (θ * sa / K) have hε₁_pos : (0 : ℝ) < ε₁ := lt_min one_pos (div_pos (mul_pos hθ_pos hsa_pos) hK_pos) @@ -552,15 +201,13 @@ private abbrev curvAbsorbAssemblyGenProof -- Expansion factor: dist(πx, m*) ≤ 2·dist(x, m*), dist(x'n1, m*) ≤ (1+Ch)·R let M := 2 + Ch + 1 have hM_ge3 : (3 : ℝ) ≤ M := by linarith [hCh_nn] - -- R₀ ensures all relevant points are in B(mstar, δ_Dπ) ∩ U ∩ diff ball - let R₀ := min (min (min δ_Up δ_U) δ_Dπ) δ_diff / (M + 1) - have hMp1_pos : (0 : ℝ) < M + 1 := by linarith [hCh_nn] - have hR₀_pos : (0 : ℝ) < R₀ := - div_pos (lt_min (lt_min (lt_min hδ_Up_pos hδ_U_pos) hδ_Dπ_pos) hδ_diff_pos) hMp1_pos + obtain ⟨R₀, hR₀_pos, hR₀_le_δUp, hMR₀_lt_δU, hMR₀_lt_δDπ, hMR₀_lt_δdiff⟩ := + existsScaledRadius δ_Up δ_U δ_Dπ δ_diff M hδ_Up_pos hδ_U_pos hδ_Dπ_pos hδ_diff_pos + (by linarith) refine ⟨R₀, hR₀_pos, ?_⟩ - intro s₀ n hsx hslx hLn_le + intro i hsx hslx hLn_le -- Abbreviations - set sn := nesterovSeqGen f η ρ s₀ n + set sn := states i set x'n := sn.lookahead η set gn := gradient f x'n set en := x'n - π x'n @@ -569,27 +216,6 @@ private abbrev curvAbsorbAssemblyGenProof set un1 := auxVarOfState P μ' π η (nesterovStep f η ρ sn) set wn := un1 - sm • ξn set Ln := lyapunovOfState P μ' π f η sn - -- R₀ ≤ various δ's - have hMp1R₀ : (M + 1) * R₀ = min (min (min δ_Up δ_U) δ_Dπ) δ_diff := - mul_div_cancel₀ _ (ne_of_gt hMp1_pos) - have hR₀_le_δUp : R₀ ≤ δ_Up := by - calc R₀ ≤ (M + 1) * R₀ := - le_mul_of_one_le_left (le_of_lt hR₀_pos) (by linarith [hCh_nn]) - _ = min (min (min δ_Up δ_U) δ_Dπ) δ_diff := hMp1R₀ - _ ≤ min (min δ_Up δ_U) δ_Dπ := min_le_left _ _ - _ ≤ min δ_Up δ_U := min_le_left _ _ - _ ≤ δ_Up := min_le_left _ _ - have hMR₀_lt_min : M * R₀ < min (min (min δ_Up δ_U) δ_Dπ) δ_diff := by - linarith [hR₀_pos] - have hMR₀_lt_δDπ : M * R₀ < δ_Dπ := - lt_of_lt_of_le hMR₀_lt_min - ((min_le_left _ _).trans (min_le_right _ _)) - have hMR₀_lt_δU : M * R₀ < δ_U := - lt_of_lt_of_le hMR₀_lt_min - ((min_le_left _ _).trans - ((min_le_left _ _).trans (min_le_right _ _))) - have hMR₀_lt_δdiff : M * R₀ < δ_diff := - lt_of_lt_of_le hMR₀_lt_min (min_le_right _ _) -- Location in U_plus and U have hx'n_Up : x'n ∈ U_plus := hδ_Up_sub (Metric.ball_subset_ball hR₀_le_δUp hslx) @@ -605,20 +231,20 @@ private abbrev curvAbsorbAssemblyGenProof rw [dist_eq_norm, ← hP_eq] at h; exact le_of_lt h · exact hδ_U_sub (Metric.mem_ball.mpr (lt_trans hz hMR₀_lt_δU)) -- Coercivity at step n - have hcoer := hcoer_bound sn hsx_Up hx'n_Up + have hcoer := hcoer_bound i hsx_Up hx'n_Up have hnd : normalDispOfState π η sn = en := rfl rw [hnd] at hcoer -- ‖v‖² ≤ C_coer·Ln, ‖e‖² ≤ C_coer/μ'·Ln have hv_sq : ‖sn.v‖ ^ 2 ≤ C_coer * Ln := by - have := mul_nonneg (le_of_lt hμ'_pos) (sq_nonneg ‖en‖); linarith + have := mul_nonneg (le_of_lt hμ') (sq_nonneg ‖en‖); linarith have he_sq : ‖en‖ ^ 2 ≤ C_coer / μ' * Ln := by have h1 : μ' * ‖en‖ ^ 2 ≤ C_coer * Ln := by have := sq_nonneg ‖sn.v‖; linarith rw [div_mul_eq_mul_div] - exact (le_div_iff₀ hμ'_pos).mpr (by linarith) + exact (le_div_iff₀ hμ').mpr (by linarith) -- Ln ≥ 0 have hLn_nn : (0 : ℝ) ≤ Ln := by have h1 := sq_nonneg ‖sn.v‖ - have h2 := mul_nonneg (le_of_lt hμ'_pos) (sq_nonneg ‖en‖) + have h2 := mul_nonneg (le_of_lt hμ') (sq_nonneg ‖en‖) exact nonneg_of_mul_nonneg_left (by linarith) hC_coer -- √Ln ≤ R₀ have hLn_sqrt : Real.sqrt Ln ≤ R₀ := by @@ -627,17 +253,11 @@ private abbrev curvAbsorbAssemblyGenProof -- Key helper: √Ln * √Ln = Ln have hsqrt_sq : Real.sqrt Ln * Real.sqrt Ln = Ln := Real.mul_self_sqrt hLn_nn -- Helper: a² ≤ C·L → a ≤ √C · √L - have sqrt_bound : ∀ {a C L : ℝ}, 0 ≤ a → 0 ≤ C → 0 ≤ L → - a ^ 2 ≤ C * L → a ≤ Real.sqrt C * Real.sqrt L := by - intro a C L ha hC hL hab - calc a = Real.sqrt (a ^ 2) := (Real.sqrt_sq ha).symm - _ ≤ Real.sqrt (C * L) := Real.sqrt_le_sqrt hab - _ = Real.sqrt C * Real.sqrt L := Real.sqrt_mul hC L -- ‖e‖ ≤ Ce·√Ln, ‖v‖ ≤ Cv·√Ln have he_bound : ‖en‖ ≤ Ce * Real.sqrt Ln := - sqrt_bound (norm_nonneg _) (div_nonneg (le_of_lt hC_coer) (le_of_lt hμ'_pos)) hLn_nn he_sq + leSqrtMulSqrtOfSquareLe (norm_nonneg _) (div_nonneg (le_of_lt hC_coer) (le_of_lt hμ')) he_sq have hv_bound : ‖sn.v‖ ≤ Cv * Real.sqrt Ln := - sqrt_bound (norm_nonneg _) (le_of_lt hC_coer) hLn_nn hv_sq + leSqrtMulSqrtOfSquareLe (norm_nonneg _) (le_of_lt hC_coer) hv_sq -- ‖g‖ ≤ L·‖e‖ (gradient Lipschitz + ∇f|_S = 0) have hgn_bound : ‖gn‖ ≤ (↑L : ℝ) * ‖en‖ := by have := hf_lip.dist_le_mul x'n (hU_sub (subset_closure hx'n_Up)) @@ -721,127 +341,38 @@ private abbrev curvAbsorbAssemblyGenProof have hwn_eq : (wn : E) = (1 - sa) • (sn.v - P sn.v) + sm • en - Real.sqrt η • (gn - P gn) := by change un1 - sm • ξn = _ - have h_av := auxVarOfState_step P μ' η ρ π f sn hρ_eq hsa_pos hη_pos hμ'_pos + have h_av := auxVarOfState_step P μ' η ρ π f sn hρ_eq hsa_pos hη_pos hμ' have : (un1 : E) = ((1 - sa) • (sn.v - P sn.v) + sm • en - Real.sqrt η • (gn - P gn)) + sm • ξn := by change auxVarOfState P μ' π η (nesterovStep f η ρ sn) = _; exact h_av rw [this]; abel have hwn_bound : ‖wn‖ ≤ Cw * Real.sqrt Ln := by rw [hwn_eq] - have h1 : ‖(1 - sa) • (sn.v - P sn.v)‖ ≤ ‖sn.v - P sn.v‖ := by - rw [norm_smul, Real.norm_eq_abs] - calc |1 - sa| * ‖sn.v - P sn.v‖ ≤ 1 * ‖sn.v - P sn.v‖ := by - gcongr; rw [abs_le]; exact ⟨by linarith [hsa_pos], by linarith [hsa_lt1]⟩ - _ = ‖sn.v - P sn.v‖ := one_mul _ - have hPv_sub : ‖sn.v - P sn.v‖ ≤ ‖sn.v‖ := by - rw [← Real.sqrt_sq (norm_nonneg sn.v), ← Real.sqrt_sq (norm_nonneg (sn.v - P sn.v))] - exact Real.sqrt_le_sqrt (by have := hP_ortho sn.v; have := sq_nonneg ‖P sn.v‖; linarith) - have hPg_sub : ‖gn - P gn‖ ≤ ‖gn‖ := by - rw [← Real.sqrt_sq (norm_nonneg gn), ← Real.sqrt_sq (norm_nonneg (gn - P gn))] - exact Real.sqrt_le_sqrt (by have := hP_ortho gn; have := sq_nonneg ‖P gn‖; linarith) - calc ‖(1 - sa) • (sn.v - P sn.v) + sm • en - Real.sqrt η • (gn - P gn)‖ - ≤ ‖(1 - sa) • (sn.v - P sn.v)‖ + ‖sm • en‖ + ‖Real.sqrt η • (gn - P gn)‖ := by - calc ‖(1 - sa) • (sn.v - P sn.v) + sm • en - Real.sqrt η • (gn - P gn)‖ - ≤ ‖(1 - sa) • (sn.v - P sn.v) + sm • en‖ + - ‖Real.sqrt η • (gn - P gn)‖ := norm_sub_le _ _ - _ ≤ (‖(1 - sa) • (sn.v - P sn.v)‖ + ‖sm • en‖) + - ‖Real.sqrt η • (gn - P gn)‖ := by gcongr; exact norm_add_le _ _ - _ ≤ ‖sn.v‖ + sm * ‖en‖ + Real.sqrt η * ‖gn‖ := by - have hsm_e : ‖sm • en‖ = sm * ‖en‖ := by - rw [norm_smul, Real.norm_of_nonneg hsm_nn] - have hη_g : ‖Real.sqrt η • (gn - P gn)‖ = Real.sqrt η * ‖gn - P gn‖ := by - rw [norm_smul, Real.norm_of_nonneg (Real.sqrt_nonneg η)] - have hh1 : ‖(1 - sa) • (sn.v - P sn.v)‖ ≤ ‖sn.v‖ := h1.trans hPv_sub - have hh3 : Real.sqrt η * ‖gn - P gn‖ ≤ Real.sqrt η * ‖gn‖ := - mul_le_mul_of_nonneg_left hPg_sub (Real.sqrt_nonneg η) - linarith [hsm_e, hη_g, hh1, hh3] - _ ≤ Cv * Real.sqrt Ln + sm * (Ce * Real.sqrt Ln) + - Real.sqrt η * (Cg * Real.sqrt Ln) := by gcongr - _ = Cw * Real.sqrt Ln := by ring - -- ── Bound δ_curv + proj_err ── - have hCS_wξ := real_inner_le_norm wn ξn - -- ‖ξn‖² ≤ ε₁ · Ch² · Ln - have hξn_sq : ‖ξn‖ ^ 2 ≤ ε₁ * Ch ^ 2 * Ln := by - have h1 : ‖ξn‖ ≤ ε₁ * (Ch * Real.sqrt Ln) := by - calc ‖ξn‖ ≤ ε₁ * ‖hn‖ := hξn_bound - _ ≤ ε₁ * (Ch * Real.sqrt Ln) := by gcongr - have h2 : ‖ξn‖ ^ 2 ≤ (ε₁ * (Ch * Real.sqrt Ln)) ^ 2 := - sq_le_sq' (by linarith [norm_nonneg ξn]) h1 - have h3 : (ε₁ * (Ch * Real.sqrt Ln)) ^ 2 = ε₁ ^ 2 * Ch ^ 2 * Ln := by - calc (ε₁ * (Ch * Real.sqrt Ln)) ^ 2 - = ε₁ ^ 2 * Ch ^ 2 * (Real.sqrt Ln * Real.sqrt Ln) := by ring - _ = ε₁ ^ 2 * Ch ^ 2 * Ln := by rw [hsqrt_sq] - have h4 : ε₁ ^ 2 ≤ ε₁ := by - calc ε₁ ^ 2 = ε₁ * ε₁ := sq ε₁ - _ ≤ ε₁ * 1 := mul_le_mul_of_nonneg_left hε₁_le1 (le_of_lt hε₁_pos) - _ = ε₁ := mul_one ε₁ - calc ‖ξn‖ ^ 2 ≤ ε₁ ^ 2 * Ch ^ 2 * Ln := by linarith - _ ≤ ε₁ * Ch ^ 2 * Ln := by - have h5 := mul_le_mul_of_nonneg_right h4 (mul_nonneg (sq_nonneg Ch) hLn_nn) - linarith - -- δ_curv bound - have hδ_curv : sm * @inner ℝ _ _ wn ξn + sm ^ 2 / 2 * ‖ξn‖ ^ 2 ≤ - ε₁ * (sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2) * Ln := by - have ht1 : sm * @inner ℝ _ _ wn ξn ≤ ε₁ * (sm * Cw * Ch) * Ln := by - have h1 : sm * @inner ℝ _ _ wn ξn ≤ sm * (‖wn‖ * ‖ξn‖) := - mul_le_mul_of_nonneg_left hCS_wξ hsm_nn - have h2 : ‖wn‖ * ‖ξn‖ ≤ (Cw * Real.sqrt Ln) * (ε₁ * (Ch * Real.sqrt Ln)) := by - gcongr - calc ‖ξn‖ ≤ ε₁ * ‖hn‖ := hξn_bound - _ ≤ ε₁ * (Ch * Real.sqrt Ln) := by gcongr - have h3 : (Cw * Real.sqrt Ln) * (ε₁ * (Ch * Real.sqrt Ln)) = - ε₁ * Cw * Ch * Ln := by - calc (Cw * Real.sqrt Ln) * (ε₁ * (Ch * Real.sqrt Ln)) - = ε₁ * Cw * Ch * (Real.sqrt Ln * Real.sqrt Ln) := by ring - _ = ε₁ * Cw * Ch * Ln := by rw [hsqrt_sq] - have h4 : sm * (‖wn‖ * ‖ξn‖) ≤ sm * (ε₁ * Cw * Ch * Ln) := - mul_le_mul_of_nonneg_left (le_trans h2 (le_of_eq h3)) hsm_nn - calc sm * @inner ℝ _ _ wn ξn - ≤ sm * (‖wn‖ * ‖ξn‖) := h1 - _ ≤ sm * (ε₁ * Cw * Ch * Ln) := h4 - _ = ε₁ * (sm * Cw * Ch) * Ln := by ring - have ht2 : sm ^ 2 / 2 * ‖ξn‖ ^ 2 ≤ ε₁ * (sm ^ 2 / 2 * Ch ^ 2) * Ln := by - have hsm2 : (0:ℝ) ≤ sm ^ 2 / 2 := div_nonneg (sq_nonneg sm) (by norm_num : (0:ℝ) ≤ 2) - calc sm ^ 2 / 2 * ‖ξn‖ ^ 2 - ≤ sm ^ 2 / 2 * (ε₁ * Ch ^ 2 * Ln) := mul_le_mul_of_nonneg_left hξn_sq hsm2 - _ = ε₁ * (sm ^ 2 / 2 * Ch ^ 2) * Ln := by ring - calc sm * @inner ℝ _ _ wn ξn + sm ^ 2 / 2 * ‖ξn‖ ^ 2 - ≤ ε₁ * (sm * Cw * Ch) * Ln + ε₁ * (sm ^ 2 / 2 * Ch ^ 2) * Ln := - add_le_add ht1 ht2 - _ = ε₁ * (sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2) * Ln := by ring - -- proj_err bound - have hproj : sa * |@inner ℝ _ _ gn (P en)| ≤ ε₁ * (sa * Cg * Ce) * Ln := by - have hCS_gPe := abs_real_inner_le_norm gn (P en) - have h1 : ‖gn‖ * ‖P en‖ ≤ ‖gn‖ * (ε₁ * ‖en‖) := - mul_le_mul_of_nonneg_left hPen (norm_nonneg _) - have h2 : ‖gn‖ * (ε₁ * ‖en‖) ≤ (Cg * Real.sqrt Ln) * (ε₁ * (Ce * Real.sqrt Ln)) := by - gcongr - have h3 : (Cg * Real.sqrt Ln) * (ε₁ * (Ce * Real.sqrt Ln)) = ε₁ * Cg * Ce * Ln := by - calc (Cg * Real.sqrt Ln) * (ε₁ * (Ce * Real.sqrt Ln)) - = ε₁ * Cg * Ce * (Real.sqrt Ln * Real.sqrt Ln) := by ring - _ = ε₁ * Cg * Ce * Ln := by rw [hsqrt_sq] - calc sa * |@inner ℝ _ _ gn (P en)| - ≤ sa * (ε₁ * Cg * Ce * Ln) := - mul_le_mul_of_nonneg_left (by linarith) (le_of_lt hsa_pos) - _ = ε₁ * (sa * Cg * Ce) * Ln := by ring - -- Assembly: total ≤ ε₁·K·Ln ≤ θ·sa·Ln - calc sm * @inner ℝ _ _ wn ξn + sm ^ 2 / 2 * ‖ξn‖ ^ 2 + - sa * |@inner ℝ _ _ gn (P en)| - ≤ ε₁ * (sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2) * Ln + - ε₁ * (sa * Cg * Ce) * Ln := add_le_add hδ_curv hproj - _ = ε₁ * (sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2 + sa * Cg * Ce) * Ln := by ring - _ ≤ ε₁ * K * Ln := - mul_le_mul_of_nonneg_right - (mul_le_mul_of_nonneg_left - (by change sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2 + sa * Cg * Ce ≤ - sm * Cw * Ch + sm ^ 2 / 2 * Ch ^ 2 + sa * Cg * Ce + 1; linarith) - (le_of_lt hε₁_pos)) - hLn_nn - _ ≤ θ * sa * Ln := - mul_le_mul_of_nonneg_right hε₁K_le hLn_nn - + exact orthogonalCombinationBound P hP_ortho sn.v en gn sm sa η Cv Ce Cg Ln + hsm_nn hsa_pos hsa_lt1 hv_bound he_bound hg_bound + have square_bound {v : E} {C : ℝ} (h : ‖v‖ ≤ C * Real.sqrt Ln) : + ‖v‖ ^ 2 ≤ C ^ 2 * Ln := by + calc ‖v‖ ^ 2 ≤ (C * Real.sqrt Ln) ^ 2 := pow_le_pow_left₀ (norm_nonneg _) h _ + _ = C ^ 2 * Ln := by rw [mul_pow, Real.sq_sqrt hLn_nn] + have hwh : sm ^ 2 * ‖wn‖ ^ 2 + ‖hn‖ ^ 2 ≤ (sm ^ 2 * Cw ^ 2 + Ch ^ 2) * Ln := by + calc sm ^ 2 * ‖wn‖ ^ 2 + ‖hn‖ ^ 2 ≤ + sm ^ 2 * (Cw ^ 2 * Ln) + Ch ^ 2 * Ln := + add_le_add (mul_le_mul_of_nonneg_left (square_bound hwn_bound) (sq_nonneg sm)) + (square_bound hhn_bound) + _ = (sm ^ 2 * Cw ^ 2 + Ch ^ 2) * Ln := by ring + have hge : ‖gn‖ * ‖en‖ ≤ (Cg * Ce) * Ln := by + calc ‖gn‖ * ‖en‖ ≤ (Cg * Real.sqrt Ln) * (Ce * Real.sqrt Ln) := by gcongr + _ = (Cg * Ce) * (Real.sqrt Ln * Real.sqrt Ln) := by ring + _ = (Cg * Ce) * Ln := by rw [hsqrt_sq] + apply curv_absorption_algebraic wn ξn gn (P en) hn en sm sa Ln hsm_nn hsa_pos hLn_nn + ε₁ hε₁_pos hε₁_le1 hξn_bound hPen (sm ^ 2 * Cw ^ 2 + Ch ^ 2) (by positivity) hwh + (Ch ^ 2) (sq_nonneg _) (square_bound hhn_bound) (Cg * Ce) (mul_nonneg hCg_nn hCe_nn) + hge θ hθ_pos + apply le_trans (mul_le_mul_of_nonneg_left (show _ ≤ K from ?_) (le_of_lt hε₁_pos)) hε₁K_le + dsimp [K] + linarith -/-- Public theorem wrapper for `curvAbsorbAssemblyProof`. -/ +/-- A uniform curvature-absorption radius for Nesterov sequences with zero initial velocity. -/ theorem curv_absorb_assembly (f : E → ℝ) (L : ℝ≥0) (hL : 0 < (L : ℝ)) (μ' : ℝ) (hμ' : 0 < μ') @@ -889,16 +420,22 @@ theorem curv_absorb_assembly let Ln := lyapunov P μ' π f η ρ x₁ n let proj_err := a * abs (@inner ℝ _ _ gn (P en)) δ_curv + proj_err ≤ θ * a * Ln := by - exact curvAbsorbAssemblyProof (f := f) (L := L) (hL := hL) (μ' := μ') (hμ' := hμ') (θ := θ) + obtain ⟨R_abs, hR_abs, hbound⟩ := curvAbsorbAssemblyFamily + (states := fun (index : E × ℕ) ↦ nesterovSeq f η ρ index.1 index.2) + (f := f) (L := L) (hL := hL) (μ' := μ') (hμ' := hμ') (θ := θ) (hθ_pos := hθ_pos) (η := η) (ρ := ρ) (hη_pos := hη_pos) (hμη_lt1 := hμη_lt1) (hρ_eq := hρ_eq) (S := S) (π := π) (P := P) (hP_ortho := hP_ortho) (mstar := mstar) (hmstar := hmstar) (hP_eq := hP_eq) (U_plus := U_plus) (hU_open := hU_open) (hm_in := hm_in) (U := U) (hU_isopen := hU_isopen) (hU_sub := hU_sub) (hf_lip := hf_lip) (hS_sub_U := hS_sub_U) (hmstar_U := hmstar_U) (hπ_on_U := hπ_on_U) (hDπ_cont := hDπ_cont) (C_coer := C_coer) - (hC_coer := hC_coer) (hcoer_bound := hcoer_bound) (hπ_kills_normal := hπ_kills_normal) + (hC_coer := hC_coer) (hcoer_bound := fun index ↦ hcoer_bound index.1 index.2) + (hπ_kills_normal := hπ_kills_normal) (hgrad_zero := hgrad_zero) (hπ_diff_near := hπ_diff_near) + refine ⟨R_abs, hR_abs, ?_⟩ + intro x₁ n + exact hbound (x₁, n) -/-- Public theorem wrapper for `curvAbsorbAssemblyGenProof`. -/ +/-- A uniform curvature-absorption radius for Nesterov sequences with arbitrary initial state. -/ theorem curv_absorb_assembly_gen (f : E → ℝ) (L : ℝ≥0) (hL : 0 < (L : ℝ)) (μ' : ℝ) (hμ' : 0 < μ') @@ -946,7 +483,9 @@ theorem curv_absorb_assembly_gen let Ln := lyapunovOfState P μ' π f η sn let proj_err := a * abs (@inner ℝ _ _ gn (P en)) δ_curv + proj_err ≤ θ * a * Ln := by - exact curvAbsorbAssemblyGenProof (f := f) (L := L) (hL := hL) (μ' := μ') (hμ' := hμ') (θ := θ) + obtain ⟨R_abs, hR_abs, hbound⟩ := curvAbsorbAssemblyFamily + (states := fun (state : NesterovState d) ↦ state) + (f := f) (L := L) (hL := hL) (μ' := μ') (hμ' := hμ') (θ := θ) (hθ_pos := hθ_pos) (η := η) (ρ := ρ) (hη_pos := hη_pos) (hμη_lt1 := hμη_lt1) (hρ_eq := hρ_eq) (S := S) (π := π) (P := P) (hP_ortho := hP_ortho) (mstar := mstar) (hmstar := hmstar) (hP_eq := hP_eq) (U_plus := U_plus) (hU_open := hU_open) (hm_in := hm_in) (U := U) @@ -954,5 +493,8 @@ theorem curv_absorb_assembly_gen (hmstar_U := hmstar_U) (hπ_on_U := hπ_on_U) (hDπ_cont := hDπ_cont) (C_coer := C_coer) (hC_coer := hC_coer) (hcoer_bound := hcoer_bound) (hπ_kills_normal := hπ_kills_normal) (hgrad_zero := hgrad_zero) (hπ_diff_near := hπ_diff_near) + refine ⟨R_abs, hR_abs, ?_⟩ + intro s₀ n + exact hbound (nesterovSeqGen f η ρ s₀ n) end PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/GenLocalArgument.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/GenLocalArgument.lean index ebe07c3e4e..458b011afa 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/GenLocalArgument.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/GenLocalArgument.lean @@ -3,15 +3,21 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.EmbeddedManifold -import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.Main +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs +import LeanPool.PLAcceleratedNesterovLean.Convergence.Bootstrap.Main import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Main +import LeanPool.PLAcceleratedNesterovLean.Convergence.CurvAbsorb.Assembly +import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.Main +import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.SegmentEstimate +import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.FlatCaseHelper import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.GenMain -import LeanPool.PLAcceleratedNesterovLean.Convergence.Bootstrap.Main import LeanPool.PLAcceleratedNesterovLean.Convergence.MotionError.Main -import LeanPool.PLAcceleratedNesterovLean.Convergence.CurvAbsorb.Assembly -import Mathlib.Analysis.Calculus.LocalExtr.Basic +import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Derivative +import Mathlib.Analysis.Calculus.Deriv.Add +import Mathlib.Analysis.Calculus.Deriv.Mul /-! @@ -30,6 +36,8 @@ State-based version of `LocalArgument.lean`. The conclusion provides gen bootstr iterates stay in Ω ∧ Lyapunov decays geometrically with `nesterovSeqGen`. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean @@ -139,7 +147,7 @@ private abbrev localConvergenceAtBasePointGenProof set P := fderiv ℝ π mstar with hP_def -- ── Bridge: connect our hand-rolled π to the canonical PLMB projection ── have hS_ne' : S.Nonempty := ⟨mstar, hmstar⟩ - obtain ⟨π', hπ'_on_U, _, _, _, _, _, _, hπ'_diff, hπ'_self_adj, hπ'_C1⟩ := + obtain ⟨π', hπ'_on_U, _, _, _, _, _, hπ'_kills, hπ'_diff, hπ'_self_adj, hπ'_C1⟩ := tubular_neighborhood_projection hTub_sub hS_ne' have hπ_eq_on_U' : ∀ y ∈ U, π y = π' y := by intro y hyU @@ -197,42 +205,26 @@ private abbrev localConvergenceAtBasePointGenProof -- ── Curvature absorption (gen) ────────────────────────────────── -- Prerequisites have hε_bound : ε * η ≤ Real.sqrt (μ_minus * η) := by - have h_nn : (0:ℝ) ≤ ε * η := mul_nonneg (le_of_lt hε_pos) (le_of_lt hη_pos) - rw [Real.le_sqrt h_nn (mul_nonneg (by linarith : (0:ℝ) ≤ μ_minus) (le_of_lt hη_pos))] - have hε_sq : ε ^ 2 ≤ μ_minus / η := by - have h1 := hε_le - have h2 := Real.sq_sqrt (div_nonneg - (by linarith : (0:ℝ) ≤ μ_minus) (le_of_lt hη_pos)) - have h3 := sq_abs ε - have h4 := sq_abs (Real.sqrt (μ_minus / η)) - have h5 := abs_of_nonneg (le_of_lt hε_pos) - have h6 := abs_of_nonneg (Real.sqrt_nonneg (μ_minus / η)) - nlinarith - have h_sq_η := sq_nonneg η - have h_prod_sq : (ε * η) ^ 2 = ε ^ 2 * η ^ 2 := by ring - have h_cancel : (μ_minus / η) * η ^ 2 = μ_minus * η := by field_simp - nlinarith + have hε_sq : ε ^ 2 ≤ μ_minus / η := + (Real.le_sqrt hε_pos.le (div_pos hμ_minus hη_pos).le).mp hε_le + rw [← Real.sqrt_sq (mul_pos hε_pos hη_pos).le] + apply Real.sqrt_le_sqrt + calc + (ε * η) ^ 2 = ε ^ 2 * η ^ 2 := mul_pow _ _ _ + _ ≤ (μ_minus / η) * η ^ 2 := + mul_le_mul_of_nonneg_right hε_sq (sq_nonneg η) + _ = μ_minus * η := by field_simp have hπ_kills_normal : ∀ x ∈ U_plus, fderiv ℝ π (π x) (x - π x) = 0 := by intro x hx have hxU : x ∈ U := hU_sub (subset_closure hx) have hπxS : π x ∈ S := (hπ_on_U x hxU).1 have hπxU : π x ∈ U := hTub_sub.subset hπxS - have hS_ne : S.Nonempty := ⟨mstar, hmstar⟩ - obtain ⟨π', hπ'_on_U, _, _, _, _, _, hπ'_kills, _, _, _⟩ := - tubular_neighborhood_projection hTub_sub hS_ne - have hπ_eq_on_U : ∀ y ∈ U, π y = π' y := by - intro y hyU - have h1 := hπ_on_U y hyU - have h2 := hπ'_on_U y hyU - obtain ⟨_, _, huniq⟩ := hTub_sub.uniqueProj y hyU - exact (huniq (π y) ⟨h1.1, h1.2⟩).trans - (huniq (π' y) ⟨h2.1, by rw [dist_eq_norm]; exact h2.2⟩).symm have h_evt_eq : π =ᶠ[𝓝 (π x)] π' := (hTub_sub.isOpen.eventually_mem hπxU).mono - (fun y hy => hπ_eq_on_U y hy) + (fun y hy => hπ_eq_on_U' y hy) have h := hπ'_kills x hxU - rw [← hπ_eq_on_U x hxU] at h + rw [← hπ_eq_on_U' x hxU] at h rwa [← h_evt_eq.fderiv_eq] at h have hπ_diff_near : ∃ δ_diff > 0, ∀ z ∈ Metric.ball mstar δ_diff, DifferentiableAt ℝ π z := by @@ -405,16 +397,9 @@ private abbrev localConvergenceAtBasePointGenProof set en := normalDispOfState π η s -- Coercivity (via Ω ⊆ U_plus) have hcoer_here := (hcoer_bound s (hΩ_sub_Up hsx) (hΩ_sub_Up hslx)).1 - -- Ln ≥ 0 - have hLn_nn : 0 ≤ Ln := by - have h1 : 0 ≤ ‖s.v‖ ^ 2 + μ_minus * ‖en‖ ^ 2 := - add_nonneg (sq_nonneg _) (mul_nonneg (le_of_lt hmu4_pos) (sq_nonneg _)) - nlinarith [hcoer_here] -- (1) ‖s.v‖ ≤ Cv * √Ln - have hv_sq : ‖s.v‖ ^ 2 ≤ C_coer * Ln := by - have : 0 ≤ μ_minus * ‖en‖ ^ 2 := - mul_nonneg (le_of_lt hmu4_pos) (sq_nonneg _) - linarith [hcoer_here] + have hv_sq : ‖s.v‖ ^ 2 ≤ C_coer * Ln := + (le_add_of_nonneg_right (mul_nonneg hmu4_pos.le (sq_nonneg ‖en‖))).trans hcoer_here have hv_bound : ‖s.v‖ ≤ Cv * Real.sqrt Ln := by rw [show Cv = Real.sqrt C_coer from rfl, ← Real.sqrt_mul hC_coer_nn, @@ -422,15 +407,11 @@ private abbrev localConvergenceAtBasePointGenProof exact Real.sqrt_le_sqrt hv_sq -- (2) ‖en‖ ≤ Ce * √Ln have he_sq : ‖en‖ ^ 2 ≤ K * Ln := by - have h1 : μ_minus * ‖en‖ ^ 2 ≤ C_coer * Ln := by - have := sq_nonneg ‖s.v‖ - linarith [hcoer_here] - have hKmu : μ_minus * K = C_coer := by - change μ_minus * (C_coer / μ_minus) = C_coer - field_simp - have h2 : μ_minus * (K * Ln) = C_coer * Ln := by nlinarith - by_contra h; push Not at h - linarith [mul_lt_mul_of_pos_left h hmu4_pos] + calc + ‖en‖ ^ 2 ≤ (C_coer * Ln) / μ_minus := + (le_div_iff₀' hmu4_pos).mpr + ((le_add_of_nonneg_left (sq_nonneg ‖s.v‖)).trans hcoer_here) + _ = K * Ln := (div_mul_eq_mul_div C_coer μ_minus Ln).symm have he_bound : ‖en‖ ≤ Ce * Real.sqrt Ln := by have hK_nn : (0 : ℝ) ≤ K := by positivity rw [show Ce = Real.sqrt K from rfl, @@ -529,7 +510,8 @@ private abbrev localConvergenceAtBasePointGenProof -- Derive ‖Pv‖ ≤ ‖v‖ from the Pythagorean identity have hP_norm : ∀ w : E d, ‖P w‖ ≤ ‖w‖ := by intro w - have hPw_sq : ‖P w‖ ^ 2 ≤ ‖w‖ ^ 2 := by nlinarith [hP_ortho w, sq_nonneg ‖w - P w‖] + have hPw_sq : ‖P w‖ ^ 2 ≤ ‖w‖ ^ 2 := + (le_add_of_nonneg_right (sq_nonneg ‖w - P w‖)).trans_eq (hP_ortho w).symm calc ‖P w‖ = Real.sqrt (‖P w‖ ^ 2) := (Real.sqrt_sq (norm_nonneg _)).symm _ ≤ Real.sqrt (‖w‖ ^ 2) := Real.sqrt_le_sqrt hPw_sq _ = ‖w‖ := Real.sqrt_sq (norm_nonneg _) diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalArgument.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalArgument.lean index a674984a7a..af16634c74 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalArgument.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalArgument.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs import LeanPool.PLAcceleratedNesterovLean.Convergence.GenLocalArgument +import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step1 import LeanPool.PLAcceleratedNesterovLean.Convergence.RateArithmetic /-! @@ -16,6 +20,8 @@ initial-energy neighborhood and converts the generalized state sequence back to `nesterovSeq`. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry.lean index fd1027bcfb..47431c0da0 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.HessianBound -import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.Main -import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.SegmentEstimate -import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.Step1 -import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.Step2 +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.HessianBound +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.Main +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.SegmentEstimate +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.Step1 +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.Step2 /-! # Local geometry estimates -/ + +@[expose] public section diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/HessianBound.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/HessianBound.lean index 7299a493d7..f0af832f86 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/HessianBound.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/HessianBound.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.Step1 -import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL.Main +import Mathlib.Analysis.InnerProductSpace.Calculus /-! # Hessian coercivity from the Polyak-Łojasiewicz condition @@ -21,6 +23,8 @@ bounds proved in `MorseBott.HessianPL`. The unique content here: 4. `PL_gradient_hessian_bound`: gradient-form export -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/Main.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/Main.lean index fa05031f0b..90ed3b4a9b 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/Main.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/Main.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs +import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.SegmentEstimate import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.Step1 import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.Step2 -import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.HessianBound -import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.SegmentEstimate import LeanPool.PLAcceleratedNesterovLean.MorseBott.Bridge -import Mathlib.Analysis.Calculus.FDeriv.Symmetric +import LeanPool.PLAcceleratedNesterovLean.MorseBott.Submanifold +import Mathlib.Analysis.Calculus.Deriv.Add +import Mathlib.Analysis.Calculus.Deriv.Mul +import Mathlib.Analysis.InnerProductSpace.Calculus /-! @@ -24,6 +29,8 @@ neighborhood U₊ of m⋆ with U₊ ⊂⊂ U, and ε > 0 with ε ≤ √(μ'/η) (d) Hessian lower bound: D²f(x) ≽ -εI -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/SegmentEstimate.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/SegmentEstimate.lean index ecfeb6768c..58fb0270ef 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/SegmentEstimate.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/SegmentEstimate.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.Step2 +import Mathlib.Analysis.Calculus.Deriv.MeanValue import Mathlib.Analysis.InnerProductSpace.Calculus -import Mathlib.Analysis.Calculus.ContDiff.Comp /-! # Segment Estimate Helpers @@ -16,6 +18,8 @@ Provides a generalized strong aiming lemma (no φ'(0) = 0 requirement) and the fiber-path Hessian-to-second-derivative connection. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/Step1.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/Step1.lean index 2a7b6efceb..0a80010724 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/Step1.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/Step1.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme import Mathlib.Analysis.Calculus.Deriv.MeanValue +import Mathlib.Analysis.InnerProductSpace.Calculus /-! # Local Geometry Step 1: Hessian Bounds via Continuity @@ -22,6 +24,8 @@ Both arguments use: continuous function ≥ threshold on compact set ⟹ ≥ (threshold - δ) on a neighborhood. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/Step2.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/Step2.lean index f00c0b2407..7cb8314e6e 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/Step2.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LocalGeometry/Step2.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme -import Mathlib.Analysis.Calculus.Deriv.Comp -import Mathlib.Analysis.Calculus.Deriv.Add -import Mathlib.Analysis.Calculus.Deriv.Mul +public import LeanPool.PLAcceleratedNesterovLean.Core.Defs import Mathlib.Analysis.Calculus.Deriv.MeanValue +import Mathlib.Analysis.Calculus.FDeriv.Pow /-! # Local Geometry Step 2: Fiber Integration for Quadratic Growth and Strong Aiming @@ -26,6 +25,8 @@ Since U₊ is fiber-saturated, m + te ∈ U₊ for t ∈ [0,1]. So ⟨∇f(x), e⟩ ≥ f(x) - f⋆ + (μ'/2)‖e‖² -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction.lean index 5491d793b3..f96520a227 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction.lean @@ -3,16 +3,19 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.AuxVar -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.FlatCaseArithmetic -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.FlatCaseHelper -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.GenMain -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Main -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step1 -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step2 -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step3 +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.AuxVar +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.FlatCaseArithmetic +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.FlatCaseHelper +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.GenMain +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Main +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step1 +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step2 +public import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step3 /-! # Lyapunov contraction estimates -/ + +@[expose] public section diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/AuxVar.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/AuxVar.lean index 9c04ad129d..537840722b 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/AuxVar.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/AuxVar.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme import LeanPool.PLAcceleratedNesterovLean.Convergence.StateContraction.AuxVarRecursion /-! @@ -13,6 +15,8 @@ The sequence-indexed recursion is the zero-velocity sequence specialization of the state-based one-step identity `auxVarOfState_step`. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/FlatCaseArithmetic.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/FlatCaseArithmetic.lean index f2759ac825..5bd312f6f7 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/FlatCaseArithmetic.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/FlatCaseArithmetic.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import Mathlib.Basic.Real.Basic -import Mathlib.Tactic.Linarith +public import Mathlib.Basic.Real.Basic +import Mathlib.Data.Rat.Cast.Order import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Flat-Case Lyapunov Contraction: Arithmetic Core @@ -33,6 +38,8 @@ After cancellations the remaining coefficients are all ≤ 0: • PperpVsq: (1-a)·(εη − a)/2 ≤ 0 (since εη ≤ a) -/ +@[expose] public section + namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/FlatCaseHelper.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/FlatCaseHelper.lean index 3e1d854fe4..a6ed2ced3d 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/FlatCaseHelper.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/FlatCaseHelper.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +public import LeanPool.PLAcceleratedNesterovLean.Core.Defs /-! # Algebraic helper lemmas for the flat-case Lyapunov bound @@ -13,6 +14,8 @@ Provides norm expansions, Pythagorean decompositions, inner product decompositions, and cross-term vanishing for orthogonal projectors. -/ +@[expose] public section + noncomputable section diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/GenMain.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/GenMain.lean index c7c065b4e1..7574f52e19 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/GenMain.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/GenMain.lean @@ -3,14 +3,14 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen +import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.FlatCaseArithmetic +import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.FlatCaseHelper import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step1 import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step2 import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step3 -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.AuxVar -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.FlatCaseHelper -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.FlatCaseArithmetic -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen import LeanPool.PLAcceleratedNesterovLean.Convergence.StateContraction.AuxVarRecursion @@ -21,6 +21,8 @@ Generalization of `lyapunov_contraction` (Main.lean) to arbitrary `NesterovState supporting nonzero initial velocity. Used by `GenLocalArgument.lean`. -/ +@[expose] public section + noncomputable section diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Main.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Main.lean index 70a90aa599..bccc4aab65 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Main.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Main.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.AuxVar +import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.FlatCaseArithmetic +import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.FlatCaseHelper import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step1 import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step2 import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step3 -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.AuxVar -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.FlatCaseHelper -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.FlatCaseArithmetic /-! @@ -20,6 +22,8 @@ modified Nesterov scheme contracts the Lyapunov function by a factor 1 - a/2, where a = √(μ'·η). -/ +@[expose] public section + noncomputable section diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Step1.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Step1.lean index cc38fa461c..1da4d1a6ba 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Step1.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Step1.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme -import Mathlib.Analysis.Calculus.Deriv.Comp -import Mathlib.Analysis.Calculus.Deriv.Add -import Mathlib.Analysis.Calculus.Deriv.Mul +public import LeanPool.PLAcceleratedNesterovLean.Core.Defs import Mathlib.Analysis.Calculus.Deriv.MeanValue +import Mathlib.Analysis.Calculus.Deriv.Pow /-! @@ -29,6 +28,8 @@ If ε·η ≤ a and 0 ≤ a < 1: (1-a)(1+a) ≤ (1+a)² = 2(1-a)λ -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Step2.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Step2.lean index c88a912b56..6d116f91da 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Step2.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Step2.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +public import LeanPool.PLAcceleratedNesterovLean.Core.Defs /-! # Lyapunov Contraction Step 2: Normal Terms and Perturbation Absorption @@ -23,6 +24,8 @@ Since u_{n+1} = w_n + √μ' ξ_n: ½‖u_{n+1}‖² = ½‖w_n‖² + √μ'⟨w_n, ξ_n⟩ + (μ'/2)‖ξ_n‖² -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Step3.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Step3.lean index ba01266fa1..93106b8b9f 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Step3.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/LyapunovContraction/Step3.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import Mathlib.Analysis.Real.Sqrt import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step1 -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step2 /-! # Lyapunov Contraction Step 3: Algebraic Assembly Lemmas @@ -41,6 +42,8 @@ is bounded by (1-a) times the corresponding component of L_n. L_{n+1} ≤ (1-a) L_n + perturbation ≤ (1-a/2) L_n. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/MainTheoremInternal.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/MainTheoremInternal.lean index d992fd9af7..aa90b87b73 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/MainTheoremInternal.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/MainTheoremInternal.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import LeanPool.PLAcceleratedNesterovLean.Convergence.PhaseSchedule +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen +public import Mathlib.Geometry.Manifold.SmoothEmbedding +import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step1 import LeanPool.PLAcceleratedNesterovLean.Convergence.NesterovConvergence import LeanPool.PLAcceleratedNesterovLean.Core.EmbeddedManifold +import Mathlib.Analysis.Calculus.LocalExtr.Basic /-! @@ -15,6 +21,8 @@ This file contains helper statements used by `PLAcceleratedNesterovLean.MainTheo file intentionally exposes only the clean top-level theorem. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/MotionError.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/MotionError.lean index 45625f6e5e..6d8da358e9 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/MotionError.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/MotionError.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Convergence.MotionError.Main +public import LeanPool.PLAcceleratedNesterovLean.Convergence.MotionError.Main /-! # Motion error estimates -/ + +@[expose] public section diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/MotionError/Main.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/MotionError/Main.lean index d9a8b6e678..bc7b0b741a 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/MotionError/Main.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/MotionError/Main.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +public import LeanPool.PLAcceleratedNesterovLean.Core.Defs /-! # Motion Error Step 1: Gradient Bound from L-Smoothness @@ -16,6 +17,8 @@ Combined with ‖e_n‖² ≤ C_coer/μ' · L_n from coercivity: ‖g_n‖ ≤ L · √(C_coer/μ') · √L_n =: C_g · √L_n -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/NesterovConvergence.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/NesterovConvergence.lean index 6a227c618d..98fd214243 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/NesterovConvergence.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/NesterovConvergence.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import LeanPool.PLAcceleratedNesterovLean.Convergence.PhaseSchedule +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs +import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Step1 import LeanPool.PLAcceleratedNesterovLean.Convergence.GenLocalArgument +import LeanPool.PLAcceleratedNesterovLean.Convergence.LocalGeometry.Main import LeanPool.PLAcceleratedNesterovLean.Convergence.RateArithmetic -import LeanPool.PLAcceleratedNesterovLean.Convergence.PhaseSchedule -import LeanPool.PLAcceleratedNesterovLean.Convergence.Coercivity.Step1 -import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step1 /-! # Retuned Nesterov Convergence @@ -33,6 +36,8 @@ The main specialization sets μ' = μ·(1−θ), η = 1/L, and chooses local specialized theorem. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/PhaseSchedule.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/PhaseSchedule.lean index 2d91b189bd..246d543ebc 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/PhaseSchedule.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/PhaseSchedule.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import Mathlib.Analysis.Real.Sqrt import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Analysis.SpecialFunctions.Log.Basic -import Mathlib.Topology.Algebra.InfiniteSum.Basic /-! # Retuning Parameters for Nesterov Algorithm @@ -21,6 +21,8 @@ Key arithmetic facts: - θₖ ↓ 0 as k → ∞ -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/RateArithmetic.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/RateArithmetic.lean index a5a1418b9c..13c3e4df2b 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/RateArithmetic.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/RateArithmetic.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import LeanPool.PLAcceleratedNesterovLean.Core.Defs import LeanPool.PLAcceleratedNesterovLean.Convergence.PhaseSchedule -import LeanPool.PLAcceleratedNesterovLean.Core.Defs -import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Analysis.SpecialFunctions.Log.Basic /-! # Multi-Phase Rate Arithmetic @@ -21,6 +20,8 @@ These establish that: All lemmas are independent of the Lean formalization of the algorithm. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/StateContraction.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/StateContraction.lean index 07e1da2fc9..18eee6c7cc 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/StateContraction.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/StateContraction.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Convergence.StateContraction.AuxVarRecursion +public import LeanPool.PLAcceleratedNesterovLean.Convergence.StateContraction.AuxVarRecursion /-! # State contraction estimates -/ + +@[expose] public section diff --git a/LeanPool/PLAcceleratedNesterovLean/Convergence/StateContraction/AuxVarRecursion.lean b/LeanPool/PLAcceleratedNesterovLean/Convergence/StateContraction/AuxVarRecursion.lean index b6719be7f7..69d7d89732 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Convergence/StateContraction/AuxVarRecursion.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Convergence/StateContraction/AuxVarRecursion.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen import LeanPool.PLAcceleratedNesterovLean.Convergence.LyapunovContraction.Step1 /-! @@ -18,6 +19,8 @@ Key identity: u' = ((1-a)·P⊥v + √μ'·e - √η·P⊥g) + √μ'·ξ where u' = auxVarOfState at step(s), and all quantities are computed from s. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Core.lean b/LeanPool/PLAcceleratedNesterovLean/Core.lean index 9fabb02161..666a083a91 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Core.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Core.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.Defs -import LeanPool.PLAcceleratedNesterovLean.Core.EmbeddedManifold -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen +public import LeanPool.PLAcceleratedNesterovLean.Core.Defs +public import LeanPool.PLAcceleratedNesterovLean.Core.EmbeddedManifold +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen /-! # Core definitions for PL-accelerated Nesterov convergence -/ + +@[expose] public section diff --git a/LeanPool/PLAcceleratedNesterovLean/Core/Defs.lean b/LeanPool/PLAcceleratedNesterovLean/Core/Defs.lean index ab2af82254..1bbc5a0727 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Core/Defs.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Core/Defs.lean @@ -3,21 +3,10 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import Mathlib.Analysis.Calculus.Gradient.Basic -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Topology.EMetricSpace.Lipschitz -import Mathlib.Topology.MetricSpace.Lipschitz -import Mathlib.Topology.MetricSpace.Thickening -import Mathlib.Topology.Connected.Basic -import Mathlib.Topology.Compactness.Compact -import Mathlib.Geometry.Manifold.IsManifold.Basic -import Mathlib.Geometry.Manifold.ChartedSpace -import Mathlib.Geometry.Manifold.ContMDiff.Defs -import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace -import Mathlib.Geometry.Manifold.SmoothEmbedding -import Mathlib.Analysis.Calculus.FDeriv.Comp -import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct +public import Mathlib.Analysis.Calculus.Gradient.Basic +public import Mathlib.Geometry.Manifold.IsManifold.Basic /-! # Definitions for Nesterov Acceleration under a Local Polyak-Łojasiewicz Condition @@ -26,6 +15,8 @@ Core definitions: ambient space, optimization concepts (argmin, PL condition, L- tubular neighborhoods, first-order algorithm model, convergence rate, and manifold setup. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Core/EmbeddedManifold.lean b/LeanPool/PLAcceleratedNesterovLean/Core/EmbeddedManifold.lean index 2990c78d88..02f503edcb 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Core/EmbeddedManifold.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Core/EmbeddedManifold.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.Defs +public import LeanPool.PLAcceleratedNesterovLean.Core.Defs +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs +public import Mathlib.Geometry.Manifold.SmoothEmbedding import LeanPool.PLAcceleratedNesterovLean.MorseBott.NormalHessianBound import LeanPool.PLAcceleratedNesterovLean.MorseBott.Submanifold -import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection +import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.IFT +import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct /-! # Embedded Manifold Geometry @@ -29,6 +33,8 @@ structure. sub-neighborhood. -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean @@ -139,8 +145,8 @@ private abbrev smooth_embedding_local_graph {d n : ℕ} have hp_source : p ∈ c.source := mem_extChartAt_source p -- Step 3: Key analytic properties of g have hg_smooth : ContDiffAt ℝ 2 g a := by - obtain ⟨F, _, _, hF⟩ := hι.isImmersion - have hFp := hF p + let F := hι.isImmersion.complement + have hFp := hι.isImmersion.isImmersionOfComplement_complement p have hp_ext_source : p ∈ (hFp.domChart.extend (modelI n)).source := by rw [hFp.domChart.extend_source]; exact hFp.mem_domChart_source have hp_inTarget := (hFp.domChart.extend (modelI n)).map_source hp_ext_source @@ -170,8 +176,8 @@ private abbrev smooth_embedding_local_graph {d n : ℕ} change ι (c.symm (c p)) = m rw [PartialEquiv.left_inv c hp_source, hp] have hg_inj : Function.Injective (fderiv ℝ g a) := by - obtain ⟨F, _, _, hF⟩ := hι.isImmersion - have hFp := hF p + let F := hι.isImmersion.complement + have hFp := hι.isImmersion.isImmersionOfComplement_complement p have : (modelI n).Boundaryless := by unfold modelI; infer_instance have hg_diff' : DifferentiableAt ℝ g a := hg_smooth.differentiableAt (by norm_num) have hp_ext_source : p ∈ (hFp.domChart.extend (modelI n)).source := by diff --git a/LeanPool/PLAcceleratedNesterovLean/Core/NesterovScheme.lean b/LeanPool/PLAcceleratedNesterovLean/Core/NesterovScheme.lean index cb93c6686c..829e746636 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Core/NesterovScheme.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Core/NesterovScheme.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.Defs -import Mathlib.Geometry.Manifold.MFDeriv.Basic +public import LeanPool.PLAcceleratedNesterovLean.Core.Defs +public import Mathlib.Geometry.Manifold.MFDeriv.Defs /-! # Modified Nesterov Scheme and Supporting Definitions @@ -18,6 +19,8 @@ Shared definitions for the proof of local accelerated convergence: - Tangent/normal space of an embedded manifold -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/Core/NesterovSeqGen.lean b/LeanPool/PLAcceleratedNesterovLean/Core/NesterovSeqGen.lean index 0aaeb004c5..ee3ee7b76a 100644 --- a/LeanPool/PLAcceleratedNesterovLean/Core/NesterovSeqGen.lean +++ b/LeanPool/PLAcceleratedNesterovLean/Core/NesterovSeqGen.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovScheme /-! # Generalized Nesterov Sequence and State-Based Definitions @@ -18,6 +19,8 @@ These are needed for the Nesterov algorithm with arbitrary initial state (nonzero velocity). -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/MainTheorem.lean b/LeanPool/PLAcceleratedNesterovLean/MainTheorem.lean index 94aa3b19f0..4f9482608d 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MainTheorem.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MainTheorem.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import LeanPool.PLAcceleratedNesterovLean.Core.NesterovSeqGen +public import Mathlib.Geometry.Manifold.SmoothEmbedding import LeanPool.PLAcceleratedNesterovLean.Convergence.MainTheoremInternal /-! # Public main theorem wrappers -/ +@[expose] public section + noncomputable section namespace PLAcceleratedNesterovLean diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott.lean index 26f40ea254..db6a6f3a51 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott.lean @@ -3,18 +3,21 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.Bridge -import LeanPool.PLAcceleratedNesterovLean.MorseBott.BridgeDefs -import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs -import LeanPool.PLAcceleratedNesterovLean.MorseBott.GradAlign -import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL -import LeanPool.PLAcceleratedNesterovLean.MorseBott.IFTProof -import LeanPool.PLAcceleratedNesterovLean.MorseBott.NormalHessianBound -import LeanPool.PLAcceleratedNesterovLean.MorseBott.PLImpliesMB -import LeanPool.PLAcceleratedNesterovLean.MorseBott.Submanifold -import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.Bridge +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.BridgeDefs +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.GradAlign +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.IFTProof +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.NormalHessianBound +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.PLImpliesMB +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.Submanifold +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection /-! # Morse-Bott infrastructure for PL-accelerated Nesterov convergence -/ + +@[expose] public section diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/Bridge.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/Bridge.lean index a0917ea6ab..751d8a9d17 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/Bridge.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/Bridge.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection -import LeanPool.PLAcceleratedNesterovLean.MorseBott.NormalHessianBound -import LeanPool.PLAcceleratedNesterovLean.MorseBott.BridgeDefs +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.NormalHessianBound +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.BridgeDefs +public import Mathlib.Analysis.Calculus.Gradient.Basic +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs +import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL.Main import LeanPool.PLAcceleratedNesterovLean.MorseBott.PLImpliesMB -import Mathlib.Analysis.Calculus.Gradient.Basic +import LeanPool.PLAcceleratedNesterovLean.MorseBott.Submanifold +import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Derivative /-! Copyright (c) 2025. All rights reserved. @@ -46,6 +50,8 @@ setting used by PLAcceleratedNesterovLeans (where `E d := EuclideanSpace ℝ (Fi `PLAcceleratedNesterovLean/Convergence/LocalGeometry/Main.lean` -/ +@[expose] public section + open Filter Topology Metric Submodule InnerProductSpace Set noncomputable section diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/BridgeDefs.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/BridgeDefs.lean index 7f91f5a00e..a897a3b881 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/BridgeDefs.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/BridgeDefs.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Analysis.InnerProductSpace.Dual +public import Mathlib.Analysis.InnerProductSpace.Dual +public import Mathlib.Analysis.Calculus.FDeriv.Defs +import Mathlib.Tactic.Positivity.Finset /-! # Shared definitions for external theorem compatibility @@ -15,6 +16,8 @@ These mirror definitions from the source project so external theorems can be stated and proved using the same types. -/ +@[expose] public section + open Filter Topology Metric InnerProductSpace noncomputable section diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/Defs.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/Defs.lean index 7b643f421d..af097db948 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/Defs.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/Defs.lean @@ -3,14 +3,10 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import Mathlib.Analysis.Calculus.FDeriv.Basic -import Mathlib.Analysis.Calculus.ContDiff.Defs -import Mathlib.Analysis.InnerProductSpace.Projection.Basic -import Mathlib.Analysis.InnerProductSpace.Projection.Submodule -import Mathlib.Analysis.InnerProductSpace.Projection.FiniteDimensional -import Mathlib.Topology.Order.LocalExtr -import Mathlib.Topology.MetricSpace.HausdorffDistance +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.Analysis.InnerProductSpace.Projection.Basic /-! Copyright (c) 2025. All rights reserved. @@ -34,6 +30,8 @@ Formalization of definitions from: - `IsMuMB` : μ-Morse–Bott property -/ +@[expose] public section + open Filter Topology Metric Submodule noncomputable section diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/GradAlign.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/GradAlign.lean index a87b229bba..1bee90b07e 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/GradAlign.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/GradAlign.lean @@ -3,14 +3,13 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs +import Mathlib.Analysis.Calculus.ContDiff.Comp +import Mathlib.Analysis.Calculus.LocalExtr.Basic import Mathlib.Analysis.Calculus.MeanValue import Mathlib.Analysis.InnerProductSpace.Dual -import Mathlib.Analysis.Calculus.FDeriv.Symmetric -import Mathlib.Analysis.Calculus.Deriv.Add -import Mathlib.Analysis.Calculus.Deriv.Comp -import Mathlib.Analysis.Calculus.LocalExtr.Basic /-! # Gradient Alignment Lemma @@ -19,6 +18,8 @@ Under μ-PŁ at a local min x₀, proves `fderiv(x) = 0 ↔ fderiv(x)|_{T⊥} = for x near x₀. Uses Taylor remainder bounds and a Hessian perturbation argument. -/ +@[expose] public section + open Filter Topology InnerProductSpace Submodule Set noncomputable section diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/HessianPL.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/HessianPL.lean index 40da49ca75..ad93d62147 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/HessianPL.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/HessianPL.lean @@ -3,6 +3,7 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL.Basics -import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL.Main +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL.Basics +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL.Main diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/HessianPL/Basics.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/HessianPL/Basics.lean index 45c18b66d5..093baee635 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/HessianPL/Basics.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/HessianPL/Basics.lean @@ -3,13 +3,11 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs import Mathlib.Analysis.Calculus.FDeriv.Symmetric import Mathlib.Analysis.Calculus.LocalExtr.Basic -import Mathlib.Analysis.Calculus.MeanValue -import Mathlib.Analysis.Calculus.FDeriv.CompCLM -import Mathlib.Topology.Order.Compact /-! # Helper lemmas for Hessian coercivity from PŁ @@ -20,6 +18,8 @@ approach: the minimum of H(w,w) on the unit sphere of ker(H)⊥ is attained at an eigenvector, and PŁ forces this minimum to be ≥ μ. -/ +@[expose] public section + open Filter Topology Metric Submodule Asymptotics noncomputable section diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/HessianPL/Main.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/HessianPL/Main.lean index 1ceab015f1..60d5a69c07 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/HessianPL/Main.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/HessianPL/Main.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL.Basics -import Mathlib.Topology.Order.Compact +import Mathlib.Analysis.Calculus.ContDiff.Comp +import Mathlib.Analysis.Calculus.LocalExtr.Basic /-! # Hessian coercivity from PŁ — main theorems @@ -14,6 +17,8 @@ Proves `muPL_norm_sq_bound` and `hessian_coercive_on_orthogonal_of_MuPL_impl`, establishing that the Hessian is μ-coercive on ker(Hess)⊥ under the PŁ condition. -/ +@[expose] public section + open Filter Topology Metric Submodule Asymptotics noncomputable section diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/IFTProof.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/IFTProof.lean index 8df8aa3c78..8657071369 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/IFTProof.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/IFTProof.lean @@ -3,13 +3,9 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs -import Mathlib.Analysis.Calculus.LocalExtr.Basic -import Mathlib.Analysis.Calculus.FDeriv.Symmetric -import Mathlib.Analysis.Calculus.MeanValue -import Mathlib.Topology.Order.Compact -import Mathlib.Analysis.Calculus.Implicit +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs import Mathlib.Analysis.Calculus.ImplicitContDiff import Mathlib.Analysis.InnerProductSpace.Dual @@ -20,6 +16,8 @@ Proves `ift_gives_graph`: under Hessian coercivity on the normal space, the critical set near x₀ is locally a C¹ graph over ker(Hess f(x₀)). -/ +@[expose] public section + open Filter Topology Metric Submodule Asymptotics noncomputable section diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/NormalHessianBound.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/NormalHessianBound.lean index d743c45ed5..b8040cfdec 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/NormalHessianBound.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/NormalHessianBound.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL -import Mathlib.Analysis.InnerProductSpace.Dual +public import Mathlib.Analysis.InnerProductSpace.Dual +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs +import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL.Main +import Mathlib.Analysis.Calculus.ContDiff.Comp /-! Copyright (c) 2025. All rights reserved. @@ -38,6 +41,8 @@ These are equal for C² functions because: - PLMB/HessianPL.lean: `hessian_coercive_on_orthogonal_of_MuPL_impl` -/ +@[expose] public section + open Filter Topology Metric Submodule InnerProductSpace diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/PLImpliesMB.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/PLImpliesMB.lean index 413d812f9d..9502153eea 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/PLImpliesMB.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/PLImpliesMB.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs +import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL.Main import LeanPool.PLAcceleratedNesterovLean.MorseBott.Submanifold +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal /-! Copyright (c) 2025. All rights reserved. @@ -38,6 +41,8 @@ Combining these two gives μ-MB. conditions for C² functions", Corollary 2.17. -/ +@[expose] public section + open Filter Topology Metric noncomputable section diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/Submanifold.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/Submanifold.lean index 6bcf051795..e42eb3f60f 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/Submanifold.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/Submanifold.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.IFTProof +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs import LeanPool.PLAcceleratedNesterovLean.MorseBott.GradAlign -import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL +import LeanPool.PLAcceleratedNesterovLean.MorseBott.HessianPL.Main +import LeanPool.PLAcceleratedNesterovLean.MorseBott.IFTProof +import Mathlib.Analysis.Calculus.LocalExtr.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal /-! # Theorem 2.16: PŁ ⟹ S is a submanifold @@ -62,6 +66,8 @@ where ∇f(x) ∈ E is the Riesz representative of Df(x) ∈ E*. `ImplicitFunctionData`. -/ +@[expose] public section + open Filter Topology Metric Submodule Asymptotics noncomputable section diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection.lean index 5d1bacdcf5..3f8e318b16 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection.lean @@ -3,7 +3,8 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs -import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.IFT -import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Derivative +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.IFT +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Derivative diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection/Defs.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection/Defs.lean index e289655ee1..14286575c6 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection/Defs.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection/Defs.lean @@ -3,12 +3,10 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.Defs -import Mathlib.Analysis.Calculus.FDeriv.Congr -import Mathlib.Analysis.Calculus.ContDiff.Comp -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Analysis.InnerProductSpace.Adjoint +public import Mathlib.Analysis.InnerProductSpace.Adjoint +public import Mathlib.Analysis.Calculus.ContDiff.Defs /-! Copyright (c) 2025. All rights reserved. @@ -20,6 +18,8 @@ Core definitions (`optimalityEqn`, `IsTubularNeighborhoodOfSubmanifold`, `tubularProj`) and basic helper lemmas for the nearest-point projection. -/ +@[expose] public section + open Filter Topology Metric NNReal attribute [local instance] Classical.propDecidable diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection/Derivative.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection/Derivative.lean index 64f60251a2..8bd658ed16 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection/Derivative.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection/Derivative.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.IFT -import Mathlib.Analysis.Calculus.MeanValue -import Mathlib.Analysis.InnerProductSpace.Calculus /-! Copyright (c) 2025. All rights reserved. @@ -19,6 +18,8 @@ Proof that `fderiv ℝ π m = V.starProjection` at each `m ∈ S`, and the main theorem assembling all 10 properties of the projection. -/ +@[expose] public section + open Filter Topology Metric NNReal attribute [local instance] Classical.propDecidable diff --git a/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection/IFT.lean b/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection/IFT.lean index 1833286d15..790a6ac0f2 100644 --- a/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection/IFT.lean +++ b/LeanPool/PLAcceleratedNesterovLean/MorseBott/TubularProjection/IFT.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 M1ngXU. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Max Obreiter, Tobias Steinbrecher, Robert Foerster -/ +module -import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs -import Mathlib.Analysis.Calculus.ImplicitContDiff +public import LeanPool.PLAcceleratedNesterovLean.MorseBott.TubularProjection.Defs +public import Mathlib.Analysis.Calculus.ImplicitContDiff import Mathlib.Analysis.Calculus.LocalExtr.Basic import Mathlib.Analysis.InnerProductSpace.Calculus @@ -16,6 +17,8 @@ IFT-based proof that the nearest-point projection is C¹ at every point of the submanifold S. -/ +@[expose] public section + open Filter Topology Metric NNReal attribute [local instance] Classical.propDecidable diff --git a/LeanPool/PartialCombinatoryAlgebras.lean b/LeanPool/PartialCombinatoryAlgebras.lean index 3d4defca0f..7095b21cc9 100644 --- a/LeanPool/PartialCombinatoryAlgebras.lean +++ b/LeanPool/PartialCombinatoryAlgebras.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Andrej Bauer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrej Bauer -/ +module -import LeanPool.PartialCombinatoryAlgebras.Basic -import LeanPool.PartialCombinatoryAlgebras.PartialCombinatoryAlgebra -import LeanPool.PartialCombinatoryAlgebras.CombinatoryAlgebra -import LeanPool.PartialCombinatoryAlgebras.Programming -import LeanPool.PartialCombinatoryAlgebras.FreeCombinatoryAlgebra -import LeanPool.PartialCombinatoryAlgebras.GraphModel +public import LeanPool.PartialCombinatoryAlgebras.Basic +public import LeanPool.PartialCombinatoryAlgebras.PartialCombinatoryAlgebra +public import LeanPool.PartialCombinatoryAlgebras.CombinatoryAlgebra +public import LeanPool.PartialCombinatoryAlgebras.Programming +public import LeanPool.PartialCombinatoryAlgebras.FreeCombinatoryAlgebra +public import LeanPool.PartialCombinatoryAlgebras.GraphModel +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.SetLike /-! # Partial Combinatory Algebras @@ -22,6 +25,8 @@ Tags: combinatory-algebra, lambda-calculus, computability MSC: 03B40, 03D75 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/PartialCombinatoryAlgebras/Basic.lean b/LeanPool/PartialCombinatoryAlgebras/Basic.lean index 847efa8ccf..05606d6f52 100644 --- a/LeanPool/PartialCombinatoryAlgebras/Basic.lean +++ b/LeanPool/PartialCombinatoryAlgebras/Basic.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Andrej Bauer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrej Bauer -/ -import Mathlib.Data.Part +module + +public import Mathlib.Data.Part /-! # Notation and core classes for partial combinatory algebras @@ -13,6 +15,8 @@ left-associative binary application operator, and the class for a partial binary operation on a type. -/ +@[expose] public section + namespace LeanPool.PartialCombinatoryAlgebras /-- A notation for totality of a partial element (we find writing `x.Dom` a bit silly). -/ diff --git a/LeanPool/PartialCombinatoryAlgebras/CombinatoryAlgebra.lean b/LeanPool/PartialCombinatoryAlgebras/CombinatoryAlgebra.lean index 883dad1798..e148103c21 100644 --- a/LeanPool/PartialCombinatoryAlgebras/CombinatoryAlgebra.lean +++ b/LeanPool/PartialCombinatoryAlgebras/CombinatoryAlgebra.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Andrej Bauer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrej Bauer -/ +module + +public import LeanPool.PartialCombinatoryAlgebras.PartialCombinatoryAlgebra +import Mathlib.Data.Finset.Attr import Mathlib.Tactic.NthRewrite -import Mathlib.Data.Part -import LeanPool.PartialCombinatoryAlgebras.Basic -import LeanPool.PartialCombinatoryAlgebras.PartialCombinatoryAlgebra +import Mathlib.Tactic.SetLike /-! # Total combinatory algebras @@ -15,6 +17,8 @@ A total combinatory structure on a type `A`, and the fact that any total combinatory algebra induces a partial combinatory algebra on the same type. -/ +@[expose] public section + namespace LeanPool.PartialCombinatoryAlgebras /-- A (total) combinatory structure on a set `A`. -/ diff --git a/LeanPool/PartialCombinatoryAlgebras/FreeCombinatoryAlgebra.lean b/LeanPool/PartialCombinatoryAlgebras/FreeCombinatoryAlgebra.lean index a7b6dd841f..8771d5d735 100644 --- a/LeanPool/PartialCombinatoryAlgebras/FreeCombinatoryAlgebra.lean +++ b/LeanPool/PartialCombinatoryAlgebras/FreeCombinatoryAlgebra.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Andrej Bauer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrej Bauer -/ -import LeanPool.PartialCombinatoryAlgebras.Basic -import LeanPool.PartialCombinatoryAlgebras.CombinatoryAlgebra +module + +public import LeanPool.PartialCombinatoryAlgebras.CombinatoryAlgebra +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.SetLike /-! # Free (total) combinatory algebra -/ +@[expose] public section + namespace LeanPool.PartialCombinatoryAlgebras namespace FreeCA diff --git a/LeanPool/PartialCombinatoryAlgebras/GraphModel.lean b/LeanPool/PartialCombinatoryAlgebras/GraphModel.lean index 522b838231..430692e62f 100644 --- a/LeanPool/PartialCombinatoryAlgebras/GraphModel.lean +++ b/LeanPool/PartialCombinatoryAlgebras/GraphModel.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Andrej Bauer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrej Bauer -/ -import Mathlib.Data.SetLike.Basic -import LeanPool.PartialCombinatoryAlgebras.Basic -import LeanPool.PartialCombinatoryAlgebras.CombinatoryAlgebra +module + +public import LeanPool.PartialCombinatoryAlgebras.CombinatoryAlgebra +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.SetLike /-! We derive from a given section-retraction `List α → α` the combinatory algebra structure on `Set α`. -/ +@[expose] public section + namespace LeanPool.PartialCombinatoryAlgebras /-- An encoding of lists of `α`'s as `α`. -/ diff --git a/LeanPool/PartialCombinatoryAlgebras/PartialCombinatoryAlgebra.lean b/LeanPool/PartialCombinatoryAlgebras/PartialCombinatoryAlgebra.lean index 15649a63ba..4edf578977 100644 --- a/LeanPool/PartialCombinatoryAlgebras/PartialCombinatoryAlgebra.lean +++ b/LeanPool/PartialCombinatoryAlgebras/PartialCombinatoryAlgebra.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Andrej Bauer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrej Bauer -/ -import Mathlib.Data.Finset.Basic -import LeanPool.PartialCombinatoryAlgebras.Basic +module + +public import LeanPool.PartialCombinatoryAlgebras.Basic +public import Mathlib.Tactic.Attr.Core +public import Mathlib.Tactic.Basic +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.SetLike +import Mathlib.Tactic.Widget.Calc /-! # Partial combinatory algebras @@ -29,6 +35,8 @@ with a separate claim that they are total. -/ +@[expose] public section + namespace LeanPool.PartialCombinatoryAlgebras /-- The partial combinatory structure on a set `A`. -/ diff --git a/LeanPool/PartialCombinatoryAlgebras/Programming.lean b/LeanPool/PartialCombinatoryAlgebras/Programming.lean index 899cf18449..05cc29d5a9 100644 --- a/LeanPool/PartialCombinatoryAlgebras/Programming.lean +++ b/LeanPool/PartialCombinatoryAlgebras/Programming.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Andrej Bauer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrej Bauer -/ -import LeanPool.PartialCombinatoryAlgebras.Basic -import LeanPool.PartialCombinatoryAlgebras.PartialCombinatoryAlgebra +module + +public import LeanPool.PartialCombinatoryAlgebras.PartialCombinatoryAlgebra +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.NthRewrite +import Mathlib.Tactic.SetLike +import Mathlib.Tactic.Widget.Calc /-! ## Programming with PCAs @@ -28,6 +33,8 @@ import LeanPool.PartialCombinatoryAlgebras.PartialCombinatoryAlgebra combinators themselves. -/ +@[expose] public section + namespace LeanPool.PartialCombinatoryAlgebras namespace PCA @@ -99,8 +106,7 @@ theorem eq_pair (u v w : Part A) (hu : u ⇓) (hv : v ⇓) (hw : w ⇓) : unfold pair simp only [compile] rw [eval_abstr_app _ _ _ _ hu, eval_abstr_app _ _ _ _ hv, eval_abstr_app _ _ _ _ hw] - change Part.some (w.get hw) ⬝ Part.some (u.get hu) ⬝ Part.some (v.get hv) = w ⬝ u ⬝ v - rw [Part.some_get hw, Part.some_get hu, Part.some_get hv] + simp [HasDot.dot, eval, subst] /-- The first projection. -/ def fst : Part A := [pca: ≪ `x ≫ .var `x ⬝ .K] @@ -117,8 +123,7 @@ theorem eq_fst (u : Part A) (hu : u ⇓) : fst ⬝ u = u ⬝ PCA.K := by unfold fst simp only [compile] rw [eval_abstr_app _ _ _ _ hu] - change Part.some (u.get hu) ⬝ PCA.K = u ⬝ PCA.K - rw [Part.some_get hu] + simp [HasDot.dot, eval, subst] /-- The second projection. -/ def snd : Part A := [pca: ≪ `x ≫ .var `x ⬝ .K'] @@ -135,8 +140,7 @@ theorem eq_snd (u : Part A) (hu : u ⇓) : snd ⬝ u = u ⬝ K' := by unfold snd simp only [compile] rw [eval_abstr_app _ _ _ _ hu] - change Part.some (u.get hu) ⬝ K' = u ⬝ K' - rw [Part.some_get hu] + simp [HasDot.dot, eval, subst, Expr.K', Expr.I, K', I] theorem eq_fst_pair (u v : Part A) (hu : u ⇓) (hv : v ⇓) : fst ⬝ (pair ⬝ u ⬝ v) = u := by calc @@ -202,9 +206,7 @@ theorem eq_X (u v w : Part A) (hu : u ⇓) (hv : v ⇓) (hw : w ⇓) : unfold X simp only [compile] rw [eval_abstr_app _ _ _ _ hu, eval_abstr_app _ _ _ _ hv, eval_abstr_app _ _ _ _ hw] - change Part.some (v.get hv) ⬝ (Part.some (u.get hu) ⬝ Part.some (u.get hu) ⬝ - Part.some (v.get hv)) ⬝ Part.some (w.get hw) = v ⬝ (u ⬝ u ⬝ v) ⬝ w - rw [Part.some_get hu, Part.some_get hv, Part.some_get hw] + simp [HasDot.dot, eval, subst] /-- The call-by-name fixed-point combinator. -/ def Z : Part A := X ⬝ X @@ -246,9 +248,7 @@ theorem eq_W (u v : Part A) (hu : u ⇓) (hv : v ⇓) : unfold W simp only [compile] rw [eval_abstr_app _ _ _ _ hu, eval_abstr_app _ _ _ _ hv] - change Part.some (v.get hv) ⬝ (Part.some (u.get hu) ⬝ - Part.some (u.get hu) ⬝ Part.some (v.get hv)) = v ⬝ (u ⬝ u ⬝ v) - rw [Part.some_get hu, Part.some_get hv] + simp [HasDot.dot, eval, subst] /-- The call-by-value fixed-point combinator. -/ def Y : Part A := W ⬝ W diff --git a/LeanPool/PartialRegularity.lean b/LeanPool/PartialRegularity.lean index 030cb995be..01bc9312f0 100644 --- a/LeanPool/PartialRegularity.lean +++ b/LeanPool/PartialRegularity.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Seewoo Lee, Ken Ono, Jujian Zhang. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Seewoo Lee, Ken Ono, Jujian Zhang -/ +module -import LeanPool.PartialRegularity.Extension +public import LeanPool.PartialRegularity.Extension +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # Almost all primes are partially regular @@ -17,6 +23,8 @@ Tags: number-theory, asymptotics MSC: 11B68, 11N05 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/PartialRegularity/Extension.lean b/LeanPool/PartialRegularity/Extension.lean index 813b78d001..daa8e0f047 100644 --- a/LeanPool/PartialRegularity/Extension.lean +++ b/LeanPool/PartialRegularity/Extension.lean @@ -3,29 +3,25 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Seewoo Lee, Ken Ono, Jujian Zhang. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Seewoo Lee, Ken Ono, Jujian Zhang -/ -import Mathlib.Algebra.Ring.GeomSum -import Mathlib.Analysis.Asymptotics.SpecificAsymptotics +module + +public import Mathlib.NumberTheory.ArithmeticFunction.Misc +public import Mathlib.NumberTheory.Bernoulli +public import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Analysis.Real.Pi.Bounds import Mathlib.Analysis.SpecialFunctions.Log.Monotone -import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init import Mathlib.Data.Set.Card.Arithmetic -import Mathlib.NumberTheory.ArithmeticFunction.Misc -import Mathlib.NumberTheory.Bernoulli +import Mathlib.NumberTheory.LSeries.Dirichlet import Mathlib.NumberTheory.LSeries.HurwitzZetaValues -import Mathlib.NumberTheory.LSeries.Nonvanishing -import Mathlib.NumberTheory.ZetaValues -import Mathlib.RingTheory.ZMod.UnitsCyclic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity /-! # Irregular primes and Bernoulli numbers (extension) This file proves a variant of the main result with an explicit constant: the count of odd primes `p ≤ X` that are not `M_α(p)`-regular is bounded by `10 · X / (log X)^(2α)`. -/ +@[expose] public section + namespace LeanPool.PartialRegularity.Extension /-- A prime `p` is `m`-regular if it has no Bernoulli numerator divisor in range. -/ diff --git a/LeanPool/PebblingLean.lean b/LeanPool/PebblingLean.lean index b3141e6a80..c113825822 100644 --- a/LeanPool/PebblingLean.lean +++ b/LeanPool/PebblingLean.lean @@ -3,26 +3,30 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import LeanPool.PebblingLean.Basic -import LeanPool.PebblingLean.Hypercube -import LeanPool.PebblingLean.Weight -import LeanPool.PebblingLean.LowerBound -import LeanPool.PebblingLean.FiniteProbability -import LeanPool.PebblingLean.Concentration -import LeanPool.PebblingLean.Delivery -import LeanPool.PebblingLean.GraphIso -import LeanPool.PebblingLean.HypercubePath -import LeanPool.PebblingLean.HypercubeProduct -import LeanPool.PebblingLean.Product -import LeanPool.PebblingLean.UpperBound -import LeanPool.PebblingLean.UpperBoundDelivery -import LeanPool.PebblingLean.UpperBoundProbability -import LeanPool.PebblingLean.UpperBoundRecurrence -import LeanPool.PebblingLean.UpperBoundLoss -import LeanPool.PebblingLean.UpperBoundParameters -import LeanPool.PebblingLean.Paper -import LeanPool.PebblingLean.Examples +public import LeanPool.PebblingLean.Basic +public import LeanPool.PebblingLean.Hypercube +public import LeanPool.PebblingLean.Weight +public import LeanPool.PebblingLean.LowerBound +public import LeanPool.PebblingLean.FiniteProbability +public import LeanPool.PebblingLean.Concentration +public import LeanPool.PebblingLean.Delivery +public import LeanPool.PebblingLean.GraphIso +public import LeanPool.PebblingLean.HypercubePath +public import LeanPool.PebblingLean.HypercubeProduct +public import LeanPool.PebblingLean.Product +public import LeanPool.PebblingLean.UpperBound +public import LeanPool.PebblingLean.UpperBoundDelivery +public import LeanPool.PebblingLean.UpperBoundProbability +public import LeanPool.PebblingLean.UpperBoundRecurrence +public import LeanPool.PebblingLean.UpperBoundLoss +public import LeanPool.PebblingLean.UpperBoundParameters +public import LeanPool.PebblingLean.Paper +public import LeanPool.PebblingLean.Examples +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # Optimal Pebbling Number of the Hypercube @@ -34,3 +38,5 @@ Main declarations: `PebblingLean.Hypercube.Paper.optimalPebblingNumber_theta` Tags: combinatorics, pebbling, hypercube MSC: 05C57 -/ + +@[expose] public section diff --git a/LeanPool/PebblingLean/Basic.lean b/LeanPool/PebblingLean/Basic.lean index e0541cb0cb..6ca3d1156e 100644 --- a/LeanPool/PebblingLean/Basic.lean +++ b/LeanPool/PebblingLean/Basic.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import Mathlib.Data.Fintype.BigOperators +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Finset.Card import Mathlib.Algebra.Order.BigOperators.Group.Finset /-! @@ -15,6 +17,8 @@ formalization: simple undirected graphs, pebbling distributions, legal pebbling moves, reachability, solvability, and optimality. -/ +@[expose] public section + namespace PebblingLean universe u diff --git a/LeanPool/PebblingLean/Concentration.lean b/LeanPool/PebblingLean/Concentration.lean index 05ef533e5d..7b3ffa4e76 100644 --- a/LeanPool/PebblingLean/Concentration.lean +++ b/LeanPool/PebblingLean/Concentration.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import Mathlib.Analysis.MeanInequalities -import Mathlib.Analysis.SpecialFunctions.Exp -import Mathlib.Analysis.SpecialFunctions.Log.Basic -import LeanPool.PebblingLean.FiniteProbability +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +public import LeanPool.PebblingLean.FiniteProbability +import Mathlib.Analysis.Convex.Jensen +import Mathlib.Analysis.Convex.SpecificFunctions.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # Finite concentration inequalities @@ -18,6 +21,8 @@ real-valued expectations so that exponential moment bounds can be stated directly. -/ +@[expose] public section + namespace PebblingLean namespace FiniteProbability diff --git a/LeanPool/PebblingLean/Delivery.lean b/LeanPool/PebblingLean/Delivery.lean index 46bc5481f1..b7f7928cbf 100644 --- a/LeanPool/PebblingLean/Delivery.lean +++ b/LeanPool/PebblingLean/Delivery.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import Mathlib.Tactic.Linarith -import LeanPool.PebblingLean.Basic +public import LeanPool.PebblingLean.Basic +import Mathlib.Algebra.BigOperators.Group.Finset.Piecewise +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Direct delivery along paths @@ -15,6 +21,8 @@ bound: a pile of size `T * 2^d` at one end of a length-`d` path can deliver `T` pebbles to the other end. -/ +@[expose] public section + namespace PebblingLean universe u diff --git a/LeanPool/PebblingLean/Examples.lean b/LeanPool/PebblingLean/Examples.lean index 4132df53ea..d38ef237d2 100644 --- a/LeanPool/PebblingLean/Examples.lean +++ b/LeanPool/PebblingLean/Examples.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import LeanPool.PebblingLean.Hypercube +public import LeanPool.PebblingLean.Hypercube +import Mathlib.Tactic.Bound.Init /-! # Small examples @@ -13,6 +15,8 @@ These definitions give named vertices and distributions for testing the basic API on low-dimensional cubes. -/ +@[expose] public section + namespace PebblingLean namespace Hypercube diff --git a/LeanPool/PebblingLean/FiniteProbability.lean b/LeanPool/PebblingLean/FiniteProbability.lean index dd3713dd0f..1b0a591df4 100644 --- a/LeanPool/PebblingLean/FiniteProbability.lean +++ b/LeanPool/PebblingLean/FiniteProbability.lean @@ -3,15 +3,19 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import Mathlib.Algebra.BigOperators.Group.Finset.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Fintype.Card +public import Mathlib.Data.Rat.Defs import Mathlib.Algebra.BigOperators.Field -import Mathlib.Algebra.Order.BigOperators.Group.Finset -import Mathlib.Data.Rat.BigOperators -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset /-! # Elementary finite probability @@ -21,6 +25,8 @@ objects used there are uniform on finite types, so probability and expectation are just normalized finite sums. -/ +@[expose] public section + namespace PebblingLean namespace FiniteProbability diff --git a/LeanPool/PebblingLean/GraphIso.lean b/LeanPool/PebblingLean/GraphIso.lean index 0c23c3c7d5..2c11d9a14b 100644 --- a/LeanPool/PebblingLean/GraphIso.lean +++ b/LeanPool/PebblingLean/GraphIso.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import LeanPool.PebblingLean.Basic +public import LeanPool.PebblingLean.Basic +import Mathlib.Tactic.Bound.Init /-! # Transport across graph isomorphisms @@ -14,6 +16,8 @@ those product constructions to hypercubes, we need a lightweight way to move pebbling distributions and solvability statements across graph isomorphisms. -/ +@[expose] public section + namespace PebblingLean universe u v diff --git a/LeanPool/PebblingLean/Hypercube.lean b/LeanPool/PebblingLean/Hypercube.lean index 1fd9ce34f8..1e043d48f0 100644 --- a/LeanPool/PebblingLean/Hypercube.lean +++ b/LeanPool/PebblingLean/Hypercube.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module +public import LeanPool.PebblingLean.Basic +public import Mathlib.Data.Fintype.Pi +public import Mathlib.Data.Nat.Choose.Basic +import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Fintype.Powerset -import LeanPool.PebblingLean.Basic +import Mathlib.Tactic.Bound.Init /-! # Hypercubes @@ -15,6 +20,8 @@ The `n`-dimensional hypercube is represented as Boolean coordinate functions coordinate. -/ +@[expose] public section + namespace PebblingLean /-- Vertices of the `n`-cube. -/ diff --git a/LeanPool/PebblingLean/HypercubePath.lean b/LeanPool/PebblingLean/HypercubePath.lean index 04ac30cb2f..6b36504e62 100644 --- a/LeanPool/PebblingLean/HypercubePath.lean +++ b/LeanPool/PebblingLean/HypercubePath.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import LeanPool.PebblingLean.Hypercube -import LeanPool.PebblingLean.Delivery +public import LeanPool.PebblingLean.Hypercube +public import LeanPool.PebblingLean.Delivery +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Paths in hypercubes @@ -15,6 +21,8 @@ distance `d` are joined by a walk of length `d`. This is the geometric input needed for direct delivery in the upper-bound proof. -/ +@[expose] public section + namespace PebblingLean namespace Hypercube diff --git a/LeanPool/PebblingLean/HypercubeProduct.lean b/LeanPool/PebblingLean/HypercubeProduct.lean index 8ddf6cf26f..941fef8903 100644 --- a/LeanPool/PebblingLean/HypercubeProduct.lean +++ b/LeanPool/PebblingLean/HypercubeProduct.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import LeanPool.PebblingLean.GraphIso -import LeanPool.PebblingLean.Hypercube -import LeanPool.PebblingLean.Product -import LeanPool.PebblingLean.UpperBound +public import LeanPool.PebblingLean.GraphIso +public import LeanPool.PebblingLean.Product +public import LeanPool.PebblingLean.UpperBound import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.Data.Fin.Embedding +import Mathlib.Basic.Finite.Prod +import Mathlib.Tactic.Bound.Init /-! # Hypercubes as Cartesian products @@ -19,6 +20,8 @@ to hypercubes. The first ingredient is the coordinate split `Q_{a+m} ≃ Q_a × Q_m`. -/ +@[expose] public section + namespace PebblingLean namespace Hypercube diff --git a/LeanPool/PebblingLean/LowerBound.lean b/LeanPool/PebblingLean/LowerBound.lean index fc29d900b6..fb8b8c9914 100644 --- a/LeanPool/PebblingLean/LowerBound.lean +++ b/LeanPool/PebblingLean/LowerBound.lean @@ -3,12 +3,21 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module +public import LeanPool.PebblingLean.Hypercube +public import LeanPool.PebblingLean.Weight +public import Mathlib.Data.Fintype.Powerset import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import LeanPool.PebblingLean.Hypercube -import LeanPool.PebblingLean.Weight +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Fintype.BigOperators +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # Lower-bound infrastructure for hypercubes @@ -19,6 +28,8 @@ for a solvable distribution on `Q_n`, every target has initial weight at least one, and hence the sum of all target weights is at least `|Q_n|`. -/ +@[expose] public section + namespace PebblingLean namespace Hypercube diff --git a/LeanPool/PebblingLean/Paper.lean b/LeanPool/PebblingLean/Paper.lean index c647576039..d2fc9e79a0 100644 --- a/LeanPool/PebblingLean/Paper.lean +++ b/LeanPool/PebblingLean/Paper.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import LeanPool.PebblingLean.UpperBoundParameters +public import LeanPool.PebblingLean.UpperBoundParameters +import LeanPool.PebblingLean.LowerBound +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # Paper-facing formulation @@ -16,6 +21,8 @@ noncomputable optimal pebbling number `optimalPebblingNumber n` and the explicit constant `CLean`. -/ +@[expose] public section + namespace PebblingLean namespace Hypercube diff --git a/LeanPool/PebblingLean/Product.lean b/LeanPool/PebblingLean/Product.lean index 3821e4d1ee..bb64098ca2 100644 --- a/LeanPool/PebblingLean/Product.lean +++ b/LeanPool/PebblingLean/Product.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module +public import LeanPool.PebblingLean.Basic +public import Mathlib.Data.Fintype.Prod import Mathlib.Algebra.Order.BigOperators.Group.Finset -import LeanPool.PebblingLean.Basic +import Mathlib.Data.Fintype.BigOperators /-! # Product constructions @@ -15,6 +18,8 @@ result here is the slice simulation lemma: a pebbling sequence in one factor of a Cartesian product can be executed inside a fixed slice of the product. -/ +@[expose] public section + namespace PebblingLean universe u v diff --git a/LeanPool/PebblingLean/UpperBound.lean b/LeanPool/PebblingLean/UpperBound.lean index 228d502309..f283e42dc8 100644 --- a/LeanPool/PebblingLean/UpperBound.lean +++ b/LeanPool/PebblingLean/UpperBound.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module +public import LeanPool.PebblingLean.Hypercube import Mathlib.Algebra.Order.Group.Nat -import LeanPool.PebblingLean.Hypercube -import LeanPool.PebblingLean.Product +import Mathlib.Data.Fintype.BigOperators +import Mathlib.Tactic.Bound.Init /-! # Upper-bound scaffolding @@ -16,6 +18,8 @@ probabilistic high-demand part of the upper bound. The probabilistic estimates themselves are not asserted here; they will be formalized as separate lemmas. -/ +@[expose] public section + namespace PebblingLean namespace Hypercube diff --git a/LeanPool/PebblingLean/UpperBoundDelivery.lean b/LeanPool/PebblingLean/UpperBoundDelivery.lean index e6fb8f0cc4..43adc8242a 100644 --- a/LeanPool/PebblingLean/UpperBoundDelivery.lean +++ b/LeanPool/PebblingLean/UpperBoundDelivery.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import Mathlib.Tactic.Ring -import LeanPool.PebblingLean.UpperBound +public import LeanPool.PebblingLean.UpperBound +public import LeanPool.PebblingLean.Delivery import LeanPool.PebblingLean.HypercubePath +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # Delivery interpretation of annulus contributions @@ -17,6 +23,8 @@ annulus center. This file proves that the counted quantity is not just bookkeeping: it is actually deliverable by pebbling moves. -/ +@[expose] public section + namespace PebblingLean namespace Hypercube diff --git a/LeanPool/PebblingLean/UpperBoundLoss.lean b/LeanPool/PebblingLean/UpperBoundLoss.lean index 1ecfc2009e..1529dae3a9 100644 --- a/LeanPool/PebblingLean/UpperBoundLoss.lean +++ b/LeanPool/PebblingLean/UpperBoundLoss.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import Mathlib.Analysis.SpecificLimits.Basic -import Mathlib.Analysis.SpecialFunctions.Exp -import LeanPool.PebblingLean.UpperBoundRecurrence +public import LeanPool.PebblingLean.UpperBoundRecurrence +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # Loss bookkeeping for the recursive upper bound @@ -20,6 +22,8 @@ parameters yet; instead, it proves the deterministic theorem that a bounded finite loss sum gives a uniform normalized-cost bound. -/ +@[expose] public section + namespace PebblingLean namespace Hypercube diff --git a/LeanPool/PebblingLean/UpperBoundParameters.lean b/LeanPool/PebblingLean/UpperBoundParameters.lean index 970de442a6..1edeee255a 100644 --- a/LeanPool/PebblingLean/UpperBoundParameters.lean +++ b/LeanPool/PebblingLean/UpperBoundParameters.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import Mathlib.Analysis.Complex.Exponential -import Mathlib.Analysis.Complex.ExponentialBounds -import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Analysis.Real.Sqrt +public import LeanPool.PebblingLean.UpperBoundLoss import LeanPool.PebblingLean.LowerBound -import LeanPool.PebblingLean.UpperBoundLoss +import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal /-! # Concrete parameter layer for the upper bound @@ -31,6 +30,8 @@ at the bottom proves that these hypotheses imply the real asymptotic upper bound. -/ +@[expose] public section + namespace PebblingLean namespace Hypercube @@ -793,7 +794,7 @@ theorem sampleCountForDemand_mean_of_annulusMean_lower {A K : ℝ} {n t : ℕ} positivity have hlower_nonneg : 0 ≤ lower := by dsimp [lower] - have hfactor : 0 ≤ 1 - delta / 8 := by nlinarith + have hfactor : 0 ≤ 1 - delta / 8 := by linarith only [hdelta_le] positivity have hmu_ge : lower ≤ mu := by simpa [lower, mu, delta, S, pow34] using hannulus @@ -822,10 +823,10 @@ theorem sampleCountForDemand_mean_of_annulusMean_lower {A K : ℝ} {n t : ℕ} change (t : ℝ) + delta * (t : ℝ) / 4 ≤ (1 + delta / 2) * (1 - delta / 8) * (t : ℝ) have ht_nonneg : 0 ≤ (t : ℝ) := by positivity - have htwo_minus : 0 ≤ 2 - delta := by nlinarith + have htwo_minus : 0 ≤ 2 - delta := sub_nonneg.mpr hdelta_le have hprod_nonneg : 0 ≤ (t : ℝ) * delta * (2 - delta) := mul_nonneg (mul_nonneg ht_nonneg hdelta_nonneg) htwo_minus - nlinarith + nlinarith only [hprod_nonneg] calc (t : ℝ) + demandGapForDemand n t ≤ x * lower := htarget_lower _ ≤ x * mu := mul_le_mul_of_nonneg_left hmu_ge hx_nonneg @@ -1238,58 +1239,14 @@ theorem stack_core_log_budget_of_linear_margin {A K : ℝ} {n : ℕ} (splitA K n : ℝ) * Real.log ((4 : ℝ) / 3) := by have hlog2_nonneg : 0 ≤ Real.log 2 := (Real.log_pos (by norm_num : (1 : ℝ) < 2)).le - have hmargin_nonneg := stack_linear_margin_nonneg - have hdiva : - ((splitA K n / 3 : ℕ) : ℝ) ≤ (splitA K n : ℝ) / 3 := - nat_div_real_le_div (splitA K n) 3 (by decide) - have hwidth := - annulusWidthCore_le_sqrt_three_n_log - (A := A) (K := K) (n := n) hA hn - have hlhsTerm : - (((splitA K n / 3 : ℕ) : ℝ) + annulusWidthCore A K n + 1) * - Real.log 2 ≤ - ((splitA K n : ℝ) / 3 + - A * Real.sqrt (3 * (n : ℝ) * Real.log (n : ℝ)) + 1) * - Real.log 2 := by - have hinside : - ((splitA K n / 3 : ℕ) : ℝ) + annulusWidthCore A K n + 1 ≤ - (splitA K n : ℝ) / 3 + - A * Real.sqrt (3 * (n : ℝ) * Real.log (n : ℝ)) + 1 := by - linarith - exact mul_le_mul_of_nonneg_right hinside hlog2_nonneg - have hcore := splitM_div_five_real_lower_bound (K := K) (n := n) - have hmargin : - ((3 : ℝ) * (n : ℝ) / 4) * - (Real.log ((4 : ℝ) / 3) - Real.log 2 / 3) ≤ - (splitA K n : ℝ) * - (Real.log ((4 : ℝ) / 3) - Real.log 2 / 3) := - mul_le_mul_of_nonneg_right ha_lower hmargin_nonneg - have hrhs : - (K * Real.sqrt ((n : ℝ) * Real.log (n : ℝ)) / 5 - 1) * - Real.log 2 + - ((3 : ℝ) * (n : ℝ) / 4) * - (Real.log ((4 : ℝ) / 3) - Real.log 2 / 3) ≤ - ((splitM K n / 5 : ℕ) : ℝ) * Real.log 2 + - (splitA K n : ℝ) * Real.log ((4 : ℝ) / 3) - - (splitA K n : ℝ) / 3 * Real.log 2 := by - have hcore_log2 := mul_le_mul_of_nonneg_right hcore hlog2_nonneg - nlinarith - calc - Real.log 2 + 2 * Real.log (n : ℝ) + - (((splitA K n / 3 : ℕ) : ℝ) + annulusWidthCore A K n + 1) * - Real.log 2 - ≤ Real.log 2 + 2 * Real.log (n : ℝ) + - ((splitA K n : ℝ) / 3 + - A * Real.sqrt (3 * (n : ℝ) * Real.log (n : ℝ)) + 1) * - Real.log 2 := by - linarith - _ = (Real.log 2 + 2 * Real.log (n : ℝ) + - (A * Real.sqrt (3 * (n : ℝ) * Real.log (n : ℝ)) + 1) * - Real.log 2) + - (splitA K n : ℝ) / 3 * Real.log 2 := by ring - _ ≤ ((splitM K n / 5 : ℕ) : ℝ) * Real.log 2 + - (splitA K n : ℝ) * Real.log ((4 : ℝ) / 3) := by - nlinarith [hcoarse, hrhs] + have hdiva := nat_div_real_le_div (splitA K n) 3 (by decide) + have hwidth := annulusWidthCore_le_sqrt_three_n_log (K := K) hA hn + have hlhs := mul_le_mul_of_nonneg_right + (add_le_add_right (add_le_add hdiva hwidth) 1) hlog2_nonneg + have hcore := mul_le_mul_of_nonneg_right + (splitM_div_five_real_lower_bound (K := K) (n := n)) hlog2_nonneg + have hmargin := mul_le_mul_of_nonneg_right ha_lower stack_linear_margin_nonneg + linarith only [hlhs, hcore, hmargin, hcoarse] theorem sqrt_three_n_log_eq (n : ℕ) : Real.sqrt (3 * (n : ℝ) * Real.log (n : ℝ)) = @@ -3596,6 +3553,28 @@ theorem annulusChernoffLambda_le_one_of_three_width_le_splitA rw [div_le_iff₀ hden_pos] linarith +private theorem chernoff_left_quadratic_le {a w : ℝ} (ha : 0 ≤ a) : + let lam := 3 * w / (a + 1); + lam * (a / 3 - w) + a * (-lam / 3 + (13 / 54) * lam ^ 2) ≤ + -((5 / 6) * (w ^ 2 / (a + 1))) := by + have hden : 0 < a + 1 := by positivity + dsimp + field_simp [hden.ne'] + ring_nf + nlinarith only [sq_nonneg w, mul_nonneg ha (sq_nonneg w)] + +private theorem chernoff_right_quadratic_le {a w : ℝ} (ha : 0 ≤ a) (hw : 9 ≤ w) : + let lam := 3 * w / (a + 1); + -(lam * (a / 3 + w - 1)) + a * (lam / 3 + (13 / 54) * lam ^ 2) ≤ + -((1 / 2) * (w ^ 2 / (a + 1))) := by + have hden : 0 < a + 1 := by positivity + have hproduct : 0 ≤ (2 * a + 15) * (w - 9) := + mul_nonneg (by positivity) (sub_nonneg.mpr hw) + dsimp + field_simp [hden.ne'] + ring_nf + nlinarith only [hproduct] + /-- Left-tail standard-lambda log estimate for the annulus window. -/ theorem left_standard_chernoff_log_le_of_width_exponent {A K : ℝ} {n : ℕ} {E : ℝ} @@ -3609,57 +3588,20 @@ theorem left_standard_chernoff_log_le_of_width_exponent Real.log (((1 : ℝ) / 3) * Real.exp (-(annulusChernoffLambda A K n)) + ((2 : ℝ) / 3)) ≤ -E := by - let lam : ℝ := annulusChernoffLambda A K n + let lam := annulusChernoffLambda A K n let a : ℝ := splitA K n let w : ℝ := annulusWidth A K n - have hlam0 : 0 ≤ lam := by - simpa [lam] using annulusChernoffLambda_nonneg A K n - have ha_nonneg : 0 ≤ a := by positivity - have hden_pos : 0 < a + 1 := by positivity - have hrIn : (rIn A K n : ℝ) ≤ a / 3 - w := by - simpa [a, w] using rIn_real_le_third_sub_width - (A := A) (K := K) (n := n) hcenter - have hlog := - bernoulli_third_left_log_le_quadratic - (lam := lam) hlam0 (by simpa [lam] using hlam_le_one) - have hfirst : - lam * (rIn A K n : ℝ) ≤ lam * (a / 3 - w) := - mul_le_mul_of_nonneg_left hrIn hlam0 - have hsecond : - a * - Real.log (((1 : ℝ) / 3) * - Real.exp (-(annulusChernoffLambda A K n)) + - ((2 : ℝ) / 3)) ≤ - a * (-lam / 3 + (13 / 54) * lam ^ 2) := by - have hlog' : - Real.log (((1 : ℝ) / 3) * - Real.exp (-(annulusChernoffLambda A K n)) + - ((2 : ℝ) / 3)) ≤ - -lam / 3 + (13 / 54) * lam ^ 2 := by - simpa [lam] using hlog - exact mul_le_mul_of_nonneg_left hlog' ha_nonneg - have hquad : - lam * (a / 3 - w) + - a * (-lam / 3 + (13 / 54) * lam ^ 2) ≤ - -((5 / 6) * (w ^ 2 / (a + 1))) := by - dsimp [lam, a, w, annulusChernoffLambda] - field_simp [hden_pos.ne'] - ring_nf - nlinarith [sq_nonneg w, mul_nonneg ha_nonneg (sq_nonneg w)] - have htail : -((5 / 6) * (w ^ 2 / (a + 1))) ≤ -E := by - simpa [a, w] using neg_le_neg hE + have hlam0 : 0 ≤ lam := annulusChernoffLambda_nonneg A K n + have ha : 0 ≤ a := Nat.cast_nonneg _ + have hrIn : (rIn A K n : ℝ) ≤ a / 3 - w := + rIn_real_le_third_sub_width hcenter + have hlog := bernoulli_third_left_log_le_quadratic hlam0 hlam_le_one calc - annulusChernoffLambda A K n * (rIn A K n : ℝ) + - (splitA K n : ℝ) * - Real.log (((1 : ℝ) / 3) * - Real.exp (-(annulusChernoffLambda A K n)) + - ((2 : ℝ) / 3)) - ≤ lam * (a / 3 - w) + - a * (-lam / 3 + (13 / 54) * lam ^ 2) := by - dsimp [lam, a] - linarith - _ ≤ -((5 / 6) * (w ^ 2 / (a + 1))) := hquad - _ ≤ -E := htail + _ ≤ lam * (a / 3 - w) + a * (-lam / 3 + (13 / 54) * lam ^ 2) := + add_le_add (mul_le_mul_of_nonneg_left hrIn hlam0) + (mul_le_mul_of_nonneg_left hlog ha) + _ ≤ -((5 / 6) * (w ^ 2 / (a + 1))) := chernoff_left_quadratic_le ha + _ ≤ -E := neg_le_neg hE /-- Right-tail standard-lambda log estimate for the annulus window. The assumption `9≤w` absorbs the one-unit floor slack in `rOut`. -/ @@ -3675,70 +3617,20 @@ theorem right_standard_chernoff_log_le_of_width_exponent Real.log (((1 : ℝ) / 3) * Real.exp (annulusChernoffLambda A K n) + ((2 : ℝ) / 3)) ≤ -E := by - let lam : ℝ := annulusChernoffLambda A K n + let lam := annulusChernoffLambda A K n let a : ℝ := splitA K n let w : ℝ := annulusWidth A K n - have hlam0 : 0 ≤ lam := by - simpa [lam] using annulusChernoffLambda_nonneg A K n - have ha_nonneg : 0 ≤ a := by positivity - have hw_nonneg : 0 ≤ w := by positivity - have hden_pos : 0 < a + 1 := by positivity - have hrOut : a / 3 + w - 1 ≤ (rOut A K n : ℝ) := by - simpa [a, w] using third_add_width_sub_one_le_rOut_real - (A := A) (K := K) (n := n) - have hlog := - bernoulli_third_right_log_le_quadratic - (lam := lam) hlam0 (by simpa [lam] using hlam_le_one) - have hfirst : - -(lam * (rOut A K n : ℝ)) ≤ -(lam * (a / 3 + w - 1)) := by - have hmul := mul_le_mul_of_nonneg_left hrOut hlam0 - exact neg_le_neg hmul - have hsecond : - a * - Real.log (((1 : ℝ) / 3) * - Real.exp (annulusChernoffLambda A K n) + - ((2 : ℝ) / 3)) ≤ - a * (lam / 3 + (13 / 54) * lam ^ 2) := by - have hlog' : - Real.log (((1 : ℝ) / 3) * - Real.exp (annulusChernoffLambda A K n) + - ((2 : ℝ) / 3)) ≤ - lam / 3 + (13 / 54) * lam ^ 2 := by - simpa [lam] using hlog - exact mul_le_mul_of_nonneg_left hlog' ha_nonneg - have hwidth_w : 9 ≤ w := by - simpa [w] using hwidth - have hw_sq : 9 * w ≤ w ^ 2 := by - have hmul := mul_le_mul_of_nonneg_right hwidth_w hw_nonneg - nlinarith - have h_a_part : 18 * a * w ≤ 2 * a * w ^ 2 := by - have hmul := - mul_le_mul_of_nonneg_left hw_sq (by positivity : 0 ≤ 2 * a) - nlinarith - have h_const_part : 18 * w ≤ 15 * w ^ 2 := by - nlinarith - have hquad : - -(lam * (a / 3 + w - 1)) + - a * (lam / 3 + (13 / 54) * lam ^ 2) ≤ - -((1 / 2) * (w ^ 2 / (a + 1))) := by - dsimp [lam, a, w, annulusChernoffLambda] - field_simp [hden_pos.ne'] - ring_nf - nlinarith [h_a_part, h_const_part] - have htail : -((1 / 2) * (w ^ 2 / (a + 1))) ≤ -E := by - simpa [a, w] using neg_le_neg hE + have hlam0 : 0 ≤ lam := annulusChernoffLambda_nonneg A K n + have ha : 0 ≤ a := Nat.cast_nonneg _ + have hrOut : a / 3 + w - 1 ≤ (rOut A K n : ℝ) := + third_add_width_sub_one_le_rOut_real + have hlog := bernoulli_third_right_log_le_quadratic hlam0 hlam_le_one calc - -(annulusChernoffLambda A K n * (rOut A K n : ℝ)) + - (splitA K n : ℝ) * - Real.log (((1 : ℝ) / 3) * - Real.exp (annulusChernoffLambda A K n) + - ((2 : ℝ) / 3)) - ≤ -(lam * (a / 3 + w - 1)) + - a * (lam / 3 + (13 / 54) * lam ^ 2) := by - dsimp [lam, a] - linarith - _ ≤ -((1 / 2) * (w ^ 2 / (a + 1))) := hquad - _ ≤ -E := htail + _ ≤ -(lam * (a / 3 + w - 1)) + a * (lam / 3 + (13 / 54) * lam ^ 2) := + add_le_add (neg_le_neg (mul_le_mul_of_nonneg_left hrOut hlam0)) + (mul_le_mul_of_nonneg_left hlog ha) + _ ≤ -((1 / 2) * (w ^ 2 / (a + 1))) := chernoff_right_quadratic_le ha hwidth + _ ≤ -E := neg_le_neg hE /-- Algebraic form of the Chernoff exponent target with `E_n=6 log n`. -/ theorem chernoff_six_log_of_width_sq {A K : ℝ} {n : ℕ} @@ -5750,63 +5642,28 @@ theorem explicit_widthConstCutoff_of_splitThreshold {n0 : ℕ} Real.log 128 + 4 * Real.log 2 ≤ ((217 : ℝ) / 30 * Real.log 2) * Real.sqrt ((n0 : ℝ) * Real.log (n0 : ℝ)) := by - have hn15 : (15 : ℝ) ≤ (n0 : ℝ) := by - have hbig : (15 : ℝ) ≤ (128 * (217 : ℝ) ^ 2) ^ 2 := by norm_num - exact hbig.trans hsplitThreshold - have hn2 : (2 : ℝ) ≤ (n0 : ℝ) := by linarith - have hlog2Lower : (3 : ℝ) / 5 ≤ Real.log 2 := by - have h := Real.log_two_gt_d9 - norm_num at h ⊢ - linarith - have hlog2le : Real.log 2 ≤ Real.log (n0 : ℝ) := - Real.log_le_log (by norm_num : (0 : ℝ) < 2) hn2 + have hn15 : (15 : ℝ) ≤ (n0 : ℝ) := + (by norm_num : (15 : ℝ) ≤ (128 * (217 : ℝ) ^ 2) ^ 2).trans hsplitThreshold have hlogLower : (3 : ℝ) / 5 ≤ Real.log (n0 : ℝ) := - hlog2Lower.trans hlog2le - have hargLower : (9 : ℝ) ≤ (n0 : ℝ) * Real.log (n0 : ℝ) := by - nlinarith - have harg_nonneg : 0 ≤ (n0 : ℝ) * Real.log (n0 : ℝ) := by - nlinarith - have hsqrtLower : - (3 : ℝ) ≤ Real.sqrt ((n0 : ℝ) * Real.log (n0 : ℝ)) := by - have hsq : - (3 : ℝ) ^ 2 ≤ - (Real.sqrt ((n0 : ℝ) * Real.log (n0 : ℝ))) ^ 2 := by - rw [Real.sq_sqrt harg_nonneg] - norm_num - exact hargLower - exact (sq_le_sq₀ (by norm_num : (0 : ℝ) ≤ 3) - (Real.sqrt_nonneg _)).mp hsq - have hlog2Sharp : (6931471803 : ℝ) / 10000000000 ≤ Real.log 2 := by - have h := Real.log_two_gt_d9 - norm_num at h ⊢ - linarith + (by linarith only [Real.log_two_gt_d9] : (3 : ℝ) / 5 ≤ Real.log 2).trans + (Real.log_le_log (by norm_num) (by linarith only [hn15])) + have hsqrtLower : (3 : ℝ) ≤ Real.sqrt ((n0 : ℝ) * Real.log (n0 : ℝ)) := + Real.le_sqrt_of_sq_le (calc + (3 : ℝ) ^ 2 = 15 * (3 / 5) := by norm_num + _ ≤ (n0 : ℝ) * Real.log (n0 : ℝ) := + mul_le_mul hn15 hlogLower (by norm_num) (Nat.cast_nonneg _)) have hcoeffLower : (5 : ℝ) ≤ (217 : ℝ) / 30 * Real.log 2 := by - nlinarith - have hlog2_pos : 0 < Real.log 2 := - Real.log_pos (by norm_num : (1 : ℝ) < 2) - have hcoeff_nonneg : 0 ≤ (217 : ℝ) / 30 * Real.log 2 := by positivity - have hrhsLower : - (15 : ℝ) ≤ - ((217 : ℝ) / 30 * Real.log 2) * - Real.sqrt ((n0 : ℝ) * Real.log (n0 : ℝ)) := by - calc - (15 : ℝ) = 5 * 3 := by norm_num - _ ≤ ((217 : ℝ) / 30 * Real.log 2) * - Real.sqrt ((n0 : ℝ) * Real.log (n0 : ℝ)) := - mul_le_mul hcoeffLower hsqrtLower - (by norm_num : (0 : ℝ) ≤ 3) hcoeff_nonneg - have hlog128 : Real.log 128 = 7 * Real.log 2 := by - rw [show (128 : ℝ) = 2 ^ 7 by norm_num] - simp_all + linarith only [Real.log_two_gt_d9] have hlhs : Real.log 128 + 4 * Real.log 2 ≤ 11 := by - rw [hlog128] - have hlog2le1 := log_two_le_one - nlinarith + rw [show (128 : ℝ) = 2 ^ 7 by norm_num, Real.log_pow] + norm_num + linarith only [log_two_le_one] calc Real.log 128 + 4 * Real.log 2 ≤ 11 := hlhs - _ ≤ 15 := by norm_num + _ ≤ 5 * 3 := by norm_num _ ≤ ((217 : ℝ) / 30 * Real.log 2) * - Real.sqrt ((n0 : ℝ) * Real.log (n0 : ℝ)) := hrhsLower + Real.sqrt ((n0 : ℝ) * Real.log (n0 : ℝ)) := + mul_le_mul hcoeffLower hsqrtLower (by norm_num) (by linarith only [hcoeffLower]) /-- The stack logarithmic cutoff follows from the explicit split cutoff. -/ theorem explicit_stackLogThreshold_of_splitThreshold {n0 : ℕ} diff --git a/LeanPool/PebblingLean/UpperBoundProbability.lean b/LeanPool/PebblingLean/UpperBoundProbability.lean index 9a6f3e5c91..ac72ad7fd5 100644 --- a/LeanPool/PebblingLean/UpperBoundProbability.lean +++ b/LeanPool/PebblingLean/UpperBoundProbability.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Data.List.OfFn -import LeanPool.PebblingLean.Concentration -import LeanPool.PebblingLean.UpperBoundDelivery +public import LeanPool.PebblingLean.Concentration +public import LeanPool.PebblingLean.UpperBoundDelivery +import Mathlib.Algebra.BigOperators.Field +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # Finite probability setup for the upper bound @@ -18,6 +21,8 @@ Bernstein inputs. These are propositions, not axioms: later work must prove them or replace them with imported theorems. -/ +@[expose] public section + namespace PebblingLean namespace Hypercube diff --git a/LeanPool/PebblingLean/UpperBoundRecurrence.lean b/LeanPool/PebblingLean/UpperBoundRecurrence.lean index 981ce0be23..74054acd72 100644 --- a/LeanPool/PebblingLean/UpperBoundRecurrence.lean +++ b/LeanPool/PebblingLean/UpperBoundRecurrence.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module +public import LeanPool.PebblingLean.UpperBoundProbability import LeanPool.PebblingLean.HypercubeProduct -import LeanPool.PebblingLean.UpperBoundProbability +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # Recurrence bridge for the upper bound @@ -16,6 +20,8 @@ annulus estimates; once those are instantiated, this theorem is the formal recursion step used in the upper bound. -/ +@[expose] public section + namespace PebblingLean namespace Hypercube diff --git a/LeanPool/PebblingLean/Weight.lean b/LeanPool/PebblingLean/Weight.lean index 1a13554765..4b71dd2299 100644 --- a/LeanPool/PebblingLean/Weight.lean +++ b/LeanPool/PebblingLean/Weight.lean @@ -3,15 +3,20 @@ Copyright (c) 2026 Lior Pachter. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lior Pachter -/ +module -import Mathlib.Data.Rat.BigOperators +public import LeanPool.PebblingLean.Basic +public import Mathlib.Data.Rat.Defs import Mathlib.Algebra.BigOperators.Group.Finset.Piecewise -import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring -import LeanPool.PebblingLean.Basic +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Ring.RingNF /-! # Weight functions @@ -20,6 +25,8 @@ The lower-bound argument is organized around the standard pebbling weight function: a pebble at distance `d` from a target contributes `2^{-d}`. -/ +@[expose] public section + namespace PebblingLean universe u diff --git a/LeanPool/PentagonalNumberTheorem.lean b/LeanPool/PentagonalNumberTheorem.lean index 265f7a063a..2a36b6ba5a 100644 --- a/LeanPool/PentagonalNumberTheorem.lean +++ b/LeanPool/PentagonalNumberTheorem.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Weiyi Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Weiyi Wang -/ +module -import LeanPool.PentagonalNumberTheorem.Complex -import LeanPool.PentagonalNumberTheorem.Generic -import LeanPool.PentagonalNumberTheorem.Old -import LeanPool.PentagonalNumberTheorem.Partition -import LeanPool.PentagonalNumberTheorem.PowerSeries +public import LeanPool.PentagonalNumberTheorem.Complex +public import LeanPool.PentagonalNumberTheorem.Generic +public import LeanPool.PentagonalNumberTheorem.Old +public import LeanPool.PentagonalNumberTheorem.Partition +public import LeanPool.PentagonalNumberTheorem.PowerSeries +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Euler's pentagonal number theorem @@ -20,3 +24,5 @@ Main declarations: `pentagonalNumberTheorem_powerSeries`, `Nat.Partition.sum_par Tags: number-theory, combinatorics, partitions, power-series, pentagonal-number-theorem MSC: 11P81, 05A17 -/ + +@[expose] public section diff --git a/LeanPool/PentagonalNumberTheorem/Complex.lean b/LeanPool/PentagonalNumberTheorem/Complex.lean index 13eb43451f..cfeed53fd6 100644 --- a/LeanPool/PentagonalNumberTheorem/Complex.lean +++ b/LeanPool/PentagonalNumberTheorem/Complex.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Weiyi Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Weiyi Wang -/ +module -import LeanPool.PentagonalNumberTheorem.Generic +public import LeanPool.PentagonalNumberTheorem.Generic +public import Mathlib.Analysis.RCLike.Basic import Mathlib.Analysis.SpecialFunctions.Log.Summable -import Mathlib.Analysis.RCLike.Basic /-! @@ -18,6 +19,8 @@ for real/complex numbers. -/ +@[expose] public section + open Filter variable {K : Type*} [RCLike K] diff --git a/LeanPool/PentagonalNumberTheorem/Generic.lean b/LeanPool/PentagonalNumberTheorem/Generic.lean index 0a4f11cd99..569875cc4d 100644 --- a/LeanPool/PentagonalNumberTheorem/Generic.lean +++ b/LeanPool/PentagonalNumberTheorem/Generic.lean @@ -3,28 +3,12 @@ Copyright (c) 2026 Weiyi Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Weiyi Wang -/ +module -import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.Algebra.Ring.NegOnePow -import Mathlib.Topology.Algebra.InfiniteSum.Basic -import Mathlib.Topology.Algebra.InfiniteSum.Constructions -import Mathlib.Topology.Algebra.InfiniteSum.NatInt +public import Mathlib.Topology.Algebra.TopologicallyNilpotent +public import Mathlib.Topology.Algebra.InfiniteSum.Defs +import Mathlib.Tactic.Measurability.Init import Mathlib.Topology.Algebra.InfiniteSum.Ring -import Mathlib.Topology.Algebra.TopologicallyNilpotent -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel /-! @@ -40,6 +24,8 @@ Reference: https://math.stackexchange.com/questions/55738/how-to-prove-eulers-pentagonal-theorem-some-hints-will-help -/ +@[expose] public section + open Filter theorem tprod_one_sub_ordererd {ι α : Type*} [CommRing α] [TopologicalSpace α] [T2Space α] diff --git a/LeanPool/PentagonalNumberTheorem/Old.lean b/LeanPool/PentagonalNumberTheorem/Old.lean index ee42412023..ad0cc86da8 100644 --- a/LeanPool/PentagonalNumberTheorem/Old.lean +++ b/LeanPool/PentagonalNumberTheorem/Old.lean @@ -3,33 +3,14 @@ Copyright (c) 2026 Weiyi Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Weiyi Wang -/ +module -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Algebra.Ring.NegOnePow -import Mathlib.Combinatorics.Enumerative.Partition.Basic -import Mathlib.Data.Set.Card -import Mathlib.Data.List.Basic -import Mathlib.Data.List.Forall2 -import Mathlib.Data.List.Range -import Mathlib.Data.List.Sort +public import Mathlib.Algebra.Ring.NegOnePow +public import Mathlib.Combinatorics.Enumerative.Partition.Basic +public import Mathlib.RingTheory.PowerSeries.PiTopology import Mathlib.Data.PNat.Interval -import Mathlib.RingTheory.PowerSeries.Basic -import Mathlib.RingTheory.PowerSeries.WellKnown -import Mathlib.RingTheory.PowerSeries.PiTopology -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel +import Mathlib.Tactic.Measurability.Init /-! @@ -46,6 +27,8 @@ is obsolete by the shorter ones in `PowerSeries.lean` and `Complex.lean`, but I it here to show case how a combinatorial proof can be done. -/ +@[expose] public section + open scoped PowerSeries.WithPiTopology /-! ## Basic properties of pentagonal numbers -/ diff --git a/LeanPool/PentagonalNumberTheorem/Partition.lean b/LeanPool/PentagonalNumberTheorem/Partition.lean index 1606802ffb..3e7c413a62 100644 --- a/LeanPool/PentagonalNumberTheorem/Partition.lean +++ b/LeanPool/PentagonalNumberTheorem/Partition.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Weiyi Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Weiyi Wang -/ +module +public import Mathlib.Data.Int.Interval +public import Mathlib.Algebra.Ring.NegOnePow +public import Mathlib.Combinatorics.Enumerative.Partition.Basic +public import Mathlib.RingTheory.PowerSeries.PiTopology import LeanPool.PentagonalNumberTheorem.PowerSeries import Mathlib.Combinatorics.Enumerative.Partition.Glaisher -import Mathlib.Data.Int.Interval import Mathlib.Data.Int.Order.Lemmas +import Mathlib.Tactic.Bound +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.PentagonalNumberTheorem.Partition @@ -15,6 +21,8 @@ import Mathlib.Data.Int.Order.Lemmas Imported Lean Pool material for `LeanPool.PentagonalNumberTheorem.Partition`. -/ +@[expose] public section + theorem two_pentagonal (k : ℤ) : 2 * (k * (3 * k - 1) / 2) = k * (3 * k - 1) := by refine Int.two_mul_ediv_two_of_even ?_ obtain h | h := Int.even_or_odd k diff --git a/LeanPool/PentagonalNumberTheorem/PowerSeries.lean b/LeanPool/PentagonalNumberTheorem/PowerSeries.lean index aa37bf628f..66d829968f 100644 --- a/LeanPool/PentagonalNumberTheorem/PowerSeries.lean +++ b/LeanPool/PentagonalNumberTheorem/PowerSeries.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Weiyi Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Weiyi Wang -/ +module -import LeanPool.PentagonalNumberTheorem.Generic -import Mathlib.RingTheory.PowerSeries.Basic -import Mathlib.RingTheory.PowerSeries.Order -import Mathlib.RingTheory.PowerSeries.PiTopology +public import LeanPool.PentagonalNumberTheorem.Generic +public import Mathlib.RingTheory.PowerSeries.PiTopology +public import Mathlib.Algebra.Ring.NegOnePow +import Mathlib.Tactic.Measurability.Init /-! @@ -20,6 +21,8 @@ for power series. -/ +@[expose] public section + open PowerSeries Filter open scoped PowerSeries.WithPiTopology diff --git a/LeanPool/PermanentFormulaLowerBound.lean b/LeanPool/PermanentFormulaLowerBound.lean index e2473298de..32262c88bd 100644 --- a/LeanPool/PermanentFormulaLowerBound.lean +++ b/LeanPool/PermanentFormulaLowerBound.lean @@ -6,20 +6,17 @@ Authors: OpenAI, Dean Cureton module -public import Mathlib.Algebra.MvPolynomial.PDeriv public import Mathlib.Analysis.SpecialFunctions.Log.Base import Mathlib.Data.Fintype.CardEmbedding -public import Mathlib.Data.Nat.BitIndices -import Mathlib.FieldTheory.IntermediateField.Adjoin.Algebra -public import Mathlib.FieldTheory.IntermediateField.Adjoin.Defs public import Mathlib.LinearAlgebra.Matrix.MvPolynomial public import Mathlib.LinearAlgebra.Matrix.Permanent import Mathlib.LinearAlgebra.Vandermonde -import Mathlib.Logic.Equiv.Embedding import Mathlib.RingTheory.AlgebraicIndependent.AlgebraicClosure -public import Mathlib.RingTheory.AlgebraicIndependent.Basic import Mathlib.RingTheory.AlgebraicIndependent.TranscendenceBasis public import Mathlib.RingTheory.Localization.FractionRing +public import Mathlib.RingTheory.LocalRing.Basic +import Mathlib.Algebra.MvPolynomial.PDeriv +import Mathlib.Data.Nat.BitIndices /-! # Quartic-over-logarithmic lower bound for rational permanent formulas @@ -1464,9 +1461,7 @@ private theorem normalizedFractionalMatrix_entry_mem_adjoin (projectiveMatrixGenerators M ij : Set E) change normalizedFractionalMatrix M ij a b ∈ projectiveMatrixGenerators M ij - change normalizedFractionalMatrix M ij a b ∈ - (Finset.univ.erase ij).image - (fun ab => normalizedFractionalMatrix M ij ab.1 ab.2) + unfold projectiveMatrixGenerators exact Finset.mem_image.mpr ⟨(a, b), Finset.mem_erase.mpr ⟨hab, Finset.mem_univ _⟩, rfl⟩ @@ -2940,51 +2935,30 @@ private theorem MatchingCrossData.assemble_injective {T A B : Type*} : Function.Injective (MatchingCrossData.assemble (T := T) (A := A) (B := B)) := by - classical intro c d h have hrows : c.rows = d.rows := by apply Function.Embedding.ext intro t apply Sum.inr_injective - calc - Sum.inr (c.rows t) = c.assemble (.inl t) := - (MatchingCrossData.assemble_inl c t).symm - _ = d.assemble (.inl t) := DFunLike.congr_fun h (.inl t) - _ = Sum.inr (d.rows t) := - MatchingCrossData.assemble_inl d t + simpa only [MatchingCrossData.assemble_inl] using + congrArg (fun e : T ⊕ A ≃ T ⊕ B => e (.inl t)) h have hcols : c.cols = d.cols := by apply Function.Embedding.ext intro t apply Sum.inr_injective - calc - Sum.inr (c.cols t) = c.assemble.symm (.inl t) := - (MatchingCrossData.assemble_symm_inl c t).symm - _ = d.assemble.symm (.inl t) := by rw [h] - _ = Sum.inr (d.cols t) := - MatchingCrossData.assemble_symm_inl d t - cases c with - | mk cr cc ce => - cases d with - | mk dr dc de => - change cr = dr at hrows - subst dr - change cc = dc at hcols - subst dc - congr 1 - apply Equiv.ext - intro a - apply Subtype.ext - apply Sum.inr_injective - calc - Sum.inr (ce a).1 = - (MatchingCrossData.mk cr cc ce).assemble (.inr a.1) := - (MatchingCrossData.assemble_remainder - (MatchingCrossData.mk cr cc ce) a).symm - _ = (MatchingCrossData.mk cr cc de).assemble (.inr a.1) := - DFunLike.congr_fun h (.inr a.1) - _ = Sum.inr (de a).1 := - MatchingCrossData.assemble_remainder - (MatchingCrossData.mk cr cc de) a + simpa only [MatchingCrossData.assemble_symm_inl] using + congrArg (fun e : T ⊕ A ≃ T ⊕ B => e.symm (.inl t)) h + obtain ⟨cr, cc, ce⟩ := c + obtain ⟨dr, dc, de⟩ := d + cases hrows + cases hcols + congr 1 + apply Equiv.ext + intro a + apply Subtype.ext + apply Sum.inr_injective + simpa only [MatchingCrossData.assemble_remainder] using + congrArg (fun e : T ⊕ A ≃ T ⊕ B => e (.inr a.1)) h private noncomputable def MatchingCrossData.toPermutation {T A B : Type*} (c : MatchingCrossData T A B) : @@ -3915,8 +3889,8 @@ private theorem matching_leftWeightedAvoidingInjectionSum fun rho => ∏ u : ↥P, p (rho u).1 ^ (2 ^ (u.1 : ℕ)) have h := sum_sumEmbedding_left_weight (β := ↥Q) (γ := {j : Fin m // j ≠ b}) w - simpa [w, matchingAvoidingInjectionSum, - matching_card_omitted_external] using h + simpa only [w, matchingAvoidingInjectionSum, matching_card_omitted_external, + Fintype.card_coe, Function.Embedding.trans_apply, Function.Embedding.inl_apply] using h private theorem matching_rightWeightedAvoidingInjectionSum {F : Type*} [CommSemiring F] {ell m : ℕ} @@ -3931,8 +3905,8 @@ private theorem matching_rightWeightedAvoidingInjectionSum fun rho => ∏ v : ↥Q, q (rho v).1 ^ (2 ^ (v.1 : ℕ)) have h := sum_sumEmbedding_right_weight (α := ↥P) (γ := {j : Fin m // j ≠ a}) w - simpa [w, matchingAvoidingInjectionSum, - matching_card_omitted_external] using h + simpa only [w, matchingAvoidingInjectionSum, matching_card_omitted_external, + Fintype.card_coe, Function.Embedding.trans_apply, Function.Embedding.inr_apply] using h private noncomputable def matchingCrossWeight {F : Type*} [CommMonoid F] {ell m : ℕ} diff --git a/LeanPool/PhaseRetrieval.lean b/LeanPool/PhaseRetrieval.lean index be2915cf1e..f7ae90ebbc 100644 --- a/LeanPool/PhaseRetrieval.lean +++ b/LeanPool/PhaseRetrieval.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ +module -import LeanPool.PhaseRetrieval.Constant -import LeanPool.PhaseRetrieval.DimdPoly +public import LeanPool.PhaseRetrieval.Constant +public import LeanPool.PhaseRetrieval.DimdPoly +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # Stable phase retrieval for Hermite-Fock expansions @@ -18,6 +25,8 @@ Tags: phase-retrieval, hermite-fock, gaussian-measure, complex-analysis MSC: 42C05, 46E22, 94A12 -/ +@[expose] public section + /-! ## References diff --git a/LeanPool/PhaseRetrieval/Constant.lean b/LeanPool/PhaseRetrieval/Constant.lean index db7ffd2e60..ef0c30ab23 100644 --- a/LeanPool/PhaseRetrieval/Constant.lean +++ b/LeanPool/PhaseRetrieval/Constant.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ -import LeanPool.PhaseRetrieval.Constant.Internal.Local +module + +public import LeanPool.PhaseRetrieval.Constant.Internal.Local +import LeanPool.PhaseRetrieval.Constant.Internal.LocalCore +import LeanPool.PhaseRetrieval.Constant.Internal.LocalHelpers +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # Showcase @@ -19,6 +26,8 @@ apply to the centered polynomial. The phase-aligned conclusion is then obtained by the wrapper in `LocalHelpers.lean`. -/ +@[expose] public section + open FockSPR MeasureTheory Complex Real Polynomial noncomputable section diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/AnnulusLocalEstimate.lean b/LeanPool/PhaseRetrieval/Constant/Internal/AnnulusLocalEstimate.lean index db3801a76c..dd8eabe95b 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/AnnulusLocalEstimate.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/AnnulusLocalEstimate.lean @@ -13,12 +13,19 @@ Authors: Susanna Bertolini, Jaume de Dios Pont Public API: - `annulus_local_estimate` (Theorem 6.1) -/ -import LeanPool.PhaseRetrieval.Constant.Internal.BlockDecomposition -import LeanPool.PhaseRetrieval.Constant.Internal.LocalCircleEstimate +module + +public import LeanPool.PhaseRetrieval.Constant.Internal.BlockDecomposition import LeanPool.PhaseRetrieval.Constant.Internal.HighFreqBandEstimate +import LeanPool.PhaseRetrieval.Constant.Internal.LocalCircleEstimate +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # AnnulusLocalEstimate -/ +@[expose] public section + open MeasureTheory Complex Real Finset diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/BlockDecomposition.lean b/LeanPool/PhaseRetrieval/Constant/Internal/BlockDecomposition.lean index 31f0212556..1feed38cde 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/BlockDecomposition.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/BlockDecomposition.lean @@ -22,10 +22,16 @@ Authors: Susanna Bertolini, Jaume de Dios Pont - `freq_support_localPoly` (Theorem 5.5) - `monomial_peak_localization` (Theorem 5.6) -/ -import LeanPool.PhaseRetrieval.Constant.Internal.Definitions +module + +public import LeanPool.PhaseRetrieval.Constant.Internal.Definitions +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # BlockDecomposition -/ +@[expose] public section + open Finset Nat Real MeasureTheory diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/Definitions.lean b/LeanPool/PhaseRetrieval/Constant/Internal/Definitions.lean index abc8a9ca96..aa1917700c 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/Definitions.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/Definitions.lean @@ -17,19 +17,17 @@ Authors: Susanna Bertolini, Jaume de Dios Pont - `circleNormSq` - `polar_coord_fock` -/ -import Mathlib.Analysis.Fourier.AddCircle -import Mathlib.Analysis.SpecialFunctions.PolarCoord -import Mathlib.MeasureTheory.Measure.Haar.OfBasis -import Mathlib.MeasureTheory.Constructions.BorelSpace.Complex -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.LinearAlgebra.Complex.FiniteDimensional -import Mathlib.MeasureTheory.Integral.Prod -import Mathlib.Analysis.SpecialFunctions.Gamma.Basic -import Mathlib.MeasureTheory.Integral.Gamma +module + +public import Mathlib.Analysis.Fourier.AddCircle +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral +import Mathlib.MeasureTheory.Integral.Gamma /-! # Definitions -/ +@[expose] public section + open MeasureTheory Complex Real Finset open scoped ENNReal NNReal diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/HighFreqBandEstimate.lean b/LeanPool/PhaseRetrieval/Constant/Internal/HighFreqBandEstimate.lean index d35b3d67c1..b5d8330471 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/HighFreqBandEstimate.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/HighFreqBandEstimate.lean @@ -14,15 +14,22 @@ Authors: Susanna Bertolini, Jaume de Dios Pont Public API: - `high_freq_band_estimate` (Theorem 4.1) -/ -import LeanPool.PhaseRetrieval.Constant.Internal.Definitions -import LeanPool.PhaseRetrieval.Constant.Internal.SafeSquare +module + +public import LeanPool.PhaseRetrieval.Constant.Internal.Definitions import LeanPool.PhaseRetrieval.Constant.Internal.LipschitzRho -import LeanPool.PhaseRetrieval.Constant.Internal.RotationalAveraging import LeanPool.PhaseRetrieval.Constant.Internal.MissingMathlib.Poincare +import LeanPool.PhaseRetrieval.Constant.Internal.RotationalAveraging +import LeanPool.PhaseRetrieval.Constant.Internal.SafeSquare import Mathlib.Analysis.Real.Pi.Bounds +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # HighFreqBandEstimate -/ +@[expose] public section + open MeasureTheory Complex Real Finset diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/LaplaceFactorial.lean b/LeanPool/PhaseRetrieval/Constant/Internal/LaplaceFactorial.lean index cd963f3972..5c498bcb33 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/LaplaceFactorial.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/LaplaceFactorial.lean @@ -18,24 +18,17 @@ Authors: Susanna Bertolini, Jaume de Dios Pont - `exp_phi_le_factorial` (Theorem 2.9) - `monomial_integral_bound` (Corollary 2.10) -/ +module + +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import Mathlib.Analysis.SpecialFunctions.Gamma.Basic -import Mathlib.Analysis.SpecialFunctions.Log.Deriv -import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.Analysis.SpecialFunctions.Stirling -import Mathlib.Analysis.SpecialFunctions.Integrals.Basic -import Mathlib.Analysis.Convex.Deriv -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Bound -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum.BigOperators -import Mathlib.Tactic.NormNum.NatFactorial import Mathlib.Tactic.NormNum.Parity /-! # LaplaceFactorial -/ +@[expose] public section + open Real MeasureTheory Set diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/LeakageEstimate.lean b/LeanPool/PhaseRetrieval/Constant/Internal/LeakageEstimate.lean index ed8da0a68a..61ca58e4a1 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/LeakageEstimate.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/LeakageEstimate.lean @@ -15,11 +15,18 @@ Authors: Susanna Bertolini, Jaume de Dios Pont - `total_leakage_bound` (Theorem 5.8) - `eta_5_bound` (Theorem 5.9) -/ -import LeanPool.PhaseRetrieval.Constant.Internal.BlockDecomposition +module + +public import LeanPool.PhaseRetrieval.Constant.Internal.BlockDecomposition import LeanPool.PhaseRetrieval.Constant.Internal.LaplaceFactorial +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # LeakageEstimate -/ +@[expose] public section + open MeasureTheory Real Finset Complex diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/LipschitzRho.lean b/LeanPool/PhaseRetrieval/Constant/Internal/LipschitzRho.lean index 445cd25c38..1ca1c03cf5 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/LipschitzRho.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/LipschitzRho.lean @@ -16,10 +16,16 @@ Authors: Susanna Bertolini, Jaume de Dios Pont - `rho_pointwise_lower` (Corollary 2.4b) - `rho_le_norm` (Corollary 2.5) -/ -import LeanPool.PhaseRetrieval.Constant.Internal.Definitions +module + +public import LeanPool.PhaseRetrieval.Constant.Internal.Definitions +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # LipschitzRho -/ +@[expose] public section + open Complex Real diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/Local.lean b/LeanPool/PhaseRetrieval/Constant/Internal/Local.lean index e8434a3266..ebe57c57fb 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/Local.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/Local.lean @@ -21,10 +21,21 @@ Authors: Susanna Bertolini, Jaume de Dios Pont `∫_ℂ |w (1 + p(z)) − 1|² exp(−‖z‖²) dm(z) ≤ 23003² ∫_ℂ ||1 + p(z)| − 1|² exp(−‖z‖²) dm(z)`. -/ +module + +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.PhaseRetrieval.Constant.Internal.LocalHelpers +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # Local -/ +@[expose] public section + open FockSPR MeasureTheory Complex Real Polynomial diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/LocalCircleEstimate.lean b/LeanPool/PhaseRetrieval/Constant/Internal/LocalCircleEstimate.lean index 69ddad6a3b..fd0a42442f 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/LocalCircleEstimate.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/LocalCircleEstimate.lean @@ -13,11 +13,17 @@ Authors: Susanna Bertolini, Jaume de Dios Pont Public API: - `local_circle_estimate` (Theorem 3.1) -/ -import LeanPool.PhaseRetrieval.Constant.Internal.Definitions -import LeanPool.PhaseRetrieval.Constant.Internal.SafeSquare +module + +public import LeanPool.PhaseRetrieval.Constant.Internal.Definitions +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # LocalCircleEstimate -/ +@[expose] public section + open MeasureTheory Complex Real Finset diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/LocalCore.lean b/LeanPool/PhaseRetrieval/Constant/Internal/LocalCore.lean index e223306ec9..9d875052aa 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/LocalCore.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/LocalCore.lean @@ -11,13 +11,19 @@ Authors: Susanna Bertolini, Jaume de Dios Pont instead of assuming `p(0) = 0`, we assume that `p` is small in the normalized Gaussian `L²` norm and that its constant coefficient is real. -/ +module + +public import LeanPool.PhaseRetrieval.Constant.Internal.Definitions +import LeanPool.PhaseRetrieval.Constant.Internal.LipschitzRho import LeanPool.PhaseRetrieval.Constant.Internal.MainTheorem -import Mathlib.MeasureTheory.Integral.Prod -import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap -import Mathlib.MeasureTheory.Measure.WithDensity +import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral +import Mathlib.MeasureTheory.Integral.Gamma +import Mathlib.Tactic.NormNum.Parity /-! # LocalCore -/ +@[expose] public section + open FockSPR MeasureTheory Complex Real Polynomial Finset open scoped ENNReal ComplexConjugate diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/LocalHelpers.lean b/LeanPool/PhaseRetrieval/Constant/Internal/LocalHelpers.lean index 53fed5528f..0e5d2a4b8d 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/LocalHelpers.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/LocalHelpers.lean @@ -11,10 +11,20 @@ Authors: Susanna Bertolini, Jaume de Dios Pont alignment argument used to pass from the real-anchored local theorem in `LocalCore.lean` to an existential unit-phase formulation. -/ +module + +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.PhaseRetrieval.Constant.Internal.LocalCore +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # LocalHelpers -/ +@[expose] public section + open FockSPR MeasureTheory Complex Real Polynomial Finset open scoped ENNReal ComplexConjugate diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/MainTheorem.lean b/LeanPool/PhaseRetrieval/Constant/Internal/MainTheorem.lean index 12cd167deb..eece804a7a 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/MainTheorem.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/MainTheorem.lean @@ -13,16 +13,20 @@ Authors: Susanna Bertolini, Jaume de Dios Pont Public API: - `fock_space_coercivity` (Theorem 7.1) -/ +module + +public import LeanPool.PhaseRetrieval.Constant.Internal.BlockDecomposition import LeanPool.PhaseRetrieval.Constant.Internal.AnnulusLocalEstimate import LeanPool.PhaseRetrieval.Constant.Internal.LeakageEstimate import LeanPool.PhaseRetrieval.Constant.Internal.LipschitzRho import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral import Mathlib.MeasureTheory.Integral.Gamma -import Mathlib.Algebra.Order.Field.GeomSum -import Mathlib.MeasureTheory.Integral.IntegralEqImproper +import Mathlib.Tactic.NormNum.Parity /-! # MainTheorem -/ +@[expose] public section + open MeasureTheory Complex Real Finset Polynomial diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/MissingMathlib/Poincare.lean b/LeanPool/PhaseRetrieval/Constant/Internal/MissingMathlib/Poincare.lean index e7883821e0..0b9ea8ba09 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/MissingMathlib/Poincare.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/MissingMathlib/Poincare.lean @@ -13,22 +13,18 @@ Authors: Susanna Bertolini, Jaume de Dios Pont Public API: - `poincare_interval` (M1: Poincaré inequality on [0, h]) -/ -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +module + +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.MeasureTheory.Integral.MeanInequalities -import Mathlib.Tactic.Common -import Mathlib.Tactic.Bound -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum.BigOperators -import Mathlib.Tactic.NormNum.NatFactorial import Mathlib.Tactic.NormNum.Parity +import Mathlib.Tactic.Positivity.Finset /-! # Poincare -/ +@[expose] public section + open MeasureTheory Real Set intervalIntegral Filter diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/RotationalAveraging.lean b/LeanPool/PhaseRetrieval/Constant/Internal/RotationalAveraging.lean index 59d761e352..2ab1ea7e8e 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/RotationalAveraging.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/RotationalAveraging.lean @@ -13,10 +13,16 @@ Authors: Susanna Bertolini, Jaume de Dios Pont Public API: - `rotational_averaging_bound` (Theorem 2.6) -/ -import LeanPool.PhaseRetrieval.Constant.Internal.Definitions +module + +public import LeanPool.PhaseRetrieval.Constant.Internal.Definitions +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # RotationalAveraging -/ +@[expose] public section + open MeasureTheory Real Complex Finset diff --git a/LeanPool/PhaseRetrieval/Constant/Internal/SafeSquare.lean b/LeanPool/PhaseRetrieval/Constant/Internal/SafeSquare.lean index 04b5ac1cb9..d8ed0d7bd9 100644 --- a/LeanPool/PhaseRetrieval/Constant/Internal/SafeSquare.lean +++ b/LeanPool/PhaseRetrieval/Constant/Internal/SafeSquare.lean @@ -14,18 +14,17 @@ Authors: Susanna Bertolini, Jaume de Dios Pont - `safe_square` (Theorem 2.1) - `nonneg_safe_square` (Theorem 2.2) -/ -import Mathlib.Tactic.Common -import Mathlib.Tactic.Bound -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum.BigOperators -import Mathlib.Tactic.NormNum.NatFactorial -import Mathlib.Tactic.NormNum.Parity +module + +public import Mathlib.Basic.Real.Basic import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic.NormNum.Parity +import Mathlib.Tactic.Positivity.Finset /-! # SafeSquare -/ +@[expose] public section + open Real diff --git a/LeanPool/PhaseRetrieval/DimdPoly.lean b/LeanPool/PhaseRetrieval/DimdPoly.lean index 79dd9cd378..0e2d844eca 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Auxiliary +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Auxiliary +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # DimdPoly -/ +@[expose] public section + open scoped BigOperators diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Auxiliary.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Auxiliary.lean index 8f3b8d91d4..308ab163aa 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Auxiliary.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Auxiliary.lean @@ -3,10 +3,23 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ +module + +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.PhaseRetrieval.DimdPoly.Internal.PhaseStability +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm +import Mathlib.Tactic.NormNum.Parity /-! # Auxiliary -/ +@[expose] public section + open scoped BigOperators diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/CoefficientLimitRigidity.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/CoefficientLimitRigidity.lean index 79559a33e2..ed801140b0 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/CoefficientLimitRigidity.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/CoefficientLimitRigidity.lean @@ -3,12 +3,24 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ -import Mathlib.Topology.MetricSpace.Sequences -import LeanPool.PhaseRetrieval.DimdPoly.Internal.FiniteBaseAnnulusEstimate +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Definitions import LeanPool.PhaseRetrieval.DimdPoly.Internal.ExactModulusRecovery +import LeanPool.PhaseRetrieval.DimdPoly.Internal.FiniteBaseAnnulusEstimate +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.TrueLevelBasis +import LeanPool.PhaseRetrieval.DimdPoly.Internal.ProductAnnulusLocalization +import LeanPool.PhaseRetrieval.DimdPoly.Internal.TensorBasis +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm +import Mathlib.Tactic.NormNum.Parity +import Mathlib.Topology.MetricSpace.Sequences /-! # CoefficientLimitRigidity -/ +@[expose] public section + open scoped BigOperators diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Definitions.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Definitions.lean index 2e6a419b1a..2395c4c26b 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Definitions.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Definitions.lean @@ -3,18 +3,19 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ -import Mathlib.Analysis.Complex.UpperHalfPlane.Measure -import Mathlib.Analysis.Fourier.AddCircle -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral -import Mathlib.MeasureTheory.Constructions.BorelSpace.Complex -import Mathlib.MeasureTheory.Function.LpSpace.Basic -import Mathlib.MeasureTheory.Integral.Prod -import Mathlib.MeasureTheory.Measure.Haar.OfBasis -import Mathlib.Topology.Algebra.InfiniteSum.Basic +module + +public import Mathlib.Analysis.Fourier.AddCircle +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Definitions -/ +@[expose] public section + open scoped BigOperators diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/ExactModulusRecovery.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/ExactModulusRecovery.lean index f4f8649e67..337d259575 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/ExactModulusRecovery.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/ExactModulusRecovery.lean @@ -3,21 +3,26 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ +module + +public import Mathlib.RingTheory.Polynomial.Hermite.Basic +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.ImportedAnalyticInputs +public import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import LeanPool.PhaseRetrieval.DimdPoly.Internal.TensorBasis import Mathlib.Analysis.Calculus.Deriv.Star -import Mathlib.Analysis.Calculus.ParametricIntegral +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.Analysis.Fourier.LpSpace -import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform -import Mathlib.MeasureTheory.Constructions.Pi -import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar -import Mathlib.MeasureTheory.Measure.Prod +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Gamma import Mathlib.Probability.Distributions.Gaussian.Real -import Mathlib.Probability.Moments.ComplexMGF -import Mathlib.RingTheory.Polynomial.Hermite.Basic +import Mathlib.RingTheory.Finiteness.Prod +import Mathlib.Tactic.NormNum.Parity import Mathlib.Topology.Algebra.Module.Cardinality -import LeanPool.PhaseRetrieval.DimdPoly.Internal.TensorBasis /-! # ExactModulusRecovery -/ +@[expose] public section + noncomputable section diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/FiniteBaseAnnulusEstimate.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/FiniteBaseAnnulusEstimate.lean index 94f577b213..cc92fdd1cf 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/FiniteBaseAnnulusEstimate.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/FiniteBaseAnnulusEstimate.lean @@ -3,12 +3,26 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Definitions import LeanPool.PhaseRetrieval.DimdPoly.Internal.FiniteBaseCircleEstimate -import LeanPool.PhaseRetrieval.DimdPoly.Internal.ProductAnnulusLocalization +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.BlockLocalization +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.ImportedAnalyticInputs import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.ProductAnnulusCircle +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.ProductBasisAndAnnuli +import LeanPool.PhaseRetrieval.DimdPoly.Internal.ProductAnnulusLocalization +import LeanPool.PhaseRetrieval.DimdPoly.Internal.TensorBasis +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # FiniteBaseAnnulusEstimate -/ +@[expose] public section + noncomputable section diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/FiniteBaseCircleEstimate.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/FiniteBaseCircleEstimate.lean index 4128a23708..16abceaf32 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/FiniteBaseCircleEstimate.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/FiniteBaseCircleEstimate.lean @@ -3,14 +3,26 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.ImportedAnalyticInputs +public import LeanPool.PhaseRetrieval.Constant.Internal.Definitions +import LeanPool.PhaseRetrieval.Constant.Internal.HighFreqBandEstimate +import LeanPool.PhaseRetrieval.Constant.Internal.LipschitzRho +import LeanPool.PhaseRetrieval.Constant.Internal.MissingMathlib.Poincare import Mathlib.Algebra.Order.Chebyshev import Mathlib.Analysis.Complex.Polynomial.Basic +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.Real.Pi.Bounds +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial import Mathlib.Order.Interval.Set.Union -import LeanPool.PhaseRetrieval.DimdPoly.Internal.ImportedAnalyticInputs -import LeanPool.PhaseRetrieval.Constant.Internal.HighFreqBandEstimate +import Mathlib.Tactic.NormNum.Parity /-! # FiniteBaseCircleEstimate -/ +@[expose] public section + noncomputable section diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite/Definitions.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite/Definitions.lean index 81565558c3..e6e11dd217 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite/Definitions.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite/Definitions.lean @@ -15,18 +15,18 @@ Authors: Susanna Bertolini, Jaume de Dios Pont The goal of this file is only to pin down the common language of the development. Proofs come later. -/ -import Mathlib.Analysis.Fourier.AddCircle -import Mathlib.Analysis.Complex.UpperHalfPlane.Measure -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Analysis.SpecialFunctions.PolarCoord -import Mathlib.Data.Nat.Dist -import Mathlib.MeasureTheory.Constructions.BorelSpace.Complex -import Mathlib.MeasureTheory.Integral.Prod -import Mathlib.MeasureTheory.Measure.Haar.OfBasis -import Mathlib.Topology.Algebra.InfiniteSum.Basic +module + +public import Mathlib.Analysis.Fourier.AddCircle +public import Mathlib.Data.Nat.Dist +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Combinatorics.Matroid.Init /-! # Definitions -/ +@[expose] public section + open Complex MeasureTheory Real Finset open scoped BigOperators ComplexConjugate Topology diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite/ImportedAnalyticInputs.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite/ImportedAnalyticInputs.lean index 4ac4692f99..dd0267cdcd 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite/ImportedAnalyticInputs.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite/ImportedAnalyticInputs.lean @@ -9,12 +9,22 @@ Authors: Susanna Bertolini, Jaume de Dios Pont Scaffolding notes: `Imported/analytic_inputs.md` -/ -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.Definitions -import LeanPool.PhaseRetrieval.Constant.Internal.LocalCircleEstimate +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.Definitions +public import LeanPool.PhaseRetrieval.Constant.Internal.Definitions import LeanPool.PhaseRetrieval.Constant.Internal.HighFreqBandEstimate +import LeanPool.PhaseRetrieval.Constant.Internal.LocalCircleEstimate +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # ImportedAnalyticInputs -/ +@[expose] public section + open Complex MeasureTheory Real Finset open scoped BigOperators diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite/MissingMathlib.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite/MissingMathlib.lean index fc7db23985..8d14a9211f 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite/MissingMathlib.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite/MissingMathlib.lean @@ -10,13 +10,16 @@ Authors: Susanna Bertolini, Jaume de Dios Pont This file collects small reusable lemmas that are convenient to prove once and reuse downstream. -/ -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.Definitions -import Mathlib.Order.Interval.Finset.Nat -import Mathlib.Analysis.Normed.Group.Bounded -import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.Definitions +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Combinatorics.Matroid.Init /-! # MissingMathlib -/ +@[expose] public section + open Complex MeasureTheory Real Finset Filter open scoped BigOperators ComplexConjugate Topology diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/BlockLocalization.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/BlockLocalization.lean index 06038ab1ef..ad7ddb3fb8 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/BlockLocalization.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/BlockLocalization.lean @@ -3,18 +3,23 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.Definitions +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.MissingMathlib +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.ImportedAnalyticInputs import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.ProductBasisAndAnnuli import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.TrueLevelBasis -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.MissingMathlib -import Mathlib.Analysis.SpecialFunctions.Exp -import Mathlib.SetTheory.Cardinal.NatCard -import Mathlib.Data.Fintype.BigOperators -import Mathlib.Data.Int.Interval -import Mathlib.Data.Pi.Interval -import Mathlib.Order.Filter.AtTopBot.Finset +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # BlockLocalization -/ +@[expose] public section + open Complex MeasureTheory Real Finset diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/Definitions.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/Definitions.lean index 2c54592379..6499237c23 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/Definitions.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/Definitions.lean @@ -3,17 +3,16 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ -import Mathlib.Analysis.Fourier.AddCircle -import Mathlib.Analysis.SpecialFunctions.PolarCoord -import Mathlib.LinearAlgebra.Complex.FiniteDimensional -import Mathlib.MeasureTheory.Constructions.BorelSpace.Complex -import Mathlib.MeasureTheory.Integral.Prod -import Mathlib.MeasureTheory.Measure.Haar.OfBasis -import Mathlib.Topology.Algebra.InfiniteSum.Basic -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.Definitions +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.Definitions +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Combinatorics.Matroid.Init /-! # Definitions -/ +@[expose] public section + open Complex MeasureTheory Real Finset open scoped BigOperators ComplexConjugate Topology diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/DegreeBookkeeping.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/DegreeBookkeeping.lean index 063ca64fe9..6bfb8630d3 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/DegreeBookkeeping.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/DegreeBookkeeping.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.BlockLocalization +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.Definitions +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.ProductBasisAndAnnuli +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # DegreeBookkeeping -/ +@[expose] public section + open Complex MeasureTheory Real Finset open scoped BigOperators ComplexConjugate diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/ImportedAnalyticInputs.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/ImportedAnalyticInputs.lean index 131140d39b..e1943cbeb9 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/ImportedAnalyticInputs.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/ImportedAnalyticInputs.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.Definitions -import Mathlib.MeasureTheory.Integral.Pi -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.ImportedAnalyticInputs -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.TrueLevelBasis +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.Definitions import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.BasisLocalization +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.ImportedAnalyticInputs +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.MeasureTheory.Integral.Pi +import Mathlib.Tactic.NormNum.Parity /-! # ImportedAnalyticInputs -/ +@[expose] public section + open Complex MeasureTheory Real Finset diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/ProductAnnulusCircle.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/ProductAnnulusCircle.lean index b0175843f9..3a30f2200d 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/ProductAnnulusCircle.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/ProductAnnulusCircle.lean @@ -3,10 +3,23 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.Definitions +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.BlockLocalization import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.DegreeBookkeeping +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.ImportedAnalyticInputs +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.ProductBasisAndAnnuli +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # ProductAnnulusCircle -/ +@[expose] public section + open Complex MeasureTheory Real Finset diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/ProductBasisAndAnnuli.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/ProductBasisAndAnnuli.lean index 79cae9ab34..1b035ebe6e 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/ProductBasisAndAnnuli.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermite1Dimd/ProductBasisAndAnnuli.lean @@ -3,12 +3,21 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.Definitions import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.ImportedAnalyticInputs import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.TrueLevelBasis -import Mathlib.Analysis.Complex.Isometry +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # ProductBasisAndAnnuli -/ +@[expose] public section + open Complex MeasureTheory Real Finset diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/BasisLocalization.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/BasisLocalization.lean index 4f9a68bcff..6f142908f2 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/BasisLocalization.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/BasisLocalization.lean @@ -10,13 +10,21 @@ Authors: Susanna Bertolini, Jaume de Dios Pont Scaffolding notes: - `Localization/basis_localization.md` -/ -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.ModulusRigidity -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.MissingMathlib -import Mathlib.Analysis.SpecialFunctions.Pochhammer +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.TrueLevelBasis import LeanPool.PhaseRetrieval.Constant.Internal.LaplaceFactorial +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.MissingMathlib +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Analysis.SpecialFunctions.PolarCoord +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Tactic.NormNum.Parity /-! # BasisLocalization -/ +@[expose] public section + open Complex MeasureTheory Real Finset @@ -191,22 +199,8 @@ private theorem Pkn_succ_succ have hpow : (-1 : ℝ) ^ (k + 2) = (-1) ^ k := by ring have hpow1 : (-1 : ℝ) ^ (k + 1) = -(-1) ^ k := by ring rw [hpow, hpow1] - -- Goal: (-1)^k * 1 * d(n,k+2) = -n*(-(-1)^k*1*d(n,k+1)) - (k+1)*n*((-1)^k*1*d(n-1,k)) - -- = (-1)^k * n * d(n,k+1) - (-1)^k * (k+1)*n*d(n-1,k) - -- = (-1)^k * [n*d(n,k+1) - (k+1)*n*d(n-1,k)] - -- From hR: d(n,k+2) + (k+1)*n*d(n-1,k) = n*d(n,k+1) - -- So d(n,k+2) = n*d(n,k+1) - (k+1)*n*d(n-1,k) - -- After factoring (-1)^k, both sides match. - have hR' : (↑(n.descFactorial (k + 2)) : ℝ) = - ↑n * ↑(n.descFactorial (k + 1)) - (↑k + 1) * ↑n * ↑((n - 1).descFactorial k) := by linarith - -- Factor out (-1)^k: both sides equal (-1)^k * hR' - -- Just use ring after substituting hR' - push_cast - calc (-1 : ℝ) ^ k * 1 * ↑(n.descFactorial (k + 2)) - = (-1) ^ k * (↑n * ↑(n.descFactorial (k + 1)) - - (↑k + 1) * ↑n * ↑((n - 1).descFactorial k)) := by rw [mul_one, hR'] - _ = -↑n * (-(-1) ^ k * 1 * ↑(n.descFactorial (k + 1))) - - (↑k + 1) * ↑n * ((-1) ^ k * 1 * ↑((n - 1).descFactorial k)) := by ring + push_cast at hR ⊢ + linear_combination (-1 : ℝ) ^ k * hR | succ a => -- m = a + 1 case: use Polynomial.coeff_X_sub_C_mul rw [Polynomial.coeff_X_sub_C_mul, Pkn_coeff_single, Pkn_coeff_single] @@ -225,13 +219,7 @@ private theorem Pkn_succ_succ show a ≤ k + 1 from by omega, ite_true, show a + 1 ≤ k + 1 from by omega, ite_true, show a + 1 ≤ k from ha2, ite_true] - -- This is the generic case. Use charlier_coeff_nat with s' = k - a. - -- s = k+2-(a+1) = k+1-a. Set s' = k-1-a so s = s'+2 when a+1 ≤ k-1. - -- Actually s' = k - a - 1 and s = s' + 2 iff k - a ≥ 2 iff a ≤ k-2. - -- For a+1 ≤ k, a ≤ k-1. If a ≤ k-2, use charlier_coeff_nat. - -- If a = k-1 (so s=2), also use charlier_coeff_nat with s'=0. - -- If a = k (so s=1)... but a+1 ≤ k means a ≤ k-1, so a ≤ k-1 and s ≥ 2. - -- So s = k+1-a ≥ 2 always in this branch. Good. + -- Match the shifted indices in the coefficient recurrence. have hnat := charlier_coeff_nat k n (k - 1 - a) -- Simplify indices: k-1-a+2 = k+1-a, k-1-a+1 = k-a, k-1-a stays have hs2 : k - 1 - a + 2 = k + 1 - a := by omega @@ -254,20 +242,7 @@ private theorem Pkn_succ_succ have : k - a = (k - 1 - a) + 1 := by omega rw [this]; ring rw [hpow2, hpow1] - -- Factor out (-1)^{k-1-a} from both sides - set s := (-1 : ℝ) ^ (k - 1 - a) - -- Goal: s * A = s * B - n * (-s * C) - (k+1)*n*(s*D) - -- = s * B + n*s*C - (k+1)*n*s*D - -- = s * (B + n*C - (k+1)*n*D) - -- LHS = s * A - -- This follows from A + (k+1)*n*D = B + n*C which is hR - have hs : s ≠ 0 := by positivity - have : s * (↑((k + 2).choose (k + 1 - a)) * ↑(n.descFactorial (k + 1 - a))) = - s * (↑((k + 1).choose (k + 1 - a)) * ↑(n.descFactorial (k + 1 - a)) + - ↑n * (↑((k + 1).choose (k - a)) * ↑(n.descFactorial (k - a))) - - (↑k + 1) * ↑n * (↑(k.choose (k - 1 - a)) * ↑((n - 1).descFactorial (k - 1 - a)))) := by - congr 1; linarith - linarith [mul_comm s (↑((k + 2).choose (k + 1 - a)) * ↑(n.descFactorial (k + 1 - a)))] + linear_combination (-1 : ℝ) ^ (k - 1 - a) * hR · push Not at ha2 -- k < a+1 and a+1 ≤ k+2, so a+1 ∈ {k+1, k+2}, i.e., a ∈ {k, k+1} -- a ∈ {k, k+1} @@ -1450,7 +1425,8 @@ private lemma Pkn_shift (k n : ℕ) : have hch_nat : (k + 1).choose (k + 1 - m) * (k + 1 - m) = (k + 1) * k.choose (k - m) := by have hs : k - m + 1 = k + 1 - m := by omega have := Nat.add_one_mul_choose_eq k (k - m) - rw [hs] at this; linarith + rw [hs] at this + exact this.symm have hdF_R : ((n + 1).descFactorial (k + 1 - m) : ℝ) = (n.descFactorial (k + 1 - m) : ℝ) + ((k + 1 - m : ℕ) : ℝ) * (n.descFactorial (k - m) : ℝ) := by exact_mod_cast hdF_nat @@ -1459,17 +1435,8 @@ private lemma Pkn_shift (k n : ℕ) : have hpow : ((-1 : ℝ) ^ (k + 1 - m)) = -((-1 : ℝ) ^ (k - m)) := by rw [show k + 1 - m = (k - m) + 1 from by omega, pow_succ]; ring rw [hdF_R, hpow] - set p := ((-1 : ℝ) ^ (k - m)) - set A := ((↑((k + 1).choose (k + 1 - m))) : ℝ) - set B := ((↑(k + 1 - m : ℕ)) : ℝ) - set D := ((↑(n.descFactorial (k + 1 - m))) : ℝ) - set E := ((↑(n.descFactorial (k - m))) : ℝ) - set F := ((↑(k.choose (k - m))) : ℝ) - have hab : A * B = (↑(k + 1) : ℝ) * F := hch_R - have : -p * A * (D + B * E) = -p * A * D - (↑(k + 1) : ℝ) * (p * F * E) := by - have step : -p * A * (D + B * E) = -p * A * D - p * (A * B) * E := by ring - rw [step, hab]; ring - linarith + linear_combination -((-1 : ℝ) ^ (k - m)) * + (n.descFactorial (k - m) : ℝ) * hch_R · push Not at hm2 have hm_eq : m = k + 1 := by omega simp_all @@ -1569,8 +1536,8 @@ private theorem scaled_laguerre_bound_Pkn (k : ℕ) : have hcomb_eval : (Pkn (k + 2) (N + 1)).eval x = (x - ↑(N + 1)) * (Pkn (k + 1) N).eval x - ↑(k + 1) * x * (Pkn k N).eval x := by - have h := Pkn_combined k N - simp_all + simp only [Pkn_combined, Polynomial.eval_sub, Polynomial.eval_mul, + Polynomial.eval_X, Polynomial.eval_C] -- Triangle inequality have htri : |(Pkn (k + 2) (N + 1)).eval x| ≤ |x - ↑(N + 1)| * |(Pkn (k + 1) N).eval x| + @@ -1640,7 +1607,7 @@ private theorem scaled_laguerre_bound_Pkn (k : ℕ) : -- Bound √(m+1) + |x-(m+1)| ≤ S + 2 have hshift : Real.sqrt ((m : ℝ) + 1) + |x - ((m : ℝ) + 1)| ≤ S + 2 := by have h1 : Real.sqrt ((m : ℝ) + 1) ≤ Real.sqrt (m : ℝ) + 1 := by - nlinarith [Real.sq_sqrt hm_nn, Real.sq_sqrt hm1_nn, + nlinarith only [Real.sq_sqrt hm_nn, Real.sq_sqrt hm1_nn, Real.sqrt_nonneg (m : ℝ)] have h2 : |x - ((m : ℝ) + 1)| ≤ |x - (m : ℝ)| + 1 := by calc |x - ((m : ℝ) + 1)| = |(x - (m : ℝ)) + (-1)| := by ring_nf @@ -1648,7 +1615,7 @@ private theorem scaled_laguerre_bound_Pkn (k : ℕ) : _ = |x - (m : ℝ)| + 1 := by simp [abs_neg] linarith -- S + 2 ≤ 3 * S since S ≥ 1 - have hS_shift : S + 2 ≤ 3 * S := by nlinarith + have hS_shift : S + 2 ≤ 3 * S := by linarith only [hS_ge_one] have hS1_nn : 0 ≤ Real.sqrt ((m : ℝ) + 1) + |x - ((m : ℝ) + 1)| := by positivity calc |(Pkn k N).eval x| ≤ Ak * ((m : ℝ) + 1) ^ ((k : ℝ) / 2) * @@ -1670,7 +1637,9 @@ private theorem scaled_laguerre_bound_Pkn (k : ℕ) : _ ≤ |x - (m : ℝ)| + |(k : ℝ) + 1| := abs_sub _ _ _ = _ := by rw [abs_of_nonneg hk1_nn] _ ≤ S + ((k : ℝ) + 1) := by linarith [Real.sqrt_nonneg (m : ℝ)] - _ ≤ ((k + 2 : ℕ) : ℝ) * S := by push_cast; nlinarith + _ ≤ ((k + 2 : ℕ) : ℝ) * S := by + push_cast + nlinarith only [hS_ge_one, hk1_nn] -- Bound |x| ≤ 2*S^2 have hx_bound : |x| ≤ 2 * S ^ 2 := by have h1 : |x| ≤ |x - (m : ℝ)| + (m : ℝ) := by @@ -2242,7 +2211,7 @@ private lemma radial_density_eq_step (k : ℕ) (r : ℝ) (hr : 0 ≤ r) (hr_pos have hfact_inv_le_one : 1 / ((Nat.factorial k : ℝ) ^ 2) ≤ 1 := by have hfac_ge_one_nat : 1 ≤ Nat.factorial k := Nat.succ_le_of_lt (Nat.factorial_pos k) have hfac_sq_ge : (1 : ℝ) ≤ (Nat.factorial k : ℝ) ^ 2 := by - nlinarith [show (1 : ℝ) ≤ (Nat.factorial k : ℝ) by exact_mod_cast hfac_ge_one_nat] + nlinarith only [show (1 : ℝ) ≤ (Nat.factorial k : ℝ) by exact_mod_cast hfac_ge_one_nat] have htmp : (1 : ℝ) / ((Nat.factorial k : ℝ) ^ 2) ≤ (1 : ℝ) / 1 := one_div_le_one_div_of_le (by positivity : (0 : ℝ) < 1) hfac_sq_ge simpa using htmp @@ -2272,11 +2241,9 @@ private lemma radial_density_eq_step (k : ℕ) (r : ℝ) (hr : 0 ≤ r) (hr_pos ((1 + |r - 1|) ^ (4 * k + 1) * Real.exp (-(r - 1) ^ 2 / 2)) := by have hcoef_le : ((1 / ((Nat.factorial k : ℝ) ^ 2)) * Ak ^ 2 * Real.exp 1) ≤ Ak ^ 2 * Real.exp 1 := by - have htmp : (1 / ((Nat.factorial k : ℝ) ^ 2)) * Ak ^ 2 ≤ 1 * Ak ^ 2 := - mul_le_mul_of_nonneg_right hfact_inv_le_one (sq_nonneg Ak) - have htmp' : (1 / ((Nat.factorial k : ℝ) ^ 2)) * Ak ^ 2 ≤ Ak ^ 2 := by - simpa using htmp - nlinarith [Real.exp_pos 1, htmp'] + simpa only [one_mul] using mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right hfact_inv_le_one (sq_nonneg Ak)) + (Real.exp_nonneg 1) have hrest_nonneg : 0 ≤ (1 + |r - 1|) ^ (4 * k + 1) * Real.exp (-(r - 1) ^ 2 / 2) := by positivity exact mul_le_mul_of_nonneg_right hcoef_le hrest_nonneg @@ -2421,7 +2388,8 @@ private theorem radial_density_gaussian_bound_small (k : ℕ) : dsimp [K0] rw [hrewrite_exp] ring - simp_all + rw [hK0_eval] + exact hK0_le /-- For n < k and r ≥ 0: exp(-r²/2) ≤ exp(-(1/4)*posPart(|r-√n|-(k+3))²). Since n < k, √n ≤ k, so posPart(|r-√n|-(k+3)) ≤ r and p² ≤ r² ≤ 2r², diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/ImportedAnalyticInputs.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/ImportedAnalyticInputs.lean index 43d872845b..dcc9dccd2b 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/ImportedAnalyticInputs.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/ImportedAnalyticInputs.lean @@ -10,11 +10,20 @@ Authors: Susanna Bertolini, Jaume de Dios Pont Scaffolding notes: - `Imported/analytic_inputs.md` -/ -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.TrueLevelBasis +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.TrueLevelBasis import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.ImportedAnalyticInputs +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # ImportedAnalyticInputs -/ +@[expose] public section + open Complex MeasureTheory Real Finset open scoped BigOperators diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/ModulusRigidity.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/ModulusRigidity.lean index 95b3831030..aafd7f7fbe 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/ModulusRigidity.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/ModulusRigidity.lean @@ -10,10 +10,17 @@ Authors: Susanna Bertolini, Jaume de Dios Pont Scaffolding notes: - `Rigidity/modulus_rigidity.md` -/ -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.TrueLevelBasis +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.TrueLevelBasis +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init /-! # ModulusRigidity -/ +@[expose] public section + open Complex MeasureTheory Real Finset open scoped Topology @@ -378,7 +385,7 @@ private theorem fourierCoeff_pair_expansion ∑ p : Fin D × Fin D, fourierCoeff (fun t : Circle => c p.1 * star (c p.2) * fourier ((p.1.1 : ℤ) - (p.2.1 : ℤ)) t) m := by - simpa [Finset.sum_apply] using hsum' + simpa only [Finset.sum_apply] using hsum' rw [hsum''] refine Finset.sum_congr rfl ?_ intro p hp @@ -600,9 +607,7 @@ private theorem finiteCirclePoly_normSq_fourierCoeff fourier ((p.1.1 : ℤ) - (p.2.1 : ℤ)) t := by ext t rw [finiteCirclePoly_sum (k := k) (a := c) hr t] - simpa [mul_assoc, mul_left_comm, mul_comm, qkn_real] using - (finiteSeries_mul_star_expand (D := d + 1) - (c := fun i : Fin (d + 1) => c i * (qkn k i.1 r : ℂ)) t) + exact finiteSeries_mul_star_expand (fun i : Fin (d + 1) => c i * (qkn k i.1 r : ℂ)) t have hcoeff := congrArg (fun F : Circle → ℂ => fourierCoeff F m) hprod_eq simpa [mul_assoc, mul_left_comm, mul_comm, qkn_real] using (hcoeff.trans @@ -697,7 +702,7 @@ private lemma finite_modulus_coeff_rel {k d : ℕ} (a b : Fin (d + 1) → ℂ) simpa using (RCLike.mul_conj (finiteCirclePoly k r b t)) have hcoeff := congrArg (fun F : Circle → ℂ => fourierCoeff F m) hprod_eq - simpa [rawA, rawB] using (hAcoeff r hr).symm.trans (hcoeff.trans (hBcoeff r hr)) + exact (hAcoeff r hr).symm.trans (hcoeff.trans (hBcoeff r hr)) obtain ⟨Rd, hRd, hRd_nonzero⟩ := qkn_eventually_nonzero k d obtain ⟨Rn, hRn, hRn_nonzero⟩ := qkn_eventually_nonzero k n.1 have hEqFaFb : Fa =ᶠ[Filter.atTop] Fb := by @@ -711,14 +716,11 @@ private lemma finite_modulus_coeff_rel {k d : ℕ} (a b : Fin (d + 1) → ℂ) have hn : (qkn k n.1 r : ℂ) ≠ 0 := by exact_mod_cast hRn_nonzero r (le_trans (le_max_right _ _) hr) have hmulA : Fa r * ((qkn k d r : ℂ) * (qkn k n.1 r : ℂ)) = rawA r := by - simpa [Fa, rawA, mul_assoc, mul_left_comm, mul_comm] using - pairSum_ratio_mul_den (k := k) a m n.1 hd hn + exact pairSum_ratio_mul_den (k := k) a m n.1 hd hn have hmulB : Fb r * ((qkn k d r : ℂ) * (qkn k n.1 r : ℂ)) = rawB r := by - simpa [Fb, rawB, mul_assoc, mul_left_comm, mul_comm] using - pairSum_ratio_mul_den (k := k) b m n.1 hd hn + exact pairSum_ratio_mul_den (k := k) b m n.1 hd hn have hD : ((qkn k d r : ℂ) * (qkn k n.1 r : ℂ)) ≠ 0 := mul_ne_zero hd hn - apply mul_right_cancel₀ hD - simp_all + exact mul_right_cancel₀ hD (hmulA.trans (hraw.trans hmulB.symm)) have hFa_tendsto : Filter.Tendsto Fa Filter.atTop (𝓝 (topA * star (a n))) := by rw [htopA] exact pair_coeff_normalized_tendsto (k := k) (d := d) (a := a) (n := n) @@ -1331,23 +1333,9 @@ private theorem high_coeff_vanish else 0) have hFtendsto : Filter.Tendsto F Filter.atTop (𝓝 (star (topCoeff a) * hermiteCoeff k G (d + ell))) := by - have hsum : Filter.Tendsto - (fun r : ℝ => - (∑ i : Fin (d + 1), - star (a i) * hermiteCoeff k G (ell + i.1) * - (((qkn k i.1 r : ℂ) / (qkn k d r : ℂ)) * - ((qkn k (ell + i.1) r : ℂ) / (qkn k (d + ell) r : ℂ)))) + - (∑ i : Fin (d + 1), - if h : ell ≤ i.1 then - star (hermiteCoeff k G (i.1 - ell)) * a i * - (((qkn k i.1 r : ℂ) / (qkn k (d + ell) r : ℂ)) * - ((qkn k (i.1 - ell) r : ℂ) / (qkn k d r : ℂ))) - else 0)) - Filter.atTop (𝓝 (star (topCoeff a) * hermiteCoeff k G (d + ell) + 0)) := by - simpa using - (positive_mode_main_sum_tendsto (k := k) (d := d) (ell := ell) (a := a) (G := G)).add + simpa only [add_zero] using + (positive_mode_main_sum_tendsto (k := k) (d := d) (ell := ell) (a := a) (G := G)).add (positive_mode_error_sum_tendsto_zero (k := k) (d := d) (ell := ell) hEll (a := a) (G := G)) - simpa [F] using hsum obtain ⟨Rd, hRd, hd_nonzero⟩ := qkn_eventually_nonzero k d obtain ⟨Rn, hRn, hn_nonzero⟩ := qkn_eventually_nonzero k (d + ell) have hFzero : F =ᶠ[Filter.atTop] fun _ : ℝ => (0 : ℂ) := by @@ -1598,9 +1586,8 @@ private theorem finite_positive_mode_relation fun r : ℝ => finitePositiveModeMainSum k d a b n r + finitePositiveModeErrorSum k d a b n r have hFtendsto : Filter.Tendsto F Filter.atTop (𝓝 (star (a n) * b ⟨d, Nat.lt_succ_self d⟩ + star (b n) * a ⟨d, Nat.lt_succ_self d⟩)) := by - have hsum := (finite_positive_mode_main_tendsto (k := k) (d := d) a b n).add + exact (finite_positive_mode_main_tendsto (k := k) (d := d) a b n).add (finite_positive_mode_error_tendsto (k := k) (d := d) a b n) - simpa [F] using hsum obtain ⟨Rd, hRd, hd_nonzero⟩ := qkn_eventually_nonzero k d obtain ⟨Rn, hRn, hn_nonzero⟩ := qkn_eventually_nonzero k n.1 have hFzero : F =ᶠ[Filter.atTop] fun _ : ℝ => (0 : ℂ) := by @@ -1642,7 +1629,7 @@ private theorem finite_positive_mode_relation rw [finitePositiveModeMainSum_mul_den (k := k) (d := d) (a := a) (b := b) n hd hn, finitePositiveModeErrorSum_mul_den (k := k) (d := d) (a := a) (b := b) n hd hn] _ = 0 := hraw0 - simp_all + exact (mul_eq_zero.mp hEq).resolve_left (mul_ne_zero hd hn) have hzero_tendsto : Filter.Tendsto F Filter.atTop (𝓝 (0 : ℂ)) := by simpa using hFzero.tendsto simpa [zero_add] using (tendsto_nhds_unique (f := F) (l := Filter.atTop) hFtendsto hzero_tendsto) diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/TrueLevelBasis.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/TrueLevelBasis.lean index 08d2d7e459..49aa5d5837 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/TrueLevelBasis.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/Hermitek/TrueLevelBasis.lean @@ -12,17 +12,19 @@ Authors: Susanna Bertolini, Jaume de Dios Pont This file now carries the previously split circle and bridge API directly. -/ -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.Definitions -import Mathlib.Analysis.InnerProductSpace.Subspace -import Mathlib.Analysis.InnerProductSpace.l2Space -import Mathlib.MeasureTheory.Integral.Gamma +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.Definitions import Mathlib.Analysis.Complex.Isometry -import Mathlib.Algebra.Polynomial.Coeff -import Mathlib.Order.Filter.AtTopBot.Basic +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Combinatorics.Matroid.Init import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm +import Mathlib.MeasureTheory.Integral.Gamma /-! # TrueLevelBasis -/ +@[expose] public section + open Complex MeasureTheory Real Finset open scoped BigOperators Topology diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/ImportedAnalyticInputs.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/ImportedAnalyticInputs.lean index d595e229a8..427916a5dd 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/ImportedAnalyticInputs.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/ImportedAnalyticInputs.lean @@ -3,23 +3,27 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ -import Mathlib.Analysis.Distribution.SchwartzSpace.Deriv +module + +import Mathlib.Analysis.Normed.Lp.SmoothApprox + +public import Mathlib.Analysis.Fourier.FourierTransform +public import Mathlib.MeasureTheory.Function.Holder +public import Mathlib.MeasureTheory.Function.LpSpace.DomAct.Basic +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Definitions +public import Mathlib.Analysis.Distribution.SchwartzSpace.Basic +import LeanPool.PhaseRetrieval.Constant.Internal.RotationalAveraging +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.Analysis.Distribution.SchwartzSpace.Fourier -import Mathlib.Analysis.Distribution.TemperedDistribution -import Mathlib.Analysis.Fourier.FourierTransform -import Mathlib.Analysis.Fourier.Inversion -import Mathlib.Analysis.Fourier.RiemannLebesgueLemma -import Mathlib.MeasureTheory.Function.Holder -import Mathlib.MeasureTheory.Function.LpSpace.Basic -import Mathlib.MeasureTheory.Function.LpSpace.DomAct.Basic -import Mathlib.MeasureTheory.Function.LpSpace.DomAct.Continuous +import Mathlib.Combinatorics.Matroid.Init import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm -import Mathlib.Probability.Distributions.Gaussian.Real -import LeanPool.PhaseRetrieval.DimdPoly.Internal.Definitions -import LeanPool.PhaseRetrieval.Constant.Internal.RotationalAveraging +import Mathlib.MeasureTheory.Function.LpSpace.DomAct.Continuous +import Mathlib.MeasureTheory.Measure.RegularityCompacts /-! # ImportedAnalyticInputs -/ +@[expose] public section + noncomputable section @@ -1350,8 +1354,9 @@ private theorem sub_const_antilipschitz {d : Nat} (a : RealVec d) : /-- `schwartzCompSubConstCLM`: schwartz Comp Sub Const CLM. -/ noncomputable def schwartzCompSubConstCLM {d : Nat} (a : RealVec d) : SchwartzMap (RealVec d) ℂ →L[ℂ] SchwartzMap (RealVec d) ℂ := - SchwartzMap.compCLMOfAntilipschitz ℂ (sub_const_hasTemperateGrowth a) - (sub_const_antilipschitz a) + SchwartzMap.compCLMOfAntilipschitz ℂ (K := 1) (g := fun x : RealVec d => x - a) + (by exact sub_const_hasTemperateGrowth a) + (by exact sub_const_antilipschitz a) @[simp] theorem schwartzCompSubConstCLM_apply {d : Nat} (a : RealVec d) (f : SchwartzMap (RealVec d) ℂ) : @@ -1510,10 +1515,10 @@ private theorem integrable_stft_kernel_schwartz_realVec {d : Nat} · refine Filter.Eventually.of_forall ?_ intro t have hslice : Integrable (fun y : RealVec d => ‖h (t - y)‖ ^ 2) μ := by - simpa [μ] using integrable_norm_sq_translate_sub_schwartz_realVec h t - simpa [K, mul_comm, μ] using hslice.const_mul (‖f t‖ ^ 2) + exact integrable_norm_sq_translate_sub_schwartz_realVec h t + exact hslice.const_mul (‖f t‖ ^ 2) · have hf_sq : Integrable (fun t : RealVec d => ‖f t‖ ^ 2) μ := by - simpa [μ] using integrable_norm_sq_schwartz_realVec f + exact integrable_norm_sq_schwartz_realVec f have h_outer : (fun t : RealVec d => ∫ y : RealVec d, ‖K (t, y)‖ ∂μ) = fun t : RealVec d => ‖f t‖ ^ 2 * ∫ y : RealVec d, ‖h y‖ ^ 2 ∂μ := by @@ -1527,7 +1532,7 @@ private theorem integrable_stft_kernel_schwartz_realVec {d : Nat} _ = ‖f t‖ ^ 2 * ∫ y : RealVec d, ‖h y‖ ^ 2 ∂μ := integral_stft_kernel_slice_schwartz_realVec h f t rw [h_outer] - simpa [mul_comm] using hf_sq.const_mul (∫ y : RealVec d, ‖h y‖ ^ 2 ∂μ) + exact hf_sq.mul_const (∫ y : RealVec d, ‖h y‖ ^ 2 ∂μ) private theorem integral_norm_sq_stft_slice_schwartz_realVec {d : Nat} (h f : SchwartzMap (RealVec d) ℂ) (x : RealVec d) : @@ -1662,11 +1667,8 @@ private theorem autocorr_kernel_integrable_schwartz_realVec {d : Nat} let B : RealVec d × RealVec d → ℂ := fun p => h (p.1 - p.2) * star (h (p.1 + x - p.2)) have hA : Integrable A μ := signal_autocorr_integrable_schwartz_realVec f x - have hB : ∀ᵐ t ∂μ, Integrable (fun y : RealVec d => A t * B (t, y)) μ := by - refine Filter.Eventually.of_forall ?_ - intro t - simpa [A, B, sub_eq_add_neg, add_comm, add_left_comm, add_assoc, mul_assoc, - mul_left_comm, mul_comm, μ] using + have hB : ∀ᵐ t ∂μ, Integrable (fun y : RealVec d => A t * B (t, y)) μ := + Filter.Eventually.of_forall fun t => (window_autocorr_integrable_schwartz_realVec h t x).const_mul (A t) have hmeas : AEStronglyMeasurable (fun p : RealVec d × RealVec d => A p.1 * B p) (μ.prod μ) := by fun_prop @@ -1677,7 +1679,7 @@ private theorem autocorr_kernel_integrable_schwartz_realVec {d : Nat} let C : ℝ := ∫ y : RealVec d, ‖h (-y) * star (h (x - y))‖ ∂μ have hC : ∀ t : RealVec d, ∫ y : RealVec d, ‖B (t, y)‖ ∂μ = C := by intro t - simpa [B, C, μ] using integral_window_autocorr_norm_schwartz_realVec h t x + exact integral_window_autocorr_norm_schwartz_realVec h t x have houter : Integrable (fun t : RealVec d => ∫ y : RealVec d, ‖A t‖ * ‖B (t, y)‖ ∂μ) μ := by have hconst : ∀ t : RealVec d, @@ -1685,19 +1687,10 @@ private theorem autocorr_kernel_integrable_schwartz_realVec {d : Nat} intro t calc ∫ y : RealVec d, ‖A t‖ * ‖B (t, y)‖ ∂μ - = ‖A t‖ * ∫ y : RealVec d, ‖B (t, y)‖ ∂μ := by - simpa using - (MeasureTheory.integral_const_mul - (r := ‖A t‖) - (f := fun y : RealVec d => ‖B (t, y)‖) - (μ := μ)) + = ‖A t‖ * ∫ y : RealVec d, ‖B (t, y)‖ ∂μ := integral_const_mul _ _ _ = ‖A t‖ * C := by rw [hC t] - have houterEq : - (fun t : RealVec d => ∫ y : RealVec d, ‖A t‖ * ‖B (t, y)‖ ∂μ) = - fun t : RealVec d => ‖A t‖ * C := by - funext t - exact hconst t - simpa [houterEq, mul_comm] using hA_norm.const_mul C + simp_rw [hconst] + exact hA_norm.mul_const C convert houter using 1 ext t apply integral_congr_ae @@ -1930,7 +1923,7 @@ private theorem modulateL2_mem {d : Nat} (ω : RealVec d) (f : L2Real d) : /-- `modulateL2`: modulate L2. -/ noncomputable def modulateL2 {d : Nat} (ω : RealVec d) (f : L2Real d) : L2Real d := - (modulateL2_mem ω f).toLp + (private_decl% (modulateL2_mem ω f)).toLp (fun t : RealVec d => modulationPhase ω t * (f : RealVec d -> ℂ) t) theorem modulateL2_coeFn {d : Nat} (ω : RealVec d) (f : L2Real d) : @@ -2599,9 +2592,9 @@ private theorem stftRep_tendsto_schwartzApprox_pointwise {d : Nat} let fN : Nat → L2Real d := fun n => (schwartzApproxRealVec (MeasureTheory.Lp.memLp f) n).toLp 2 μ have hhN : Tendsto hN atTop (nhds h) := by - simpa [hN, μ] using schwartzApproxRealVec_toLp_tendsto h + exact schwartzApproxRealVec_toLp_tendsto h have hfN : Tendsto fN atTop (nhds f) := by - simpa [fN, μ] using schwartzApproxRealVec_toLp_tendsto f + exact schwartzApproxRealVec_toLp_tendsto f rw [tendsto_iff_dist_tendsto_zero] refine squeeze_zero (fun _ => dist_nonneg) ?_ (cross_norm_bound_tendsto_zero hhN hfN) intro n @@ -2826,19 +2819,18 @@ private theorem lpNorm_stftRep_tendsto_schwartzApprox {d : Nat} 2 (MeasureTheory.volume : MeasureTheory.Measure (PhaseSpace d))) atTop (nhds 0) := by let μ : MeasureTheory.Measure (RealVec d) := MeasureTheory.volume - let μP : MeasureTheory.Measure (PhaseSpace d) := MeasureTheory.volume let hN : Nat → L2Real d := fun n => (schwartzApproxRealVec (MeasureTheory.Lp.memLp h) n).toLp 2 μ let fN : Nat → L2Real d := fun n => (schwartzApproxRealVec (MeasureTheory.Lp.memLp f) n).toLp 2 μ have hhN : Tendsto hN atTop (nhds h) := by - simpa [hN, μ] using schwartzApproxRealVec_toLp_tendsto h + exact schwartzApproxRealVec_toLp_tendsto h have hfN : Tendsto fN atTop (nhds f) := by - simpa [fN, μ] using schwartzApproxRealVec_toLp_tendsto f + exact schwartzApproxRealVec_toLp_tendsto f refine squeeze_zero (fun _ => MeasureTheory.lpNorm_nonneg) ?_ (cross_norm_bound_tendsto_zero hhN hfN) intro n - simpa [hN, fN, μ, μP] using lpNorm_stftRep_sub_le (hN n) h (fN n) f + exact lpNorm_stftRep_sub_le (hN n) h (fN n) f private theorem lpNorm_mul_le_real {α : Type*} [MeasurableSpace α] {μ : MeasureTheory.Measure α} {f g : α → ℝ} @@ -2920,9 +2912,9 @@ private theorem lpNorm_stftRep_sq_sub_tendsto_zero {d : Nat} let Bₙ : Nat → PhaseSpace d → ℝ := fun n ξ => ‖Fₙ n ξ - F ξ‖ let Cₙ : Nat → ℝ := fun n => ‖fN n‖ * ‖hN n‖ + ‖f‖ * ‖h‖ have hhN : Tendsto hN atTop (nhds h) := by - simpa [hN, μ] using schwartzApproxRealVec_toLp_tendsto h + exact schwartzApproxRealVec_toLp_tendsto h have hfN : Tendsto fN atTop (nhds f) := by - simpa [fN, μ] using schwartzApproxRealVec_toLp_tendsto f + exact schwartzApproxRealVec_toLp_tendsto f have hdiff : Tendsto (fun n : Nat => MeasureTheory.lpNorm (fun ξ : PhaseSpace d => Fₙ n ξ - F ξ) 2 μP) @@ -3062,7 +3054,7 @@ private theorem ambiguityRep_tendsto_schwartzApprox {d : Nat} let fN : Nat → L2Real d := fun n => (schwartzApproxRealVec (MeasureTheory.Lp.memLp f) n).toLp 2 μ have hfN : Tendsto fN atTop (nhds f) := by - simpa [fN, μ] using schwartzApproxRealVec_toLp_tendsto f + exact schwartzApproxRealVec_toLp_tendsto f rw [tendsto_iff_dist_tendsto_zero] refine squeeze_zero (fun _ => dist_nonneg) ?_ (cross_norm_bound_tendsto_zero hfN hfN) intro n @@ -3238,7 +3230,8 @@ private lemma moyal_slice_collapse {d : Nat} (h (t - y) * star (h (t + x - y))) * modulationPhase ω y := by refine integral_congr_ae ?_ filter_upwards with t - simp [stftSliceSchwartz_apply, mul_left_comm, mul_comm] + simp only [stftSliceSchwartz_apply, star_mul, star_star] + ring -- The vector Schwartz Moyal proof is one long Fubini/phase-normalization calc. private theorem symplecticFourier_stft_sq_schwartz_realVec {d : Nat} diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/OrthogonalCoercivity.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/OrthogonalCoercivity.lean index b72b62f9b9..dc562c923f 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/OrthogonalCoercivity.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/OrthogonalCoercivity.lean @@ -3,12 +3,26 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ -import LeanPool.PhaseRetrieval.DimdPoly.Internal.FiniteBaseAnnulusEstimate +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Definitions import LeanPool.PhaseRetrieval.DimdPoly.Internal.CoefficientLimitRigidity +import LeanPool.PhaseRetrieval.DimdPoly.Internal.FiniteBaseAnnulusEstimate +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.ImportedAnalyticInputs +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.TrueLevelBasis import LeanPool.PhaseRetrieval.DimdPoly.Internal.ProductAnnulusLocalization +import LeanPool.PhaseRetrieval.DimdPoly.Internal.TensorBasis +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm +import Mathlib.Tactic.NormNum.Parity /-! # OrthogonalCoercivity -/ +@[expose] public section + open MeasureTheory Complex open scoped BigOperators diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/OrthogonalReduction/OrthogonalReduction.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/OrthogonalReduction/OrthogonalReduction.lean index 7b9e5a7245..d69abe230e 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/OrthogonalReduction/OrthogonalReduction.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/OrthogonalReduction/OrthogonalReduction.lean @@ -3,13 +3,22 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ +module + +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.MeasureTheory.Function.LpSpace.Basic import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite.ImportedAnalyticInputs -import Mathlib.MeasureTheory.Function.Holder -import Mathlib.MeasureTheory.Function.L2Space +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm +import Mathlib.Tactic.NormNum.Parity /-! # OrthogonalReduction -/ +@[expose] public section + noncomputable section diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/PhaseStability.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/PhaseStability.lean index 334ec62ae3..4db466c599 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/PhaseStability.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/PhaseStability.lean @@ -3,11 +3,23 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.TensorBasis +import LeanPool.PhaseRetrieval.DimdPoly.Internal.CoefficientLimitRigidity import LeanPool.PhaseRetrieval.DimdPoly.Internal.OrthogonalCoercivity import LeanPool.PhaseRetrieval.DimdPoly.Internal.OrthogonalReduction.OrthogonalReduction +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm +import Mathlib.Tactic.NormNum.Parity /-! # PhaseStability -/ +@[expose] public section + open MeasureTheory open scoped BigOperators ENNReal diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/ProductAnnulusLocalization.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/ProductAnnulusLocalization.lean index ff48d6131e..7d6cd6d93f 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/ProductAnnulusLocalization.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/ProductAnnulusLocalization.lean @@ -3,11 +3,22 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Definitions import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.BlockLocalization +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.ProductBasisAndAnnuli import LeanPool.PhaseRetrieval.DimdPoly.Internal.TensorBasis +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # ProductAnnulusLocalization -/ +@[expose] public section + open MeasureTheory open scoped BigOperators diff --git a/LeanPool/PhaseRetrieval/DimdPoly/Internal/TensorBasis.lean b/LeanPool/PhaseRetrieval/DimdPoly/Internal/TensorBasis.lean index 4b2f02edac..b55ebf8015 100644 --- a/LeanPool/PhaseRetrieval/DimdPoly/Internal/TensorBasis.lean +++ b/LeanPool/PhaseRetrieval/DimdPoly/Internal/TensorBasis.lean @@ -3,11 +3,23 @@ Copyright (c) 2026 Susanna Bertolini, Jaume de Dios Pont. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Susanna Bertolini, Jaume de Dios Pont -/ -import LeanPool.PhaseRetrieval.DimdPoly.Internal.ImportedAnalyticInputs +module + +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.ImportedAnalyticInputs +public import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.Definitions +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.ImportedAnalyticInputs import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermite1Dimd.ProductBasisAndAnnuli +import LeanPool.PhaseRetrieval.DimdPoly.Internal.Hermitek.TrueLevelBasis +import Mathlib.Analysis.Complex.UpperHalfPlane.Basic +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.Tactic.NormNum.Parity /-! # TensorBasis -/ +@[expose] public section + open scoped BigOperators diff --git a/LeanPool/PoincareThreeBody.lean b/LeanPool/PoincareThreeBody.lean index 814e7e7752..fec5d2a995 100644 --- a/LeanPool/PoincareThreeBody.lean +++ b/LeanPool/PoincareThreeBody.lean @@ -3,54 +3,55 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.Analytic -import LeanPool.PoincareThreeBody.AnalyticNormalization -import LeanPool.PoincareThreeBody.AnalyticMinors -import LeanPool.PoincareThreeBody.ActionFactorization -import LeanPool.PoincareThreeBody.ActionPoisson -import LeanPool.PoincareThreeBody.Averaging -import LeanPool.PoincareThreeBody.Core -import LeanPool.PoincareThreeBody.CoefficientNormalization -import LeanPool.PoincareThreeBody.CertifiedPoincareSet -import LeanPool.PoincareThreeBody.Delaunay -import LeanPool.PoincareThreeBody.DelaunayActions -import LeanPool.PoincareThreeBody.DelaunayAnchorChart -import LeanPool.PoincareThreeBody.DelaunayChart -import LeanPool.PoincareThreeBody.DelaunayFlow -import LeanPool.PoincareThreeBody.DelaunaySection -import LeanPool.PoincareThreeBody.DenseResonantObstruction -import LeanPool.PoincareThreeBody.DifferentialDependence -import LeanPool.PoincareThreeBody.DisturbingCertificate -import LeanPool.PoincareThreeBody.DisturbingFunction -import LeanPool.PoincareThreeBody.EnergyLeafObstruction -import LeanPool.PoincareThreeBody.GeneratingFunction -import LeanPool.PoincareThreeBody.GlobalEnergySection -import LeanPool.PoincareThreeBody.HamiltonianMixedPartials -import LeanPool.PoincareThreeBody.HomologicalEquation -import LeanPool.PoincareThreeBody.IrrationalTorusFlow -import LeanPool.PoincareThreeBody.KeplerOrbit -import LeanPool.PoincareThreeBody.KeplerPhaseOrbit -import LeanPool.PoincareThreeBody.KeplerFlow -import LeanPool.PoincareThreeBody.KeplerHamiltonian -import LeanPool.PoincareThreeBody.LeadingObstruction -import LeanPool.PoincareThreeBody.LocalEnergyLeaf -import LeanPool.PoincareThreeBody.MixedPartials -import LeanPool.PoincareThreeBody.NormalizationInduction -import LeanPool.PoincareThreeBody.NormalizationClosure -import LeanPool.PoincareThreeBody.OneTwoResonance -import LeanPool.PoincareThreeBody.OrbitHomologicalEquation -import LeanPool.PoincareThreeBody.ParameterDomainTopology -import LeanPool.PoincareThreeBody.ParameterizedAnalyticDivision -import LeanPool.PoincareThreeBody.Perturbation -import LeanPool.PoincareThreeBody.PoincareSet -import LeanPool.PoincareThreeBody.PoissonNormalization -import LeanPool.PoincareThreeBody.Polar -import LeanPool.PoincareThreeBody.Resonance -import LeanPool.PoincareThreeBody.ResonantActionObstruction -import LeanPool.PoincareThreeBody.ResonantOrbit -import LeanPool.PoincareThreeBody.RotatingEllipse -import LeanPool.PoincareThreeBody.ValidatedQuadrature +public import LeanPool.PoincareThreeBody.Analytic +public import LeanPool.PoincareThreeBody.AnalyticNormalization +public import LeanPool.PoincareThreeBody.AnalyticMinors +public import LeanPool.PoincareThreeBody.ActionFactorization +public import LeanPool.PoincareThreeBody.ActionPoisson +public import LeanPool.PoincareThreeBody.Averaging +public import LeanPool.PoincareThreeBody.Core +public import LeanPool.PoincareThreeBody.CoefficientNormalization +public import LeanPool.PoincareThreeBody.CertifiedPoincareSet +public import LeanPool.PoincareThreeBody.Delaunay +public import LeanPool.PoincareThreeBody.DelaunayActions +public import LeanPool.PoincareThreeBody.DelaunayAnchorChart +public import LeanPool.PoincareThreeBody.DelaunayChart +public import LeanPool.PoincareThreeBody.DelaunayFlow +public import LeanPool.PoincareThreeBody.DelaunaySection +public import LeanPool.PoincareThreeBody.DenseResonantObstruction +public import LeanPool.PoincareThreeBody.DifferentialDependence +public import LeanPool.PoincareThreeBody.DisturbingCertificate +public import LeanPool.PoincareThreeBody.DisturbingFunction +public import LeanPool.PoincareThreeBody.EnergyLeafObstruction +public import LeanPool.PoincareThreeBody.GeneratingFunction +public import LeanPool.PoincareThreeBody.GlobalEnergySection +public import LeanPool.PoincareThreeBody.HamiltonianMixedPartials +public import LeanPool.PoincareThreeBody.HomologicalEquation +public import LeanPool.PoincareThreeBody.IrrationalTorusFlow +public import LeanPool.PoincareThreeBody.KeplerOrbit +public import LeanPool.PoincareThreeBody.KeplerPhaseOrbit +public import LeanPool.PoincareThreeBody.KeplerFlow +public import LeanPool.PoincareThreeBody.KeplerHamiltonian +public import LeanPool.PoincareThreeBody.LeadingObstruction +public import LeanPool.PoincareThreeBody.LocalEnergyLeaf +public import LeanPool.PoincareThreeBody.MixedPartials +public import LeanPool.PoincareThreeBody.NormalizationInduction +public import LeanPool.PoincareThreeBody.NormalizationClosure +public import LeanPool.PoincareThreeBody.OneTwoResonance +public import LeanPool.PoincareThreeBody.OrbitHomologicalEquation +public import LeanPool.PoincareThreeBody.ParameterDomainTopology +public import LeanPool.PoincareThreeBody.ParameterizedAnalyticDivision +public import LeanPool.PoincareThreeBody.Perturbation +public import LeanPool.PoincareThreeBody.PoincareSet +public import LeanPool.PoincareThreeBody.PoissonNormalization +public import LeanPool.PoincareThreeBody.Polar +public import LeanPool.PoincareThreeBody.Resonance +public import LeanPool.PoincareThreeBody.ResonantActionObstruction +public import LeanPool.PoincareThreeBody.ResonantOrbit +public import LeanPool.PoincareThreeBody.RotatingEllipse +public import LeanPool.PoincareThreeBody.ValidatedQuadrature /-! # Poincaré's Nonintegrability Theorem for the Restricted Three-Body Problem @@ -63,6 +64,8 @@ Tags: dynamical-systems, celestial-mechanics, hamiltonian-systems, nonintegrabil MSC: 70F07, 37J30, 37J40 -/ +@[expose] public section + /-! # Poincaré's theorem for the planar restricted three-body problem diff --git a/LeanPool/PoincareThreeBody/ActionFactorization.lean b/LeanPool/PoincareThreeBody/ActionFactorization.lean index 4de18a3b6b..803ac36b54 100644 --- a/LeanPool/PoincareThreeBody/ActionFactorization.lean +++ b/LeanPool/PoincareThreeBody/ActionFactorization.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.ActionPoisson +public import LeanPool.PoincareThreeBody.ActionPoisson +public import LeanPool.PoincareThreeBody.DelaunaySection +import Mathlib.Analysis.Calculus.Deriv.Comp +import Mathlib.Analysis.Calculus.FDeriv.Analytic /-! # Pointwise factorization of the leading integral through the Delaunay actions @@ -14,6 +18,8 @@ that value-level statement to a differential identity: at every noncircular elli phase differential is the pullback of the differential of the action-space representative. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/ActionPoisson.lean b/LeanPool/PoincareThreeBody/ActionPoisson.lean index 40fef3b1be..6d92ff359c 100644 --- a/LeanPool/PoincareThreeBody/ActionPoisson.lean +++ b/LeanPool/PoincareThreeBody/ActionPoisson.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.DelaunaySection +public import LeanPool.PoincareThreeBody.DelaunayActions +import LeanPool.PoincareThreeBody.DelaunayFlow +import Mathlib.Analysis.Calculus.Deriv.Prod +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv /-! # Poisson brackets and the Cartesian Delaunay action map @@ -13,6 +17,8 @@ This file rewrites the physical Poisson bracket with the zero-mass Hamiltonian a the Kepler frequency with the two Poisson brackets against the Cartesian actions `(L,G)`. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/AlignedAverageBlowup.lean b/LeanPool/PoincareThreeBody/AlignedAverageBlowup.lean index e377b135c1..452267a19b 100644 --- a/LeanPool/PoincareThreeBody/AlignedAverageBlowup.lean +++ b/LeanPool/PoincareThreeBody/AlignedAverageBlowup.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.DisturbingRegularBound +public import LeanPool.PoincareThreeBody.DisturbingRegularBound +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Blow-up of the collision-aligned disturbing average @@ -13,6 +17,8 @@ Combining the logarithmic singular estimate with the uniform regular bound gives upper bound on the aligned disturbing average. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open MeasureTheory diff --git a/LeanPool/PoincareThreeBody/Analytic.lean b/LeanPool/PoincareThreeBody/Analytic.lean index e516031717..adf31689a8 100644 --- a/LeanPool/PoincareThreeBody/Analytic.lean +++ b/LeanPool/PoincareThreeBody/Analytic.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.Core +public import LeanPool.PoincareThreeBody.Core +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Analysis.Analytic.Binomial -import Mathlib.Analysis.Analytic.Linear -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.FunProp /-! # Analyticity of the Newtonian potential away from collision @@ -18,6 +18,8 @@ analyticity of arbitrary real powers on the positive half-line. We establish tha it to the inverse square roots in the restricted three-body potential. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody /-- A real power is analytic at every positive base. -/ diff --git a/LeanPool/PoincareThreeBody/AnalyticCompactParameterIntegral.lean b/LeanPool/PoincareThreeBody/AnalyticCompactParameterIntegral.lean index 3d244710ce..32acddcb79 100644 --- a/LeanPool/PoincareThreeBody/AnalyticCompactParameterIntegral.lean +++ b/LeanPool/PoincareThreeBody/AnalyticCompactParameterIntegral.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module +public import Mathlib.Analysis.Analytic.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.PoincareThreeBody.JointSlabIntegral +import Mathlib.Analysis.Analytic.Constructions +import Mathlib.MeasureTheory.Integral.Bochner.Set /-! # Analyticity under integration over a compact time set @@ -14,6 +21,8 @@ inclusion-exclusion for the finite cover, so no explicit partition or ordering o needed. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Filter MeasureTheory Set Topology diff --git a/LeanPool/PoincareThreeBody/AnalyticDensity.lean b/LeanPool/PoincareThreeBody/AnalyticDensity.lean index 322132ec86..7321aa2597 100644 --- a/LeanPool/PoincareThreeBody/AnalyticDensity.lean +++ b/LeanPool/PoincareThreeBody/AnalyticDensity.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module +public import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Analytic.Order -import Mathlib.Topology.Algebra.Module.PerfectSpace /-! # Density from one-dimensional analytic nonvanishing @@ -15,6 +16,8 @@ calculation. A real-analytic function on a connected open set that is nonzero a nonzero on a dense subset of that set. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Filter Set Topology diff --git a/LeanPool/PoincareThreeBody/AnalyticMinors.lean b/LeanPool/PoincareThreeBody/AnalyticMinors.lean index c343cbeb2f..983d82265b 100644 --- a/LeanPool/PoincareThreeBody/AnalyticMinors.lean +++ b/LeanPool/PoincareThreeBody/AnalyticMinors.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.DifferentialDependence -import LeanPool.PoincareThreeBody.ParameterDomainTopology +public import LeanPool.PoincareThreeBody.DifferentialDependence +public import LeanPool.PoincareThreeBody.ParameterDomainTopology +public import LeanPool.PoincareThreeBody.PoincareSet +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import LeanPool.PoincareThreeBody.Analytic +import LeanPool.PoincareThreeBody.LeadingObstruction +import LeanPool.PoincareThreeBody.MixedPartials import Mathlib.Analysis.Analytic.Order -import Mathlib.Analysis.Analytic.Uniqueness +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Analyticity and flatness of differential minors @@ -18,6 +25,8 @@ analytic mass germs, infinite-order vanishing makes them locally zero, and the i propagates that equality along any connected collision-free mass fiber. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/AnalyticNormalization.lean b/LeanPool/PoincareThreeBody/AnalyticNormalization.lean index 4c7cbf1272..ffaa988b27 100644 --- a/LeanPool/PoincareThreeBody/AnalyticNormalization.lean +++ b/LeanPool/PoincareThreeBody/AnalyticNormalization.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.EnergyLeafObstruction +public import LeanPool.PoincareThreeBody.MixedPartials +public import LeanPool.PoincareThreeBody.Perturbation +public import Mathlib.Analysis.Calculus.DSlope +public import Mathlib.Analysis.InnerProductSpace.Basic +import LeanPool.PoincareThreeBody.Analytic import Mathlib.Analysis.Analytic.IsolatedZeros +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Analytic coefficient normalization in the mass parameter @@ -16,6 +23,8 @@ mass zero. This file establishes the analytic one-variable division theorem and each phase-space slice of the normalized residual. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/AnalyticParameterIntegral.lean b/LeanPool/PoincareThreeBody/AnalyticParameterIntegral.lean index 7d1be2dc4a..005bfc4d08 100644 --- a/LeanPool/PoincareThreeBody/AnalyticParameterIntegral.lean +++ b/LeanPool/PoincareThreeBody/AnalyticParameterIntegral.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import Mathlib.Analysis.Analytic.Basic +public import Mathlib.Analysis.Analytic.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Basic import Mathlib.MeasureTheory.Integral.DominatedConvergence -import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap /-! # Integrating a uniformly controlled analytic power series @@ -16,6 +18,8 @@ compactness argument used later supplies a common radius and the summable integr coefficients. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Filter MeasureTheory Topology diff --git a/LeanPool/PoincareThreeBody/Averaging.lean b/LeanPool/PoincareThreeBody/Averaging.lean index a0f1dd0fc6..826545c34f 100644 --- a/LeanPool/PoincareThreeBody/Averaging.lean +++ b/LeanPool/PoincareThreeBody/Averaging.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.Resonance +public import LeanPool.PoincareThreeBody.Resonance +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import Mathlib.Tactic.Linarith /-! # Averaging the first homological equation @@ -16,6 +18,8 @@ Integrating its derivative over one period removes that term. A nonzero averaged forces the leading differential of the integral to annihilate the resonance vector. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open MeasureTheory Set diff --git a/LeanPool/PoincareThreeBody/CertifiedPoincareSet.lean b/LeanPool/PoincareThreeBody/CertifiedPoincareSet.lean index a10e0e684f..61c883a00f 100644 --- a/LeanPool/PoincareThreeBody/CertifiedPoincareSet.lean +++ b/LeanPool/PoincareThreeBody/CertifiedPoincareSet.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.DisturbingCertificate -import LeanPool.PoincareThreeBody.PoincareSet +public import LeanPool.PoincareThreeBody.DisturbingCertificate +public import LeanPool.PoincareThreeBody.PoincareSet /-! # Finite certificates for the classical Poincaré set @@ -17,6 +18,8 @@ finite data into membership in the exact Poincaré set. Consequently, it is eno the set of actions carrying such certificates is dense. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open scoped Interval diff --git a/LeanPool/PoincareThreeBody/CoefficientNormalization.lean b/LeanPool/PoincareThreeBody/CoefficientNormalization.lean index 1a37156d62..acba1a6e14 100644 --- a/LeanPool/PoincareThreeBody/CoefficientNormalization.lean +++ b/LeanPool/PoincareThreeBody/CoefficientNormalization.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.AnalyticNormalization +public import LeanPool.PoincareThreeBody.AnalyticNormalization +public import LeanPool.PoincareThreeBody.EnergyLeafObstruction +public import LeanPool.PoincareThreeBody.PoincareSet +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The first Poincaré coefficient-normalization cycle @@ -15,6 +20,8 @@ ellipse and instantiates the removable mass quotient. It is the complete local iteration of Poincaré's subtract-and-divide argument. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/CollisionBandAnalyticContinuation.lean b/LeanPool/PoincareThreeBody/CollisionBandAnalyticContinuation.lean index 3be9f5998f..751a45b7e3 100644 --- a/LeanPool/PoincareThreeBody/CollisionBandAnalyticContinuation.lean +++ b/LeanPool/PoincareThreeBody/CollisionBandAnalyticContinuation.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.CollisionBandObstruction +public import LeanPool.PoincareThreeBody.CollisionBandObstruction import Mathlib.Analysis.Analytic.Uniqueness +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Analytic continuation from the collision band @@ -15,6 +19,8 @@ the nonempty collision band therefore extends to the entire connected interior f interval. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Filter Set Topology diff --git a/LeanPool/PoincareThreeBody/CollisionBandObstruction.lean b/LeanPool/PoincareThreeBody/CollisionBandObstruction.lean index c6026e129f..58c7338e62 100644 --- a/LeanPool/PoincareThreeBody/CollisionBandObstruction.lean +++ b/LeanPool/PoincareThreeBody/CollisionBandObstruction.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module +public import LeanPool.PoincareThreeBody.PoincareSet +public import LeanPool.PoincareThreeBody.ResonantCollisionBoundary +import LeanPool.PoincareThreeBody.DenseResonantObstruction import LeanPool.PoincareThreeBody.ResonantAverageSeparation +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The leading obstruction on collision-band resonances @@ -13,6 +19,8 @@ Fiberwise density in eccentricity propagates each collision-band resonant obstru nondegenerate eccentricities to every admissible eccentricity at that resonance. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/CollisionIntegralBlowup.lean b/LeanPool/PoincareThreeBody/CollisionIntegralBlowup.lean index 0f74418465..b9ef4c34cb 100644 --- a/LeanPool/PoincareThreeBody/CollisionIntegralBlowup.lean +++ b/LeanPool/PoincareThreeBody/CollisionIntegralBlowup.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.ResonantCollisionBoundary +public import LeanPool.PoincareThreeBody.ResonantCollisionBoundary +import LeanPool.PoincareThreeBody.Analytic import Mathlib.Analysis.SpecialFunctions.Integrals.Basic /-! @@ -14,6 +16,8 @@ This file develops the real-variable estimate showing that the averaged Newtonia becomes unbounded when an aligned apoapsis approaches the unit primary. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Filter MeasureTheory Set Topology diff --git a/LeanPool/PoincareThreeBody/Core.lean b/LeanPool/PoincareThreeBody/Core.lean index 49fad964b8..f0de13fcaa 100644 --- a/LeanPool/PoincareThreeBody/Core.lean +++ b/LeanPool/PoincareThreeBody/Core.lean @@ -3,14 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import Mathlib.Analysis.Analytic.Basic -import Mathlib.Analysis.Calculus.FDeriv.Basic -import Mathlib.Analysis.Real.Sqrt -import Mathlib.LinearAlgebra.Matrix.Notation -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +public import Mathlib.Analysis.Analytic.Basic +public import Mathlib.Analysis.Calculus.FDeriv.Defs +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset /-! # The planar circular restricted three-body Hamiltonian @@ -20,6 +18,8 @@ establishes their elementary structural properties. It deliberately does not imp module: the solution and challenge environments must remain separately exportable for comparator. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Set diff --git a/LeanPool/PoincareThreeBody/Delaunay.lean b/LeanPool/PoincareThreeBody/Delaunay.lean index ed3ade2a8b..407d3bd888 100644 --- a/LeanPool/PoincareThreeBody/Delaunay.lean +++ b/LeanPool/PoincareThreeBody/Delaunay.lean @@ -3,20 +3,17 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.Resonance +public import LeanPool.PoincareThreeBody.Resonance +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.NumberTheory.Real.Irrational import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Inv import Mathlib.Analysis.Calculus.Deriv.Pow -import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.FunProp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring -import Mathlib.Topology.Algebra.Order.Archimedean -import Mathlib.Topology.Instances.Irrational +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Delaunay frequencies and resonant actions @@ -26,6 +23,8 @@ At zero mass the planar rotating Kepler Hamiltonian in Delaunay actions is explicit family of resonant actions. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody /-- The rotating Kepler Hamiltonian in planar Delaunay actions. -/ diff --git a/LeanPool/PoincareThreeBody/DelaunayActions.lean b/LeanPool/PoincareThreeBody/DelaunayActions.lean index 82f4128b54..7880855e07 100644 --- a/LeanPool/PoincareThreeBody/DelaunayActions.lean +++ b/LeanPool/PoincareThreeBody/DelaunayActions.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.DelaunayChart -import LeanPool.PoincareThreeBody.KeplerHamiltonian +public import LeanPool.PoincareThreeBody.DelaunayChart +import LeanPool.PoincareThreeBody.Analytic +import Mathlib.Analysis.Calculus.Deriv.Comp +import Mathlib.Analysis.Calculus.Deriv.Prod +import Mathlib.Analysis.Calculus.FDeriv.Analytic /-! # Physical realization of the planar Delaunay actions @@ -16,6 +20,8 @@ energy. Consequently the physical mass-zero Hamiltonian pulls back to the displ Hamiltonian. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/DelaunayAnchorChart.lean b/LeanPool/PoincareThreeBody/DelaunayAnchorChart.lean index 1d70c5a0d8..8fb26f1806 100644 --- a/LeanPool/PoincareThreeBody/DelaunayAnchorChart.lean +++ b/LeanPool/PoincareThreeBody/DelaunayAnchorChart.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.GlobalEnergySection +public import LeanPool.PoincareThreeBody.GlobalEnergySection +public import LeanPool.PoincareThreeBody.ActionPoisson import LeanPool.PoincareThreeBody.ActionFactorization +import LeanPool.PoincareThreeBody.Analytic +import LeanPool.PoincareThreeBody.KeplerHamiltonian +import Mathlib.Analysis.Calculus.Deriv.Prod import Mathlib.Analysis.Calculus.InverseFunctionTheorem.FDeriv +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # A local Delaunay chart at the rational elliptic anchor @@ -16,6 +24,8 @@ four-dimensional chart. Its derivative at the rational anchor is nonsingular, s contains a phase-space neighborhood of the anchor. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/DelaunayChart.lean b/LeanPool/PoincareThreeBody/DelaunayChart.lean index eaa9f191ba..5fc91010ae 100644 --- a/LeanPool/PoincareThreeBody/DelaunayChart.lean +++ b/LeanPool/PoincareThreeBody/DelaunayChart.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.IrrationalTorusFlow -import LeanPool.PoincareThreeBody.KeplerPhaseOrbit +public import LeanPool.PoincareThreeBody.KeplerPhaseOrbit +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv /-! # The lifted planar Delaunay chart @@ -15,6 +16,8 @@ action, eccentricity, mean anomaly, and rotating periapsis angle. The angles ar to real numbers; periodicity will allow the chart to descend to the angle torus. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/DelaunayFlow.lean b/LeanPool/PoincareThreeBody/DelaunayFlow.lean index 667b05be04..346f0ad8dd 100644 --- a/LeanPool/PoincareThreeBody/DelaunayFlow.lean +++ b/LeanPool/PoincareThreeBody/DelaunayFlow.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.DelaunayChart +public import LeanPool.PoincareThreeBody.DelaunayChart +public import LeanPool.PoincareThreeBody.KeplerFlow +import LeanPool.PoincareThreeBody.IrrationalTorusFlow import LeanPool.PoincareThreeBody.KeplerHamiltonian -import Mathlib.Analysis.Calculus.MeanValue +import Mathlib.Analysis.Calculus.Deriv.Prod +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv /-! # The unperturbed Hamiltonian flow in lifted Delaunay variables @@ -16,6 +20,8 @@ rotating periapsis angle at unit speed. Here we verify directly that this curve Hamilton equations for the mass-zero rotating Kepler Hamiltonian. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody @@ -676,7 +682,7 @@ theorem IsFirstIntegralFamily.mass_zero_liftedDelaunayPhasePoint_eq (fun candidate : InteriorPositiveAction eccentricity ↦ liftedDelaunayPhasePoint candidate.1.1 eccentricity angles.1 angles.2) action := - (continuousAt_liftedDelaunayPhasePoint_firstAction action.1.2.ne').comp haction + (continuousAt_liftedDelaunayPhasePoint_firstAction action.1.2.ne').comp_of_eq haction rfl exact hcandidate.comp hchart have hleft : Continuous left := hcontinuous firstAngles have hright : Continuous right := hcontinuous secondAngles diff --git a/LeanPool/PoincareThreeBody/DelaunaySection.lean b/LeanPool/PoincareThreeBody/DelaunaySection.lean index de4e735b6a..f5c939f85a 100644 --- a/LeanPool/PoincareThreeBody/DelaunaySection.lean +++ b/LeanPool/PoincareThreeBody/DelaunaySection.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.DelaunayActions -import LeanPool.PoincareThreeBody.DelaunayFlow -import Mathlib.Analysis.Calculus.FDeriv.Analytic +public import LeanPool.PoincareThreeBody.DelaunayActions +public import LeanPool.PoincareThreeBody.DelaunayFlow +import LeanPool.PoincareThreeBody.Analytic +import Mathlib.Analysis.Calculus.ContDiff.Comp /-! # An analytic periapsis section of the planar Delaunay action map @@ -18,6 +20,8 @@ physical action map and supplies the action-space representative of the leading integral. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/DenseResonantObstruction.lean b/LeanPool/PoincareThreeBody/DenseResonantObstruction.lean index fa8374a756..7d3317c8bb 100644 --- a/LeanPool/PoincareThreeBody/DenseResonantObstruction.lean +++ b/LeanPool/PoincareThreeBody/DenseResonantObstruction.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.ResonantActionObstruction +public import LeanPool.PoincareThreeBody.ResonantActionObstruction /-! # Propagating resonant obstructions by density @@ -15,6 +16,8 @@ forces the leading integral differential to be dependent on the Kepler frequency the corresponding fixed-eccentricity action interval. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody /-- Interior first actions carrying a positive rational Kepler resonance. -/ diff --git a/LeanPool/PoincareThreeBody/DifferentialDependence.lean b/LeanPool/PoincareThreeBody/DifferentialDependence.lean index 48bc4ade34..00d392f431 100644 --- a/LeanPool/PoincareThreeBody/DifferentialDependence.lean +++ b/LeanPool/PoincareThreeBody/DifferentialDependence.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.PoissonNormalization +public import LeanPool.PoincareThreeBody.Core +import Mathlib.Analysis.Calculus.Deriv.Basic +import Mathlib.Analysis.Calculus.FDeriv.Comp +import Mathlib.Analysis.InnerProductSpace.Basic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Coordinate minors and functional dependence @@ -15,6 +22,8 @@ identities naturally produced by coefficient induction into failure of the chall `LinearIndependent` predicate. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/DisturbingAverageAnalytic.lean b/LeanPool/PoincareThreeBody/DisturbingAverageAnalytic.lean index 4cb9a6888c..050439ce54 100644 --- a/LeanPool/PoincareThreeBody/DisturbingAverageAnalytic.lean +++ b/LeanPool/PoincareThreeBody/DisturbingAverageAnalytic.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module +public import LeanPool.PoincareThreeBody.DisturbingFunction import LeanPool.PoincareThreeBody.AnalyticCompactParameterIntegral import LeanPool.PoincareThreeBody.DisturbingParameterAnalytic +import Mathlib.Tactic.Positivity.Finset /-! # Analytic eccentricity dependence of the resonant disturbing average @@ -14,6 +17,8 @@ The joint analyticity of the disturbing function and compact parameter-integral that averaging over one resonant period preserves real analyticity in eccentricity. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Filter MeasureTheory Set Topology diff --git a/LeanPool/PoincareThreeBody/DisturbingCertificate.lean b/LeanPool/PoincareThreeBody/DisturbingCertificate.lean index 4545c5b11d..b208b8799e 100644 --- a/LeanPool/PoincareThreeBody/DisturbingCertificate.lean +++ b/LeanPool/PoincareThreeBody/DisturbingCertificate.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.DisturbingFunction +public import LeanPool.PoincareThreeBody.DisturbingFunction +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.TrapezoidalRule import LeanPool.PoincareThreeBody.ValidatedQuadrature +import Mathlib.Analysis.Calculus.ContDiff.Operations /-! # Finite certificates for nonconstant resonant averages @@ -15,6 +18,8 @@ two phases. This file reduces that comparison to a finite trapezoidal sum plus a bound on the second time derivative of the integrand difference. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open MeasureTheory diff --git a/LeanPool/PoincareThreeBody/DisturbingFunction.lean b/LeanPool/PoincareThreeBody/DisturbingFunction.lean index c5cbf57fb1..c09235c768 100644 --- a/LeanPool/PoincareThreeBody/DisturbingFunction.lean +++ b/LeanPool/PoincareThreeBody/DisturbingFunction.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module +public import LeanPool.PoincareThreeBody.ResonantOrbit +import LeanPool.PoincareThreeBody.Analytic import LeanPool.PoincareThreeBody.Averaging -import LeanPool.PoincareThreeBody.ResonantOrbit import Mathlib.Analysis.Calculus.ParametricIntervalIntegral -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic -import Mathlib.Tactic.Ring +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv /-! # The resonant disturbing average @@ -18,6 +19,8 @@ torus. We define the first-order disturbing function on this family and its aver period. Nonconstancy of this average is the concrete perturbative input in Poincaré's argument. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open MeasureTheory diff --git a/LeanPool/PoincareThreeBody/DisturbingParameterAnalytic.lean b/LeanPool/PoincareThreeBody/DisturbingParameterAnalytic.lean index 62b1a18d84..ec474bfea8 100644 --- a/LeanPool/PoincareThreeBody/DisturbingParameterAnalytic.lean +++ b/LeanPool/PoincareThreeBody/DisturbingParameterAnalytic.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.DisturbingFunction +public import LeanPool.PoincareThreeBody.DisturbingFunction +import LeanPool.PoincareThreeBody.Analytic import LeanPool.PoincareThreeBody.JointEccentricAnomaly +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv /-! # Analytic eccentricity dependence of the disturbing function @@ -15,6 +18,8 @@ is real analytic in eccentricity. This is the pointwise analytic input for the parameter-integral argument. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/DisturbingRegularBound.lean b/LeanPool/PoincareThreeBody/DisturbingRegularBound.lean index d65999dc35..e7533fce69 100644 --- a/LeanPool/PoincareThreeBody/DisturbingRegularBound.lean +++ b/LeanPool/PoincareThreeBody/DisturbingRegularBound.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.CollisionIntegralBlowup +public import LeanPool.PoincareThreeBody.CollisionIntegralBlowup +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Uniform control of the regular disturbing terms near collision @@ -13,6 +17,8 @@ The two nonsingular terms in the first mass perturbation stay uniformly bounded resonant ellipse approaches its apoapsis collision boundary. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/EnergyLeafObstruction.lean b/LeanPool/PoincareThreeBody/EnergyLeafObstruction.lean index dfd0498ae8..14a3da1e48 100644 --- a/LeanPool/PoincareThreeBody/EnergyLeafObstruction.lean +++ b/LeanPool/PoincareThreeBody/EnergyLeafObstruction.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.LeadingObstruction +public import LeanPool.PoincareThreeBody.DelaunaySection import LeanPool.PoincareThreeBody.CollisionBandAnalyticContinuation +import Mathlib.Analysis.Calculus.Deriv.Prod import Mathlib.Analysis.Calculus.MeanValue +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Constancy of the leading coefficient on Kepler energy leaves @@ -18,6 +22,8 @@ makes that coefficient constant on every connected energy-leaf segment contained interior elliptic region. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/GeneratingFunction.lean b/LeanPool/PoincareThreeBody/GeneratingFunction.lean index 78492e8387..be06a6efd6 100644 --- a/LeanPool/PoincareThreeBody/GeneratingFunction.lean +++ b/LeanPool/PoincareThreeBody/GeneratingFunction.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.Polar -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Ring +public import LeanPool.PoincareThreeBody.Polar +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Algebraic foundations of the planar Delaunay generating function @@ -17,6 +18,8 @@ factorization of the squared radial momentum. These identities underlie the squa in the Delaunay generating function. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody /-- The periapsis radius associated with Delaunay actions. -/ diff --git a/LeanPool/PoincareThreeBody/GlobalEnergySection.lean b/LeanPool/PoincareThreeBody/GlobalEnergySection.lean index ceb1b9d02d..0207d5a2cb 100644 --- a/LeanPool/PoincareThreeBody/GlobalEnergySection.lean +++ b/LeanPool/PoincareThreeBody/GlobalEnergySection.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.ParameterDomainTopology +public import LeanPool.PoincareThreeBody.NormalizationClosure import LeanPool.PoincareThreeBody.Analytic import LeanPool.PoincareThreeBody.ParameterizedAnalyticDivision -import LeanPool.PoincareThreeBody.DelaunaySection +import Mathlib.Analysis.Analytic.Uniqueness +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # A global analytic section of the mass-zero energy map @@ -17,6 +20,8 @@ real energy. This supplies a canonical globally analytic one-variable represent mass-zero coefficient of any jointly analytic family. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/HamiltonianMixedPartials.lean b/LeanPool/PoincareThreeBody/HamiltonianMixedPartials.lean index 0c616a5e48..c60b173350 100644 --- a/LeanPool/PoincareThreeBody/HamiltonianMixedPartials.lean +++ b/LeanPool/PoincareThreeBody/HamiltonianMixedPartials.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module +public import LeanPool.PoincareThreeBody.MixedPartials +public import LeanPool.PoincareThreeBody.Perturbation +public import Mathlib.Analysis.InnerProductSpace.Basic +import LeanPool.PoincareThreeBody.Analytic import LeanPool.PoincareThreeBody.HomologicalEquation -import LeanPool.PoincareThreeBody.MixedPartials +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Mixed derivatives of the restricted three-body Hamiltonian @@ -15,6 +20,8 @@ Combining this fact with the explicit mass derivative identifies the Hamiltonian Poincaré's first homological equation. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/HomologicalEquation.lean b/LeanPool/PoincareThreeBody/HomologicalEquation.lean index 7c346d4256..f4b9a3613c 100644 --- a/LeanPool/PoincareThreeBody/HomologicalEquation.lean +++ b/LeanPool/PoincareThreeBody/HomologicalEquation.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.Perturbation +public import LeanPool.PoincareThreeBody.Perturbation +import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Mul -import Mathlib.Tactic.Ring +import Mathlib.Analysis.InnerProductSpace.Basic +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # The first homological equation @@ -17,6 +20,8 @@ of the two cross brackets. The hypotheses expose precisely the mixed derivative be obtained from joint analyticity. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/IrrationalTorusFlow.lean b/LeanPool/PoincareThreeBody/IrrationalTorusFlow.lean index 3a1c08a94a..19027831a0 100644 --- a/LeanPool/PoincareThreeBody/IrrationalTorusFlow.lean +++ b/LeanPool/PoincareThreeBody/IrrationalTorusFlow.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle +public import Mathlib.NumberTheory.Real.Irrational import Mathlib.Topology.Instances.AddCircle.DenseSubgroup import Mathlib.Topology.Instances.Irrational -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle -import Mathlib.Tactic.FunProp /-! # Irrational rotating flows on the two-torus @@ -17,6 +18,8 @@ on the angle torus. This file proves directly that a continuous invariant of th constant, using irrational rotations on a circle. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Set diff --git a/LeanPool/PoincareThreeBody/JointBallFiberSeries.lean b/LeanPool/PoincareThreeBody/JointBallFiberSeries.lean index 71c0c6c7a8..f6c55cb4f3 100644 --- a/LeanPool/PoincareThreeBody/JointBallFiberSeries.lean +++ b/LeanPool/PoincareThreeBody/JointBallFiberSeries.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.AnalyticParameterIntegral -import Mathlib.Analysis.Analytic.ChangeOrigin +public import Mathlib.Analysis.Analytic.ChangeOrigin +public import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.Analytic.Constructions +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Uniform fiber series from one joint analytic ball @@ -16,6 +18,8 @@ radius on any smaller time slab. These are the local pieces used in the compact parameter-integral theorem. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Filter Set Topology diff --git a/LeanPool/PoincareThreeBody/JointEccentricAnomaly.lean b/LeanPool/PoincareThreeBody/JointEccentricAnomaly.lean index 70d55a5985..5dfa7dbd98 100644 --- a/LeanPool/PoincareThreeBody/JointEccentricAnomaly.lean +++ b/LeanPool/PoincareThreeBody/JointEccentricAnomaly.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.KeplerOrbit -import Mathlib.Analysis.Calculus.InverseFunctionTheorem.Analytic -import Mathlib.Analysis.Normed.Operator.Banach -import Mathlib.LinearAlgebra.Matrix.ToLin -import Mathlib.Tactic.FieldSimp +public import LeanPool.PoincareThreeBody.KeplerOrbit +public import Mathlib.Topology.Algebra.Module.FiniteDimension +import Mathlib.Analysis.Calculus.InverseFunctionTheorem.FDeriv +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Joint analyticity of Kepler's equation @@ -19,6 +20,8 @@ on eccentricity. We obtain it by applying the analytic inverse-function theorem map `(e, E) ↦ (e, E - e sin E)`. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Filter Topology diff --git a/LeanPool/PoincareThreeBody/JointSlabIntegral.lean b/LeanPool/PoincareThreeBody/JointSlabIntegral.lean index 09e9cb0d54..53f5933061 100644 --- a/LeanPool/PoincareThreeBody/JointSlabIntegral.lean +++ b/LeanPool/PoincareThreeBody/JointSlabIntegral.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.JointBallFiberSeries -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +public import LeanPool.PoincareThreeBody.JointBallFiberSeries +public import LeanPool.PoincareThreeBody.AnalyticParameterIntegral +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import Mathlib.MeasureTheory.Integral.IntegrableOn +import Mathlib.MeasureTheory.Measure.Lebesgue.Basic /-! # Integrating a joint analytic power series over a time slab @@ -14,6 +18,8 @@ This file turns the uniform fiber series supplied by a joint analytic ball into for its parameter integral over any closed time interval contained in a smaller slab. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Filter MeasureTheory Set Topology diff --git a/LeanPool/PoincareThreeBody/KeplerFlow.lean b/LeanPool/PoincareThreeBody/KeplerFlow.lean index fd5a98aeda..924fe943ec 100644 --- a/LeanPool/PoincareThreeBody/KeplerFlow.lean +++ b/LeanPool/PoincareThreeBody/KeplerFlow.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.KeplerPhaseOrbit +public import LeanPool.PoincareThreeBody.KeplerPhaseOrbit +import Mathlib.Analysis.Calculus.Deriv.Comp import Mathlib.Analysis.Calculus.Deriv.Prod -import Mathlib.Tactic.FinCases +import Mathlib.Tactic.Positivity.Finset /-! # The resonant ellipse as a Hamiltonian flow line @@ -16,6 +18,8 @@ curve and provides the chain-rule interface used to differentiate a candidate fi that curve. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/KeplerHamiltonian.lean b/LeanPool/PoincareThreeBody/KeplerHamiltonian.lean index e5a3d85206..4d1a14ad3b 100644 --- a/LeanPool/PoincareThreeBody/KeplerHamiltonian.lean +++ b/LeanPool/PoincareThreeBody/KeplerHamiltonian.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.KeplerFlow +public import LeanPool.PoincareThreeBody.KeplerFlow import Mathlib.Analysis.Calculus.FDeriv.Mul -import Mathlib.Analysis.Calculus.FDeriv.Prod -import Mathlib.Tactic.FinCases /-! # Differential of the rotating Kepler Hamiltonian @@ -17,6 +16,8 @@ field with `rotatingKeplerVectorField`. Consequently, a Poisson bracket with th Hamiltonian is exactly differentiation along a Kepler flow line. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/KeplerOrbit.lean b/LeanPool/PoincareThreeBody/KeplerOrbit.lean index 7182f0857f..d666ee7f05 100644 --- a/LeanPool/PoincareThreeBody/KeplerOrbit.lean +++ b/LeanPool/PoincareThreeBody/KeplerOrbit.lean @@ -3,15 +3,15 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.GeneratingFunction -import Mathlib.Analysis.Calculus.Deriv.Inverse +public import LeanPool.PoincareThreeBody.GeneratingFunction +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Topology.Algebra.Module.ModuleTopology import Mathlib.Analysis.Calculus.Deriv.MeanValue import Mathlib.Analysis.Calculus.InverseFunctionTheorem.Analytic import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Ring +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Elliptic Kepler orbits in eccentric anomaly @@ -21,6 +21,8 @@ This file gives the real elliptic Kepler orbit attached to Delaunay action `I₁ first Delaunay angle along the unperturbed flow. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody /-- Radius of an elliptic Kepler orbit as a function of eccentric anomaly. -/ diff --git a/LeanPool/PoincareThreeBody/KeplerPhaseOrbit.lean b/LeanPool/PoincareThreeBody/KeplerPhaseOrbit.lean index 2c3c8fc66e..6eff0007bf 100644 --- a/LeanPool/PoincareThreeBody/KeplerPhaseOrbit.lean +++ b/LeanPool/PoincareThreeBody/KeplerPhaseOrbit.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.DisturbingFunction -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.Ring +public import LeanPool.PoincareThreeBody.DisturbingFunction +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv /-! # Full phase-space Kepler orbits @@ -17,6 +17,8 @@ file supplies the canonical rotating-frame momentum and embeds the resonant elli four-dimensional phase space. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/LeadingObstruction.lean b/LeanPool/PoincareThreeBody/LeadingObstruction.lean index d074433bc1..8ec7ed94fd 100644 --- a/LeanPool/PoincareThreeBody/LeadingObstruction.lean +++ b/LeanPool/PoincareThreeBody/LeadingObstruction.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module +public import LeanPool.PoincareThreeBody.PoincareSet +import LeanPool.PoincareThreeBody.ActionFactorization import LeanPool.PoincareThreeBody.DenseResonantObstruction -import LeanPool.PoincareThreeBody.PoincareSet /-! # The classical obstruction for the leading coefficient @@ -16,6 +18,8 @@ is isolated as `ClassicalDisturbingNondegeneracy`: the resonant disturbing avera nonconstant at every rational resonance under consideration. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/LocalEnergyLeaf.lean b/LeanPool/PoincareThreeBody/LocalEnergyLeaf.lean index 1b85fc3749..1a356073ff 100644 --- a/LeanPool/PoincareThreeBody/LocalEnergyLeaf.lean +++ b/LeanPool/PoincareThreeBody/LocalEnergyLeaf.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.DelaunayAnchorChart -import LeanPool.PoincareThreeBody.EnergyLeafObstruction +public import LeanPool.PoincareThreeBody.DelaunayAnchorChart +public import LeanPool.PoincareThreeBody.EnergyLeafObstruction +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Local energy leaves at the rational anchor @@ -15,6 +18,8 @@ energy/first-action coordinates. Shrinking the first-action side to an interval the whole straight energy-leaf segment back to the anchor remains in the region. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Set diff --git a/LeanPool/PoincareThreeBody/MixedPartials.lean b/LeanPool/PoincareThreeBody/MixedPartials.lean index 6763e51bed..fbd2912919 100644 --- a/LeanPool/PoincareThreeBody/MixedPartials.lean +++ b/LeanPool/PoincareThreeBody/MixedPartials.lean @@ -3,12 +3,10 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import Mathlib.Analysis.Analytic.IteratedFDeriv -import Mathlib.Analysis.Calculus.Deriv.Comp -import Mathlib.Analysis.Calculus.FDeriv.Prod +public import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Symmetric -import Mathlib.Tactic.FunProp /-! # Mixed mass and phase derivatives @@ -17,6 +15,8 @@ The first homological equation differentiates phase derivatives with respect to parameter. This file packages the needed Schwarz theorem for a jointly `C²` scalar function. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody /-- The derivative in the distinguished real parameter direction at parameter zero. -/ diff --git a/LeanPool/PoincareThreeBody/NormalizationClosure.lean b/LeanPool/PoincareThreeBody/NormalizationClosure.lean index f43b01c06b..77c05b3388 100644 --- a/LeanPool/PoincareThreeBody/NormalizationClosure.lean +++ b/LeanPool/PoincareThreeBody/NormalizationClosure.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.NormalizationInduction +public import LeanPool.PoincareThreeBody.NormalizationInduction +import LeanPool.PoincareThreeBody.PoissonNormalization +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Closing the normalization induction from one step @@ -15,6 +19,8 @@ analyticity and the first-integral equation—classical choice and primitive rec orders automatically. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/NormalizationInduction.lean b/LeanPool/PoincareThreeBody/NormalizationInduction.lean index b10f6bbbb8..d98657a31c 100644 --- a/LeanPool/PoincareThreeBody/NormalizationInduction.lean +++ b/LeanPool/PoincareThreeBody/NormalizationInduction.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.AnalyticMinors +public import LeanPool.PoincareThreeBody.AnalyticMinors +public import LeanPool.PoincareThreeBody.AnalyticNormalization +import LeanPool.PoincareThreeBody.Analytic +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Iterated Poincaré normalization @@ -15,6 +21,8 @@ expansions then express the original candidate as a function of the Hamiltonian arbitrarily high power of the mass parameter. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/OneTwoResonance.lean b/LeanPool/PoincareThreeBody/OneTwoResonance.lean index cee2bc65af..3352a47097 100644 --- a/LeanPool/PoincareThreeBody/OneTwoResonance.lean +++ b/LeanPool/PoincareThreeBody/OneTwoResonance.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.DisturbingCertificate +public import LeanPool.PoincareThreeBody.DisturbingCertificate /-! # A concrete interior 1:2 resonance @@ -15,6 +16,8 @@ validated-numerics proof therefore only has to bound a second derivative and che trapezoidal inequality. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open scoped Interval diff --git a/LeanPool/PoincareThreeBody/OrbitHomologicalEquation.lean b/LeanPool/PoincareThreeBody/OrbitHomologicalEquation.lean index a01d308827..25298e8149 100644 --- a/LeanPool/PoincareThreeBody/OrbitHomologicalEquation.lean +++ b/LeanPool/PoincareThreeBody/OrbitHomologicalEquation.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module +public import LeanPool.PoincareThreeBody.KeplerPhaseOrbit +public import LeanPool.PoincareThreeBody.MixedPartials +import LeanPool.PoincareThreeBody.Analytic import LeanPool.PoincareThreeBody.Averaging import LeanPool.PoincareThreeBody.HamiltonianMixedPartials import LeanPool.PoincareThreeBody.KeplerHamiltonian +import Mathlib.Analysis.Calculus.ContDiff.Comp /-! # The first homological equation on a resonant Kepler orbit @@ -16,6 +21,8 @@ periodic Kepler flow. Its first term becomes a time derivative, so its integral period vanishes. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open MeasureTheory Set diff --git a/LeanPool/PoincareThreeBody/ParameterDomainTopology.lean b/LeanPool/PoincareThreeBody/ParameterDomainTopology.lean index 3f0eb5378e..925fd97fbe 100644 --- a/LeanPool/PoincareThreeBody/ParameterDomainTopology.lean +++ b/LeanPool/PoincareThreeBody/ParameterDomainTopology.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.Core +public import LeanPool.PoincareThreeBody.Core import Mathlib.Analysis.Normed.Module.Connected +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset /-! # Topology of the collision-free parameter domain @@ -16,6 +19,8 @@ twice-punctured plane, and the unrestricted momentum plane. This proves that th path-connected whenever the mass interval is nonempty. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Set diff --git a/LeanPool/PoincareThreeBody/ParameterizedAnalyticDivision.lean b/LeanPool/PoincareThreeBody/ParameterizedAnalyticDivision.lean index 0663ab626a..4b93e39c29 100644 --- a/LeanPool/PoincareThreeBody/ParameterizedAnalyticDivision.lean +++ b/LeanPool/PoincareThreeBody/ParameterizedAnalyticDivision.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.NormalizationClosure +public import LeanPool.PoincareThreeBody.NormalizationClosure +import LeanPool.PoincareThreeBody.Analytic import Mathlib.Analysis.Normed.Operator.Prod -import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap -import Mathlib.MeasureTheory.Integral.DominatedConvergence +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus /-! # Parameterized analytic division @@ -17,6 +20,8 @@ normalization. The homotopy `(mass, phase) ↦ (t * mass, phase)` reduces divis coordinate to integration of the mass partial derivative along `0 ≤ t ≤ 1`. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open TopologicalSpace diff --git a/LeanPool/PoincareThreeBody/Perturbation.lean b/LeanPool/PoincareThreeBody/Perturbation.lean index c9248c68b3..ae526bd9dd 100644 --- a/LeanPool/PoincareThreeBody/Perturbation.lean +++ b/LeanPool/PoincareThreeBody/Perturbation.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.Analytic +public import LeanPool.PoincareThreeBody.Core +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Topology.Algebra.Module.ModuleTopology +import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Inv +import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.SpecialFunctions.Sqrt -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Ring +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # First mass perturbation of the planar Hamiltonian @@ -18,6 +22,8 @@ Kepler limit. The resulting disturbing function is the explicit input to Poincar homological equation. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/PoincareSet.lean b/LeanPool/PoincareThreeBody/PoincareSet.lean index c9c4f5fc53..c4b7060166 100644 --- a/LeanPool/PoincareThreeBody/PoincareSet.lean +++ b/LeanPool/PoincareThreeBody/PoincareSet.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.DenseResonantObstruction +public import LeanPool.PoincareThreeBody.DelaunaySection import LeanPool.PoincareThreeBody.AnalyticDensity +import LeanPool.PoincareThreeBody.DenseResonantObstruction import LeanPool.PoincareThreeBody.DisturbingAverageAnalytic /-! @@ -18,6 +20,8 @@ defines that set intrinsically in the full two-dimensional action region and pro leading-coefficient obstruction. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/PoissonNormalization.lean b/LeanPool/PoincareThreeBody/PoissonNormalization.lean index 4cd79e7ef9..6b8bf8c7b3 100644 --- a/LeanPool/PoincareThreeBody/PoissonNormalization.lean +++ b/LeanPool/PoincareThreeBody/PoissonNormalization.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.AnalyticNormalization +public import LeanPool.PoincareThreeBody.AnalyticNormalization +import LeanPool.PoincareThreeBody.Analytic +import Mathlib.Analysis.Calculus.ContDiff.Comp +import Mathlib.Analysis.Normed.Module.FiniteDimension +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Poisson algebra for coefficient normalization @@ -15,6 +21,8 @@ shows that the mass-normalized candidate remains a first integral for nonzero ma zeroth coefficient cancellation holds locally in phase space. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/Polar.lean b/LeanPool/PoincareThreeBody/Polar.lean index d6d81fc01a..df224138ff 100644 --- a/LeanPool/PoincareThreeBody/Polar.lean +++ b/LeanPool/PoincareThreeBody/Polar.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.Delaunay -import LeanPool.PoincareThreeBody.Perturbation -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Ring +public import LeanPool.PoincareThreeBody.Delaunay +public import LeanPool.PoincareThreeBody.Core +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Polar canonical coordinates for the rotating Kepler limit @@ -19,6 +18,8 @@ the zero-mass Cartesian Hamiltonian to the rotating Kepler Hamiltonian. This is change on the route to Delaunay action-angle variables. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/Resonance.lean b/LeanPool/PoincareThreeBody/Resonance.lean index e33f44c7ce..6e10997647 100644 --- a/LeanPool/PoincareThreeBody/Resonance.lean +++ b/LeanPool/PoincareThreeBody/Resonance.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import Mathlib.LinearAlgebra.Matrix.NonsingularInverse +public import Mathlib.LinearAlgebra.LinearIndependent.Defs +public import Mathlib.Topology.MetricSpace.Pseudo.Defs import Mathlib.Analysis.Real.Sqrt -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.FunProp -import Mathlib.Tactic.Linarith -import Mathlib.Topology.Separation.Hausdorff +import Mathlib.LinearAlgebra.Matrix.NonsingularInverse /-! # Resonant covectors in two degrees of freedom @@ -20,6 +19,8 @@ of a putative first integral annihilate the same nonzero resonance vector. In tw two covectors must therefore be linearly dependent. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody /-- The two-dimensional action or frequency space used in the planar problem. -/ diff --git a/LeanPool/PoincareThreeBody/ResonantActionObstruction.lean b/LeanPool/PoincareThreeBody/ResonantActionObstruction.lean index e419993f1b..ccd2e6434a 100644 --- a/LeanPool/PoincareThreeBody/ResonantActionObstruction.lean +++ b/LeanPool/PoincareThreeBody/ResonantActionObstruction.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module +public import LeanPool.PoincareThreeBody.OrbitHomologicalEquation +public import LeanPool.PoincareThreeBody.ActionPoisson +public import LeanPool.PoincareThreeBody.DelaunaySection import LeanPool.PoincareThreeBody.ActionFactorization -import LeanPool.PoincareThreeBody.DisturbingFunction -import LeanPool.PoincareThreeBody.OrbitHomologicalEquation +import LeanPool.PoincareThreeBody.Analytic +import LeanPool.PoincareThreeBody.Averaging +import LeanPool.PoincareThreeBody.HamiltonianMixedPartials +import LeanPool.PoincareThreeBody.KeplerHamiltonian +import Mathlib.Analysis.Calculus.ContDiff.Deriv +import Mathlib.Analysis.Calculus.Deriv.Add +import Mathlib.Analysis.Calculus.Deriv.Comp +import Mathlib.Analysis.Calculus.Deriv.Mul /-! # The resonant action form of the first homological obstruction @@ -16,6 +26,8 @@ disturbing average. The bridge is the pointwise factorization of the leading di the physical Delaunay action map. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open MeasureTheory Set diff --git a/LeanPool/PoincareThreeBody/ResonantAverageSeparation.lean b/LeanPool/PoincareThreeBody/ResonantAverageSeparation.lean index 07c7e6db6e..2a4f2909a8 100644 --- a/LeanPool/PoincareThreeBody/ResonantAverageSeparation.lean +++ b/LeanPool/PoincareThreeBody/ResonantAverageSeparation.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module +public import LeanPool.PoincareThreeBody.PoincareSet +public import LeanPool.PoincareThreeBody.ResonantCollisionBoundary +import LeanPool.PoincareThreeBody.AlignedAverageBlowup +import LeanPool.PoincareThreeBody.AnalyticDensity +import LeanPool.PoincareThreeBody.DisturbingAverageAnalytic import LeanPool.PoincareThreeBody.SafeAverageAnalytic -import LeanPool.PoincareThreeBody.PoincareSet +import Mathlib.Analysis.Analytic.Constructions +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Separation of resonant disturbing averages in the collision band @@ -14,6 +23,8 @@ The safe average stays finite at the boundary, while the aligned average tends t infinity. Hence the two orientation phases separate at an admissible eccentricity. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Filter Set Topology diff --git a/LeanPool/PoincareThreeBody/ResonantCollisionBoundary.lean b/LeanPool/PoincareThreeBody/ResonantCollisionBoundary.lean index 29022dc2cc..f958de2d82 100644 --- a/LeanPool/PoincareThreeBody/ResonantCollisionBoundary.lean +++ b/LeanPool/PoincareThreeBody/ResonantCollisionBoundary.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module +public import LeanPool.PoincareThreeBody.DisturbingFunction import LeanPool.PoincareThreeBody.DisturbingParameterAnalytic -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.FinCases +import Mathlib.Analysis.Calculus.FDeriv.Analytic /-! # The apoapsis collision boundary of an interior resonance @@ -16,6 +17,8 @@ primary before the parabolic limit. This file identifies the boundary eccentric time, and orientation at which the limiting ellipse meets the primary exactly. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Filter Topology diff --git a/LeanPool/PoincareThreeBody/ResonantOrbit.lean b/LeanPool/PoincareThreeBody/ResonantOrbit.lean index cb1bd9de69..6e652fc771 100644 --- a/LeanPool/PoincareThreeBody/ResonantOrbit.lean +++ b/LeanPool/PoincareThreeBody/ResonantOrbit.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.RotatingEllipse -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.Ring +public import LeanPool.PoincareThreeBody.RotatingEllipse +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import LeanPool.PoincareThreeBody.Analytic +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv /-! # Periodic Kepler ellipses at rational Delaunay resonances @@ -17,6 +18,8 @@ frame makes `p` revolutions during the common period `2πp`. This file construct proves its periodicity exactly. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody /-- Mean motion on the `(p,q)` Kepler resonance. -/ diff --git a/LeanPool/PoincareThreeBody/RotatingEllipse.lean b/LeanPool/PoincareThreeBody/RotatingEllipse.lean index 80af7fb49a..8f33dc25e6 100644 --- a/LeanPool/PoincareThreeBody/RotatingEllipse.lean +++ b/LeanPool/PoincareThreeBody/RotatingEllipse.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.KeplerOrbit -import LeanPool.PoincareThreeBody.Perturbation -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Ring +public import LeanPool.PoincareThreeBody.KeplerOrbit +public import LeanPool.PoincareThreeBody.Perturbation +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Elliptic Kepler positions in the rotating frame @@ -18,6 +19,8 @@ three-body Hamiltonian. This file verifies the radius and distance identities ne the first mass perturbation to a resonant Kepler orbit. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody diff --git a/LeanPool/PoincareThreeBody/SafeAverageAnalytic.lean b/LeanPool/PoincareThreeBody/SafeAverageAnalytic.lean index 9629cf7ce6..da178a2a0f 100644 --- a/LeanPool/PoincareThreeBody/SafeAverageAnalytic.lean +++ b/LeanPool/PoincareThreeBody/SafeAverageAnalytic.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.SafeCollisionPhase +public import LeanPool.PoincareThreeBody.SafeCollisionPhase import LeanPool.PoincareThreeBody.AnalyticCompactParameterIntegral +import LeanPool.PoincareThreeBody.DisturbingParameterAnalytic +import Mathlib.Analysis.Analytic.Constructions +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Analyticity of the collision-avoiding average at the boundary @@ -15,6 +21,8 @@ neighborhood. The compact parameter-integral theorem then gives analyticity of through the collision eccentricity. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open Filter MeasureTheory Set Topology diff --git a/LeanPool/PoincareThreeBody/SafeCollisionPhase.lean b/LeanPool/PoincareThreeBody/SafeCollisionPhase.lean index 817a352d40..770841c878 100644 --- a/LeanPool/PoincareThreeBody/SafeCollisionPhase.lean +++ b/LeanPool/PoincareThreeBody/SafeCollisionPhase.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import LeanPool.PoincareThreeBody.AlignedAverageBlowup -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex +public import LeanPool.PoincareThreeBody.ResonantCollisionBoundary +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # A phase avoiding every boundary collision @@ -14,6 +17,8 @@ Shifting the aligned orientation by `π/q` puts it halfway between the possible The exclusion is ultimately the parity contradiction `1 + 2ql = 2pk`. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody /-- An orientation halfway between resonant collision phases. -/ diff --git a/LeanPool/PoincareThreeBody/ValidatedQuadrature.lean b/LeanPool/PoincareThreeBody/ValidatedQuadrature.lean index 9da3ecfc1f..81ebb0a6c6 100644 --- a/LeanPool/PoincareThreeBody/ValidatedQuadrature.lean +++ b/LeanPool/PoincareThreeBody/ValidatedQuadrature.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Gershon Bialer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gershon Bialer -/ +module -import Mathlib.MeasureTheory.Integral.IntervalIntegral.TrapezoidalRule +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.TrapezoidalRule /-! # Validated quadrature certificates @@ -14,6 +15,8 @@ about the exact interval integral. They form the narrow interface through which computation can discharge a nonvanishing obligation in the Poincaré argument. -/ +@[expose] public section + namespace LeanPool.PoincareThreeBody open scoped Interval diff --git a/LeanPool/PointwiseBirkhoff.lean b/LeanPool/PointwiseBirkhoff.lean index 939c699bcb..5c990cf4f0 100644 --- a/LeanPool/PointwiseBirkhoff.lean +++ b/LeanPool/PointwiseBirkhoff.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Lua Viana Reis, Oliver Butterley, Pietro Monticone. All right Released under Apache 2.0 license as described in the file LICENSE. Authors: Lua Viana Reis, Oliver Butterley, Pietro Monticone -/ +module -import LeanPool.PointwiseBirkhoff.Main +public import LeanPool.PointwiseBirkhoff.Main +import Mathlib.Tactic.Positivity.Finset /-! # Pointwise Birkhoff Ergodic Theorem @@ -17,6 +19,8 @@ Tags: ergodic-theory, measure-theory, probability MSC: 37A30, 28D05 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/PointwiseBirkhoff/Main.lean b/LeanPool/PointwiseBirkhoff/Main.lean index 4c93e08c30..5e3b9e8025 100644 --- a/LeanPool/PointwiseBirkhoff/Main.lean +++ b/LeanPool/PointwiseBirkhoff/Main.lean @@ -3,27 +3,21 @@ Copyright (c) 2026 Lua Viana Reis, Oliver Butterley, Pietro Monticone. All right Released under Apache 2.0 license as described in the file LICENSE. Authors: Lua Viana Reis, Oliver Butterley, Pietro Monticone -/ +module +public import Mathlib.MeasureTheory.Function.ConditionalExpectation.Basic +public import Mathlib.MeasureTheory.MeasurableSpace.Invariants +public import Mathlib.Dynamics.BirkhoffSum.Average import Mathlib.Algebra.Order.Group.PartialSups -import Mathlib.Algebra.Order.SuccPred.PartialSups import Mathlib.Dynamics.BirkhoffSum.QuasiMeasurePreserving -import Mathlib.MeasureTheory.Function.ConditionalExpectation.Basic import Mathlib.MeasureTheory.Integral.DominatedConvergence -import Mathlib.MeasureTheory.MeasurableSpace.Invariants -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.PointwiseBirkhoff.Main -/ +@[expose] public section + open scoped MeasureTheory namespace LeanPool.PointwiseBirkhoff @@ -87,7 +81,7 @@ lemma birkhoffMax_measurable [MeasurableSpace α] open MeasureTheory Measure MeasurableSpace Filter Topology -variable {α : Type*} [msα : MeasurableSpace α] (μ : Measure α := by volume_tac) +variable {α : Type*} [msα : MeasurableSpace α] (μ : Measure α) /-- The supremum of `birkhoffSum f φ (n + 1) x` over `n : ℕ`. -/ noncomputable def birkhoffSup (f : α → α) (φ : α → ℝ) (x : α) : EReal := @@ -215,11 +209,7 @@ variable {f : α → α} (hf : MeasurePreserving f μ μ) lemma iterates_integrable {i : ℕ} (hf : MeasurePreserving f μ μ) (hφ : Integrable φ μ) : Integrable (φ ∘ f^[i]) μ := by - apply (integrable_map_measure _ _).mp - · rwa [(hf.iterate i).map_eq] - · rw [(hf.iterate i).map_eq] - exact hφ.aestronglyMeasurable - exact (hf.iterate i).measurable.aemeasurable + exact (hf.iterate i).integrable_comp_of_integrable hφ lemma birkhoffSum_integrable (hf : MeasurePreserving f μ μ) (hφ : Integrable φ μ) : Integrable (birkhoffSum f φ n) μ := @@ -326,7 +316,7 @@ lemma limsup_birkhoffAverage_nonpos_of_condexp_neg (hf : MeasurePreserving f μ /-- Conditional expectation of an observable onto the invariant measurable space of `f`. -/ noncomputable def invCondexp - (μ : Measure α := by volume_tac) (f : α → α) (φ : α → ℝ) : α → ℝ := + (μ : Measure α) (f : α → α) (φ : α → ℝ) : α → ℝ := μ[φ | invariants f] theorem birkhoffErgodicTheorem_aux {ε : ℝ} (hε : 0 < ε) (hf : MeasurePreserving f μ μ) diff --git a/LeanPool/PolyaEnumerationTheorem.lean b/LeanPool/PolyaEnumerationTheorem.lean index 4dbddd8091..65ad2a32d5 100644 --- a/LeanPool/PolyaEnumerationTheorem.lean +++ b/LeanPool/PolyaEnumerationTheorem.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Luka Opravš. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Luka Opravš -/ - -import LeanPool.PolyaEnumerationTheorem.Basic -import LeanPool.PolyaEnumerationTheorem.PermutationAuxiliary -import LeanPool.PolyaEnumerationTheorem.ReductionToFin -import LeanPool.PolyaEnumerationTheorem.Concrete -import LeanPool.PolyaEnumerationTheorem.StirlingFirstKindSum +module + +public import LeanPool.PolyaEnumerationTheorem.Basic +public import LeanPool.PolyaEnumerationTheorem.PermutationAuxiliary +public import LeanPool.PolyaEnumerationTheorem.ReductionToFin +public import LeanPool.PolyaEnumerationTheorem.Concrete +public import LeanPool.PolyaEnumerationTheorem.StirlingFirstKindSum +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Pólya's enumeration theorem @@ -21,6 +26,8 @@ Tags: combinatorics, group-theory, enumeration MSC: 05A15, 20B30 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/PolyaEnumerationTheorem/Basic.lean b/LeanPool/PolyaEnumerationTheorem/Basic.lean index 4fa9cca6c1..9ee992ce7e 100644 --- a/LeanPool/PolyaEnumerationTheorem/Basic.lean +++ b/LeanPool/PolyaEnumerationTheorem/Basic.lean @@ -3,17 +3,13 @@ Copyright (c) 2026 Luka Opravš. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Luka Opravš -/ -import Mathlib.GroupTheory.Perm.Cycle.Type -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +module + +public import Mathlib.GroupTheory.Perm.Cycle.Factors +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Pólya's enumeration theorem @@ -47,6 +43,8 @@ For additional information, refer to . -/ +@[expose] public section + universe u v w namespace LeanPool.PolyaEnumerationTheorem diff --git a/LeanPool/PolyaEnumerationTheorem/Concrete.lean b/LeanPool/PolyaEnumerationTheorem/Concrete.lean index d6a570b3d7..27bee031c9 100644 --- a/LeanPool/PolyaEnumerationTheorem/Concrete.lean +++ b/LeanPool/PolyaEnumerationTheorem/Concrete.lean @@ -3,14 +3,21 @@ Copyright (c) 2026 Luka Opravš. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Luka Opravš -/ -import LeanPool.PolyaEnumerationTheorem.ReductionToFin -import LeanPool.PolyaEnumerationTheorem.PermutationAuxiliary -import Mathlib.GroupTheory.SpecificGroups.Dihedral +module + +public import Mathlib.GroupTheory.SpecificGroups.Dihedral +public import LeanPool.PolyaEnumerationTheorem.Basic +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Numbers of distinct colorings for some concrete examples -/ +@[expose] public section + universe u v namespace LeanPool.PolyaEnumerationTheorem diff --git a/LeanPool/PolyaEnumerationTheorem/PermutationAuxiliary.lean b/LeanPool/PolyaEnumerationTheorem/PermutationAuxiliary.lean index 48aac87f78..e131e92161 100644 --- a/LeanPool/PolyaEnumerationTheorem/PermutationAuxiliary.lean +++ b/LeanPool/PolyaEnumerationTheorem/PermutationAuxiliary.lean @@ -3,21 +3,21 @@ Copyright (c) 2026 Luka Opravš. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Luka Opravš -/ -import Mathlib.GroupTheory.Perm.Cycle.Type -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +module + +public import Mathlib.GroupTheory.Perm.Cycle.Basic +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.GroupTheory.Perm.Cycle.Factors +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Auxiliary results on permutations -/ +@[expose] public section + universe u variable {X : Type u} @@ -167,7 +167,7 @@ lemma lt_of_lt_succ_of_neq {m : ℕ} (h1 : m < n + 1) (h2 : m ≠ n) : m < n := omega /-- Embed `i : Fin n` into `Fin (n + 1)` by keeping the same underlying value. -/ -private def liftFin (i : Fin n) : Fin (n + 1) := ⟨i.1, Nat.lt_succ_of_lt i.2⟩ +def liftFin (i : Fin n) : Fin (n + 1) := ⟨i.1, Nat.lt_succ_of_lt i.2⟩ @[simp] private lemma liftFin_val (i : Fin n) : (liftFin i).1 = i.1 := rfl @@ -187,7 +187,7 @@ lemma perm_perm_val_lt_of_perm_val_eq {f : Equiv.Perm (Fin (n + 1))} {i : Fin n} omega /-- The forward direction of `permContract`. -/ -private def contractFwd (f : Equiv.Perm (Fin (n + 1))) (i : Fin n) : Fin n := +def contractFwd (f : Equiv.Perm (Fin (n + 1))) (i : Fin n) : Fin n := if h : (f (liftFin i)).1 = n then ⟨(f (f (liftFin i))).1, perm_perm_val_lt_of_perm_val_eq h⟩ else ⟨(f (liftFin i)).1, lt_of_lt_succ_of_neq (f (liftFin i)).2 h⟩ @@ -261,7 +261,7 @@ def permContract (f : Equiv.Perm (Fin (n + 1))) : Equiv.Perm (Fin n) where simp_all /-- The forward direction of `permExpand`. -/ -private def expandFwd (f : Equiv.Perm (Fin n)) (i : Fin (n + 1)) : Fin (n + 1) := +def expandFwd (f : Equiv.Perm (Fin n)) (i : Fin (n + 1)) : Fin (n + 1) := if h : i.1 = n then ⟨n, Nat.lt_succ_self n⟩ else liftFin (f ⟨i.1, lt_of_lt_succ_of_neq i.2 h⟩) diff --git a/LeanPool/PolyaEnumerationTheorem/ReductionToFin.lean b/LeanPool/PolyaEnumerationTheorem/ReductionToFin.lean index 5ad72a93a3..7a661d1850 100644 --- a/LeanPool/PolyaEnumerationTheorem/ReductionToFin.lean +++ b/LeanPool/PolyaEnumerationTheorem/ReductionToFin.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Luka Opravš. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Luka Opravš -/ -import Mathlib.Data.FinEnum -import LeanPool.PolyaEnumerationTheorem.Basic +module + +public import Mathlib.Data.FinEnum +public import LeanPool.PolyaEnumerationTheorem.Basic +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Reduction to `Fin` @@ -15,6 +21,8 @@ colors in `Y` under the induced group action of `G` on `Fin n`. This allows us t instead of more complex types when working with numbers of distinct colorings. -/ +@[expose] public section + universe u v w namespace LeanPool.PolyaEnumerationTheorem @@ -49,10 +57,10 @@ private lemma smul_inv_fin (g : G) (i : Fin enum.card) : rw [smul_fin_eq, enum.equiv.symm_apply_apply] /-- Forward map: a coloring of `X` to a coloring of `Fin enum.card`. -/ -private def fwdColoring (f : X → Y) : Fin enum.card → Y := fun i => f (enum.equiv.symm i) +def fwdColoring (f : X → Y) : Fin enum.card → Y := fun i => f (enum.equiv.symm i) /-- Inverse map: a coloring of `Fin enum.card` to a coloring of `X`. -/ -private def invColoring (f : Fin enum.card → Y) : X → Y := fun x => f (enum.equiv x) +def invColoring (f : Fin enum.card → Y) : X → Y := fun x => f (enum.equiv x) private lemma fwd_inv (f : X → Y) : invColoring X Y (fwdColoring X Y f) = f := by funext x diff --git a/LeanPool/PolyaEnumerationTheorem/StirlingFirstKindSum.lean b/LeanPool/PolyaEnumerationTheorem/StirlingFirstKindSum.lean index 2ad183dca1..76f3374e15 100644 --- a/LeanPool/PolyaEnumerationTheorem/StirlingFirstKindSum.lean +++ b/LeanPool/PolyaEnumerationTheorem/StirlingFirstKindSum.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Luka Opravš. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Luka Opravš -/ -import LeanPool.PolyaEnumerationTheorem.Concrete +module + +public import LeanPool.PolyaEnumerationTheorem.Basic +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! ## Stirling numbers of the first kind @@ -15,6 +22,8 @@ For additional information, refer to . -/ +@[expose] public section + namespace LeanPool.PolyaEnumerationTheorem namespace StirlingFirstKindSum diff --git a/LeanPool/Polylean.lean b/LeanPool/Polylean.lean index 1821c84efe..caff107a0b 100644 --- a/LeanPool/Polylean.lean +++ b/LeanPool/Polylean.lean @@ -3,25 +3,34 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.UnitConjecture -import LeanPool.Polylean.Complexes -import LeanPool.Polylean.Complexes.Constructions.UniversalCover -import LeanPool.Polylean.Complexes.GraphPaths -import LeanPool.Polylean.Complexes.Structures.Category -import LeanPool.Polylean.Complexes.Structures.FreeGroupoid -import LeanPool.Polylean.Complexes.Structures.Groupoid -import LeanPool.Polylean.Complexes.Structures.Invertegory -import LeanPool.Polylean.Complexes.Structures.Quiver -import LeanPool.Polylean.Complexes.Structures.TwoComplex -import LeanPool.Polylean.ConjInvLength -import LeanPool.Polylean.ConjInvLength.Length -import LeanPool.Polylean.ConjInvLength.LengthBound -import LeanPool.Polylean.ConjInvLength.LengthNode -import LeanPool.Polylean.ConjInvLength.MemoLength -import LeanPool.Polylean.ConjInvLength.ProvedBound -import LeanPool.Polylean.ConjInvLength.WordTree -import LeanPool.Polylean.Polymath +public import LeanPool.Polylean.UnitConjecture +public import LeanPool.Polylean.Complexes +public import LeanPool.Polylean.Complexes.Constructions.UniversalCover +public import LeanPool.Polylean.Complexes.GraphPaths +public import LeanPool.Polylean.Complexes.Structures.Category +public import LeanPool.Polylean.Complexes.Structures.FreeGroupoid +public import LeanPool.Polylean.Complexes.Structures.Groupoid +public import LeanPool.Polylean.Complexes.Structures.Invertegory +public import LeanPool.Polylean.Complexes.Structures.Quiver +public import LeanPool.Polylean.Complexes.Structures.TwoComplex +public import LeanPool.Polylean.ConjInvLength +public import LeanPool.Polylean.ConjInvLength.Length +public import LeanPool.Polylean.ConjInvLength.LengthBound +public import LeanPool.Polylean.ConjInvLength.LengthNode +public import LeanPool.Polylean.ConjInvLength.MemoLength +public import LeanPool.Polylean.ConjInvLength.ProvedBound +public import LeanPool.Polylean.ConjInvLength.WordTree +public import LeanPool.Polylean.Polymath +import LeanPool.Polylean.UnitConjecture.Tactics.AesopRuleSets +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # Polylean Unit Conjecture Counterexample @@ -33,3 +42,5 @@ Main declarations: `LeanPool.Polylean.P.torsionFree`, `LeanPool.Polylean.Gardam. Tags: algebra, group-theory, ring-theory, unit-conjecture MSC: 16S34, 20F65 -/ + +@[expose] public section diff --git a/LeanPool/Polylean/Complexes.lean b/LeanPool/Polylean/Complexes.lean index d3cbc25b21..e46d72d9e5 100644 --- a/LeanPool/Polylean/Complexes.lean +++ b/LeanPool/Polylean/Complexes.lean @@ -3,15 +3,16 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.Complexes.Constructions.UniversalCover -import LeanPool.Polylean.Complexes.GraphPaths -import LeanPool.Polylean.Complexes.Structures.Category -import LeanPool.Polylean.Complexes.Structures.FreeGroupoid -import LeanPool.Polylean.Complexes.Structures.Groupoid -import LeanPool.Polylean.Complexes.Structures.Invertegory -import LeanPool.Polylean.Complexes.Structures.Quiver -import LeanPool.Polylean.Complexes.Structures.TwoComplex +public import LeanPool.Polylean.Complexes.Constructions.UniversalCover +public import LeanPool.Polylean.Complexes.GraphPaths +public import LeanPool.Polylean.Complexes.Structures.Category +public import LeanPool.Polylean.Complexes.Structures.FreeGroupoid +public import LeanPool.Polylean.Complexes.Structures.Groupoid +public import LeanPool.Polylean.Complexes.Structures.Invertegory +public import LeanPool.Polylean.Complexes.Structures.Quiver +public import LeanPool.Polylean.Complexes.Structures.TwoComplex /-! # Complexes @@ -19,3 +20,5 @@ import LeanPool.Polylean.Complexes.Structures.TwoComplex Import index for the Polylean complex and groupoid structures that are available without upstream `sorry`s. -/ + +@[expose] public section diff --git a/LeanPool/Polylean/Complexes/Constructions/UniversalCover.lean b/LeanPool/Polylean/Complexes/Constructions/UniversalCover.lean index 9330db3649..a7b733b1af 100644 --- a/LeanPool/Polylean/Complexes/Constructions/UniversalCover.lean +++ b/LeanPool/Polylean/Complexes/Constructions/UniversalCover.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.Complexes.Structures.FreeGroupoid +public import LeanPool.Polylean.Complexes.Structures.FreeGroupoid + + +@[expose] public section namespace LeanPool.Polylean diff --git a/LeanPool/Polylean/Complexes/GraphPaths.lean b/LeanPool/Polylean/Complexes/GraphPaths.lean index c138b3b568..d0d19038a8 100644 --- a/LeanPool/Polylean/Complexes/GraphPaths.lean +++ b/LeanPool/Polylean/Complexes/GraphPaths.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import Mathlib.Algebra.Group.Basic -import Mathlib.Algebra.Group.Defs +public import Mathlib.Algebra.Group.Defs +public import Aesop.BuiltinRules /-! # LeanPool.Polylean.Complexes.GraphPaths -/ +@[expose] public section + namespace LeanPool.Polylean /-- A graph with directed edges, distinguished null edge, and edge reversal. -/ diff --git a/LeanPool/Polylean/Complexes/Structures/Category.lean b/LeanPool/Polylean/Complexes/Structures/Category.lean index 79dadb2765..7149c4e29d 100644 --- a/LeanPool/Polylean/Complexes/Structures/Category.lean +++ b/LeanPool/Polylean/Complexes/Structures/Category.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.Complexes.Structures.Quiver +public import LeanPool.Polylean.Complexes.Structures.Quiver /-! # LeanPool.Polylean.Complexes.Structures.Category @@ -12,6 +13,8 @@ import LeanPool.Polylean.Complexes.Structures.Quiver Imported Lean Pool material for `LeanPool.Polylean.Complexes.Structures.Category`. -/ +@[expose] public section + namespace LeanPool.Polylean /-- The definition of a `CategoryStruct`, a barebones structure for a category containing none of the axioms (following `mathlib`). -/ diff --git a/LeanPool/Polylean/Complexes/Structures/FreeGroupoid.lean b/LeanPool/Polylean/Complexes/Structures/FreeGroupoid.lean index 9c0e80c43e..8ea84d68e2 100644 --- a/LeanPool/Polylean/Complexes/Structures/FreeGroupoid.lean +++ b/LeanPool/Polylean/Complexes/Structures/FreeGroupoid.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.Complexes.Structures.Groupoid +public import LeanPool.Polylean.Complexes.Structures.Groupoid + +@[expose] public section namespace LeanPool.Polylean diff --git a/LeanPool/Polylean/Complexes/Structures/Groupoid.lean b/LeanPool/Polylean/Complexes/Structures/Groupoid.lean index 299b956b49..870e4e2128 100644 --- a/LeanPool/Polylean/Complexes/Structures/Groupoid.lean +++ b/LeanPool/Polylean/Complexes/Structures/Groupoid.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.Complexes.Structures.Category +public import LeanPool.Polylean.Complexes.Structures.Category /-! # LeanPool.Polylean.Complexes.Structures.Groupoid @@ -12,6 +13,8 @@ import LeanPool.Polylean.Complexes.Structures.Category Imported Lean Pool material for `LeanPool.Polylean.Complexes.Structures.Groupoid`. -/ +@[expose] public section + namespace LeanPool.Polylean /-- A `Groupoid` is defined as a `Category` in which every morphism has an inverse satisfying certain conditions. -/ diff --git a/LeanPool/Polylean/Complexes/Structures/Invertegory.lean b/LeanPool/Polylean/Complexes/Structures/Invertegory.lean index ed7b179e00..583d36bd59 100644 --- a/LeanPool/Polylean/Complexes/Structures/Invertegory.lean +++ b/LeanPool/Polylean/Complexes/Structures/Invertegory.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.Complexes.Structures.Category +public import LeanPool.Polylean.Complexes.Structures.Category + +@[expose] public section namespace LeanPool.Polylean diff --git a/LeanPool/Polylean/Complexes/Structures/Quiver.lean b/LeanPool/Polylean/Complexes/Structures/Quiver.lean index b307c5680a..1755c55b98 100644 --- a/LeanPool/Polylean/Complexes/Structures/Quiver.lean +++ b/LeanPool/Polylean/Complexes/Structures/Quiver.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module + +@[expose] public section namespace LeanPool.Polylean diff --git a/LeanPool/Polylean/Complexes/Structures/TwoComplex.lean b/LeanPool/Polylean/Complexes/Structures/TwoComplex.lean index d6b9e37cd8..6b9f440695 100644 --- a/LeanPool/Polylean/Complexes/Structures/TwoComplex.lean +++ b/LeanPool/Polylean/Complexes/Structures/TwoComplex.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.Complexes.Structures.Groupoid +public import LeanPool.Polylean.Complexes.Structures.Groupoid + +@[expose] public section namespace LeanPool.Polylean diff --git a/LeanPool/Polylean/ConjInvLength.lean b/LeanPool/Polylean/ConjInvLength.lean index 4b65d89a66..9df02c8220 100644 --- a/LeanPool/Polylean/ConjInvLength.lean +++ b/LeanPool/Polylean/ConjInvLength.lean @@ -3,16 +3,19 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.ConjInvLength.Length -import LeanPool.Polylean.ConjInvLength.LengthBound -import LeanPool.Polylean.ConjInvLength.LengthNode -import LeanPool.Polylean.ConjInvLength.MemoLength -import LeanPool.Polylean.ConjInvLength.ProvedBound -import LeanPool.Polylean.ConjInvLength.WordTree +public import LeanPool.Polylean.ConjInvLength.Length +public import LeanPool.Polylean.ConjInvLength.LengthBound +public import LeanPool.Polylean.ConjInvLength.LengthNode +public import LeanPool.Polylean.ConjInvLength.MemoLength +public import LeanPool.Polylean.ConjInvLength.ProvedBound +public import LeanPool.Polylean.ConjInvLength.WordTree /-! # Conjugacy-Invariant Length Import index for the Polylean conjugacy-invariant length computations. -/ + +@[expose] public section diff --git a/LeanPool/Polylean/ConjInvLength/Length.lean b/LeanPool/Polylean/ConjInvLength/Length.lean index f501727835..b60a16bb58 100644 --- a/LeanPool/Polylean/ConjInvLength/Length.lean +++ b/LeanPool/Polylean/ConjInvLength/Length.lean @@ -3,14 +3,16 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import Std.Data.HashMap -import LeanPool.Polylean.ConjInvLength.LengthBound +public import LeanPool.Polylean.ConjInvLength.LengthBound /-! # LeanPool.Polylean.ConjInvLength.Length -/ +@[expose] public section + namespace LeanPool.Polylean open Letter diff --git a/LeanPool/Polylean/ConjInvLength/LengthBound.lean b/LeanPool/Polylean/ConjInvLength/LengthBound.lean index 00e8035404..35bcfde753 100644 --- a/LeanPool/Polylean/ConjInvLength/LengthBound.lean +++ b/LeanPool/Polylean/ConjInvLength/LengthBound.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import Mathlib.Algebra.Group.Defs +public import Mathlib.Tactic.Simps +public import Mathlib.Tactic.ToAdditive /-! # LeanPool.Polylean.ConjInvLength.LengthBound -/ +@[expose] public section + namespace LeanPool.Polylean /-- The four generators used for words in the conjugation-invariant length example. -/ inductive Letter where diff --git a/LeanPool/Polylean/ConjInvLength/LengthNode.lean b/LeanPool/Polylean/ConjInvLength/LengthNode.lean index 6bee6d8ce7..29d671a6cc 100644 --- a/LeanPool/Polylean/ConjInvLength/LengthNode.lean +++ b/LeanPool/Polylean/ConjInvLength/LengthNode.lean @@ -3,14 +3,16 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.ConjInvLength.Length -import Std.Data.HashMap +public import LeanPool.Polylean.ConjInvLength.Length /-! # Cached proof nodes for conjugacy-invariant length bounds -/ +@[expose] public section + namespace LeanPool.Polylean /-- A node recording which inequality or equality was used to derive a word-length bound. -/ @@ -71,7 +73,7 @@ initialize proofCache : IO.Ref (Std.HashMap Wrd ProofNode) ← IO.mkRef Std.HashMap.emptyWithCapacity /-- Look up a cached floating-point length bound. -/ -private def cacheLength? (w : Wrd) : IO (Option Float) := +def cachedLength (w : Wrd) : IO (Option Float) := do let cache ← floatNormCache.get match cache.get? w with @@ -80,7 +82,7 @@ private def cacheLength? (w : Wrd) : IO (Option Float) := /-- Compute a floating-point length bound while caching the proof nodes used. -/ def lengthNodes (w : Wrd) : IO Float := do - match ← cacheLength? w with + match ← cachedLength w with | some n => pure n | none => @@ -120,7 +122,7 @@ def powerLength : Wrd → Nat → IO Float | w, n => do let pl ← lengthNodes (w ^ n) let res := pl / n.toFloat - match ← cacheLength? w with + match ← cachedLength w with | none => floatNormCache.set <| (← floatNormCache.get).insert w res if n > 1 then @@ -137,7 +139,7 @@ def powerLength : Wrd → Nat → IO Float return l₀ /-- Recursively expand cached proof nodes with a bounded traversal fuel. -/ -private def resolveProofWithFuel : Nat → Wrd → IO ((List ProofNode) × (List Wrd)) +def resolveProofWithFuel : Nat → Wrd → IO ((List ProofNode) × (List Wrd)) | 0, w => return ([], [w]) | fuel + 1, w => do let cache ← proofCache.get @@ -154,7 +156,7 @@ def resolveProof (w : Wrd) : IO ((List ProofNode) × (List Wrd)) := do resolveProofWithFuel (cache.size + 1) w /-- Recompute a derived length with a bounded traversal fuel. -/ -private def derivedLengthWithFuel : Nat → Wrd → IO Float +def derivedLengthWithFuel : Nat → Wrd → IO Float | 0, w => throw <| IO.userError s!"proof cache recursion exhausted at {w}" | fuel + 1, w => do let cache ← proofCache.get @@ -174,7 +176,7 @@ def derivedLength (w : Wrd) : IO Float := do derivedLengthWithFuel (cache.size + 1) w /-- Recompute a derived length proof with a bounded traversal fuel. -/ -private def derivedProofWithFuel : Nat → Wrd → IO (Float × (List ProofNode)) +def derivedProofWithFuel : Nat → Wrd → IO (Float × (List ProofNode)) | 0, w => throw <| IO.userError s!"proof cache recursion exhausted at {w}" | fuel + 1, w => do let cache ← proofCache.get diff --git a/LeanPool/Polylean/ConjInvLength/MemoLength.lean b/LeanPool/Polylean/ConjInvLength/MemoLength.lean index ae033a0307..ef49b8af99 100644 --- a/LeanPool/Polylean/ConjInvLength/MemoLength.lean +++ b/LeanPool/Polylean/ConjInvLength/MemoLength.lean @@ -3,14 +3,16 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import Std.Data.HashMap -import LeanPool.Polylean.ConjInvLength.LengthBound +public import LeanPool.Polylean.ConjInvLength.LengthBound /-! # LeanPool.Polylean.ConjInvLength.MemoLength -/ +@[expose] public section + namespace LeanPool.Polylean /-- Cache for memoized word lengths. -/ diff --git a/LeanPool/Polylean/ConjInvLength/ProvedBound.lean b/LeanPool/Polylean/ConjInvLength/ProvedBound.lean index bbf70285cc..5b20372b03 100644 --- a/LeanPool/Polylean/ConjInvLength/ProvedBound.lean +++ b/LeanPool/Polylean/ConjInvLength/ProvedBound.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.ConjInvLength.LengthBound +public import LeanPool.Polylean.ConjInvLength.LengthBound +import Batteries.Logic /-! # LeanPool.Polylean.ConjInvLength.ProvedBound -/ +@[expose] public section + namespace LeanPool.Polylean open Letter diff --git a/LeanPool/Polylean/ConjInvLength/WordTree.lean b/LeanPool/Polylean/ConjInvLength/WordTree.lean index 5b3bf1afbe..b7e2e43ccd 100644 --- a/LeanPool/Polylean/ConjInvLength/WordTree.lean +++ b/LeanPool/Polylean/ConjInvLength/WordTree.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.ConjInvLength.ProvedBound +public import LeanPool.Polylean.ConjInvLength.ProvedBound /-! # LeanPool.Polylean.ConjInvLength.WordTree -/ +@[expose] public section + namespace LeanPool.Polylean /-- A proof tree witnessing an upper bound for a word length. -/ diff --git a/LeanPool/Polylean/Polymath.lean b/LeanPool/Polylean/Polymath.lean index 2c497a990f..ecceb79f45 100644 --- a/LeanPool/Polylean/Polymath.lean +++ b/LeanPool/Polylean/Polymath.lean @@ -3,17 +3,17 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.ConjInvLength.Length -import LeanPool.Polylean.ConjInvLength.LengthBound -import LeanPool.Polylean.ConjInvLength.LengthNode -import LeanPool.Polylean.ConjInvLength.MemoLength -import LeanPool.Polylean.ConjInvLength.ProvedBound +public import LeanPool.Polylean.ConjInvLength.LengthNode +public import Mathlib.Algebra.Group.Defs /-! # Demonstration executable for Polylean length computations -/ +@[expose] public section + namespace LeanPool.Polylean open Letter diff --git a/LeanPool/Polylean/UnitConjecture.lean b/LeanPool/Polylean/UnitConjecture.lean index 23db25562c..d0b8ff44fa 100644 --- a/LeanPool/Polylean/UnitConjecture.lean +++ b/LeanPool/Polylean/UnitConjecture.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ - -import LeanPool.Polylean.UnitConjecture.TorsionFree -import LeanPool.Polylean.UnitConjecture.GroupRing -import LeanPool.Polylean.UnitConjecture.GardamTheorem +module + +public import LeanPool.Polylean.UnitConjecture.TorsionFree +public import LeanPool.Polylean.UnitConjecture.GroupRing +public import LeanPool.Polylean.UnitConjecture.GardamTheorem +import LeanPool.Polylean.UnitConjecture.Tactics.AesopRuleSets +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # Polylean Unit Conjecture infrastructure @@ -62,3 +71,5 @@ checking equality on a basis for finitely generated abelian groups. can be defined by giving functions on a basis, and show that we have decidable equality for homomorphisms on finitely generated free abelian groups. -/ + +@[expose] public section diff --git a/LeanPool/Polylean/UnitConjecture/AddFreeGroup.lean b/LeanPool/Polylean/UnitConjecture/AddFreeGroup.lean index 2cb266b9b6..6229578664 100644 --- a/LeanPool/Polylean/UnitConjecture/AddFreeGroup.lean +++ b/LeanPool/Polylean/UnitConjecture/AddFreeGroup.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import Mathlib.Algebra.Group.Prod -import Mathlib.Data.Int.Cast.Lemmas -import Mathlib.Algebra.Ring.Basic -import LeanPool.Polylean.UnitConjecture.EnumDecide +public import Mathlib.Algebra.Group.Prod +public import Mathlib.Data.Int.Cast.Lemmas +public import LeanPool.Polylean.UnitConjecture.EnumDecide /-! @@ -26,6 +26,8 @@ homomorphisms on finitely generated free groups. - `prodFree` - a proof that the product of free groups is free. -/ +@[expose] public section + namespace LeanPool.Polylean diff --git a/LeanPool/Polylean/UnitConjecture/Cocycle.lean b/LeanPool/Polylean/UnitConjecture/Cocycle.lean index f04938025e..39bcfad017 100644 --- a/LeanPool/Polylean/UnitConjecture/Cocycle.lean +++ b/LeanPool/Polylean/UnitConjecture/Cocycle.lean @@ -3,20 +3,19 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith -import Mathlib.Algebra.Group.Action.Defs -import Mathlib.Algebra.Group.Hom.Defs +public import Mathlib.Algebra.Group.Hom.Defs +public import Mathlib.Algebra.Group.Basic +public import Mathlib.Tactic.Attr.Core import LeanPool.Polylean.UnitConjecture.Tactics.AesopRuleSets +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! ## Cocycles and Group actions by automorphisms @@ -31,6 +30,8 @@ Metabelian construction. argument and the action as a field of the structure. -/ +@[expose] public section + namespace LeanPool.Polylean diff --git a/LeanPool/Polylean/UnitConjecture/EnumDecide.lean b/LeanPool/Polylean/UnitConjecture/EnumDecide.lean index beccaec44e..b140a89e25 100644 --- a/LeanPool/Polylean/UnitConjecture/EnumDecide.lean +++ b/LeanPool/Polylean/UnitConjecture/EnumDecide.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module + +@[expose] public section namespace LeanPool.Polylean diff --git a/LeanPool/Polylean/UnitConjecture/FreeModule.lean b/LeanPool/Polylean/UnitConjecture/FreeModule.lean index 4735a510fc..ef1f37e0c3 100644 --- a/LeanPool/Polylean/UnitConjecture/FreeModule.lean +++ b/LeanPool/Polylean/UnitConjecture/FreeModule.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import Mathlib.Algebra.Ring.Basic -import Mathlib.Algebra.Group.Defs +public import Mathlib.Algebra.Group.Basic +public import Mathlib.Algebra.Ring.Defs +public import Mathlib.Data.Quot +public import Mathlib.Tactic.ToDual +import Mathlib.Logic.Equiv.Defs /-! # Free modules @@ -25,6 +29,8 @@ We also give an alternative description via moves, which is more convenient for properties. -/ +@[expose] public section + namespace LeanPool.Polylean @@ -197,6 +203,56 @@ theorem eq_mem_of_equalOnList (l : List X) (f g : X → R) (x : X) (mhyp : x ∈ simp_all +/-! ### Combining coefficients -/ + +namespace FormalSum + +/-- Add a monomial, combining its coefficient with the first matching basis term. -/ +def addMonomial (term : R × X) : FormalSum R X → FormalSum R X + | [] => if term.1 = 0 then [] else [term] + | head :: tail => + if head.2 = term.2 then + if head.1 + term.1 = 0 then tail else (head.1 + term.1, head.2) :: tail + else head :: addMonomial term tail + +/-- Combining a monomial preserves its contribution to every coordinate. -/ +theorem coords_addMonomial (term : R × X) (sum : FormalSum R X) (x : X) : + (addMonomial term sum).coords x = monomCoeff R X x term + sum.coords x := by + induction sum with + | nil => + by_cases hzero : term.1 = 0 + · cases h : term.2 == x <;> simp [addMonomial, hzero, coords, monomCoeff, h] + · simp [addMonomial, hzero, coords] + | cons head tail ih => + by_cases hsame : head.2 = term.2 + · simp only [addMonomial, hsame, ite_true] + by_cases hzero : head.1 + term.1 = 0 + · rw [ite_eq_left hzero] + by_cases hx : term.2 = x + · simp only [coords, monomCoeff, hsame, hx, beq_self_eq_true] + rw [← add_assoc, add_comm term.1 head.1, hzero, zero_add] + · simp [coords, monomCoeff, hsame, beq_false_of_ne hx] + · rw [ite_eq_right hzero] + by_cases hx : term.2 = x + · simp only [coords, monomCoeff, hsame, hx, beq_self_eq_true] + rw [add_comm head.1 term.1, add_assoc] + · simp [coords, monomCoeff, hsame, beq_false_of_ne hx] + · simp [addMonomial, hsame, coords, ih, add_left_comm] + +/-- Combine repeated basis terms and discard terms whose coefficients cancel. -/ +def combineCoefficients : FormalSum R X → FormalSum R X + | [] => [] + | term :: tail => addMonomial term (combineCoefficients tail) + +/-- Combining coefficients preserves every coordinate of a formal sum. -/ +theorem coords_combineCoefficients (sum : FormalSum R X) (x : X) : + sum.combineCoefficients.coords x = sum.coords x := by + induction sum with + | nil => rfl + | cons term tail ih => simp [combineCoefficients, coords_addMonomial, ih, coords] + +end FormalSum + /-! ## Quotient Free Module @@ -259,6 +315,15 @@ We also show that the coordinate functions are defined on the quotient. -/ namespace FreeModule +/-- Equal combined formal sums represent equal free-module elements. -/ +theorem quotient_eq_of_combineCoefficients_eq (left right : FormalSum R X) + (h : left.combineCoefficients = right.combineCoefficients) : + (⟦left⟧ : FreeModule R X) = ⟦right⟧ := by + apply Quotient.sound + funext x + rw [← FormalSum.coords_combineCoefficients left x, + ← FormalSum.coords_combineCoefficients right x, h] + /-- Equality on both supports gives equal quotients. -/ theorem eqlquot_of_equalOnList (s₁ s₂ : FormalSum R X) (ch₁ : equalOnList s₁.support s₁.coords s₂.coords) diff --git a/LeanPool/Polylean/UnitConjecture/GardamGroup.lean b/LeanPool/Polylean/UnitConjecture/GardamGroup.lean index a5ecd8cc1f..50b9ac2ab6 100644 --- a/LeanPool/Polylean/UnitConjecture/GardamGroup.lean +++ b/LeanPool/Polylean/UnitConjecture/GardamGroup.lean @@ -3,24 +3,19 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ - -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring +module + +public import Mathlib.Algebra.Group.Fin.Basic +public import LeanPool.Polylean.UnitConjecture.MetabelianGroup +public import LeanPool.Polylean.UnitConjecture.AddFreeGroup +import LeanPool.Polylean.UnitConjecture.Tactics.AesopRuleSets +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith -import Mathlib.Algebra.Group.Prod -import Mathlib.Algebra.Group.Fin.Basic -import Mathlib.Algebra.Group.Hom.Basic -import Mathlib.Data.Int.Basic -import Mathlib.Data.Fin.Basic -import LeanPool.Polylean.UnitConjecture.MetabelianGroup -import LeanPool.Polylean.UnitConjecture.AddFreeGroup /-! ## The construction of the group `P` @@ -31,6 +26,8 @@ This is done via the cocycle construction, using the explicit action and cocycle Section 3.1 of Giles Gardam's paper (https: //arxiv.org/abs/2102.11818). -/ +@[expose] public section + namespace LeanPool.Polylean diff --git a/LeanPool/Polylean/UnitConjecture/GardamTheorem.lean b/LeanPool/Polylean/UnitConjecture/GardamTheorem.lean index 4ad74e378d..d81aba7835 100644 --- a/LeanPool/Polylean/UnitConjecture/GardamTheorem.lean +++ b/LeanPool/Polylean/UnitConjecture/GardamTheorem.lean @@ -3,11 +3,19 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ - -import Mathlib.Algebra.Field.Basic -import Mathlib.Data.ZMod.Defs -import LeanPool.Polylean.UnitConjecture.TorsionFree -import LeanPool.Polylean.UnitConjecture.GroupRing +module + +public import Mathlib.Data.ZMod.Defs +public import LeanPool.Polylean.UnitConjecture.TorsionFree +public import LeanPool.Polylean.UnitConjecture.GroupRing +import LeanPool.Polylean.UnitConjecture.Tactics.AesopRuleSets +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! @@ -18,6 +26,8 @@ result of `TorsionFree` -- that `P` is torsion-free, this completes the formal proof of Gardam's theorem that Kaplansky's Unit Conjecture is false. -/ +@[expose] public section + namespace LeanPool.Polylean @@ -79,11 +89,11 @@ namespace Gardam open P /-- Embed a group element as the corresponding basis element of `𝔽₂[P]`. -/ -private abbrev groupRingOf (g : P) : 𝔽₂[P] := +abbrev groupRingOf (g : P) : 𝔽₂[P] := ⟦[(1, g)]⟧ /-- The group-ring multiplication, made explicit to avoid the monomial `HMul R G` notation. -/ -private abbrev ringMul (u v : 𝔽₂[P]) : 𝔽₂[P] := +abbrev ringMul (u v : 𝔽₂[P]) : 𝔽₂[P] := GroupRing.mul u v /-- The `p` component of Gardam's non-trivial unit `α`. -/ @@ -146,14 +156,17 @@ theorem α_nonTrivial : ¬ (trivialNonZeroElem α) := by result is `(1 : 𝔽₂[P])`. The computational aspects of the group ring implementation and the Metabelian construction - are used here. -/ + are used here. Coefficients are combined before comparison so that checking equality + does not repeatedly scan the full uncollected product. -/ /-- The product of Gardam's unit and its inverse is one. -/ theorem α_mul_α' : ringMul α α' = (1 : 𝔽₂[P]) := by + apply FreeModule.quotient_eq_of_combineCoefficients_eq decide +kernel /-- The product of Gardam's inverse and its unit is one. -/ theorem α'_mul_α : ringMul α' α = (1 : 𝔽₂[P]) := by + apply FreeModule.quotient_eq_of_combineCoefficients_eq decide +kernel /-- A proof of the existence of a non-trivial unit in `𝔽₂[P]`. -/ diff --git a/LeanPool/Polylean/UnitConjecture/GroupRing.lean b/LeanPool/Polylean/UnitConjecture/GroupRing.lean index 3c84da19da..4ce33baeb1 100644 --- a/LeanPool/Polylean/UnitConjecture/GroupRing.lean +++ b/LeanPool/Polylean/UnitConjecture/GroupRing.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.UnitConjecture.FreeModule -import Mathlib.Algebra.Field.Basic +public import LeanPool.Polylean.UnitConjecture.FreeModule +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Algebra.Ring.Hom.Defs +public import Mathlib.Tactic.Attr.Core +import Mathlib.Tactic.Push /-! # Group Rings @@ -19,6 +23,8 @@ to show invariance under elementary moves and to prove that `R[G]` is a ring. -/ +@[expose] public section + namespace LeanPool.Polylean diff --git a/LeanPool/Polylean/UnitConjecture/MetabelianGroup.lean b/LeanPool/Polylean/UnitConjecture/MetabelianGroup.lean index 6b776ac8f9..6260836d40 100644 --- a/LeanPool/Polylean/UnitConjecture/MetabelianGroup.lean +++ b/LeanPool/Polylean/UnitConjecture/MetabelianGroup.lean @@ -3,21 +3,17 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith -import Mathlib.Algebra.Group.Hom.Basic -import Mathlib.Algebra.Group.Submonoid.Operations -import LeanPool.Polylean.UnitConjecture.Cocycle +public import LeanPool.Polylean.UnitConjecture.Cocycle import LeanPool.Polylean.UnitConjecture.Tactics.AesopRuleSets +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! @@ -34,6 +30,8 @@ We define the cocycle condition and construct a group structure on a structure e The main step is to show that the cocyle condition implies associativity. -/ +@[expose] public section + namespace LeanPool.Polylean diff --git a/LeanPool/Polylean/UnitConjecture/Tactics.lean b/LeanPool/Polylean/UnitConjecture/Tactics.lean index 30691c2092..a17e2488b3 100644 --- a/LeanPool/Polylean/UnitConjecture/Tactics.lean +++ b/LeanPool/Polylean/UnitConjecture/Tactics.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import LeanPool.Polylean.UnitConjecture.Tactics.AesopRuleSets -import LeanPool.Polylean.UnitConjecture.Tactics.ReduceGoal +public meta import Aesop.Frontend.Extension + +public import LeanPool.Polylean.UnitConjecture.Tactics.AesopRuleSets +public import LeanPool.Polylean.UnitConjecture.Tactics.ReduceGoal /-! # Unit Conjecture tactics Import-only index for the local Aesop rule sets used by the Unit Conjecture formalization. -/ + +@[expose] public section diff --git a/LeanPool/Polylean/UnitConjecture/Tactics/AesopRuleSets.lean b/LeanPool/Polylean/UnitConjecture/Tactics/AesopRuleSets.lean index 05e482b9b9..8873cb968c 100644 --- a/LeanPool/Polylean/UnitConjecture/Tactics/AesopRuleSets.lean +++ b/LeanPool/Polylean/UnitConjecture/Tactics/AesopRuleSets.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import Aesop +import Aesop.Frontend.Command /-! # LeanPool.Polylean.UnitConjecture.Tactics.AesopRuleSets @@ -12,6 +13,8 @@ import Aesop Imported Lean Pool material for `LeanPool.Polylean.UnitConjecture.Tactics.AesopRuleSets`. -/ +@[expose] public section + namespace LeanPool.Polylean declare_aesop_rule_sets [AutAction] diff --git a/LeanPool/Polylean/UnitConjecture/Tactics/ReduceGoal.lean b/LeanPool/Polylean/UnitConjecture/Tactics/ReduceGoal.lean index 98d7c431b9..7e7b8cea45 100644 --- a/LeanPool/Polylean/UnitConjecture/Tactics/ReduceGoal.lean +++ b/LeanPool/Polylean/UnitConjecture/Tactics/ReduceGoal.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ +module -import Lean +public meta import Lean.Elab.Tactic.Basic +public meta import Lean.Meta.Reduce + +public meta section open Lean Meta Elab Tactic Term diff --git a/LeanPool/Polylean/UnitConjecture/TorsionFree.lean b/LeanPool/Polylean/UnitConjecture/TorsionFree.lean index fac167e406..465f574751 100644 --- a/LeanPool/Polylean/UnitConjecture/TorsionFree.lean +++ b/LeanPool/Polylean/UnitConjecture/TorsionFree.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Siddhartha Gadgil, Anand Rao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Siddhartha Gadgil, Anand Rao -/ - -import LeanPool.Polylean.UnitConjecture.GardamGroup +module + +public import LeanPool.Polylean.UnitConjecture.GardamGroup +import LeanPool.Polylean.UnitConjecture.Tactics.AesopRuleSets +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! ## Torsion-freeness of `P` @@ -25,6 +34,8 @@ Roughly, the steps are as follows (further details can be found in the correspon 5. Together, these statements show that `P` is torsion-free. -/ +@[expose] public section + namespace LeanPool.Polylean open scoped P diff --git a/LeanPool/PolynomialMethodRestrictedSums.lean b/LeanPool/PolynomialMethodRestrictedSums.lean index 60b24f688c..dd3f5f35e6 100644 --- a/LeanPool/PolynomialMethodRestrictedSums.lean +++ b/LeanPool/PolynomialMethodRestrictedSums.lean @@ -3,13 +3,20 @@ Copyright (c) 2026 Nick Adfor. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nick Adfor -/ +module -import LeanPool.PolynomialMethodRestrictedSums.ANRPolynomialMethod -import LeanPool.PolynomialMethodRestrictedSums.CauchyDavenportTheorem -import LeanPool.PolynomialMethodRestrictedSums.CompressedSizesRestrictedSum -import LeanPool.PolynomialMethodRestrictedSums.DiasDaSilvaHamidoune -import LeanPool.PolynomialMethodRestrictedSums.RestrictedSumDistinctSizes -import LeanPool.PolynomialMethodRestrictedSums.VandermondeCoefficientFormula +public import LeanPool.PolynomialMethodRestrictedSums.ANRPolynomialMethod +public import LeanPool.PolynomialMethodRestrictedSums.CauchyDavenportTheorem +public import LeanPool.PolynomialMethodRestrictedSums.CompressedSizesRestrictedSum +public import LeanPool.PolynomialMethodRestrictedSums.DiasDaSilvaHamidoune +public import LeanPool.PolynomialMethodRestrictedSums.RestrictedSumDistinctSizes +public import LeanPool.PolynomialMethodRestrictedSums.VandermondeCoefficientFormula +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Choose.Multinomial +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The polynomial method and restricted sums of congruence classes @@ -22,6 +29,8 @@ Tags: combinatorics, polynomial-method, alon-tarsi, restricted-sums, congruence- MSC: 11B30, 11B75, 11P70 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/PolynomialMethodRestrictedSums/ANRPolynomialMethod.lean b/LeanPool/PolynomialMethodRestrictedSums/ANRPolynomialMethod.lean index 2bc84145d7..fc61729765 100644 --- a/LeanPool/PolynomialMethodRestrictedSums/ANRPolynomialMethod.lean +++ b/LeanPool/PolynomialMethodRestrictedSums/ANRPolynomialMethod.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Nick Adfor. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nick Adfor -/ +module -import Mathlib.Algebra.Field.ZMod -import Mathlib.Algebra.MvPolynomial.Degrees +public import Mathlib.Algebra.Field.ZMod +public import Mathlib.Algebra.MvPolynomial.Degrees import Mathlib.Algebra.MvPolynomial.NoZeroDivisors import Mathlib.Combinatorics.Nullstellensatz import Mathlib.Data.Finsupp.Notation @@ -19,6 +20,8 @@ theorem `ANR_polynomial_method` giving a non-vanishing-coefficient criterion for lower-bounding restricted sumsets. -/ +@[expose] public section + open scoped Finset variable {R : Type*} [CommRing R] diff --git a/LeanPool/PolynomialMethodRestrictedSums/CauchyDavenportTheorem.lean b/LeanPool/PolynomialMethodRestrictedSums/CauchyDavenportTheorem.lean index 62dc09e8a5..8e8ff9c42c 100644 --- a/LeanPool/PolynomialMethodRestrictedSums/CauchyDavenportTheorem.lean +++ b/LeanPool/PolynomialMethodRestrictedSums/CauchyDavenportTheorem.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Nick Adfor. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nick Adfor -/ +module -import Mathlib.Algebra.Field.ZMod -import Lean.Meta.Tactic.NormCast +public import Mathlib.Algebra.Field.ZMod +meta import Lean.Meta.Tactic.NormCast import LeanPool.PolynomialMethodRestrictedSums.ANRPolynomialMethod import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.Order.Ring.Star @@ -26,6 +27,8 @@ Derives the Cauchy-Davenport theorem `cauchy_davenport` on sumsets in `ZMod p` from the Alon-Nathanson-Ruzsa polynomial method. -/ +@[expose] public section + open Finsupp open scoped Finset open MvPolynomial diff --git a/LeanPool/PolynomialMethodRestrictedSums/CompressedSizesRestrictedSum.lean b/LeanPool/PolynomialMethodRestrictedSums/CompressedSizesRestrictedSum.lean index c744d7458c..b32ddae6c4 100644 --- a/LeanPool/PolynomialMethodRestrictedSums/CompressedSizesRestrictedSum.lean +++ b/LeanPool/PolynomialMethodRestrictedSums/CompressedSizesRestrictedSum.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Nick Adfor. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nick Adfor -/ +module -import LeanPool.PolynomialMethodRestrictedSums.RestrictedSumDistinctSizes +public import LeanPool.PolynomialMethodRestrictedSums.RestrictedSumDistinctSizes import Mathlib.Algebra.Order.Field.Basic import Mathlib.Data.Nat.Choose.Multinomial import Mathlib.Tactic.Positivity.Finset @@ -20,6 +21,8 @@ The main theorem of this file was originally proved by Aristotle (Lean v4.24.0, project request uuid 08cb15be-5c46-4619-9dbf-e523d453b544). -/ +@[expose] public section + open MvPolynomial open Finset diff --git a/LeanPool/PolynomialMethodRestrictedSums/DiasDaSilvaHamidoune.lean b/LeanPool/PolynomialMethodRestrictedSums/DiasDaSilvaHamidoune.lean index 1f99efa3bb..c41836cdf7 100644 --- a/LeanPool/PolynomialMethodRestrictedSums/DiasDaSilvaHamidoune.lean +++ b/LeanPool/PolynomialMethodRestrictedSums/DiasDaSilvaHamidoune.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Nick Adfor. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nick Adfor -/ +module -import Mathlib.Algebra.Field.ZMod +public import Mathlib.Algebra.Field.ZMod import LeanPool.PolynomialMethodRestrictedSums.CompressedSizesRestrictedSum import Mathlib.Algebra.Order.Field.Basic import Mathlib.Data.Nat.Choose.Multinomial @@ -21,6 +22,8 @@ The main theorem of this file was originally proved by Aristotle (Lean v4.24.0, project request uuid 7257b62c-6371-4fa8-a5b5-ea19029f0f1f). -/ +@[expose] public section + open MvPolynomial open Finset @@ -114,13 +117,9 @@ theorem dias_da_silva_hamidoune (A : Finset (ZMod p)) (s : ℕ) induction i using Fin.induction with | zero => unfold compressedSizes; aesop | succ i ih => - unfold compressedSizes - simp_all only [Order.add_one_le_iff, Fin.val_castSucc, Fin.val_succ] - split - next i_1 heq => simp_all only [Fin.zero_eta, Fin.succ_ne_zero] - next i_1 i_2 hi heq => - simp_all only [Nat.succ_eq_add_one] - rcases i with ⟨ _ | i, hi ⟩ <;> simp_all +decide [ Nat.sub_sub ] + rw [compressedSizes_succ, ih] + simp only [Fin.val_castSucc, Fin.val_succ] + omega -- Apply Theorem 3.2 with the given parameters. have h_apply_theorem : (restrictedSumSet k (fun _ => A)).card ≥ min p ((∑ i : Fin (k + 1), diff --git a/LeanPool/PolynomialMethodRestrictedSums/RestrictedSumDistinctSizes.lean b/LeanPool/PolynomialMethodRestrictedSums/RestrictedSumDistinctSizes.lean index 471c3cbdac..d192b68729 100644 --- a/LeanPool/PolynomialMethodRestrictedSums/RestrictedSumDistinctSizes.lean +++ b/LeanPool/PolynomialMethodRestrictedSums/RestrictedSumDistinctSizes.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Nick Adfor. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nick Adfor -/ +module -import LeanPool.PolynomialMethodRestrictedSums.VandermondeCoefficientFormula -import Mathlib.Algebra.Field.ZMod -import Mathlib.Algebra.MvPolynomial.Degrees +public import LeanPool.PolynomialMethodRestrictedSums.VandermondeCoefficientFormula +public import Mathlib.Algebra.Field.ZMod +public import Mathlib.Algebra.MvPolynomial.Degrees import LeanPool.PolynomialMethodRestrictedSums.ANRPolynomialMethod import Mathlib.Algebra.MvPolynomial.NoZeroDivisors import Mathlib.Algebra.Order.Field.Basic @@ -23,6 +24,8 @@ set of sums `a 0 + ... + a k` with `a i ∈ A i` pairwise distinct, when the sets `A i` have distinct sizes. -/ +@[expose] public section + open MvPolynomial open AddMonoidAlgebra (coeff) diff --git a/LeanPool/PolynomialMethodRestrictedSums/VandermondeCoefficientFormula.lean b/LeanPool/PolynomialMethodRestrictedSums/VandermondeCoefficientFormula.lean index fa4df3b42d..40fb1286b7 100644 --- a/LeanPool/PolynomialMethodRestrictedSums/VandermondeCoefficientFormula.lean +++ b/LeanPool/PolynomialMethodRestrictedSums/VandermondeCoefficientFormula.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Nick Adfor. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nick Adfor -/ +module -import Mathlib.Algebra.MvPolynomial.Basic -import Mathlib.LinearAlgebra.Matrix.Determinant.Basic +public import Mathlib.Algebra.MvPolynomial.Basic +public import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.Algebra.Order.Field.Basic import Mathlib.Data.Nat.Cast.Field import Mathlib.Data.Nat.Choose.Multinomial @@ -21,6 +22,8 @@ Lemma 3.1 of Alon-Nathanson-Ruzsa: a closed form for the coefficient of culminating in `Vandermonde_coefficient_formula`. -/ +@[expose] public section + open MvPolynomial open AddMonoidAlgebra (coeff) open Finset diff --git a/LeanPool/Polytopes.lean b/LeanPool/Polytopes.lean index 952dde4da0..6a94a56a0d 100644 --- a/LeanPool/Polytopes.lean +++ b/LeanPool/Polytopes.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Jun Kwon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jun Kwon -/ +module -import LeanPool.Polytopes.MainTheorem +public import LeanPool.Polytopes.MainTheorem /-! # The main theorem of polytopes @@ -17,6 +18,8 @@ Tags: convex-geometry, discrete-geometry, polytopes MSC: 52B11, 52A20 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/Polytopes/Cutspace.lean b/LeanPool/Polytopes/Cutspace.lean index d99238c64b..30ad86653b 100644 --- a/LeanPool/Polytopes/Cutspace.lean +++ b/LeanPool/Polytopes/Cutspace.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Jun Kwon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jun Kwon -/ +module -import LeanPool.Polytopes.Polar +public import LeanPool.Polytopes.Polar +import LeanPool.Polytopes.Pre /-! Cut spaces obtained by intersecting collections of halfspaces. -/ +@[expose] public section + open Module variable {E : Type} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] diff --git a/LeanPool/Polytopes/Halfspace.lean b/LeanPool/Polytopes/Halfspace.lean index bd34e0230a..00270cd29a 100644 --- a/LeanPool/Polytopes/Halfspace.lean +++ b/LeanPool/Polytopes/Halfspace.lean @@ -3,16 +3,20 @@ Copyright (c) 2026 Jun Kwon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jun Kwon -/ +module -import Mathlib.Analysis.Convex.Independent +public import Mathlib.Analysis.InnerProductSpace.Subspace +public import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Analysis.InnerProductSpace.Dual +import Mathlib.Analysis.Normed.Affine.AddTorsorBases import Mathlib.Analysis.Normed.Module.HahnBanach -import LeanPool.Polytopes.Pre /-! Halfspaces in inner product spaces and their basic geometric operations. -/ +@[expose] public section + open Pointwise diff --git a/LeanPool/Polytopes/MainTheorem.lean b/LeanPool/Polytopes/MainTheorem.lean index 2795745f34..4ae0d830a8 100644 --- a/LeanPool/Polytopes/MainTheorem.lean +++ b/LeanPool/Polytopes/MainTheorem.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Jun Kwon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jun Kwon -/ +module -import LeanPool.Polytopes.Polytope +public import LeanPool.Polytopes.Polytope +public import LeanPool.Polytopes.Polar +public import Mathlib.Analysis.Convex.Extreme +import LeanPool.Polytopes.Cutspace +import Mathlib.Analysis.Convex.Intrinsic +import Mathlib.Analysis.Convex.KreinMilman /-! Let 𝑋 be a closed convex subset of ℝ^𝑑. Then: @@ -14,6 +20,8 @@ Let 𝑋 be a closed convex subset of ℝ^𝑑. Then: Theorem : Every 𝑉-polytope is an 𝐻-polytope, and every compact 𝐻-polytope is a 𝑉-polytope. -/ +@[expose] public section + variable {E : Type} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] open Pointwise diff --git a/LeanPool/Polytopes/Polar.lean b/LeanPool/Polytopes/Polar.lean index 9523678bc0..d320a1e057 100644 --- a/LeanPool/Polytopes/Polar.lean +++ b/LeanPool/Polytopes/Polar.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Jun Kwon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jun Kwon -/ +module -import LeanPool.Polytopes.Halfspace -import Mathlib.Analysis.Convex.KreinMilman +public import LeanPool.Polytopes.Halfspace +public import Mathlib.Analysis.InnerProductSpace.Dual +import Mathlib.Analysis.LocallyConvex.Separation /-! Polar duals and their compactness properties. -/ +@[expose] public section + variable {E : Type} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] /-- The unit dual functional in the direction of a nonzero vector `p`. -/ diff --git a/LeanPool/Polytopes/Polytope.lean b/LeanPool/Polytopes/Polytope.lean index 781441dd50..cf7489e141 100644 --- a/LeanPool/Polytopes/Polytope.lean +++ b/LeanPool/Polytopes/Polytope.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Jun Kwon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jun Kwon -/ +module +public import LeanPool.Polytopes.Halfspace +public import LeanPool.Polytopes.Pre import LeanPool.Polytopes.Cutspace /-! Definitions and basic properties of V-polytopes and H-polytopes. -/ +@[expose] public section + variable {E : Type} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] open Pointwise Module diff --git a/LeanPool/Polytopes/Pre.lean b/LeanPool/Polytopes/Pre.lean index 6cd5499735..1bba341e6e 100644 --- a/LeanPool/Polytopes/Pre.lean +++ b/LeanPool/Polytopes/Pre.lean @@ -3,16 +3,20 @@ Copyright (c) 2026 Jun Kwon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jun Kwon -/ +module -import Mathlib.Analysis.Convex.Intrinsic -import Mathlib.Analysis.InnerProductSpace.Orthogonal -import Mathlib.Data.Vector.Basic -import Mathlib.LinearAlgebra.Basis.Submodule +public import Mathlib.Analysis.InnerProductSpace.Orthogonal +public import Mathlib.Analysis.Normed.Affine.Isometry +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Preliminary lemmas and definitions used by the Polytopes formalization. -/ +@[expose] public section + open Pointwise Module /-- Lifts a set whose elements satisfy `property` to the corresponding subtype. -/ diff --git a/LeanPool/PumpingCfg.lean b/LeanPool/PumpingCfg.lean index 8c5833e3e7..4293de80bc 100644 --- a/LeanPool/PumpingCfg.lean +++ b/LeanPool/PumpingCfg.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Alexander Loitzl, Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Loitzl, Martin Dvorak -/ -import LeanPool.PumpingCfg.Pumping +module + +public import LeanPool.PumpingCfg.Pumping +import Mathlib.Tactic.Bound.Init /-! # Pumping Lemma for Context-Free Grammars @@ -16,6 +19,8 @@ Tags: formal-languages, context-free-grammars, computability, pumping-lemma MSC: 68Q45 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/PumpingCfg/ChomskyNormalForm/Basic.lean b/LeanPool/PumpingCfg/ChomskyNormalForm/Basic.lean index 21b8d520b6..c44191f2d4 100644 --- a/LeanPool/PumpingCfg/ChomskyNormalForm/Basic.lean +++ b/LeanPool/PumpingCfg/ChomskyNormalForm/Basic.lean @@ -3,8 +3,9 @@ Copyright (c) 2024 Alexander Loitzl, Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Loitzl, Martin Dvorak -/ -import Mathlib.Computability.ContextFreeGrammar -import LeanPool.PumpingCfg.ChomskyNormalForm.ContextFreeGrammarExtras +module + +public import Mathlib.Computability.ContextFreeGrammar /-! # Chomsky Normal Form Grammars @@ -21,6 +22,8 @@ pair of nonterminals. * `Language.toCFG_correct`: `g.toCFG` generates the same language a a context-free grammar `g`. -/ +@[expose] public section + universe uT uN /-- Rule that rewrites a single nonterminal to a single terminal or a pair of nonterminals. -/ diff --git a/LeanPool/PumpingCfg/ChomskyNormalForm/ContextFreeGrammarExtras.lean b/LeanPool/PumpingCfg/ChomskyNormalForm/ContextFreeGrammarExtras.lean index 75c869e47f..190e4f6a85 100644 --- a/LeanPool/PumpingCfg/ChomskyNormalForm/ContextFreeGrammarExtras.lean +++ b/LeanPool/PumpingCfg/ChomskyNormalForm/ContextFreeGrammarExtras.lean @@ -3,7 +3,9 @@ Copyright (c) 2024 Alexander Loitzl, Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Loitzl, Martin Dvorak -/ -import Mathlib.Computability.ContextFreeGrammar +module + +public import Mathlib.Computability.ContextFreeGrammar /-! # Extra lemmas about context-free grammars @@ -15,6 +17,8 @@ Mathlib release pinned here: the step-counting derivation relation lemmas, plus a few facts about `ContextFreeGrammar.Produces`. -/ +@[expose] public section + universe uT variable {T : Type uT} diff --git a/LeanPool/PumpingCfg/ChomskyNormalForm/EmptyElimination.lean b/LeanPool/PumpingCfg/ChomskyNormalForm/EmptyElimination.lean index 6249f3bcc5..f673d423eb 100644 --- a/LeanPool/PumpingCfg/ChomskyNormalForm/EmptyElimination.lean +++ b/LeanPool/PumpingCfg/ChomskyNormalForm/EmptyElimination.lean @@ -3,8 +3,9 @@ Copyright (c) 2024 Alexander Loitzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Loitzl -/ -import Mathlib.Computability.ContextFreeGrammar -import LeanPool.PumpingCfg.ChomskyNormalForm.ContextFreeGrammarExtras +module + +public import LeanPool.PumpingCfg.ChomskyNormalForm.ContextFreeGrammarExtras /-! # Empty Elimination @@ -28,6 +29,8 @@ original up to omission of the empty word. [Hopcroft et al. 2006] -/ +@[expose] public section + namespace ContextFreeRule universe uT uN diff --git a/LeanPool/PumpingCfg/ChomskyNormalForm/LengthRestriction.lean b/LeanPool/PumpingCfg/ChomskyNormalForm/LengthRestriction.lean index a394d83827..19059f27a8 100644 --- a/LeanPool/PumpingCfg/ChomskyNormalForm/LengthRestriction.lean +++ b/LeanPool/PumpingCfg/ChomskyNormalForm/LengthRestriction.lean @@ -3,8 +3,10 @@ Copyright (c) 2024 Alexander Loitzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Loitzl -/ -import Mathlib.Computability.ContextFreeGrammar -import LeanPool.PumpingCfg.ChomskyNormalForm.Basic +module + +public import LeanPool.PumpingCfg.ChomskyNormalForm.Basic +import LeanPool.PumpingCfg.ChomskyNormalForm.ContextFreeGrammarExtras /-! # Length Restriction @@ -28,6 +30,8 @@ the original [Hopcroft et al. 2006] -/ +@[expose] public section + universe uN uT variable {T : Type uT} diff --git a/LeanPool/PumpingCfg/ChomskyNormalForm/TerminalRestriction.lean b/LeanPool/PumpingCfg/ChomskyNormalForm/TerminalRestriction.lean index d8e4f7c7fb..bc8f5f1045 100644 --- a/LeanPool/PumpingCfg/ChomskyNormalForm/TerminalRestriction.lean +++ b/LeanPool/PumpingCfg/ChomskyNormalForm/TerminalRestriction.lean @@ -3,8 +3,9 @@ Copyright (c) 2024 Alexander Loitzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Loitzl -/ -import Mathlib.Computability.ContextFreeGrammar -import LeanPool.PumpingCfg.ChomskyNormalForm.UnitElimination +module + +public import LeanPool.PumpingCfg.ChomskyNormalForm.UnitElimination /-! # Terminal Restriction @@ -26,6 +27,8 @@ the original [Hopcroft et al. 2006] -/ +@[expose] public section + universe uN variable {T : Type} diff --git a/LeanPool/PumpingCfg/ChomskyNormalForm/Translation.lean b/LeanPool/PumpingCfg/ChomskyNormalForm/Translation.lean index c2a82a406d..e0f0f32345 100644 --- a/LeanPool/PumpingCfg/ChomskyNormalForm/Translation.lean +++ b/LeanPool/PumpingCfg/ChomskyNormalForm/Translation.lean @@ -3,12 +3,10 @@ Copyright (c) 2024 Alexander Loitzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Loitzl -/ -import Mathlib.Computability.ContextFreeGrammar -import LeanPool.PumpingCfg.ChomskyNormalForm.Basic -import LeanPool.PumpingCfg.ChomskyNormalForm.EmptyElimination -import LeanPool.PumpingCfg.ChomskyNormalForm.UnitElimination -import LeanPool.PumpingCfg.ChomskyNormalForm.TerminalRestriction -import LeanPool.PumpingCfg.ChomskyNormalForm.LengthRestriction +module + +public import LeanPool.PumpingCfg.ChomskyNormalForm.TerminalRestriction +public import LeanPool.PumpingCfg.ChomskyNormalForm.LengthRestriction /-! # Chomsky Normal Form Translation @@ -35,6 +33,8 @@ original language (except for the empty string) [Hopcroft et al. 2006] -/ +@[expose] public section + universe uN variable {T : Type} diff --git a/LeanPool/PumpingCfg/ChomskyNormalForm/UnitElimination.lean b/LeanPool/PumpingCfg/ChomskyNormalForm/UnitElimination.lean index 29ffa40985..1dd8db5f6a 100644 --- a/LeanPool/PumpingCfg/ChomskyNormalForm/UnitElimination.lean +++ b/LeanPool/PumpingCfg/ChomskyNormalForm/UnitElimination.lean @@ -3,9 +3,10 @@ Copyright (c) 2024 Alexander Loitzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Loitzl -/ -import Mathlib.Computability.ContextFreeGrammar -import Mathlib.Data.Finset.Prod -import LeanPool.PumpingCfg.ChomskyNormalForm.EmptyElimination +module + +public import Mathlib.Data.Finset.Prod +public import LeanPool.PumpingCfg.ChomskyNormalForm.EmptyElimination /-! # Unit Elimination @@ -30,6 +31,8 @@ the original. [Hopcroft et al. 2006] -/ +@[expose] public section + universe uN uT namespace ContextFreeGrammar diff --git a/LeanPool/PumpingCfg/ParseTree.lean b/LeanPool/PumpingCfg/ParseTree.lean index c069a7b667..101fb5ff12 100644 --- a/LeanPool/PumpingCfg/ParseTree.lean +++ b/LeanPool/PumpingCfg/ParseTree.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Alexander Loitzl, Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Loitzl, Martin Dvorak -/ +module -import LeanPool.PumpingCfg.ChomskyNormalForm.Basic +public import LeanPool.PumpingCfg.ChomskyNormalForm.Basic import LeanPool.PumpingCfg.ToMathlib /-! @@ -14,6 +15,8 @@ Defines `ChomskyNormalFormGrammar.parseTree`, binary parse trees for grammars in normal form, together with their yield and the subtree relation used by the pumping argument. -/ +@[expose] public section + universe uN uT variable {T : Type uT} diff --git a/LeanPool/PumpingCfg/Pumping.lean b/LeanPool/PumpingCfg/Pumping.lean index 6ff80cfbac..0ada62813a 100644 --- a/LeanPool/PumpingCfg/Pumping.lean +++ b/LeanPool/PumpingCfg/Pumping.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Alexander Loitzl, Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Loitzl, Martin Dvorak -/ +module +public import LeanPool.PumpingCfg.Utils +public import LeanPool.PumpingCfg.ParseTree import LeanPool.PumpingCfg.ChomskyNormalForm.Translation -import LeanPool.PumpingCfg.Utils -import LeanPool.PumpingCfg.ParseTree -import Mathlib.Data.Set.Card +import Mathlib.Algebra.Order.Ring.Nat +import Mathlib.Data.Nat.SuccPred /-! # Pumping Lemma for Context-Free Grammars @@ -23,6 +25,8 @@ This file contains the proof of the pumping lemma for context-free grammars [Hopcroft et al. 2006] -/ +@[expose] public section + theorem pidgeonhole {α β : Type*} {A : Finset α} {B : Finset β} {f : A → B} (hf : f.Injective) : A.card ≤ B.card := by if emptiness : A = ∅ then diff --git a/LeanPool/PumpingCfg/ToMathlib.lean b/LeanPool/PumpingCfg/ToMathlib.lean index 1b6d12f14e..e7115e3816 100644 --- a/LeanPool/PumpingCfg/ToMathlib.lean +++ b/LeanPool/PumpingCfg/ToMathlib.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Alexander Loitzl, Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Loitzl, Martin Dvorak -/ -import LeanPool.PumpingCfg.ChomskyNormalForm.Basic +module + +public import LeanPool.PumpingCfg.ChomskyNormalForm.Basic /-! # Auxiliary grammar lemmas @@ -12,6 +14,8 @@ Small facts about `ChomskyNormalFormRule.Rewrites` and `ChomskyNormalFormGrammar intended for upstreaming into Mathlib alongside the Chomsky-normal-form development. -/ +@[expose] public section + universe uT uN variable {T : Type uT} diff --git a/LeanPool/PumpingCfg/Utils.lean b/LeanPool/PumpingCfg/Utils.lean index e5c679af6a..e89f1c1f91 100644 --- a/LeanPool/PumpingCfg/Utils.lean +++ b/LeanPool/PumpingCfg/Utils.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Alexander Loitzl, Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Loitzl, Martin Dvorak -/ -import Mathlib.Data.List.Basic +module + +public import Mathlib.Data.Nat.Notation +import Mathlib.Tactic.Attr.Core /-! # List repetition utilities @@ -12,6 +15,8 @@ Defines `nTimes` (notation `l ^+^ n`), the `n`-fold repetition of a list, together with basic rewriting lemmas about it. -/ +@[expose] public section + variable {α : Type _} /-- `nTimes l n` (notation `l ^+^ n`) is the concatenation of `n` copies of the list `l`. -/ diff --git a/LeanPool/PythagoreanPolynomialParametrization.lean b/LeanPool/PythagoreanPolynomialParametrization.lean index 9f94027168..96ab9beadc 100644 --- a/LeanPool/PythagoreanPolynomialParametrization.lean +++ b/LeanPool/PythagoreanPolynomialParametrization.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Lazar Milikic. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lazar Milikic -/ +module -import LeanPool.PythagoreanPolynomialParametrization.Main +public import LeanPool.PythagoreanPolynomialParametrization.IntegerValued + +public import LeanPool.PythagoreanPolynomialParametrization.Main +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Polynomial parametrizations of Pythagorean triples @@ -16,3 +26,5 @@ Main declarations: `LeanPool.PythagoreanPolynomialParametrization.exists_int_val Tags: number-theory, pythagorean-triples, integer-valued-polynomials MSC: 11D09, 11D85, 13F20 -/ + +@[expose] public section diff --git a/LeanPool/PythagoreanPolynomialParametrization/Basic.lean b/LeanPool/PythagoreanPolynomialParametrization/Basic.lean index a1994efd3b..17031601f4 100644 --- a/LeanPool/PythagoreanPolynomialParametrization/Basic.lean +++ b/LeanPool/PythagoreanPolynomialParametrization/Basic.lean @@ -3,21 +3,16 @@ Copyright (c) 2026 Lazar Milikic. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lazar Milikic -/ - -import Mathlib.Algebra.MvPolynomial.Funext -import Mathlib.Algebra.MvPolynomial.Monad -import Mathlib.NumberTheory.PythagoreanTriples -import Mathlib.NumberTheory.SumFourSquares -import Mathlib.RingTheory.Binomial -import Mathlib.RingTheory.MvPolynomial.Basic -import Mathlib.Algebra.MvPolynomial.NoZeroDivisors -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum +module + +public import Mathlib.Algebra.MvPolynomial.Eval +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD import Mathlib.Tactic.NormNum.Prime -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity.Finset /-! # Basic definitions for Pythagorean polynomial parametrizations @@ -25,6 +20,8 @@ This file contains the shared definitions used by the Frisch--Vaserstein formalization setup. -/ +@[expose] public section + namespace LeanPool.PythagoreanPolynomialParametrization open MvPolynomial diff --git a/LeanPool/PythagoreanPolynomialParametrization/Explanatory.lean b/LeanPool/PythagoreanPolynomialParametrization/Explanatory.lean index d049ffef69..e590cee141 100644 --- a/LeanPool/PythagoreanPolynomialParametrization/Explanatory.lean +++ b/LeanPool/PythagoreanPolynomialParametrization/Explanatory.lean @@ -3,8 +3,22 @@ Copyright (c) 2026 Lazar Milikic. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lazar Milikic -/ +module -import LeanPool.PythagoreanPolynomialParametrization.Basic +public import LeanPool.PythagoreanPolynomialParametrization.Basic +public import Mathlib.RingTheory.UniqueFactorizationDomain.Defs +import Mathlib.Algebra.EuclideanDomain.Basic +import Mathlib.Algebra.EuclideanDomain.Int +import Mathlib.Algebra.MvPolynomial.Monad +import Mathlib.Algebra.MvPolynomial.NoZeroDivisors +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Prime.Int +import Mathlib.Data.Nat.Totient +import Mathlib.RingTheory.Binomial +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Explanatory and cited source statements @@ -12,6 +26,8 @@ This file records source-level material from Frisch--Vaserstein that is not used the main parametrization proof. -/ +@[expose] public section + namespace LeanPool.PythagoreanPolynomialParametrization open MvPolynomial diff --git a/LeanPool/PythagoreanPolynomialParametrization/IntegerValued.lean b/LeanPool/PythagoreanPolynomialParametrization/IntegerValued.lean index 25152bcc63..e8ed9b9250 100644 --- a/LeanPool/PythagoreanPolynomialParametrization/IntegerValued.lean +++ b/LeanPool/PythagoreanPolynomialParametrization/IntegerValued.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Lazar Milikic. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lazar Milikic -/ +module +public import LeanPool.PythagoreanPolynomialParametrization.Basic import LeanPool.PythagoreanPolynomialParametrization.SourceLemmas +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Integer-valued parametrization of all Pythagorean triples @@ -12,6 +21,8 @@ This file contains the explicit four-variable integer-valued polynomial triple f Frisch and Vaserstein's main theorem. -/ +@[expose] public section + namespace LeanPool.PythagoreanPolynomialParametrization open MvPolynomial diff --git a/LeanPool/PythagoreanPolynomialParametrization/Main.lean b/LeanPool/PythagoreanPolynomialParametrization/Main.lean index c3b01abfeb..822141bc84 100644 --- a/LeanPool/PythagoreanPolynomialParametrization/Main.lean +++ b/LeanPool/PythagoreanPolynomialParametrization/Main.lean @@ -3,13 +3,22 @@ Copyright (c) 2026 Lazar Milikic. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lazar Milikic -/ - -import LeanPool.PythagoreanPolynomialParametrization.Basic -import LeanPool.PythagoreanPolynomialParametrization.SourceLemmas -import LeanPool.PythagoreanPolynomialParametrization.Obstructions -import LeanPool.PythagoreanPolynomialParametrization.IntegerValued -import LeanPool.PythagoreanPolynomialParametrization.Positive -import LeanPool.PythagoreanPolynomialParametrization.Explanatory +module + +public import LeanPool.PythagoreanPolynomialParametrization.Basic +public import LeanPool.PythagoreanPolynomialParametrization.SourceLemmas +public import LeanPool.PythagoreanPolynomialParametrization.Obstructions +public import LeanPool.PythagoreanPolynomialParametrization.IntegerValued +public import LeanPool.PythagoreanPolynomialParametrization.Positive +public import LeanPool.PythagoreanPolynomialParametrization.Explanatory + +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Parametrization of Pythagorean Triples by Polynomials @@ -34,6 +43,8 @@ from the main parametrization proofs. finite-cover theorem, and the integer-valued factorization discussion. -/ +@[expose] public section + namespace LeanPool.PythagoreanPolynomialParametrization diff --git a/LeanPool/PythagoreanPolynomialParametrization/Obstructions.lean b/LeanPool/PythagoreanPolynomialParametrization/Obstructions.lean index 2ccfc2d25b..3c06b20731 100644 --- a/LeanPool/PythagoreanPolynomialParametrization/Obstructions.lean +++ b/LeanPool/PythagoreanPolynomialParametrization/Obstructions.lean @@ -3,8 +3,20 @@ Copyright (c) 2026 Lazar Milikic. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lazar Milikic -/ +module -import LeanPool.PythagoreanPolynomialParametrization.Basic +public import LeanPool.PythagoreanPolynomialParametrization.Basic +import Mathlib.Algebra.MvPolynomial.Funext +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Prime.Int +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.RingTheory.MvPolynomial.Basic +import Mathlib.RingTheory.Polynomial.Basic +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Integer-coefficient obstruction @@ -12,6 +24,8 @@ This file contains the paper's impossibility result for a single triple of integer-coefficient polynomials. -/ +@[expose] public section + namespace LeanPool.PythagoreanPolynomialParametrization private lemma intPolyParametrizes_hits {n : ℕ} {f g h : IntPoly n} {x y z : ℤ} diff --git a/LeanPool/PythagoreanPolynomialParametrization/Positive.lean b/LeanPool/PythagoreanPolynomialParametrization/Positive.lean index e52bcd9975..903b193599 100644 --- a/LeanPool/PythagoreanPolynomialParametrization/Positive.lean +++ b/LeanPool/PythagoreanPolynomialParametrization/Positive.lean @@ -3,8 +3,18 @@ Copyright (c) 2026 Lazar Milikic. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lazar Milikic -/ - -import LeanPool.PythagoreanPolynomialParametrization.IntegerValued +module + +public import LeanPool.PythagoreanPolynomialParametrization.IntegerValued +import LeanPool.PythagoreanPolynomialParametrization.SourceLemmas +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.NormNum.Prime +import Mathlib.Tactic.Positivity.Finset /-! # Positive Pythagorean triples and 16-parameter variant @@ -12,6 +22,8 @@ This file contains the positive-triple remark and the unrestricted 16-parameter substitution obtained from the four-square theorem. -/ +@[expose] public section + namespace LeanPool.PythagoreanPolynomialParametrization open MvPolynomial diff --git a/LeanPool/PythagoreanPolynomialParametrization/SourceLemmas.lean b/LeanPool/PythagoreanPolynomialParametrization/SourceLemmas.lean index 7906c384d5..072e4d0b4e 100644 --- a/LeanPool/PythagoreanPolynomialParametrization/SourceLemmas.lean +++ b/LeanPool/PythagoreanPolynomialParametrization/SourceLemmas.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Lazar Milikic. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lazar Milikic -/ +module -import LeanPool.PythagoreanPolynomialParametrization.Basic +public import LeanPool.PythagoreanPolynomialParametrization.Basic +import Mathlib.NumberTheory.PythagoreanTriples +import Mathlib.NumberTheory.SumFourSquares +import Mathlib.Tactic.NormNum.Prime /-! # Source-level handoff lemmas @@ -13,6 +17,8 @@ kept separate from the explicit polynomial witnesses so each proof obligation ha small, source-located target. -/ +@[expose] public section + namespace LeanPool.PythagoreanPolynomialParametrization diff --git a/LeanPool/QuadraticIterates.lean b/LeanPool/QuadraticIterates.lean index a328f587d2..ef3a044455 100644 --- a/LeanPool/QuadraticIterates.lean +++ b/LeanPool/QuadraticIterates.lean @@ -3,29 +3,33 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ +module -import LeanPool.QuadraticIterates.ArchMath1992 -import LeanPool.QuadraticIterates.ArchMath1992.DegreeCriterion -import LeanPool.QuadraticIterates.ArchMath1992.Irreducibility -import LeanPool.QuadraticIterates.ArchMath1992.Iterates -import LeanPool.QuadraticIterates.ArchMath1992.Main -import LeanPool.QuadraticIterates.ArchMath1992.Sequences -import LeanPool.QuadraticIterates.Mathlib.Algebra.BigOperators -import LeanPool.QuadraticIterates.Mathlib.Algebra.Polynomial.Eval -import LeanPool.QuadraticIterates.Mathlib.Algebra.Polynomial.EvenComp -import LeanPool.QuadraticIterates.Mathlib.Algebra.Polynomial.Roots -import LeanPool.QuadraticIterates.Mathlib.Algebra.Squares -import LeanPool.QuadraticIterates.Mathlib.Data.Int.DvdSequence -import LeanPool.QuadraticIterates.Mathlib.Data.Multiset -import LeanPool.QuadraticIterates.Mathlib.Data.Nat -import LeanPool.QuadraticIterates.Mathlib.Data.ZMod -import LeanPool.QuadraticIterates.Mathlib.FieldTheory.Multiquadratic -import LeanPool.QuadraticIterates.Mathlib.GroupTheory.Card -import LeanPool.QuadraticIterates.Mathlib.GroupTheory.PGroup -import LeanPool.QuadraticIterates.Mathlib.GroupTheory.RegularWreathProduct -import LeanPool.QuadraticIterates.Mathlib.NumberTheory.Moebius -import LeanPool.QuadraticIterates.Mathlib.RingTheory.MoebiusFactor -import LeanPool.QuadraticIterates.Mathlib.RingTheory.UniqueFactorizationDomain +public import LeanPool.QuadraticIterates.ArchMath1992 +public import LeanPool.QuadraticIterates.ArchMath1992.DegreeCriterion +public import LeanPool.QuadraticIterates.ArchMath1992.Irreducibility +public import LeanPool.QuadraticIterates.ArchMath1992.Iterates +public import LeanPool.QuadraticIterates.ArchMath1992.Main +public import LeanPool.QuadraticIterates.ArchMath1992.Sequences +public import LeanPool.QuadraticIterates.Mathlib.Algebra.BigOperators +public import LeanPool.QuadraticIterates.Mathlib.Algebra.Polynomial.Eval +public import LeanPool.QuadraticIterates.Mathlib.Algebra.Polynomial.EvenComp +public import LeanPool.QuadraticIterates.Mathlib.Algebra.Polynomial.Roots +public import LeanPool.QuadraticIterates.Mathlib.Algebra.Squares +public import LeanPool.QuadraticIterates.Mathlib.Data.Int.DvdSequence +public import LeanPool.QuadraticIterates.Mathlib.Data.Multiset +public import LeanPool.QuadraticIterates.Mathlib.Data.Nat +public import LeanPool.QuadraticIterates.Mathlib.Data.ZMod +public import LeanPool.QuadraticIterates.Mathlib.FieldTheory.Multiquadratic +public import LeanPool.QuadraticIterates.Mathlib.GroupTheory.Card +public import LeanPool.QuadraticIterates.Mathlib.GroupTheory.PGroup +public import LeanPool.QuadraticIterates.Mathlib.GroupTheory.RegularWreathProduct +public import LeanPool.QuadraticIterates.Mathlib.NumberTheory.Moebius +public import LeanPool.QuadraticIterates.Mathlib.RingTheory.MoebiusFactor +public import LeanPool.QuadraticIterates.Mathlib.RingTheory.UniqueFactorizationDomain +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Algebra.Order.Field.Power +import Mathlib.RingTheory.Radical.NatInt /-! # Galois groups of quadratic polynomial iterates @@ -37,3 +41,5 @@ Main declarations: `QuadraticIterates.section3_main` Tags: arithmetic-dynamics, galois-theory, iterated-polynomials MSC: 11R32, 12F10, 37P05 -/ + +@[expose] public section diff --git a/LeanPool/QuadraticIterates/ArchMath1992.lean b/LeanPool/QuadraticIterates/ArchMath1992.lean index fad9d69ff2..2de22895ea 100644 --- a/LeanPool/QuadraticIterates/ArchMath1992.lean +++ b/LeanPool/QuadraticIterates/ArchMath1992.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import LeanPool.QuadraticIterates.ArchMath1992.DegreeCriterion -import LeanPool.QuadraticIterates.ArchMath1992.Irreducibility -import LeanPool.QuadraticIterates.ArchMath1992.Iterates -import LeanPool.QuadraticIterates.ArchMath1992.Main -import LeanPool.QuadraticIterates.ArchMath1992.Sequences +module + +public import LeanPool.QuadraticIterates.ArchMath1992.DegreeCriterion +public import LeanPool.QuadraticIterates.ArchMath1992.Irreducibility +public import LeanPool.QuadraticIterates.ArchMath1992.Iterates +public import LeanPool.QuadraticIterates.ArchMath1992.Main +public import LeanPool.QuadraticIterates.ArchMath1992.Sequences +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Algebra.Order.Field.Power +import Mathlib.RingTheory.Radical.NatInt /-! # Galois groups over ℚ of some iterated polynomials @@ -68,3 +73,5 @@ All declarations live in the `QuadraticIterates` namespace. The development is s over `ℤ`), `Iterates` (the polynomials `f_n`, the fields `K_n`, the groups `Ω_n`, the sequences `c` and `b`), `Irreducibility`, `DegreeCriterion` and `Main`. -/ + +@[expose] public section diff --git a/LeanPool/QuadraticIterates/ArchMath1992/DegreeCriterion.lean b/LeanPool/QuadraticIterates/ArchMath1992/DegreeCriterion.lean index 8348fa8e3d..6de138b37d 100644 --- a/LeanPool/QuadraticIterates/ArchMath1992/DegreeCriterion.lean +++ b/LeanPool/QuadraticIterates/ArchMath1992/DegreeCriterion.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import Mathlib.Data.FunLike.Fintype +module + +public import LeanPool.QuadraticIterates.ArchMath1992.Iterates import LeanPool.QuadraticIterates.ArchMath1992.Irreducibility +import LeanPool.QuadraticIterates.Mathlib.Algebra.Polynomial.Eval import LeanPool.QuadraticIterates.Mathlib.Algebra.Polynomial.Roots import LeanPool.QuadraticIterates.Mathlib.GroupTheory.RegularWreathProduct +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Data.FunLike.Fintype +import Mathlib.RingTheory.Radical.NatInt /-! # The relative degree `[K_{n+1} : K_n]` @@ -22,6 +28,8 @@ Part of the formalization of M. Stoll, *Galois groups over ℚ of some iterated Arch. Math. **59** (1992), 239-244; see `QuadraticIterates.ArchMath1992`. -/ +@[expose] public section + open Polynomial namespace QuadraticIterates diff --git a/LeanPool/QuadraticIterates/ArchMath1992/Irreducibility.lean b/LeanPool/QuadraticIterates/ArchMath1992/Irreducibility.lean index 1904f6cd5f..dedf88617b 100644 --- a/LeanPool/QuadraticIterates/ArchMath1992/Irreducibility.lean +++ b/LeanPool/QuadraticIterates/ArchMath1992/Irreducibility.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import LeanPool.QuadraticIterates.ArchMath1992.Iterates +module + +public import LeanPool.QuadraticIterates.ArchMath1992.Iterates import LeanPool.QuadraticIterates.Mathlib.Algebra.Polynomial.Eval +import LeanPool.QuadraticIterates.Mathlib.Algebra.Polynomial.EvenComp import LeanPool.QuadraticIterates.Mathlib.Data.Multiset +import LeanPool.QuadraticIterates.Mathlib.RingTheory.UniqueFactorizationDomain +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Data.Int.Star +import Mathlib.Data.Rat.Star +import Mathlib.RingTheory.Radical.NatInt /-! # Irreducibility of the iterates over `ℚ` @@ -20,6 +29,8 @@ Part of the formalization of M. Stoll, *Galois groups over ℚ of some iterated Arch. Math. **59** (1992), 239-244; see `QuadraticIterates.ArchMath1992`. -/ +@[expose] public section + open Polynomial namespace QuadraticIterates diff --git a/LeanPool/QuadraticIterates/ArchMath1992/Iterates.lean b/LeanPool/QuadraticIterates/ArchMath1992/Iterates.lean index cae3009031..5002b611b5 100644 --- a/LeanPool/QuadraticIterates/ArchMath1992/Iterates.lean +++ b/LeanPool/QuadraticIterates/ArchMath1992/Iterates.lean @@ -3,16 +3,24 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import Mathlib.Algebra.Algebra.Rat -import Mathlib.Algebra.CharP.IntermediateField -import Mathlib.FieldTheory.PolynomialGaloisGroup -import Mathlib.GroupTheory.RegularWreathProduct -import Mathlib.RingTheory.SimpleRing.Principal - -import LeanPool.QuadraticIterates.ArchMath1992.Sequences +module + +public import Mathlib.Algebra.Algebra.Rat +public import Mathlib.Algebra.CharP.IntermediateField +public import Mathlib.FieldTheory.PolynomialGaloisGroup +public import Mathlib.GroupTheory.RegularWreathProduct +public import Mathlib.RingTheory.SimpleRing.Principal + +public import LeanPool.QuadraticIterates.ArchMath1992.Sequences +public import LeanPool.QuadraticIterates.Mathlib.FieldTheory.Multiquadratic +public import Mathlib.Order.CompletePartialOrder +import LeanPool.QuadraticIterates.Mathlib.Algebra.BigOperators import LeanPool.QuadraticIterates.Mathlib.Data.Nat -import LeanPool.QuadraticIterates.Mathlib.FieldTheory.Multiquadratic import LeanPool.QuadraticIterates.Mathlib.GroupTheory.Card +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Data.Int.Star +import Mathlib.RingTheory.Radical.NatInt /-! # The iterates of `X² + a`, their splitting fields and Galois groups @@ -32,6 +40,8 @@ Arch. Math. **59** (1992), 239-244; see `QuadraticIterates.ArchMath1992`. `fℚ[a, n]` is scoped notation for the iterate `f_n` viewed in `ℚ[X]`. -/ +@[expose] public section + open Polynomial namespace QuadraticIterates diff --git a/LeanPool/QuadraticIterates/ArchMath1992/Main.lean b/LeanPool/QuadraticIterates/ArchMath1992/Main.lean index b4b7b79e32..748b4d779c 100644 --- a/LeanPool/QuadraticIterates/ArchMath1992/Main.lean +++ b/LeanPool/QuadraticIterates/ArchMath1992/Main.lean @@ -3,10 +3,23 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import Mathlib.Algebra.Order.Field.Power -import Mathlib.LinearAlgebra.Dimension.OrzechProperty +module + + +public import LeanPool.QuadraticIterates.ArchMath1992.Iterates import LeanPool.QuadraticIterates.ArchMath1992.DegreeCriterion +import LeanPool.QuadraticIterates.ArchMath1992.Irreducibility +import LeanPool.QuadraticIterates.Mathlib.Algebra.Squares +import LeanPool.QuadraticIterates.Mathlib.GroupTheory.Card +import LeanPool.QuadraticIterates.Mathlib.NumberTheory.Moebius +import Mathlib.Algebra.Order.BigOperators.Ring.Finset +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Data.Rat.Star +import Mathlib.LinearAlgebra.Dimension.OrzechProperty +import Mathlib.RingTheory.Radical.NatInt /-! # The main theorems @@ -21,6 +34,8 @@ Part of the formalization of M. Stoll, *Galois groups over ℚ of some iterated Arch. Math. **59** (1992), 239-244; see `QuadraticIterates.ArchMath1992`. -/ +@[expose] public section + open Polynomial open scoped ArithmeticFunction.Moebius diff --git a/LeanPool/QuadraticIterates/ArchMath1992/Sequences.lean b/LeanPool/QuadraticIterates/ArchMath1992/Sequences.lean index 8e8d3e472e..f602fbd4a3 100644 --- a/LeanPool/QuadraticIterates/ArchMath1992/Sequences.lean +++ b/LeanPool/QuadraticIterates/ArchMath1992/Sequences.lean @@ -3,12 +3,26 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ +module + +public import LeanPool.QuadraticIterates.Mathlib.RingTheory.MoebiusFactor +public import Mathlib.Algebra.GCDMonoid.Nat +public import Mathlib.Algebra.Polynomial.Expand import LeanPool.QuadraticIterates.Mathlib.Algebra.Polynomial.EvenComp import LeanPool.QuadraticIterates.Mathlib.Algebra.Squares import LeanPool.QuadraticIterates.Mathlib.Data.Int.DvdSequence import LeanPool.QuadraticIterates.Mathlib.Data.ZMod -import LeanPool.QuadraticIterates.Mathlib.RingTheory.MoebiusFactor +import LeanPool.QuadraticIterates.Mathlib.NumberTheory.Moebius import LeanPool.QuadraticIterates.Mathlib.RingTheory.UniqueFactorizationDomain +import Mathlib.Data.Int.Star +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Rat.Floor +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.RingTheory.Ideal.Quotient.Defs +import Mathlib.RingTheory.Radical.NatInt +import Mathlib.Tactic.LinearCombination +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # The iteration sequence of a polynomial and its Möbius factors @@ -24,6 +38,8 @@ Part of the formalization of M. Stoll, *Galois groups over ℚ of some iterated Arch. Math. **59** (1992), 239-244; see `QuadraticIterates.ArchMath1992`. -/ +@[expose] public section + open Polynomial open scoped ArithmeticFunction.Moebius diff --git a/LeanPool/QuadraticIterates/Mathlib/Algebra/BigOperators.lean b/LeanPool/QuadraticIterates/Mathlib/Algebra/BigOperators.lean index 4479a461e0..879adac85d 100644 --- a/LeanPool/QuadraticIterates/Mathlib/Algebra/BigOperators.lean +++ b/LeanPool/QuadraticIterates/Mathlib/Algebra/BigOperators.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ +module + +public import Mathlib.Algebra.Field.ZMod import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.Algebra.Field.ZMod /-! # Big-operator lemmas @@ -13,6 +15,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + /-- Factor a constant out of an indicator-weighted sum: `∑ g x · [p x]·c = c · ∑_{p x} g x`. -/ theorem Finset.sum_mul_ite_const {ι R : Type*} [CommSemiring R] (s : Finset ι) (p : ι → Prop) [DecidablePred p] (g : ι → R) (c : R) : diff --git a/LeanPool/QuadraticIterates/Mathlib/Algebra/Polynomial/Eval.lean b/LeanPool/QuadraticIterates/Mathlib/Algebra/Polynomial/Eval.lean index c106b0b8be..acbdba474b 100644 --- a/LeanPool/QuadraticIterates/Mathlib/Algebra/Polynomial/Eval.lean +++ b/LeanPool/QuadraticIterates/Mathlib/Algebra/Polynomial/Eval.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import Mathlib.Algebra.Polynomial.AlgebraMap +module + +public import Mathlib.Algebra.Polynomial.AlgebraMap /-! # Polynomial evaluation lemmas @@ -12,6 +14,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + /-- A ring homomorphism intertwines iterated evaluation of `p` with iterated evaluation of the mapped polynomial. -/ lemma Polynomial.map_iterate_eval {R S : Type*} [CommRing R] [CommRing S] (f : R →+* S) diff --git a/LeanPool/QuadraticIterates/Mathlib/Algebra/Polynomial/EvenComp.lean b/LeanPool/QuadraticIterates/Mathlib/Algebra/Polynomial/EvenComp.lean index 9c71fdb03b..30414ccf99 100644 --- a/LeanPool/QuadraticIterates/Mathlib/Algebra/Polynomial/EvenComp.lean +++ b/LeanPool/QuadraticIterates/Mathlib/Algebra/Polynomial/EvenComp.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import Mathlib.Algebra.GCDMonoid.Basic +module + +public import Mathlib.Algebra.GCDMonoid.Basic +public import Mathlib.Algebra.Polynomial.Expand import Mathlib.Algebra.Order.Ring.Star -import Mathlib.Algebra.Polynomial.Expand import Mathlib.Tactic.LinearCombination /-! @@ -18,6 +20,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + open Polynomial /-- `X² + c` is fixed by `X ↦ -X`. -/ diff --git a/LeanPool/QuadraticIterates/Mathlib/Algebra/Polynomial/Roots.lean b/LeanPool/QuadraticIterates/Mathlib/Algebra/Polynomial/Roots.lean index 8c26dc3e7c..a1d589b2df 100644 --- a/LeanPool/QuadraticIterates/Mathlib/Algebra/Polynomial/Roots.lean +++ b/LeanPool/QuadraticIterates/Mathlib/Algebra/Polynomial/Roots.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import Mathlib.Algebra.Polynomial.Roots +module + +public import Mathlib.Algebra.Polynomial.Roots /-! # Root-set lemmas @@ -12,6 +14,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + /-- For a polynomial without repeated roots in `E`, a product over the (coerced) `rootSet` equals the corresponding multiset product over `aroots`. -/ lemma Polynomial.prod_rootSet_eq_prod_aroots {K E M : Type*} [Field K] [Field E] [Algebra K E] diff --git a/LeanPool/QuadraticIterates/Mathlib/Algebra/Squares.lean b/LeanPool/QuadraticIterates/Mathlib/Algebra/Squares.lean index 90ef654187..5651b04db4 100644 --- a/LeanPool/QuadraticIterates/Mathlib/Algebra/Squares.lean +++ b/LeanPool/QuadraticIterates/Mathlib/Algebra/Squares.lean @@ -3,6 +3,11 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ +module + +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.ZMod.Defs +public import Mathlib.RingTheory.Coprime.Basic import Mathlib.Algebra.Order.Ring.Star import Mathlib.Data.Int.Star import Mathlib.Data.Rat.Star @@ -18,6 +23,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + /-- If `P ≡ -Q mod m` with `Q` a unit mod `m` and `P/Q` a rational square, then `-1` is a square mod `m`. -/ theorem ZMod.isSquare_neg_one_of_isSquare_div {P Q : ℤ} {m : ℕ} (hQne : Q ≠ 0) diff --git a/LeanPool/QuadraticIterates/Mathlib/Data/Int/DvdSequence.lean b/LeanPool/QuadraticIterates/Mathlib/Data/Int/DvdSequence.lean index 7afc2fa08b..f4f843b577 100644 --- a/LeanPool/QuadraticIterates/Mathlib/Data/Int/DvdSequence.lean +++ b/LeanPool/QuadraticIterates/Mathlib/Data/Int/DvdSequence.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ +module + +public import Mathlib.Algebra.GCDMonoid.Basic import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Tactic.LinearCombination @@ -20,6 +23,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + variable {R : Type*} [CommRing R] [IsDomain R] [NormalizedGCDMonoid R] private theorem gcd_seq_add {a : ℕ → R} (hdvd : ∀ m j, a m ∣ a (m + j) - a j) (m n : ℕ) : diff --git a/LeanPool/QuadraticIterates/Mathlib/Data/Multiset.lean b/LeanPool/QuadraticIterates/Mathlib/Data/Multiset.lean index 6c97b3691b..2f826933ec 100644 --- a/LeanPool/QuadraticIterates/Mathlib/Data/Multiset.lean +++ b/LeanPool/QuadraticIterates/Mathlib/Data/Multiset.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ +module + +public import Mathlib.Data.Multiset.MapFold import Mathlib.Data.Multiset.Basic -import Mathlib.Data.Multiset.MapFold /-! # Splitting a multiset along a fixed-point-free involution @@ -15,6 +17,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + /-- A multiset `M` invariant under an involution `τ` that is fixed-point-free on its support splits as `N + N.map τ`. -/ theorem Multiset.exists_add_map_of_involutive {β : Type*} (τ : β → β) (M : Multiset β) diff --git a/LeanPool/QuadraticIterates/Mathlib/Data/Nat.lean b/LeanPool/QuadraticIterates/Mathlib/Data/Nat.lean index 29a1d193c0..4503914313 100644 --- a/LeanPool/QuadraticIterates/Mathlib/Data/Nat.lean +++ b/LeanPool/QuadraticIterates/Mathlib/Data/Nat.lean @@ -3,6 +3,12 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ +module + +public import Aesop.BuiltinRules +public import Mathlib.Data.Nat.Notation +public import Mathlib.Tactic.ToAdditive +public import Mathlib.Tactic.ToDual import Mathlib.Algebra.Order.Ring.Star import Mathlib.Data.Int.ConditionallyCompleteOrder import Mathlib.Data.Int.Star @@ -16,6 +22,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + /-- If `a ≤ c`, `b ≤ d` and `a * b = c * d` with `c, d` positive, then `a = c` and `b = d`. The positivity hypotheses are needed since `ℕ`-multiplication is not strictly monotone at `0` (compare `mul_eq_mul_iff_eq_and_eq`, which does not apply to `ℕ`). -/ diff --git a/LeanPool/QuadraticIterates/Mathlib/Data/ZMod.lean b/LeanPool/QuadraticIterates/Mathlib/Data/ZMod.lean index 8ea1d2df56..535063b56c 100644 --- a/LeanPool/QuadraticIterates/Mathlib/Data/ZMod.lean +++ b/LeanPool/QuadraticIterates/Mathlib/Data/ZMod.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import Mathlib.Tactic.LinearCombination +module + +public import Mathlib.Data.ZMod.Defs +public import Mathlib.RingTheory.Coprime.Basic import Mathlib.Data.ZMod.Units +import Mathlib.Tactic.LinearCombination /-! # `ZMod` lemmas @@ -13,6 +17,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + /-- If `m ∣ a + b`, then `b ≡ -a mod m`. -/ lemma ZMod.intCast_eq_neg_intCast_of_dvd_add {a b : ℤ} {m : ℕ} (h : (m : ℤ) ∣ a + b) : (b : ZMod m) = -(a : ZMod m) := by diff --git a/LeanPool/QuadraticIterates/Mathlib/FieldTheory/Multiquadratic.lean b/LeanPool/QuadraticIterates/Mathlib/FieldTheory/Multiquadratic.lean index 1ca469235e..f568bb3db4 100644 --- a/LeanPool/QuadraticIterates/Mathlib/FieldTheory/Multiquadratic.lean +++ b/LeanPool/QuadraticIterates/Mathlib/FieldTheory/Multiquadratic.lean @@ -3,26 +3,12 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import Mathlib.Algebra.Field.ZMod -import Mathlib.Algebra.Module.ZMod -import Mathlib.FieldTheory.Galois.Basic -import Mathlib.FieldTheory.Perfect -import Mathlib.FieldTheory.Relrank -import Mathlib.GroupTheory.QuotientGroup.Basic -import Mathlib.LinearAlgebra.Dimension.Constructions -import Mathlib.LinearAlgebra.Dimension.Finrank -import Mathlib.LinearAlgebra.Span.Defs -import Mathlib.RingTheory.IntegralClosure.IsIntegral.Basic -import Mathlib.Tactic.ComputeDegree -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Order -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring +module + +public import Mathlib.Algebra.Field.ZMod +public import Mathlib.Algebra.Module.ZMod +public import Mathlib.FieldTheory.Galois.Basic +public import Mathlib.FieldTheory.Relrank import LeanPool.QuadraticIterates.Mathlib.Algebra.BigOperators import LeanPool.QuadraticIterates.Mathlib.GroupTheory.PGroup @@ -38,6 +24,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + /-- Adjoining a single square root `x` (with `x² ∈ L`) to a field `L` gives degree at most `2`. -/ theorem finrank_adjoin_sq_le {L : Type*} [Field L] {E : Type*} [Field E] [Algebra L E] {x : E} {c : L} (hc : x ^ 2 = algebraMap L E c) : diff --git a/LeanPool/QuadraticIterates/Mathlib/GroupTheory/Card.lean b/LeanPool/QuadraticIterates/Mathlib/GroupTheory/Card.lean index 0122ed8428..a7c87caa7e 100644 --- a/LeanPool/QuadraticIterates/Mathlib/GroupTheory/Card.lean +++ b/LeanPool/QuadraticIterates/Mathlib/GroupTheory/Card.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import Mathlib.SetTheory.Cardinal.Finite +module + +public import Mathlib.SetTheory.Cardinal.Finite /-! # A cardinality criterion for group isomorphism @@ -12,6 +14,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + /-- Between finite groups, an injective homomorphism extends to an isomorphism iff the two groups have the same cardinality. -/ theorem MonoidHom.nonempty_mulEquiv_iff_card_eq {G H : Type*} [Group G] [Group H] [Finite H] diff --git a/LeanPool/QuadraticIterates/Mathlib/GroupTheory/PGroup.lean b/LeanPool/QuadraticIterates/Mathlib/GroupTheory/PGroup.lean index 2676d5962f..129e4085cf 100644 --- a/LeanPool/QuadraticIterates/Mathlib/GroupTheory/PGroup.lean +++ b/LeanPool/QuadraticIterates/Mathlib/GroupTheory/PGroup.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import Mathlib.Algebra.Field.ZMod +module + +public import Mathlib.Algebra.Field.ZMod +public import Mathlib.GroupTheory.PGroup +public import Mathlib.Algebra.Module.Pi +public import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.FieldTheory.Finiteness -import Mathlib.GroupTheory.PGroup -import Mathlib.GroupTheory.Perm.DomMulAct /-! # Fixed points of 2-groups on 𝔽₂-modules @@ -25,6 +28,8 @@ not obvious (they sit between `GroupTheory.PGroup`, `RepresentationTheory`, and `Module` files); they are grouped here for now and will be placed during upstreaming. -/ +@[expose] public section + /-- A `2`-group acting `ZMod 2`-linearly on a nontrivial finite `𝔽₂`-module fixes some nonzero vector. -/ theorem fixed_points_nontrivial {G : Type*} [Group G] (hG : IsPGroup 2 G) diff --git a/LeanPool/QuadraticIterates/Mathlib/GroupTheory/RegularWreathProduct.lean b/LeanPool/QuadraticIterates/Mathlib/GroupTheory/RegularWreathProduct.lean index 9409441221..577909ef16 100644 --- a/LeanPool/QuadraticIterates/Mathlib/GroupTheory/RegularWreathProduct.lean +++ b/LeanPool/QuadraticIterates/Mathlib/GroupTheory/RegularWreathProduct.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import Mathlib.Algebra.Group.TypeTags.Hom +module + +public import Mathlib.GroupTheory.RegularWreathProduct +public import Mathlib.Algebra.Field.ZMod import Mathlib.Algebra.Module.ZMod import Mathlib.FieldTheory.Finite.GaloisField -import Mathlib.GroupTheory.RegularWreathProduct import Mathlib.LinearAlgebra.Dual.Lemmas -import Mathlib.SetTheory.Cardinal.Finite /-! # Homomorphisms from wreath products to abelian groups @@ -20,6 +21,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + /-- For a finite commutative group `H` of exponent `2`, `#H = #(H →* C₂)` where `C₂ = Multiplicative (ZMod 2)`. -/ theorem elem_ab_card_hom (H : Type*) [Group H] [Finite H] diff --git a/LeanPool/QuadraticIterates/Mathlib/NumberTheory/Moebius.lean b/LeanPool/QuadraticIterates/Mathlib/NumberTheory/Moebius.lean index 7e551b1472..d105243d89 100644 --- a/LeanPool/QuadraticIterates/Mathlib/NumberTheory/Moebius.lean +++ b/LeanPool/QuadraticIterates/Mathlib/NumberTheory/Moebius.lean @@ -3,14 +3,14 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.NumberTheory.ArithmeticFunction.Moebius +module + +public import Mathlib.NumberTheory.ArithmeticFunction.Moebius +public import Mathlib.Algebra.GCDMonoid.Nat +public import Mathlib.RingTheory.Radical.Basic +import Mathlib.Algebra.Order.Field.Basic import Mathlib.RingTheory.Radical.NatInt -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Order -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity.Finset /-! # Sums of the Möbius function over divisors @@ -22,6 +22,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + open ArithmeticFunction open scoped ArithmeticFunction.Moebius ArithmeticFunction.zeta diff --git a/LeanPool/QuadraticIterates/Mathlib/RingTheory/MoebiusFactor.lean b/LeanPool/QuadraticIterates/Mathlib/RingTheory/MoebiusFactor.lean index 96d29f7e89..5d005f971e 100644 --- a/LeanPool/QuadraticIterates/Mathlib/RingTheory/MoebiusFactor.lean +++ b/LeanPool/QuadraticIterates/Mathlib/RingTheory/MoebiusFactor.lean @@ -3,18 +3,19 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ -import Mathlib.NumberTheory.ArithmeticFunction.Moebius -import Mathlib.Order.CompletePartialOrder -import Mathlib.RingTheory.Localization.FractionRing -import Mathlib.RingTheory.Localization.Integer -import Mathlib.RingTheory.UniqueFactorizationDomain.Finsupp -import Mathlib.RingTheory.UniqueFactorizationDomain.Multiplicity -import Mathlib.RingTheory.UniqueFactorizationDomain.NormalizedFactors -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Push +module + +public import Mathlib.NumberTheory.ArithmeticFunction.Moebius +public import Mathlib.RingTheory.Localization.FractionRing +public import Mathlib.RingTheory.Localization.Integer +public import Mathlib.RingTheory.UniqueFactorizationDomain.Finsupp import LeanPool.QuadraticIterates.Mathlib.Algebra.BigOperators import LeanPool.QuadraticIterates.Mathlib.NumberTheory.Moebius +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.RingTheory.Radical.NatInt +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Positivity.Finset /-! # Integrality of Möbius factors of strong divisibility sequences @@ -28,6 +29,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + open scoped ArithmeticFunction.Moebius open UniqueFactorizationMonoid ArithmeticFunction diff --git a/LeanPool/QuadraticIterates/Mathlib/RingTheory/UniqueFactorizationDomain.lean b/LeanPool/QuadraticIterates/Mathlib/RingTheory/UniqueFactorizationDomain.lean index 5d0c266b6e..1798fa0823 100644 --- a/LeanPool/QuadraticIterates/Mathlib/RingTheory/UniqueFactorizationDomain.lean +++ b/LeanPool/QuadraticIterates/Mathlib/RingTheory/UniqueFactorizationDomain.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ +module + + +public import Mathlib.RingTheory.UniqueFactorizationDomain.Finsupp import Mathlib.Data.ENat.Lattice import Mathlib.Order.CompletePartialOrder -import Mathlib.RingTheory.UniqueFactorizationDomain.Finsupp import Mathlib.RingTheory.UniqueFactorizationDomain.Multiplicity +import Mathlib.Tactic.Ring.RingNF /-! # Unique factorization lemmas @@ -15,6 +19,8 @@ Auxiliary material for the formalization of M. Stoll, *Galois groups over ℚ of polynomials*, Arch. Math. 59 (1992), 239-244; upstreaming candidates for Mathlib. -/ +@[expose] public section + open UniqueFactorizationMonoid in /-- If `σ` is a multiplicative automorphism of a normalization UFD and `σ p` is associated to `p`, then `normalize ∘ σ` permutes the multiset of normalized factors of `p`. -/ diff --git a/LeanPool/QuantumParallelRepetition.lean b/LeanPool/QuantumParallelRepetition.lean index aa9da173b0..fd0112ec0f 100644 --- a/LeanPool/QuantumParallelRepetition.lean +++ b/LeanPool/QuantumParallelRepetition.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.QuantumParallelRepetition.Part12 +public import LeanPool.QuantumParallelRepetition.Part12 /-! # Quantum parallel repetition @@ -16,3 +17,5 @@ Main declarations: `QuantumParallelRepetition.distributionUniformExponential` Tags: quantum-information, nonlocal-games, parallel-repetition, theoretical-computer-science MSC: 81P68, 68Q12 -/ + +@[expose] public section diff --git a/LeanPool/QuantumParallelRepetition/Part01.lean b/LeanPool/QuantumParallelRepetition/Part01.lean index 1c622725b6..711b659258 100644 --- a/LeanPool/QuantumParallelRepetition/Part01.lean +++ b/LeanPool/QuantumParallelRepetition/Part01.lean @@ -3,18 +3,23 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ - -import Mathlib.Algebra.Order.Archimedean.Real.Hom -import Mathlib.Analysis.CStarAlgebra.Module.Constructions -import Mathlib.Analysis.InnerProductSpace.StarOrder -import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals -import Mathlib.LinearAlgebra.FreeModule.PID -import Mathlib.MeasureTheory.Function.L2Space -import Mathlib.MeasureTheory.SpecificCodomains.Pi -import Mathlib.Tactic.NormNum.RealSqrt +module + +public import Mathlib.Algebra.Order.Archimedean.Real.Hom +public import Mathlib.Analysis.CStarAlgebra.Module.Constructions +public import Mathlib.Analysis.InnerProductSpace.StarOrder +public import Mathlib.Analysis.Matrix.Normed +public import Mathlib.Analysis.Matrix.Order +public import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals +public import Mathlib.LinearAlgebra.FreeModule.PID +public import Mathlib.MeasureTheory.Function.L2Space +public import Mathlib.MeasureTheory.SpecificCodomains.Pi +public import Mathlib.Tactic.NormNum.RealSqrt /-! # Quantum parallel repetition, part 01 -/ +@[expose] public section + noncomputable section namespace QuantumParallelRepetition @@ -178,7 +183,8 @@ namespace Strategy variable [Fintype X] [Fintype Y] [Fintype A] [Fintype B] variable {G : Game X Y A B} -private def jointEffect (S : Strategy G) (x : X) (y : Y) (a : A) (b : B) : +/-- The tensor product of Alice's and Bob's effects for a joint outcome. -/ +def jointEffect (S : Strategy G) (x : X) (y : Y) (a : A) (b : B) : Matrix (S.Alice × S.Bob) (S.Alice × S.Bob) ℂ := (S.aliceMeasurement x).effect a ⊗ₖ (S.bobMeasurement y).effect b @@ -505,14 +511,18 @@ theorem posSemidef_blockDiagonal' _ = star (Matrix.blockDiagonal' K) * Matrix.blockDiagonal' K := by simp only [star_eq_conjTranspose, blockDiagonal'_conjTranspose, ← blockDiagonal'_mul] -private abbrev mixtureAlice (S : J → Strategy G) := Σ j : J, (S j).Alice +/-- Alice's direct-sum index, retaining the chosen component of the mixture. -/ +abbrev mixtureAlice (S : J → Strategy G) := Σ j : J, (S j).Alice -private abbrev mixtureBob (S : J → Strategy G) := Σ j : J, (S j).Bob +/-- Bob's direct-sum index, retaining the chosen component of the mixture. -/ +abbrev mixtureBob (S : J → Strategy G) := Σ j : J, (S j).Bob -private abbrev mixtureMatched (S : J → Strategy G) := +/-- Joint indices whose two players use the same mixture component. -/ +abbrev mixtureMatched (S : J → Strategy G) := Σ j : J, (S j).Alice × (S j).Bob -private def mixtureMatchedIndex (S : J → Strategy G) : +/-- Embed matching component indices into the product of the two direct sums. -/ +def mixtureMatchedIndex (S : J → Strategy G) : mixtureMatched S → mixtureAlice S × mixtureBob S | ⟨j, (a, b)⟩ => (⟨j, a⟩, ⟨j, b⟩) @@ -530,12 +540,13 @@ private theorem mixtureMatchedIndex_injective (S : J → Strategy G) : subst d rfl -private def mixtureEmbedding (S : J → Strategy G) : +/-- The matrix embedding the matching component blocks into the joint space. -/ +def mixtureEmbedding (S : J → Strategy G) : Matrix (mixtureAlice S × mixtureBob S) (mixtureMatched S) ℂ := by classical exact fun q r => if q = mixtureMatchedIndex S r then 1 else 0 -private theorem mixtureEmbedding_isometry (S : J → Strategy G) : +theorem mixtureEmbedding_isometry (S : J → Strategy G) : (mixtureEmbedding S)ᴴ * mixtureEmbedding S = 1 := by classical ext i j @@ -561,12 +572,13 @@ private theorem mixtureEmbedding_compress (S : J → Strategy G) MonoidWithZeroHom.map_ite_one_zero, ite_mul, one_mul, zero_mul, Finset.sum_ite_eq', Finset.mem_univ, ↓reduceIte, mul_ite, mul_one, mul_zero, submatrix_apply] -private def mixtureBlockMatrix (p : J → ℝ) (S : J → Strategy G) : +/-- The block-diagonal state matrix weighted by the mixture probabilities. -/ +def mixtureBlockMatrix (p : J → ℝ) (S : J → Strategy G) : Matrix (mixtureMatched S) (mixtureMatched S) ℂ := Matrix.blockDiagonal' fun j => p j • (S j).state.matrix omit [Fintype J] in -private theorem mixtureBlockMatrix_posSemidef +theorem mixtureBlockMatrix_posSemidef [Finite J] (p : J → ℝ) (hp : ∀ j, 0 ≤ p j) (S : J → Strategy G) : (mixtureBlockMatrix p S).PosSemidef := by @@ -575,7 +587,7 @@ private theorem mixtureBlockMatrix_posSemidef intro j exact (S j).state.positive.smul (hp j) -private theorem mixtureBlockMatrix_trace +theorem mixtureBlockMatrix_trace (p : J → ℝ) (S : J → Strategy G) : Matrix.trace (mixtureBlockMatrix p S) = (↑(∑ j : J, p j) : ℂ) := by @@ -583,7 +595,8 @@ private theorem mixtureBlockMatrix_trace rw [Matrix.trace_blockDiagonal'] simp only [trace_smul, DensityMatrix.trace_one, Complex.real_smul, mul_one, Complex.ofReal_sum] -private def mixtureDensityMatrix (p : J → ℝ) +/-- The density matrix of the mixture, supported on matching component blocks. -/ +def mixtureDensityMatrix (p : J → ℝ) (hp : ∀ j, 0 ≤ p j) (h_normalized : (∑ j : J, p j) = 1) (S : J → Strategy G) : DensityMatrix (mixtureAlice S × mixtureBob S) where @@ -597,7 +610,8 @@ private def mixtureDensityMatrix (p : J → ℝ) Matrix.one_mul, mixtureBlockMatrix_trace, h_normalized] norm_num -private def mixtureAlicePOVM (S : J → Strategy G) (x : X) : +/-- Alice's measurement acting separately on each mixture component. -/ +def mixtureAlicePOVM (S : J → Strategy G) (x : X) : POVM A (mixtureAlice S) where effect a := Matrix.blockDiagonal' fun j => ((S j).aliceMeasurement x).effect a @@ -618,7 +632,8 @@ private def mixtureAlicePOVM (S : J → Strategy G) (x : X) : · simp only [Matrix.sum_apply, blockDiagonal'_apply, h, ↓reduceDIte, Finset.sum_const_zero, ne_eq, Sigma.mk.injEq, false_and, not_false_eq_true, one_apply_ne] -private def mixtureBobPOVM (S : J → Strategy G) (y : Y) : +/-- Bob's measurement acting separately on each mixture component. -/ +def mixtureBobPOVM (S : J → Strategy G) (y : Y) : POVM B (mixtureBob S) where effect b := Matrix.blockDiagonal' fun j => ((S j).bobMeasurement y).effect b @@ -639,7 +654,8 @@ private def mixtureBobPOVM (S : J → Strategy G) (y : Y) : · simp only [Matrix.sum_apply, blockDiagonal'_apply, h, ↓reduceDIte, Finset.sum_const_zero, ne_eq, Sigma.mk.injEq, false_and, not_false_eq_true, one_apply_ne] -private def convexMixtureStrategy (p : J → ℝ) +/-- A strategy that shares a component label and plays that component's strategy. -/ +def convexMixtureStrategy (p : J → ℝ) (hp : ∀ j, 0 ≤ p j) (h_normalized : (∑ j : J, p j) = 1) (S : J → Strategy G) : Strategy G where Alice := mixtureAlice S @@ -2229,7 +2245,8 @@ theorem spectralSupportFunctional_isHermitian simpa only [Matrix.star_eq_conjTranspose] using (show star (e D) = e D by rw [← map_star, hDstar]) -private def spectralSupportInverse +/-- Apply reciprocal eigenvalues to a positive matrix, with zero on its kernel. -/ +def spectralSupportInverse {d : Type*} [Fintype d] [DecidableEq d] (F : Matrix d d ℂ) (hF : F.PosSemidef) : Matrix d d ℂ := spectralSupportFunctional F hF (fun x => x⁻¹) @@ -2464,7 +2481,8 @@ open Matrix open scoped BigOperators ComplexOrder MatrixOrder -private def purificationRangeProjection +/-- The matrix `Γ F⁻¹ Γᴴ` formed using the inverse on the support of `F`. -/ +def purificationRangeProjection {d e : Type*} [Fintype d] [DecidableEq d] (F : Matrix d d ℂ) (hF : F.PosSemidef) (Γ : Matrix e d ℂ) : Matrix e e ℂ := @@ -2530,7 +2548,8 @@ private theorem purificationRangeProjection_complement_posSemidef rw [hsquare] at hpositive exact hpositive -private def purifiedRefinementCore +/-- Transport an effect through the purification map and the support inverse. -/ +def purifiedRefinementCore {ι d e : Type*} [Fintype d] [DecidableEq d] (F : Matrix d d ℂ) (hF : F.PosSemidef) @@ -2583,7 +2602,8 @@ private theorem purifiedRefinementCore_sum Matrix.conjTranspose Γ := by rw [spectralSupportInverse_penrose] -private def purifiedRefinedEffect +/-- Complete the transported effects by assigning the unused range to outcome `a₀`. -/ +def purifiedRefinedEffect {ι d e : Type*} [DecidableEq ι] [Fintype d] [DecidableEq d] [DecidableEq e] @@ -2594,7 +2614,7 @@ private def purifiedRefinedEffect purifiedRefinementCore F hF Γ effect a + if a = a₀ then 1 - purificationRangeProjection F hF Γ else 0 -private theorem purifiedRefinedEffect_posSemidef +theorem purifiedRefinedEffect_posSemidef {ι d e : Type*} [DecidableEq ι] [Fintype d] [DecidableEq d] [Fintype e] [DecidableEq e] @@ -2613,7 +2633,7 @@ private theorem purifiedRefinedEffect_posSemidef · exact purificationRangeProjection_complement_posSemidef F hF Γ hΓ · exact Matrix.PosSemidef.zero -private theorem purifiedRefinedEffect_complete +theorem purifiedRefinedEffect_complete {ι d e : Type*} [Fintype ι] [DecidableEq ι] [Fintype d] [DecidableEq d] [DecidableEq e] diff --git a/LeanPool/QuantumParallelRepetition/Part02.lean b/LeanPool/QuantumParallelRepetition/Part02.lean index 71f42e56df..7d8beafab1 100644 --- a/LeanPool/QuantumParallelRepetition/Part02.lean +++ b/LeanPool/QuantumParallelRepetition/Part02.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.QuantumParallelRepetition.Part01 -import Mathlib.Analysis.Normed.Module.Normalize -import Mathlib.InformationTheory.KullbackLeibler.KLFun -import Mathlib.LinearAlgebra.Matrix.Permutation -import Mathlib.NumberTheory.Harmonic.Bounds +public import LeanPool.QuantumParallelRepetition.Part01 +public import Mathlib.Analysis.Normed.Module.Normalize +public import Mathlib.InformationTheory.KullbackLeibler.KLFun +public import Mathlib.LinearAlgebra.Matrix.Permutation +public import Mathlib.NumberTheory.Harmonic.Bounds /-! # Quantum parallel repetition, part 02 -/ +@[expose] public section + noncomputable section namespace QuantumParallelRepetition @@ -1173,7 +1176,8 @@ theorem spectralPartitionPOVM_projective exact spectralAtomSum_mul_self F hF (Finset.univ.filter (fun i : d => bin i = k)) -private def bilateralWorkPairEquiv +/-- Regroup two families of local indices into a family of paired indices. -/ +def bilateralWorkPairEquiv {ι d e : Type*} : ((ι → d) × (ι → e)) ≃ (ι → d × e) where toFun x i := (x.1 i, x.2 i) @@ -1362,7 +1366,8 @@ open WithLp open scoped BigOperators Kronecker ComplexOrder MatrixOrder -private def finiteUniformThresholdGrid +/-- The `k`th point of a uniform grid with spacing `(upper - lower) / N`. -/ +def finiteUniformThresholdGrid (lower upper : ℝ) (N : ℕ) (k : Fin N) : ℝ := lower + (k.val : ℝ) * ((upper - lower) / (N : ℝ)) @@ -1490,7 +1495,8 @@ theorem localUnitaryPureResidual_targetLocalInverse_reset simp only [localUnitaryAction, OneMemClass.coe_one, zero_mul, implies_true, mul_zero, mul_one, kroneckerMap_one_one, one_mulVec, toLp_ofLp] -private def targetCoefficientMatrix +/-- The coefficient matrix of a bipartite vector, with Bob indexing its rows. -/ +def targetCoefficientMatrix {d : ℕ} (ξ : BipartiteUnitVector d) : Matrix (Fin d) (Fin d) ℂ := fun b a => ξ.val (a, b) @@ -2577,7 +2583,8 @@ abbrev DSVUniformDensityIndependentHistoryLocalIndex (L N d : ℕ) := Fin L → DSVUniformDensityThresholdLocalIndex N d -private def dSVUniformDensityIndependentHistoryPairReindex +/-- The isometry regrouping paired history coordinates into Alice's and Bob's histories. -/ +def dSVUniformDensityIndependentHistoryPairReindex (L N d : ℕ) : EuclideanSpace ℂ (Fin L → @@ -2820,7 +2827,8 @@ namespace ClassicalSampling variable {α : Type*} [Fintype α] [DecidableEq α] -private def markedFirst (rank : α ≃ Fin (Fintype.card α)) +/-- The marked element with smallest rank after applying the given permutation. -/ +def markedFirst (rank : α ≃ Fin (Fintype.card α)) (marked : Finset α) (nonempty : marked.Nonempty) (permutation : Equiv.Perm α) : α := permutation.symm @@ -5113,13 +5121,14 @@ section open WithLp open scoped BigOperators Kronecker ComplexOrder MatrixOrder -private def finiteTensorLocalUnitaryMatrix +/-- The matrix of the tensor product of a finite family of local unitaries. -/ +def finiteTensorLocalUnitaryMatrix {ι β : Type*} [Fintype ι] [Fintype β] [DecidableEq β] (U : ι → Matrix.unitaryGroup β ℂ) : Matrix (ι → β) (ι → β) ℂ := fun q r => ∏ i : ι, (U i : Matrix β β ℂ) (q i) (r i) -private theorem finiteTensorLocalUnitaryMatrix_gram +theorem finiteTensorLocalUnitaryMatrix_gram {ι β : Type*} [Fintype ι] [DecidableEq ι] [Fintype β] [DecidableEq β] @@ -5179,7 +5188,8 @@ private theorem finiteTensorLocalUnitaryMatrix_gram rw [zero] simp only [ne_eq, equal, not_false_eq_true, one_apply_ne] -private def finiteTensorLocalUnitary +/-- The unitary on function indices obtained by tensoring the local unitaries. -/ +def finiteTensorLocalUnitary {ι β : Type*} [Fintype ι] [DecidableEq ι] [Fintype β] [DecidableEq β] @@ -5484,7 +5494,8 @@ open scoped BigOperators Topology ComplexOrder MatrixOrder Matrix.Norms.Elementw attribute [local instance] Matrix.normedAddCommGroup Matrix.normedSpace -private def scalarPurificationLp (z : ℝ) (hz : 0 ≤ z) : +/-- The scalar resolvent function `z / (z + s)` as a complex square-integrable function. -/ +def scalarPurificationLp (z : ℝ) (hz : 0 ≤ z) : Lp ℂ 2 (volume.restrict (Ioi (0 : ℝ))) := ((scalarResolventFilter_memLp_two hz).ofReal (K := ℂ)).toLp (fun s : ℝ => ((z / (z + s) : ℝ) : ℂ)) @@ -5496,7 +5507,8 @@ private theorem scalarPurificationLp_coeFn ((scalarResolventFilter_memLp_two hz).ofReal (K := ℂ)).coeFn_toLp -private def commonPurificationGenerator +/-- Resolvent functions for the eigenvalues of the family and its mean matrix. -/ +def commonPurificationGenerator {ι d : Type*} [Fintype d] [DecidableEq d] (F : ι → Matrix d d ℂ) (M : Matrix d d ℂ) (positive : ∀ i, (F i).PosSemidef) @@ -5688,7 +5700,8 @@ def ensemblePurificationSubspaceEntry ensemble_spectralPurificationFilterEntryLp_mem_common F M positive hM a i j⟩ -private def meanPurificationSubspaceEntry +/-- An entry of the mean spectral purification, bundled in the common subspace. -/ +def meanPurificationSubspaceEntry {ι d : Type*} [Fintype d] [DecidableEq d] (F : ι → Matrix d d ℂ) (M : Matrix d d ℂ) (positive : ∀ i, (F i).PosSemidef) @@ -6147,7 +6160,8 @@ private theorem matrixPurificationVector_norm_sq (Matrix.trace (Matrix.conjTranspose K * K)).re := by exact matrixVectorization_norm_sq K -private def strategyPurificationShuffle +/-- Regroup purification indices into a pair of joint player indices. -/ +def strategyPurificationShuffle (dA dB : Type) : ((dA × (dA × dB)) × dB) ≃ ((dA × dB) × (dA × dB)) where toFun q := (q.1.2, (q.1.1, q.2)) diff --git a/LeanPool/QuantumParallelRepetition/Part03.lean b/LeanPool/QuantumParallelRepetition/Part03.lean index bd881d6718..7dda564628 100644 --- a/LeanPool/QuantumParallelRepetition/Part03.lean +++ b/LeanPool/QuantumParallelRepetition/Part03.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.QuantumParallelRepetition.Part02 +public import LeanPool.QuantumParallelRepetition.Part02 /-! # Quantum parallel repetition, part 03 -/ +@[expose] public section + noncomputable section namespace QuantumParallelRepetition @@ -29,14 +32,15 @@ open scoped BigOperators Kronecker ComplexOrder MatrixOrder attribute [local instance] Classical.propDecidable -private def dSVDensityRationalPhysicalProjector +/-- The accepting effect of the left projective threshold measurement. -/ +def dSVDensityRationalPhysicalProjector {d N : ℕ} (w : ℝ) (ξ : BipartiteUnitVector d) (k : Fin N) : Matrix (Fin d) (Fin d) ℂ := (dSVDensityRationalLeftProjectiveThresholdPOVM w N k ξ).effect true -private theorem dSVDensityRationalPhysicalProjector_pos +theorem dSVDensityRationalPhysicalProjector_pos {d N : ℕ} (w : ℝ) (ξ : BipartiteUnitVector d) (k : Fin N) : (dSVDensityRationalPhysicalProjector w ξ k).PosSemidef := @@ -53,7 +57,7 @@ private theorem dSVDensityRationalPhysicalProjector_projective w N k (dSVSoftBobLeftReducedDensity ξ) (dSVSoftBobLeftReducedDensity_posSemidef ξ) true -private theorem dSVDensityRationalPhysicalProjector_complement_pos +theorem dSVDensityRationalPhysicalProjector_complement_pos {d N : ℕ} (w : ℝ) (ξ : BipartiteUnitVector d) (k : Fin N) : (1 - dSVDensityRationalPhysicalProjector w ξ k).PosSemidef := @@ -62,7 +66,8 @@ private theorem dSVDensityRationalPhysicalProjector_complement_pos (dSVDensityRationalPhysicalProjector_pos w ξ k) (dSVDensityRationalPhysicalProjector_projective w ξ k) -private def dSVDensityRationalPhysicalGlobalPOVM +/-- The binary measurement combining the accepting projectors over the threshold grid. -/ +def dSVDensityRationalPhysicalGlobalPOVM {d N : ℕ} (w : ℝ) (ξ : BipartiteUnitVector d) : POVM Bool (DSVUniformDensityThresholdLocalIndex N d) := @@ -345,14 +350,15 @@ section open WithLp open scoped BigOperators Kronecker ComplexOrder MatrixOrder -private def dSVDensityRationalCompleteProjectiveThresholdProjector +/-- The accepting projector at the specified threshold in the complete measurement. -/ +def dSVDensityRationalCompleteProjectiveThresholdProjector {d : ℕ} (w : ℝ) (N : ℕ) (ξ : BipartiteUnitVector d) (k : Fin N) : Matrix (Fin d) (Fin d) ℂ := (dSVDensityRationalLeftProjectiveThresholdPOVM w N k ξ).effect true -private theorem dSVDensityRationalCompleteProjectiveThresholdProjector_pos +theorem dSVDensityRationalCompleteProjectiveThresholdProjector_pos {d : ℕ} (w : ℝ) (N : ℕ) (ξ : BipartiteUnitVector d) (k : Fin N) : (dSVDensityRationalCompleteProjectiveThresholdProjector @@ -388,7 +394,7 @@ private theorem dSVDensityRationalCompleteProjectiveThresholdEffect_false rw [Fintype.sum_bool, add_comm] at complete exact eq_sub_of_add_eq complete -private theorem +theorem dSVDensityRationalCompleteProjectiveThresholdProjector_complement_pos {d : ℕ} (w : ℝ) (N : ℕ) (ξ : BipartiteUnitVector d) (k : Fin N) : @@ -844,14 +850,15 @@ theorem dSVDensityRationalCanonicalAcceptedTarget_ne_zero width grid ξ nlinarith -private def dSVDensityRationalCanonicalNormalizedTarget +/-- Normalize the canonical accepted target vector. -/ +def dSVDensityRationalCanonicalNormalizedTarget {d : ℕ} (w : ℝ) (N : ℕ) (ξ : BipartiteUnitVector d) : EuclideanSpace ℂ (Fin d × Fin d) := NormedSpace.normalize (dSVDensityRationalCanonicalAcceptedTarget w N ξ) -private theorem dSVDensityRationalCanonicalNormalizedTarget_norm +theorem dSVDensityRationalCanonicalNormalizedTarget_norm {d N : ℕ} {w : ℝ} (width : 0 < w) (grid : 0 < N) (fine : (d : ℝ) / (N : ℝ) < 1 / (w + 1)) (ξ : BipartiteUnitVector d) : @@ -2022,7 +2029,8 @@ section open WithLp open scoped BigOperators Kronecker ComplexOrder MatrixOrder -private def dSVDensityRationalCanonicalPrefixMask +/-- The diagonal mask selecting accepted threshold and spectral coordinates. -/ +def dSVDensityRationalCanonicalPrefixMask {d : ℕ} (w : ℝ) (N : ℕ) (ξ : BipartiteUnitVector d) : Matrix (DSVUniformDensityThresholdLocalIndex N d) @@ -3080,7 +3088,8 @@ theorem dSVDensityRationalPublicLogRankBucket_log_sub_lt have integer_order := (abs_lt.mp bucket_bounds).2 linarith [rank_bounds.2, other_bounds.1] -private def dSVDensityRationalPublicLogRankBucketFiber +/-- The nonzero ranks assigned to the given logarithmic bucket and public phase. -/ +def dSVDensityRationalPublicLogRankBucketFiber {N B : ℕ} (Q : ℕ) (phase : Fin B) (label : Option ℕ) : Finset (Fin (N + 1)) := Finset.univ.filter fun r : Fin (N + 1) => @@ -3309,7 +3318,8 @@ theorem dSVDensityRationalLocalSpectralPairHistory_apply_norm_sq inv_pow, dSVUniformDensityThresholdRaw_norm_sq] ring -private def dSVDensityRationalMixedCanonicalCrossMatrix +/-- The transposed eigenbasis overlap, repeated on each threshold block. -/ +def dSVDensityRationalMixedCanonicalCrossMatrix {d : ℕ} (N : ℕ) (ξ ζ : BipartiteUnitVector d) : Matrix (DSVUniformDensityThresholdLocalIndex N d) @@ -3674,7 +3684,8 @@ theorem dSVDensityRationalMixedCanonicalSpectralOutcome_eq exact dSVDensityRationalMixedCanonicalProjectorMatrix_eq w N ξ ζ -private def dSVDensityRationalPublicLogBilateralPureTensor +/-- Tensor two bipartite vectors while grouping each player's indices together. -/ +def dSVDensityRationalPublicLogBilateralPureTensor {ι κ : Type*} (v : EuclideanSpace ℂ (ι × ι)) (u : EuclideanSpace ℂ (κ × κ)) : @@ -3727,7 +3738,8 @@ abbrev DSVDensityRationalPublicLogPhaseHistoryLocalIndex (B N d L : ℕ) := Fin B × DSVUniformDensityThresholdWholeHistoryLocalIndex N d L -private def dSVDensityRationalPublicLogPhasePureSource +/-- The shared history state tensored with the public-phase EPR state. -/ +def dSVDensityRationalPublicLogPhasePureSource (B N d L : ℕ) : EuclideanSpace ℂ (DSVDensityRationalPublicLogPhaseHistoryLocalIndex B N d L × @@ -3768,7 +3780,8 @@ private theorem dSVDensityRationalPublicLogPhasePureSource_norm nlinarith [norm_nonneg (dSVDensityRationalPublicLogPhasePureSource B N d L)] -private def dSVDensityRationalPublicLogPhaseHarmonicPureSource +/-- Adjoin the harmonic embezzlement state to the public-phase history source. -/ +def dSVDensityRationalPublicLogPhaseHarmonicPureSource (B N d L m : ℕ) : EuclideanSpace ℂ ((DSVDensityRationalPublicLogPhaseHistoryLocalIndex @@ -3817,11 +3830,13 @@ private theorem dSVDensityRationalPublicLogPhaseHarmonicPureSource_norm (dSVDensityRationalPublicLogPhaseHarmonicPureSource B N d L m)] -private abbrev DSVDensityRationalPublicLogPhaseCatalystIndex +/-- The public-phase label paired with the residual whole-history catalyst index. -/ +abbrev DSVDensityRationalPublicLogPhaseCatalystIndex (B N d L : ℕ) := Fin B × DSVUniformDensityThresholdWholeHistoryCatalystIndex N d L -private def dSVDensityRationalPublicLogPhaseTargetSplitEquiv +/-- Separate the target coordinate while retaining the phase in the catalyst index. -/ +def dSVDensityRationalPublicLogPhaseTargetSplitEquiv (B N d L : ℕ) : DSVDensityRationalPublicLogPhaseHistoryLocalIndex B N d L ≃ (Fin d × @@ -4080,7 +4095,8 @@ open scoped BigOperators ComplexOrder Kronecker MatrixOrder attribute [local instance] Classical.propDecidable -private def dSVDensityRationalHeterogeneousActualAcceptSet +/-- The stages whose actual history coordinates satisfy their acceptance predicates. -/ +def dSVDensityRationalHeterogeneousActualAcceptSet {β : Type*} {L : ℕ} (accepted : Fin L → β → Prop) (history : Fin (L + 1) → β) : Finset (Fin L) := by @@ -4152,7 +4168,8 @@ theorem dSVDensityRationalHeterogeneousActualFirstAccepted_zero_iff simpa [hits, dSVDensityRationalHeterogeneousActualAcceptSet] using hit -private def dSVDensityRationalHeterogeneousActualFirstAcceptEquiv +/-- Swap the zero flag with the first accepted stage, retaining the history. -/ +def dSVDensityRationalHeterogeneousActualFirstAcceptEquiv {β : Type*} {L : ℕ} (accepted : Fin L → β → Prop) : Equiv.Perm (Σ _ : Fin (L + 1), Fin (L + 1) → β) where @@ -6641,7 +6658,8 @@ open scoped BigOperators ComplexOrder Kronecker MatrixOrder variable {X Y A B : Type*} variable [Fintype X] [Fintype Y] [Fintype A] [Fintype B] -private def fullCoordinateAliceQuestionFilter +/-- Alice's history filter after revealing the selected coordinate's question. -/ +def fullCoordinateAliceQuestionFilter (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D L : Finset (Fin n)) (i : Fin n) (r : FullCoordinateRevealHistory X Y n D L i) @@ -6650,7 +6668,8 @@ private def fullCoordinateAliceQuestionFilter fullHistoryAliceFilter G n S D (insert i L) (fullCoordinateNewHistory D L i r x) α -private def fullCoordinateAliceMeanFilter +/-- Alice's history filter before the new question is revealed. -/ +def fullCoordinateAliceMeanFilter (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D L : Finset (Fin n)) (i : Fin n) (r : FullCoordinateRevealHistory X Y n D L i) @@ -6659,7 +6678,8 @@ private def fullCoordinateAliceMeanFilter fullHistoryAliceFilter G n S D L (fullCoordinateOldHistory D L i r y) α -private def fullCoordinateBobQuestionFilter +/-- Bob's history filter for the selected question and the previously revealed history. -/ +def fullCoordinateBobQuestionFilter (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D L : Finset (Fin n)) (i : Fin n) (r : FullCoordinateRevealHistory X Y n D L i) @@ -7067,7 +7087,8 @@ theorem conditionalAlice_matrixLogEntropy_gap_posSemidef (G.conditionalXGivenY_sum y hy) rfl hH -private def fullCoordinateAliceEntropyIncrement +/-- The averaged entropy increment between Alice's question and mean filters. -/ +def fullCoordinateAliceEntropyIncrement (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D L : Finset (Fin n)) (i : Fin n) (r : FullCoordinateRevealHistory X Y n D L i) diff --git a/LeanPool/QuantumParallelRepetition/Part04.lean b/LeanPool/QuantumParallelRepetition/Part04.lean index 8d25ae0daf..06c04e4d26 100644 --- a/LeanPool/QuantumParallelRepetition/Part04.lean +++ b/LeanPool/QuantumParallelRepetition/Part04.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.QuantumParallelRepetition.Part03 -import Mathlib.Analysis.Convex.SpecificFunctions.Pow +public import LeanPool.QuantumParallelRepetition.Part03 +public import Mathlib.Analysis.Convex.SpecificFunctions.Pow /-! # Quantum parallel repetition, part 04 -/ +@[expose] public section + noncomputable section namespace QuantumParallelRepetition @@ -24,23 +27,27 @@ open scoped BigOperators abbrev SourceRemainingCoordinate {n : ℕ} (D : Finset (Fin n)) := ↥(Finset.univ \ D) -private abbrev SourceRemainingPermutation {n : ℕ} (D : Finset (Fin n)) := +/-- A permutation of the coordinates outside the revealed set. -/ +abbrev SourceRemainingPermutation {n : ℕ} (D : Finset (Fin n)) := Equiv.Perm (SourceRemainingCoordinate D) -private def sourceRemainingPermutationRank +/-- Rank the remaining coordinates in the order determined by the permutation. -/ +def sourceRemainingPermutationRank {n : ℕ} (D : Finset (Fin n)) (π : SourceRemainingPermutation D) : SourceRemainingCoordinate D ≃ Fin (Finset.univ \ D).card := π.symm.trans (Finset.equivFin (Finset.univ \ D)) -private def sourceRemainingPermutationCoordinateSubtype +/-- The remaining coordinate at a given permutation rank, with membership evidence. -/ +def sourceRemainingPermutationCoordinateSubtype {n : ℕ} (D : Finset (Fin n)) (π : SourceRemainingPermutation D) (k : Fin (Finset.univ \ D).card) : SourceRemainingCoordinate D := (sourceRemainingPermutationRank D π).symm k -private def sourceRemainingPermutationCoordinate +/-- The coordinate at a given rank in the permutation of unrevealed coordinates. -/ +def sourceRemainingPermutationCoordinate {n : ℕ} (D : Finset (Fin n)) (π : SourceRemainingPermutation D) (k : Fin (Finset.univ \ D).card) : Fin n := @@ -62,7 +69,8 @@ private theorem sourceRemainingPermutationCoordinate_not_mem have h := (sourceRemainingPermutationCoordinateSubtype D π k).property exact (Finset.mem_sdiff.mp h).2 -private def sourceRemainingPermutationPrefixSubtype +/-- The remaining coordinates whose permutation ranks precede the cutoff. -/ +def sourceRemainingPermutationPrefixSubtype {n : ℕ} (D : Finset (Fin n)) (π : SourceRemainingPermutation D) (k : Fin ((Finset.univ \ D).card + 1)) : @@ -71,7 +79,8 @@ private def sourceRemainingPermutationPrefixSubtype exact Finset.univ.filter fun i => (sourceRemainingPermutationRank D π i).val < k.val -private def sourceRemainingPermutationPrefix +/-- The coordinates preceding the cutoff in the remaining permutation. -/ +def sourceRemainingPermutationPrefix {n : ℕ} (D : Finset (Fin n)) (π : SourceRemainingPermutation D) (k : Fin ((Finset.univ \ D).card + 1)) : Finset (Fin n) := by @@ -1027,7 +1036,8 @@ theorem conditionedBobCoordinateEffect_sum simp only [hb.symm, and_false, ↓reduceIte] _ = _ := by simp only [and_true] -private def fullHistoryAliceCoordinateEffect +/-- Alice's coordinate effect averaged over the questions hidden by the history. -/ +def fullHistoryAliceCoordinateEffect (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D L : Finset (Fin n)) (h : FullSubsetHistory X Y n D L) @@ -1039,7 +1049,8 @@ private def fullHistoryAliceCoordinateEffect conditionedAliceCoordinateEffect G n S D α (fullHistoryAliceQuestion h hidden) i a -private def fullHistoryBobCoordinateEffect +/-- Bob's coordinate effect averaged over the questions hidden by the history. -/ +def fullHistoryBobCoordinateEffect (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D L : Finset (Fin n)) (h : FullSubsetHistory X Y n D L) @@ -1051,7 +1062,8 @@ private def fullHistoryBobCoordinateEffect conditionedBobCoordinateEffect G n S D β (fullHistoryBobQuestion h hidden) i b -private def fullCoordinateAliceRefinementEffect +/-- Alice's coordinate effect after extending the history with the new question. -/ +def fullCoordinateAliceRefinementEffect (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D L : Finset (Fin n)) (i : Fin n) (r : FullCoordinateRevealHistory X Y n D L i) @@ -1060,7 +1072,8 @@ private def fullCoordinateAliceRefinementEffect fullHistoryAliceCoordinateEffect G n S D (insert i L) (fullCoordinateNewHistory D L i r x) α i a -private def fullCoordinateBobRefinementEffect +/-- Bob's coordinate effect for the selected question and previous history. -/ +def fullCoordinateBobRefinementEffect (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D L : Finset (Fin n)) (i : Fin n) (r : FullCoordinateRevealHistory X Y n D L i) @@ -2366,7 +2379,8 @@ theorem exactFiberQuestionWeight_rectangle G n D seed history x y xs xs' ys ys' ha ha' hb hb') -private def exactFiberAliceMarginal +/-- The question-fiber weight summed over Bob's full question vector. -/ +def exactFiberAliceMarginal (G : Game X Y A B) (n : ℕ) (D : Finset (Fin n)) (seed : ExactRemainingSeed D) @@ -2375,7 +2389,8 @@ private def exactFiberAliceMarginal ∑ ys : Fin n → Y, exactFiberQuestionWeight G n D seed history x y xs ys -private def exactFiberBobMarginal +/-- The question-fiber weight summed over Alice's full question vector. -/ +def exactFiberBobMarginal (G : Game X Y A B) (n : ℕ) (D : Finset (Fin n)) (seed : ExactRemainingSeed D) @@ -3528,19 +3543,26 @@ open scoped BigOperators ComplexOrder Kronecker MatrixOrder variable {X Y A B : Type*} variable [Fintype X] [Fintype Y] [Fintype A] [Fintype B] -private structure SourceHistoryFlag +/-- A remaining permutation, its reveal position and history, and the selected answers. -/ +structure SourceHistoryFlag (X Y A B : Type*) [Fintype X] [Fintype Y] [Fintype A] [Fintype B] {n : ℕ} (D : Finset (Fin n)) where + /-- The order in which the remaining coordinates are revealed. -/ permutation : SourceRemainingPermutation D + /-- The rank of the coordinate currently being revealed. -/ position : Fin (Finset.univ \ D).card + /-- The revealed history for the chosen permutation prefix and coordinate. -/ history : FullCoordinateRevealHistory X Y n D (sourceRemainingPermutationPrefix D permutation position.castSucc) (sourceRemainingPermutationCoordinate D permutation position) + /-- Alice's answers on the already selected coordinates. -/ aliceAnswer : {i : Fin n // i ∈ D} → A + /-- Bob's answers on the already selected coordinates. -/ bobAnswer : {i : Fin n // i ∈ D} → B -private abbrev SourceHistoryFlagTuple +/-- A nested tuple representation of a source history flag. -/ +abbrev SourceHistoryFlagTuple (X Y A B : Type*) {n : ℕ} (D : Finset (Fin n)) := Σ π : SourceRemainingPermutation D, @@ -3551,7 +3573,8 @@ private abbrev SourceHistoryFlagTuple ({i : Fin n // i ∈ D} → A) × ({i : Fin n // i ∈ D} → B) -private def sourceHistoryFlagEquiv +/-- Convert between a bundled source history flag and its nested tuple representation. -/ +def sourceHistoryFlagEquiv {n : ℕ} (D : Finset (Fin n)) : SourceHistoryFlag X Y A B D ≃ SourceHistoryFlagTuple X Y A B D where toFun r := ⟨r.permutation, r.position, @@ -3563,7 +3586,7 @@ private def sourceHistoryFlagEquiv rcases t with ⟨π, k, r, α, β⟩ rfl -private noncomputable instance sourceHistoryFlagFintype +noncomputable instance sourceHistoryFlagFintype {n : ℕ} (D : Finset (Fin n)) : Fintype (SourceHistoryFlag X Y A B D) := by classical @@ -3595,12 +3618,14 @@ private theorem sourceHistoryFlag_sum simp only [sourceHistoryFlagEquiv, Equiv.symm_mk, Equiv.coe_fn_mk, Fintype.sum_sigma, Fintype.sum_prod_type] -private def sourceHistoryPermutationPositionWeight +/-- The uniform weight of a remaining permutation and position pair. -/ +def sourceHistoryPermutationPositionWeight {n : ℕ} (D : Finset (Fin n)) : ℝ := 1 / ((Fintype.card (SourceRemainingPermutation D) : ℝ) * ((Finset.univ \ D).card : ℝ)) -private def sourceHistoryRaw +/-- The unnormalized weight of a source history flag, including the selected wins. -/ +def sourceHistoryRaw (G : Game X Y A B) (n : ℕ) (D : Finset (Fin n)) (r : SourceHistoryFlag X Y A B D) : ℝ := @@ -4487,7 +4512,8 @@ attribute [local instance] Classical.propDecidable variable {X Y A B : Type*} variable [Fintype X] [Fintype Y] [Fintype A] [Fintype B] -private def sourceHistoryAcceptedQuestionMass +/-- The Born mass of winning answers for the flag's selected question pair. -/ +def sourceHistoryAcceptedQuestionMass (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D : Finset (Fin n)) (r : SourceHistoryFlag X Y A B D) diff --git a/LeanPool/QuantumParallelRepetition/Part05.lean b/LeanPool/QuantumParallelRepetition/Part05.lean index c3055a928f..4a4c1bb503 100644 --- a/LeanPool/QuantumParallelRepetition/Part05.lean +++ b/LeanPool/QuantumParallelRepetition/Part05.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.QuantumParallelRepetition.Part04 +public import LeanPool.QuantumParallelRepetition.Part04 /-! # Quantum parallel repetition, part 05 -/ +@[expose] public section + noncomputable section namespace QuantumParallelRepetition @@ -843,7 +846,8 @@ attribute [local instance] Classical.propDecidable variable {X Y A B : Type*} variable [Fintype X] [Fintype Y] [Fintype A] [Fintype B] -private def exactFairAliceQuestionEntropyIncrement +/-- Alice's question-to-mean entropy increment paired with Bob's question filter. -/ +def exactFairAliceQuestionEntropyIncrement (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D : Finset (Fin n)) (r : ExactHistoryFlag X Y A B D) (y : Y) : ℝ := @@ -858,7 +862,8 @@ private def exactFairAliceQuestionEntropyIncrement (exactBobQuestionFilter G n S D r.seed r.history r.bobAnswer y) -private def exactFairBobQuestionEntropyIncrement +/-- Bob's question-to-mean entropy increment paired with Alice's question filter. -/ +def exactFairBobQuestionEntropyIncrement (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D : Finset (Fin n)) (r : ExactHistoryFlag X Y A B D) (x : X) : ℝ := @@ -1739,7 +1744,8 @@ open scoped BigOperators attribute [local instance] Classical.propDecidable -private def exactInsertedRank +/-- Extend a side ranking by inserting the new coordinate at the chosen cut. -/ +def exactInsertedRank {M : Type*} [DecidableEq M] (i : M) (side : Finset M) (not_mem : i ∉ side) (rank : {j : M // j ∈ side} ≃ Fin side.card) @@ -2668,13 +2674,14 @@ open QuantumParallelRepetition.ClassicalInformation attribute [local instance] Classical.propDecidable -private def exactReverseAliceCanonicalPartition +/-- The reverse partition placing the side on Alice's side, with a free marked bit. -/ +def exactReverseAliceCanonicalPartition {M : Type*} [DecidableEq M] (side : Finset M) (coordinate : M) (ignored : Bool) : M → Bool := fun j => if j = coordinate then ignored else if j ∈ side then false else true -private theorem exactReverseAliceCanonicalPartition_side +theorem exactReverseAliceCanonicalPartition_side {M : Type*} [Fintype M] [DecidableEq M] (side : Finset M) (coordinate : M) (member : coordinate ∈ side) (ignored : Bool) : @@ -2734,13 +2741,14 @@ private def exactReverseAlicePartitionFiberEquiv right_inv ignored := by simp only [exactReverseAliceCanonicalPartition, ↓reduceIte] -private def exactReverseBobCanonicalPartition +/-- The reverse partition placing the side on Bob's side, with a free marked bit. -/ +def exactReverseBobCanonicalPartition {M : Type*} [DecidableEq M] (side : Finset M) (coordinate : M) (ignored : Bool) : M → Bool := fun j => if j = coordinate then ignored else if j ∈ side then true else false -private theorem exactReverseBobCanonicalPartition_side +theorem exactReverseBobCanonicalPartition_side {M : Type*} [Fintype M] [DecidableEq M] (side : Finset M) (coordinate : M) (member : coordinate ∈ side) (ignored : Bool) : @@ -3198,7 +3206,8 @@ theorem exactReverseBobConditionalSeedWeight_sum rw [exactReverseBobSide_marginal] exact div_self hside.ne' -private def exactForwardSeedLaw +/-- The normalized finite law of forward seeds. -/ +def exactForwardSeedLaw {M : Type*} [Fintype M] [DecidableEq M] (nonempty : 0 < Fintype.card M) : FiniteEventLaw (ExactForwardSeed M) where @@ -4558,7 +4567,8 @@ open QuantumParallelRepetition.ClassicalInformation attribute [local instance] Classical.propDecidable -private def exactInsertedOldSubtypeEquiv +/-- Identify the original side with the inserted side after excluding the new coordinate. -/ +def exactInsertedOldSubtypeEquiv {M : Type*} [DecidableEq M] (i : M) (side : Finset M) (not_mem : i ∉ side) : {j : M // j ∈ side} ≃ @@ -4577,7 +4587,8 @@ private def exactInsertedOldSubtypeEquiv apply Subtype.ext rfl -private def exactDeleteMarkedRank +/-- Remove the marked coordinate and its cut from an extended side ranking. -/ +def exactDeleteMarkedRank {M : Type*} [DecidableEq M] (i : M) (side : Finset M) (not_mem : i ∉ side) (rank : {j : M // j ∈ insert i side} ≃ @@ -4666,7 +4677,8 @@ open QuantumParallelRepetition.ClassicalInformation attribute [local instance] Classical.propDecidable -private def exactPermutationOfSideRank +/-- The side permutation whose inverse followed by the canonical ranking is `rank`. -/ +def exactPermutationOfSideRank {M : Type*} (side : Finset M) (rank : {j : M // j ∈ side} ≃ Fin side.card) : @@ -4684,7 +4696,7 @@ private theorem exactPermutationOfSideRank_rank simp only [exactPermutationOfSideRank, Equiv.symm_trans, Equiv.symm_symm, Equiv.trans_apply, Equiv.apply_symm_apply] -private theorem exactReverseAliceCanonicalPartition_otherSide +theorem exactReverseAliceCanonicalPartition_otherSide {M : Type*} [Fintype M] [DecidableEq M] (side : Finset M) (coordinate : M) (member : coordinate ∈ side) (ignored : Bool) : @@ -4702,7 +4714,7 @@ private theorem exactReverseAliceCanonicalPartition_otherSide exactReverseAliceCanonicalPartition, marked, belongs] -private theorem exactReverseBobCanonicalPartition_otherSide +theorem exactReverseBobCanonicalPartition_otherSide {M : Type*} [Fintype M] [DecidableEq M] (side : Finset M) (coordinate : M) (member : coordinate ∈ side) (ignored : Bool) : @@ -4720,7 +4732,7 @@ private theorem exactReverseBobCanonicalPartition_otherSide exactReverseBobCanonicalPartition, marked, belongs] -private theorem exactReverseAliceCanonicalPartition_card +theorem exactReverseAliceCanonicalPartition_card {M : Type*} [Fintype M] [DecidableEq M] (side : Finset M) (coordinate : M) (member : coordinate ∈ side) (ignored : Bool) : @@ -4732,7 +4744,7 @@ private theorem exactReverseAliceCanonicalPartition_card side coordinate member ignored) simpa only [exactLeft_coordinate_not_mem, not_false_eq_true, card_insert_of_notMem] using h -private theorem exactReverseBobCanonicalPartition_card +theorem exactReverseBobCanonicalPartition_card {M : Type*} [Fintype M] [DecidableEq M] (side : Finset M) (coordinate : M) (member : coordinate ∈ side) (ignored : Bool) : diff --git a/LeanPool/QuantumParallelRepetition/Part06.lean b/LeanPool/QuantumParallelRepetition/Part06.lean index b75355fb98..4d14f94cc5 100644 --- a/LeanPool/QuantumParallelRepetition/Part06.lean +++ b/LeanPool/QuantumParallelRepetition/Part06.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.QuantumParallelRepetition.Part05 +public import LeanPool.QuantumParallelRepetition.Part05 /-! # Quantum parallel repetition, part 06 -/ +@[expose] public section + noncomputable section namespace QuantumParallelRepetition diff --git a/LeanPool/QuantumParallelRepetition/Part07.lean b/LeanPool/QuantumParallelRepetition/Part07.lean index b448a99333..c1165e62c2 100644 --- a/LeanPool/QuantumParallelRepetition/Part07.lean +++ b/LeanPool/QuantumParallelRepetition/Part07.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.QuantumParallelRepetition.Part06 +public import LeanPool.QuantumParallelRepetition.Part06 /-! # Quantum parallel repetition, part 07 -/ +@[expose] public section + noncomputable section namespace QuantumParallelRepetition @@ -2226,7 +2229,8 @@ private theorem linarith [mul_nonneg Kmass_nonnegative (sub_nonneg.mpr diagonal_budget)] -private def dSVDensityRationalHeterogeneousStoppedCommonPrefixFailureCopy +/-- The joint failure vector at a stage preceding the stopping position. -/ +def dSVDensityRationalHeterogeneousStoppedCommonPrefixFailureCopy {S N d L : ℕ} (width : Fin S → ℝ) (schedule : Fin L → Fin S) (ξ ζ : BipartiteUnitVector d) diff --git a/LeanPool/QuantumParallelRepetition/Part08.lean b/LeanPool/QuantumParallelRepetition/Part08.lean index 0ab586daaf..c8eb495dc3 100644 --- a/LeanPool/QuantumParallelRepetition/Part08.lean +++ b/LeanPool/QuantumParallelRepetition/Part08.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.QuantumParallelRepetition.Part07 +public import LeanPool.QuantumParallelRepetition.Part07 /-! # Quantum parallel repetition, part 08 -/ +@[expose] public section + noncomputable section namespace QuantumParallelRepetition @@ -263,7 +266,8 @@ attribute [local instance] Classical.propDecidable variable {Ω T : Type*} [Fintype Ω] [Fintype T] [DecidableEq T] -private def exactFiniteFiberLift +/-- Reweight each projection fiber to its target mass while retaining its relative weights. -/ +def exactFiniteFiberLift (projection : Ω → T) (original : Ω → ℝ) (target : T → ℝ) (outcome : Ω) : ℝ := target (projection outcome) * original outcome / @@ -773,7 +777,8 @@ attribute [local instance] Classical.propDecidable variable {X Y A B : Type*} variable [Fintype X] [Fintype Y] [Fintype A] [Fintype B] -private def exactSourceAliceRefinedPOVM +/-- Alice's local source measurement obtained by purifying the coordinate refinement. -/ +def exactSourceAliceRefinedPOVM [DecidableEq A] (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D : Finset (Fin n)) (r : ExactHistoryFlag X Y A B D) @@ -783,7 +788,8 @@ private def exactSourceAliceRefinedPOVM exact purificationAlicePOVM (exactAliceRefinedPOVM G n S D r a₀ x) -private def exactSourceBobRefinedPOVM +/-- Bob's local source measurement obtained by purifying the coordinate refinement. -/ +def exactSourceBobRefinedPOVM [DecidableEq B] (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D : Finset (Fin n)) (r : ExactHistoryFlag X Y A B D) @@ -791,7 +797,8 @@ private def exactSourceBobRefinedPOVM POVM B (ExactBobLocalIndex G n S D r) := exactBobRefinedPOVM G n S D r b₀ y -private def exactSourceJointEffect +/-- The tensor product of the two refined local source effects. -/ +def exactSourceJointEffect [DecidableEq A] [DecidableEq B] (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D : Finset (Fin n)) (r : ExactHistoryFlag X Y A B D) @@ -804,7 +811,8 @@ private def exactSourceJointEffect (exactSourceAliceRefinedPOVM G n S D r a₀ x).effect a ⊗ₖ (exactSourceBobRefinedPOVM G n S D r b₀ y).effect b -private def exactSourceWinningEffect +/-- The sum of refined joint effects over answers accepted by the game predicate. -/ +def exactSourceWinningEffect [DecidableEq A] [DecidableEq B] (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D : Finset (Fin n)) (r : ExactHistoryFlag X Y A B D) @@ -955,7 +963,8 @@ attribute [local instance] Classical.propDecidable variable {X Y A B : Type*} variable [Fintype X] [Fintype Y] [Fintype A] [Fintype B] -private def exactSourceAcceptedCoordinateMass +/-- The postselected mass of outcomes with the specified code that win the selected coordinate. -/ +def exactSourceAcceptedCoordinateMass (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D : Finset (Fin n)) (t : ExactLocallySampleableTuple X Y A B D) : ℝ := @@ -2148,7 +2157,8 @@ def reindexedPOVM simpa only [Matrix.sum_apply, submatrix_apply, Matrix.one_apply, EmbeddingLike.apply_eq_iff_eq] using completed -private def twoBlockPOVM +/-- Combine two measurements as a direct-sum measurement on their local spaces. -/ +def twoBlockPOVM {C d e : Type} [Fintype C] [Fintype d] [Fintype e] [DecidableEq d] [DecidableEq e] (P : POVM C d) (Q : POVM C e) : @@ -2180,7 +2190,8 @@ def deterministicOutcomePOVM classical simp only [sum_ite_eq', mem_univ, ↓reduceIte] -private def pOVMChangeDecidableEq +/-- Transport a POVM between equality decisions while retaining every effect matrix. -/ +def pOVMChangeDecidableEq {C d : Type*} [Fintype C] [Fintype d] (source target : DecidableEq d) (P : @POVM C d inferInstance inferInstance source) : @@ -2200,7 +2211,8 @@ private def pOVMChangeDecidableEq simpa only [↓reduceIte] using completed · simpa only [same, ↓reduceIte] using completed -private def exactSourceAlicePaddedPOVM +/-- Pad Alice's refined measurement with deterministic outcomes on the unused blocks. -/ +def exactSourceAlicePaddedPOVM [DecidableEq A] (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D : Finset (Fin n)) (r : ExactHistoryFlag X Y A B D) @@ -2214,7 +2226,8 @@ private def exactSourceAlicePaddedPOVM (deterministicOutcomePOVM (d := ExactBobLocalIndex G n S D r) a₀)) -private def exactSourceBobPaddedPOVM +/-- Pad Bob's refined measurement with deterministic outcomes on the unused blocks. -/ +def exactSourceBobPaddedPOVM [DecidableEq B] (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) (D : Finset (Fin n)) (r : ExactHistoryFlag X Y A B D) diff --git a/LeanPool/QuantumParallelRepetition/Part09.lean b/LeanPool/QuantumParallelRepetition/Part09.lean index 1c1aeccbfb..db15a7af95 100644 --- a/LeanPool/QuantumParallelRepetition/Part09.lean +++ b/LeanPool/QuantumParallelRepetition/Part09.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.QuantumParallelRepetition.Part08 +public import LeanPool.QuantumParallelRepetition.Part08 /-! # Quantum parallel repetition, part 09 -/ +@[expose] public section + noncomputable section namespace QuantumParallelRepetition @@ -881,7 +884,8 @@ abbrev UnconditionalSelectedCopyLocalIndex (B d N m : ℕ) := Σ _ : Fin B × Fin d, Fin (N * m) -private def unconditionalSelectedCopyCleanedStage +/-- The selected mixed stage after applying its coherent local bucket resets. -/ +def unconditionalSelectedCopyCleanedStage {d N B m : ℕ} (Q : ℕ) (w : ℝ) (ξ ζ : BipartiteUnitVector d) @@ -904,7 +908,8 @@ private def unconditionalSelectedCopyIdealStage dSVDensityRationalPublicBucketPhysicalCoherentTargetState (N := N) (B := B) w m ξ ζ -private def unconditionalSelectedCopyRetainedWork +/-- Tensor the common failure prefix with the work retained after the selected stage. -/ +def unconditionalSelectedCopyRetainedWork {S N d L : ℕ} {τ : Type*} (width : Fin S → ℝ) (schedule : Fin L → Fin S) (ξ ζ : BipartiteUnitVector d) @@ -1211,7 +1216,8 @@ theorem unconditionalConjugatePureVector_norm nlinarith [norm_nonneg (unconditionalConjugatePureVector z), norm_nonneg z] -private def unconditionalConjugatePOVM +/-- Transpose every effect of a POVM to obtain the conjugate measurement. -/ +def unconditionalConjugatePOVM {A ι : Type*} [Fintype A] [Fintype ι] [DecidableEq ι] (P : POVM A ι) : POVM A ι where effect a := (P.effect a).transpose @@ -3137,7 +3143,8 @@ abbrev UnconditionalSourcePhysicalStoppingPhaseFiber DSVUniformDensityIndependentHistoryLocalIndex (L + 1) N d, Fin m -private def unconditionalSourcePhysicalStoppingPhaseHarmonicIndexEquiv +/-- Regroup phase, stopped history, and harmonic indices by their stopping flag. -/ +def unconditionalSourcePhysicalStoppingPhaseHarmonicIndexEquiv (S B N d L m : ℕ) : ((DSVDensityRationalPublicMultiscalePhaseIndex S B × DSVUniformDensityThresholdWholeHistoryLocalIndex N d L) × @@ -3156,7 +3163,8 @@ private def unconditionalSourcePhysicalStoppingPhaseHarmonicIndexEquiv rcases q with ⟨flag, ⟨⟨phase, history⟩, work⟩⟩ rfl -private def unconditionalSourcePhysicalStoppingTargetFirstIndexEquiv +/-- Convert the target-first index into stopping flags and their physical fibers. -/ +def unconditionalSourcePhysicalStoppingTargetFirstIndexEquiv (S B N d L m : ℕ) : Fin (d * dSVDensityRationalPublicMultiscalePhaseResidual @@ -3168,7 +3176,8 @@ private def unconditionalSourcePhysicalStoppingTargetFirstIndexEquiv (unconditionalSourcePhysicalStoppingPhaseHarmonicIndexEquiv S B N d L m) -private def unconditionalSourcePhysicalStoppingTargetFirstStateEquiv +/-- The bipartite isometry induced by the target-first stopping index equivalence. -/ +def unconditionalSourcePhysicalStoppingTargetFirstStateEquiv (S B N d L m : ℕ) : EuclideanSpace ℂ (Fin (d * @@ -3244,7 +3253,8 @@ theorem unconditionalSourcePhysicalStoppingBranch_sigmaContinuation Fintype.sum_prod_type, Fintype.sum_sigma, sum_ite_irrel, sum_const_zero, sum_ite_eq, mem_univ, ↓reduceIte] -private def unconditionalSourceFixedPureStoppedSigmaReindexedUnitary +/-- Transport a unitary matrix along an equivalence of its row and column indices. -/ +def unconditionalSourceFixedPureStoppedSigmaReindexedUnitary {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Fintype κ] [DecidableEq κ] (e : ι ≃ κ) (U : Matrix.unitaryGroup ι ℂ) : @@ -3266,7 +3276,8 @@ private def unconditionalSourceFixedPureStoppedSigmaReindexedUnitary (Matrix.mem_unitaryGroup_iff').mp U.property] exact (Matrix.reindexRingEquiv ℂ e).map_one -private def unconditionalSelectedMultiscalePhaseIndexEquiv +/-- Insert the selected phase into the family of phases at all other scales. -/ +def unconditionalSelectedMultiscalePhaseIndexEquiv {S B : ℕ} (scale : Fin (S + 1)) : (Fin B × Fin (Fintype.card (Fin S → Fin B))) ≃ DSVDensityRationalPublicMultiscalePhaseIndex (S + 1) B := @@ -3331,7 +3342,8 @@ private theorem unconditionalSelectedMultiscalePhase_EPR_apply simp only [ePRState, Fintype.card_pi, Fintype.card_fin, prod_const, card_univ, Nat.cast_pow, ofReal_inv, different, ↓reduceIte, selected, mul_ite, zero_mul, mul_zero, ite_self] -private def unconditionalActualMultiscalePhaseIndexEquiv +/-- Split the actual phase family into its selected phase and remaining phases. -/ +def unconditionalActualMultiscalePhaseIndexEquiv {S B : ℕ} (scale : Fin S) : (Fin B × Fin (Fintype.card (Fin (S - 1) → Fin B))) ≃ DSVDensityRationalPublicMultiscalePhaseIndex S B := by @@ -3361,7 +3373,8 @@ private theorem unconditionalActualMultiscalePhase_EPR_apply exact unconditionalSelectedMultiscalePhase_EPR_apply scale p q r t -private def unconditionalSourcePhysicalCleanedReindexedUnitary +/-- Reindex a cleaned unitary through an equivalence of its local index spaces. -/ +def unconditionalSourcePhysicalCleanedReindexedUnitary {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Fintype κ] [DecidableEq κ] @@ -3386,7 +3399,8 @@ private def unconditionalSourcePhysicalCleanedReindexedUnitary (Matrix.mem_unitaryGroup_iff').mp U.property] exact (Matrix.reindexRingEquiv ℂ e).map_one -private def unconditionalSourcePhysicalCleanedTargetFirstUnitary +/-- Transport a target-first unitary to the physical stopping fibers. -/ +def unconditionalSourcePhysicalCleanedTargetFirstUnitary (S B N d L m : ℕ) (U : Matrix.unitaryGroup (Fin (d * @@ -3547,7 +3561,8 @@ private theorem unconditionalSourcePhysicalStoppingTargetFirst_branch_apply width schedule ξ ζ r s φ ψ a b i k -private def unconditionalSourcePhysicalCleanedSelectedHistoryEquiv +/-- Split a history into the selected coordinate, its prefix, and its suffix. -/ +def unconditionalSourcePhysicalCleanedSelectedHistoryEquiv {L : ℕ} (j : Fin L) (β : Type*) : (Fin (L + 1) → β) ≃ β × ((Fin j.val → β) × (Fin (L - j.val) → β)) where @@ -3648,7 +3663,8 @@ private theorem unconditionalSourcePhysicalCleanedSelectedHistoryEquiv_hit j β f).1 = f j.castSucc := by rfl -private def unconditionalSourcePhysicalCleanedFullBilateralRegroup +/-- Group the selected pair together and retain the bilateral prefix and tail indices. -/ +def unconditionalSourcePhysicalCleanedFullBilateralRegroup {R : Type*} {B N d L m : ℕ} (j : Fin L) : ((UnconditionalSelectedCopyLocalIndex B d N m × ((Fin j.val → DSVUniformDensityThresholdLocalIndex N d) × @@ -3949,7 +3965,8 @@ abbrev UnconditionalSourceFlagControlledRetainedIndex ((Fin (L - j.val) → DSVUniformDensityThresholdLocalIndex N d) × R) -private def unconditionalSourceFlagControlledTensorUnitary +/-- The tensor product of two unitaries acting on paired local indices. -/ +def unconditionalSourceFlagControlledTensorUnitary {ι κ : Type} [Fintype ι] [DecidableEq ι] [Fintype κ] [DecidableEq κ] (U : Matrix.unitaryGroup ι ℂ) @@ -3958,7 +3975,8 @@ private def unconditionalSourceFlagControlledTensorUnitary ⟨(U : Matrix ι ι ℂ) ⊗ₖ (V : Matrix κ κ ℂ), Matrix.kronecker_mem_unitary U.property V.property⟩ -private def unconditionalSourceFlagControlledStagePhysicalIndexEquiv +/-- Regroup phase, threshold, spectral, and harmonic indices into the selected-copy index. -/ +def unconditionalSourceFlagControlledStagePhysicalIndexEquiv (B N d m : ℕ) : (Σ _ : Fin B, DSVUniformDensityThresholdLocalIndex N d × Fin m) ≃ @@ -3976,7 +3994,8 @@ private def unconditionalSourceFlagControlledStagePhysicalIndexEquiv simp only [finProdFinEquiv_symm_apply, Sigma.mk.injEq, heq_eq_eq, true_and] exact finProdFinEquiv.apply_symm_apply work -private def unconditionalSourceFlagControlledStageSpectralUnitary +/-- Apply the spectral unitary at each public phase, retaining the harmonic coordinate. -/ +def unconditionalSourceFlagControlledStageSpectralUnitary {B N d m : ℕ} (spectral : Matrix.unitaryGroup (DSVUniformDensityThresholdLocalIndex N d) ℂ) : @@ -3990,7 +4009,8 @@ private def unconditionalSourceFlagControlledStageSpectralUnitary unconditionalSourceFlagControlledTensorUnitary spectral (1 : Matrix.unitaryGroup (Fin m) ℂ))) -private def unconditionalSourceFlagControlledStageBucketUnitary +/-- Apply the unitary selected by the public phase and the accepted-rank bucket. -/ +def unconditionalSourceFlagControlledStageBucketUnitary {B N d m : ℕ} (Q : ℕ) (w : ℝ) (ξ : BipartiteUnitVector d) (A : Fin B → Option ℕ → Matrix.unitaryGroup (Fin (N * m)) ℂ) : @@ -4001,7 +4021,8 @@ private def unconditionalSourceFlagControlledStageBucketUnitary A q.1 (dSVDensityRationalPublicLogRankBucket Q q.1 (dSVDensityRationalPhysicalAcceptedRank w N ξ q.2))) -private def unconditionalSourceFlagControlledFullStageUnitary +/-- The controlled physical unitary at a selected stage of the scheduled source. -/ +def unconditionalSourceFlagControlledFullStageUnitary {S B N d L m : ℕ} {R : Type} [Fintype R] [DecidableEq R] (phaseSplit : DSVDensityRationalPublicMultiscalePhaseIndex S B ≃ @@ -4037,7 +4058,8 @@ private def unconditionalSourceFlagControlledFullStageUnitary unconditionalSourceFlagControlledStageSpectralUnitary (B := B) (m := m) spectral)) -private def unconditionalSourceFlagControlledFiniteStageDecoder +/-- The family of controlled decoding unitaries indexed by the stopping flag. -/ +def unconditionalSourceFlagControlledFiniteStageDecoder {S B N d L m : ℕ} {R : Type} [Fintype R] [DecidableEq R] (phaseSplit : DSVDensityRationalPublicMultiscalePhaseIndex S B ≃ @@ -5928,7 +5950,8 @@ abbrev IntegratorActualC485BranchSpace UnconditionalSelectedCopyLocalIndex B d N m) × IntegratorActualC485RetainedIndex S B N d L j) -private def integratorActualC485OriginalRetainedWork +/-- The original retained prefix and canonical phase tail at the selected stage. -/ +def integratorActualC485OriginalRetainedWork {S B N d L : ℕ} (width : Fin S → ℝ) (schedule : Fin L → Fin S) (ξ ζ : BipartiteUnitVector d) (j : Fin L) : diff --git a/LeanPool/QuantumParallelRepetition/Part10.lean b/LeanPool/QuantumParallelRepetition/Part10.lean index 9137015dd3..9843fd4a18 100644 --- a/LeanPool/QuantumParallelRepetition/Part10.lean +++ b/LeanPool/QuantumParallelRepetition/Part10.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.QuantumParallelRepetition.Part09 +public import LeanPool.QuantumParallelRepetition.Part09 +import Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Order /-! # Quantum parallel repetition, part 10 -/ +@[expose] public section + noncomputable section namespace QuantumParallelRepetition diff --git a/LeanPool/QuantumParallelRepetition/Part11.lean b/LeanPool/QuantumParallelRepetition/Part11.lean index a43790cebc..9ac30cdf5f 100644 --- a/LeanPool/QuantumParallelRepetition/Part11.lean +++ b/LeanPool/QuantumParallelRepetition/Part11.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.QuantumParallelRepetition.Part10 +public import LeanPool.QuantumParallelRepetition.Part10 /-! # Quantum parallel repetition, part 11 -/ +@[expose] public section + noncomputable section namespace QuantumParallelRepetition @@ -295,7 +298,8 @@ theorem unconditionalActualC485SourceSelectedDecodedWinningBorn open QuantumParallelRepetition.ClassicalSampling -private def unconditionalActualFairSourceAliceTarget +/-- Alice's target vector determined by the shared source flag and her question. -/ +def unconditionalActualFairSourceAliceTarget {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) @@ -312,7 +316,8 @@ private def unconditionalActualFairSourceAliceTarget (exactSourceAlicePermutationHistory D denominator numerator nonempty flag x) x -private def unconditionalActualFairSourceBobTarget +/-- Bob's target vector determined by the shared source flag and his question. -/ +def unconditionalActualFairSourceBobTarget {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] (G : Game X Y A B) (n : ℕ) (S : Strategy (G.repeat n)) @@ -805,7 +810,8 @@ private def unconditionalActualC485SelectedVerifierBorn (directDSVActualLocalPOVMWinningEffect G PA PB x y ⊗ₖ (1 : Matrix T T ℂ))) z -private def unconditionalActualC485RawPhysicalVerifierBorn +/-- The quadratic expectation of the physical winning effect in the supplied vector. -/ +def unconditionalActualC485RawPhysicalVerifierBorn {X Y A B ι κ : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [Fintype ι] [DecidableEq ι] [Fintype κ] [DecidableEq κ] diff --git a/LeanPool/QuantumParallelRepetition/Part12.lean b/LeanPool/QuantumParallelRepetition/Part12.lean index 1166cadbf7..2c765ded6b 100644 --- a/LeanPool/QuantumParallelRepetition/Part12.lean +++ b/LeanPool/QuantumParallelRepetition/Part12.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 OpenAI and Dean Cureton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Dean Cureton -/ +module -import LeanPool.QuantumParallelRepetition.Part11 +public import LeanPool.QuantumParallelRepetition.Part11 /-! # Quantum parallel repetition, part 12 -/ +@[expose] public section + noncomputable section namespace QuantumParallelRepetition diff --git a/LeanPool/QuasiBorelSpaces.lean b/LeanPool/QuasiBorelSpaces.lean index 1c42350263..d410eed063 100644 --- a/LeanPool/QuasiBorelSpaces.lean +++ b/LeanPool/QuasiBorelSpaces.lean @@ -3,39 +3,41 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.Basic -import LeanPool.QuasiBorelSpaces.Chain -import LeanPool.QuasiBorelSpaces.Cont -import LeanPool.QuasiBorelSpaces.Defs -import LeanPool.QuasiBorelSpaces.ENNReal -import LeanPool.QuasiBorelSpaces.Finset -import LeanPool.QuasiBorelSpaces.FlatReal -import LeanPool.QuasiBorelSpaces.Functor -import LeanPool.QuasiBorelSpaces.Hom -import LeanPool.QuasiBorelSpaces.IsHomDiagonal -import LeanPool.QuasiBorelSpaces.Lift -import LeanPool.QuasiBorelSpaces.List -import LeanPool.QuasiBorelSpaces.MeasureTheory -import LeanPool.QuasiBorelSpaces.Multiset -import LeanPool.QuasiBorelSpaces.Nat -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder -import LeanPool.QuasiBorelSpaces.OmegaHom -import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace -import LeanPool.QuasiBorelSpaces.Option -import LeanPool.QuasiBorelSpaces.Pi -import LeanPool.QuasiBorelSpaces.PreProbabilityMeasure -import LeanPool.QuasiBorelSpaces.ProbabilityMeasure -import LeanPool.QuasiBorelSpaces.Prod -import LeanPool.QuasiBorelSpaces.Prop -import LeanPool.QuasiBorelSpaces.Quotient -import LeanPool.QuasiBorelSpaces.Rose -import LeanPool.QuasiBorelSpaces.RoseTree -import LeanPool.QuasiBorelSpaces.SeparatesPoints -import LeanPool.QuasiBorelSpaces.Sigma -import LeanPool.QuasiBorelSpaces.Subtype -import LeanPool.QuasiBorelSpaces.Sum -import LeanPool.QuasiBorelSpaces.UnitInterval +public import LeanPool.QuasiBorelSpaces.Basic +public import LeanPool.QuasiBorelSpaces.Chain +public import LeanPool.QuasiBorelSpaces.Cont +public import LeanPool.QuasiBorelSpaces.Defs +public import LeanPool.QuasiBorelSpaces.ENNReal +public import LeanPool.QuasiBorelSpaces.Finset +public import LeanPool.QuasiBorelSpaces.FlatReal +public import LeanPool.QuasiBorelSpaces.Functor +public import LeanPool.QuasiBorelSpaces.Hom +public import LeanPool.QuasiBorelSpaces.IsHomDiagonal +public import LeanPool.QuasiBorelSpaces.Lift +public import LeanPool.QuasiBorelSpaces.List +public import LeanPool.QuasiBorelSpaces.MeasureTheory +public import LeanPool.QuasiBorelSpaces.Multiset +public import LeanPool.QuasiBorelSpaces.Nat +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder +public import LeanPool.QuasiBorelSpaces.OmegaHom +public import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace +public import LeanPool.QuasiBorelSpaces.Option +public import LeanPool.QuasiBorelSpaces.Pi +public import LeanPool.QuasiBorelSpaces.PreProbabilityMeasure +public import LeanPool.QuasiBorelSpaces.ProbabilityMeasure +public import LeanPool.QuasiBorelSpaces.Prod +public import LeanPool.QuasiBorelSpaces.Prop +public import LeanPool.QuasiBorelSpaces.Quotient +public import LeanPool.QuasiBorelSpaces.Rose +public import LeanPool.QuasiBorelSpaces.RoseTree +public import LeanPool.QuasiBorelSpaces.SeparatesPoints +public import LeanPool.QuasiBorelSpaces.Sigma +public import LeanPool.QuasiBorelSpaces.Subtype +public import LeanPool.QuasiBorelSpaces.Sum +public import LeanPool.QuasiBorelSpaces.UnitInterval +import Mathlib.Tactic.Positivity.Finset /-! # Quasi-Borel Spaces @@ -48,6 +50,8 @@ Tags: probability, category-theory, measure-theory, denotational-semantics MSC: 60A05, 18C50, 68Q55 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/QuasiBorelSpaces/Basic.lean b/LeanPool/QuasiBorelSpaces/Basic.lean index c5e9bdad12..49aa0e651e 100644 --- a/LeanPool/QuasiBorelSpaces/Basic.lean +++ b/LeanPool/QuasiBorelSpaces/Basic.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.Defs -import LeanPool.QuasiBorelSpaces.MeasureTheory.Pack -import Mathlib.MeasureTheory.Constructions.Polish.Basic +public import LeanPool.QuasiBorelSpaces.Defs +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Pack /-! # LeanPool.QuasiBorelSpaces.Basic @@ -14,6 +14,8 @@ import Mathlib.MeasureTheory.Constructions.Polish.Basic Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Basic`. -/ +@[expose] public section + open scoped MeasureTheory diff --git a/LeanPool/QuasiBorelSpaces/Chain.lean b/LeanPool/QuasiBorelSpaces/Chain.lean index fedafc417c..59e8556fe8 100644 --- a/LeanPool/QuasiBorelSpaces/Chain.lean +++ b/LeanPool/QuasiBorelSpaces/Chain.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import LeanPool.QuasiBorelSpaces.Defs import LeanPool.QuasiBorelSpaces.Basic -import LeanPool.QuasiBorelSpaces.Defs /-! # LeanPool.QuasiBorelSpaces.Chain @@ -13,6 +14,8 @@ import LeanPool.QuasiBorelSpaces.Defs Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Chain`. -/ +@[expose] public section + namespace QuasiBorelSpace.Chain diff --git a/LeanPool/QuasiBorelSpaces/Cont.lean b/LeanPool/QuasiBorelSpaces/Cont.lean index 6d5c0ec64a..3e076a0b37 100644 --- a/LeanPool/QuasiBorelSpaces/Cont.lean +++ b/LeanPool/QuasiBorelSpaces/Cont.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.OmegaHom +public import LeanPool.QuasiBorelSpaces.OmegaHom +import LeanPool.QuasiBorelSpaces.Basic /-! # LeanPool.QuasiBorelSpaces.Cont @@ -12,6 +14,8 @@ import LeanPool.QuasiBorelSpaces.OmegaHom Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Cont`. -/ +@[expose] public section + open QuasiBorelSpace open OmegaCompletePartialOrder @@ -37,7 +41,7 @@ instance : PartialOrder (Cont R A) := simp only [mk.injEq, imp_self]) /-- The underlying continuation as an order homomorphism. -/ -private def applyOrderHom : Cont R A →o ((A →ω𝒒 R) →ω𝒒 R) where +def applyOrderHom : Cont R A →o ((A →ω𝒒 R) →ω𝒒 R) where toFun := apply monotone' _ _ h := h diff --git a/LeanPool/QuasiBorelSpaces/Defs.lean b/LeanPool/QuasiBorelSpaces/Defs.lean index ec0269c643..494567ed80 100644 --- a/LeanPool/QuasiBorelSpaces/Defs.lean +++ b/LeanPool/QuasiBorelSpaces/Defs.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic +public import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Instances import LeanPool.QuasiBorelSpaces.MeasureTheory.Cases -import Mathlib.Basic.Real.Basic -import Mathlib.MeasureTheory.MeasurableSpace.Defs -import LeanPool.QuasiBorelSpaces.MeasureTheory.Instances /-! @@ -17,6 +16,8 @@ import LeanPool.QuasiBorelSpaces.MeasureTheory.Instances This file defines the concept of a quasi-borel space, as given by [HeunenKSY17]. -/ +@[expose] public section + open scoped MeasureTheory /-- diff --git a/LeanPool/QuasiBorelSpaces/ENNReal.lean b/LeanPool/QuasiBorelSpaces/ENNReal.lean index ef5fa50f8d..8485da85d2 100644 --- a/LeanPool/QuasiBorelSpaces/ENNReal.lean +++ b/LeanPool/QuasiBorelSpaces/ENNReal.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace import LeanPool.QuasiBorelSpaces.Basic -import Mathlib.MeasureTheory.Constructions.BorelSpace.Real -import LeanPool.QuasiBorelSpaces.Defs -import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace /-! # LeanPool.QuasiBorelSpaces.ENNReal @@ -15,6 +14,8 @@ import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.ENNReal`. -/ +@[expose] public section + namespace QuasiBorelSpace.ENNReal diff --git a/LeanPool/QuasiBorelSpaces/Finset.lean b/LeanPool/QuasiBorelSpaces/Finset.lean index 0346833a94..071db6f945 100644 --- a/LeanPool/QuasiBorelSpaces/Finset.lean +++ b/LeanPool/QuasiBorelSpaces/Finset.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.Multiset -import Mathlib.SetTheory.Cardinal.Order +public import LeanPool.QuasiBorelSpaces.Multiset +public import LeanPool.QuasiBorelSpaces.Subtype +import LeanPool.QuasiBorelSpaces.Basic +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.QuasiBorelSpaces.Finset @@ -13,6 +16,8 @@ import Mathlib.SetTheory.Cardinal.Order Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Finset`. -/ +@[expose] public section + namespace QuasiBorelSpace.Finset variable @@ -20,7 +25,8 @@ variable {B : Type*} [QuasiBorelSpace B] {C : Type*} [QuasiBorelSpace C] -private irreducible_def toSubtype : Finset A → { xs : Multiset A // Multiset.Nodup xs } +/-- View a finite set as its underlying nodup multiset. -/ +irreducible_def toSubtype : Finset A → { xs : Multiset A // Multiset.Nodup xs } | ⟨x, h⟩ => ⟨x, h⟩ private irreducible_def ofSubtype : { xs : Multiset A // Multiset.Nodup xs } → Finset A diff --git a/LeanPool/QuasiBorelSpaces/FlatReal.lean b/LeanPool/QuasiBorelSpaces/FlatReal.lean index 0c3eebd3ea..089c1a350f 100644 --- a/LeanPool/QuasiBorelSpaces/FlatReal.lean +++ b/LeanPool/QuasiBorelSpaces/FlatReal.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Basic -import Mathlib.MeasureTheory.Measure.Haar.OfBasis -import Mathlib.MeasureTheory.Measure.MeasureSpaceDef -import Mathlib.MeasureTheory.Measure.Typeclasses.SFinite +public import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis /-! # LeanPool.QuasiBorelSpaces.FlatReal @@ -16,6 +15,8 @@ import Mathlib.MeasureTheory.Measure.Typeclasses.SFinite Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.FlatReal`. -/ +@[expose] public section + open MeasureTheory open MeasureSpace diff --git a/LeanPool/QuasiBorelSpaces/Functor.lean b/LeanPool/QuasiBorelSpaces/Functor.lean index 0a5a434324..d93766fa36 100644 --- a/LeanPool/QuasiBorelSpaces/Functor.lean +++ b/LeanPool/QuasiBorelSpaces/Functor.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.Hom -import LeanPool.QuasiBorelSpaces.Nat -import LeanPool.QuasiBorelSpaces.Pi -import LeanPool.QuasiBorelSpaces.Subtype +public import LeanPool.QuasiBorelSpaces.Hom +public import LeanPool.QuasiBorelSpaces.Pi +public import LeanPool.QuasiBorelSpaces.Subtype +public import LeanPool.QuasiBorelSpaces.Basic /-! # LeanPool.QuasiBorelSpaces.Functor @@ -15,6 +16,8 @@ import LeanPool.QuasiBorelSpaces.Subtype Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Functor`. -/ +@[expose] public section + namespace QuasiBorelSpace /-- @@ -69,7 +72,7 @@ attribute [reducible, instance] Sequence.quasiBorelSpace /-- The composition of a `Functor` with a `Sequence`. -/ structure Comp (F) [Functor F] (S) [Sequence S] (n : ℕ) where - private mk :: + mk :: /-- The underlying element of `F (S n)`. -/ get : F (S n) @@ -147,7 +150,8 @@ lemma toFun_eq_coe (f : Limit S) : toFun f = ⇑f := rfl @[simp] lemma project_coe (n) (f : Limit S) : Sequence.project n (f (n + 1)) = f n := f.property n -private def toSubtype {S} [Sequence S] (x : Limit S) +/-- View a sequence limit as a compatible family of coordinates. -/ +def toSubtype {S} [Sequence S] (x : Limit S) : { f : ∀ n, S n // ∀ n, Sequence.project n (f (n + 1)) = f n } := ⟨x.toFun, x.property⟩ @@ -172,19 +176,25 @@ lemma isHom_coe end Limit -private structure Bundle.{u} : Type _ where +universe u + +/-- A type bundled with its quasi-Borel space structure. -/ +structure Bundle : Type _ where + /-- The underlying type of a bundled quasi-Borel space. -/ Carrier : Type u + /-- The quasi-Borel structure on the bundled carrier. -/ [quasiBorelSpace : QuasiBorelSpace Carrier] attribute [local instance] Bundle.quasiBorelSpace -private def Iter₀ (F) [Functor F] : ℕ → Bundle +/-- Iterate the functor starting at the one-point quasi-Borel space. -/ +def Iter₀ (F) [Functor F] : ℕ → Bundle | 0 => .mk PUnit | n + 1 => .mk (F (Iter₀ F n).Carrier) /-- The `Sequence` obtained by iterating a `Functor`. -/ structure Iter (F) [Functor F] (n : ℕ) : Type* where - private mk :: + mk :: /-- The underlying element at the `n`th iterate. -/ get : (Iter₀ F n).Carrier @@ -204,10 +214,10 @@ lemma isHom_mk {n} : IsHom (mk (F := F) (n := n)) := by simp only [isHom_to_lift, isHom_id'] /-- The underlying-value projection as a quasi-Borel homomorphism. -/ -private def getHom {n} : Iter F n →𝒒 (Iter₀ F n).Carrier := .mk get +def getHom {n} : Iter F n →𝒒 (Iter₀ F n).Carrier := .mk get /-- The wrapper constructor as a quasi-Borel homomorphism. -/ -private def mkHom {n} : (Iter₀ F n).Carrier →𝒒 Iter F n := .mk mk +def mkHom {n} : (Iter₀ F n).Carrier →𝒒 Iter F n := .mk mk private lemma getHom_comp_mkHom {n} : (getHom (F := F) (n := n)).comp (mkHom (F := F) (n := n)) = .id := by @@ -255,7 +265,8 @@ lemma unsucc_succ {n} (x : F (Iter F n)) : unsucc (succ x) = x := by lemma succ_injective {n} {x y : F (Iter F n)} (h : succ x = succ y) : x = y := by rw [← unsucc_succ x, ← unsucc_succ y, h] -private def project : ∀ n, Iter F (n + 1) →𝒒 Iter F n +/-- The projection between successive iterates of the functor. -/ +def project : ∀ n, Iter F (n + 1) →𝒒 Iter F n | 0 => .mk fun _ ↦ .zero | n + 1 => succ.comp ((Functor.map (project n)).comp unsucc) @@ -313,7 +324,7 @@ end Continuous /-- The greatest fixed point of a `Functor`. -/ structure Nu (F) [Functor F] where - private mk :: + mk :: /-- The underlying compatible sequence of finite iterates. -/ get : Limit (Iter F) @@ -330,8 +341,9 @@ lemma isHom_get : IsHom (get (F := F)) := lemma isHom_mk : IsHom (mk (F := F)) := by simp only [isHom_to_lift (A := Nu F), isHom_id'] +/-- Shift a compatible family to a family in the functor-composed sequence. -/ @[simps] -private def shift : Limit (Iter F) →𝒒 Limit (Comp F (Iter F)) where +def shift : Limit (Iter F) →𝒒 Limit (Comp F (Iter F)) where toFun x := { toFun n := .mk (Iter.unsucc (x (n + 1))) property n := by @@ -343,8 +355,9 @@ private def shift : Limit (Iter F) →𝒒 Limit (Comp F (Iter F)) where rw [this] } +/-- Recover a compatible family from the functor-composed sequence. -/ @[simps -fullyApplied] -private def unshift : Limit (Comp F (Iter F)) →𝒒 Limit (Iter F) where +def unshift : Limit (Comp F (Iter F)) →𝒒 Limit (Iter F) where toFun x := { toFun | 0 => .zero diff --git a/LeanPool/QuasiBorelSpaces/Hom.lean b/LeanPool/QuasiBorelSpaces/Hom.lean index 8237189b6e..b8d63d809f 100644 --- a/LeanPool/QuasiBorelSpaces/Hom.lean +++ b/LeanPool/QuasiBorelSpaces/Hom.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.Prod -import LeanPool.QuasiBorelSpaces.Defs +public import LeanPool.QuasiBorelSpaces.Prod +import LeanPool.QuasiBorelSpaces.Basic /-! @@ -16,6 +17,8 @@ This file defines the exponential object in the category of quasi-borel spaces. See [HeunenKSY17], Proposition 18. -/ +@[expose] public section + open QuasiBorelSpace /-- The type of morphisms between `QuasiBorelSpace`s. -/ diff --git a/LeanPool/QuasiBorelSpaces/IsHomDiagonal.lean b/LeanPool/QuasiBorelSpaces/IsHomDiagonal.lean index 290b530fe0..7c7d4a7122 100644 --- a/LeanPool/QuasiBorelSpaces/IsHomDiagonal.lean +++ b/LeanPool/QuasiBorelSpaces/IsHomDiagonal.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import LeanPool.QuasiBorelSpaces.Sum +import LeanPool.QuasiBorelSpaces.Basic import LeanPool.QuasiBorelSpaces.Prop -import LeanPool.QuasiBorelSpaces.Sum -import Mathlib.MeasureTheory.Constructions.BorelSpace.Real /-! # LeanPool.QuasiBorelSpaces.IsHomDiagonal @@ -14,6 +15,8 @@ import Mathlib.MeasureTheory.Constructions.BorelSpace.Real Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.IsHomDiagonal`. -/ +@[expose] public section + namespace QuasiBorelSpace variable diff --git a/LeanPool/QuasiBorelSpaces/Lift.lean b/LeanPool/QuasiBorelSpaces/Lift.lean index 29c37abb06..07a609131f 100644 --- a/LeanPool/QuasiBorelSpaces/Lift.lean +++ b/LeanPool/QuasiBorelSpaces/Lift.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import LeanPool.QuasiBorelSpaces.Defs import LeanPool.QuasiBorelSpaces.Basic /-! @@ -12,6 +14,8 @@ import LeanPool.QuasiBorelSpaces.Basic Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Lift`. -/ +@[expose] public section + variable {A B : Type*} [QuasiBorelSpace A] [QuasiBorelSpace B] namespace QuasiBorelSpace.ULift diff --git a/LeanPool/QuasiBorelSpaces/List.lean b/LeanPool/QuasiBorelSpaces/List.lean index 572e25d873..1a4c2e2176 100644 --- a/LeanPool/QuasiBorelSpaces/List.lean +++ b/LeanPool/QuasiBorelSpaces/List.lean @@ -3,17 +3,16 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.Hom -import LeanPool.QuasiBorelSpaces.IsHomDiagonal -import LeanPool.QuasiBorelSpaces.List.Encoding -import LeanPool.QuasiBorelSpaces.MeasureTheory.List -import LeanPool.QuasiBorelSpaces.Option -import LeanPool.QuasiBorelSpaces.Nat -import LeanPool.QuasiBorelSpaces.Pi -import LeanPool.QuasiBorelSpaces.ProbabilityMeasure -import LeanPool.QuasiBorelSpaces.SeparatesPoints -import LeanPool.QuasiBorelSpaces.Sigma +public import LeanPool.QuasiBorelSpaces.List.Encoding +public import LeanPool.QuasiBorelSpaces.MeasureTheory.List +public import LeanPool.QuasiBorelSpaces.Option +public import LeanPool.QuasiBorelSpaces.Nat +public import LeanPool.QuasiBorelSpaces.ProbabilityMeasure +import LeanPool.QuasiBorelSpaces.Basic +import LeanPool.QuasiBorelSpaces.Prop +import Mathlib.Tactic.Positivity.Finset /-! # Lists over Quasi-Borel Spaces @@ -33,6 +32,8 @@ on lists are homomorphisms. * Set-like operations (`insert`, `union`, `erase`, `diff`) are homomorphisms -/ +@[expose] public section + variable {A B C : Type*} [QuasiBorelSpace A] [QuasiBorelSpace B] [QuasiBorelSpace C] namespace List.Encoding diff --git a/LeanPool/QuasiBorelSpaces/List/Encoding.lean b/LeanPool/QuasiBorelSpaces/List/Encoding.lean index 2c083beba5..ba60bfd297 100644 --- a/LeanPool/QuasiBorelSpaces/List/Encoding.lean +++ b/LeanPool/QuasiBorelSpaces/List/Encoding.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Tactic.Lemma -import Mathlib.Tactic.TypeStar -import Mathlib.Data.Nat.Notation -import Mathlib.Data.Fin.Basic +public import Mathlib.Data.Nat.Notation +public import Aesop.BuiltinRules +import Mathlib.Tactic.Attr.Core +import Mathlib.Tactic.Push /-! # LeanPool.QuasiBorelSpaces.List.Encoding @@ -15,6 +16,8 @@ import Mathlib.Data.Fin.Basic Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.List.Encoding`. -/ +@[expose] public section + namespace List diff --git a/LeanPool/QuasiBorelSpaces/MeasureTheory.lean b/LeanPool/QuasiBorelSpaces/MeasureTheory.lean index 12cf80c39b..a8913db24a 100644 --- a/LeanPool/QuasiBorelSpaces/MeasureTheory.lean +++ b/LeanPool/QuasiBorelSpaces/MeasureTheory.lean @@ -3,18 +3,21 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ -import LeanPool.QuasiBorelSpaces.MeasureTheory.Cases -import LeanPool.QuasiBorelSpaces.MeasureTheory.Instances -import LeanPool.QuasiBorelSpaces.MeasureTheory.List -import LeanPool.QuasiBorelSpaces.MeasureTheory.Measure -import LeanPool.QuasiBorelSpaces.MeasureTheory.Option -import LeanPool.QuasiBorelSpaces.MeasureTheory.Pack -import LeanPool.QuasiBorelSpaces.MeasureTheory.ProbabilityMeasure -import LeanPool.QuasiBorelSpaces.MeasureTheory.Quantile -import LeanPool.QuasiBorelSpaces.MeasureTheory.Randomization -import LeanPool.QuasiBorelSpaces.MeasureTheory.Sigma -import LeanPool.QuasiBorelSpaces.MeasureTheory.StandardBorelSpace -import LeanPool.QuasiBorelSpaces.MeasureTheory.Sum +module + +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Cases +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Instances +public import LeanPool.QuasiBorelSpaces.MeasureTheory.List +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Measure +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Option +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Pack +public import LeanPool.QuasiBorelSpaces.MeasureTheory.ProbabilityMeasure +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Quantile +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Randomization +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Sigma +public import LeanPool.QuasiBorelSpaces.MeasureTheory.StandardBorelSpace +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Sum +import Mathlib.Tactic.Positivity.Finset /-! # Measure-theoretic helpers @@ -23,3 +26,5 @@ Re-exports the measure-theoretic helpers used by the quasi-Borel space formalization: standard Borel spaces, packing of measurable spaces, randomization of probability measures, and quantile / CDF infrastructure. -/ + +@[expose] public section diff --git a/LeanPool/QuasiBorelSpaces/MeasureTheory/Cases.lean b/LeanPool/QuasiBorelSpaces/MeasureTheory/Cases.lean index 7b11737d81..4610e31bbc 100644 --- a/LeanPool/QuasiBorelSpaces/MeasureTheory/Cases.lean +++ b/LeanPool/QuasiBorelSpaces/MeasureTheory/Cases.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.MeasureTheory.MeasurableSpace.Constructions +public import Mathlib.MeasureTheory.MeasurableSpace.Constructions /-! # LeanPool.QuasiBorelSpaces.MeasureTheory.Cases @@ -12,6 +13,8 @@ import Mathlib.MeasureTheory.MeasurableSpace.Constructions Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.MeasureTheory.Cases`. -/ +@[expose] public section + open scoped MeasureTheory diff --git a/LeanPool/QuasiBorelSpaces/MeasureTheory/Instances.lean b/LeanPool/QuasiBorelSpaces/MeasureTheory/Instances.lean index 9992e802f2..cca597fe48 100644 --- a/LeanPool/QuasiBorelSpaces/MeasureTheory/Instances.lean +++ b/LeanPool/QuasiBorelSpaces/MeasureTheory/Instances.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.MeasureTheory.MeasurableSpace.Defs +public import Mathlib.MeasureTheory.MeasurableSpace.Defs /-! # LeanPool.QuasiBorelSpaces.MeasureTheory.Instances @@ -12,6 +13,8 @@ import Mathlib.MeasureTheory.MeasurableSpace.Defs Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.MeasureTheory.Instances`. -/ +@[expose] public section + namespace MeasureTheory instance instMeasurableSpacePEmptyLeanPool : MeasurableSpace PEmpty := ⊤ diff --git a/LeanPool/QuasiBorelSpaces/MeasureTheory/List.lean b/LeanPool/QuasiBorelSpaces/MeasureTheory/List.lean index 2e6f89cfd2..37ee221e6c 100644 --- a/LeanPool/QuasiBorelSpaces/MeasureTheory/List.lean +++ b/LeanPool/QuasiBorelSpaces/MeasureTheory/List.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Tactic.FunProp +public import Mathlib.MeasureTheory.MeasurableSpace.Constructions +public import LeanPool.QuasiBorelSpaces.List.Encoding import LeanPool.QuasiBorelSpaces.MeasureTheory.Sigma -import Mathlib.MeasureTheory.MeasurableSpace.Constructions -import LeanPool.QuasiBorelSpaces.List.Encoding /-! # LeanPool.QuasiBorelSpaces.MeasureTheory.List @@ -15,6 +15,8 @@ import LeanPool.QuasiBorelSpaces.List.Encoding Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.MeasureTheory.List`. -/ +@[expose] public section + variable {A : Type*} [MeasurableSpace A] diff --git a/LeanPool/QuasiBorelSpaces/MeasureTheory/Measure.lean b/LeanPool/QuasiBorelSpaces/MeasureTheory/Measure.lean index f7a67b755c..2a75489db3 100644 --- a/LeanPool/QuasiBorelSpaces/MeasureTheory/Measure.lean +++ b/LeanPool/QuasiBorelSpaces/MeasureTheory/Measure.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Option +public import Mathlib.Probability.Kernel.Defs import Mathlib.Probability.Kernel.MeasurableLIntegral -import LeanPool.QuasiBorelSpaces.MeasureTheory.Option -import Mathlib.Probability.Kernel.Defs /-! # LeanPool.QuasiBorelSpaces.MeasureTheory.Measure @@ -14,6 +15,8 @@ import Mathlib.Probability.Kernel.Defs Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.MeasureTheory.Measure`. -/ +@[expose] public section + namespace MeasureTheory.Measure diff --git a/LeanPool/QuasiBorelSpaces/MeasureTheory/Option.lean b/LeanPool/QuasiBorelSpaces/MeasureTheory/Option.lean index 1eedae5874..30b92af021 100644 --- a/LeanPool/QuasiBorelSpaces/MeasureTheory/Option.lean +++ b/LeanPool/QuasiBorelSpaces/MeasureTheory/Option.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import Mathlib.MeasureTheory.Constructions.Polish.Basic import LeanPool.QuasiBorelSpaces.MeasureTheory.StandardBorelSpace -import Mathlib.MeasureTheory.Constructions.Polish.Basic import LeanPool.QuasiBorelSpaces.MeasureTheory.Sum /-! @@ -14,6 +15,8 @@ import LeanPool.QuasiBorelSpaces.MeasureTheory.Sum Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.MeasureTheory.Option`. -/ +@[expose] public section + variable {A B C : Type*} [MeasurableSpace A] [MeasurableSpace B] [MeasurableSpace C] diff --git a/LeanPool/QuasiBorelSpaces/MeasureTheory/Pack.lean b/LeanPool/QuasiBorelSpaces/MeasureTheory/Pack.lean index 53ed685482..e7623d4b50 100644 --- a/LeanPool/QuasiBorelSpaces/MeasureTheory/Pack.lean +++ b/LeanPool/QuasiBorelSpaces/MeasureTheory/Pack.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.MeasureTheory.Constructions.Polish.EmbeddingReal -import Mathlib.MeasureTheory.Constructions.Polish.Basic +public import Mathlib.MeasureTheory.Constructions.Polish.EmbeddingReal /-! # LeanPool.QuasiBorelSpaces.MeasureTheory.Pack @@ -13,6 +13,8 @@ import Mathlib.MeasureTheory.Constructions.Polish.Basic Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.MeasureTheory.Pack`. -/ +@[expose] public section + namespace MeasureTheory diff --git a/LeanPool/QuasiBorelSpaces/MeasureTheory/ProbabilityMeasure.lean b/LeanPool/QuasiBorelSpaces/MeasureTheory/ProbabilityMeasure.lean index a3033f8203..a6405ebbdc 100644 --- a/LeanPool/QuasiBorelSpaces/MeasureTheory/ProbabilityMeasure.lean +++ b/LeanPool/QuasiBorelSpaces/MeasureTheory/ProbabilityMeasure.lean @@ -3,19 +3,11 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure import Mathlib.Probability.Kernel.Composition.MeasureComp -import Mathlib.MeasureTheory.Constructions.UnitInterval -import Mathlib.MeasureTheory.MeasurableSpace.Defs -import Mathlib.MeasureTheory.Measure.MeasureSpaceDef -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.MeasureTheory.Measure.Typeclasses.Probability -import Mathlib.Probability.CDF -import Mathlib.MeasureTheory.Constructions.Polish.Basic -import Mathlib.Order.CompleteSublattice -import LeanPool.QuasiBorelSpaces.MeasureTheory.Pack -import LeanPool.QuasiBorelSpaces.MeasureTheory.Measure -import Mathlib.Analysis.SpecialFunctions.Sigmoid +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.QuasiBorelSpaces.MeasureTheory.ProbabilityMeasure @@ -23,6 +15,8 @@ import Mathlib.Analysis.SpecialFunctions.Sigmoid Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.MeasureTheory.ProbabilityMeasure`. -/ +@[expose] public section + namespace MeasureTheory diff --git a/LeanPool/QuasiBorelSpaces/MeasureTheory/Quantile.lean b/LeanPool/QuasiBorelSpaces/MeasureTheory/Quantile.lean index 2932430881..f47a2cd41c 100644 --- a/LeanPool/QuasiBorelSpaces/MeasureTheory/Quantile.lean +++ b/LeanPool/QuasiBorelSpaces/MeasureTheory/Quantile.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Probability.CDF +public import Mathlib.Probability.CDF +public import Mathlib.MeasureTheory.Constructions.UnitInterval import LeanPool.QuasiBorelSpaces.MeasureTheory.Measure -import Mathlib.MeasureTheory.Constructions.UnitInterval /-! # LeanPool.QuasiBorelSpaces.MeasureTheory.Quantile @@ -14,6 +15,8 @@ import Mathlib.MeasureTheory.Constructions.UnitInterval Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.MeasureTheory.Quantile`. -/ +@[expose] public section + namespace MeasureTheory @@ -41,7 +44,8 @@ private lemma exists_unitIntervalRat_btwn obtain ⟨k, hk₁, hk₂⟩ := exists_rat_btwn h exact ⟨⟨⟨k, by grind⟩, by use k⟩, hk₁, hk₂⟩ -private noncomputable def cdf (μ : Measure I) (i : I) : I where +/-- The cumulative distribution function as a map from the unit interval to itself. -/ +noncomputable def cdf (μ : Measure I) (i : I) : I where val := ProbabilityTheory.cdf (μ.map Subtype.val) i property := by simp only [ diff --git a/LeanPool/QuasiBorelSpaces/MeasureTheory/Randomization.lean b/LeanPool/QuasiBorelSpaces/MeasureTheory/Randomization.lean index 6f16a83d1b..c8dc9b1d5b 100644 --- a/LeanPool/QuasiBorelSpaces/MeasureTheory/Randomization.lean +++ b/LeanPool/QuasiBorelSpaces/MeasureTheory/Randomization.lean @@ -3,16 +3,11 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Analysis.SpecialFunctions.Sigmoid -import LeanPool.QuasiBorelSpaces.MeasureTheory.Cases -import LeanPool.QuasiBorelSpaces.MeasureTheory.Pack -import LeanPool.QuasiBorelSpaces.MeasureTheory.Quantile -import Mathlib.MeasureTheory.Constructions.UnitInterval -import Mathlib.MeasureTheory.Measure.Restrict -import LeanPool.QuasiBorelSpaces.MeasureTheory.Measure -import LeanPool.QuasiBorelSpaces.MeasureTheory.Option -import LeanPool.QuasiBorelSpaces.MeasureTheory.StandardBorelSpace +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Pack +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Quantile +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.QuasiBorelSpaces.MeasureTheory.Randomization @@ -20,6 +15,8 @@ import LeanPool.QuasiBorelSpaces.MeasureTheory.StandardBorelSpace Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.MeasureTheory.Randomization`. -/ +@[expose] public section + open scoped unitInterval @@ -107,8 +104,10 @@ lemma volume_restrict_normalize : volume.restrict (Set.Ico 0 (1 : I)) = volume : apply MeasureTheory.measure_inter_conull simp_all -private noncomputable def packI [StandardBorelSpace A] : A → I := unpack ∘ pack -private noncomputable def unpackI [StandardBorelSpace A] [Nonempty A] : I → A := unpack ∘ pack +/-- Encode a standard Borel space into the unit interval. -/ +noncomputable def packI [StandardBorelSpace A] : A → I := unpack ∘ pack +/-- Decode the unit-interval representation of a nonempty standard Borel space. -/ +noncomputable def unpackI [StandardBorelSpace A] [Nonempty A] : I → A := unpack ∘ pack @[local simp, local fun_prop] private lemma measurable_packI [StandardBorelSpace A] : Measurable (packI (A := A)) := by diff --git a/LeanPool/QuasiBorelSpaces/MeasureTheory/Sigma.lean b/LeanPool/QuasiBorelSpaces/MeasureTheory/Sigma.lean index 3b9c07fb1d..8ce3a30f9c 100644 --- a/LeanPool/QuasiBorelSpaces/MeasureTheory/Sigma.lean +++ b/LeanPool/QuasiBorelSpaces/MeasureTheory/Sigma.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import Mathlib.MeasureTheory.MeasurableSpace.Constructions import LeanPool.QuasiBorelSpaces.MeasureTheory.Cases -import Mathlib.MeasureTheory.MeasurableSpace.Constructions /-! # LeanPool.QuasiBorelSpaces.MeasureTheory.Sigma @@ -13,6 +14,8 @@ import Mathlib.MeasureTheory.MeasurableSpace.Constructions Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.MeasureTheory.Sigma`. -/ +@[expose] public section + namespace MeasureTheory.Sigma diff --git a/LeanPool/QuasiBorelSpaces/MeasureTheory/StandardBorelSpace.lean b/LeanPool/QuasiBorelSpaces/MeasureTheory/StandardBorelSpace.lean index f2f8059eae..588ad83c10 100644 --- a/LeanPool/QuasiBorelSpaces/MeasureTheory/StandardBorelSpace.lean +++ b/LeanPool/QuasiBorelSpaces/MeasureTheory/StandardBorelSpace.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import Mathlib.MeasureTheory.Constructions.Polish.Basic import Mathlib.MeasureTheory.Constructions.Polish.EmbeddingReal -import Mathlib.MeasureTheory.Constructions.Polish.Basic /-! # LeanPool.QuasiBorelSpaces.MeasureTheory.StandardBorelSpace @@ -13,6 +14,8 @@ import Mathlib.MeasureTheory.Constructions.Polish.Basic Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.MeasureTheory.StandardBorelSpace`. -/ +@[expose] public section + namespace MeasureTheory diff --git a/LeanPool/QuasiBorelSpaces/MeasureTheory/Sum.lean b/LeanPool/QuasiBorelSpaces/MeasureTheory/Sum.lean index d0da3b7912..b9b5f49f5a 100644 --- a/LeanPool/QuasiBorelSpaces/MeasureTheory/Sum.lean +++ b/LeanPool/QuasiBorelSpaces/MeasureTheory/Sum.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.MeasureTheory.Constructions.Polish.Basic +public import Mathlib.MeasureTheory.Constructions.Polish.Basic /-! # LeanPool.QuasiBorelSpaces.MeasureTheory.Sum @@ -12,6 +13,8 @@ import Mathlib.MeasureTheory.Constructions.Polish.Basic Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.MeasureTheory.Sum`. -/ +@[expose] public section + open scoped MeasureTheory diff --git a/LeanPool/QuasiBorelSpaces/Multiset.lean b/LeanPool/QuasiBorelSpaces/Multiset.lean index 5fa127d00c..9b6aea94e8 100644 --- a/LeanPool/QuasiBorelSpaces/Multiset.lean +++ b/LeanPool/QuasiBorelSpaces/Multiset.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.List -import LeanPool.QuasiBorelSpaces.Quotient -import LeanPool.QuasiBorelSpaces.IsHomDiagonal +public import LeanPool.QuasiBorelSpaces.List +public import LeanPool.QuasiBorelSpaces.Quotient +import LeanPool.QuasiBorelSpaces.Basic +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.QuasiBorelSpaces.Multiset @@ -14,6 +16,8 @@ import LeanPool.QuasiBorelSpaces.IsHomDiagonal Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Multiset`. -/ +@[expose] public section + namespace QuasiBorelSpace.Multiset variable diff --git a/LeanPool/QuasiBorelSpaces/Nat.lean b/LeanPool/QuasiBorelSpaces/Nat.lean index 9e325e2906..261ae2829d 100644 --- a/LeanPool/QuasiBorelSpaces/Nat.lean +++ b/LeanPool/QuasiBorelSpaces/Nat.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.Prod +public import LeanPool.QuasiBorelSpaces.Prod +import LeanPool.QuasiBorelSpaces.Basic import LeanPool.QuasiBorelSpaces.Prop /-! @@ -13,6 +15,8 @@ import LeanPool.QuasiBorelSpaces.Prop Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Nat`. -/ +@[expose] public section + namespace QuasiBorelSpace.Nat example : DiscreteQuasiBorelSpace ℕ := inferInstance diff --git a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder.lean b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder.lean index b3632e6295..220c531543 100644 --- a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder.lean +++ b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Basic -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Fix -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Option -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Sigma -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Sum +module + +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Basic +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Fix +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Option +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Sigma +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Sum /-! # ω-complete partial order helpers @@ -16,3 +18,5 @@ import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Sum Re-exports lemmas and instances about ω-complete partial orders that the quasi-Borel space formalization layers on top of `Mathlib.Order.OmegaCompletePartialOrder`. -/ + +@[expose] public section diff --git a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Basic.lean b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Basic.lean index 3f7c807859..8114f43952 100644 --- a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Basic.lean +++ b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Basic.lean @@ -3,15 +3,11 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Const +public import Mathlib.MeasureTheory.Integral.Lebesgue.Basic import Mathlib.MeasureTheory.Integral.Lebesgue.Add -import Mathlib.Order.OmegaCompletePartialOrder -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Const -import Mathlib.MeasureTheory.MeasurableSpace.Defs -import Mathlib.Basic.ENNReal.Basic -import Mathlib.MeasureTheory.Measure.MeasureSpaceDef -import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic -import Mathlib.MeasureTheory.Integral.Lebesgue.Basic /-! @@ -22,6 +18,8 @@ As the library grows, compatibility helpers specific to this project can be added here. -/ +@[expose] public section + namespace OmegaCompletePartialOrder variable {A B C : Type*} diff --git a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain.lean b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain.lean index 55f407aeb0..46596233d8 100644 --- a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain.lean +++ b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Const -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Option -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Sigma -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Sum +module + +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Const +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Option +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Sigma +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Sum /-! # Chains over base types @@ -14,3 +16,5 @@ import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Sum Re-exports the chain instances and lemmas for `Option`, `Sigma`, `Sum`, and constant chains used by the ω-complete partial order infrastructure. -/ + +@[expose] public section diff --git a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Const.lean b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Const.lean index 46ec44359e..9f8bd95936 100644 --- a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Const.lean +++ b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Const.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Order.OmegaCompletePartialOrder +public import Mathlib.Order.OmegaCompletePartialOrder /-! # LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Const @@ -12,6 +13,8 @@ import Mathlib.Order.OmegaCompletePartialOrder Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Const`. -/ +@[expose] public section + namespace OmegaCompletePartialOrder.Chain diff --git a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Option.lean b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Option.lean index 65c0477770..3219b78eb6 100644 --- a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Option.lean +++ b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Option.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.Option.Instances -import Mathlib.Data.Nat.Find -import Mathlib.Order.OmegaCompletePartialOrder +public import LeanPool.QuasiBorelSpaces.Option.Instances +public import Mathlib.Data.Nat.Find +public import Mathlib.Order.OmegaCompletePartialOrder /-! # LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Option @@ -14,6 +15,8 @@ import Mathlib.Order.OmegaCompletePartialOrder Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Option`. -/ +@[expose] public section + variable {A : Type*} [Preorder A] diff --git a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Sigma.lean b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Sigma.lean index 8a65ca8326..1e178d58a6 100644 --- a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Sigma.lean +++ b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Sigma.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Algebra.Order.Group.Nat -import Mathlib.Data.Sigma.Order -import Mathlib.Order.Defs.PartialOrder -import Mathlib.Order.OmegaCompletePartialOrder +public import Mathlib.Data.Sigma.Order +public import Mathlib.Order.OmegaCompletePartialOrder /-! # LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Sigma @@ -15,6 +14,8 @@ import Mathlib.Order.OmegaCompletePartialOrder Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Sigma`. -/ +@[expose] public section + namespace OmegaCompletePartialOrder.Chain.Sigma diff --git a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Sum.lean b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Sum.lean index 036e6af984..338a0bb57a 100644 --- a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Sum.lean +++ b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Chain/Sum.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Algebra.Order.Group.Nat -import Mathlib.Data.Sum.Order -import Mathlib.Order.OmegaCompletePartialOrder +public import Mathlib.Data.Sum.Order +public import Mathlib.Order.OmegaCompletePartialOrder /-! @@ -16,6 +16,8 @@ This file provides utilities for working with chains in sum types, which are used to construct the ωCPO instance for coproducts. -/ +@[expose] public section + namespace OmegaCompletePartialOrder.Chain.Sum variable {A B : Type*} diff --git a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Fix.lean b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Fix.lean index 7ea92f8e6c..51f052e684 100644 --- a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Fix.lean +++ b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Fix.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Order.OmegaCompletePartialOrder -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Basic +public import Mathlib.Order.OmegaCompletePartialOrder +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Measurability.Init +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Fix @@ -13,6 +18,8 @@ import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Basic Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Fix`. -/ +@[expose] public section + namespace OmegaCompletePartialOrder diff --git a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Option.lean b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Option.lean index c4c0f10e77..9dc1c996bb 100644 --- a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Option.lean +++ b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Option.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Basic -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Option +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Basic +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Option /-! # LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Option @@ -13,6 +14,8 @@ import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Option Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Option`. -/ +@[expose] public section + /- Faithful ωCPO structure on `Option A` (bottom element `none`, supremum of a diff --git a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Sigma.lean b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Sigma.lean index 530e37e1ae..05cc2650af 100644 --- a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Sigma.lean +++ b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Sigma.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Data.Sigma.Order -import Mathlib.Order.OmegaCompletePartialOrder -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Sigma +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Sigma /-! # LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Sigma @@ -14,6 +13,8 @@ import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Sigma Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Sigma`. -/ +@[expose] public section + namespace OmegaCompletePartialOrder.Sigma diff --git a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Sum.lean b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Sum.lean index bcc8920a64..8484217435 100644 --- a/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Sum.lean +++ b/LeanPool/QuasiBorelSpaces/OmegaCompletePartialOrder/Sum.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Data.Sum.Order -import Mathlib.Order.OmegaCompletePartialOrder -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Basic -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Sum +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Sum +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Measurability.Init +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! @@ -16,6 +19,8 @@ import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Chain.Sum This file provides the `OmegaCompletePartialOrder` instance for `Sum α β`. -/ +@[expose] public section + namespace OmegaCompletePartialOrder.Sum variable {α β : Type*} [OmegaCompletePartialOrder α] [OmegaCompletePartialOrder β] diff --git a/LeanPool/QuasiBorelSpaces/OmegaHom.lean b/LeanPool/QuasiBorelSpaces/OmegaHom.lean index 26efbfdd67..eb4d9bba5a 100644 --- a/LeanPool/QuasiBorelSpaces/OmegaHom.lean +++ b/LeanPool/QuasiBorelSpaces/OmegaHom.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.Hom -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Basic -import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace -import LeanPool.QuasiBorelSpaces.Prod +public import LeanPool.QuasiBorelSpaces.Hom +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Basic +import LeanPool.QuasiBorelSpaces.Basic /-! # Exponentials for ω-quasi-borel spaces @@ -17,6 +17,8 @@ This file defines the function space `OmegaQuasiBorelHom X Y` (written itself an ωQBS. -/ +@[expose] public section + open QuasiBorelSpace open OmegaQuasiBorelSpace open OmegaCompletePartialOrder @@ -29,8 +31,8 @@ structure OmegaQuasiBorelHom [OmegaQuasiBorelSpace X] [OmegaQuasiBorelSpace Y] where /-- The underlying function of an ω-quasi-borel morphism. -/ toFun : X → Y - private isHom' : IsHom toFun := by fun_prop - private ωScottContinuous' : ωScottContinuous toFun := by fun_prop + isHom' : IsHom toFun := by fun_prop + ωScottContinuous' : ωScottContinuous toFun := by fun_prop @[inherit_doc] infixr:25 " →ω𝒒 " => OmegaQuasiBorelHom @@ -105,7 +107,7 @@ def toQuasiBorelHom (f : X →ω𝒒 Y) : X →𝒒 Y where toFun := f /-- The underlying pointwise function as an order homomorphism. -/ -private def coeOrderHom : (X →ω𝒒 Y) →o (X → Y) where +def coeOrderHom : (X →ω𝒒 Y) →o (X → Y) where toFun f := f monotone' _ _ h := h diff --git a/LeanPool/QuasiBorelSpaces/OmegaQuasiBorelSpace.lean b/LeanPool/QuasiBorelSpaces/OmegaQuasiBorelSpace.lean index 1fe1b621ab..19ce0890df 100644 --- a/LeanPool/QuasiBorelSpaces/OmegaQuasiBorelSpace.lean +++ b/LeanPool/QuasiBorelSpaces/OmegaQuasiBorelSpace.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Order.OmegaCompletePartialOrder +public import LeanPool.QuasiBorelSpaces.Chain import LeanPool.QuasiBorelSpaces.Basic -import LeanPool.QuasiBorelSpaces.Chain -import LeanPool.QuasiBorelSpaces.Defs /-! # LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace @@ -15,6 +14,8 @@ import LeanPool.QuasiBorelSpaces.Defs Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace`. -/ +@[expose] public section + open OmegaCompletePartialOrder open QuasiBorelSpace diff --git a/LeanPool/QuasiBorelSpaces/Option.lean b/LeanPool/QuasiBorelSpaces/Option.lean index b82872790f..9b4b8e927c 100644 --- a/LeanPool/QuasiBorelSpaces/Option.lean +++ b/LeanPool/QuasiBorelSpaces/Option.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.IsHomDiagonal +public import LeanPool.QuasiBorelSpaces.IsHomDiagonal +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Option +import LeanPool.QuasiBorelSpaces.Basic import LeanPool.QuasiBorelSpaces.Nat -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Option -import LeanPool.QuasiBorelSpaces.Sum +import LeanPool.QuasiBorelSpaces.Prop /-! # LeanPool.QuasiBorelSpaces.Option @@ -15,6 +17,8 @@ import LeanPool.QuasiBorelSpaces.Sum Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Option`. -/ +@[expose] public section + namespace QuasiBorelSpace.Option variable {A B C : Type*} [QuasiBorelSpace A] [QuasiBorelSpace B] [QuasiBorelSpace C] diff --git a/LeanPool/QuasiBorelSpaces/Option/Instances.lean b/LeanPool/QuasiBorelSpaces/Option/Instances.lean index 731f9d7a42..5e10a9e7f3 100644 --- a/LeanPool/QuasiBorelSpaces/Option/Instances.lean +++ b/LeanPool/QuasiBorelSpaces/Option/Instances.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Data.Option.Basic -import Mathlib.Order.BoundedOrder.Basic -import Mathlib.Order.Defs.PartialOrder +public import Mathlib.Order.BoundedOrder.Basic +public import Aesop.BuiltinRules /-! # LeanPool.QuasiBorelSpaces.Option.Instances @@ -14,6 +14,8 @@ import Mathlib.Order.Defs.PartialOrder Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Option.Instances`. -/ +@[expose] public section + variable {A : Type*} diff --git a/LeanPool/QuasiBorelSpaces/Pi.lean b/LeanPool/QuasiBorelSpaces/Pi.lean index 9160badb4f..89b95e51d9 100644 --- a/LeanPool/QuasiBorelSpaces/Pi.lean +++ b/LeanPool/QuasiBorelSpaces/Pi.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.Prod -import LeanPool.QuasiBorelSpaces.Defs -import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace +public import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace +import LeanPool.QuasiBorelSpaces.Basic /-! @@ -18,6 +18,8 @@ This file defines small products of quasi-borel spaces by giving a See [HeunenKSY17], Proposition 16. -/ +@[expose] public section + namespace QuasiBorelSpace.Pi variable diff --git a/LeanPool/QuasiBorelSpaces/PreProbabilityMeasure.lean b/LeanPool/QuasiBorelSpaces/PreProbabilityMeasure.lean index 7522a0515c..4168f803e4 100644 --- a/LeanPool/QuasiBorelSpaces/PreProbabilityMeasure.lean +++ b/LeanPool/QuasiBorelSpaces/PreProbabilityMeasure.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ - -import Mathlib.MeasureTheory.Constructions.UnitInterval -import Mathlib.MeasureTheory.Measure.DiracProba -import LeanPool.QuasiBorelSpaces.Hom +module + +public import Mathlib.MeasureTheory.Measure.DiracProba +public import LeanPool.QuasiBorelSpaces.Hom +public import LeanPool.QuasiBorelSpaces.MeasureTheory.ProbabilityMeasure +public import LeanPool.QuasiBorelSpaces.MeasureTheory.Pack +public import LeanPool.QuasiBorelSpaces.Basic +import LeanPool.QuasiBorelSpaces.MeasureTheory.Cases import LeanPool.QuasiBorelSpaces.MeasureTheory.Measure -import LeanPool.QuasiBorelSpaces.MeasureTheory.ProbabilityMeasure import LeanPool.QuasiBorelSpaces.Prop +import Mathlib.Probability.Kernel.MeasurableLIntegral +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.QuasiBorelSpaces.PreProbabilityMeasure @@ -17,6 +22,8 @@ import LeanPool.QuasiBorelSpaces.Prop Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.PreProbabilityMeasure`. -/ +@[expose] public section + open MeasureTheory open scoped unitInterval diff --git a/LeanPool/QuasiBorelSpaces/ProbabilityMeasure.lean b/LeanPool/QuasiBorelSpaces/ProbabilityMeasure.lean index 7864a7830d..874f282224 100644 --- a/LeanPool/QuasiBorelSpaces/ProbabilityMeasure.lean +++ b/LeanPool/QuasiBorelSpaces/ProbabilityMeasure.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import LeanPool.QuasiBorelSpaces.PreProbabilityMeasure +public import LeanPool.QuasiBorelSpaces.SeparatesPoints +public import LeanPool.QuasiBorelSpaces.UnitInterval.AssocProd +import LeanPool.QuasiBorelSpaces.Basic import LeanPool.QuasiBorelSpaces.ENNReal -import LeanPool.QuasiBorelSpaces.PreProbabilityMeasure -import LeanPool.QuasiBorelSpaces.SeparatesPoints -import LeanPool.QuasiBorelSpaces.UnitInterval.AssocProd import LeanPool.QuasiBorelSpaces.IsHomDiagonal -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Basic +import LeanPool.QuasiBorelSpaces.Prop +import Mathlib.Tactic.Positivity.Finset /-! # Probability Measures over Quasi-Borel Spaces @@ -19,6 +22,8 @@ This file defines probability measures over quasi-borel spaces. See [HeunenKSY17], Section V-D. -/ +@[expose] public section + open MeasureTheory open scoped unitInterval @@ -32,7 +37,7 @@ variable {A B C A' B' C' : Type*} /-- The type of _(quasi-borel) probability measures_. -/ structure ProbabilityMeasure (A : Type*) [QuasiBorelSpace A] where - private fromQuotient :: + fromQuotient :: /-- The quotient of pre-probability measures represented by this probability measure. -/ val : Quotient (PreProbabilityMeasure.setoid A) diff --git a/LeanPool/QuasiBorelSpaces/Prod.lean b/LeanPool/QuasiBorelSpaces/Prod.lean index da7791e481..169a197513 100644 --- a/LeanPool/QuasiBorelSpaces/Prod.lean +++ b/LeanPool/QuasiBorelSpaces/Prod.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.MeasureTheory.Measure.Prod +public import Mathlib.MeasureTheory.Integral.Lebesgue.Basic +public import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace +public import Mathlib.MeasureTheory.Constructions.Polish.Basic import LeanPool.QuasiBorelSpaces.Basic -import Mathlib.MeasureTheory.Integral.Lebesgue.Basic -import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace +import Mathlib.MeasureTheory.Measure.Prod /-! @@ -19,6 +21,8 @@ This file defines binary products of quasi-borel spaces by giving a See [HeunenKSY17], Proposition 16. -/ +@[expose] public section + namespace QuasiBorelSpace.Prod variable diff --git a/LeanPool/QuasiBorelSpaces/Prop.lean b/LeanPool/QuasiBorelSpaces/Prop.lean index fed8867fbd..c3c43e4de3 100644 --- a/LeanPool/QuasiBorelSpaces/Prop.lean +++ b/LeanPool/QuasiBorelSpaces/Prop.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import LeanPool.QuasiBorelSpaces.Subtype import LeanPool.QuasiBorelSpaces.Basic -import LeanPool.QuasiBorelSpaces.Pi -import LeanPool.QuasiBorelSpaces.Defs import LeanPool.QuasiBorelSpaces.Prod -import LeanPool.QuasiBorelSpaces.Subtype /-! # LeanPool.QuasiBorelSpaces.Prop @@ -16,6 +15,8 @@ import LeanPool.QuasiBorelSpaces.Subtype Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Prop`. -/ +@[expose] public section + variable {A : Type*} {_ : QuasiBorelSpace A} diff --git a/LeanPool/QuasiBorelSpaces/Quotient.lean b/LeanPool/QuasiBorelSpaces/Quotient.lean index 4ed12364fc..5cde32ea7f 100644 --- a/LeanPool/QuasiBorelSpaces/Quotient.lean +++ b/LeanPool/QuasiBorelSpaces/Quotient.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import LeanPool.QuasiBorelSpaces.Prod +import LeanPool.QuasiBorelSpaces.Basic import LeanPool.QuasiBorelSpaces.Hom -import LeanPool.QuasiBorelSpaces.Prod -import LeanPool.QuasiBorelSpaces.Defs /-! # LeanPool.QuasiBorelSpaces.Quotient @@ -14,6 +15,8 @@ import LeanPool.QuasiBorelSpaces.Defs Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Quotient`. -/ +@[expose] public section + namespace QuasiBorelSpace.Quotient diff --git a/LeanPool/QuasiBorelSpaces/Rose.lean b/LeanPool/QuasiBorelSpaces/Rose.lean index cbf3baf6cb..846b20986e 100644 --- a/LeanPool/QuasiBorelSpaces/Rose.lean +++ b/LeanPool/QuasiBorelSpaces/Rose.lean @@ -3,15 +3,14 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.Hom -import LeanPool.QuasiBorelSpaces.Rose.Encoding -import LeanPool.QuasiBorelSpaces.List -import LeanPool.QuasiBorelSpaces.Option -import LeanPool.QuasiBorelSpaces.Nat -import LeanPool.QuasiBorelSpaces.Pi -import LeanPool.QuasiBorelSpaces.ProbabilityMeasure -import LeanPool.QuasiBorelSpaces.Sigma +public import LeanPool.QuasiBorelSpaces.Rose.Encoding +public import LeanPool.QuasiBorelSpaces.List +import LeanPool.QuasiBorelSpaces.Basic +import LeanPool.QuasiBorelSpaces.Prop +import LeanPool.QuasiBorelSpaces.RoseTree.Basic +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.QuasiBorelSpaces.Rose @@ -19,6 +18,8 @@ import LeanPool.QuasiBorelSpaces.Sigma Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Rose`. -/ +@[expose] public section + variable {A B C : Type*} [QuasiBorelSpace A] [QuasiBorelSpace B] [QuasiBorelSpace C] namespace Rose.Encoding diff --git a/LeanPool/QuasiBorelSpaces/Rose/Encoding.lean b/LeanPool/QuasiBorelSpaces/Rose/Encoding.lean index fd2b5cfc80..9fc581b6a7 100644 --- a/LeanPool/QuasiBorelSpaces/Rose/Encoding.lean +++ b/LeanPool/QuasiBorelSpaces/Rose/Encoding.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.RoseTree.Defs -import LeanPool.QuasiBorelSpaces.RoseTree.Basic +public import LeanPool.QuasiBorelSpaces.RoseTree.Defs /-! # LeanPool.QuasiBorelSpaces.Rose.Encoding @@ -13,6 +13,8 @@ import LeanPool.QuasiBorelSpaces.RoseTree.Basic Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Rose.Encoding`. -/ +@[expose] public section + namespace Rose @@ -38,7 +40,7 @@ def mk (x : A) (xs : List (Encoding A)) : Encoding A where def fold (mk : A → List B → B) : Encoding A → B | ⟨⟨(), xs⟩, k⟩ => mk (k []) - (List.ofFn fun i ↦ fold mk ⟨xs[i], fun is ↦ k (i :: is)⟩) + (List.ofFn fun i : Fin xs.length ↦ fold mk ⟨xs[i], fun is ↦ k (i :: is)⟩) decreasing_by simp only [Fin.getElem_fin, Sigma.mk.sizeOf_spec, sizeOf_default, Nat.add_zero, mk.sizeOf_spec, Unit.sizeOf, Nat.reduceAdd, Nat.add_lt_add_iff_left] diff --git a/LeanPool/QuasiBorelSpaces/RoseTree.lean b/LeanPool/QuasiBorelSpaces/RoseTree.lean index 49855a7bca..aa724324f3 100644 --- a/LeanPool/QuasiBorelSpaces/RoseTree.lean +++ b/LeanPool/QuasiBorelSpaces/RoseTree.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ -import LeanPool.QuasiBorelSpaces.RoseTree.Basic -import LeanPool.QuasiBorelSpaces.RoseTree.Defs +module + +public import LeanPool.QuasiBorelSpaces.RoseTree.Basic +public import LeanPool.QuasiBorelSpaces.RoseTree.Defs /-! # Rose trees (vendored) @@ -13,3 +15,5 @@ Vendored copy of the `RoseTree` library used by the quasi-Borel space formalization. Defines node-labelled, finitely branching trees together with basic algebraic structure. -/ + +@[expose] public section diff --git a/LeanPool/QuasiBorelSpaces/RoseTree/Basic.lean b/LeanPool/QuasiBorelSpaces/RoseTree/Basic.lean index 48acfad3ba..53af9a05a6 100644 --- a/LeanPool/QuasiBorelSpaces/RoseTree/Basic.lean +++ b/LeanPool/QuasiBorelSpaces/RoseTree/Basic.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.RoseTree.Defs -import Mathlib.Tactic.NthRewrite +public import LeanPool.QuasiBorelSpaces.RoseTree.Defs import Mathlib.Control.Traversable.Instances /-! @@ -14,6 +14,8 @@ import Mathlib.Control.Traversable.Instances Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.RoseTree.Basic`. -/ +@[expose] public section + universe u diff --git a/LeanPool/QuasiBorelSpaces/RoseTree/Defs.lean b/LeanPool/QuasiBorelSpaces/RoseTree/Defs.lean index aaf975d1c9..a2c3cd0223 100644 --- a/LeanPool/QuasiBorelSpaces/RoseTree/Defs.lean +++ b/LeanPool/QuasiBorelSpaces/RoseTree/Defs.lean @@ -3,11 +3,9 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Tactic.Lemma -import Mathlib.Tactic.TypeStar -import Mathlib.Logic.Equiv.List -import Mathlib.Logic.Encodable.Basic +public import Mathlib.Logic.Equiv.List /-! # LeanPool.QuasiBorelSpaces.RoseTree.Defs @@ -15,6 +13,8 @@ import Mathlib.Logic.Encodable.Basic Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.RoseTree.Defs`. -/ +@[expose] public section + universe u variable {A B C : Type*} diff --git a/LeanPool/QuasiBorelSpaces/SeparatesPoints.lean b/LeanPool/QuasiBorelSpaces/SeparatesPoints.lean index 9e6a24e6d3..e6e3abd60d 100644 --- a/LeanPool/QuasiBorelSpaces/SeparatesPoints.lean +++ b/LeanPool/QuasiBorelSpaces/SeparatesPoints.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import LeanPool.QuasiBorelSpaces.Prop -import LeanPool.QuasiBorelSpaces.Sigma -import LeanPool.QuasiBorelSpaces.Sum +public import LeanPool.QuasiBorelSpaces.Sum +public import LeanPool.QuasiBorelSpaces.Hom +public import LeanPool.QuasiBorelSpaces.Pi +import LeanPool.QuasiBorelSpaces.Basic /-! # LeanPool.QuasiBorelSpaces.SeparatesPoints @@ -14,6 +16,8 @@ import LeanPool.QuasiBorelSpaces.Sum Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.SeparatesPoints`. -/ +@[expose] public section + variable {A : Type*} [QuasiBorelSpace A] {B : Type*} [QuasiBorelSpace B] diff --git a/LeanPool/QuasiBorelSpaces/Sigma.lean b/LeanPool/QuasiBorelSpaces/Sigma.lean index 4c6acce7f3..df26922bc4 100644 --- a/LeanPool/QuasiBorelSpaces/Sigma.lean +++ b/LeanPool/QuasiBorelSpaces/Sigma.lean @@ -3,15 +3,14 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Sigma +public import LeanPool.QuasiBorelSpaces.Prod +public import LeanPool.QuasiBorelSpaces.Basic import LeanPool.QuasiBorelSpaces.MeasureTheory.Cases import LeanPool.QuasiBorelSpaces.MeasureTheory.Sigma import LeanPool.QuasiBorelSpaces.Prop -import LeanPool.QuasiBorelSpaces.Subtype -import Mathlib.Data.Sigma.Order -import LeanPool.QuasiBorelSpaces.Defs -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Sigma -import LeanPool.QuasiBorelSpaces.Prod /-! @@ -23,6 +22,8 @@ This file defines small coproducts of quasi-borel spaces by giving a See [HeunenKSY17], Proposition 17. -/ +@[expose] public section + open scoped MeasureTheory namespace QuasiBorelSpace.Sigma diff --git a/LeanPool/QuasiBorelSpaces/Subtype.lean b/LeanPool/QuasiBorelSpaces/Subtype.lean index e9082e61df..6a761eb928 100644 --- a/LeanPool/QuasiBorelSpaces/Subtype.lean +++ b/LeanPool/QuasiBorelSpaces/Subtype.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace import LeanPool.QuasiBorelSpaces.Basic -import LeanPool.QuasiBorelSpaces.Defs -import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace /-! # LeanPool.QuasiBorelSpaces.Subtype @@ -14,6 +14,8 @@ import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.Subtype`. -/ +@[expose] public section + namespace QuasiBorelSpace.Subtype diff --git a/LeanPool/QuasiBorelSpaces/Sum.lean b/LeanPool/QuasiBorelSpaces/Sum.lean index 790a993eb0..0e9f6eb2d7 100644 --- a/LeanPool/QuasiBorelSpaces/Sum.lean +++ b/LeanPool/QuasiBorelSpaces/Sum.lean @@ -3,13 +3,13 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module +public import LeanPool.QuasiBorelSpaces.Lift +public import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Sum +public import LeanPool.QuasiBorelSpaces.Sigma +import LeanPool.QuasiBorelSpaces.Basic import LeanPool.QuasiBorelSpaces.Hom -import LeanPool.QuasiBorelSpaces.Lift -import LeanPool.QuasiBorelSpaces.OmegaCompletePartialOrder.Sum -import LeanPool.QuasiBorelSpaces.OmegaQuasiBorelSpace -import LeanPool.QuasiBorelSpaces.Prop -import LeanPool.QuasiBorelSpaces.Sigma /-! # Binary Coproducts of Quasi-Borel Spaces @@ -20,6 +20,8 @@ This file defines binary coproducts of quasi-borel spaces by giving a See [HeunenKSY17], Proposition 17. -/ +@[expose] public section + namespace QuasiBorelSpace.Sum universe u v diff --git a/LeanPool/QuasiBorelSpaces/UnitInterval.lean b/LeanPool/QuasiBorelSpaces/UnitInterval.lean index ed1a1dcd36..d20af34e9e 100644 --- a/LeanPool/QuasiBorelSpaces/UnitInterval.lean +++ b/LeanPool/QuasiBorelSpaces/UnitInterval.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ -import LeanPool.QuasiBorelSpaces.UnitInterval.AssocProd +module + +public import LeanPool.QuasiBorelSpaces.UnitInterval.AssocProd /-! # Unit interval modules @@ -11,3 +13,5 @@ import LeanPool.QuasiBorelSpaces.UnitInterval.AssocProd Re-exports the `UnitInterval` sub-modules used by the quasi-Borel space formalization. -/ + +@[expose] public section diff --git a/LeanPool/QuasiBorelSpaces/UnitInterval/AssocProd.lean b/LeanPool/QuasiBorelSpaces/UnitInterval/AssocProd.lean index 320a8704a6..18f21c1a19 100644 --- a/LeanPool/QuasiBorelSpaces/UnitInterval/AssocProd.lean +++ b/LeanPool/QuasiBorelSpaces/UnitInterval/AssocProd.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Anthony Vandikas, Kiarash Sotoudeh. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anthony Vandikas, Kiarash Sotoudeh -/ +module -import Mathlib.Topology.UnitInterval +public import Mathlib.Topology.UnitInterval /-! # LeanPool.QuasiBorelSpaces.UnitInterval.AssocProd @@ -12,6 +13,8 @@ import Mathlib.Topology.UnitInterval Imported Lean Pool material for `LeanPool.QuasiBorelSpaces.UnitInterval.AssocProd`. -/ +@[expose] public section + open scoped unitInterval diff --git a/LeanPool/Rado.lean b/LeanPool/Rado.lean index b2b6e4830a..badadfc4c3 100644 --- a/LeanPool/Rado.lean +++ b/LeanPool/Rado.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module -import LeanPool.Rado.Main +public import LeanPool.Rado.Main +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Radó's theorem for Riemann surfaces @@ -16,3 +19,5 @@ Main declarations: `rado_riemannSurface` Tags: riemann-surfaces, second-countability, harmonic-functions, perron-method MSC: 30F15, 30F20, 54D65 -/ + +@[expose] public section diff --git a/LeanPool/Rado/Complex/Dirichlet.lean b/LeanPool/Rado/Complex/Dirichlet.lean index 23a2f1795e..eb1e5ad915 100644 --- a/LeanPool/Rado/Complex/Dirichlet.lean +++ b/LeanPool/Rado/Complex/Dirichlet.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ -import LeanPool.Rado.Complex.Poisson +module + +public import LeanPool.Rado.Complex.SubMean +public import Mathlib.Analysis.InnerProductSpace.Harmonic.Basic +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional +public import LeanPool.Rado.Complex.Poisson import Mathlib.Analysis.Complex.Harmonic.MeanValue +import Mathlib.Analysis.InnerProductSpace.Harmonic.Constructions /-! # The Dirichlet problem on a disk @@ -37,6 +43,8 @@ used by Perron's method: Here "harmonic" is Mathlib's `InnerProductSpace.HarmonicOnNhd`. -/ +@[expose] public section + open Set Topology Metric MeasureTheory InnerProductSpace Complex namespace Rado diff --git a/LeanPool/Rado/Complex/PlanarConnected.lean b/LeanPool/Rado/Complex/PlanarConnected.lean index e07feb7064..76757767ee 100644 --- a/LeanPool/Rado/Complex/PlanarConnected.lean +++ b/LeanPool/Rado/Complex/PlanarConnected.lean @@ -3,13 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ -import Mathlib.Analysis.Normed.Module.Connected +module + +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Topology.Connected.PathConnected import Mathlib.Analysis.Complex.Convex +import Mathlib.Analysis.Normed.Module.Connected import Mathlib.LinearAlgebra.Complex.FiniteDimensional -import Mathlib.Topology.Instances.Complex -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring /-! # Planar connectivity for the standard configuration @@ -23,6 +23,8 @@ Also provided: the annuli `1 ≤ |z ∓ 4| ≤ 2` sit inside `B(0, 8)`, and rela trivial inclusions used when instantiating the configuration in a chart. -/ +@[expose] public section + open Set Metric Complex namespace Rado diff --git a/LeanPool/Rado/Complex/Poisson.lean b/LeanPool/Rado/Complex/Poisson.lean index 9aeca13dde..0d84ec0b4c 100644 --- a/LeanPool/Rado/Complex/Poisson.lean +++ b/LeanPool/Rado/Complex/Poisson.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ -import LeanPool.Rado.Complex.SubMean -import Mathlib.Analysis.Complex.Poisson +module + +public import Mathlib.Analysis.Complex.Poisson +public import Mathlib.Analysis.InnerProductSpace.Harmonic.Basic import Mathlib.Analysis.InnerProductSpace.Harmonic.Constructions /-! @@ -37,6 +39,8 @@ Mathlib anchors (pinned commit `905b9581`): `Mathlib/Analysis/Complex/Harmonic/`). -/ +@[expose] public section + open Set Topology Metric MeasureTheory InnerProductSpace Complex Real namespace Rado @@ -83,6 +87,9 @@ theorem poissonKernel_continuousOn_sphere (hw : w ∈ ball c R) : have h : ContinuousAt (fun z : ℂ ↦ (‖z - c‖ ^ 2 - ‖w - c‖ ^ 2) / ‖(z - c) - (w - c)‖ ^ 2) z := ContinuousAt.div (by fun_prop) (by fun_prop) hne + rw [show poissonKernel c w = + (fun z : ℂ ↦ (‖z - c‖ ^ 2 - ‖w - c‖ ^ 2) / ‖(z - c) - (w - c)‖ ^ 2) from + funext (poissonKernel_def c w)] exact h.continuousWithinAt /-- Unit mass of the Poisson kernel. -/ diff --git a/LeanPool/Rado/Complex/SubMean.lean b/LeanPool/Rado/Complex/SubMean.lean index 3bfca824b6..94095675e1 100644 --- a/LeanPool/Rado/Complex/SubMean.lean +++ b/LeanPool/Rado/Complex/SubMean.lean @@ -3,12 +3,9 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ -import Mathlib.Analysis.Normed.Module.Connected -import Mathlib.MeasureTheory.Integral.CircleAverage -import Mathlib.Topology.MetricSpace.ProperSpace.Lemmas -import Mathlib.Topology.Order.Compact -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity +module + +public import Mathlib.MeasureTheory.Integral.CircleAverage /-! # Sub-mean-value functions on `ℂ` and maximum principles @@ -25,6 +22,8 @@ principle on bounded opens. All are elementary consequences of the circle average inequality and a clopen argument. -/ +@[expose] public section + open Set Topology Metric MeasureTheory Real namespace Rado diff --git a/LeanPool/Rado/Main.lean b/LeanPool/Rado/Main.lean index 87d554206f..16b638e32c 100644 --- a/LeanPool/Rado/Main.lean +++ b/LeanPool/Rado/Main.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module + +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Geometry.Manifold.IsManifold.Basic import LeanPool.Rado.Surface.Assembly +import Mathlib.Combinatorics.Matroid.Init /-! # Radó's theorem: Riemann surfaces are second countable @@ -20,6 +25,8 @@ The real-manifold analogue is false (Prüfer surface, long line), so the proof must use the complex structure in an essential way. -/ +@[expose] public section + theorem rado_riemannSurface {X : Type*} [TopologicalSpace X] [T2Space X] [ConnectedSpace X] [ChartedSpace ℂ X] [IsManifold (modelWithCornersSelf ℂ ℂ) 1 X] : diff --git a/LeanPool/Rado/Surface/Assembly.lean b/LeanPool/Rado/Surface/Assembly.lean index 67f134b3b8..5eb80239e4 100644 --- a/LeanPool/Rado/Surface/Assembly.lean +++ b/LeanPool/Rado/Surface/Assembly.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ -import LeanPool.Rado.Surface.Barriers +module + +public import LeanPool.Rado.Surface.Barriers import LeanPool.Rado.Surface.Germs import LeanPool.Rado.Topology.PoincareVolterra +import LeanPool.Rado.Topology.SecondCountable +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Topology.LocalAtTarget /-! # Assembly: Radó's theorem @@ -19,6 +24,8 @@ Poincaré–Volterra lemma to the evaluation map on a connected component of the ball (`secondCountableTopology_of_riemannSurface`). -/ +@[expose] public section + open Set Topology Metric MeasureTheory InnerProductSpace Complex Filter namespace Rado diff --git a/LeanPool/Rado/Surface/Barriers.lean b/LeanPool/Rado/Surface/Barriers.lean index 1191b30836..50c2aa8986 100644 --- a/LeanPool/Rado/Surface/Barriers.lean +++ b/LeanPool/Rado/Surface/Barriers.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ -import LeanPool.Rado.Surface.Perron +module + +public import LeanPool.Rado.Surface.Perron import LeanPool.Rado.Complex.PlanarConnected +import Mathlib.Analysis.InnerProductSpace.Harmonic.Constructions /-! # The two-disk configuration and its barriers @@ -17,6 +20,8 @@ two explicit log-barriers on the annuli `1 ≤ |ζ ∓ 4| ≤ 2`: values `≥ 3/ resp. `≤ 1/4` at the witness points `±4 + 2^(1/4)`. -/ +@[expose] public section + open Set Topology Metric MeasureTheory InnerProductSpace Complex Filter namespace Rado diff --git a/LeanPool/Rado/Surface/Charts.lean b/LeanPool/Rado/Surface/Charts.lean index f09f47cdff..ba6fece08c 100644 --- a/LeanPool/Rado/Surface/Charts.lean +++ b/LeanPool/Rado/Surface/Charts.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ -import LeanPool.Rado.Topology.SecondCountable -import LeanPool.Rado.Surface.HolomorphicCompat +module + +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Geometry.Manifold.IsManifold.Basic +import Mathlib.Analysis.Complex.CauchyIntegral /-! # Riemann-surface chart conventions @@ -26,6 +29,8 @@ is only needed at the very end). This file sets up the chart-level toolkit: second countability. -/ +@[expose] public section + open Set Topology Metric Manifold Filter namespace Rado diff --git a/LeanPool/Rado/Surface/Germs.lean b/LeanPool/Rado/Surface/Germs.lean index d1fe03aace..1b8a8f488f 100644 --- a/LeanPool/Rado/Surface/Germs.lean +++ b/LeanPool/Rado/Surface/Germs.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ -import LeanPool.Rado.Surface.Harmonic +module + +public import LeanPool.Rado.Surface.Harmonic +import Mathlib.Analysis.Complex.Harmonic.Analytic import Mathlib.Analysis.Complex.OpenMapping /-! @@ -20,6 +23,8 @@ constant germ would force `u` to be constant), and every connected component projects onto all of a connected base. -/ +@[expose] public section + open Set Topology Metric MeasureTheory InnerProductSpace Complex Filter namespace Rado diff --git a/LeanPool/Rado/Surface/Harmonic.lean b/LeanPool/Rado/Surface/Harmonic.lean index 785e169cf5..c7939e68db 100644 --- a/LeanPool/Rado/Surface/Harmonic.lean +++ b/LeanPool/Rado/Surface/Harmonic.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module + +public import LeanPool.Rado.Surface.Charts +public import LeanPool.Rado.Complex.SubMean +public import Mathlib.Analysis.InnerProductSpace.Harmonic.Basic +public import Mathlib.LinearAlgebra.Complex.FiniteDimensional import LeanPool.Rado.Complex.Dirichlet -import LeanPool.Rado.Surface.Charts +import Mathlib.Analysis.Complex.Harmonic.MeanValue /-! # Harmonic and subharmonic functions on a Riemann surface @@ -18,6 +24,8 @@ small circles implies it on all circles, via the maximum principle and comparison with the Poisson extension. -/ +@[expose] public section + open Set Topology Metric MeasureTheory InnerProductSpace Complex Filter namespace Rado diff --git a/LeanPool/Rado/Surface/HolomorphicCompat.lean b/LeanPool/Rado/Surface/HolomorphicCompat.lean index 4f1e49b32e..23554a4d1a 100644 --- a/LeanPool/Rado/Surface/HolomorphicCompat.lean +++ b/LeanPool/Rado/Surface/HolomorphicCompat.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module + +public import Mathlib.Geometry.Manifold.IsManifold.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.Complex.CauchyIntegral -import Mathlib.Geometry.Manifold.IsManifold.Basic /-! # `C^1` compatibility over `ℂ` is holomorphic compatibility @@ -41,6 +44,8 @@ proving Radó's theorem from it is strictly stronger than proving it from `ω`; `isManifold_omega_of_one` the two hypotheses are in fact equivalent here. -/ +@[expose] public section + open scoped Manifold ContDiff open Set diff --git a/LeanPool/Rado/Surface/Perron.lean b/LeanPool/Rado/Surface/Perron.lean index 8bab127af7..7fbcc51658 100644 --- a/LeanPool/Rado/Surface/Perron.lean +++ b/LeanPool/Rado/Surface/Perron.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ -import LeanPool.Rado.Surface.Harmonic +module + +public import LeanPool.Rado.Surface.Harmonic +public import LeanPool.Rado.Complex.Dirichlet +import LeanPool.Rado.Complex.Poisson import Mathlib.Analysis.Complex.Harmonic.Poisson +import Mathlib.Analysis.Complex.Harmonic.MeanValue /-! # Harmonic replacement and Perron's principle @@ -19,6 +24,8 @@ upper envelope of a Perron family is harmonic Prop. 1.2.3). -/ +@[expose] public section + open Set Topology Metric MeasureTheory InnerProductSpace Complex Filter namespace Rado diff --git a/LeanPool/Rado/Topology/PoincareVolterra.lean b/LeanPool/Rado/Topology/PoincareVolterra.lean index 1ecf2b710b..1047597ecc 100644 --- a/LeanPool/Rado/Topology/PoincareVolterra.lean +++ b/LeanPool/Rado/Topology/PoincareVolterra.lean @@ -3,6 +3,9 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ +module + +public import Mathlib.Topology.Connected.LocallyConnected import LeanPool.Rado.Topology.SecondCountable /-! @@ -40,6 +43,8 @@ second countable (as a subspace). Then: second-countable open sets cover `Z`. -/ +@[expose] public section + open Set Topology TopologicalSpace namespace Rado diff --git a/LeanPool/Rado/Topology/SecondCountable.lean b/LeanPool/Rado/Topology/SecondCountable.lean index 0446d63280..a98a321b9e 100644 --- a/LeanPool/Rado/Topology/SecondCountable.lean +++ b/LeanPool/Rado/Topology/SecondCountable.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Rado Kirov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rado Kirov -/ -import Mathlib.Topology.Bases -import Mathlib.Topology.Compactness.Compact +module + +public import Mathlib.Topology.Bases import Mathlib.Topology.LocalAtTarget /-! @@ -23,6 +24,8 @@ Point-set topology preliminaries for the Poincaré–Volterra lemma All statements are pure topology, independent of the rest of the development. -/ +@[expose] public section + open Set Topology namespace Rado diff --git a/LeanPool/RamanujanNagell.lean b/LeanPool/RamanujanNagell.lean index 25b5eef926..95559547d8 100644 --- a/LeanPool/RamanujanNagell.lean +++ b/LeanPool/RamanujanNagell.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Barinder S. Banwait. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Barinder S. Banwait, Xinze Li -/ +module -import LeanPool.RamanujanNagell.Basic -import LeanPool.RamanujanNagell.Helpers +public import LeanPool.RamanujanNagell.Basic +public import LeanPool.RamanujanNagell.Helpers +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # The Ramanujan-Nagell theorem @@ -18,6 +22,8 @@ Tags: number-theory, diophantine-equations, quadratic-integers MSC: 11D61, 11D45, 11R11 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/RamanujanNagell/Basic.lean b/LeanPool/RamanujanNagell/Basic.lean index 5fe5d9638a..5c03c015b0 100644 --- a/LeanPool/RamanujanNagell/Basic.lean +++ b/LeanPool/RamanujanNagell/Basic.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Barinder S. Banwait. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Barinder S. Banwait, Xinze Li -/ +module -import LeanPool.RamanujanNagell.Helpers +public import LeanPool.RamanujanNagell.Helpers +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.NumberTheory.Multiplicity +import Mathlib.RingTheory.Int.Basic +import Mathlib.Tactic.LinearCombination +import Mathlib.Tactic.NormNum.GCD /-! # The Ramanujan-Nagell equation @@ -15,6 +22,8 @@ below uses these facts together with `units_pm_one`, `theta_irreducible`, `theta'_irreducible`, and the UFD scaffolding `ufd_power_association`. -/ +@[expose] public section + namespace RamanujanNagell open Polynomial QuadraticAlgebra Algebra Nat diff --git a/LeanPool/RamanujanNagell/Helpers.lean b/LeanPool/RamanujanNagell/Helpers.lean index a5e1459bd4..91962a4600 100644 --- a/LeanPool/RamanujanNagell/Helpers.lean +++ b/LeanPool/RamanujanNagell/Helpers.lean @@ -3,21 +3,14 @@ Copyright (c) 2026 Barinder S. Banwait. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Barinder S. Banwait -/ +module -import Mathlib.Algebra.QuadraticAlgebra.Basic -import Mathlib.Algebra.QuadraticAlgebra.NormDeterminant -import Mathlib.Algebra.Order.Round -import Mathlib.Data.Rat.Floor -import Mathlib.RingTheory.PrincipalIdealDomain -import Mathlib.RingTheory.UniqueFactorizationDomain.Defs -import Mathlib.NumberTheory.Padics.PadicVal.Basic -import Mathlib.NumberTheory.Multiplicity -import Mathlib.RingTheory.Polynomial.Basic -import Mathlib.RingTheory.Int.Basic -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Polyrith +public import Mathlib.Algebra.QuadraticAlgebra.Basic +public import Mathlib.Data.Rat.Floor +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.IntervalCases +import Mathlib.Tactic.NormNum.GCD /-! # Algebraic infrastructure for `R = QuadraticAlgebra ℤ (-2) 1 = ℤ[(1+√-7)/2]` @@ -33,6 +26,8 @@ rather than through `𝓞 K` where `K = QuadraticAlgebra ℚ (-2) 1`. The payoff replaces the discriminant / class-number-1 detour through Dirichlet. -/ +@[expose] public section + namespace RamanujanNagell open QuadraticAlgebra @@ -258,7 +253,8 @@ private lemma sixteen_norm_rem_le (a b : R) (hb : b ≠ 0) : nlinarith [hv_bd, huv_bd] nlinarith [h_chain, h_bd, hN_pos, sq N] -private noncomputable def normMeasure (a : R) : ℕ := Int.natAbs (QuadraticAlgebra.norm a) +/-- The natural absolute value of the quadratic-algebra norm. -/ +noncomputable def normMeasure (a : R) : ℕ := Int.natAbs (QuadraticAlgebra.norm a) private lemma natAbs_norm_rem_lt (a : R) {b : R} (hb : b ≠ 0) : normMeasure (rem a b) < normMeasure b := by @@ -293,8 +289,8 @@ noncomputable instance instEuclideanDomain : EuclideanDomain R where quotient_mul_add_remainder_eq := quot_mul_add_rem_eq r := fun a b => normMeasure a < normMeasure b r_wellFounded := (measure normMeasure).wf - remainder_lt := natAbs_norm_rem_lt - mul_left_not_lt := norm_mul_left_not_lt + remainder_lt := by exact natAbs_norm_rem_lt + mul_left_not_lt := by exact norm_mul_left_not_lt /-- `R` is a principal ideal ring, since every Euclidean domain is one. -/ instance instPrincipalIdealRing : IsPrincipalIdealRing R := diff --git a/LeanPool/RamanujanTauMissesPrimes.lean b/LeanPool/RamanujanTauMissesPrimes.lean index 61b438dccf..62d9773efa 100644 --- a/LeanPool/RamanujanTauMissesPrimes.lean +++ b/LeanPool/RamanujanTauMissesPrimes.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang. All rights reser Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang -/ +module -import LeanPool.RamanujanTauMissesPrimes.Solution +public import LeanPool.RamanujanTauMissesPrimes.Solution +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # ABC implies that Ramanujan's tau function misses almost all primes @@ -17,6 +21,8 @@ Tags: number-theory, modular-forms MSC: 11F30, 11N05 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/RamanujanTauMissesPrimes/Solution.lean b/LeanPool/RamanujanTauMissesPrimes/Solution.lean index 40208c99df..23c2f760fe 100644 --- a/LeanPool/RamanujanTauMissesPrimes/Solution.lean +++ b/LeanPool/RamanujanTauMissesPrimes/Solution.lean @@ -3,27 +3,21 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang. All rights reser Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang -/ -import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics -import Mathlib.Analysis.SpecialFunctions.Log.Basic -import Mathlib.Analysis.SpecialFunctions.Sqrt +module + +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Algebra.BigOperators.Associated import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics import Mathlib.Data.Nat.Factorization.PrimePow import Mathlib.Data.Set.Card.Arithmetic -import Mathlib.Algebra.BigOperators.Associated -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith /-! # LeanPool.RamanujanTauMissesPrimes.Solution -/ +@[expose] public section + open Filter Asymptotics /-- The *radical* of `n`: the product of its distinct prime factors (and `0` when `n = 0`). -/ @@ -1981,8 +1975,6 @@ lemma E2_x_fifth_le (K : ℝ) (hK : 0 < K) (X : ℝ) (hX : 2 < X) (p : ℕ+ × ℤ) (hp : p ∈ E2Set X) : ((p.1 : ℕ) : ℝ) ^ 5 ≤ 8 * K ^ 4 * X ^ 10 := by - have hysq_int := E2_y_sq_le X (p.1 : ℕ) p hp le_rfl - have hy_abs_int := int_abs_le_of_sq_le p.2 ((p.1 : ℕ) ^ 11 + ⌊X⌋₊) (by exact_mod_cast hysq_int) have hy_ne : p.2 ≠ 0 := E2_y_ne_zero X hX p hp have hysq_lt : (p.2 : ℝ) ^ 2 < 2 * ((p.1 : ℕ) : ℝ) ^ 11 := E2_ysq_lt_2x11 X hX p hp obtain ⟨hx_gt, hd_lb, hd_ub⟩ := hp @@ -1997,15 +1989,14 @@ lemma E2_x_fifth_le (K : ℝ) (hK : 0 < K) have hx_pos : 0 < (p.1 : ℕ) := p.1.pos have hmax := E2_abc_applied K hK hK_abc (p.1 : ℕ) hx_pos p.2 hy_ne d hd_pos hd_eq have hysq_le_d : (p.2 : ℝ) ^ 2 ≤ ((p.1 : ℕ) : ℝ) ^ 11 + (d : ℝ) := by - suffices h : (p.2 : ℝ) ^ 2 - ((p.1 : ℕ) : ℝ) ^ 11 ≤ (d : ℝ) by linarith - rw [show (d : ℝ) = ((|(↑↑p.1 : ℤ) ^ 11 - p.2 ^ 2| : ℤ) : ℝ) by exact_mod_cast hd_eq]; push_cast - linarith [abs_nonneg (((p.1 : ℕ) : ℝ) ^ 11 - (p.2 : ℝ) ^ 2), - abs_sub_comm (((p.1 : ℕ) : ℝ) ^ 11) ((p.2 : ℝ) ^ 2), - le_abs_self ((p.2 : ℝ) ^ 2 - ((p.1 : ℕ) : ℝ) ^ 11)] + rw [show (d : ℝ) = |((p.1 : ℕ) : ℝ) ^ 11 - (p.2 : ℝ) ^ 2| by exact_mod_cast hd_eq] + apply (sub_le_iff_le_add').mp + rw [abs_sub_comm] + exact le_abs_self _ have hy_abs_pos : 0 < |(p.2 : ℝ)| := abs_pos.mpr (Int.cast_ne_zero.mpr hy_ne) have hx_ge1 : (1 : ℝ) ≤ ((p.1 : ℕ) : ℝ) := by exact_mod_cast hx_pos have hd_pos_real : (0 : ℝ) < (d : ℝ) := Nat.cast_pos.mpr hd_pos - have hX_pos : (0 : ℝ) < X := by linarith + have hX_pos : (0 : ℝ) < X := lt_trans zero_lt_two hX exact E2_x_fifth_le_of_max_bound K hK X hX_pos ((p.1 : ℕ) : ℝ) hx_ge1 |(p.2 : ℝ)| hy_abs_pos (d : ℝ) hd_pos_real hd_le_X (by rw [sq_abs]; exact hysq_lt) (by rw [sq_abs]; exact hysq_le_d) @@ -2633,19 +2624,21 @@ lemma E4_pos_fiber_ncard_le_two (X : ℝ) (hX : 4 < X) (x : ℕ+) (↑u : ℝ) ≤ Real.sqrt (5 * (↑↑x : ℝ) ^ 22 + 4 * X)}.ncard := hvia _ ≤ 2 := ncard_pos_int_in_interval_lt_two _ _ hlen -private def pos_fiber (X : ℝ) (x : ℕ+) : Set ℤ := +/-- Positive integer square roots in the interval determined by `X` and `x`. -/ +def posFiber (X : ℝ) (x : ℕ+) : Set ℤ := {u : ℤ | 0 < u ∧ (↑u : ℝ) ^ 2 ≥ 5 * (↑↑x : ℝ) ^ 22 - 4 * X ∧ (↑u : ℝ) ^ 2 ≤ 5 * (↑↑x : ℝ) ^ 22 + 4 * X} -private def neg_fiber (X : ℝ) (x : ℕ+) : Set ℤ := +/-- Negative integer square roots in the interval determined by `X` and `x`. -/ +def negFiber (X : ℝ) (x : ℕ+) : Set ℤ := {u : ℤ | u < 0 ∧ (↑u : ℝ) ^ 2 ≥ 5 * (↑↑x : ℝ) ^ 22 - 4 * X ∧ (↑u : ℝ) ^ 2 ≤ 5 * (↑↑x : ℝ) ^ 22 + 4 * X} lemma neg_maps_to_pos (X : ℝ) (x : ℕ+) : - ∀ u ∈ neg_fiber X x, -u ∈ pos_fiber X x := by + ∀ u ∈ negFiber X x, -u ∈ posFiber X x := by intro u hu - simp only [neg_fiber, Set.mem_ofPred_eq] at hu - simp only [pos_fiber, Set.mem_ofPred_eq] + simp only [negFiber, Set.mem_ofPred_eq] at hu + simp only [posFiber, Set.mem_ofPred_eq] obtain ⟨hu_neg, hu_lb, hu_ub⟩ := hu refine ⟨neg_pos.mpr hu_neg, ?_, ?_⟩ · rwa [Int.cast_neg, neg_sq] @@ -2660,9 +2653,9 @@ private lemma int_abs_le_ceil_sqrt (y : ℤ) (M : ℝ) (_hM : 0 ≤ M) _ ≤ ↑⌈Real.sqrt M⌉ := Int.le_ceil _ lemma pos_fiber_subset_Icc (X : ℝ) (x : ℕ+) : - pos_fiber X x ⊆ Set.Icc 1 ⌈Real.sqrt (5 * (↑↑x : ℝ) ^ 22 + 4 * X)⌉ := by + posFiber X x ⊆ Set.Icc 1 ⌈Real.sqrt (5 * (↑↑x : ℝ) ^ 22 + 4 * X)⌉ := by intro u hu - simp only [pos_fiber, Set.mem_ofPred_eq] at hu + simp only [posFiber, Set.mem_ofPred_eq] at hu obtain ⟨hu_pos, _, hu_sq_le⟩ := hu constructor · omega @@ -2674,7 +2667,7 @@ lemma pos_fiber_subset_Icc (X : ℝ) (x : ℕ+) : rwa [abs_of_pos hu_pos] at h_abs lemma pos_fiber_finite (X : ℝ) (x : ℕ+) : - (pos_fiber X x).Finite := (Set.finite_Icc 1 ⌈Real.sqrt (5 * (↑↑x : ℝ) ^ 22 + 4 * X)⌉).subset + (posFiber X x).Finite := (Set.finite_Icc 1 ⌈Real.sqrt (5 * (↑↑x : ℝ) ^ 22 + 4 * X)⌉).subset (pos_fiber_subset_Icc X x) lemma E4_neg_fiber_ncard_le_pos_fiber (X : ℝ) (x : ℕ+) : @@ -2684,7 +2677,7 @@ lemma E4_neg_fiber_ncard_le_pos_fiber (X : ℝ) (x : ℕ+) : (↑u : ℝ) ^ 2 ≤ 5 * (↑↑x : ℝ) ^ 22 + 4 * X}.ncard := by have h1 := neg_maps_to_pos X x have h2 := pos_fiber_finite X x - change (neg_fiber X x).ncard ≤ (pos_fiber X x).ncard + change (negFiber X x).ncard ≤ (posFiber X x).ncard exact Set.ncard_le_ncard_of_injOn Neg.neg (fun u hu => h1 u hu) (neg_injective.injOn) @@ -3946,7 +3939,7 @@ lemma reduction_lemma_core (R : RamanujanTau) (habc : ABC) (h54 : Proposition54 obtain ⟨C₃, hC₃, X₃, hX₃, h_k3⟩ := k_ge3_contribution R h54 obtain ⟨X₁, hX₁, h_k1⟩ := k1_contribution_abc R habc obtain ⟨X₂, hX₂, h_k2⟩ := k2_contribution_abc R habc - refine ⟨C₃ + 3, by linarith, max (max X₁ (max X₂ X₃)) 1, by positivity, ?_⟩ + refine ⟨C₃ + 3, by positivity, max (max X₁ (max X₂ X₃)) 1, by positivity, ?_⟩ intro X hX have hX_pos : 1 < X := lt_of_le_of_lt (le_max_right _ _) hX have hX1 : X₁ < X := lt_of_le_of_lt (le_max_of_le_left (le_max_left _ _)) hX @@ -3958,24 +3951,21 @@ lemma reduction_lemma_core (R : RamanujanTau) (habc : ABC) (h54 : Proposition54 have hk1 := h_k1 X hX1 have hk2 := h_k2 X hX2 have hk3 := h_k3 X hX3 - have h_one_le : (1 : ℝ) ≤ X ^ ((13 : ℝ) / 22) := by - rw [show (1 : ℝ) = 1 ^ ((13 : ℝ) / 22) by simp] - exact Real.rpow_le_rpow (by linarith) (le_of_lt hX_pos) (by positivity) - have hX_pos' : (0 : ℝ) < X := by linarith + have h_one_le : (1 : ℝ) ≤ X ^ ((13 : ℝ) / 22) := + Real.one_le_rpow hX_pos.le (by norm_num) + have hX_pos' : (0 : ℝ) < X := lt_trans zero_lt_one hX_pos have hmul_nn : (0 : ℝ) ≤ X ^ ((1 : ℝ) / 2) * Real.log X := mul_nonneg (Real.rpow_nonneg hX_pos'.le _) (Real.log_nonneg hX_pos.le) - set T := X ^ ((1 : ℝ) / 2) * Real.log X + - X ^ ((13 : ℝ) / 22) + X ^ ((6 : ℝ) / 11) + - (E2 X : ℝ) + (E4 X : ℝ) have hS_bound : (S R X : ℝ) ≤ 2 * X ^ ((13 : ℝ) / 22) + (E2 X : ℝ) + (E4 X : ℝ) + - X ^ ((6 : ℝ) / 11) + C₃ * (X ^ ((1 : ℝ) / 2) * Real.log X) := by linarith - have hT_def : T = X ^ ((1 : ℝ) / 2) * Real.log X + X ^ ((13 : ℝ) / 22) + - X ^ ((6 : ℝ) / 11) + (E2 X : ℝ) + (E4 X : ℝ) := rfl - nlinarith [mul_nonneg (le_of_lt hC₃) hmul_nn, - mul_nonneg (le_of_lt hC₃) (Real.rpow_nonneg hX_pos'.le ((13 : ℝ) / 22)), - mul_nonneg (le_of_lt hC₃) (Real.rpow_nonneg hX_pos'.le ((6 : ℝ) / 11)), - mul_nonneg (le_of_lt hC₃) (Nat.cast_nonneg (E2 X)), - mul_nonneg (le_of_lt hC₃) (Nat.cast_nonneg (E4 X))] + X ^ ((6 : ℝ) / 11) + C₃ * (X ^ ((1 : ℝ) / 2) * Real.log X) := by + linarith only [hS, hk1, hk2, hk3, h_one_le] + have h13 := Real.rpow_nonneg hX_pos'.le ((13 : ℝ) / 22) + have h6 := Real.rpow_nonneg hX_pos'.le ((6 : ℝ) / 11) + have hE2 : (0 : ℝ) ≤ E2 X := Nat.cast_nonneg _ + have hE4 : (0 : ℝ) ≤ E4 X := Nat.cast_nonneg _ + linarith only [hS_bound, hmul_nn, h13, h6, hE2, hE4, + mul_nonneg hC₃.le h13, mul_nonneg hC₃.le h6, + mul_nonneg hC₃.le hE2, mul_nonneg hC₃.le hE4] theorem reduction_lemma (habc : ABC) (h54 : Proposition54 R) : ∃ C : ℝ, 0 < C ∧ ∃ X₀ : ℝ, 0 < X₀ ∧ ∀ X : ℝ, X₀ < X → @@ -5059,12 +5049,12 @@ lemma abc_bound_E2_core (habc : ABC) (η : ℝ) (hη : 0 < η) : have hε_pos : (0 : ℝ) < ε := by positivity have hε_le_tenth : ε ≤ 1/10 := min_le_left _ _ have hε_le_eta4 : ε ≤ η/4 := min_le_right _ _ - have hε_lt : ε < 9/13 := by linarith + have hε_lt : ε < 9/13 := by linarith only [hε_le_tenth] obtain ⟨Cx, hCx_pos, X₁, hX₁_pos, hxbound⟩ := E2_x_bound_from_abc habc ε hε_pos hε_lt set exp := ((4 : ℝ) + 2 * ε) / (9 - 13 * ε) with hexp_def have hexp_strict : exp < (4 : ℝ) / 9 + η := exponent_comparison_strict η ε hη hε_pos hε_le_eta4 hε_le_tenth - have hCx1_pos : (0 : ℝ) < Cx + 1 := by linarith + have hCx1_pos : (0 : ℝ) < Cx + 1 := by positivity obtain ⟨X₂, hX₂_pos, hCx_absorb⟩ := eventually_rpow_ge_const hCx1_pos hexp_strict refine ⟨8, by positivity, max (max X₁ X₂) 3, by positivity, fun X hX => ?_⟩ have hX₁_lt : X₁ < X := @@ -5072,16 +5062,17 @@ lemma abc_bound_E2_core (habc : ABC) (η : ℝ) (hη : 0 < η) : have hX₂_lt : X₂ < X := lt_of_le_of_lt (le_trans (le_max_right _ _) (le_max_left _ _)) hX have hX3 : (3 : ℝ) ≤ X := le_of_lt (lt_of_le_of_lt (le_max_right _ _) hX) - have hX2 : (2 : ℝ) < X := by linarith - have hX_pos : (0 : ℝ) < X := by linarith + have hX2 : (2 : ℝ) < X := by linarith only [hX3] + have hX_pos : (0 : ℝ) < X := lt_trans zero_lt_two hX2 have hB_pos : (0 : ℝ) < Cx * X ^ exp := by positivity have step1 := E2_ncard_le_via_fibers X (Cx * X ^ exp) hX2 hB_pos (E2_fiber_bound X hX2) (hxbound X hX₁_lt) have hCx_le : Cx + 1 ≤ X ^ ((4 : ℝ) / 9 + η - exp) := hCx_absorb X hX₂_lt have hkey : (Cx + 1) * X ^ exp ≤ X ^ ((4 : ℝ) / 9 + η) := rpow_diff_mul_rpow_le hX_pos hCx_le - have hexp_nonneg : (0 : ℝ) ≤ exp := div_nonneg (by linarith) (by linarith) - have hXexp_ge1 : (1 : ℝ) ≤ X ^ exp := Real.one_le_rpow (by linarith) hexp_nonneg + have hexp_nonneg : (0 : ℝ) ≤ exp := + div_nonneg (by linarith only [hε_pos]) (by linarith only [hε_lt]) + have hXexp_ge1 : (1 : ℝ) ≤ X ^ exp := Real.one_le_rpow (by linarith only [hX3]) hexp_nonneg calc (E2 X : ℝ) ≤ 4 * (Cx * X ^ exp + 1) := step1 _ ≤ 4 * (Cx * X ^ exp + 1 * X ^ exp) := by @@ -5090,7 +5081,8 @@ lemma abc_bound_E2_core (habc : ABC) (η : ℝ) (hη : 0 < η) : _ = 4 * ((Cx + 1) * X ^ exp) := by ring _ ≤ 4 * X ^ ((4 : ℝ) / 9 + η) := by gcongr _ ≤ 8 * X ^ ((4 : ℝ) / 9 + η) := by - nlinarith [Real.rpow_nonneg (le_of_lt hX_pos) ((4 : ℝ) / 9 + η)] + exact mul_le_mul_of_nonneg_right (by norm_num : (4 : ℝ) ≤ 8) + (Real.rpow_nonneg hX_pos.le _) theorem abc_bound_E2 (habc : ABC) (η : ℝ) (hη : 0 < η) : ∃ C : ℝ, 0 < C ∧ ∃ X₀ : ℝ, 0 < X₀ ∧ ∀ X : ℝ, X₀ < X → diff --git a/LeanPool/Redhill.lean b/LeanPool/Redhill.lean index 49112ecd32..37bb4b2725 100644 --- a/LeanPool/Redhill.lean +++ b/LeanPool/Redhill.lean @@ -3,25 +3,32 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ -import LeanPool.Redhill.BB94 -import LeanPool.Redhill.Common.Conjectures -import LeanPool.Redhill.Common.MaxAbs -import LeanPool.Redhill.Common.PairwiseCoprime -import LeanPool.Redhill.Common.PrimeChain -import LeanPool.Redhill.Common.Quality -import LeanPool.Redhill.Common.SubsumCondition -import LeanPool.Redhill.Common.VWPair -import LeanPool.Redhill.General.Coprime -import LeanPool.Redhill.General.Defs -import LeanPool.Redhill.General.Main -import LeanPool.Redhill.General.Subsum -import LeanPool.Redhill.KonyaginPrelude -import LeanPool.Redhill.Odd.Defs -import LeanPool.Redhill.Odd.Main -import LeanPool.Redhill.Odd.Pell -import LeanPool.Redhill.Odd.Subsum -import LeanPool.Redhill.ToMathlib.NatAbs -import LeanPool.Redhill.ToMathlib.NatSumProd +module + +public import LeanPool.Redhill.BB94 +public import LeanPool.Redhill.Common.Conjectures +public import LeanPool.Redhill.Common.MaxAbs +public import LeanPool.Redhill.Common.PairwiseCoprime +public import LeanPool.Redhill.Common.PrimeChain +public import LeanPool.Redhill.Common.Quality +public import LeanPool.Redhill.Common.SubsumCondition +public import LeanPool.Redhill.Common.VWPair +public import LeanPool.Redhill.General.Coprime +public import LeanPool.Redhill.General.Defs +public import LeanPool.Redhill.General.Main +public import LeanPool.Redhill.General.Subsum +public import LeanPool.Redhill.KonyaginPrelude +public import LeanPool.Redhill.Odd.Defs +public import LeanPool.Redhill.Odd.Main +public import LeanPool.Redhill.Odd.Pell +public import LeanPool.Redhill.Odd.Subsum +public import LeanPool.Redhill.ToMathlib.NatAbs +public import LeanPool.Redhill.ToMathlib.NatSumProd +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.RingTheory.Radical.NatInt +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Improved Lower Bounds for Strong n-Conjectures @@ -33,3 +40,5 @@ Main declarations: `not_ramaekersConjecture_ge_six`, `le_quality_nConjectureTupl Tags: number-theory, abc-conjecture, n-conjecture, ramaekers-conjecture MSC: 11A41, 11D75 -/ + +@[expose] public section diff --git a/LeanPool/Redhill/BB94.lean b/LeanPool/Redhill/BB94.lean index c8b140f6a1..5897fb9f10 100644 --- a/LeanPool/Redhill/BB94.lean +++ b/LeanPool/Redhill/BB94.lean @@ -3,15 +3,20 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module +public import LeanPool.Redhill.Common.Conjectures +public import Mathlib.Algebra.EuclideanDomain.Int +public import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.RingTheory.Radical.NatInt -import LeanPool.Redhill.Common.Conjectures /-! # Browkin and Brzeziński's 1994 result -/ +@[expose] public section + namespace BB94 diff --git a/LeanPool/Redhill/Common/Conjectures.lean b/LeanPool/Redhill/Common/Conjectures.lean index c5220e4f93..c595cb4f3c 100644 --- a/LeanPool/Redhill/Common/Conjectures.lean +++ b/LeanPool/Redhill/Common/Conjectures.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module -import LeanPool.Redhill.Common.PairwiseCoprime -import LeanPool.Redhill.Common.Quality -import LeanPool.Redhill.Common.SubsumCondition +public import LeanPool.Redhill.Common.PairwiseCoprime +public import LeanPool.Redhill.Common.Quality +public import LeanPool.Redhill.Common.SubsumCondition /-! # Definitions of the tuple sets and conjectures considered in the paper -/ +@[expose] public section + open Finset diff --git a/LeanPool/Redhill/Common/MaxAbs.lean b/LeanPool/Redhill/Common/MaxAbs.lean index d037ea2f28..08473d653a 100644 --- a/LeanPool/Redhill/Common/MaxAbs.lean +++ b/LeanPool/Redhill/Common/MaxAbs.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module -import Mathlib.Data.Finset.Lattice.Fold -import Mathlib.Data.Fintype.Basic +public import Mathlib.Data.Finset.Lattice.Fold +public import Mathlib.Data.Fintype.Basic /-! # Maximum absolute value of a tuple of integers -/ +@[expose] public section + open Finset diff --git a/LeanPool/Redhill/Common/PairwiseCoprime.lean b/LeanPool/Redhill/Common/PairwiseCoprime.lean index 2345d5aead..7b2e492c2c 100644 --- a/LeanPool/Redhill/Common/PairwiseCoprime.lean +++ b/LeanPool/Redhill/Common/PairwiseCoprime.lean @@ -3,14 +3,19 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module -import Mathlib.Algebra.GCDMonoid.Finset +public import Mathlib.Algebra.GCDMonoid.Finset +public import Mathlib.Data.Fintype.Basic +public import Mathlib.RingTheory.Coprime.Basic import Mathlib.RingTheory.Coprime.Lemmas /-! # Pairwise coprimality -/ +@[expose] public section + /-- A predicate stating that the given tuple's numbers are pairwise coprime. -/ abbrev PairwiseCoprime {n : ℕ} (a : Fin n → ℤ) : Prop := diff --git a/LeanPool/Redhill/Common/PrimeChain.lean b/LeanPool/Redhill/Common/PrimeChain.lean index 998106f19f..f1d43c0b08 100644 --- a/LeanPool/Redhill/Common/PrimeChain.lean +++ b/LeanPool/Redhill/Common/PrimeChain.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module -import Mathlib.Data.Nat.Prime.Infinite -import LeanPool.Redhill.Common.SubsumCondition +public import Mathlib.Data.Nat.Prime.Infinite +public import LeanPool.Redhill.Common.SubsumCondition +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Algebra.Order.Group.Nat /-! # Prime chains @@ -13,6 +16,8 @@ import LeanPool.Redhill.Common.SubsumCondition These are sequences of primes where the next prime is at least twice the last. -/ +@[expose] public section + open Nat diff --git a/LeanPool/Redhill/Common/Quality.lean b/LeanPool/Redhill/Common/Quality.lean index c344759015..af2da55c00 100644 --- a/LeanPool/Redhill/Common/Quality.lean +++ b/LeanPool/Redhill/Common/Quality.lean @@ -3,17 +3,20 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module -import Mathlib.Algebra.EuclideanDomain.Int -import Mathlib.Analysis.SpecialFunctions.Log.Basic -import Mathlib.RingTheory.PrincipalIdealDomain -import Mathlib.RingTheory.Radical.Basic -import LeanPool.Redhill.Common.MaxAbs +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +public import Mathlib.RingTheory.Radical.Basic +public import LeanPool.Redhill.Common.MaxAbs +public import Mathlib.Algebra.EuclideanDomain.Int +public import Mathlib.RingTheory.PrincipalIdealDomain /-! # Qualities of tuples and sets of tuples -/ +@[expose] public section + open Finset Real ENNReal diff --git a/LeanPool/Redhill/Common/SubsumCondition.lean b/LeanPool/Redhill/Common/SubsumCondition.lean index 96d6bce338..6da68c7e67 100644 --- a/LeanPool/Redhill/Common/SubsumCondition.lean +++ b/LeanPool/Redhill/Common/SubsumCondition.lean @@ -3,17 +3,23 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module +public import Mathlib.Data.Finset.Sort +public import Mathlib.Basic.Sign.Defs +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Algebra.Ring.Int.Defs import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.Order.BigOperators.Group.Finset -import Mathlib.Algebra.Order.Ring.Nat -import Mathlib.Basic.Sign.Defs -import Mathlib.Data.Finset.Sort + +public import Mathlib.Algebra.Order.Ring.Nat /-! # Subsum conditions -/ +@[expose] public section + open Finset SignType diff --git a/LeanPool/Redhill/Common/VWPair.lean b/LeanPool/Redhill/Common/VWPair.lean index 834f2d74a9..06d5f613ca 100644 --- a/LeanPool/Redhill/Common/VWPair.lean +++ b/LeanPool/Redhill/Common/VWPair.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ - -import Mathlib.Data.Nat.ChineseRemainder +module + +public import Mathlib.Data.Nat.ChineseRemainder +public import LeanPool.Redhill.Common.PrimeChain +public import Mathlib.Algebra.Ring.Parity +public import Mathlib.Order.Interval.Finset.Nat +import Mathlib.Algebra.Order.Group.Nat +import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Nat.Factors import Mathlib.Data.ZMod.Defs -import LeanPool.Redhill.Common.PrimeChain /-! # VW pairs @@ -27,6 +32,8 @@ because 29 and 31 are big primes. The coprimality condition only requires `0 < u ≤ m` and is proved separately. -/ +@[expose] public section + open Nat Finset diff --git a/LeanPool/Redhill/General/Coprime.lean b/LeanPool/Redhill/General/Coprime.lean index 821c5eb8f8..bdc8ec7c20 100644 --- a/LeanPool/Redhill/General/Coprime.lean +++ b/LeanPool/Redhill/General/Coprime.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module -import Mathlib.Order.Filter.Finite -import LeanPool.Redhill.Common.PairwiseCoprime -import LeanPool.Redhill.General.Defs +public import LeanPool.Redhill.Common.PairwiseCoprime +public import LeanPool.Redhill.General.Defs +public import Mathlib.Order.Filter.AtTopBot.Defs +import Mathlib.FieldTheory.Finite.Basic /-! # Coprimality proof for the general case @@ -17,6 +19,8 @@ they have no common factor". This is not always true even with the paper's defin but can be made so by adding 101 to the factors of `y`. -/ +@[expose] public section + namespace GeneralCase open Fin Filter IsCoprime diff --git a/LeanPool/Redhill/General/Defs.lean b/LeanPool/Redhill/General/Defs.lean index 4f18d47dfe..50b500384f 100644 --- a/LeanPool/Redhill/General/Defs.lean +++ b/LeanPool/Redhill/General/Defs.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ - -import Mathlib.FieldTheory.Finite.Basic -import LeanPool.Redhill.Common.VWPair +module + +public import LeanPool.Redhill.Common.VWPair +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Tactic.Zify /-! # Definitions for the general case @@ -16,6 +24,8 @@ for sufficiently large `h`. The lower bound `s` for `primeChain` in `U` was originally `200 * Y F ^ 6`. -/ +@[expose] public section + namespace GeneralCase diff --git a/LeanPool/Redhill/General/Main.lean b/LeanPool/Redhill/General/Main.lean index 3d1e3a56ab..541105062b 100644 --- a/LeanPool/Redhill/General/Main.lean +++ b/LeanPool/Redhill/General/Main.lean @@ -3,16 +3,26 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module -import Mathlib.RingTheory.Radical.NatInt -import LeanPool.Redhill.Common.Conjectures +public import LeanPool.Redhill.Common.Conjectures +public import LeanPool.Redhill.General.Defs +public import Mathlib.Algebra.EuclideanDomain.Int +public import Mathlib.RingTheory.PrincipalIdealDomain import LeanPool.Redhill.General.Coprime import LeanPool.Redhill.General.Subsum +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.RingTheory.Radical.NatInt +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # The general case (Theorem 1.14) -/ +@[expose] public section + namespace GeneralCase diff --git a/LeanPool/Redhill/General/Subsum.lean b/LeanPool/Redhill/General/Subsum.lean index 444b4cf41d..6558b2ba4c 100644 --- a/LeanPool/Redhill/General/Subsum.lean +++ b/LeanPool/Redhill/General/Subsum.lean @@ -3,16 +3,27 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module -import Mathlib.Algebra.Order.Archimedean.Basic -import LeanPool.Redhill.Common.MaxAbs -import LeanPool.Redhill.General.Defs +public import LeanPool.Redhill.Common.MaxAbs +public import LeanPool.Redhill.General.Defs +public import Mathlib.Order.Filter.AtTopBot.Defs import LeanPool.Redhill.ToMathlib.NatAbs +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Algebra.Order.Archimedean.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Order.Filter.AtTopBot.Basic +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Subsum condition for the general case -/ +@[expose] public section + namespace GeneralCase open Fin Finset Nat diff --git a/LeanPool/Redhill/KonyaginPrelude.lean b/LeanPool/Redhill/KonyaginPrelude.lean index 13ca74ef8e..0cb030e392 100644 --- a/LeanPool/Redhill/KonyaginPrelude.lean +++ b/LeanPool/Redhill/KonyaginPrelude.lean @@ -3,15 +3,20 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module +public import LeanPool.Redhill.Common.Conjectures +public import Mathlib.Algebra.EuclideanDomain.Int +public import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.RingTheory.Radical.NatInt -import LeanPool.Redhill.Common.Conjectures /-! # The "warm-up" result (Theorem 2.1) -/ +@[expose] public section + namespace KonyaginPrelude diff --git a/LeanPool/Redhill/Odd/Defs.lean b/LeanPool/Redhill/Odd/Defs.lean index 85450ea504..75de381a8d 100644 --- a/LeanPool/Redhill/Odd/Defs.lean +++ b/LeanPool/Redhill/Odd/Defs.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module +public import LeanPool.Redhill.Common.PairwiseCoprime +public import LeanPool.Redhill.Common.VWPair +import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.BigOperators.Ring.Nat +import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Algebra.Order.BigOperators.GroupWithZero.Finset +import Mathlib.Data.Nat.Prime.Basic +import Mathlib.RingTheory.Coprime.Lemmas import Mathlib.Tactic.FinCases import Mathlib.Tactic.IntervalCases -import LeanPool.Redhill.Common.PairwiseCoprime -import LeanPool.Redhill.Common.VWPair /-! # Definitions for the odd case @@ -18,6 +23,8 @@ The lower bound `s` for `primeChain` in `U` was originally `max 16 (F.sup id)`. This could be lowered because `strongSSC_vwTup` only requires `m ≤ s`, not `2m ≤ s`. -/ +@[expose] public section + namespace OddCase diff --git a/LeanPool/Redhill/Odd/Main.lean b/LeanPool/Redhill/Odd/Main.lean index 99174eeeb1..0da14b367a 100644 --- a/LeanPool/Redhill/Odd/Main.lean +++ b/LeanPool/Redhill/Odd/Main.lean @@ -3,15 +3,22 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module -import LeanPool.Redhill.Odd.Pell +public import LeanPool.Redhill.Odd.Pell +public import LeanPool.Redhill.Common.Conjectures +public import LeanPool.Redhill.Odd.Defs +public import Mathlib.Algebra.EuclideanDomain.Int +public import Mathlib.RingTheory.PrincipalIdealDomain import LeanPool.Redhill.Odd.Subsum -import LeanPool.Redhill.Common.Conjectures +import Mathlib.RingTheory.Radical.NatInt /-! # The odd case (Theorem 1.13) -/ +@[expose] public section + namespace OddCase diff --git a/LeanPool/Redhill/Odd/Pell.lean b/LeanPool/Redhill/Odd/Pell.lean index bed956a85d..c2d941b366 100644 --- a/LeanPool/Redhill/Odd/Pell.lean +++ b/LeanPool/Redhill/Odd/Pell.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module +public import Mathlib.Algebra.GCDMonoid.Nat +public import Mathlib.RingTheory.Radical.Basic +public import Mathlib.RingTheory.UniqueFactorizationDomain.Nat import Mathlib.RingTheory.Radical.NatInt /-! # Pell equation for the odd case -/ +@[expose] public section + namespace OddCase diff --git a/LeanPool/Redhill/Odd/Subsum.lean b/LeanPool/Redhill/Odd/Subsum.lean index a5ed8af4af..52cb6b899a 100644 --- a/LeanPool/Redhill/Odd/Subsum.lean +++ b/LeanPool/Redhill/Odd/Subsum.lean @@ -3,17 +3,28 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module -import Mathlib.Tactic.Zify -import LeanPool.Redhill.Common.MaxAbs -import LeanPool.Redhill.Odd.Defs +public import LeanPool.Redhill.Common.MaxAbs +public import LeanPool.Redhill.Odd.Defs import LeanPool.Redhill.ToMathlib.NatAbs import LeanPool.Redhill.ToMathlib.NatSumProd +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Algebra.Order.BigOperators.GroupWithZero.Finset +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Zify /-! # Subsum condition for the odd case -/ +@[expose] public section + namespace OddCase open Fin Finset diff --git a/LeanPool/Redhill/ToMathlib/NatAbs.lean b/LeanPool/Redhill/ToMathlib/NatAbs.lean index a5ed76ed59..c87d3ab93d 100644 --- a/LeanPool/Redhill/ToMathlib/NatAbs.lean +++ b/LeanPool/Redhill/ToMathlib/NatAbs.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module +public import Mathlib.Data.Int.Notation +public import Mathlib.Tactic.ToDual import Mathlib.Data.Int.Order.Basic /-! # Lemmas on `Int.natAbs` -/ +@[expose] public section + lemma Int.sub_le_add_natAbs {a b : ℤ} : a.natAbs - b.natAbs ≤ (a + b).natAbs := by lia diff --git a/LeanPool/Redhill/ToMathlib/NatSumProd.lean b/LeanPool/Redhill/ToMathlib/NatSumProd.lean index 301a083807..6566f5b9a5 100644 --- a/LeanPool/Redhill/ToMathlib/NatSumProd.lean +++ b/LeanPool/Redhill/ToMathlib/NatSumProd.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ +module +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Algebra.Order.Monoid.NatCast import Mathlib.Algebra.Ring.Nat @@ -14,6 +16,8 @@ import Mathlib.Algebra.Ring.Nat These are used when proving the subsum condition in the odd case. -/ +@[expose] public section + namespace Nat diff --git a/LeanPool/RellichKondrachov.lean b/LeanPool/RellichKondrachov.lean index c1f1686d12..a053e828cc 100644 --- a/LeanPool/RellichKondrachov.lean +++ b/LeanPool/RellichKondrachov.lean @@ -3,49 +3,50 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Analysis.Calculus.ContDiff.Support -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1 -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H2 -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Approximation -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.ArzelaAscoli -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Compactness -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.FrechetKolmogorov -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Kernels -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Smoothing -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Transfer -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.TranslationIntegral -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2CompactnessCriterion -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.Rellich -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.SupportedH1 -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.Translation -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.TranslationEstimate -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.TranslationEstimateH1 -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.TranslationEstimateL2 -import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.ChartLocalLipschitz -import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.ChartLocalLipschitzForward -import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure -import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure.Finiteness -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartData -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartDataRiemannian -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasure -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasureLp -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasureRiemannian -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasureRiemannianVolume -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.EmbeddingL2 -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.H1 -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.H2 -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.Localization -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.LocalizationH2 -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachov -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian.Chartwise -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian.Global -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian.Transport -import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.ChangeMeasureLeSmul -import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.ExtendByZeroRangeEquiv -import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.Restrict -import LeanPool.RellichKondrachov.MeasureTheory.Measure.HausdorffVolume +public import LeanPool.RellichKondrachov.Analysis.Calculus.ContDiff.Support +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1 +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H2 +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Approximation +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.ArzelaAscoli +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Compactness +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.FrechetKolmogorov +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Kernels +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Smoothing +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Transfer +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.TranslationIntegral +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2CompactnessCriterion +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.Rellich +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.SupportedH1 +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.Translation +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.TranslationEstimate +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.TranslationEstimateH1 +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.TranslationEstimateL2 +public import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.ChartLocalLipschitz +public import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.ChartLocalLipschitzForward +public import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure +public import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure.Finiteness +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartData +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartDataRiemannian +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasure +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasureLp +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasureRiemannian +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasureRiemannianVolume +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.EmbeddingL2 +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.H1 +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.H2 +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.Localization +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.LocalizationH2 +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachov +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian.Chartwise +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian.Global +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian.Transport +public import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.ChangeMeasureLeSmul +public import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.ExtendByZeroRangeEquiv +public import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.Restrict +public import LeanPool.RellichKondrachov.MeasureTheory.Measure.HausdorffVolume /-! # Rellich–Kondrachov compact embedding theorem @@ -58,6 +59,8 @@ Tags: analysis, pde, sobolev-embedding MSC: 46E35 -/ +@[expose] public section + /-! # Rellich–Kondrachov Compact Embedding Theorem diff --git a/LeanPool/RellichKondrachov/Analysis/Calculus/ContDiff/Support.lean b/LeanPool/RellichKondrachov/Analysis/Calculus/ContDiff/Support.lean index 7812b4edf5..45053edb42 100644 --- a/LeanPool/RellichKondrachov/Analysis/Calculus/ContDiff/Support.lean +++ b/LeanPool/RellichKondrachov/Analysis/Calculus/ContDiff/Support.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module +public import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.ContDiff.Basic -import Mathlib.Topology.Algebra.Support /-! # `RellichKondrachov.Analysis.Calculus.ContDiff.Support` @@ -17,6 +18,8 @@ is contained in `s`, then `f` is globally `C^n` (it is `0` in a neighborhood of outside `s`). -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace Calculus diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/H1.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/H1.lean index b3e95a782b..290ed5b783 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/H1.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/H1.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module +public import Mathlib.Analysis.InnerProductSpace.Dual +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.MeasureTheory.Function.LpSpace.Basic import Mathlib.Analysis.Calculus.ContDiff.Operations -import Mathlib.Analysis.Calculus.FDeriv.Const -import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.MeasureTheory.Function.LpSpace.Complete import Mathlib.MeasureTheory.Function.LpSpace.Indicator -import Mathlib.Topology.Algebra.Support /-! # `RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1` @@ -41,6 +42,8 @@ No analytic “Sobolev theorems” are proved here; those are tracked separately regularity beads). -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces @@ -62,9 +65,12 @@ local instance instOpensMeasurableSpaceH1 : OpensMeasurableSpace E := by infer_i variable (μ : Measure E) [IsFiniteMeasureOnCompacts μ] -private abbrev L2ℝ : Type _ := ↥(E →₂[μ] ℝ) -private abbrev L2E : Type _ := ↥(E →₂[μ] E) -private abbrev H1Target : Type _ := L2ℝ (μ := μ) × L2E (μ := μ) +/-- The space of square-integrable real-valued functions. -/ +abbrev L2ℝ : Type _ := ↥(E →₂[μ] ℝ) +/-- The space of square-integrable vector-valued functions. -/ +abbrev L2E : Type _ := ↥(E →₂[μ] E) +/-- The product space containing a function and its first derivative. -/ +abbrev H1Target : Type _ := L2ℝ (μ := μ) × L2E (μ := μ) /-- `C¹` real-valued functions on `E` with compact support, as a submodule of `E → ℝ`. -/ def C1c : Submodule ℝ (E → ℝ) where @@ -166,8 +172,8 @@ private lemma toL2_smul (c : ℝ) (f : ↥(C1c (E := E))) : /-- Linear map sending `C¹_c` functions to their `L²` classes. -/ noncomputable def toL2Linear : ↥(C1c (E := E)) →ₗ[ℝ] L2ℝ (μ := μ) where toFun := toL2 (μ := μ) (E := E) - map_add' := toL2_add (μ := μ) (E := E) - map_smul' := toL2_smul (μ := μ) (E := E) + map_add' := by exact toL2_add (μ := μ) (E := E) + map_smul' := by exact toL2_smul (μ := μ) (E := E) private lemma toL2Grad_add (f g : ↥(C1c (E := E))) : toL2Grad (μ := μ) (E := E) (f + g) = @@ -227,8 +233,8 @@ private lemma toL2Grad_smul (c : ℝ) (f : ↥(C1c (E := E))) : /-- Linear map sending `C¹_c` functions to the `L²` class of their gradient. -/ noncomputable def toL2GradLinear : ↥(C1c (E := E)) →ₗ[ℝ] L2E (μ := μ) where toFun := toL2Grad (μ := μ) (E := E) - map_add' := toL2Grad_add (μ := μ) (E := E) - map_smul' := toL2Grad_smul (μ := μ) (E := E) + map_add' := by exact toL2Grad_add (μ := μ) (E := E) + map_smul' := by exact toL2Grad_smul (μ := μ) (E := E) /-- The graph map `f ↦ (f, ∇f)` into `L² × L²(E)`. -/ noncomputable def graph : ↥(C1c (E := E)) →ₗ[ℝ] H1Target (μ := μ) := diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/H2.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/H2.lean index 98ffca4c8e..d85232a63a 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/H2.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/H2.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1 +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1 +import Mathlib.Analysis.Calculus.ContDiff.Operations +import Mathlib.MeasureTheory.Function.LpSpace.Complete +import Mathlib.MeasureTheory.Function.LpSpace.Indicator /-! # `RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H2` @@ -18,6 +22,8 @@ Hessian, and define `H²` as the topological closure of the range inside an ambi No Rellich/elliptic regularity theorems are proved here; this file is purely definitional/API. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces @@ -39,10 +45,10 @@ local instance instOpensMeasurableSpaceH2 : OpensMeasurableSpace E := by infer_i variable (μ : Measure E) [IsFiniteMeasureOnCompacts μ] -private abbrev L2ℝ : Type _ := ↥(E →₂[μ] ℝ) -private abbrev L2E : Type _ := ↥(E →₂[μ] E) -private abbrev L2EE : Type _ := ↥(E →₂[μ] (E →L[ℝ] E)) -private abbrev H2Target : Type _ := L2ℝ (μ := μ) × (L2E (μ := μ) × L2EE (μ := μ)) +/-- Square-integrable functions taking values in continuous linear endomorphisms. -/ +abbrev L2EE : Type _ := ↥(E →₂[μ] (E →L[ℝ] E)) +/-- The product space containing a function and its first two derivatives. -/ +abbrev H2Target : Type _ := L2ℝ (μ := μ) × (L2E (μ := μ) × L2EE (μ := μ)) /-- `C²` real-valued functions on `E` with compact support, as a submodule of `E → ℝ`. -/ def C2c : Submodule ℝ (E → ℝ) where @@ -187,8 +193,8 @@ private lemma toL2Hess_smul (c : ℝ) (f : ↥(C2c (E := E))) : /-- Linear map sending `C²_c` functions to the `L²` class of their Hessian. -/ noncomputable def toL2HessLinear : ↥(C2c (E := E)) →ₗ[ℝ] L2EE (μ := μ) where toFun := toL2Hess (μ := μ) (E := E) - map_add' := toL2Hess_add (μ := μ) (E := E) - map_smul' := toL2Hess_smul (μ := μ) (E := E) + map_add' := by exact toL2Hess_add (μ := μ) (E := E) + map_smul' := by exact toL2Hess_smul (μ := μ) (E := E) /-- Linear map `C²_c → L²` (via the inclusion `C²_c ⊆ C¹_c`). -/ noncomputable def toL2FromC2cLinear : ↥(C2c (E := E)) →ₗ[ℝ] L2ℝ (μ := μ) := diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Approximation.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Approximation.lean index 9f450935e6..e050af59f4 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Approximation.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Approximation.lean @@ -3,17 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.Translation -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Smoothing -import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.MeasureTheory.Integral.MeanInequalities -import Mathlib.MeasureTheory.Integral.Prod -import Mathlib.MeasureTheory.Group.Prod -import Mathlib.MeasureTheory.Measure.WithDensity +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.Translation +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Smoothing import Mathlib.MeasureTheory.Measure.Haar.Unique -import Mathlib.MeasureTheory.Function.L2Space import Mathlib.Probability.Moments.Variance /-! @@ -28,6 +22,8 @@ The principal statement will control `‖smoothL2 ψ u - extendByZeroL2 u‖₂` `‖translateL2 t (extendByZeroL2 u) - extendByZeroL2 u‖₂` over `t` in the support of `ψ`. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/ArzelaAscoli.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/ArzelaAscoli.lean index a78a09fea4..43c06bafac 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/ArzelaAscoli.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/ArzelaAscoli.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Compactness -import Mathlib.Analysis.Normed.Group.Bounded -import Mathlib.Topology.ContinuousMap.Bounded.ArzelaAscoli +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Compactness import Mathlib.MeasureTheory.Function.L2Space -import Mathlib.MeasureTheory.Integral.Bochner.Set +import Mathlib.Topology.ContinuousMap.Bounded.ArzelaAscoli /-! # `L²` compactness criterion: Arzelà–Ascoli for the smoothing operator (Euclidean) @@ -26,6 +25,8 @@ Fréchet–Kolmogorov / Riesz–Kolmogorov approach to Euclidean Rellich–Kondr Tracking: Beads `lean-103.5.2.26.5.3.2.2.1.1`. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Compactness.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Compactness.lean index b85926e731..8a309bde7c 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Compactness.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Compactness.lean @@ -3,12 +3,9 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Smoothing -import Mathlib.MeasureTheory.Function.LpSeminorm.CompareExp -import Mathlib.MeasureTheory.Measure.Typeclasses.Finite -import Mathlib.Topology.Algebra.Monoid -import Mathlib.Topology.UniformSpace.HeineCantor +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Smoothing /-! # `L²` compactness criterion: compact smoothing operator (Euclidean) @@ -28,6 +25,8 @@ The Arzelà–Ascoli compactness statement for `smoothBCF` lives in This is tracked under Beads `lean-103.5.2.26.5.3.2.2.1`. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces @@ -66,7 +65,8 @@ lemma isCompact_Kψ (hK : IsCompact K) (hψcs : HasCompactSupport ψ) : IsCompact (Kψ (K := K) (ψ := ψ)) := IsCompact.add hK hψcs.isCompact -private def smoothOn (hKm : MeasurableSet K) (hψc : Continuous ψ) (hψcs : HasCompactSupport ψ) +/-- Restrict the smoothed function to its compact domain as a continuous map. -/ +def smoothOn (hKm : MeasurableSet K) (hψc : Continuous ψ) (hψcs : HasCompactSupport ψ) (u : MeasureTheory.Lp ℝ (2 : ℝ≥0∞) (volume.restrict K)) : C(↥(Kψ (K := K) (ψ := ψ)), ℝ) where toFun x := smoothFun (E := E) (K := K) ψ u x diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/FrechetKolmogorov.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/FrechetKolmogorov.lean index 4200b3ba26..e414679dcd 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/FrechetKolmogorov.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/FrechetKolmogorov.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Approximation +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Approximation import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Transfer -import Mathlib.Topology.UniformSpace.Cauchy /-! # `L²` compactness criterion: Fréchet–Kolmogorov (Euclidean, compact support case) @@ -36,6 +36,8 @@ compact support (modeled as `Lp ℝ 2 (volume.restrict K)` and embedded into `L Tracking: Beads `lean-103.5.2.26.5.3.2.2.3`. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Kernels.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Kernels.lean index 303da9976c..a60af7e8d5 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Kernels.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Kernels.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension -import Mathlib.MeasureTheory.Integral.Bochner.Set -import Mathlib.Topology.Algebra.Support /-! # `L²` compactness criterion: existence of small-support probability kernels (Euclidean) @@ -25,6 +26,8 @@ by its (positive) integral. Tracking: Beads `lean-103.5.2.26.5.3.2.2.5`. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Smoothing.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Smoothing.lean index 455dfced7d..8f451074f0 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Smoothing.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Smoothing.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.Restrict -import Mathlib.Analysis.Convolution -import Mathlib.Topology.Algebra.Support +public import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.Restrict +public import Mathlib.Analysis.Convolution /-! # `L²` compactness criterion: smoothing setup (Euclidean) @@ -22,6 +22,8 @@ Fréchet–Kolmogorov / Riesz–Kolmogorov approach to Euclidean Rellich–Kondr a smoothing operator obtained by convolution with a compactly supported continuous kernel `ψ`. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Transfer.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Transfer.lean index 94a5180c9b..382e46482e 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Transfer.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/Transfer.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Smoothing import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.ArzelaAscoli -import Mathlib.MeasureTheory.Function.LpSpace.Basic -import Mathlib.Topology.MetricSpace.Pseudo.Basic /-! # `L²` compactness criterion: transfer from `BCF` compactness to `L²` (Euclidean) @@ -23,6 +23,8 @@ This file transfers the Arzelà–Ascoli compactness of the `BoundedContinuousFu Tracking: Beads `lean-103.5.2.26.5.3.2.2.1.2`. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/TranslationIntegral.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/TranslationIntegral.lean index 76f1e181ad..ef088f5c61 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/TranslationIntegral.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2Compactness/TranslationIntegral.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Approximation -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.Translation -import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Approximation /-! # `L²` compactness criterion: bounding the translation-integral by a translation modulus @@ -22,6 +21,8 @@ The core observation is that if `ψ` is supported in a neighborhood where the tr Tracking: Beads `lean-103.5.2.26.5.3.2.2.4`. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2CompactnessCriterion.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2CompactnessCriterion.lean index a9a3ecaec4..21b46d02a2 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2CompactnessCriterion.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/L2CompactnessCriterion.lean @@ -3,15 +3,19 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Smoothing -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Approximation -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Compactness -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.ArzelaAscoli -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Transfer -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.FrechetKolmogorov -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Kernels -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.TranslationIntegral +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Smoothing +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Approximation +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Compactness +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.ArzelaAscoli +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Transfer +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.FrechetKolmogorov +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Kernels +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.TranslationIntegral + +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # `RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2CompactnessCriterion` @@ -21,3 +25,5 @@ machinery used in the Euclidean Rellich–Kondrachov proof stack. This is tracked under Beads `lean-103.5.2.26.5.3.2.2.*`. -/ + +@[expose] public section diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/Rellich.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/Rellich.lean index 8195f2fc1c..15f5c16bf5 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/Rellich.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/Rellich.lean @@ -3,14 +3,16 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import Mathlib.Analysis.Normed.Operator.Compact.Basic -import Mathlib.MeasureTheory.Measure.Lebesgue.Basic -import Mathlib.MeasureTheory.Function.LpSpace.Complete -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.TranslationEstimateH1 +public import Mathlib.Analysis.Normed.Operator.Compact.Basic +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1 +public import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.Restrict +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.FrechetKolmogorov import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.Kernels import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.L2Compactness.TranslationIntegral +import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.TranslationEstimateH1 /-! # `RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.Rellich` @@ -40,6 +42,8 @@ The proof uses: Tracking: Beads `lean-103.5.2.26.5.3.2.1`. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/SupportedH1.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/SupportedH1.lean index ee6fc10783..b42bf703f8 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/SupportedH1.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/SupportedH1.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1 -import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.Restrict +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1 +public import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.Restrict +import Mathlib.MeasureTheory.Measure.Real /-! # `RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.SupportedH1` @@ -26,6 +28,8 @@ arbitrary measure `μ`. Compactness results are proven elsewhere. - `RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.h1OnToL2Measure` -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/Translation.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/Translation.lean index 0742eedc62..19c3db7432 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/Translation.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/Translation.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1 -import Mathlib.Analysis.Calculus.FDeriv.Add -import Mathlib.MeasureTheory.Group.Measure -import Mathlib.MeasureTheory.Function.LpSpace.Basic -import Mathlib.Topology.Algebra.Group.Basic +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1 +import Mathlib.Analysis.Calculus.ContDiff.Operations +import Mathlib.MeasureTheory.Measure.Real /-! # `RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.Translation` @@ -26,6 +25,8 @@ operators and their interaction with the `C¹_c` graph embedding used to define - `grad_translate`: the Euclidean gradient commutes with translation. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/TranslationEstimate.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/TranslationEstimate.lean index 3555b237f5..a562f1a5af 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/TranslationEstimate.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/TranslationEstimate.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1 -import Mathlib.MeasureTheory.Integral.IntervalIntegral.ContDiff -import Mathlib.Analysis.Calculus.Deriv.Comp +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1 +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import Mathlib.Analysis.Calculus.ContDiff.Operations import Mathlib.Analysis.Calculus.Deriv.Mul -import Mathlib.Analysis.Calculus.Deriv.Add +import Mathlib.MeasureTheory.Integral.IntervalIntegral.ContDiff /-! # `RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.TranslationEstimate` @@ -22,6 +23,8 @@ At this stage we only prove *pointwise* inequalities along the segment `t ↦ x The measure-theoretic lifting to `L²` is tracked separately under `lean-103.5.2.26.5.3.2.3`. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/TranslationEstimateH1.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/TranslationEstimateH1.lean index e85049930b..1f65dbb65d 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/TranslationEstimateH1.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/TranslationEstimateH1.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.Translation import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.TranslationEstimateL2 -import Mathlib.Topology.Order.OrderClosed +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # `RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.TranslationEstimateH1` @@ -18,6 +20,8 @@ Extend Euclidean `L²` translation estimates from `C¹_c` to the closure-based E `L²(E)` component in our `H¹ ⊆ L² × L²(E)` model. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces diff --git a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/TranslationEstimateL2.lean b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/TranslationEstimateL2.lean index a858571708..582d9f67b5 100644 --- a/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/TranslationEstimateL2.lean +++ b/LeanPool/RellichKondrachov/Analysis/FunctionalSpaces/Sobolev/Euclidean/TranslationEstimateL2.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.Translation +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.Translation import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.TranslationEstimate -import Mathlib.MeasureTheory.Integral.MeanInequalities -import Mathlib.MeasureTheory.Measure.Prod +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.MeasureTheory.Measure.Lebesgue.Basic /-! # `RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.TranslationEstimateL2` @@ -25,6 +26,8 @@ of translations. inequality on `L²` norms), under a right-invariant measure. -/ +@[expose] public section + namespace RellichKondrachov namespace Analysis namespace FunctionalSpaces diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/ChartLocalLipschitz.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/ChartLocalLipschitz.lean index 6f7bc43c6c..2a0b1508af 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/ChartLocalLipschitz.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/ChartLocalLipschitz.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import Mathlib.Geometry.Manifold.Riemannian.Basic -import Mathlib.MeasureTheory.Integral.Lebesgue.Add +public import Mathlib.Geometry.Manifold.Riemannian.Basic /-! # `RellichKondrachov.Geometry.Manifold.Riemannian.ChartLocalLipschitz` @@ -22,6 +22,8 @@ Riemannian `edist` on `M`). `lipschitzOnWith_symm_extChartAt_ofRiemannianMetric` -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/ChartLocalLipschitzForward.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/ChartLocalLipschitzForward.lean index e1678a6bd5..2742b9e463 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/ChartLocalLipschitzForward.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/ChartLocalLipschitzForward.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import Mathlib.Geometry.Manifold.Riemannian.Basic +public import Mathlib.Geometry.Manifold.Riemannian.Basic /-! # `RellichKondrachov.Geometry.Manifold.Riemannian.ChartLocalLipschitzForward` @@ -17,6 +18,8 @@ Local Lipschitz control for the (forward) extended chart on a Riemannian manifol - `RellichKondrachov.Geometry.Manifold.Riemannian.lipschitzOnWith_extChartAt_ofRiemannianMetric` -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/VolumeMeasure.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/VolumeMeasure.lean index ebf215fe30..98f6a5bf62 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/VolumeMeasure.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/VolumeMeasure.lean @@ -3,12 +3,10 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import Mathlib.Geometry.Manifold.Riemannian.Basic -import Mathlib.LinearAlgebra.Dimension.Finrank -import Mathlib.MeasureTheory.Measure.Hausdorff -import Mathlib.MeasureTheory.Measure.Typeclasses.Finite -import Mathlib.Topology.Compactness.Compact +public import Mathlib.Geometry.Manifold.Riemannian.Basic +public import Mathlib.MeasureTheory.Measure.Hausdorff /-! # `RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure` @@ -26,6 +24,8 @@ Riemannian isometries and suitable for building `L²(M)` once finiteness propert Hausdorff measure `μH[dim]` on `M`, using the emetric structure induced by the Riemannian metric. -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/VolumeMeasure/Finiteness.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/VolumeMeasure/Finiteness.lean index 7c1891c628..976946dcc3 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/VolumeMeasure/Finiteness.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Riemannian/VolumeMeasure/Finiteness.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module +public import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.ChartLocalLipschitz -import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure /-! # `RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure.Finiteness` @@ -21,6 +22,8 @@ Finiteness properties of `riemannianVolumeMeasure`. on a compact manifold, the total volume is finite. -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartData.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartData.lean index ff5a3eb249..8f80f5b22b 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartData.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartData.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import Mathlib.Geometry.Manifold.PartitionOfUnity -import Mathlib.Topology.Compactness.Compact +public import Mathlib.Geometry.Manifold.PartitionOfUnity /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.ChartData` @@ -28,6 +28,8 @@ This file provides: manifold, there exists such data subordinate to `chartAt` sources. -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartDataRiemannian.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartDataRiemannian.lean index 72c2abdce8..8ce2a2655c 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartDataRiemannian.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartDataRiemannian.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartData +public import Mathlib.Geometry.Manifold.Riemannian.PathELength +public import Mathlib.Topology.VectorBundle.Riemannian import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.ChartLocalLipschitz import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.ChartLocalLipschitzForward -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartData /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.ChartDataRiemannian` @@ -26,6 +29,8 @@ measure on the fixed compact supports used by the manifold Rellich glue. - `RellichKondrachov.Geometry.Manifold.Sobolev.exists_riemannianFiniteChartData` -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasure.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasure.lean index 8d6d7e3790..2f54dca208 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasure.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasure.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartData -import Mathlib.MeasureTheory.Measure.AEMeasurable -import Mathlib.MeasureTheory.Measure.Typeclasses.Finite +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartData /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasure` @@ -18,6 +17,8 @@ on `M` to a measure on the model space `E` using `extChartAt`. This file defines measures and records basic finiteness instances needed by the Euclidean Sobolev baseline. -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasureLp.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasureLp.lean index d852fa1d3d..46d98dd4ce 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasureLp.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasureLp.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasure -import Mathlib.MeasureTheory.Function.LpSpace.Basic -import Mathlib.MeasureTheory.Measure.Map +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasure /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasureLp` @@ -31,6 +30,8 @@ This file provides: - `RellichKondrachov.Geometry.Manifold.Sobolev.FiniteChartData.chartPullbackL2` -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasureRiemannian.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasureRiemannian.lean index 1569413a14..32aa9033ea 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasureRiemannian.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasureRiemannian.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartDataRiemannian -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasure -import Mathlib.Geometry.Manifold.IsManifold.Basic +public import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartDataRiemannian +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasure /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasureRiemannian` @@ -27,6 +27,8 @@ measure on the chart target, restricted to suitable neighborhoods. with an explicit constant. -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasureRiemannianVolume.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasureRiemannianVolume.lean index 2cf03808ab..6f7c5756e9 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasureRiemannianVolume.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/ChartMeasureRiemannianVolume.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module +public import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartDataRiemannian +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasure import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasureRiemannian import LeanPool.RellichKondrachov.MeasureTheory.Measure.HausdorffVolume @@ -27,6 +31,8 @@ resulting domination by `volume` on chart balls. `volume_restrict_le_chartMeasure` -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/EmbeddingL2.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/EmbeddingL2.lean index b7fc025acb..ba805c4c30 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/EmbeddingL2.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/EmbeddingL2.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasureLp -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.H1 -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.H2 -import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.Restrict +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasureLp +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.H1 +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.H2 +public import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.Restrict /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.EmbeddingL2` @@ -26,6 +27,8 @@ measure-preserving chart map and then extended by zero from the chart source. - `RellichKondrachov.Geometry.Manifold.Sobolev.FiniteChartData.h2ToL2` -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/H1.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/H1.lean index a24c36b6be..044eb58c1b 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/H1.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/H1.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasure -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.Localization +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasure +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.Localization /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.H1` @@ -25,6 +26,8 @@ Given `d : FiniteChartData` and a finite measure `μ` on `M`, we: - `RellichKondrachov.Geometry.Manifold.Sobolev.FiniteChartData.h1` -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold @@ -83,7 +86,9 @@ variable (d : FiniteChartData (H := H) (M := M) I) variable (μ : Measure M) [IsFiniteMeasure μ] -private noncomputable def localizeToC1c (i : d.ι) : +/-- Localize a continuously differentiable manifold function to a compactly supported chart +function. -/ +noncomputable def localizeToC1c (i : d.ι) : ↥(C1 (E := E) (H := H) (M := M) (I := I)) →ₗ[ℝ] ↥(RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.C1c (E := E)) where toFun f := diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/H2.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/H2.lean index fc982578b5..abd99d108d 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/H2.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/H2.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasure -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.LocalizationH2 +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasure +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.LocalizationH2 /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.H2` @@ -29,6 +30,8 @@ where `μᵢ` is the pushforward chart measure (`chartMeasure`) and the graph ma - `RellichKondrachov.Geometry.Manifold.Sobolev.FiniteChartData.h2` -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold @@ -95,7 +98,8 @@ abbrev h2TargetE (μ : Measure M) (i : d.ι) : Type _ := /-- The product-of-charts target type used to define manifold `H²`. -/ abbrev h2Target (μ : Measure M) : Type _ := ∀ i : d.ι, h2TargetE (d := d) (I := I) μ i -private abbrev chartMeasureE (i : d.ι) : Measure E := +/-- The chart measure viewed on the model vector space. -/ +abbrev chartMeasureE (i : d.ι) : Measure E := chartMeasure (d := d) (I := I) μ i private abbrev L2ℝ (i : d.ι) : Type _ := ↥(E →₂[chartMeasureE (d := d) (I := I) (μ := μ) i] ℝ) @@ -110,7 +114,9 @@ private abbrev H2TargetE (i : d.ι) : Type _ := private abbrev H2Target : Type _ := ∀ i : d.ι, H2TargetE (d := d) (I := I) (μ := μ) i -private noncomputable def localizeToC2c (i : d.ι) : +/-- Localize a twice continuously differentiable manifold function to a compactly supported chart +function. -/ +noncomputable def localizeToC2c (i : d.ι) : ↥(C2 (E := E) (H := H) (M := M) (I := I)) →ₗ[ℝ] ↥(RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.C2c (E := E)) where toFun f := diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/Localization.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/Localization.lean index 75f63f1ca1..4f79d3e7da 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/Localization.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/Localization.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import Mathlib.Geometry.Manifold.Algebra.Monoid -import Mathlib.Geometry.Manifold.ContMDiff.Atlas +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1 +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartData import LeanPool.RellichKondrachov.Analysis.Calculus.ContDiff.Support -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H1 -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartData /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.Localization` @@ -27,6 +26,8 @@ For compact manifolds, the resulting function has compact support and is `C^1` ( the Euclidean `C1c` submodule used in the Euclidean Sobolev baseline). -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold @@ -52,13 +53,15 @@ variable [T2Space M] [CompactSpace M] local instance instMeasurableSpaceLocalization : MeasurableSpace M := borel M local instance instBorelSpaceLocalization : BorelSpace M := ⟨rfl⟩ -private abbrev Iℝ : ModelWithCorners ℝ ℝ ℝ := 𝓘(ℝ, ℝ) +/-- The standard model with corners on the real line. -/ +abbrev Iℝ : ModelWithCorners ℝ ℝ ℝ := 𝓘(ℝ, ℝ) namespace FiniteChartData variable (d : FiniteChartData (H := H) (M := M) I) -private abbrev chart (i : d.ι) : PartialEquiv M E := +/-- The extended chart centered at the selected point of the finite chart family. -/ +abbrev chart (i : d.ι) : PartialEquiv M E := extChartAt I (d.center i) /-- The localization of a scalar function `f : M → ℝ` to a chart `i`, as a function on `E`. -/ diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/LocalizationH2.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/LocalizationH2.lean index cf668ed3a2..18008deb7c 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/LocalizationH2.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/LocalizationH2.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.Localization -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H2 +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.Localization +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.H2 +import LeanPool.RellichKondrachov.Analysis.Calculus.ContDiff.Support /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.LocalizationH2` @@ -21,6 +23,8 @@ This extends `RellichKondrachov.Geometry.Manifold.Sobolev.Localization` by showi - `RellichKondrachov.Geometry.Manifold.Sobolev.FiniteChartData.localize_mem_C2c` -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold @@ -51,9 +55,6 @@ namespace FiniteChartData variable (d : FiniteChartData (H := H) (M := M) I) -private abbrev chart (i : d.ι) : PartialEquiv M E := - extChartAt I (d.center i) - private abbrev Iℝ : ModelWithCorners ℝ ℝ ℝ := 𝓘(ℝ, ℝ) omit [CompleteSpace E] [IsManifold I (1 : WithTop ℕ∞) M] diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachov.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachov.lean index 4d1d8af151..9dfa5f1619 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachov.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachov.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import Mathlib.Analysis.Normed.Operator.Compact.Basic -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.EmbeddingL2 +public import Mathlib.Analysis.Normed.Operator.Compact.Basic +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.EmbeddingL2 /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachov` @@ -24,6 +25,8 @@ The analytic heart of Rellich (compactness on Euclidean chart domains) is tracke - `RellichKondrachov.Geometry.Manifold.Sobolev.FiniteChartData.isCompactOperator_h2ToL2_of_summands` -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian.lean index bba7d70857..72a7fdb5ae 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian.Global +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian.Global /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian` @@ -16,3 +17,5 @@ Thin re-export of the Riemannian Rellich–Kondrachov proof, split into focused * `RellichKondrachovRiemannian.Global`: finite-atlas assembly and the final compactness theorem. -/ +@[expose] public section + diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian/Chartwise.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian/Chartwise.lean index 73d4b2a991..25ac27cdfe 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian/Chartwise.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian/Chartwise.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian.Transport import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.Rellich -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian.Transport +import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure.Finiteness /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian.Chartwise` @@ -18,6 +20,8 @@ This module sets up the `L²`-range codomain restrictions and applies Euclidean `RellichKondrachovRiemannian.Transport`. -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold @@ -83,7 +87,8 @@ open RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean variable (i : dR.d.ι) -private noncomputable def eL2RangeChartVol (i : dR.d.ι) +/-- Embed the local square-integrable range using the chart volume measure. -/ +noncomputable def eL2RangeChartVol (i : dR.d.ι) (F : Type*) [NormedAddCommGroup F] [NormedSpace ℝ F] : let μM := RellichKondrachov.Geometry.Manifold.Riemannian.riemannianVolumeMeasure (I := I) (M := M) @@ -419,6 +424,48 @@ private lemma l2EquivVolumeOnRhoSupportImage'_coeFn_ae_eq (i : dR.d.ι) (F : Typ (μ := μchart.restrict K) (ν := (volume : Measure E).restrict K) (E := F) (p := (2 : ℝ≥0∞)) (c₁ := cVolChart) (c₂ := cChartVol) hcVolChart hcChartVol hvol_le hμ_le hp f) +omit [T2Space M] [I.Boundaryless] in +private lemma l2ChartToVolumeOnRhoSupportImage_eq_of_support_subset (i : dR.d.ι) + {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] (g : E → F) : + let μM := Riemannian.riemannianVolumeMeasure (I := I) (M := M) + let μchart := FiniteChartData.chartMeasure (d := dR.d) (I := I) μM i + let K := FiniteChartData.rhoSupportImage (d := dR.d) (I := I) i + ∀ (x : E →₂[μchart] F) (y : E →₂[(volume : Measure E)] F), + (x : E → F) =ᵐ[μchart] g → (y : E → F) =ᵐ[(volume : Measure E)] g → + Function.support g ⊆ K → + l2ChartToVolumeOnRhoSupportImage (dR := dR) (I := I) i F x = y := by + classical + intro μM μchart K x y hx hy hsupp + have hKm : MeasurableSet K := rhoSupportImage_measurable (dR := dR) (I := I) i + let r : (E →₂[μchart] F) →L[ℝ] (E →₂[μchart.restrict K] F) := + Lp.changeMeasureL (μ := μchart) (ν := μchart.restrict K) (E := F) + (p := (2 : ℝ≥0∞)) (c := (1 : ℝ≥0∞)) (by simp) + (restrict_le_one_smul μchart K) (by simp) + let e := l2EquivVolumeOnRhoSupportImage' (dR := dR) (I := I) (i := i) (F := F) + let ez := Lp.extendByZeroₗᵢ (μ := (volume : Measure E)) (E := F) + (p := (2 : ℝ≥0∞)) (s := K) hKm + have hr : (r x : E → F) =ᵐ[μchart.restrict K] g := + (Lp.changeMeasureL_coeFn_ae_eq (μ := μchart) (ν := μchart.restrict K) (E := F) + (p := (2 : ℝ≥0∞)) (c := (1 : ℝ≥0∞)) (by simp) + (restrict_le_one_smul μchart K) (by simp) x).trans (ae_restrict_of_ae hx) + have habs : (volume : Measure E).restrict K ≪ μchart.restrict K := + Measure.absolutelyContinuous_of_le_smul + (volume_restrict_rhoSupportImage_le_chartMeasure (dR := dR) (I := I) i) + have he : (e (r x) : E → F) =ᵐ[(volume : Measure E).restrict K] g := + (l2EquivVolumeOnRhoSupportImage'_coeFn_ae_eq (dR := dR) (I := I) i F (r x)).trans + (habs.ae_le hr) + have hInd : K.indicator (fun z => (e (r x) : E → F) z) =ᵐ[(volume : Measure E)] g := by + filter_upwards [ae_imp_of_ae_restrict he] with z hz + by_cases hzK : z ∈ K + · simpa only [Set.indicator_of_mem hzK] using hz hzK + · rw [Set.indicator_of_notMem hzK] + exact (Function.notMem_support.mp (fun hzSupp => hzK (hsupp hzSupp))).symm + have hez : (ez (e (r x)) : E → F) =ᵐ[(volume : Measure E)] + K.indicator fun z => (e (r x) : E → F) z := + Lp.extendByZeroₗᵢ_ae_eq (μ := (volume : Measure E)) (p := (2 : ℝ≥0∞)) + (s := K) (hs := hKm) (f := e (r x)) + exact Lp.ext (hez.trans (hInd.trans hy.symm)) + omit [T2Space M] [I.Boundaryless] in private lemma l2ChartToVolumeOnRhoSupportImage_toL2_of_tsupport_subset (i : dR.d.ι) (g : ↥(C1c (E := E))) : @@ -430,96 +477,11 @@ private lemma l2ChartToVolumeOnRhoSupportImage_toL2_of_tsupport_subset (i : dR.d l2ChartToVolumeOnRhoSupportImage (dR := dR) (I := I) (i := i) (F := ℝ) (toL2 (μ := μchart) (E := E) g) = toL2 (μ := (volume : Measure E)) (E := E) g := by - classical intro μM μchart K htsupp - have hKm : MeasurableSet K := rhoSupportImage_measurable (dR := dR) (I := I) i - have hsupp : Function.support g.1 ⊆ K := - support_subset_of_tsupport_subset (g := g.1) (K := K) htsupp - -- Abbreviate the chart- and volume-side `L²` elements of `g`. - let x : E →₂[μchart] ℝ := - toL2 (μ := μchart) (E := E) g - let y : E →₂[(volume : Measure E)] ℝ := - toL2 (μ := (volume : Measure E)) (E := E) g - -- `x` is represented by `g` a.e. under `μchart`, hence also under `μchart.restrict K`. - have hx : (x : E → ℝ) =ᵐ[μchart] g.1 := by - have hxmem : MeasureTheory.MemLp g.1 (2 : ℝ≥0∞) μchart := by - simpa using - (memLp_of_mem_C1c - (μ := μchart) (E := E) (f := g.1) g.2) - exact hxmem.coeFn_toLp - have hxK : (x : E → ℝ) =ᵐ[μchart.restrict K] g.1 := - MeasureTheory.ae_restrict_of_ae (s := K) hx - -- Expand `l2ChartToVolumeOnRhoSupportImage` and chase AE equalities. - dsimp [l2ChartToVolumeOnRhoSupportImage] - -- `r : L²(μchart) → L²(μchart.restrict K)` is `changeMeasureL`. - have hν_le : μchart.restrict K ≤ (1 : ℝ≥0∞) • μchart := by - simpa using (Measure.restrict_le_self (μ := μchart) (s := K)) - let r : - (E →₂[μchart] ℝ) →L[ℝ] (E →₂[μchart.restrict K] ℝ) := - MeasureTheory.Lp.changeMeasureL - (μ := μchart) (ν := μchart.restrict K) (E := ℝ) (p := (2 : ℝ≥0∞)) (c := (1 : ℝ≥0∞)) - (by simp) (by simpa using (Measure.restrict_le_self (μ := μchart) (s := K))) (by simp) - let e : (E →₂[μchart.restrict K] ℝ) ≃L[ℝ] (E →₂[(volume : Measure E).restrict K] ℝ) := - l2EquivVolumeOnRhoSupportImage' (dR := dR) (I := I) (i := i) (F := ℝ) - let ez : - (E →₂[(volume : Measure E).restrict K] ℝ) →ₗᵢ[ℝ] (E →₂[(volume : Measure E)] ℝ) := - MeasureTheory.Lp.extendByZeroₗᵢ (μ := (volume : Measure E)) (E := ℝ) (p := (2 : ℝ≥0∞)) (s := K) - hKm - have hr : (r x : E → ℝ) =ᵐ[μchart.restrict K] (x : E → ℝ) := by - simpa [r] using - (MeasureTheory.Lp.changeMeasureL_coeFn_ae_eq (μ := μchart) (ν := μchart.restrict K) (E := ℝ) - (p := (2 : ℝ≥0∞)) (c := (1 : ℝ≥0∞)) (by simp) hν_le (by simp) x) - have hrg : (r x : E → ℝ) =ᵐ[μchart.restrict K] g.1 := - hr.trans hxK - have hvol_le : - (volume : Measure E).restrict K ≤ - (((((volume : Measure E) (Metric.closedBall (0 : E) 1)) / - ((μH[(Module.finrank ℝ E : ℝ)] : Measure E) (Metric.closedBall (0 : E) 1))) * - ((dR.Cfwd i : ℝ≥0∞) ^ (Module.finrank ℝ E : ℝ))) • - μchart.restrict K) := by - simpa [μM, μchart, K] using - volume_restrict_rhoSupportImage_le_chartMeasure (dR := dR) (I := I) (i := i) - have habs : (volume : Measure E).restrict K ≪ μchart.restrict K := - Measure.absolutelyContinuous_of_le_smul hvol_le - have hrgVol : (r x : E → ℝ) =ᵐ[(volume : Measure E).restrict K] g.1 := - habs.ae_le hrg - have he : (e (r x) : E → ℝ) =ᵐ[(volume : Measure E).restrict K] (r x : E → ℝ) := by - -- Use the specialized lemma for `l2EquivVolumeOnRhoSupportImage'`. - simpa [e, μM, μchart, K] using - (l2EquivVolumeOnRhoSupportImage'_coeFn_ae_eq (dR := dR) (I := I) (i := i) (F := ℝ) (f := r x)) - have heg : (e (r x) : E → ℝ) =ᵐ[(volume : Measure E).restrict K] g.1 := - he.trans hrgVol - have hInd : - K.indicator (fun z : E => (e (r x) : E → ℝ) z) =ᵐ[(volume : Measure E)] g.1 := by - refine indicator_ae_eq_of_ae_eq_restrict (μ := (volume : Measure E)) (K := K) - (f := fun z : E => (e (r x) : E → ℝ) z) (g := g.1) ?_ ?_ heg hsupp - · exact (MeasureTheory.Lp.aestronglyMeasurable (e (r x))).aemeasurable - · have hgmem : MeasureTheory.MemLp g.1 (2 : ℝ≥0∞) ((volume : Measure E).restrict K) := by - simpa using - (memLp_of_mem_C1c - (μ := (volume : Measure E).restrict K) (E := E) (f := g.1) g.2) - exact hgmem.aestronglyMeasurable.aemeasurable - have hez : - ((ez (e (r x)) : E →₂[(volume : Measure E)] ℝ) : E → ℝ) =ᵐ[(volume : Measure E)] - K.indicator fun z : E => (e (r x) : E → ℝ) z := by - simpa [ez] using - (MeasureTheory.Lp.extendByZeroₗᵢ_ae_eq (μ := (volume : Measure E)) (p := (2 : ℝ≥0∞)) - (s := K) (hs := hKm) (f := e (r x))) - -- Conclude by `Lp.ext` on `volume`. - apply Lp.ext - have hy : (y : E → ℝ) =ᵐ[(volume : Measure E)] g.1 := by - have hymem : MeasureTheory.MemLp g.1 (2 : ℝ≥0∞) (volume : Measure E) := by - simpa using - (memLp_of_mem_C1c - (μ := (volume : Measure E)) (E := E) (f := g.1) g.2) - exact hymem.coeFn_toLp - have hT : - (l2ChartToVolumeOnRhoSupportImage (dR := dR) (I := I) (i := i) (F := ℝ) x : E → ℝ) =ᵐ[ - (volume : Measure E) - ] K.indicator fun z : E => (e (r x) : E → ℝ) z := by - -- This is definitional: `l2ChartToVolumeOnRhoSupportImage` is `ez ∘ e ∘ r`. - simpa [l2ChartToVolumeOnRhoSupportImage, r, e, ez] using hez - exact hT.trans (hInd.trans hy.symm) + exact l2ChartToVolumeOnRhoSupportImage_eq_of_support_subset (dR := dR) (I := I) i g.1 + _ _ (memLp_of_mem_C1c (μ := μchart) g.2).coeFn_toLp + (memLp_of_mem_C1c (μ := (volume : Measure E)) g.2).coeFn_toLp + (support_subset_of_tsupport_subset g.1 htsupp) omit [T2Space M] [I.Boundaryless] in private lemma l2ChartToVolumeOnRhoSupportImage_toL2Grad_of_tsupport_subset (i : dR.d.ι) @@ -532,119 +494,11 @@ private lemma l2ChartToVolumeOnRhoSupportImage_toL2Grad_of_tsupport_subset (i : l2ChartToVolumeOnRhoSupportImage (dR := dR) (I := I) (i := i) (F := E) (toL2Grad (μ := μchart) (E := E) g) = toL2Grad (μ := (volume : Measure E)) (E := E) g := by - classical intro μM μchart K htsupp - have hKm : MeasurableSet K := rhoSupportImage_measurable (dR := dR) (I := I) i - -- Support of the gradient is contained in `K`. - have htsuppGrad : - tsupport - (grad (E := E) g.1) ⊆ K := by - exact - (tsupport_grad_subset - (E := E) (f := g.1)).trans - htsupp - have hsuppGrad : Function.support - (grad (E := E) g.1) ⊆ K := - support_subset_of_tsupport_subset (g := - grad (E := E) g.1) (K := K) htsuppGrad - let x : E →₂[μchart] E := - toL2Grad (μ := μchart) (E := E) g - let y : E →₂[(volume : Measure E)] E := - toL2Grad (μ := (volume : Measure E)) (E := E) g - have hx : (x : E → E) =ᵐ[μchart] - grad (E := E) g.1 := by - have hxmem : - MeasureTheory.MemLp - (grad (E := E) g.1) - (2 : ℝ≥0∞) μchart := by - simpa using - (memLp_grad_of_mem_C1c - (μ := μchart) (E := E) (f := g.1) g.2) - exact hxmem.coeFn_toLp - have hxK : - (x : E → E) =ᵐ[μchart.restrict K] - grad (E := E) g.1 := - MeasureTheory.ae_restrict_of_ae (s := K) hx - have hν_le : μchart.restrict K ≤ (1 : ℝ≥0∞) • μchart := by - simpa using (Measure.restrict_le_self (μ := μchart) (s := K)) - let r : - (E →₂[μchart] E) →L[ℝ] (E →₂[μchart.restrict K] E) := - MeasureTheory.Lp.changeMeasureL - (μ := μchart) (ν := μchart.restrict K) (E := E) (p := (2 : ℝ≥0∞)) (c := (1 : ℝ≥0∞)) - (by simp) (by simpa using (Measure.restrict_le_self (μ := μchart) (s := K))) (by simp) - let e : (E →₂[μchart.restrict K] E) ≃L[ℝ] (E →₂[(volume : Measure E).restrict K] E) := - l2EquivVolumeOnRhoSupportImage' (dR := dR) (I := I) (i := i) (F := E) - let ez : - (E →₂[(volume : Measure E).restrict K] E) →ₗᵢ[ℝ] (E →₂[(volume : Measure E)] E) := - MeasureTheory.Lp.extendByZeroₗᵢ (μ := (volume : Measure E)) (E := E) (p := (2 : ℝ≥0∞)) (s := K) - hKm - have hr : (r x : E → E) =ᵐ[μchart.restrict K] (x : E → E) := by - simpa [r] using - (MeasureTheory.Lp.changeMeasureL_coeFn_ae_eq (μ := μchart) (ν := μchart.restrict K) (E := E) - (p := (2 : ℝ≥0∞)) (c := (1 : ℝ≥0∞)) (by simp) hν_le (by simp) x) - have hrg : - (r x : E → E) =ᵐ[μchart.restrict K] - grad (E := E) g.1 := - hr.trans hxK - have hvol_le : - (volume : Measure E).restrict K ≤ - (((((volume : Measure E) (Metric.closedBall (0 : E) 1)) / - ((μH[(Module.finrank ℝ E : ℝ)] : Measure E) (Metric.closedBall (0 : E) 1))) * - ((dR.Cfwd i : ℝ≥0∞) ^ (Module.finrank ℝ E : ℝ))) • - μchart.restrict K) := by - simpa [μM, μchart, K] using - volume_restrict_rhoSupportImage_le_chartMeasure (dR := dR) (I := I) (i := i) - have habs : (volume : Measure E).restrict K ≪ μchart.restrict K := - Measure.absolutelyContinuous_of_le_smul hvol_le - have hrgVol : - (r x : E → E) =ᵐ[(volume : Measure E).restrict K] - grad (E := E) g.1 := - habs.ae_le hrg - have he : (e (r x) : E → E) =ᵐ[(volume : Measure E).restrict K] (r x : E → E) := by - simpa [e, μM, μchart, K] using - (l2EquivVolumeOnRhoSupportImage'_coeFn_ae_eq (dR := dR) (I := I) (i := i) (F := E) (f := r x)) - have heg : - (e (r x) : E → E) =ᵐ[(volume : Measure E).restrict K] - grad (E := E) g.1 := - he.trans hrgVol - have hInd : - K.indicator (fun z : E => (e (r x) : E → E) z) =ᵐ[(volume : Measure E)] - grad (E := E) g.1 := by - refine indicator_ae_eq_of_ae_eq_restrict (μ := (volume : Measure E)) (K := K) - (f := fun z : E => (e (r x) : E → E) z) - (g := grad (E := E) g.1) ?_ ?_ heg hsuppGrad - · exact (MeasureTheory.Lp.aestronglyMeasurable (e (r x))).aemeasurable - · have hgmem : - MeasureTheory.MemLp - (grad (E := E) g.1) - (2 : ℝ≥0∞) ((volume : Measure E).restrict K) := by - simpa using - (memLp_grad_of_mem_C1c - (μ := (volume : Measure E).restrict K) (E := E) (f := g.1) g.2) - exact hgmem.aestronglyMeasurable.aemeasurable - have hez : - ((ez (e (r x)) : E →₂[(volume : Measure E)] E) : E → E) =ᵐ[(volume : Measure E)] - K.indicator fun z : E => (e (r x) : E → E) z := by - simpa [ez] using - (MeasureTheory.Lp.extendByZeroₗᵢ_ae_eq (μ := (volume : Measure E)) (p := (2 : ℝ≥0∞)) - (s := K) (hs := hKm) (f := e (r x))) - apply Lp.ext - have hy : (y : E → E) =ᵐ[(volume : Measure E)] - grad (E := E) g.1 := by - have hymem : - MeasureTheory.MemLp - (grad (E := E) g.1) - (2 : ℝ≥0∞) (volume : Measure E) := by - simpa using - (memLp_grad_of_mem_C1c - (μ := (volume : Measure E)) (E := E) (f := g.1) g.2) - exact hymem.coeFn_toLp - have hT : - (l2ChartToVolumeOnRhoSupportImage (dR := dR) (I := I) (i := i) (F := E) x : E → E) =ᵐ[ - (volume : Measure E) - ] K.indicator fun z : E => (e (r x) : E → E) z := by - simpa [l2ChartToVolumeOnRhoSupportImage, r, e, ez] using hez - exact hT.trans (hInd.trans hy.symm) + exact l2ChartToVolumeOnRhoSupportImage_eq_of_support_subset (dR := dR) (I := I) i + (grad (E := E) g.1) _ _ (memLp_grad_of_mem_C1c (μ := μchart) g.2).coeFn_toLp + (memLp_grad_of_mem_C1c (μ := (volume : Measure E)) g.2).coeFn_toLp + (support_subset_of_tsupport_subset _ ((tsupport_grad_subset (f := g.1)).trans htsupp)) omit [T2Space M] in private lemma chartTargetToVolumeTarget_h1GraphChart (i : dR.d.ι) @@ -752,56 +606,13 @@ private lemma projToVolumeTarget_mem_euclidean_h1 (i : dR.d.ι) projToVolumeTarget (dR := dR) (I := I) (i := i) (x.1 : FiniteChartData.h1Target (d := dR.d) (I := I) μM) ∈ (h1 (μ := (volume : Measure E)) (E := E) : Set _) := by - classical intro μM μchart K - let A : Set (FiniteChartData.h1Target (d := dR.d) (I := I) μM) := - (LinearMap.range (FiniteChartData.h1Graph (d := dR.d) (I := I) (μ := μM)) : Set _) - have hx_closure : (x.1 : FiniteChartData.h1Target (d := dR.d) (I := I) μM) ∈ closure A := by - simp only [FiniteChartData.h1, A] - exact x.2 - let T : - (FiniteChartData.h1Target (d := dR.d) (I := I) μM) →L[ℝ] - (↥(E →₂[(volume : Measure E)] ℝ) × ↥(E →₂[(volume : Measure E)] E)) := - projToVolumeTarget (dR := dR) (I := I) (i := i) - have hTmem : T x.1 ∈ closure (Set.image T A) := - mem_closure_image (f := T) (s := A) (x := x.1) (T.continuous.continuousAt) hx_closure - have hImage : - Set.image T A ⊆ - (h1 (μ := (volume : Measure E)) (E := E) : Set _) := by - intro y hy - rcases hy with ⟨z, hzA, rfl⟩ - rcases hzA with ⟨f, rfl⟩ - -- Use the graph compatibility lemma for `projToVolumeTarget` on generators. - have : - T (FiniteChartData.h1Graph (d := dR.d) (I := I) (μ := μM) f) ∈ - LinearMap.range - (graph (μ := (volume : Measure E)) (E := E)) := by - let g : - ↥(C1c (E := E)) := - ⟨FiniteChartData.localize (d := dR.d) (I := I) f.1 i, - FiniteChartData.localize_mem_C1c (d := dR.d) (I := I) (f := f.1) f.2 i⟩ - refine ⟨g, ?_⟩ - simpa [T, g, μM, μchart, K] using - (projToVolumeTarget_h1Graph (dR := dR) (I := I) (i := i) f).symm - exact (Submodule.le_topologicalClosure _ ) this - have hClosed : - IsClosed - (h1 (μ := (volume : Measure E)) (E := E) : - Set (↥(E →₂[(volume : Measure E)] ℝ) × ↥(E →₂[(volume : Measure E)] E))) := by - simpa using - (isClosed_h1 (μ := (volume : Measure E)) (E := E)) - have hx_closure_h1 : - T x.1 ∈ - closure - (h1 (μ := (volume : Measure E)) (E := E) : - Set (↥(E →₂[(volume : Measure E)] ℝ) × ↥(E →₂[(volume : Measure E)] E))) := - (closure_mono hImage) hTmem - have : - T x.1 ∈ - (h1 (μ := (volume : Measure E)) (E := E) : - Set (↥(E →₂[(volume : Measure E)] ℝ) × ↥(E →₂[(volume : Measure E)] E))) := by - simpa [hClosed.closure_eq] using hx_closure_h1 - simpa [T] using this + let T := projToVolumeTarget (dR := dR) (I := I) i + have hClosed := (isClosed_h1 (μ := (volume : Measure E)) (E := E)).preimage T.continuous + refine closure_minimal ?_ hClosed x.2 + rintro _ ⟨f, rfl⟩ + apply Submodule.le_topologicalClosure + exact ⟨_, (projToVolumeTarget_h1Graph (dR := dR) (I := I) i f).symm⟩ omit [T2Space M] [I.Boundaryless] in private lemma projToVolumeTarget_fst_mem_extendByZero_range (i : dR.d.ι) @@ -924,149 +735,33 @@ omit [T2Space M] in classical intro μM let μchart := FiniteChartData.chartMeasure (d := dR.d) (I := I) μM i - let K : Set E := FiniteChartData.rhoSupportImage (d := dR.d) (I := I) i - -- Abbreviations for the relevant `extendByZero` maps. - let eChart := - MeasureTheory.Lp.extendByZeroₗᵢ (μ := μchart) (E := ℝ) (p := (2 : ℝ≥0∞)) (s := K) - (rhoSupportImage_measurable (dR := dR) (I := I) i) - let eVol := - MeasureTheory.Lp.extendByZeroₗᵢ (μ := (volume : Measure E)) (E := ℝ) (p := (2 : ℝ≥0∞)) (s := K) - (rhoSupportImage_measurable (dR := dR) (I := I) i) - -- The chartwise `L²` component. - let u : (E →₂[μchart] ℝ) := (FiniteChartData.h1ToChartL2 (d := dR.d) (I := I) (μ := μM) i) x - -- `h1ToChartL2Range` is a codomain restriction of `h1ToChartL2`, so its underlying value is `u`. - have hz_coe : - ((h1ToChartL2Range (dR := dR) (I := I) (i := i)) x : (E →₂[μchart] ℝ)) = u := by - -- `simp` can unfold the codomain restriction, but we also unfold `μM` so both sides match. - simp [h1ToChartL2Range, u, μM] - -- Identify the preimage in the restricted `L²` space corresponding to `u` under `extendByZero`. - let uK : (E →₂[μchart.restrict K] ℝ) := - (LinearIsometry.equivRange eChart).symm ((h1ToChartL2Range (dR := dR) (I := I) (i := i)) x) - have heChart_uK : (eChart uK : (E →₂[μchart] ℝ)) = u := by - -- Use `apply_symm_apply` in the range equivalence. - have : - (LinearIsometry.equivRange eChart) uK = - (h1ToChartL2Range (dR := dR) (I := I) (i := i)) x := by - simp only [uK] - exact (LinearIsometry.equivRange eChart).apply_symm_apply - ((h1ToChartL2Range (dR := dR) (I := I) (i := i)) x) - -- Coerce to `L²(μchart)` and simplify. - have hcoe := congrArg Subtype.val this - rw [hz_coe] at hcoe - exact hcoe - -- The `changeMeasureL` used in `l2ChartToVolumeOnRhoSupportImage` from `μchart` to - -- `μchart.restrict K`. - let cm : - (E →₂[μchart] ℝ) →L[ℝ] (E →₂[μchart.restrict K] ℝ) := - MeasureTheory.Lp.changeMeasureL - (μ := μchart) (ν := μchart.restrict K) (E := ℝ) (p := (2 : ℝ≥0∞)) (c := (1 : ℝ≥0∞)) - (by simp) (restrict_le_one_smul (μ := μchart) (s := K)) - (by simp) - -- `uK` is the same as `changeMeasureL` applied to `u`, since `u` is supported in `K`. - have huK_eq : uK = cm u := by - -- Show `uK =ᵐ[μchart.restrict K] u` (by restricting the `extendByZero` AE equality), then - -- compare - -- to `cm u =ᵐ[μchart.restrict K] u`. - have hu_indicator : - (u : E → ℝ) =ᵐ[μchart] K.indicator fun x => uK x := by - -- `extendByZero` is `indicator` a.e. - have hAE : - ((eChart uK : (E →₂[μchart] ℝ)) : E → ℝ) =ᵐ[μchart] - K.indicator fun x => uK x := by - simpa [eChart] using - (MeasureTheory.Lp.extendByZeroₗᵢ_ae_eq (μ := μchart) (E := ℝ) (p := (2 : ℝ≥0∞)) (s := K) - (rhoSupportImage_measurable (dR := dR) (I := I) i) uK) - -- Rewrite `eChart uK` as `u`. - have hu_eq : ((eChart uK : (E →₂[μchart] ℝ)) : E → ℝ) =ᵐ[μchart] u := by - -- `heChart_uK` is equality in `L²`, hence a.e. equality. - rw [heChart_uK] - -- Combine. - exact hu_eq.symm.trans hAE - have hu_on : ∀ᵐ x : E ∂μchart, x ∈ K → u x = uK x := by - filter_upwards [hu_indicator] with x hx hxK - have : K.indicator (fun y => uK y) x = uK x := by simp [Set.indicator_of_mem, hxK] - -- On `K`, the indicator equals the function itself. - simpa [this] using hx - have hu_restrict : (u : E → ℝ) =ᵐ[μchart.restrict K] fun x => uK x := - (ae_restrict_iff' (μ := μchart) (s := K) - (rhoSupportImage_measurable (dR := dR) (I := I) i)).2 hu_on - have hcm_ae : - (cm u : E → ℝ) =ᵐ[μchart.restrict K] u := - MeasureTheory.Lp.changeMeasureL_coeFn_ae_eq (μ := μchart) (ν := μchart.restrict K) (E := ℝ) - (p := (2 : ℝ≥0∞)) (c := (1 : ℝ≥0∞)) - (by simp) - (restrict_le_one_smul (μ := μchart) (s := K)) - (by simp) u - refine MeasureTheory.Lp.ext (μ := μchart.restrict K) (E := ℝ) (p := (2 : ℝ≥0∞)) ?_ - -- Compare almost everywhere representatives on the restricted measure. - have : (uK : E → ℝ) =ᵐ[μchart.restrict K] (cm u : E → ℝ) := - hu_restrict.symm.trans hcm_ae.symm - exact this - -- Compute both sides as `extendByZero` of the same restricted-volume witness. - -- Left side: unfold the range equivalence and use `huK_eq` to identify the restricted witness. - have hL : - (↑((eL2RangeChartVol (dR := dR) (I := I) (i := i) (F := ℝ)) - ((h1ToChartL2Range (dR := dR) (I := I) (i := i)) x)) : (E →₂[(volume : Measure E)] ℝ)) = - eVol - ((l2EquivVolumeOnRhoSupportImage' (dR := dR) (I := I) (i := i) (F := ℝ)) uK) := by - -- Unfold the definition of the `extendByZero`-range equivalence. - -- The resulting expression is exactly `extendByZero` after `l2EquivVolumeOnRhoSupportImage'` - -- applied to the - -- canonical `equivRange` preimage `uK`. - simp [eL2RangeChartVol, l2ExtendByZeroRangeEquivVolumeOnRhoSupportImage', - MeasureTheory.Lp.extendByZeroRangeEquivOfRestrictChangeMeasureEquiv, eChart, eVol, uK, - l2EquivVolumeOnRhoSupportImage'] - -- Right side: `projToVolumeTarget` is `chartTargetToVolumeTarget ∘ proj`, and the scalar - -- component is - -- exactly `l2ChartToVolumeOnRhoSupportImage` applied to the chartwise `L²` value `u`. - have hR : - ((projToVolumeTarget (dR := dR) (I := I) (i := i) (x.1 : FiniteChartData.h1Target (d := dR.d) - (I := I) μM))).1 = - eVol - ((l2EquivVolumeOnRhoSupportImage' (dR := dR) (I := I) (i := i) (F := ℝ)) (cm u)) := by - -- Reduce to the definition of `l2ChartToVolumeOnRhoSupportImage` applied to the chartwise - -- scalar component. - have hu' : ((x.1 : FiniteChartData.h1Target (d := dR.d) (I := I) μM) i).1 = u := by - -- `u` is exactly the `i`-th scalar coordinate of `x`. - simp [u, FiniteChartData.h1ToChartL2, FiniteChartData.h1ToChart, - ContinuousLinearMap.proj_apply] - -- Expand `projToVolumeTarget` and rewrite the scalar component using `hu'`. - -- Then unfold `l2ChartToVolumeOnRhoSupportImage` and align the `changeMeasureL` proof terms via - -- `changeMeasureL_congr`. - simp only [projToVolumeTarget, chartTargetToVolumeTarget, - l2ChartToVolumeOnRhoSupportImage, ContinuousLinearMap.comp_apply, - ContinuousLinearMap.proj_apply, ContinuousLinearMap.prod_apply, - ContinuousLinearMap.coe_fst', hu', ContinuousLinearEquiv.coe_coe, - LinearIsometry.coe_toContinuousLinearMap, ContinuousLinearMap.coe_snd', cm] - -- Discharge the remaining definitional mismatch in `changeMeasureL`. - refine congrArg - eVol ?_ - refine congrArg (l2EquivVolumeOnRhoSupportImage' (dR := dR) (I := I) (i := i) (F := ℝ)) ?_ - -- `changeMeasureL` is independent of proof arguments. - exact - congrArg (fun T => T u) - (MeasureTheory.Lp.changeMeasureL_congr (μ := μchart) (ν := μchart.restrict K) (E := ℝ) - (p := (2 : ℝ≥0∞)) (c := (1 : ℝ≥0∞)) - (hc₁ := (by simp)) - (hc₂ := _) - (hν₁ := restrict_le_one_smul (μ := μchart) (s := K)) - (hν₂ := _) - (hp₁ := (by simp)) - (hp₂ := _)) - -- Combine: align the restricted witness and conclude. - calc - ↑((eL2RangeChartVol (dR := dR) (I := I) (i := i) (F := ℝ)) - ((h1ToChartL2Range (dR := dR) (I := I) (i := i)) x)) = - eVol - ((l2EquivVolumeOnRhoSupportImage' (dR := dR) (I := I) (i := i) (F := ℝ)) uK) := by - simp [hL] - _ = - eVol - ((l2EquivVolumeOnRhoSupportImage' (dR := dR) (I := I) (i := i) (F := ℝ)) (cm u)) := by - simp [huK_eq] - _ = ((projToVolumeTarget (dR := dR) (I := I) (i := i) - (x.1 : FiniteChartData.h1Target (d := dR.d) (I := I) μM))).1 := by - exact hR.symm + let K := FiniteChartData.rhoSupportImage (d := dR.d) (I := I) i + have hKm : MeasurableSet K := rhoSupportImage_measurable (dR := dR) (I := I) i + let eChart := Lp.extendByZeroₗᵢ (μ := μchart) (E := ℝ) (p := (2 : ℝ≥0∞)) (s := K) hKm + let eVol := Lp.extendByZeroₗᵢ (μ := (volume : Measure E)) (E := ℝ) + (p := (2 : ℝ≥0∞)) (s := K) hKm + let z := h1ToChartL2Range (dR := dR) (I := I) i x + let uK := (LinearIsometry.equivRange eChart).symm z + let cm := Lp.changeMeasureL (μ := μchart) (ν := μchart.restrict K) (E := ℝ) + (p := (2 : ℝ≥0∞)) (c := (1 : ℝ≥0∞)) (by simp) + (restrict_le_one_smul μchart K) (by simp) + have heChart_uK : eChart uK = (z : E →₂[μchart] ℝ) := + congrArg Subtype.val ((LinearIsometry.equivRange eChart).apply_symm_apply z) + have huK_eq : uK = cm (z : E →₂[μchart] ℝ) := by + have hz : ((z : E →₂[μchart] ℝ) : E → ℝ) =ᵐ[μchart] K.indicator (fun t => uK t) := by + rw [← heChart_uK] + exact Lp.extendByZeroₗᵢ_ae_eq hKm uK + have hzK : ((z : E →₂[μchart] ℝ) : E → ℝ) =ᵐ[μchart.restrict K] uK := + Filter.EventuallyEq.trans (ae_restrict_of_ae hz) (indicator_ae_eq_restrict hKm) + exact Lp.ext (hzK.symm.trans + (Lp.changeMeasureL_coeFn_ae_eq (μ := μchart) (ν := μchart.restrict K) (E := ℝ) + (p := (2 : ℝ≥0∞)) (c := (1 : ℝ≥0∞)) (by simp) + (restrict_le_one_smul μchart K) (by simp) (z : E →₂[μchart] ℝ)).symm) + change eVol (l2EquivVolumeOnRhoSupportImage' (dR := dR) (I := I) i ℝ uK) = + eVol (l2EquivVolumeOnRhoSupportImage' (dR := dR) (I := I) i ℝ + (cm (z : E →₂[μchart] ℝ))) + exact congrArg (fun u => eVol (l2EquivVolumeOnRhoSupportImage' (dR := dR) (I := I) i ℝ u)) + huK_eq /-! ### Compactness: chartwise `H¹ → L²` contribution diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian/Global.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian/Global.lean index d88090fa7f..15b160846c 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian/Global.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian/Global.lean @@ -3,7 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module +public import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartDataRiemannian +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.EmbeddingL2 +public import Mathlib.Analysis.Normed.Operator.Compact.Basic +import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure.Finiteness import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachov import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian.Chartwise @@ -14,6 +20,8 @@ Finite-atlas assembly: turn the per-chart compactness result into compactness of `H¹ → L²` map for the Riemannian volume measure. -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian/Transport.lean b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian/Transport.lean index 833560a494..8dd6eac961 100644 --- a/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian/Transport.lean +++ b/LeanPool/RellichKondrachov/Geometry/Manifold/Sobolev/RellichKondrachovRiemannian/Transport.lean @@ -3,15 +3,13 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import Mathlib.MeasureTheory.Function.LpSpace.Complete -import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.SupportedH1 +public import LeanPool.RellichKondrachov.Analysis.FunctionalSpaces.Sobolev.Euclidean.SupportedH1 +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasureRiemannianVolume +public import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.H1 +public import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.ExtendByZeroRangeEquiv import LeanPool.RellichKondrachov.Geometry.Manifold.Riemannian.VolumeMeasure.Finiteness -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.ChartMeasureRiemannianVolume -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.H1 -import LeanPool.RellichKondrachov.Geometry.Manifold.Sobolev.Localization -import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.ChangeMeasureLeSmul -import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.ExtendByZeroRangeEquiv /-! # `RellichKondrachov.Geometry.Manifold.Sobolev.RellichKondrachovRiemannian.Transport` @@ -27,6 +25,8 @@ compactness proof. - `rhoSupportImage_measurable`: measurability of the fixed support set. -/ +@[expose] public section + namespace RellichKondrachov namespace Geometry namespace Manifold diff --git a/LeanPool/RellichKondrachov/MeasureTheory/Function/LpSpace/ChangeMeasureLeSmul.lean b/LeanPool/RellichKondrachov/MeasureTheory/Function/LpSpace/ChangeMeasureLeSmul.lean index 4a7e402abb..36267ef79b 100644 --- a/LeanPool/RellichKondrachov/MeasureTheory/Function/LpSpace/ChangeMeasureLeSmul.lean +++ b/LeanPool/RellichKondrachov/MeasureTheory/Function/LpSpace/ChangeMeasureLeSmul.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import Mathlib.Analysis.Normed.Operator.Compact.Basic -import Mathlib.MeasureTheory.Measure.AbsolutelyContinuous -import Mathlib.MeasureTheory.Function.LpSeminorm.Basic -import Mathlib.MeasureTheory.Function.LpSpace.Basic +public import Mathlib.Analysis.Normed.Operator.Compact.Basic +public import Mathlib.MeasureTheory.Function.LpSpace.Basic /-! # `RellichKondrachov.MeasureTheory.Function.LpSpace.ChangeMeasureLeSmul` @@ -24,6 +23,8 @@ equivalence between `Lp` spaces, and compactness of operators can be transported Tracking: Beads `lean-103.5.2.26.5.3.3.1`. -/ +@[expose] public section + namespace MeasureTheory open scoped ENNReal @@ -45,9 +46,10 @@ private lemma memLp_changeMeasure {c : ℝ≥0∞} (hc : c ≠ ∞) (hν : ν MeasureTheory.MemLp.of_measure_le_smul (μ := μ) (μ' := ν) (p := p) (f := fun x : α => f x) hc hν hfμ -private noncomputable def changeMeasureFun {c : ℝ≥0∞} (hc : c ≠ ∞) (hν : ν ≤ c • μ) (f : Lp E p μ) : +/-- View an Lp function under a measure bounded by a finite multiple of the original measure. -/ +noncomputable def changeMeasureFun {c : ℝ≥0∞} (hc : c ≠ ∞) (hν : ν ≤ c • μ) (f : Lp E p μ) : Lp E p ν := - (memLp_changeMeasure (μ := μ) (ν := ν) (p := p) hc hν f).toLp fun x : α => f x + (private_decl% (memLp_changeMeasure (μ := μ) (ν := ν) (p := p) hc hν f)).toLp fun x : α => f x omit [NormedSpace ℝ E] [Fact (1 ≤ p)] in private lemma changeMeasureFun_coe {c : ℝ≥0∞} (hc : c ≠ ∞) (hν : ν ≤ c • μ) (f : Lp E p μ) : @@ -183,7 +185,7 @@ lemma changeMeasureL_coeFn_ae_eq {c : ℝ≥0∞} (hc : c ≠ ∞) (hν : ν ≤ (changeMeasureL (μ := μ) (ν := ν) (E := E) (p := p) hc hν hp f : α → E) =ᵐ[ν] f := by -- `mkContinuous` does not change the underlying function. simpa [changeMeasureL, changeMeasureₗ, changeMeasureFun] using - (changeMeasureFun_coe (μ := μ) (ν := ν) (E := E) (p := p) (c := c) hc hν f) + (private_decl% (changeMeasureFun_coe (μ := μ) (ν := ν) (E := E) (p := p) (c := c) hc hν f)) lemma changeMeasureL_congr {c : ℝ≥0∞} (hc₁ hc₂ : c ≠ ∞) (hν₁ hν₂ : ν ≤ c • μ) (hp₁ hp₂ : p ≠ ∞) : changeMeasureL (μ := μ) (ν := ν) (E := E) (p := p) hc₁ hν₁ hp₁ = @@ -226,11 +228,11 @@ noncomputable def changeMeasureEquiv {c₁ c₂ : ℝ≥0∞} (hc₁ : c₁ ≠ have habs : ν ≪ μ := Measure.absolutelyContinuous_of_le_smul hν have hbwdμ : (bwd g : α → E) =ᵐ[μ] g := by simpa [bwd, changeMeasureL, changeMeasureₗ] using - (changeMeasureFun_coe (μ := ν) (ν := μ) (p := p) hc₂ hμ g) + (private_decl% (changeMeasureFun_coe (μ := ν) (ν := μ) (p := p) hc₂ hμ g)) have hbwdν : (bwd g : α → E) =ᵐ[ν] g := habs.ae_le hbwdμ have hfwd : (fwd (bwd g) : α → E) =ᵐ[ν] (bwd g) := by simpa [fwd, bwd, changeMeasureL, changeMeasureₗ] using - (changeMeasureFun_coe (μ := μ) (ν := ν) (p := p) hc₁ hν (bwd g)) + (private_decl% (changeMeasureFun_coe (μ := μ) (ν := ν) (p := p) hc₁ hν (bwd g))) filter_upwards [hfwd, hbwdν] with x hfwd hbwd exact hfwd.trans hbwd · refine ContinuousLinearMap.ext ?_ @@ -239,10 +241,10 @@ noncomputable def changeMeasureEquiv {c₁ c₂ : ℝ≥0∞} (hc₁ : c₁ ≠ have habs : μ ≪ ν := Measure.absolutelyContinuous_of_le_smul hμ have hbwd : (bwd (fwd f) : α → E) =ᵐ[μ] (fwd f) := by simpa [fwd, bwd, changeMeasureL, changeMeasureₗ] using - (changeMeasureFun_coe (μ := ν) (ν := μ) (p := p) hc₂ hμ (fwd f)) + (private_decl% (changeMeasureFun_coe (μ := ν) (ν := μ) (p := p) hc₂ hμ (fwd f))) have hfwdν : (fwd f : α → E) =ᵐ[ν] f := by simpa [fwd, changeMeasureL, changeMeasureₗ] using - (changeMeasureFun_coe (μ := μ) (ν := ν) (p := p) hc₁ hν f) + (private_decl% (changeMeasureFun_coe (μ := μ) (ν := ν) (p := p) hc₁ hν f)) have hfwdμ : (fwd f : α → E) =ᵐ[μ] f := habs.ae_le hfwdν filter_upwards [hbwd, hfwdμ] with x hbwd hfwd exact hbwd.trans hfwd diff --git a/LeanPool/RellichKondrachov/MeasureTheory/Function/LpSpace/ExtendByZeroRangeEquiv.lean b/LeanPool/RellichKondrachov/MeasureTheory/Function/LpSpace/ExtendByZeroRangeEquiv.lean index d2ee1c0f55..411a5e5e41 100644 --- a/LeanPool/RellichKondrachov/MeasureTheory/Function/LpSpace/ExtendByZeroRangeEquiv.lean +++ b/LeanPool/RellichKondrachov/MeasureTheory/Function/LpSpace/ExtendByZeroRangeEquiv.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.ChangeMeasureLeSmul -import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.Restrict +public import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.ChangeMeasureLeSmul +public import LeanPool.RellichKondrachov.MeasureTheory.Function.LpSpace.Restrict /-! # `RellichKondrachov.MeasureTheory.Function.LpSpace.ExtendByZeroRangeEquiv` @@ -22,6 +23,8 @@ This is used in the manifold Rellich glue to transport compactness on `volume` t fixed compact supports. -/ +@[expose] public section + namespace MeasureTheory open scoped ENNReal diff --git a/LeanPool/RellichKondrachov/MeasureTheory/Function/LpSpace/Restrict.lean b/LeanPool/RellichKondrachov/MeasureTheory/Function/LpSpace/Restrict.lean index fe5552af1f..8fa296d509 100644 --- a/LeanPool/RellichKondrachov/MeasureTheory/Function/LpSpace/Restrict.lean +++ b/LeanPool/RellichKondrachov/MeasureTheory/Function/LpSpace/Restrict.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import Mathlib.MeasureTheory.Function.LpSeminorm.Basic -import Mathlib.MeasureTheory.Function.LpSpace.Basic +public import Mathlib.MeasureTheory.Function.LpSpace.Basic /-! # `RellichKondrachov.MeasureTheory.Function.LpSpace.Restrict` @@ -29,6 +29,8 @@ given by extension-by-zero (via `Set.indicator`). - `MeasureTheory.Lp.extendByZeroₗᵢ` -/ +@[expose] public section + namespace MeasureTheory open scoped ENNReal @@ -42,7 +44,8 @@ variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] variable {p : ℝ≥0∞} [Fact (1 ≤ p)] variable {s : Set α} (hs : MeasurableSet s) -private noncomputable def extendByZeroFun (f : Lp E p (μ.restrict s)) : Lp E p μ := +/-- Extend an Lp function from a restricted measure by zero outside the set. -/ +noncomputable def extendByZeroFun (f : Lp E p (μ.restrict s)) : Lp E p μ := let hf : MemLp (fun x : α => f x) p (μ.restrict s) := Lp.memLp f let hfi : MemLp (s.indicator fun x : α => f x) p μ := (memLp_indicator_iff_restrict (μ := μ) (p := p) (s := s) (f := fun x : α => f x) hs).2 hf diff --git a/LeanPool/RellichKondrachov/MeasureTheory/Measure/HausdorffVolume.lean b/LeanPool/RellichKondrachov/MeasureTheory/Measure/HausdorffVolume.lean index 89f4dae449..aec222d62a 100644 --- a/LeanPool/RellichKondrachov/MeasureTheory/Measure/HausdorffVolume.lean +++ b/LeanPool/RellichKondrachov/MeasureTheory/Measure/HausdorffVolume.lean @@ -3,10 +3,9 @@ Copyright (c) 2026 Adam Benenson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Benenson -/ +module -import Mathlib.MeasureTheory.Measure.Hausdorff -import Mathlib.MeasureTheory.Measure.Haar.OfBasis -import Mathlib.MeasureTheory.Measure.OpenPos +public import Mathlib.MeasureTheory.Measure.Hausdorff /-! # `RellichKondrachov.MeasureTheory.Measure.HausdorffVolume` @@ -21,6 +20,8 @@ Using uniqueness of Haar measures, we record the resulting proportionality compactness statements across equivalent measures. -/ +@[expose] public section + namespace RellichKondrachov open scoped ENNReal MeasureTheory Topology diff --git a/LeanPool/RiemannMappingTheorem.lean b/LeanPool/RiemannMappingTheorem.lean index 64dad10d99..5d830aa60e 100644 --- a/LeanPool/RiemannMappingTheorem.lean +++ b/LeanPool/RiemannMappingTheorem.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Vincent Beffara. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Beffara -/ +module -import LeanPool.RiemannMappingTheorem.Main +public import LeanPool.RiemannMappingTheorem.Main +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Riemann Mapping Theorem @@ -17,6 +21,8 @@ Tags: complex-analysis, conformal-maps, schwarz-lemma MSC: 30C35, 30C20 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/RiemannMappingTheorem/Cindex.lean b/LeanPool/RiemannMappingTheorem/Cindex.lean index b4be2d1d32..63c0b4c69e 100644 --- a/LeanPool/RiemannMappingTheorem/Cindex.lean +++ b/LeanPool/RiemannMappingTheorem/Cindex.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Vincent Beffara. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Beffara -/ -import Mathlib.Analysis.Analytic.IsolatedZeros +module + +public import Mathlib.MeasureTheory.Integral.CircleIntegral import Mathlib.Analysis.Complex.RemovableSingularity -import Mathlib.MeasureTheory.Integral.CircleIntegral /-! # LeanPool.RiemannMappingTheorem.Cindex -/ +@[expose] public section + open Real Complex Function TopologicalSpace Filter Topology Metric MeasureTheory Nat /-- The argument-principle integral diff --git a/LeanPool/RiemannMappingTheorem/Defs.lean b/LeanPool/RiemannMappingTheorem/Defs.lean index 4aeca9e63a..065bcd72e8 100644 --- a/LeanPool/RiemannMappingTheorem/Defs.lean +++ b/LeanPool/RiemannMappingTheorem/Defs.lean @@ -3,13 +3,21 @@ Copyright (c) 2026 Vincent Beffara. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Beffara -/ -import LeanPool.RiemannMappingTheorem.ToMathlib +module + +public import Mathlib.Analysis.Calculus.FDeriv.Comp + +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic import LeanPool.RiemannMappingTheorem.DerivInj +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # LeanPool.RiemannMappingTheorem.Defs -/ +@[expose] public section + open Complex Metric Set variable {u : ℂ} {U V W : Set ℂ} diff --git a/LeanPool/RiemannMappingTheorem/DerivInj.lean b/LeanPool/RiemannMappingTheorem/DerivInj.lean index 8993b88fa1..7827ead7a6 100644 --- a/LeanPool/RiemannMappingTheorem/DerivInj.lean +++ b/LeanPool/RiemannMappingTheorem/DerivInj.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Vincent Beffara. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Beffara -/ +module + +public import LeanPool.RiemannMappingTheorem.Cindex import LeanPool.RiemannMappingTheorem.Hurwitz +import Mathlib.Analysis.Complex.RemovableSingularity /-! # LeanPool.RiemannMappingTheorem.DerivInj -/ +@[expose] public section + open Complex Metric circleIntegral Topology Filter Set variable {ι α β : Type*} {U : Set ℂ} {c z₀ : ℂ} {r : ℝ} {f g : ℂ → ℂ} diff --git a/LeanPool/RiemannMappingTheorem/Etape2.lean b/LeanPool/RiemannMappingTheorem/Etape2.lean index 9395b0aebb..939fa415e8 100644 --- a/LeanPool/RiemannMappingTheorem/Etape2.lean +++ b/LeanPool/RiemannMappingTheorem/Etape2.lean @@ -3,14 +3,22 @@ Copyright (c) 2026 Vincent Beffara. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Beffara -/ +module + +public import Mathlib.Analysis.Calculus.Deriv.Inv + +public import Mathlib.Analysis.Calculus.FDeriv.Add + +public import LeanPool.RiemannMappingTheorem.Defs import Mathlib.Analysis.Complex.Schwarz -import LeanPool.RiemannMappingTheorem.Defs -import LeanPool.RiemannMappingTheorem.ToMathlib +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # LeanPool.RiemannMappingTheorem.Etape2 -/ +@[expose] public section + open Complex ComplexConjugate Set Metric Topology Filter variable {z u z₀ : ℂ} (U : Set ℂ) [good_domain U] diff --git a/LeanPool/RiemannMappingTheorem/HasSqrt.lean b/LeanPool/RiemannMappingTheorem/HasSqrt.lean index eced7655ac..3febf25504 100644 --- a/LeanPool/RiemannMappingTheorem/HasSqrt.lean +++ b/LeanPool/RiemannMappingTheorem/HasSqrt.lean @@ -3,12 +3,19 @@ Copyright (c) 2026 Vincent Beffara. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Beffara -/ -import LeanPool.RiemannMappingTheorem.Cindex +module + +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Analysis.Complex.Basic +public import Mathlib.Analysis.Complex.Exponential +import Mathlib.Analysis.Complex.CauchyIntegral /-! # LeanPool.RiemannMappingTheorem.HasSqrt -/ +@[expose] public section + open Set Complex Metric Topology variable {z z₀ : ℂ} {U : Set ℂ} diff --git a/LeanPool/RiemannMappingTheorem/Hurwitz.lean b/LeanPool/RiemannMappingTheorem/Hurwitz.lean index 60ac4c8d41..a2f1d017f1 100644 --- a/LeanPool/RiemannMappingTheorem/Hurwitz.lean +++ b/LeanPool/RiemannMappingTheorem/Hurwitz.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Vincent Beffara. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Beffara -/ -import Mathlib.Analysis.Complex.LocallyUniformLimit +module + +public import LeanPool.RiemannMappingTheorem.Cindex import LeanPool.RiemannMappingTheorem.Uniform -import LeanPool.RiemannMappingTheorem.Cindex +import Mathlib.Analysis.Complex.LocallyUniformLimit /-! # LeanPool.RiemannMappingTheorem.Hurwitz -/ +@[expose] public section + open Filter Topology Set Metric Uniformity section filter diff --git a/LeanPool/RiemannMappingTheorem/Main.lean b/LeanPool/RiemannMappingTheorem/Main.lean index 02aa1e96b9..a0450fb848 100644 --- a/LeanPool/RiemannMappingTheorem/Main.lean +++ b/LeanPool/RiemannMappingTheorem/Main.lean @@ -3,15 +3,23 @@ Copyright (c) 2026 Vincent Beffara. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Beffara -/ -import LeanPool.RiemannMappingTheorem.Spaces +module + +public import LeanPool.RiemannMappingTheorem.Spaces +public import LeanPool.RiemannMappingTheorem.HasSqrt +import LeanPool.RiemannMappingTheorem.DerivInj import LeanPool.RiemannMappingTheorem.Etape2 -import LeanPool.RiemannMappingTheorem.HasSqrt +import LeanPool.RiemannMappingTheorem.Hurwitz import LeanPool.RiemannMappingTheorem.Montel +import Mathlib.Analysis.Complex.OpenMapping +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # LeanPool.RiemannMappingTheorem.Main -/ +@[expose] public section + open UniformConvergence Topology Filter Set Metric Function variable {ι : Type*} {l : Filter ι} {U : Set ℂ} {z₀ : ℂ} diff --git a/LeanPool/RiemannMappingTheorem/Montel.lean b/LeanPool/RiemannMappingTheorem/Montel.lean index 5586c7f29d..203ab4d573 100644 --- a/LeanPool/RiemannMappingTheorem/Montel.lean +++ b/LeanPool/RiemannMappingTheorem/Montel.lean @@ -3,16 +3,20 @@ Copyright (c) 2026 Vincent Beffara. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Beffara -/ +module + +public import LeanPool.RiemannMappingTheorem.Spaces import Mathlib.Analysis.Complex.Liouville +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch import Mathlib.Topology.UniformSpace.Ascoli -import LeanPool.RiemannMappingTheorem.Spaces -import LeanPool.RiemannMappingTheorem.Defs -import LeanPool.RiemannMappingTheorem.Hurwitz /-! # LeanPool.RiemannMappingTheorem.Montel -/ +@[expose] public section + open Set Function Metric UniformConvergence Complex variable {ι : Type*} {U K : Set ℂ} {z : ℂ} {F : ι → 𝓒 U} {Q : Set ℂ → Set ℂ} diff --git a/LeanPool/RiemannMappingTheorem/Spaces.lean b/LeanPool/RiemannMappingTheorem/Spaces.lean index 9fe79fafb9..5617ba2629 100644 --- a/LeanPool/RiemannMappingTheorem/Spaces.lean +++ b/LeanPool/RiemannMappingTheorem/Spaces.lean @@ -3,14 +3,20 @@ Copyright (c) 2026 Vincent Beffara. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Beffara -/ +module + +public import LeanPool.RiemannMappingTheorem.Defs +import LeanPool.RiemannMappingTheorem.ToMathlib import Mathlib.Analysis.Complex.LocallyUniformLimit import Mathlib.Analysis.Complex.OpenMapping -import LeanPool.RiemannMappingTheorem.Defs +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # LeanPool.RiemannMappingTheorem.Spaces -/ +@[expose] public section + open Topology Filter Set Function UniformConvergence Metric variable {U : Set ℂ} {Q : Set ℂ → Set ℂ} {ι : Type*} {l : Filter ι} diff --git a/LeanPool/RiemannMappingTheorem/ToMathlib.lean b/LeanPool/RiemannMappingTheorem/ToMathlib.lean index 9b065fed5f..546aa12c03 100644 --- a/LeanPool/RiemannMappingTheorem/ToMathlib.lean +++ b/LeanPool/RiemannMappingTheorem/ToMathlib.lean @@ -3,14 +3,21 @@ Copyright (c) 2026 Vincent Beffara. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Beffara -/ +module + +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.Analysis.Calculus.ContDiff.Deriv +import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib.Analysis.Calculus.ParametricIntegral import Mathlib.MeasureTheory.Integral.IntervalIntegral.IntegrationByParts -import LeanPool.RiemannMappingTheorem.Cindex /-! # LeanPool.RiemannMappingTheorem.ToMathlib -/ +@[expose] public section + open intervalIntegral Real MeasureTheory Filter Topology Set Metric Interval variable {𝕜 E V : Type*} {r : ℝ} {z : ℂ} {a b t : ℝ} {n : ℕ} diff --git a/LeanPool/RiemannMappingTheorem/Uniform.lean b/LeanPool/RiemannMappingTheorem/Uniform.lean index 23409cc087..01847cc7da 100644 --- a/LeanPool/RiemannMappingTheorem/Uniform.lean +++ b/LeanPool/RiemannMappingTheorem/Uniform.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Vincent Beffara. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Beffara -/ +module + +public import Mathlib.Topology.UniformSpace.UniformConvergence import Mathlib.Topology.UniformSpace.Compact -import Mathlib.Topology.UniformSpace.UniformConvergence /-! # LeanPool.RiemannMappingTheorem.Uniform -/ +@[expose] public section + open Set Filter UniformSpace Function Uniformity Topology SetRel variable {ι α β : Type*} {a : α} {s t : Set α} {x u v : Set (α × α)} diff --git a/LeanPool/RiemannRochFunctionFields.lean b/LeanPool/RiemannRochFunctionFields.lean index 208e16be66..ae3311b7b8 100644 --- a/LeanPool/RiemannRochFunctionFields.lean +++ b/LeanPool/RiemannRochFunctionFields.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Guanghao Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Guanghao Li -/ +module -import LeanPool.RiemannRochFunctionFields.CoordinateFree.EllipticCurve -import LeanPool.RiemannRochFunctionFields.CoordinateFree.RiemannRoch -import LeanPool.RiemannRochFunctionFields.EllipticCurve.ConcreteRegression -import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Regression +public import LeanPool.RiemannRochFunctionFields.CoordinateFree.EllipticCurve +public import LeanPool.RiemannRochFunctionFields.CoordinateFree.RiemannRoch +public import LeanPool.RiemannRochFunctionFields.EllipticCurve.ConcreteRegression +public import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Regression +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Riemann–Roch for algebraic function fields @@ -19,3 +21,5 @@ Main declarations: `FunctionField.riemann_roch` Tags: riemann-roch, function-fields, algebraic-curves, weil-differentials, elliptic-curves MSC: 14H05, 11R58, 14H52 -/ + +@[expose] public section diff --git a/LeanPool/RiemannRochFunctionFields/AdeleSpace/Basic.lean b/LeanPool/RiemannRochFunctionFields/AdeleSpace/Basic.lean index fc5db4fe35..9ee81e8dac 100644 --- a/LeanPool/RiemannRochFunctionFields/AdeleSpace/Basic.lean +++ b/LeanPool/RiemannRochFunctionFields/AdeleSpace/Basic.lean @@ -7,8 +7,8 @@ module public import LeanPool.RiemannRochFunctionFields.RRspace.Basic public import Mathlib.Algebra.Module.MinimalAxioms -public import Mathlib.LinearAlgebra.Quotient.Basic public import Mathlib.RingTheory.DedekindDomain.FiniteAdeleRing +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # K-valued adele space of a function field diff --git a/LeanPool/RiemannRochFunctionFields/AdeleSpace/FilterChain.lean b/LeanPool/RiemannRochFunctionFields/AdeleSpace/FilterChain.lean index 74cabd307f..e1a62bb6bd 100644 --- a/LeanPool/RiemannRochFunctionFields/AdeleSpace/FilterChain.lean +++ b/LeanPool/RiemannRochFunctionFields/AdeleSpace/FilterChain.lean @@ -6,13 +6,7 @@ Authors: Guanghao Li module public import LeanPool.RiemannRochFunctionFields.AdeleSpace.Basic -public import Mathlib.Algebra.Order.GroupWithZero.Canonical -public import Mathlib.LinearAlgebra.Isomorphisms -public import Mathlib.LinearAlgebra.Dimension.Finite -public import Mathlib.LinearAlgebra.Dimension.RankNullity -public import Mathlib.LinearAlgebra.Quotient.Basic -public import Mathlib.RingTheory.LocalRing.ResidueField.Basic -public import Mathlib.RingTheory.Finiteness.Finsupp +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Exact dimensions of adele divisor quotients @@ -225,26 +219,17 @@ theorem finiteAdeleLocalResidueMap_surjective (D : DivisorA k K) π ^ (D (Sum.inl v) + 1) * (π ^ (-(D (Sum.inl v) + 1)) * (z : K)) = (π ^ (D (Sum.inl v) + 1) * π ^ (-(D (Sum.inl v) + 1))) * (z : K) := by ring _ = (z : K) := by rw [h1, one_mul] - simp only [finiteAdeleLocalResidueMap, finiteAdeleLocalResidueToSubring] - exact congr_arg (IsDedekindDomain.HeightOneSpectrum.residueHom (K := K) v) - (Subtype.ext_iff.mpr hmul) ▸ hz + exact (congrArg (IsDedekindDomain.HeightOneSpectrum.residueHom (K := K) v) + (Subtype.ext hmul)).trans hz theorem finrankAdeleFiltDiff_single_finite (D : DivisorA k K) (v : IsDedekindDomain.HeightOneSpectrum (ringOfIntegers k K)) : finrankAdeleFiltDiff k K D (D + Finsupp.single (Sum.inl v) 1) = placeDegree k K (Sum.inl v) := by - let f := finiteAdeleLocalResidueMap k K D v - let e : (ringOfIntegers k K ⧸ v.asIdeal) ≃ₗ[k] v.asIdeal.ResidueField := - finiteResidueFieldEquiv k K v - let : FiniteDimensional k v.asIdeal.ResidueField := e.finiteDimensional - have hker := finiteAdeleLocalResidueMap_ker k K D v - have hsurj := finiteAdeleLocalResidueMap_surjective k K D v - rw [finrankAdeleFiltDiff, ← hker, f.quotKerEquivRange.finrank_eq] - rw [LinearMap.range_eq_top.mpr hsurj, finrank_top] - calc - Module.finrank k v.asIdeal.ResidueField = Module.finrank k (ringOfIntegers k K ⧸ v.asIdeal) := - e.finrank_eq.symm - _ = placeDegree k K (Sum.inl v) := rfl + rw [finrankAdeleFiltDiff, ← finiteAdeleLocalResidueMap_ker k K D v] + exact ((finiteAdeleLocalResidueMap k K D v).quotKerEquivOfSurjective + (finiteAdeleLocalResidueMap_surjective k K D v)).finrank_eq.trans + (finiteResidueFieldEquiv k K v).finrank_eq.symm /-- Lift an adele to the valuation subring at an infinite place, scaled by a uniformizer power. -/ noncomputable def infiniteAdeleLocalResidueToSubring (D : DivisorA k K) @@ -423,27 +408,17 @@ theorem infiniteAdeleLocalResidueMap_surjective (D : DivisorA k K) π ^ (D (Sum.inr v) + 1) * (π ^ (-(D (Sum.inr v) + 1)) * (z : K)) = (π ^ (D (Sum.inr v) + 1) * π ^ (-(D (Sum.inr v) + 1))) * (z : K) := by ring _ = (z : K) := by rw [h1, one_mul] - simp only [infiniteAdeleLocalResidueMap, infiniteAdeleLocalResidueToSubring] - exact congr_arg (IsDedekindDomain.HeightOneSpectrum.residueHom (K := K) v) - (Subtype.ext_iff.mpr hmul) ▸ hz + exact (congrArg (IsDedekindDomain.HeightOneSpectrum.residueHom (K := K) v) + (Subtype.ext hmul)).trans hz theorem finrankAdeleFiltDiff_single_infinite (D : DivisorA k K) (v : IsDedekindDomain.HeightOneSpectrum (infiniteIntegers k K)) : finrankAdeleFiltDiff k K D (D + Finsupp.single (Sum.inr v) 1) = placeDegree k K (Sum.inr v) := by - let f := infiniteAdeleLocalResidueMap k K D v - let e : (infiniteIntegers k K ⧸ v.asIdeal) ≃ₗ[k] v.asIdeal.ResidueField := - infiniteResidueFieldEquiv k K v - let : FiniteDimensional k v.asIdeal.ResidueField := e.finiteDimensional - have hker := infiniteAdeleLocalResidueMap_ker k K D v - have hsurj := infiniteAdeleLocalResidueMap_surjective k K D v - rw [finrankAdeleFiltDiff, ← hker, f.quotKerEquivRange.finrank_eq] - rw [LinearMap.range_eq_top.mpr hsurj, finrank_top] - calc - Module.finrank k v.asIdeal.ResidueField = - Module.finrank k (infiniteIntegers k K ⧸ v.asIdeal) := - e.finrank_eq.symm - _ = placeDegree k K (Sum.inr v) := rfl + rw [finrankAdeleFiltDiff, ← infiniteAdeleLocalResidueMap_ker k K D v] + exact ((infiniteAdeleLocalResidueMap k K D v).quotKerEquivOfSurjective + (infiniteAdeleLocalResidueMap_surjective k K D v)).finrank_eq.trans + (infiniteResidueFieldEquiv k K v).finrank_eq.symm theorem finrankAdeleFiltDiff_single_one (D : DivisorA k K) (v : PlaceA k K) : finrankAdeleFiltDiff k K D (D + Finsupp.single v 1) = placeDegree k K v := by @@ -456,43 +431,27 @@ theorem finiteAdeleFiltDiff_quotient_single (D : DivisorA k K) (v : PlaceA k K) Submodule.comap (adeleFilt k K (D + Finsupp.single v 1)).subtype (adeleFilt k K D)) := by classical rcases v with v | v - · let : AddCommGroup (adeleFilt k K (D + Finsupp.single (Sum.inl v) 1)) := - Submodule.addCommGroup _ - let : Module k (adeleFilt k K (D + Finsupp.single (Sum.inl v) 1)) := Submodule.module _ - let f := finiteAdeleLocalResidueMap k K D v - let e : (ringOfIntegers k K ⧸ v.asIdeal) ≃ₗ[k] v.asIdeal.ResidueField := + · let e : (ringOfIntegers k K ⧸ v.asIdeal) ≃ₗ[k] v.asIdeal.ResidueField := finiteResidueFieldEquiv k K v let : FiniteDimensional k v.asIdeal.ResidueField := e.finiteDimensional - let p := Submodule.comap (adeleFilt k K (D + Finsupp.single (Sum.inl v) 1)).subtype - (adeleFilt k K D) - have : Module.Finite k f.range := inferInstance - have : Module.Finite k - (adeleFilt k K (D + Finsupp.single (Sum.inl v) 1) ⧸ f.ker) := - Module.Finite.equiv f.quotKerEquivRange.symm - exact Module.Finite.equiv (Submodule.quotEquivOfEq f.ker p - (finiteAdeleLocalResidueMap_ker k K D v)) - · let : AddCommGroup (adeleFilt k K (D + Finsupp.single (Sum.inr v) 1)) := - Submodule.addCommGroup _ - let : Module k (adeleFilt k K (D + Finsupp.single (Sum.inr v) 1)) := Submodule.module _ - let f := infiniteAdeleLocalResidueMap k K D v - let e : (infiniteIntegers k K ⧸ v.asIdeal) ≃ₗ[k] v.asIdeal.ResidueField := + rw [← finiteAdeleLocalResidueMap_ker k K D v] + exact Module.Finite.equiv + ((finiteAdeleLocalResidueMap k K D v).quotKerEquivOfSurjective + (finiteAdeleLocalResidueMap_surjective k K D v)).symm + · let e : (infiniteIntegers k K ⧸ v.asIdeal) ≃ₗ[k] v.asIdeal.ResidueField := infiniteResidueFieldEquiv k K v let : FiniteDimensional k v.asIdeal.ResidueField := e.finiteDimensional - let p := Submodule.comap (adeleFilt k K (D + Finsupp.single (Sum.inr v) 1)).subtype - (adeleFilt k K D) - have : Module.Finite k f.range := inferInstance - have : Module.Finite k - (adeleFilt k K (D + Finsupp.single (Sum.inr v) 1) ⧸ f.ker) := - Module.Finite.equiv f.quotKerEquivRange.symm - exact Module.Finite.equiv (Submodule.quotEquivOfEq f.ker p - (infiniteAdeleLocalResidueMap_ker k K D v)) + rw [← infiniteAdeleLocalResidueMap_ker k K D v] + exact Module.Finite.equiv + ((infiniteAdeleLocalResidueMap k K D v).quotKerEquivOfSurjective + (infiniteAdeleLocalResidueMap_surjective k K D v)).symm theorem finiteAdeleFiltDiff_quotient_self (D : DivisorA k K) : Module.Finite k ((adeleFilt k K D) ⧸ Submodule.comap (adeleFilt k K D).subtype (adeleFilt k K D)) := by rw [show Submodule.comap (adeleFilt k K D).subtype (adeleFilt k K D) = ⊤ from Submodule.comap_subtype_self (adeleFilt k K D)] - infer_instance + exact Module.Finite.of_finite theorem finiteAdeleFiltDiff_quotient_mono_add {D M N : DivisorA k K} (hDM : D ≤ M) (hMN : M ≤ N) @@ -676,7 +635,7 @@ theorem finrankAdeleFiltDiff_add_effective (D E : DivisorA k K) ext a simp rw [hp] - exact Module.finrank_eq_zero_of_subsingleton k _ + exact Module.finrank_zero_of_subsingleton | single_add a b f ha hb ih => have hfa : f a = 0 := Finsupp.notMem_support_iff.mp ha have hff : IsEffective k K f := by @@ -716,7 +675,7 @@ theorem finrankAdeleFiltDiff_add_effective (D E : DivisorA k K) ext a simp rw [hp] - exact Module.finrank_eq_zero_of_subsingleton k _ + exact Module.finrank_zero_of_subsingleton | succ n ihN => let P := M + Finsupp.single a (n : ℤ) have hMP : M ≤ P := by @@ -814,6 +773,13 @@ theorem finrank_map_comap_mkQ_eq_quotient {D' : DivisorA k K} Submodule.Quotient.equiv st qpInQt eT.symm hmap rw [← eQuot.finrank_eq, ← eTS.finrank_eq] +theorem sandwichDiagonal_inter {D D' : DivisorA k K} (h : D ≤ D') : + adeleFilt k K D' ⊓ (adeleFilt k K D + diagonalSubmodule k K) = + Submodule.map (diagonal k K) (RRspace k K D') ⊔ adeleFilt k K D := by + rw [Submodule.add_eq_sup, inf_comm, + sup_inf_assoc_of_le _ (adeleFilt_mono k K h), inf_comm, + adeleFilt_inf_diagonal k K D', sup_comm] + theorem sandwich {D D' : DivisorA k K} (h : D ≤ D') : sandwichRank k K D D' = deg k K D' - ell k K D' - (deg k K D - ell k K D) := by let p := adeleFilt k K D' @@ -829,24 +795,7 @@ theorem sandwich {D D' : DivisorA k K} (h : D ≤ D') : rcases hy with ⟨f, hf, rfl⟩ exact Submodule.add_mem p hf (hs_le_p hz) - have hmod : p ⊓ (s + r) = s + p ⊓ r := by - apply le_antisymm - · rintro x ⟨hxp, hxsr⟩ - rcases Submodule.mem_sup.mp hxsr with ⟨a, has, y, hy, rfl⟩ - obtain ⟨f, rfl⟩ := LinearMap.mem_range.mp hy - refine Submodule.mem_sup.mpr ⟨a, has, (diagonal k K f), ?_, rfl⟩ - exact Submodule.mem_inf.mpr - ⟨(by simpa [sub_add_cancel] using Submodule.sub_mem p hxp (hs_le_p has)), hy⟩ - · rintro x hx - rcases Submodule.mem_sup.mp hx with ⟨a, has, y, hy, rfl⟩ - rcases Submodule.mem_inf.mp hy with ⟨hyp, hyr⟩ - refine ⟨Submodule.add_mem p (hs_le_p has) hyp, - Submodule.add_mem (s + r) (Submodule.mem_sup_left has) (Submodule.mem_sup_right hyr)⟩ - have hinter : p ⊓ (s + r) = t := by - have hpr : p ⊓ r = l := adeleFilt_inf_diagonal k K D' - calc p ⊓ (s + r) = s + (p ⊓ r) := hmod - _ = s + l := by rw [hpr] - _ = t := by simp [t, Submodule.add_eq_sup, sup_comm] + have hinter : p ⊓ (s + r) = t := sandwichDiagonal_inter k K h let : AddCommGroup ↥p := Submodule.addCommGroup _ let : Module k ↥p := Submodule.module _ let : AddCommGroup ↥(p + r) := Submodule.addCommGroup _ @@ -855,13 +804,7 @@ theorem sandwich {D D' : DivisorA k K} (h : D ≤ D') : let qt := Submodule.comap p.subtype t have hqp : qp ≤ qt := Submodule.comap_mono hst have hpsum : p ⊔ (s + r) = p + r := by - rw [← Submodule.add_eq_sup] - apply le_antisymm - · refine sup_le le_sup_left (add_le_add hs_le_p le_rfl) - · intro x hx - rcases Submodule.mem_sup.mp hx with ⟨a, ha, b, hb, rfl⟩ - have hb' : b ∈ s + r := Submodule.mem_sup_right hb - exact Submodule.add_mem _ (Submodule.mem_sup_left ha) (Submodule.mem_sup_right hb') + simp only [Submodule.add_eq_sup, ← sup_assoc, sup_eq_left.mpr hs_le_p] have : AddCommGroup ↥(p ⊔ (s + r)) := Submodule.addCommGroup _ have : Module k ↥(p ⊔ (s + r)) := Submodule.module _ have e1 := LinearMap.quotientInfEquivSupQuotient p (s + r) @@ -994,34 +937,6 @@ theorem sandwich {D D' : DivisorA k K} (h : D ≤ D') : rw [hrrZ, deg_sub k K D' D] omega -theorem sandwichDiagonal_inter {D D' : DivisorA k K} (h : D ≤ D') : - adeleFilt k K D' ⊓ (adeleFilt k K D + diagonalSubmodule k K) = - Submodule.map (diagonal k K) (RRspace k K D') ⊔ adeleFilt k K D := by - let p := adeleFilt k K D' - let s := adeleFilt k K D - let r := diagonalSubmodule k K - let l := Submodule.map (diagonal k K) (RRspace k K D') - let t := l ⊔ s - have hs_le_p : s ≤ p := adeleFilt_mono k K h - have hmod : p ⊓ (s + r) = s + p ⊓ r := by - apply le_antisymm - · rintro x ⟨hxp, hxsr⟩ - rcases Submodule.mem_sup.mp hxsr with ⟨a, has, y, hy, rfl⟩ - obtain ⟨f, rfl⟩ := LinearMap.mem_range.mp hy - refine Submodule.mem_sup.mpr ⟨a, has, (diagonal k K f), ?_, rfl⟩ - exact Submodule.mem_inf.mpr - ⟨(by simpa [sub_add_cancel] using Submodule.sub_mem p hxp (hs_le_p has)), hy⟩ - · rintro x hx - rcases Submodule.mem_sup.mp hx with ⟨a, has, y, hy, rfl⟩ - rcases Submodule.mem_inf.mp hy with ⟨hyp, hyr⟩ - refine ⟨Submodule.add_mem p (hs_le_p has) hyp, - Submodule.add_mem (s + r) (Submodule.mem_sup_left has) (Submodule.mem_sup_right hyr)⟩ - have hpr : p ⊓ r = l := adeleFilt_inf_diagonal k K D' - calc - p ⊓ (s + r) = s + p ⊓ r := hmod - _ = s + l := by rw [hpr] - _ = t := by simp [t, Submodule.add_eq_sup, sup_comm] - theorem sandwichDiagonalSubmodule_eq_of_rank_zero {D D' : DivisorA k K} (hle : D ≤ D') (h0 : sandwichRank k K D D' = 0) : adeleFilt k K D' + diagonalSubmodule k K = adeleFilt k K D + diagonalSubmodule k K := by @@ -1059,22 +974,15 @@ theorem sandwichDiagonalSubmodule_eq_of_rank_zero {D D' : DivisorA k K} (hle : D have hinfl : Submodule.comap p.subtype p ⊓ Submodule.comap p.subtype (s + r) = qt := by rw [← Submodule.comap_inf, hinter] have hpsum : p ⊔ (s + r) = p + r := by - rw [← Submodule.add_eq_sup] - apply le_antisymm - · refine sup_le le_sup_left (add_le_add (adeleFilt_mono k K hle) le_rfl) - · intro x hx - rcases Submodule.mem_sup.mp hx with ⟨a, ha, b, hb, rfl⟩ - have hb' : b ∈ s + r := Submodule.mem_sup_right hb - exact Submodule.add_mem _ (Submodule.mem_sup_left ha) (Submodule.mem_sup_right hb') + simp only [Submodule.add_eq_sup, ← sup_assoc, + sup_eq_left.mpr (show s ≤ p from adeleFilt_mono k K hle)] have hsand := (LinearMap.quotientInfEquivSupQuotient p (s + r)).symm.finrank_eq rw [hpsum, hinfl] at hsand exact hsand.symm.trans hfin_sandwich have : Module.Finite k (↥p ⧸ qt) := - Module.Finite.equiv (Submodule.quotientQuotientEquivQuotient qp qt hqp_le) - have hrk : Module.rank k (↥p ⧸ qt) = 0 := by - rw [← Module.finrank_eq_rank, hfin_qt, Nat.cast_zero] - have hsub : Subsingleton (↥p ⧸ qt) := rank_zero_iff.mp hrk + Module.Finite.of_surjective (Submodule.factor hqp_le) (Submodule.factor_surjective hqp_le) + have hsub : Subsingleton (↥p ⧸ qt) := Module.finrank_zero_iff.mp hfin_qt have htopqt : qt = ⊤ := Submodule.Quotient.subsingleton_iff.mp hsub have hp_le_t : p ≤ t := Submodule.comap_subtype_eq_top.mp htopqt have hp_eq_t : p = t := le_antisymm hp_le_t htp @@ -1084,12 +992,8 @@ theorem sandwichDiagonalSubmodule_eq_of_rank_zero {D D' : DivisorA k K} (hle : D rw [hinter] at h exact hp_eq_t.symm ▸ h have hsr_le_pr : s + r ≤ p + r := add_le_add (adeleFilt_mono k K hle) le_rfl - have hpr_le_sr : p + r ≤ s + r := by - intro x hx - rcases Submodule.mem_sup.mp hx with ⟨a, hap, y, hyr, rfl⟩ - rcases Submodule.mem_sup.mp (hp_le_sr hap) with ⟨b, hbs, w, hwr, hbc⟩ - refine Submodule.mem_sup.mpr - ⟨b, hbs, w + y, Submodule.add_mem r hwr hyr, by rw [← hbc, add_assoc]⟩ + have hpr_le_sr : p + r ≤ s + r := + sup_le hp_le_sr le_sup_right exact le_antisymm hpr_le_sr hsr_le_pr end FunctionField.Chart diff --git a/LeanPool/RiemannRochFunctionFields/Basic.lean b/LeanPool/RiemannRochFunctionFields/Basic.lean index 9287ece8b2..fc6607dc55 100644 --- a/LeanPool/RiemannRochFunctionFields/Basic.lean +++ b/LeanPool/RiemannRochFunctionFields/Basic.lean @@ -6,8 +6,7 @@ Authors: Guanghao Li module public import LeanPool.RiemannRochFunctionFields.FunctionField.Divisor -public import Mathlib.FieldTheory.AlgebraicClosure -public import Mathlib.FieldTheory.RatFunc.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Basic divisor API aliases diff --git a/LeanPool/RiemannRochFunctionFields/CoordinateFree/AdeleSpace.lean b/LeanPool/RiemannRochFunctionFields/CoordinateFree/AdeleSpace.lean index 42472f56cb..e8550a2e17 100644 --- a/LeanPool/RiemannRochFunctionFields/CoordinateFree/AdeleSpace.lean +++ b/LeanPool/RiemannRochFunctionFields/CoordinateFree/AdeleSpace.lean @@ -7,6 +7,7 @@ module public import LeanPool.RiemannRochFunctionFields.AdeleSpace.Basic public import LeanPool.RiemannRochFunctionFields.CoordinateFree.Divisor +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Adeles indexed by intrinsic places diff --git a/LeanPool/RiemannRochFunctionFields/CoordinateFree/Divisor.lean b/LeanPool/RiemannRochFunctionFields/CoordinateFree/Divisor.lean index 31fc46c9cb..f38e446278 100644 --- a/LeanPool/RiemannRochFunctionFields/CoordinateFree/Divisor.lean +++ b/LeanPool/RiemannRochFunctionFields/CoordinateFree/Divisor.lean @@ -7,6 +7,8 @@ module public import LeanPool.RiemannRochFunctionFields.LocalResidue public import LeanPool.RiemannRochFunctionFields.PlaceEquiv +public import LeanPool.RiemannRochFunctionFields.FunctionField.Divisor +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Coordinate-free divisors and degree diff --git a/LeanPool/RiemannRochFunctionFields/CoordinateFree/EllipticCurve.lean b/LeanPool/RiemannRochFunctionFields/CoordinateFree/EllipticCurve.lean index a08250fdea..4215b84fb7 100644 --- a/LeanPool/RiemannRochFunctionFields/CoordinateFree/EllipticCurve.lean +++ b/LeanPool/RiemannRochFunctionFields/CoordinateFree/EllipticCurve.lean @@ -7,6 +7,9 @@ module public import LeanPool.RiemannRochFunctionFields.CoordinateFree.RiemannRoch public import LeanPool.RiemannRochFunctionFields.EllipticCurve.PicTorsorCore +import LeanPool.RiemannRochFunctionFields.EllipticCurve.DegreeOneDictionary +import LeanPool.RiemannRochFunctionFields.EllipticCurve.GenusOne +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Coordinate-free elliptic-curve dictionary diff --git a/LeanPool/RiemannRochFunctionFields/CoordinateFree/RiemannRoch.lean b/LeanPool/RiemannRochFunctionFields/CoordinateFree/RiemannRoch.lean index 670fb2e79f..21596ddb39 100644 --- a/LeanPool/RiemannRochFunctionFields/CoordinateFree/RiemannRoch.lean +++ b/LeanPool/RiemannRochFunctionFields/CoordinateFree/RiemannRoch.lean @@ -6,7 +6,10 @@ Authors: Guanghao Li module public import LeanPool.RiemannRochFunctionFields.CoordinateFree.WeilDifferential -public import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Corollaries +import LeanPool.RiemannRochFunctionFields.Genus.AdeleQuotient +import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Basic +import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Corollaries +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Coordinate-free Riemann–Roch diff --git a/LeanPool/RiemannRochFunctionFields/CoordinateFree/WeilDifferential.lean b/LeanPool/RiemannRochFunctionFields/CoordinateFree/WeilDifferential.lean index 8092ba43da..82540a18d7 100644 --- a/LeanPool/RiemannRochFunctionFields/CoordinateFree/WeilDifferential.lean +++ b/LeanPool/RiemannRochFunctionFields/CoordinateFree/WeilDifferential.lean @@ -7,6 +7,7 @@ module public import LeanPool.RiemannRochFunctionFields.CoordinateFree.AdeleSpace public import LeanPool.RiemannRochFunctionFields.WeilDifferential.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Weil differentials over intrinsic places diff --git a/LeanPool/RiemannRochFunctionFields/Divisor.lean b/LeanPool/RiemannRochFunctionFields/Divisor.lean index 68df93b425..f903be14a3 100644 --- a/LeanPool/RiemannRochFunctionFields/Divisor.lean +++ b/LeanPool/RiemannRochFunctionFields/Divisor.lean @@ -5,7 +5,6 @@ Authors: Guanghao Li -/ module -public import Mathlib.Data.Finsupp.Multiset public import Mathlib.RingTheory.DedekindDomain.Factorization /-! diff --git a/LeanPool/RiemannRochFunctionFields/EllipticCurve/ConcreteRegression.lean b/LeanPool/RiemannRochFunctionFields/EllipticCurve/ConcreteRegression.lean index 113a7623fa..849fcbd902 100644 --- a/LeanPool/RiemannRochFunctionFields/EllipticCurve/ConcreteRegression.lean +++ b/LeanPool/RiemannRochFunctionFields/EllipticCurve/ConcreteRegression.lean @@ -5,9 +5,13 @@ Authors: Guanghao Li -/ module -public import LeanPool.RiemannRochFunctionFields.CoordinateFree.EllipticCurve public import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure +public import LeanPool.RiemannRochFunctionFields.CoordinateFree.EllipticCurve + +public import LeanPool.RiemannRochFunctionFields.EllipticCurve.Instances +import Mathlib.Analysis.SpecialFunctions.Pow.Real + /-! # Concrete regression for the elliptic-curve development diff --git a/LeanPool/RiemannRochFunctionFields/EllipticCurve/Dedekind.lean b/LeanPool/RiemannRochFunctionFields/EllipticCurve/Dedekind.lean index 423554e0e7..04ad2335f7 100644 --- a/LeanPool/RiemannRochFunctionFields/EllipticCurve/Dedekind.lean +++ b/LeanPool/RiemannRochFunctionFields/EllipticCurve/Dedekind.lean @@ -5,10 +5,12 @@ Authors: Guanghao Li -/ module -public import LeanPool.RiemannRochFunctionFields.EllipticCurve.Instances -public import Mathlib.RingTheory.Unramified.Dedekind -public import Mathlib.RingTheory.Unramified.LocalRing -public import Mathlib.RingTheory.Etale.StandardEtale +public import Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Point +public import Mathlib.RingTheory.DiscreteValuationRing.Basic +public import Mathlib.RingTheory.Unramified.Locus +import LeanPool.RiemannRochFunctionFields.EllipticCurve.Instances +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.RingTheory.Etale.StandardEtale /-! # The affine coordinate ring of an elliptic curve is Dedekind diff --git a/LeanPool/RiemannRochFunctionFields/EllipticCurve/DegreeOneDictionary.lean b/LeanPool/RiemannRochFunctionFields/EllipticCurve/DegreeOneDictionary.lean index ace4b6f117..4e4d7900ad 100644 --- a/LeanPool/RiemannRochFunctionFields/EllipticCurve/DegreeOneDictionary.lean +++ b/LeanPool/RiemannRochFunctionFields/EllipticCurve/DegreeOneDictionary.lean @@ -6,8 +6,8 @@ Authors: Guanghao Li module public import LeanPool.RiemannRochFunctionFields.EllipticCurve.PlaceDictionary -import Mathlib.Tactic.Convert -import Mathlib.Tactic.ByContra +import LeanPool.RiemannRochFunctionFields.EllipticCurve.Dedekind +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Degree-one places are rational Weierstrass points diff --git a/LeanPool/RiemannRochFunctionFields/EllipticCurve/GenusCounting.lean b/LeanPool/RiemannRochFunctionFields/EllipticCurve/GenusCounting.lean index 28674fc47b..eacf67d56a 100644 --- a/LeanPool/RiemannRochFunctionFields/EllipticCurve/GenusCounting.lean +++ b/LeanPool/RiemannRochFunctionFields/EllipticCurve/GenusCounting.lean @@ -5,14 +5,13 @@ Authors: Guanghao Li -/ module -public import LeanPool.RiemannRochFunctionFields.EllipticCurve.PlaceDictionary -public import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Corollaries -public import Mathlib.RingTheory.Valuation.IsTrivialOn -import Mathlib.Tactic.Ring -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.Convert -import Mathlib.Tactic.ByContra +public import LeanPool.RiemannRochFunctionFields.EllipticCurve.Infinity +public import LeanPool.RiemannRochFunctionFields.WeilDifferential.Basic +import LeanPool.RiemannRochFunctionFields.EllipticCurve.Dedekind +import LeanPool.RiemannRochFunctionFields.EllipticCurve.PlaceDictionary +import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Corollaries +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.RingTheory.Valuation.IsTrivialOn /-! # Genus counting for Weierstrass function fields diff --git a/LeanPool/RiemannRochFunctionFields/EllipticCurve/GenusOne.lean b/LeanPool/RiemannRochFunctionFields/EllipticCurve/GenusOne.lean index c4365b9a9f..78ec1d4796 100644 --- a/LeanPool/RiemannRochFunctionFields/EllipticCurve/GenusOne.lean +++ b/LeanPool/RiemannRochFunctionFields/EllipticCurve/GenusOne.lean @@ -5,7 +5,10 @@ Authors: Guanghao Li -/ module -public import LeanPool.RiemannRochFunctionFields.EllipticCurve.GenusCounting +public import LeanPool.RiemannRochFunctionFields.WeilDifferential.Basic +public import Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Point +import LeanPool.RiemannRochFunctionFields.EllipticCurve.GenusCounting +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Genus one for elliptic function fields diff --git a/LeanPool/RiemannRochFunctionFields/EllipticCurve/Infinity.lean b/LeanPool/RiemannRochFunctionFields/EllipticCurve/Infinity.lean index 11f07dc70e..52446a0e47 100644 --- a/LeanPool/RiemannRochFunctionFields/EllipticCurve/Infinity.lean +++ b/LeanPool/RiemannRochFunctionFields/EllipticCurve/Infinity.lean @@ -6,12 +6,11 @@ Authors: Guanghao Li module public import LeanPool.RiemannRochFunctionFields.Genus.Ramification -public import LeanPool.RiemannRochFunctionFields.EllipticCurve.Dedekind -import Mathlib.Tactic.Ring -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Convert -import Mathlib.Tactic.ByContra import Mathlib.Algebra.Polynomial.Degree.IsMonicOfDegree +public import LeanPool.RiemannRochFunctionFields.EllipticCurve.Instances +import LeanPool.RiemannRochFunctionFields.EllipticCurve.Dedekind +import LeanPool.RiemannRochFunctionFields.FundamentalIdentity +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # The unique place at infinity of a Weierstrass function field diff --git a/LeanPool/RiemannRochFunctionFields/EllipticCurve/Instances.lean b/LeanPool/RiemannRochFunctionFields/EllipticCurve/Instances.lean index b7af98cac6..2d3dc600aa 100644 --- a/LeanPool/RiemannRochFunctionFields/EllipticCurve/Instances.lean +++ b/LeanPool/RiemannRochFunctionFields/EllipticCurve/Instances.lean @@ -6,10 +6,8 @@ Authors: Guanghao Li module public import Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Point -public import Mathlib.FieldTheory.SeparableDegree -public import Mathlib.FieldTheory.IsAlgClosed.Basic -public import Mathlib.NumberTheory.FunctionField public import LeanPool.RiemannRochFunctionFields.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Instance pack for elliptic function fields diff --git a/LeanPool/RiemannRochFunctionFields/EllipticCurve/PicTorsorCore.lean b/LeanPool/RiemannRochFunctionFields/EllipticCurve/PicTorsorCore.lean index 5d46395214..88a4cea5f0 100644 --- a/LeanPool/RiemannRochFunctionFields/EllipticCurve/PicTorsorCore.lean +++ b/LeanPool/RiemannRochFunctionFields/EllipticCurve/PicTorsorCore.lean @@ -5,15 +5,14 @@ Authors: Guanghao Li -/ module -public import LeanPool.RiemannRochFunctionFields.EllipticCurve.GenusOne -public import LeanPool.RiemannRochFunctionFields.EllipticCurve.DegreeOneDictionary -public import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Corollaries -import Mathlib.Tactic.Ring -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Group -import Mathlib.Tactic.Convert -import Mathlib.Tactic.ByContra +public import LeanPool.RiemannRochFunctionFields.EllipticCurve.PlaceDictionary +public import LeanPool.RiemannRochFunctionFields.WeilDifferential.Basic +import LeanPool.RiemannRochFunctionFields.EllipticCurve.Dedekind +import LeanPool.RiemannRochFunctionFields.EllipticCurve.DegreeOneDictionary +import LeanPool.RiemannRochFunctionFields.EllipticCurve.GenusOne +import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Basic +import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Corollaries +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Core construction of the degree-one Picard torsor diff --git a/LeanPool/RiemannRochFunctionFields/EllipticCurve/PlaceDictionary.lean b/LeanPool/RiemannRochFunctionFields/EllipticCurve/PlaceDictionary.lean index a99db450dc..3011c4fd36 100644 --- a/LeanPool/RiemannRochFunctionFields/EllipticCurve/PlaceDictionary.lean +++ b/LeanPool/RiemannRochFunctionFields/EllipticCurve/PlaceDictionary.lean @@ -6,8 +6,8 @@ Authors: Guanghao Li module public import LeanPool.RiemannRochFunctionFields.EllipticCurve.Infinity -public import Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Point -public import Mathlib.FieldTheory.IsAlgClosed.Basic +public import LeanPool.RiemannRochFunctionFields.EllipticCurve.Dedekind +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Place–point dictionary for Weierstrass function fields diff --git a/LeanPool/RiemannRochFunctionFields/FunctionField/Divisor.lean b/LeanPool/RiemannRochFunctionFields/FunctionField/Divisor.lean index e441bb8f9b..02e2cd2f41 100644 --- a/LeanPool/RiemannRochFunctionFields/FunctionField/Divisor.lean +++ b/LeanPool/RiemannRochFunctionFields/FunctionField/Divisor.lean @@ -6,9 +6,10 @@ Authors: Guanghao Li module public import LeanPool.RiemannRochFunctionFields.Place -public import LeanPool.RiemannRochFunctionFields.SeparableRelNorm -public import Mathlib.Data.Finsupp.Order -public import Mathlib.RingTheory.Valuation.Discrete.IsDiscreteValuationRing +public import Mathlib.RingTheory.Ideal.Norm.RelNorm +import LeanPool.RiemannRochFunctionFields.SeparableRelNorm +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.RingTheory.Valuation.Discrete.IsDiscreteValuationRing /-! # Divisor degree and order on a function field @@ -55,8 +56,12 @@ noncomputable def placeDegree (v : PlaceA k K) : ℕ := theorem placeDegree_pos (v : PlaceA k K) : 0 < placeDegree k K v := by rcases v with v | v · change 0 < Module.finrank k (ringOfIntegers k K ⧸ v.asIdeal) + let : Module.IsTorsionFree k (ringOfIntegers k K ⧸ v.asIdeal) := + DivisionSemiring.to_moduleIsTorsionFree exact Module.finrank_pos · change 0 < Module.finrank k (infiniteIntegers k K ⧸ v.asIdeal) + let : Module.IsTorsionFree k (infiniteIntegers k K ⧸ v.asIdeal) := + DivisionSemiring.to_moduleIsTorsionFree exact Module.finrank_pos omit [IsScalarTower k[X] k⟮X⟯ K] in diff --git a/LeanPool/RiemannRochFunctionFields/FundamentalIdentity.lean b/LeanPool/RiemannRochFunctionFields/FundamentalIdentity.lean index 87d411617d..cd7906f629 100644 --- a/LeanPool/RiemannRochFunctionFields/FundamentalIdentity.lean +++ b/LeanPool/RiemannRochFunctionFields/FundamentalIdentity.lean @@ -5,9 +5,9 @@ Authors: Guanghao Li -/ module -public import Mathlib.RingTheory.RamificationInertia.Basic -public import Mathlib.RingTheory.DedekindDomain.Ideal.Lemmas -public import Mathlib.LinearAlgebra.Dimension.Localization +public import Mathlib.NumberTheory.RamificationInertia.Inertia +public import Mathlib.NumberTheory.RamificationInertia.Ramification +import Mathlib.RingTheory.RamificationInertia.Basic /-! # The fundamental identity in the quotient-based formulation diff --git a/LeanPool/RiemannRochFunctionFields/Genus.lean b/LeanPool/RiemannRochFunctionFields/Genus.lean index 21c4fbac90..6f8040e588 100644 --- a/LeanPool/RiemannRochFunctionFields/Genus.lean +++ b/LeanPool/RiemannRochFunctionFields/Genus.lean @@ -9,3 +9,4 @@ public import LeanPool.RiemannRochFunctionFields.Genus.AdeleQuotient public import LeanPool.RiemannRochFunctionFields.Genus.Basic public import LeanPool.RiemannRochFunctionFields.Genus.Polar public import LeanPool.RiemannRochFunctionFields.Genus.Ramification +import Mathlib.Analysis.SpecialFunctions.Pow.Real diff --git a/LeanPool/RiemannRochFunctionFields/Genus/AdeleQuotient.lean b/LeanPool/RiemannRochFunctionFields/Genus/AdeleQuotient.lean index 50dce27bf5..e8588d9261 100644 --- a/LeanPool/RiemannRochFunctionFields/Genus/AdeleQuotient.lean +++ b/LeanPool/RiemannRochFunctionFields/Genus/AdeleQuotient.lean @@ -5,13 +5,9 @@ Authors: Guanghao Li -/ module -public import LeanPool.RiemannRochFunctionFields.AdeleSpace.FilterChain public import LeanPool.RiemannRochFunctionFields.Genus.Basic -public import Mathlib.Algebra.Order.GroupWithZero.Canonical -public import Mathlib.LinearAlgebra.FiniteDimensional.Basic -public import Mathlib.Algebra.Module.Submodule.Lattice -public import Mathlib.LinearAlgebra.Quotient.Basic -public import Mathlib.RingTheory.Valuation.ValuationSubring +import LeanPool.RiemannRochFunctionFields.AdeleSpace.FilterChain +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Adele quotient rank and the index of specialty diff --git a/LeanPool/RiemannRochFunctionFields/Genus/Basic.lean b/LeanPool/RiemannRochFunctionFields/Genus/Basic.lean index 723f669201..758ea13acf 100644 --- a/LeanPool/RiemannRochFunctionFields/Genus/Basic.lean +++ b/LeanPool/RiemannRochFunctionFields/Genus/Basic.lean @@ -7,10 +7,9 @@ module public import LeanPool.RiemannRochFunctionFields.AdeleSpace.Basic public import LeanPool.RiemannRochFunctionFields.Genus.Polar -public import LeanPool.RiemannRochFunctionFields.Genus.Ramification -public import Mathlib.Data.Int.LeastGreatest -public import Mathlib.FieldTheory.RatFunc.Basic -public import Mathlib.LinearAlgebra.Basis.Basic +public import Mathlib.Algebra.Algebra.IsSimpleRing +import LeanPool.RiemannRochFunctionFields.Genus.Ramification +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Genus, Riemann inequality, and the index of specialty diff --git a/LeanPool/RiemannRochFunctionFields/Genus/Polar.lean b/LeanPool/RiemannRochFunctionFields/Genus/Polar.lean index cb2421445b..2226d1b19f 100644 --- a/LeanPool/RiemannRochFunctionFields/Genus/Polar.lean +++ b/LeanPool/RiemannRochFunctionFields/Genus/Polar.lean @@ -6,17 +6,7 @@ Authors: Guanghao Li module public import LeanPool.RiemannRochFunctionFields.RRspace.Basic -public import Mathlib.FieldTheory.IntermediateField.Adjoin.Basic -public import Mathlib.FieldTheory.RatFunc.Basic -public import Mathlib.RingTheory.Algebraic.Basic -public import Mathlib.LinearAlgebra.Basis.Basic -public import Mathlib.LinearAlgebra.Dimension.Constructions -public import Mathlib.Algebra.Polynomial.AlgebraMap -public import Mathlib.Algebra.Polynomial.Degree.Operations -public import Mathlib.Algebra.Polynomial.Degree.Support -public import Mathlib.FieldTheory.RatFunc.AsPolynomial -public import Mathlib.RingTheory.Adjoin.Polynomial.Bivariate -public import Mathlib.RingTheory.Localization.Integral +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Pole divisors and Stichtenoth 1.4.11 diff --git a/LeanPool/RiemannRochFunctionFields/Genus/Ramification.lean b/LeanPool/RiemannRochFunctionFields/Genus/Ramification.lean index 3b33b385eb..120af496d8 100644 --- a/LeanPool/RiemannRochFunctionFields/Genus/Ramification.lean +++ b/LeanPool/RiemannRochFunctionFields/Genus/Ramification.lean @@ -6,11 +6,8 @@ Authors: Guanghao Li module public import LeanPool.RiemannRochFunctionFields.Genus.Polar -public import LeanPool.RiemannRochFunctionFields.FundamentalIdentity -public import Mathlib.RingTheory.DedekindDomain.Ideal.Lemmas -public import Mathlib.RingTheory.Valuation.Discrete.Basic -public import Mathlib.RingTheory.IntegralClosure.Algebra.Basic -public import Mathlib.Algebra.Group.TypeTags.Basic +import LeanPool.RiemannRochFunctionFields.FundamentalIdentity +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Ramification half of Stichtenoth 1.4.11 diff --git a/LeanPool/RiemannRochFunctionFields/LinearKneser.lean b/LeanPool/RiemannRochFunctionFields/LinearKneser.lean index 24d1eb1e85..6e655e7acf 100644 --- a/LeanPool/RiemannRochFunctionFields/LinearKneser.lean +++ b/LeanPool/RiemannRochFunctionFields/LinearKneser.lean @@ -6,10 +6,7 @@ Authors: Guanghao Li module public import LeanPool.RiemannRochFunctionFields.Basic -public import Mathlib.Algebra.Algebra.Operations -public import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas -public import Mathlib.RingTheory.Finiteness.Subalgebra -public import Mathlib.RingTheory.IntegralClosure.Algebra.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # A linear Cauchy–Davenport bound over a full constant field diff --git a/LeanPool/RiemannRochFunctionFields/LocalResidue.lean b/LeanPool/RiemannRochFunctionFields/LocalResidue.lean index 35cffa8b2b..4a49aa534a 100644 --- a/LeanPool/RiemannRochFunctionFields/LocalResidue.lean +++ b/LeanPool/RiemannRochFunctionFields/LocalResidue.lean @@ -5,10 +5,9 @@ Authors: Guanghao Li -/ module -public import LeanPool.RiemannRochFunctionFields.Basic public import Mathlib.RingTheory.DedekindDomain.AdicValuation -public import Mathlib.RingTheory.LocalRing.ResidueField.Ideal -public import Mathlib.RingTheory.Localization.Basic +public import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! Local residue maps for height-one primes of Dedekind domains. -/ diff --git a/LeanPool/RiemannRochFunctionFields/Place.lean b/LeanPool/RiemannRochFunctionFields/Place.lean index 2600e250db..d674abc203 100644 --- a/LeanPool/RiemannRochFunctionFields/Place.lean +++ b/LeanPool/RiemannRochFunctionFields/Place.lean @@ -7,14 +7,12 @@ module public import LeanPool.RiemannRochFunctionFields.Divisor public import Mathlib.NumberTheory.FunctionField -public import Mathlib.RingTheory.Jacobson.Ring -public import Mathlib.RingTheory.LocalRing.ResidueField.Basic + public import Mathlib.RingTheory.RamificationInertia.Inertia public import Mathlib.RingTheory.Valuation.AlgebraInstances -public import Mathlib.RingTheory.Valuation.Discrete.Basic -public import Mathlib.RingTheory.Valuation.Discrete.RankOne -public import Mathlib.RingTheory.Valuation.IsTrivialOn -public import Mathlib.GroupTheory.ArchimedeanDensely +public import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.GroupTheory.ArchimedeanDensely /-! # Coordinate places of a function field diff --git a/LeanPool/RiemannRochFunctionFields/PlaceEquiv.lean b/LeanPool/RiemannRochFunctionFields/PlaceEquiv.lean index 9b52babeb9..11d8bb7d15 100644 --- a/LeanPool/RiemannRochFunctionFields/PlaceEquiv.lean +++ b/LeanPool/RiemannRochFunctionFields/PlaceEquiv.lean @@ -5,12 +5,14 @@ Authors: Guanghao Li -/ module +public import Mathlib.RingTheory.Valuation.Discrete.RankOne + public import LeanPool.RiemannRochFunctionFields.Place import Mathlib.NumberTheory.RatFunc.Ostrowski import Mathlib.NumberTheory.RamificationInertia.Valuation -import Mathlib.RingTheory.Valuation.Discrete.RankOne import Mathlib.RingTheory.Valuation.Discrete.IsDiscreteValuationRing import Mathlib.RingTheory.Valuation.LocalSubring +import Mathlib.RingTheory.Valuation.IsTrivialOn /-! # Coordinate-free places and the two-chart presentation diff --git a/LeanPool/RiemannRochFunctionFields/RRspace/Basic.lean b/LeanPool/RiemannRochFunctionFields/RRspace/Basic.lean index 1d1c154cb9..df7e051d48 100644 --- a/LeanPool/RiemannRochFunctionFields/RRspace/Basic.lean +++ b/LeanPool/RiemannRochFunctionFields/RRspace/Basic.lean @@ -7,12 +7,7 @@ module public import LeanPool.RiemannRochFunctionFields.Basic public import LeanPool.RiemannRochFunctionFields.LocalResidue -public import Mathlib.Algebra.Order.GroupWithZero.Canonical -public import Mathlib.Algebra.Polynomial.Eval.Subring -public import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed -public import Mathlib.RingTheory.DedekindDomain.AdicValuation -public import Mathlib.RingTheory.LocalRing.ResidueField.Ideal -public import Mathlib.RingTheory.Polynomial.Tower +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Riemann–Roch spaces `L(D)` @@ -488,27 +483,23 @@ theorem finiteDimensional_add_single_one (D : DivisorA k K) (v : PlaceA k K) let e : (ringOfIntegers k K ⧸ v.asIdeal) ≃ₗ[k] v.asIdeal.ResidueField := finiteResidueFieldEquiv k K v let : FiniteDimensional k v.asIdeal.ResidueField := e.finiteDimensional - let : Module.Finite k f.range := inferInstance - have hqker : Module.Finite k - (RRspace k K (D + Finsupp.single (Sum.inl v) 1) ⧸ f.ker) := - Module.Finite.equiv f.quotKerEquivRange.symm + let : Module.Finite k f.range := + FiniteDimensional.of_injective f.range.subtype f.range.subtype_injective have hqp : Module.Finite k (RRspace k K (D + Finsupp.single (Sum.inl v) 1) ⧸ p) := by - exact Module.Finite.equiv (Submodule.quotEquivOfEq f.ker p - (finiteLocalResidueMap_ker k K D v)) + rw [show p = f.ker from (finiteLocalResidueMap_ker k K D v).symm] + exact Module.Finite.equiv f.quotKerEquivRange.symm exact Module.Finite.of_submodule_quotient p · let f := infiniteLocalResidueMap k K D v let e : (infiniteIntegers k K ⧸ v.asIdeal) ≃ₗ[k] v.asIdeal.ResidueField := infiniteResidueFieldEquiv k K v let : FiniteDimensional k v.asIdeal.ResidueField := e.finiteDimensional - let : Module.Finite k f.range := inferInstance - have hqker : Module.Finite k - (RRspace k K (D + Finsupp.single (Sum.inr v) 1) ⧸ f.ker) := - Module.Finite.equiv f.quotKerEquivRange.symm + let : Module.Finite k f.range := + FiniteDimensional.of_injective f.range.subtype f.range.subtype_injective have hqp : Module.Finite k (RRspace k K (D + Finsupp.single (Sum.inr v) 1) ⧸ p) := by - exact Module.Finite.equiv (Submodule.quotEquivOfEq f.ker p - (infiniteLocalResidueMap_ker k K D v)) + rw [show p = f.ker from (infiniteLocalResidueMap_ker k K D v).symm] + exact Module.Finite.equiv f.quotKerEquivRange.symm exact Module.Finite.of_submodule_quotient p theorem finiteDimensional_add_single_nat (D : DivisorA k K) (v : PlaceA k K) @@ -561,10 +552,7 @@ theorem finrankRRspaceDiff_single_nat_le (D : DivisorA k K) (v : PlaceA k K) ext f simp rw [hp] - have h := Submodule.finrank_quotient_add_finrank - (⊤ : Submodule k (RRspace k K D)) - simp only [finrank_top] at h - omega + exact le_of_eq Module.finrank_zero_of_subsingleton | succ n ih => let M := D + Finsupp.single v (n : ℤ) let N := M + Finsupp.single v 1 @@ -646,10 +634,7 @@ theorem finrankRRspaceDiff_add_effective_le (D E : DivisorA k K) ext f simp rw [hp, deg_zero] - have h := Submodule.finrank_quotient_add_finrank - (⊤ : Submodule k (RRspace k K D)) - simp only [finrank_top] at h - omega + exact le_of_eq Module.finrank_zero_of_subsingleton | single_add a b f ha hb ih => have hfa : f a = 0 := Finsupp.notMem_support_iff.mp ha have hff : IsEffective k K f := by diff --git a/LeanPool/RiemannRochFunctionFields/RiemannRochTheorem/Basic.lean b/LeanPool/RiemannRochFunctionFields/RiemannRochTheorem/Basic.lean index e2eb5bf1f2..839e242a6d 100644 --- a/LeanPool/RiemannRochFunctionFields/RiemannRochTheorem/Basic.lean +++ b/LeanPool/RiemannRochFunctionFields/RiemannRochTheorem/Basic.lean @@ -5,7 +5,8 @@ Authors: Guanghao Li -/ module -public import LeanPool.RiemannRochFunctionFields.WeilDifferential +public import LeanPool.RiemannRochFunctionFields.WeilDifferential.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # The Riemann–Roch theorem diff --git a/LeanPool/RiemannRochFunctionFields/RiemannRochTheorem/Corollaries.lean b/LeanPool/RiemannRochFunctionFields/RiemannRochTheorem/Corollaries.lean index 181d8b79d0..842869dd89 100644 --- a/LeanPool/RiemannRochFunctionFields/RiemannRochTheorem/Corollaries.lean +++ b/LeanPool/RiemannRochFunctionFields/RiemannRochTheorem/Corollaries.lean @@ -5,10 +5,12 @@ Authors: Guanghao Li -/ module -public import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Basic -public import LeanPool.RiemannRochFunctionFields.LinearKneser import Mathlib.Algebra.Module.Submodule.Union +public import LeanPool.RiemannRochFunctionFields.WeilDifferential.Basic +import LeanPool.RiemannRochFunctionFields.LinearKneser +import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Corollaries of Riemann–Roch diff --git a/LeanPool/RiemannRochFunctionFields/RiemannRochTheorem/Regression.lean b/LeanPool/RiemannRochFunctionFields/RiemannRochTheorem/Regression.lean index 098d4b9640..598f0feea3 100644 --- a/LeanPool/RiemannRochFunctionFields/RiemannRochTheorem/Regression.lean +++ b/LeanPool/RiemannRochFunctionFields/RiemannRochTheorem/Regression.lean @@ -5,7 +5,9 @@ Authors: Guanghao Li -/ module -public import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Corollaries +public import LeanPool.RiemannRochFunctionFields.WeilDifferential.Basic +import LeanPool.RiemannRochFunctionFields.RiemannRochTheorem.Corollaries +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Regression theorems via Riemann–Roch diff --git a/LeanPool/RiemannRochFunctionFields/SeparableRelNorm.lean b/LeanPool/RiemannRochFunctionFields/SeparableRelNorm.lean index d829a57813..3f582292f0 100644 --- a/LeanPool/RiemannRochFunctionFields/SeparableRelNorm.lean +++ b/LeanPool/RiemannRochFunctionFields/SeparableRelNorm.lean @@ -6,7 +6,6 @@ Authors: Guanghao Li module public import Mathlib.RingTheory.Ideal.Norm.RelNorm -public import Mathlib.FieldTheory.SeparableClosure /-! # Relative norms in finite separable extensions diff --git a/LeanPool/RiemannRochFunctionFields/WeilDifferential.lean b/LeanPool/RiemannRochFunctionFields/WeilDifferential.lean index 95b35b77f6..44c17d6ca3 100644 --- a/LeanPool/RiemannRochFunctionFields/WeilDifferential.lean +++ b/LeanPool/RiemannRochFunctionFields/WeilDifferential.lean @@ -6,3 +6,4 @@ Authors: Guanghao Li module public import LeanPool.RiemannRochFunctionFields.WeilDifferential.Basic +import Mathlib.Analysis.SpecialFunctions.Pow.Real diff --git a/LeanPool/RiemannRochFunctionFields/WeilDifferential/Basic.lean b/LeanPool/RiemannRochFunctionFields/WeilDifferential/Basic.lean index 04e431a7cb..65cad40d64 100644 --- a/LeanPool/RiemannRochFunctionFields/WeilDifferential/Basic.lean +++ b/LeanPool/RiemannRochFunctionFields/WeilDifferential/Basic.lean @@ -6,8 +6,9 @@ Authors: Guanghao Li module public import LeanPool.RiemannRochFunctionFields.Genus.Basic -public import LeanPool.RiemannRochFunctionFields.Genus.AdeleQuotient -public import Mathlib.LinearAlgebra.Dual.Lemmas +public import LeanPool.RiemannRochFunctionFields.AdeleSpace.FilterChain +import LeanPool.RiemannRochFunctionFields.Genus.AdeleQuotient +import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Weil differentials and the duality theorem @@ -66,13 +67,10 @@ theorem finite_adeleFilt_sub_quotient {D D' : DivisorA k K} (hle : D ≤ D') : have : Module.Finite k ((adeleFilt k K D') ⧸ Submodule.comap (adeleFilt k K D').subtype (adeleFilt k K D)) := finiteAdeleFiltDiff_quotient_add_eq k K (M := D) hdiv.symm hE - exact Module.Finite.equiv (Submodule.quotientQuotientEquivQuotient - (Submodule.comap (adeleFilt k K D').subtype (adeleFilt k K D)) - (Submodule.comap (adeleFilt k K D').subtype - (adeleFilt k K D + diagonalSubmodule k K)) - (Submodule.comap_mono (by - rw [Submodule.add_eq_sup] - exact le_sup_left))) + exact Module.Finite.of_surjective + (Submodule.factor (Submodule.comap_mono + (le_sup_left : adeleFilt k K D ≤ adeleFilt k K D + diagonalSubmodule k K))) + (Submodule.factor_surjective _) /-- The adele class space `𝒜_K ⧸ (A(D) + diag(K))` is finite-dimensional over `k`. -/ instance finiteDimensional_adeleQuotient (D : DivisorA k K) : @@ -549,9 +547,8 @@ theorem finrank_weilDifferential_eq_one : have hn_g : (n : ℤ) > 3 * (genus k K : ℤ) - 3 - deg k K D₀ := by have hle : 3 * (genus k K : ℤ) - 3 - deg k K D₀ ≤ M := le_max_right _ _ omega - have hnb_ge : (n : ℤ) * deg k K B ≥ (n : ℤ) := by - have hn0 : (0 : ℤ) ≤ (n : ℤ) := Int.natCast_nonneg n - nlinarith [hb1, hn0] + have hnb_ge : (n : ℤ) * deg k K B ≥ (n : ℤ) := + le_mul_of_one_le_right (Int.natCast_nonneg n) hb1 have hdegsub : deg k K (D₀ - n • B) = deg k K D₀ - (n : ℤ) * deg k K B := by rw [deg_sub, deg_nsmul] have hdeg_neg : deg k K (D₀ - n • B) < 0 := by diff --git a/LeanPool/RlTheoryInLean.lean b/LeanPool/RlTheoryInLean.lean index 78f5cf4f5a..612428bb00 100644 --- a/LeanPool/RlTheoryInLean.lean +++ b/LeanPool/RlTheoryInLean.lean @@ -3,14 +3,16 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.Analysis -import LeanPool.RlTheoryInLean.Data -import LeanPool.RlTheoryInLean.Defs -import LeanPool.RlTheoryInLean.MeasureTheory -import LeanPool.RlTheoryInLean.Order -import LeanPool.RlTheoryInLean.Probability -import LeanPool.RlTheoryInLean.StochasticApproximation +public import LeanPool.RlTheoryInLean.Analysis +public import LeanPool.RlTheoryInLean.Data +public import LeanPool.RlTheoryInLean.Defs +public import LeanPool.RlTheoryInLean.MeasureTheory +public import LeanPool.RlTheoryInLean.Order +public import LeanPool.RlTheoryInLean.Probability +public import LeanPool.RlTheoryInLean.StochasticApproximation +import Mathlib.Tactic.Positivity.Finset /-! # RL Theory in Lean @@ -23,6 +25,8 @@ Tags: probability, reinforcement-learning, stochastic-matrices MSC: 62L20, 60J10 -/ +@[expose] public section + /-! ## Provenance diff --git a/LeanPool/RlTheoryInLean/Analysis.lean b/LeanPool/RlTheoryInLean/Analysis.lean index 0b68ee93c2..c261cf00d3 100644 --- a/LeanPool/RlTheoryInLean/Analysis.lean +++ b/LeanPool/RlTheoryInLean/Analysis.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.Analysis.Normed +public import LeanPool.RlTheoryInLean.Analysis.Normed +import Mathlib.Analysis.Normed.Group.Basic /-! # Analysis Import-only index for the `Analysis` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/Analysis/Normed.lean b/LeanPool/RlTheoryInLean/Analysis/Normed.lean index a0de7bcc32..3b15619fe5 100644 --- a/LeanPool/RlTheoryInLean/Analysis/Normed.lean +++ b/LeanPool/RlTheoryInLean/Analysis/Normed.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.Analysis.Normed.Group +public import LeanPool.RlTheoryInLean.Analysis.Normed.Group +import Mathlib.Analysis.Normed.Group.Basic /-! # Normed Import-only index for the `Normed` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/Analysis/Normed/Group.lean b/LeanPool/RlTheoryInLean/Analysis/Normed/Group.lean index e7ca353a18..31ec229ace 100644 --- a/LeanPool/RlTheoryInLean/Analysis/Normed/Group.lean +++ b/LeanPool/RlTheoryInLean/Analysis/Normed/Group.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.Analysis.Normed.Group.Basic +public import LeanPool.RlTheoryInLean.Analysis.Normed.Group.Basic +import Mathlib.Analysis.Normed.Group.Basic /-! # Group Import-only index for the `Group` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/Analysis/Normed/Group/Basic.lean b/LeanPool/RlTheoryInLean/Analysis/Normed/Group/Basic.lean index 5e634a743a..6483bb4da0 100644 --- a/LeanPool/RlTheoryInLean/Analysis/Normed/Group/Basic.lean +++ b/LeanPool/RlTheoryInLean/Analysis/Normed/Group/Basic.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module + +public import Mathlib.Analysis.Normed.Group.Defs import Mathlib.Analysis.Normed.Group.Basic -import Mathlib.Algebra.Order.Ring.Basic /-! # LeanPool.RlTheoryInLean.Analysis.Normed.Group.Basic -/ +@[expose] public section + variable {E : Type*} [SeminormedAddGroup E] lemma norm_add_sq_le_norm_sq_add_norm_sq (x y : E) : diff --git a/LeanPool/RlTheoryInLean/Data.lean b/LeanPool/RlTheoryInLean/Data.lean index 52231bf570..26bacdb5be 100644 --- a/LeanPool/RlTheoryInLean/Data.lean +++ b/LeanPool/RlTheoryInLean/Data.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.Data.Matrix +public import LeanPool.RlTheoryInLean.Data.Matrix +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Data Import-only index for the `Data` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/Data/Matrix.lean b/LeanPool/RlTheoryInLean/Data/Matrix.lean index 065d1aabfa..44a522adce 100644 --- a/LeanPool/RlTheoryInLean/Data/Matrix.lean +++ b/LeanPool/RlTheoryInLean/Data/Matrix.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.Data.Matrix.Mul -import LeanPool.RlTheoryInLean.Data.Matrix.PosDef -import LeanPool.RlTheoryInLean.Data.Matrix.Stochastic +public import LeanPool.RlTheoryInLean.Data.Matrix.Mul +public import LeanPool.RlTheoryInLean.Data.Matrix.PosDef +public import LeanPool.RlTheoryInLean.Data.Matrix.Stochastic +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Matrix Import-only index for the `Matrix` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/Data/Matrix/Mul.lean b/LeanPool/RlTheoryInLean/Data/Matrix/Mul.lean index c8c3f8b084..85585a7b70 100644 --- a/LeanPool/RlTheoryInLean/Data/Matrix/Mul.lean +++ b/LeanPool/RlTheoryInLean/Data/Matrix/Mul.lean @@ -3,16 +3,19 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.Data.Matrix.Mul -import Mathlib.Tactic.Linarith.Frontend -import Mathlib.Tactic.Ring.RingNF +module + +public import Mathlib.Data.Matrix.Mul -import Mathlib.Basic.Real.Basic +public import Mathlib.Basic.Real.Basic +import Mathlib.Tactic.Ring.RingNF /-! # LeanPool.RlTheoryInLean.Data.Matrix.Mul -/ +@[expose] public section + open Finset Real namespace Matrix diff --git a/LeanPool/RlTheoryInLean/Data/Matrix/PosDef.lean b/LeanPool/RlTheoryInLean/Data/Matrix/PosDef.lean index 4552e22a62..5bf709bc34 100644 --- a/LeanPool/RlTheoryInLean/Data/Matrix/PosDef.lean +++ b/LeanPool/RlTheoryInLean/Data/Matrix/PosDef.lean @@ -3,21 +3,20 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Analysis.InnerProductSpace.Defs -import Mathlib.LinearAlgebra.Matrix.PosDef -import Mathlib.Analysis.Matrix.PosDef -import Mathlib.Analysis.Matrix.Spectrum -import Mathlib.LinearAlgebra.UnitaryGroup -import Mathlib.Algebra.Order.Star.Real +module + +public import Mathlib.LinearAlgebra.Matrix.PosDef import LeanPool.RlTheoryInLean.Data.Matrix.Mul +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Matrix.PosDef /-! # LeanPool.RlTheoryInLean.Data.Matrix.PosDef -/ +@[expose] public section + open Real Finset Filter TopologicalSpace Preorder Matrix EuclideanSpace open scoped InnerProductSpace RealInnerProductSpace diff --git a/LeanPool/RlTheoryInLean/Data/Matrix/Stochastic.lean b/LeanPool/RlTheoryInLean/Data/Matrix/Stochastic.lean index 7da730c838..1a655a6aa7 100644 --- a/LeanPool/RlTheoryInLean/Data/Matrix/Stochastic.lean +++ b/LeanPool/RlTheoryInLean/Data/Matrix/Stochastic.lean @@ -3,34 +3,21 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.Order.Interval.Finset.Defs -import Mathlib.MeasureTheory.MeasurableSpace.Instances -import Mathlib.MeasureTheory.Function.L1Space.Integrable -import Mathlib.Topology.Instances.Matrix -import Mathlib.Topology.Defs.Basic -import Mathlib.Topology.UniformSpace.Matrix -import Mathlib.Topology.MetricSpace.Contracting -import Mathlib.Data.Matrix.Basic -import Mathlib.Logic.Function.Defs -import Mathlib.Data.Nat.Basic -import Mathlib.Basic.Real.Basic -import Mathlib.Topology.MetricSpace.ProperSpace -import Mathlib.Topology.MetricSpace.Bounded -import Mathlib.Topology.UniformSpace.Cauchy -import Mathlib.Topology.Bornology.Basic -import Mathlib.Topology.Sequences -import Mathlib.Analysis.Normed.Lp.WithLp -import Mathlib.Analysis.Normed.Lp.PiLp -import Mathlib.Analysis.Convex.StdSimplex - -import Mathlib.NumberTheory.FrobeniusNumber -import LeanPool.RlTheoryInLean.Data.Matrix.Mul +module + +public import Mathlib.Topology.MetricSpace.Contracting +public import Mathlib.Analysis.Normed.Lp.PiLp + +public import Mathlib.NumberTheory.FrobeniusNumber +import Mathlib.Analysis.RCLike.Lemmas +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # LeanPool.RlTheoryInLean.Data.Matrix.Stochastic -/ +@[expose] public section + open Finset NNReal WithLp Matrix PiLp Nat ContractingWith Metric Bornology Filter Function open scoped BigOperators open scoped Topology diff --git a/LeanPool/RlTheoryInLean/Defs.lean b/LeanPool/RlTheoryInLean/Defs.lean index 131f0b8208..e3a58b4b27 100644 --- a/LeanPool/RlTheoryInLean/Defs.lean +++ b/LeanPool/RlTheoryInLean/Defs.lean @@ -3,17 +3,19 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.MeasureTheory.MeasurableSpace.Defs -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.MeasureTheory.Measure.MeasureSpaceDef -import Mathlib.Analysis.Calculus.Deriv.Basic -import Mathlib.Probability.Kernel.Defs +module + +public import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.Probability.Kernel.Defs /-! # LeanPool.RlTheoryInLean.Defs -/ +@[expose] public section + open MeasureTheory ProbabilityTheory Filter lemma Tendsto.filter_congr diff --git a/LeanPool/RlTheoryInLean/MeasureTheory.lean b/LeanPool/RlTheoryInLean/MeasureTheory.lean index c518bf16c4..13559e9074 100644 --- a/LeanPool/RlTheoryInLean/MeasureTheory.lean +++ b/LeanPool/RlTheoryInLean/MeasureTheory.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.MeasureTheory.Function -import LeanPool.RlTheoryInLean.MeasureTheory.MeasurableSpace -import LeanPool.RlTheoryInLean.MeasureTheory.Measure +public import LeanPool.RlTheoryInLean.MeasureTheory.Function +public import LeanPool.RlTheoryInLean.MeasureTheory.MeasurableSpace +public import LeanPool.RlTheoryInLean.MeasureTheory.Measure /-! # MeasureTheory Import-only index for the `MeasureTheory` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/MeasureTheory/Function.lean b/LeanPool/RlTheoryInLean/MeasureTheory/Function.lean index d305fb00fa..c1bcc1fe05 100644 --- a/LeanPool/RlTheoryInLean/MeasureTheory/Function.lean +++ b/LeanPool/RlTheoryInLean/MeasureTheory/Function.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.MeasureTheory.Function.ConditionalExpectation -import LeanPool.RlTheoryInLean.MeasureTheory.Function.L1Space +public import LeanPool.RlTheoryInLean.MeasureTheory.Function.ConditionalExpectation +public import LeanPool.RlTheoryInLean.MeasureTheory.Function.L1Space /-! # Function Import-only index for the `Function` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/MeasureTheory/Function/ConditionalExpectation.lean b/LeanPool/RlTheoryInLean/MeasureTheory/Function/ConditionalExpectation.lean index bdad8171d7..dc2fc1d20d 100644 --- a/LeanPool/RlTheoryInLean/MeasureTheory/Function/ConditionalExpectation.lean +++ b/LeanPool/RlTheoryInLean/MeasureTheory/Function/ConditionalExpectation.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.MeasureTheory.Function.ConditionalExpectation.Basic +public import LeanPool.RlTheoryInLean.MeasureTheory.Function.ConditionalExpectation.Basic /-! # ConditionalExpectation Import-only index for the `ConditionalExpectation` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/MeasureTheory/Function/ConditionalExpectation/Basic.lean b/LeanPool/RlTheoryInLean/MeasureTheory/Function/ConditionalExpectation/Basic.lean index 4282655522..0fba7aa55e 100644 --- a/LeanPool/RlTheoryInLean/MeasureTheory/Function/ConditionalExpectation/Basic.lean +++ b/LeanPool/RlTheoryInLean/MeasureTheory/Function/ConditionalExpectation/Basic.lean @@ -3,23 +3,20 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Analysis.InnerProductSpace.Defs -import Mathlib.Analysis.Normed.Lp.MeasurableSpace -import Mathlib.Order.Filter.Basic -import Mathlib.MeasureTheory.Function.ConditionalExpectation.Real -import Mathlib.Probability.Kernel.Condexp -import Mathlib.Analysis.Convex.Integral +module + +public import Mathlib.Analysis.Normed.Lp.MeasurableSpace -import LeanPool.RlTheoryInLean.Defs +public import Mathlib.MeasureTheory.Function.ConditionalExpectation.Basic import LeanPool.RlTheoryInLean.Order.Filter.Basic -import LeanPool.RlTheoryInLean.MeasureTheory.Function.L1Space.Integrable +import Mathlib.Probability.Kernel.Condexp /-! # LeanPool.RlTheoryInLean.MeasureTheory.Function.ConditionalExpectation.Basic -/ +@[expose] public section + open Filter ProbabilityTheory open scoped RealInnerProductSpace diff --git a/LeanPool/RlTheoryInLean/MeasureTheory/Function/L1Space.lean b/LeanPool/RlTheoryInLean/MeasureTheory/Function/L1Space.lean index 70b6d0f2e0..fb032afedc 100644 --- a/LeanPool/RlTheoryInLean/MeasureTheory/Function/L1Space.lean +++ b/LeanPool/RlTheoryInLean/MeasureTheory/Function/L1Space.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.MeasureTheory.Function.L1Space.Integrable +public import LeanPool.RlTheoryInLean.MeasureTheory.Function.L1Space.Integrable /-! # L1Space Import-only index for the `L1Space` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/MeasureTheory/Function/L1Space/Integrable.lean b/LeanPool/RlTheoryInLean/MeasureTheory/Function/L1Space/Integrable.lean index 7953650e89..7c9556253e 100644 --- a/LeanPool/RlTheoryInLean/MeasureTheory/Function/L1Space/Integrable.lean +++ b/LeanPool/RlTheoryInLean/MeasureTheory/Function/L1Space/Integrable.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.MeasureTheory.Function.L1Space.Integrable +module + +public import Mathlib.MeasureTheory.Function.L1Space.Integrable /-! # LeanPool.RlTheoryInLean.MeasureTheory.Function.L1Space.Integrable -/ +@[expose] public section + open Filter namespace MeasureTheory diff --git a/LeanPool/RlTheoryInLean/MeasureTheory/MeasurableSpace.lean b/LeanPool/RlTheoryInLean/MeasureTheory/MeasurableSpace.lean index c3ad2e91a8..866e253dae 100644 --- a/LeanPool/RlTheoryInLean/MeasureTheory/MeasurableSpace.lean +++ b/LeanPool/RlTheoryInLean/MeasureTheory/MeasurableSpace.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.MeasureTheory.MeasurableSpace.Constructions +public import LeanPool.RlTheoryInLean.MeasureTheory.MeasurableSpace.Constructions /-! # MeasurableSpace Import-only index for the `MeasurableSpace` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/MeasureTheory/MeasurableSpace/Constructions.lean b/LeanPool/RlTheoryInLean/MeasureTheory/MeasurableSpace/Constructions.lean index 4218db11c3..56debcb5dd 100644 --- a/LeanPool/RlTheoryInLean/MeasureTheory/MeasurableSpace/Constructions.lean +++ b/LeanPool/RlTheoryInLean/MeasureTheory/MeasurableSpace/Constructions.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.MeasureTheory.MeasurableSpace.Constructions +module + +public import Mathlib.MeasureTheory.MeasurableSpace.Constructions /-! # LeanPool.RlTheoryInLean.MeasureTheory.MeasurableSpace.Constructions -/ +@[expose] public section + lemma Measurable.of_uncurry {α β γ : Type*} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ] {f : α → β → γ} (h : Measurable (Function.uncurry f)) diff --git a/LeanPool/RlTheoryInLean/MeasureTheory/Measure.lean b/LeanPool/RlTheoryInLean/MeasureTheory/Measure.lean index e68dcfffdb..2c3f807ef7 100644 --- a/LeanPool/RlTheoryInLean/MeasureTheory/Measure.lean +++ b/LeanPool/RlTheoryInLean/MeasureTheory/Measure.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.MeasureTheory.Measure.GiryMonad -import LeanPool.RlTheoryInLean.MeasureTheory.Measure.Prod +public import LeanPool.RlTheoryInLean.MeasureTheory.Measure.GiryMonad +public import LeanPool.RlTheoryInLean.MeasureTheory.Measure.Prod +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Measure Import-only index for the `Measure` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/MeasureTheory/Measure/GiryMonad.lean b/LeanPool/RlTheoryInLean/MeasureTheory/Measure/GiryMonad.lean index 8332aa69a4..9c7d71fb7d 100644 --- a/LeanPool/RlTheoryInLean/MeasureTheory/Measure/GiryMonad.lean +++ b/LeanPool/RlTheoryInLean/MeasureTheory/Measure/GiryMonad.lean @@ -3,17 +3,17 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.Order.Interval.Finset.Defs -import Mathlib.MeasureTheory.MeasurableSpace.Instances -import Mathlib.MeasureTheory.Function.L1Space.Integrable -import Mathlib.Probability.Process.Filtration -import Mathlib.Topology.Bornology.Basic +module + +public import Mathlib.MeasureTheory.Measure.GiryMonad +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # LeanPool.RlTheoryInLean.MeasureTheory.Measure.GiryMonad -/ +@[expose] public section + open MeasureTheory MeasureTheory.Measure ProbabilityTheory Finset NNReal ENNReal Preorder Filter namespace MeasureTheory.Measure diff --git a/LeanPool/RlTheoryInLean/MeasureTheory/Measure/Prod.lean b/LeanPool/RlTheoryInLean/MeasureTheory/Measure/Prod.lean index c5260237d2..0f20649a24 100644 --- a/LeanPool/RlTheoryInLean/MeasureTheory/Measure/Prod.lean +++ b/LeanPool/RlTheoryInLean/MeasureTheory/Measure/Prod.lean @@ -3,17 +3,17 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.Order.Interval.Finset.Defs -import Mathlib.MeasureTheory.MeasurableSpace.Instances -import Mathlib.MeasureTheory.Function.L1Space.Integrable -import Mathlib.Probability.Process.Filtration -import Mathlib.Topology.Bornology.Basic +module + +public import Mathlib.MeasureTheory.Measure.Prod +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # LeanPool.RlTheoryInLean.MeasureTheory.Measure.Prod -/ +@[expose] public section + open MeasureTheory MeasureTheory.Measure ProbabilityTheory Finset NNReal ENNReal Preorder Filter namespace MeasureTheory.Measure diff --git a/LeanPool/RlTheoryInLean/Order.lean b/LeanPool/RlTheoryInLean/Order.lean index fa3cf0ac17..b9bf6a58a3 100644 --- a/LeanPool/RlTheoryInLean/Order.lean +++ b/LeanPool/RlTheoryInLean/Order.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.Order.Filter +public import LeanPool.RlTheoryInLean.Order.Filter +import Mathlib.Algebra.Order.AbsoluteValue.Basic +import Mathlib.Algebra.Order.Field.Basic /-! # Order Import-only index for the `Order` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/Order/Filter.lean b/LeanPool/RlTheoryInLean/Order/Filter.lean index b44002825f..2cae6cdbf2 100644 --- a/LeanPool/RlTheoryInLean/Order/Filter.lean +++ b/LeanPool/RlTheoryInLean/Order/Filter.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.Order.Filter.Basic +public import LeanPool.RlTheoryInLean.Order.Filter.Basic +import Mathlib.Algebra.Order.AbsoluteValue.Basic +import Mathlib.Algebra.Order.Field.Basic /-! # Filter Import-only index for the `Filter` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/Order/Filter/Basic.lean b/LeanPool/RlTheoryInLean/Order/Filter/Basic.lean index 9c9e858f4e..20cc00f4c4 100644 --- a/LeanPool/RlTheoryInLean/Order/Filter/Basic.lean +++ b/LeanPool/RlTheoryInLean/Order/Filter/Basic.lean @@ -3,17 +3,23 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.Order.Filter.Basic -import Mathlib.Data.Finset.Basic -import Mathlib.Algebra.BigOperators.Group.Finset.Defs +module + +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Algebra.Group.Pi.Basic +public import Mathlib.Order.Filter.Defs import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Basic.Real.Basic +import Mathlib.Algebra.Order.AbsoluteValue.Basic +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Order.Filter.Basic /-! # LeanPool.RlTheoryInLean.Order.Filter.Basic -/ -open Finset Real Filter +@[expose] public section + +open Finset Filter open scoped BigOperators namespace Filter diff --git a/LeanPool/RlTheoryInLean/Probability.lean b/LeanPool/RlTheoryInLean/Probability.lean index 9bb1f56309..ce01731798 100644 --- a/LeanPool/RlTheoryInLean/Probability.lean +++ b/LeanPool/RlTheoryInLean/Probability.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.Probability.Kernel -import LeanPool.RlTheoryInLean.Probability.MarkovChain +public import LeanPool.RlTheoryInLean.Probability.Kernel +public import LeanPool.RlTheoryInLean.Probability.MarkovChain /-! # Probability Import-only index for the `Probability` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/Probability/Kernel.lean b/LeanPool/RlTheoryInLean/Probability/Kernel.lean index c28c73b098..e88cbedc36 100644 --- a/LeanPool/RlTheoryInLean/Probability/Kernel.lean +++ b/LeanPool/RlTheoryInLean/Probability/Kernel.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.Probability.Kernel.Basic -import LeanPool.RlTheoryInLean.Probability.Kernel.Composition +public import LeanPool.RlTheoryInLean.Probability.Kernel.Basic +public import LeanPool.RlTheoryInLean.Probability.Kernel.Composition +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Kernel Import-only index for the `Kernel` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/Probability/Kernel/Basic.lean b/LeanPool/RlTheoryInLean/Probability/Kernel/Basic.lean index 8e4d51ced2..f23b2cbc13 100644 --- a/LeanPool/RlTheoryInLean/Probability/Kernel/Basic.lean +++ b/LeanPool/RlTheoryInLean/Probability/Kernel/Basic.lean @@ -3,23 +3,18 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.Probability.ConditionalProbability -import Mathlib.Probability.Kernel.Defs -import Mathlib.Probability.Kernel.Basic -import Mathlib.Probability.Kernel.Composition.Comp -import Mathlib.Probability.Kernel.Composition.CompMap -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.Order.Interval.Finset.Defs -import Mathlib.MeasureTheory.MeasurableSpace.Instances -import Mathlib.MeasureTheory.Function.L1Space.Integrable -import Mathlib.Probability.Process.Filtration -import Mathlib.Topology.Bornology.Basic +module + +public import Mathlib.Probability.Kernel.Composition.Comp +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # LeanPool.RlTheoryInLean.Probability.Kernel.Basic -/ -open MeasureTheory MeasureTheory.Measure Filtration ProbabilityTheory.Kernel ProbabilityTheory +@[expose] public section + +open MeasureTheory MeasureTheory.Measure ProbabilityTheory.Kernel ProbabilityTheory open Finset Bornology NNReal ENNReal Preorder Filter namespace ProbabilityTheory.Kernel diff --git a/LeanPool/RlTheoryInLean/Probability/Kernel/Composition.lean b/LeanPool/RlTheoryInLean/Probability/Kernel/Composition.lean index d6f5c9d45d..02183c5d95 100644 --- a/LeanPool/RlTheoryInLean/Probability/Kernel/Composition.lean +++ b/LeanPool/RlTheoryInLean/Probability/Kernel/Composition.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.Probability.Kernel.Composition.MapComap +public import LeanPool.RlTheoryInLean.Probability.Kernel.Composition.MapComap +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # Composition Import-only index for the `Composition` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/Probability/Kernel/Composition/MapComap.lean b/LeanPool/RlTheoryInLean/Probability/Kernel/Composition/MapComap.lean index cd7e505c02..cacea19c5d 100644 --- a/LeanPool/RlTheoryInLean/Probability/Kernel/Composition/MapComap.lean +++ b/LeanPool/RlTheoryInLean/Probability/Kernel/Composition/MapComap.lean @@ -3,27 +3,20 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.Probability.Kernel.Composition.MapComap -import Mathlib.Probability.ConditionalProbability -import Mathlib.Probability.Kernel.Defs -import Mathlib.Probability.Kernel.Basic -import Mathlib.Probability.Kernel.Composition.Comp -import Mathlib.Probability.Kernel.Composition.Prod -import Mathlib.Probability.Kernel.Composition.CompMap -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.Order.Interval.Finset.Defs -import Mathlib.MeasureTheory.MeasurableSpace.Instances -import Mathlib.MeasureTheory.Function.L1Space.Integrable -import Mathlib.Probability.Process.Filtration -import Mathlib.Topology.Bornology.Basic +module + +public import Mathlib.Probability.Kernel.Composition.Prod import LeanPool.RlTheoryInLean.MeasureTheory.Measure.Prod +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # LeanPool.RlTheoryInLean.Probability.Kernel.Composition.MapComap -/ -open MeasureTheory MeasureTheory.Measure Filtration ProbabilityTheory.Kernel ProbabilityTheory +@[expose] public section + +open MeasureTheory MeasureTheory.Measure ProbabilityTheory.Kernel ProbabilityTheory open Finset Bornology NNReal ENNReal Preorder Filter namespace ProbabilityTheory.Kernel diff --git a/LeanPool/RlTheoryInLean/Probability/MarkovChain.lean b/LeanPool/RlTheoryInLean/Probability/MarkovChain.lean index c4d71f71d5..175c4ba6e1 100644 --- a/LeanPool/RlTheoryInLean/Probability/MarkovChain.lean +++ b/LeanPool/RlTheoryInLean/Probability/MarkovChain.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.Probability.MarkovChain.Defs -import LeanPool.RlTheoryInLean.Probability.MarkovChain.Finite -import LeanPool.RlTheoryInLean.Probability.MarkovChain.Trajectory +public import LeanPool.RlTheoryInLean.Probability.MarkovChain.Defs +public import LeanPool.RlTheoryInLean.Probability.MarkovChain.Finite +public import LeanPool.RlTheoryInLean.Probability.MarkovChain.Trajectory /-! # MarkovChain Import-only index for the `MarkovChain` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/Probability/MarkovChain/Defs.lean b/LeanPool/RlTheoryInLean/Probability/MarkovChain/Defs.lean index 6c182816e9..e8c047bc8f 100644 --- a/LeanPool/RlTheoryInLean/Probability/MarkovChain/Defs.lean +++ b/LeanPool/RlTheoryInLean/Probability/MarkovChain/Defs.lean @@ -3,22 +3,18 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.Probability.ConditionalProbability -import Mathlib.Probability.Kernel.IonescuTulcea.Traj -import Mathlib.Probability.Kernel.Defs -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.Order.Interval.Finset.Defs -import Mathlib.MeasureTheory.MeasurableSpace.Instances -import Mathlib.MeasureTheory.Function.L1Space.Integrable -import Mathlib.Probability.Process.Filtration -import Mathlib.Logic.Function.Defs -import Mathlib.Probability.ProbabilityMassFunction.Basic +module + +public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure +public import Mathlib.Probability.Kernel.Composition.Comp /-! # LeanPool.RlTheoryInLean.Probability.MarkovChain.Defs -/ -open MeasureTheory MeasureTheory.Measure Filtration ProbabilityTheory.Kernel ProbabilityTheory +@[expose] public section + +open MeasureTheory MeasureTheory.Measure ProbabilityTheory.Kernel ProbabilityTheory open Finset NNReal ENNReal Preorder Function namespace ProbabilityTheory diff --git a/LeanPool/RlTheoryInLean/Probability/MarkovChain/Finite.lean b/LeanPool/RlTheoryInLean/Probability/MarkovChain/Finite.lean index e3fa17db24..e21b3fa852 100644 --- a/LeanPool/RlTheoryInLean/Probability/MarkovChain/Finite.lean +++ b/LeanPool/RlTheoryInLean/Probability/MarkovChain/Finite.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.Probability.MarkovChain.Finite.Defs +public import LeanPool.RlTheoryInLean.Probability.MarkovChain.Finite.Defs /-! # Finite Import-only index for the `Finite` directory of the RL-theory-in-Lean import. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/Probability/MarkovChain/Finite/Defs.lean b/LeanPool/RlTheoryInLean/Probability/MarkovChain/Finite/Defs.lean index 164fa224d5..32e05b1c29 100644 --- a/LeanPool/RlTheoryInLean/Probability/MarkovChain/Finite/Defs.lean +++ b/LeanPool/RlTheoryInLean/Probability/MarkovChain/Finite/Defs.lean @@ -3,22 +3,21 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.Probability.ProbabilityMassFunction.Basic -import Mathlib.MeasureTheory.MeasurableSpace.Instances -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.MeasureTheory.MeasurableSpace.Defs -import Mathlib.Probability.Kernel.Composition.IntegralCompProd +module + -import LeanPool.RlTheoryInLean.Defs -import LeanPool.RlTheoryInLean.Probability.MarkovChain.Defs -import LeanPool.RlTheoryInLean.Data.Matrix.Stochastic -import LeanPool.RlTheoryInLean.Probability.Kernel.Basic +public import LeanPool.RlTheoryInLean.Probability.MarkovChain.Defs +public import LeanPool.RlTheoryInLean.Data.Matrix.Stochastic +public import LeanPool.RlTheoryInLean.Probability.Kernel.Basic +import Mathlib.Probability.Kernel.Composition.IntegralCompProd /-! # LeanPool.RlTheoryInLean.Probability.MarkovChain.Finite.Defs -/ -open MeasureTheory MeasureTheory.Measure Filtration ProbabilityTheory.Kernel ProbabilityTheory +@[expose] public section + +open MeasureTheory MeasureTheory.Measure ProbabilityTheory.Kernel ProbabilityTheory open Finset NNReal ENNReal Preorder Function StochasticMatrix Filter namespace ProbabilityTheory diff --git a/LeanPool/RlTheoryInLean/Probability/MarkovChain/Trajectory.lean b/LeanPool/RlTheoryInLean/Probability/MarkovChain/Trajectory.lean index c61cb0aaba..60299c993a 100644 --- a/LeanPool/RlTheoryInLean/Probability/MarkovChain/Trajectory.lean +++ b/LeanPool/RlTheoryInLean/Probability/MarkovChain/Trajectory.lean @@ -3,26 +3,18 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import Mathlib.Probability.ConditionalProbability -import Mathlib.Probability.Kernel.IonescuTulcea.Traj -import Mathlib.Probability.Kernel.Defs -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure -import Mathlib.Order.Interval.Finset.Defs -import Mathlib.MeasureTheory.MeasurableSpace.Instances -import Mathlib.MeasureTheory.Function.L1Space.Integrable -import Mathlib.Probability.Process.Filtration -import Mathlib.Topology.Bornology.Basic - -import LeanPool.RlTheoryInLean.Defs -import LeanPool.RlTheoryInLean.MeasureTheory.MeasurableSpace.Constructions -import LeanPool.RlTheoryInLean.Probability.MarkovChain.Defs -import LeanPool.RlTheoryInLean.MeasureTheory.Function.L1Space.Integrable +module + +public import Mathlib.Probability.Kernel.IonescuTulcea.Traj + +public import LeanPool.RlTheoryInLean.Probability.MarkovChain.Defs /-! # LeanPool.RlTheoryInLean.Probability.MarkovChain.Trajectory -/ -open RLTheory +@[expose] public section + open MeasureTheory MeasureTheory.Measure Filtration open ProbabilityTheory.Kernel open ProbabilityTheory diff --git a/LeanPool/RlTheoryInLean/StochasticApproximation.lean b/LeanPool/RlTheoryInLean/StochasticApproximation.lean index e664b94b6a..c0fd30f533 100644 --- a/LeanPool/RlTheoryInLean/StochasticApproximation.lean +++ b/LeanPool/RlTheoryInLean/StochasticApproximation.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ +module -import LeanPool.RlTheoryInLean.StochasticApproximation.DiscreteGronwall +public import LeanPool.RlTheoryInLean.StochasticApproximation.DiscreteGronwall +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # StochasticApproximation Discrete Gronwall inequalities from the stochastic-approximation core. -/ + +@[expose] public section diff --git a/LeanPool/RlTheoryInLean/StochasticApproximation/DiscreteGronwall.lean b/LeanPool/RlTheoryInLean/StochasticApproximation/DiscreteGronwall.lean index 0f4de2b968..248c8aea66 100644 --- a/LeanPool/RlTheoryInLean/StochasticApproximation/DiscreteGronwall.lean +++ b/LeanPool/RlTheoryInLean/StochasticApproximation/DiscreteGronwall.lean @@ -3,12 +3,17 @@ Copyright (c) 2026 Shangtong Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shangtong Zhang -/ -import LeanPool.RlTheoryInLean.Defs +module + +public import Mathlib.Analysis.Complex.Exponential +import Mathlib.MeasureTheory.Integral.Bochner.Basic /-! # LeanPool.RlTheoryInLean.StochasticApproximation.DiscreteGronwall -/ +@[expose] public section + open Real Finset namespace StochasticApproximation diff --git a/LeanPool/RootSystem.lean b/LeanPool/RootSystem.lean index 49bd4ab21c..9bf3d17354 100644 --- a/LeanPool/RootSystem.lean +++ b/LeanPool/RootSystem.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Antoine de Saint Germain, Ambrose Tang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine de Saint Germain, Ambrose Tang -/ +module -import LeanPool.RootSystem.An -import LeanPool.RootSystem.BCn +public import LeanPool.RootSystem.An +public import LeanPool.RootSystem.BCn /-! # Explicit type Aₙ and BCₙ root pairings @@ -18,6 +19,8 @@ Tags: representation-theory, root-systems, lie-theory, combinatorics MSC: 17B22, 20F55 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/RootSystem/An.lean b/LeanPool/RootSystem/An.lean index 18792833e3..10d4b20f26 100644 --- a/LeanPool/RootSystem/An.lean +++ b/LeanPool/RootSystem/An.lean @@ -3,15 +3,9 @@ Copyright (c) 2026 Antoine de Saint Germain, Ambrose Tang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine de Saint Germain, Ambrose Tang -/ +module -import Mathlib.Order.Interval.Finset.Fin -import Mathlib.LinearAlgebra.RootSystem.Defs -import Mathlib.Tactic.Ext -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Aesop -import Mathlib.LinearAlgebra.RootSystem.Reduced +public import Mathlib.LinearAlgebra.RootSystem.Reduced /-! # Type-Aₙ root systems @@ -20,6 +14,8 @@ Explicit construction of the type-`Aₙ` root pairing on the weight lattice `Fin exhibited as a crystallographic, reduced Mathlib `RootPairing`. -/ +@[expose] public section + namespace An /-- The integral weight lattice `Fin n → ℤ` underlying the type-Aₙ root pairing. -/ diff --git a/LeanPool/RootSystem/BCn.lean b/LeanPool/RootSystem/BCn.lean index 1312d5d8ec..0897737c9d 100644 --- a/LeanPool/RootSystem/BCn.lean +++ b/LeanPool/RootSystem/BCn.lean @@ -3,12 +3,9 @@ Copyright (c) 2026 Antoine de Saint Germain, Ambrose Tang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine de Saint Germain, Ambrose Tang -/ +module -import Mathlib.LinearAlgebra.RootSystem.OfBilinear -import Mathlib.Tactic.Ext -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Push -import Mathlib.Tactic.Tauto +public import Mathlib.LinearAlgebra.RootSystem.OfBilinear /-! # Type-BCₙ root systems @@ -19,6 +16,8 @@ its roots as the classical type-`BCₙ` root set `{±eᵢ, ±2eᵢ, ±eᵢ ± e (`BCn.isReflective_iff_isClassicalRoot`, `BCn.range_rootPairing_root`). -/ +@[expose] public section + namespace BCn /-- The ambient space `Fin n → ℤ` for the type-BCₙ construction. -/ diff --git a/LeanPool/RungeKuttaOrderConditions.lean b/LeanPool/RungeKuttaOrderConditions.lean index 5cd19c2296..6b6aff649e 100644 --- a/LeanPool/RungeKuttaOrderConditions.lean +++ b/LeanPool/RungeKuttaOrderConditions.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Carles Marín. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Carles Marín -/ +module -import LeanPool.RungeKuttaOrderConditions.ButcherOrder +public import LeanPool.RungeKuttaOrderConditions.ButcherOrder +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Certified Runge-Kutta Order Conditions @@ -16,3 +23,5 @@ Main declarations: `RungeKuttaOrderConditions.Butcher.gauss_order6_rat` Tags: numerical-analysis, runge-kutta, rooted-trees, order-conditions MSC: 65L06, 65L05, 05C05 -/ + +@[expose] public section diff --git a/LeanPool/RungeKuttaOrderConditions/ButcherOrder.lean b/LeanPool/RungeKuttaOrderConditions/ButcherOrder.lean index 0911f55d49..11e6cdabfd 100644 --- a/LeanPool/RungeKuttaOrderConditions/ButcherOrder.lean +++ b/LeanPool/RungeKuttaOrderConditions/ButcherOrder.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Carles Marín. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Carles Marín -/ +module -import Mathlib.Data.Rat.Defs -import Mathlib.Data.List.Basic -import Mathlib.Tactic.NormNum +public import Mathlib.Algebra.Ring.Rat +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.ToAdditive +public meta import Mathlib.Tactic.ToDual +import Mathlib.Data.Rat.Cast.Order import Mathlib.Tactic.FinCases -import Mathlib.Tactic.Ring +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # Certified Runge-Kutta Order Conditions @@ -20,13 +26,14 @@ keystone for order conditions, and verifies Euler, Heun, RK4, Dormand-Prince, and Gauss-Legendre certificates. -/ +@[expose] public section + namespace RungeKuttaOrderConditions /-- ℚ(√15) as a computable `CommRing`: `⟨a, b⟩` means `a + b·√15`; the relation √15²=15 is baked into `mul`. Coefficient ring for the Gauss–Legendre s=3 (order 6) tableau (Brick 5). Working in this concrete pair ring keeps the - order-condition checks a pure ℚ component computation closed by `norm_num` — no - algebraic-number tactic needed. -/ + order-condition checks a pure ℚ component computation, without algebraic-number tactics. -/ structure Q15 where /-- Rational component. -/ re : ℚ @@ -302,8 +309,8 @@ through order 4 but give `5 / 24` on `t5bushy` where `1 / γ = 1 / 5`. /-! ### certificates — the order conditions, machine-checked (axiom-free) Each `orderCond` unfolds the computable engine on the concrete tree/tableau to a closed ℚ - arithmetic goal, closed by `norm_num` (symbolic — sidesteps the kernel's stuck `Nat.gcd` - reduction in `Rat` normalization that defeats `decide`). -/ + arithmetic goal. Closed certificates use `decide +kernel`; `butcherCheck` also supports + symbolic normalization with `norm_num`. -/ /-- unfold the engine on a concrete instance to a closed ℚ goal, then `norm_num`. -/ macro "butcherCheck" : tactic => @@ -314,25 +321,25 @@ macro "butcherCheck" : tactic => List.zipWith_nil_left, List.sum_cons, List.sum_nil]; norm_num)) -- Euler attains order 1: -theorem euler_ord1 : orderCond eulerA eulerB t1 := by butcherCheck +theorem euler_ord1 : orderCond eulerA eulerB t1 := by decide +kernel -- Heun (explicit trapezoid) attains order 2: -theorem heun_ord1 : orderCond heunA heunB t1 := by butcherCheck -theorem heun_ord2 : orderCond heunA heunB t2 := by butcherCheck +theorem heun_ord1 : orderCond heunA heunB t1 := by decide +kernel +theorem heun_ord2 : orderCond heunA heunB t2 := by decide +kernel -- and FAILS at order 3 (so it is exactly order 2): -theorem heun_not_ord3 : ¬ orderCond heunA heunB t31 := by butcherCheck +theorem heun_not_ord3 : ¬ orderCond heunA heunB t31 := by decide +kernel -- classic RK4 satisfies every order condition through order 4: -theorem rk4_ord1 : orderCond rk4A rk4B t1 := by butcherCheck -theorem rk4_ord2 : orderCond rk4A rk4B t2 := by butcherCheck -theorem rk4_ord3a : orderCond rk4A rk4B t31 := by butcherCheck -theorem rk4_ord3b : orderCond rk4A rk4B t32 := by butcherCheck -theorem rk4_ord4a : orderCond rk4A rk4B t41 := by butcherCheck -theorem rk4_ord4b : orderCond rk4A rk4B t42 := by butcherCheck -theorem rk4_ord4c : orderCond rk4A rk4B t43 := by butcherCheck -theorem rk4_ord4d : orderCond rk4A rk4B t44 := by butcherCheck +theorem rk4_ord1 : orderCond rk4A rk4B t1 := by decide +kernel +theorem rk4_ord2 : orderCond rk4A rk4B t2 := by decide +kernel +theorem rk4_ord3a : orderCond rk4A rk4B t31 := by decide +kernel +theorem rk4_ord3b : orderCond rk4A rk4B t32 := by decide +kernel +theorem rk4_ord4a : orderCond rk4A rk4B t41 := by decide +kernel +theorem rk4_ord4b : orderCond rk4A rk4B t42 := by decide +kernel +theorem rk4_ord4c : orderCond rk4A rk4B t43 := by decide +kernel +theorem rk4_ord4d : orderCond rk4A rk4B t44 := by decide +kernel -- ...but FAILS an order-5 condition (bushy 4-leaf tree: Φ=5/24 ≠ 1/5). RK4 is EXACTLY order 4: -theorem rk4_not_ord5 : ¬ orderCond rk4A rk4B t5bushy := by butcherCheck +theorem rk4_not_ord5 : ¬ orderCond rk4A rk4B t5bushy := by decide +kernel /-! ### Brick 2+4 — completeness: "order p" is EXACTLY a finite check (order-budget generator) @@ -453,8 +460,8 @@ theorem satisfiesOrderConditions_iff (A : List (List K)) (b : List K) (p : Nat) /-- classic RK4 satisfies ALL order-≤4 conditions, certified, axiom-free. -/ theorem rk4_order4 : satisfiesOrderConditions rk4A rk4B 4 := by - rw [satisfiesOrderConditions_iff, catalogFourEq]; intro t ht - fin_cases ht <;> butcherCheck + rw [satisfiesOrderConditions_iff, catalogFourEq] + decide +kernel /-! ### Brick 3 — the planar→abstract bridge: Φ is symmetric in a node's children @@ -532,87 +539,87 @@ theorem orderCond_node_perm (A : List (List ℚ)) (b : List ℚ) {F G : Forest} certificate that a production RK method (the default in MATLAB `ode45`, SciPy `RK45`) attains its full classical order. -/ private theorem dpCondition01 : orderCond dpA dpB t1 := by - butcherCheck + decide +kernel private theorem dpCondition02 : orderCond dpA dpB t2 := by - butcherCheck + decide +kernel private theorem dpCondition03 : orderCond dpA dpB t31 := by - butcherCheck + decide +kernel private theorem dpCondition04 : orderCond dpA dpB t41 := by - butcherCheck + decide +kernel private theorem dpCondition05 : orderCond dpA dpB t5bushy := by - butcherCheck + decide +kernel private theorem dpCondition06 : orderCond dpA dpB (.node [leaf, leaf, .node [leaf]]) := by - butcherCheck + decide +kernel private theorem dpCondition07 : orderCond dpA dpB t42 := by - butcherCheck + decide +kernel private theorem dpCondition08 : orderCond dpA dpB (.node [leaf, .node [leaf], leaf]) := by - butcherCheck + decide +kernel private theorem dpCondition09 : orderCond dpA dpB (.node [leaf, .node [leaf, leaf]]) := by - butcherCheck + decide +kernel private theorem dpCondition10 : orderCond dpA dpB (.node [leaf, .node [.node [leaf]]]) := by - butcherCheck + decide +kernel private theorem dpCondition11 : orderCond dpA dpB t32 := by - butcherCheck + decide +kernel private theorem dpCondition12 : orderCond dpA dpB (.node [.node [leaf], leaf]) := by - butcherCheck + decide +kernel private theorem dpCondition13 : orderCond dpA dpB (.node [.node [leaf], leaf, leaf]) := by - butcherCheck + decide +kernel private theorem dpCondition14 : orderCond dpA dpB (.node [.node [leaf], .node [leaf]]) := by - butcherCheck + decide +kernel private theorem dpCondition15 : orderCond dpA dpB t43 := by - butcherCheck + decide +kernel private theorem dpCondition16 : orderCond dpA dpB (.node [.node [leaf, leaf], leaf]) := by - butcherCheck + decide +kernel private theorem dpCondition17 : orderCond dpA dpB (.node [.node [leaf, leaf, leaf]]) := by - butcherCheck + decide +kernel private theorem dpCondition18 : orderCond dpA dpB (.node [.node [leaf, .node [leaf]]]) := by - butcherCheck + decide +kernel private theorem dpCondition19 : orderCond dpA dpB t44 := by - butcherCheck + decide +kernel private theorem dpCondition20 : orderCond dpA dpB (.node [.node [.node [leaf]], leaf]) := by - butcherCheck + decide +kernel private theorem dpCondition21 : orderCond dpA dpB (.node [.node [.node [leaf], leaf]]) := by - butcherCheck + decide +kernel private theorem dpCondition22 : orderCond dpA dpB (.node [.node [.node [leaf, leaf]]]) := by - butcherCheck + decide +kernel private theorem dpCondition23 : orderCond dpA dpB (.node [.node [.node [.node [leaf]]]]) := by - butcherCheck + decide +kernel -- The public theorem only splits membership in the explicit 23-tree catalogue. theorem dp_order5 : satisfiesOrderConditions dpA dpB 5 := by @@ -642,22 +649,13 @@ theorem dp_order5 : satisfiesOrderConditions dpA dpB 5 := by · exact dpCondition22 · exact dpCondition23 -/-! ### Brick 5 — an IMPLICIT method with ALGEBRAIC coefficients: Gauss–Legendre s=3 - - Gauss–Legendre with 3 stages is fully implicit, with a tableau living in ℚ(√15). - Working in the computable pair ring `Q15` (where √15²=15 is baked into - multiplication), every order condition collapses to a pair of ℚ identities that - `gaussCheck` closes by `norm_num` — no algebraic-number tactic. This certifies - the framework on implicit methods with irrational (algebraic) coefficients. - - We certify order 4 here by this direct symbolic route. At order 6 the same - route dies: a `fin_cases` over `catalog 6` (65 planar trees) with per-tree - `norm_num` is dominated by the elaborator's whnf reduction of the catalogue - and does not complete in practical time at this scale. The full order-6 - certificate `satisfiesOrderConditions gaussA gaussB 6` is instead - `gauss_order6_rat` below: Brick 6 clears denominators into ℤ[√15] and - certifies the scaled tableau by `decide`, and Brick 7 transports the result - back to `gaussA`/`gaussB` through the formalized homogeneity bridge. -/ +/-! ### Brick 5 — Gauss–Legendre s=3 over ℚ(√15) + + The computable pair ring `Q15` reduces algebraic coefficients to rational component + arithmetic. Kernel decision verifies the closed order-4 certificates, with the final + condition also exposing its stage-vector calculation. The full order-6 result below + clears denominators into `Z15` and uses the formalized homogeneity bridge to recover + the rational tableau's order conditions. -/ private def gaussOnes : List Q15 := [1, 1, 1] private def gaussC : List Q15 := [⟨1 / 2, -1 / 10⟩, ⟨1 / 2, 0⟩, ⟨1 / 2, 1 / 10⟩] @@ -743,29 +741,29 @@ private theorem gaussT44Weight : Phi gaussA gaussB t44 = ⟨1 / 24, 0⟩ := by ext <;> norm_num private theorem gaussCondition01 : orderCond gaussA gaussB t1 := by - gaussCheck + decide +kernel private theorem gaussCondition02 : orderCond gaussA gaussB t2 := by - gaussCheck + decide +kernel private theorem gaussCondition03 : orderCond gaussA gaussB t31 := by - gaussCheck + decide +kernel private theorem gaussCondition04 : orderCond gaussA gaussB t41 := by - gaussCheck + decide +kernel private theorem gaussCondition05 : orderCond gaussA gaussB t42 := by - gaussCheck + decide +kernel private theorem gaussCondition06 : orderCond gaussA gaussB t32 := by - gaussCheck + decide +kernel private theorem gaussCondition07 : orderCond gaussA gaussB (.node [.node [leaf], leaf]) := by - gaussCheck + decide +kernel private theorem gaussCondition08 : orderCond gaussA gaussB t43 := by - gaussCheck + decide +kernel private theorem gaussCondition09 : orderCond gaussA gaussB t44 := by change (gamma t44 : Q15) * Phi gaussA gaussB t44 = 1 @@ -789,23 +787,13 @@ theorem gauss_order4 : satisfiesOrderConditions gaussA gaussB 4 := by · exact gaussCondition08 · exact gaussCondition09 -/-! ### Brick 6 — Gauss–Legendre s=3 certified to FULL order 6 (integer ℤ[√15] + `decide`) - - `gauss_order4` above unfolds the engine symbolically and closes the ℚ(√15) - components by `norm_num`. At order 6 that route dies: the 65 per-tree `norm_num` - calls exhaust memory (a run reached ~20 GB), because ℚ's `Nat.gcd` normalization - does not reduce in the kernel and the unfolded Q15 products are huge. The fix is - a genuinely different *formula* (found by re-questioning the representation, not - the method): clear all denominators. Scaling the tableau by `D = 360` (the lcm of - the denominators 36,9,15,30,24,18) lands it in the INTEGER ring `Z15 = ℤ[√15]`. - The elementary weight is homogeneous, `Φ(D·A, D·b, t) = D^{|t|}·Φ(A,b,t)`, so - the order condition `γ(t)·Φ = 1` becomes the integer identity - `γ(t)·Φ(D·A,D·b,t) = D^{|t|}`. Over `Z15` (a pair of `Int`) this closes by - `decide`: the kernel's GMP `Int` arithmetic evaluates it directly — no rational - normalization, negligible memory. The whole certificate (all 65 planar trees of - `catalog 6`) checks in ~1 s, axiom-free. Cross-checked outside Lean three ways - (tree recursion + brute-force index sum in Python, brute-force in Sage over ℚ(√15)): - Gauss s=3 holds orders 1–6 and fails all 48 order-7 conditions, i.e. it is EXACTLY order 6. +/-! ### Brick 6 — Gauss–Legendre s=3 certified to order 6 over ℤ[√15] + + Scaling the tableau by `D = 360` clears its denominators into the integer ring `Z15`. + Homogeneity gives `Φ(D·A, D·b, t) = D^{|t|}·Φ(A,b,t)`, so the order condition becomes + `γ(t)·Φ(D·A,D·b,t) = D^{|t|}`. Kernel decision checks this identity for every tree in + the finite catalogue, avoiding repeated rational normalization. Brick 7 transports + the result back to the original tableau. The scaled integer tableau: entry `a + b√15` with denominator cleared by 360 becomes `⟨360a, 360b⟩`. @@ -845,13 +833,12 @@ theorem satisfiesOrderConditionsInt_iff (A : List (List Z15)) (b : List Z15) (D /-! Gauss–Legendre s=3 satisfies ALL order-≤6 conditions for the scaled tableau: the integer certificate, axiom-free. - `fin_cases` enumerates the 65-tree catalogue; each condition is closed by the kernel (`decide`) - over `Z15` integer arithmetic. Brick 7 below transports this certificate back + The kernel checks all 65 trees in the catalogue using `Z15` integer arithmetic. + Brick 7 below transports this certificate back to the rational tableau (`gauss_order6_rat`). -/ --- `fin_cases` unfolds the finite 65-tree Gauss order-6 catalogue. theorem gauss_order6 : satisfiesOrderConditionsInt gaussIA gaussIB Dscale 6 := by - rw [satisfiesOrderConditionsInt_iff]; intro t ht - fin_cases ht <;> decide + rw [satisfiesOrderConditionsInt_iff] + decide +kernel /-! ### Brick 7 — the homogeneity bridge: the order-6 certificate over ℚ(√15) diff --git a/LeanPool/Rupert.lean b/LeanPool/Rupert.lean index b94625f0f6..d85187d443 100644 --- a/LeanPool/Rupert.lean +++ b/LeanPool/Rupert.lean @@ -3,24 +3,25 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import LeanPool.Rupert.Affine -import LeanPool.Rupert.Attr -import LeanPool.Rupert.Basic -import LeanPool.Rupert.Convex -import LeanPool.Rupert.Cube -import LeanPool.Rupert.FinCases -import LeanPool.Rupert.Icosahedron -import LeanPool.Rupert.MatrixSimps -import LeanPool.Rupert.Quaternion -import LeanPool.Rupert.Equivalences.RupertEquivRupertPrime -import LeanPool.Rupert.Equivalences.RupertEquivRupertSet -import LeanPool.Rupert.Equivalences.AffineRupertEquivRupertSet -import LeanPool.Rupert.Set -import LeanPool.Rupert.SnubCube -import LeanPool.Rupert.Square -import LeanPool.Rupert.Tetrahedron -import LeanPool.Rupert.TriakisTetrahedron +public import LeanPool.Rupert.Affine +public import LeanPool.Rupert.Attr +public import LeanPool.Rupert.Basic +public import LeanPool.Rupert.Convex +public import LeanPool.Rupert.Cube +public import LeanPool.Rupert.FinCases +public import LeanPool.Rupert.Icosahedron +public import LeanPool.Rupert.MatrixSimps +public import LeanPool.Rupert.Quaternion +public import LeanPool.Rupert.Equivalences.RupertEquivRupertPrime +public import LeanPool.Rupert.Equivalences.RupertEquivRupertSet +public import LeanPool.Rupert.Equivalences.AffineRupertEquivRupertSet +public import LeanPool.Rupert.Set +public import LeanPool.Rupert.SnubCube +public import LeanPool.Rupert.Square +public import LeanPool.Rupert.Tetrahedron +public import LeanPool.Rupert.TriakisTetrahedron /-! # The Rupert Problem for convex polyhedra @@ -32,3 +33,5 @@ Main declarations: `Cube.rupert`, `Tetrahedron.rupert`, `TriakisTetrahedron.rupe Tags: convex-geometry, polyhedra, rupert-problem MSC: 52B10, 52A15 -/ + +@[expose] public section diff --git a/LeanPool/Rupert/Affine.lean b/LeanPool/Rupert/Affine.lean index cfdc37a9df..1d5fa87520 100644 --- a/LeanPool/Rupert/Affine.lean +++ b/LeanPool/Rupert/Affine.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import Mathlib.Geometry.Euclidean.Projection +public import Mathlib.Geometry.Euclidean.Projection /-! # LeanPool.Rupert.Affine @@ -12,6 +13,8 @@ import Mathlib.Geometry.Euclidean.Projection Imported Lean Pool material for `LeanPool.Rupert.Affine`. -/ +@[expose] public section + /-- The Rupert Property for a pair of subsets X, Y of an arbitrary finite-dimensional real affine space P. X has the Rupert property with respect to Y if there exist diff --git a/LeanPool/Rupert/Attr.lean b/LeanPool/Rupert/Attr.lean index 4d6b811fd6..b4bc126781 100644 --- a/LeanPool/Rupert/Attr.lean +++ b/LeanPool/Rupert/Attr.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import Mathlib.Init -import Lean.Meta.Tactic.Simp.SimpTheorems +public meta import Lean.Meta.Tactic.Simp.Simproc +meta import Lean.Meta.Tactic.Simp.Attr import Lean.Meta.Tactic.Simp.RegisterCommand -import Lean.LabelAttribute /-! # LeanPool.Rupert.Attr @@ -15,5 +15,7 @@ import Lean.LabelAttribute Imported Lean Pool material for `LeanPool.Rupert.Attr`. -/ +@[expose] public section + /-- Simp set for evaluating concrete matrices in Rupert certificates. -/ register_simp_attr matrix_simps diff --git a/LeanPool/Rupert/Basic.lean b/LeanPool/Rupert/Basic.lean index 9ad989ce2c..525eaa9d64 100644 --- a/LeanPool/Rupert/Basic.lean +++ b/LeanPool/Rupert/Basic.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.Analysis.InnerProductSpace.PiL2 /-! # LeanPool.Rupert.Basic @@ -12,6 +13,8 @@ import Mathlib.Analysis.InnerProductSpace.PiL2 Imported Lean Pool material for `LeanPool.Rupert.Basic`. -/ +@[expose] public section + open scoped Matrix /-- Three-dimensional Euclidean space over `ℝ`. -/ diff --git a/LeanPool/Rupert/Convex.lean b/LeanPool/Rupert/Convex.lean index 93c0e4fbfa..f8e047b59b 100644 --- a/LeanPool/Rupert/Convex.lean +++ b/LeanPool/Rupert/Convex.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.Algebra.Order.Star.Real /-! @@ -13,6 +14,8 @@ import Mathlib.Algebra.Order.Star.Real Imported Lean Pool material for `LeanPool.Rupert.Convex`. -/ +@[expose] public section + open Pointwise namespace Convex diff --git a/LeanPool/Rupert/Cube.lean b/LeanPool/Rupert/Cube.lean index af85eac7e8..a1afd1faac 100644 --- a/LeanPool/Rupert/Cube.lean +++ b/LeanPool/Rupert/Cube.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import LeanPool.Rupert.Basic -import LeanPool.Rupert.Convex -import LeanPool.Rupert.Quaternion -import LeanPool.Rupert.MatrixSimps +public import LeanPool.Rupert.Equivalences.Util +import LeanPool.Rupert.Attr import LeanPool.Rupert.Equivalences.RupertEquivRupertPrime +import LeanPool.Rupert.MatrixSimps /-! # LeanPool.Rupert.Cube @@ -16,6 +16,8 @@ import LeanPool.Rupert.Equivalences.RupertEquivRupertPrime Imported Lean Pool material for `LeanPool.Rupert.Cube`. -/ +@[expose] public section + namespace Cube open Matrix diff --git a/LeanPool/Rupert/Equivalences/AffineRupertEquivRupertSet.lean b/LeanPool/Rupert/Equivalences/AffineRupertEquivRupertSet.lean index a4821f98a2..3ada1278a1 100644 --- a/LeanPool/Rupert/Equivalences/AffineRupertEquivRupertSet.lean +++ b/LeanPool/Rupert/Equivalences/AffineRupertEquivRupertSet.lean @@ -3,10 +3,16 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import LeanPool.Rupert.Basic -import LeanPool.Rupert.Set -import LeanPool.Rupert.Affine +public import LeanPool.Rupert.Basic +public import LeanPool.Rupert.Set +public import LeanPool.Rupert.Affine + +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # LeanPool.Rupert.Equivalences.AffineRupertEquivRupertSet @@ -14,6 +20,4 @@ import LeanPool.Rupert.Affine Imported Lean Pool material for `LeanPool.Rupert.Equivalences.AffineRupertEquivRupertSet`. -/ -proof_wanted affine_rupert_iff_rupert_set - (X : Set (EuclideanSpace ℝ (Fin 3))) : - IsAffineRupertSet X ↔ IsRupertSet X +@[expose] public section diff --git a/LeanPool/Rupert/Equivalences/RupertEquivRupertPrime.lean b/LeanPool/Rupert/Equivalences/RupertEquivRupertPrime.lean index 4b874a538e..72f33eb034 100644 --- a/LeanPool/Rupert/Equivalences/RupertEquivRupertPrime.lean +++ b/LeanPool/Rupert/Equivalences/RupertEquivRupertPrime.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module +public import LeanPool.Rupert.Basic import LeanPool.Rupert.Equivalences.Util /-! @@ -11,6 +13,8 @@ import LeanPool.Rupert.Equivalences.Util Imported Lean Pool material for `LeanPool.Rupert.Equivalences.RupertEquivRupertPrime`. -/ + +@[expose] public section open Matrix theorem rupert'_imp_rupert {ι : Type} (v : ι → ℝ³) : IsRupert' v → IsRupert v := by diff --git a/LeanPool/Rupert/Equivalences/RupertEquivRupertSet.lean b/LeanPool/Rupert/Equivalences/RupertEquivRupertSet.lean index e145b23bdb..a16706874d 100644 --- a/LeanPool/Rupert/Equivalences/RupertEquivRupertSet.lean +++ b/LeanPool/Rupert/Equivalences/RupertEquivRupertSet.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module +public import LeanPool.Rupert.Set import LeanPool.Rupert.Equivalences.Util /-! @@ -11,6 +13,8 @@ import LeanPool.Rupert.Equivalences.Util Imported Lean Pool material for `LeanPool.Rupert.Equivalences.RupertEquivRupertSet`. -/ + +@[expose] public section open Matrix theorem rupert_imp_rupert_set {ι : Type} [Finite ι] (v : ι → ℝ³) : diff --git a/LeanPool/Rupert/Equivalences/Util.lean b/LeanPool/Rupert/Equivalences/Util.lean index 7f511f4fc7..c0e0305eb1 100644 --- a/LeanPool/Rupert/Equivalences/Util.lean +++ b/LeanPool/Rupert/Equivalences/Util.lean @@ -3,16 +3,20 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import Mathlib.Algebra.Order.Archimedean.Real.Hom -import LeanPool.Rupert.Basic +public import LeanPool.Rupert.Basic +import LeanPool.Rupert.Affine import LeanPool.Rupert.Set +import Mathlib.Algebra.Order.Archimedean.Real.Hom /-! # LeanPool.Rupert.Equivalences.Util Imported Lean Pool material for `LeanPool.Rupert.Equivalences.Util`. -/ + +@[expose] public section open Pointwise open Matrix @@ -47,3 +51,7 @@ def projXyRotationIsAffine (rot : SO3) : ℝ³ →ᵃ[ℝ] ℝ² := noncomputable def fullTransformAffine (off : E 2) (rot : SO3) : ℝ³ →ᵃ[ℝ] ℝ² := AffineMap.comp (offsetAffine off) (projXyRotationIsAffine rot) + +proof_wanted affine_rupert_iff_rupert_set + (X : Set (EuclideanSpace ℝ (Fin 3))) : + IsAffineRupertSet X ↔ IsRupertSet X diff --git a/LeanPool/Rupert/FinCases.lean b/LeanPool/Rupert/FinCases.lean index ec3740cf65..fc33613057 100644 --- a/LeanPool/Rupert/FinCases.lean +++ b/LeanPool/Rupert/FinCases.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import Mathlib.Data.Fin.VecNotation +public import Mathlib.Data.Fin.VecNotation import Mathlib.Data.Fintype.Basic import Mathlib.Tactic.FinCases @@ -14,6 +15,8 @@ import Mathlib.Tactic.FinCases Imported Lean Pool material for `LeanPool.Rupert.FinCases`. -/ +@[expose] public section + /-- Lemma for helping with goals such as ``` diff --git a/LeanPool/Rupert/Icosahedron.lean b/LeanPool/Rupert/Icosahedron.lean index 4c9c1ba006..d62b7a831b 100644 --- a/LeanPool/Rupert/Icosahedron.lean +++ b/LeanPool/Rupert/Icosahedron.lean @@ -3,13 +3,10 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import Mathlib.NumberTheory.Real.GoldenRatio -import LeanPool.Rupert.Basic -import LeanPool.Rupert.Convex -import LeanPool.Rupert.MatrixSimps -import LeanPool.Rupert.Quaternion -import LeanPool.Rupert.Equivalences.RupertEquivRupertPrime +public import Mathlib.NumberTheory.Real.GoldenRatio +public import LeanPool.Rupert.Basic /-! # LeanPool.Rupert.Icosahedron @@ -17,6 +14,8 @@ import LeanPool.Rupert.Equivalences.RupertEquivRupertPrime Imported Lean Pool material for `LeanPool.Rupert.Icosahedron`. -/ +@[expose] public section + namespace Icosahedron open scoped Matrix goldenRatio diff --git a/LeanPool/Rupert/MatrixSimps.lean b/LeanPool/Rupert/MatrixSimps.lean index dadc117342..022cb5bcbf 100644 --- a/LeanPool/Rupert/MatrixSimps.lean +++ b/LeanPool/Rupert/MatrixSimps.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import Mathlib.Analysis.InnerProductSpace.PiL2 + +public import Mathlib.Analysis.Normed.Lp.PiLp import LeanPool.Rupert.Attr /-! @@ -13,8 +15,16 @@ import LeanPool.Rupert.Attr Imported Lean Pool material for `LeanPool.Rupert.MatrixSimps`. -/ -attribute [matrix_simps] Matrix.cons_dotProduct even_two Even.neg_pow neg_mul Nat.reduceAdd - sub_neg_eq_add mul_neg neg_neg Fin.isValue Matrix.cons_mulVec +@[expose] public section + +/-- Reduce natural additions in concrete matrix expressions. -/ +dsimproc_decl matrixReduceNatAdd ((_ + _ : Nat)) := Nat.reduceAdd + +/-- Normalize finite indices in concrete matrix expressions. -/ +dsimproc_decl matrixNormalizeFin ((OfNat.ofNat _ : Fin _)) := Fin.isValue + +attribute [matrix_simps] Matrix.cons_dotProduct even_two Even.neg_pow neg_mul matrixReduceNatAdd + sub_neg_eq_add mul_neg neg_neg matrixNormalizeFin Matrix.cons_mulVec Matrix.cons_dotProduct Matrix.dotProduct_of_isEmpty add_zero Matrix.empty_mulVec Matrix.cons_val_zero Matrix.cons_val_one smul_smul Matrix.head_cons mul_one Matrix.tail_cons Matrix.cons_val zero_mul zero_smul diff --git a/LeanPool/Rupert/Quaternion.lean b/LeanPool/Rupert/Quaternion.lean index e0bad9c5a7..23f789b794 100644 --- a/LeanPool/Rupert/Quaternion.lean +++ b/LeanPool/Rupert/Quaternion.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import Mathlib.Algebra.Lie.OfAssociative -import Mathlib.Algebra.Quaternion -import Mathlib.LinearAlgebra.CrossProduct -import LeanPool.Rupert.Basic +public import Mathlib.Algebra.Quaternion +public import Mathlib.LinearAlgebra.CrossProduct +public import LeanPool.Rupert.Basic /-! # LeanPool.Rupert.Quaternion @@ -15,6 +15,8 @@ import LeanPool.Rupert.Basic Imported Lean Pool material for `LeanPool.Rupert.Quaternion`. -/ +@[expose] public section + /-- Converts a quaternion to a normalized rotation matrix. -/ def matrixOfQuat {R : Type} [Field R] (q : Quaternion R) : Matrix (Fin 3) (Fin 3) R := diff --git a/LeanPool/Rupert/Set.lean b/LeanPool/Rupert/Set.lean index 904c2e0260..6a1de84dee 100644 --- a/LeanPool/Rupert/Set.lean +++ b/LeanPool/Rupert/Set.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import LeanPool.Rupert.Basic +public import LeanPool.Rupert.Basic /-! # LeanPool.Rupert.Set @@ -12,6 +13,8 @@ import LeanPool.Rupert.Basic Imported Lean Pool material for `LeanPool.Rupert.Set`. -/ +@[expose] public section + open scoped Matrix /-- The Rupert Property for a pair of subsets X, Y of ℝ³. X has the diff --git a/LeanPool/Rupert/SnubCube.lean b/LeanPool/Rupert/SnubCube.lean index cd85bf0f9a..3f50c5a664 100644 --- a/LeanPool/Rupert/SnubCube.lean +++ b/LeanPool/Rupert/SnubCube.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import LeanPool.Rupert.Basic +public import LeanPool.Rupert.Basic /-! # LeanPool.Rupert.SnubCube @@ -12,6 +13,8 @@ import LeanPool.Rupert.Basic Imported Lean Pool material for `LeanPool.Rupert.SnubCube`. -/ +@[expose] public section + namespace SnubCube /-- Real cube root, written using real powers. -/ diff --git a/LeanPool/Rupert/Square.lean b/LeanPool/Rupert/Square.lean index 2bad89446e..17111a2a08 100644 --- a/LeanPool/Rupert/Square.lean +++ b/LeanPool/Rupert/Square.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import LeanPool.Rupert.Basic +public import LeanPool.Rupert.Basic import LeanPool.Rupert.Convex import LeanPool.Rupert.Equivalences.RupertEquivRupertPrime @@ -14,6 +15,8 @@ import LeanPool.Rupert.Equivalences.RupertEquivRupertPrime Imported Lean Pool material for `LeanPool.Rupert.Square`. -/ +@[expose] public section + namespace Square open Matrix diff --git a/LeanPool/Rupert/Tetrahedron.lean b/LeanPool/Rupert/Tetrahedron.lean index 85bf2c46cc..0dcbfd94e0 100644 --- a/LeanPool/Rupert/Tetrahedron.lean +++ b/LeanPool/Rupert/Tetrahedron.lean @@ -3,13 +3,13 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import LeanPool.Rupert.Basic +public import LeanPool.Rupert.Quaternion +import LeanPool.Rupert.Attr import LeanPool.Rupert.Convex -import LeanPool.Rupert.MatrixSimps -import LeanPool.Rupert.Quaternion import LeanPool.Rupert.Equivalences.RupertEquivRupertPrime -import LeanPool.Rupert.FinCases +import LeanPool.Rupert.MatrixSimps /-! # LeanPool.Rupert.Tetrahedron @@ -17,6 +17,8 @@ import LeanPool.Rupert.FinCases Imported Lean Pool material for `LeanPool.Rupert.Tetrahedron`. -/ +@[expose] public section + namespace Tetrahedron open scoped Matrix diff --git a/LeanPool/Rupert/TriakisTetrahedron.lean b/LeanPool/Rupert/TriakisTetrahedron.lean index c8501b0b7c..75d4f6d09a 100644 --- a/LeanPool/Rupert/TriakisTetrahedron.lean +++ b/LeanPool/Rupert/TriakisTetrahedron.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ +module -import LeanPool.Rupert.Basic +public import LeanPool.Rupert.Quaternion +import LeanPool.Rupert.Attr import LeanPool.Rupert.Convex +import LeanPool.Rupert.Equivalences.RupertEquivRupertPrime import LeanPool.Rupert.FinCases import LeanPool.Rupert.MatrixSimps -import LeanPool.Rupert.Quaternion -import LeanPool.Rupert.Equivalences.RupertEquivRupertPrime /-! # LeanPool.Rupert.TriakisTetrahedron @@ -17,6 +18,8 @@ import LeanPool.Rupert.Equivalences.RupertEquivRupertPrime Imported Lean Pool material for `LeanPool.Rupert.TriakisTetrahedron`. -/ +@[expose] public section + namespace TriakisTetrahedron open scoped Matrix diff --git a/LeanPool/Sabidussi.lean b/LeanPool/Sabidussi.lean index ee42b55b3d..c6069bc949 100644 --- a/LeanPool/Sabidussi.lean +++ b/LeanPool/Sabidussi.lean @@ -3,16 +3,21 @@ Copyright (c) 2026 Nikolay Ulyanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nikolay Ulyanov -/ +module -import LeanPool.Sabidussi.Color -import LeanPool.Sabidussi.CyclicWord -import LeanPool.Sabidussi.LocalPattern -import LeanPool.Sabidussi.LoopGraphBridge -import LeanPool.Sabidussi.LoopMultigraph -import LeanPool.Sabidussi.OddBalance -import LeanPool.Sabidussi.OrdinaryCircuit -import LeanPool.Sabidussi.Parity -import LeanPool.Sabidussi.Statement +public import LeanPool.Sabidussi.Color +public import LeanPool.Sabidussi.CyclicWord +public import LeanPool.Sabidussi.LocalPattern +public import LeanPool.Sabidussi.LoopGraphBridge +public import LeanPool.Sabidussi.LoopMultigraph +public import LeanPool.Sabidussi.OddBalance +public import LeanPool.Sabidussi.OrdinaryCircuit +public import LeanPool.Sabidussi.Parity +public import LeanPool.Sabidussi.Statement +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Sabidussi's compatibility conjecture for Eulerian multigraphs @@ -24,3 +29,5 @@ Main declarations: `Sabidussi.LoopMultigraph.loop_sabidussi_compatibility_ordina Tags: graph-theory, eulerian-graphs, circuit-decomposition, sabidussi MSC: 05C45 -/ + +@[expose] public section diff --git a/LeanPool/Sabidussi/Color.lean b/LeanPool/Sabidussi/Color.lean index 60e55631ef..d640ce9a6b 100644 --- a/LeanPool/Sabidussi/Color.lean +++ b/LeanPool/Sabidussi/Color.lean @@ -3,14 +3,16 @@ Copyright (c) 2026 Nikolay Ulyanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nikolay Ulyanov -/ +module + +public import Mathlib.Algebra.Field.ZMod import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Algebra.Field.ZMod -import Mathlib.Data.ZMod.Basic +import Mathlib.Data.Rat.Cast.Order import Mathlib.Tactic.Abel -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.SplitIfs +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # The four colours used in the Sabidussi proof @@ -19,6 +21,8 @@ This file contains the elementary algebra over `F₂²` used by the proof. We us product so that the three admissible local frames can be given by concrete formulas. -/ +@[expose] public section + namespace Sabidussi open scoped BigOperators diff --git a/LeanPool/Sabidussi/CyclicWord.lean b/LeanPool/Sabidussi/CyclicWord.lean index 38e5f408ba..9c2890aec9 100644 --- a/LeanPool/Sabidussi/CyclicWord.lean +++ b/LeanPool/Sabidussi/CyclicWord.lean @@ -3,12 +3,21 @@ Copyright (c) 2026 Nikolay Ulyanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nikolay Ulyanov -/ -import LeanPool.Sabidussi.LocalPattern -import LeanPool.Sabidussi.OddBalance +module + +public import LeanPool.Sabidussi.LocalPattern +public import LeanPool.Sabidussi.OddBalance +public import Mathlib.Data.Finset.Sort +public import Mathlib.Logic.Equiv.Fin.Rotate +public import Mathlib.Order.Interval.Finset.Fin import LeanPool.Sabidussi.Parity -import Mathlib.Data.Finset.Sort -import Mathlib.Logic.Equiv.Fin.Rotate -import Mathlib.Order.Interval.Finset.Fin +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Abel +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # The cyclic-word four-colouring lemma @@ -19,6 +28,8 @@ the local patterns from `LocalPattern` and the odd balancing theorem produce col such that adjacent gaps have different colours and every colour occurs evenly at each letter. -/ +@[expose] public section + namespace Sabidussi namespace CyclicWord diff --git a/LeanPool/Sabidussi/LocalPattern.lean b/LeanPool/Sabidussi/LocalPattern.lean index dd3571f533..c47348ae74 100644 --- a/LeanPool/Sabidussi/LocalPattern.lean +++ b/LeanPool/Sabidussi/LocalPattern.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 Nikolay Ulyanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nikolay Ulyanov -/ -import LeanPool.Sabidussi.Color +module + +public import LeanPool.Sabidussi.Color +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Abel +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Local difference patterns @@ -13,6 +22,8 @@ The construction is the degree-splitting step of the manuscript written without graph: remove pairs of occurrences recursively, ending with a pair or a triple. -/ +@[expose] public section + namespace Sabidussi open scoped BigOperators diff --git a/LeanPool/Sabidussi/LoopGraphBridge.lean b/LeanPool/Sabidussi/LoopGraphBridge.lean index 10b843cf9b..9f30ad2e96 100644 --- a/LeanPool/Sabidussi/LoopGraphBridge.lean +++ b/LeanPool/Sabidussi/LoopGraphBridge.lean @@ -3,8 +3,16 @@ Copyright (c) 2026 Nikolay Ulyanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nikolay Ulyanov -/ -import LeanPool.Sabidussi.LoopMultigraph -import LeanPool.Sabidussi.CyclicWord +module + +public import LeanPool.Sabidussi.LoopMultigraph +public import LeanPool.Sabidussi.CyclicWord +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # From a cyclic word back to a loop-capable endpoint multigraph @@ -14,6 +22,8 @@ zero denotes the preceding gap, while Euler-tour side zero denotes the current d half-edge; the bridge therefore precomposes occurrence sides with `Fin.rev`. -/ +@[expose] public section + namespace Sabidussi namespace LoopMultigraph @@ -41,7 +51,7 @@ omit [DecidableEq E] [DecidableEq V] in theorem eulerWord_prev (i : T.Pos) : T.eulerWord.prev i = T.prev i := rfl /-- Reversal is an equivalence on the two transition sides. -/ -private def revFinTwoEquiv : Fin 2 ≃ Fin 2 := +def revFinTwoEquiv : Fin 2 ≃ Fin 2 := Fin.rev_involutive.toPerm /-- Occurrence sides with the cyclic-word convention are exactly the incident half-edges. -/ diff --git a/LeanPool/Sabidussi/LoopMultigraph.lean b/LeanPool/Sabidussi/LoopMultigraph.lean index 98637f1441..b67085ed65 100644 --- a/LeanPool/Sabidussi/LoopMultigraph.lean +++ b/LeanPool/Sabidussi/LoopMultigraph.lean @@ -3,13 +3,15 @@ Copyright (c) 2026 Nikolay Ulyanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nikolay Ulyanov -/ -import LeanPool.Sabidussi.Color -import LeanPool.Sabidussi.Statement -import Mathlib.Data.Fin.Rev -import Mathlib.Logic.Equiv.Fin.Rotate -import Mathlib.Data.Finset.Card -import Mathlib.Basic.Finite.Set -import Mathlib.Data.Fintype.Sets +module + +public import LeanPool.Sabidussi.Color +public import LeanPool.Sabidussi.Statement +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Finite endpoint multigraphs with loops @@ -19,6 +21,8 @@ are represented without quotienting or special cases. Degree and parity always incidences; consequently a loop contributes two incidences at its vertex. -/ +@[expose] public section + namespace Sabidussi open scoped BigOperators diff --git a/LeanPool/Sabidussi/OddBalance.lean b/LeanPool/Sabidussi/OddBalance.lean index 6236951af5..bfa99fdc89 100644 --- a/LeanPool/Sabidussi/OddBalance.lean +++ b/LeanPool/Sabidussi/OddBalance.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Nikolay Ulyanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nikolay Ulyanov -/ +module + +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Algebra.Group.End +public import Mathlib.Algebra.Ring.Parity +public import Mathlib.Data.Finset.Powerset +public import Mathlib.Data.Fintype.Pi +public import Mathlib.Data.ZMod.Defs import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Data.ZMod.Basic -import Mathlib.Logic.Equiv.Prod /-! # The odd balancing theorem @@ -17,6 +24,8 @@ modulo two, expands the count over choices of partner vertices, and cancels the derangement contributions in pairs. -/ +@[expose] public section + open scoped BigOperators open Finset diff --git a/LeanPool/Sabidussi/OrdinaryCircuit.lean b/LeanPool/Sabidussi/OrdinaryCircuit.lean index 1d9a622d3d..42d16846d1 100644 --- a/LeanPool/Sabidussi/OrdinaryCircuit.lean +++ b/LeanPool/Sabidussi/OrdinaryCircuit.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Nikolay Ulyanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nikolay Ulyanov -/ +module + +public import Mathlib.LinearAlgebra.Matrix.ToLin +public import LeanPool.Sabidussi.LoopMultigraph import LeanPool.Sabidussi.LoopGraphBridge -import Mathlib.LinearAlgebra.Dimension.Constructions import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas -import Mathlib.LinearAlgebra.Matrix.ToLin /-! # Ordinary circuits in endpoint multigraphs @@ -17,6 +19,8 @@ of chains of incident labelled edges; in particular it does not mention parity o Loops and parallel edges need no exceptional representation. -/ +@[expose] public section + namespace Sabidussi namespace LoopMultigraph diff --git a/LeanPool/Sabidussi/Parity.lean b/LeanPool/Sabidussi/Parity.lean index 121a5f6701..ae3944914e 100644 --- a/LeanPool/Sabidussi/Parity.lean +++ b/LeanPool/Sabidussi/Parity.lean @@ -3,7 +3,16 @@ Copyright (c) 2026 Nikolay Ulyanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nikolay Ulyanov -/ -import LeanPool.Sabidussi.Color +module + +public import LeanPool.Sabidussi.Color +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Abel +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # Parity algebra for the four-colour argument @@ -13,6 +22,8 @@ have been balanced: polarization of the quadratic form along an ordered word, an the parity of all four colour classes from its linear and quadratic moments. -/ +@[expose] public section + namespace Sabidussi open scoped BigOperators diff --git a/LeanPool/Sabidussi/Statement.lean b/LeanPool/Sabidussi/Statement.lean index e6bf738195..6cfc9e0e98 100644 --- a/LeanPool/Sabidussi/Statement.lean +++ b/LeanPool/Sabidussi/Statement.lean @@ -3,14 +3,10 @@ Copyright (c) 2026 Nikolay Ulyanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nikolay Ulyanov -/ -import Mathlib.Data.Fin.Rev -import Mathlib.Data.Finset.Card -import Mathlib.Data.Finset.Prod -import Mathlib.Data.Fintype.Card -import Mathlib.Data.Fintype.Prod -import Mathlib.Data.Fintype.Sets -import Mathlib.Logic.Equiv.Fin.Rotate -import Mathlib.Logic.Relation +module + +public import Mathlib.Data.Fintype.Prod +public import Mathlib.Logic.Equiv.Fin.Rotate /-! # Trusted statement layer for Sabidussi compatibility @@ -20,6 +16,8 @@ the trusted import boundary for `leanprover/comparator`; proof modules build on import them. -/ +@[expose] public section + namespace Sabidussi /-- A finite labelled endpoint multigraph. Parallel edges and loops are allowed. -/ diff --git a/LeanPool/SardMoreira.lean b/LeanPool/SardMoreira.lean index 98b9c4feb0..c5f2e059a5 100644 --- a/LeanPool/SardMoreira.lean +++ b/LeanPool/SardMoreira.lean @@ -3,28 +3,29 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import LeanPool.SardMoreira.ContDiff -import LeanPool.SardMoreira.ContDiffMoreiraHolder -import LeanPool.SardMoreira.ContinuousMultilinearMap -import LeanPool.SardMoreira.Chart -import LeanPool.SardMoreira.ChartEstimates -import LeanPool.SardMoreira.ImplicitFunction -import LeanPool.SardMoreira.LebesgueDensity -import LeanPool.SardMoreira.LinearAlgebra -import LeanPool.SardMoreira.LocalEstimates -import LeanPool.SardMoreira.MainTheorem -import LeanPool.SardMoreira.MeasureBallSemicontinuous -import LeanPool.SardMoreira.MeasureComap -import LeanPool.SardMoreira.MeasureNNReal -import LeanPool.SardMoreira.NormedSpace -import LeanPool.SardMoreira.OuterMeasureDeriv -import LeanPool.SardMoreira.ToMathlib -import LeanPool.SardMoreira.Topology -import LeanPool.SardMoreira.UnifDoublingCover -import LeanPool.SardMoreira.Unused -import LeanPool.SardMoreira.UpperLowerSemicontinuous -import LeanPool.SardMoreira.WithRPowDist +public import LeanPool.SardMoreira.ContDiff +public import LeanPool.SardMoreira.ContDiffMoreiraHolder +public import LeanPool.SardMoreira.ContinuousMultilinearMap +public import LeanPool.SardMoreira.Chart +public import LeanPool.SardMoreira.ChartEstimates +public import LeanPool.SardMoreira.ImplicitFunction +public import LeanPool.SardMoreira.LebesgueDensity +public import LeanPool.SardMoreira.LinearAlgebra +public import LeanPool.SardMoreira.LocalEstimates +public import LeanPool.SardMoreira.MainTheorem +public import LeanPool.SardMoreira.MeasureBallSemicontinuous +public import LeanPool.SardMoreira.MeasureComap +public import LeanPool.SardMoreira.MeasureNNReal +public import LeanPool.SardMoreira.NormedSpace +public import LeanPool.SardMoreira.OuterMeasureDeriv +public import LeanPool.SardMoreira.ToMathlib +public import LeanPool.SardMoreira.Topology +public import LeanPool.SardMoreira.UnifDoublingCover +public import LeanPool.SardMoreira.Unused +public import LeanPool.SardMoreira.UpperLowerSemicontinuous +public import LeanPool.SardMoreira.WithRPowDist /-! # Moreira's version of Sard's theorem @@ -37,6 +38,8 @@ Tags: analysis, measure-theory, sard-theorem, hausdorff-measure MSC: 28A78, 58C25 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/SardMoreira/Chart.lean b/LeanPool/SardMoreira/Chart.lean index 7fc2ea7197..fd6ccefa14 100644 --- a/LeanPool/SardMoreira/Chart.lean +++ b/LeanPool/SardMoreira/Chart.lean @@ -3,19 +3,29 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ - -import Mathlib.Analysis.Calculus.FDeriv.Comp -import Mathlib.Analysis.Calculus.Implicit -import Mathlib.Analysis.LocallyConvex.HahnBanach +module + +public import Mathlib.Analysis.Calculus.Implicit +public import Mathlib.Analysis.LocallyConvex.HahnBanach +public import LeanPool.SardMoreira.ContDiffMoreiraHolder +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.Normed.Module.FiniteDimension +public import Mathlib.Topology.GDelta.MetrizableSpace +import LeanPool.SardMoreira.ContDiff +import LeanPool.SardMoreira.ToMathlib.ContinuousLinearMap +import Mathlib.Analysis.Calculus.ContDiff.Comp +public import Mathlib.Analysis.Calculus.ContDiff.RCLike import Mathlib.Analysis.Normed.Module.HahnBanach -import Mathlib.Topology.OpenPartialHomeomorph.Constructions -import LeanPool.SardMoreira.ImplicitFunction -import LeanPool.SardMoreira.LocalEstimates +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.RingTheory.SimpleRing.Principal /-! # LeanPool.SardMoreira.Chart -/ +@[expose] public section + noncomputable section open scoped unitInterval Topology NNReal @@ -188,7 +198,7 @@ theorem fst_implicitFunction_chartImplicitDataEventuallyEq {f : E × F → ℝ} =ᶠ[𝓝 ((chartImplicitData f a hfa hk hdf).rightFun a)] Prod.fst := by have := (continuousAt_const.prodMk continuousAt_id).eventually (chartImplicitData f a hfa hk hdf).rightFun_implicitFunction - rw [chartImplicitData_pt] at this + simp only [chartImplicitData_pt, ImplicitFunctionData.prodFun_apply] at this filter_upwards [this] with x hx change ((chartImplicitData f a hfa hk hdf).implicitFunction (f a) x).1 = x.1 simpa only [fst_rightFun_chartImplicitData, chartImplicitData_leftFun, id_eq] using @@ -313,6 +323,8 @@ theorem exists_dim_lt_map_nhdsWithin_eq (hs : ¬IsLargeAt k α s a) rcases hs with ⟨f, hfk, hf₀, hdf⟩ set ψ := chartImplicitData f a (hfk.self_of_nhdsWithin has) hk hdf set g := ψ.implicitFunction 0 + have hg_def : g = fun x => ψ.toOpenPartialHomeomorph.symm (0, x) := + funext fun _ => ψ.implicitFunction_apply have hae : a ∈ ψ.toOpenPartialHomeomorph.source := by simpa [ψ] using ψ.pt_mem_toOpenPartialHomeomorph_source have hfa₀ : f a = 0 := hf₀.self_of_nhdsWithin has @@ -342,8 +354,12 @@ theorem exists_dim_lt_map_nhdsWithin_eq (hs : ¬IsLargeAt k α s a) simp only [ψ, chartImplicitData_pt] at this apply this.eventually refine (ContDiffAt.continuousAt_fderiv ?_ (n := k) (mod_cast hk)).tendsto.comp hg_tendsto - simp +unfoldPartialApp only [ψ, ImplicitFunctionData.prodFun, chartImplicitData] - exact hfka.contDiffAt.prodMk (by fun_prop) + rw [show ψ.prodFun = fun x => (ψ.leftFun x, ψ.rightFun x) from + funext ψ.prodFun_apply] + simp only [ψ, chartImplicitData] + apply ContDiffAt.prodMk + · exact hfka.contDiffAt + · fun_prop rw [ψ.hasStrictFDerivAt.hasFDerivAt.fderiv] apply ContinuousLinearMap.isInvertible_equiv have HcontDiff : ∀ᶠ x in 𝓝 (ψ.rightFun a), (g x ∈ s → ContDiffMoreiraHolderAt k α g x) := by @@ -351,8 +367,11 @@ theorem exists_dim_lt_map_nhdsWithin_eq (hs : ¬IsLargeAt k α s a) eventually_map, eventually_nhdsWithin_iff] at hfk filter_upwards [Hmem_target, HisInvertible, hfk] with x hx₁ hx₂ hx₃ hgx suffices ContDiffMoreiraHolderAt k α ψ.toOpenPartialHomeomorph.symm (0, x) from - this.comp (.prodMk .const .id) hk - apply OpenPartialHomeomorph.contDiffMoreiraHolderAt_symm _ hx₁ hx₂ + by simpa only [hg_def, Function.comp_def] using + this.comp (.prodMk .const .id) hk + apply OpenPartialHomeomorph.contDiffMoreiraHolderAt_symm _ hx₁ + (by simpa only [ImplicitFunctionData.toOpenPartialHomeomorph_coe, + g, ImplicitFunctionData.implicitFunction_apply] using hx₂) convert (hx₃ hgx).prodMk _ using 3 · rw [ImplicitFunctionData.toOpenPartialHomeomorph_apply] simp [ψ] @@ -371,13 +390,16 @@ theorem exists_dim_lt_map_nhdsWithin_eq (hs : ¬IsLargeAt k α s a) filter_upwards [hUo.eventually_mem hxU] with y hyU rw [← hU_fst y hyU] rw [this.fderiv_eq] - have : fderiv ℝ g x = _ := - ψ.toOpenPartialHomeomorph.hasFDerivAt_symm_inverse (hU_target x hxU) (hUinv x hxU) - |>.comp x - (ContinuousLinearMap.inr ℝ ℝ (E × (fderiv ℝ f a ∘L .inr ℝ E F).ker)).hasFDerivAt |>.fderiv - rw [this, ContinuousLinearMap.coe_comp] + have hinv := ψ.toOpenPartialHomeomorph.hasFDerivAt_symm_inverse (hU_target x hxU) + (by simpa only [ImplicitFunctionData.toOpenPartialHomeomorph_coe, + g, ImplicitFunctionData.implicitFunction_apply] using hUinv x hxU) + have hderivative := (hinv.comp x + (ContinuousLinearMap.inr ℝ ℝ (E × (fderiv ℝ f a ∘L .inr ℝ E F).ker)).hasFDerivAt).fderiv + simp only [Function.comp_def, ← hg_def] at hderivative + rw [hderivative, ContinuousLinearMap.coe_comp] apply Injective.comp - · exact (hUinv _ hxU).inverse.injective + · simpa only [ImplicitFunctionData.toOpenPartialHomeomorph_coe, + g, ImplicitFunctionData.implicitFunction_apply] using (hUinv x hxU).inverse.injective · intro x y hxy exact congrArg Prod.snd hxy · exact Submodule.finrank_le _ @@ -388,9 +410,10 @@ theorem exists_dim_lt_map_nhdsWithin_eq (hs : ¬IsLargeAt k α s a) · refine ⟨hUmem, ?_⟩ change g (ψ.rightFun a) ∈ s simpa [hga] using has - · simp only - rw [← map_implicitFunction_chartImplicitData_nhdsWithin_preimage hfka hk hdf _ hf₀ has, - nhdsWithin_inter_of_mem] + · have hmap : (𝓝[g ⁻¹' s] (ψ.rightFun a)).map g = 𝓝[s] a := + map_implicitFunction_chartImplicitData_nhdsWithin_preimage hfka hk hdf s hf₀ has + change Filter.map (fun x ↦ (x.1, (g x).2)) (𝓝[U ∩ g ⁻¹' s] (ψ.rightFun a)) = _ + rw [← hmap, nhdsWithin_inter_of_mem] · apply Filter.map_congr filter_upwards [mem_nhdsWithin_of_mem_nhds <| hUo.mem_nhds hUmem] with x hxU rw [← hU_fst x hxU] diff --git a/LeanPool/SardMoreira/ChartEstimates.lean b/LeanPool/SardMoreira/ChartEstimates.lean index 741707f8ab..bd1483bfa1 100644 --- a/LeanPool/SardMoreira/ChartEstimates.lean +++ b/LeanPool/SardMoreira/ChartEstimates.lean @@ -3,14 +3,21 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.MeasureTheory.Measure.Hausdorff -import LeanPool.SardMoreira.Chart +public import Mathlib.MeasureTheory.Measure.Hausdorff +public import LeanPool.SardMoreira.Chart +import LeanPool.SardMoreira.LocalEstimates +import Mathlib.Analysis.Calculus.ContDiff.Comp +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # LeanPool.SardMoreira.ChartEstimates -/ +@[expose] public section + open scoped unitInterval Topology NNReal open Asymptotics Filter Set Metric Function MeasureTheory Measure diff --git a/LeanPool/SardMoreira/ContDiff.lean b/LeanPool/SardMoreira/ContDiff.lean index 383245b2e2..4e37c5249e 100644 --- a/LeanPool/SardMoreira/ContDiff.lean +++ b/LeanPool/SardMoreira/ContDiff.lean @@ -3,30 +3,26 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.Analysis.Calculus.ContDiff.Basic -import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas -import Mathlib.Analysis.Calculus.FDeriv.Symmetric -import Mathlib.Analysis.Calculus.ContDiff.FaaDiBruno -import Mathlib.Analysis.Calculus.ContDiff.FiniteDimension -import Mathlib.Analysis.Normed.Module.Multilinear.Basic -import Mathlib.Analysis.Normed.Module.Multilinear.Curry -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +import Mathlib.Analysis.Calculus.FDeriv.OfCompLeft + +public import Mathlib.Analysis.Calculus.ContDiff.FaaDiBruno +public import Mathlib.Analysis.Calculus.ContDiff.Defs import LeanPool.SardMoreira.ToMathlib.ContinuousLinearMap +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Calculus.ContDiff.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD /-! # LeanPool.SardMoreira.ContDiff -/ +@[expose] public section + open scoped unitInterval Topology NNReal open Function Asymptotics Filter Set diff --git a/LeanPool/SardMoreira/ContDiffMoreiraHolder.lean b/LeanPool/SardMoreira/ContDiffMoreiraHolder.lean index 854c41f96f..45d90ffbd2 100644 --- a/LeanPool/SardMoreira/ContDiffMoreiraHolder.lean +++ b/LeanPool/SardMoreira/ContDiffMoreiraHolder.lean @@ -3,31 +3,25 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.Analysis.Calculus.ContDiff.Basic -import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas -import Mathlib.Analysis.Asymptotics.Lemmas -import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics -import Mathlib.Analysis.SpecialFunctions.Pow.NNReal -import Mathlib.Topology.MetricSpace.Holder -import Mathlib.Topology.UnitInterval -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith + +public import Mathlib.Topology.MetricSpace.Holder +public import Mathlib.Analysis.Calculus.ContDiff.Defs import LeanPool.SardMoreira.ContDiff import LeanPool.SardMoreira.ContinuousMultilinearMap +import LeanPool.SardMoreira.ToMathlib.ContinuousLinearMap +import Mathlib.Analysis.Calculus.ContDiff.Comp +import Mathlib.Analysis.Calculus.FDeriv.OfCompLeft +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # LeanPool.SardMoreira.ContDiffMoreiraHolder -/ +@[expose] public section + open scoped unitInterval Topology NNReal open Asymptotics Filter Set diff --git a/LeanPool/SardMoreira/ContinuousMultilinearMap.lean b/LeanPool/SardMoreira/ContinuousMultilinearMap.lean index 569e3d21eb..1547c14429 100644 --- a/LeanPool/SardMoreira/ContinuousMultilinearMap.lean +++ b/LeanPool/SardMoreira/ContinuousMultilinearMap.lean @@ -3,27 +3,23 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.Analysis.Normed.Module.Multilinear.Basic -import Mathlib.Analysis.Normed.Module.Multilinear.Curry -import Mathlib.Analysis.Asymptotics.Lemmas -import Mathlib.Topology.Algebra.Module.Multilinear.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +public import Mathlib.Analysis.Normed.Module.Multilinear.Basic +public import Mathlib.Analysis.Asymptotics.Defs import LeanPool.SardMoreira.ToMathlib.ContinuousLinearMap +import Mathlib.Algebra.Order.Field.Power +import Mathlib.Analysis.Asymptotics.Lemmas +import Mathlib.Analysis.Asymptotics.Prod +import Mathlib.Analysis.Normed.Operator.NormedSpace +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.SardMoreira.ContinuousMultilinearMap -/ +@[expose] public section + open scoped Asymptotics BigOperators section AddMonoid diff --git a/LeanPool/SardMoreira/ImplicitFunction.lean b/LeanPool/SardMoreira/ImplicitFunction.lean index c94282357a..2fb3804d5f 100644 --- a/LeanPool/SardMoreira/ImplicitFunction.lean +++ b/LeanPool/SardMoreira/ImplicitFunction.lean @@ -3,16 +3,18 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.Analysis.Calculus.Implicit -import Mathlib.Topology.OpenPartialHomeomorph.Constructions -import LeanPool.SardMoreira.ContDiffMoreiraHolder -import LeanPool.SardMoreira.LinearAlgebra +public import Mathlib.Analysis.Calculus.Implicit +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.SardMoreira.ImplicitFunction -/ +@[expose] public section + noncomputable section open scoped Topology unitInterval @@ -41,17 +43,18 @@ def implicitFunctionDataOfComplementedKerRange (f : E → F) (f' : E →L[𝕜] rw [LinearMap.range_eq_top] rintro ⟨_, x, rfl⟩ simp_all - let φ := implicitFunctionDataOfComplemented (hrange.choose ∘ f) (hrange.choose ∘L f') - (hrange.choose.hasStrictFDerivAt.comp a hf) hrange_eq (by rwa [hker_eq]) refine - { __ := φ, + { leftFun := hrange.choose ∘ f + leftDeriv := hrange.choose ∘L f' + pt := a + hasStrictFDerivAt_leftFun := hrange.choose.hasStrictFDerivAt.comp a hf + range_leftDeriv := hrange_eq rightFun := hker.choose rightDeriv := hker.choose range_rightDeriv := LinearMap.range_eq_of_proj (Classical.choose_spec hker) hasStrictFDerivAt_rightFun := hker.choose.hasStrictFDerivAt isCompl_ker := ?_ } - simpa only [φ, implicitFunctionDataOfComplemented, hker_eq] - using LinearMap.isCompl_of_proj hker.choose_spec + simpa only [hker_eq] using LinearMap.isCompl_of_proj hker.choose_spec /-- The `OpenPartialHomeomorph` associated to `implicitFunctionDataOfComplementedKerRange`. -/ @@ -82,7 +85,7 @@ theorem implicitToOpenPartialHomeomorphOfComplementedKerRange_apply {f : E → F -- `simp [implicitToOpenPartialHomeomorphOfComplementedKerRange, -- implicitFunctionDataOfComplementedKerRange]` works but it's much slower simp only [implicitToOpenPartialHomeomorphOfComplementedKerRange, - implicitFunctionDataOfComplementedKerRange, implicitFunctionDataOfComplemented, + implicitFunctionDataOfComplementedKerRange, Function.comp_apply, ImplicitFunctionData.toOpenPartialHomeomorph_apply] theorem coe_implicitToOpenPartialHomeomorphOfComplementedKerRange {f : E → F} {f' : E →L[𝕜] F} diff --git a/LeanPool/SardMoreira/LebesgueDensity.lean b/LeanPool/SardMoreira/LebesgueDensity.lean index 82ed4e3237..2aa594d289 100644 --- a/LeanPool/SardMoreira/LebesgueDensity.lean +++ b/LeanPool/SardMoreira/LebesgueDensity.lean @@ -3,28 +3,24 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import LeanPool.SardMoreira.UpperLowerSemicontinuous -import LeanPool.SardMoreira.NormedSpace -import LeanPool.SardMoreira.MeasureComap +public import Mathlib.MeasureTheory.Constructions.HaarToSphere import LeanPool.SardMoreira.MeasureBallSemicontinuous +import LeanPool.SardMoreira.MeasureComap +import LeanPool.SardMoreira.NormedSpace import LeanPool.SardMoreira.Topology -import Mathlib.Algebra.Order.Star.Real -import Mathlib.LinearAlgebra.FreeModule.PID -import Mathlib.MeasureTheory.Constructions.HaarToSphere -import Mathlib.MeasureTheory.Covering.Besicovitch -import Mathlib.RingTheory.SimpleRing.Principal -import Mathlib.Topology.EMetricSpace.Paracompact -import Mathlib.Topology.Separation.CompletelyRegular import Mathlib.Dynamics.Ergodic.Action.Regular -import Mathlib.MeasureTheory.Constructions.Polish.Basic import Mathlib.MeasureTheory.Measure.Decomposition.RadonNikodym import Mathlib.MeasureTheory.Measure.Haar.Unique +import Mathlib.Topology.Separation.CompletelyRegular /-! # LeanPool.SardMoreira.LebesgueDensity -/ +@[expose] public section + open scoped ENNReal NNReal Set.Notation Pointwise open MeasureTheory Filter Set Function Metric Topology diff --git a/LeanPool/SardMoreira/LinearAlgebra.lean b/LeanPool/SardMoreira/LinearAlgebra.lean index 1fa9eb0ab1..9da6aa52d8 100644 --- a/LeanPool/SardMoreira/LinearAlgebra.lean +++ b/LeanPool/SardMoreira/LinearAlgebra.lean @@ -3,27 +3,19 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.LinearAlgebra.Dimension.Finrank -import Mathlib.LinearAlgebra.Dimension.LinearMap +public import Mathlib.LinearAlgebra.Dimension.LinearMap +public import Mathlib.Basic.Real.Basic +public import Mathlib.LinearAlgebra.FiniteDimensional.Defs import Mathlib.LinearAlgebra.FiniteDimensional.Basic -import Mathlib.LinearAlgebra.Prod -import Mathlib.LinearAlgebra.Quotient.Basic -import Mathlib.Basic.Real.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.SardMoreira.LinearAlgebra -/ +@[expose] public section + open Function open Module (finrank) diff --git a/LeanPool/SardMoreira/LocalEstimates.lean b/LeanPool/SardMoreira/LocalEstimates.lean index 8ff5e22d40..fd79c49096 100644 --- a/LeanPool/SardMoreira/LocalEstimates.lean +++ b/LeanPool/SardMoreira/LocalEstimates.lean @@ -3,18 +3,21 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.Analysis.Calculus.DiffContOnCl -import Mathlib.Analysis.Calculus.LineDeriv.Basic -import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus +public import Mathlib.Analysis.Calculus.DiffContOnCl +public import Mathlib.Analysis.Calculus.LineDeriv.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.SardMoreira.LebesgueDensity -import LeanPool.SardMoreira.ContDiff import LeanPool.SardMoreira.ToMathlib.PR32186 +import Mathlib.Analysis.Normed.Affine.AddTorsor /-! # LeanPool.SardMoreira.LocalEstimates -/ +@[expose] public section + open scoped Topology NNReal ENNReal unitInterval open Asymptotics Filter MeasureTheory AffineMap Set Metric diff --git a/LeanPool/SardMoreira/MainTheorem.lean b/LeanPool/SardMoreira/MainTheorem.lean index 6da98ab2f8..7310c45a38 100644 --- a/LeanPool/SardMoreira/MainTheorem.lean +++ b/LeanPool/SardMoreira/MainTheorem.lean @@ -3,24 +3,26 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.Analysis.Calculus.FDeriv.Comp -import Mathlib.Analysis.Calculus.Implicit -import Mathlib.Topology.MetricSpace.HausdorffDimension -import Mathlib.Topology.OpenPartialHomeomorph.Constructions -import LeanPool.SardMoreira.ContDiffMoreiraHolder +public import Mathlib.Topology.MetricSpace.HausdorffDimension +public import LeanPool.SardMoreira.ContDiffMoreiraHolder +import LeanPool.SardMoreira.ChartEstimates +import LeanPool.SardMoreira.ContDiff import LeanPool.SardMoreira.ImplicitFunction +import LeanPool.SardMoreira.LebesgueDensity import LeanPool.SardMoreira.LinearAlgebra -import LeanPool.SardMoreira.ChartEstimates -import LeanPool.SardMoreira.WithRPowDist import LeanPool.SardMoreira.OuterMeasureDeriv -import LeanPool.SardMoreira.ToMathlib.PR33029 -import LeanPool.SardMoreira.ToMathlib.PR32993 +import LeanPool.SardMoreira.WithRPowDist +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Topology.Separation.CompletelyRegular /-! # LeanPool.SardMoreira.MainTheorem -/ +@[expose] public section + open scoped unitInterval NNReal Topology ENNReal Pointwise open MeasureTheory Measure Metric @@ -626,8 +628,7 @@ theorem hausdorffMeasure_image_nhdsWithin_null_of_finrank_eq rw [hdf.coe_implicitToOpenPartialHomeomorphOfComplementedKerRange hker hrange] funext x rw [ImplicitFunctionData.prodFun_apply] - simp [φ, HasStrictFDerivAt.implicitFunctionDataOfComplementedKerRange, - HasStrictFDerivAt.implicitFunctionDataOfComplemented] + simp [φ, HasStrictFDerivAt.implicitFunctionDataOfComplementedKerRange] rw [hprod] simpa [φ, HasStrictFDerivAt.implicitFunctionDataOfComplementedKerRange_pt] using φ.isInvertible_fderiv_prodFun diff --git a/LeanPool/SardMoreira/MeasureBallSemicontinuous.lean b/LeanPool/SardMoreira/MeasureBallSemicontinuous.lean index 36708f1765..128005f6f8 100644 --- a/LeanPool/SardMoreira/MeasureBallSemicontinuous.lean +++ b/LeanPool/SardMoreira/MeasureBallSemicontinuous.lean @@ -3,17 +3,22 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.Analysis.Normed.Order.Lattice +import Mathlib.Topology.Order.AtTopBotIxx + +public import Mathlib.MeasureTheory.Measure.OpenPos +public import Mathlib.Topology.Order.LowerUpperTopology import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Normed.Order.Lattice import Mathlib.MeasureTheory.Constructions.BorelSpace.Order -import Mathlib.MeasureTheory.Measure.OpenPos -import Mathlib.Topology.Order.LowerUpperTopology /-! # LeanPool.SardMoreira.MeasureBallSemicontinuous -/ +@[expose] public section + open MeasureTheory Topology Filter Set Metric open scoped NNReal diff --git a/LeanPool/SardMoreira/MeasureComap.lean b/LeanPool/SardMoreira/MeasureComap.lean index 0b083ae45d..ed28736ef4 100644 --- a/LeanPool/SardMoreira/MeasureComap.lean +++ b/LeanPool/SardMoreira/MeasureComap.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module +public import Mathlib.MeasureTheory.Measure.Typeclasses.SFinite import Mathlib.Analysis.Normed.Group.Basic -import Mathlib.MeasureTheory.Measure.Typeclasses.SFinite /-! # LeanPool.SardMoreira.MeasureComap -/ +@[expose] public section + open scoped ENNReal NNReal Set.Notation Pointwise open MeasureTheory Filter Set Function Metric Topology diff --git a/LeanPool/SardMoreira/MeasureNNReal.lean b/LeanPool/SardMoreira/MeasureNNReal.lean index 06a0d23a8a..4cd829d853 100644 --- a/LeanPool/SardMoreira/MeasureNNReal.lean +++ b/LeanPool/SardMoreira/MeasureNNReal.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.SardMoreira.MeasureComap -import Mathlib.MeasureTheory.Measure.Haar.OfBasis /-! # LeanPool.SardMoreira.MeasureNNReal -/ +@[expose] public section + open scoped ENNReal NNReal Set.Notation Pointwise open MeasureTheory Filter Set Function Metric Topology diff --git a/LeanPool/SardMoreira/NormedSpace.lean b/LeanPool/SardMoreira/NormedSpace.lean index df838d037d..d28ac6fdcc 100644 --- a/LeanPool/SardMoreira/NormedSpace.lean +++ b/LeanPool/SardMoreira/NormedSpace.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.Analysis.Normed.Module.Basic +public import Mathlib.Analysis.Normed.Module.Basic /-! # LeanPool.SardMoreira.NormedSpace -/ +@[expose] public section + namespace NNReal variable {E : Type*} [SeminormedAddCommGroup E] [NormedSpace ℝ E] diff --git a/LeanPool/SardMoreira/OuterMeasureDeriv.lean b/LeanPool/SardMoreira/OuterMeasureDeriv.lean index 93f05dd408..b9b73d8731 100644 --- a/LeanPool/SardMoreira/OuterMeasureDeriv.lean +++ b/LeanPool/SardMoreira/OuterMeasureDeriv.lean @@ -3,30 +3,20 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.MeasureTheory.Covering.Besicovitch -import Mathlib.MeasureTheory.Covering.Differentiation -import Mathlib.MeasureTheory.Covering.Vitali -import Mathlib.MeasureTheory.Covering.VitaliFamily -import Mathlib.MeasureTheory.Measure.Doubling -import Mathlib.MeasureTheory.Measure.Hausdorff -import Mathlib.MeasureTheory.OuterMeasure.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +public import Mathlib.MeasureTheory.Covering.Besicovitch +public import Mathlib.MeasureTheory.Measure.Hausdorff import LeanPool.SardMoreira.UnifDoublingCover +import Mathlib.MeasureTheory.Covering.Vitali +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.SardMoreira.OuterMeasureDeriv -/ +@[expose] public section + namespace MeasureTheory.Measure open scoped ENNReal NNReal Topology diff --git a/LeanPool/SardMoreira/ToMathlib.lean b/LeanPool/SardMoreira/ToMathlib.lean index 22809bc50a..1af3a99af5 100644 --- a/LeanPool/SardMoreira/ToMathlib.lean +++ b/LeanPool/SardMoreira/ToMathlib.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import LeanPool.SardMoreira.ToMathlib.ContinuousLinearMap -import LeanPool.SardMoreira.ToMathlib.PR31960 -import LeanPool.SardMoreira.ToMathlib.PR32186 -import LeanPool.SardMoreira.ToMathlib.PR32986 -import LeanPool.SardMoreira.ToMathlib.PR32993 -import LeanPool.SardMoreira.ToMathlib.PR33029 -import LeanPool.SardMoreira.ToMathlib.PR33114 +public import LeanPool.SardMoreira.ToMathlib.ContinuousLinearMap +public import LeanPool.SardMoreira.ToMathlib.PR31960 +public import LeanPool.SardMoreira.ToMathlib.PR32186 +public import LeanPool.SardMoreira.ToMathlib.PR32986 +public import LeanPool.SardMoreira.ToMathlib.PR32993 +public import LeanPool.SardMoreira.ToMathlib.PR33029 +public import LeanPool.SardMoreira.ToMathlib.PR33114 +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Lemmas slated for Mathlib @@ -18,3 +22,5 @@ import LeanPool.SardMoreira.ToMathlib.PR33114 This module gathers auxiliary lemmas from the SardMoreira project that are candidates for upstreaming to Mathlib. -/ + +@[expose] public section diff --git a/LeanPool/SardMoreira/ToMathlib/ContinuousLinearMap.lean b/LeanPool/SardMoreira/ToMathlib/ContinuousLinearMap.lean index 3b34f1465f..b05aa9e81c 100644 --- a/LeanPool/SardMoreira/ToMathlib/ContinuousLinearMap.lean +++ b/LeanPool/SardMoreira/ToMathlib/ContinuousLinearMap.lean @@ -3,36 +3,21 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.Analysis.Normed.Operator.Basic -import Mathlib.Analysis.Normed.Operator.Mul -import Mathlib.Analysis.Normed.Operator.NNNorm -import Mathlib.Analysis.Normed.Operator.NormedSpace -import Mathlib.Analysis.Calculus.FDeriv.Basic -import Mathlib.Analysis.Asymptotics.Lemmas -import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.Basic -import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.Idempotent -import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.PiProd -import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.Quotient -import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.Restrict -import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.RestrictScalars -import Mathlib.Analysis.Calculus.ContDiff.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +public import Mathlib.Analysis.Normed.Operator.Basic +public import Mathlib.Analysis.Asymptotics.Defs +public import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.Invertible +import Mathlib.Analysis.Normed.Operator.BoundedLinearMaps +import Mathlib.Tactic.Positivity.Finset /-! # Auxiliary theorems about `ContinuousLinearMap` Mostly about `ContinuousLinearMap.IsInvertible` and `ContinuousLinearMap.inverse`. -/ +@[expose] public section + open Filter Function Asymptotics Topology namespace ContinuousLinearMap diff --git a/LeanPool/SardMoreira/ToMathlib/PR31960.lean b/LeanPool/SardMoreira/ToMathlib/PR31960.lean index 94a3ca5df6..6bb690714e 100644 --- a/LeanPool/SardMoreira/ToMathlib/PR31960.lean +++ b/LeanPool/SardMoreira/ToMathlib/PR31960.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.MeasureTheory.Constructions.HaarToSphere +public import Mathlib.MeasureTheory.Constructions.HaarToSphere + +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Lemmas re-exported from Mathlib (formerly PR31960) @@ -14,3 +19,5 @@ used to provide have since been upstreamed to Mathlib. This module re-exports them via the relevant Mathlib import so existing import sites continue to resolve. -/ + +@[expose] public section diff --git a/LeanPool/SardMoreira/ToMathlib/PR32186.lean b/LeanPool/SardMoreira/ToMathlib/PR32186.lean index 05b9bda111..d7dcfde2c5 100644 --- a/LeanPool/SardMoreira/ToMathlib/PR32186.lean +++ b/LeanPool/SardMoreira/ToMathlib/PR32186.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import Mathlib.Analysis.Normed.Module.Completion +import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus /-! # Displacement is at most the integral of the speed @@ -14,6 +17,8 @@ In this file we prove several version of the following fact: the displacement (`dist (f a) (f b)`) is at most the integral of `‖deriv f‖` over `[a, b]`. -/ +@[expose] public section + open Filter Set MeasureTheory Measure diff --git a/LeanPool/SardMoreira/ToMathlib/PR32986.lean b/LeanPool/SardMoreira/ToMathlib/PR32986.lean index ae10daf547..a50872b541 100644 --- a/LeanPool/SardMoreira/ToMathlib/PR32986.lean +++ b/LeanPool/SardMoreira/ToMathlib/PR32986.lean @@ -3,23 +3,16 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.MeasureTheory.Measure.Prod -import Mathlib.MeasureTheory.Measure.OpenPos -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +public import Mathlib.MeasureTheory.Measure.Prod +import Mathlib.Tactic.Positivity.Finset /-! Lemmas from https://github.com/leanprover-community/mathlib4/pull/32986 -/ +@[expose] public section + open scoped Topology Filter open MeasureTheory Measure Metric diff --git a/LeanPool/SardMoreira/ToMathlib/PR32993.lean b/LeanPool/SardMoreira/ToMathlib/PR32993.lean index c7dd67a76d..55990bc6cd 100644 --- a/LeanPool/SardMoreira/ToMathlib/PR32993.lean +++ b/LeanPool/SardMoreira/ToMathlib/PR32993.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.Basic.ENNReal.Basic +public import Mathlib.Basic.ENNReal.Basic /-! # LeanPool.SardMoreira.ToMathlib.PR32993 -/ +@[expose] public section + open ENNReal protected theorem ENNReal.div_right_comm {a b c : ℝ≥0∞} : a / b / c = a / c / b := by diff --git a/LeanPool/SardMoreira/ToMathlib/PR33029.lean b/LeanPool/SardMoreira/ToMathlib/PR33029.lean index afbed9c906..ee626d1065 100644 --- a/LeanPool/SardMoreira/ToMathlib/PR33029.lean +++ b/LeanPool/SardMoreira/ToMathlib/PR33029.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.MeasureTheory.Measure.Prod -import Mathlib.MeasureTheory.Constructions.Pi +public import Mathlib.MeasureTheory.Measure.Prod +public import Mathlib.MeasureTheory.Constructions.Pi + +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv +import Mathlib.Tactic.Measurability.Init +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Lemmas re-exported from Mathlib (formerly PR33029) @@ -15,3 +22,5 @@ this file used to define have since been upstreamed to Mathlib. This module re-exports them via the relevant Mathlib imports so existing import sites continue to resolve. -/ + +@[expose] public section diff --git a/LeanPool/SardMoreira/ToMathlib/PR33114.lean b/LeanPool/SardMoreira/ToMathlib/PR33114.lean index ca745db959..41247f656d 100644 --- a/LeanPool/SardMoreira/ToMathlib/PR33114.lean +++ b/LeanPool/SardMoreira/ToMathlib/PR33114.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module - -import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +public import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Analysis.MeanInequalitiesPow import Mathlib.Topology.EMetricSpace.Paracompact import Mathlib.Topology.Separation.CompletelyRegular -import Mathlib.Analysis.MeanInequalitiesPow /-! # A copy of a metric space with metric given by `d x y = dist x y ^ α` @@ -38,6 +38,8 @@ then these sets become balls, and we can apply Vitali theorem. [Moreira2001] -/ +@[expose] public section + open scoped ENNReal NNReal Filter Uniformity Topology open Function diff --git a/LeanPool/SardMoreira/Topology.lean b/LeanPool/SardMoreira/Topology.lean index affc7e2f5b..d313119bc3 100644 --- a/LeanPool/SardMoreira/Topology.lean +++ b/LeanPool/SardMoreira/Topology.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module +public import Mathlib.Topology.Defs.Filter import Mathlib.Topology.NhdsWithin /-! # LeanPool.SardMoreira.Topology -/ +@[expose] public section + open Filter open scoped Topology diff --git a/LeanPool/SardMoreira/UnifDoublingCover.lean b/LeanPool/SardMoreira/UnifDoublingCover.lean index 2ebb6063b7..334576982e 100644 --- a/LeanPool/SardMoreira/UnifDoublingCover.lean +++ b/LeanPool/SardMoreira/UnifDoublingCover.lean @@ -3,24 +3,19 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module +public import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic +public import Mathlib.MeasureTheory.Measure.Doubling import Mathlib.MeasureTheory.Covering.Besicovitch -import Mathlib.MeasureTheory.Covering.LiminfLimsup -import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +import Mathlib.MeasureTheory.Covering.Vitali +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.SardMoreira.UnifDoublingCover -/ +@[expose] public section + open MeasureTheory Measure Metric Set theorem IsUnifLocDoublingMeasure.exists_closedBall_covering_tsum_measure_le_of_measure_zero diff --git a/LeanPool/SardMoreira/Unused.lean b/LeanPool/SardMoreira/Unused.lean index cf95875a9b..e3e9615654 100644 --- a/LeanPool/SardMoreira/Unused.lean +++ b/LeanPool/SardMoreira/Unused.lean @@ -3,13 +3,28 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module + +public import Mathlib.Analysis.Calculus.ContDiff.Defs +public import Mathlib.Analysis.Calculus.ContDiff.FaaDiBruno +public import Mathlib.LinearAlgebra.Dimension.Finrank +public import Mathlib.LinearAlgebra.InvariantBasisNumber import LeanPool.SardMoreira.ContDiff +import Mathlib.Algebra.Order.BigOperators.Expect +import Mathlib.Analysis.Calculus.FDeriv.OfCompLeft +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.LinearAlgebra.Dimension.Constructions +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD /-! # LeanPool.SardMoreira.Unused -/ +@[expose] public section + open scoped Topology open Filter Set diff --git a/LeanPool/SardMoreira/UpperLowerSemicontinuous.lean b/LeanPool/SardMoreira/UpperLowerSemicontinuous.lean index 6e1a90b4d2..7bc531ae8e 100644 --- a/LeanPool/SardMoreira/UpperLowerSemicontinuous.lean +++ b/LeanPool/SardMoreira/UpperLowerSemicontinuous.lean @@ -3,14 +3,23 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.Topology.Order.LowerUpperTopology -import Mathlib.Topology.Semicontinuity.Basic +public import Mathlib.Topology.Order.LowerUpperTopology +public import Mathlib.Algebra.Group.End +public import Mathlib.Order.Filter.Extr +public import Mathlib.Topology.Semicontinuity.Defs +import Mathlib.Algebra.Order.Module.Field +import Mathlib.Data.EReal.Operations +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # LeanPool.SardMoreira.UpperLowerSemicontinuous -/ +@[expose] public section + open Set Filter Function TopologicalSpace namespace Topology diff --git a/LeanPool/SardMoreira/WithRPowDist.lean b/LeanPool/SardMoreira/WithRPowDist.lean index 95fd02a691..f17f1eefe9 100644 --- a/LeanPool/SardMoreira/WithRPowDist.lean +++ b/LeanPool/SardMoreira/WithRPowDist.lean @@ -3,29 +3,18 @@ Copyright (c) 2026 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ +module -import Mathlib.Analysis.SpecialFunctions.Pow.NNReal -import Mathlib.MeasureTheory.Measure.Haar.Basic -import Mathlib.MeasureTheory.Measure.Hausdorff -import Mathlib.MeasureTheory.Measure.Doubling -import Mathlib.Topology.EMetricSpace.Paracompact -import Mathlib.Topology.MetricSpace.Pseudo.Defs -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith -import LeanPool.SardMoreira.ToMathlib.PR33114 +public import Mathlib.MeasureTheory.Measure.Hausdorff +public import LeanPool.SardMoreira.ToMathlib.PR33114 +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.SardMoreira.WithRPowDist -/ +@[expose] public section + open scoped ENNReal NNReal Filter Uniformity Topology open Function diff --git a/LeanPool/SelbergSieve4.lean b/LeanPool/SelbergSieve4.lean index 66432cc32a..62363176fd 100644 --- a/LeanPool/SelbergSieve4.lean +++ b/LeanPool/SelbergSieve4.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ +module -import LeanPool.SelbergSieve4.MainResults +public import LeanPool.SelbergSieve4.MainResults +import LeanPool.SelbergSieve4.Tactic.AesopInit +import Mathlib.Algebra.Order.Floor.Semifield +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt +import Mathlib.Tactic.Positivity.Finset /-! # Selberg Sieve @@ -16,3 +23,5 @@ Main declarations: `fundamental_theorem_simple`, `primeCounting_isBigO_atTop`, ` Tags: number-theory, analytic-number-theory, sieve-theory, prime-counting MSC: 11N35, 11N05, 11N13 -/ + +@[expose] public section diff --git a/LeanPool/SelbergSieve4/Applications.lean b/LeanPool/SelbergSieve4/Applications.lean index 55a99d26b0..d947331e26 100644 --- a/LeanPool/SelbergSieve4/Applications.lean +++ b/LeanPool/SelbergSieve4/Applications.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ +module -import LeanPool.SelbergSieve4.Applications.BrunTitchmarsh -import LeanPool.SelbergSieve4.Applications.PrimeCountingUpperBound +public import LeanPool.SelbergSieve4.Applications.BrunTitchmarsh +public import LeanPool.SelbergSieve4.Applications.PrimeCountingUpperBound +import LeanPool.SelbergSieve4.Tactic.AesopInit +import Mathlib.Algebra.Order.Floor.Semifield +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt +import Mathlib.Tactic.Positivity.Finset /-! # Applications of the Selberg sieve -/ + +@[expose] public section diff --git a/LeanPool/SelbergSieve4/Applications/BrunTitchmarsh.lean b/LeanPool/SelbergSieve4/Applications/BrunTitchmarsh.lean index 2598307a63..2aa4d6cf0a 100644 --- a/LeanPool/SelbergSieve4/Applications/BrunTitchmarsh.lean +++ b/LeanPool/SelbergSieve4/Applications/BrunTitchmarsh.lean @@ -3,21 +3,25 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ -import Mathlib.NumberTheory.Primorial -import Mathlib.NumberTheory.PrimeCounting -import Mathlib.Analysis.Asymptotics.Lemmas -import Mathlib.Analysis.Complex.ExponentialBounds -import Mathlib.Data.Set.Card -import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics +module + +public import Mathlib.NumberTheory.Primorial +public import LeanPool.SelbergSieve4.Selberg +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +public import LeanPool.SelbergSieve4.Applications.PrimeCountingUpperBound +import LeanPool.SelbergSieve4.Tactic.AesopInit import Mathlib.Algebra.Order.Floor.Semifield -import Mathlib.Order.Interval.Finset.SuccPred -import LeanPool.SelbergSieve4.Selberg -import LeanPool.SelbergSieve4.Applications.PrimeCountingUpperBound +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.SelbergSieve4.Applications.BrunTitchmarsh -/ +@[expose] public section + open PrimeUpperBound open scoped Nat ArithmeticFunction.zeta ArithmeticFunction.Moebius ArithmeticFunction.omega BigOperators diff --git a/LeanPool/SelbergSieve4/Applications/PrimeCountingUpperBound.lean b/LeanPool/SelbergSieve4/Applications/PrimeCountingUpperBound.lean index 5b2455448f..26d1967db6 100644 --- a/LeanPool/SelbergSieve4/Applications/PrimeCountingUpperBound.lean +++ b/LeanPool/SelbergSieve4/Applications/PrimeCountingUpperBound.lean @@ -3,19 +3,25 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ -import Mathlib.NumberTheory.Primorial -import Mathlib.NumberTheory.PrimeCounting -import Mathlib.Analysis.Asymptotics.Lemmas -import Mathlib.Analysis.Complex.ExponentialBounds -import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics -import Mathlib.Algebra.Order.Field.Basic +module + +public import Mathlib.NumberTheory.Primorial +public import LeanPool.SelbergSieve4.Selberg +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +import LeanPool.SelbergSieve4.AuxResults +import LeanPool.SelbergSieve4.Tactic.AesopInit import Mathlib.Algebra.Order.Field.GeomSum -import LeanPool.SelbergSieve4.Selberg +import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # LeanPool.SelbergSieve4.Applications.PrimeCountingUpperBound -/ +@[expose] public section + open scoped Nat Nat.Prime ArithmeticFunction.zeta ArithmeticFunction.Moebius open scoped ArithmeticFunction.omega BigOperators diff --git a/LeanPool/SelbergSieve4/AuxResults.lean b/LeanPool/SelbergSieve4/AuxResults.lean index 4896096d32..234e89a196 100644 --- a/LeanPool/SelbergSieve4/AuxResults.lean +++ b/LeanPool/SelbergSieve4/AuxResults.lean @@ -3,28 +3,21 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ -import Mathlib.Analysis.Asymptotics.Lemmas -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +module + +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +public import Mathlib.NumberTheory.ArithmeticFunction.Moebius +import LeanPool.SelbergSieve4.ForMathlib.ProdsAntidiagonal import Mathlib.Analysis.SpecialFunctions.Integrals.Basic -import Mathlib.Analysis.SpecialFunctions.Log.Basic import Mathlib.Analysis.SumIntegralComparisons -import Mathlib.Algebra.Order.Field.Basic -import Mathlib.NumberTheory.ArithmeticFunction.Defs -import Mathlib.NumberTheory.ArithmeticFunction.Misc -import Mathlib.NumberTheory.ArithmeticFunction.Moebius import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt -import Mathlib.NumberTheory.ArithmeticFunction.Zeta -import LeanPool.SelbergSieve4.ForMathlib -import LeanPool.SelbergSieve4.ForArithmeticFunction -import LeanPool.SelbergSieve4.ForMathlib.ProdsAntidiagonal -import Mathlib.Analysis.SpecialFunctions.NonIntegrable -import Mathlib.Data.Nat.Prime.Basic -import LeanPool.SelbergSieve4.Tactic.Multiplicativity /-! # LeanPool.SelbergSieve4.AuxResults -/ +@[expose] public section + --import SelbergSieve.AesopDiv noncomputable section diff --git a/LeanPool/SelbergSieve4/ForArithmeticFunction.lean b/LeanPool/SelbergSieve4/ForArithmeticFunction.lean index 15a04cffc7..120acf2e34 100644 --- a/LeanPool/SelbergSieve4/ForArithmeticFunction.lean +++ b/LeanPool/SelbergSieve4/ForArithmeticFunction.lean @@ -3,16 +3,21 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ -import Mathlib.Basic.Real.Basic -import Mathlib.NumberTheory.ArithmeticFunction.Defs -import Mathlib.NumberTheory.ArithmeticFunction.Misc -import Mathlib.NumberTheory.ArithmeticFunction.Moebius -import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt -import Mathlib.NumberTheory.ArithmeticFunction.Zeta -import LeanPool.SelbergSieve4.Tactic.Multiplicativity +module + +public import Mathlib.NumberTheory.ArithmeticFunction.Defs +public import Mathlib.NumberTheory.ArithmeticFunction.Misc +public import Mathlib.NumberTheory.ArithmeticFunction.Moebius +public import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt +public import Mathlib.NumberTheory.ArithmeticFunction.Zeta +public import Mathlib.Basic.Real.Basic +public import LeanPool.SelbergSieve4.Tactic.Multiplicativity + /-! # LeanPool.SelbergSieve4.ForArithmeticFunction Imported Lean Pool material for `LeanPool.SelbergSieve4.ForArithmeticFunction`. -/ + +@[expose] public section diff --git a/LeanPool/SelbergSieve4/ForMathlib.lean b/LeanPool/SelbergSieve4/ForMathlib.lean index 05bb1a2f9b..24169e0f7c 100644 --- a/LeanPool/SelbergSieve4/ForMathlib.lean +++ b/LeanPool/SelbergSieve4/ForMathlib.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ +module -import LeanPool.SelbergSieve4.ForMathlib.Basic -import LeanPool.SelbergSieve4.ForMathlib.ProdsAntidiagonal +public import LeanPool.SelbergSieve4.ForMathlib.Basic +public import LeanPool.SelbergSieve4.ForMathlib.ProdsAntidiagonal +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt +import Mathlib.Tactic.Positivity.Finset /-! # Auxiliary lemmas for Mathlib -/ + +@[expose] public section diff --git a/LeanPool/SelbergSieve4/ForMathlib/Basic.lean b/LeanPool/SelbergSieve4/ForMathlib/Basic.lean index 66e0f9e037..947f7f12eb 100644 --- a/LeanPool/SelbergSieve4/ForMathlib/Basic.lean +++ b/LeanPool/SelbergSieve4/ForMathlib/Basic.lean @@ -3,29 +3,18 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ -import Mathlib.Algebra.BigOperators.Finprod -import Mathlib.Basic.Real.Basic -import Mathlib.Data.Nat.Prime.Basic -import Mathlib.Data.Nat.Squarefree -import Mathlib.NumberTheory.ArithmeticFunction.Defs -import Mathlib.NumberTheory.ArithmeticFunction.Misc -import Mathlib.NumberTheory.ArithmeticFunction.Moebius +module + +public import Mathlib.Basic.Real.Basic +public import Mathlib.NumberTheory.ArithmeticFunction.Defs import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt -import Mathlib.NumberTheory.ArithmeticFunction.Zeta -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.SelbergSieve4.ForMathlib.Basic -/ +@[expose] public section + namespace Aux open BigOperators ArithmeticFunction diff --git a/LeanPool/SelbergSieve4/ForMathlib/ProdsAntidiagonal.lean b/LeanPool/SelbergSieve4/ForMathlib/ProdsAntidiagonal.lean index ee93e82b77..6a394e31ac 100644 --- a/LeanPool/SelbergSieve4/ForMathlib/ProdsAntidiagonal.lean +++ b/LeanPool/SelbergSieve4/ForMathlib/ProdsAntidiagonal.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ +module -import Mathlib.Algebra.Order.Antidiag.Nat +public import Mathlib.Algebra.Order.Antidiag.Nat /-! # LeanPool.SelbergSieve4.ForMathlib.ProdsAntidiagonal -/ +@[expose] public section + open scoped ArithmeticFunction.omega namespace Nat diff --git a/LeanPool/SelbergSieve4/MainResults.lean b/LeanPool/SelbergSieve4/MainResults.lean index c859ba3a75..212ccc76bf 100644 --- a/LeanPool/SelbergSieve4/MainResults.lean +++ b/LeanPool/SelbergSieve4/MainResults.lean @@ -3,21 +3,26 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ -import Mathlib.NumberTheory.ArithmeticFunction.Defs -import Mathlib.NumberTheory.ArithmeticFunction.Misc -import Mathlib.NumberTheory.ArithmeticFunction.Moebius -import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt -import Mathlib.NumberTheory.ArithmeticFunction.Zeta -import LeanPool.SelbergSieve4.Selberg -import LeanPool.SelbergSieve4.SieveLemmas +module + +public import LeanPool.SelbergSieve4.Selberg +public import Mathlib.NumberTheory.PrimeCounting +public import Mathlib.Analysis.SpecialFunctions.Log.Basic import LeanPool.SelbergSieve4.Applications.BrunTitchmarsh -import Mathlib.NumberTheory.PrimeCounting -import Mathlib.Analysis.Asymptotics.Lemmas +import LeanPool.SelbergSieve4.Applications.PrimeCountingUpperBound +import LeanPool.SelbergSieve4.Tactic.AesopInit +import Mathlib.Algebra.Order.Floor.Semifield +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.SelbergSieve4.MainResults -/ +@[expose] public section + open scoped BigOperators ArithmeticFunction.zeta ArithmeticFunction.Moebius ArithmeticFunction.omega Sieve Nat Nat.Prime diff --git a/LeanPool/SelbergSieve4/Selberg.lean b/LeanPool/SelbergSieve4/Selberg.lean index 28e6fd17e4..eb8932dea6 100644 --- a/LeanPool/SelbergSieve4/Selberg.lean +++ b/LeanPool/SelbergSieve4/Selberg.lean @@ -3,12 +3,24 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ -import LeanPool.SelbergSieve4.SieveLemmas +module + +public import LeanPool.SelbergSieve4.SieveLemmas +import LeanPool.SelbergSieve4.AuxResults +import LeanPool.SelbergSieve4.Tactic.AesopDiv +import LeanPool.SelbergSieve4.Tactic.AesopInit +import Mathlib.Algebra.Order.Antidiag.Nat +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.SelbergSieve4.Selberg -/ +@[expose] public section + noncomputable section open scoped BigOperators Sieve ArithmeticFunction.Moebius ArithmeticFunction.omega diff --git a/LeanPool/SelbergSieve4/SieveLemmas.lean b/LeanPool/SelbergSieve4/SieveLemmas.lean index 4d798d6f00..0f8a17dff2 100644 --- a/LeanPool/SelbergSieve4/SieveLemmas.lean +++ b/LeanPool/SelbergSieve4/SieveLemmas.lean @@ -3,21 +3,25 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Analysis.Asymptotics.Lemmas -import Mathlib.NumberTheory.ArithmeticFunction.Defs -import Mathlib.NumberTheory.ArithmeticFunction.Misc -import Mathlib.NumberTheory.ArithmeticFunction.Moebius -import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt -import Mathlib.NumberTheory.ArithmeticFunction.Zeta +module + +public import Mathlib.NumberTheory.ArithmeticFunction.Moebius +public import LeanPool.SelbergSieve4.UpperBoundSieve import LeanPool.SelbergSieve4.AuxResults +import LeanPool.SelbergSieve4.ForMathlib.Basic import LeanPool.SelbergSieve4.Tactic.AesopDiv -import LeanPool.SelbergSieve4.UpperBoundSieve +import LeanPool.SelbergSieve4.Tactic.AesopInit +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.SelbergSieve4.SieveLemmas -/ +@[expose] public section + noncomputable section open scoped BigOperators ArithmeticFunction.zeta ArithmeticFunction.Moebius ArithmeticFunction.omega diff --git a/LeanPool/SelbergSieve4/Tactic.lean b/LeanPool/SelbergSieve4/Tactic.lean index f90db841c0..321e82f07d 100644 --- a/LeanPool/SelbergSieve4/Tactic.lean +++ b/LeanPool/SelbergSieve4/Tactic.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ +module -import LeanPool.SelbergSieve4.Tactic.AesopDiv -import LeanPool.SelbergSieve4.Tactic.AesopInit -import LeanPool.SelbergSieve4.Tactic.Multiplicativity +public import LeanPool.SelbergSieve4.Tactic.AesopDiv +public import LeanPool.SelbergSieve4.Tactic.AesopInit +public import LeanPool.SelbergSieve4.Tactic.Multiplicativity +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # Tactics for the Selberg sieve import -/ + +@[expose] public section diff --git a/LeanPool/SelbergSieve4/Tactic/AesopDiv.lean b/LeanPool/SelbergSieve4/Tactic/AesopDiv.lean index 99d305e6d9..4ca429e342 100644 --- a/LeanPool/SelbergSieve4/Tactic/AesopDiv.lean +++ b/LeanPool/SelbergSieve4/Tactic/AesopDiv.lean @@ -3,19 +3,19 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ -import Aesop +module + +public import Mathlib.Algebra.Squarefree.Basic +public import Mathlib.NumberTheory.Divisors import LeanPool.SelbergSieve4.Tactic.AesopInit -import Mathlib.Data.Nat.Basic -import Mathlib.NumberTheory.ArithmeticFunction.Defs -import Mathlib.NumberTheory.ArithmeticFunction.Misc -import Mathlib.NumberTheory.ArithmeticFunction.Moebius import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt -import Mathlib.NumberTheory.ArithmeticFunction.Zeta /-! # LeanPool.SelbergSieve4.Tactic.AesopDiv -/ +@[expose] public section + namespace Sieve open Finset diff --git a/LeanPool/SelbergSieve4/Tactic/AesopInit.lean b/LeanPool/SelbergSieve4/Tactic/AesopInit.lean index 0f61492db3..0d16d63410 100644 --- a/LeanPool/SelbergSieve4/Tactic/AesopInit.lean +++ b/LeanPool/SelbergSieve4/Tactic/AesopInit.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ -import Aesop +module + +import Aesop.Frontend.Command /-! # LeanPool.SelbergSieve4.Tactic.AesopInit @@ -11,6 +13,8 @@ import Aesop Imported Lean Pool material for `LeanPool.SelbergSieve4.Tactic.AesopInit`. -/ +@[expose] public section + declare_aesop_rule_sets [Divisibility] -- declare_aesop_rule_sets [IsMultiplicative] diff --git a/LeanPool/SelbergSieve4/Tactic/Multiplicativity.lean b/LeanPool/SelbergSieve4/Tactic/Multiplicativity.lean index b7a564e221..1e19841433 100644 --- a/LeanPool/SelbergSieve4/Tactic/Multiplicativity.lean +++ b/LeanPool/SelbergSieve4/Tactic/Multiplicativity.lean @@ -41,3 +41,4 @@ Authors: Arend Mellendijk -- example {R : Type*} [Field R] (f : ArithmeticFunction R) (hf : IsMultiplicative f) : -- IsMultiplicative ((ζ:ArithmeticFunction R).pdiv f) := by -- exact IsMultiplicative.pdiv (IsMultiplicative.nat_cast isMultiplicative_zeta) hf +module diff --git a/LeanPool/SelbergSieve4/UpperBoundSieve.lean b/LeanPool/SelbergSieve4/UpperBoundSieve.lean index 0c933fdf8a..ae8f72d98c 100644 --- a/LeanPool/SelbergSieve4/UpperBoundSieve.lean +++ b/LeanPool/SelbergSieve4/UpperBoundSieve.lean @@ -3,18 +3,18 @@ Copyright (c) 2026 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Basic.Real.Basic -import Mathlib.NumberTheory.ArithmeticFunction.Defs -import Mathlib.NumberTheory.ArithmeticFunction.Misc -import Mathlib.NumberTheory.ArithmeticFunction.Moebius +module + +public import Mathlib.Basic.Real.Basic +public import Mathlib.NumberTheory.Divisors import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt -import Mathlib.NumberTheory.ArithmeticFunction.Zeta /-! # LeanPool.SelbergSieve4.UpperBoundSieve -/ +@[expose] public section + open scoped BigOperators ArithmeticFunction.zeta ArithmeticFunction.Moebius ArithmeticFunction.omega namespace Sieve diff --git a/LeanPool/SemicircleCheck.lean b/LeanPool/SemicircleCheck.lean index b9d777c322..ec4e5a14c4 100644 --- a/LeanPool/SemicircleCheck.lean +++ b/LeanPool/SemicircleCheck.lean @@ -3,14 +3,15 @@ Copyright (c) 2026 Wondermonger-daydreaming. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wondermonger-daydreaming -/ +module -import LeanPool.SemicircleCheck.ShiftTwoEquiv -import LeanPool.SemicircleCheck.FinRotateLemmas -import LeanPool.SemicircleCheck.RotationArithmetic -import LeanPool.SemicircleCheck.GenusNoncrossing -import LeanPool.SemicircleCheck.EvenCard -import LeanPool.SemicircleCheck.CatalanRecurrence -import LeanPool.SemicircleCheck.Census +public import LeanPool.SemicircleCheck.ShiftTwoEquiv +public import LeanPool.SemicircleCheck.FinRotateLemmas +public import LeanPool.SemicircleCheck.RotationArithmetic +public import LeanPool.SemicircleCheck.GenusNoncrossing +public import LeanPool.SemicircleCheck.EvenCard +public import LeanPool.SemicircleCheck.CatalanRecurrence +public import LeanPool.SemicircleCheck.Census /-! # Genus-Zero Pairings and Catalan Numbers @@ -22,3 +23,5 @@ Main declarations: `card_noncrossingPairing_eq_catalan`, `Pairing.genus_zero_cou Tags: combinatorics, catalan-numbers, noncrossing-partitions MSC: 05A15, 05A18 -/ + +@[expose] public section diff --git a/LeanPool/SemicircleCheck/CatalanRecurrence.lean b/LeanPool/SemicircleCheck/CatalanRecurrence.lean index 5a71737846..6fff0a395b 100644 --- a/LeanPool/SemicircleCheck/CatalanRecurrence.lean +++ b/LeanPool/SemicircleCheck/CatalanRecurrence.lean @@ -3,11 +3,13 @@ Copyright (c) 2026 Wondermonger-daydreaming. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wondermonger-daydreaming -/ +module +public import LeanPool.SemicircleCheck.GenusNoncrossing +public import Mathlib.Combinatorics.Enumerative.Catalan.Basic +import LeanPool.SemicircleCheck.EvenCard import LeanPool.SemicircleCheck.FinRotateLemmas import LeanPool.SemicircleCheck.RotationArithmetic -import LeanPool.SemicircleCheck.GenusNoncrossing -import LeanPool.SemicircleCheck.EvenCard /-! THE CATALAN SCALPEL @@ -28,6 +30,8 @@ import LeanPool.SemicircleCheck.EvenCard 4. catalanEquiv: NoncrossingPairing(n+1) ≃ Σ k, NCP(k) × NCP(n-k) -/ +@[expose] public section + open Equiv Equiv.Perm Fintype /-! ## 1. The Translation Dictionaries -/ @@ -927,11 +931,11 @@ private lemma inside_closed {n : ℕ} (p : Pairing (n + 1)) (h_nc : p.IsNoncross noncomputable def restrictInsidePerm {n : ℕ} (p : Pairing (n + 1)) (h_nc : p.IsNoncrossing) : Perm (Fin (2 * (extractK p h_nc).val)) where toFun j := - let bounds := inside_closed p h_nc j + let bounds := private_decl% (inside_closed p h_nc j) ⟨(p.val ⟨j.val + 1, by have := j.isLt; have := extractK_le p h_nc; omega⟩).val - 1, by have := bounds.1; have := bounds.2; omega⟩ invFun j := - let bounds := inside_closed p h_nc j + let bounds := private_decl% (inside_closed p h_nc j) ⟨(p.val ⟨j.val + 1, by have := j.isLt; have := extractK_le p h_nc; omega⟩).val - 1, by have := bounds.1; have := bounds.2; omega⟩ left_inv j := by @@ -1010,7 +1014,8 @@ private lemma restrictInsidePerm_isPairing {n : ℕ} (p : Pairing (n + 1)) (shifting indices by +1), contradicting noncrossing. -/ private lemma restrictInsidePerm_isNoncrossing {n : ℕ} (p : Pairing (n + 1)) (h_nc : p.IsNoncrossing) : - let q : Pairing _ := ⟨restrictInsidePerm p h_nc, restrictInsidePerm_isPairing p h_nc⟩ + let q : Pairing _ := + ⟨restrictInsidePerm p h_nc, (private_decl% (restrictInsidePerm_isPairing p h_nc))⟩ q.IsNoncrossing := by intro q apply no_crossing_imp_IsNoncrossing @@ -1059,8 +1064,8 @@ private lemma restrictInsidePerm_isNoncrossing {n : ℕ} (p : Pairing (n + 1)) on 2(n+1) points with p(0) = 2k+1. -/ noncomputable def insidePairing {n : ℕ} (p : Pairing (n + 1)) (h_nc : p.IsNoncrossing) : NoncrossingPairing (extractK p h_nc).val := - ⟨⟨restrictInsidePerm p h_nc, restrictInsidePerm_isPairing p h_nc⟩, - restrictInsidePerm_isNoncrossing p h_nc⟩ + ⟨⟨restrictInsidePerm p h_nc, (private_decl% (restrictInsidePerm_isPairing p h_nc))⟩, + (private_decl% (restrictInsidePerm_isNoncrossing p h_nc))⟩ /-- Helper: outside interval is closed under p (both bounds). -/ private lemma outside_closed {n : ℕ} (p : Pairing (n + 1)) (h_nc : p.IsNoncrossing) @@ -1079,14 +1084,14 @@ private lemma outside_closed {n : ℕ} (p : Pairing (n + 1)) (h_nc : p.IsNoncros noncomputable def restrictOutsidePerm {n : ℕ} (p : Pairing (n + 1)) (h_nc : p.IsNoncrossing) : Perm (Fin (2 * (n - (extractK p h_nc).val))) where toFun j := - let bound := outside_closed p h_nc j + let bound := private_decl% (outside_closed p h_nc j) ⟨(p.val ⟨j.val + 2 * (extractK p h_nc).val + 2, by have := j.isLt; have := extractK_le p h_nc; omega⟩).val - (2 * (extractK p h_nc).val + 2), by have hpi := (p.val ⟨j.val + 2 * (extractK p h_nc).val + 2, by omega⟩).isLt have := bound; omega⟩ invFun j := - let bound := outside_closed p h_nc j + let bound := private_decl% (outside_closed p h_nc j) ⟨(p.val ⟨j.val + 2 * (extractK p h_nc).val + 2, by have := j.isLt; have := extractK_le p h_nc; omega⟩).val - (2 * (extractK p h_nc).val + 2), by @@ -1478,7 +1483,8 @@ private lemma restrictOutsidePerm_isPairing {n : ℕ} (p : Pairing (n + 1)) /-- The restricted outside pairing is noncrossing. -/ private lemma restrictOutsidePerm_isNoncrossing {n : ℕ} (p : Pairing (n + 1)) (h_nc : p.IsNoncrossing) : - let q : Pairing _ := ⟨restrictOutsidePerm p h_nc, restrictOutsidePerm_isPairing p h_nc⟩ + let q : Pairing _ := + ⟨restrictOutsidePerm p h_nc, (private_decl% (restrictOutsidePerm_isPairing p h_nc))⟩ q.IsNoncrossing := by intro q apply no_crossing_imp_IsNoncrossing @@ -1523,8 +1529,8 @@ private lemma restrictOutsidePerm_isNoncrossing {n : ℕ} (p : Pairing (n + 1)) noncomputable def outsidePairing {n : ℕ} (p : Pairing (n + 1)) (h_nc : p.IsNoncrossing) : NoncrossingPairing (n - (extractK p h_nc).val) := - ⟨⟨restrictOutsidePerm p h_nc, restrictOutsidePerm_isPairing p h_nc⟩, - restrictOutsidePerm_isNoncrossing p h_nc⟩ + ⟨⟨restrictOutsidePerm p h_nc, (private_decl% (restrictOutsidePerm_isPairing p h_nc))⟩, + (private_decl% (restrictOutsidePerm_isNoncrossing p h_nc))⟩ /-! ### Assembly: the inverse direction @@ -1640,7 +1646,7 @@ noncomputable def assemblePerm (n : ℕ) (k : Fin (n + 1)) (p_in : Perm (Fin (2 * k.val))) (p_out : Perm (Fin (2 * (n - k.val)))) (hinv_in : ∀ x, p_in (p_in x) = x) (hinv_out : ∀ x, p_out (p_out x) = x) : Perm (Fin (2 * (n + 1))) := - (assembleF_involutive n k p_in p_out hinv_in hinv_out).toPerm + ((private_decl% (assembleF_involutive n k p_in p_out hinv_in hinv_out))).toPerm /-- The assembled permutation is a pairing. -/ private lemma assemblePerm_isPairing (n : ℕ) (k : Fin (n + 1)) @@ -1709,7 +1715,8 @@ private lemma assemblePerm_isNoncrossing (n : ℕ) (k : Fin (n + 1)) change (p_in.val.val * p_in.val.val) x = x; simp [h]) (by intro x; have h := p_out.val.property.1; rw [sq] at h change (p_out.val.val * p_out.val.val) x = x; simp [h]) - let pairing : Pairing (n + 1) := ⟨ap, assemblePerm_isPairing n k p_in.val p_out.val⟩ + let pairing : Pairing (n + 1) := + ⟨ap, (private_decl% (assemblePerm_isPairing n k p_in.val p_out.val))⟩ pairing.IsNoncrossing := by intro ap pairing apply no_crossing_imp_IsNoncrossing @@ -1817,8 +1824,8 @@ noncomputable def catalanAssemble (n : ℕ) intro x; have h := p_out.val.property.1; rw [sq] at h change (p_out.val.val * p_out.val.val) x = x; simp [h] let ap := assemblePerm n k p_in.val.val p_out.val.val hinv_in hinv_out - ⟨⟨ap, assemblePerm_isPairing n k p_in.val p_out.val⟩, - assemblePerm_isNoncrossing n k p_in p_out⟩ + ⟨⟨ap, (private_decl% (assemblePerm_isPairing n k p_in.val p_out.val))⟩, + (private_decl% (assemblePerm_isNoncrossing n k p_in p_out))⟩ /-! ### Round-trip lemmas for the Catalan equivalence -/ @@ -1895,8 +1902,9 @@ private lemma extractK_of_assemble (n : ℕ) (k : Fin (n + 1)) intro x; have h := p_out.val.property.1; rw [sq] at h change (p_out.val.val * p_out.val.val) x = x; simp [h] let ap := assemblePerm n k p_in.val.val p_out.val.val hinv_in hinv_out - let pairing : Pairing (n + 1) := ⟨ap, assemblePerm_isPairing n k p_in.val p_out.val⟩ - let h_nc := assemblePerm_isNoncrossing n k p_in p_out + let pairing : Pairing (n + 1) := + ⟨ap, (private_decl% (assemblePerm_isPairing n k p_in.val p_out.val))⟩ + let h_nc := (private_decl% (assemblePerm_isNoncrossing n k p_in p_out)) extractK pairing h_nc = k := by intro hinv_in hinv_out ap pairing h_nc apply Fin.ext @@ -1967,7 +1975,8 @@ private lemma catalanEquiv_right_inv (n : ℕ) -- Need: (assembled ⟨j.val + 1, _⟩).val - 1 = (p_in.val.val ⟨j.val, _⟩).val -- assembled = assemblePerm = toPerm(assembleF) -- For j+1 in inside range, assembleF gives p_in(j+1-1) + 1 = p_in(j) + 1 - have hek : (extractK _ (assemblePerm_isNoncrossing n k p_in p_out)).val = k.val := + have hek : + (extractK _ ((private_decl% (assemblePerm_isNoncrossing n k p_in p_out)))).val = k.val := congr_arg Fin.val (extractK_of_assemble n k p_in p_out) have hj_lt : j.val < 2 * k.val := by have := j.isLt; omega -- Reduce the assembled permutation to `assembleF`; the input `j + 1` @@ -1985,20 +1994,23 @@ private lemma catalanEquiv_right_inv (n : ℕ) intro j simp only [catalanAssemble, outsidePairing, restrictOutsidePerm, Equiv.coe_fn_mk, Fin.val_mk] - have hek : (extractK _ (assemblePerm_isNoncrossing n k p_in p_out)).val = k.val := + have hek : + (extractK _ ((private_decl% (assemblePerm_isNoncrossing n k p_in p_out)))).val = k.val := congr_arg Fin.val (extractK_of_assemble n k p_in p_out) have hj_lt : j.val < 2 * (n - k.val) := by have := j.isLt; omega have hk_le : k.val ≤ n := by have := k.isLt; omega -- Unfold everything to assembleF application -- Show that assembleF applied to ⟨j + 2*(extractK..)+2, _⟩ gives outside branch -- The input index is > 2k+1, so the outside (else) branch fires - set ov := j.val + 2 * (extractK _ (assemblePerm_isNoncrossing n k p_in p_out)).val + 2 with hov + set ov := + j.val + 2 * + (extractK _ (private_decl% (assemblePerm_isNoncrossing n k p_in p_out))).val + 2 with hov have h0 : ¬ (ov = 0) := by omega have ht : ¬ (ov = 2 * k.val + 1) := by omega have hout : ¬ (ov ≤ 2 * k.val) := by omega change (assembleF n k p_in.val.val p_out.val.val ⟨ov, _⟩).val - - (2 * (extractK _ (assemblePerm_isNoncrossing n k p_in p_out)).val + 2) = + (2 * (extractK _ ((private_decl% (assemblePerm_isNoncrossing n k p_in p_out)))).val + 2) = (p_out.val.val ⟨j.val, by omega⟩).val simp only [assembleF, h0, ht, hout, ↓reduceDIte, Fin.val_mk] have hfin : (⟨ov - (2 * k.val + 2), by omega⟩ : @@ -2023,7 +2035,7 @@ noncomputable def catalanEquiv (n : ℕ) : change (Function.Involutive.toPerm _ _) x = p.val.val x simp only [Function.Involutive.toPerm] exact assembleF_eq_of_decompose p.val p.property x - right_inv := catalanEquiv_right_inv n + right_inv := by exact catalanEquiv_right_inv n /-! ## 5. Counting: NoncrossingPairing n has catalan n elements diff --git a/LeanPool/SemicircleCheck/Census.lean b/LeanPool/SemicircleCheck/Census.lean index 136b7edb4d..672426a377 100644 --- a/LeanPool/SemicircleCheck/Census.lean +++ b/LeanPool/SemicircleCheck/Census.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Wondermonger-daydreaming. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wondermonger-daydreaming -/ +module -import Mathlib.GroupTheory.Perm.Fin -import Mathlib.GroupTheory.Perm.Cycle.Type +public import Mathlib.GroupTheory.Perm.Cycle.Type + +public import Mathlib.GroupTheory.Perm.Fin + +public import Mathlib.Algebra.Group.End +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! COMPUTATIONAL ORACLE: The Semicircle Census @@ -44,6 +51,8 @@ import Mathlib.GroupTheory.Perm.Cycle.Type 4. Total pairings = (2n-1)!! = 1·3·5···(2n-1). -/ +@[expose] public section + open Equiv Equiv.Perm /-! ## Specific pairings for small n, defined computably for formal verification -/ diff --git a/LeanPool/SemicircleCheck/EvenCard.lean b/LeanPool/SemicircleCheck/EvenCard.lean index f3077f8cab..8445ffa267 100644 --- a/LeanPool/SemicircleCheck/EvenCard.lean +++ b/LeanPool/SemicircleCheck/EvenCard.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Wondermonger-daydreaming. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wondermonger-daydreaming -/ +module -import Mathlib.GroupTheory.Perm.Fin -import Mathlib.Data.Finset.Card +public import Mathlib.Data.Finset.Card +public import Mathlib.Algebra.Group.End +public import Mathlib.Algebra.Group.Even +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! EVEN CARDINALITY FROM A FIXED-POINT-FREE INVOLUTION @@ -14,6 +18,8 @@ import Mathlib.Data.Finset.Card This is the small combinatorial lemma later used in the Catalan recurrence. -/ +@[expose] public section + open Equiv Equiv.Perm /-- A finite set closed under a fixed-point-free involution has even cardinality. diff --git a/LeanPool/SemicircleCheck/FinRotateLemmas.lean b/LeanPool/SemicircleCheck/FinRotateLemmas.lean index 32e7658048..a3badfc6d7 100644 --- a/LeanPool/SemicircleCheck/FinRotateLemmas.lean +++ b/LeanPool/SemicircleCheck/FinRotateLemmas.lean @@ -3,15 +3,20 @@ Copyright (c) 2026 Wondermonger-daydreaming. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wondermonger-daydreaming -/ +module -import Mathlib.GroupTheory.Perm.Fin -import Mathlib.GroupTheory.Perm.Cycle.Type -import Mathlib.Data.Fin.Basic +public import Mathlib.Algebra.Group.End +public import Mathlib.Logic.Equiv.Fin.Rotate +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! `finRotate` arithmetic lemmas isolated for eventual Mathlib extraction. -/ +@[expose] public section + open Equiv Equiv.Perm /-- Powers of `finRotate` act by addition modulo `m`. diff --git a/LeanPool/SemicircleCheck/GenusNoncrossing.lean b/LeanPool/SemicircleCheck/GenusNoncrossing.lean index bd17a9e294..8273b5c39d 100644 --- a/LeanPool/SemicircleCheck/GenusNoncrossing.lean +++ b/LeanPool/SemicircleCheck/GenusNoncrossing.lean @@ -3,14 +3,14 @@ Copyright (c) 2026 Wondermonger-daydreaming. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wondermonger-daydreaming -/ +module -import Mathlib.Combinatorics.Enumerative.Catalan.Basic +public import Mathlib.GroupTheory.Perm.Cycle.Type +public import LeanPool.SemicircleCheck.ShiftTwoEquiv +public import Mathlib.Logic.Equiv.Fin.Rotate +public import LeanPool.SemicircleCheck.FinRotateLemmas +public import LeanPool.SemicircleCheck.RotationArithmetic import Mathlib.GroupTheory.Perm.Fin -import Mathlib.GroupTheory.Perm.Cycle.Type -import Mathlib.Data.Fin.Basic -import LeanPool.SemicircleCheck.ShiftTwoEquiv -import LeanPool.SemicircleCheck.FinRotateLemmas -import LeanPool.SemicircleCheck.RotationArithmetic /-! GENUS ZERO ↔ NONCROSSING @@ -28,6 +28,8 @@ import LeanPool.SemicircleCheck.RotationArithmetic - Three-stage proof decomposition via cycle count bound -/ +@[expose] public section + open Equiv Equiv.Perm Fintype /-! ## 1. Total Cycle Count diff --git a/LeanPool/SemicircleCheck/RotationArithmetic.lean b/LeanPool/SemicircleCheck/RotationArithmetic.lean index 04c7e8ab47..d08711c6df 100644 --- a/LeanPool/SemicircleCheck/RotationArithmetic.lean +++ b/LeanPool/SemicircleCheck/RotationArithmetic.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Wondermonger-daydreaming. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wondermonger-daydreaming -/ +module -import Mathlib.GroupTheory.Perm.Fin +public import Mathlib.Algebra.Group.End +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! Group-theoretic helpers used with rotation normalization. @@ -12,6 +16,8 @@ import Mathlib.GroupTheory.Perm.Fin The `finRotate` arithmetic lemmas live in `SemicircleCheck.FinRotateLemmas`. -/ +@[expose] public section + open Equiv Equiv.Perm variable {n : ℕ} diff --git a/LeanPool/SemicircleCheck/ShiftTwoEquiv.lean b/LeanPool/SemicircleCheck/ShiftTwoEquiv.lean index c945f0bf59..721d0aae55 100644 --- a/LeanPool/SemicircleCheck/ShiftTwoEquiv.lean +++ b/LeanPool/SemicircleCheck/ShiftTwoEquiv.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Wondermonger-daydreaming. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wondermonger-daydreaming -/ +module +public import Mathlib.Algebra.Group.End import Mathlib.Data.Fin.Basic -import Mathlib.GroupTheory.Perm.Basic /-! CANONICAL DELETION OF THE BOUNDARY PAIR @@ -26,6 +27,8 @@ import Mathlib.GroupTheory.Perm.Basic rotate to (0,1) → contractZeroOne → rotate back (if needed) -/ +@[expose] public section + namespace SemicircleCore variable {n : ℕ} @@ -89,7 +92,7 @@ def contractZeroOne (π : Equiv.Perm (Fin (2 * n + 2))) (h₁ : π ⟨1, by omega⟩ = ⟨0, by omega⟩) : Equiv.Perm (Fin (2 * n)) := let hmaps := mapsTo_remaining h₀ h₁ - let hmaps_inv := symm_mapsTo_remaining h₀ h₁ + let hmaps_inv := private_decl% (symm_mapsTo_remaining h₀ h₁) let restrictPerm : Equiv.Perm { x : Fin (2 * n + 2) // 2 ≤ x.val } := { toFun := fun ⟨x, hx⟩ => ⟨π x, hmaps hx⟩ invFun := fun ⟨x, hx⟩ => ⟨π.symm x, hmaps_inv hx⟩ diff --git a/LeanPool/SemicircleLaw.lean b/LeanPool/SemicircleLaw.lean index 38a5479a68..2c3f72c464 100644 --- a/LeanPool/SemicircleLaw.lean +++ b/LeanPool/SemicircleLaw.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 FredRaj3. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FredRaj3 -/ +module -import LeanPool.SemicircleLaw.SemicircleDistribution +public import LeanPool.SemicircleLaw.SemicircleDistribution +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Wigner Semicircle Distribution @@ -17,6 +21,8 @@ Tags: probability, random-matrix-theory, distributions MSC: 60B20, 60E05 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/SemicircleLaw/SemicircleDistribution.lean b/LeanPool/SemicircleLaw/SemicircleDistribution.lean index ad632cfec8..7d35c9c3aa 100644 --- a/LeanPool/SemicircleLaw/SemicircleDistribution.lean +++ b/LeanPool/SemicircleLaw/SemicircleDistribution.lean @@ -3,24 +3,14 @@ Copyright (c) 2026 FredRaj3. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: FredRaj3 -/ -import Mathlib.Analysis.SpecialFunctions.Sqrt -import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +module + +public import Mathlib.Probability.Moments.Basic +public import Mathlib.Combinatorics.Enumerative.Catalan.Basic +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import Mathlib.Analysis.SpecialFunctions.Integrals.Basic -import Mathlib.MeasureTheory.Function.LocallyIntegrable -import Mathlib.MeasureTheory.Function.JacobianOneDim -import Mathlib.MeasureTheory.Integral.IntegrableOn -import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap -import Mathlib.MeasureTheory.Measure.Decomposition.RadonNikodym -import Mathlib.MeasureTheory.Measure.Dirac.Def -import Mathlib.MeasureTheory.Measure.Dirac.Basic -import Mathlib.MeasureTheory.Measure.Lebesgue.Basic -import Mathlib.MeasureTheory.Measure.WithDensity -import Mathlib.MeasureTheory.Group.Integral import Mathlib.MeasureTheory.Measure.Haar.Unique -import Mathlib.Probability.HasLaw -import Mathlib.Probability.Moments.Basic -import Mathlib.Probability.Moments.Variance -import Mathlib.Combinatorics.Enumerative.Catalan.Basic /-! # Semicircle Distributions over `ℝ` @@ -50,6 +40,8 @@ We define the real-valued Wigner semicircle distribution. * `centralMoment_odd_semicircleReal`: the odd central moments of the semicircle distribution vanish. -/ +@[expose] public section + open scoped ENNReal NNReal Real ProbabilityTheory open MeasureTheory Set diff --git a/LeanPool/Sensitivity.lean b/LeanPool/Sensitivity.lean index a1226434e7..ca481a6404 100644 --- a/LeanPool/Sensitivity.lean +++ b/LeanPool/Sensitivity.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module -import LeanPool.Sensitivity.Defs -import LeanPool.Sensitivity.Basic -import LeanPool.Sensitivity.Multilinear -import LeanPool.Sensitivity.Subcube -import LeanPool.Sensitivity.Parity -import LeanPool.Sensitivity.HuangBridge -import LeanPool.Sensitivity.Main -import LeanPool.Sensitivity.Consequences +public import LeanPool.Sensitivity.Defs +public import LeanPool.Sensitivity.Basic +public import LeanPool.Sensitivity.Multilinear +public import LeanPool.Sensitivity.Subcube +public import LeanPool.Sensitivity.Parity +public import LeanPool.Sensitivity.HuangBridge +public import LeanPool.Sensitivity.Main +public import LeanPool.Sensitivity.Consequences +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! # Sensitivity Conjecture: sqrt(deg) <= sensitivity @@ -24,6 +27,8 @@ Tags: combinatorics, boolean-functions, computational-complexity MSC: 06E30, 68Q17 -/ +@[expose] public section + /-! ## Mathematical overview @@ -39,7 +44,7 @@ sensitivity conjecture: for every Boolean function `f` with `deg(f) ≥ 1`, `deg(f) ≤ s(f)²`. The argument restricts `f` to a subcube of dimension `deg(f)` on which the top Möbius coefficient is preserved, derives a parity-sign imbalance there, and feeds the result into the Huang hypercube -lemma `Sensitivity.huang_degree_theorem` from `Mathlib`'s +lemma `LeanPoolSensitivity.Huang.huang_degree_theorem`, a module port of Mathlib’s `Archive.Sensitivity`. The exported modules follow the proof structure: core definitions diff --git a/LeanPool/Sensitivity/Basic.lean b/LeanPool/Sensitivity/Basic.lean index b1f9edd1a5..5bb0db1d46 100644 --- a/LeanPool/Sensitivity/Basic.lean +++ b/LeanPool/Sensitivity/Basic.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.Sensitivity.Defs +module + +public import LeanPool.Sensitivity.Defs /-! # Elementary Properties of Sensitivity @@ -21,6 +23,8 @@ Basic bounds and symmetries for the sensitivity of Boolean functions. predicate is invariant under flipping the same coordinate at the input. -/ +@[expose] public section + namespace LeanPoolSensitivity variable {n : ℕ} diff --git a/LeanPool/Sensitivity/Consequences.lean b/LeanPool/Sensitivity/Consequences.lean index 1724542a66..10a3459a0c 100644 --- a/LeanPool/Sensitivity/Consequences.lean +++ b/LeanPool/Sensitivity/Consequences.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.Sensitivity.Defs -import LeanPool.Sensitivity.Basic -import LeanPool.Sensitivity.Multilinear +module + +public import LeanPool.Sensitivity.Multilinear import LeanPool.Sensitivity.Main +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! # Consequences of the Sensitivity Theorem @@ -20,6 +22,8 @@ of its sensitivity. * `LeanPoolSensitivity.degree_le_sensitivity_sq` — `f.degree ≤ f.sensitivity^2`. -/ +@[expose] public section + namespace LeanPoolSensitivity /-- The multilinear degree is at most the square of the sensitivity, an diff --git a/LeanPool/Sensitivity/Defs.lean b/LeanPool/Sensitivity/Defs.lean index 7f080f8ac7..c3d166dc1b 100644 --- a/LeanPool/Sensitivity/Defs.lean +++ b/LeanPool/Sensitivity/Defs.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import Mathlib.Data.Fin.Basic -import Mathlib.Data.Finset.Card -import Mathlib.Data.Fintype.Pi -import Mathlib.Data.Finset.Lattice.Fold +module + +public import Mathlib.Data.Fintype.Pi +public import Mathlib.Data.Finset.Lattice.Fold /-! # Boolean Function Definitions @@ -28,6 +28,8 @@ including bit flips, sensitivity, and local sensitivity. coordinates simultaneously. -/ +@[expose] public section + namespace LeanPoolSensitivity /-- A Boolean function on `n` variables, viewed as a map diff --git a/LeanPool/Sensitivity/Huang.lean b/LeanPool/Sensitivity/Huang.lean new file mode 100644 index 0000000000..a99b3d20a3 --- /dev/null +++ b/LeanPool/Sensitivity/Huang.lean @@ -0,0 +1,463 @@ +/- +Copyright (c) 2019 Reid Barton and coauthors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mathlib contributors +-/ + +/- +Copyright (c) 2019 Reid Barton, Johan Commelin, Jesse Michael Han, Chris Hughes, Robert Y. Lewis, +Patrick Massot. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Reid Barton, Johan Commelin, Jesse Michael Han, Chris Hughes, Robert Y. Lewis, + Patrick Massot +-/ +module + +public import Mathlib.Analysis.Real.Sqrt +public import Mathlib.LinearAlgebra.Dual.Basis +public import Mathlib.LinearAlgebra.FiniteDimensional.Defs +import Mathlib.Analysis.Normed.Ring.Basic +import Mathlib.LinearAlgebra.Dimension.DivisionRing +import Mathlib.LinearAlgebra.FiniteDimensional.Basic +import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition + +/-! +# Huang's sensitivity theorem + +Module port of Mathlib's `Archive/Sensitivity.lean` at `v4.34.0-rc1`. +The archive file still uses legacy imports, so module clients cannot import it directly. +This copy can be removed once the upstream archive adopts the module system. + +A formalization of Hao Huang's sensitivity theorem: in the hypercube of +dimension n ≥ 1, if one colors more than half the vertices then at least one +vertex has at least √n colored neighbors. + +A fun summer collaboration by +Reid Barton, Johan Commelin, Jesse Michael Han, Chris Hughes, Robert Y. Lewis, and Patrick Massot, +based on Don Knuth's account of the story +(https://www.cs.stanford.edu/~knuth/papers/huang.pdf), +using the Lean theorem prover (https://leanprover.github.io/), +by Leonardo de Moura at Microsoft Research, and his collaborators +(https://leanprover.github.io/people/), +and using Lean's user maintained mathematics library +(https://github.com/leanprover-community/mathlib). + +The project was developed at https://github.com/leanprover-community/lean-sensitivity and is now +archived at https://github.com/leanprover-community/mathlib/blob/master/archive/sensitivity.lean +-/ + +@[expose] public section + +namespace LeanPoolSensitivity.Huang + +/-! The next two lines assert we do not want to give a constructive proof, +but rather use classical logic. -/ +noncomputable section + +local notation "√" => Real.sqrt + +open Bool Finset Fintype Function LinearMap Module Module.DualBases + +/-! +### The hypercube + +Notations: +- `ℕ` denotes natural numbers (including zero). +- `Fin n` = {0, ⋯ , n - 1}. +- `Bool` = {`true`, `false`}. +-/ + + +/-- The hypercube in dimension `n`. -/ +abbrev Q (n : ℕ) := + Fin n → Bool + +/-- The projection from `Q n.succ` to `Q n` forgetting the first value +(i.e. the image of zero). -/ +def π {n : ℕ} : Q n.succ → Q n := fun p => p ∘ Fin.succ + +namespace Q + +@[ext] +theorem ext {n} {f g : Q n} (h : ∀ x, f x = g x) : f = g := funext h + +/-! `n` will always denote a natural number. -/ + +variable (n : ℕ) + +/-- `Q 0` has a unique element. -/ +instance : Unique (Q 0) := + ⟨⟨fun _ => true⟩, by intro; ext x; fin_cases x⟩ + +/-- `Q n` has 2^n elements. -/ +theorem card : card (Q n) = 2 ^ n := by simp + +/-! Until the end of this namespace, `n` will be an implicit argument (still +a natural number). -/ + +variable {n} + +theorem succ_n_eq (p q : Q n.succ) : p = q ↔ p 0 = q 0 ∧ π p = π q := by + constructor + · rintro rfl; exact ⟨rfl, rfl⟩ + · rintro ⟨h₀, h⟩ + ext x + by_cases hx : x = 0 + · rwa [hx] + · rw [← Fin.succ_pred x hx] + convert! congr_fun h (Fin.pred x hx) + +/-- The adjacency relation defining the graph structure on `Q n`: +`p.adjacent q` if there is an edge from `p` to `q` in `Q n`. -/ +def adjacent {n : ℕ} (p : Q n) : Set (Q n) := { q | ∃! i, p i ≠ q i } + +/-- In `Q 0`, no two vertices are adjacent. -/ +theorem not_adjacent_zero (p q : Q 0) : q ∉ p.adjacent := by rintro ⟨v, _⟩; apply finZeroElim v + +/-- If `p` and `q` in `Q n.succ` have different values at zero then they are adjacent +iff their projections to `Q n` are equal. -/ +theorem adj_iff_proj_eq {p q : Q n.succ} (h₀ : p 0 ≠ q 0) : q ∈ p.adjacent ↔ π p = π q := by + constructor + · rintro ⟨i, _, h_uni⟩ + ext x; by_contra hx + apply Fin.succ_ne_zero x + rw [h_uni _ hx, h_uni _ h₀] + · intro heq + use 0, h₀ + intro y hy + contrapose! hy + rw [← Fin.succ_pred _ hy] + apply congr_fun heq + +/-- If `p` and `q` in `Q n.succ` have the same value at zero then they are adjacent +iff their projections to `Q n` are adjacent. -/ +theorem adj_iff_proj_adj {p q : Q n.succ} (h₀ : p 0 = q 0) : + q ∈ p.adjacent ↔ π q ∈ (π p).adjacent := by + constructor + · rintro ⟨i, h_eq, h_uni⟩ + have h_i : i ≠ 0 := fun h_i => absurd h₀ (by rwa [h_i] at h_eq) + use i.pred h_i, + show p (Fin.succ (Fin.pred i _)) ≠ q (Fin.succ (Fin.pred i _)) by rwa [Fin.succ_pred] + intro y hy + simp [Eq.symm (h_uni _ hy)] + · rintro ⟨i, h_eq, h_uni⟩ + use i.succ, h_eq + intro y hy + rw [← Fin.pred_inj (ha := (?ha : y ≠ 0)) (hb := (?hb : i.succ ≠ 0)), + Fin.pred_succ] + case ha => + contrapose hy + rw [hy, h₀] + case hb => + apply Fin.succ_ne_zero + apply h_uni + simp [π, hy] + +@[symm] +theorem adjacent.symm {p q : Q n} : q ∈ p.adjacent ↔ p ∈ q.adjacent := by + simp only [adjacent, ne_comm, Set.mem_ofPred_eq] + +end Q + +/-! ### The vector space -/ + + +/-- The free vector space on vertices of a hypercube, defined inductively. -/ +abbrev V : ℕ → Type + | 0 => ℝ + | n + 1 => V n × V n + +theorem V_zero : V 0 = ℝ := rfl + +theorem V_succ {n : ℕ} : V (n + 1) = (V n × V n) := rfl + +namespace V + +@[ext] +theorem ext {n : ℕ} {p q : V n.succ} (h₁ : p.1 = q.1) (h₂ : p.2 = q.2) : p = q := Prod.ext h₁ h₂ + +variable (n : ℕ) + +/-! `V n` is a real vector space whose equality relation is computable. -/ + + +instance : DecidableEq (V n) := by induction n <;> · dsimp only [V]; infer_instance + +instance : AddCommGroup (V n) := by induction n <;> · dsimp only [V]; infer_instance + +instance : Module ℝ (V n) := by induction n <;> · dsimp only [V]; infer_instance + +end V + +/-- The basis of `V` indexed by the hypercube, defined inductively. -/ +noncomputable def e : ∀ {n}, Q n → V n + | 0 => fun _ => (1 : ℝ) + | Nat.succ _ => fun x => cond (x 0) (e (π x), 0) (0, e (π x)) + +@[simp] +theorem e_zero_apply (x : Q 0) : e x = (1 : ℝ) := + rfl + +/-- The dual basis to `e`, defined inductively. -/ +noncomputable def ε : ∀ {n : ℕ}, Q n → V n →ₗ[ℝ] ℝ + | 0, _ => LinearMap.id + | Nat.succ _, p => + cond (p 0) ((ε <| π p).comp <| LinearMap.fst _ _ _) ((ε <| π p).comp <| LinearMap.snd _ _ _) + +variable {n : ℕ} + +theorem duality (p q : Q n) : ε p (e q) = if p = q then 1 else 0 := by + induction n with + | zero => simp [Subsingleton.elim (α := Q 0) p q, ε, e] + | succ n IH => + dsimp [ε, e] + cases hp : p 0 <;> cases hq : q 0 + all_goals + simp only [Bool.cond_true, Bool.cond_false, LinearMap.fst_apply, LinearMap.snd_apply, + LinearMap.comp_apply, IH] + congr 1; simp [Q.succ_n_eq, hp, hq] + +/-- Any vector in `V n` annihilated by all `ε p`'s is zero. -/ +theorem epsilon_total {v : V n} (h : ∀ p : Q n, (ε p) v = 0) : v = 0 := by + induction n with + | zero => dsimp [ε] at h; exact h fun _ => true + | succ n ih => + obtain ⟨v₁, v₂⟩ := v + ext <;> change _ = (0 : V n) <;> simp only <;> apply ih <;> intro p <;> + [let q : Q n.succ := fun i => if h : i = 0 then true else p (i.pred h); + let q : Q n.succ := fun i => if h : i = 0 then false else p (i.pred h)] + all_goals + specialize h q + first + | rw [ε, show q 0 = true from rfl, Bool.cond_true] at h + | rw [ε, show q 0 = false from rfl, Bool.cond_false] at h + rwa [show p = π q by ext; simp [q, Fin.succ_ne_zero, π]] + +open Module + +/-- `e` and `ε` are dual families of vectors. It implies that `e` is indeed a basis +and `ε` computes coefficients of decompositions of vectors on that basis. -/ +theorem dualBases_e_ε (n : ℕ) : DualBases (@e n) (@ε n) where + eval_same := by simp [duality] + eval_of_ne _ _ h := by simp [duality, h] + total h := sub_eq_zero.mp <| epsilon_total fun i ↦ by + simpa only [map_sub, sub_eq_zero] using h i + +/-! We will now derive the dimension of `V`, first as a cardinal in `dim_V` and, +since this cardinal is finite, as a natural number in `finrank_V` -/ + + +theorem dim_V : Module.rank ℝ (V n) = 2 ^ n := by + have : Module.rank ℝ (V n) = (2 ^ n : ℕ) := by + rw [rank_eq_card_basis (dualBases_e_ε _).basis, Q.card] + assumption_mod_cast + +instance : FiniteDimensional ℝ (V n) := + (dualBases_e_ε _).basis.finiteDimensional_of_finite + +theorem finrank_V : finrank ℝ (V n) = 2 ^ n := by + have := @dim_V n + rw [← finrank_eq_rank] at this; assumption_mod_cast + +/-! ### The linear map -/ + + +/-- The linear operator $f_n$ corresponding to Huang's matrix $A_n$, +defined inductively as a ℝ-linear map from `V n` to `V n`. -/ +noncomputable def f : ∀ n, V n →ₗ[ℝ] V n + | 0 => 0 + | n + 1 => + LinearMap.prod (LinearMap.coprod (f n) LinearMap.id) (LinearMap.coprod LinearMap.id (-f n)) + +/-! The preceding definition uses linear map constructions to automatically +get that `f` is linear, but its values are somewhat buried as a side-effect. +The next two lemmas unbury them. -/ + + +@[simp] +theorem f_zero : f 0 = 0 := + rfl + +theorem f_succ_apply (v : V n.succ) : f n.succ v = (f n v.1 + v.2, v.1 - f n v.2) := by + cases v + rw [f] + simp only [sub_eq_add_neg] + exact rfl + +/-! In the next statement, the explicit conversion `(n : ℝ)` of `n` to a real number +is necessary since otherwise `n • v` refers to the multiplication defined +using only the addition of `V`. -/ + + +theorem f_squared (v : V n) : (f n) (f n v) = (n : ℝ) • v := by + induction n with + | zero => simp only [Nat.cast_zero, zero_smul, f_zero, LinearMap.zero_apply] + | succ n IH => + cases v; rw [f_succ_apply, f_succ_apply]; simp [IH, add_smul (n : ℝ) 1, add_assoc]; abel + +/-! We now compute the matrix of `f` in the `e` basis (`p` is the line index, +`q` the column index). -/ + +open scoped Classical in +theorem f_matrix (p q : Q n) : |ε q (f n (e p))| = if p ∈ q.adjacent then 1 else 0 := by + induction n with + | zero => + dsimp [f] + simp [Q.not_adjacent_zero] + | succ n IH => + have ite_nonneg : ite (π q = π p) (1 : ℝ) 0 ≥ 0 := by split_ifs <;> norm_num + dsimp only [e, ε, f, V]; rw [LinearMap.prod_apply]; dsimp; cases hp : p 0 <;> cases hq : q 0 + all_goals + repeat rw [Bool.cond_true] + repeat rw [Bool.cond_false] + simp [hp, hq, IH, duality, abs_of_nonneg ite_nonneg, Q.adj_iff_proj_eq, + Q.adj_iff_proj_adj] + +/-- The linear operator $g_m$ corresponding to Knuth's matrix $B_m$. -/ +noncomputable def g (m : ℕ) : V m →ₗ[ℝ] V m.succ := + LinearMap.prod (f m + √(m + 1) • LinearMap.id) LinearMap.id + +/-! In the following lemmas, `m` will denote a natural number. -/ + + +variable {m : ℕ} + +/-! Again we unpack what are the values of `g`. -/ + + +theorem g_apply : ∀ v, g m v = (f m v + √(m + 1) • v, v) := by + delta g; intro v; simp + +theorem g_injective : Injective (g m) := by + rw [g] + intro x₁ x₂ h + simp only [V, LinearMap.prod_apply, LinearMap.id_apply, Prod.mk_inj, Function.prod_apply] at h + exact h.right + +theorem f_image_g (w : V m.succ) (hv : ∃ v, g m v = w) : f m.succ w = √(m + 1) • w := by + rcases hv with ⟨v, rfl⟩ + have : √(m + 1) * √(m + 1) = m + 1 := Real.mul_self_sqrt (mod_cast zero_le) + rw [f_succ_apply, g_apply] + simp [this, f_squared, smul_add, add_smul, smul_smul] + abel + +/-! +### The main proof + +In this section, in order to enforce that `n` is positive, we write it as +`m + 1` for some natural number `m`. -/ + + +/-! `dim X` will denote the dimension of a subspace `X` as a cardinal. -/ + + +local notation "dim " X:70 => Module.rank ℝ { x // x ∈ X } + +/-! `fdim X` will denote the (finite) dimension of a subspace `X` as a natural number. -/ + + +local notation "fdim" => finrank ℝ + +/-! `Span S` will denote the ℝ-subspace spanned by `S`. -/ + + +local notation "Span" => Submodule.span ℝ + +/-! `Card X` will denote the cardinal of a subset of a finite type, as a +natural number. -/ + + +local notation "Card " X:70 => #(Set.toFinset X) + +/-! In the following, `⊓` and `⊔` will denote intersection and sums of ℝ-subspaces, +equipped with their subspace structures. The notations come from the general +theory of lattices, with inf and sup (also known as meet and join). -/ + +open scoped Classical in +/-- If a subset `H` of `Q (m+1)` has cardinal at least `2^m + 1` then the +subspace of `V (m+1)` spanned by the corresponding basis vectors non-trivially +intersects the range of `g m`. -/ +theorem exists_eigenvalue (H : Set (Q m.succ)) (hH : Card H ≥ 2 ^ m + 1) : + ∃ y ∈ Span (e '' H) ⊓ range (g m), y ≠ 0 := by + let W := Span (e '' H) + let img := range (g m) + suffices 0 < dim (W ⊓ img) by + exact mod_cast exists_mem_ne_zero_of_rank_pos this + have dim_le : dim (W ⊔ img) ≤ 2 ^ (m + 1 : Cardinal) := by + convert! ← Submodule.rank_le (W ⊔ img) + rw [← Nat.cast_succ] + apply dim_V + have dim_add : dim (W ⊔ img) + dim (W ⊓ img) = dim W + 2 ^ m := by + convert! ← Submodule.rank_sup_add_rank_inf_eq W img + rw [rank_range_of_injective (g m) g_injective] + apply dim_V + have dimW : dim W = card H := by + have li : LinearIndependent ℝ (H.domRestrict e) := by + convert! (dualBases_e_ε m.succ).basis.linearIndependent.comp _ Subtype.val_injective + rw [(dualBases_e_ε _).coe_basis] + rfl + have hdW := rank_span li + rw [Set.range_domRestrict] at hdW + convert! hdW + rw [← (dualBases_e_ε _).coe_basis, Cardinal.mk_image_eq (dualBases_e_ε _).basis.injective, + Cardinal.mk_fintype] + rw [← finrank_eq_rank ℝ] at dim_le dim_add dimW ⊢ + rw [← finrank_eq_rank ℝ, ← finrank_eq_rank ℝ] at dim_add + norm_cast at dim_le dim_add dimW ⊢ + rw [pow_succ'] at dim_le + rw [Set.toFinset_card] at hH + linarith + +open scoped Classical in +/-- **Huang sensitivity theorem** also known as the **Huang degree theorem** -/ +theorem huang_degree_theorem (H : Set (Q m.succ)) (hH : Card H ≥ 2 ^ m + 1) : + ∃ q, q ∈ H ∧ √(m + 1) ≤ Card H ∩ q.adjacent := by + rcases exists_eigenvalue H hH with ⟨y, ⟨⟨y_mem_H, y_mem_g⟩, y_ne⟩⟩ + have coeffs_support : ((dualBases_e_ε m.succ).coeffs y).support ⊆ H.toFinset := by + intro p p_in + rw [Finsupp.mem_support_iff] at p_in + rw [Set.mem_toFinset] + exact (dualBases_e_ε _).mem_of_mem_span y_mem_H p p_in + obtain ⟨q, H_max⟩ : ∃ q : Q m.succ, ∀ q' : Q m.succ, |(ε q' :) y| ≤ |ε q y| := + Finite.exists_max _ + have H_q_pos : 0 < |ε q y| := by + contrapose! y_ne + exact epsilon_total fun p => abs_nonpos_iff.mp (le_trans (H_max p) y_ne) + refine ⟨q, (dualBases_e_ε _).mem_of_mem_span y_mem_H q (abs_pos.mp H_q_pos), ?_⟩ + let s := √(m + 1) + suffices s * |ε q y| ≤ _ * |ε q y| from (mul_le_mul_iff_left₀ H_q_pos).mp ‹_› + let coeffs := (dualBases_e_ε m.succ).coeffs + calc + s * |ε q y| = |ε q (s • y)| := by + rw [map_smul, smul_eq_mul, abs_mul, abs_of_nonneg (Real.sqrt_nonneg _)] + _ = |ε q (f m.succ y)| := by rw [← f_image_g y (by simpa using! y_mem_g)] + _ = |ε q (f m.succ (lc _ (coeffs y)))| := by rw [(dualBases_e_ε _).lc_coeffs y] + _ = + |(coeffs y).sum fun (i : Q m.succ) (a : ℝ) => + a • (ε q ∘ f m.succ ∘ fun i : Q m.succ => e i) i| := by + rw [lc_def, (f m.succ).map_finsupp_linearCombination, (ε q).map_finsupp_linearCombination, + Finsupp.linearCombination_apply] + _ ≤ ∑ p ∈ (coeffs y).support, |coeffs y p * (ε q <| f m.succ <| e p)| := + (norm_sum_le _ fun p => coeffs y p * _) + _ = ∑ p ∈ (coeffs y).support, |coeffs y p| * ite (p ∈ q.adjacent) 1 0 := by + simp only [abs_mul] + apply Finset.sum_congr rfl + intro p _ + exact congrArg (fun t => |coeffs y p| * t) (f_matrix p q) + _ = ∑ p ∈ (coeffs y).support with p ∈ q.adjacent, |coeffs y p| := by + simp [sum_filter] + _ ≤ ∑ p ∈ (coeffs y).support with p ∈ q.adjacent, |coeffs y q| := sum_le_sum fun p _ ↦ H_max p + _ = #{p ∈ (coeffs y).support | p ∈ q.adjacent} * |coeffs y q| := by + rw [sum_const, nsmul_eq_mul] + _ = #((coeffs y).support ∩ q.adjacent.toFinset) * |coeffs y q| := by + congr with x; simp + _ ≤ #(H ∩ q.adjacent).toFinset * |ε q y| := by + refine (mul_le_mul_iff_left₀ H_q_pos).2 ?_ + norm_cast + apply card_le_card + rw [Set.toFinset_inter] + convert! inter_subset_inter_right coeffs_support + +end + +end LeanPoolSensitivity.Huang diff --git a/LeanPool/Sensitivity/HuangBridge.lean b/LeanPool/Sensitivity/HuangBridge.lean index 010789a656..6c94fb68ec 100644 --- a/LeanPool/Sensitivity/HuangBridge.lean +++ b/LeanPool/Sensitivity/HuangBridge.lean @@ -3,28 +3,35 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.Sensitivity.Defs -import Archive.Sensitivity -import Mathlib.Data.Fintype.Pi +module + +public import LeanPool.Sensitivity.Defs +public import Mathlib.Analysis.Real.Sqrt +import LeanPool.Sensitivity.Huang +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! # Bridge to Mathlib's Huang Theorem -Repackages Mathlib's `Sensitivity.huang_degree_theorem` (the Huang hypercube +Repackages the module port of Mathlib's `Sensitivity.huang_degree_theorem` (the Huang hypercube lemma) in a form that uses `Finset (Fin (m+1) → Bool)` and the `flipBit` predicate from `LeanPool.Sensitivity.Defs`, ready to feed into the sensitivity-conjecture argument. -The Mathlib formalisation in `Archive.Sensitivity` originated in the +The local module port in `LeanPool.Sensitivity.Huang` comes from Mathlib’s +`Archive.Sensitivity`, which originated in the [lean-sensitivity](https://github.com/leanprover-community/lean-sensitivity) project, a community formalisation of Huang's proof carried out shortly after the original paper appeared in 2019. -/ +@[expose] public section + namespace LeanPoolSensitivity /-- A finset-flavoured restatement of Mathlib's -`Sensitivity.huang_degree_theorem`: any subset `H` of the hypercube of size +`LeanPoolSensitivity.Huang.huang_degree_theorem`: any subset `H` of the hypercube of size at least `2^m + 1` contains a vertex `q` with at least `√(m+1)` neighbours in `H`, where neighbours are bit-flip images `flipBit q i`. -/ theorem huang_finset {m : ℕ} (H : Finset (Fin (m + 1) → Bool)) @@ -32,13 +39,13 @@ theorem huang_finset {m : ℕ} (H : Finset (Fin (m + 1) → Bool)) ∃ q ∈ H, Real.sqrt (↑m + 1) ≤ ↑(H.filter (fun p => ∃ i, p = flipBit q i)).card := by classical - let e : Sensitivity.Q m.succ ≃ (Fin (m + 1) → Bool) := + let e : LeanPoolSensitivity.Huang.Q m.succ ≃ (Fin (m + 1) → Bool) := { toFun := fun x => (show Fin (m + 1) → Bool from x) - invFun := fun x => (show Sensitivity.Q m.succ from x) + invFun := fun x => (show LeanPoolSensitivity.Huang.Q m.succ from x) left_inv := fun _ => rfl right_inv := fun _ => rfl } - let HQ : Set (Sensitivity.Q m.succ) := {x | e x ∈ H} - let : DecidablePred (fun a : Sensitivity.Q m.succ => a ∈ HQ) := + let HQ : Set (LeanPoolSensitivity.Huang.Q m.succ) := {x | e x ∈ H} + let : DecidablePred (fun a : LeanPoolSensitivity.Huang.Q m.succ => a ∈ HQ) := Classical.decPred _ have hmap : HQ.toFinset.map e.toEmbedding = H := by ext x @@ -59,7 +66,7 @@ theorem huang_finset {m : ℕ} (H : Finset (Fin (m + 1) → Bool)) simp have hHQ : HQ.toFinset.card ≥ 2 ^ m + 1 := by omega - obtain ⟨q, hqH, hbound⟩ := Sensitivity.huang_degree_theorem HQ hHQ + obtain ⟨q, hqH, hbound⟩ := LeanPoolSensitivity.Huang.huang_degree_theorem HQ hHQ have hqH' : e q ∈ H := by change q ∈ HQ at hqH change e q ∈ H at hqH @@ -71,9 +78,9 @@ theorem huang_finset {m : ℕ} (H : Finset (Fin (m + 1) → Bool)) simp only [Set.mem_toFinset, Set.mem_inter_iff] at hp rw [Finset.mem_filter] refine ⟨hp.1, ?_⟩ - simp only [Sensitivity.Q.adjacent, Set.mem_ofPred_eq] at hp + simp only [LeanPoolSensitivity.Huang.Q.adjacent, Set.mem_ofPred_eq] at hp obtain ⟨i, hne, huniq⟩ := hp.2 - have e_apply (x : Sensitivity.Q m.succ) (j : Fin m.succ) : e x j = x j := rfl + have e_apply (x : LeanPoolSensitivity.Huang.Q m.succ) (j : Fin m.succ) : e x j = x j := rfl exact ⟨i, funext fun j => by by_cases hji : j = i · subst hji; simp only [flipBit_apply_same, e_apply] diff --git a/LeanPool/Sensitivity/Main.lean b/LeanPool/Sensitivity/Main.lean index 3b2784af57..d954d70f48 100644 --- a/LeanPool/Sensitivity/Main.lean +++ b/LeanPool/Sensitivity/Main.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.Sensitivity.Defs -import LeanPool.Sensitivity.Multilinear -import LeanPool.Sensitivity.Subcube -import LeanPool.Sensitivity.Parity +module + +public import LeanPool.Sensitivity.Multilinear +public import Mathlib.Analysis.Real.Sqrt import LeanPool.Sensitivity.HuangBridge +import LeanPool.Sensitivity.Parity +import LeanPool.Sensitivity.Subcube +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! # The Sensitivity Theorem @@ -32,6 +36,8 @@ lemma with the Huang hypercube lemma imported from `Mathlib`'s `f` itself. -/ +@[expose] public section + namespace LeanPoolSensitivity /-- **Sensitivity Theorem** (Huang 2019). For any Boolean function `f` of diff --git a/LeanPool/Sensitivity/Multilinear.lean b/LeanPool/Sensitivity/Multilinear.lean index f9615396fc..36afec4c7a 100644 --- a/LeanPool/Sensitivity/Multilinear.lean +++ b/LeanPool/Sensitivity/Multilinear.lean @@ -3,11 +3,11 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.Sensitivity.Defs -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Data.Finset.Powerset -import Mathlib.Data.Fintype.Powerset -import Mathlib.Data.Int.Basic +module + +public import LeanPool.Sensitivity.Defs +public import Mathlib.Data.Fintype.Powerset +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs /-! # Multilinear Representation and Degree @@ -26,6 +26,8 @@ of that representation and the multilinear degree of `f`. * `LeanPoolSensitivity.BoolFun.degree` — the multilinear degree of `f`. -/ +@[expose] public section + namespace LeanPoolSensitivity variable {n : ℕ} diff --git a/LeanPool/Sensitivity/Parity.lean b/LeanPool/Sensitivity/Parity.lean index 1f5c7edf5d..80aaf98c3a 100644 --- a/LeanPool/Sensitivity/Parity.lean +++ b/LeanPool/Sensitivity/Parity.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.Sensitivity.Defs -import LeanPool.Sensitivity.Multilinear -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Data.Fintype.Pi -import Mathlib.Data.Fintype.Powerset +module + +public import LeanPool.Sensitivity.Multilinear +import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Data.Fintype.BigOperators -import Mathlib.Data.Nat.Choose.Sum +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Ring.RingNF /-! # Parity Function and the Imbalance Lemma @@ -28,6 +32,8 @@ must have a "majority" parity-sign class strictly larger than `2^{n-1}`. degree, one parity-sign class has more than `2^{n-1}` vertices. -/ +@[expose] public section + namespace LeanPoolSensitivity variable {n : ℕ} diff --git a/LeanPool/Sensitivity/Subcube.lean b/LeanPool/Sensitivity/Subcube.lean index 684e9c36c2..328d8f2016 100644 --- a/LeanPool/Sensitivity/Subcube.lean +++ b/LeanPool/Sensitivity/Subcube.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ -import LeanPool.Sensitivity.Defs -import LeanPool.Sensitivity.Multilinear +module + +public import LeanPool.Sensitivity.Multilinear +import Mathlib.Algebra.BigOperators.Group.Finset.Basic /-! # Subcube Restriction @@ -30,6 +32,8 @@ decrease sensitivity and preserves Möbius coefficients on subsets of the restriction has full degree `d`. -/ +@[expose] public section + namespace LeanPoolSensitivity variable {n : ℕ} diff --git a/LeanPool/SetTheory.lean b/LeanPool/SetTheory.lean index 768e6ed64e..2a67ff694c 100644 --- a/LeanPool/SetTheory.lean +++ b/LeanPool/SetTheory.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Shuhao Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shuhao Song -/ +module -import LeanPool.SetTheory.KunenInconsistency +public import LeanPool.SetTheory.KunenInconsistency /-! # The Kunen inconsistency theorem @@ -17,6 +18,8 @@ Tags: set-theory, large-cardinals, elementary-embedding, kunen-inconsistency, mo MSC: 03E55, 03C90 -/ +@[expose] public section + /-! ## Overview diff --git a/LeanPool/SetTheory/Basic.lean b/LeanPool/SetTheory/Basic.lean index 622d88b273..fd2a9ede95 100644 --- a/LeanPool/SetTheory/Basic.lean +++ b/LeanPool/SetTheory/Basic.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 Shuhao Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shuhao Song -/ -import LeanPool.SetTheory.Realize -import Mathlib.SetTheory.ZFC.VonNeumann +module + +public import LeanPool.SetTheory.Realize + +public import Mathlib.SetTheory.ZFC.VonNeumann +public import LeanPool.SetTheory.RealizeCore +public import LeanPool.SetTheory.SimpAttr +public meta import Mathlib.Tactic.Basic +import Lean.Elab.Tactic.RCases +import Mathlib.Tactic.FinCases +import Std.Tactic.BVDecide.Normalize.Prop /-! # Basic theory of models of ZF set theory @@ -14,6 +23,8 @@ including the von Neumann hierarchy and foundational lemmas used throughout the inconsistency development. -/ +@[expose] public section + noncomputable section attribute [local implicit_reducible] 𝓛ZF diff --git a/LeanPool/SetTheory/ElementaryEmbedding.lean b/LeanPool/SetTheory/ElementaryEmbedding.lean index ac0178c334..931e6f7c2a 100644 --- a/LeanPool/SetTheory/ElementaryEmbedding.lean +++ b/LeanPool/SetTheory/ElementaryEmbedding.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Shuhao Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shuhao Song -/ -import LeanPool.SetTheory.Omega +module + +public import LeanPool.SetTheory.Omega +import Std.Tactic.BVDecide.Normalize.Prop /-! # Elementary embeddings of models of ZF @@ -12,6 +15,8 @@ This module defines nontrivial elementary embeddings of a model of ZF into itsel critical points, and the basic properties of the iterates of the critical point. -/ +@[expose] public section + noncomputable section open FirstOrder Language Function Ordinal SetTheory diff --git a/LeanPool/SetTheory/KunenInconsistency.lean b/LeanPool/SetTheory/KunenInconsistency.lean index b5de44e799..92904e9605 100644 --- a/LeanPool/SetTheory/KunenInconsistency.lean +++ b/LeanPool/SetTheory/KunenInconsistency.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Shuhao Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shuhao Song -/ -import LeanPool.SetTheory.ElementaryEmbedding +module + +public import LeanPool.SetTheory.ElementaryEmbedding +import Mathlib.Tactic.FinCases +import Std.Tactic.BVDecide.Normalize.Prop /-! # The Kunen inconsistency theorem @@ -12,6 +16,8 @@ This module proves the Kunen inconsistency theorem: there is no nontrivial eleme embedding of the universe of sets into itself. -/ +@[expose] public section + noncomputable section open Function Cardinal @@ -159,7 +165,7 @@ def s (α : ν.ToType) : ℕ → κω := by simp only [Set.mem_ofPred_eq, Set.mem_sdiff, Set.mem_range, not_exists, ne_eq] · apply sdiff_nonempty_of_mk_lt_mk refine lt_of_le_of_lt mk_range_le ?_ - refine lt_of_lt_of_le (mk_Iio_ToType_lt _) ?_ + refine lt_of_lt_of_le (private_decl% (mk_Iio_ToType_lt _)) ?_ have equivType : {x : ℕ → κω | ∀ n, ↑(x n) ∈ X α} ≃ (ℕ → X α) := { toFun := fun | ⟨x, hx⟩, n => ⟨x n, hx n⟩, invFun := fun | x => ⟨fun n => ⟨↑(x n), X_subset_κω _ (x n).2⟩, fun n => (x n).2⟩, diff --git a/LeanPool/SetTheory/Omega.lean b/LeanPool/SetTheory/Omega.lean index 5ad79befb6..a50cf9de13 100644 --- a/LeanPool/SetTheory/Omega.lean +++ b/LeanPool/SetTheory/Omega.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Shuhao Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shuhao Song -/ -import LeanPool.SetTheory.Ordinals +module + +public import LeanPool.SetTheory.Ordinals +import Mathlib.Tactic.FinCases +import Std.Tactic.BVDecide.Normalize.Prop /-! # The first infinite ordinal in models of ZF @@ -12,6 +16,8 @@ This module develops the theory of `ω` and the natural numbers inside a von Neu of ZF, providing the infinitary tools needed for the Kunen inconsistency argument. -/ +@[expose] public section + noncomputable section open SetTheory Ordinal Cardinal ZFSet Function @@ -59,9 +65,8 @@ namespace SetTheory congr! 4 with y hy sub simp only [ne_eq, ZFSet.ext_iff, notMem_empty, iff_false, not_forall, not_not, Set.Nonempty, Set.mem_ofPred_eq, Subtype.exists, exists_prop] - conv => - enter [2, 1, z] - erw [and_iff_right_of_imp (@hy z)] + simp_all + aesop /-- The `ωₛ` declaration. -/ def ωₛ := Ordinal.toZFSet ω diff --git a/LeanPool/SetTheory/OrderTheory.lean b/LeanPool/SetTheory/OrderTheory.lean index 58c1ddb015..fdc390d7d7 100644 --- a/LeanPool/SetTheory/OrderTheory.lean +++ b/LeanPool/SetTheory/OrderTheory.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Shuhao Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shuhao Song -/ -import Mathlib.Order.ConditionallyCompleteLattice.Basic +module + +public import Mathlib.Order.ConditionallyCompleteLattice.Basic /-! # Order-theoretic preliminaries @@ -12,6 +14,8 @@ This module collects order-theoretic lemmas about infima and suprema in conditio complete lattices, in particular closure under bounded infima and suprema. -/ +@[expose] public section + open Function OrderDual Set variable {α β : Type*} [ConditionallyCompleteLattice α] [ConditionallyCompleteLattice β] diff --git a/LeanPool/SetTheory/Ordinals.lean b/LeanPool/SetTheory/Ordinals.lean index f9e1c131b0..d7a4f20d2f 100644 --- a/LeanPool/SetTheory/Ordinals.lean +++ b/LeanPool/SetTheory/Ordinals.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Shuhao Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shuhao Song -/ -import LeanPool.SetTheory.Basic -import LeanPool.SetTheory.OrderTheory +module + +public import LeanPool.SetTheory.Basic +public import LeanPool.SetTheory.OrderTheory +import Mathlib.Tactic.FinCases +import Std.Tactic.BVDecide.Normalize.Prop /-! # Ordinals in models of ZF @@ -13,6 +17,8 @@ This module develops the theory of ordinals inside a von Neumann model of ZF, in their order structure and the correspondence with Mathlib's `Ordinal` type. -/ +@[expose] public section + noncomputable section open Function Order Ordinal SetTheory ZFSet diff --git a/LeanPool/SetTheory/Realize.lean b/LeanPool/SetTheory/Realize.lean index 38e838ec5c..f84ac87386 100644 --- a/LeanPool/SetTheory/Realize.lean +++ b/LeanPool/SetTheory/Realize.lean @@ -3,1066 +3,32 @@ Copyright (c) 2026 Shuhao Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shuhao Song -/ -import Mathlib.ModelTheory.ElementaryMaps -import Mathlib.ModelTheory.Semantics -import Mathlib.Tactic.FinCases -import LeanPool.SetTheory.SimpAttr +module + +public meta import LeanPool.SetTheory.RealizeBuilders +public import LeanPool.SetTheory.RealizeBuilders /-! -# Realization machinery for the ZF first-order language +# Elaboration of serialized ZF expressions -This module sets up the first-order language `𝓛ZF` of ZF set theory with a single -membership relation, together with notation and metaprogramming infrastructure for -building and realizing bounded formulas in models of ZF. +The implementation is imported at the meta phase so its expression decoders can execute +inside term elaborators while their data definitions and correctness lemmas remain available. -/ -open Lean Parser Elab Term Meta Qq Std FirstOrder.Language - -/-- The `memRel` type. -/ -inductive memRel : ℕ → Type - | mem : memRel 2 - deriving DecidableEq - -open FirstOrder in -/-- The first-order language of ZF set theory, with a single binary membership relation. -/ -def 𝓛ZF : FirstOrder.Language := ⟨fun _ => Empty, memRel⟩ -deriving IsRelational - -attribute [local implicit_reducible] 𝓛ZF - -namespace FirstOrder.Language.BoundedFormula - -open Language - -variable {α n} {L : Language} {M} [L.Structure M] (v : α → M) (w : Fin n → M) - -lemma realize_isFormula (φ : L.BoundedFormula α 0) (w : Fin 0 → M) : - φ.Realize v w ↔ Formula.Realize φ v := by - simp only [Formula.Realize] - convert Iff.rfl - -/-- The `exUnique` declaration. -/ -protected def exUnique (φ : L.BoundedFormula α (n + 1)) : L.BoundedFormula α n := - ∃' (φ ⊓ ∀' (φ.liftAt 1 n ⟹ &(Fin.last (n + 1)) =' &((Fin.last n).castSucc))) - -/-- The `ite` declaration. -/ -protected def ite (φ ψ χ : L.BoundedFormula α n) : L.BoundedFormula α n := - (φ ⊓ ψ) ⊔ (∼φ ⊓ χ) - -theorem realize_ite (φ ψ χ : L.BoundedFormula α n) : - (φ.ite ψ χ).Realize v w ↔ - (φ.Realize v w ∧ ψ.Realize v w) ∨ (¬φ.Realize v w ∧ χ.Realize v w) := by - simp [BoundedFormula.ite] - -theorem realize_exUnique (φ : L.BoundedFormula α (n + 1)) : - φ.exUnique.Realize v w ↔ ∃! a : M, φ.Realize v (Fin.snoc w a) := by - have (x y : M) : Fin.snoc (Fin.snoc w x) y ∘ - (fun i : Fin (n + 1) => if (i : ℕ) < n then i.castSucc else i.succ) - = Fin.snoc w y := by - ext i - simp only [Function.comp_apply] - split_ifs with hi - · simp [Fin.snoc, hi, _root_.le_of_lt hi] - · replace hi := Decidable.not_imp_symm Fin.val_lt_last hi - simp [hi] - simp [BoundedFormula.exUnique, realize_liftAt_one, ExistsUnique, this] - -variable {k} (φ : L.Formula (Fin (k + 1))) - -/-- The `FormulaToFunction` type. -/ -class _root_.FormulaToFunction (f : outParam ((Fin k → M) → M)) where - realize_iff_fn {v : Fin (k + 1) → M} : - φ.Realize v ↔ f (v ∘ Fin.castSucc) = v (.last k) := by - simp only [Fin.reduceCastSucc, Fin.reduceLast, Nat.reduceAdd, - realize_simps, implies_true] - -variable (vars : Fin k → α ⊕ Fin n) (ψ : L.BoundedFormula α (n + 1)) - -/-- The `ofFunc` declaration. -/ -def ofFunc := ∃' (BoundedFormula.relabel (k := 0) - (Fin.snoc (Sum.map id Fin.castSucc ∘ vars) (.inr (.last n))) φ ⊓ ψ) - -lemma realize_ofFunc {f} [FormulaToFunction φ f] : - (ofFunc φ vars ψ).Realize v w ↔ - ψ.Realize v (Fin.snoc w (f (Sum.elim v w ∘ vars))) := by - simp (unfoldPartialApp := true) [ - ofFunc, realize_isFormula, FormulaToFunction.realize_iff_fn, - Function.comp, Sum.elim_map - ] - -attribute [realize_simps] - realize_all realize_ex realize_bot realize_top realize_not realize_inf realize_sup - realize_imp realize_iff realize_rel₂ realize_bdEqual realize_relabel realize_ite - realize_exUnique realize_ofFunc Term.realize_var Function.comp - -/-- The `#_` notation. -/ -scoped[FirstOrder] prefix:arg "#" => Term.var ∘ Sum.inl -/-- The `_∈ᶻ'_` notation: membership in the ZF first-order language `𝓛ZF`. -/ -scoped[FirstOrder] infix:88 " ∈ᶻ' " => Relations.boundedFormula₂ (L := 𝓛ZF) memRel.mem - -/-- The `label` declaration. -/ -declare_syntax_cat label -/-- The `label#_` declaration. -/ -syntax "#" num : label -/-- The `label&_` declaration. -/ -syntax "&" num : label -/-- The `Value_of_labels(_)` declaration. -/ -syntax "value_of_labels(" label,* ")" : term -/-- The `_@(_)` notation. -/ -syntax term "@(" label,* ")" : term -macro_rules - | `($f:ident@($labels:label,*)) => - `(BoundedFormula.relabel - value_of_labels($labels,*) $(mkIdent (f.getId ++ `formula)) (k := 0)) - | `(value_of_labels(#$n, $labels,*)) => - `(Matrix.vecCons (Sum.inl $n) value_of_labels($labels,*)) - | `(value_of_labels(&$n, $labels,*)) => - `(Matrix.vecCons (Sum.inr $n) value_of_labels($labels,*)) - | `(value_of_labels(#$n)) => `(Matrix.vecCons (Sum.inl $n) ![]) - | `(value_of_labels(&$n)) => `(Matrix.vecCons (Sum.inr $n) ![]) - | `(value_of_labels()) => `(Matrix.vecEmpty) - -end FirstOrder.Language.BoundedFormula - -section ZFStructure - -open FirstOrder Language Structure - -/-- The `ZFFormula` declaration. -/ -abbrev ZFFormula (n : ℕ) := 𝓛ZF.Formula (Fin n) -/-- The `ZFStructure` declaration. -/ -abbrev ZFStructure M := 𝓛ZF.Structure M - -variable {M N : Type*} [sM : ZFStructure M] [sN : ZFStructure N] - -instance (priority := high) instMembershipZFStructure : Membership M M where - mem x y := sM.RelMap memRel.mem ![y, x] - -instance instHasSubsetM : HasSubset M where - Subset x y := ∀ ⦃z⦄, z ∈ x → z ∈ y - -/-- The `ElementaryEmbeddingClass` type. -/ -class ElementaryEmbeddingClass - (F : Type*) (M N : outParam Type*) - [ZFStructure M] [ZFStructure N] [FunLike F M N] : Prop where - map_formula : ∀ (f : F) ⦃n⦄ (φ : 𝓛ZF.Formula (Fin n)) (x : Fin n → M), - φ.Realize (f ∘ x) ↔ φ.Realize x - -instance : ElementaryEmbeddingClass (M ↪ₑ[𝓛ZF] N) M N where - map_formula := fun j => j.map_formula' - -lemma Fin.two_def {α} (x : Fin 2 → α) : x = ![x 0, x 1] := by - ext i; fin_cases i <;> simp - -@[realize_simps] lemma relMap_mem_iff_membership {v : Fin 2 → M} : - RelMap (L := 𝓛ZF) memRel.mem v ↔ v 0 ∈ v 1 := by - conv_lhs => rw [Fin.two_def v] - rfl - -/-- The `HasEmpty` type. -/ -class HasEmpty (M) [ZFStructure M] where - exists_empty : ∃! x : M, ∀ y, y ∉ x - -/-- The `EqEmptyN` declaration. -/ -def EqEmptyN (n : ℕ) : ZFFormula (n + 1) := ∀' ∼(&0 ∈ᶻ' #(Fin.last n)) +public meta section -variable {n} [HasEmpty M] - -noncomputable instance (priority := low) instEmptyCollectionM : EmptyCollection M where - emptyCollection := HasEmpty.exists_empty.choose - -@[realize_simps] lemma EqEmptyN.realize_iff {v : Fin (n + 1) → M} : - (EqEmptyN n).Realize v ↔ ∅ = v (Fin.last n) := by - simp only [EqEmptyN, Formula.Realize, realize_simps] - rw [iff_comm] - exact (HasEmpty.exists_empty (M := M)).choose_eq_iff - -end ZFStructure +open Lean Meta Elab Term namespace EncodeExpr -/-- The `WeakLevel` type. -/ -inductive WeakLevel where - | a : WeakLevel - | b : WeakLevel → WeakLevel - | c : WeakLevel → WeakLevel → WeakLevel - | d : WeakLevel → WeakLevel → WeakLevel - | e : String → WeakLevel -deriving FromJson, ToJson, Inhabited, Repr - -/-- The `WeakBinderInfo` type. -/ -inductive WeakBinderInfo where - | a | b | c | d -deriving FromJson, ToJson, Inhabited, Repr - -/-- The `WeakExprItem` type. -/ -inductive WeakExprItem where - | a : Nat → WeakExprItem - | b : WeakLevel → WeakExprItem - | c : Nat → List WeakLevel → WeakExprItem - | d : Nat → Nat → WeakExprItem - | e : Nat → Nat → Nat → Nat → WeakExprItem - | f : Nat → Nat → Nat → Nat → WeakExprItem - | g : Nat → Nat → Nat → Nat → Bool → WeakExprItem - | h : Nat → WeakExprItem - | i : String → WeakExprItem - | j : Nat → Nat → Nat → WeakExprItem -deriving FromJson, ToJson, Inhabited, Repr - -/-- The `toWeakLevel` declaration. -/ -def _root_.Lean.Level.toWeakLevel : Level → WeakLevel - | .zero => .a - | .succ u => .b u.toWeakLevel - | .max u v => .c u.toWeakLevel v.toWeakLevel - | .imax u v => .d u.toWeakLevel v.toWeakLevel - | .param name => .e name.toString - | .mvar _ => default - -/-- The `toLevel` declaration. -/ -def WeakLevel.toLevel : WeakLevel → Level - | .a => .zero - | .b u => .succ u.toLevel - | .c u v => .max u.toLevel v.toLevel - | .d u v => .imax u.toLevel v.toLevel - | .e name => .param name.toName - -/-- The `toNat` declaration. -/ -def _root_.Lean.BinderInfo.toNat : BinderInfo → Nat - | .default => 0 - | .implicit => 1 - | .strictImplicit => 2 - | .instImplicit => 3 - -/-- The `toBinderInfo` declaration. -/ -def _root_.Nat.toBinderInfo : Nat → BinderInfo - | 0 => .default - | 1 => .implicit - | 2 => .strictImplicit - | 3 => .instImplicit - | _ => .default - -/-- The numeric encoding of binder information round-trips back to the original. -/ -theorem _root_.Lean.BinderInfo.toNat_toBinderInfo (bi : BinderInfo) : - bi.toNat.toBinderInfo = bi := by - cases bi <;> rfl - -/-- The numeric `BinderInfo` encoding is injective on the four valid binder kinds. -/ -theorem _root_.Lean.BinderInfo.toNat_injective {bi bj : BinderInfo} - (h : bi.toNat = bj.toNat) : bi = bj := by - rw [← bi.toNat_toBinderInfo, ← bj.toNat_toBinderInfo, h] - -/-- Mutable state threaded through expression serialization: deduplicating maps from -subexpressions and names to their indices, together with the output arrays. -/ -structure WeakExprState where - /-- Cache from already-serialized subexpressions to their indices. -/ - hashExpr : HashMap Expr Nat := {} - /-- Cache from already-serialized names to their indices. -/ - hashName : HashMap Name Nat := {} - /-- The serialized expression items, indexed in insertion order. -/ - arrayExpr : Array WeakExprItem := #[] - /-- The serialized name strings, indexed in insertion order. -/ - arrayName : Array String := #[] - -/-- A serialized closed expression: the array of expression items together with the -array of referenced name strings. -/ -abbrev WeakExpr := Array WeakExprItem × Array String - -/-- The serialization monad: a state monad over `WeakExprState` with failure. -/ -abbrev SerializeM := OptionT (StateM WeakExprState) - -/-- Append a new serialized item for `e`, recording its index in the cache. -/ -def add (e : Expr) (i : WeakExprItem) : SerializeM Nat := do - modify fun s => { s with - hashExpr := s.hashExpr.insert e s.hashExpr.size, - arrayExpr := s.arrayExpr.push i - } - return (← get).arrayExpr.size - 1 - -/-- Serialize a name, returning the index of its (deduplicated) string. -/ -def addName (name : Name) : SerializeM Nat := do - if let some n := (← get).hashName.get? name then return n - modify fun s => { s with - hashName := s.hashName.insert name s.hashName.size, - arrayName := s.arrayName.push name.toString - } - return (← get).arrayName.size - 1 - -/-- Recursively serialize an expression into the state, returning its index. -/ -def toWeakExprAux (e : Expr) : SerializeM Nat := do - if let some n := (← get).hashExpr.get? e then return n - match e with - | .bvar n => add e (.a n) - | .fvar _ => failure - | .mvar _ => failure - | .sort u => add e (.b u.toWeakLevel) - | .const name levels => add e (.c (← addName name) (levels.map (·.toWeakLevel))) - | .app s t => do add e (.d (← toWeakExprAux s) (← toWeakExprAux t)) - | .lam name type body info => do - add e (.e (← addName name) (← toWeakExprAux type) (← toWeakExprAux body) info.toNat) - | .forallE name type body info => do - add e (.f (← addName name) (← toWeakExprAux type) (← toWeakExprAux body) info.toNat) - | .letE name type value body nondep => do - add e (.g (← addName name) (← toWeakExprAux type) (← toWeakExprAux value) - (← toWeakExprAux body) nondep) - | .lit (.natVal n) => add e (.h n) - | .lit (.strVal str) => add e (.i str) - | .mdata _ e => toWeakExprAux e - | .proj name idx struct => do add e (.j (← addName name) idx (← toWeakExprAux struct)) - -/-- Serialize a closed expression into its `WeakExpr` representation. -/ -def _root_.Lean.Expr.toWeakExpr (e : Expr) : WeakExpr := - let result := ((toWeakExprAux e).run {}).2 - (result.arrayExpr, result.arrayName) - -/-- The `toExpr` declaration. -/ -def WeakExpr.toExpr (e : WeakExpr) : Expr := Id.run do - let (xs, names) := (e.1, e.2.map (·.toName)) - let mut es : Array Expr := #[] - for i in *...xs.size do - let value : Expr := - match xs[i]! with - | .a n => .bvar n - | .b u => .sort u.toLevel - | .c name u => .const names[name]! (u.map (·.toLevel)) - | .d s t => .app es[s]! es[t]! - | .e name type body info => .lam names[name]! es[type]! es[body]! info.toBinderInfo - | .f name type body info => .forallE names[name]! es[type]! es[body]! info.toBinderInfo - | .g name type value body nondep => .letE names[name]! es[type]! es[value]! es[body]! nondep - | .h n => mkNatLit n - | .i str => mkStrLit str - | .j name idx struct => .proj names[name]! idx es[struct]! - es := es.push value - return es[es.size - 1]! - -/-- The `HeadBeta(_)` declaration. -/ -elab "headBeta(" t:term ")" : term => do - let result ← elabTerm t none - return result.headBeta - -/-- The `Expr(_)` declaration. -/ -elab "expr(" e:strLit ")" : term => do - let e := ((Json.parse e.getString) >>= fromJson? : Except _ WeakExpr).toOption.get!.toExpr - let levels := (collectLevelParams {} e).params.toList - let mvars ← mkFreshLevelMVars levels.length - return e.instantiateLevelParams levels mvars - -/-- The `toSyntax'` declaration. -/ -def _root_.Lean.Expr.toSyntax' - {m} [Monad m] [MonadQuotation m] (e : Expr) : m Term := do - let strLit := Syntax.mkStrLit (toString (toJson (e.toWeakExpr))) - `(expr($strLit)) +elab_rules : term + | `(headBeta($t:term)) => do + let result ← elabTerm t none + return result.headBeta + | `(expr($e:str)) => do + let value := ((Json.parse e.getString) >>= fromJson? : Except _ WeakExpr).toOption.get!.toExpr + let levels := (collectLevelParams {} value).params.toList + let mvars ← mkFreshLevelMVars levels.length + return value.instantiateLevelParams levels mvars end EncodeExpr - -/-- The `VariableParam` type. -/ -inductive VariableParam where - | freeVariable (binderInfo : BinderInfo) - | hypothesis (t : Term) -deriving Inhabited - -namespace VariableParam - -/-- The `isFreeVariable` declaration. -/ -def isFreeVariable : VariableParam → Bool - | freeVariable _ => true - | _ => false - -/-- The `isHypothesis` declaration. -/ -def isHypothesis : VariableParam → Bool - | hypothesis _ => true - | _ => false - -/-- The `toTerm` declaration. -/ -def toTerm : VariableParam → Term - | hypothesis t => t - | _ => default - -/-- A variable parameter is a free variable exactly when it is not a hypothesis. -/ -theorem isFreeVariable_eq_not_isHypothesis (p : VariableParam) : - p.isFreeVariable = !p.isHypothesis := by - cases p <;> rfl - -end VariableParam - -/-- The `VariableParams` declaration. -/ -abbrev VariableParams := Array VariableParam - -namespace VariableParams - -variable (ps : VariableParams) - -/-- The `numFreeVariables` declaration. -/ -def numFreeVariables : Nat := ps.countP (·.isFreeVariable) -/-- The `numHypotheses` declaration. -/ -def numHypotheses : Nat := ps.countP (·.isHypothesis) - -/-- The `freeVarsBefore` declaration. -/ -def freeVarsBefore (n : Nat) : Nat := Id.run do - if n >= ps.numHypotheses then return 0 - let mut (i, j) := (0, 0) - for p in ps do - if p.isFreeVariable then - i := i + 1 - else - if j == n then break - j := j + 1 - return i - -end VariableParams - -/-- The `BuildFormulaState` type. -/ -structure BuildFormulaState where - /-- The `attrDeclName` declaration. -/ - attrDeclName : Name - /-- The `hasEmptyInstance?` declaration. -/ - hasEmptyInstance? : Bool := false - /-- The `classParams` declaration. -/ - classParams : Array Term := #[] - /-- The `variableParams` declaration. -/ - variableParams : VariableParams := #[] - /-- The `variableType` declaration. -/ - variableType : Expr := default - /-- The `localVars` declaration. -/ - localVars : Array Expr := #[] - /-- The `Intermediates` declaration. -/ - termIntermediates : Array (Name × Array Nat) := #[] - -/-- The `BuildFormulaM` declaration. -/ -abbrev BuildFormulaM := StateT BuildFormulaState MetaM - -namespace BuildFormula - -/-- The `removeNameSuffix` declaration. -/ -def removeNameSuffix (name : Name) : Name := - name.eraseSuffix? `eu <|> - name.eraseSuffix? `formula <|> - name.eraseSuffix? `realize_iff <|> - name.eraseSuffix? `instFormulaToFunction <|> - name.eraseSuffix? `to_realize <|> - name.eraseSuffix? `elementarity |>.getD name - -/-- Stripping the recognized suffixes from the anonymous name leaves it unchanged. -/ -theorem removeNameSuffix_anonymous : removeNameSuffix .anonymous = .anonymous := rfl - -/-- The `attrDeclName` declaration. -/ -def attrDeclName : BuildFormulaM Name := do - return (← get).attrDeclName - -/-- The `name` declaration. -/ -def name : BuildFormulaM Name := do - return removeNameSuffix (← get).attrDeclName - -/-- The `isFunction` declaration. -/ -def isFunction : BuildFormulaM Bool := do - return (← getEnv).contains ((← name) ++ `eu) - -/-- The `isRealizeIffStage` declaration. -/ -def isRealizeIffStage : BuildFormulaM Bool := do - return (← attrDeclName).lastComponentAsString == "realize_iff" - -/-- The `hasEmptyInstanceState` declaration. -/ -def hasEmptyInstanceState : BuildFormulaM Bool := do - return (← get).hasEmptyInstance? - -/-- The `classParams` declaration. -/ -def classParams : BuildFormulaM (Array Term) := do - return (← get).classParams - -/-- The `variableParams` declaration. -/ -def variableParams : BuildFormulaM VariableParams := do - return (← get).variableParams - -/-- The `getHypothesis` declaration. -/ -def getHypothesis (i : Nat) : BuildFormulaM Term := do - return ((← variableParams).filter (·.isHypothesis))[i]!.toTerm - -/-- The `freeVarsBefore` declaration. -/ -def freeVarsBefore (i : Nat) : BuildFormulaM Nat := do - return (← variableParams).freeVarsBefore i - -/-- The `numFreeVars` declaration. -/ -def numFreeVars (adjust? := false) : BuildFormulaM Nat := do - return (← get).variableParams.numFreeVariables + - if adjust? && (← isFunction) then 1 else 0 - -/-- The `numHypotheses` declaration. -/ -def numHypotheses : BuildFormulaM Nat := do - return (← get).variableParams.numHypotheses - -/-- The `numAllVars` declaration. -/ -def numAllVars : BuildFormulaM Nat := do - return 2 + (← classParams).size + (← variableParams).size - -/-- The `variableType` declaration. -/ -def variableType : BuildFormulaM Expr := do - return (← get).variableType - -/-- The `localVars` declaration. -/ -def localVars : BuildFormulaM (Array Expr) := do - return (← get).localVars - -/-- The `Intermediates` declaration. -/ -def termIntermediates : BuildFormulaM (Array (Name × Array Nat)) := do - return (← get).termIntermediates - -/-- The `addIntermediate` declaration. -/ -def addIntermediate (name : Name) (args : Array Nat) : BuildFormulaM Nat := do - let xs ← termIntermediates - modify fun s => { s with termIntermediates := xs.push (name, args) } - return (← localVars).size + xs.size - -/-- The `clearIntermediates` declaration. -/ -def clearIntermediates : BuildFormulaM Unit := do - modify fun s => { s with termIntermediates := #[] } - -/-- The `findVar` declaration. -/ -def findVar (e : Expr) : BuildFormulaM Nat := do - match (← localVars).findIdx? (· == e) with - | some n => return n - | none => throwError m!"Can't find variable {e} in {← localVars}" - -/-- The `getIndexSeq` declaration. -/ -def getIndexSeq (extraBinders : Nat) (idx : Array Nat) : BuildFormulaM Expr := do - let n₀ ← numFreeVars true - let α ← `(Fin $(Syntax.mkNatLit n₀)) - let β ← `(Fin $(Syntax.mkNatLit ((← localVars).size + extraBinders - n₀))) - let indexSyntax ← idx.mapM fun n => do - let (op, i) := if n < n₀ then (`Sum.inl, n) else (`Sum.inr, n - n₀) - let stx ← `($(mkIdent op) $(Syntax.mkNatLit i)) - return stx - let mut stx ← `(Matrix.vecEmpty (α := $α ⊕ $β)) - for i in indexSyntax.reverse do - stx ← `(Matrix.vecCons $i $stx) - (elabTermAndSynthesize stx none).run' - -/-- The `withNewVars` declaration. -/ -def withNewVars {α} (vars : Array Expr) (f : BuildFormulaM α) : BuildFormulaM α := do - let oldVars ← localVars - modify fun s => { s with localVars := oldVars ++ vars } - try f - finally modify fun s => { s with localVars := oldVars } - -/-- The empty parameter list contributes no free variables. -/ -theorem numFreeVariables_empty : VariableParams.numFreeVariables #[] = 0 := rfl - -/-- The `throwTranslateError` declaration. -/ -def throwTranslateError {α} (e : Expr) : BuildFormulaM α := do - throwError m!"Can't translate to formula: {e}, variables: {← localVars}" - -/-- The `decomposeApp` declaration. -/ -def decomposeApp (e : Expr) : BuildFormulaM (Name × Array Expr) := do - let t ← variableType - let mut (.const name _, args) := (e.getAppFn, e.getAppArgs) | throwTranslateError e - let formulaName := name ++ `formula - unless (← getEnv).contains formulaName do - throwError "Formula {formulaName} not found" - return (formulaName, ← args.filterM fun e => do isDefEq (← inferType e) t) - -/-- Translate a term-level subexpression into an intermediate index, using `fuel` to -bound the recursion (any fuel at least the expression depth suffices). -/ -def goTerm (fuel : Nat) (e : Expr) : BuildFormulaM Nat := do - match fuel with - | 0 => throwTranslateError e - | fuel + 1 => - match e with - | .app .. => - let (name, args) ← decomposeApp e - addIntermediate name (← args.mapM (goTerm fuel)) - | .fvar .. => findVar e - | _ => throwTranslateError e - -/-- Translate a proposition into a `BoundedFormula`, using `fuel` to bound the -recursion (any fuel at least the expression depth suffices). -/ -def go (fuel : Nat) (e : Expr) : BuildFormulaM Expr := do - match fuel with - | 0 => throwTranslateError e - | fuel + 1 => - match e with - | .forallE name type body info => - let newExpr : Expr := .lam name type body info - let sort ← inferType type - match sort.sortLevel! with - | 0 => mkAppM ``BoundedFormula.imp #[← go fuel type, ← go fuel body] - | _ => mkAppM ``BoundedFormula.all #[← go fuel newExpr] - | .lam .. => lambdaTelescope e fun newVars e' => withNewVars newVars (go fuel e') - | .app .. => - match_expr e with - | Exists _ P => mkAppM ``BoundedFormula.ex #[← go fuel P] - | ExistsUnique _ P => do mkAppM ``BoundedFormula.exUnique #[← go fuel P] - | And p q => mkAppM ``min #[← go fuel p, ← go fuel q] - | Or p q => mkAppM ``max #[← go fuel p, ← go fuel q] - | Not p => mkAppM ``BoundedFormula.not #[← go fuel p] - | Iff p q => mkAppM ``BoundedFormula.iff #[← go fuel p, ← go fuel q] - | _ => - let (name, args) ← decomposeApp e - let argsIdx ← args.mapM (goTerm fuel) - let mut formula ← mkAppOptM ``BoundedFormula.relabel #[ - none, none, none, none, ← getIndexSeq (← termIntermediates).size argsIdx, - toExpr 0, mkConst name - ] - for ((name, idx), i) in (← termIntermediates).zipIdx.reverse do - formula ← mkAppM ``BoundedFormula.ofFunc #[mkConst name, ← getIndexSeq i idx, formula] - clearIntermediates - return formula - | _ => throwTranslateError e - -/-- The `checkSorry` declaration. -/ -def checkSorry (name : Name) : BuildFormulaM Unit := do - match (← getEnv).findAsync? name false with - | some const => do - let reportError (const : ConstantInfo) : CoreM Unit := do - if const.toDeclaration!.hasSorry then - throwError m!"Definition {name} has sorry" - let cancelTk ← IO.CancelToken.new - let checkAct ← Core.wrapAsyncAsSnapshot reportError cancelTk - let t ← BaseIO.mapTask checkAct const.constInfo - Core.logSnapshotTask { - stx? := none, reportingRange := .skip, task := t, cancelTk? := cancelTk - } - | none => throwError m!"Definition {name} not found" - -/-- The `addDeclSimple` declaration. -/ -def addDeclSimple (name : Name) (type value : Expr) : BuildFormulaM Unit := do - let value ← instantiateMVars value - let env ← getEnv - let result ← Closure.mkValueTypeClosure type value false - let hints := ReducibilityHints.regular (getMaxHeight env value + 1) - let decl := Declaration.defnDecl (mkDefinitionValEx - name result.levelParams.toList result.type result.value - hints DefinitionSafety.safe [name] - ) - addDecl decl - Lean.addDocStringCore name - "The first-order formula automatically realized for this set-theoretic predicate." - warnIfUsesSorry decl - enableRealizationsForConst name - -/-- The `explicitize` declaration. -/ -def explicitize : Expr → Nat → Expr - | .lam name type body _, n + 1 => .lam name type (explicitize body n) .default - | e, _ => e - -/-- The `mkLambdaFVarsExplicit` declaration. -/ -def mkLambdaFVarsExplicit (xs : Array Expr) (e : Expr) : BuildFormulaM Expr := do - let e' ← mkLambdaFVars xs e - if e'.hasFVar || e'.hasMVar then - throwError "{e'} depends on variables not in {xs}" - return explicitize e' xs.size - -/-- The `init` declaration. -/ -def init : BuildFormulaM Unit := do - let constInfo := (← getEnv).find? (← attrDeclName) |>.get! - forallTelescopeReducing constInfo.type fun vars _ => do - unless vars.size ≥ 2 do - throwError m!"Variable list {vars} doesn't starts with `\{M} [ZFStructure M] ...`" - let variableType := vars[0]! - let mut classVars : Array Expr := #[] - let mut classParams : Array Term := #[] - let mut freeVars : Array Expr := #[] - let mut variableParams : VariableParams := #[] - let hasEmpty ← mkAppOptM ``HasEmpty #[vars[0]!, vars[1]!] - for i in 2...vars.size do - let type ← inferType vars[i]! - if (← vars[i]!.fvarId!.getBinderInfo) == .instImplicit then - if freeVars.size != 0 then - throwError m!"Free variables must occur after all instance parameters" - classVars := classVars.push vars[i]! - classParams := classParams.push <| - ← (← mkLambdaFVarsExplicit vars[*...2] type).toSyntax' - if (← isDefEq type hasEmpty) then - modify fun s => { s with hasEmptyInstance? := true} - else - if ← isRealizeIffStage then continue - if ← isDefEq type variableType then - freeVars := freeVars.push vars[i]! - variableParams := variableParams.push <| .freeVariable <| vars[i]!.binderInfo - else - unless (← isFunction) do - throwError "Only function definitions allow hypotheses" - variableParams := variableParams.push <| .hypothesis - (← (← mkLambdaFVarsExplicit (vars[*...2] ++ classVars ++ freeVars) type).toSyntax') - if ← isRealizeIffStage then - let formulaType := ((← getEnv).find? ((← name) ++ `formula)).get!.type - let_expr ZFFormula n := formulaType | throwError "Formula must be of `ZFFormula` type" - let some numFreeVars ← (Lean.Meta.evalNat (← whnf n)).run - | throwError "Formula index is not a literal natural number" - modify fun s => { s with - classParams, variableParams := .replicate numFreeVars (.freeVariable .default) - } - else - modify fun s => { s with - classParams, variableParams - } - -/-- The `simpFormulaPre` declaration. -/ -def simpFormulaPre (e : Expr) : BuildFormulaM Expr := do - let some ext ← getSimpExtension? `formula_builder_pre | failure - let ctx ← Simp.mkContext {} #[← ext.getTheorems] - return (← simp e ctx).1.expr - -/-- The `simpFormula` declaration. -/ -def simpFormula (e : Expr) : BuildFormulaM Expr := do - let some ext ← getSimpExtension? `formula_builder | failure - let ctx ← Simp.mkContext {} #[← ext.getTheorems] - return (← simp e ctx).1.expr - -/-- The `definitionProp` declaration. -/ -def definitionProp : BuildFormulaM Expr := do - if ← isFunction then - let constInfo := (← getEnv).find? ((← name) ++ `eu) |>.get! - forallTelescopeReducing (← simpFormulaPre constInfo.type) fun vars type => do - match_expr type with - | ExistsUnique _ P => mkLambdaFVars vars P - | _ => throwError m!"Function definition should has type with form `∃!, ...`" - else - let definition := ((← getEnv).find? (← name)).get! - let some value := definition.value? - | throwError m!"Definition {← name} doesn't have value" - simpFormulaPre value - -/-- The `buildFormula` declaration. -/ -def buildFormula (formulaName : Name) : BuildFormulaM Unit := do - let isFunction ← isFunction - let formula ← lambdaTelescope (← definitionProp) fun vars value => do - let varsInDecl := if isFunction then vars.pop else vars - let variableParams ← variableParams - let freeVarsInDecl := varsInDecl.drop (varsInDecl.size - variableParams.size) - |>.zipIdx - |>.filter (fun (_, i) => variableParams[i]!.isFreeVariable) - |>.map (·.1) - let formulaVars := if isFunction then freeVarsInDecl ++ #[vars.back!] else freeVarsInDecl - modify fun s => { s with - variableType := vars[0]! - localVars := formulaVars - } - let value ← simpFormula value - let mut formula ← go (value.approxDepth.toNat + 1) value - for i in (*...(← numHypotheses)).toArray.reverse do - let e ← (elabTermAndSynthesize (← getHypothesis i) none).run' - let e := e.beta <| - vars[*...2 + (← classParams).size] ++ formulaVars[*...(← freeVarsBefore i)] - let e ← simpFormula e - formula ← mkAppM ``BoundedFormula.ite #[ - ← go (e.approxDepth.toNat + 1) e, formula, ← mkAppM ``EqEmptyN #[toExpr (← numFreeVars)] - ] - return formula - addDeclSimple formulaName (← mkAppM ``ZFFormula #[toExpr (← numFreeVars true)]) formula - applyAttributes formulaName #[{name := `irreducible}] |>.run' - -/-- The `prefixIdents` declaration. -/ -def prefixIdents (typeLetter := "M") : Array Ident := - #[mkIdent typeLetter.toName, mkIdent ("s" ++ typeLetter).toName] - -/-- The prefix identifiers are exactly the carrier type and its structure instance. -/ -theorem prefixIdents_size (typeLetter : String) : (prefixIdents typeLetter).size = 2 := rfl - -/-- The `classIdents` declaration. -/ -def classIdents (typeLetter := "M") : BuildFormulaM (Array Ident) := do - return (*...(← classParams).size).toArray.map - fun i => mkIdent ("c" ++ typeLetter ++ (i + 1).toSubscriptString).toName - -/-- The `varIdents` declaration. -/ -def varIdents (adjust? := false) (varLetter := "x") : BuildFormulaM (Array Ident) := do - return (Array.range (← numFreeVars adjust?)).map - fun i => mkIdent (Name.mkStr1 (varLetter ++ (i + 1).toSubscriptString)) - -/-- The `hypothesisIdents` declaration. -/ -def hypothesisIdents (hypothesisLetter := "h") : BuildFormulaM (Array Ident) := do - return (Array.range (← numHypotheses)).map - fun i => mkIdent (Name.mkStr1 (hypothesisLetter ++ (i + 1).toSubscriptString)) - -/-- The `identsBefore` declaration. -/ -def identsBefore (i : Nat) (typeLetter := "M") (varLetter := "x") : - BuildFormulaM (Array Ident) := do - return prefixIdents typeLetter ++ (← classIdents typeLetter) ++ - (← varIdents false varLetter)[*...i] - -/-- The `allIdentsWithHypotheses` declaration. -/ -def allIdentsWithHypotheses - (typeLetter := "M") (varLetter := "x") (hypothesisLetter := "h") : - BuildFormulaM (Array Ident) := do - let vars ← varIdents false varLetter - let hypotheses ← hypothesisIdents hypothesisLetter - let mut result := prefixIdents typeLetter ++ (← classIdents typeLetter) - let mut (i, j) := (0, 0) - for p in (← variableParams) do - match p with - | .freeVariable _ => result := result.push vars[i]!; i := i + 1 - | .hypothesis _ => result := result.push hypotheses[j]!; j := j + 1 - return result - -/-- The `classParamBinders` declaration. -/ -def classParamBinders (typeLetter : String := "M") : - BuildFormulaM (TSyntaxArray ``bracketedBinder) := do - let typeIdent := mkIdent typeLetter.toName - let structIdent := mkIdent ("s" ++ typeLetter).toName - return #[ - ← `(bracketedBinder | {$typeIdent : Type _}), - ← `(bracketedBinder | [$structIdent : $(mkCIdent ``ZFStructure) $typeIdent]) - ] ++ ( - ← if (← isFunction) && (← numHypotheses) > 0 && !(← hasEmptyInstanceState) then - pure #[← `(bracketedBinder | [$(mkCIdent ``HasEmpty) $typeIdent])] - else - pure #[] - ) ++ ( - ← ((← classParams).zip (← classIdents typeLetter)).mapM - fun (cls, id) => `(bracketedBinder | [$id : headBeta($cls $typeIdent $structIdent)]) - ) - -/-- The `mkBinders` declaration. -/ -def mkBinders (adjust? := false) (typeLetter : String := "M") (varLetter : String := "x") : - BuildFormulaM (TSyntaxArray ``bracketedBinder) := do - let typeIdent := mkIdent typeLetter.toName - (← varIdents adjust? varLetter).mapM fun var => `(bracketedBinder | ($var : $typeIdent)) - -/-- The `mkTermApp` declaration. -/ -def mkTermApp (x : Term) (xs : Array Term) : BuildFormulaM Term := - `(headBeta($(Syntax.mkApp x xs))) - -/-- The `mkParam` declaration. -/ -def mkParam (i : Nat) (typeLetter : String := "M") (varLetter : String := "x") : - BuildFormulaM Term := do - mkTermApp (← getHypothesis i) (← identsBefore (← freeVarsBefore i) typeLetter varLetter) - -/-- The `mkBindersWithHypotheses` declaration. -/ -def mkBindersWithHypotheses - (typeLetter : String := "M") (varLetter : String := "x") (hypothesisLetter := "h") : - BuildFormulaM (TSyntaxArray ``bracketedBinder) := do - let typeIdent := mkIdent typeLetter.toName - let vars ← varIdents false varLetter - let hypotheses ← hypothesisIdents hypothesisLetter - let mut result := #[] - let mut (i, j) := (0, 0) - for p in (← variableParams) do - match p with - | .freeVariable info => - let v := vars[i]! - result := result.push <| ← do - match info with - | .default => `(bracketedBinder | ($v : $typeIdent)) - | .implicit => `(bracketedBinder | {$v : $typeIdent}) - | .strictImplicit => `(bracketedBinder | ⦃$v : $typeIdent⦄) - | .instImplicit => `(bracketedBinder | [$v : $typeIdent]) - i := i + 1 - | .hypothesis _ => - let param ← mkParam j typeLetter varLetter - result := result.push <| ← `(bracketedBinder | ($(hypotheses[j]!) : $param)) - j := j + 1 - return result - -/-- The `mkIdent'` declaration. -/ -def mkIdent' (name : Name) : Ident := mkIdent (`_root_ ++ name) - -/-- The `buildFunction` declaration. -/ -def buildFunction (funcName : Name) : BuildFormulaM Unit := do - let funcIdent := mkIdent' funcName - let euIdent := mkIdent' ((← name) ++ `eu) - let specIdent := mkIdent' ((← name) ++ `spec) - let eqIffIdent := mkIdent' ((← name) ++ `eq_iff) - let hyps ← hypothesisIdents "h" - let euApply := Syntax.mkApp (← `(@$euIdent)) (← allIdentsWithHypotheses) - let mut value ← `(Exists.choose $euApply) - for i in (*...(← numHypotheses)).toArray.reverse do - let param ← mkParam i - value ← `(if $(hyps[i]!):ident : $param then $value else ∅) - let fnApply := Syntax.mkApp funcIdent (← varIdents) - let statement ← (explicitize (← definitionProp) ((← numAllVars) + 1)).toSyntax' - let vars : Array Term ← allIdentsWithHypotheses - let specStatement ← mkTermApp statement (vars.push fnApply) - let identV := mkIdent `v - let eqIffStatement ← mkTermApp statement (vars.push identV) - let classParamBinders ← classParamBinders - let mkBinders ← mkBinders - let mkBindersWithHypotheses ← mkBindersWithHypotheses - let identM := mkIdent `M - -- When the function definition carries hypotheses, its body is a nested `dite`, so the - -- proof must unfold the function and reduce the `dite` before applying `choose_spec`. - -- Without hypotheses the body is a bare `Exists.choose`, defeq to the goal, so `exact` - -- suffices (and `simp only` on the function would otherwise make no progress and fail). - let specProof ← if (← numHypotheses) == 0 then - `(tactic| exact $(euApply).choose_spec.1) - else - `(tactic| simpa only [$funcIdent:term, *, ↓reduceDIte] using $(euApply).choose_spec.1) - let eqIffProof ← if (← numHypotheses) == 0 then - `(tactic| exact $(euApply).choose_eq_iff) - else - `(tactic| simpa only [$funcIdent:term, *, ↓reduceDIte] using $(euApply).choose_eq_iff) - let cmd ← `( - open Classical in - /-- The set-theoretic function automatically realized from its defining property. -/ - noncomputable def $funcIdent $classParamBinders* $mkBinders* : $identM := - $value - lemma $specIdent $classParamBinders* $mkBindersWithHypotheses* : - $specStatement := by - $specProof:tactic - lemma $eqIffIdent $classParamBinders* $mkBindersWithHypotheses* ($identV : $identM) : - $fnApply = $identV ↔ $eqIffStatement := by - $eqIffProof:tactic - ) - liftCommandElabM (Command.elabCommand cmd) - -/-- The `realizedTerm` declaration. -/ -def realizedTerm (typeLetter := "M") : BuildFormulaM Term := do - let realizedIdent := mkIdent' (← name) - if (← numFreeVars) == 0 then - let n ← forallTelescopeReducing - ((← getEnv).find? (← name) |>.get! |>.type) - fun vars _ => pure vars.size - return Syntax.mkApp (← `(@$realizedIdent)) <| - #[(mkIdent typeLetter.toName : Term)] ++ Array.replicate (n - 1) (← `(_)) - else - `($realizedIdent) - -/-- The `buildRealizeIff` declaration. -/ -def buildRealizeIff (thmName : Name) : BuildFormulaM Unit := do - let realizedIdent := mkIdent' (← name) - let formulaIdent := mkIdent' ((← name) ++ `formula) - let thmIdent := mkIdent' thmName - let mut realizedApplyV ← realizedTerm - for i in *...(← numFreeVars) do - realizedApplyV ← `($realizedApplyV (v $(Syntax.mkNatLit i))) - let mut realizedApplyV' := realizedApplyV - if ← isFunction then - realizedApplyV' ← `($realizedApplyV = v $(Syntax.mkNatLit (← numFreeVars))) - let nVars := Syntax.mkNatLit (← numFreeVars true) - let identM := mkIdent `M - let cmd ← `( - attribute [local implicit_reducible] ExistsUnique in - @[realize_simps] lemma $thmIdent - $(← classParamBinders)* (v : Fin $nVars → $identM) : - FirstOrder.Language.Formula.Realize $formulaIdent v ↔ $realizedApplyV' := by - simp only [$formulaIdent:term, $realizedIdent:term, formula_builder_pre, formula_builder, - FirstOrder.Language.Formula.Realize, ExistsUnique.choose_eq_iff, dite_eq_iff, exists_prop] - simp (config := {unfoldPartialApp := true}) only [realize_simps] - simp (config := {unfoldPartialApp := true, decide := true}) only [ - realize_simps, FirstOrder.Language.BoundedFormula.realize_isFormula, - Fin.isValue, Fin.reduceLast, Matrix.cons_val, Sum.elim_inl, Sum.elim_inr, - Fin.snoc, reduceDIte, cast_eq - ] - ) - liftCommandElabM (Command.elabCommand cmd) - -/-- The `buildInstFormulaToFunction` declaration. -/ -def buildInstFormulaToFunction (instName : Name) := do - let formulaIdent := mkIdent' ((← name) ++ `formula) - let instIdent := mkIdent' instName - let mut realizedApplyV : Term ← realizedTerm - for i in *...(← numFreeVars) do - realizedApplyV ← `($realizedApplyV (v $(Syntax.mkNatLit i))) - let nVars := Syntax.mkNatLit (← numFreeVars) - let identM := mkIdent `M - let cmd ← `( - instance $instIdent:ident $(← classParamBinders)* : - FormulaToFunction $formulaIdent (fun v : Fin $nVars → $identM => $realizedApplyV) where - ) - liftCommandElabM (Command.elabCommand cmd) - -/-- The `mkVarVec` declaration. -/ -def mkVarVec (typeLetter := "M") (varLetter : String := "x") : BuildFormulaM Term := do - let vars ← varIdents true varLetter - let mut varVec ← `(@$(mkCIdent ``Matrix.vecEmpty) $(mkIdent typeLetter.toName)) - for var in vars.reverse do - varVec ← `($(mkCIdent ``Matrix.vecCons) $var $varVec) - return varVec - -/-- The `buildToRealize` declaration. -/ -def buildToRealize (toRealizeName : Name) : BuildFormulaM Unit := do - let formulaIdent := mkIdent' ((← name) ++ `formula) - let toRealizeIdent := mkIdent' toRealizeName - let vars ← varIdents true - let mut applyX := Syntax.mkApp (← realizedTerm) vars[*...(← numFreeVars)] - if ← isFunction then - applyX ← `($applyX = $(vars[← numFreeVars]!)) - let cmd ← `( - lemma $toRealizeIdent $((← classParamBinders) ++ (← mkBinders true))* : - $applyX ↔ $(mkCIdent ``FirstOrder.Language.Formula.Realize) $formulaIdent $(← mkVarVec) := by - simp only [realize_simps, Matrix.cons_val, *] - ) - liftCommandElabM (Command.elabCommand cmd) - -/-- The `buildElementarity` declaration. -/ -def buildElementarity (elementarityName : Name) : BuildFormulaM Unit := do - let formulaIdent := mkIdent' ((← name) ++ `formula) - let toRealizeIdent := mkIdent' ((← name) ++ `to_realize) - let elementarityIdent := mkIdent' elementarityName - let vars ← varIdents - let identM := mkIdent `M - let identN := mkIdent `N - let identF := mkIdent `F - let identJ := mkIdent `j - let funLike := mkCIdent ``FunLike - let eecClass := mkCIdent ``ElementaryEmbeddingClass - let mapFormula := mkCIdent ``ElementaryEmbeddingClass.map_formula - let vecCons := mkCIdent ``Matrix.vecCons - let vecEmpty := mkCIdent ``Matrix.vecEmpty - let realizeFn := mkCIdent ``FirstOrder.Language.Formula.Realize - let mut applyJX ← realizedTerm "N" - let mut applyX ← realizedTerm "M" - for var in vars do - applyJX ← `($applyJX ($identJ $var)) - applyX ← `($applyX $var) - let cmd ← do - if ← isFunction then - let mut varVecSnocApply ← `($vecCons $applyX $vecEmpty) - for var in vars.reverse do - varVecSnocApply ← `($vecCons $var $varVecSnocApply) - let convertTarget ← `($realizeFn $formulaIdent ($identJ ∘ $varVecSnocApply)) - let mapFormulaApp ← `($mapFormula $identJ) - `( - @[elementary_simps] lemma $elementarityIdent - $((← classParamBinders "M") ++ (← classParamBinders "N") ++ (← mkBinders false "M"))* - {$identF : Type*} [$funLike $identF $identM $identN] - [$eecClass $identF $identM $identN] ($identJ : $identF) : - $applyJX = $identJ ($applyX) := by - simp only [$toRealizeIdent:term] - convert_to ($convertTarget) using 1 - · ext1 i; fin_cases i <;> rfl - · simp only [$mapFormulaApp:term, ← $toRealizeIdent:term] - attribute [elementary_simps_rev ←] $elementarityIdent - ) - else - let convertTerm ← `($mapFormula $identJ $formulaIdent $(← mkVarVec)) - `( - @[elementary_simps] lemma $elementarityIdent - $((← classParamBinders "M") ++ (← classParamBinders "N") ++ (← mkBinders false "M"))* - {$identF : Type*} [$funLike $identF $identM $identN] - [$eecClass $identF $identM $identN] ($identJ : $identF) : - $applyJX ↔ $applyX := by - simp only [$toRealizeIdent:term] - convert ($convertTerm) using 2 - ext1 i; fin_cases i <;> rfl - attribute [elementary_simps_rev ←] $elementarityIdent - ) - liftCommandElabM (Command.elabCommand cmd) - -/-- The `runIfNotFound` declaration. -/ -def runIfNotFound (names : List Name) (f : Name → BuildFormulaM Unit) : BuildFormulaM Unit := do - if (← getEnv).contains names[0]! then return else f names[0]! - for name in names do - checkSorry name - -/-- Build all the `Formula.Realize` companion declarations for the decl `attrDeclName` -tagged with `@[realize]`. -/ -def realizeAttrAdd (attrDeclName : Name) : AttrM Unit := do - let name := removeNameSuffix attrDeclName - let go : BuildFormulaM Unit := do - init - if (← isFunction) then - runIfNotFound [name, name ++ `spec, name ++ `eq_iff] buildFunction - runIfNotFound [name ++ `formula] buildFormula - runIfNotFound [name ++ `realize_iff] buildRealizeIff - if (← isFunction) then - runIfNotFound [name ++ `instFormulaToFunction] buildInstFormulaToFunction - runIfNotFound [name ++ `to_realize] buildToRealize - runIfNotFound [name ++ `elementarity] buildElementarity - go.run' { attrDeclName } |>.run' - -end BuildFormula - -initialize - registerBuiltinAttribute { - name := `realize - descr := "Automatically build `Formula.Realize` theorems" - applicationTime := .afterCompilation - add := fun declName _ _ => BuildFormula.realizeAttrAdd declName - } diff --git a/LeanPool/SetTheory/RealizeBuilders.lean b/LeanPool/SetTheory/RealizeBuilders.lean new file mode 100644 index 0000000000..1bab94414b --- /dev/null +++ b/LeanPool/SetTheory/RealizeBuilders.lean @@ -0,0 +1,338 @@ +/- +Copyright (c) 2026 Shuhao Song. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Shuhao Song +-/ +module + +import Mathlib.Tactic.Convert + +import Mathlib.Tactic.FinCases + +import LeanPool.SetTheory.SimpAttr + +public import LeanPool.SetTheory.RealizeCore + +/-! +# Generating realization companion declarations + +Build the formula, realization, and elementarity declarations registered by `@[realize]`. +The expression representation and its correctness lemmas live in `RealizeCore`. +-/ + +@[expose] public section + +open Lean Parser Elab Term Meta Qq Std FirstOrder.Language + +namespace BuildFormula + +/-- The `classIdents` declaration. -/ +def classIdents (typeLetter := "M") : BuildFormulaM (Array Ident) := do + return (*...(← classParams).size).toArray.map + fun i => mkIdent ("c" ++ typeLetter ++ (i + 1).toSubscriptString).toName + +/-- The `varIdents` declaration. -/ +def varIdents (adjust? := false) (varLetter := "x") : BuildFormulaM (Array Ident) := do + return (Array.range (← numFreeVars adjust?)).map + fun i => mkIdent (Name.mkStr1 (varLetter ++ (i + 1).toSubscriptString)) + +/-- The `hypothesisIdents` declaration. -/ +def hypothesisIdents (hypothesisLetter := "h") : BuildFormulaM (Array Ident) := do + return (Array.range (← numHypotheses)).map + fun i => mkIdent (Name.mkStr1 (hypothesisLetter ++ (i + 1).toSubscriptString)) + +/-- The `identsBefore` declaration. -/ +def identsBefore (i : Nat) (typeLetter := "M") (varLetter := "x") : + BuildFormulaM (Array Ident) := do + return prefixIdents typeLetter ++ (← classIdents typeLetter) ++ + (← varIdents false varLetter)[*...i] + +/-- The `allIdentsWithHypotheses` declaration. -/ +def allIdentsWithHypotheses + (typeLetter := "M") (varLetter := "x") (hypothesisLetter := "h") : + BuildFormulaM (Array Ident) := do + let vars ← varIdents false varLetter + let hypotheses ← hypothesisIdents hypothesisLetter + let mut result := prefixIdents typeLetter ++ (← classIdents typeLetter) + let mut (i, j) := (0, 0) + for p in (← variableParams) do + match p with + | .freeVariable _ => result := result.push vars[i]!; i := i + 1 + | .hypothesis _ => result := result.push hypotheses[j]!; j := j + 1 + return result + +/-- The `classParamBinders` declaration. -/ +def classParamBinders (typeLetter : String := "M") : + BuildFormulaM (TSyntaxArray ``bracketedBinder) := do + let typeIdent := mkIdent typeLetter.toName + let structIdent := mkIdent ("s" ++ typeLetter).toName + return #[ + ← `(bracketedBinder | {$typeIdent : Type _}), + ← `(bracketedBinder | [$structIdent : $(mkCIdent ``ZFStructure) $typeIdent]) + ] ++ ( + ← if (← isFunction) && (← numHypotheses) > 0 && !(← hasEmptyInstanceState) then + pure #[← `(bracketedBinder | [$(mkCIdent ``HasEmpty) $typeIdent])] + else + pure #[] + ) ++ ( + ← ((← classParams).zip (← classIdents typeLetter)).mapM + fun (cls, id) => `(bracketedBinder | [$id : headBeta($cls $typeIdent $structIdent)]) + ) + +/-- The `mkBinders` declaration. -/ +def mkBinders (adjust? := false) (typeLetter : String := "M") (varLetter : String := "x") : + BuildFormulaM (TSyntaxArray ``bracketedBinder) := do + let typeIdent := mkIdent typeLetter.toName + (← varIdents adjust? varLetter).mapM fun var => `(bracketedBinder | ($var : $typeIdent)) + +/-- The `mkTermApp` declaration. -/ +def mkTermApp (x : Term) (xs : Array Term) : BuildFormulaM Term := + `(headBeta($(Syntax.mkApp x xs))) + +/-- The `mkParam` declaration. -/ +def mkParam (i : Nat) (typeLetter : String := "M") (varLetter : String := "x") : + BuildFormulaM Term := do + mkTermApp (← getHypothesis i) (← identsBefore (← freeVarsBefore i) typeLetter varLetter) + +/-- The `mkBindersWithHypotheses` declaration. -/ +def mkBindersWithHypotheses + (typeLetter : String := "M") (varLetter : String := "x") (hypothesisLetter := "h") : + BuildFormulaM (TSyntaxArray ``bracketedBinder) := do + let typeIdent := mkIdent typeLetter.toName + let vars ← varIdents false varLetter + let hypotheses ← hypothesisIdents hypothesisLetter + let mut result := #[] + let mut (i, j) := (0, 0) + for p in (← variableParams) do + match p with + | .freeVariable info => + let v := vars[i]! + result := result.push <| ← do + match info with + | .default => `(bracketedBinder | ($v : $typeIdent)) + | .implicit => `(bracketedBinder | {$v : $typeIdent}) + | .strictImplicit => `(bracketedBinder | ⦃$v : $typeIdent⦄) + | .instImplicit => `(bracketedBinder | [$v : $typeIdent]) + i := i + 1 + | .hypothesis _ => + let param ← mkParam j typeLetter varLetter + result := result.push <| ← `(bracketedBinder | ($(hypotheses[j]!) : $param)) + j := j + 1 + return result + +/-- The `mkIdent'` declaration. -/ +def mkIdent' (name : Name) : Ident := mkIdent (`_root_ ++ name) + +/-- The `buildFunction` declaration. -/ +def buildFunction (funcName : Name) : BuildFormulaM Unit := do + let funcIdent := mkIdent' funcName + let euIdent := mkIdent' ((← name) ++ `eu) + let specIdent := mkIdent' ((← name) ++ `spec) + let eqIffIdent := mkIdent' ((← name) ++ `eq_iff) + let hyps ← hypothesisIdents "h" + let euApply := Syntax.mkApp (← `(@$euIdent)) (← allIdentsWithHypotheses) + let mut value ← `(Exists.choose $euApply) + for i in (*...(← numHypotheses)).toArray.reverse do + let param ← mkParam i + value ← `(if $(hyps[i]!):ident : $param then $value else ∅) + let fnApply := Syntax.mkApp funcIdent (← varIdents) + let statement ← (explicitize (← definitionProp) ((← numAllVars) + 1)).toSyntax' + let vars : Array Term ← allIdentsWithHypotheses + let specStatement ← mkTermApp statement (vars.push fnApply) + let identV := mkIdent `v + let eqIffStatement ← mkTermApp statement (vars.push identV) + let classParamBinders ← classParamBinders + let mkBinders ← mkBinders + let mkBindersWithHypotheses ← mkBindersWithHypotheses + let identM := mkIdent `M + -- When the function definition carries hypotheses, its body is a nested `dite`, so the + -- proof must unfold the function and reduce the `dite` before applying `choose_spec`. + -- Without hypotheses the body is a bare `Exists.choose`, defeq to the goal, so `exact` + -- suffices (and `simp only` on the function would otherwise make no progress and fail). + let specProof ← if (← numHypotheses) == 0 then + `(tactic| exact $(euApply).choose_spec.1) + else + `(tactic| simpa only [$funcIdent:term, *, ↓reduceDIte] using $(euApply).choose_spec.1) + let eqIffProof ← if (← numHypotheses) == 0 then + `(tactic| exact $(euApply).choose_eq_iff) + else + `(tactic| simpa only [$funcIdent:term, *, ↓reduceDIte] using $(euApply).choose_eq_iff) + let cmd ← `( + open Classical in + /-- The set-theoretic function automatically realized from its defining property. -/ + @[expose] public noncomputable def $funcIdent $classParamBinders* $mkBinders* : $identM := + $value + public lemma $specIdent $classParamBinders* $mkBindersWithHypotheses* : + $specStatement := by + $specProof:tactic + public lemma $eqIffIdent $classParamBinders* $mkBindersWithHypotheses* ($identV : $identM) : + $fnApply = $identV ↔ $eqIffStatement := by + $eqIffProof:tactic + ) + liftCommandElabM (Command.elabCommand cmd) + +/-- The `realizedTerm` declaration. -/ +def realizedTerm (typeLetter := "M") : BuildFormulaM Term := do + let realizedIdent := mkIdent' (← name) + if (← numFreeVars) == 0 then + let n ← forallTelescopeReducing + ((← getEnv).find? (← name) |>.get! |>.type) + fun vars _ => pure vars.size + return Syntax.mkApp (← `(@$realizedIdent)) <| + #[(mkIdent typeLetter.toName : Term)] ++ Array.replicate (n - 1) (← `(_)) + else + `($realizedIdent) + +/-- The `buildRealizeIff` declaration. -/ +def buildRealizeIff (thmName : Name) : BuildFormulaM Unit := do + let realizedIdent := mkIdent' (← name) + let formulaIdent := mkIdent' ((← name) ++ `formula) + let thmIdent := mkIdent' thmName + let mut realizedApplyV ← realizedTerm + for i in *...(← numFreeVars) do + realizedApplyV ← `($realizedApplyV (v $(Syntax.mkNatLit i))) + let mut realizedApplyV' := realizedApplyV + if ← isFunction then + realizedApplyV' ← `($realizedApplyV = v $(Syntax.mkNatLit (← numFreeVars))) + let nVars := Syntax.mkNatLit (← numFreeVars true) + let identM := mkIdent `M + let cmd ← `( + attribute [local implicit_reducible] ExistsUnique in + @[realize_simps] public lemma $thmIdent + $(← classParamBinders)* (v : Fin $nVars → $identM) : + FirstOrder.Language.Formula.Realize $formulaIdent v ↔ $realizedApplyV' := by + simp only [$formulaIdent:term, $realizedIdent:term, formula_builder_pre, formula_builder, + FirstOrder.Language.Formula.Realize, ExistsUnique.choose_eq_iff, dite_eq_iff, exists_prop] + simp (config := {unfoldPartialApp := true}) only [realize_simps] + simp (config := {unfoldPartialApp := true, decide := true}) only [ + realize_simps, FirstOrder.Language.BoundedFormula.realize_isFormula, + Fin.isValue, Fin.reduceLast, Matrix.cons_val, Sum.elim_inl, Sum.elim_inr, + Fin.snoc, reduceDIte, cast_eq + ] + ) + liftCommandElabM (Command.elabCommand cmd) + +/-- The `buildInstFormulaToFunction` declaration. -/ +def buildInstFormulaToFunction (instName : Name) := do + let formulaIdent := mkIdent' ((← name) ++ `formula) + let instIdent := mkIdent' instName + let mut realizedApplyV : Term ← realizedTerm + for i in *...(← numFreeVars) do + realizedApplyV ← `($realizedApplyV (v $(Syntax.mkNatLit i))) + let nVars := Syntax.mkNatLit (← numFreeVars) + let identM := mkIdent `M + let cmd ← `( + public instance $instIdent:ident $(← classParamBinders)* : + FormulaToFunction $formulaIdent (fun v : Fin $nVars → $identM => $realizedApplyV) where + ) + liftCommandElabM (Command.elabCommand cmd) + +/-- The `mkVarVec` declaration. -/ +def mkVarVec (typeLetter := "M") (varLetter : String := "x") : BuildFormulaM Term := do + let vars ← varIdents true varLetter + let mut varVec ← `(@$(mkCIdent ``Matrix.vecEmpty) $(mkIdent typeLetter.toName)) + for var in vars.reverse do + varVec ← `($(mkCIdent ``Matrix.vecCons) $var $varVec) + return varVec + +/-- The `buildToRealize` declaration. -/ +def buildToRealize (toRealizeName : Name) : BuildFormulaM Unit := do + let formulaIdent := mkIdent' ((← name) ++ `formula) + let toRealizeIdent := mkIdent' toRealizeName + let vars ← varIdents true + let mut applyX := Syntax.mkApp (← realizedTerm) vars[*...(← numFreeVars)] + if ← isFunction then + applyX ← `($applyX = $(vars[← numFreeVars]!)) + let cmd ← `( + public lemma $toRealizeIdent $((← classParamBinders) ++ (← mkBinders true))* : + $applyX ↔ $(mkCIdent ``FirstOrder.Language.Formula.Realize) $formulaIdent $(← mkVarVec) := by + simp only [realize_simps, Matrix.cons_val, *] + ) + liftCommandElabM (Command.elabCommand cmd) + +/-- The `buildElementarity` declaration. -/ +def buildElementarity (elementarityName : Name) : BuildFormulaM Unit := do + let formulaIdent := mkIdent' ((← name) ++ `formula) + let toRealizeIdent := mkIdent' ((← name) ++ `to_realize) + let elementarityIdent := mkIdent' elementarityName + let vars ← varIdents + let identM := mkIdent `M + let identN := mkIdent `N + let identF := mkIdent `F + let identJ := mkIdent `j + let funLike := mkCIdent ``FunLike + let eecClass := mkCIdent ``ElementaryEmbeddingClass + let mapFormula := mkCIdent ``ElementaryEmbeddingClass.map_formula + let vecCons := mkCIdent ``Matrix.vecCons + let vecEmpty := mkCIdent ``Matrix.vecEmpty + let realizeFn := mkCIdent ``FirstOrder.Language.Formula.Realize + let mut applyJX ← realizedTerm "N" + let mut applyX ← realizedTerm "M" + for var in vars do + applyJX ← `($applyJX ($identJ $var)) + applyX ← `($applyX $var) + let cmd ← do + if ← isFunction then + let mut varVecSnocApply ← `($vecCons $applyX $vecEmpty) + for var in vars.reverse do + varVecSnocApply ← `($vecCons $var $varVecSnocApply) + let convertTarget ← `($realizeFn $formulaIdent ($identJ ∘ $varVecSnocApply)) + let mapFormulaApp ← `($mapFormula $identJ) + `( + @[elementary_simps] public lemma $elementarityIdent + $((← classParamBinders "M") ++ (← classParamBinders "N") ++ (← mkBinders false "M"))* + {$identF : Type*} [$funLike $identF $identM $identN] + [$eecClass $identF $identM $identN] ($identJ : $identF) : + $applyJX = $identJ ($applyX) := by + simp only [$toRealizeIdent:term] + convert_to ($convertTarget) using 1 + · ext1 i; fin_cases i <;> rfl + · simp only [$mapFormulaApp:term, ← $toRealizeIdent:term] + attribute [elementary_simps_rev ←] $elementarityIdent + ) + else + let convertTerm ← `($mapFormula $identJ $formulaIdent $(← mkVarVec)) + `( + @[elementary_simps] public lemma $elementarityIdent + $((← classParamBinders "M") ++ (← classParamBinders "N") ++ (← mkBinders false "M"))* + {$identF : Type*} [$funLike $identF $identM $identN] + [$eecClass $identF $identM $identN] ($identJ : $identF) : + $applyJX ↔ $applyX := by + simp only [$toRealizeIdent:term] + convert ($convertTerm) using 2 + ext1 i; fin_cases i <;> rfl + attribute [elementary_simps_rev ←] $elementarityIdent + ) + liftCommandElabM (Command.elabCommand cmd) + +/-- The `runIfNotFound` declaration. -/ +def runIfNotFound (names : List Name) (f : Name → BuildFormulaM Unit) : BuildFormulaM Unit := do + if (← getEnv).contains names[0]! then return else f names[0]! + for name in names do + checkSorry name + +/-- Build all the `Formula.Realize` companion declarations for the decl `attrDeclName` +tagged with `@[realize]`. -/ +def realizeAttrAdd (attrDeclName : Name) : AttrM Unit := do + let name := removeNameSuffix attrDeclName + let go : BuildFormulaM Unit := do + init + if (← isFunction) then + runIfNotFound [name, name ++ `spec, name ++ `eq_iff] buildFunction + runIfNotFound [name ++ `formula] buildFormula + runIfNotFound [name ++ `realize_iff] buildRealizeIff + if (← isFunction) then + runIfNotFound [name ++ `instFormulaToFunction] buildInstFormulaToFunction + runIfNotFound [name ++ `to_realize] buildToRealize + runIfNotFound [name ++ `elementarity] buildElementarity + go.run' { attrDeclName } |>.run' + +end BuildFormula + +initialize + registerBuiltinAttribute { + name := `realize + descr := "Automatically build `Formula.Realize` theorems" + applicationTime := .afterCompilation + add := fun declName _ _ => BuildFormula.realizeAttrAdd declName + } diff --git a/LeanPool/SetTheory/RealizeCore.lean b/LeanPool/SetTheory/RealizeCore.lean new file mode 100644 index 0000000000..a0b9c26eae --- /dev/null +++ b/LeanPool/SetTheory/RealizeCore.lean @@ -0,0 +1,760 @@ +/- +Copyright (c) 2026 Shuhao Song. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Shuhao Song +-/ +module + +public import Mathlib.Lean.Expr.Basic +public import Mathlib.ModelTheory.ElementaryMaps +import LeanPool.SetTheory.SimpAttr +import Mathlib.Tactic.FinCases + +/-! +# Realization machinery for the ZF first-order language + +This module sets up the first-order language `𝓛ZF` of ZF set theory with a single +membership relation, together with notation and metaprogramming infrastructure for +building and realizing bounded formulas in models of ZF. +-/ + +@[expose] public section + +open Lean Parser Elab Term Meta Qq Std FirstOrder.Language + +/-- The `memRel` type. -/ +inductive memRel : ℕ → Type + | mem : memRel 2 + deriving DecidableEq + +open FirstOrder in +/-- The first-order language of ZF set theory, with a single binary membership relation. -/ +def 𝓛ZF : FirstOrder.Language := ⟨fun _ => Empty, memRel⟩ +deriving IsRelational + +attribute [local implicit_reducible] 𝓛ZF + +namespace FirstOrder.Language.BoundedFormula + +open Language + +variable {α n} {L : Language} {M} [L.Structure M] (v : α → M) (w : Fin n → M) + +lemma realize_isFormula (φ : L.BoundedFormula α 0) (w : Fin 0 → M) : + φ.Realize v w ↔ Formula.Realize φ v := by + simp only [Formula.Realize] + convert Iff.rfl + +/-- The `exUnique` declaration. -/ +protected def exUnique (φ : L.BoundedFormula α (n + 1)) : L.BoundedFormula α n := + ∃' (φ ⊓ ∀' (φ.liftAt 1 n ⟹ &(Fin.last (n + 1)) =' &((Fin.last n).castSucc))) + +/-- The `ite` declaration. -/ +protected def ite (φ ψ χ : L.BoundedFormula α n) : L.BoundedFormula α n := + (φ ⊓ ψ) ⊔ (∼φ ⊓ χ) + +theorem realize_ite (φ ψ χ : L.BoundedFormula α n) : + (φ.ite ψ χ).Realize v w ↔ + (φ.Realize v w ∧ ψ.Realize v w) ∨ (¬φ.Realize v w ∧ χ.Realize v w) := by + simp [BoundedFormula.ite] + +theorem realize_exUnique (φ : L.BoundedFormula α (n + 1)) : + φ.exUnique.Realize v w ↔ ∃! a : M, φ.Realize v (Fin.snoc w a) := by + have (x y : M) : Fin.snoc (Fin.snoc w x) y ∘ + (fun i : Fin (n + 1) => if (i : ℕ) < n then i.castSucc else i.succ) + = Fin.snoc w y := by + ext i + simp only [Function.comp_apply] + split_ifs with hi + · simp [Fin.snoc, hi, _root_.le_of_lt hi] + · replace hi := Decidable.not_imp_symm Fin.val_lt_last hi + simp [hi] + simp [BoundedFormula.exUnique, realize_liftAt_one, ExistsUnique, this] + +variable {k} (φ : L.Formula (Fin (k + 1))) + +/-- The `FormulaToFunction` type. -/ +class _root_.FormulaToFunction (f : outParam ((Fin k → M) → M)) where + realize_iff_fn {v : Fin (k + 1) → M} : + φ.Realize v ↔ f (v ∘ Fin.castSucc) = v (.last k) := by + simp only [Fin.reduceCastSucc, Fin.reduceLast, Nat.reduceAdd, + realize_simps, implies_true] + +variable (vars : Fin k → α ⊕ Fin n) (ψ : L.BoundedFormula α (n + 1)) + +/-- The `ofFunc` declaration. -/ +def ofFunc := ∃' (BoundedFormula.relabel (k := 0) + (Fin.snoc (Sum.map id Fin.castSucc ∘ vars) (.inr (.last n))) φ ⊓ ψ) + +lemma realize_ofFunc {f} [FormulaToFunction φ f] : + (ofFunc φ vars ψ).Realize v w ↔ + ψ.Realize v (Fin.snoc w (f (Sum.elim v w ∘ vars))) := by + simp (unfoldPartialApp := true) [ + ofFunc, realize_isFormula, FormulaToFunction.realize_iff_fn, + Function.comp, Sum.elim_map + ] + +attribute [realize_simps] + realize_all realize_ex realize_bot realize_top realize_not realize_inf realize_sup + realize_imp realize_iff realize_rel₂ realize_bdEqual realize_relabel realize_ite + realize_exUnique realize_ofFunc Term.realize_var Function.comp + +/-- The `#_` notation. -/ +scoped[FirstOrder] prefix:arg "#" => Term.var ∘ Sum.inl +/-- The `_∈ᶻ'_` notation: membership in the ZF first-order language `𝓛ZF`. -/ +scoped[FirstOrder] infix:88 " ∈ᶻ' " => Relations.boundedFormula₂ (L := 𝓛ZF) memRel.mem + +/-- The `label` declaration. -/ +declare_syntax_cat label +/-- The `label#_` declaration. -/ +syntax "#" num : label +/-- The `label&_` declaration. -/ +syntax "&" num : label +/-- The `Value_of_labels(_)` declaration. -/ +syntax "value_of_labels(" label,* ")" : term +/-- The `_@(_)` notation. -/ +syntax term "@(" label,* ")" : term +macro_rules + | `($f:ident@($labels:label,*)) => + `(BoundedFormula.relabel + value_of_labels($labels,*) $(mkIdent (f.getId ++ `formula)) (k := 0)) + | `(value_of_labels(#$n, $labels,*)) => + `(Matrix.vecCons (Sum.inl $n) value_of_labels($labels,*)) + | `(value_of_labels(&$n, $labels,*)) => + `(Matrix.vecCons (Sum.inr $n) value_of_labels($labels,*)) + | `(value_of_labels(#$n)) => `(Matrix.vecCons (Sum.inl $n) ![]) + | `(value_of_labels(&$n)) => `(Matrix.vecCons (Sum.inr $n) ![]) + | `(value_of_labels()) => `(Matrix.vecEmpty) + +end FirstOrder.Language.BoundedFormula + +section ZFStructure + +open FirstOrder Language Structure + +/-- The `ZFFormula` declaration. -/ +abbrev ZFFormula (n : ℕ) := 𝓛ZF.Formula (Fin n) +/-- The `ZFStructure` declaration. -/ +abbrev ZFStructure M := 𝓛ZF.Structure M + +variable {M N : Type*} [sM : ZFStructure M] [sN : ZFStructure N] + +instance (priority := high) instMembershipZFStructure : Membership M M where + mem x y := sM.RelMap memRel.mem ![y, x] + +instance instHasSubsetM : HasSubset M where + Subset x y := ∀ ⦃z⦄, z ∈ x → z ∈ y + +/-- The `ElementaryEmbeddingClass` type. -/ +class ElementaryEmbeddingClass + (F : Type*) (M N : outParam Type*) + [ZFStructure M] [ZFStructure N] [FunLike F M N] : Prop where + map_formula : ∀ (f : F) ⦃n⦄ (φ : 𝓛ZF.Formula (Fin n)) (x : Fin n → M), + φ.Realize (f ∘ x) ↔ φ.Realize x + +instance : ElementaryEmbeddingClass (M ↪ₑ[𝓛ZF] N) M N where + map_formula := fun j => j.map_formula' + +lemma Fin.two_def {α} (x : Fin 2 → α) : x = ![x 0, x 1] := by + ext i; fin_cases i <;> simp + +@[realize_simps] lemma relMap_mem_iff_membership {v : Fin 2 → M} : + RelMap (L := 𝓛ZF) memRel.mem v ↔ v 0 ∈ v 1 := by + conv_lhs => rw [Fin.two_def v] + rfl + +/-- The `HasEmpty` type. -/ +class HasEmpty (M) [ZFStructure M] where + exists_empty : ∃! x : M, ∀ y, y ∉ x + +/-- The `EqEmptyN` declaration. -/ +def EqEmptyN (n : ℕ) : ZFFormula (n + 1) := ∀' ∼(&0 ∈ᶻ' #(Fin.last n)) + +variable {n} [HasEmpty M] + +noncomputable instance (priority := low) instEmptyCollectionM : EmptyCollection M where + emptyCollection := HasEmpty.exists_empty.choose + +@[realize_simps] lemma EqEmptyN.realize_iff {v : Fin (n + 1) → M} : + (EqEmptyN n).Realize v ↔ ∅ = v (Fin.last n) := by + simp only [EqEmptyN, Formula.Realize, realize_simps] + rw [iff_comm] + exact (HasEmpty.exists_empty (M := M)).choose_eq_iff + +end ZFStructure + +namespace EncodeExpr + +/-- The `WeakLevel` type. -/ +inductive WeakLevel where + | a : WeakLevel + | b : WeakLevel → WeakLevel + | c : WeakLevel → WeakLevel → WeakLevel + | d : WeakLevel → WeakLevel → WeakLevel + | e : String → WeakLevel +deriving FromJson, ToJson, Inhabited, Repr + +/-- The `WeakBinderInfo` type. -/ +inductive WeakBinderInfo where + | a | b | c | d +deriving FromJson, ToJson, Inhabited, Repr + +/-- The `WeakExprItem` type. -/ +inductive WeakExprItem where + | a : Nat → WeakExprItem + | b : WeakLevel → WeakExprItem + | c : Nat → List WeakLevel → WeakExprItem + | d : Nat → Nat → WeakExprItem + | e : Nat → Nat → Nat → Nat → WeakExprItem + | f : Nat → Nat → Nat → Nat → WeakExprItem + | g : Nat → Nat → Nat → Nat → Bool → WeakExprItem + | h : Nat → WeakExprItem + | i : String → WeakExprItem + | j : Nat → Nat → Nat → WeakExprItem +deriving FromJson, ToJson, Inhabited, Repr + +/-- The `toWeakLevel` declaration. -/ +def _root_.Lean.Level.toWeakLevel : Level → WeakLevel + | .zero => .a + | .succ u => .b u.toWeakLevel + | .max u v => .c u.toWeakLevel v.toWeakLevel + | .imax u v => .d u.toWeakLevel v.toWeakLevel + | .param name => .e name.toString + | .mvar _ => default + +/-- The `toLevel` declaration. -/ +def WeakLevel.toLevel : WeakLevel → Level + | .a => .zero + | .b u => .succ u.toLevel + | .c u v => .max u.toLevel v.toLevel + | .d u v => .imax u.toLevel v.toLevel + | .e name => .param name.toName + +/-- The `toNat` declaration. -/ +def _root_.Lean.BinderInfo.toNat : BinderInfo → Nat + | .default => 0 + | .implicit => 1 + | .strictImplicit => 2 + | .instImplicit => 3 + +/-- The `toBinderInfo` declaration. -/ +def _root_.Nat.toBinderInfo : Nat → BinderInfo + | 0 => .default + | 1 => .implicit + | 2 => .strictImplicit + | 3 => .instImplicit + | _ => .default + +/-- The numeric encoding of binder information round-trips back to the original. -/ +theorem _root_.Lean.BinderInfo.toNat_toBinderInfo (bi : BinderInfo) : + bi.toNat.toBinderInfo = bi := by + cases bi <;> rfl + +/-- The numeric `BinderInfo` encoding is injective on the four valid binder kinds. -/ +theorem _root_.Lean.BinderInfo.toNat_injective {bi bj : BinderInfo} + (h : bi.toNat = bj.toNat) : bi = bj := by + rw [← bi.toNat_toBinderInfo, ← bj.toNat_toBinderInfo, h] + +/-- Mutable state threaded through expression serialization: deduplicating maps from +subexpressions and names to their indices, together with the output arrays. -/ +structure WeakExprState where + /-- Cache from already-serialized subexpressions to their indices. -/ + hashExpr : HashMap Expr Nat := {} + /-- Cache from already-serialized names to their indices. -/ + hashName : HashMap Name Nat := {} + /-- The serialized expression items, indexed in insertion order. -/ + arrayExpr : Array WeakExprItem := #[] + /-- The serialized name strings, indexed in insertion order. -/ + arrayName : Array String := #[] + +/-- A serialized closed expression: the array of expression items together with the +array of referenced name strings. -/ +abbrev WeakExpr := Array WeakExprItem × Array String + +/-- The serialization monad: a state monad over `WeakExprState` with failure. -/ +abbrev SerializeM := OptionT (StateM WeakExprState) + +/-- Append a new serialized item for `e`, recording its index in the cache. -/ +def add (e : Expr) (i : WeakExprItem) : SerializeM Nat := do + modify fun s => { s with + hashExpr := s.hashExpr.insert e s.hashExpr.size, + arrayExpr := s.arrayExpr.push i + } + return (← get).arrayExpr.size - 1 + +/-- Serialize a name, returning the index of its (deduplicated) string. -/ +def addName (name : Name) : SerializeM Nat := do + if let some n := (← get).hashName.get? name then return n + modify fun s => { s with + hashName := s.hashName.insert name s.hashName.size, + arrayName := s.arrayName.push name.toString + } + return (← get).arrayName.size - 1 + +/-- Recursively serialize an expression into the state, returning its index. -/ +def toWeakExprAux (e : Expr) : SerializeM Nat := do + if let some n := (← get).hashExpr.get? e then return n + match e with + | .bvar n => add e (.a n) + | .fvar _ => failure + | .mvar _ => failure + | .sort u => add e (.b u.toWeakLevel) + | .const name levels => add e (.c (← addName name) (levels.map (·.toWeakLevel))) + | .app s t => do add e (.d (← toWeakExprAux s) (← toWeakExprAux t)) + | .lam name type body info => do + add e (.e (← addName name) (← toWeakExprAux type) (← toWeakExprAux body) info.toNat) + | .forallE name type body info => do + add e (.f (← addName name) (← toWeakExprAux type) (← toWeakExprAux body) info.toNat) + | .letE name type value body nondep => do + add e (.g (← addName name) (← toWeakExprAux type) (← toWeakExprAux value) + (← toWeakExprAux body) nondep) + | .lit (.natVal n) => add e (.h n) + | .lit (.strVal str) => add e (.i str) + | .mdata _ e => toWeakExprAux e + | .proj name idx struct => do add e (.j (← addName name) idx (← toWeakExprAux struct)) + +/-- Serialize a closed expression into its `WeakExpr` representation. -/ +def _root_.Lean.Expr.toWeakExpr (e : Expr) : WeakExpr := + let result := ((toWeakExprAux e).run {}).2 + (result.arrayExpr, result.arrayName) + +/-- The `toExpr` declaration. -/ +def WeakExpr.toExpr (e : WeakExpr) : Expr := Id.run do + let (xs, names) := (e.1, e.2.map (·.toName)) + let mut es : Array Expr := #[] + for i in *...xs.size do + let value : Expr := + match xs[i]! with + | .a n => .bvar n + | .b u => .sort u.toLevel + | .c name u => .const names[name]! (u.map (·.toLevel)) + | .d s t => .app es[s]! es[t]! + | .e name type body info => .lam names[name]! es[type]! es[body]! info.toBinderInfo + | .f name type body info => .forallE names[name]! es[type]! es[body]! info.toBinderInfo + | .g name type value body nondep => .letE names[name]! es[type]! es[value]! es[body]! nondep + | .h n => mkNatLit n + | .i str => mkStrLit str + | .j name idx struct => .proj names[name]! idx es[struct]! + es := es.push value + return es[es.size - 1]! + +/-- Reduce the head beta redex of an elaborated term. -/ +syntax (name := headBetaSyntax) "headBeta(" term ")" : term + +/-- Elaborate a serialized expression. -/ +syntax (name := exprSyntax) "expr(" strLit ")" : term + +/-- The `toSyntax'` declaration. -/ +def _root_.Lean.Expr.toSyntax' + {m} [Monad m] [MonadQuotation m] (e : Expr) : m Term := do + let strLit := Syntax.mkStrLit (toString (toJson (e.toWeakExpr))) + `(expr($strLit)) + +end EncodeExpr + +/-- The `VariableParam` type. -/ +inductive VariableParam where + | freeVariable (binderInfo : BinderInfo) + | hypothesis (t : Term) +deriving Inhabited + +namespace VariableParam + +/-- The `isFreeVariable` declaration. -/ +def isFreeVariable : VariableParam → Bool + | freeVariable _ => true + | _ => false + +/-- The `isHypothesis` declaration. -/ +def isHypothesis : VariableParam → Bool + | hypothesis _ => true + | _ => false + +/-- The `toTerm` declaration. -/ +def toTerm : VariableParam → Term + | hypothesis t => t + | _ => default + +/-- A variable parameter is a free variable exactly when it is not a hypothesis. -/ +theorem isFreeVariable_eq_not_isHypothesis (p : VariableParam) : + p.isFreeVariable = !p.isHypothesis := by + cases p <;> rfl + +end VariableParam + +/-- The `VariableParams` declaration. -/ +abbrev VariableParams := Array VariableParam + +namespace VariableParams + +variable (ps : VariableParams) + +/-- The `numFreeVariables` declaration. -/ +def numFreeVariables : Nat := ps.countP (·.isFreeVariable) +/-- The `numHypotheses` declaration. -/ +def numHypotheses : Nat := ps.countP (·.isHypothesis) + +/-- The `freeVarsBefore` declaration. -/ +def freeVarsBefore (n : Nat) : Nat := Id.run do + if n >= ps.numHypotheses then return 0 + let mut (i, j) := (0, 0) + for p in ps do + if p.isFreeVariable then + i := i + 1 + else + if j == n then break + j := j + 1 + return i + +end VariableParams + +/-- The `BuildFormulaState` type. -/ +structure BuildFormulaState where + /-- The `attrDeclName` declaration. -/ + attrDeclName : Name + /-- The `hasEmptyInstance?` declaration. -/ + hasEmptyInstance? : Bool := false + /-- The `classParams` declaration. -/ + classParams : Array Term := #[] + /-- The `variableParams` declaration. -/ + variableParams : VariableParams := #[] + /-- The `variableType` declaration. -/ + variableType : Expr := default + /-- The `localVars` declaration. -/ + localVars : Array Expr := #[] + /-- The `Intermediates` declaration. -/ + termIntermediates : Array (Name × Array Nat) := #[] + +/-- The `BuildFormulaM` declaration. -/ +abbrev BuildFormulaM := StateT BuildFormulaState MetaM + +namespace BuildFormula + +/-- The `removeNameSuffix` declaration. -/ +def removeNameSuffix (name : Name) : Name := + match name with + | .anonymous => .anonymous + | _ => + name.eraseSuffix? `eu <|> + name.eraseSuffix? `formula <|> + name.eraseSuffix? `realize_iff <|> + name.eraseSuffix? `instFormulaToFunction <|> + name.eraseSuffix? `to_realize <|> + name.eraseSuffix? `elementarity |>.getD name + +/-- Stripping the recognized suffixes from the anonymous name leaves it unchanged. -/ +theorem removeNameSuffix_anonymous : removeNameSuffix .anonymous = .anonymous := rfl + +/-- The `attrDeclName` declaration. -/ +def attrDeclName : BuildFormulaM Name := do + return (← get).attrDeclName + +/-- The `name` declaration. -/ +def name : BuildFormulaM Name := do + return removeNameSuffix (← get).attrDeclName + +/-- The `isFunction` declaration. -/ +def isFunction : BuildFormulaM Bool := do + return (← getEnv).contains ((← name) ++ `eu) + +/-- The `isRealizeIffStage` declaration. -/ +def isRealizeIffStage : BuildFormulaM Bool := do + return (← attrDeclName).lastComponentAsString == "realize_iff" + +/-- The `hasEmptyInstanceState` declaration. -/ +def hasEmptyInstanceState : BuildFormulaM Bool := do + return (← get).hasEmptyInstance? + +/-- The `classParams` declaration. -/ +def classParams : BuildFormulaM (Array Term) := do + return (← get).classParams + +/-- The `variableParams` declaration. -/ +def variableParams : BuildFormulaM VariableParams := do + return (← get).variableParams + +/-- The `getHypothesis` declaration. -/ +def getHypothesis (i : Nat) : BuildFormulaM Term := do + return ((← variableParams).filter (·.isHypothesis))[i]!.toTerm + +/-- The `freeVarsBefore` declaration. -/ +def freeVarsBefore (i : Nat) : BuildFormulaM Nat := do + return (← variableParams).freeVarsBefore i + +/-- The `numFreeVars` declaration. -/ +def numFreeVars (adjust? := false) : BuildFormulaM Nat := do + return (← get).variableParams.numFreeVariables + + if adjust? && (← isFunction) then 1 else 0 + +/-- The `numHypotheses` declaration. -/ +def numHypotheses : BuildFormulaM Nat := do + return (← get).variableParams.numHypotheses + +/-- The `numAllVars` declaration. -/ +def numAllVars : BuildFormulaM Nat := do + return 2 + (← classParams).size + (← variableParams).size + +/-- The `variableType` declaration. -/ +def variableType : BuildFormulaM Expr := do + return (← get).variableType + +/-- The `localVars` declaration. -/ +def localVars : BuildFormulaM (Array Expr) := do + return (← get).localVars + +/-- The `Intermediates` declaration. -/ +def termIntermediates : BuildFormulaM (Array (Name × Array Nat)) := do + return (← get).termIntermediates + +/-- The `addIntermediate` declaration. -/ +def addIntermediate (name : Name) (args : Array Nat) : BuildFormulaM Nat := do + let xs ← termIntermediates + modify fun s => { s with termIntermediates := xs.push (name, args) } + return (← localVars).size + xs.size + +/-- The `clearIntermediates` declaration. -/ +def clearIntermediates : BuildFormulaM Unit := do + modify fun s => { s with termIntermediates := #[] } + +/-- The `findVar` declaration. -/ +def findVar (e : Expr) : BuildFormulaM Nat := do + match (← localVars).findIdx? (· == e) with + | some n => return n + | none => throwError m!"Can't find variable {e} in {← localVars}" + +/-- The `getIndexSeq` declaration. -/ +def getIndexSeq (extraBinders : Nat) (idx : Array Nat) : BuildFormulaM Expr := do + let n₀ ← numFreeVars true + let α ← `(Fin $(Syntax.mkNatLit n₀)) + let β ← `(Fin $(Syntax.mkNatLit ((← localVars).size + extraBinders - n₀))) + let indexSyntax ← idx.mapM fun n => do + let (op, i) := if n < n₀ then (`Sum.inl, n) else (`Sum.inr, n - n₀) + let stx ← `($(mkIdent op) $(Syntax.mkNatLit i)) + return stx + let mut stx ← `(Matrix.vecEmpty (α := $α ⊕ $β)) + for i in indexSyntax.reverse do + stx ← `(Matrix.vecCons $i $stx) + (elabTermAndSynthesize stx none).run' + +/-- The `withNewVars` declaration. -/ +def withNewVars {α} (vars : Array Expr) (f : BuildFormulaM α) : BuildFormulaM α := do + let oldVars ← localVars + modify fun s => { s with localVars := oldVars ++ vars } + try f + finally modify fun s => { s with localVars := oldVars } + +/-- The empty parameter list contributes no free variables. -/ +theorem numFreeVariables_empty : VariableParams.numFreeVariables #[] = 0 := rfl + +/-- The `throwTranslateError` declaration. -/ +def throwTranslateError {α} (e : Expr) : BuildFormulaM α := do + throwError m!"Can't translate to formula: {e}, variables: {← localVars}" + +/-- The `decomposeApp` declaration. -/ +def decomposeApp (e : Expr) : BuildFormulaM (Name × Array Expr) := do + let t ← variableType + let mut (.const name _, args) := (e.getAppFn, e.getAppArgs) | throwTranslateError e + let formulaName := name ++ `formula + unless (← getEnv).contains formulaName do + throwError "Formula {formulaName} not found" + return (formulaName, ← args.filterM fun e => do isDefEq (← inferType e) t) + +/-- Translate a term-level subexpression into an intermediate index, using `fuel` to +bound the recursion (any fuel at least the expression depth suffices). -/ +def goTerm (fuel : Nat) (e : Expr) : BuildFormulaM Nat := do + match fuel with + | 0 => throwTranslateError e + | fuel + 1 => + match e with + | .app .. => + let (name, args) ← decomposeApp e + addIntermediate name (← args.mapM (goTerm fuel)) + | .fvar .. => findVar e + | _ => throwTranslateError e + +/-- Translate a proposition into a `BoundedFormula`, using `fuel` to bound the +recursion (any fuel at least the expression depth suffices). -/ +def go (fuel : Nat) (e : Expr) : BuildFormulaM Expr := do + match fuel with + | 0 => throwTranslateError e + | fuel + 1 => + match e with + | .forallE name type body info => + let newExpr : Expr := .lam name type body info + let sort ← inferType type + match sort.sortLevel! with + | 0 => mkAppM ``BoundedFormula.imp #[← go fuel type, ← go fuel body] + | _ => mkAppM ``BoundedFormula.all #[← go fuel newExpr] + | .lam .. => lambdaTelescope e fun newVars e' => withNewVars newVars (go fuel e') + | .app .. => + match_expr e with + | Exists _ P => mkAppM ``BoundedFormula.ex #[← go fuel P] + | ExistsUnique _ P => do mkAppM ``BoundedFormula.exUnique #[← go fuel P] + | And p q => mkAppM ``min #[← go fuel p, ← go fuel q] + | Or p q => mkAppM ``max #[← go fuel p, ← go fuel q] + | Not p => mkAppM ``BoundedFormula.not #[← go fuel p] + | Iff p q => mkAppM ``BoundedFormula.iff #[← go fuel p, ← go fuel q] + | _ => + let (name, args) ← decomposeApp e + let argsIdx ← args.mapM (goTerm fuel) + let mut formula ← mkAppOptM ``BoundedFormula.relabel #[ + none, none, none, none, ← getIndexSeq (← termIntermediates).size argsIdx, + toExpr 0, mkConst name + ] + for ((name, idx), i) in (← termIntermediates).zipIdx.reverse do + formula ← mkAppM ``BoundedFormula.ofFunc #[mkConst name, ← getIndexSeq i idx, formula] + clearIntermediates + return formula + | _ => throwTranslateError e + +/-- The `checkSorry` declaration. -/ +def checkSorry (name : Name) : BuildFormulaM Unit := do + match (← getEnv).findAsync? name false with + | some const => do + let reportError (const : ConstantInfo) : CoreM Unit := do + if const.toDeclaration!.hasSorry then + throwError m!"Definition {name} has sorry" + let cancelTk ← IO.CancelToken.new + let checkAct ← Core.wrapAsyncAsSnapshot reportError cancelTk + let t ← BaseIO.mapTask checkAct const.constInfo + Core.logSnapshotTask { + stx? := none, reportingRange := .skip, task := t, cancelTk? := cancelTk + } + | none => throwError m!"Definition {name} not found" + +/-- The `addDeclSimple` declaration. -/ +def addDeclSimple (name : Name) (type value : Expr) : BuildFormulaM Unit := do + let value ← instantiateMVars value + let env ← getEnv + let result ← Closure.mkValueTypeClosure type value false + let hints := ReducibilityHints.regular (getMaxHeight env value + 1) + let decl := Declaration.defnDecl (mkDefinitionValEx + name result.levelParams.toList result.type result.value + hints DefinitionSafety.safe [name] + ) + addDecl decl + Lean.addDocStringCore name + "The first-order formula automatically realized for this set-theoretic predicate." + warnIfUsesSorry decl + enableRealizationsForConst name + +/-- The `explicitize` declaration. -/ +def explicitize : Expr → Nat → Expr + | .lam name type body _, n + 1 => .lam name type (explicitize body n) .default + | e, _ => e + +/-- The `mkLambdaFVarsExplicit` declaration. -/ +def mkLambdaFVarsExplicit (xs : Array Expr) (e : Expr) : BuildFormulaM Expr := do + let e' ← mkLambdaFVars xs e + if e'.hasFVar || e'.hasMVar then + throwError "{e'} depends on variables not in {xs}" + return explicitize e' xs.size + +/-- The `init` declaration. -/ +def init : BuildFormulaM Unit := do + let constInfo := (← getEnv).find? (← attrDeclName) |>.get! + forallTelescopeReducing constInfo.type fun vars _ => do + unless vars.size ≥ 2 do + throwError m!"Variable list {vars} doesn't starts with `\{M} [ZFStructure M] ...`" + let variableType := vars[0]! + let mut classVars : Array Expr := #[] + let mut classParams : Array Term := #[] + let mut freeVars : Array Expr := #[] + let mut variableParams : VariableParams := #[] + let hasEmpty ← mkAppOptM ``HasEmpty #[vars[0]!, vars[1]!] + for i in 2...vars.size do + let type ← inferType vars[i]! + if (← vars[i]!.fvarId!.getBinderInfo) == .instImplicit then + if freeVars.size != 0 then + throwError m!"Free variables must occur after all instance parameters" + classVars := classVars.push vars[i]! + classParams := classParams.push <| + ← (← mkLambdaFVarsExplicit vars[*...2] type).toSyntax' + if (← isDefEq type hasEmpty) then + modify fun s => { s with hasEmptyInstance? := true} + else + if ← isRealizeIffStage then continue + if ← isDefEq type variableType then + freeVars := freeVars.push vars[i]! + variableParams := variableParams.push <| .freeVariable <| vars[i]!.binderInfo + else + unless (← isFunction) do + throwError "Only function definitions allow hypotheses" + variableParams := variableParams.push <| .hypothesis + (← (← mkLambdaFVarsExplicit (vars[*...2] ++ classVars ++ freeVars) type).toSyntax') + if ← isRealizeIffStage then + let formulaType := ((← getEnv).find? ((← name) ++ `formula)).get!.type + let_expr ZFFormula n := formulaType | throwError "Formula must be of `ZFFormula` type" + let some numFreeVars ← (Lean.Meta.evalNat (← whnf n)).run + | throwError "Formula index is not a literal natural number" + modify fun s => { s with + classParams, variableParams := .replicate numFreeVars (.freeVariable .default) + } + else + modify fun s => { s with + classParams, variableParams + } + +/-- The `simpFormulaPre` declaration. -/ +def simpFormulaPre (e : Expr) : BuildFormulaM Expr := do + let some ext ← getSimpExtension? `formula_builder_pre | failure + let ctx ← Simp.mkContext {} #[← ext.getTheorems] + return (← simp e ctx).1.expr + +/-- The `simpFormula` declaration. -/ +def simpFormula (e : Expr) : BuildFormulaM Expr := do + let some ext ← getSimpExtension? `formula_builder | failure + let ctx ← Simp.mkContext {} #[← ext.getTheorems] + return (← simp e ctx).1.expr + +/-- The `definitionProp` declaration. -/ +def definitionProp : BuildFormulaM Expr := do + if ← isFunction then + let constInfo := (← getEnv).find? ((← name) ++ `eu) |>.get! + forallTelescopeReducing (← simpFormulaPre constInfo.type) fun vars type => do + match_expr type with + | ExistsUnique _ P => mkLambdaFVars vars P + | _ => throwError m!"Function definition should has type with form `∃!, ...`" + else + let definition := ((← getEnv).find? (← name)).get! + let some value := definition.value? + | throwError m!"Definition {← name} doesn't have value" + simpFormulaPre value + +/-- The `buildFormula` declaration. -/ +def buildFormula (formulaName : Name) : BuildFormulaM Unit := do + let isFunction ← isFunction + let formula ← lambdaTelescope (← definitionProp) fun vars value => do + let varsInDecl := if isFunction then vars.pop else vars + let variableParams ← variableParams + let freeVarsInDecl := varsInDecl.drop (varsInDecl.size - variableParams.size) + |>.zipIdx + |>.filter (fun (_, i) => variableParams[i]!.isFreeVariable) + |>.map (·.1) + let formulaVars := if isFunction then freeVarsInDecl ++ #[vars.back!] else freeVarsInDecl + modify fun s => { s with + variableType := vars[0]! + localVars := formulaVars + } + let value ← simpFormula value + let mut formula ← go (value.approxDepth.toNat + 1) value + for i in (*...(← numHypotheses)).toArray.reverse do + let e ← (elabTermAndSynthesize (← getHypothesis i) none).run' + let e := e.beta <| + vars[*...2 + (← classParams).size] ++ formulaVars[*...(← freeVarsBefore i)] + let e ← simpFormula e + formula ← mkAppM ``BoundedFormula.ite #[ + ← go (e.approxDepth.toNat + 1) e, formula, ← mkAppM ``EqEmptyN #[toExpr (← numFreeVars)] + ] + return formula + addDeclSimple formulaName (← mkAppM ``ZFFormula #[toExpr (← numFreeVars true)]) formula + applyAttributes formulaName #[{name := `irreducible}] |>.run' + +/-- The `prefixIdents` declaration. -/ +def prefixIdents (typeLetter := "M") : Array Ident := + #[mkIdent typeLetter.toName, mkIdent ("s" ++ typeLetter).toName] + +/-- The prefix identifiers are exactly the carrier type and its structure instance. -/ +theorem prefixIdents_size (typeLetter : String) : (prefixIdents typeLetter).size = 2 := rfl + +end BuildFormula diff --git a/LeanPool/SetTheory/SimpAttr.lean b/LeanPool/SetTheory/SimpAttr.lean index 2fce0f3000..6d1953a1d1 100644 --- a/LeanPool/SetTheory/SimpAttr.lean +++ b/LeanPool/SetTheory/SimpAttr.lean @@ -3,7 +3,11 @@ Copyright (c) 2026 Shuhao Song. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shuhao Song -/ -import Lean +module + +public meta import Lean.Meta.Tactic.Simp.Simproc +meta import Lean.Meta.Tactic.Simp.Attr +import Lean.Meta.Tactic.Simp.RegisterCommand /-! # Simp attributes for the ZF realization machinery @@ -12,6 +16,8 @@ This module registers the custom `simp` attributes used to drive the formula-rea and elementary-embedding automation in the rest of the development. -/ +@[expose] public section + /-- Simp set for unfolding `Formula.Realize` of the generated ZF formulas. -/ register_simp_attr realize_simps /-- Simp set for pushing an elementary embedding through set-theoretic operations. -/ diff --git a/LeanPool/Shannon1948Formalization.lean b/LeanPool/Shannon1948Formalization.lean index 8b05add5ed..0273a6e618 100644 --- a/LeanPool/Shannon1948Formalization.lean +++ b/LeanPool/Shannon1948Formalization.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module -import LeanPool.Shannon1948Formalization.Entropy +public import LeanPool.Shannon1948Formalization.Entropy.Final + +public import LeanPool.Shannon1948Formalization.Entropy +import Mathlib.Tactic.Positivity.Finset /-! # Shannon Entropy Characterization @@ -17,6 +21,8 @@ Tags: information-theory, entropy, probability MSC: 94A17, 60C05 -/ +@[expose] public section + /-! # Shannon diff --git a/LeanPool/Shannon1948Formalization/Entropy.lean b/LeanPool/Shannon1948Formalization/Entropy.lean index 093ff16958..dd8cb6e1bd 100644 --- a/LeanPool/Shannon1948Formalization/Entropy.lean +++ b/LeanPool/Shannon1948Formalization/Entropy.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module -import LeanPool.Shannon1948Formalization.Entropy.Properties -import LeanPool.Shannon1948Formalization.Entropy.Converse +public import LeanPool.Shannon1948Formalization.Entropy.Properties +public import LeanPool.Shannon1948Formalization.Entropy.Converse +import Mathlib.Tactic.Positivity.Finset /-! # Shannon.Entropy @@ -23,3 +25,5 @@ Import this file to access the full development: `Core → Uniform → Rational → Approx → Final → Gibbs → Joint → Properties` ↘ Converse -/ + +@[expose] public section diff --git a/LeanPool/Shannon1948Formalization/Entropy/Approx.lean b/LeanPool/Shannon1948Formalization/Entropy/Approx.lean index aff58409d6..288fce8edf 100644 --- a/LeanPool/Shannon1948Formalization/Entropy/Approx.lean +++ b/LeanPool/Shannon1948Formalization/Entropy/Approx.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module +public import LeanPool.Shannon1948Formalization.Entropy.Uniform import LeanPool.Shannon1948Formalization.Entropy.Rational +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Shannon.Entropy.Approx @@ -15,6 +22,8 @@ Constructs floor-count rational approximants `approxProb p N` and proves their convergence to `p`. This is the bridge from the rational formula to the full real-probability formula. -/ + +@[expose] public section namespace LeanPool.Shannon1948Formalization noncomputable section diff --git a/LeanPool/Shannon1948Formalization/Entropy/Converse.lean b/LeanPool/Shannon1948Formalization/Entropy/Converse.lean index 2b49cb2460..958c444e10 100644 --- a/LeanPool/Shannon1948Formalization/Entropy/Converse.lean +++ b/LeanPool/Shannon1948Formalization/Entropy/Converse.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module +public import LeanPool.Shannon1948Formalization.Entropy.Uniform import LeanPool.Shannon1948Formalization.Entropy.Gibbs +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Shannon.Entropy.Converse @@ -21,6 +25,8 @@ positive multiple of `entropyNat`. - `entropyNat_grouping`: two-stage decomposition identity - `entropyNat_shannonAxioms`: `ShannonEntropyAxioms entropyNat` -/ + +@[expose] public section namespace LeanPool.Shannon1948Formalization noncomputable section diff --git a/LeanPool/Shannon1948Formalization/Entropy/Core.lean b/LeanPool/Shannon1948Formalization/Entropy/Core.lean index 936708c093..2fcfeb8aa1 100644 --- a/LeanPool/Shannon1948Formalization/Entropy/Core.lean +++ b/LeanPool/Shannon1948Formalization/Entropy/Core.lean @@ -3,19 +3,18 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ - -import Mathlib.Analysis.Convex.DoublyStochasticMatrix -import Mathlib.Analysis.SpecialFunctions.Log.Base -import Mathlib.Analysis.SpecialFunctions.Log.NegMulLog -import Mathlib.Data.Fintype.BigOperators -import Mathlib.Data.Fintype.EquivFin -import Mathlib.Logic.Equiv.Fin.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity +module + +public import Mathlib.Logic.Equiv.Fin.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Algebra.Group.End +public import Mathlib.Data.Fintype.Sigma +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Shannon.Entropy.Core @@ -33,6 +32,8 @@ Global roadmap (matching Shannon Appendix 2): 3. Real case: floor-count rational approximants `approxProb p N` converge to `p`; continuity upgrades the rational formula to all real probabilities. -/ + +@[expose] public section namespace LeanPool.Shannon1948Formalization noncomputable section diff --git a/LeanPool/Shannon1948Formalization/Entropy/Final.lean b/LeanPool/Shannon1948Formalization/Entropy/Final.lean index b70bc52fec..aefc356b4b 100644 --- a/LeanPool/Shannon1948Formalization/Entropy/Final.lean +++ b/LeanPool/Shannon1948Formalization/Entropy/Final.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module +public import LeanPool.Shannon1948Formalization.Entropy.Uniform import LeanPool.Shannon1948Formalization.Entropy.Approx +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Shannon.Entropy.Final @@ -15,6 +22,8 @@ Combines the rational characterization and continuity extension to prove: - natural-log uniqueness (`entropyNat_unique`); - base-parametric uniqueness (`entropyBase_unique`). -/ + +@[expose] public section namespace LeanPool.Shannon1948Formalization noncomputable section diff --git a/LeanPool/Shannon1948Formalization/Entropy/Gibbs.lean b/LeanPool/Shannon1948Formalization/Entropy/Gibbs.lean index eed2c31891..2f66a8416a 100644 --- a/LeanPool/Shannon1948Formalization/Entropy/Gibbs.lean +++ b/LeanPool/Shannon1948Formalization/Entropy/Gibbs.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module -import LeanPool.Shannon1948Formalization.Entropy.Final +public import LeanPool.Shannon1948Formalization.Entropy.Uniform +public import Mathlib.Analysis.SpecialFunctions.Log.NegMulLog +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Shannon.Entropy.Gibbs @@ -26,6 +30,8 @@ Mathlib's concavity infrastructure for later proofs. - `entropyNat_uniformPNat`: `H(uniform n) = log n` - `entropyNat_le_log_card`: `H(p) ≤ log |α|` -/ + +@[expose] public section namespace LeanPool.Shannon1948Formalization noncomputable section diff --git a/LeanPool/Shannon1948Formalization/Entropy/Joint.lean b/LeanPool/Shannon1948Formalization/Entropy/Joint.lean index 62f2459d93..7e78528d34 100644 --- a/LeanPool/Shannon1948Formalization/Entropy/Joint.lean +++ b/LeanPool/Shannon1948Formalization/Entropy/Joint.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module -import LeanPool.Shannon1948Formalization.Entropy.Gibbs +public import LeanPool.Shannon1948Formalization.Entropy.Uniform +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Shannon.Entropy.Joint @@ -29,6 +35,8 @@ the infrastructure for multi-variable entropy identities. - `entropyNat_prodDist`: `H(X × Y) = H(X) + H(Y)` for independent distributions - `marginalFst_prodDist`, `marginalSnd_prodDist`: marginals of product distributions -/ + +@[expose] public section namespace LeanPool.Shannon1948Formalization noncomputable section diff --git a/LeanPool/Shannon1948Formalization/Entropy/Properties.lean b/LeanPool/Shannon1948Formalization/Entropy/Properties.lean index c88e3387a9..a9584f3608 100644 --- a/LeanPool/Shannon1948Formalization/Entropy/Properties.lean +++ b/LeanPool/Shannon1948Formalization/Entropy/Properties.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module -import LeanPool.Shannon1948Formalization.Entropy.Joint +public import LeanPool.Shannon1948Formalization.Entropy.Joint +public import Mathlib.Analysis.Convex.DoublyStochasticMatrix +import LeanPool.Shannon1948Formalization.Entropy.Gibbs /-! # Shannon.Entropy.Properties @@ -22,6 +25,8 @@ Gibbs inequality and concavity of `negMulLog`. 5. `condEntropy_le_entropyNat` — conditioning reduces entropy: `H_X(Y) ≤ H(Y)` 6. `condEntropy_nonneg` — conditional entropy is nonnegative -/ + +@[expose] public section namespace LeanPool.Shannon1948Formalization noncomputable section diff --git a/LeanPool/Shannon1948Formalization/Entropy/Rational.lean b/LeanPool/Shannon1948Formalization/Entropy/Rational.lean index 84db8bb79a..da373c139c 100644 --- a/LeanPool/Shannon1948Formalization/Entropy/Rational.lean +++ b/LeanPool/Shannon1948Formalization/Entropy/Rational.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module -import LeanPool.Shannon1948Formalization.Entropy.Uniform +public import LeanPool.Shannon1948Formalization.Entropy.Uniform +import Mathlib.Algebra.Order.Algebra +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Shannon.Entropy.Rational @@ -17,6 +23,8 @@ It also includes a worked decomposition corresponding to Shannon's `(1/2, 1/3, 1/6)` narrative. -/ +@[expose] public section + namespace LeanPool.Shannon1948Formalization noncomputable section diff --git a/LeanPool/Shannon1948Formalization/Entropy/Uniform.lean b/LeanPool/Shannon1948Formalization/Entropy/Uniform.lean index bf7e72cac8..cf8ee30fe3 100644 --- a/LeanPool/Shannon1948Formalization/Entropy/Uniform.lean +++ b/LeanPool/Shannon1948Formalization/Entropy/Uniform.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Samuel Schlesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Samuel Schlesinger -/ +module -import LeanPool.Shannon1948Formalization.Entropy.Core +public import LeanPool.Shannon1948Formalization.Entropy.Core +public import Mathlib.Analysis.SpecialFunctions.Log.Base +import Mathlib.Analysis.SpecialFunctions.Log.NegMulLog +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Shannon.Entropy.Uniform @@ -16,6 +21,8 @@ Main outputs: - logarithmic characterization `Apos H n = K H * log n`; - positivity of the scale factor `K`. -/ + +@[expose] public section namespace LeanPool.Shannon1948Formalization noncomputable section diff --git a/LeanPool/SingularModuli.lean b/LeanPool/SingularModuli.lean index a158628108..62d8bd7890 100644 --- a/LeanPool/SingularModuli.lean +++ b/LeanPool/SingularModuli.lean @@ -3,14 +3,19 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Caleb L. Geiger -/ +module -import LeanPool.SingularModuli.QuadraticOrder.Basic -import LeanPool.SingularModuli.QuadraticOrder.Norm -import LeanPool.SingularModuli.QuadraticOrder.Discriminant -import LeanPool.SingularModuli.QuadraticOrder.Verification -import LeanPool.SingularModuli.QuadraticOrder.RootCounting -import LeanPool.SingularModuli.QuadraticOrder.Prime -import LeanPool.SingularModuli.QuadraticOrder.CanonicalForm +public import LeanPool.SingularModuli.QuadraticOrder.Basic +public import LeanPool.SingularModuli.QuadraticOrder.Norm +public import LeanPool.SingularModuli.QuadraticOrder.Discriminant +public import LeanPool.SingularModuli.QuadraticOrder.Verification +public import LeanPool.SingularModuli.QuadraticOrder.RootCounting +public import LeanPool.SingularModuli.QuadraticOrder.Prime +public import LeanPool.SingularModuli.QuadraticOrder.CanonicalForm +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Quadratic-order prime classification @@ -22,3 +27,5 @@ Main declarations: `QuadraticOrder.prime_inert_iff`, `QuadraticOrder.prime_split Tags: algebraic-number-theory, quadratic-orders, legendre-symbol MSC: 11R11, 11R29, 11A15 -/ + +@[expose] public section diff --git a/LeanPool/SingularModuli/QuadraticOrder/Basic.lean b/LeanPool/SingularModuli/QuadraticOrder/Basic.lean index 6b76d8c154..79e44790de 100644 --- a/LeanPool/SingularModuli/QuadraticOrder/Basic.lean +++ b/LeanPool/SingularModuli/QuadraticOrder/Basic.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Caleb L. Geiger -/ +module -import Mathlib.RingTheory.AdjoinRoot +public import Mathlib.RingTheory.AdjoinRoot /-! # The quadratic order `O_d` — definition and power basis @@ -34,6 +35,8 @@ introduced only where it is actually needed (see `Discriminant.lean`). For no longer matches the order of discriminant `d`. -/ +@[expose] public section + open scoped Polynomial /-- The defining polynomial of `QuadraticOrder d`. -/ diff --git a/LeanPool/SingularModuli/QuadraticOrder/CanonicalForm.lean b/LeanPool/SingularModuli/QuadraticOrder/CanonicalForm.lean index 44cf03fc03..683aae804d 100644 --- a/LeanPool/SingularModuli/QuadraticOrder/CanonicalForm.lean +++ b/LeanPool/SingularModuli/QuadraticOrder/CanonicalForm.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Caleb L. Geiger -/ +module -import LeanPool.SingularModuli.QuadraticOrder.Prime +public import LeanPool.SingularModuli.QuadraticOrder.Basic +import Mathlib.Data.Nat.Totient /-! # Layer 2b: Canonical Form for ideals of `QuadraticOrder` — scaffolding @@ -39,6 +41,8 @@ canonical forms) is developed in subsequent PRs on top of this scaffolding. -/ +@[expose] public section + namespace QuadraticOrder variable {d : ℤ} {p k m : ℕ} {A : ℤ} diff --git a/LeanPool/SingularModuli/QuadraticOrder/Discriminant.lean b/LeanPool/SingularModuli/QuadraticOrder/Discriminant.lean index f0eacada84..43ff14de08 100644 --- a/LeanPool/SingularModuli/QuadraticOrder/Discriminant.lean +++ b/LeanPool/SingularModuli/QuadraticOrder/Discriminant.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Caleb L. Geiger -/ +module -import LeanPool.SingularModuli.QuadraticOrder.Norm +public import LeanPool.SingularModuli.QuadraticOrder.Norm /-! # The discriminant identity `(τ − tauConj)² = d` @@ -27,6 +28,8 @@ exactly under the congruence hypothesis. The general form `tau_sub_tauConj_sq` is a Lean-only artifact with no thesis counterpart. -/ +@[expose] public section + namespace QuadraticOrder variable {d : ℤ} diff --git a/LeanPool/SingularModuli/QuadraticOrder/Norm.lean b/LeanPool/SingularModuli/QuadraticOrder/Norm.lean index 24b61f2c5a..8fb321f12c 100644 --- a/LeanPool/SingularModuli/QuadraticOrder/Norm.lean +++ b/LeanPool/SingularModuli/QuadraticOrder/Norm.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Caleb L. Geiger -/ +module -import LeanPool.SingularModuli.QuadraticOrder.Basic +public import LeanPool.SingularModuli.QuadraticOrder.Basic /-! # The norm form on `O_d` @@ -29,6 +30,8 @@ agrees with the thesis; the route via `tauConj` is a Lean-idiomatic reformulation. -/ +@[expose] public section + namespace QuadraticOrder variable {d : ℤ} diff --git a/LeanPool/SingularModuli/QuadraticOrder/Prime.lean b/LeanPool/SingularModuli/QuadraticOrder/Prime.lean index 0a73925970..e90af62927 100644 --- a/LeanPool/SingularModuli/QuadraticOrder/Prime.lean +++ b/LeanPool/SingularModuli/QuadraticOrder/Prime.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Caleb L. Geiger -/ +module -import LeanPool.SingularModuli.QuadraticOrder.Prime.PolyMod -import LeanPool.SingularModuli.QuadraticOrder.Prime.QuotientIso -import LeanPool.SingularModuli.QuadraticOrder.Prime.Inert -import LeanPool.SingularModuli.QuadraticOrder.Prime.Ramified -import LeanPool.SingularModuli.QuadraticOrder.Prime.Split +public import LeanPool.SingularModuli.QuadraticOrder.Prime.PolyMod +public import LeanPool.SingularModuli.QuadraticOrder.Prime.QuotientIso +public import LeanPool.SingularModuli.QuadraticOrder.Prime.Inert +public import LeanPool.SingularModuli.QuadraticOrder.Prime.Ramified +public import LeanPool.SingularModuli.QuadraticOrder.Prime.Split /-! # Layer 2a: Prime classification in `QuadraticOrder d` @@ -32,3 +33,5 @@ See `Prime/QuotientIso.lean` for the main *divergence from the thesis*: the whole trichotomy is routed through one ring isomorphism rather than the thesis's explicit index computations. -/ + +@[expose] public section diff --git a/LeanPool/SingularModuli/QuadraticOrder/Prime/Inert.lean b/LeanPool/SingularModuli/QuadraticOrder/Prime/Inert.lean index f7f8ff9149..a23049f1ec 100644 --- a/LeanPool/SingularModuli/QuadraticOrder/Prime/Inert.lean +++ b/LeanPool/SingularModuli/QuadraticOrder/Prime/Inert.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Caleb L. Geiger -/ +module +public import LeanPool.SingularModuli.QuadraticOrder.Prime.PolyMod import LeanPool.SingularModuli.QuadraticOrder.Prime.QuotientIso /-! @@ -23,6 +25,8 @@ remains prime in `O_d` exactly when the Legendre symbol `(d/p) = -1`. rather than via the thesis's direct index computation in `ℤ/pᵏ[x]/g(x)`. -/ +@[expose] public section + open Polynomial namespace QuadraticOrder diff --git a/LeanPool/SingularModuli/QuadraticOrder/Prime/PolyMod.lean b/LeanPool/SingularModuli/QuadraticOrder/Prime/PolyMod.lean index 42a5540f0d..bd21e8923c 100644 --- a/LeanPool/SingularModuli/QuadraticOrder/Prime/PolyMod.lean +++ b/LeanPool/SingularModuli/QuadraticOrder/Prime/PolyMod.lean @@ -3,17 +3,12 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Caleb L. Geiger -/ +module -import LeanPool.SingularModuli.QuadraticOrder.Basic -import Mathlib.Algebra.QuadraticDiscriminant -import Mathlib.Data.ZMod.Basic -import Mathlib.Data.ZMod.QuotientRing -import Mathlib.Algebra.Field.ZMod -import Mathlib.NumberTheory.LegendreSymbol.Basic +public import LeanPool.SingularModuli.QuadraticOrder.Basic +public import Mathlib.Algebra.QuadraticDiscriminant +public import Mathlib.NumberTheory.LegendreSymbol.Basic import Mathlib.Algebra.Polynomial.SpecificDegree -import Mathlib.Algebra.Polynomial.RingDivision -import Mathlib.Algebra.Squarefree.Basic -import Mathlib.RingTheory.Ideal.Quotient.Nilpotent /-! # Prime classification, part 1: the reduced polynomial `polyMod d p` @@ -44,6 +39,8 @@ iso), `Inert.lean`, `Split.lean`, and `Ramified.lean`. `Prime/` directory; the other `Prime/*` files import this one and inherit it. -/ +@[expose] public section + open Polynomial namespace QuadraticOrder diff --git a/LeanPool/SingularModuli/QuadraticOrder/Prime/QuotientIso.lean b/LeanPool/SingularModuli/QuadraticOrder/Prime/QuotientIso.lean index fe38088143..d899451845 100644 --- a/LeanPool/SingularModuli/QuadraticOrder/Prime/QuotientIso.lean +++ b/LeanPool/SingularModuli/QuadraticOrder/Prime/QuotientIso.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Caleb L. Geiger -/ +module -import LeanPool.SingularModuli.QuadraticOrder.Prime.PolyMod +public import LeanPool.SingularModuli.QuadraticOrder.Prime.PolyMod +public import Mathlib.Data.ZMod.QuotientRing /-! # Prime classification, part 2: the quotient ring isomorphism @@ -30,6 +32,8 @@ field/PID structure of `𝔽ₚ[X]` does the work. The downstream files Lean-idiomatic route; the mathematical content matches Prop 3.2.1. -/ +@[expose] public section + open Polynomial namespace QuadraticOrder diff --git a/LeanPool/SingularModuli/QuadraticOrder/Prime/Ramified.lean b/LeanPool/SingularModuli/QuadraticOrder/Prime/Ramified.lean index 4d552180b1..0b35ff3357 100644 --- a/LeanPool/SingularModuli/QuadraticOrder/Prime/Ramified.lean +++ b/LeanPool/SingularModuli/QuadraticOrder/Prime/Ramified.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Caleb L. Geiger -/ +module +public import LeanPool.SingularModuli.QuadraticOrder.Basic import LeanPool.SingularModuli.QuadraticOrder.Prime.QuotientIso +import Mathlib.RingTheory.Ideal.Quotient.Nilpotent /-! # Prime classification, part 4: the ramified case @@ -31,6 +34,8 @@ reverse direction reduces to *squarefreeness of `polyMod d p`* and transports thesis's hand computation. Mathematically the same as Prop 3.2.1. -/ +@[expose] public section + open Polynomial namespace QuadraticOrder diff --git a/LeanPool/SingularModuli/QuadraticOrder/Prime/Split.lean b/LeanPool/SingularModuli/QuadraticOrder/Prime/Split.lean index 60ac063a2e..0219927741 100644 --- a/LeanPool/SingularModuli/QuadraticOrder/Prime/Split.lean +++ b/LeanPool/SingularModuli/QuadraticOrder/Prime/Split.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Caleb L. Geiger -/ +module +public import LeanPool.SingularModuli.QuadraticOrder.Basic +public import Mathlib.NumberTheory.LegendreSymbol.Basic import LeanPool.SingularModuli.QuadraticOrder.Prime.Inert import LeanPool.SingularModuli.QuadraticOrder.Prime.Ramified @@ -29,6 +32,8 @@ of the quotient `O/(p) ≅ 𝔽ₚ × 𝔽ₚ` is the Lean-idiomatic restatement thesis's "p factors as two distinct primes". -/ +@[expose] public section + namespace QuadraticOrder variable {d : ℤ} {p : ℕ} diff --git a/LeanPool/SingularModuli/QuadraticOrder/RootCounting.lean b/LeanPool/SingularModuli/QuadraticOrder/RootCounting.lean index 9203af4c48..60253b29a7 100644 --- a/LeanPool/SingularModuli/QuadraticOrder/RootCounting.lean +++ b/LeanPool/SingularModuli/QuadraticOrder/RootCounting.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Caleb L. Geiger -/ +module -import Mathlib.NumberTheory.LegendreSymbol.Basic -import Mathlib.RingTheory.Multiplicity -import Mathlib.RingTheory.ZMod.UnitsCyclic +public import Mathlib.NumberTheory.LegendreSymbol.Basic +import Mathlib.Algebra.Order.Star.Basic +import Mathlib.Analysis.Normed.Ring.Lemmas /-! # Layer 3: Root Counting for Quadratic Congruences @@ -15,6 +16,8 @@ This file counts solutions to `x² ≡ c (mod p^n)` for prime powers `p^n`. These are the "analytic inputs" for the ideal-counting theorems (Layer 4). -/ +@[expose] public section + namespace QuadraticOrder open Finset diff --git a/LeanPool/SingularModuli/QuadraticOrder/Verification.lean b/LeanPool/SingularModuli/QuadraticOrder/Verification.lean index 3f42931fc9..94087a44c3 100644 --- a/LeanPool/SingularModuli/QuadraticOrder/Verification.lean +++ b/LeanPool/SingularModuli/QuadraticOrder/Verification.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Lean Pool contributors. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Caleb L. Geiger -/ +module -import LeanPool.SingularModuli.QuadraticOrder.Basic +public import LeanPool.SingularModuli.QuadraticOrder.Basic + +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # Quadratic-order verification checks @@ -13,6 +20,8 @@ This file records a small sanity check for the defining minimal polynomial of `tau`. -/ +@[expose] public section + /-- Sanity check: `τ` satisfies its minimal polynomial `X² - dX + (d²-d)/4 = 0`. -/ example (d : ℤ) : (QuadraticOrder.tau (d := d)) ^ 2 - d • QuadraticOrder.tau + ((d ^ 2 - d) / 4 : ℤ) • (1 : QuadraticOrder d) = 0 := diff --git a/LeanPool/SpectralPositivity.lean b/LeanPool/SpectralPositivity.lean index 19245dab9d..6674c37c9c 100644 --- a/LeanPool/SpectralPositivity.lean +++ b/LeanPool/SpectralPositivity.lean @@ -3,14 +3,19 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.SpectralPositivity.Matrix.MetzlerExp -import LeanPool.SpectralPositivity.Matrix.NonnegPower -import LeanPool.SpectralPositivity.Operator.Jentzsch -import LeanPool.SpectralPositivity.Operator.SpectralRadius -import LeanPool.SpectralPositivity.Matrix.PerronFrobenius -import LeanPool.SpectralPositivity.Matrix.MMatrixInverse -import LeanPool.SpectralPositivity.Operator.KernelPositivity +public import LeanPool.SpectralPositivity.Operator.JentzschProof + +public import LeanPool.SpectralPositivity.Matrix.MetzlerExp +public import LeanPool.SpectralPositivity.Matrix.NonnegPower +public import LeanPool.SpectralPositivity.Operator.Jentzsch +public import LeanPool.SpectralPositivity.Operator.SpectralRadius +public import LeanPool.SpectralPositivity.Matrix.PerronFrobenius +public import LeanPool.SpectralPositivity.Matrix.MMatrixInverse +public import LeanPool.SpectralPositivity.Operator.KernelPositivity +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Spectral positivity @@ -22,3 +27,5 @@ Main declarations: `allpos_has_pos_eigenvec`, `perron_frobenius`, `ground_state_ Tags: linear-algebra, perron-frobenius, positivity MSC: 15B48, 15A18 -/ + +@[expose] public section diff --git a/LeanPool/SpectralPositivity/Matrix/MMatrixInverse.lean b/LeanPool/SpectralPositivity/Matrix/MMatrixInverse.lean index 2eeecfac33..cf690a9237 100644 --- a/LeanPool/SpectralPositivity/Matrix/MMatrixInverse.lean +++ b/LeanPool/SpectralPositivity/Matrix/MMatrixInverse.lean @@ -3,17 +3,18 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module +public import LeanPool.SpectralPositivity.Matrix.PerronFrobenius +public import Mathlib.LinearAlgebra.Matrix.PosDef +public import Mathlib.Analysis.Normed.Algebra.Exponential +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.SpectralPositivity.Matrix.MetzlerExp -import LeanPool.SpectralPositivity.Matrix.PerronFrobenius -import Mathlib.LinearAlgebra.Matrix.PosDef -import Mathlib.MeasureTheory.Integral.IntegralEqImproper -import Mathlib.MeasureTheory.Integral.Bochner.Set -import Mathlib.Analysis.Normed.Algebra.MatrixExponential -import Mathlib.Analysis.Matrix.Spectrum +import Mathlib.Algebra.Group.Pi.Units import Mathlib.Analysis.Matrix.PosDef +import Mathlib.Analysis.Normed.Algebra.MatrixExponential import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals -import Mathlib.Algebra.Group.Pi.Units /-! # M-matrix Inverse Positivity (strict + non-strict) @@ -50,6 +51,8 @@ This file provides both forms: * `graphops-qft` consumes the strict version for resolvent positivity. -/ +@[expose] public section + noncomputable section namespace SpectralPositivity diff --git a/LeanPool/SpectralPositivity/Matrix/MetzlerExp.lean b/LeanPool/SpectralPositivity/Matrix/MetzlerExp.lean index 04b2711b56..6eeb4a976a 100644 --- a/LeanPool/SpectralPositivity/Matrix/MetzlerExp.lean +++ b/LeanPool/SpectralPositivity/Matrix/MetzlerExp.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.SpectralPositivity.Matrix.NonnegPower +public import LeanPool.SpectralPositivity.Matrix.NonnegPower +public import Mathlib.Analysis.Normed.Algebra.Exponential +public import Mathlib.Topology.Instances.Matrix import Mathlib.Analysis.Normed.Algebra.MatrixExponential -import Mathlib.Topology.Algebra.InfiniteSum.Basic -import Mathlib.Topology.Algebra.InfiniteSum.Module -import Mathlib.Topology.Algebra.InfiniteSum.Order -import Mathlib.Topology.Order.OrderClosed import Mathlib.Analysis.SpecialFunctions.Exponential /-! @@ -31,6 +30,8 @@ of partial sums to the matrix exponential. - Horn–Johnson, *Matrix Analysis*, Cambridge, 2013, Thm 8.5.5 -/ +@[expose] public section + open Matrix BigOperators Finset noncomputable section diff --git a/LeanPool/SpectralPositivity/Matrix/NonnegPower.lean b/LeanPool/SpectralPositivity/Matrix/NonnegPower.lean index e7c302ea89..3b0ee000a9 100644 --- a/LeanPool/SpectralPositivity/Matrix/NonnegPower.lean +++ b/LeanPool/SpectralPositivity/Matrix/NonnegPower.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import Mathlib.LinearAlgebra.Matrix.NonsingularInverse -import Mathlib.Basic.Real.Basic +public import Mathlib.Basic.Real.Basic +public import Mathlib.Data.Matrix.Mul +import Mathlib.Data.Matrix.Basic +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD /-! # Nonneg Matrix Powers and Positivity @@ -27,6 +32,8 @@ blocks for the Metzler matrix exponential theorem (in MetzlerExp.lean). - Berman and Plemmons, *Nonnegative Matrices*, SIAM, 1994 -/ +@[expose] public section + open Matrix BigOperators Finset noncomputable section diff --git a/LeanPool/SpectralPositivity/Matrix/PerronFrobenius.lean b/LeanPool/SpectralPositivity/Matrix/PerronFrobenius.lean index 2a0671442b..4fd8cb71ad 100644 --- a/LeanPool/SpectralPositivity/Matrix/PerronFrobenius.lean +++ b/LeanPool/SpectralPositivity/Matrix/PerronFrobenius.lean @@ -3,18 +3,11 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.SpectralPositivity.Matrix.NonnegPower -import LeanPool.SpectralPositivity.Operator.JentzschProof -import Mathlib.Analysis.InnerProductSpace.l2Space -import Mathlib.Topology.Order.IntermediateValue -import Mathlib.LinearAlgebra.Matrix.ToLin -import Mathlib.LinearAlgebra.Charpoly.ToMatrix -import Mathlib.LinearAlgebra.Eigenspace.Charpoly -import Mathlib.LinearAlgebra.Eigenspace.Triangularizable -import Mathlib.Analysis.Convex.StdSimplex -import Mathlib.Topology.Order.Compact -import Mathlib.Topology.Sequences +public import LeanPool.SpectralPositivity.Matrix.NonnegPower +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Perron–Frobenius Theorem for Nonneg Matrices @@ -41,6 +34,8 @@ For B = A^k with all entries strictly positive (from `exists_pos_power`): - Seneta, *Non-negative Matrices and Markov Chains*, Springer, 2006 -/ +@[expose] public section + open Matrix BigOperators Finset MeasureTheory noncomputable section diff --git a/LeanPool/SpectralPositivity/Operator/Jentzsch.lean b/LeanPool/SpectralPositivity/Operator/Jentzsch.lean index d0ff546be3..5ff722473a 100644 --- a/LeanPool/SpectralPositivity/Operator/Jentzsch.lean +++ b/LeanPool/SpectralPositivity/Operator/Jentzsch.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.SpectralPositivity.Operator.JentzschProof +public import LeanPool.SpectralPositivity.Operator.JentzschProof + +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Tactic.Positivity.Finset /-! # Jentzsch's Theorem — Clean API @@ -30,3 +34,5 @@ generalized from L²(ℝⁿ) to L²(Ω, volume) for any MeasureSpace Ω. - Reed-Simon IV, Theorems XIII.43–44 -/ + +@[expose] public section diff --git a/LeanPool/SpectralPositivity/Operator/JentzschProof.lean b/LeanPool/SpectralPositivity/Operator/JentzschProof.lean index ea792290fd..bc41863587 100644 --- a/LeanPool/SpectralPositivity/Operator/JentzschProof.lean +++ b/LeanPool/SpectralPositivity/Operator/JentzschProof.lean @@ -3,13 +3,13 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import Mathlib.MeasureTheory.Function.LpSpace.Basic -import Mathlib.MeasureTheory.Function.LpOrder -import Mathlib.MeasureTheory.Function.L2Space -import Mathlib.Analysis.InnerProductSpace.l2Space +public import Mathlib.MeasureTheory.Function.L2Space +public import Mathlib.Analysis.InnerProductSpace.l2Space +public import Mathlib.Analysis.Normed.Operator.Compact.Basic +public import Mathlib.Analysis.InnerProductSpace.Adjoint import Mathlib.Analysis.InnerProductSpace.Rayleigh -import Mathlib.Analysis.Normed.Operator.Compact.Basic /-! # Proof of Jentzsch's Theorem via the Variational Absolute Value Trick @@ -36,6 +36,8 @@ structure (absolute value, positive/negative parts). - Courant-Hilbert, *Methods of Mathematical Physics*, Ch. VI -/ +@[expose] public section + noncomputable section open MeasureTheory diff --git a/LeanPool/SpectralPositivity/Operator/KernelPositivity.lean b/LeanPool/SpectralPositivity/Operator/KernelPositivity.lean index 182bf53f56..8a518e496c 100644 --- a/LeanPool/SpectralPositivity/Operator/KernelPositivity.lean +++ b/LeanPool/SpectralPositivity/Operator/KernelPositivity.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.SpectralPositivity.Operator.JentzschProof -import Mathlib.MeasureTheory.Integral.Bochner.Basic -import Mathlib.MeasureTheory.Integral.Bochner.Set -import Mathlib.MeasureTheory.Measure.Prod +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.MeasureTheory.Integral.Prod +import Mathlib.Tactic.Positivity.Finset /-! # Kernel Positivity-Improving Criterion @@ -35,6 +35,8 @@ This forces K > 0 a.e. on A × B for all such A, B. - Simon, *Functional Integration and Quantum Physics*, Prop. I.12 -/ +@[expose] public section + open MeasureTheory Measure Filter noncomputable section diff --git a/LeanPool/SpectralPositivity/Operator/SpectralRadius.lean b/LeanPool/SpectralPositivity/Operator/SpectralRadius.lean index 9b0f884cf4..10355d0044 100644 --- a/LeanPool/SpectralPositivity/Operator/SpectralRadius.lean +++ b/LeanPool/SpectralPositivity/Operator/SpectralRadius.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Michael R. Douglas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael R. Douglas -/ +module -import LeanPool.SpectralPositivity.Operator.JentzschProof -import Mathlib.Analysis.InnerProductSpace.Rayleigh -import Mathlib.Analysis.Normed.Algebra.Spectrum -import Mathlib.Analysis.CStarAlgebra.Spectrum +public import Mathlib.Analysis.Normed.Algebra.Spectrum +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.InnerProductSpace.Adjoint +public import Mathlib.MeasureTheory.Function.L2Space import Mathlib.Analysis.CStarAlgebra.ContinuousLinearMap +import Mathlib.Analysis.CStarAlgebra.Spectrum /-! # Spectral Radius Equals Norm for Self-Adjoint Operators @@ -42,6 +44,8 @@ spectral radius. - Simon, *Trace Ideals*, Ch. 2 -/ +@[expose] public section + noncomputable section open MeasureTheory diff --git a/LeanPool/SpherePacking.lean b/LeanPool/SpherePacking.lean index 5a7b2ebc52..1044b34ba5 100644 --- a/LeanPool/SpherePacking.lean +++ b/LeanPool/SpherePacking.lean @@ -3,8 +3,9 @@ Copyright (c) 2024 Sidharth Hariharan and 2026 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: OpenAI, Sidharth Hariharan, Gareth Ma, Dean Cureton -/ +module -import LeanPool.SpherePacking.Conclusion +public import LeanPool.SpherePacking.Conclusion /-! # Sharp asymptotic upper bounds for sphere packing diff --git a/LeanPool/SteinhausThreeGap.lean b/LeanPool/SteinhausThreeGap.lean index e1945766df..b082ec690b 100644 --- a/LeanPool/SteinhausThreeGap.lean +++ b/LeanPool/SteinhausThreeGap.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Dirk Kunert. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dirk Kunert -/ +module -import LeanPool.SteinhausThreeGap.Basic +public import LeanPool.SteinhausThreeGap.Basic /-! # The Three-Gap (Steinhaus) Theorem @@ -16,3 +17,5 @@ Main declarations: `SteinhausThreeGap.three_gap_card_le_three` Tags: number-theory, three-gap-theorem, equidistribution MSC: 11K06 -/ + +@[expose] public section diff --git a/LeanPool/SteinhausThreeGap/Basic.lean b/LeanPool/SteinhausThreeGap/Basic.lean index 3a3d549fc5..7fb907b3e9 100644 --- a/LeanPool/SteinhausThreeGap/Basic.lean +++ b/LeanPool/SteinhausThreeGap/Basic.lean @@ -3,19 +3,12 @@ Copyright (c) 2026 Dirk Kunert. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dirk Kunert -/ +module + +public import Mathlib.Algebra.Order.Archimedean.Real.Basic +public import Mathlib.Data.Finset.Sort +public import Mathlib.Algebra.BigOperators.Group.Multiset.Defs import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Algebra.BigOperators.Group.Multiset.Basic -import Mathlib.Algebra.Order.Archimedean.Real.Basic -import Mathlib.Algebra.Order.Floor.Ring -import Mathlib.Data.Finset.Card -import Mathlib.Data.Finset.Max -import Mathlib.Data.Finset.Sort -import Mathlib.Basic.Real.Basic -import Mathlib.Order.Interval.Set.Basic -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring /-! # The Three-Gap (Steinhaus) theorem @@ -60,6 +53,8 @@ Note on `noncomputable`: on `ℝ`, `DecidableEq` and the order are noncomputable `noncomputable`. -/ +@[expose] public section + namespace SteinhausThreeGap /-- The (finite, distinct) orbit `{ Int.fract (i * a) | i < N }` in `[0,1)`. diff --git a/LeanPool/SumsThreeSquares.lean b/LeanPool/SumsThreeSquares.lean index b94f3bce89..dbc5d360d8 100644 --- a/LeanPool/SumsThreeSquares.lean +++ b/LeanPool/SumsThreeSquares.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Bhavik Mehta, Pietro Monticone, Abel Doñate Muñoz. All righ Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Pietro Monticone, Abel Doñate Muñoz -/ +module -import LeanPool.SumsThreeSquares.MinkowskiConvex -import LeanPool.SumsThreeSquares.SumThreeSquares +public import LeanPool.SumsThreeSquares.MinkowskiConvex +public import LeanPool.SumsThreeSquares.SumThreeSquares +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt +import Mathlib.Tactic.NormNum.LegendreSymbol /-! # Sums of Three Squares @@ -18,6 +24,8 @@ Tags: number-theory, quadratic-forms, geometry-of-numbers MSC: 11E25, 11H06 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/SumsThreeSquares/MinkowskiConvex.lean b/LeanPool/SumsThreeSquares/MinkowskiConvex.lean index 082ab19324..dfd4835073 100644 --- a/LeanPool/SumsThreeSquares/MinkowskiConvex.lean +++ b/LeanPool/SumsThreeSquares/MinkowskiConvex.lean @@ -3,20 +3,13 @@ Copyright (c) 2026 Bhavik Mehta, Pietro Monticone, Abel Doñate Muñoz. All righ Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Pietro Monticone, Abel Doñate Muñoz -/ +module + +public import Mathlib.Analysis.Normed.Lp.MeasurableSpace +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.MeasureTheory.Group.GeometryOfNumbers import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace -import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +import Mathlib.Tactic.Positivity.Finset /-! # Minkowski's theorem for the standard integer lattice in `ℝⁿ` @@ -28,6 +21,8 @@ states that a symmetric convex set of volume greater than `2 ^ n` contains a non point all of whose coordinates are integers. -/ +@[expose] public section + namespace LeanPool.SumsThreeSquares open MeasureTheory Module Submodule diff --git a/LeanPool/SumsThreeSquares/SumThreeSquares.lean b/LeanPool/SumsThreeSquares/SumThreeSquares.lean index fd0d8f6877..d305fe72c2 100644 --- a/LeanPool/SumsThreeSquares/SumThreeSquares.lean +++ b/LeanPool/SumsThreeSquares/SumThreeSquares.lean @@ -3,36 +3,17 @@ Copyright (c) 2026 Bhavik Mehta, Pietro Monticone, Abel Doñate Muñoz. All righ Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Pietro Monticone, Abel Doñate Muñoz -/ +module + +public import Mathlib.NumberTheory.LegendreSymbol.JacobiSymbol +public import Mathlib.Analysis.Normed.Lp.MeasurableSpace +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis import LeanPool.SumsThreeSquares.MinkowskiConvex -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.NormNum.LegendreSymbol -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith -import Mathlib.NumberTheory.LegendreSymbol.QuadraticReciprocity -import Mathlib.NumberTheory.LegendreSymbol.JacobiSymbol -import Mathlib.NumberTheory.SumTwoSquares -import Mathlib.NumberTheory.LSeries.PrimesInAP -import Mathlib.NumberTheory.Padics.PadicVal.Basic -import Mathlib.LinearAlgebra.Matrix.ToLin -import Mathlib.LinearAlgebra.Matrix.Determinant.Basic -import Mathlib.LinearAlgebra.Determinant -import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar -import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls -import Mathlib.MeasureTheory.Group.GeometryOfNumbers -import Mathlib.Analysis.InnerProductSpace.PiL2 -import Mathlib.Analysis.SpecialFunctions.Pow.Real -import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.Analysis.Real.Pi.Bounds -import Mathlib.Data.ZMod.Basic -import Mathlib.Data.Nat.Squarefree -import Mathlib.RingTheory.Int.Basic +import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls +import Mathlib.NumberTheory.LSeries.PrimesInAP +import Mathlib.NumberTheory.SumTwoSquares +import Mathlib.Tactic.NormNum.LegendreSymbol /-! # Sums of three squares: the case `m ≡ 3 (mod 8)` @@ -45,6 +26,8 @@ Minkowski's theorem (see `LeanPool.SumsThreeSquares.MinkowskiConvex`). The main result is `blueprint_case_mod8_eq3`. -/ +@[expose] public section + namespace LeanPool.SumsThreeSquares open scoped BigOperators diff --git a/LeanPool/Sundogcert.lean b/LeanPool/Sundogcert.lean index 24677c849e..c1cf6614f2 100644 --- a/LeanPool/Sundogcert.lean +++ b/LeanPool/Sundogcert.lean @@ -3,26 +3,27 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import LeanPool.Sundogcert.Certificate -import LeanPool.Sundogcert.Instance -import LeanPool.Sundogcert.Scaling -import LeanPool.Sundogcert.Looseness -import LeanPool.Sundogcert.CertWall -import LeanPool.Sundogcert.Degradation -import LeanPool.Sundogcert.CheckCost -import LeanPool.Sundogcert.RSCertificate -import LeanPool.Sundogcert.DecodingNPHard -import LeanPool.Sundogcert.MatchingNPHard -import LeanPool.Sundogcert.SATNPHard -import LeanPool.Sundogcert.VarWheel -import LeanPool.Sundogcert.ClauseGadget -import LeanPool.Sundogcert.SATReduction -import LeanPool.Sundogcert.ThreeDMReindex -import LeanPool.Sundogcert.SATReductionIncidence -import LeanPool.Sundogcert.SATReductionReverse -import LeanPool.Sundogcert.SATReductionForward -import LeanPool.Sundogcert.SATReductionMain +public import LeanPool.Sundogcert.Certificate +public import LeanPool.Sundogcert.Instance +public import LeanPool.Sundogcert.Scaling +public import LeanPool.Sundogcert.Looseness +public import LeanPool.Sundogcert.CertWall +public import LeanPool.Sundogcert.Degradation +public import LeanPool.Sundogcert.CheckCost +public import LeanPool.Sundogcert.RSCertificate +public import LeanPool.Sundogcert.DecodingNPHard +public import LeanPool.Sundogcert.MatchingNPHard +public import LeanPool.Sundogcert.SATNPHard +public import LeanPool.Sundogcert.VarWheel +public import LeanPool.Sundogcert.ClauseGadget +public import LeanPool.Sundogcert.SATReduction +public import LeanPool.Sundogcert.ThreeDMReindex +public import LeanPool.Sundogcert.SATReductionIncidence +public import LeanPool.Sundogcert.SATReductionReverse +public import LeanPool.Sundogcert.SATReductionForward +public import LeanPool.Sundogcert.SATReductionMain /-! # Sundog certificates @@ -34,3 +35,5 @@ Main declarations: `Sundog.SATReductionMain.sat_iff_decodes`, `Sundog.Certificat Tags: complexity, coding-theory, np-hardness MSC: 68Q17, 94B35 -/ + +@[expose] public section diff --git a/LeanPool/Sundogcert/CertWall.lean b/LeanPool/Sundogcert/CertWall.lean index c1061bf15c..73c1bcc7ac 100644 --- a/LeanPool/Sundogcert/CertWall.lean +++ b/LeanPool/Sundogcert/CertWall.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import LeanPool.Sundogcert.Certificate -import LeanPool.Sundogcert.Looseness +public import LeanPool.Sundogcert.Looseness +import Mathlib.LinearAlgebra.Matrix.NonsingularInverse /-! Sundogcert/CertWall.lean — TYPING the imported hardness wall as a CONDITIONAL theorem. @@ -50,6 +51,8 @@ import LeanPool.Sundogcert.Looseness `colWeightLb` only — never a claim about the hardness of decoding itself. -/ +@[expose] public section + open Matrix namespace Sundog.Certificate.CertWall diff --git a/LeanPool/Sundogcert/Certificate.lean b/LeanPool/Sundogcert/Certificate.lean index 1f8d4f466e..dbd36e4dc3 100644 --- a/LeanPool/Sundogcert/Certificate.lean +++ b/LeanPool/Sundogcert/Certificate.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import Mathlib.Data.Matrix.Mul -- Matrix, mulVec/vecMul, the `*ᵥ` / `ᵥ*` notation -import Mathlib.InformationTheory.Hamming -- hammingNorm (the error weight) -import Mathlib.Data.Fintype.BigOperators -- Fintype.card_fun (for secret_bits_lost) -import Mathlib.Algebra.Order.BigOperators.Group.Finset -- card_biUnion_le_card_mul (column-weight) +public import Mathlib.Data.Matrix.Mul -- Matrix, mulVec/vecMul, the `*ᵥ` / `ᵥ*` notation +public import Mathlib.InformationTheory.Hamming -- hammingNorm (the error weight) /-! Sundog syndrome certificate — soundness + lossiness core (Lean 4 / mathlib v4.30.0) @@ -20,6 +19,8 @@ import Mathlib.Algebra.Order.BigOperators.Group.Finset -- card_biUnion_le_card_ TRUST SURFACE = the `Scheme` fields (esp. `hHG`) + `Safe`; everything else is machine-checked. -/ +@[expose] public section + open Matrix namespace Sundog.Certificate diff --git a/LeanPool/Sundogcert/CheckCost.lean b/LeanPool/Sundogcert/CheckCost.lean index f20244ed43..a20f312726 100644 --- a/LeanPool/Sundogcert/CheckCost.lean +++ b/LeanPool/Sundogcert/CheckCost.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import LeanPool.Sundogcert.Certificate +public import LeanPool.Sundogcert.Certificate /-! Sundog syndrome certificate — the CHECK-COST theorem (Lean 4 / mathlib v4.30.0) @@ -31,6 +32,8 @@ import LeanPool.Sundogcert.Certificate Given that audited model, the polynomial bound is a THEOREM (kernel-checked, `sorry`-free). -/ +@[expose] public section + open Matrix namespace Sundog.Certificate diff --git a/LeanPool/Sundogcert/ClauseGadget.lean b/LeanPool/Sundogcert/ClauseGadget.lean index ce6a2648cb..f635470e9c 100644 --- a/LeanPool/Sundogcert/ClauseGadget.lean +++ b/LeanPool/Sundogcert/ClauseGadget.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import LeanPool.Sundogcert.SATNPHard -import LeanPool.Sundogcert.VarWheel -import Mathlib.Data.Fin.VecNotation +public import LeanPool.Sundogcert.SATNPHard +public import LeanPool.Sundogcert.VarWheel /-! Sundogcert/ClauseGadget.lean — MILESTONE 3 of the `3SAT ≤ 3DM` marathon. @@ -55,6 +55,8 @@ import Mathlib.Data.Fin.VecNotation AXIOM-CLEAN (no `Lean.ofReduceBool`; we use `decide`, never `native_decide`). -/ +@[expose] public section + open Sundog.SATNPHard Sundog.VarWheel namespace Sundog.ClauseGadget diff --git a/LeanPool/Sundogcert/DecodingNPHard.lean b/LeanPool/Sundogcert/DecodingNPHard.lean index 8a0cea086b..2c5e8bf458 100644 --- a/LeanPool/Sundogcert/DecodingNPHard.lean +++ b/LeanPool/Sundogcert/DecodingNPHard.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import Mathlib.Data.Matrix.Mul -import Mathlib.InformationTheory.Hamming +public import Mathlib.Data.Matrix.Mul +public import Mathlib.InformationTheory.Hamming +public import Mathlib.Data.ZMod.Defs import Mathlib.Data.ZMod.Basic -import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.Algebra.BigOperators.Group.Finset.Sigma -import LeanPool.Sundogcert.Certificate /-! Sundogcert/DecodingNPHard.lean — the DEDUCTIVE CORE of NP-hardness of SYNDROME DECODING @@ -59,6 +58,8 @@ import LeanPool.Sundogcert.Certificate over GF(2). The connection lemma makes the odd-cover ⇔ syndrome=allOnes equivalence explicit. -/ +@[expose] public section + open Matrix Finset namespace Sundog.DecodingNPHard diff --git a/LeanPool/Sundogcert/Degradation.lean b/LeanPool/Sundogcert/Degradation.lean index dc2ddffc57..e775490fe0 100644 --- a/LeanPool/Sundogcert/Degradation.lean +++ b/LeanPool/Sundogcert/Degradation.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import LeanPool.Sundogcert.Looseness -import Mathlib.LinearAlgebra.Matrix.Block -import Mathlib.Data.Fintype.Fin +public import Mathlib.LinearAlgebra.Matrix.Block +public import LeanPool.Sundogcert.Scaling /-! Sundogcert/Degradation.lean — the DEGRADATION CURVE of the column-weight bound vs density. @@ -33,13 +33,14 @@ import Mathlib.Data.Fintype.Fin Safe-equivalence for all c), reusing the Looseness invertibility approach. -/ +@[expose] public section + open Matrix namespace Sundog.Certificate.Degradation open Sundog.Certificate open Sundog.Certificate.Scaling -open Sundog.Certificate.Looseness variable {F : Type*} [Field F] [Fintype F] [DecidableEq F] diff --git a/LeanPool/Sundogcert/Instance.lean b/LeanPool/Sundogcert/Instance.lean index ccf806229b..94e07b1f5b 100644 --- a/LeanPool/Sundogcert/Instance.lean +++ b/LeanPool/Sundogcert/Instance.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import LeanPool.Sundogcert.Certificate -import Mathlib.Algebra.Field.ZMod -- Field (ZMod 2) via Fact (Nat.Prime 2) -import Mathlib.LinearAlgebra.Matrix.Notation -- !![; ] matrix literal notation +public import LeanPool.Sundogcert.Certificate +public import Mathlib.Algebra.Field.ZMod -- Field (ZMod 2) via Fact (Nat.Prime 2) +public import Mathlib.LinearAlgebra.Matrix.Notation -- !![; ] matrix literal notation /-! Sundogcert/Instance.lean — the concrete executable ZMod 2 instance. @@ -22,6 +23,8 @@ import Mathlib.LinearAlgebra.Matrix.Notation -- !![; ] matrix literal notation NOT general tightness. -/ +@[expose] public section + open Matrix namespace Sundog.Certificate.Instance diff --git a/LeanPool/Sundogcert/Looseness.lean b/LeanPool/Sundogcert/Looseness.lean index 3c0539d533..d20e7933c1 100644 --- a/LeanPool/Sundogcert/Looseness.lean +++ b/LeanPool/Sundogcert/Looseness.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import LeanPool.Sundogcert.Scaling -import Mathlib.LinearAlgebra.Matrix.NonsingularInverse +public import LeanPool.Sundogcert.Scaling +public import Mathlib.LinearAlgebra.Matrix.NonsingularInverse /-! Sundogcert/Looseness.lean — the BASIS-DEPENDENCE / looseness demonstration. @@ -32,6 +33,8 @@ import Mathlib.LinearAlgebra.Matrix.NonsingularInverse weight `m` YET `colWeightLb (denseScheme m) = 0`. Anti-scaling-law: gap = m. -/ +@[expose] public section + open Matrix namespace Sundog.Certificate.Looseness diff --git a/LeanPool/Sundogcert/MatchingNPHard.lean b/LeanPool/Sundogcert/MatchingNPHard.lean index 931278e946..59162305bd 100644 --- a/LeanPool/Sundogcert/MatchingNPHard.lean +++ b/LeanPool/Sundogcert/MatchingNPHard.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import LeanPool.Sundogcert.DecodingNPHard +public import LeanPool.Sundogcert.DecodingNPHard /-! Sundogcert/MatchingNPHard.lean — the KARP-LAYER EXTENSION of the formalized hardness chain: @@ -42,6 +43,8 @@ import LeanPool.Sundogcert.DecodingNPHard `3SAT ≤ 3DM` that would discharge 3DM's hardness internally. -/ +@[expose] public section + open Finset namespace Sundog.MatchingNPHard diff --git a/LeanPool/Sundogcert/RSCertificate.lean b/LeanPool/Sundogcert/RSCertificate.lean index 9d0dd04395..06ab2aaa97 100644 --- a/LeanPool/Sundogcert/RSCertificate.lean +++ b/LeanPool/Sundogcert/RSCertificate.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module +public import Mathlib.LinearAlgebra.Vandermonde import Mathlib.Algebra.Polynomial.Roots -import Mathlib.LinearAlgebra.Vandermonde -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Linarith /-! # The Reed–Solomon evaluation certificate — the interpolation-dual of the syndrome certificate @@ -42,6 +41,8 @@ there is zero) + `det_vandermonde_ne_zero_iff`. A field discharges `[CommRing]+[ * `Polynomial.eq_of_natDegree_lt_card_of_eval_eq`, `Matrix.det_vandermonde_ne_zero_iff`. -/ +@[expose] public section + namespace Sundog.RSCertificate open Polynomial diff --git a/LeanPool/Sundogcert/SATNPHard.lean b/LeanPool/Sundogcert/SATNPHard.lean index d865d2ce58..716c9d7019 100644 --- a/LeanPool/Sundogcert/SATNPHard.lean +++ b/LeanPool/Sundogcert/SATNPHard.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import Mathlib.Data.Fintype.Pi -import Mathlib.Data.Fintype.Prod -import Mathlib.Data.Fintype.Sigma -import Mathlib.Data.Fin.VecNotation +public import Mathlib.Data.Fintype.Pi +public import Mathlib.Data.Fin.VecNotation /-! Sundogcert/SATNPHard.lean — MILESTONE 1 of the `3SAT ≤ 3DM` marathon. @@ -42,6 +41,8 @@ import Mathlib.Data.Fin.VecNotation and its correctness, is the work to come — milestones 2+ of `3SAT ≤ 3DM ≤ X3C ≤ Decodes`. -/ +@[expose] public section + namespace Sundog.SATNPHard /-- A literal: a variable index plus a sign (`true` = positive `xᵢ`, `false` = negated). -/ diff --git a/LeanPool/Sundogcert/SATReduction.lean b/LeanPool/Sundogcert/SATReduction.lean index 908a761f11..50457f315e 100644 --- a/LeanPool/Sundogcert/SATReduction.lean +++ b/LeanPool/Sundogcert/SATReduction.lean @@ -3,15 +3,10 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import LeanPool.Sundogcert.SATNPHard -import LeanPool.Sundogcert.VarWheel -import LeanPool.Sundogcert.ClauseGadget -import LeanPool.Sundogcert.MatchingNPHard -import Mathlib.Data.Fintype.Sum -import Mathlib.Data.Fintype.Prod -import Mathlib.Data.Fintype.Pi -import Mathlib.Data.Fintype.EquivFin +public import LeanPool.Sundogcert.SATNPHard +public import LeanPool.Sundogcert.MatchingNPHard /-! Sundogcert/SATReduction.lean — MILESTONE 4 of the `3SAT ≤ 3DM` marathon: the GLOBAL ASSEMBLY @@ -69,7 +64,9 @@ import Mathlib.Data.Fintype.EquivFin `[propext, Classical.choice, Quot.sound]` on the four audited results. -/ -open Sundog.SATNPHard Sundog.VarWheel Sundog.ClauseGadget Sundog.MatchingNPHard +@[expose] public section + +open Sundog.SATNPHard Sundog.MatchingNPHard namespace Sundog.SATReduction diff --git a/LeanPool/Sundogcert/SATReductionForward.lean b/LeanPool/Sundogcert/SATReductionForward.lean index cc96966cfe..e5f915382f 100644 --- a/LeanPool/Sundogcert/SATReductionForward.lean +++ b/LeanPool/Sundogcert/SATReductionForward.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import LeanPool.Sundogcert.SATReductionIncidence -import LeanPool.Sundogcert.ThreeDMReindex +public import LeanPool.Sundogcert.SATReductionIncidence +public import LeanPool.Sundogcert.ThreeDMReindex /-! Sundogcert/SATReductionForward.lean — MILESTONE 8 of the `3SAT ≤ 3DM` marathon: the FORWARD @@ -52,7 +53,9 @@ import LeanPool.Sundogcert.ThreeDMReindex Axiom-clean (no `native_decide`, no `decide`). Expect `[propext, Classical.choice, Quot.sound]`. -/ -open Sundog.SATReduction Sundog.SATNPHard Sundog.VarWheel +@[expose] public section + +open Sundog.SATReduction Sundog.SATNPHard open Sundog.SATReductionIncidence Sundog.ThreeDMReindex namespace Sundog.SATReductionForward diff --git a/LeanPool/Sundogcert/SATReductionIncidence.lean b/LeanPool/Sundogcert/SATReductionIncidence.lean index 1736339e92..a257a642f1 100644 --- a/LeanPool/Sundogcert/SATReductionIncidence.lean +++ b/LeanPool/Sundogcert/SATReductionIncidence.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import LeanPool.Sundogcert.SATReduction +public import LeanPool.Sundogcert.SATReduction /-! Sundogcert/SATReductionIncidence.lean — MILESTONE 6 of the `3SAT ≤ 3DM` marathon: the INCIDENCE @@ -37,6 +38,8 @@ import LeanPool.Sundogcert.SATReduction Axiom-clean (no `decide`, no `native_decide`). Expect `[propext, Quot.sound]` subsets on all six. -/ +@[expose] public section + open Sundog.SATReduction Sundog.SATNPHard namespace Sundog.SATReductionIncidence diff --git a/LeanPool/Sundogcert/SATReductionMain.lean b/LeanPool/Sundogcert/SATReductionMain.lean index 46c15564ab..14aa37165d 100644 --- a/LeanPool/Sundogcert/SATReductionMain.lean +++ b/LeanPool/Sundogcert/SATReductionMain.lean @@ -3,13 +3,12 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module +public import LeanPool.Sundogcert.SATReduction +public import LeanPool.Sundogcert.ThreeDMReindex import LeanPool.Sundogcert.SATReductionForward import LeanPool.Sundogcert.SATReductionReverse -import LeanPool.Sundogcert.SATReduction -import LeanPool.Sundogcert.ThreeDMReindex -import LeanPool.Sundogcert.MatchingNPHard -import LeanPool.Sundogcert.DecodingNPHard /-! Sundogcert/SATReductionMain.lean — MILESTONE 9 (CAPSTONE) of the `3SAT ≤ 3DM` marathon: the @@ -53,6 +52,8 @@ import LeanPool.Sundogcert.DecodingNPHard `[propext, Classical.choice, Quot.sound]` on each audited result. -/ +@[expose] public section + open Sundog.SATReduction Sundog.SATNPHard Sundog.SATReductionForward open Sundog.SATReductionReverse Sundog.ThreeDMReindex Sundog.MatchingNPHard diff --git a/LeanPool/Sundogcert/SATReductionReverse.lean b/LeanPool/Sundogcert/SATReductionReverse.lean index 48fac1bc1b..c021071b98 100644 --- a/LeanPool/Sundogcert/SATReductionReverse.lean +++ b/LeanPool/Sundogcert/SATReductionReverse.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module +public import LeanPool.Sundogcert.ThreeDMReindex +public import LeanPool.Sundogcert.SATReduction import LeanPool.Sundogcert.SATReductionIncidence -import LeanPool.Sundogcert.ThreeDMReindex +import LeanPool.Sundogcert.VarWheel /-! Sundogcert/SATReductionReverse.lean — MILESTONE 7 of the `3SAT ≤ 3DM` marathon: the REVERSE @@ -49,6 +52,8 @@ import LeanPool.Sundogcert.ThreeDMReindex Expect `[propext, Classical.choice, Quot.sound]` on both `reverse` and the helper. -/ +@[expose] public section + open Sundog.SATReduction Sundog.SATNPHard Sundog.VarWheel open Sundog.SATReductionIncidence Sundog.ThreeDMReindex diff --git a/LeanPool/Sundogcert/Scaling.lean b/LeanPool/Sundogcert/Scaling.lean index f9105be3b7..b9eac66c2d 100644 --- a/LeanPool/Sundogcert/Scaling.lean +++ b/LeanPool/Sundogcert/Scaling.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import LeanPool.Sundogcert.Certificate -import Mathlib.Algebra.Field.ZMod -import Mathlib.LinearAlgebra.Matrix.Notation +public import LeanPool.Sundogcert.Certificate +public import Mathlib.Algebra.Field.ZMod +import Mathlib.Tactic.ContinuousFunctionalCalculus /-! Sundogcert/Scaling.lean — the [2m, m] projection-code SCALING family. @@ -27,6 +28,8 @@ import Mathlib.LinearAlgebra.Matrix.Notation family demonstrates SOUNDNESS and linear-in-n τ reach, NOT general tightness. -/ +@[expose] public section + open Matrix namespace Sundog.Certificate.Scaling diff --git a/LeanPool/Sundogcert/ThreeDMReindex.lean b/LeanPool/Sundogcert/ThreeDMReindex.lean index 82ef0faccd..5d6ee7a83a 100644 --- a/LeanPool/Sundogcert/ThreeDMReindex.lean +++ b/LeanPool/Sundogcert/ThreeDMReindex.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import LeanPool.Sundogcert.MatchingNPHard -import Mathlib.Data.Fintype.EquivFin +public import LeanPool.Sundogcert.MatchingNPHard /-! Sundogcert/ThreeDMReindex.lean — MILESTONE 5 of the `3SAT ≤ 3DM` marathon: the GENERIC @@ -40,6 +40,8 @@ import Mathlib.Data.Fintype.EquivFin Axiom-clean (`decide`/`native_decide` never used). Expect the standard classical trio. -/ +@[expose] public section + open Finset open Sundog.MatchingNPHard diff --git a/LeanPool/Sundogcert/VarWheel.lean b/LeanPool/Sundogcert/VarWheel.lean index d4e7afbf1e..af48150c53 100644 --- a/LeanPool/Sundogcert/VarWheel.lean +++ b/LeanPool/Sundogcert/VarWheel.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Humiliati. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Humiliati -/ +module -import Mathlib.Data.Fintype.Pi -import Mathlib.Data.Fin.Basic +public import Mathlib.Data.Fintype.Pi + +public import Mathlib.Basic.Logic.Basic +public import Aesop.BuiltinRules +public import Mathlib.Algebra.Group.Nat.Defs +public import Mathlib.Tactic.ToDual import Mathlib.Data.Fin.VecNotation -import Mathlib.Algebra.Group.Fin.Basic -import Mathlib.Basic.Logic.Basic +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Attr.Core +import Mathlib.Tactic.SetLike /-! Sundogcert/VarWheel.lean — MILESTONE 2 of the `3SAT ≤ 3DM` marathon. @@ -50,6 +56,8 @@ import Mathlib.Basic.Logic.Basic by kernel `decide` — AXIOM-CLEAN (no `Lean.ofReduceBool`; we use `decide`, never `native_decide`). -/ +@[expose] public section + namespace Sundog.VarWheel variable {m : ℕ} [NeZero m] diff --git a/LeanPool/SyntheticEuclid4.lean b/LeanPool/SyntheticEuclid4.lean index 4f706779b5..6b44e5e18c 100644 --- a/LeanPool/SyntheticEuclid4.lean +++ b/LeanPool/SyntheticEuclid4.lean @@ -3,7 +3,15 @@ Copyright (c) 2026 André Hernandez-Espiet, Vladimir Sedlacek. All rights reserv Released under Apache 2.0 license as described in the file LICENSE. Authors: André Hernandez-Espiet, Vladimir Sedlacek -/ -import LeanPool.SyntheticEuclid4.SyntheticEuclid4 +module + +public import LeanPool.SyntheticEuclid4.SyntheticEuclid4 +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Synthetic Euclidean geometry: Euclid's Elements Book I @@ -16,6 +24,8 @@ Tags: euclidean-geometry, synthetic-geometry, pythagorean-theorem MSC: 51M04 -/ +@[expose] public section + /-! A formalization of Book I of Euclid's *Elements* in Lean 4, built on Avigad, Dean, and Mumma's axiomatic system for synthetic geometry (incidence, diff --git a/LeanPool/SyntheticEuclid4/Axioms.lean b/LeanPool/SyntheticEuclid4/Axioms.lean index ae83018aa8..d321d7efc2 100644 --- a/LeanPool/SyntheticEuclid4/Axioms.lean +++ b/LeanPool/SyntheticEuclid4/Axioms.lean @@ -3,13 +3,19 @@ Copyright (c) 2026 André Hernandez-Espiet, Vladimir Sedlacek. All rights reserv Released under Apache 2.0 license as described in the file LICENSE. Authors: André Hernandez-Espiet, Vladimir Sedlacek -/ -import Mathlib.Basic.Real.Basic -import Mathlib.Data.Set.Finite.Basic +module + +public import Mathlib.Basic.Real.Basic +public import Mathlib.Basic.Finite.Defs +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.SetLike /-! Axioms of synthetic geometry -/ +@[expose] public section + /-! Universes for points lines and circles-/ universe u diff --git a/LeanPool/SyntheticEuclid4/PermTactics.lean b/LeanPool/SyntheticEuclid4/PermTactics.lean index 03feeaf482..2ec2730f34 100644 --- a/LeanPool/SyntheticEuclid4/PermTactics.lean +++ b/LeanPool/SyntheticEuclid4/PermTactics.lean @@ -3,7 +3,25 @@ Copyright (c) 2026 André Hernandez-Espiet, Vladimir Sedlacek. All rights reserv Released under Apache 2.0 license as described in the file LICENSE. Authors: André Hernandez-Espiet, Vladimir Sedlacek -/ -import LeanPool.SyntheticEuclid4.Tactics +module + +public meta import LeanPool.SyntheticEuclid4.Tactics + +public meta import Aesop.BuiltinRules +public meta import Lean.Elab.Tactic.Conv.Basic +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.Simps +public meta import Mathlib.Tactic.ToAdditive +public meta import Mathlib.Tactic.ToDual +import Lean.Elab.Tactic.RCases +import Mathlib.Algebra.Order.AbsoluteValue.Basic +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! The permutation tactics `perm`, `perma`, and `linperm` for the symmetric area @@ -12,8 +30,10 @@ tactics. These normalize the point arguments of the geometric primitives using the symmetry lemmas from `Tactics`. -/ -open SyntheticEuclid4 -open IncidenceGeometry +public meta section + +open SyntheticEuclid4 IncidenceGeometry + namespace Lean.Elab.Tactic diff --git a/LeanPool/SyntheticEuclid4/SyntheticEuclid4.lean b/LeanPool/SyntheticEuclid4/SyntheticEuclid4.lean index abaf4bd147..9b0328183f 100644 --- a/LeanPool/SyntheticEuclid4/SyntheticEuclid4.lean +++ b/LeanPool/SyntheticEuclid4/SyntheticEuclid4.lean @@ -3,8 +3,17 @@ Copyright (c) 2026 André Hernandez-Espiet, Vladimir Sedlacek. All rights reserv Released under Apache 2.0 license as described in the file LICENSE. Authors: André Hernandez-Espiet, Vladimir Sedlacek -/ +module + +public import LeanPool.SyntheticEuclid4.Axioms import LeanPool.SyntheticEuclid4.PermTactics -import Mathlib.Tactic.WLOG +import LeanPool.SyntheticEuclid4.Tactics +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.Set.Finite.Basic +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Synthetic Geometry, Euclid's Elements Book I using Avigad Axioms @@ -12,6 +21,8 @@ In this file we prove the Pythagorean theorem (Euclid I.47) using Avigad's axiom geometry. -/ +@[expose] public section + namespace SyntheticEuclid4 variable [I : IncidenceGeometry] {a a1 a2 b b1 b2 c d e f g h i j k l x y : diff --git a/LeanPool/SyntheticEuclid4/Tactics.lean b/LeanPool/SyntheticEuclid4/Tactics.lean index 66ed3e971e..554c9914ac 100644 --- a/LeanPool/SyntheticEuclid4/Tactics.lean +++ b/LeanPool/SyntheticEuclid4/Tactics.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 André Hernandez-Espiet, Vladimir Sedlacek. All rights reserv Released under Apache 2.0 license as described in the file LICENSE. Authors: André Hernandez-Espiet, Vladimir Sedlacek -/ -import LeanPool.SyntheticEuclid4.Axioms -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Tauto -import Mathlib.Tactic.Push -import Mathlib.Tactic.ByContra +module + +public import LeanPool.SyntheticEuclid4.Axioms +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! Symmetry lemmas for the permutation tactics. These rewrite the geometric @@ -17,6 +21,8 @@ the building blocks for the `perm`/`perma`/`linperm` tactics defined in `PermTactics`. -/ +@[expose] public section + namespace SyntheticEuclid4 open IncidenceGeometry diff --git a/LeanPool/ThreeGap.lean b/LeanPool/ThreeGap.lean index 2accbcd999..c3186c3322 100644 --- a/LeanPool/ThreeGap.lean +++ b/LeanPool/ThreeGap.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module -import LeanPool.ThreeGap.EuclideanFiveDistanceSharpArith -import LeanPool.ThreeGap.LinftyFiveDistanceSharpArith -import LeanPool.ThreeGap.LinftyThreeTorusNine +public import LeanPool.ThreeGap.EuclideanFiveDistanceSharpArith +public import LeanPool.ThreeGap.LinftyFiveDistanceSharpArith +public import LeanPool.ThreeGap.LinftyThreeTorusNine +import Mathlib.Tactic.Positivity.Finset /-! # Sharp Five-Distance and Sup-Norm Gap Theorems @@ -18,3 +20,5 @@ Main declarations: `ThreeGap.LinftyRecords3.nine_attained` Tags: number-theory, kronecker-sequences, three-gap MSC: 11J71 -/ + +@[expose] public section diff --git a/LeanPool/ThreeGap/ChevallierCount.lean b/LeanPool/ThreeGap/ChevallierCount.lean index 5a92e0c234..ed2987c285 100644 --- a/LeanPool/ThreeGap/ChevallierCount.lean +++ b/LeanPool/ThreeGap/ChevallierCount.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module -import LeanPool.ThreeGap.ChevallierGapBound -import Mathlib.Order.Interval.Finset.Nat -import Mathlib.Data.Finset.Max +public import LeanPool.ThreeGap.ChevallierGapBound +public import Mathlib.Order.Interval.Finset.Nat +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Chevallier's Lemma: the gap count is `≤ n − m + 1` (Chevallier 1996, Lemma 1.3) @@ -33,6 +38,8 @@ This file isolates the count as a pure statement about a cost function `r : ℕ Axiom-clean. -/ +@[expose] public section + namespace ThreeGap.Chevallier variable (r : ℕ → ℝ) diff --git a/LeanPool/ThreeGap/ChevallierGapBound.lean b/LeanPool/ThreeGap/ChevallierGapBound.lean index 970c476860..83bd105cee 100644 --- a/LeanPool/ThreeGap/ChevallierGapBound.lean +++ b/LeanPool/ThreeGap/ChevallierGapBound.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module -import Mathlib.Basic.Real.Basic -import Mathlib.Data.Nat.Find -import Mathlib.Order.Monotone.Basic -import Mathlib.Tactic.Linarith +public import Mathlib.Basic.Real.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # The combinatorial core of the higher-dimensional three-distance bound (Shutov / Chevallier) @@ -38,6 +41,8 @@ and the growth inequality) are the substantial geometric pieces still to formali Axiom-clean; elementary. -/ +@[expose] public section + namespace ThreeGap.Chevallier /-! ## The best-simultaneous-approximation denominators (Shutov, Sequence 2) diff --git a/LeanPool/ThreeGap/DeltaCost.lean b/LeanPool/ThreeGap/DeltaCost.lean index 448f6aa94b..924a918755 100644 --- a/LeanPool/ThreeGap/DeltaCost.lean +++ b/LeanPool/ThreeGap/DeltaCost.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module -import LeanPool.ThreeGap.ChevallierCount +public import LeanPool.ThreeGap.ChevallierCount +public import LeanPool.ThreeGap.SimultaneousApprox import LeanPool.ThreeGap.SupNormGrowth +import Mathlib.Data.EReal.Operations +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The sup-norm defect cost: growth of its record denominators is *unconditional* @@ -39,6 +45,8 @@ distance), handled separately. Axiom-clean. -/ +@[expose] public section + namespace ThreeGap.DeltaCost open ThreeGap.SimApprox ThreeGap.Chevallier diff --git a/LeanPool/ThreeGap/EuclideanAngle.lean b/LeanPool/ThreeGap/EuclideanAngle.lean index 84494792b3..378eb5007a 100644 --- a/LeanPool/ThreeGap/EuclideanAngle.lean +++ b/LeanPool/ThreeGap/EuclideanAngle.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module -import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic -import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse +public import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic /-! # The separation → angle crux for the Euclidean growth inequality @@ -40,6 +40,8 @@ This file isolates the fully-proven angular crux; the packing count on top of it geometric step (sharp form = Romanov). Axiom-clean; elementary. -/ +@[expose] public section + namespace ThreeGap.EuclideanAngle open RealInnerProductSpace diff --git a/LeanPool/ThreeGap/EuclideanDefect.lean b/LeanPool/ThreeGap/EuclideanDefect.lean index c2f20a791d..889f1a6fcd 100644 --- a/LeanPool/ThreeGap/EuclideanDefect.lean +++ b/LeanPool/ThreeGap/EuclideanDefect.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module -import LeanPool.ThreeGap.EuclideanGrowthFive -import LeanPool.ThreeGap.DeltaCost +public import LeanPool.ThreeGap.EuclideanGrowth +import Mathlib.Tactic.Positivity.Finset /-! # The Euclidean approximation defect is attained (the nearest lattice point exists) @@ -22,6 +23,8 @@ over that finite set realises the infimum. `deltaN_euclNorm_attained`: `∃ p, euclNorm n (rem α q p) = δ_q`. Axiom-clean. -/ +@[expose] public section + namespace ThreeGap.SimApprox open scoped BigOperators diff --git a/LeanPool/ThreeGap/EuclideanFiveDistanceSharp.lean b/LeanPool/ThreeGap/EuclideanFiveDistanceSharp.lean index db1484e126..8df90b508f 100644 --- a/LeanPool/ThreeGap/EuclideanFiveDistanceSharp.lean +++ b/LeanPool/ThreeGap/EuclideanFiveDistanceSharp.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ -import LeanPool.ThreeGap.EuclideanRecords -import LeanPool.ThreeGap.EuclideanNN +module + +public import LeanPool.ThreeGap.EuclideanRecords +public import LeanPool.ThreeGap.EuclideanNN +import LeanPool.ThreeGap.EuclideanDefect +import LeanPool.ThreeGap.EuclideanGrowthFive import LeanPool.ThreeGap.EuclideanGrowthFour +import Mathlib.Tactic.Positivity.Finset /-! # The sharp Euclidean five-distance theorem `g₂ ≤ 5` @@ -20,10 +25,12 @@ replacing `2 qₙ ≤ qₙ₊₅`; feeding it through Chevallier's count (`cheva yields `≤ 4 + 1 = 5` distances. Axiom-clean. -/ +@[expose] public section + namespace ThreeGap.EuclideanRecords open scoped Real -open ThreeGap.SimApprox ThreeGap.Chevallier ThreeGap.DeltaCost ThreeGap.SimDirichlet +open ThreeGap.SimApprox ThreeGap.Chevallier /-- **The sharp Euclidean growth `2 qₖ ≤ qₖ₊₄` for the record denominators (Haynes–Marklof).** -/ theorem bestDenom_euclidean_growth_four (α : Fin 2 → ℝ) {k₀ : Fin 2} (hirr : Irrational (α k₀)) diff --git a/LeanPool/ThreeGap/EuclideanFiveDistanceSharpArith.lean b/LeanPool/ThreeGap/EuclideanFiveDistanceSharpArith.lean index f1ff4f9bae..edfc19b19d 100644 --- a/LeanPool/ThreeGap/EuclideanFiveDistanceSharpArith.lean +++ b/LeanPool/ThreeGap/EuclideanFiveDistanceSharpArith.lean @@ -3,7 +3,12 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module + +public import LeanPool.ThreeGap.EuclideanNN import LeanPool.ThreeGap.EuclideanFiveDistanceSharp +import LeanPool.ThreeGap.EuclideanGrowthFive +import Mathlib.Tactic.Positivity.Finset /-! # Toward arithmetic sharpness of `g₂ ≤ 5`: five distances are attained (dynamics-free route) @@ -53,6 +58,8 @@ with record minima at `d = 1, 7, 8, 10, 11` (values `73 > 68 > 61 > 50 > 17`). T `five_le_card_image_of_strictAnti_chain` below is the foundational R3 step (axiom-clean). -/ +@[expose] public section + namespace ThreeGap.EuclideanRecords open scoped Real diff --git a/LeanPool/ThreeGap/EuclideanGrowth.lean b/LeanPool/ThreeGap/EuclideanGrowth.lean index 3f5367d4b6..a3abd78f96 100644 --- a/LeanPool/ThreeGap/EuclideanGrowth.lean +++ b/LeanPool/ThreeGap/EuclideanGrowth.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module +public import Mathlib.Analysis.InnerProductSpace.PiL2 +public import LeanPool.ThreeGap.SimultaneousApprox import LeanPool.ThreeGap.ModTwoGrowth -import Mathlib.Analysis.InnerProductSpace.PiL2 +import Mathlib.Tactic.Positivity.Finset /-! # The Euclidean growth inequality (instantiating the any-norm mod-2 theorem) @@ -23,6 +26,8 @@ homogeneity come for free from that being a (continuous) linear equivalence. Axiom-clean. -/ +@[expose] public section + namespace ThreeGap.SimApprox variable {d : ℕ} diff --git a/LeanPool/ThreeGap/EuclideanGrowthFive.lean b/LeanPool/ThreeGap/EuclideanGrowthFive.lean index 10e0df41b3..afe3197c86 100644 --- a/LeanPool/ThreeGap/EuclideanGrowthFive.lean +++ b/LeanPool/ThreeGap/EuclideanGrowthFive.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module +public import LeanPool.ThreeGap.EuclideanGrowth import LeanPool.ThreeGap.EuclideanAngle import LeanPool.ThreeGap.EuclideanPacking -import LeanPool.ThreeGap.EuclideanGrowth +import Mathlib.Tactic.Positivity.Finset /-! # The Euclidean growth inequality `2 qₙ ≤ qₙ₊₅` (`K = 5`) via the planar packing count @@ -36,6 +38,8 @@ sequence remaining instantiation step. Axiom-clean. -/ +@[expose] public section + namespace ThreeGap.SimApprox open scoped Real diff --git a/LeanPool/ThreeGap/EuclideanGrowthFour.lean b/LeanPool/ThreeGap/EuclideanGrowthFour.lean index d3f336b72f..f1267aad9f 100644 --- a/LeanPool/ThreeGap/EuclideanGrowthFour.lean +++ b/LeanPool/ThreeGap/EuclideanGrowthFour.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module + +public import LeanPool.ThreeGap.EuclideanGrowth +import LeanPool.ThreeGap.EuclideanAngle +import LeanPool.ThreeGap.EuclideanGrowthFive +import LeanPool.ThreeGap.FiveDistance import LeanPool.ThreeGap.FiveDistanceHM +import Mathlib.Tactic.Positivity.Finset /-! # The sharp Euclidean growth inequality `2 qₙ ≤ qₙ₊₄` (`K = 4`) via Haynes–Marklof Theorem 8 @@ -19,10 +26,11 @@ shortest record `r(qₙ₊₄)` cannot lie in the open cone of two others, becau (`hbest`, the index difference lies in `(0, qₖ)`) forces `‖r(qₙ₊₄) − vⱼ − vₖ‖ > ‖vₖ‖`. Axiom-clean. -/ +@[expose] public section + namespace ThreeGap.SimApprox open scoped Real -open ThreeGap.EuclideanPacking variable {n : ℕ} diff --git a/LeanPool/ThreeGap/EuclideanNN.lean b/LeanPool/ThreeGap/EuclideanNN.lean index 5765cb6575..439d12459f 100644 --- a/LeanPool/ThreeGap/EuclideanNN.lean +++ b/LeanPool/ThreeGap/EuclideanNN.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module +public import LeanPool.ThreeGap.ChevallierCount +public import LeanPool.ThreeGap.EuclideanGrowth +public import Mathlib.NumberTheory.Real.Irrational +import LeanPool.ThreeGap.EuclideanGrowthFive import LeanPool.ThreeGap.EuclideanRecords +import Mathlib.Tactic.Positivity.Finset /-! # The Euclidean isometry reduction: `gapVal` is the Euclidean nearest-neighbour distance @@ -21,6 +27,8 @@ it is stated here generically for any symmetric `c : ℤ → ℝ` and instantiat `c = deltaN (euclNorm 2) α` (symmetric by `deltaN_neg`). Axiom-clean. -/ +@[expose] public section + namespace ThreeGap.EuclideanRecords open ThreeGap.Chevallier ThreeGap.SimApprox diff --git a/LeanPool/ThreeGap/EuclideanPacking.lean b/LeanPool/ThreeGap/EuclideanPacking.lean index cea6e8bf9c..70b48dd503 100644 --- a/LeanPool/ThreeGap/EuclideanPacking.lean +++ b/LeanPool/ThreeGap/EuclideanPacking.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module -import Mathlib.Geometry.Euclidean.Angle.Oriented.Basic +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle +public import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic +public import Mathlib.LinearAlgebra.Orientation import Mathlib.Data.Fin.Tuple.Sort +import Mathlib.Geometry.Euclidean.Angle.Oriented.Basic /-! # Planar packing: at most 5 vectors pairwise more than 60° apart @@ -33,6 +37,8 @@ argument. Axiom-clean; elementary. -/ +@[expose] public section + namespace ThreeGap.EuclideanPacking open Real InnerProductGeometry diff --git a/LeanPool/ThreeGap/EuclideanRecords.lean b/LeanPool/ThreeGap/EuclideanRecords.lean index 73d677e0e5..42dfa3c2ca 100644 --- a/LeanPool/ThreeGap/EuclideanRecords.lean +++ b/LeanPool/ThreeGap/EuclideanRecords.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module +public import LeanPool.ThreeGap.ChevallierCount +public import LeanPool.ThreeGap.EuclideanGrowth +public import Mathlib.NumberTheory.Real.Irrational import LeanPool.ThreeGap.EuclideanDefect +import LeanPool.ThreeGap.EuclideanGrowthFive import LeanPool.ThreeGap.SimultaneousDirichlet +import Mathlib.Tactic.Positivity.Finset /-! # Euclidean record denominators ⟹ `g₂ ≤ 6` (combinatorial, unconditional) @@ -24,6 +30,8 @@ Dirichlet via `deltaN(euclNorm 2) α q ≤ √2 · delta α q` (the Euclidean no in the plane). The sharp `g₂ ≤ 5` needs Romanov's `K = 4`; this is the `K = 5` bound. Axiom-clean. -/ +@[expose] public section + namespace ThreeGap.EuclideanRecords open scoped Real diff --git a/LeanPool/ThreeGap/FiveDistance.lean b/LeanPool/ThreeGap/FiveDistance.lean index 3f6bd93d2d..6e64c97348 100644 --- a/LeanPool/ThreeGap/FiveDistance.lean +++ b/LeanPool/ThreeGap/FiveDistance.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ -import LeanPool.ThreeGap.EuclideanAngle -import Mathlib.Analysis.InnerProductSpace.PiL2 +module + +public import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic +public import Mathlib.LinearAlgebra.Orientation import Mathlib.Data.Fin.Tuple.Sort import Mathlib.Geometry.Euclidean.Angle.Oriented.Basic @@ -21,6 +24,8 @@ and `EuclideanAngle.angle_ge_pi_div_three_of_norm_sub_gt` (the record-angle bound). -/ +@[expose] public section + namespace ThreeGap.FiveDistance open scoped Real EuclideanSpace diff --git a/LeanPool/ThreeGap/FiveDistanceHM.lean b/LeanPool/ThreeGap/FiveDistanceHM.lean index 784decd70a..114db52fb9 100644 --- a/LeanPool/ThreeGap/FiveDistanceHM.lean +++ b/LeanPool/ThreeGap/FiveDistanceHM.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module + +public import LeanPool.ThreeGap.SimultaneousApprox +public import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic +import LeanPool.ThreeGap.EuclideanAngle import LeanPool.ThreeGap.EuclideanGrowthFive -import LeanPool.ThreeGap.FiveDistance import Mathlib.Geometry.Euclidean.Angle.Unoriented.TriangleInequality +import Mathlib.Tactic.Positivity.Finset /-! # Toward the sharp Euclidean five-distance theorem via Haynes–Marklof Theorem 8 @@ -33,6 +39,8 @@ See the module docstring of `RomanovK4` and `MATHLIB_SUCCESSIVE_MINIMA_SCOPE.md` (Romanov / lattice-minima) routes; this file pursues the elementary HM Theorem-8 route. -/ +@[expose] public section + namespace ThreeGap.FiveDistanceHM open ThreeGap.SimApprox diff --git a/LeanPool/ThreeGap/LinftyFiveDistanceSharpArith.lean b/LeanPool/ThreeGap/LinftyFiveDistanceSharpArith.lean index cb95fc9912..670a5c4e3c 100644 --- a/LeanPool/ThreeGap/LinftyFiveDistanceSharpArith.lean +++ b/LeanPool/ThreeGap/LinftyFiveDistanceSharpArith.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ -import LeanPool.ThreeGap.SimultaneousDirichlet +module + +public import LeanPool.ThreeGap.TorusReduction +public import Mathlib.Analysis.Normed.Ring.Lemmas +public import Mathlib.NumberTheory.Real.Irrational import LeanPool.ThreeGap.EuclideanFiveDistanceSharpArith +import LeanPool.ThreeGap.SimultaneousDirichlet +import Mathlib.Tactic.Positivity.Finset /-! # Arithmetic sharpness of the `L∞` five-distance theorem `g_∞ ≤ 5` on `𝕋²` (dynamics-free) @@ -40,6 +46,8 @@ comparison is between *integers*, and the rational→irrational transport gap is are reused verbatim from the Euclidean development. -/ +@[expose] public section + namespace ThreeGap.LinftyRecords open scoped Real diff --git a/LeanPool/ThreeGap/LinftyThreeTorusNine.lean b/LeanPool/ThreeGap/LinftyThreeTorusNine.lean index 5ad58ee2ca..38546621eb 100644 --- a/LeanPool/ThreeGap/LinftyThreeTorusNine.lean +++ b/LeanPool/ThreeGap/LinftyThreeTorusNine.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ -import LeanPool.ThreeGap.SimultaneousDirichlet +module + +public import LeanPool.ThreeGap.TorusReduction +public import Mathlib.Analysis.Normed.Ring.Lemmas +public import Mathlib.NumberTheory.Real.Irrational +import LeanPool.ThreeGap.EuclideanFiveDistanceSharpArith import LeanPool.ThreeGap.LinftyFiveDistanceSharpArith +import Mathlib.Tactic.Positivity.Finset /-! # The `L∞` three-torus bound `g_∞ ≤ 2^d+1` is **sharp** for `d = 3`: nine distances attained @@ -32,10 +38,12 @@ three coordinates; everything is exact modular arithmetic — no square roots. -/ +@[expose] public section + namespace ThreeGap.LinftyRecords3 open scoped Real -open ThreeGap.SimApprox ThreeGap.DeltaCost ThreeGap.Chevallier ThreeGap.SimDirichlet +open ThreeGap.SimApprox ThreeGap.DeltaCost ThreeGap.Chevallier open ThreeGap.LinftyRecords (abs_residue_le) open ThreeGap.EuclideanRecords (inf_lt_inf) diff --git a/LeanPool/ThreeGap/ModTwoGrowth.lean b/LeanPool/ThreeGap/ModTwoGrowth.lean index 6718106f3e..0ffa334b94 100644 --- a/LeanPool/ThreeGap/ModTwoGrowth.lean +++ b/LeanPool/ThreeGap/ModTwoGrowth.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module -import LeanPool.ThreeGap.SimultaneousApprox +public import LeanPool.ThreeGap.SimultaneousApprox +public import Mathlib.Analysis.Normed.Ring.Lemmas import Mathlib.Analysis.Normed.Module.Basic -import Mathlib.Data.Fintype.Pigeonhole -import Mathlib.Data.Fintype.BigOperators +import Mathlib.Tactic.Positivity.Finset /-! # The any-norm growth inequality via the mod-2 pigeonhole (Lagarias II, Theorem 6) @@ -33,6 +34,8 @@ five-distance theorem. Axiom-clean. -/ +@[expose] public section + namespace ThreeGap.SimApprox /-- **The any-norm growth inequality (mod-2 pigeonhole).** For an abstract norm `N` and a diff --git a/LeanPool/ThreeGap/SimultaneousApprox.lean b/LeanPool/ThreeGap/SimultaneousApprox.lean index f3de08bd5f..679a4aebd6 100644 --- a/LeanPool/ThreeGap/SimultaneousApprox.lean +++ b/LeanPool/ThreeGap/SimultaneousApprox.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module -import Mathlib.Analysis.Normed.Group.Basic -import Mathlib.Analysis.Normed.Order.Lattice -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Positivity +public import Mathlib.Analysis.Normed.Group.Constructions +public import Mathlib.Analysis.Normed.Group.Real +public import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Data.EReal.Operations +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Simultaneous Diophantine approximation: the remainder-vector difference inequality @@ -37,6 +40,8 @@ fit) is Ermakov's Lemmas 1–2, the cited geometric completion. Norm-agnostic: h Axiom-clean; elementary. -/ +@[expose] public section + namespace ThreeGap.SimApprox variable {n : ℕ} diff --git a/LeanPool/ThreeGap/SimultaneousDirichlet.lean b/LeanPool/ThreeGap/SimultaneousDirichlet.lean index a9a3860ce0..e0ae3d1c4d 100644 --- a/LeanPool/ThreeGap/SimultaneousDirichlet.lean +++ b/LeanPool/ThreeGap/SimultaneousDirichlet.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module -import LeanPool.ThreeGap.TorusReduction -import Mathlib.Algebra.Order.Floor.Ring -import Mathlib.Data.Fintype.BigOperators -import Mathlib.NumberTheory.Real.Irrational -import Mathlib.Tactic.Push +public import LeanPool.ThreeGap.TorusReduction +public import Mathlib.NumberTheory.Real.Irrational +import Mathlib.Tactic.Positivity.Finset /-! # Simultaneous Dirichlet approximation ⟹ `RecordsContinue` (makes `g_∞ ≤ 2^d+1` unconditional) @@ -34,6 +33,8 @@ coordinate, **with no remaining hypothesis** (`nnDist_count_unconditional`, `nnDist_count_plane_unconditional`). Axiom-clean. -/ +@[expose] public section + namespace ThreeGap.SimDirichlet open ThreeGap.SimApprox ThreeGap.Chevallier ThreeGap.DeltaCost diff --git a/LeanPool/ThreeGap/SupNormGrowth.lean b/LeanPool/ThreeGap/SupNormGrowth.lean index c4313ee426..aa6adcbd2b 100644 --- a/LeanPool/ThreeGap/SupNormGrowth.lean +++ b/LeanPool/ThreeGap/SupNormGrowth.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module -import LeanPool.ThreeGap.SimultaneousApprox +public import LeanPool.ThreeGap.SimultaneousApprox import LeanPool.ThreeGap.ChevallierGapBound +import Mathlib.Data.EReal.Operations import Mathlib.Data.Fintype.Pigeonhole -import Mathlib.Data.Fintype.BigOperators +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The sup-norm growth inequality via the orthant pigeonhole (fully proven) @@ -32,6 +36,8 @@ survey (§2.4.1, attributed to Lagarias): No convex geometry, no kissing number — purely the pigeonhole. Axiom-clean. -/ +@[expose] public section + namespace ThreeGap.SimApprox variable {d : ℕ} diff --git a/LeanPool/ThreeGap/TorusReduction.lean b/LeanPool/ThreeGap/TorusReduction.lean index eeab4fd719..df9ea4aa5d 100644 --- a/LeanPool/ThreeGap/TorusReduction.lean +++ b/LeanPool/ThreeGap/TorusReduction.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Vico Bonfioli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vico Bonfioli -/ +module -import LeanPool.ThreeGap.DeltaCost +public import LeanPool.ThreeGap.DeltaCost +import Mathlib.Data.EReal.Operations +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The isometry reduction: `gapVal` *is* the torus nearest-neighbour distance @@ -29,6 +34,8 @@ distinct **actual** nearest-neighbour distances: `g_∞ ≤ 2^d + 1`. Axiom-clean; elementary. -/ +@[expose] public section + namespace ThreeGap.DeltaCost open ThreeGap.SimApprox ThreeGap.Chevallier diff --git a/LeanPool/Turan3.lean b/LeanPool/Turan3.lean index a4fedcb384..96e96f174e 100644 --- a/LeanPool/Turan3.lean +++ b/LeanPool/Turan3.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Rodrigo Gutierrez, Yves Jäckle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rodrigo Gutierrez, Yves Jäckle -/ +module -import LeanPool.Turan3.Turans3rdProof +public import LeanPool.Turan3.Turans3rdProof +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal /-! # Turán's theorem (the "Book" weighting proof) @@ -16,3 +18,5 @@ Main declarations: `Turan3.turans`, `Turan3.finale_bound`, `Turan3.Better_forms_ Tags: graph-theory, combinatorics, turan-theorem, extremal-graph-theory MSC: 05C35 -/ + +@[expose] public section diff --git a/LeanPool/Turan3/Turans3rdProof.lean b/LeanPool/Turan3/Turans3rdProof.lean index 58d5df8d7b..6504d75e3e 100644 --- a/LeanPool/Turan3/Turans3rdProof.lean +++ b/LeanPool/Turan3/Turans3rdProof.lean @@ -3,19 +3,11 @@ Copyright (c) 2026 Rodrigo Gutierrez, Yves Jäckle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rodrigo Gutierrez, Yves Jäckle -/ +module -import Mathlib.Combinatorics.SimpleGraph.Clique -import Mathlib.Combinatorics.SimpleGraph.DegreeSum -import Mathlib.Data.Sym.Card -import Mathlib.Basic.NNReal.Basic +public import Mathlib.Combinatorics.SimpleGraph.Clique +public import Mathlib.Basic.NNReal.Defs import Mathlib.Analysis.SpecialFunctions.Pow.NNReal -import Mathlib.Tactic.WLOG -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Convert -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Push /-! # Turán's theorem (the "Book" weighting proof) @@ -29,6 +21,8 @@ upper bound `(1/2)(1 - 1/(p-1)) n²` on the number of edges. All declarations live in the `Turan3` namespace. -/ +@[expose] public section + namespace Turan3 variable {α : Type*} (G : SimpleGraph α) @@ -2515,12 +2509,10 @@ theorem finale_bound {p : ℕ} (h0 : p ≥ 2) (h1 : G.CliqueFree p) (W : FunToMa /-- Defines the uniform vertex weight function that asisngs all vertices the same weight 1 /|V| -/ noncomputable def UnivFun [Nonempty α] : FunToMax G where - w := fun _ => 1 / #univ - h_w := (by - rw [sum_const] - simp only [one_div, nsmul_eq_mul] - rw [mul_inv_cancel₀] - simp only [card_univ, ne_eq, Nat.cast_eq_zero, Fintype.card_ne_zero, not_false_eq_true]) + w := fun _ => 1 / Fintype.card α + h_w := by + change (∑ _ : α, (1 / Fintype.card α : NNReal)) = 1 + simp [nsmul_eq_mul, Fintype.card_ne_zero] omit [DecidableEq α] in /-- diff --git a/LeanPool/TwoColoringOneRound.lean b/LeanPool/TwoColoringOneRound.lean index 918f8e4303..63aefd915e 100644 --- a/LeanPool/TwoColoringOneRound.lean +++ b/LeanPool/TwoColoringOneRound.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.API -import LeanPool.TwoColoringOneRound.LowerBound -import LeanPool.TwoColoringOneRound.SimpleBounds -import LeanPool.TwoColoringOneRound.UpperBound +public import LeanPool.TwoColoringOneRound.MainResults + +public import LeanPool.TwoColoringOneRound.API +public import LeanPool.TwoColoringOneRound.LowerBound +public import LeanPool.TwoColoringOneRound.SimpleBounds +public import LeanPool.TwoColoringOneRound.UpperBound +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # 2-Coloring Cycles in One Round @@ -20,6 +26,8 @@ Tags: distributed-computing, graph-coloring, randomized-algorithms, formal-verif MSC: 68W15, 05C15 -/ +@[expose] public section + /-! ## Mathematical overview diff --git a/LeanPool/TwoColoringOneRound/API.lean b/LeanPool/TwoColoringOneRound/API.lean index 7e63676a65..adbcf6033d 100644 --- a/LeanPool/TwoColoringOneRound/API.lean +++ b/LeanPool/TwoColoringOneRound/API.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.Definitions -import LeanPool.TwoColoringOneRound.MainResults +public import LeanPool.TwoColoringOneRound.Definitions +public import LeanPool.TwoColoringOneRound.MainResults + +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Distributed2Coloring: API @@ -24,5 +29,7 @@ This is the recommended entry point for humans. (bounds on `Distributed2Coloring.ClassicalAlgorithm.pStar`) -/ +@[expose] public section + namespace Distributed2Coloring end Distributed2Coloring diff --git a/LeanPool/TwoColoringOneRound/Definitions.lean b/LeanPool/TwoColoringOneRound/Definitions.lean index a362d88fde..3fb44c2cbc 100644 --- a/LeanPool/TwoColoringOneRound/Definitions.lean +++ b/LeanPool/TwoColoringOneRound/Definitions.lean @@ -3,11 +3,10 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.MeasureTheory.Constructions.Pi -import Mathlib.MeasureTheory.Constructions.UnitInterval -import Mathlib.MeasureTheory.MeasurableSpace.Constructions -import LeanPool.TwoColoringOneRound.LowerBound.Defs +public import Mathlib.MeasureTheory.Constructions.UnitInterval +import Mathlib.Tactic.Positivity.Finset /-! # Distributed2Coloring: Definitions @@ -19,6 +18,8 @@ Most internal development lives under `Distributed2Coloring.LowerBound` and they want to follow the detailed proofs. -/ +@[expose] public section + namespace Distributed2Coloring open MeasureTheory diff --git a/LeanPool/TwoColoringOneRound/LowerBound.lean b/LeanPool/TwoColoringOneRound/LowerBound.lean index 26cd21e909..778e7109b7 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound.lean @@ -3,38 +3,42 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.LowerBound.Defs -import LeanPool.TwoColoringOneRound.LowerBound.OverlapType -import LeanPool.TwoColoringOneRound.LowerBound.EdgePatterns -import LeanPool.TwoColoringOneRound.LowerBound.LocalRule -import LeanPool.TwoColoringOneRound.LowerBound.Correlation -import LeanPool.TwoColoringOneRound.LowerBound.Certificate -import LeanPool.TwoColoringOneRound.LowerBound.CorrAvgMatrix -import LeanPool.TwoColoringOneRound.LowerBound.N9 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000AvailFrom -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data -import LeanPool.TwoColoringOneRound.LowerBound.N1000000ZData -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Z -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Witness -import LeanPool.TwoColoringOneRound.LowerBound.N1000000WeakDuality -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation -import LeanPool.TwoColoringOneRound.LowerBound.N1000000RelaxationPsdSoundness -import LeanPool.TwoColoringOneRound.LowerBound.N1000000MuWitness -import LeanPool.TwoColoringOneRound.LowerBound.N1000000MuLinear -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Objective -import LeanPool.TwoColoringOneRound.LowerBound.N1000000CorrAvgMatrixDecompose -import LeanPool.TwoColoringOneRound.LowerBound.N1000000CorrAvgMatrixSymmDecompose -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Bound -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Interface -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Main -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionCompute -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionForB -import LeanPool.TwoColoringOneRound.LowerBound.Sanity -import LeanPool.TwoColoringOneRound.LowerBound.UpperBound +public import LeanPool.TwoColoringOneRound.LowerBound.Defs +public import LeanPool.TwoColoringOneRound.LowerBound.OverlapType +public import LeanPool.TwoColoringOneRound.LowerBound.EdgePatterns +public import LeanPool.TwoColoringOneRound.LowerBound.LocalRule +public import LeanPool.TwoColoringOneRound.LowerBound.Correlation +public import LeanPool.TwoColoringOneRound.LowerBound.Certificate +public import LeanPool.TwoColoringOneRound.LowerBound.CorrAvgMatrix +public import LeanPool.TwoColoringOneRound.LowerBound.N9 +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000AvailFrom +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000ZData +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Z +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Witness +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000WeakDuality +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000RelaxationPsdSoundness +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000MuWitness +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000MuLinear +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Objective +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000CorrAvgMatrixDecompose +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000CorrAvgMatrixSymmDecompose +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Bound +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Interface +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Main +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionCompute +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionForB +public import LeanPool.TwoColoringOneRound.LowerBound.Sanity +public import LeanPool.TwoColoringOneRound.LowerBound.UpperBound +import Mathlib.Tactic.Positivity.Finset /-! # Lower-bound modules for 2-coloring cycles in one round This module re-exports the vendored formalization imported from `2-coloring-1-round`. -/ + +@[expose] public section diff --git a/LeanPool/TwoColoringOneRound/LowerBound/Certificate.lean b/LeanPool/TwoColoringOneRound/LowerBound/Certificate.lean index c0cd432502..8fa61ddc90 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/Certificate.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/Certificate.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ - -import LeanPool.TwoColoringOneRound.LowerBound.Defs -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data +module + +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! This file will host the Lean-level encoding of the exact rational certificate and the @@ -18,6 +26,8 @@ Planned approach (to be implemented): * translate the resulting edge-correlation bound into a monochromatic-edge bound. -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound diff --git a/LeanPool/TwoColoringOneRound/LowerBound/CorrAvgMatrix.lean b/LeanPool/TwoColoringOneRound/LowerBound/CorrAvgMatrix.lean index 883c081210..1d59503f00 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/CorrAvgMatrix.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/CorrAvgMatrix.lean @@ -3,16 +3,20 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.LinearAlgebra.Matrix.PosDef -import Mathlib.Data.Rat.Star +public import Mathlib.LinearAlgebra.Matrix.PosDef -import LeanPool.TwoColoringOneRound.LowerBound.Correlation +public import LeanPool.TwoColoringOneRound.LowerBound.Correlation +import Mathlib.Data.Rat.Star +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.CorrAvgMatrix -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace Correlation diff --git a/LeanPool/TwoColoringOneRound/LowerBound/Correlation.lean b/LeanPool/TwoColoringOneRound/LowerBound/Correlation.lean index 9bd2c79e55..36f78133f9 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/Correlation.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/Correlation.lean @@ -3,14 +3,33 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ - -import LeanPool.TwoColoringOneRound.LowerBound.Defs -import Mathlib.Data.Finite.Perm +module + +public import Mathlib.Data.Fintype.Perm + +public import Mathlib.Data.Fintype.EquivFin + +public import LeanPool.TwoColoringOneRound.LowerBound.Defs +public import Mathlib.Algebra.Group.Action.Defs +public import Mathlib.Algebra.Group.End +public import Mathlib.Data.Rat.Defs +import Mathlib.Algebra.Module.NatInt +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Basic.Finite.Prod +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.Correlation -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound open scoped BigOperators diff --git a/LeanPool/TwoColoringOneRound/LowerBound/Defs.lean b/LeanPool/TwoColoringOneRound/LowerBound/Defs.lean index e262d9a244..ebaa002083 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/Defs.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/Defs.lean @@ -3,23 +3,26 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Data.Fintype.Pi -import Mathlib.Data.Fintype.Sets +public import Mathlib.Data.Fintype.Pi +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Rat.Init import Mathlib.Algebra.BigOperators.Ring.Finset -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring.RingNF +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.Defs -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound open scoped BigOperators diff --git a/LeanPool/TwoColoringOneRound/LowerBound/EdgePatterns.lean b/LeanPool/TwoColoringOneRound/LowerBound/EdgePatterns.lean index 54598a5967..a23f94b45f 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/EdgePatterns.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/EdgePatterns.lean @@ -3,12 +3,25 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module +public import Mathlib.Data.NNRat.Defs + +public import Mathlib.Data.Sym.Basic + +public import LeanPool.TwoColoringOneRound.LowerBound.Defs +public import Mathlib.Data.Nat.Factorial.Basic +public import Mathlib.Order.Interval.Set.Basic +import Mathlib.Algebra.Order.Field.Basic import Mathlib.Data.Fin.Tuple.Embedding import Mathlib.Data.Fintype.CardEmbedding -import Mathlib.Tactic.Common +import Mathlib.Data.Rat.Cast.Order import Mathlib.Tactic.FinCases -import LeanPool.TwoColoringOneRound.LowerBound.Defs +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! Reusable lemmas for counting edges with coordinate-wise constraints relative to a threshold `two`. @@ -17,6 +30,8 @@ These are used in auxiliary “sanity check” and “upper bound” files to av case-bashy equivalence proofs. -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound diff --git a/LeanPool/TwoColoringOneRound/LowerBound/LocalRule.lean b/LeanPool/TwoColoringOneRound/LowerBound/LocalRule.lean index c93cad3083..da648f4776 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/LocalRule.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/LocalRule.lean @@ -3,14 +3,23 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.LowerBound.Defs -import LeanPool.TwoColoringOneRound.LowerBound.EdgePatterns +public import LeanPool.TwoColoringOneRound.LowerBound.EdgePatterns +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.LocalRule -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace LocalRule diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000AvailFrom.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000AvailFrom.lean index bc5932f97f..fee0c77da2 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000AvailFrom.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000AvailFrom.lean @@ -3,16 +3,25 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.Defs +public import LeanPool.TwoColoringOneRound.LowerBound.Defs -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000AvailFrom -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000AvailFrom diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionCompute.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionCompute.lean index 70bda95ba6..bd89a33c8e 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionCompute.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionCompute.lean @@ -3,16 +3,35 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ - -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeBase -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSi +module + +public import Mathlib.Tactic.Common +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Ring.RingNF +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.NormNum +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.IntervalCases +public import Mathlib.Tactic.LinearCombination +public import Mathlib.Tactic.Polyrith +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeBase +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0 +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSi + +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionCompute -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeBase.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeBase.lean index 40adbc84fe..268e187c66 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeBase.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeBase.lean @@ -3,15 +3,13 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import Mathlib.Tactic.FieldSimp +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000WeakDuality +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000StructureConstants +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000WedderburnData import Mathlib.Algebra.BigOperators.Field -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data -import LeanPool.TwoColoringOneRound.LowerBound.N1000000WeakDuality -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Witness -import LeanPool.TwoColoringOneRound.LowerBound.N1000000StructureConstants -import LeanPool.TwoColoringOneRound.LowerBound.N1000000WedderburnData +import Mathlib.Tactic.Positivity.Finset /-! Algebraic cancellation lemma used to keep integer cross-multiplication checks from ballooning: @@ -19,6 +17,8 @@ we replace a term `(s : ℚ) / (D : ℚ)` by the reduced fraction obtained by ca `g = gcd(|s|, D)`. -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute @@ -49,7 +49,7 @@ private theorem tTr_lt (d : DirIdx) : tTr[d.1]! < masks.size := by fin_cases d < /-- Imported auxiliary declaration for the 2-coloring one-round formalization. -/ def invDir (d : DirIdx) : DirIdx := - ⟨tTr[d.1]!, tTr_lt d⟩ + ⟨tTr[d.1]!, (by exact tTr_lt d)⟩ /-- Imported auxiliary declaration for the 2-coloring one-round formalization. -/ abbrev basisDen (r : Block) : Nat := @@ -125,11 +125,33 @@ theorem div_by_D_eq_div_by_div_gcd (s : Int) : simp only [Rat.divInt_eq_div] simp_all -/-- Imported auxiliary declaration for the 2-coloring one-round formalization. -/ +/-- Integer numerator of a compressed basis entry, skipping zero basis coordinates. -/ def compBasisIntEntry (r : Block) (d : DirIdx) (p q : Fin 3) : Int := - (Finset.univ : Finset DirIdx).sum fun k => - (Finset.univ : Finset DirIdx).sum fun a => - (iOfNat (baseTypeCount k)) * (iOfNat (N k a d)) * (bValNum r p k) * (bValNum r q a) + let rows := (Finset.univ : Finset DirIdx).filter fun k => bValNum r p k ≠ 0 + let columns := (Finset.univ : Finset DirIdx).filter fun a => bValNum r q a ≠ 0 + rows.sum fun k => + iOfNat (baseTypeCount k) * bValNum r p k * columns.sum fun a => + iOfNat (N k a d) * bValNum r q a + +/-- Skipping zero coordinates and factoring row coefficients preserves the defining double sum. -/ +theorem compBasisIntEntry_eq_sum (r : Block) (d : DirIdx) (p q : Fin 3) : + compBasisIntEntry r d p q = + (Finset.univ : Finset DirIdx).sum fun k => + (Finset.univ : Finset DirIdx).sum fun a => + iOfNat (baseTypeCount k) * iOfNat (N k a d) * bValNum r p k * bValNum r q a := by + unfold compBasisIntEntry + simp only [Finset.sum_filter] + apply Finset.sum_congr rfl + intro k _ + by_cases hleft : bValNum r p k = 0 + · simp [hleft] + · simp only [hleft, ne_eq, not_false_eq_true, ite_true, Finset.mul_sum] + apply Finset.sum_congr rfl + intro a _ + by_cases hright : bValNum r q a = 0 + · simp [hright] + · simp only [hright, not_false_eq_true, ite_true] + ac_rfl private theorem basisDen_pos (r : Block) : 0 < basisDen r := by fin_cases r <;> decide @@ -204,7 +226,7 @@ theorem compBasis_entry_eq_div (r : Block) (d : DirIdx) (p q : Fin 3) : (Finset.univ.sum fun k : DirIdx => Finset.univ.sum fun a : DirIdx => ((num k a : Int) : Q)) = ((compBasisIntEntry r d p q : Int) : Q) := by - simp [compBasisIntEntry, compBasisIntEntry, num] + simp [compBasisIntEntry_eq_sum, num] have hmain : compBasis r d p q = ((compBasisIntEntry r d p q : Int) : Q) / (den * den) := by dsimp [compBasis] @@ -227,7 +249,7 @@ private theorem varToOrbitRep_lt (i : Var) : varToOrbitRep[i.1]! < masks.size := /-- Imported auxiliary declaration for the 2-coloring one-round formalization. -/ def varOrbit (i : Var) : DirIdx := - ⟨varToOrbitRep[i.1]!, varToOrbitRep_lt i⟩ + ⟨varToOrbitRep[i.1]!, (by exact varToOrbitRep_lt i)⟩ end N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0.lean index a99a129fc5..574a585e7b 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0.lean @@ -3,16 +3,18 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeBase +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeBase import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0Int -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Z +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0Int.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0Int.lean index e33fddfe1d..d6456cbccf 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0Int.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0Int.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntBlock0 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntBlock1 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntBlock2 @@ -12,11 +13,14 @@ import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntB import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntBlock4 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntBlock5 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntBlock6 +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0Int -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock0.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock0.lean index e5d4ddf9df..b0858caa32 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock0.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock0.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntBlock0 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock1.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock1.lean index b479034433..5535be1f6f 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock1.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock1.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntBlock1 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock2.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock2.lean index 50e24edfe2..95a7a37b4f 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock2.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock2.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntBlock2 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock3.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock3.lean index 2bfc8844de..78201462a1 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock3.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock3.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntBlock3 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock4.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock4.lean index 21f2d374eb..588015341d 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock4.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock4.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntBlock4 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock5.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock5.lean index 1450d53002..0e0ed371a2 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock5.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock5.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntBlock5 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock6.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock6.lean index 9fbc79649a..3afd84f781 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock6.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntBlock6.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntBlock6 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntGoal.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntGoal.lean index 923e702fe5..253dfccef9 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntGoal.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeS0IntGoal.lean @@ -3,15 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeBase -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Z +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeBase +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0IntGoal -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSi.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSi.lean index 4a40ff6d07..049e9ba5b3 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSi.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSi.lean @@ -3,17 +3,18 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeBase +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeBase import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiInt -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Witness -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Z +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSi -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiInt.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiInt.lean index 6f1c307cee..ba3e600f31 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiInt.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiInt.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2 @@ -13,11 +13,14 @@ import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntB import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6 +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiInt -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0.lean index 706207eef9..58a82c54ba 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0.lean @@ -3,20 +3,23 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars0to3 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars4to7 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars8to11 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars12to15 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars16to19 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars20to22 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars4to7 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars8to11 +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars0to3.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars0to3.lean index 010f318cf9..50477f1509 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars0to3.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars0to3.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars0to3 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars12to15.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars12to15.lean index cdf89a78eb..c16852693f 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars12to15.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars12to15.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars12to15 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars16to19.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars16to19.lean index 2a3f344c0b..5e3f8c8d3c 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars16to19.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars16to19.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars16to19 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars20to22.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars20to22.lean index e515dae3a4..9338e13ec8 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars20to22.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars20to22.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars20to22 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars4to7.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars4to7.lean index 75f362a0ed..9f4e5e32dd 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars4to7.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars4to7.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars4to7 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars8to11.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars8to11.lean index 0997ff4c51..ea10715242 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars8to11.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock0Vars8to11.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock0Vars8to11 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1.lean index 24c4875bf2..4812020ec3 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1.lean @@ -3,20 +3,23 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars0to3 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars4to7 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars8to11 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars12to15 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars16to19 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars20to22 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars4to7 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars8to11 +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars0to3.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars0to3.lean index 9a436dcb13..b018273c8e 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars0to3.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars0to3.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars0to3 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars12to15.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars12to15.lean index 5a830603cd..7ebb467cf9 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars12to15.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars12to15.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars12to15 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars16to19.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars16to19.lean index 9b63b35e42..1120ef0344 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars16to19.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars16to19.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars16to19 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars20to22.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars20to22.lean index ace4971784..c1cc7b875f 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars20to22.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars20to22.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars20to22 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars4to7.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars4to7.lean index 977ff6b620..a8322c12f8 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars4to7.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars4to7.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars4to7 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars8to11.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars8to11.lean index 85bac8f39c..5b14adad2e 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars8to11.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock1Vars8to11.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock1Vars8to11 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2.lean index 5fdddde2dd..13045bbf0d 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2.lean @@ -3,20 +3,23 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars0to3 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars4to7 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars8to11 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars12to15 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars16to19 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars20to22 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars4to7 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars8to11 +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars0to3.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars0to3.lean index 8d9fcddbf0..2d82594826 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars0to3.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars0to3.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars0to3 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars12to15.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars12to15.lean index 1159a21537..790649e9f8 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars12to15.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars12to15.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars12to15 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars16to19.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars16to19.lean index 4102994b9e..485e61cba4 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars16to19.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars16to19.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars16to19 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars20to22.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars20to22.lean index d738b641ee..521f23c420 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars20to22.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars20to22.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars20to22 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars4to7.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars4to7.lean index 45ce63af16..51d37768ff 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars4to7.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars4to7.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars4to7 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars8to11.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars8to11.lean index fc083263ad..61ee3e2be8 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars8to11.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock2Vars8to11.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock2Vars8to11 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3.lean index 369ed7e7f4..362dc5469a 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3.lean @@ -3,20 +3,23 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars0to3 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars4to7 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars8to11 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars12to15 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars16to19 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars20to22 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars4to7 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars8to11 +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars0to3.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars0to3.lean index 3106c6cb16..837e598d74 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars0to3.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars0to3.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars0to3 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars12to15.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars12to15.lean index 889df56c25..1bf66592ea 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars12to15.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars12to15.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars12to15 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars16to19.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars16to19.lean index b2fd9495bc..a70b909141 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars16to19.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars16to19.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars16to19 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars20to22.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars20to22.lean index 3f03a6fb8c..ca31962201 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars20to22.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars20to22.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars20to22 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars4to7.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars4to7.lean index b9c94bc007..6e2c14e7ee 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars4to7.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars4to7.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars4to7 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars8to11.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars8to11.lean index c5c4f16f1c..5e41863dc8 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars8to11.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock3Vars8to11.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock3Vars8to11 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4.lean index 2bdfd3dd25..db80284b51 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4.lean @@ -3,20 +3,23 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars0to3 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars4to7 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars8to11 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars12to15 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars16to19 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars20to22 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars4to7 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars8to11 +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars0to3.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars0to3.lean index f28612fd83..dc40c032f0 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars0to3.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars0to3.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars0to3 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars12to15.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars12to15.lean index 6fde039dce..6e9a693d95 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars12to15.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars12to15.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars12to15 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars16to19.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars16to19.lean index 62cef1dd37..f3cabe5ed2 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars16to19.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars16to19.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars16to19 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars20to22.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars20to22.lean index a845dcd4cf..eea514a6e1 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars20to22.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars20to22.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars20to22 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars4to7.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars4to7.lean index ed944632b7..b3998f8f5c 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars4to7.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars4to7.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars4to7 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars8to11.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars8to11.lean index c6044ac83c..1a1062d451 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars8to11.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock4Vars8to11.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock4Vars8to11 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5.lean index 99f82444a3..4d71bf629b 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5.lean @@ -3,20 +3,23 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars0to3 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars4to7 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars8to11 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars12to15 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars16to19 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars20to22 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars4to7 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars8to11 +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars0to3.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars0to3.lean index 5e3ba859c9..bb9c8958fb 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars0to3.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars0to3.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars0to3 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars12to15.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars12to15.lean index 1a69524cc1..cdd64effd2 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars12to15.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars12to15.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars12to15 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars16to19.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars16to19.lean index 3c0db1d344..1b69b9ac55 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars16to19.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars16to19.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars16to19 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars20to22.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars20to22.lean index 4c09250e0a..8bc50959fe 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars20to22.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars20to22.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars20to22 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars4to7.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars4to7.lean index 1d258459d1..4f41c541be 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars4to7.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars4to7.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars4to7 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars8to11.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars8to11.lean index 81f0955e1b..0f64b95668 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars8to11.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock5Vars8to11.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock5Vars8to11 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6.lean index 477451538a..ce03a43bb6 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6.lean @@ -3,20 +3,23 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars0to3 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars4to7 -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars8to11 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars12to15 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars16to19 import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars20to22 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars4to7 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars8to11 +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars0to3.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars0to3.lean index e32c36aaa6..4cda0231f3 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars0to3.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars0to3.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars0to3 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars12to15.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars12to15.lean index 30f26a0c62..85b582bf0a 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars12to15.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars12to15.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars12to15 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars16to19.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars16to19.lean index dc0ec64a96..2397c402f3 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars16to19.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars16to19.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars16to19 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars20to22.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars20to22.lean index f5eccb8a48..121651ec42 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars20to22.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars20to22.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars20to22 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars4to7.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars4to7.lean index 2fd5b567f3..99ab1143aa 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars4to7.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars4to7.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars4to7 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars8to11.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars8to11.lean index 3ef1d04573..e08289f0b8 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars8to11.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntBlock6Vars8to11.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntBlock6Vars8to11 -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntGoal.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntGoal.lean index d46dba9bb1..8131c08c60 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntGoal.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionComputeSiIntGoal.lean @@ -3,15 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeBase -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Z +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeBase +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSiIntGoal -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionCompute diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionForB.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionForB.lean index 164cee0440..5c9dac3048 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionForB.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000BCompressionForB.lean @@ -3,23 +3,24 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.CorrAvgMatrix -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionCompute +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000RelaxationPsdSoundness +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeBase +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000CorrAvgMatrixDecompose +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeS0 +import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeSi import LeanPool.TwoColoringOneRound.LowerBound.N1000000CorrAvgMatrixSymmDecompose import LeanPool.TwoColoringOneRound.LowerBound.N1000000IntersectionCounting import LeanPool.TwoColoringOneRound.LowerBound.N1000000MaskComplete -import LeanPool.TwoColoringOneRound.LowerBound.N1000000PairTransitivity -import LeanPool.TwoColoringOneRound.LowerBound.N1000000RelaxationPsdSoundness -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Transitivity -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Witness -import LeanPool.TwoColoringOneRound.LowerBound.N1000000WedderburnData +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionForB -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000BCompressionForB diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Bound.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Bound.lean index 01d698b4b6..74d5eff62b 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Bound.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Bound.lean @@ -3,17 +3,20 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.LowerBound.Defs -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation import LeanPool.TwoColoringOneRound.LowerBound.N1000000MuLinear import LeanPool.TwoColoringOneRound.LowerBound.N1000000Objective -import LeanPool.TwoColoringOneRound.LowerBound.N1000000WeakDuality +import Mathlib.Data.Rat.Star +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000Bound -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000Bound diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000CorrAvgMatrixDecompose.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000CorrAvgMatrixDecompose.lean index 7565a939e1..98a309ae34 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000CorrAvgMatrixDecompose.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000CorrAvgMatrixDecompose.lean @@ -3,20 +3,19 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.CorrAvgMatrix -import LeanPool.TwoColoringOneRound.LowerBound.N1000000AvailFrom +public import LeanPool.TwoColoringOneRound.LowerBound.CorrAvgMatrix +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Transitivity import LeanPool.TwoColoringOneRound.LowerBound.N1000000MaskComplete -import LeanPool.TwoColoringOneRound.LowerBound.N1000000OrbitalBasis -import LeanPool.TwoColoringOneRound.LowerBound.N1000000OrbitCounting -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Transitivity +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000CorrAvgMatrixDecompose -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000CorrAvgMatrixDecompose @@ -29,7 +28,6 @@ open Distributed2Coloring.LowerBound.N1000000AvailFrom open Distributed2Coloring.LowerBound.N1000000MaskComplete open Distributed2Coloring.LowerBound.N1000000OrbitalBasis open Distributed2Coloring.LowerBound.N1000000OrbitCounting -open Distributed2Coloring.LowerBound.N1000000Relaxation open Distributed2Coloring.LowerBound.N1000000PairTransitivity open Distributed2Coloring.LowerBound.N1000000Transitivity diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000CorrAvgMatrixSymmDecompose.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000CorrAvgMatrixSymmDecompose.lean index e0fe75a777..ed46cdfc2c 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000CorrAvgMatrixSymmDecompose.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000CorrAvgMatrixSymmDecompose.lean @@ -3,14 +3,14 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.OverlapType -import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionCompute -import LeanPool.TwoColoringOneRound.LowerBound.N1000000CorrAvgMatrixDecompose +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000CorrAvgMatrixDecompose +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionComputeBase import LeanPool.TwoColoringOneRound.LowerBound.N1000000MaskComplete -import LeanPool.TwoColoringOneRound.LowerBound.N1000000PairTransitivity -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation +import Mathlib.Data.Nat.Bitwise +import Mathlib.Tactic.Positivity.Finset /-! This file rewrites `corrAvgMatrix` into the symmetric orbital basis: @@ -21,6 +21,8 @@ The key bookkeeping is a tiny (34-element) map from directed indices to the uniq transpose-orbit contains it (with `idDirIdx` handled separately). -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000CorrAvgMatrixSymmDecompose diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Data.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Data.lean index 224e898dae..725981d8a8 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Data.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Data.lean @@ -3,10 +3,20 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common +public import Aesop.BuiltinRules +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! This file is auto-generated by `scripts/export_n1000000_to_lean.py`. -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound.N1000000Data /-- Imported auxiliary declaration for the 2-coloring one-round formalization. -/ def n : Nat := 1000000 diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Interface.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Interface.lean index 9b22f884b3..97ca52dff5 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Interface.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Interface.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.LowerBound.Defs +public import LeanPool.TwoColoringOneRound.LowerBound.Defs +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data import LeanPool.TwoColoringOneRound.LowerBound.N1000000Main +import Mathlib.Tactic.Positivity.Finset /-! # Public interface: the `n = 1_000_000` lower bound @@ -35,6 +38,8 @@ It states that for `n = 1_000_000`, every coloring has monochromatic-edge fracti `23879/100000 = 0.23879`. -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000IntersectionCounting.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000IntersectionCounting.lean index 62416ec1c1..aa6b571208 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000IntersectionCounting.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000IntersectionCounting.lean @@ -3,19 +3,40 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Data.Fintype.CardEmbedding +public import Mathlib.Algebra.Regular.Basic + +public import Mathlib.Algebra.GroupWithZero.Invertible + +public import Mathlib.Data.NNRat.Defs + +public import Mathlib.Algebra.GroupWithZero.Units.Basic + +public import Mathlib.Algebra.CharZero.Defs -import LeanPool.TwoColoringOneRound.LowerBound.N1000000OrbitalBasis -import LeanPool.TwoColoringOneRound.LowerBound.N1000000MaskAtFacts -import LeanPool.TwoColoringOneRound.LowerBound.N1000000OrbitCounting -import LeanPool.TwoColoringOneRound.LowerBound.N1000000PairTransitivity -import LeanPool.TwoColoringOneRound.LowerBound.N1000000StructureConstants +public import Mathlib.Data.Sym.Basic + + +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000OrbitCounting +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000MaskAtFacts +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Fintype.CardEmbedding +public import Mathlib.Data.Nat.Bitwise +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000IntersectionCounting -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000IntersectionCounting @@ -61,7 +82,8 @@ theorem card_freeCoord (a d : DirIdx) : exact Fintype.card_subtype (fun j : Fin 3 => colMatch (maskAt a) j = none ∧ rowMatch (maskAt d) j = none) -private noncomputable def freeSyms {k : DirIdx} (u : BaseOrbit k) : Finset SymN := +/-- The symbols occupying the free coordinates of a base orbit. -/ +noncomputable def freeSyms {k : DirIdx} (u : BaseOrbit k) : Finset SymN := (Finset.univ : Finset (FreeCol k)).image (fun j => u.1.1 j.1) private lemma freeSyms_disjoint_baseSet {k : DirIdx} (u : BaseOrbit k) : @@ -314,10 +336,12 @@ noncomputable def encodeInter {k : DirIdx} (u : BaseOrbit k) (a d : DirIdx) (w : have hrel : dirMask w.1 u.1 = maskAt d := w.2.2 have hwge : 3 ≤ (w.1.1 j.1).1 := baseOrbit_freeCoord_outside (u := ⟨w.1, hbase⟩) ⟨j.1, j.2.1⟩ - have hnotBase : w.1.1 j.1 ∉ baseSet := not_mem_baseSet_of_ge_three (x := w.1.1 j.1) hwge + have hnotBase : w.1.1 j.1 ∉ baseSet := + private_decl% (not_mem_baseSet_of_ge_three (x := w.1.1 j.1) hwge) have hneAll : ∀ t : Fin 3, w.1.1 j.1 ≠ u.1.1 t := - ne_of_dirMask_rowMatch_none (u := w.1) (v := u.1) (d := d) (h := hrel) (i := j.1) j.2.2 + private_decl% (ne_of_dirMask_rowMatch_none (u := w.1) (v := u.1) (d := d) + (h := hrel) (i := j.1) j.2.2) have hnotFree : w.1.1 j.1 ∉ freeSyms (k := k) u := by intro hmem rcases Finset.mem_image.1 hmem with ⟨jf, _hjfUniv, hjf⟩ @@ -338,12 +362,12 @@ noncomputable def gOfEmbeddingVal {k : DirIdx} (u : BaseOrbit k) (a d : DirIdx) classical refine dite (rowMatch (maskAt d) j.1 = none) (fun hnone => ?_) (fun hne => ?_) · let x : AvailFor u := e ⟨j.1, ⟨j.2, hnone⟩⟩ - exact ⟨x.1, availFor_ge_three (u := u) x⟩ + exact ⟨x.1, private_decl% (availFor_ge_three (u := u) x)⟩ · let l : Fin 3 := Classical.choose ((Option.ne_none_iff_exists').1 hne) have hl : rowMatch (maskAt d) j.1 = some l := Classical.choose_spec ((Option.ne_none_iff_exists').1 hne) have hAt : consistentAt (maskAt k) (maskAt a) (maskAt d) j.1 = true := - consistentAt_of_consistent (k := k) (a := a) (d := d) hcons j.1 + private_decl% (consistentAt_of_consistent (k := k) (a := a) (d := d) hcons j.1) have hkFree : colMatch (maskAt k) l = none := of_decide_eq_true (by simpa [consistentAt, j.2, hl] using hAt) exact ⟨u.1.1 l, baseOrbit_freeCoord_outside (u := u) ⟨l, hkFree⟩⟩ @@ -438,7 +462,7 @@ noncomputable def gOfEmbedding {k : DirIdx} (u : BaseOrbit k) (a d : DirIdx) (hcons : consistent (maskAt k) (maskAt a) (maskAt d) = true) (e : FreeCoord a d ↪ AvailFor u) : FreeCol a ↪ AvailFrom3 := ⟨gOfEmbeddingVal (u := u) (a := a) (d := d) hcons e, - gOfEmbeddingVal_injective (u := u) (a := a) (d := d) hcons e⟩ + (private_decl% (gOfEmbeddingVal_injective (u := u) (a := a) (d := d) hcons e))⟩ /-- Imported auxiliary declaration for the 2-coloring one-round formalization. -/ noncomputable def decodeInter {k : DirIdx} (u : BaseOrbit k) (a d : DirIdx) @@ -472,12 +496,12 @@ noncomputable def decodeInter {k : DirIdx} (u : BaseOrbit k) (a d : DirIdx) simpa [v, decodeVertex] using (decodeTuple_of_colMatch_some (k := a) (g := g) (j := i) (i := ib) hcol) have hAti : consistentAt (maskAt k) (maskAt a) (maskAt d) i = true := - consistentAt_of_consistent (k := k) (a := a) (d := d) hcons i + (private_decl% (consistentAt_of_consistent (k := k) (a := a) (d := d) hcons i)) have hk : rowMatch (maskAt k) ib = some l := of_decide_eq_true (by simpa [consistentAt, hcol, hrow] using hAti) have hubase : baseVertex.1 ib = u.1.1 l := - eq_of_dirMask_rowMatch (u := baseVertex) (v := u.1) (d := k) - (h := u.2) (i := ib) (j := l) hk + (private_decl% (eq_of_dirMask_rowMatch (u := baseVertex) (v := u.1) (d := k) + (h := u.2) (i := ib) (j := l) hk)) simp [hv0, hubase] by_cases hj : j = l · simp_all @@ -506,18 +530,18 @@ noncomputable def decodeInter {k : DirIdx} (u : BaseOrbit k) (a d : DirIdx) simpa [g, gOfEmbedding] using this intro hEq have : (e ⟨i, ⟨hcol, hrow⟩⟩).1 = u.1.1 j' := by simpa [hv0, hg0] using hEq - exact (availFor_ne_u_coord (k := k) u (e ⟨i, ⟨hcol, hrow⟩⟩) j') this + exact ((private_decl% (availFor_ne_u_coord (k := k) u (e ⟨i, ⟨hcol, hrow⟩⟩) j'))) this | some ib => have hv0 : v.1 i = baseVertex.1 ib := by simpa [v, decodeVertex] using (decodeTuple_of_colMatch_some (k := a) (g := g) (j := i) (i := ib) hcol) have hAti : consistentAt (maskAt k) (maskAt a) (maskAt d) i = true := - consistentAt_of_consistent (k := k) (a := a) (d := d) hcons i + (private_decl% (consistentAt_of_consistent (k := k) (a := a) (d := d) hcons i)) have hkNone : rowMatch (maskAt k) ib = none := of_decide_eq_true (by simpa [consistentAt, hcol, hrow] using hAti) have hne := - ne_of_dirMask_rowMatch_none (u := baseVertex) (v := u.1) (d := k) - (h := u.2) (i := ib) hkNone j' + (private_decl% (ne_of_dirMask_rowMatch_none (u := baseVertex) (v := u.1) (d := k) + (h := u.2) (i := ib) hkNone j')) simpa [hv0, eq_comm] using hne simp_all have hvRel : dirMask v u.1 = maskAt d := by diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Main.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Main.lean index 411b4fd6f1..8b95144d2f 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Main.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Main.lean @@ -3,16 +3,20 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module +public import LeanPool.TwoColoringOneRound.LowerBound.Defs +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000WeakDuality import LeanPool.TwoColoringOneRound.LowerBound.N1000000BCompressionForB import LeanPool.TwoColoringOneRound.LowerBound.N1000000Bound -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation -import LeanPool.TwoColoringOneRound.LowerBound.N1000000RelaxationPsdSoundness +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000Main -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000 diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000MaskAtFacts.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000MaskAtFacts.lean index 4649b3af3b..aed6a69066 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000MaskAtFacts.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000MaskAtFacts.lean @@ -3,14 +3,24 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ - -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000StructureConstants +module + +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000StructureConstants +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000MaskAtFacts -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000MaskAtFacts diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000MaskComplete.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000MaskComplete.lean index f5a0db775a..57b7c24942 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000MaskComplete.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000MaskComplete.lean @@ -3,17 +3,19 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000StructureConstants +import Mathlib.Algebra.Order.Field.Basic import Mathlib.Tactic.IntervalCases -import LeanPool.TwoColoringOneRound.LowerBound.N1000000StructureConstants -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Witness -import LeanPool.TwoColoringOneRound.LowerBound.OverlapType +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000MaskComplete -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000MaskComplete diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000MuLinear.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000MuLinear.lean index d3331bc5dd..dbc3f6dfea 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000MuLinear.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000MuLinear.lean @@ -3,22 +3,21 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Data.List.GetD -import Mathlib.GroupTheory.GroupAction.MultipleTransitivity -import LeanPool.TwoColoringOneRound.LowerBound.Correlation -import LeanPool.TwoColoringOneRound.LowerBound.N1000000MuWitness -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation -import LeanPool.TwoColoringOneRound.LowerBound.N1000000WeakDuality +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000MuWitness +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation +import Mathlib.Data.Rat.Star +import Mathlib.GroupTheory.GroupAction.MultipleTransitivity +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000MuLinear -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000MuLinear diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000MuWitness.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000MuWitness.lean index f2cd2fda3d..5f9e6eff10 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000MuWitness.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000MuWitness.lean @@ -3,19 +3,28 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data +public import Aesop.BuiltinRules +public import Mathlib.Tactic.Attr.Core +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000MuWitness -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000MuWitness -open Distributed2Coloring.LowerBound.N1000000Data /-- Imported auxiliary declaration for the 2-coloring one-round formalization. -/ abbrev LabelTriple := Nat × Nat × Nat diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Objective.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Objective.lean index f02b03ae3b..5ddf1379ad 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Objective.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Objective.lean @@ -3,18 +3,19 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.GroupTheory.GroupAction.MultipleTransitivity -import Mathlib.GroupTheory.GroupAction.Quotient -import LeanPool.TwoColoringOneRound.LowerBound.Correlation -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation -import LeanPool.TwoColoringOneRound.LowerBound.N1000000WeakDuality +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation +import Mathlib.GroupTheory.GroupAction.MultipleTransitivity +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000Objective -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000Objective diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000OrbitCounting.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000OrbitCounting.lean index 86ee79b414..9d6778c528 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000OrbitCounting.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000OrbitCounting.lean @@ -3,19 +3,29 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Data.Fintype.CardEmbedding -import LeanPool.TwoColoringOneRound.LowerBound.N1000000AvailFrom +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000AvailFrom +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000OrbitalBasis import LeanPool.TwoColoringOneRound.LowerBound.N1000000MaskAtFacts -import LeanPool.TwoColoringOneRound.LowerBound.N1000000OrbitalBasis -import LeanPool.TwoColoringOneRound.LowerBound.N1000000PairTransitivity -import LeanPool.TwoColoringOneRound.LowerBound.N1000000StructureConstants +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Fintype.CardEmbedding +import Mathlib.Data.Nat.Bitwise +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000OrbitCounting -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000OrbitCounting @@ -135,7 +145,8 @@ theorem baseOrbit_freeCoord_outside {k : DirIdx} (u : BaseOrbit k) (j : FreeCol ge_three_of_ne_base (x := u.1.1 j.1) (h0 := hne ⟨0, by decide⟩) (h1 := hne ⟨1, by decide⟩) (h2 := hne ⟨2, by decide⟩) -private def encodeBaseOrbit (k : DirIdx) (u : BaseOrbit k) : FreeCol k ↪ AvailFrom3 := +/-- Encode the free coordinates of a base orbit as an embedding into available symbols. -/ +def encodeBaseOrbit (k : DirIdx) (u : BaseOrbit k) : FreeCol k ↪ AvailFrom3 := ⟨fun j => ⟨u.1.1 j.1, baseOrbit_freeCoord_outside (u := u) (j := j)⟩, by intro j₁ j₂ hEq have : u.1.1 j₁.1 = u.1.1 j₂.1 := by @@ -216,7 +227,7 @@ private theorem decodeTuple_injective (k : DirIdx) (g : FreeCol k ↪ AvailFrom3 /-- Imported auxiliary declaration for the 2-coloring one-round formalization. -/ noncomputable def decodeVertex (k : DirIdx) (g : FreeCol k ↪ AvailFrom3) : V := - ⟨decodeTuple (k := k) g, decodeTuple_injective (k := k) g⟩ + ⟨decodeTuple (k := k) g, by exact decodeTuple_injective (k := k) g⟩ private lemma decide_base_eq_decodeVertex_eq_decide_colMatch (k : DirIdx) (g : FreeCol k ↪ AvailFrom3) @@ -367,8 +378,8 @@ noncomputable def baseOrbitEquivEmbedding (k : DirIdx) : BaseOrbit k ≃ (FreeCol k ↪ AvailFrom3) where toFun := encodeBaseOrbit k invFun := decodeBaseOrbit k - left_inv := decode_encode_id k - right_inv := encode_decode_id k + left_inv := by exact decode_encode_id k + right_inv := by exact encode_decode_id k theorem baseOrbit_card (k : DirIdx) : Fintype.card (BaseOrbit k) = baseTypeCount k := by classical diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000OrbitalBasis.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000OrbitalBasis.lean index 3b193b8759..fe045b42da 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000OrbitalBasis.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000OrbitalBasis.lean @@ -3,20 +3,26 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000PairTransitivity +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000StructureConstants +public import Mathlib.LinearAlgebra.Matrix.Defs +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order import Mathlib.Tactic.FinCases -import Mathlib.Data.Matrix.Basic -import LeanPool.TwoColoringOneRound.LowerBound.Correlation -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data -import LeanPool.TwoColoringOneRound.LowerBound.N1000000PairTransitivity -import LeanPool.TwoColoringOneRound.LowerBound.N1000000StructureConstants -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Witness +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000OrbitalBasis -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000OrbitalBasis diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000PairTransitivity.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000PairTransitivity.lean index 9be78f0985..e7174c896f 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000PairTransitivity.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000PairTransitivity.lean @@ -3,18 +3,28 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Common -import Mathlib.Data.Nat.Bitwise -import LeanPool.TwoColoringOneRound.LowerBound.Correlation -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data -import LeanPool.TwoColoringOneRound.LowerBound.N1000000StructureConstants +public import LeanPool.TwoColoringOneRound.LowerBound.Correlation +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data +public import LeanPool.TwoColoringOneRound.LowerBound.OverlapType +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Nat.Bitwise +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000PairTransitivity -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000PairTransitivity @@ -23,7 +33,6 @@ open scoped BigOperators open Distributed2Coloring.LowerBound.Correlation open Distributed2Coloring.LowerBound.N1000000Data -open Distributed2Coloring.LowerBound.N1000000StructureConstants /-- Imported auxiliary declaration for the 2-coloring one-round formalization. -/ abbrev n : Nat := N1000000Data.n diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Relaxation.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Relaxation.lean index d436aeb11c..eff2aa156c 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Relaxation.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Relaxation.lean @@ -3,16 +3,19 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.LowerBound.Correlation -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Witness -import LeanPool.TwoColoringOneRound.LowerBound.N1000000WeakDuality +public import LeanPool.TwoColoringOneRound.LowerBound.Correlation +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Witness +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000WeakDuality +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000Relaxation diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000RelaxationPsdSoundness.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000RelaxationPsdSoundness.lean index bd7bbba73b..60ace474e4 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000RelaxationPsdSoundness.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000RelaxationPsdSoundness.lean @@ -3,18 +3,21 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.LinearAlgebra.Matrix.PosDef -import LeanPool.TwoColoringOneRound.LowerBound.CorrAvgMatrix -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation -import LeanPool.TwoColoringOneRound.LowerBound.N1000000WeakDuality -import LeanPool.TwoColoringOneRound.LowerBound.N1000000WedderburnData +public import LeanPool.TwoColoringOneRound.LowerBound.CorrAvgMatrix +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Relaxation +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000WedderburnData +import Mathlib.Data.Rat.Star +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000RelaxationPsdSoundness -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000RelaxationPsdSoundness diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000StructureConstants.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000StructureConstants.lean index 798483d02b..fdfdbd3a7d 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000StructureConstants.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000StructureConstants.lean @@ -3,17 +3,28 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ - -import Mathlib.Tactic.Common +module + +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Witness +public import LeanPool.TwoColoringOneRound.LowerBound.OverlapType +public import Mathlib.Data.Nat.Factorial.Basic +public import Mathlib.Data.Rat.Init +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order import Mathlib.Tactic.FinCases -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Witness -import LeanPool.TwoColoringOneRound.LowerBound.OverlapType +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000StructureConstants -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000StructureConstants diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Transitivity.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Transitivity.lean index 2f38446653..d820f09b1e 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Transitivity.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Transitivity.lean @@ -3,21 +3,21 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.GroupTheory.GroupAction.MultipleTransitivity -import LeanPool.TwoColoringOneRound.LowerBound.Correlation -import LeanPool.TwoColoringOneRound.LowerBound.N1000000AvailFrom +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000OrbitCounting import LeanPool.TwoColoringOneRound.LowerBound.N1000000MaskComplete -import LeanPool.TwoColoringOneRound.LowerBound.N1000000OrbitalBasis -import LeanPool.TwoColoringOneRound.LowerBound.N1000000OrbitCounting -import LeanPool.TwoColoringOneRound.LowerBound.N1000000PairTransitivity -import LeanPool.TwoColoringOneRound.LowerBound.N1000000StructureConstants +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.GroupTheory.GroupAction.MultipleTransitivity +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000Transitivity -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000Transitivity diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000WeakDuality.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000WeakDuality.lean index e469d490db..37b8a28e7d 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000WeakDuality.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000WeakDuality.lean @@ -3,15 +3,19 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data -import LeanPool.TwoColoringOneRound.LowerBound.Certificate -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Z +public import LeanPool.TwoColoringOneRound.LowerBound.Certificate +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Z +import Mathlib.Data.Rat.Star +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000WeakDuality -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000WeakDuality @@ -36,7 +40,8 @@ abbrev Mu := Fin muSupport.size def xEdge (x : Var → Q) : Q := x ⟨edgeVar, by decide⟩ -private def defaultMu : Nat × Array Int × Int := (0, #[], 0) +/-- The empty dual-certificate entry used as a default value. -/ +def defaultMu : Nat × Array Int × Int := (0, #[], 0) /-- Imported auxiliary declaration for the 2-coloring one-round formalization. -/ def muNumD (k : Mu) : Int := diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000WedderburnData.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000WedderburnData.lean index 4199cceead..e213fc3e61 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000WedderburnData.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000WedderburnData.lean @@ -3,15 +3,23 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Common -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Witness +public import Mathlib.Data.Rat.Init +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000WedderburnData -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000WedderburnData diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Witness.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Witness.lean index 0942af1b19..c86ed230ad 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Witness.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Witness.lean @@ -3,18 +3,27 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data +public import Aesop.BuiltinRules +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000Witness -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000Witness -open Distributed2Coloring.LowerBound.N1000000Data /-- Imported auxiliary declaration for the 2-coloring one-round formalization. -/ abbrev masks : Array Nat := diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Z.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Z.lean index 06a5dd0456..53dec2be4e 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000Z.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000Z.lean @@ -3,16 +3,20 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data -import LeanPool.TwoColoringOneRound.LowerBound.N1000000ZData +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Data +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000ZData +public import Mathlib.LinearAlgebra.Matrix.PosDef import Mathlib.Data.Rat.Star -import Mathlib.LinearAlgebra.Matrix.PosDef +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.LowerBound.N1000000Z -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000Z diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N1000000ZData.lean b/LeanPool/TwoColoringOneRound/LowerBound/N1000000ZData.lean index 8d971b3874..e8b3538842 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N1000000ZData.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N1000000ZData.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Init /-! Auto-generated exact LDLᵀ data for the dual blocks `Z_r`. -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound namespace N1000000ZData diff --git a/LeanPool/TwoColoringOneRound/LowerBound/N9.lean b/LeanPool/TwoColoringOneRound/LowerBound/N9.lean index 2b053bbf1a..614b4796dd 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/N9.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/N9.lean @@ -3,14 +3,23 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module +public import Mathlib.Data.Nat.Cast.Prod + +public import LeanPool.TwoColoringOneRound.LowerBound.Defs +public import Mathlib.Algebra.Group.End +public import Mathlib.Data.Fintype.Prod +import Mathlib.Algebra.Order.Field.Basic import Mathlib.Data.Fintype.CardEmbedding +import Mathlib.Data.Rat.Cast.Order import Mathlib.Data.ZMod.Basic import Mathlib.Logic.Equiv.Fin.Rotate -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import LeanPool.TwoColoringOneRound.LowerBound.Defs +import Mathlib.Tactic.Linarith.Frontend +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.Positivity.Finset /-! ## Warm-up: `n = 9` gives `> 20%` @@ -24,6 +33,8 @@ This file proves a small “warm-up” theorem matching the report: All proofs are kernel-checked (no `native_decide`). -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound @@ -198,7 +209,8 @@ noncomputable def cyclePairToEdgeExtraK : CyclePairs → EdgeExtraK exact idx4_ne_remIndex k i hIdx ⟨(e, (r, k)), hr⟩ -private def choice (k : Fin 5) : Fin 5 → Option (Fin 4) := +/-- The five explicit partial choices used in the nine-symbol lower bound. -/ +def choice (k : Fin 5) : Fin 5 → Option (Fin 4) := match k.1 with | 0 => fun i => diff --git a/LeanPool/TwoColoringOneRound/LowerBound/OverlapType.lean b/LeanPool/TwoColoringOneRound/LowerBound/OverlapType.lean index 9752b622f2..33a67201d1 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/OverlapType.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/OverlapType.lean @@ -3,16 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ - -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +module + +public import Mathlib.Data.Finset.Card +public import Mathlib.Data.Fintype.Basic +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! Overlap types for ordered pairs of vertices can be encoded as `3×3` partial permutation matrices. We represent such a matrix as a `Nat` bitmask with 9 bits in row-major order. @@ -21,6 +22,8 @@ This file provides the core combinatorial operations needed to compute the orbit constants for fixed `n` (eventually instantiated to `n = 10^6`). -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound diff --git a/LeanPool/TwoColoringOneRound/LowerBound/Sanity.lean b/LeanPool/TwoColoringOneRound/LowerBound/Sanity.lean index 512f8ee6e8..7b935dbd27 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/Sanity.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/Sanity.lean @@ -3,14 +3,20 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import Mathlib.Data.Fintype.CardEmbedding -import Mathlib.Data.Fintype.Sum -import Mathlib.Order.Interval.Finset.Fin +public import Mathlib.Order.Interval.Finset.Fin -import LeanPool.TwoColoringOneRound.LowerBound.Defs -import LeanPool.TwoColoringOneRound.LowerBound.EdgePatterns -import LeanPool.TwoColoringOneRound.LowerBound.LocalRule +public import LeanPool.TwoColoringOneRound.LowerBound.LocalRule +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Data.Fintype.CardEmbedding +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow +import Mathlib.Tactic.Positivity.Finset /-! Small “sanity checks” intended to validate that the Lean definitions in `Defs.lean` match the @@ -20,6 +26,8 @@ This file proves, in a fully kernel-checked way, that for `n = 5` there is an ex with monochromatic edge fraction exactly `1/5`. -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound diff --git a/LeanPool/TwoColoringOneRound/LowerBound/UpperBound.lean b/LeanPool/TwoColoringOneRound/LowerBound/UpperBound.lean index 1a5944f1f5..a78ac65f2e 100644 --- a/LeanPool/TwoColoringOneRound/LowerBound/UpperBound.lean +++ b/LeanPool/TwoColoringOneRound/LowerBound/UpperBound.lean @@ -3,18 +3,14 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module +public import LeanPool.TwoColoringOneRound.LowerBound.LocalRule +public import Mathlib.Order.Interval.Finset.Fin +import Mathlib.Algebra.Order.Field.Basic import Mathlib.Data.Fintype.CardEmbedding -import Mathlib.Data.Fintype.Sum import Mathlib.RingTheory.Polynomial.Pochhammer -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.NormNum -import LeanPool.TwoColoringOneRound.LowerBound.Defs -import LeanPool.TwoColoringOneRound.LowerBound.EdgePatterns -import LeanPool.TwoColoringOneRound.LowerBound.LocalRule +import Mathlib.Tactic.Positivity.Finset /-! ## Upper bounds (explicit colorings) @@ -31,6 +27,8 @@ The coloring used here is the simple rounding-based local rule from the report: * apply a fixed local rule `g` to the rounded bits. -/ +@[expose] public section + namespace Distributed2Coloring.LowerBound diff --git a/LeanPool/TwoColoringOneRound/MainResults.lean b/LeanPool/TwoColoringOneRound/MainResults.lean index ff07570ea6..5a3609a60e 100644 --- a/LeanPool/TwoColoringOneRound/MainResults.lean +++ b/LeanPool/TwoColoringOneRound/MainResults.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.Definitions +public import LeanPool.TwoColoringOneRound.Definitions import LeanPool.TwoColoringOneRound.Reduction +import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Final +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Distributed2Coloring: Main results @@ -17,6 +22,8 @@ This file collects the public-facing theorems connecting: We also package these bounds as statements about an infimum `p⋆` over all measurable local rules. -/ +@[expose] public section + namespace Distributed2Coloring open scoped unitInterval diff --git a/LeanPool/TwoColoringOneRound/Reduction.lean b/LeanPool/TwoColoringOneRound/Reduction.lean index 982f9095e5..13250f08f0 100644 --- a/LeanPool/TwoColoringOneRound/Reduction.lean +++ b/LeanPool/TwoColoringOneRound/Reduction.lean @@ -3,14 +3,14 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.Definitions -import LeanPool.TwoColoringOneRound.LowerBound.Defs -import LeanPool.TwoColoringOneRound.LowerBound.N1000000Main +public import LeanPool.TwoColoringOneRound.Definitions +public import LeanPool.TwoColoringOneRound.LowerBound.N1000000Main import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Final -import Mathlib.Logic.Equiv.Set -import Mathlib.MeasureTheory.Constructions.Pi -import Mathlib.MeasureTheory.Integral.Lebesgue.Add +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Reduction: local rules → finite coloring bound @@ -30,6 +30,8 @@ already-formalized explicit construction to conclude `p ≤ 0.24118` for some `ClassicalAlgorithm`. -/ +@[expose] public section + namespace Distributed2Coloring open MeasureTheory diff --git a/LeanPool/TwoColoringOneRound/SimpleBounds.lean b/LeanPool/TwoColoringOneRound/SimpleBounds.lean index e1d6998a63..01f3be04ae 100644 --- a/LeanPool/TwoColoringOneRound/SimpleBounds.lean +++ b/LeanPool/TwoColoringOneRound/SimpleBounds.lean @@ -3,19 +3,16 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.Definitions -import Mathlib.Algebra.BigOperators.Group.Finset.Defs -import Mathlib.Data.Fin.Tuple.Basic -import Mathlib.MeasureTheory.Constructions.Pi -import Mathlib.MeasureTheory.Constructions.UnitInterval -import Mathlib.Order.Interval.Set.Disjoint -import Mathlib.Tactic.Common -import Mathlib.Tactic.NormNum +public import LeanPool.TwoColoringOneRound.Definitions +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.TwoColoringOneRound.SimpleBounds -/ +@[expose] public section + namespace Distributed2Coloring open MeasureTheory diff --git a/LeanPool/TwoColoringOneRound/UpperBound.lean b/LeanPool/TwoColoringOneRound/UpperBound.lean index 8c6397c71b..78b703d8b4 100644 --- a/LeanPool/TwoColoringOneRound/UpperBound.lean +++ b/LeanPool/TwoColoringOneRound/UpperBound.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param +public import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Upper-bound modules for 2-coloring cycles in one round This module re-exports the vendored formalization imported from `2-coloring-1-round`. -/ + +@[expose] public section diff --git a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param.lean b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param.lean index b27409db9b..0cf49d18d2 100644 --- a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param.lean +++ b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param.lean @@ -3,16 +3,22 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Basic -import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.ComputeP -import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Value -import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Bound -import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Regions -import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Final +public import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Basic +public import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.ComputeP +public import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Value +public import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Bound +public import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Regions +public import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Final +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # Recursive three-parameter upper-bound construction This module re-exports the vendored formalization imported from `2-coloring-1-round`. -/ + +@[expose] public section diff --git a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Basic.lean b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Basic.lean index 317f4edcf6..58f22471d5 100644 --- a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Basic.lean +++ b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Basic.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.Definitions -import Mathlib.MeasureTheory.Constructions.UnitInterval -import Mathlib.MeasureTheory.MeasurableSpace.Constructions +public import LeanPool.TwoColoringOneRound.Definitions +import Mathlib.Tactic.Positivity.Finset /-! The “three-parameter recursive cutoff” construction (a radius-1 factor-of-i.i.d. triple rule). @@ -16,6 +16,8 @@ parameters `(t, t1, t2)`. Later files will prove the quantitative bound `ClassicalAlgorithm.p recursive3ParamAlg < 24118/100000`. -/ +@[expose] public section + namespace Distributed2Coloring open MeasureTheory diff --git a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Bound.lean b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Bound.lean index cfc08a5632..7b15c876f0 100644 --- a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Bound.lean +++ b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Bound.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module +public import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.ComputeP import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Value -import Mathlib.MeasureTheory.Integral.Prod +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! ## Final bound for the 3-parameter recursive algorithm @@ -14,6 +18,8 @@ This file completes the computation of `ClassicalAlgorithm.p recursive3ParamAlg` numerical upper bound `p < 24118/100000`. -/ +@[expose] public section + namespace Distributed2Coloring open MeasureTheory diff --git a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/ComputeP.lean b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/ComputeP.lean index 3f55f36c1b..8bf14f936b 100644 --- a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/ComputeP.lean +++ b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/ComputeP.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Basic -import Mathlib.MeasureTheory.Integral.Marginal -import Mathlib.MeasureTheory.Integral.Lebesgue.Add +public import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Basic +import Mathlib.Tactic.Positivity.Finset /-! Computation of `ClassicalAlgorithm.p` for `recursive3ParamAlg`. @@ -16,6 +16,8 @@ This file will prove that the 3-parameter recursive cutoff algorithm from `ClassicalAlgorithm.p recursive3ParamAlg < 24118/100000`. -/ +@[expose] public section + namespace Distributed2Coloring open MeasureTheory diff --git a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Final.lean b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Final.lean index eef16b3d85..6adbfcee4d 100644 --- a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Final.lean +++ b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Final.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module +public import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Basic import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Regions -import Mathlib.Tactic.Common -import Mathlib.Tactic.NormNum +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! ## Final upper bound for the 3-parameter recursive algorithm @@ -17,6 +20,8 @@ This file combines the four `b`-regions computed in `ClassicalAlgorithm.p recursive3ParamAlg < 24118/100000`. -/ +@[expose] public section + namespace Distributed2Coloring open MeasureTheory diff --git a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Regions.lean b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Regions.lean index 5ebb84f745..85930b11bb 100644 --- a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Regions.lean +++ b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Regions.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Bound +public import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Bound +import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.Value +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! ## Remaining region computations for the 3-parameter recursive algorithm @@ -13,6 +18,8 @@ This file computes the contributions to `ClassicalAlgorithm.p recursive3ParamAlg `b < t1` and `t1 ≤ b < t2` regions. -/ +@[expose] public section + namespace Distributed2Coloring open MeasureTheory diff --git a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Value.lean b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Value.lean index 70d9e532c5..b51a9cd4f0 100644 --- a/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Value.lean +++ b/LeanPool/TwoColoringOneRound/UpperBound/Recursive3Param/Value.lean @@ -3,13 +3,10 @@ Copyright (c) 2026 Jukka Suomela. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jukka Suomela -/ +module -import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.ComputeP +public import LeanPool.TwoColoringOneRound.UpperBound.Recursive3Param.ComputeP import Mathlib.Analysis.SpecialFunctions.Integrals.Basic -import Mathlib.MeasureTheory.Measure.Typeclasses.NullSingletonClass -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Ring /-! Exact computation of `ClassicalAlgorithm.p recursive3ParamAlg`. @@ -17,6 +14,8 @@ The final result is the dyadic rational value `94835 / 393216 ≈ 0.24117787679 < 24118/100000`. -/ +@[expose] public section + namespace Distributed2Coloring open MeasureTheory diff --git a/LeanPool/UlmsTheorem.lean b/LeanPool/UlmsTheorem.lean index bc7aa82893..b92570a6b8 100644 --- a/LeanPool/UlmsTheorem.lean +++ b/LeanPool/UlmsTheorem.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module -import LeanPool.UlmsTheorem.Regression +public import LeanPool.UlmsTheorem.Regression +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset /-! # Ulm's theorem for countable reduced abelian p-groups @@ -16,3 +20,5 @@ Main declarations: `UlmsTheorem.ulm_theorem` Tags: abelian-groups, p-groups, classification-theorems, ordinal-filtrations, ulm-invariants MSC: 20K10 -/ + +@[expose] public section diff --git a/LeanPool/UlmsTheorem/Basic.lean b/LeanPool/UlmsTheorem/Basic.lean index 0f5c316e9f..8aefd49c6c 100644 --- a/LeanPool/UlmsTheorem/Basic.lean +++ b/LeanPool/UlmsTheorem/Basic.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module -import Mathlib.Algebra.Group.Subgroup.Defs -import Mathlib.Algebra.Group.Subgroup.Lattice -import Mathlib.Algebra.Module.NatInt -import Mathlib.Data.Nat.Prime.Defs +public import Mathlib.Algebra.Group.Subgroup.Defs +public import Mathlib.Algebra.Group.Subgroup.Lattice +public import Mathlib.Algebra.Module.NatInt +public import Mathlib.Data.Nat.Prime.Defs + +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # Basic imports and shared notation @@ -34,6 +38,8 @@ Throughout we work with additive abelian groups. - `ulmLength p G` : least α with p^α G = 0 (for reduced groups) -/ +@[expose] public section + namespace UlmsTheorem end UlmsTheorem diff --git a/LeanPool/UlmsTheorem/PGroups/Basic.lean b/LeanPool/UlmsTheorem/PGroups/Basic.lean index 76603bf191..5b6baadfad 100644 --- a/LeanPool/UlmsTheorem/PGroups/Basic.lean +++ b/LeanPool/UlmsTheorem/PGroups/Basic.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module -import LeanPool.UlmsTheorem.Basic +public import LeanPool.UlmsTheorem.Basic + +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # Basic shared setup for reduced abelian p-groups @@ -13,6 +17,8 @@ This file is the new entry point for shared p-group infrastructure. At the moment it re-exports the project-wide basic setup from `Lib.Basic`. -/ +@[expose] public section + namespace UlmsTheorem end UlmsTheorem diff --git a/LeanPool/UlmsTheorem/PGroups/Defs.lean b/LeanPool/UlmsTheorem/PGroups/Defs.lean index cf6c7ae811..0e4f63b805 100644 --- a/LeanPool/UlmsTheorem/PGroups/Defs.lean +++ b/LeanPool/UlmsTheorem/PGroups/Defs.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module -import LeanPool.UlmsTheorem.PGroups.Heights +public import LeanPool.UlmsTheorem.PGroups.Heights + +import Mathlib.Data.Finset.Attr +import Mathlib.Tactic.Bound.Init +import Mathlib.Tactic.Finiteness.Attr +import Mathlib.Tactic.SetLike /-! # Reduced abelian p-groups: legacy compatibility import @@ -20,6 +26,8 @@ Existing imports of `Lib.PGroups.Defs` therefore continue to work while the library is migrated to the new layout. -/ +@[expose] public section + namespace UlmsTheorem end UlmsTheorem diff --git a/LeanPool/UlmsTheorem/PGroups/Heights.lean b/LeanPool/UlmsTheorem/PGroups/Heights.lean index bd6ab7489e..6dfde4fa4e 100644 --- a/LeanPool/UlmsTheorem/PGroups/Heights.lean +++ b/LeanPool/UlmsTheorem/PGroups/Heights.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module -import Mathlib.Data.ENat.Lattice -import Mathlib.Tactic.Cases -import LeanPool.UlmsTheorem.PGroups.UlmSubgroups +public import Mathlib.Data.ENat.Lattice +public import LeanPool.UlmsTheorem.PGroups.UlmSubgroups +import Mathlib.Algebra.Module.NatInt /-! # Reducedness and height theory @@ -15,6 +16,8 @@ This file contains the reducedness predicate used in the project and the basic finite `p`-height calculus. -/ +@[expose] public section + namespace UlmsTheorem variable (p : ℕ) diff --git a/LeanPool/UlmsTheorem/PGroups/Morphisms.lean b/LeanPool/UlmsTheorem/PGroups/Morphisms.lean index a02ca7985f..bb1f828c76 100644 --- a/LeanPool/UlmsTheorem/PGroups/Morphisms.lean +++ b/LeanPool/UlmsTheorem/PGroups/Morphisms.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module -import LeanPool.UlmsTheorem.Ulm.Invariance +public import LeanPool.UlmsTheorem.Ulm.Invariance + +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Rat.Floor +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.NormNum.GCD /-! # Morphisms and invariance lemmas @@ -13,6 +19,8 @@ Stable entry point for isomorphism lemmas connecting Ulm subgroups, filtered p-socle layers, and the classical `P_α / P_{α+1}` Ulm invariants. -/ +@[expose] public section + namespace UlmsTheorem end UlmsTheorem diff --git a/LeanPool/UlmsTheorem/PGroups/Socle.lean b/LeanPool/UlmsTheorem/PGroups/Socle.lean index 11b8da4a17..3ce708b14b 100644 --- a/LeanPool/UlmsTheorem/PGroups/Socle.lean +++ b/LeanPool/UlmsTheorem/PGroups/Socle.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module -import Mathlib.Algebra.Module.ZMod -import LeanPool.UlmsTheorem.PGroups.Heights +public import Mathlib.Algebra.Module.ZMod +public import LeanPool.UlmsTheorem.PGroups.UlmSubgroups /-! # Socle-level constructions @@ -13,6 +14,8 @@ import LeanPool.UlmsTheorem.PGroups.Heights This file contains the p-socle and its interaction with the Ulm filtration. -/ +@[expose] public section + namespace UlmsTheorem open Ordinal diff --git a/LeanPool/UlmsTheorem/PGroups/Subgroups.lean b/LeanPool/UlmsTheorem/PGroups/Subgroups.lean index 87821559f1..8826ba95b8 100644 --- a/LeanPool/UlmsTheorem/PGroups/Subgroups.lean +++ b/LeanPool/UlmsTheorem/PGroups/Subgroups.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module -import LeanPool.UlmsTheorem.PGroups.Basic +public import Mathlib.Algebra.Group.Nat.Defs +public import Mathlib.Algebra.Group.Subgroup.Lattice +import Mathlib.Algebra.Module.NatInt /-! # Subgroup-level algebra for reduced abelian p-groups @@ -14,6 +17,8 @@ development: the natural-number powers `pPow` and the image-of-multiplication construction `pImage`. -/ +@[expose] public section + namespace UlmsTheorem variable (p : ℕ) diff --git a/LeanPool/UlmsTheorem/PGroups/UlmInvariants.lean b/LeanPool/UlmsTheorem/PGroups/UlmInvariants.lean index 02b1bdc758..80586f58ae 100644 --- a/LeanPool/UlmsTheorem/PGroups/UlmInvariants.lean +++ b/LeanPool/UlmsTheorem/PGroups/UlmInvariants.lean @@ -3,10 +3,14 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module +public import Mathlib.Algebra.Field.ZMod +public import LeanPool.UlmsTheorem.PGroups.Socle +public import LeanPool.UlmsTheorem.PGroups.Heights +public import Mathlib.LinearAlgebra.Dimension.Basic +public import Mathlib.LinearAlgebra.Isomorphisms import Mathlib.LinearAlgebra.Dimension.DivisionRing -import Mathlib.Algebra.Field.ZMod -import LeanPool.UlmsTheorem.PGroups.Socle /-! # Ulm invariants @@ -32,6 +36,8 @@ not the classical Ulm invariant used in Ulm's theorem. - Kaplansky, "Infinite Abelian Groups", Theorem 14 -/ +@[expose] public section + namespace UlmsTheorem open Ordinal Cardinal diff --git a/LeanPool/UlmsTheorem/PGroups/UlmSubgroups.lean b/LeanPool/UlmsTheorem/PGroups/UlmSubgroups.lean index 8c1f20b7dd..c0e8d92e8c 100644 --- a/LeanPool/UlmsTheorem/PGroups/UlmSubgroups.lean +++ b/LeanPool/UlmsTheorem/PGroups/UlmSubgroups.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module -import Mathlib.SetTheory.Ordinal.Arithmetic -import Mathlib.Algebra.Group.Subgroup.Map -import LeanPool.UlmsTheorem.PGroups.Subgroups +public import Mathlib.SetTheory.Ordinal.Arithmetic +public import Mathlib.Algebra.Group.Subgroup.Map +public import LeanPool.UlmsTheorem.PGroups.Subgroups +import Mathlib.Algebra.Module.NatInt /-! # Ordinal Ulm subgroups @@ -15,6 +17,8 @@ This file contains the transfinite Ulm filtration `ulmSubgroup` and its basic structural lemmas. -/ +@[expose] public section + namespace UlmsTheorem open Ordinal diff --git a/LeanPool/UlmsTheorem/Regression.lean b/LeanPool/UlmsTheorem/Regression.lean index 5e40214295..05957f73fd 100644 --- a/LeanPool/UlmsTheorem/Regression.lean +++ b/LeanPool/UlmsTheorem/Regression.lean @@ -3,8 +3,15 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module +public import LeanPool.UlmsTheorem.PGroups.UlmInvariants import LeanPool.UlmsTheorem.Ulm.Theorem +import Mathlib.Algebra.NoZeroSMulDivisors.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.LinearAlgebra.Dimension.Finite +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset /-! DIFFERENTIAL TEST OF `ulm_theorem` AGAINST INDEPENDENTLY-KNOWN GROUND TRUTH. @@ -48,6 +55,8 @@ Two checks that cannot live in a build, recorded here so they are not lost: from hand-computed finite instances like this one. -/ +@[expose] public section + namespace UlmsTheorem namespace UlmDifferentialRegression diff --git a/LeanPool/UlmsTheorem/Ulm/Classification.lean b/LeanPool/UlmsTheorem/Ulm/Classification.lean index 898d8075cc..2ec4ef0058 100644 --- a/LeanPool/UlmsTheorem/Ulm/Classification.lean +++ b/LeanPool/UlmsTheorem/Ulm/Classification.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module -import LeanPool.UlmsTheorem.Ulm.Extension +public import LeanPool.UlmsTheorem.Ulm.Extension +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset /-! # Classification machinery for countable reduced abelian p-groups @@ -14,6 +18,8 @@ the back-and-forth construction on finite partial isomorphisms and the final isomorphism-from-invariants statement. -/ +@[expose] public section + namespace UlmsTheorem open Ordinal @@ -39,13 +45,13 @@ hypothesis, and applying it to the inverse stage supplies the back hypothesis. abbrev BFIsoStep := UlmStage p (G := G) (H := H) /-- Policy for extending a finite stage so that it covers a chosen source element. -/ -private abbrev BFForthPolicy := +abbrev BFForthPolicy := ∀ s : BFIsoStep p (G := G) (H := H), ∀ g : G, ∃ (s' : BFIsoStep p (G := G) (H := H)) (hAA : s.A ≤ s'.A) (_hBB : s.B ≤ s'.B), g ∈ s'.A ∧ ∀ a : s.A, (s'.e ⟨a.val, hAA a.prop⟩ : H) = s.e a /-- Policy for extending a finite stage so that it covers a chosen target element. -/ -private abbrev BFBackPolicy := +abbrev BFBackPolicy := ∀ s : BFIsoStep p (G := G) (H := H), ∀ h : H, ∃ (s' : BFIsoStep p (G := G) (H := H)) (hAA : s.A ≤ s'.A) (_hBB : s.B ≤ s'.B), h ∈ s'.B ∧ ∀ a : s.A, (s'.e ⟨a.val, hAA a.prop⟩ : H) = s.e a diff --git a/LeanPool/UlmsTheorem/Ulm/Extension.lean b/LeanPool/UlmsTheorem/Ulm/Extension.lean index 2d33848507..7a225b3098 100644 --- a/LeanPool/UlmsTheorem/Ulm/Extension.lean +++ b/LeanPool/UlmsTheorem/Ulm/Extension.lean @@ -3,11 +3,21 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module +public import Mathlib.RingTheory.TwoSidedIdeal.Operations + +public import Mathlib.Algebra.Module.Torsion.Basic + +public import Mathlib.RingTheory.FractionalIdeal.Basic + +public import Mathlib.CategoryTheory.Types.Basic + +public import LeanPool.UlmsTheorem.PGroups.UlmInvariants +public import LeanPool.UlmsTheorem.Ulm.Pure +public import Mathlib.RingTheory.Finiteness.Defs import Mathlib.GroupTheory.FiniteAbelian.Basic import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas -import LeanPool.UlmsTheorem.PGroups.UlmInvariants -import LeanPool.UlmsTheorem.Ulm.Pure /-! # Extension lemmas for Ulm's theorem @@ -17,6 +27,8 @@ direction of Ulm's theorem, formulated against the classical invariants `dim_{ℤ/pℤ}(P_α / P_{α+1})`. -/ +@[expose] public section + namespace UlmsTheorem open Ordinal diff --git a/LeanPool/UlmsTheorem/Ulm/Invariance.lean b/LeanPool/UlmsTheorem/Ulm/Invariance.lean index bf95c639df..ef23bb5497 100644 --- a/LeanPool/UlmsTheorem/Ulm/Invariance.lean +++ b/LeanPool/UlmsTheorem/Ulm/Invariance.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module -import LeanPool.UlmsTheorem.PGroups.UlmInvariants +public import LeanPool.UlmsTheorem.PGroups.UlmInvariants /-! # Invariance of Ulm data under isomorphism @@ -14,6 +15,8 @@ both the Ulm filtration and the classical `P_α / P_{α+1}` quotients, hence the Ulm invariants. -/ +@[expose] public section + namespace UlmsTheorem open Cardinal Ordinal @@ -106,7 +109,8 @@ lemma pSocleAt_map_iso {G H : Type u} [AddCommGroup G] [AddCommGroup H] simpa using hxy simpa [this] using hx -private noncomputable def pSocleAtIso {G H : Type u} [AddCommGroup G] [AddCommGroup H] +/-- Restrict a group isomorphism to the p-socles at the same ordinal stage. -/ +noncomputable def pSocleAtIso {G H : Type u} [AddCommGroup G] [AddCommGroup H] (φ : G ≃+ H) (α : Ordinal) : pSocleAt p α (G := G) ≃+ pSocleAt p α (G := H) where toFun x := ⟨φ x, by rw [← pSocleAt_map_iso (p := p) φ α] diff --git a/LeanPool/UlmsTheorem/Ulm/Pure.lean b/LeanPool/UlmsTheorem/Ulm/Pure.lean index 56705987d2..bdef464451 100644 --- a/LeanPool/UlmsTheorem/Ulm/Pure.lean +++ b/LeanPool/UlmsTheorem/Ulm/Pure.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module +public import LeanPool.UlmsTheorem.PGroups.Heights +public import Mathlib.Data.Nat.Prime.Defs +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Rat.Floor +import Mathlib.Data.Sym.Sym2.Init import Mathlib.RingTheory.Coprime.Lemmas -import LeanPool.UlmsTheorem.PGroups.Socle -import LeanPool.UlmsTheorem.PGroups.UlmSubgroups +import Mathlib.Tactic.NormNum.GCD /-! # Pure subgroups and height-preserving partial maps @@ -15,6 +20,8 @@ This file contains the basic hard-direction infrastructure for Ulm's theorem: ordinal height, p-order, purity, and height-preserving maps on subgroups. -/ +@[expose] public section + namespace UlmsTheorem open Ordinal diff --git a/LeanPool/UlmsTheorem/Ulm/Theorem.lean b/LeanPool/UlmsTheorem/Ulm/Theorem.lean index b823752e16..3818c6063f 100644 --- a/LeanPool/UlmsTheorem/Ulm/Theorem.lean +++ b/LeanPool/UlmsTheorem/Ulm/Theorem.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Elan Roth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Elan Roth -/ +module +public import LeanPool.UlmsTheorem.PGroups.UlmInvariants import LeanPool.UlmsTheorem.Ulm.Classification import LeanPool.UlmsTheorem.Ulm.Invariance +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.Positivity.Finset /-! # Ulm's theorem @@ -13,6 +18,8 @@ import LeanPool.UlmsTheorem.Ulm.Invariance Public entry point for the Ulm-theorem track of the project. -/ +@[expose] public section + namespace UlmsTheorem open Cardinal Ordinal diff --git a/LeanPool/UnconditionalSchauderBasis.lean b/LeanPool/UnconditionalSchauderBasis.lean index 2126377cd6..2dc3b4e946 100644 --- a/LeanPool/UnconditionalSchauderBasis.lean +++ b/LeanPool/UnconditionalSchauderBasis.lean @@ -3,13 +3,13 @@ Copyright (c) 2026 Daniel Smania. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Daniel Smania -/ +module -import Mathlib.Analysis.Complex.Basic -import Mathlib.Analysis.Normed.Field.Basic -import Mathlib.Analysis.Normed.Module.Basic +public import Mathlib.Analysis.Normed.Module.Basic +import Mathlib.Analysis.Complex.Order import Mathlib.Analysis.Normed.Operator.Extend +import Mathlib.Analysis.RCLike.Basic import Mathlib.Topology.Algebra.InfiniteSum.Module -import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.Basic /-! # Unconditional Schauder Bases @@ -22,6 +22,8 @@ Tags: functional-analysis, banach-spaces, schauder-bases MSC: 46B15 -/ +@[expose] public section + /-! # Schauder bases and the finite sign criterion diff --git a/LeanPool/VirasoroProject.lean b/LeanPool/VirasoroProject.lean index e0881495ba..ccc829781d 100644 --- a/LeanPool/VirasoroProject.lean +++ b/LeanPool/VirasoroProject.lean @@ -3,27 +3,33 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module -import LeanPool.VirasoroProject.CentralExtension -import LeanPool.VirasoroProject.CyclicTripleSum -import LeanPool.VirasoroProject.FockSpace -import LeanPool.VirasoroProject.FockSpaceSugawara -import LeanPool.VirasoroProject.HeisenbergAlgebra -import LeanPool.VirasoroProject.IndexTri -import LeanPool.VirasoroProject.IsCentralExtension -import LeanPool.VirasoroProject.LieAlgebraModuleUEA -import LeanPool.VirasoroProject.LieAlgebraRepresentationOfBasis -import LeanPool.VirasoroProject.LieCohomologySmallDegree -import LeanPool.VirasoroProject.LieVerma -import LeanPool.VirasoroProject.SectionSES -import LeanPool.VirasoroProject.Sugawara -import LeanPool.VirasoroProject.ToMathlib -import LeanPool.VirasoroProject.VermaModule -import LeanPool.VirasoroProject.VirasoroAlgebra -import LeanPool.VirasoroProject.VirasoroCocycle -import LeanPool.VirasoroProject.VirasoroVerma -import LeanPool.VirasoroProject.WittAlgebra -import LeanPool.VirasoroProject.WittAlgebraCohomology +public import LeanPool.VirasoroProject.CentralExtension +public import LeanPool.VirasoroProject.CyclicTripleSum +public import LeanPool.VirasoroProject.FockSpace +public import LeanPool.VirasoroProject.FockSpaceSugawara +public import LeanPool.VirasoroProject.HeisenbergAlgebra +public import LeanPool.VirasoroProject.IndexTri +public import LeanPool.VirasoroProject.IsCentralExtension +public import LeanPool.VirasoroProject.LieAlgebraModuleUEA +public import LeanPool.VirasoroProject.LieAlgebraRepresentationOfBasis +public import LeanPool.VirasoroProject.LieCohomologySmallDegree +public import LeanPool.VirasoroProject.LieVerma +public import LeanPool.VirasoroProject.SectionSES +public import LeanPool.VirasoroProject.Sugawara +public import LeanPool.VirasoroProject.ToMathlib +public import LeanPool.VirasoroProject.VermaModule +public import LeanPool.VirasoroProject.VirasoroAlgebra +public import LeanPool.VirasoroProject.VirasoroCocycle +public import LeanPool.VirasoroProject.VirasoroVerma +public import LeanPool.VirasoroProject.WittAlgebra +public import LeanPool.VirasoroProject.WittAlgebraCohomology +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Virasoro Project @@ -35,3 +41,5 @@ Main declarations: `VirasoroProject.VirasoroAlgebra`, `VirasoroProject.sugawaraR Tags: representation-theory, lie-algebras, mathematical-physics, virasoro-algebra MSC: 17B68, 17B56, 81R10 -/ + +@[expose] public section diff --git a/LeanPool/VirasoroProject/CentralChargeCalc.lean b/LeanPool/VirasoroProject/CentralChargeCalc.lean index 7daf322bfa..0999aae142 100644 --- a/LeanPool/VirasoroProject/CentralChargeCalc.lean +++ b/LeanPool/VirasoroProject/CentralChargeCalc.lean @@ -3,12 +3,23 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Algebra.EuclideanDomain.Field -import Mathlib.Algebra.Lie.OfAssociative +module + +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Algebra.CharZero.Defs +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Algebra.Group.Action.Pi +public import Mathlib.Algebra.GroupWithZero.Action.Defs +public import Mathlib.Data.Nat.Factorial.Basic +public import Mathlib.Data.Rat.Defs import Mathlib.Algebra.Order.Ring.Star -import Mathlib.Analysis.Normed.Field.Lemmas +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.ConditionallyCompleteOrder import Mathlib.Data.Int.Star import Mathlib.RingTheory.Henselian +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Central charge calculations for Sugawara constructions @@ -42,6 +53,8 @@ central charge, Sugawara construction -/ +@[expose] public section + namespace VirasoroProject diff --git a/LeanPool/VirasoroProject/CentralExtension.lean b/LeanPool/VirasoroProject/CentralExtension.lean index e2711cee6e..201a29eb42 100644 --- a/LeanPool/VirasoroProject/CentralExtension.lean +++ b/LeanPool/VirasoroProject/CentralExtension.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import LeanPool.VirasoroProject.LieCohomologySmallDegree +module + +public import LeanPool.VirasoroProject.LieCohomologySmallDegree /-! # Central extensions of Lie algebras defined by 2-cocycles @@ -35,6 +37,8 @@ Lie algebra, central extension, 2-cocycle -/ +@[expose] public section + namespace VirasoroProject universe u diff --git a/LeanPool/VirasoroProject/Commutator.lean b/LeanPool/VirasoroProject/Commutator.lean index 6c0d27e53e..626dfb5172 100644 --- a/LeanPool/VirasoroProject/Commutator.lean +++ b/LeanPool/VirasoroProject/Commutator.lean @@ -3,8 +3,12 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module + +public import Mathlib.Algebra.Algebra.Defs +public import Mathlib.Algebra.Field.Defs +public import Mathlib.Algebra.Module.LinearMap.End import Mathlib.Algebra.Algebra.Basic -import Mathlib.Algebra.EuclideanDomain.Field /-! # Commutators of linear maps @@ -18,6 +22,8 @@ This file defines commutators of linear operators, and proves a few useful prope -/ +@[expose] public section + namespace LinearMap diff --git a/LeanPool/VirasoroProject/CyclicTripleSum.lean b/LeanPool/VirasoroProject/CyclicTripleSum.lean index 478ea56a51..63a52d0dc8 100644 --- a/LeanPool/VirasoroProject/CyclicTripleSum.lean +++ b/LeanPool/VirasoroProject/CyclicTripleSum.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Algebra.Module.LinearMap.Defs +module + +public import Mathlib.Algebra.Module.LinearMap.Defs /-! # Cyclic triple sums @@ -39,6 +41,8 @@ Jacobi identity, Lie algebra 2-cocycle condition -/ +@[expose] public section + namespace VirasoroProject section cyclicTripleSum diff --git a/LeanPool/VirasoroProject/FockSpace.lean b/LeanPool/VirasoroProject/FockSpace.lean index 8c043c7c30..95c277d24f 100644 --- a/LeanPool/VirasoroProject/FockSpace.lean +++ b/LeanPool/VirasoroProject/FockSpace.lean @@ -3,9 +3,19 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import LeanPool.VirasoroProject.HeisenbergAlgebra -import LeanPool.VirasoroProject.IndexTri -import LeanPool.VirasoroProject.LieVerma +module + +public import LeanPool.VirasoroProject.HeisenbergAlgebra +public import LeanPool.VirasoroProject.IndexTri +public import LeanPool.VirasoroProject.LieVerma +public import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Algebra.EuclideanDomain.Field +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.Star +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Verma modules for the Virasoro algebra @@ -56,6 +66,8 @@ Heisenberg algebra, Fock space -/ +@[expose] public section + namespace VirasoroProject diff --git a/LeanPool/VirasoroProject/FockSpaceSugawara.lean b/LeanPool/VirasoroProject/FockSpaceSugawara.lean index a22356e936..7336ef65c0 100644 --- a/LeanPool/VirasoroProject/FockSpaceSugawara.lean +++ b/LeanPool/VirasoroProject/FockSpaceSugawara.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import LeanPool.VirasoroProject.FockSpace -import LeanPool.VirasoroProject.Sugawara -import LeanPool.VirasoroProject.VirasoroVerma +module + +public import LeanPool.VirasoroProject.FockSpace +public import LeanPool.VirasoroProject.Sugawara +public import LeanPool.VirasoroProject.VirasoroVerma +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.Star +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Sugawara construction applied to the charged Fock space @@ -43,6 +52,8 @@ Heisenberg algebra, Fock space, Virasoro algebra, Sugawara construction -/ +@[expose] public section + namespace VirasoroProject -- `LieRing.ofAssociativeRing` is only a local instance in Mathlib; it provides the Lie ring @@ -118,7 +129,7 @@ noncomputable def sugawaraRepresentationOfModuleUeaHeisenbergAlgebra ModuleOfModuleAlgebra.lsmul 𝕜 V (ιUEA 𝕜 (jgen 𝕜 k)) sugawaraRepresentation (heiOper := heiOper) (fun v ↦ htrunc ((ModuleOfModuleAlgebra.unMkAddHom 𝕜 (𝓤 𝕜 (HeisenbergAlgebra 𝕜)) V) v)) - (commutator_lsmul_jgen_of_module_uea_heisenbergAlgebra 𝕜 hc) + (by exact commutator_lsmul_jgen_of_module_uea_heisenbergAlgebra 𝕜 hc) open HeisenbergAlgebra Filter in lemma sugawaraRepresentation_of_module_uea_heisenbergAlgebra_lgen_apply @@ -133,7 +144,7 @@ lemma sugawaraRepresentation_of_module_uea_heisenbergAlgebra_lgen_apply • ModuleOfModuleAlgebra.unMkAddHom 𝕜 _ V v))) := by apply sugawaraRepresentation_lgen_apply _ ((fun v ↦ htrunc ((ModuleOfModuleAlgebra.unMkAddHom 𝕜 (𝓤 𝕜 (HeisenbergAlgebra 𝕜)) V) v))) - (commutator_lsmul_jgen_of_module_uea_heisenbergAlgebra 𝕜 hc) + (by exact commutator_lsmul_jgen_of_module_uea_heisenbergAlgebra 𝕜 hc) open HeisenbergAlgebra Filter in lemma sugawaraRepresentation_of_module_uea_heisenbergAlgebra_cgen_apply @@ -143,7 +154,7 @@ lemma sugawaraRepresentation_of_module_uea_heisenbergAlgebra_cgen_apply sugawaraRepresentationOfModuleUeaHeisenbergAlgebra 𝕜 htrunc hc (.cgen 𝕜) v = v := by have key := sugawaraRepresentation_cgen _ ((fun v ↦ htrunc ((ModuleOfModuleAlgebra.unMkAddHom 𝕜 (𝓤 𝕜 (HeisenbergAlgebra 𝕜)) V) v))) - (commutator_lsmul_jgen_of_module_uea_heisenbergAlgebra 𝕜 hc) + (by exact commutator_lsmul_jgen_of_module_uea_heisenbergAlgebra 𝕜 hc) simpa [sugawaraRepresentationOfModuleUeaHeisenbergAlgebra] using congr_arg (fun A ↦ A v) key end auxiliary diff --git a/LeanPool/VirasoroProject/HeisenbergAlgebra.lean b/LeanPool/VirasoroProject/HeisenbergAlgebra.lean index e42aaa571b..b088bb441a 100644 --- a/LeanPool/VirasoroProject/HeisenbergAlgebra.lean +++ b/LeanPool/VirasoroProject/HeisenbergAlgebra.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module + +public import LeanPool.VirasoroProject.IsCentralExtension +public import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis.Defs +public import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Abelian import Mathlib.LinearAlgebra.Basis.Bilinear -import LeanPool.VirasoroProject.IsCentralExtension -import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Abelian -import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis.Defs /-! # Heisenberg algebra @@ -43,6 +45,8 @@ Heisenberg algebra -/ +@[expose] public section + namespace VirasoroProject open Module diff --git a/LeanPool/VirasoroProject/IndexTri.lean b/LeanPool/VirasoroProject/IndexTri.lean index 9707cbcf9b..6670e6e7e5 100644 --- a/LeanPool/VirasoroProject/IndexTri.lean +++ b/LeanPool/VirasoroProject/IndexTri.lean @@ -3,11 +3,18 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module + +public import Mathlib.Basic.Sign.Defs +public import Mathlib.Order.CompletePartialOrder +public import Mathlib.Data.Set.BooleanAlgebra import Mathlib.Algebra.Order.Ring.Star -import Mathlib.Analysis.Normed.Ring.Lemmas +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.ConditionallyCompleteOrder import Mathlib.Data.Int.Star -import Mathlib.Basic.Sign.Defs -import Mathlib.Order.CompletePartialOrder +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # An auxiliary tri-partition of indices @@ -21,6 +28,8 @@ the triangular decompositions of both the Virasoro algebra and the Heisenberg al -/ +@[expose] public section + namespace VirasoroProject /-- The partition of `Option ℤ` into zero, positive, and negative parts. -/ diff --git a/LeanPool/VirasoroProject/IsCentralExtension.lean b/LeanPool/VirasoroProject/IsCentralExtension.lean index 97350e8b7d..3994bbe82d 100644 --- a/LeanPool/VirasoroProject/IsCentralExtension.lean +++ b/LeanPool/VirasoroProject/IsCentralExtension.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import LeanPool.VirasoroProject.CentralExtension -import LeanPool.VirasoroProject.SectionSES +module + +public import LeanPool.VirasoroProject.CentralExtension +public import LeanPool.VirasoroProject.SectionSES /-! # Abstract central extensions of Lie algebras (characteristic predicate) @@ -35,6 +37,8 @@ Lie algebra, central extension, short exact sequence -/ +@[expose] public section + namespace VirasoroProject section IsCentralExtension diff --git a/LeanPool/VirasoroProject/LieAlgebraModuleUEA.lean b/LeanPool/VirasoroProject/LieAlgebraModuleUEA.lean index be406795ba..072c8bd7e3 100644 --- a/LeanPool/VirasoroProject/LieAlgebraModuleUEA.lean +++ b/LeanPool/VirasoroProject/LieAlgebraModuleUEA.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Algebra.Lie.UniversalEnveloping -import Mathlib.GroupTheory.GroupAction.Ring -import Mathlib.Order.CompletePartialOrder -import LeanPool.VirasoroProject.LieAlgebraRepresentationOfBasis +module + +public import Mathlib.Algebra.Lie.UniversalEnveloping +public import LeanPool.VirasoroProject.LieAlgebraRepresentationOfBasis /-! # Modules over the universal enveloping algebra of a Lie algebra @@ -63,6 +63,8 @@ Lie algebra, universal enveloping algebra -/ +@[expose] public section + -- `LieRing.ofAssociativeRing` is only a local instance in Mathlib; it is needed to view the -- universal enveloping algebra (and operator algebras) as Lie rings, e.g. for `LieHom.map_lie` diff --git a/LeanPool/VirasoroProject/LieAlgebraRepresentationOfBasis.lean b/LeanPool/VirasoroProject/LieAlgebraRepresentationOfBasis.lean index 707afe188b..e8a1287d77 100644 --- a/LeanPool/VirasoroProject/LieAlgebraRepresentationOfBasis.lean +++ b/LeanPool/VirasoroProject/LieAlgebraRepresentationOfBasis.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Algebra.Lie.OfAssociative -import LeanPool.VirasoroProject.Commutator -import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Basic +module + +public import Mathlib.Algebra.Lie.OfAssociative +public import LeanPool.VirasoroProject.Commutator +public import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Basic /-! # Constructing representations of Lie algebras from operators corresponding to a basis @@ -22,6 +24,8 @@ constructions.) -/ +@[expose] public section + namespace LieAlgebra diff --git a/LeanPool/VirasoroProject/LieCohomologySmallDegree.lean b/LeanPool/VirasoroProject/LieCohomologySmallDegree.lean index 2979dc6a15..c8d7e14002 100644 --- a/LeanPool/VirasoroProject/LieCohomologySmallDegree.lean +++ b/LeanPool/VirasoroProject/LieCohomologySmallDegree.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Algebra.Lie.Abelian -import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Basic +module + +public import Mathlib.Algebra.Lie.Abelian +public import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Basic /-! # Lie algebra cohomology in degree two (for central extensions) @@ -46,6 +48,8 @@ Lie algebra, cohomology -/ +@[expose] public section + namespace VirasoroProject universe u diff --git a/LeanPool/VirasoroProject/LieVerma.lean b/LeanPool/VirasoroProject/LieVerma.lean index 166d2c4f2b..f03794dcb2 100644 --- a/LeanPool/VirasoroProject/LieVerma.lean +++ b/LeanPool/VirasoroProject/LieVerma.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Basic.Sign.Defs -import LeanPool.VirasoroProject.LieAlgebraModuleUEA -import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis.FinsumRepr -import LeanPool.VirasoroProject.VermaModule +module + +public import Mathlib.Basic.Sign.Defs +public import LeanPool.VirasoroProject.LieAlgebraModuleUEA +public import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis.FinsumRepr +public import LeanPool.VirasoroProject.VermaModule +public import Mathlib.Order.CompletePartialOrder /-! # Verma modules for Lie algebras with triangular decomposition @@ -56,6 +59,8 @@ Verma module, Lie algebra, representation -/ +@[expose] public section + namespace VirasoroProject section diff --git a/LeanPool/VirasoroProject/SectionSES.lean b/LeanPool/VirasoroProject/SectionSES.lean index ebda81fb9e..a69c71c0db 100644 --- a/LeanPool/VirasoroProject/SectionSES.lean +++ b/LeanPool/VirasoroProject/SectionSES.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Algebra.DirectSum.Module -import Mathlib.LinearAlgebra.FreeModule.Basic -import Mathlib.Order.CompletePartialOrder +module + +public import Mathlib.Algebra.DirectSum.Module +public import Mathlib.LinearAlgebra.FreeModule.Basic /-! # Sections of short exact sequences @@ -42,6 +43,8 @@ short exact sequence -/ +@[expose] public section + section group_section namespace MonoidHom diff --git a/LeanPool/VirasoroProject/Sugawara.lean b/LeanPool/VirasoroProject/Sugawara.lean index a48f2d1228..ed9e87bc6f 100644 --- a/LeanPool/VirasoroProject/Sugawara.lean +++ b/LeanPool/VirasoroProject/Sugawara.lean @@ -3,22 +3,29 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import LeanPool.VirasoroProject.VirasoroAlgebra -import LeanPool.VirasoroProject.HeisenbergAlgebra +module + +public import Mathlib.Algebra.Torsor.Defs + +public import LeanPool.VirasoroProject.VirasoroAlgebra +public import LeanPool.VirasoroProject.HeisenbergAlgebra +public import LeanPool.VirasoroProject.LieAlgebraRepresentationOfBasis +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Data.Int.ConditionallyCompleteOrder +public import Mathlib.Order.Filter.Cofinite import LeanPool.VirasoroProject.CentralChargeCalc -import LeanPool.VirasoroProject.Commutator -import LeanPool.VirasoroProject.LieAlgebraRepresentationOfBasis +import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.BigOperators.FinProd import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.Module.LinearMap.Defs -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.Interval +import Mathlib.Data.Int.Star +import Mathlib.GroupTheory.GroupAction.Basic +import Mathlib.Order.CompletePartialOrder +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The bosonic Sugawara construction @@ -54,6 +61,8 @@ Sugawara construction, Virasoro algebra, Heisenberg algebra, bosonic Fock space -/ +@[expose] public section + namespace VirasoroProject -- `LieRing.ofAssociativeRing` is only a local instance in Mathlib; it provides the Lie ring diff --git a/LeanPool/VirasoroProject/ToMathlib.lean b/LeanPool/VirasoroProject/ToMathlib.lean index 9e9b772dc8..10e3f112df 100644 --- a/LeanPool/VirasoroProject/ToMathlib.lean +++ b/LeanPool/VirasoroProject/ToMathlib.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module -import LeanPool.VirasoroProject.ToMathlib.Algebra -import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra -import LeanPool.VirasoroProject.ToMathlib.Topology +public import LeanPool.VirasoroProject.ToMathlib.Algebra +public import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra +public import LeanPool.VirasoroProject.ToMathlib.Topology /-! # Virasoro Project Mathlib Support @@ -14,3 +15,5 @@ import LeanPool.VirasoroProject.ToMathlib.Topology Import-only index for project-local lemmas and constructions that were developed as Mathlib-facing support code. -/ + +@[expose] public section diff --git a/LeanPool/VirasoroProject/ToMathlib/Algebra.lean b/LeanPool/VirasoroProject/ToMathlib/Algebra.lean index 37ce7516e3..a22663c7f6 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Algebra.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Algebra.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module -import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie +public import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie /-! # Algebra Support Import-only index for algebra support modules used by the Virasoro Project. -/ + +@[expose] public section diff --git a/LeanPool/VirasoroProject/ToMathlib/Algebra/Lie.lean b/LeanPool/VirasoroProject/ToMathlib/Algebra/Lie.lean index 157ac53ac4..44246f9b04 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Algebra/Lie.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Algebra/Lie.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module -import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Abelian -import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Basic +public import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Abelian +public import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Basic /-! # Lie Algebra Support Import-only index for Lie algebra support modules used by the Virasoro Project. -/ + +@[expose] public section diff --git a/LeanPool/VirasoroProject/ToMathlib/Algebra/Lie/Abelian.lean b/LeanPool/VirasoroProject/ToMathlib/Algebra/Lie/Abelian.lean index b509ffd7bc..11e54a6e9f 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Algebra/Lie/Abelian.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Algebra/Lie/Abelian.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Algebra.Lie.Abelian +module + +public import Mathlib.Algebra.Lie.Abelian /-! # LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Abelian -/ +@[expose] public section + instance _root_.CommRing.isLieAbelian (R : Type*) [CommRing R] : IsLieAbelian R where trivial c₁ c₂ := by change c₁ * c₂ - c₂ * c₁ = 0 diff --git a/LeanPool/VirasoroProject/ToMathlib/Algebra/Lie/Basic.lean b/LeanPool/VirasoroProject/ToMathlib/Algebra/Lie/Basic.lean index c3310b827b..c8b5a9b44d 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Algebra/Lie/Basic.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Algebra/Lie/Basic.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Algebra.Lie.Basic +module + +public import Mathlib.Algebra.Lie.Basic /-! # LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Basic -/ +@[expose] public section + universe u variable (𝕜 : Type*) [CommRing 𝕜] variable (𝓰 : Type u) [LieRing 𝓰] [LieAlgebra 𝕜 𝓰] diff --git a/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra.lean b/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra.lean index cc8ed6c548..799d341d21 100644 --- a/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra.lean +++ b/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module -import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis -import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Finsupp +public import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis +public import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Finsupp /-! # Linear Algebra Support Import-only index for linear algebra support modules used by the Virasoro Project. -/ + +@[expose] public section diff --git a/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Basis.lean b/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Basis.lean index 33aab97d87..cdd2f1e144 100644 --- a/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Basis.lean +++ b/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Basis.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module -import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis.Defs -import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis.FinsumRepr +public import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis.Defs +public import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis.FinsumRepr /-! # Basis Support Import-only index for basis support modules used by the Virasoro Project. -/ + +@[expose] public section diff --git a/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Basis/Defs.lean b/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Basis/Defs.lean index dbfdc63fb2..17e5824596 100644 --- a/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Basis/Defs.lean +++ b/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Basis/Defs.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.LinearAlgebra.Basis.Defs +module + +public import Mathlib.LinearAlgebra.Basis.Defs /-! # LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis.Defs -/ +@[expose] public section + /-- Standard basis of the space of finitely supported functions. -/ noncomputable def Finsupp.basisFun (X R : Type*) [Semiring R] : Module.Basis X R (X →₀ R) where repr := (LinearEquiv.refl _ _) diff --git a/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Basis/FinsumRepr.lean b/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Basis/FinsumRepr.lean index 921629b4c3..c8914a125c 100644 --- a/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Basis/FinsumRepr.lean +++ b/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Basis/FinsumRepr.lean @@ -3,16 +3,18 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module + +public import Mathlib.LinearAlgebra.DFinsupp +public import Mathlib.LinearAlgebra.Basis.Defs import Mathlib.LinearAlgebra.Basis.Basic -import Mathlib.LinearAlgebra.DFinsupp -import Mathlib.Algebra.Module.Torsion.Free -import Mathlib.Algebra.Module.Torsion.Field -import Mathlib.Algebra.Field.Basic /-! # LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis.FinsumRepr -/ +@[expose] public section + lemma smul_support_subset_left {R M ι : Type*} [Semiring R] [AddCommGroup M] [Module R M] (v : ι → M) (cf : ι → R) : (fun i ↦ cf i • v i).support ⊆ cf.support := by diff --git a/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Finsupp.lean b/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Finsupp.lean index 8235d5915c..27438fc415 100644 --- a/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Finsupp.lean +++ b/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Finsupp.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module -import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Finsupp.Supported +public import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Finsupp.Supported /-! # Finsupp Support @@ -12,3 +13,5 @@ import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Finsupp.Supported Import-only index for finitely supported function support modules used by the Virasoro Project. -/ + +@[expose] public section diff --git a/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Finsupp/Supported.lean b/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Finsupp/Supported.lean index 66158e2ba9..d0e31a6a4b 100644 --- a/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Finsupp/Supported.lean +++ b/LeanPool/VirasoroProject/ToMathlib/LinearAlgebra/Finsupp/Supported.lean @@ -3,12 +3,18 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.LinearAlgebra.Finsupp.Supported +module + +public import Mathlib.Algebra.BigOperators.Finprod +public import Mathlib.LinearAlgebra.Span.Defs +import Mathlib.Algebra.Module.Submodule.Basic /-! # LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Finsupp.Supported -/ +@[expose] public section + --import Mathlib lemma finsum_mem_span {ι R V : Type*} [Semiring R] [AddCommMonoid V] [Module R V] diff --git a/LeanPool/VirasoroProject/ToMathlib/Topology.lean b/LeanPool/VirasoroProject/ToMathlib/Topology.lean index 13bc5f0409..c726d038e0 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Topology.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Topology.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module -import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra -import LeanPool.VirasoroProject.ToMathlib.Topology.Order +public import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra +public import LeanPool.VirasoroProject.ToMathlib.Topology.Order /-! # Topology Support Import-only index for topology support modules used by the Virasoro Project. -/ + +@[expose] public section diff --git a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra.lean b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra.lean index 282a13b94a..684d831fee 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra.lean @@ -3,11 +3,12 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module -import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.BigOperators -import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.ConstMulAction -import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.InfiniteSum -import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.Module +public import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.BigOperators +public import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.ConstMulAction +public import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.InfiniteSum +public import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.Module /-! # Topological Algebra Support @@ -15,3 +16,5 @@ import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.Module Import-only index for topological algebra support modules used by the Virasoro Project. -/ + +@[expose] public section diff --git a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/BigOperators.lean b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/BigOperators.lean index 33bd6d8a10..94d44fe89b 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/BigOperators.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/BigOperators.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module -import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.BigOperators.FinProd +public import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.BigOperators.FinProd /-! # Big Operator Support Import-only index for big-operator support modules used by the Virasoro Project. -/ + +@[expose] public section diff --git a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/BigOperators/FinProd.lean b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/BigOperators/FinProd.lean index b24619a326..a32912d3ed 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/BigOperators/FinProd.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/BigOperators/FinProd.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Algebra.BigOperators.Finprod +module + +public import Mathlib.Algebra.BigOperators.Finprod /-! # LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.BigOperators.FinProd -/ +@[expose] public section + section lemma Finset.sum_eq_sum_support {ι R : Type*} [AddCommMonoid R] {s : Finset ι} {f : ι → R} diff --git a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/ConstMulAction.lean b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/ConstMulAction.lean index 4a5186e0f0..7efe0416d4 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/ConstMulAction.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/ConstMulAction.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Topology.Algebra.ConstMulAction +module + +public import Mathlib.Topology.Algebra.ConstMulAction /-! # LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.ConstMulAction -/ +@[expose] public section + lemma continuousConstSMul_of_discreteTopology (𝕜 X : Type*) [TopologicalSpace X] [DiscreteTopology X] [SMul 𝕜 X] : ContinuousConstSMul 𝕜 X := diff --git a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/InfiniteSum.lean b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/InfiniteSum.lean index 3e8ef3ac6f..1686f87175 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/InfiniteSum.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/InfiniteSum.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module -import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.InfiniteSum.Basic +public import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.InfiniteSum.Basic /-! # Infinite Sum Support Import-only index for infinite-sum support modules used by the Virasoro Project. -/ + +@[expose] public section diff --git a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/InfiniteSum/Basic.lean b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/InfiniteSum/Basic.lean index 3d32c48dde..b72e29b00f 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/InfiniteSum/Basic.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/InfiniteSum/Basic.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module + +public import Mathlib.Topology.Algebra.InfiniteSum.Defs import Mathlib.Topology.Algebra.InfiniteSum.Basic -import LeanPool.VirasoroProject.ToMathlib.Topology.Order /-! # LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.InfiniteSum.Basic -/ +@[expose] public section + section open Filter diff --git a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/Module.lean b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/Module.lean index 03898923d9..b831fe9f81 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/Module.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/Module.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module -import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.Module.LinearMap +public import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.Module.LinearMap /-! # Topological Module Support @@ -12,3 +13,5 @@ import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.Module.LinearMap Import-only index for topological module support modules used by the Virasoro Project. -/ + +@[expose] public section diff --git a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/Module/LinearMap.lean b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/Module/LinearMap.lean index fad68bbce7..6b5d500148 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/Module/LinearMap.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/Module/LinearMap.lean @@ -3,11 +3,14 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ +module -import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.Module.LinearMap.Defs +public import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.Module.LinearMap.Defs /-! # Linear Map Support Import-only index for linear-map support modules used by the Virasoro Project. -/ + +@[expose] public section diff --git a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/Module/LinearMap/Defs.lean b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/Module/LinearMap/Defs.lean index 643b5470cd..776c0c3687 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/Module/LinearMap/Defs.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Topology/Algebra/Module/LinearMap/Defs.lean @@ -3,14 +3,17 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Algebra.BigOperators.Finprod -import Mathlib.Algebra.Module.LinearMap.Defs -import LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.BigOperators.FinProd +module + +public import Mathlib.Algebra.BigOperators.Finprod +public import Mathlib.Algebra.Module.LinearMap.Defs /-! # LeanPool.VirasoroProject.ToMathlib.Topology.Algebra.Module.LinearMap.Defs -/ +@[expose] public section + section -- NOTE: Should be in Mathlib! But Generalize to semilinear maps first... diff --git a/LeanPool/VirasoroProject/ToMathlib/Topology/Order.lean b/LeanPool/VirasoroProject/ToMathlib/Topology/Order.lean index ba3cdbeb88..77a424eead 100644 --- a/LeanPool/VirasoroProject/ToMathlib/Topology/Order.lean +++ b/LeanPool/VirasoroProject/ToMathlib/Topology/Order.lean @@ -3,12 +3,16 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Topology.Order +module + +public import Mathlib.Topology.Order /-! # LeanPool.VirasoroProject.ToMathlib.Topology.Order -/ +@[expose] public section + section open Filter diff --git a/LeanPool/VirasoroProject/VermaModule.lean b/LeanPool/VirasoroProject/VermaModule.lean index b0abb91e9f..5e37881d3c 100644 --- a/LeanPool/VirasoroProject/VermaModule.lean +++ b/LeanPool/VirasoroProject/VermaModule.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Algebra.Lie.OfAssociative -import Mathlib.GroupTheory.GroupAction.Ring -import Mathlib.Order.CompletePartialOrder +module + +public import Mathlib.LinearAlgebra.Quotient.Basic +public import Mathlib.RingTheory.Ideal.Quotient.Defs +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! # Verma modules over algebras @@ -45,6 +52,8 @@ Verma module -/ +@[expose] public section + namespace VirasoroProject diff --git a/LeanPool/VirasoroProject/VirasoroAlgebra.lean b/LeanPool/VirasoroProject/VirasoroAlgebra.lean index 299bf1c066..5ac0a76e4f 100644 --- a/LeanPool/VirasoroProject/VirasoroAlgebra.lean +++ b/LeanPool/VirasoroProject/VirasoroAlgebra.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import LeanPool.VirasoroProject.IsCentralExtension -import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Abelian -import LeanPool.VirasoroProject.VirasoroCocycle +module + +public import LeanPool.VirasoroProject.IsCentralExtension +public import LeanPool.VirasoroProject.VirasoroCocycle +public import LeanPool.VirasoroProject.ToMathlib.Algebra.Lie.Abelian +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The Virasoro algebra @@ -44,6 +50,8 @@ Virasoro algebra -/ +@[expose] public section + namespace VirasoroProject -- `LieRing.ofAssociativeRing` is only a local instance in Mathlib; it provides the Lie ring diff --git a/LeanPool/VirasoroProject/VirasoroCocycle.lean b/LeanPool/VirasoroProject/VirasoroCocycle.lean index 3a1b421e0d..91f18cedfc 100644 --- a/LeanPool/VirasoroProject/VirasoroCocycle.lean +++ b/LeanPool/VirasoroProject/VirasoroCocycle.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Algebra.Azumaya.Basic +module + +public import LeanPool.VirasoroProject.LieCohomologySmallDegree +public import LeanPool.VirasoroProject.WittAlgebra import Mathlib.Algebra.Order.Ring.Star -import Mathlib.Analysis.Normed.Ring.Lemmas +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.ConditionallyCompleteOrder import Mathlib.Data.Int.Star -import Mathlib.GroupTheory.MonoidLocalization.Basic -import Mathlib.LinearAlgebra.Dual.Lemmas -import LeanPool.VirasoroProject.LieCohomologySmallDegree -import LeanPool.VirasoroProject.WittAlgebra +import Mathlib.LinearAlgebra.Basis.Bilinear +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The Virasoro 2-cocycle of the Witt algebra @@ -37,6 +41,8 @@ Witt algebra, Virasoro algebra, Lie algebra cohomology -/ +@[expose] public section + namespace VirasoroProject namespace WittAlgebra diff --git a/LeanPool/VirasoroProject/VirasoroVerma.lean b/LeanPool/VirasoroProject/VirasoroVerma.lean index b13fa582dc..117fae219a 100644 --- a/LeanPool/VirasoroProject/VirasoroVerma.lean +++ b/LeanPool/VirasoroProject/VirasoroVerma.lean @@ -3,9 +3,16 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import LeanPool.VirasoroProject.IndexTri -import LeanPool.VirasoroProject.LieVerma -import LeanPool.VirasoroProject.VirasoroAlgebra +module + +public import LeanPool.VirasoroProject.IndexTri +public import LeanPool.VirasoroProject.LieVerma +public import LeanPool.VirasoroProject.VirasoroAlgebra +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.RingTheory.LocalRing.Basic +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Verma modules for the Virasoro algebra @@ -48,6 +55,8 @@ Virasoro algebra, Verma module -/ +@[expose] public section + namespace VirasoroProject @@ -290,8 +299,8 @@ noncomputable def _root_.VirasoroProject.VirasoroVerma.universalMap {c h : 𝕜} VirasoroVerma 𝕜 c h →ₗ[𝓤 𝕜 (VirasoroAlgebra 𝕜)] M := by apply @TriangularDecomposition.VermaHW.universalMap 𝕜 _ (VirasoroAlgebra 𝕜) _ _ (virasoroTri 𝕜) (VirasoroAlgebra.hw _ c h) M _ _ hwv ?_ ?_ - · exact cartan_smul_eq_of_cgen_smul_eq_of_lzero_smul_eq 𝕜 hwv_c hwv_lzero - · exact upper_smul_eq_zero_of_forall_pos_lgen_smul_eq_zero 𝕜 hwv_lpos + · exact private_decl% (cartan_smul_eq_of_cgen_smul_eq_of_lzero_smul_eq 𝕜 hwv_c hwv_lzero) + · exact private_decl% (upper_smul_eq_zero_of_forall_pos_lgen_smul_eq_zero 𝕜 hwv_lpos) lemma _root_.VirasoroProject.VirasoroVerma.universalMap_hwVec (c h : 𝕜) (M : Type*) [AddCommGroup M] [Module (𝓤 𝕜 (VirasoroAlgebra 𝕜)) M] {hwv : M} diff --git a/LeanPool/VirasoroProject/WittAlgebra.lean b/LeanPool/VirasoroProject/WittAlgebra.lean index f6a6633cec..3f6292d313 100644 --- a/LeanPool/VirasoroProject/WittAlgebra.lean +++ b/LeanPool/VirasoroProject/WittAlgebra.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import Mathlib.Algebra.Lie.OfAssociative +module + +public import LeanPool.VirasoroProject.CyclicTripleSum +public import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis.Defs +public import Mathlib.Algebra.Lie.Basic +public import Mathlib.Algebra.NoZeroSMulDivisors.Defs +public import Mathlib.LinearAlgebra.DFinsupp +import Mathlib.Data.Rat.Cast.Order import Mathlib.LinearAlgebra.Basis.Bilinear -import LeanPool.VirasoroProject.CyclicTripleSum -import LeanPool.VirasoroProject.ToMathlib.LinearAlgebra.Basis.Defs +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific /-! # Witt algebra @@ -44,6 +53,8 @@ Witt algebra -/ +@[expose] public section + namespace VirasoroProject open Module diff --git a/LeanPool/VirasoroProject/WittAlgebraCohomology.lean b/LeanPool/VirasoroProject/WittAlgebraCohomology.lean index 6bd7786b38..f5d08372b4 100644 --- a/LeanPool/VirasoroProject/WittAlgebraCohomology.lean +++ b/LeanPool/VirasoroProject/WittAlgebraCohomology.lean @@ -3,7 +3,21 @@ Copyright (c) 2026 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ -import LeanPool.VirasoroProject.VirasoroCocycle +module + +public import LeanPool.VirasoroProject.VirasoroCocycle +public import Mathlib.LinearAlgebra.Dimension.Basic +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.ConditionallyCompleteOrder +import Mathlib.Data.Int.Star +import Mathlib.LinearAlgebra.Basis.VectorSpace +import Mathlib.LinearAlgebra.Dimension.FreeAndStrongRankCondition +import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition +import Mathlib.RingTheory.LocalRing.Basic +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # The 2-cohomology of the Witt algebra is generated by the Virasoro cocycle @@ -24,6 +38,8 @@ Witt algebra, Lie algebra cohomology -/ +@[expose] public section + namespace VirasoroProject namespace WittAlgebra diff --git a/LeanPool/Vlasov.lean b/LeanPool/Vlasov.lean index 99d32d4c42..242628cd01 100644 --- a/LeanPool/Vlasov.lean +++ b/LeanPool/Vlasov.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Joseph K. Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph K. Miller -/ +module -import LeanPool.Vlasov.Base -import LeanPool.Vlasov.ForMathlib -import LeanPool.Vlasov.OT +public import LeanPool.Vlasov.Base +public import LeanPool.Vlasov.ForMathlib +public import LeanPool.Vlasov.OT /-! # Mean-field derivation and well-posedness of the Vlasov equation @@ -18,3 +19,5 @@ Main declarations: `Vlasov.vlasovWellPosedness`, `Vlasov.dobrushin`, `Vlasov.mea Tags: kinetic-theory, mean-field-limit, optimal-transport, wasserstein-distance, pde MSC: 35Q83, 82C22, 49Q22 -/ + +@[expose] public section diff --git a/LeanPool/Vlasov/Base.lean b/LeanPool/Vlasov/Base.lean index 3e086c0afd..ec1bea331f 100644 --- a/LeanPool/Vlasov/Base.lean +++ b/LeanPool/Vlasov/Base.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Joseph K. Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph K. Miller -/ +module -import LeanPool.Vlasov.Base.Geometry +public import LeanPool.Vlasov.Base.Geometry /-! # Ambient geometry: the physical and phase spaces. -/ + +@[expose] public section diff --git a/LeanPool/Vlasov/Base/Geometry.lean b/LeanPool/Vlasov/Base/Geometry.lean index 2e6dfd5ccd..e8387c0fdd 100644 --- a/LeanPool/Vlasov/Base/Geometry.lean +++ b/LeanPool/Vlasov/Base/Geometry.lean @@ -3,7 +3,9 @@ Copyright (c) 2026 Joseph K. Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph K. Miller -/ -import Mathlib.Analysis.InnerProductSpace.PiL2 +module + +public import Mathlib.Analysis.InnerProductSpace.PiL2 /-! # Ambient geometry for the optimal-transport / Vlasov development @@ -12,6 +14,8 @@ Throughout, `d : ℕ` is the spatial dimension. Single-particle physical space (position × velocity). These are the shared ambient types that both the optimal-transport layer and the kinetic (Vlasov) layer are built over. -/ +@[expose] public section + namespace Vlasov /-- Abbreviation for ℝ^d as a Euclidean space. -/ diff --git a/LeanPool/Vlasov/Basic.lean b/LeanPool/Vlasov/Basic.lean index 49339b3f49..6524bb2de9 100644 --- a/LeanPool/Vlasov/Basic.lean +++ b/LeanPool/Vlasov/Basic.lean @@ -3,25 +3,21 @@ Copyright (c) 2026 Joseph K. Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph K. Miller -/ -import Mathlib.Analysis.Calculus.ContDiff.Basic -import Mathlib.Analysis.Calculus.Deriv.Add -import Mathlib.Analysis.Calculus.Deriv.Basic -import Mathlib.Analysis.Calculus.Deriv.Comp -import Mathlib.Analysis.Calculus.Deriv.Mul +module + +import Mathlib.MeasureTheory.Measure.LevyProkhorovMetric + +public import Mathlib.Analysis.Calculus.Gradient.Basic +public import Mathlib.Analysis.Normed.Lp.MeasurableSpace +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +public import LeanPool.Vlasov.Base.Geometry +public import LeanPool.Vlasov.OT.Wasserstein +public import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.Deriv.Prod -import Mathlib.Analysis.Calculus.Gradient.Basic -import Mathlib.Analysis.Normed.Lp.MeasurableSpace import Mathlib.Analysis.ODE.Gronwall import Mathlib.MeasureTheory.Function.L2Space -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus -import Mathlib.MeasureTheory.Measure.Dirac.Basic -import Mathlib.MeasureTheory.Measure.Dirac.Def -import Mathlib.MeasureTheory.Measure.ProbabilityMeasure import Mathlib.MeasureTheory.Measure.Prokhorov -import Mathlib.MeasureTheory.Measure.Tight -import LeanPool.Vlasov.Base.Geometry -import LeanPool.Vlasov.OT.Wasserstein /-! # Derivation of the Vlasov equation from N-particle Hamiltonian dynamics @@ -42,6 +38,8 @@ mean-field theory of the Vlasov equation: `(tex: …)` labels cross-reference the companion LaTeX paper. -/ +@[expose] public section + open MeasureTheory namespace Vlasov diff --git a/LeanPool/Vlasov/ForMathlib.lean b/LeanPool/Vlasov/ForMathlib.lean index 11055960e7..3cefd19965 100644 --- a/LeanPool/Vlasov/ForMathlib.lean +++ b/LeanPool/Vlasov/ForMathlib.lean @@ -3,7 +3,10 @@ Copyright (c) 2026 Joseph K. Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph K. Miller -/ +module -import LeanPool.Vlasov.ForMathlib.PicardLindelof +public import LeanPool.Vlasov.ForMathlib.PicardLindelof /-! # Vendored Picard-Lindelof with an explicit confinement conjunct. -/ + +@[expose] public section diff --git a/LeanPool/Vlasov/ForMathlib/PicardLindelof.lean b/LeanPool/Vlasov/ForMathlib/PicardLindelof.lean index a3a78e0244..9ec7c25296 100644 --- a/LeanPool/Vlasov/ForMathlib/PicardLindelof.lean +++ b/LeanPool/Vlasov/ForMathlib/PicardLindelof.lean @@ -3,7 +3,9 @@ Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Winston Yin, Joseph K. Miller -/ -import Mathlib.Analysis.ODE.PicardLindelof +module + +public import Mathlib.Analysis.ODE.PicardLindelof /-! # Picard-Lindelöf with explicit confinement conjunct (vendored from Mathlib) @@ -44,6 +46,8 @@ conclusion only grows). to Helper 1, `vlasov_window_confinement`). -/ +@[expose] public section + namespace IsPicardLindelof open Function intervalIntegral MeasureTheory Metric Set diff --git a/LeanPool/Vlasov/OT.lean b/LeanPool/Vlasov/OT.lean index 5e2e997819..6bafa90ba2 100644 --- a/LeanPool/Vlasov/OT.lean +++ b/LeanPool/Vlasov/OT.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Joseph K. Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph K. Miller -/ +module -import LeanPool.Vlasov.OT.CharacteristicFlow -import LeanPool.Vlasov.OT.Coupling -import LeanPool.Vlasov.OT.Wasserstein -import LeanPool.Vlasov.OT.WeakToLagrangian -import LeanPool.Vlasov.OT.WellPosedness +public import LeanPool.Vlasov.OT.CharacteristicFlow +public import LeanPool.Vlasov.OT.Coupling +public import LeanPool.Vlasov.OT.Wasserstein +public import LeanPool.Vlasov.OT.WeakToLagrangian +public import LeanPool.Vlasov.OT.WellPosedness +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Optimal transport, characteristic flow, and the well-posedness ladder. -/ + +@[expose] public section diff --git a/LeanPool/Vlasov/OT/CharacteristicFlow.lean b/LeanPool/Vlasov/OT/CharacteristicFlow.lean index e65596b193..ade83358bb 100644 --- a/LeanPool/Vlasov/OT/CharacteristicFlow.lean +++ b/LeanPool/Vlasov/OT/CharacteristicFlow.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Joseph K. Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph K. Miller -/ +module + +public import LeanPool.Vlasov.Basic +public import LeanPool.Vlasov.OT.Coupling +public import Mathlib.Analysis.ODE.Gronwall +import LeanPool.Vlasov.ForMathlib.PicardLindelof import Mathlib.Algebra.Order.Field.GeomSum import Mathlib.Analysis.Calculus.ParametricIntegral import Mathlib.MeasureTheory.Integral.Prod -import LeanPool.Vlasov.Basic -import LeanPool.Vlasov.ForMathlib.PicardLindelof -import LeanPool.Vlasov.OT.Coupling /-! # Characteristic flow for the Vlasov ODE + Lagrangian-Eulerian equivalence @@ -44,6 +47,8 @@ differentiation-under-integral check that is not in Mathlib. See `formalize/DESIGN.md` (in the source repository) for the overall design. -/ +@[expose] public section + namespace Vlasov open MeasureTheory ENNReal @@ -128,20 +133,47 @@ Math content: Gronwall on the position-velocity pair, using `‖(∇W ∗ ρ_t)(x)‖ ≤ ‖gradW 0‖ + L · (‖x‖ + ∫‖y‖dρ_t)` as the velocity-field bound. -/ -/-- **Flow distance growth bound** (`L`-Lipschitz `gradW`, uniform first moment -on `ρ`). Solutions of the characteristic ODE grow at most linearly in their -initial condition: `‖(charX t z, charV t z)‖ ≤ C_T · (‖z‖ + 1)` for some -`C_T` depending only on `T`, `L`, `‖gradW 0‖`, and the uniform first-moment -bound `M_ρ`. -/ -theorem flow_distance_growth_bound +/-- **`IsCharacteristicFlowOn`-flavored variant of `flow_distance_growth_bound`**. + +Same Gronwall growth bound, but for a flow specified by **boundary regularity +hypotheses** (`h_init`, `h_cont_Icc`, `h_deriv_Ico`) instead of the universal-in-`t` +ODE of `IsCharacteristicFlow`. This matches what +`exists_vlasov_characteristicFlow_global_smallT` produces (modulo deriving the +boundary regularity from `IsCharacteristicFlowOn`'s `Ioo 0 T` ODE clauses), and +mirrors the hypothesis-passing pattern of `charFlow_measurable_via_gronwall`. + +**Used by**: `Phi_step` to derive the per-`z` growth bound +(`PhiAsVlasovMeasureCurve`'s `h_growth` hypothesis); window uniqueness is a +natural secondary consumer. + +The global `flow_distance_growth_bound` follows by supplying its initial +condition, continuity and derivative statements as boundary regularity. + +**Metric-dependence note**: +This bound uses the unbounded position difference `‖X^M(t,z) - X^{M'}(t,z)‖`, +which forces Gronwall and produces exponential-in-`T` constants +`C_T ≈ exp((1+L)·T)`. The `Wbar = W_{min(|x-y|,1)}` analog (Dobrushin 1979, §5) +uses the bounded-and-Lipschitz absorption + `|B_μ(x) - B_{μ'}(x)| ≤ max(2‖B‖_∞, C_B) · min(|x₁-x₂|, 1)` +and produces *linear-in-`T`* constants (Dobrushin 1979, eq. 5.7), changing this +output shape from `C_T · (‖z‖ + 1)` to a bounded analog. -/ +theorem flow_distance_growth_bound_on {d : ℕ} (gradW : PhysSpace d → PhysSpace d) (L : NNReal) (hL : LipschitzWith L gradW) (ρ : ℝ → Measure (PhysSpace d)) [∀ t, IsProbabilityMeasure (ρ t)] (charX charV : ℝ → PhaseSpace d → PhysSpace d) - (hflow : IsCharacteristicFlow gradW ρ charX charV) (T : ℝ) (hT : 0 ≤ T) + -- Boundary regularity, replacing IsCharacteristicFlow's universal ODE. + (h_init : ∀ z : PhaseSpace d, (charX 0 z, charV 0 z) = z) + (h_cont_Icc : ∀ z : PhaseSpace d, + ContinuousOn (fun s => (charX s z, charV s z)) (Set.Icc (0 : ℝ) T)) + (h_deriv_Ico : ∀ z : PhaseSpace d, ∀ s ∈ Set.Ico (0 : ℝ) T, + HasDerivWithinAt (fun s' => (charX s' z, charV s' z)) + (vlasovVectorField gradW ρ s (charX s z, charV s z)) + (Set.Ici s) s) + -- ρ regularity, identical to flow_distance_growth_bound's hypotheses. (M_ρ : ℝ) (hM_ρ_nn : 0 ≤ M_ρ) (hM_ρ : ∀ t ∈ Set.Icc 0 T, ∫ y, ‖y‖ ∂(ρ t) ≤ M_ρ) (h_y_int : ∀ t ∈ Set.Icc 0 T, Integrable (fun y : PhysSpace d => ‖y‖) (ρ t)) @@ -149,35 +181,30 @@ theorem flow_distance_growth_bound ∃ C_T, 0 ≤ C_T ∧ ∀ t ∈ Set.Icc 0 T, ∀ z : PhaseSpace d, ‖(charX t z, charV t z)‖ ≤ C_T * (‖z‖ + 1) := by - obtain ⟨hflow_init, hflow_x, hflow_v⟩ := hflow - -- Gronwall parameters: K = 1 + L, ε₀ = ‖gradW 0‖ + L * M_ρ + -- Gronwall parameters: K = 1 + L, ε₀ = ‖gradW 0‖ + L * M_ρ. set K := 1 + (L : ℝ) with hK_def set ε₀ := ‖gradW 0‖ + (L : ℝ) * M_ρ with hε₀_def have hK_pos : 0 < K := by positivity have hε₀_nn : 0 ≤ ε₀ := by positivity - -- Witness: C_T = gronwallBound 1 K ε₀ T + -- Witness: C_T = gronwallBound 1 K ε₀ T. use gronwallBound 1 K ε₀ T refine ⟨?_, ?_⟩ - · -- C_T ≥ 0: since gronwallBound 1 K ε₀ 0 = 1 and it's monotone - have hmono := gronwallBound_mono (by norm_num : (0 : ℝ) ≤ 1) hε₀_nn hK_pos.le hT + · have hmono := gronwallBound_mono (by norm_num : (0 : ℝ) ≤ 1) hε₀_nn hK_pos.le hT linarith [gronwallBound_x0 1 K ε₀] · intro t ht z - -- Convolution bound: ‖(∇W ∗ ρ_t)(x)‖ ≤ ε₀ + L * ‖x‖ + -- Convolution bound: ‖(∇W ∗ ρ_t)(x)‖ ≤ ε₀ + L * ‖x‖. have h_conv_bound : ∀ s ∈ Set.Icc 0 T, ∀ x : PhysSpace d, ‖convolveFunctionMeasure gradW (ρ s) x‖ ≤ ε₀ + (L : ℝ) * ‖x‖ := by intro s hs x unfold convolveFunctionMeasure - -- Integrability of ‖x - y‖ via h_y_int and triangle have h_sub_int : Integrable (fun y => ‖x - y‖) (ρ s) := Integrable.mono' ((integrable_const ‖x‖).add (h_y_int s hs)) ((aestronglyMeasurable_const (b := x)).sub aestronglyMeasurable_id |>.norm) (Filter.Eventually.of_forall fun y => by simp only [Real.norm_of_nonneg (norm_nonneg _)] exact norm_sub_le x y) - -- Integrability of the bound function have h_bnd_int : Integrable (fun y => ‖gradW 0‖ + (L : ℝ) * ‖x - y‖) (ρ s) := (integrable_const _).add (h_sub_int.const_mul _) - -- Pointwise bound: ‖gradW(x-y)‖ ≤ ‖gradW 0‖ + L*‖x-y‖ have h_pt : ∀ y : PhysSpace d, ‖gradW (x - y)‖ ≤ ‖gradW 0‖ + (L : ℝ) * ‖x - y‖ := by intro y @@ -185,41 +212,46 @@ theorem flow_distance_growth_bound simp only [dist_eq_norm, sub_zero] at hd have h_tri : ‖gradW (x - y)‖ ≤ ‖gradW 0‖ + ‖gradW (x - y) - gradW 0‖ := by have := norm_add_le (gradW (x - y) - gradW 0) (gradW 0) - simp only [sub_add_cancel] at this; linarith + simp only [sub_add_cancel] at this + linarith linarith - -- ‖∫ y, gradW(x - y) dρ_s‖ ≤ ∫ ‖gradW(x - y)‖ dρ_s ≤ ... calc ‖∫ y, gradW (x - y) ∂(ρ s)‖ ≤ ∫ y, ‖gradW (x - y)‖ ∂(ρ s) := norm_integral_le_integral_norm _ _ ≤ ∫ y, (‖gradW 0‖ + (L : ℝ) * ‖x - y‖) ∂(ρ s) := - integral_mono (h_int s x).norm h_bnd_int (fun y => h_pt y) + integral_mono (h_int s x).norm h_bnd_int h_pt _ = ‖gradW 0‖ + (L : ℝ) * ∫ y, ‖x - y‖ ∂(ρ s) := by rw [integral_add (integrable_const _) (h_sub_int.const_mul _)] - simp [integral_const, measureReal_def, measure_univ, - integral_const_mul] - _ ≤ ε₀ + (L : ℝ) * ‖x‖ := by - have h_int_le : ∫ y, ‖x - y‖ ∂(ρ s) ≤ ‖x‖ + M_ρ := by + simp [integral_const, measureReal_def, measure_univ, integral_const_mul] + _ ≤ ‖gradW 0‖ + (L : ℝ) * (‖x‖ + M_ρ) := by + have hint_bd : ∫ y, ‖x - y‖ ∂(ρ s) ≤ ‖x‖ + M_ρ := by calc ∫ y, ‖x - y‖ ∂(ρ s) ≤ ∫ y, (‖x‖ + ‖y‖) ∂(ρ s) := - integral_mono h_sub_int ((integrable_const _).add (h_y_int s hs)) + integral_mono h_sub_int + ((integrable_const _).add (h_y_int s hs)) (fun y => norm_sub_le x y) _ = ‖x‖ + ∫ y, ‖y‖ ∂(ρ s) := by rw [integral_add (integrable_const _) (h_y_int s hs)] simp [integral_const, measureReal_def, measure_univ] _ ≤ ‖x‖ + M_ρ := by linarith [hM_ρ s hs] - simp only [hε₀_def] - linarith [mul_le_mul_of_nonneg_left h_int_le (NNReal.coe_nonneg L)] - -- Gronwall: apply norm_le_gronwallBound_of_norm_deriv_right_le - -- f(s) = (charX s z, charV s z), f'(s) = (charV s z, -conv at charX s z) + have := mul_le_mul_of_nonneg_left hint_bd L.coe_nonneg + linarith + _ = ε₀ + (L : ℝ) * ‖x‖ := by + simp only [hε₀_def]; ring + -- Gronwall step. Boundary regularity comes from hypotheses, not from + -- IsCharacteristicFlow. have h_f_cont : ContinuousOn (fun s => (charX s z, charV s z)) (Set.Icc 0 T) := - continuousOn_of_forall_continuousAt fun s _ => - (hflow_x s z).continuousAt.prodMk (hflow_v s z).continuousAt + h_cont_Icc z have h_deriv : ∀ s ∈ Set.Ico 0 T, HasDerivWithinAt (fun s => (charX s z, charV s z)) - (charV s z, -convolveFunctionMeasure gradW (ρ s) (charX s z)) (Set.Ici s) s := - fun s _ => ((hflow_x s z).prodMk (hflow_v s z)).hasDerivWithinAt - have h_init : ‖(charX 0 z, charV 0 z)‖ ≤ ‖z‖ := by - obtain ⟨hx0, hv0⟩ := hflow_init z - simp [hx0, hv0, Prod.norm_def] + (charV s z, -convolveFunctionMeasure gradW (ρ s) (charX s z)) + (Set.Ici s) s := by + intro s hs + have hderiv := h_deriv_Ico z s hs + -- vlasovVectorField gradW ρ s (charX s z, charV s z) = (charV s z, -conv ...) + unfold vlasovVectorField at hderiv + exact hderiv + have h_init_norm : ‖(charX 0 z, charV 0 z)‖ ≤ ‖z‖ := by + rw [h_init z] have h_bound : ∀ s ∈ Set.Ico 0 T, ‖(charV s z, -convolveFunctionMeasure gradW (ρ s) (charX s z))‖ ≤ K * ‖(charX s z, charV s z)‖ + ε₀ := by @@ -230,13 +262,11 @@ theorem flow_distance_growth_bound have hGsz := le_max_right ‖charX s z‖ ‖charV s z‖ have hM_nn : 0 ≤ max ‖charX s z‖ ‖charV s z‖ := le_max_iff.mpr (Or.inl (norm_nonneg _)) - -- ‖charV s z‖ ≤ K * ‖f s‖ + ε₀ have h_v_le : ‖charV s z‖ ≤ K * max ‖charX s z‖ ‖charV s z‖ + ε₀ := calc ‖charV s z‖ ≤ max ‖charX s z‖ ‖charV s z‖ := hGsz _ ≤ K * max ‖charX s z‖ ‖charV s z‖ := le_mul_of_one_le_left hM_nn (by linarith [NNReal.coe_nonneg L]) _ ≤ K * max ‖charX s z‖ ‖charV s z‖ + ε₀ := le_add_of_nonneg_right hε₀_nn - -- ‖conv‖ ≤ K * ‖f s‖ + ε₀ have h_conv_le : ‖convolveFunctionMeasure gradW (ρ s) (charX s z)‖ ≤ K * max ‖charX s z‖ ‖charV s z‖ + ε₀ := calc ‖convolveFunctionMeasure gradW (ρ s) (charX s z)‖ @@ -247,11 +277,9 @@ theorem flow_distance_growth_bound mul_le_mul_of_nonneg_right hLK hM_nn] _ = K * max ‖charX s z‖ ‖charV s z‖ + ε₀ := by ring exact max_le h_v_le h_conv_le - -- Apply Gronwall have h_grw := norm_le_gronwallBound_of_norm_deriv_right_le - h_f_cont h_deriv h_init h_bound t ht + h_f_cont h_deriv h_init_norm h_bound t ht simp only [sub_zero] at h_grw - -- gronwallBound ‖z‖ K ε₀ t ≤ gronwallBound 1 K ε₀ T * (‖z‖ + 1) calc ‖(charX t z, charV t z)‖ ≤ gronwallBound ‖z‖ K ε₀ t := h_grw _ ≤ gronwallBound ‖z‖ K ε₀ T := @@ -265,6 +293,37 @@ theorem flow_distance_growth_bound nlinarith [norm_nonneg z, Real.exp_nonneg (K * T), mul_nonneg hεK he1, mul_nonneg (norm_nonneg z) (mul_nonneg hεK he1)] +/-- **Flow distance growth bound** (`L`-Lipschitz `gradW`, uniform first moment +on `ρ`). Solutions of the characteristic ODE grow at most linearly in their +initial condition: `‖(charX t z, charV t z)‖ ≤ C_T · (‖z‖ + 1)` for some +`C_T` depending only on `T`, `L`, `‖gradW 0‖`, and the uniform first-moment +bound `M_ρ`. -/ +theorem flow_distance_growth_bound + {d : ℕ} + (gradW : PhysSpace d → PhysSpace d) + (L : NNReal) (hL : LipschitzWith L gradW) + (ρ : ℝ → Measure (PhysSpace d)) + [∀ t, IsProbabilityMeasure (ρ t)] + (charX charV : ℝ → PhaseSpace d → PhysSpace d) + (hflow : IsCharacteristicFlow gradW ρ charX charV) + (T : ℝ) (hT : 0 ≤ T) + (M_ρ : ℝ) (hM_ρ_nn : 0 ≤ M_ρ) + (hM_ρ : ∀ t ∈ Set.Icc 0 T, ∫ y, ‖y‖ ∂(ρ t) ≤ M_ρ) + (h_y_int : ∀ t ∈ Set.Icc 0 T, Integrable (fun y : PhysSpace d => ‖y‖) (ρ t)) + (h_int : ∀ t (x : PhysSpace d), Integrable (fun y => gradW (x - y)) (ρ t)) : + ∃ C_T, 0 ≤ C_T ∧ + ∀ t ∈ Set.Icc 0 T, ∀ z : PhaseSpace d, + ‖(charX t z, charV t z)‖ ≤ C_T * (‖z‖ + 1) := by + obtain ⟨hflow_init, hflow_x, hflow_v⟩ := hflow + refine flow_distance_growth_bound_on gradW L hL ρ charX charV T hT + (fun z => Prod.ext (hflow_init z).1 (hflow_init z).2) ?_ ?_ + M_ρ hM_ρ_nn hM_ρ h_y_int h_int + · intro z + exact continuousOn_of_forall_continuousAt fun s _ => + (hflow_x s z).continuousAt.prodMk (hflow_v s z).continuousAt + · intro z s _ + exact ((hflow_x s z).prodMk (hflow_v s z)).hasDerivWithinAt + /-- **Two-flow difference Gronwall bound** — the reusable core of the integrated Dobrushin coupling bound. The distance between two trajectories `Φ_f · z₁`, `Φ_g · z₂` of flows generated by fields `b_f, b_g` (`b_f` @@ -704,169 +763,6 @@ theorem integrated_coupling_gronwall_bound rw [← hQW_eq t ht, ← hQW_eq 0 ⟨le_refl 0, hT⟩] exact hgron t ht -/-- **`IsCharacteristicFlowOn`-flavored variant of `flow_distance_growth_bound`**. - -Same Gronwall growth bound, but for a flow specified by **boundary regularity -hypotheses** (`h_init`, `h_cont_Icc`, `h_deriv_Ico`) instead of the universal-in-`t` -ODE of `IsCharacteristicFlow`. This matches what -`exists_vlasov_characteristicFlow_global_smallT` produces (modulo deriving the -boundary regularity from `IsCharacteristicFlowOn`'s `Ioo 0 T` ODE clauses), and -mirrors the hypothesis-passing pattern of `charFlow_measurable_via_gronwall`. - -**Used by**: `Phi_step` to derive the per-`z` growth bound -(`PhiAsVlasovMeasureCurve`'s `h_growth` hypothesis); window uniqueness is a -natural secondary consumer. - -**Proof body**: identical to `flow_distance_growth_bound`'s except the three -`hflow`-derived facts (`h_f_cont`, `h_deriv`, `h_init_norm`) are now taken -directly from the boundary regularity hypotheses. Same Gronwall step, same -final algebra. - -**Metric-dependence note**: -This bound uses the unbounded position difference `‖X^M(t,z) - X^{M'}(t,z)‖`, -which forces Gronwall and produces exponential-in-`T` constants -`C_T ≈ exp((1+L)·T)`. The `Wbar = W_{min(|x-y|,1)}` analog (Dobrushin 1979, §5) -uses the bounded-and-Lipschitz absorption - `|B_μ(x) - B_{μ'}(x)| ≤ max(2‖B‖_∞, C_B) · min(|x₁-x₂|, 1)` -and produces *linear-in-`T`* constants (Dobrushin 1979, eq. 5.7), changing this -output shape from `C_T · (‖z‖ + 1)` to a bounded analog. -/ -theorem flow_distance_growth_bound_on - {d : ℕ} - (gradW : PhysSpace d → PhysSpace d) - (L : NNReal) (hL : LipschitzWith L gradW) - (ρ : ℝ → Measure (PhysSpace d)) - [∀ t, IsProbabilityMeasure (ρ t)] - (charX charV : ℝ → PhaseSpace d → PhysSpace d) - (T : ℝ) (hT : 0 ≤ T) - -- Boundary regularity, replacing IsCharacteristicFlow's universal ODE. - (h_init : ∀ z : PhaseSpace d, (charX 0 z, charV 0 z) = z) - (h_cont_Icc : ∀ z : PhaseSpace d, - ContinuousOn (fun s => (charX s z, charV s z)) (Set.Icc (0 : ℝ) T)) - (h_deriv_Ico : ∀ z : PhaseSpace d, ∀ s ∈ Set.Ico (0 : ℝ) T, - HasDerivWithinAt (fun s' => (charX s' z, charV s' z)) - (vlasovVectorField gradW ρ s (charX s z, charV s z)) - (Set.Ici s) s) - -- ρ regularity, identical to flow_distance_growth_bound's hypotheses. - (M_ρ : ℝ) (hM_ρ_nn : 0 ≤ M_ρ) - (hM_ρ : ∀ t ∈ Set.Icc 0 T, ∫ y, ‖y‖ ∂(ρ t) ≤ M_ρ) - (h_y_int : ∀ t ∈ Set.Icc 0 T, Integrable (fun y : PhysSpace d => ‖y‖) (ρ t)) - (h_int : ∀ t (x : PhysSpace d), Integrable (fun y => gradW (x - y)) (ρ t)) : - ∃ C_T, 0 ≤ C_T ∧ - ∀ t ∈ Set.Icc 0 T, ∀ z : PhaseSpace d, - ‖(charX t z, charV t z)‖ ≤ C_T * (‖z‖ + 1) := by - -- Gronwall parameters: K = 1 + L, ε₀ = ‖gradW 0‖ + L * M_ρ. Identical to - -- `flow_distance_growth_bound`. - set K := 1 + (L : ℝ) with hK_def - set ε₀ := ‖gradW 0‖ + (L : ℝ) * M_ρ with hε₀_def - have hK_pos : 0 < K := by positivity - have hε₀_nn : 0 ≤ ε₀ := by positivity - -- Witness: C_T = gronwallBound 1 K ε₀ T. - use gronwallBound 1 K ε₀ T - refine ⟨?_, ?_⟩ - · have hmono := gronwallBound_mono (by norm_num : (0 : ℝ) ≤ 1) hε₀_nn hK_pos.le hT - linarith [gronwallBound_x0 1 K ε₀] - · intro t ht z - -- Convolution bound: ‖(∇W ∗ ρ_t)(x)‖ ≤ ε₀ + L * ‖x‖. Identical derivation. - have h_conv_bound : ∀ s ∈ Set.Icc 0 T, ∀ x : PhysSpace d, - ‖convolveFunctionMeasure gradW (ρ s) x‖ ≤ ε₀ + (L : ℝ) * ‖x‖ := by - intro s hs x - unfold convolveFunctionMeasure - have h_sub_int : Integrable (fun y => ‖x - y‖) (ρ s) := - Integrable.mono' ((integrable_const ‖x‖).add (h_y_int s hs)) - ((aestronglyMeasurable_const (b := x)).sub aestronglyMeasurable_id |>.norm) - (Filter.Eventually.of_forall fun y => by - simp only [Real.norm_of_nonneg (norm_nonneg _)] - exact norm_sub_le x y) - have h_bnd_int : Integrable (fun y => ‖gradW 0‖ + (L : ℝ) * ‖x - y‖) (ρ s) := - (integrable_const _).add (h_sub_int.const_mul _) - have h_pt : ∀ y : PhysSpace d, - ‖gradW (x - y)‖ ≤ ‖gradW 0‖ + (L : ℝ) * ‖x - y‖ := by - intro y - have hd := hL.dist_le_mul (x - y) 0 - simp only [dist_eq_norm, sub_zero] at hd - have h_tri : ‖gradW (x - y)‖ ≤ ‖gradW 0‖ + ‖gradW (x - y) - gradW 0‖ := by - have := norm_add_le (gradW (x - y) - gradW 0) (gradW 0) - simp only [sub_add_cancel] at this - linarith - linarith - calc ‖∫ y, gradW (x - y) ∂(ρ s)‖ - ≤ ∫ y, ‖gradW (x - y)‖ ∂(ρ s) := norm_integral_le_integral_norm _ - _ ≤ ∫ y, (‖gradW 0‖ + (L : ℝ) * ‖x - y‖) ∂(ρ s) := - integral_mono (h_int s x).norm h_bnd_int h_pt - _ = ‖gradW 0‖ + (L : ℝ) * ∫ y, ‖x - y‖ ∂(ρ s) := by - rw [integral_add (integrable_const _) (h_sub_int.const_mul _)] - simp [integral_const, measureReal_def, measure_univ, integral_const_mul] - _ ≤ ‖gradW 0‖ + (L : ℝ) * (‖x‖ + M_ρ) := by - have hint_bd : ∫ y, ‖x - y‖ ∂(ρ s) ≤ ‖x‖ + M_ρ := by - calc ∫ y, ‖x - y‖ ∂(ρ s) - ≤ ∫ y, (‖x‖ + ‖y‖) ∂(ρ s) := - integral_mono h_sub_int - ((integrable_const _).add (h_y_int s hs)) - (fun y => norm_sub_le x y) - _ = ‖x‖ + ∫ y, ‖y‖ ∂(ρ s) := by - rw [integral_add (integrable_const _) (h_y_int s hs)] - simp [integral_const, measureReal_def, measure_univ] - _ ≤ ‖x‖ + M_ρ := by linarith [hM_ρ s hs] - have := mul_le_mul_of_nonneg_left hint_bd L.coe_nonneg - linarith - _ = ε₀ + (L : ℝ) * ‖x‖ := by - simp only [hε₀_def]; ring - -- Gronwall step. Boundary regularity comes from hypotheses, not from - -- IsCharacteristicFlow. - have h_f_cont : ContinuousOn (fun s => (charX s z, charV s z)) (Set.Icc 0 T) := - h_cont_Icc z - have h_deriv : ∀ s ∈ Set.Ico 0 T, - HasDerivWithinAt (fun s => (charX s z, charV s z)) - (charV s z, -convolveFunctionMeasure gradW (ρ s) (charX s z)) - (Set.Ici s) s := by - intro s hs - have hderiv := h_deriv_Ico z s hs - -- vlasovVectorField gradW ρ s (charX s z, charV s z) = (charV s z, -conv ...) - unfold vlasovVectorField at hderiv - exact hderiv - have h_init_norm : ‖(charX 0 z, charV 0 z)‖ ≤ ‖z‖ := by - rw [h_init z] - have h_bound : ∀ s ∈ Set.Ico 0 T, - ‖(charV s z, -convolveFunctionMeasure gradW (ρ s) (charX s z))‖ ≤ - K * ‖(charX s z, charV s z)‖ + ε₀ := by - intro s hs - have hs_mem : s ∈ Set.Icc 0 T := ⟨hs.1, le_of_lt hs.2⟩ - simp only [Prod.norm_def, norm_neg] - have hFsz := le_max_left ‖charX s z‖ ‖charV s z‖ - have hGsz := le_max_right ‖charX s z‖ ‖charV s z‖ - have hM_nn : 0 ≤ max ‖charX s z‖ ‖charV s z‖ := - le_max_iff.mpr (Or.inl (norm_nonneg _)) - have h_v_le : ‖charV s z‖ ≤ K * max ‖charX s z‖ ‖charV s z‖ + ε₀ := - calc ‖charV s z‖ ≤ max ‖charX s z‖ ‖charV s z‖ := hGsz - _ ≤ K * max ‖charX s z‖ ‖charV s z‖ := - le_mul_of_one_le_left hM_nn (by linarith [NNReal.coe_nonneg L]) - _ ≤ K * max ‖charX s z‖ ‖charV s z‖ + ε₀ := le_add_of_nonneg_right hε₀_nn - have h_conv_le : ‖convolveFunctionMeasure gradW (ρ s) (charX s z)‖ ≤ - K * max ‖charX s z‖ ‖charV s z‖ + ε₀ := - calc ‖convolveFunctionMeasure gradW (ρ s) (charX s z)‖ - ≤ ε₀ + (L : ℝ) * ‖charX s z‖ := h_conv_bound s hs_mem _ - _ ≤ ε₀ + K * max ‖charX s z‖ ‖charV s z‖ := by - have hLK : (L : ℝ) ≤ K := le_add_of_nonneg_left zero_le_one - linarith [mul_le_mul_of_nonneg_left hFsz (NNReal.coe_nonneg L), - mul_le_mul_of_nonneg_right hLK hM_nn] - _ = K * max ‖charX s z‖ ‖charV s z‖ + ε₀ := by ring - exact max_le h_v_le h_conv_le - have h_grw := norm_le_gronwallBound_of_norm_deriv_right_le - h_f_cont h_deriv h_init_norm h_bound t ht - simp only [sub_zero] at h_grw - calc ‖(charX t z, charV t z)‖ - ≤ gronwallBound ‖z‖ K ε₀ t := h_grw - _ ≤ gronwallBound ‖z‖ K ε₀ T := - gronwallBound_mono (norm_nonneg _) hε₀_nn hK_pos.le ht.2 - _ ≤ gronwallBound 1 K ε₀ T * (‖z‖ + 1) := by - rw [gronwallBound_of_K_ne_0 hK_pos.ne', gronwallBound_of_K_ne_0 hK_pos.ne'] - simp only [one_mul] - have he1 : 0 ≤ Real.exp (K * T) - 1 := - by linarith [Real.one_le_exp (mul_nonneg hK_pos.le hT)] - have hεK := div_nonneg hε₀_nn hK_pos.le - nlinarith [norm_nonneg z, Real.exp_nonneg (K * T), - mul_nonneg hεK he1, mul_nonneg (norm_nonneg z) (mul_nonneg hεK he1)] - /-- **Piece A (Option 2): time-dependent moment-envelope growth bound.** Sharper sibling of `flow_distance_growth_bound_on`. Instead of a single @@ -3380,193 +3276,16 @@ lemma vlasov_pointwise_deriv_aestronglymeas exact hg_cont.comp_aestronglyMeasurable h_flow_meas_t.aestronglyMeasurable -/-- **`_lag` variant of SC.8** — `vlasov_trajectory_lipschitz_bound` with the -flow-growth prerequisites supplied as explicit hypotheses, enabling the -dominated Lipschitz bound to be derived via Gronwall on the characteristic -ODE (see `flow_distance_growth_bound` above). Used by `_lag` variants -of the Lagrangian → Eulerian chain that route through -`IsLagrangianVlasovSolution`. -/ -lemma vlasov_trajectory_lipschitz_bound_lag - {d : ℕ} - (gradW : PhysSpace d → PhysSpace d) - (L : NNReal) (hL : LipschitzWith L gradW) - (ρ : ℝ → Measure (PhysSpace d)) - [∀ s, IsProbabilityMeasure (ρ s)] - (charX charV : ℝ → PhaseSpace d → PhysSpace d) - (f₀ : Measure (PhaseSpace d)) [IsProbabilityMeasure f₀] - (hf₀_fm : Integrable (fun z : PhaseSpace d => ‖z‖) f₀) - (φ : PhaseSpace d → ℝ) - (hφ_smooth : ContDiff ℝ (⊤ : ℕ∞) φ) - (hφ_compact : HasCompactSupport φ) - (hflow : IsCharacteristicFlow gradW ρ charX charV) - (_hgradW_cont : Continuous gradW) - (_hconv_cont : ∀ s, Continuous (fun x => - convolveFunctionMeasure gradW (ρ s) x)) - (t : ℝ) (ht_pos : 0 < t) - (M_ρ : ℝ) (hM_ρ_nn : 0 ≤ M_ρ) - (hM_ρ : ∀ s ∈ Set.Icc 0 (t + 1), ∫ y, ‖y‖ ∂(ρ s) ≤ M_ρ) - (h_y_int : ∀ s ∈ Set.Icc 0 (t + 1), - Integrable (fun y : PhysSpace d => ‖y‖) (ρ s)) - (h_int : ∀ s (x : PhysSpace d), Integrable (fun y => gradW (x - y)) (ρ s)) : - ∃ (nhd : Set ℝ) (bound : PhaseSpace d → ℝ), - nhd ∈ nhds t ∧ - (∀ᵐ z ∂f₀, LipschitzOnWith (Real.nnabs (bound z)) - (fun s' => φ (charX s' z, charV s' z)) nhd) ∧ - Integrable bound f₀ := by - obtain ⟨hflow_init, hflow_x, hflow_v⟩ := hflow - -- Step 1: Get Gronwall growth bound C_T on [0, t+1] - obtain ⟨C_T, hC_T_nn, hC_T⟩ := flow_distance_growth_bound gradW L hL ρ charX charV - ⟨hflow_init, hflow_x, hflow_v⟩ (t + 1) (by linarith) M_ρ hM_ρ_nn hM_ρ h_y_int h_int - -- Step 2: Bound ‖fderiv ℝ φ‖ uniformly (compact support + continuous fderiv) - have hφ_diff : Differentiable ℝ φ := hφ_smooth.differentiable (by norm_num) - have hfderiv_cont : Continuous (fderiv ℝ φ) := - hφ_smooth.continuous_fderiv (by norm_num) - have hfderiv_compact : HasCompactSupport (fderiv ℝ φ) := - HasCompactSupport.fderiv (𝕜 := ℝ) hφ_compact - obtain ⟨M_φ, hM_φ⟩ := hfderiv_cont.bounded_above_of_compact_support hfderiv_compact - have hM_φ_nn : 0 ≤ M_φ := - le_trans (norm_nonneg (fderiv ℝ φ (0 : PhaseSpace d))) (hM_φ _) - -- Gronwall constants: K = 1 + L, ε₀ = ‖gradW 0‖ + L * M_ρ - set K := 1 + (L : ℝ) - set ε₀ := ‖gradW 0‖ + (L : ℝ) * M_ρ - have hK_pos : 0 < K := by positivity - have hε₀_nn : 0 ≤ ε₀ := by positivity - -- Convolution bound (same derivation as flow_distance_growth_bound) - have h_conv_bound : ∀ s ∈ Set.Icc 0 (t + 1), ∀ x : PhysSpace d, - ‖convolveFunctionMeasure gradW (ρ s) x‖ ≤ ε₀ + (L : ℝ) * ‖x‖ := by - intro s hs x - unfold convolveFunctionMeasure - have h_sub_int : Integrable (fun y => ‖x - y‖) (ρ s) := - Integrable.mono' ((integrable_const ‖x‖).add (h_y_int s hs)) - ((aestronglyMeasurable_const (b := x)).sub aestronglyMeasurable_id |>.norm) - (Filter.Eventually.of_forall fun y => by - simp only [Real.norm_of_nonneg (norm_nonneg _)]; exact norm_sub_le x y) - have h_pt : ∀ y : PhysSpace d, - ‖gradW (x - y)‖ ≤ ‖gradW 0‖ + (L : ℝ) * ‖x - y‖ := by - intro y - have hd := hL.dist_le_mul (x - y) 0 - simp only [dist_eq_norm, sub_zero] at hd - have h_tri : ‖gradW (x - y)‖ ≤ ‖gradW 0‖ + ‖gradW (x - y) - gradW 0‖ := by - have := norm_add_le (gradW (x - y) - gradW 0) (gradW 0) - simp only [sub_add_cancel] at this; linarith - linarith - have h_bnd_int : Integrable (fun y => ‖gradW 0‖ + (L : ℝ) * ‖x - y‖) (ρ s) := - (integrable_const _).add (h_sub_int.const_mul _) - calc ‖∫ y, gradW (x - y) ∂(ρ s)‖ - ≤ ∫ y, ‖gradW (x - y)‖ ∂(ρ s) := norm_integral_le_integral_norm _ - _ ≤ ∫ y, (‖gradW 0‖ + (L : ℝ) * ‖x - y‖) ∂(ρ s) := - integral_mono (h_int s x).norm h_bnd_int (fun y => h_pt y) - _ = ‖gradW 0‖ + (L : ℝ) * ∫ y, ‖x - y‖ ∂(ρ s) := by - rw [integral_add (integrable_const _) (h_sub_int.const_mul _)] - simp [integral_const, measureReal_def, measure_univ, integral_const_mul] - _ ≤ ε₀ + (L : ℝ) * ‖x‖ := by - have h_int_le : ∫ y, ‖x - y‖ ∂(ρ s) ≤ ‖x‖ + M_ρ := by - calc ∫ y, ‖x - y‖ ∂(ρ s) - ≤ ∫ y, (‖x‖ + ‖y‖) ∂(ρ s) := - integral_mono h_sub_int ((integrable_const _).add (h_y_int s hs)) - (fun y => norm_sub_le x y) - _ = ‖x‖ + ∫ y, ‖y‖ ∂(ρ s) := by - rw [integral_add (integrable_const _) (h_y_int s hs)] - simp [integral_const, measureReal_def, measure_univ] - _ ≤ ‖x‖ + M_ρ := by linarith [hM_ρ s hs] - simp only [ε₀]; linarith [mul_le_mul_of_nonneg_left h_int_le (NNReal.coe_nonneg L)] - -- Step 3: Choose neighborhood nhd = Ioo (t/2) (t + 1/2) ⊆ Icc 0 (t+1) - refine ⟨Set.Ioo (t / 2) (t + 1 / 2), - fun z => M_φ * (K * C_T + ε₀) * (‖z‖ + 1), ?_, ?_, ?_⟩ - · -- nhd ∈ nhds t - exact Ioo_mem_nhds (by linarith) (by linarith) - · -- LipschitzOnWith for ae-z - apply Filter.Eventually.of_forall - intro z - -- For each z, apply MVT on convex nhd - -- For each z, prove the derivative bound then apply MVT - -- Define the derivative value as a function - let deriv_val : ℝ → PhaseSpace d → ℝ := fun s z => - (fderiv ℝ φ (charX s z, charV s z)) - (charV s z, -(convolveFunctionMeasure gradW (ρ s) (charX s z))) - -- The derivative witness function f' for lipschitzOnWith_of_nnnorm_hasDerivWithin_le - apply Convex.lipschitzOnWith_of_nnnorm_hasDerivWithin_le (convex_Ioo _ _) - (f' := fun s => deriv_val s z) - · -- HasDerivWithinAt for each s ∈ nhd - intro s hs - have h_flow_deriv : HasDerivAt (fun s' => (charX s' z, charV s' z)) - (charV s z, -(convolveFunctionMeasure gradW (ρ s) (charX s z))) s := - (hflow_x s z).prodMk (hflow_v s z) - have h_φ_fderiv : HasFDerivAt φ (fderiv ℝ φ (charX s z, charV s z)) - (charX s z, charV s z) := - hφ_diff (charX s z, charV s z) |>.hasFDerivAt - exact (h_φ_fderiv.comp_hasDerivAt s h_flow_deriv).hasDerivWithinAt - · -- Bound ‖deriv_val s z‖₊ ≤ Real.nnabs (M_φ * (K * C_T + ε₀) * (‖z‖ + 1)) - intro s hs - rw [← NNReal.coe_le_coe] - simp only [] - have hs_mem : s ∈ Set.Icc 0 (t + 1) := - ⟨le_of_lt (by linarith [hs.1]), - le_of_lt (by linarith [hs.2])⟩ - have h_flow_bnd : ‖(charX s z, charV s z)‖ ≤ C_T * (‖z‖ + 1) := - hC_T s hs_mem z - have h_x_bnd : ‖charX s z‖ ≤ C_T * (‖z‖ + 1) := by - have hpn : ‖(charX s z, charV s z)‖ = max ‖charX s z‖ ‖charV s z‖ := - Prod.norm_def _ - linarith [le_max_left ‖charX s z‖ ‖charV s z‖, hpn ▸ h_flow_bnd] - have h_v_bnd2 : ‖charV s z‖ ≤ C_T * (‖z‖ + 1) := by - have hpn : ‖(charX s z, charV s z)‖ = max ‖charX s z‖ ‖charV s z‖ := - Prod.norm_def _ - linarith [le_max_right ‖charX s z‖ ‖charV s z‖, hpn ▸ h_flow_bnd] - have h_c_bnd : ‖convolveFunctionMeasure gradW (ρ s) (charX s z)‖ ≤ - ε₀ + (L : ℝ) * C_T * (‖z‖ + 1) := by - have := h_conv_bound s hs_mem (charX s z) - linarith [mul_le_mul_of_nonneg_left h_x_bnd (NNReal.coe_nonneg L)] - have h_vel_bnd : ‖(charV s z, -(convolveFunctionMeasure gradW (ρ s) (charX s z)))‖ - ≤ K * C_T * (‖z‖ + 1) + ε₀ := by - rw [Prod.norm_def] - simp only [norm_neg] - have hK1 : (1 : ℝ) ≤ K := by linarith [NNReal.coe_nonneg L] - have hz1 : (0 : ℝ) ≤ ‖z‖ + 1 := by linarith [norm_nonneg z] - apply max_le - · -- ‖charV s z‖ ≤ K * C_T * (‖z‖ + 1) + ε₀ - have h1 : C_T * (‖z‖ + 1) ≤ K * C_T * (‖z‖ + 1) := by - have := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hK1 hC_T_nn) hz1 - linarith - linarith - · -- ‖conv‖ ≤ K * C_T * (‖z‖ + 1) + ε₀ - have hLK : (L : ℝ) ≤ K := by linarith [NNReal.coe_nonneg L] - have h2 : (L : ℝ) * C_T * (‖z‖ + 1) ≤ K * C_T * (‖z‖ + 1) := by - have := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hLK hC_T_nn) hz1 - linarith - linarith - rw [Real.coe_nnabs, abs_of_nonneg (by positivity)] - calc ‖deriv_val s z‖ - ≤ ‖fderiv ℝ φ (charX s z, charV s z)‖ * - ‖(charV s z, -(convolveFunctionMeasure gradW (ρ s) (charX s z)))‖ := - ContinuousLinearMap.le_opNorm _ _ - _ ≤ M_φ * (K * C_T * (‖z‖ + 1) + ε₀) := by - apply mul_le_mul (hM_φ _) h_vel_bnd (norm_nonneg _) hM_φ_nn - _ ≤ M_φ * (K * C_T + ε₀) * (‖z‖ + 1) := by - have hz1 : 1 ≤ ‖z‖ + 1 := by linarith [norm_nonneg z] - nlinarith [mul_nonneg hM_φ_nn hε₀_nn, - mul_nonneg (mul_nonneg hM_φ_nn hε₀_nn) - (by linarith [norm_nonneg z] : (0 : ℝ) ≤ ‖z‖), - mul_nonneg hM_φ_nn hC_T_nn] - · -- Integrable bound z - have h_bound_eq : (fun z : PhaseSpace d => M_φ * (K * C_T + ε₀) * (‖z‖ + 1)) = - fun z => M_φ * (K * C_T + ε₀) * ‖z‖ + M_φ * (K * C_T + ε₀) := by - ext z; ring - rw [h_bound_eq] - exact (hf₀_fm.const_mul _).add (integrable_const _) - /-- **`_on` variant of SC.8** — `vlasov_trajectory_lipschitz_bound` with `IsCharacteristicFlowOn ... (Ioo 0 T) Set.univ` instead of universal `IsCharacteristicFlow`, and with boundary regularity hypotheses (`h_init`, `h_cont_Icc`, `h_deriv_Ico`) supplied explicitly. Required by the `_On` PDE transport (`vlasovSolutionViaPushforward_isVlasovSolutionOn`). -The body transports `vlasov_trajectory_lipschitz_bound_lag`'s argument with -two substitutions: -1. `flow_distance_growth_bound` → `flow_distance_growth_bound_on`, using the - boundary regularity hypotheses. -2. `(hflow_x s z).prodMk (hflow_v s z)` → `hflow_on.2.1 s ... z ...` for - `s` in the chosen neighborhood (within `Ioo 0 T`). +The proof combines `flow_distance_growth_bound_on` with the flow's local +ODE and a uniform derivative bound for the compactly supported test function. +The global `vlasov_trajectory_lipschitz_bound_lag` follows by restricting its +flow to a suitable finite interval. The neighborhood `nhd` is chosen to stay within `Ioo 0 T` (where `hflow_on` is defined), e.g. `Ioo (max 0 (t/2)) (min T (t + 1/2))`. -/ @@ -3624,7 +3343,7 @@ lemma vlasov_trajectory_lipschitz_bound_on set ε₀ := ‖gradW 0‖ + (L : ℝ) * M_ρ have hK_pos : 0 < K := by positivity have hε₀_nn : 0 ≤ ε₀ := by positivity - -- Convolution bound on [0, T] (same derivation as `_lag`, now Icc 0 T-restricted). + -- Convolution bound on [0, T]. have h_conv_bound : ∀ s ∈ Set.Icc 0 T, ∀ x : PhysSpace d, ‖convolveFunctionMeasure gradW (ρ s) x‖ ≤ ε₀ + (L : ℝ) * ‖x‖ := by intro s hs x @@ -3740,13 +3459,59 @@ lemma vlasov_trajectory_lipschitz_bound_on mul_nonneg (mul_nonneg hM_φ_nn hε₀_nn) (by linarith [norm_nonneg z] : (0 : ℝ) ≤ ‖z‖), mul_nonneg hM_φ_nn hC_T_nn] - · -- Integrable bound (same as `_lag`). + · -- Integrable bound. have h_bound_eq : (fun z : PhaseSpace d => M_φ * (K * C_T + ε₀) * (‖z‖ + 1)) = fun z => M_φ * (K * C_T + ε₀) * ‖z‖ + M_φ * (K * C_T + ε₀) := by ext z; ring rw [h_bound_eq] exact (hf₀_fm.const_mul _).add (integrable_const _) +/-- **`_lag` variant of SC.8** — `vlasov_trajectory_lipschitz_bound` with the +flow-growth prerequisites supplied as explicit hypotheses, enabling the +dominated Lipschitz bound to be derived via Gronwall on the characteristic +ODE (see `flow_distance_growth_bound` above). Used by `_lag` variants +of the Lagrangian → Eulerian chain that route through +`IsLagrangianVlasovSolution`. -/ +lemma vlasov_trajectory_lipschitz_bound_lag + {d : ℕ} + (gradW : PhysSpace d → PhysSpace d) + (L : NNReal) (hL : LipschitzWith L gradW) + (ρ : ℝ → Measure (PhysSpace d)) + [∀ s, IsProbabilityMeasure (ρ s)] + (charX charV : ℝ → PhaseSpace d → PhysSpace d) + (f₀ : Measure (PhaseSpace d)) [IsProbabilityMeasure f₀] + (hf₀_fm : Integrable (fun z : PhaseSpace d => ‖z‖) f₀) + (φ : PhaseSpace d → ℝ) + (hφ_smooth : ContDiff ℝ (⊤ : ℕ∞) φ) + (hφ_compact : HasCompactSupport φ) + (hflow : IsCharacteristicFlow gradW ρ charX charV) + (_hgradW_cont : Continuous gradW) + (_hconv_cont : ∀ s, Continuous (fun x => + convolveFunctionMeasure gradW (ρ s) x)) + (t : ℝ) (ht_pos : 0 < t) + (M_ρ : ℝ) (hM_ρ_nn : 0 ≤ M_ρ) + (hM_ρ : ∀ s ∈ Set.Icc 0 (t + 1), ∫ y, ‖y‖ ∂(ρ s) ≤ M_ρ) + (h_y_int : ∀ s ∈ Set.Icc 0 (t + 1), + Integrable (fun y : PhysSpace d => ‖y‖) (ρ s)) + (h_int : ∀ s (x : PhysSpace d), Integrable (fun y => gradW (x - y)) (ρ s)) : + ∃ (nhd : Set ℝ) (bound : PhaseSpace d → ℝ), + nhd ∈ nhds t ∧ + (∀ᵐ z ∂f₀, LipschitzOnWith (Real.nnabs (bound z)) + (fun s' => φ (charX s' z, charV s' z)) nhd) ∧ + Integrable bound f₀ := by + obtain ⟨hflow_init, hflow_x, hflow_v⟩ := hflow + refine vlasov_trajectory_lipschitz_bound_on gradW L hL ρ charX charV f₀ hf₀_fm + φ hφ_smooth hφ_compact (T := t + 1) (by linarith) + ⟨fun z _ => hflow_init z, fun s _ z _ => hflow_x s z, + fun s _ z _ => hflow_v s z⟩ + (fun z => Prod.ext (hflow_init z).1 (hflow_init z).2) ?_ ?_ + _hgradW_cont _hconv_cont t ⟨ht_pos, lt_add_one t⟩ M_ρ hM_ρ_nn hM_ρ h_y_int h_int + · intro z + exact continuousOn_of_forall_continuousAt fun s _ => + (hflow_x s z).continuousAt.prodMk (hflow_v s z).continuousAt + · intro z s _ + exact ((hflow_x s z).prodMk (hflow_v s z)).hasDerivWithinAt + /-- **`_On`-flavored Lagrangian → Eulerian producer for `IsVlasovSolutionOn`**. The `_on` analog of `vlasovSolutionViaPushforward_isVlasovSolution`, diff --git a/LeanPool/Vlasov/OT/Coupling.lean b/LeanPool/Vlasov/OT/Coupling.lean index f88e205279..5ad891b209 100644 --- a/LeanPool/Vlasov/OT/Coupling.lean +++ b/LeanPool/Vlasov/OT/Coupling.lean @@ -3,12 +3,15 @@ Copyright (c) 2026 Joseph K. Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph K. Miller -/ -import Mathlib.Analysis.Convex.Cone.InnerDual +module + +public import LeanPool.Vlasov.OT.Wasserstein +public import Mathlib.Analysis.Convex.Cone.Basic +import Mathlib.Analysis.Convex.Cone.Dual import Mathlib.MeasureTheory.Measure.LevyProkhorovMetric import Mathlib.Probability.Kernel.Composition.MeasureComp import Mathlib.Probability.Kernel.Disintegration.StandardBorel import Mathlib.Topology.MetricSpace.Sequences -import LeanPool.Vlasov.OT.Wasserstein /-! # Coupling-based Wasserstein-1 distance @@ -28,6 +31,8 @@ characteristic flows. See `formalize/DESIGN.md` (in the source repository) for the overall design choices. -/ +@[expose] public section + /- The contents of this file — `IsCoupling`, `wasserstein1Coupling`, both directions of KR, `IsCoupling.map`, and `wasserstein1_pushforward_le_iInf` — diff --git a/LeanPool/Vlasov/OT/Wasserstein.lean b/LeanPool/Vlasov/OT/Wasserstein.lean index 1409c433e4..45744fab7d 100644 --- a/LeanPool/Vlasov/OT/Wasserstein.lean +++ b/LeanPool/Vlasov/OT/Wasserstein.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Joseph K. Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph K. Miller -/ -import Mathlib.MeasureTheory.Integral.Bochner.Basic +module + +public import Mathlib.MeasureTheory.Measure.HasOuterApproxClosed +public import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.MeasureTheory.Integral.DominatedConvergence -import Mathlib.MeasureTheory.Measure.HasOuterApproxClosed -import Mathlib.Topology.ContinuousMap.Bounded.Basic /-! # Wasserstein-1 distance via Kantorovich–Rubinstein duality (cost-generic) @@ -17,6 +18,8 @@ truncated-metric variant `wassersteinBar` (Wbar), and their property lemmas (symmetry, triangle, non-expansion under 1-Lipschitz pushforward, KR-dual lower bound, finiteness under finite first moments). -/ +@[expose] public section + open MeasureTheory namespace Vlasov diff --git a/LeanPool/Vlasov/OT/WeakToLagrangian.lean b/LeanPool/Vlasov/OT/WeakToLagrangian.lean index 2561fece53..128916837e 100644 --- a/LeanPool/Vlasov/OT/WeakToLagrangian.lean +++ b/LeanPool/Vlasov/OT/WeakToLagrangian.lean @@ -3,11 +3,17 @@ Copyright (c) 2026 Joseph K. Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph K. Miller -/ +module + + +public import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension +public import LeanPool.Vlasov.OT.CharacteristicFlow +public import Mathlib.Analysis.Calculus.BumpFunction.Normed +import Mathlib.Algebra.Order.Ring.Star import Mathlib.Analysis.Calculus.BumpFunction.Convolution -import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ContDiff -import Mathlib.Analysis.Convolution -import LeanPool.Vlasov.OT.CharacteristicFlow +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +import Mathlib.MeasureTheory.Integral.RieszMarkovKakutani.Real /-! # Weak ⟹ Lagrangian: every weak Vlasov solution is transported by its characteristic flow @@ -77,6 +83,8 @@ Assembly (C4): Universal (non-`_On`) form via window-gluing is a deferred follow-on (C5). -/ +@[expose] public section + namespace Vlasov open MeasureTheory diff --git a/LeanPool/Vlasov/OT/WellPosedness.lean b/LeanPool/Vlasov/OT/WellPosedness.lean index 159ae054f1..e927c6b8bc 100644 --- a/LeanPool/Vlasov/OT/WellPosedness.lean +++ b/LeanPool/Vlasov/OT/WellPosedness.lean @@ -3,7 +3,14 @@ Copyright (c) 2026 Joseph K. Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph K. Miller -/ -import LeanPool.Vlasov.OT.CharacteristicFlow +module + +public import LeanPool.Vlasov.OT.CharacteristicFlow +import Mathlib.Algebra.Order.Ring.Star +import Mathlib.Analysis.Calculus.Deriv.Prod +import Mathlib.Analysis.Calculus.FDeriv.Extend +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # Well-posedness ladder for the Vlasov equation + Dobrushin stability @@ -31,6 +38,8 @@ development: See `formalize/DESIGN.md` (in the source repository) for the overall design. -/ +@[expose] public section + namespace Vlasov open MeasureTheory ENNReal diff --git a/LeanPool/Wallace.lean b/LeanPool/Wallace.lean index 0a99be1da0..180b4be1d0 100644 --- a/LeanPool/Wallace.lean +++ b/LeanPool/Wallace.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.GeneralMain -import LeanPool.Wallace.RealMain -import LeanPool.Wallace.TychonoffWallace +public import LeanPool.Wallace.GeneralMain +public import LeanPool.Wallace.RealMain +public import LeanPool.Wallace.TychonoffWallace +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # The Wallace problem in ZFC @@ -19,6 +22,8 @@ Tags: wallace-problem, topological-groups, set-theoretic-topology MSC: 22A05, 54D30, 20K20 -/ +@[expose] public section + /-! # Countably compact groups and the Wallace counterexample diff --git a/LeanPool/Wallace/BlockFilters.lean b/LeanPool/Wallace/BlockFilters.lean index 328bb3308a..8826292a32 100644 --- a/LeanPool/Wallace/BlockFilters.lean +++ b/LeanPool/Wallace/BlockFilters.lean @@ -3,9 +3,20 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ - -import LeanPool.Wallace.MathlibFoundations -import LeanPool.Wallace.TriangularPreprocess +module + +public import LeanPool.Wallace.MathlibFoundations +public import LeanPool.Wallace.TriangularPreprocess +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.Algebra.Ring.Real /-! # Block-density filters for the Wallace construction @@ -15,6 +26,8 @@ abstract in the finite blocks: the later scheduling module only has to provide n which eventually avoid every finite set and a deletion bound whose relative size tends to zero. -/ +@[expose] public section + open Filter Set Topology open scoped Topology diff --git a/LeanPool/Wallace/BlockLimit.lean b/LeanPool/Wallace/BlockLimit.lean index f992ba1683..fd49a74190 100644 --- a/LeanPool/Wallace/BlockLimit.lean +++ b/LeanPool/Wallace/BlockLimit.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.BlockFilters -import LeanPool.Wallace.FusionSchedule -import Mathlib.Analysis.Normed.Group.AddCircle +public import LeanPool.Wallace.FusionSchedule +public import LeanPool.Wallace.TriangularPreprocess +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # Limits along block-density ultrafilters @@ -16,6 +18,8 @@ of an ultrafilter-generic position tends to infinity. This turns the vanishing on a retained member of the ultrafilter into convergence to zero in the circle. -/ +@[expose] public section + open Filter Set Topology namespace Wallace diff --git a/LeanPool/Wallace/BoundedIndependentMap.lean b/LeanPool/Wallace/BoundedIndependentMap.lean index 7f2d357c58..d871abdd6a 100644 --- a/LeanPool/Wallace/BoundedIndependentMap.lean +++ b/LeanPool/Wallace/BoundedIndependentMap.lean @@ -3,13 +3,26 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.FiniteCombinatorics +public import LeanPool.Wallace.FiniteCombinatorics +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Transport of bounded independence through injective homomorphisms -/ +@[expose] public section + open scoped BigOperators namespace Wallace diff --git a/LeanPool/Wallace/CoefficientTransfiniteExtension.lean b/LeanPool/Wallace/CoefficientTransfiniteExtension.lean index 99f2b9f4c3..b62bd35b20 100644 --- a/LeanPool/Wallace/CoefficientTransfiniteExtension.lean +++ b/LeanPool/Wallace/CoefficientTransfiniteExtension.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.MathlibFoundations -import Mathlib.Topology.Instances.AddCircle.Real +public import Mathlib.Topology.Instances.AddCircle.Real /-! # Coefficient-parametric transfinite character extension @@ -16,6 +16,8 @@ a prescribed circle element. The integer specialization uses scalar multiplicati specialization obtains the character from Baer's extension theorem. -/ +@[expose] public section + open Filter Set Topology namespace Wallace @@ -56,7 +58,7 @@ def LocallyAdmissible {R : Type w} {I : Type u} [AddCommMonoid R] [One R] [LT I] (nhds (character (Finsupp.single ⟨E.codeIndex c, hc⟩ 1))) /-- The character on a direct sum induced by its coordinate characters. -/ -private def finsuppAddHom {R : Type w} {I : Type u} [AddCommMonoid R] +def finsuppAddHom {R : Type w} {I : Type u} [AddCommMonoid R] (coordinates : I → (R →+ UnitAddCircle)) : (I →₀ R) →+ UnitAddCircle := Finsupp.liftAddHom coordinates @@ -67,20 +69,20 @@ private theorem finsuppAddHom_single {R : Type w} {I : Type u} [AddCommMonoid R] simp [finsuppAddHom] /-- Totalize the coordinate characters available below a recursive stage. -/ -private def stageCoordinates {R : Type w} {I : Type u} [AddCommMonoid R] [LT I] +def stageCoordinates {R : Type w} {I : Type u} [AddCommMonoid R] [LT I] [DecidableRel ((· < ·) : I → I → Prop)] (i : I) (previous : ∀ j, j < i → (R →+ UnitAddCircle)) : I → (R →+ UnitAddCircle) := fun j ↦ if h : j < i then previous j h else 0 /-- Evaluate a prepared term using only coordinates below the current stage. -/ -private def stageEvaluation {R : Type w} {I : Type u} [AddCommMonoid R] [LT I] +def stageEvaluation {R : Type w} {I : Type u} [AddCommMonoid R] [LT I] [DecidableRel ((· < ·) : I → I → Prop)] (E : Data R I) (i : I) (previous : ∀ j, j < i → (R →+ UnitAddCircle)) (c : E.Code) (n : ℕ) : UnitAddCircle := finsuppAddHom (stageCoordinates i previous) (E.prepared c n) /-- The compact ultrafilter limit selected at a code coordinate. -/ -private def compactStageLimit {R : Type w} {I : Type u} [AddCommMonoid R] [LT I] +def compactStageLimit {R : Type w} {I : Type u} [AddCommMonoid R] [LT I] [DecidableRel ((· < ·) : I → I → Prop)] (E : Data R I) (i : I) (previous : ∀ j, j < i → (R →+ UnitAddCircle)) (c : E.Code) : UnitAddCircle := @@ -97,7 +99,7 @@ private theorem finsuppAddHom_eq_of_eq_on_support rw [h i hi] /-- One step of the well-founded coordinate recursion. -/ -private def coordinateStep +def coordinateStep {R : Type w} {I : Type u} [AddCommMonoid R] [One R] [LinearOrder I] (extension : CoordinateExtension R) (E : Data R I) (D : Set I) (character : (D →₀ R) →+ UnitAddCircle) (i : I) @@ -111,7 +113,7 @@ private def coordinateStep 0 /-- The coordinate characters constructed by well-founded recursion. -/ -private def globalCoordinate {R : Type w} {I : Type u} [AddCommMonoid R] [One R] +def globalCoordinate {R : Type w} {I : Type u} [AddCommMonoid R] [One R] [LinearOrder I] [WellFoundedLT I] (extension : CoordinateExtension R) (E : Data R I) (D : Set I) (character : (D →₀ R) →+ UnitAddCircle) : I → (R →+ UnitAddCircle) := diff --git a/LeanPool/Wallace/ConcreteClosure.lean b/LeanPool/Wallace/ConcreteClosure.lean index ed854ba2fe..b45cd21ae7 100644 --- a/LeanPool/Wallace/ConcreteClosure.lean +++ b/LeanPool/Wallace/ConcreteClosure.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.ConcreteData -import LeanPool.Wallace.CountableClosure +public import LeanPool.Wallace.ConcreteData +public import LeanPool.Wallace.CountableClosure +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order /-! # Concrete countable dependency closures @@ -16,6 +24,8 @@ countable, contains the support of `x`, and has exactly the closure property req transfinite character extension. -/ +@[expose] public section + open Set namespace Wallace diff --git a/LeanPool/Wallace/ConcreteData.lean b/LeanPool/Wallace/ConcreteData.lean index 4bb787a36e..d8641f9f7f 100644 --- a/LeanPool/Wallace/ConcreteData.lean +++ b/LeanPool/Wallace/ConcreteData.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ - -import LeanPool.Wallace.BlockFilters -import LeanPool.Wallace.TransfiniteExtension +module + +public import LeanPool.Wallace.BlockFilters +public import LeanPool.Wallace.TransfiniteExtension +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order /-! # Concrete triangular data and block-density ultrafilters @@ -20,6 +28,8 @@ The choices here are entirely set-theoretic. No topology on the free group and assumed. -/ +@[expose] public section + open Filter Set Topology namespace Wallace diff --git a/LeanPool/Wallace/ConcreteFusionRun.lean b/LeanPool/Wallace/ConcreteFusionRun.lean index 32756ffec4..f030f3ddc9 100644 --- a/LeanPool/Wallace/ConcreteFusionRun.lean +++ b/LeanPool/Wallace/ConcreteFusionRun.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.LocalEnumeration -import LeanPool.Wallace.LocalFusion +public import LeanPool.Wallace.LocalEnumeration +public import LeanPool.Wallace.LocalFusion +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # The unconditional concrete local fusion @@ -15,6 +18,8 @@ prepared local blocks. It then converts the bounded deletion at every stage int block-density certificate for every relevant code. No marker sequence is used. -/ +@[expose] public section + open Filter Set Topology namespace Wallace diff --git a/LeanPool/Wallace/ConcreteLocalSetup.lean b/LeanPool/Wallace/ConcreteLocalSetup.lean index ad9dbe9913..75eb2926be 100644 --- a/LeanPool/Wallace/ConcreteLocalSetup.lean +++ b/LeanPool/Wallace/ConcreteLocalSetup.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.ConcreteClosure -import LeanPool.Wallace.CountableDisjointization -import LeanPool.Wallace.FusionSchedule +public import LeanPool.Wallace.ConcreteClosure +public import LeanPool.Wallace.CountableDisjointization import LeanPool.Wallace.BoundedIndependentMap +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The concrete countable block schedule around one nonzero vector @@ -18,6 +22,8 @@ almost-disjoint labels, selects the unique active code at each block label, and finite independent set presented to bounded deletion at that stage. -/ +@[expose] public section + open Set namespace Wallace diff --git a/LeanPool/Wallace/CountableClosure.lean b/LeanPool/Wallace/CountableClosure.lean index 7e9b6b55fe..fe379fdfaa 100644 --- a/LeanPool/Wallace/CountableClosure.lean +++ b/LeanPool/Wallace/CountableClosure.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import Mathlib.Data.Finsupp.Defs -import Mathlib.Data.Set.Countable +public import Mathlib.Data.Finsupp.Defs +public import Mathlib.Data.Set.Countable /-! # Countable closure under triangular dependencies @@ -15,6 +16,8 @@ prepared sequence. Because code indices are injective, closing a countable set whose indices it contains still takes only countably many new coordinates at each finite stage. -/ +@[expose] public section + open Set universe u v w diff --git a/LeanPool/Wallace/CountableDisjointization.lean b/LeanPool/Wallace/CountableDisjointization.lean index 324d025c99..b0de129277 100644 --- a/LeanPool/Wallace/CountableDisjointization.lean +++ b/LeanPool/Wallace/CountableDisjointization.lean @@ -3,8 +3,19 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ - -import LeanPool.Wallace.BlockFilters +module + +public import LeanPool.Wallace.BlockFilters +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Disjointizing a countable almost-disjoint family @@ -14,6 +25,8 @@ orders any countable index type by an injection into `ℕ` and applies the stand deletion. Each label loses only finitely many points. -/ +@[expose] public section + open Set namespace Wallace @@ -72,27 +85,29 @@ private theorem relevantLabels_pairwise (index : ContinuumIndex ↪ ContinuumInd /-- Pairwise-disjoint refinements of the labels of all codes relevant to `D`. -/ def refinedLabel (index : ContinuumIndex ↪ ContinuumIndex) (D : Set ContinuumIndex) (hD : D.Countable) : RelevantCode index D → Set ℕ := by - let : Countable (RelevantCode index D) := relevantCode_countable index D hD + let : Countable (RelevantCode index D) := by exact relevantCode_countable index D hD exact Classical.choose (exists_disjoint_refinement_countable - (fun a : RelevantCode index D ↦ label a.1) (relevantLabels_pairwise index D)) + (fun a : RelevantCode index D ↦ label a.1) (private_decl% (relevantLabels_pairwise index D))) theorem refinedLabel_pairwise (index : ContinuumIndex ↪ ContinuumIndex) (D : Set ContinuumIndex) (hD : D.Countable) : Pairwise fun a b : RelevantCode index D ↦ Disjoint (refinedLabel index D hD a) (refinedLabel index D hD b) := by - let : Countable (RelevantCode index D) := relevantCode_countable index D hD + let : Countable (RelevantCode index D) := by exact relevantCode_countable index D hD exact (Classical.choose_spec (exists_disjoint_refinement_countable - (fun a : RelevantCode index D ↦ label a.1) (relevantLabels_pairwise index D))).1 + (fun a : RelevantCode index D ↦ label a.1) + (private_decl% (relevantLabels_pairwise index D)))).1 theorem label_diff_refinedLabel_finite (index : ContinuumIndex ↪ ContinuumIndex) (D : Set ContinuumIndex) (hD : D.Countable) (a : RelevantCode index D) : (label a.1 \ refinedLabel index D hD a).Finite := by - let : Countable (RelevantCode index D) := relevantCode_countable index D hD + let : Countable (RelevantCode index D) := by exact relevantCode_countable index D hD exact (Classical.choose_spec (exists_disjoint_refinement_countable - (fun a : RelevantCode index D ↦ label a.1) (relevantLabels_pairwise index D))).2 a |>.2 + (fun a : RelevantCode index D ↦ label a.1) + (private_decl% (relevantLabels_pairwise index D)))).2 a |>.2 private theorem refinedLabel_unique (index : ContinuumIndex ↪ ContinuumIndex) (D : Set ContinuumIndex) (hD : D.Countable) {l : ℕ} diff --git a/LeanPool/Wallace/FiniteCombinatorics.lean b/LeanPool/Wallace/FiniteCombinatorics.lean index b7a995144d..7c5d283aa5 100644 --- a/LeanPool/Wallace/FiniteCombinatorics.lean +++ b/LeanPool/Wallace/FiniteCombinatorics.lean @@ -3,10 +3,19 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ - +module + +public import Mathlib.Tactic.DeriveFintype +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Algebra.Group.End +public import Mathlib.Data.Finsupp.Defs +public import Mathlib.Data.Fintype.Pi +public import Mathlib.Data.Fintype.Sigma +public import Mathlib.Data.Int.ConditionallyCompleteOrder +public import Mathlib.Data.Int.Interval +public import Mathlib.Order.Lattice.Nat import Mathlib.Analysis.Normed.Field.Lemmas import Mathlib.NumberTheory.NumberField.Basic -import Mathlib.Tactic.DeriveFintype /-! # Finite combinatorics used in the Wallace construction @@ -23,6 +32,8 @@ The paper writes integer bounds as `|c| ≤ M`. We use `Int.natAbs c ≤ M`, wh definitionally the corresponding natural-number inequality. -/ +@[expose] public section + open scoped BigOperators open Set @@ -94,7 +105,8 @@ omit [AddCommGroup G] in rw [coefficientPatterns, Fintype.mem_piFinset] simp only [mem_boundedIntFinset_iff] -private noncomputable def equationSolution (B : Finset G) (q : ℤ) (c : B → ℤ) : G := +/-- Choose a solution to the finite integer equation when one exists, and zero otherwise. -/ +noncomputable def equationSolution (B : Finset G) (q : ℤ) (c : B → ℤ) : G := by classical exact if h : ∃ x : G, q • x + ∑ b, c b • (b : G) = 0 then Classical.choose h else 0 @@ -209,12 +221,15 @@ theorem exists_integer_dependence (s : ℕ) (b : Fin (s + 1) → Fin s → ℤ) abbrev BoundedInt (Q : ℕ) := ↑(boundedIntFinset Q) /-- All bounded vector families of every dimension at most `r`. -/ -private structure BoundedVectorFamily (r Q : ℕ) where +structure BoundedVectorFamily (r Q : ℕ) where + /-- The dimension of the bounded integer vectors. -/ size : Fin (r + 1) + /-- A family of one more bounded integer vectors than its dimension. -/ vec : Fin (size + 1) → Fin size → BoundedInt Q deriving Fintype -private noncomputable def chosenIntegerDependence {r Q : ℕ} (B : BoundedVectorFamily r Q) : +/-- Choose a nontrivial integer dependence among the bounded vectors. -/ +noncomputable def chosenIntegerDependence {r Q : ℕ} (B : BoundedVectorFamily r Q) : Fin (B.size + 1) → ℤ := Classical.choose <| exists_integer_dependence B.size fun i j ↦ B.vec i j @@ -223,7 +238,8 @@ private theorem chosenIntegerDependence_spec {r Q : ℕ} (B : BoundedVectorFamil ∀ j, ∑ i, chosenIntegerDependence B i * (B.vec i j : ℤ) = 0 := Classical.choose_spec <| exists_integer_dependence B.size fun i j ↦ B.vec i j -private noncomputable def familyDependenceBound {r Q : ℕ} (B : BoundedVectorFamily r Q) : ℕ := +/-- Bound the absolute values of the chosen integer dependence coefficients. -/ +noncomputable def familyDependenceBound {r Q : ℕ} (B : BoundedVectorFamily r Q) : ℕ := Finset.univ.sup fun i ↦ Int.natAbs (chosenIntegerDependence B i) /-- A uniform bound for an integer dependence among any `s+1` vectors in `ℤ^s`, for `s ≤ r`, diff --git a/LeanPool/Wallace/FullTopology.lean b/LeanPool/Wallace/FullTopology.lean index a4880c535d..cbf0d241d8 100644 --- a/LeanPool/Wallace/FullTopology.lean +++ b/LeanPool/Wallace/FullTopology.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.NontrivialSequences +public import LeanPool.Wallace.NontrivialSequences +public import Mathlib.Analysis.Normed.Group.Quotient +import Mathlib.Analysis.Normed.Group.AddCircle /-! # Full topological consequences of the character construction @@ -19,6 +22,8 @@ and has no non-eventually-constant convergent sequences. Its canonical induced totally bounded, which is the uniform formulation of precompactness used here. -/ +@[expose] public section + open Filter Set Topology universe u v diff --git a/LeanPool/Wallace/FullTopologyMain.lean b/LeanPool/Wallace/FullTopologyMain.lean index 01e6cdfda4..35fc042557 100644 --- a/LeanPool/Wallace/FullTopologyMain.lean +++ b/LeanPool/Wallace/FullTopologyMain.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.ConcreteFusionRun -import LeanPool.Wallace.FullTopology +public import LeanPool.Wallace.ConcreteFusionRun +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # The full free-Abelian group theorem @@ -14,6 +16,8 @@ This module applies the unconditional fusion construction to the generic topolog `Wallace.FullTopology`. The resulting theorem has no hypotheses. -/ +@[expose] public section + namespace Wallace noncomputable section diff --git a/LeanPool/Wallace/FusionLimit.lean b/LeanPool/Wallace/FusionLimit.lean index 0006389e6b..787e3c3bd2 100644 --- a/LeanPool/Wallace/FusionLimit.lean +++ b/LeanPool/Wallace/FusionLimit.lean @@ -3,9 +3,11 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module +public import Mathlib.Analysis.Normed.Group.Quotient +public import Mathlib.Topology.Instances.AddCircle.Real import Mathlib.Analysis.Normed.Group.AddCircle -import Mathlib.Analysis.SpecificLimits.Basic /-! # Pointwise limits of character fusions @@ -16,6 +18,8 @@ complete metric argument: the pointwise limit is again a homomorphism, and a geo a tail gives an explicit bound from the first point of that tail to the limit. -/ +@[expose] public section + open Filter Topology open scoped ENNReal diff --git a/LeanPool/Wallace/FusionSchedule.lean b/LeanPool/Wallace/FusionSchedule.lean index 564a2ba1a1..23a0de1f45 100644 --- a/LeanPool/Wallace/FusionSchedule.lean +++ b/LeanPool/Wallace/FusionSchedule.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import Mathlib.Analysis.SpecificLimits.Basic -import LeanPool.Wallace.FiniteCombinatorics -import LeanPool.Wallace.UniformKronecker +public import LeanPool.Wallace.FiniteCombinatorics +public import LeanPool.Wallace.UniformKronecker +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # A concrete schedule for the Wallace fusion @@ -22,6 +24,8 @@ makes the discarded proportion tend to zero. The errors form a geometric series `1 / 32`, leaving a large margin around an initial character value of `1 / 2`. -/ +@[expose] public section + open Filter Topology namespace Wallace diff --git a/LeanPool/Wallace/FusionStage.lean b/LeanPool/Wallace/FusionStage.lean index 00f94e0aa0..f82ad84b29 100644 --- a/LeanPool/Wallace/FusionStage.lean +++ b/LeanPool/Wallace/FusionStage.lean @@ -3,10 +3,12 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.FiniteCombinatorics -import LeanPool.Wallace.UniformKronecker -import Mathlib.Data.Finset.Lattice.Basic +public import LeanPool.Wallace.FiniteCombinatorics +public import LeanPool.Wallace.UniformKronecker +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # One finite character-fusion stage @@ -15,6 +17,8 @@ This module turns the bounded-deletion conclusion into the exact short-relation required by the uniform Kronecker lemma. It is the finite algebraic heart of one fusion stage. -/ +@[expose] public section + open scoped BigOperators universe u @@ -48,10 +52,12 @@ section Coefficients variable (A Y : Finset G) -private abbrev unionEquiv : Fin (A ∪ Y).card ≃ (A ∪ Y : Finset G) := +/-- Enumerate the union of two finite sets by a finite index type. -/ +abbrev unionEquiv : Fin (A ∪ Y).card ≃ (A ∪ Y : Finset G) := (A ∪ Y).equivFin.symm -private def unionTuple : Fin (A ∪ Y).card → G := +/-- The tuple enumerating the union of the two finite sets. -/ +def unionTuple : Fin (A ∪ Y).card → G := fun i ↦ (unionEquiv A Y i : G) private def unionCoefficient (a : Fin (A ∪ Y).card → ℤ) (x : G) : ℤ := by @@ -95,7 +101,7 @@ private theorem sum_unionCoefficient end Coefficients /-- The target which keeps the old character on `A` and is zero on the new set `Y`. -/ -private def stageTarget (A Y : Finset G) (old : G →+ UnitAddCircle) : +def stageTarget (A Y : Finset G) (old : G →+ UnitAddCircle) : Fin (A ∪ Y).card → UnitAddCircle := by classical exact fun i ↦ if unionTuple A Y i ∈ A then old (unionTuple A Y i) else 0 diff --git a/LeanPool/Wallace/GeneralMain.lean b/LeanPool/Wallace/GeneralMain.lean index 2885b6bd35..cb7d267220 100644 --- a/LeanPool/Wallace/GeneralMain.lean +++ b/LeanPool/Wallace/GeneralMain.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.TorsionFreeCoordinate -import LeanPool.Wallace.RationalAssembly -import LeanPool.Wallace.PackageTransport +public import LeanPool.Wallace.TorsionFreeCoordinate +public import LeanPool.Wallace.RationalAssembly +public import LeanPool.Wallace.PackageTransport +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # The main theorem for every torsion-free Abelian group of cardinality continuum @@ -17,6 +20,8 @@ coordinatization embedding from Section 2. Its prescribed basis limits lie in t group by construction, so no new fusion or set-theoretic hypothesis is needed. -/ +@[expose] public section + open Cardinal namespace Wallace diff --git a/LeanPool/Wallace/GlobalAssembly.lean b/LeanPool/Wallace/GlobalAssembly.lean index efc87abb73..aebf0950ae 100644 --- a/LeanPool/Wallace/GlobalAssembly.lean +++ b/LeanPool/Wallace/GlobalAssembly.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ - -import LeanPool.Wallace.ConcreteClosure -import LeanPool.Wallace.SeparationInterface +module + +public import LeanPool.Wallace.ConcreteClosure +public import LeanPool.Wallace.SeparationInterface +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.EReal.Inv +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order /-! # From the local fusions to the Wallace counterexample @@ -18,6 +27,8 @@ makes it admissible at every code. The resulting characters form a separating f minimal construction interface yields the Wallace semigroup. -/ +@[expose] public section + open Filter Set Topology namespace Wallace diff --git a/LeanPool/Wallace/InitialCharacter.lean b/LeanPool/Wallace/InitialCharacter.lean index 2a283e0e12..8fe7dbb91a 100644 --- a/LeanPool/Wallace/InitialCharacter.lean +++ b/LeanPool/Wallace/InitialCharacter.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module +public import Mathlib.Topology.Instances.AddCircle.Real import LeanPool.Wallace.UniformKronecker +import Mathlib.CategoryTheory.Category.Init /-! # A character with a prescribed half-turn value @@ -14,6 +17,8 @@ circle. Torsion-freeness makes this one-point prescription compatible with ever relation, and divisibility of the circle extends it to the ambient group. -/ +@[expose] public section + namespace Wallace noncomputable section diff --git a/LeanPool/Wallace/LocalEnumeration.lean b/LeanPool/Wallace/LocalEnumeration.lean index a34fa0c7d8..0426e7c80a 100644 --- a/LeanPool/Wallace/LocalEnumeration.lean +++ b/LeanPool/Wallace/LocalEnumeration.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import Mathlib.Data.Finsupp.Encodable -import Mathlib.Data.Set.Countable +public import Mathlib.Data.Set.Countable +public import Mathlib.Data.Finsupp.Defs +public import Mathlib.Data.Finsupp.Encodable /-! # Enumeration of a countable local direct sum -/ +@[expose] public section + namespace Wallace noncomputable section diff --git a/LeanPool/Wallace/LocalFusion.lean b/LeanPool/Wallace/LocalFusion.lean index 58b34c6966..d274c46354 100644 --- a/LeanPool/Wallace/LocalFusion.lean +++ b/LeanPool/Wallace/LocalFusion.lean @@ -3,16 +3,17 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.ConcreteLocalSetup +public import LeanPool.Wallace.ConcreteLocalSetup +public import LeanPool.Wallace.GlobalAssembly +public import LeanPool.Wallace.FusionSchedule +public import LeanPool.Wallace.FusionLimit import LeanPool.Wallace.BlockLimit -import LeanPool.Wallace.GlobalAssembly -import LeanPool.Wallace.FusionSchedule import LeanPool.Wallace.FusionStage -import LeanPool.Wallace.FusionLimit import LeanPool.Wallace.InitialCharacter -import Mathlib.Data.Finset.Lattice.Basic -import Mathlib.Data.Finset.SDiff +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # A local character-fusion core @@ -30,6 +31,8 @@ character and derive: The second half of the file carries out the scheduling induction for the concrete Wallace data. -/ +@[expose] public section + open Filter Set Topology namespace Wallace @@ -431,10 +434,12 @@ variable (hfresh_independent : ∀ l, BoundedIndependent (FusionSchedule.stageIndependenceBound l) (fresh l)) variable (initial : G →+ UnitAddCircle) -private abbrev states (l : ℕ) : FusionState G l := +/-- The fusion state at each stage of the chosen recursion. -/ +abbrev states (l : ℕ) : FusionState G l := fusionStates fresh enumeration x hfresh_card hfresh_independent initial l -private abbrev step (l : ℕ) : FusionStep fresh enumeration x l (states fresh enumeration x +/-- The chosen fusion step advancing the corresponding state. -/ +abbrev step (l : ℕ) : FusionStep fresh enumeration x l (states fresh enumeration x hfresh_card hfresh_independent initial l) := chosenFusionStep fresh enumeration x hfresh_card hfresh_independent l (states fresh enumeration x hfresh_card hfresh_independent initial l) diff --git a/LeanPool/Wallace/MathlibFoundations.lean b/LeanPool/Wallace/MathlibFoundations.lean index 9cf85a752d..5fac763114 100644 --- a/LeanPool/Wallace/MathlibFoundations.lean +++ b/LeanPool/Wallace/MathlibFoundations.lean @@ -3,13 +3,14 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import Mathlib.Logic.Encodable.Pi -import Mathlib.Order.Filter.Cofinite -import Mathlib.Order.Filter.Ultrafilter.Defs +public import Mathlib.Logic.Encodable.Pi +public import Mathlib.Order.Filter.Cofinite +public import Mathlib.Order.Filter.Ultrafilter.Defs +public import Mathlib.SetTheory.Cardinal.Cofinality.Ordinal +public import Mathlib.SetTheory.Cardinal.Continuum import Mathlib.Order.Interval.Finset.Nat -import Mathlib.SetTheory.Cardinal.Cofinality.Ordinal -import Mathlib.SetTheory.Cardinal.Continuum /-! # ZFC foundations used by the Wallace construction @@ -21,6 +22,8 @@ the basic facts about the initial topology generated by a family of circle-value No declaration in this file is an axiom and no proof is omitted. -/ +@[expose] public section + open Filter Set open scoped Cardinal diff --git a/LeanPool/Wallace/NontrivialSequences.lean b/LeanPool/Wallace/NontrivialSequences.lean index 6be63c1fa9..c791ef31f9 100644 --- a/LeanPool/Wallace/NontrivialSequences.lean +++ b/LeanPool/Wallace/NontrivialSequences.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.SeparationInterface +public import LeanPool.Wallace.SeparationInterface +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Inv import Mathlib.Data.Nat.Nth +import Mathlib.Topology.Algebra.InfiniteSum.Order /-! # Excluding nontrivial convergent sequences @@ -19,6 +23,8 @@ same subsequence would converge to zero along the free ultrafilter. This observation avoids any separate oscillating-marker construction. -/ +@[expose] public section + open Filter Set Topology universe u diff --git a/LeanPool/Wallace/PackageTransport.lean b/LeanPool/Wallace/PackageTransport.lean index b56d4f7cef..7e236c5bf8 100644 --- a/LeanPool/Wallace/PackageTransport.lean +++ b/LeanPool/Wallace/PackageTransport.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.FullTopology +public import LeanPool.Wallace.FullTopology /-! # Pulling a character package back along an embedding @@ -15,6 +16,8 @@ limit point for an embedded injective sequence has a chosen preimage in `G`, the package pulls back to `G`. -/ +@[expose] public section + open Filter Topology universe u v w diff --git a/LeanPool/Wallace/RationalAssembly.lean b/LeanPool/Wallace/RationalAssembly.lean index f94efe9494..f7368197ea 100644 --- a/LeanPool/Wallace/RationalAssembly.lean +++ b/LeanPool/Wallace/RationalAssembly.lean @@ -3,9 +3,12 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.RationalFusionRun -import LeanPool.Wallace.FullTopology +public import LeanPool.Wallace.RationalFusionRun +public import LeanPool.Wallace.FullTopology +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # Global assembly for the rational vector group @@ -15,6 +18,8 @@ The resulting compatible characters separate points and realize the nonzero ultr attached to every injective rational sequence. -/ +@[expose] public section + open Filter Set Topology namespace Wallace diff --git a/LeanPool/Wallace/RationalClosure.lean b/LeanPool/Wallace/RationalClosure.lean index 05749d6574..ad006c6de4 100644 --- a/LeanPool/Wallace/RationalClosure.lean +++ b/LeanPool/Wallace/RationalClosure.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.RationalData -import LeanPool.Wallace.CountableClosure +public import LeanPool.Wallace.RationalData +public import LeanPool.Wallace.CountableClosure +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order /-! # Countable dependency closures for the rational direct sum @@ -14,6 +23,8 @@ Starting from the finite support of a vector, close under the supports of every sequence whose code coordinate has entered the set. -/ +@[expose] public section + open Set namespace Wallace diff --git a/LeanPool/Wallace/RationalData.lean b/LeanPool/Wallace/RationalData.lean index 17c116d69f..3ec8a19e0f 100644 --- a/LeanPool/Wallace/RationalData.lean +++ b/LeanPool/Wallace/RationalData.lean @@ -3,9 +3,18 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ - -import LeanPool.Wallace.BlockFilters -import LeanPool.Wallace.RationalTransfiniteExtension +module + +public import LeanPool.Wallace.BlockFilters +public import LeanPool.Wallace.RationalTransfiniteExtension +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order /-! # Concrete triangular data for the rational direct sum @@ -14,6 +23,8 @@ This module chooses, uniformly for every coded injective rational sequence, its subsequence and its free block-density ultrafilter. -/ +@[expose] public section + open Filter Set Topology namespace Wallace diff --git a/LeanPool/Wallace/RationalFusionRun.lean b/LeanPool/Wallace/RationalFusionRun.lean index 2852a5abdb..917d842e59 100644 --- a/LeanPool/Wallace/RationalFusionRun.lean +++ b/LeanPool/Wallace/RationalFusionRun.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.RationalLocalSetup -import LeanPool.Wallace.LocalFusion -import LeanPool.Wallace.LocalEnumeration +public import LeanPool.Wallace.RationalLocalSetup +public import LeanPool.Wallace.LocalFusion +public import LeanPool.Wallace.LocalEnumeration +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # The unconditional local fusion for the rational direct sum @@ -16,6 +19,8 @@ prepared local blocks, proves the density bound for deleted positions, and packa resulting separating, locally admissible character. -/ +@[expose] public section + open Filter Set Topology namespace Wallace diff --git a/LeanPool/Wallace/RationalLocalSetup.lean b/LeanPool/Wallace/RationalLocalSetup.lean index fe0505c410..8b87e3abb9 100644 --- a/LeanPool/Wallace/RationalLocalSetup.lean +++ b/LeanPool/Wallace/RationalLocalSetup.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.RationalClosure -import LeanPool.Wallace.CountableDisjointization -import LeanPool.Wallace.FusionSchedule +public import LeanPool.Wallace.RationalClosure +public import LeanPool.Wallace.CountableDisjointization import LeanPool.Wallace.BoundedIndependentMap +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.MeasureTheory.Covering.Besicovitch /-! # The countable block schedule around one rational vector @@ -17,6 +21,8 @@ has at most one active code, and its shifted prepared terms form the finite inde used by the fusion. -/ +@[expose] public section + open Set namespace Wallace diff --git a/LeanPool/Wallace/RationalTransfiniteExtension.lean b/LeanPool/Wallace/RationalTransfiniteExtension.lean index 337236e5e1..9b778a0bbc 100644 --- a/LeanPool/Wallace/RationalTransfiniteExtension.lean +++ b/LeanPool/Wallace/RationalTransfiniteExtension.lean @@ -3,10 +3,18 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.CoefficientTransfiniteExtension -import LeanPool.Wallace.RationalTriangularPreprocess +public import LeanPool.Wallace.CoefficientTransfiniteExtension +public import LeanPool.Wallace.RationalTriangularPreprocess import Mathlib.Algebra.Category.Grp.Injective +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order /-! # Transfinite extension for the rational direct sum @@ -16,6 +24,8 @@ extension theorem extends the integer character with prescribed value at one to each rational coordinate. -/ +@[expose] public section + open Filter Set Topology namespace Wallace @@ -28,7 +38,7 @@ universe u open CoefficientTransfiniteExtension /-- The integer character with prescribed value at one. -/ -private def integerCircleHom (t : UnitAddCircle) : ℤ →+ UnitAddCircle := +def integerCircleHom (t : UnitAddCircle) : ℤ →+ UnitAddCircle := (zmultiplesHom UnitAddCircle) t private theorem intCastAddHom_rational_injective : @@ -37,10 +47,10 @@ private theorem intCastAddHom_rational_injective : exact Rat.intCast_injective h /-- An additive homomorphism on `ℚ` extending the integer character with value `t` at one. -/ -private def extendRationalCoordinate (t : UnitAddCircle) : ℚ →+ UnitAddCircle := - Classical.choose <| - (Module.Baer.of_divisible UnitAddCircle).extension_property_addMonoidHom - (Int.castAddHom ℚ) intCastAddHom_rational_injective (integerCircleHom t) +def extendRationalCoordinate (t : UnitAddCircle) : ℚ →+ UnitAddCircle := + Classical.choose <| private_decl% + ((Module.Baer.of_divisible UnitAddCircle).extension_property_addMonoidHom + (Int.castAddHom ℚ) intCastAddHom_rational_injective (integerCircleHom t)) private theorem extendRationalCoordinate_comp_intCast (t : UnitAddCircle) : (extendRationalCoordinate t).comp (Int.castAddHom ℚ) = integerCircleHom t := @@ -55,9 +65,9 @@ private theorem extendRationalCoordinate_one (t : UnitAddCircle) : simpa [integerCircleHom] using h /-- Baer's extension supplies the coordinate extension used by the generic recursion. -/ -private def rationalCoordinateExtension : CoordinateExtension ℚ where +def rationalCoordinateExtension : CoordinateExtension ℚ where ofValue := extendRationalCoordinate - ofValue_one := extendRationalCoordinate_one + ofValue_one := by exact extendRationalCoordinate_one /-- Triangular data for rational-valued prepared sequences. -/ abbrev Data (I : Type u) [LT I] := CoefficientTransfiniteExtension.Data ℚ I diff --git a/LeanPool/Wallace/RationalTriangularPreprocess.lean b/LeanPool/Wallace/RationalTriangularPreprocess.lean index d904302793..a292f00c86 100644 --- a/LeanPool/Wallace/RationalTriangularPreprocess.lean +++ b/LeanPool/Wallace/RationalTriangularPreprocess.lean @@ -3,9 +3,22 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ - -import LeanPool.Wallace.TriangularPreprocess +module + +public import LeanPool.Wallace.TriangularPreprocess +public import Mathlib.Algebra.Ring.Rat +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.SetTheory.Cardinal.Finsupp import Mathlib.SetTheory.Cardinal.Rat +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Triangular preprocessing for the rational direct sum @@ -18,6 +31,8 @@ independence selector from `Wallace.TriangularPreprocess`. No topology or character is assumed. -/ +@[expose] public section + open Set open scoped Cardinal diff --git a/LeanPool/Wallace/RealMain.lean b/LeanPool/Wallace/RealMain.lean index 3a49cc842d..5b5161f52c 100644 --- a/LeanPool/Wallace/RealMain.lean +++ b/LeanPool/Wallace/RealMain.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.GeneralMain +public import LeanPool.Wallace.PackageTransport +public import LeanPool.Wallace.RationalAssembly +import Mathlib.CategoryTheory.Category.Init import Mathlib.LinearAlgebra.Complex.FiniteDimensional +import Mathlib.NumberTheory.NumberField.Basic /-! # The rational proposition on the additive group of real numbers @@ -15,6 +19,8 @@ rational Hamel dimension of `ℝ`, then transports the fully constructed charact than merely asserting that a suitable topology can be transferred. -/ +@[expose] public section + open Cardinal Module namespace Wallace diff --git a/LeanPool/Wallace/Result.lean b/LeanPool/Wallace/Result.lean index e314d9765a..40fd35e4c0 100644 --- a/LeanPool/Wallace/Result.lean +++ b/LeanPool/Wallace/Result.lean @@ -3,13 +3,16 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import Mathlib.Algebra.Group.Finsupp -import Mathlib.Algebra.Group.Units.Defs -import Mathlib.Basic.Real.Basic -import Mathlib.Order.Filter.Ultrafilter.Basic -import Mathlib.Topology.Algebra.Group.Basic -import Mathlib.Topology.Compactness.CountablyCompact +public import Mathlib.Algebra.Group.Finsupp +public import Mathlib.Topology.Compactness.CountablyCompact +public import Mathlib.Algebra.Group.Submonoid.Defs +public import Mathlib.Algebra.Ring.Int.Defs +public import Mathlib.Topology.Algebra.Group.Defs +import Mathlib.Algebra.Order.AbsoluteValue.Basic +import Mathlib.Data.Rat.Floor +import Mathlib.Topology.Algebra.Monoid /-! # The Wallace semigroup deduction @@ -25,6 +28,8 @@ compact, cancellative on both sides, a topological semigroup, and not a group. Every declaration in this file is proved from its explicitly stated hypotheses. -/ +@[expose] public section + open Filter Set Topology universe u diff --git a/LeanPool/Wallace/SeparationInterface.lean b/LeanPool/Wallace/SeparationInterface.lean index ed4489fced..31201b5e67 100644 --- a/LeanPool/Wallace/SeparationInterface.lean +++ b/LeanPool/Wallace/SeparationInterface.lean @@ -3,8 +3,10 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import LeanPool.Wallace.Result +public import LeanPool.Wallace.Result +public import Mathlib.Topology.Instances.AddCircle.Real import Mathlib.Analysis.Normed.Group.AddCircle /-! @@ -19,6 +21,8 @@ No topology on the free Abelian group and no compactness conclusion is stored in `SeparationPackage`; both are derived below from its algebraic and filter-theoretic fields. -/ +@[expose] public section + open Filter Set Topology universe u diff --git a/LeanPool/Wallace/TorsionFreeCoordinate.lean b/LeanPool/Wallace/TorsionFreeCoordinate.lean index beafa91b29..c29684786c 100644 --- a/LeanPool/Wallace/TorsionFreeCoordinate.lean +++ b/LeanPool/Wallace/TorsionFreeCoordinate.lean @@ -3,12 +3,31 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ - -import LeanPool.Wallace.RationalTriangularPreprocess -import Mathlib.GroupTheory.DivisibleHull +module + +public import Mathlib.LinearAlgebra.Basis.VectorSpace + +public import Mathlib.LinearAlgebra.Dimension.StrongRankCondition + +public import LeanPool.Wallace.RationalTriangularPreprocess +public import Mathlib.GroupTheory.DivisibleHull +public import Mathlib.LinearAlgebra.Basis.SMul +public import Mathlib.LinearAlgebra.Dimension.Basic +public import Mathlib.LinearAlgebra.FreeModule.Basic +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Rat.Encodable +import Mathlib.Data.Sym.Sym2.Init import Mathlib.GroupTheory.OreLocalization.Cardinality -import Mathlib.LinearAlgebra.Basis.SMul import Mathlib.LinearAlgebra.Dimension.Free +import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Coordinatizing continuum-sized torsion-free Abelian groups @@ -18,6 +37,8 @@ Abelian group of cardinality continuum embeds in the rational direct sum of cont way whose image contains every standard basis vector. -/ +@[expose] public section + open Cardinal Module namespace Wallace @@ -80,18 +101,18 @@ def continuumBasis (hcard : #G = 𝔠) : /-- A numerator in `G` representing a vector of the chosen basis of the divisible hull. -/ def basisNumerator (hcard : #G = 𝔠) (i : TriangularPreprocess.ContinuumIndex) : G := - Classical.choose (exists_divisibleHull_mk (G := G) (continuumBasis hcard i)) + Classical.choose (private_decl% (exists_divisibleHull_mk (G := G) (continuumBasis hcard i))) /-- The positive denominator attached to `basisNumerator`. -/ def basisDenominator (hcard : #G = 𝔠) (i : TriangularPreprocess.ContinuumIndex) : ℕ+ := Classical.choose (Classical.choose_spec - (exists_divisibleHull_mk (G := G) (continuumBasis hcard i))) + (private_decl% (exists_divisibleHull_mk (G := G) (continuumBasis hcard i)))) theorem basisFraction (hcard : #G = 𝔠) (i : TriangularPreprocess.ContinuumIndex) : DivisibleHull.mk (basisNumerator hcard i) (basisDenominator hcard i) = continuumBasis hcard i := Classical.choose_spec (Classical.choose_spec - (exists_divisibleHull_mk (G := G) (continuumBasis hcard i))) + (private_decl% (exists_divisibleHull_mk (G := G) (continuumBasis hcard i)))) theorem denominator_smul_basis (hcard : #G = 𝔠) (i : TriangularPreprocess.ContinuumIndex) : diff --git a/LeanPool/Wallace/TransfiniteExtension.lean b/LeanPool/Wallace/TransfiniteExtension.lean index 6d6bbef295..6f41713fea 100644 --- a/LeanPool/Wallace/TransfiniteExtension.lean +++ b/LeanPool/Wallace/TransfiniteExtension.lean @@ -3,9 +3,17 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ - -import LeanPool.Wallace.CoefficientTransfiniteExtension -import LeanPool.Wallace.TriangularPreprocess +module + +public import LeanPool.Wallace.CoefficientTransfiniteExtension +public import LeanPool.Wallace.TriangularPreprocess +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order /-! # Transfinite extension of an integer-valued local character @@ -14,6 +22,8 @@ This file specializes the coefficient-parametric Wallace recursion to the free A An integer coordinate character is uniquely determined by its value at one. -/ +@[expose] public section + open Filter Set Topology namespace Wallace @@ -26,7 +36,7 @@ universe u open CoefficientTransfiniteExtension /-- Extend a prescribed circle value to the corresponding integer character. -/ -private def integerCoordinateExtension : CoordinateExtension ℤ where +def integerCoordinateExtension : CoordinateExtension ℤ where ofValue := fun t ↦ (zmultiplesHom UnitAddCircle) t ofValue_one := by intro t diff --git a/LeanPool/Wallace/TriangularPreprocess.lean b/LeanPool/Wallace/TriangularPreprocess.lean index 2aaa13fb39..b1d2e77f73 100644 --- a/LeanPool/Wallace/TriangularPreprocess.lean +++ b/LeanPool/Wallace/TriangularPreprocess.lean @@ -3,9 +3,24 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module +public import LeanPool.Wallace.FiniteCombinatorics +public import Mathlib.Algebra.Group.Finsupp +public import Mathlib.SetTheory.Cardinal.Continuum +public import Mathlib.Tactic.Continuity import LeanPool.Wallace.MathlibFoundations -import LeanPool.Wallace.FiniteCombinatorics +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Nat.Totient +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.SetTheory.Cardinal.Finsupp +import Mathlib.Tactic.ContinuousFunctionalCalculus +import Mathlib.Tactic.NormNum.GCD +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Triangular coding and block preprocessing @@ -17,6 +32,8 @@ assigned distinct indices strictly above every coordinate in the sequence. The the file constructs a genuine subsequence whose prescribed finite blocks are bounded-independent. -/ +@[expose] public section + open Set open scoped Cardinal @@ -234,15 +251,19 @@ theorem exists_index_gt_avoiding_finset /-- State of the recursive block selector. `values l` contains the values already selected in block `l`; `last` is the last source index used. -/ -private structure BlockSelectionState (G : Type*) where +structure BlockSelectionState (G : Type*) where + /-- The most recently selected block index. -/ last : ℕ + /-- The finite set selected at each block index. -/ values : ℕ → Finset G -private def initialBlockSelectionState (G : Type*) : BlockSelectionState G where +/-- The block-selection state with no selected values. -/ +def initialBlockSelectionState (G : Type*) : BlockSelectionState G where last := 0 values := fun _ => ∅ -private noncomputable def excludedAt +/-- The finite set of values excluded at the next block-selection stage. -/ +noncomputable def excludedAt {G : Type*} [AddCommGroup G] (M block : ℕ → ℕ) (n : ℕ) (st : BlockSelectionState G) : Finset G := by classical @@ -251,7 +272,7 @@ private noncomputable def excludedAt /-- The next source index: strictly later than the previous one and outside both the values already used in this block and every bounded forbidden equation over them. -/ -private def nextBlockIndex +def nextBlockIndex {G : Type*} [AddCommGroup G] (u : ℕ → G) (hu : Function.Injective u) (M block : ℕ → ℕ) (n : ℕ) (st : BlockSelectionState G) : ℕ := Classical.choose <| @@ -284,7 +305,8 @@ private theorem nextBlockIndex_not_forbidden exact (nextBlockIndex_spec u hu M block n st).2 (Finset.mem_union_right _ <| forbidden_mem_forbiddenFinset h) -private noncomputable def blockSelectionStep +/-- Advance block selection by choosing values outside the excluded set. -/ +noncomputable def blockSelectionStep {G : Type*} [AddCommGroup G] (u : ℕ → G) (hu : Function.Injective u) (M block : ℕ → ℕ) (n : ℕ) (st : BlockSelectionState G) : BlockSelectionState G := by @@ -296,7 +318,7 @@ private noncomputable def blockSelectionStep (insert (u k) (st.values (block n))) } /-- States after the first `n` positions of the new sequence have been selected. -/ -private def blockSelectionStates +def blockSelectionStates {G : Type*} [AddCommGroup G] (u : ℕ → G) (hu : Function.Injective u) (M block : ℕ → ℕ) : ℕ → BlockSelectionState G | 0 => initialBlockSelectionState G @@ -451,7 +473,7 @@ private theorem exists_lt_next_blockStart /-- The unique block label whose consecutive half-open interval contains `n`. -/ def blockOf (N : ℕ → ℕ) (hN : ∀ l, 0 < N l) (n : ℕ) : ℕ := - Nat.find (exists_lt_next_blockStart N hN n) + Nat.find (private_decl% (exists_lt_next_blockStart N hN n)) theorem blockOf_spec (N : ℕ → ℕ) (hN : ∀ l, 0 < N l) (n : ℕ) : blockStart N (blockOf N hN n) ≤ n ∧ diff --git a/LeanPool/Wallace/TychonoffWallace.lean b/LeanPool/Wallace/TychonoffWallace.lean index 25dbd3144c..6dd5b45455 100644 --- a/LeanPool/Wallace/TychonoffWallace.lean +++ b/LeanPool/Wallace/TychonoffWallace.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module +public import Mathlib.Topology.Separation.CompletelyRegular +public import LeanPool.Wallace.FullTopology +public import LeanPool.Wallace.TriangularPreprocess import LeanPool.Wallace.FullTopologyMain -import Mathlib.Topology.Separation.CompletelyRegular +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init /-! # The commutative Tychonoff Wallace semigroup @@ -15,6 +20,8 @@ noninvertible element. The paper's printed corollary also says that the witness and Tychonoff. This module makes both properties part of the public proposition. -/ +@[expose] public section + namespace Wallace noncomputable section diff --git a/LeanPool/Wallace/UniformKronecker.lean b/LeanPool/Wallace/UniformKronecker.lean index c0054c66bd..446b957591 100644 --- a/LeanPool/Wallace/UniformKronecker.lean +++ b/LeanPool/Wallace/UniformKronecker.lean @@ -3,20 +3,12 @@ Copyright (c) 2026 Juliane Trianon Fraga and Vinicius de Oliveira Rodrigues. All Released under Apache 2.0 license as described in the file LICENSE. Authors: Juliane Trianon Fraga, Vinicius de Oliveira Rodrigues -/ +module -import Mathlib.Algebra.Category.Grp.Injective -import Mathlib.Algebra.Group.Subgroup.Ker +public import Mathlib.Analysis.Fourier.AddCircleMulti import Mathlib.Algebra.Module.CharacterModule -import Mathlib.Analysis.Fourier.AddCircleMulti -import Mathlib.Analysis.Normed.Group.AddCircle -import Mathlib.Data.Fin.Tuple.Basic -import Mathlib.MeasureTheory.Integral.BoundedContinuousFunction -import Mathlib.MeasureTheory.Measure.Haar.Basic -import Mathlib.Topology.Algebra.Group.ClosedSubgroup import Mathlib.Topology.ContinuousMap.Bounded.ArzelaAscoli -import Mathlib.Topology.MetricSpace.Closeds import Mathlib.Topology.MetricSpace.UniformConvergence -import Mathlib.Topology.Sets.VietorisTopology /-! # Algebraic foundations for the uniform Kronecker lemma @@ -25,6 +17,8 @@ This file isolates the exact (non-quantitative) character-extension argument use The remaining quantitative statement is developed on top of these declarations. -/ +@[expose] public section + open scoped BigOperators noncomputable section diff --git a/LeanPool/WhiteheadTheorem.lean b/LeanPool/WhiteheadTheorem.lean index b139753db5..8c4dcc9ce2 100644 --- a/LeanPool/WhiteheadTheorem.lean +++ b/LeanPool/WhiteheadTheorem.lean @@ -3,37 +3,39 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.Auxiliary -import LeanPool.WhiteheadTheorem.Basic -import LeanPool.WhiteheadTheorem.Compressible.CWComplex -import LeanPool.WhiteheadTheorem.Compressible.Defs -import LeanPool.WhiteheadTheorem.Compressible.Disk -import LeanPool.WhiteheadTheorem.Compressible.WeakEquiv -import LeanPool.WhiteheadTheorem.CWComplex.Basic -import LeanPool.WhiteheadTheorem.CWComplex.IProd.Def -import LeanPool.WhiteheadTheorem.CWComplex.IProd.Iso -import LeanPool.WhiteheadTheorem.Defs -import LeanPool.WhiteheadTheorem.Exponential -import LeanPool.WhiteheadTheorem.HEP.Cofibration -import LeanPool.WhiteheadTheorem.HEP.Cube -import LeanPool.WhiteheadTheorem.HEP.CubeJar -import LeanPool.WhiteheadTheorem.HEP.Retract -import LeanPool.WhiteheadTheorem.HomotopyGroup.ChangeBasePt -import LeanPool.WhiteheadTheorem.HomotopyGroup.InducedMaps -import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Algebra -import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Compression -import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Defs -import LeanPool.WhiteheadTheorem.RelHomotopyGroup.LongExactSeq -import LeanPool.WhiteheadTheorem.Shapes.Cube -import LeanPool.WhiteheadTheorem.Shapes.CubeBoundaryMap -import LeanPool.WhiteheadTheorem.Shapes.Disk -import LeanPool.WhiteheadTheorem.Shapes.DiskHomeoCube -import LeanPool.WhiteheadTheorem.Shapes.Jar -import LeanPool.WhiteheadTheorem.Shapes.MappingCylinder -import LeanPool.WhiteheadTheorem.Shapes.Maps -import LeanPool.WhiteheadTheorem.Shapes.Pushout -import LeanPool.WhiteheadTheorem.Shapes.UnitInterval +public import LeanPool.WhiteheadTheorem.Auxiliary +public import LeanPool.WhiteheadTheorem.Basic +public import LeanPool.WhiteheadTheorem.Compressible.CWComplex +public import LeanPool.WhiteheadTheorem.Compressible.Defs +public import LeanPool.WhiteheadTheorem.Compressible.Disk +public import LeanPool.WhiteheadTheorem.Compressible.WeakEquiv +public import LeanPool.WhiteheadTheorem.CWComplex.Basic +public import LeanPool.WhiteheadTheorem.CWComplex.IProd.Def +public import LeanPool.WhiteheadTheorem.CWComplex.IProd.Iso +public import LeanPool.WhiteheadTheorem.Defs +public import LeanPool.WhiteheadTheorem.Exponential +public import LeanPool.WhiteheadTheorem.HEP.Cofibration +public import LeanPool.WhiteheadTheorem.HEP.Cube +public import LeanPool.WhiteheadTheorem.HEP.CubeJar +public import LeanPool.WhiteheadTheorem.HEP.Retract +public import LeanPool.WhiteheadTheorem.HomotopyGroup.ChangeBasePt +public import LeanPool.WhiteheadTheorem.HomotopyGroup.InducedMaps +public import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Algebra +public import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Compression +public import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Defs +public import LeanPool.WhiteheadTheorem.RelHomotopyGroup.LongExactSeq +public import LeanPool.WhiteheadTheorem.Shapes.Cube +public import LeanPool.WhiteheadTheorem.Shapes.CubeBoundaryMap +public import LeanPool.WhiteheadTheorem.Shapes.Disk +public import LeanPool.WhiteheadTheorem.Shapes.DiskHomeoCube +public import LeanPool.WhiteheadTheorem.Shapes.Jar +public import LeanPool.WhiteheadTheorem.Shapes.MappingCylinder +public import LeanPool.WhiteheadTheorem.Shapes.Maps +public import LeanPool.WhiteheadTheorem.Shapes.Pushout +public import LeanPool.WhiteheadTheorem.Shapes.UnitInterval +import Mathlib.Tactic.Measurability.Init /-! # Whitehead's theorem for CW-complexes @@ -45,3 +47,5 @@ Main declarations: `WhiteheadTheorem` Tags: algebraic-topology, cw-complex, homotopy-groups, weak-homotopy-equivalence MSC: 55P10, 55Q05, 55U10 -/ + +@[expose] public section diff --git a/LeanPool/WhiteheadTheorem/Auxiliary.lean b/LeanPool/WhiteheadTheorem/Auxiliary.lean index f4436d4bf9..d6542f25ee 100644 --- a/LeanPool/WhiteheadTheorem/Auxiliary.lean +++ b/LeanPool/WhiteheadTheorem/Auxiliary.lean @@ -3,14 +3,11 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import Mathlib.Algebra.Order.Archimedean.Basic -import Mathlib.Data.Fintype.Lattice -import Mathlib.Order.ConditionallyCompleteLattice.Finset -import Mathlib.Topology.Homotopy.Basic -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.Square -import Mathlib.Topology.Category.TopCat.Limits.Basic -import Mathlib.CategoryTheory.Limits.Shapes.Products +public import Mathlib.Topology.Homotopy.Basic +public import Mathlib.CategoryTheory.Limits.Shapes.Products +public import Mathlib.Topology.Category.TopCat.Basic /-! # LeanPool.WhiteheadTheorem.Auxiliary @@ -18,6 +15,8 @@ import Mathlib.CategoryTheory.Limits.Shapes.Products Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Auxiliary`. -/ +@[expose] public section + namespace CategoryTheory @@ -76,8 +75,8 @@ lemma Real.forall_le_of_iSup_le_of_bddAbove {ι : Sort*} {f : ι → ℝ} {a : · exact Real.isLUB_sSup ‹_› hbdd |>.left (Set.mem_range_self i) |>.trans hf lemma Real.range_bddAbove_of_finite_domain {ι : Type*} (f : ι → ℝ) [Finite ι] : - BddAbove (Set.range f) := by - simp_all + BddAbove (Set.range f) := + (Set.finite_range f).bddAbove lemma Real.forall_le_of_iSup_le_of_finite_domain {ι : Type*} {f : ι → ℝ} {a : ℝ} [Finite ι] (hf : ⨆ i, f i ≤ a) : ∀ (i : ι), f i ≤ a := diff --git a/LeanPool/WhiteheadTheorem/Basic.lean b/LeanPool/WhiteheadTheorem/Basic.lean index 2dddbeb461..c48376df65 100644 --- a/LeanPool/WhiteheadTheorem/Basic.lean +++ b/LeanPool/WhiteheadTheorem/Basic.lean @@ -3,36 +3,12 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.Auxiliary -import LeanPool.WhiteheadTheorem.Compressible.CWComplex -import LeanPool.WhiteheadTheorem.Compressible.Defs -import LeanPool.WhiteheadTheorem.Compressible.Disk +public import LeanPool.WhiteheadTheorem.CWComplex.Basic +public import LeanPool.WhiteheadTheorem.Defs import LeanPool.WhiteheadTheorem.Compressible.WeakEquiv -import LeanPool.WhiteheadTheorem.CWComplex.Basic -import LeanPool.WhiteheadTheorem.CWComplex.IProd.Def -import LeanPool.WhiteheadTheorem.CWComplex.IProd.Iso -import LeanPool.WhiteheadTheorem.Defs -import LeanPool.WhiteheadTheorem.Exponential -import LeanPool.WhiteheadTheorem.HEP.Cofibration -import LeanPool.WhiteheadTheorem.HEP.Cube -import LeanPool.WhiteheadTheorem.HEP.CubeJar -import LeanPool.WhiteheadTheorem.HEP.Retract -import LeanPool.WhiteheadTheorem.HomotopyGroup.ChangeBasePt -import LeanPool.WhiteheadTheorem.HomotopyGroup.InducedMaps -import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Algebra -import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Compression -import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Defs -import LeanPool.WhiteheadTheorem.RelHomotopyGroup.LongExactSeq -import LeanPool.WhiteheadTheorem.Shapes.Cube -import LeanPool.WhiteheadTheorem.Shapes.CubeBoundaryMap -import LeanPool.WhiteheadTheorem.Shapes.Disk -import LeanPool.WhiteheadTheorem.Shapes.DiskHomeoCube -import LeanPool.WhiteheadTheorem.Shapes.Jar -import LeanPool.WhiteheadTheorem.Shapes.MappingCylinder -import LeanPool.WhiteheadTheorem.Shapes.Maps -import LeanPool.WhiteheadTheorem.Shapes.Pushout -import LeanPool.WhiteheadTheorem.Shapes.UnitInterval +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.WhiteheadTheorem.Basic @@ -40,6 +16,8 @@ import LeanPool.WhiteheadTheorem.Shapes.UnitInterval Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Basic`. -/ +@[expose] public section + open CategoryTheory diff --git a/LeanPool/WhiteheadTheorem/CWComplex/Basic.lean b/LeanPool/WhiteheadTheorem/CWComplex/Basic.lean index 65b3b0a16c..a587880ca9 100644 --- a/LeanPool/WhiteheadTheorem/CWComplex/Basic.lean +++ b/LeanPool/WhiteheadTheorem/CWComplex/Basic.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.Shapes.Disk -import Mathlib.Topology.Category.TopCat.Limits.Basic -import Mathlib.CategoryTheory.Limits.Shapes.Products -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.Square -import Mathlib.CategoryTheory.Functor.OfSequence +public import LeanPool.WhiteheadTheorem.Shapes.Disk +public import Mathlib.Topology.Category.TopCat.Limits.Basic +public import Mathlib.CategoryTheory.Functor.OfSequence +public import Mathlib.CategoryTheory.Limits.Shapes.Pullback.IsPullback.Defs /-! # LeanPool.WhiteheadTheorem.CWComplex.Basic @@ -16,6 +16,8 @@ import Mathlib.CategoryTheory.Functor.OfSequence Imported Lean Pool material for `LeanPool.WhiteheadTheorem.CWComplex.Basic`. -/ +@[expose] public section + /-! # CW-complexes This file defines (relative) CW-complexes. diff --git a/LeanPool/WhiteheadTheorem/CWComplex/IProd/Def.lean b/LeanPool/WhiteheadTheorem/CWComplex/IProd/Def.lean index 3f42483a6d..1756816503 100644 --- a/LeanPool/WhiteheadTheorem/CWComplex/IProd/Def.lean +++ b/LeanPool/WhiteheadTheorem/CWComplex/IProd/Def.lean @@ -5,14 +5,14 @@ Authors: Jiazhen Xia -/ -- import WhiteheadTheorem.Shapes.Cube -import LeanPool.WhiteheadTheorem.CWComplex.Basic -import LeanPool.WhiteheadTheorem.Auxiliary -import LeanPool.WhiteheadTheorem.Exponential -import LeanPool.WhiteheadTheorem.Shapes.DiskHomeoCube -import LeanPool.WhiteheadTheorem.Shapes.CubeBoundaryMap +module + +public import LeanPool.WhiteheadTheorem.CWComplex.Basic +public import LeanPool.WhiteheadTheorem.Exponential +public import LeanPool.WhiteheadTheorem.Shapes.DiskHomeoCube +public import LeanPool.WhiteheadTheorem.Shapes.CubeBoundaryMap import LeanPool.WhiteheadTheorem.Shapes.Maps import LeanPool.WhiteheadTheorem.Shapes.Pushout -import Mathlib.CategoryTheory.Comma.Arrow /-! For every CW-complex `X`, this file constructs a relative CW-complex `X.IProd` @@ -20,6 +20,8 @@ homeomorphic to `I × X`, where `I` is the unit interval. The $(-1)$-skeleton of `X.IProd` is homeomorphic to `{0, 1} × X`. -/ +@[expose] public section + open CategoryTheory unitInterval TopCat -- open scoped Topology Topology.Homotopy -- `∂I^1` and `I^ Fin 1` diff --git a/LeanPool/WhiteheadTheorem/CWComplex/IProd/Iso.lean b/LeanPool/WhiteheadTheorem/CWComplex/IProd/Iso.lean index 50883f8a87..e460257047 100644 --- a/LeanPool/WhiteheadTheorem/CWComplex/IProd/Iso.lean +++ b/LeanPool/WhiteheadTheorem/CWComplex/IProd/Iso.lean @@ -3,9 +3,9 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.CWComplex.IProd.Def -import Mathlib.CategoryTheory.Adjunction.Limits +public import LeanPool.WhiteheadTheorem.CWComplex.IProd.Def /-! This file verifies that the pair `(X.IProd.sk 0, X.IProd)` is homeomorphic to @@ -14,6 +14,8 @@ This file verifies that the pair `(X.IProd.sk 0, X.IProd)` is homeomorphic to and `I` is the unit interval. -/ +@[expose] public section + open CategoryTheory unitInterval TopCat diff --git a/LeanPool/WhiteheadTheorem/Compressible/CWComplex.lean b/LeanPool/WhiteheadTheorem/Compressible/CWComplex.lean index dbddf2cc5a..ef3b81ea23 100644 --- a/LeanPool/WhiteheadTheorem/Compressible/CWComplex.lean +++ b/LeanPool/WhiteheadTheorem/Compressible/CWComplex.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.CWComplex.IProd.Iso +public import LeanPool.WhiteheadTheorem.Compressible.Defs +public import LeanPool.WhiteheadTheorem.CWComplex.Basic import LeanPool.WhiteheadTheorem.HEP.Cofibration -import LeanPool.WhiteheadTheorem.Compressible.Defs /-! This file proves that if a map is compressible with respect to @@ -19,6 +20,8 @@ This is the theorem `IsCompressible.relCWComplex_of_diskBoundaryIncl`. Some proofs are similar to the ones in `Mathlib.CategoryTheory.LiftingProperties.Limits` -/ +@[expose] public section + open CategoryTheory unitInterval diff --git a/LeanPool/WhiteheadTheorem/Compressible/Defs.lean b/LeanPool/WhiteheadTheorem/Compressible/Defs.lean index a48b2aa54d..ea1e8d2999 100644 --- a/LeanPool/WhiteheadTheorem/Compressible/Defs.lean +++ b/LeanPool/WhiteheadTheorem/Compressible/Defs.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.Exponential -import LeanPool.WhiteheadTheorem.Shapes.Maps -import Mathlib.Topology.Category.TopCat.Limits.Basic -import Mathlib.Topology.Homotopy.Basic -import Mathlib.CategoryTheory.LiftingProperties.Limits +public import LeanPool.WhiteheadTheorem.Exponential +public import LeanPool.WhiteheadTheorem.Shapes.Maps +public import Mathlib.Topology.Homotopy.Basic /-! # LeanPool.WhiteheadTheorem.Compressible.Defs @@ -16,6 +15,8 @@ import Mathlib.CategoryTheory.LiftingProperties.Limits Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Compressible.Defs`. -/ +@[expose] public section + open CategoryTheory unitInterval diff --git a/LeanPool/WhiteheadTheorem/Compressible/Disk.lean b/LeanPool/WhiteheadTheorem/Compressible/Disk.lean index 9f7186b865..4328e4d0ae 100644 --- a/LeanPool/WhiteheadTheorem/Compressible/Disk.lean +++ b/LeanPool/WhiteheadTheorem/Compressible/Disk.lean @@ -3,13 +3,17 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.Compressible.Defs -import LeanPool.WhiteheadTheorem.Shapes.MappingCylinder +public import LeanPool.WhiteheadTheorem.Compressible.Defs +public import LeanPool.WhiteheadTheorem.Shapes.MappingCylinder +public import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Defs +public import LeanPool.WhiteheadTheorem.Shapes.Disk +import LeanPool.WhiteheadTheorem.HEP.CubeJar import LeanPool.WhiteheadTheorem.HomotopyGroup.ChangeBasePt import LeanPool.WhiteheadTheorem.RelHomotopyGroup.LongExactSeq -import LeanPool.WhiteheadTheorem.HEP.CubeJar -import Mathlib.Topology.Homotopy.Contractible +import LeanPool.WhiteheadTheorem.Shapes.DiskHomeoCube +import Mathlib.Tactic.Measurability.Init /-! This file proves that if `f : C(X, Y)` is a weak homotopy equivalence, @@ -19,6 +23,8 @@ it is compressible with respect to `TopCat.diskBoundaryIncl n : ∂𝔻 n ⟶ for each `n`. -/ +@[expose] public section + open CategoryTheory TopCat open scoped unitInterval ContinuousMap Topology Topology.Homotopy diff --git a/LeanPool/WhiteheadTheorem/Compressible/WeakEquiv.lean b/LeanPool/WhiteheadTheorem/Compressible/WeakEquiv.lean index 65de0a404c..5300e018ce 100644 --- a/LeanPool/WhiteheadTheorem/Compressible/WeakEquiv.lean +++ b/LeanPool/WhiteheadTheorem/Compressible/WeakEquiv.lean @@ -3,9 +3,15 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.Compressible.Disk +public import LeanPool.WhiteheadTheorem.CWComplex.Basic +public import LeanPool.WhiteheadTheorem.Compressible.Defs +public import LeanPool.WhiteheadTheorem.Shapes.MappingCylinder +import LeanPool.WhiteheadTheorem.CWComplex.IProd.Iso import LeanPool.WhiteheadTheorem.Compressible.CWComplex +import LeanPool.WhiteheadTheorem.Compressible.Disk +import Mathlib.Tactic.Measurability.Init /-! This file proves that if `B` and `Y` are CW-complexes @@ -20,6 +26,8 @@ hence the definition `TopCat.LiftStructUpToRelHomotopy` can be weakened (?) * T. tom Dieck, *Algebraic topology*. Theorem 8.4.3. -/ +@[expose] public section + universe u diff --git a/LeanPool/WhiteheadTheorem/Defs.lean b/LeanPool/WhiteheadTheorem/Defs.lean index 96aa8be34b..8a237548cd 100644 --- a/LeanPool/WhiteheadTheorem/Defs.lean +++ b/LeanPool/WhiteheadTheorem/Defs.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.HomotopyGroup.InducedMaps +public import LeanPool.WhiteheadTheorem.HomotopyGroup.InducedMaps +public import Mathlib.Topology.Homotopy.Equiv +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.WhiteheadTheorem.Defs @@ -12,6 +15,8 @@ import LeanPool.WhiteheadTheorem.HomotopyGroup.InducedMaps Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Defs`. -/ +@[expose] public section + open CategoryTheory open scoped ContinuousMap diff --git a/LeanPool/WhiteheadTheorem/Exponential.lean b/LeanPool/WhiteheadTheorem/Exponential.lean index fc513b43a2..3066d9e1d5 100644 --- a/LeanPool/WhiteheadTheorem/Exponential.lean +++ b/LeanPool/WhiteheadTheorem/Exponential.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module +public import Mathlib.Topology.CompactOpen +public import Mathlib.Algebra.Group.End +public import Mathlib.CategoryTheory.Adjunction.Basic +public import Mathlib.Topology.Category.TopCat.Basic import Mathlib.Topology.UnitInterval -import Mathlib.Topology.CompactOpen -import Mathlib.Topology.Category.TopCat.Limits.Products /-! # LeanPool.WhiteheadTheorem.Exponential @@ -14,6 +17,8 @@ import Mathlib.Topology.Category.TopCat.Limits.Products Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Exponential`. -/ +@[expose] public section + open CategoryTheory open scoped Topology diff --git a/LeanPool/WhiteheadTheorem/HEP/Cofibration.lean b/LeanPool/WhiteheadTheorem/HEP/Cofibration.lean index 70c8457323..4259c0e505 100644 --- a/LeanPool/WhiteheadTheorem/HEP/Cofibration.lean +++ b/LeanPool/WhiteheadTheorem/HEP/Cofibration.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module +public import LeanPool.WhiteheadTheorem.Shapes.Maps +public import LeanPool.WhiteheadTheorem.CWComplex.Basic +public import LeanPool.WhiteheadTheorem.Exponential import LeanPool.WhiteheadTheorem.Shapes.Jar -import LeanPool.WhiteheadTheorem.Shapes.Maps -import LeanPool.WhiteheadTheorem.CWComplex.Basic -import LeanPool.WhiteheadTheorem.Exponential -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.Square import Mathlib.CategoryTheory.LiftingProperties.Limits /-! @@ -17,6 +17,8 @@ import Mathlib.CategoryTheory.LiftingProperties.Limits Imported Lean Pool material for `LeanPool.WhiteheadTheorem.HEP.Cofibration`. -/ +@[expose] public section + open CategoryTheory TopCat open scoped Topology unitInterval diff --git a/LeanPool/WhiteheadTheorem/HEP/Cube.lean b/LeanPool/WhiteheadTheorem/HEP/Cube.lean index db06e8b65a..097cc7201c 100644 --- a/LeanPool/WhiteheadTheorem/HEP/Cube.lean +++ b/LeanPool/WhiteheadTheorem/HEP/Cube.lean @@ -3,16 +3,19 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.CWComplex.Basic +public import LeanPool.WhiteheadTheorem.HEP.Cofibration +public import LeanPool.WhiteheadTheorem.Shapes.Cube import LeanPool.WhiteheadTheorem.Shapes.DiskHomeoCube -import LeanPool.WhiteheadTheorem.HEP.Cofibration /-! In this file, the homotopy extension property (HEP) of the pair $(I^n, ∂I^n)$ is derived from the HEP of $(D^n, ∂D^n)$. -/ +@[expose] public section + open CategoryTheory TopCat open scoped Topology unitInterval diff --git a/LeanPool/WhiteheadTheorem/HEP/CubeJar.lean b/LeanPool/WhiteheadTheorem/HEP/CubeJar.lean index e15c2aebbe..b37a27b85b 100644 --- a/LeanPool/WhiteheadTheorem/HEP/CubeJar.lean +++ b/LeanPool/WhiteheadTheorem/HEP/CubeJar.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.HEP.Cofibration -import LeanPool.WhiteheadTheorem.HEP.Retract -import LeanPool.WhiteheadTheorem.Shapes.Cube +public import LeanPool.WhiteheadTheorem.HEP.Cofibration +public import LeanPool.WhiteheadTheorem.HEP.Retract +public import LeanPool.WhiteheadTheorem.Auxiliary /-! This file proves that the pair `(∂𝕀 n, ⊔𝕀 n)` has the homotopy extension property for `n ≥ 1`. -/ +@[expose] public section + open scoped Topology Topology.Homotopy unitInterval diff --git a/LeanPool/WhiteheadTheorem/HEP/Retract.lean b/LeanPool/WhiteheadTheorem/HEP/Retract.lean index 3521b0a113..d66476f91a 100644 --- a/LeanPool/WhiteheadTheorem/HEP/Retract.lean +++ b/LeanPool/WhiteheadTheorem/HEP/Retract.lean @@ -3,12 +3,13 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.HEP.Cube -import LeanPool.WhiteheadTheorem.Shapes.Cube -import LeanPool.WhiteheadTheorem.Shapes.UnitInterval -import Mathlib.Analysis.Convex.Basic -import Mathlib.Topology.Homotopy.Contractible +public import LeanPool.WhiteheadTheorem.Shapes.Cube +public import Mathlib.Topology.Homotopy.Contractible +public import Mathlib.Logic.Equiv.PartialEquiv +import LeanPool.WhiteheadTheorem.Auxiliary +public import LeanPool.WhiteheadTheorem.HEP.Cube /-! # LeanPool.WhiteheadTheorem.HEP.Retract @@ -16,6 +17,8 @@ import Mathlib.Topology.Homotopy.Contractible Imported Lean Pool material for `LeanPool.WhiteheadTheorem.HEP.Retract`. -/ +@[expose] public section + open TopCat open scoped Topology unitInterval diff --git a/LeanPool/WhiteheadTheorem/HomotopyGroup/ChangeBasePt.lean b/LeanPool/WhiteheadTheorem/HomotopyGroup/ChangeBasePt.lean index 80eb4ae504..30e1030b90 100644 --- a/LeanPool/WhiteheadTheorem/HomotopyGroup/ChangeBasePt.lean +++ b/LeanPool/WhiteheadTheorem/HomotopyGroup/ChangeBasePt.lean @@ -3,18 +3,19 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.Defs -import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Defs -import LeanPool.WhiteheadTheorem.HEP.Cube -import LeanPool.WhiteheadTheorem.HEP.Cofibration -import LeanPool.WhiteheadTheorem.HomotopyGroup.InducedMaps +public import LeanPool.WhiteheadTheorem.Defs +public import LeanPool.WhiteheadTheorem.HEP.Cube +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.WhiteheadTheorem.HomotopyGroup.ChangeBasePt Imported Lean Pool material for `LeanPool.WhiteheadTheorem.HomotopyGroup.ChangeBasePt`. -/ + +@[expose] public section -- import Mathlib.CategoryTheory.Category.Pointed -- import WhiteheadTheorem.HEP.Retract -- import Mathlib.CategoryTheory.LiftingProperties.Adjunction diff --git a/LeanPool/WhiteheadTheorem/HomotopyGroup/InducedMaps.lean b/LeanPool/WhiteheadTheorem/HomotopyGroup/InducedMaps.lean index 8e60d13e80..a69f128ea3 100644 --- a/LeanPool/WhiteheadTheorem/HomotopyGroup/InducedMaps.lean +++ b/LeanPool/WhiteheadTheorem/HomotopyGroup/InducedMaps.lean @@ -3,12 +3,12 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Defs -import Mathlib.Algebra.Category.Grp.Basic -import Mathlib.CategoryTheory.Category.Pointed -import Mathlib.CategoryTheory.Comma.Over.Basic -import Mathlib.AlgebraicTopology.FundamentalGroupoid.InducedMaps +public import Mathlib.CategoryTheory.Category.Pointed +public import Mathlib.CategoryTheory.Comma.Over.Basic +public import Mathlib.Topology.Homotopy.HomotopyGroup +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.WhiteheadTheorem.HomotopyGroup.InducedMaps @@ -16,6 +16,8 @@ import Mathlib.AlgebraicTopology.FundamentalGroupoid.InducedMaps Imported Lean Pool material for `LeanPool.WhiteheadTheorem.HomotopyGroup.InducedMaps`. -/ +@[expose] public section + open CategoryTheory open scoped Topology Topology.Homotopy @@ -207,8 +209,8 @@ private theorem inducedMap'_respects (n : ℕ) {X Y : PointedTopCat} (f : X ⟶ induced by a morphism `f : X ⟶ Y` of pointed topological spaces -/ def inducedMap' (n : ℕ) {X Y : PointedTopCat} (f : X ⟶ Y) : π_ n X.as X.point → π_ n Y.as Y.point := - Quotient.map (GenLoop.inducedMap' n f) fun {α β} hαβ ↦ - inducedMap'_respects n f (α := α) (β := β) hαβ + Quotient.map (GenLoop.inducedMap' n f) fun {α β} hαβ ↦ by + exact inducedMap'_respects n f (α := α) (β := β) hαβ lemma inducedMap'_default (n : ℕ) {X Y : PointedTopCat} (f : X ⟶ Y) : inducedMap' n f (default : π_ n X.as X.point) = (default : π_ n Y.as Y.point) := by diff --git a/LeanPool/WhiteheadTheorem/RelHomotopyGroup/Algebra.lean b/LeanPool/WhiteheadTheorem/RelHomotopyGroup/Algebra.lean index 6ed64f0c1a..9053a664a4 100644 --- a/LeanPool/WhiteheadTheorem/RelHomotopyGroup/Algebra.lean +++ b/LeanPool/WhiteheadTheorem/RelHomotopyGroup/Algebra.lean @@ -3,29 +3,26 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import Mathlib.Logic.Function.Basic -import Mathlib.Data.Set.Basic -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Ring -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.FinCases -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.SplitIfs -import Mathlib.Tactic.Zify -import Mathlib.Tactic.Lift -import Mathlib.Tactic.Bound -import Mathlib.Tactic.Measurability -import Mathlib.Tactic.Abel +public import Aesop.BuiltinRules +public import Mathlib.Data.Set.Operations +public import Mathlib.Basic.Unique +import Mathlib.Data.Finset.Attr +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Tactic.Measurability.Init +import Mathlib.Tactic.NormNum.Abs +import Mathlib.Tactic.NormNum.DivMod +import Mathlib.Tactic.NormNum.OfScientific +import Mathlib.Tactic.NormNum.Pow /-! TODO: Use `Pointed` (the category of pointed types) in Mathlib. -/ +@[expose] public section + /- A pointed map from `(X, x₀)` to `(Y, y₀)` is a function `f : X → Y` such that `f x₀ = y₀`. -/ /-- `IsPointedMap` -/ diff --git a/LeanPool/WhiteheadTheorem/RelHomotopyGroup/Compression.lean b/LeanPool/WhiteheadTheorem/RelHomotopyGroup/Compression.lean index 57a43c4626..a5ba4d5023 100644 --- a/LeanPool/WhiteheadTheorem/RelHomotopyGroup/Compression.lean +++ b/LeanPool/WhiteheadTheorem/RelHomotopyGroup/Compression.lean @@ -3,9 +3,14 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Defs +public import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Defs import LeanPool.WhiteheadTheorem.HEP.Retract +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.Measurability.Init +import Mathlib.Tactic.NormNum.GCD /-! # LeanPool.WhiteheadTheorem.RelHomotopyGroup.Compression @@ -13,6 +18,8 @@ import LeanPool.WhiteheadTheorem.HEP.Retract Imported Lean Pool material for `LeanPool.WhiteheadTheorem.RelHomotopyGroup.Compression`. -/ +@[expose] public section + open scoped unitInterval Topology Topology.Homotopy open ContinuousMap diff --git a/LeanPool/WhiteheadTheorem/RelHomotopyGroup/Defs.lean b/LeanPool/WhiteheadTheorem/RelHomotopyGroup/Defs.lean index e8d76f99db..e6b3923660 100644 --- a/LeanPool/WhiteheadTheorem/RelHomotopyGroup/Defs.lean +++ b/LeanPool/WhiteheadTheorem/RelHomotopyGroup/Defs.lean @@ -3,10 +3,11 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.Shapes.Cube -import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Algebra -- IsPointedMap -import Mathlib.Topology.Homotopy.HomotopyGroup +public import LeanPool.WhiteheadTheorem.Shapes.Cube +public import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Algebra -- IsPointedMap +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.WhiteheadTheorem.RelHomotopyGroup.Defs @@ -14,6 +15,8 @@ import Mathlib.Topology.Homotopy.HomotopyGroup Imported Lean Pool material for `LeanPool.WhiteheadTheorem.RelHomotopyGroup.Defs`. -/ +@[expose] public section + open scoped unitInterval Topology Topology.Homotopy diff --git a/LeanPool/WhiteheadTheorem/RelHomotopyGroup/LongExactSeq.lean b/LeanPool/WhiteheadTheorem/RelHomotopyGroup/LongExactSeq.lean index c6a6c6eac9..135dabf68e 100644 --- a/LeanPool/WhiteheadTheorem/RelHomotopyGroup/LongExactSeq.lean +++ b/LeanPool/WhiteheadTheorem/RelHomotopyGroup/LongExactSeq.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module +public import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Defs import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Compression +import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +import Mathlib.Data.Sym.Sym2.Init +import Mathlib.Tactic.Measurability.Init +import Mathlib.Tactic.NormNum.GCD /-! # LeanPool.WhiteheadTheorem.RelHomotopyGroup.LongExactSeq @@ -12,6 +18,8 @@ import LeanPool.WhiteheadTheorem.RelHomotopyGroup.Compression Imported Lean Pool material for `LeanPool.WhiteheadTheorem.RelHomotopyGroup.LongExactSeq`. -/ +@[expose] public section + open scoped unitInterval Topology Topology.Homotopy open ContinuousMap diff --git a/LeanPool/WhiteheadTheorem/Shapes/Cube.lean b/LeanPool/WhiteheadTheorem/Shapes/Cube.lean index d6f49b2c13..c01a905975 100644 --- a/LeanPool/WhiteheadTheorem/Shapes/Cube.lean +++ b/LeanPool/WhiteheadTheorem/Shapes/Cube.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.Auxiliary -import LeanPool.WhiteheadTheorem.Shapes.UnitInterval -import Mathlib.Topology.Homotopy.HomotopyGroup +public import LeanPool.WhiteheadTheorem.Shapes.UnitInterval +public import Mathlib.Topology.Homotopy.HomotopyGroup /-! # LeanPool.WhiteheadTheorem.Shapes.Cube @@ -14,6 +14,8 @@ import Mathlib.Topology.Homotopy.HomotopyGroup Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Shapes.Cube`. -/ +@[expose] public section + open scoped unitInterval Topology Topology.Homotopy diff --git a/LeanPool/WhiteheadTheorem/Shapes/CubeBoundaryMap.lean b/LeanPool/WhiteheadTheorem/Shapes/CubeBoundaryMap.lean index 7f3dfa5cab..5198d28607 100644 --- a/LeanPool/WhiteheadTheorem/Shapes/CubeBoundaryMap.lean +++ b/LeanPool/WhiteheadTheorem/Shapes/CubeBoundaryMap.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.Shapes.Cube -import LeanPool.WhiteheadTheorem.Auxiliary -import LeanPool.WhiteheadTheorem.Shapes.UnitInterval +public import LeanPool.WhiteheadTheorem.Shapes.Cube +public import LeanPool.WhiteheadTheorem.Auxiliary /-! # LeanPool.WhiteheadTheorem.Shapes.CubeBoundaryMap @@ -14,6 +14,8 @@ import LeanPool.WhiteheadTheorem.Shapes.UnitInterval Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Shapes.CubeBoundaryMap`. -/ +@[expose] public section + open scoped Topology Topology.Homotopy CategoryTheory open unitInterval @@ -99,9 +101,10 @@ def mapVecOfBotTopSides : (k : Fin 3) → C(botTopSidesCover n k, Z) := apply (f01 1).hom.continuous.comp fun_prop⟩ let gs : C(sides.{u} n, Z) := - { toFun := fun ⟨⟨y, _⟩, _⟩ ↦ + { toFun := fun ⟨⟨y, hy⟩, hs⟩ ↦ fs ⟨(Cube.splitAtLast y).fst, - ⟨(Cube.splitAtLast y).snd, splitAtLast_snd_mem_boundary_of_mem_sides ‹_›⟩ ⟩ + ⟨(Cube.splitAtLast y).snd, + splitAtLast_snd_mem_boundary_of_mem_sides.{u} (y := ⟨y, hy⟩) hs⟩ ⟩ continuous_toFun := by fun_prop } Fin.cons g0 <| Fin.cons g1 <| Fin.cons gs <| finZeroElim diff --git a/LeanPool/WhiteheadTheorem/Shapes/Disk.lean b/LeanPool/WhiteheadTheorem/Shapes/Disk.lean index e6c308ad9e..1356ea3655 100644 --- a/LeanPool/WhiteheadTheorem/Shapes/Disk.lean +++ b/LeanPool/WhiteheadTheorem/Shapes/Disk.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import Mathlib.Topology.Category.TopCat.Limits.Basic -import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.Topology.Category.TopCat.Basic /-! # LeanPool.WhiteheadTheorem.Shapes.Disk @@ -13,6 +14,8 @@ import Mathlib.Analysis.InnerProductSpace.PiL2 Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Shapes.Disk`. -/ +@[expose] public section + namespace TopCat diff --git a/LeanPool/WhiteheadTheorem/Shapes/DiskHomeoCube.lean b/LeanPool/WhiteheadTheorem/Shapes/DiskHomeoCube.lean index 799dbd7c37..27d3e92bb3 100644 --- a/LeanPool/WhiteheadTheorem/Shapes/DiskHomeoCube.lean +++ b/LeanPool/WhiteheadTheorem/Shapes/DiskHomeoCube.lean @@ -5,13 +5,11 @@ Authors: Jiazhen Xia -/ -- import Mathlib.Topology.CWComplex +module + +public import LeanPool.WhiteheadTheorem.Shapes.Disk +public import LeanPool.WhiteheadTheorem.Shapes.Cube import LeanPool.WhiteheadTheorem.Auxiliary -import LeanPool.WhiteheadTheorem.Shapes.Disk -import LeanPool.WhiteheadTheorem.Shapes.Cube -import Mathlib.Topology.Homotopy.HomotopyGroup -import Mathlib.Topology.Category.TopCat.Limits.Basic -import Mathlib.CategoryTheory.Comma.Arrow -import Mathlib.Analysis.InnerProductSpace.PiL2 /-! # LeanPool.WhiteheadTheorem.Shapes.DiskHomeoCube @@ -19,6 +17,8 @@ import Mathlib.Analysis.InnerProductSpace.PiL2 Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Shapes.DiskHomeoCube`. -/ +@[expose] public section + open scoped Topology TopCat ENNReal unitInterval diff --git a/LeanPool/WhiteheadTheorem/Shapes/Jar.lean b/LeanPool/WhiteheadTheorem/Shapes/Jar.lean index 608ac33bc7..094abeded2 100644 --- a/LeanPool/WhiteheadTheorem/Shapes/Jar.lean +++ b/LeanPool/WhiteheadTheorem/Shapes/Jar.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.Auxiliary -import LeanPool.WhiteheadTheorem.Shapes.Disk +public import LeanPool.WhiteheadTheorem.Auxiliary +public import LeanPool.WhiteheadTheorem.Shapes.Disk /-! # LeanPool.WhiteheadTheorem.Shapes.Jar @@ -13,6 +14,8 @@ import LeanPool.WhiteheadTheorem.Shapes.Disk Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Shapes.Jar`. -/ +@[expose] public section + open TopCat open scoped Topology unitInterval diff --git a/LeanPool/WhiteheadTheorem/Shapes/MappingCylinder.lean b/LeanPool/WhiteheadTheorem/Shapes/MappingCylinder.lean index 92f3a4521d..0bf0ef1458 100644 --- a/LeanPool/WhiteheadTheorem/Shapes/MappingCylinder.lean +++ b/LeanPool/WhiteheadTheorem/Shapes/MappingCylinder.lean @@ -3,15 +3,14 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import LeanPool.WhiteheadTheorem.Defs -import LeanPool.WhiteheadTheorem.Exponential -import LeanPool.WhiteheadTheorem.Shapes.Maps -import LeanPool.WhiteheadTheorem.Shapes.Pushout -import LeanPool.WhiteheadTheorem.Shapes.UnitInterval -import Mathlib.Topology.Homotopy.Equiv -import Mathlib.Topology.Category.TopCat.Limits.Basic -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.Square +public import LeanPool.WhiteheadTheorem.Defs +public import LeanPool.WhiteheadTheorem.Exponential +public import LeanPool.WhiteheadTheorem.Shapes.Maps +public import LeanPool.WhiteheadTheorem.Shapes.Pushout +public import LeanPool.WhiteheadTheorem.Shapes.UnitInterval +import Mathlib.Tactic.Measurability.Init /-! # LeanPool.WhiteheadTheorem.Shapes.MappingCylinder @@ -19,6 +18,8 @@ import Mathlib.CategoryTheory.Limits.Shapes.Pullback.Square Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Shapes.MappingCylinder`. -/ +@[expose] public section + open CategoryTheory open scoped unitInterval ContinuousMap diff --git a/LeanPool/WhiteheadTheorem/Shapes/Maps.lean b/LeanPool/WhiteheadTheorem/Shapes/Maps.lean index 488102f063..efd7cef94b 100644 --- a/LeanPool/WhiteheadTheorem/Shapes/Maps.lean +++ b/LeanPool/WhiteheadTheorem/Shapes/Maps.lean @@ -3,16 +3,19 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import Mathlib.Topology.UnitInterval -import Mathlib.Topology.CompactOpen -import Mathlib.Topology.Category.TopCat.Basic +public import Mathlib.Topology.UnitInterval +public import Mathlib.Topology.CompactOpen +public import Mathlib.Topology.Category.TopCat.Basic /-! # LeanPool.WhiteheadTheorem.Shapes.Maps Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Shapes.Maps`. -/ + +@[expose] public section -- import Mathlib.Topology.Category.TopCat.Limits.Basic open scoped Topology unitInterval CategoryTheory diff --git a/LeanPool/WhiteheadTheorem/Shapes/Pushout.lean b/LeanPool/WhiteheadTheorem/Shapes/Pushout.lean index ce85823c61..bb4e44af6d 100644 --- a/LeanPool/WhiteheadTheorem/Shapes/Pushout.lean +++ b/LeanPool/WhiteheadTheorem/Shapes/Pushout.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import Mathlib.Topology.Homeomorph.Lemmas -import Mathlib.Topology.Category.TopCat.Limits.Basic -import Mathlib.CategoryTheory.Limits.Shapes.Pullback.Square +public import Mathlib.Topology.Category.TopCat.Limits.Basic +public import Mathlib.CategoryTheory.Limits.Shapes.FiniteLimits /-! # LeanPool.WhiteheadTheorem.Shapes.Pushout @@ -14,6 +14,8 @@ import Mathlib.CategoryTheory.Limits.Shapes.Pullback.Square Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Shapes.Pushout`. -/ +@[expose] public section + /-! TODO: * Dualize some of the results in `Mathlib.Topology.Category.TopCat.Limits.Pullbacks` diff --git a/LeanPool/WhiteheadTheorem/Shapes/UnitInterval.lean b/LeanPool/WhiteheadTheorem/Shapes/UnitInterval.lean index 19ac5e1032..4454befad7 100644 --- a/LeanPool/WhiteheadTheorem/Shapes/UnitInterval.lean +++ b/LeanPool/WhiteheadTheorem/Shapes/UnitInterval.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia -/ +module -import Mathlib.Topology.UnitInterval +public import Mathlib.Topology.UnitInterval /-! # LeanPool.WhiteheadTheorem.Shapes.UnitInterval @@ -12,6 +13,8 @@ import Mathlib.Topology.UnitInterval Imported Lean Pool material for `LeanPool.WhiteheadTheorem.Shapes.UnitInterval`. -/ +@[expose] public section + namespace unitInterval diff --git a/LeanPool/ZFLean.lean b/LeanPool/ZFLean.lean index 9e4e1827f9..f3389b46b5 100644 --- a/LeanPool/ZFLean.lean +++ b/LeanPool/ZFLean.lean @@ -3,19 +3,23 @@ Copyright (c) 2026 Vincent Trélat. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Trélat -/ +module -import LeanPool.ZFLean.Basic -import LeanPool.ZFLean.Booleans -import LeanPool.ZFLean.Naturals -import LeanPool.ZFLean.Integers -import LeanPool.ZFLean.Rationals -import LeanPool.ZFLean.Tactics -import LeanPool.ZFLean.Functions -import LeanPool.ZFLean.Embeddings -import LeanPool.ZFLean.Isomorphisms -import LeanPool.ZFLean.IsomorphismsFunsToPowRel -import LeanPool.ZFLean.IsomorphismsZFNatIso -import LeanPool.ZFLean.Sum +public import LeanPool.ZFLean.Basic +public import LeanPool.ZFLean.Booleans +public import LeanPool.ZFLean.Naturals +public import LeanPool.ZFLean.Integers +public import LeanPool.ZFLean.Rationals +public import LeanPool.ZFLean.Tactics +public import LeanPool.ZFLean.Functions +public import LeanPool.ZFLean.Embeddings +public import LeanPool.ZFLean.Isomorphisms +public import LeanPool.ZFLean.IsomorphismsFunsToPowRel +public import LeanPool.ZFLean.IsomorphismsZFNatIso +public import LeanPool.ZFLean.Sum +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # ZFLean @@ -28,6 +32,8 @@ Tags: set-theory, zfc, foundations MSC: 03E30, 03B35 -/ +@[expose] public section + /-! # ZFLean diff --git a/LeanPool/ZFLean/Basic.lean b/LeanPool/ZFLean/Basic.lean index a3c810dbc0..48e1b26892 100644 --- a/LeanPool/ZFLean/Basic.lean +++ b/LeanPool/ZFLean/Basic.lean @@ -3,14 +3,18 @@ Copyright (c) 2026 Vincent Trélat. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Trélat -/ +module -import Mathlib.SetTheory.ZFC.Basic +public import Mathlib.SetTheory.ZFC.Basic +import Mathlib.Tactic.Attr.Core /-! # LeanPool.ZFLean.Basic Imported Lean Pool material for `LeanPool.ZFLean.Basic`. -/ + +@[expose] public section noncomputable section namespace ZFSet diff --git a/LeanPool/ZFLean/Booleans.lean b/LeanPool/ZFLean/Booleans.lean index 3c89eccedd..27308f49b8 100644 --- a/LeanPool/ZFLean/Booleans.lean +++ b/LeanPool/ZFLean/Booleans.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Vincent Trélat. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Trélat -/ +module +public import Mathlib.SetTheory.ZFC.Basic import LeanPool.ZFLean.Basic +import Mathlib.Tactic.Attr.Core /-! # Boolean algebra on `ZFSet` @@ -22,6 +25,8 @@ It defines the following operations: -/ +@[expose] public section + noncomputable section /-! ## Preliminary definitions -/ diff --git a/LeanPool/ZFLean/Embeddings.lean b/LeanPool/ZFLean/Embeddings.lean index 69efcb41c9..ca158255d3 100644 --- a/LeanPool/ZFLean/Embeddings.lean +++ b/LeanPool/ZFLean/Embeddings.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Vincent Trélat. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Trélat -/ +module -import LeanPool.ZFLean.Functions +public import LeanPool.ZFLean.Functions +import LeanPool.ZFLean.Tactics +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ZFLean.Embeddings @@ -12,6 +17,8 @@ import LeanPool.ZFLean.Functions Imported Lean Pool material for `LeanPool.ZFLean.Embeddings`. -/ +@[expose] public section + namespace ZFSet /-- Imported ZFLean declaration. -/ def hasEmbedding (A B : ZFSet) : Prop := diff --git a/LeanPool/ZFLean/Functions.lean b/LeanPool/ZFLean/Functions.lean index a9af953452..efe03022e0 100644 --- a/LeanPool/ZFLean/Functions.lean +++ b/LeanPool/ZFLean/Functions.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Vincent Trélat. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Trélat -/ +module -import LeanPool.ZFLean.Rationals -import LeanPool.ZFLean.Booleans +public import LeanPool.ZFLean.Booleans +public import LeanPool.ZFLean.Basic +public import LeanPool.ZFLean.Integers import LeanPool.ZFLean.Tactics +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ZFLean.Functions @@ -14,6 +19,8 @@ import LeanPool.ZFLean.Tactics Imported Lean Pool material for `LeanPool.ZFLean.Functions`. -/ +@[expose] public section + namespace ZFSet /-- @@ -604,47 +611,14 @@ theorem _root_.ZFSet.fapply.def {f A B : ZFSet} (hf : f.IsPFunc A B) {x : ZFSet} theorem _root_.ZFSet.IsInjective.apply_inj {f A B : ZFSet} (hf : IsFunc A B f) (inj : f.IsInjective) : - Function.Injective @ᶻf := by classical + Function.Injective @ᶻf := by rintro ⟨x, x_dom⟩ ⟨y, y_dom⟩ h - have x_A : x ∈ A := by rwa [is_func_dom_eq hf] at x_dom - have y_A : y ∈ A := by rwa [is_func_dom_eq hf] at y_dom - obtain ⟨pair_x_ε, unq_fx⟩ := Classical.choose_spec <| hf.right x x_A - obtain ⟨pair_y_ε, unq_fy⟩ := Classical.choose_spec <| hf.right y y_A - congr - unfold fapply at h - injection h with h - generalize_proofs hpf hpf' at h - have choose_eq_x : - Classical.choose (hf.right x x_A) = Classical.choose hpf := by - congr - funext w - rw [propext_iff] - constructor - · rintro ⟨pair_x_w, unq_w⟩ - obtain ⟨_, _, _, l, eq⟩ := mem_prod.mp <| hf.left pair_x_w - rcases pair_inj.mp eq with ⟨rfl, rfl⟩ - exact ⟨l, pair_x_w⟩ - · rintro ⟨_, pair_x_w⟩ - obtain ⟨a, pair_x_a, unq_a⟩ := hf.right x x_A - exact ⟨pair_x_w, by intro w' pair_x_w'; rw [unq_a w' pair_x_w', unq_a w pair_x_w]⟩ - have choose_eq_y : - Classical.choose (hf.right y y_A) = Classical.choose hpf' := by - congr - funext w - rw [propext_iff] - constructor - · rintro ⟨pair_y_w, unq_w⟩ - obtain ⟨_, _, _, l, eq⟩ := mem_prod.mp <| hf.left pair_y_w - rcases pair_inj.mp eq with ⟨rfl, rfl⟩ - exact ⟨l, pair_y_w⟩ - · rintro ⟨_, pair_y_w⟩ - obtain ⟨a,pair_y_a,unq_a⟩ := hf.right y y_A - exact ⟨pair_y_w, by intro w' pair_y_w'; rw [unq_a w' pair_y_w', unq_a w pair_y_w]⟩ - apply inj x y (Classical.choose <| hf.right x x_A) x_A y_A - · exact choose_eq_x ▸ fapply_mem_range (is_func_is_pfunc hf) x_dom - · exact pair_x_ε - · rw [choose_eq_x, h, ← choose_eq_y] - exact pair_y_ε + apply Subtype.ext + apply inj x y (@ᶻf ⟨x, x_dom⟩) (by rwa [is_func_dom_eq hf] at x_dom) + (by rwa [is_func_dom_eq hf] at y_dom) (fapply_mem_range (is_func_is_pfunc hf) x_dom) + (fapply.def (is_func_is_pfunc hf) x_dom) + rw [h] + exact fapply.def (is_func_is_pfunc hf) y_dom theorem _root_.ZFSet.IsPFunc.exists_unique_of_mem_dom {f A B : ZFSet} (hf : f.IsPFunc A B) {x : ZFSet} (hx : x ∈ f.Dom) : @@ -740,19 +714,19 @@ def lambda (dom : ZFSet) (ran : ZFSet) (exp : ZFSet → ZFSet) : ZFSet := open Lean Parser Term /-- Imported ZFLean declaration. -/ -def funZType : Parser := +meta def funZType : Parser := ":" >> ppSpace >> termParser leadPrec >> ppSpace >> unicodeSymbol "→" "->" >> ppSpace >> termParser leadPrec /-- Imported ZFLean declaration. -/ -def funZAlts : Parser := +meta def funZAlts : Parser := "|" >> ppSpace >> Term.ident >> ppSpace >> unicodeSymbol "↦" "=>" >> ppSpace >> termParser /-- Parser for the domain, codomain, binder, and body of ZF function notation. -/ -def basicFunZ : Parser := leading_parser (withAnonymousAntiquot := false) +meta def basicFunZ : Parser := leading_parser (withAnonymousAntiquot := false) ppGroup (ppSpace >> funZType) >> funZAlts /-- Parser for ZF lambda notation. -/ -@[term_parser] def funZ := leading_parser:maxPrec +@[term_parser] meta def funZ := leading_parser:maxPrec ppAllowUngrouped >> unicodeSymbol "λᶻ" "funᶻ" >> basicFunZ /-- @@ -1303,16 +1277,11 @@ theorem Image_of_composition_self_inv_of_bijective {f A B : ZFSet} {f_is_func : theorem fapply_inv_of_bijective {A B : ZFSet} {f : ZFSet} {hf : IsFunc A B f} (f_bij : f.IsBijective hf) {x y : ZFSet} (hx : x ∈ A) (hy : y ∈ B) : @ᶻf ⟨x, by rwa [is_func_dom_eq]⟩ = y → @ᶻf⁻¹ ⟨y, by rwa [is_func_dom_eq]⟩ = x := by - intro rfl - conv_lhs => - rw [←fapply_composition (inv_is_func_of_bijective f_bij) hf hx, - fapply_eq_Image_singleton - (IsFunc_of_composition_IsFunc (inv_is_func_of_bijective f_bij) hf) hx] - conv => - enter [1,1] - rw [←fcomp.eq_def _ _ (inv_is_func_of_bijective f_bij) hf, - composition_self_inv_of_bijective f_bij] - rw [←fapply_eq_Image_singleton Id.IsFunc hx, fapply_Id hx] + intro h + have hxy := fapply.def (is_func_is_pfunc hf) (by rwa [is_func_dom_eq hf] : x ∈ f.Dom) + rw [h] at hxy + exact congrArg Subtype.val + (fapply.of_pair (is_func_is_pfunc (inv_is_func_of_bijective f_bij)) ((mem_inv hf.1).mpr hxy)) theorem fapply_inv_of_bijective_iff {A B : ZFSet} {f : ZFSet} {hf : IsFunc A B f} (f_bij : f.IsBijective hf) {x y : ZFSet} (hx : x ∈ A) (hy : y ∈ B) : @@ -1321,15 +1290,10 @@ theorem fapply_inv_of_bijective_iff {A B : ZFSet} {f : ZFSet} {hf : IsFunc A B f mp := fapply_inv_of_bijective f_bij hx hy mpr := by intro h - have := fapply_inv_of_bijective (inv_bijective_of_bijective f_bij) hy hx h - conv_lhs at this => - rw [fapply_eq_Image_singleton - (inv_is_func_of_bijective (inv_bijective_of_bijective f_bij)) hx] - conv => - enter [1,1] - rw [inv_involutive] - rw [←fapply_eq_Image_singleton hf hx] - exact this + have hyx := fapply.def (is_func_is_pfunc (inv_is_func_of_bijective f_bij)) + (by rwa [is_func_dom_eq (inv_is_func_of_bijective f_bij)] : y ∈ (f⁻¹).Dom) + rw [h, mem_inv] at hyx + exact congrArg Subtype.val (fapply.of_pair (is_func_is_pfunc hf) hyx) /-- A set is finite if it is equinumerous to a (ZF) natural number, i.e. @@ -2247,104 +2211,10 @@ noncomputable def fprod {A B A' B' : ZFSet} (f g : ZFSet) @[zfun] theorem fprod_is_func {A B A' B' φ ψ : ZFSet} (hφ : A.IsFunc A' φ) (hψ : B.IsFunc B' ψ) : (A.prod B).IsFunc (A'.prod B') (fprod φ ψ) := by - and_intros - · intro z hz - simp only [fprod, mem_prod, mem_lambda, existsAndEq, and_true] at hz - obtain ⟨a', b', a, b, rfl, ⟨aA, bB⟩, ⟨a'A', b'B'⟩, eq⟩ := hz - rw [dite_eq_left_of_eq_true (eq_true (by rw [pair_mem_prod]; exact ⟨aA, bB⟩)), - pair_inj] at eq - obtain ⟨rfl, rfl⟩ := eq - let φa : ZFSet := @ᶻφ ⟨a, by rwa [is_func_dom_eq hφ]⟩ - let ψb : ZFSet := @ᶻψ ⟨b, by rwa [is_func_dom_eq hψ]⟩ - simp only [mem_prod, pair_inj, exists_eq_right_right', π₁_pair, π₂_pair] - and_intros - · exact aA - · exact bB - · apply fapply_mem_range - · apply fapply_mem_range - · intro z hz - rw [mem_prod] at hz - obtain ⟨a, ha, b, hb, rfl⟩ := hz - let φa : ZFSet := @ᶻφ ⟨a, by rwa [is_func_dom_eq hφ]⟩ - let ψb : ZFSet := @ᶻψ ⟨b, by rwa [is_func_dom_eq hψ]⟩ - use φa.pair ψb - and_intros <;> beta_reduce - · simp_rw [fprod, lambda_spec, pair_mem_prod] - rw [dite_eq_left_of_eq_true (eq_true (by rw [pair_mem_prod]; exact ⟨ha, hb⟩)), pair_inj] - and_intros - · exact ha - · exact hb - · apply fapply_mem_range - · apply fapply_mem_range - · simp only [π₁_pair] - rfl - · simp only [π₂_pair] - rfl - · intro y hy - simp_rw [fprod, lambda_spec, pair_mem_prod, π₁_pair, π₂_pair] at hy - rw [dite_eq_left_of_eq_true (eq_true (by rw [pair_mem_prod]; exact ⟨ha, hb⟩))] at hy - exact hy.2.2 - -theorem fprod_bijective_of_bijective {A B A' B' φ ψ : ZFSet} - {hφ : A.IsFunc A' φ} {hψ : B.IsFunc B' ψ} - (φ_bij : φ.IsBijective) (ψ_bij : ψ.IsBijective) : - (fprod φ ψ).IsBijective := by - and_intros - · intro x y z hx hy hz xy yz - simp only [fprod, mem_prod, mem_lambda, pair_inj, existsAndEq, and_true, - exists_eq_left'] at xy yz - obtain ⟨⟨a, ha, b, hb, rfl⟩, -, rfl⟩ := xy - obtain ⟨⟨c, hc, d, hd, rfl⟩, -, eq⟩ := yz - rw [dite_eq_left_of_eq_true (eq_true (by rw [pair_mem_prod]; exact ⟨ha, hb⟩)), - dite_eq_left_of_eq_true (eq_true (by rw [pair_mem_prod]; exact ⟨hc, hd⟩)), - pair_inj] at eq - simp only [π₁_pair, SetLike.coe_eq_coe, π₂_pair] at eq - obtain ⟨φa_eq_φc, ψb_eq_ψd⟩ := eq - rw [pair_inj] - and_intros - · obtain ⟨⟩ := IsInjective.apply_inj hφ φ_bij.1 φa_eq_φc - rfl - · obtain ⟨⟩ := IsInjective.apply_inj hψ ψ_bij.1 ψb_eq_ψd - rfl - · intro y hy - rw [mem_prod] at hy - obtain ⟨a', ha', b', hb', rfl⟩ := hy - let φ_inv_a' : ZFSet := fapply φ⁻¹ (is_func_is_pfunc <| inv_is_func_of_bijective φ_bij) - ⟨a', by rwa [is_func_dom_eq (inv_is_func_of_bijective φ_bij)]⟩ - let ψ_inv_b' : ZFSet := fapply ψ⁻¹ (is_func_is_pfunc <| inv_is_func_of_bijective ψ_bij) - ⟨b', by rwa [is_func_dom_eq (inv_is_func_of_bijective ψ_bij)]⟩ - use φ_inv_a'.pair ψ_inv_b' - and_intros - · rw [pair_mem_prod] - and_intros - · apply fapply_mem_range - · apply fapply_mem_range - · simp only [fprod, mem_prod, lambda_spec, pair_inj, exists_eq_right_right', π₁_pair, π₂_pair] - and_intros - · apply fapply_mem_range - · apply fapply_mem_range - · exact ha' - · exact hb' - · rw [dite_eq_left_of_eq_true - (eq_true (by rw [pair_mem_prod]; and_intros <;> apply fapply_mem_range)), - pair_inj] - and_intros - · rw [←fapply_composition hφ (inv_is_func_of_bijective φ_bij) ha', - fapply_eq_Image_singleton - (IsFunc_of_composition_IsFunc hφ (inv_is_func_of_bijective φ_bij)) ha'] - conv => - enter [2, 1, 1] - change φ ∘ᶻ φ⁻¹ - rw [composition_inv_self_of_bijective φ_bij] - rw [←fapply_eq_Image_singleton Id.IsFunc ha', fapply_Id ha'] - · rw [←fapply_composition hψ (inv_is_func_of_bijective ψ_bij) hb', - fapply_eq_Image_singleton - (IsFunc_of_composition_IsFunc hψ (inv_is_func_of_bijective ψ_bij)) hb'] - conv => - enter [2, 1, 1] - change ψ ∘ᶻ ψ⁻¹ - rw [composition_inv_self_of_bijective ψ_bij] - rw [←fapply_eq_Image_singleton Id.IsFunc hb', fapply_Id hb'] + apply lambda_isFunc + intro z hz + rw [dite_eq_left hz, pair_mem_prod] + exact ⟨fapply_mem_range _ _, fapply_mem_range _ _⟩ theorem mem_fprod {A B C D f g x : ZFSet} {hf : A.IsFunc C f} {hg : B.IsFunc D g} : x ∈ fprod f g ↔ ∃ (a b : ZFSet) (ha : a ∈ A) (hb : b ∈ B), @@ -2382,6 +2252,41 @@ theorem pair_mem_fprod {A B C D f g x y : ZFSet} {hf : A.IsFunc C f} {hg : B.IsF rw [mem_fprod] simp only [pair_inj, exists_and_left] +theorem fprod_injective_of_injective {A B A' B' φ ψ : ZFSet} + {hφ : A.IsFunc A' φ} {hψ : B.IsFunc B' ψ} + (φ_inj : φ.IsInjective) (ψ_inj : ψ.IsInjective) : + (fprod φ ψ).IsInjective := by + intro x y z hx hy hz xy yz + simp only [fprod, mem_prod, mem_lambda, pair_inj, existsAndEq, and_true, + exists_eq_left'] at xy yz + obtain ⟨⟨a, ha, b, hb, rfl⟩, -, rfl⟩ := xy + obtain ⟨⟨c, hc, d, hd, rfl⟩, -, eq⟩ := yz + rw [dite_eq_left_of_eq_true (eq_true (by rw [pair_mem_prod]; exact ⟨ha, hb⟩)), + dite_eq_left_of_eq_true (eq_true (by rw [pair_mem_prod]; exact ⟨hc, hd⟩)), pair_inj] at eq + simp only [π₁_pair, SetLike.coe_eq_coe, π₂_pair] at eq + obtain ⟨φa_eq_φc, ψb_eq_ψd⟩ := eq + rw [pair_inj] + and_intros + · obtain ⟨⟩ := IsInjective.apply_inj hφ φ_inj φa_eq_φc + rfl + · obtain ⟨⟩ := IsInjective.apply_inj hψ ψ_inj ψb_eq_ψd + rfl + +theorem fprod_bijective_of_bijective {A B A' B' φ ψ : ZFSet} + {hφ : A.IsFunc A' φ} {hψ : B.IsFunc B' ψ} + (φ_bij : φ.IsBijective) (ψ_bij : ψ.IsBijective) : + (fprod φ ψ).IsBijective := by + refine ⟨fprod_injective_of_injective φ_bij.1 ψ_bij.1, ?_⟩ + intro y hy + obtain ⟨a', ha', b', hb', rfl⟩ := mem_prod.mp hy + obtain ⟨a, ha, haa'⟩ := φ_bij.2 a' ha' + obtain ⟨b, hb, hbb'⟩ := ψ_bij.2 b' hb' + refine ⟨a.pair b, pair_mem_prod.mpr ⟨ha, hb⟩, pair_mem_fprod.mpr ?_⟩ + refine ⟨a, b, ha, hb, rfl, ?_⟩ + exact congrArg₂ pair + (congrArg Subtype.val (fapply.of_pair (is_func_is_pfunc hφ) haa')).symm + (congrArg Subtype.val (fapply.of_pair (is_func_is_pfunc hψ) hbb')).symm + @[simp] theorem fapply_fprod {A B C D f g a b : ZFSet} (hf : A.IsFunc C f) (hg : B.IsFunc D g) (ha : a ∈ A) (hb : b ∈ B) : @@ -2390,23 +2295,9 @@ theorem fapply_fprod {A B C D f g a b : ZFSet} (hf : A.IsFunc C f) (hg : B.IsFun let fa : ZFSet := @ᶻf ⟨a, by rwa [is_func_dom_eq hf]⟩ let gb : ZFSet := @ᶻg ⟨b, by rwa [is_func_dom_eq hg]⟩ fa.pair gb := by - conv => - enter [1] - rw [fapply_eq_Image_singleton (fprod_is_func hf hg) (by rw [pair_mem_prod]; exact ⟨ha, hb⟩)] - dsimp [fprod] - rw [ - ←fapply_eq_Image_singleton - (lambda_isFunc - (fun h ↦ by - rw [dite_eq_left_of_eq_true (eq_true h), pair_mem_prod] - and_intros <;> apply fapply_mem_range)) - (by rw [pair_mem_prod]; exact ⟨ha, hb⟩), - fapply_lambda (fun h ↦ by - rw [dite_eq_left_of_eq_true (eq_true h), pair_mem_prod] - and_intros <;> apply fapply_mem_range) - (by rw [pair_mem_prod]; exact ⟨ha, hb⟩), - dite_eq_left_of_eq_true (eq_true (by rw [pair_mem_prod]; exact ⟨ha, hb⟩))] - simp only [π₁_pair, π₂_pair] + exact congrArg Subtype.val + (fapply.of_pair (is_func_is_pfunc (fprod_is_func hf hg)) + (pair_mem_fprod.mpr ⟨a, b, ha, hb, rfl, rfl⟩)) open ZFSet Classical in theorem composition_fprod_Image_bijective {A B A' B' φ ψ : ZFSet} @@ -2425,44 +2316,10 @@ theorem composition_fprod_Image_bijective {A B A' B' φ ψ : ZFSet} simp only [pair_inj, mem_powerset, existsAndEq, and_true, exists_eq_left'] at x_z y_z obtain ⟨_, _, rfl⟩ := x_z obtain ⟨_, _, eq⟩ := y_z - rw [ZFSet.ext_iff] at eq - simp only [mem_Image, mem_prod, and_congr_right_iff, forall_exists_index, and_imp] at eq - ext1 z - constructor <;> intro hz - · obtain ⟨a, ha, b, hb, rfl⟩ := ‹x ⊆ A.prod B› hz |> mem_prod.mp - let φa : ZFSet := @ᶻφ ⟨a, by rwa [is_func_dom_eq hφ]⟩ - let ψb : ZFSet := @ᶻψ ⟨b, by rwa [is_func_dom_eq hψ]⟩ - specialize eq (φa.pair ψb) φa (fapply_mem_range _ _) ψb (fapply_mem_range _ _) rfl - have := eq.mp ⟨a.pair b, hz, ?_⟩ - · obtain ⟨p, hp, p_def⟩ := this - simp_rw [φ_ψ, pair_mem_fprod, pair_inj] at p_def - obtain ⟨a', b', ha', hb', rfl, φa_φa', ψb_ψb'⟩ := p_def - rw [←Subtype.ext_iff] at φa_φa' ψb_ψb' - obtain ⟨⟩ := IsInjective.apply_inj hφ φ_bij.1 φa_φa' - obtain ⟨⟩ := IsInjective.apply_inj hψ ψ_bij.1 ψb_ψb' - exact hp - · simp_rw [φ_ψ, pair_mem_fprod, pair_inj] - simp only [exists_and_left, exists_and_right, existsAndEq, and_true, exists_eq_left'] - and_intros - · use ha - · use hb - · obtain ⟨a, ha, b, hb, rfl⟩ := ‹y ⊆ A.prod B› hz |> mem_prod.mp - let φa : ZFSet := @ᶻφ ⟨a, by rwa [is_func_dom_eq hφ]⟩ - let ψb : ZFSet := @ᶻψ ⟨b, by rwa [is_func_dom_eq hψ]⟩ - specialize eq (φa.pair ψb) φa (fapply_mem_range _ _) ψb (fapply_mem_range _ _) rfl - have := eq.mpr ⟨a.pair b, hz, ?_⟩ - · obtain ⟨p, hp, p_def⟩ := this - simp_rw [φ_ψ, pair_mem_fprod, pair_inj] at p_def - obtain ⟨a', b', ha', hb', rfl, φa_φa', ψb_ψb'⟩ := p_def - rw [←Subtype.ext_iff] at φa_φa' ψb_ψb' - obtain ⟨⟩ := IsInjective.apply_inj hφ φ_bij.1 φa_φa' - obtain ⟨⟩ := IsInjective.apply_inj hψ ψ_bij.1 ψb_ψb' - exact hp - · simp_rw [φ_ψ, pair_mem_fprod, pair_inj] - simp only [exists_and_left, exists_and_right, existsAndEq, and_true, exists_eq_left'] - and_intros - · use ha - · use hb + have h := congrArg (fun S ↦ Image _ S (inv_is_func_of_bijective hφ_ψ).1) eq + rw [Image_of_composition_inv_self_of_bijective hφ_ψ ‹x ⊆ A.prod B›, + Image_of_composition_inv_self_of_bijective hφ_ψ ‹y ⊆ A.prod B›] at h + exact h · intro Y hY rw [mem_powerset] at hY use φ_ψ⁻¹[Y] @@ -2484,24 +2341,4 @@ theorem composition_fprod_Image_bijective {A B A' B' φ ψ : ZFSet} rw [mem_Image] at hz exact hz.1 -theorem fprod_injective_of_injective {A B A' B' φ ψ : ZFSet} - {hφ : A.IsFunc A' φ} {hψ : B.IsFunc B' ψ} - (φ_inj : φ.IsInjective) (ψ_inj : ψ.IsInjective) : - (fprod φ ψ).IsInjective := by - intro x y z hx hy hz xy yz - simp only [fprod, mem_prod, mem_lambda, pair_inj, existsAndEq, and_true, - exists_eq_left'] at xy yz - obtain ⟨⟨a, ha, b, hb, rfl⟩, -, rfl⟩ := xy - obtain ⟨⟨c, hc, d, hd, rfl⟩, -, eq⟩ := yz - rw [dite_eq_left_of_eq_true (eq_true (by rw [pair_mem_prod]; exact ⟨ha, hb⟩)), - dite_eq_left_of_eq_true (eq_true (by rw [pair_mem_prod]; exact ⟨hc, hd⟩)), pair_inj] at eq - simp only [π₁_pair, SetLike.coe_eq_coe, π₂_pair] at eq - obtain ⟨φa_eq_φc, ψb_eq_ψd⟩ := eq - rw [pair_inj] - and_intros - · obtain ⟨⟩ := IsInjective.apply_inj hφ φ_inj φa_eq_φc - rfl - · obtain ⟨⟩ := IsInjective.apply_inj hψ ψ_inj ψb_eq_ψd - rfl - end ZFSet diff --git a/LeanPool/ZFLean/Integers.lean b/LeanPool/ZFLean/Integers.lean index a270b99743..8c0b943f91 100644 --- a/LeanPool/ZFLean/Integers.lean +++ b/LeanPool/ZFLean/Integers.lean @@ -3,10 +3,15 @@ Copyright (c) 2026 Vincent Trélat. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Trélat -/ -import LeanPool.ZFLean.Naturals -import Mathlib.Algebra.Order.Ring.Defs -import Mathlib.Algebra.Order.Group.Defs -import Mathlib.SetTheory.Cardinal.SchroederBernstein +module + +public import LeanPool.ZFLean.Naturals +public import Mathlib.Algebra.Order.Ring.Defs +public import Mathlib.Algebra.Group.End +import LeanPool.ZFLean.Basic +public import Mathlib.SetTheory.Cardinal.SchroederBernstein +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # ZFC Integers This file provides a construction of the integers in ZFC based on the construction of natural numbers. It follows the usual construction of integers as equivalence classes of pairs of natural @@ -16,6 +21,8 @@ in a commutative ring structure. Finally, we show that that the `ZFInt` type is isomorphic to the type of elements contained in `ZFSet.Int` type using the Schröder-Bernstein theorem. -/ + +@[expose] public section universe u namespace ZFSet @@ -191,10 +198,12 @@ theorem sub_right_cancel (a b c : ZFInt) : c - a = c - b → a = b := by theorem add_eq_sub_iff {a b c : ZFInt} : a + b = c ↔ a = c - b where mp := fun h => by rw [← h, add_sub_cancel] mpr := fun h => by rw [h, sub_add_cancel] -private noncomputable abbrev nsmul : ℕ → ZFInt → ZFInt +/-- Repeated addition by a natural-number scalar. -/ +noncomputable abbrev nsmul : ℕ → ZFInt → ZFInt | 0, _ => 0 | n+1, m => m + nsmul n m -private noncomputable abbrev zsmul (n : ℤ) (x : ZFInt) : ZFInt := +/-- Integer scalar multiplication defined using repeated addition and negation. -/ +noncomputable abbrev zsmul (n : ℤ) (x : ZFInt) : ZFInt := match n with | .ofNat n => nsmul n x | .negSucc n => -nsmul (n+1) x @@ -219,7 +228,8 @@ private theorem mul_wf {a b c d s t u v : ZFNat} /-- Integer multiplication in the ZF integer model. -/ noncomputable abbrev mul (n m : ZFInt) : ZFInt := Quotient.liftOn₂ n m - (fun ⟨a, b⟩ ⟨c, d⟩ => mk (a * c + b * d, a * d + b * c)) fun _ _ _ _ => (sound <| mul_wf · ·) + (fun ⟨a, b⟩ ⟨c, d⟩ => mk (a * c + b * d, a * d + b * c)) fun _ _ _ _ => by + exact (sound <| mul_wf · ·) /-- Imported ZFLean declaration. -/ noncomputable instance : Mul ZFInt := ⟨ZFInt.mul⟩ theorem mul_eq (n m : ZFNat × ZFNat) : @@ -836,7 +846,8 @@ noncomputable def ofInt : ℤ → ZFSet noncomputable def toZFInt : ℤ → ZFInt | .ofNat n => ZFInt.mk (0, ↑n) | .negSucc n => ZFInt.mk (↑n+1, 0) -private def ofInt' : (n : ℤ) → PSet +/-- The pre-set representative of an integer in the set-theoretic encoding. -/ +def ofInt' : (n : ℤ) → PSet | .ofNat 0 => {{∅}} | .ofNat (n+1) => {{∅}, {∅, .ofNat n}} -- (0, n) | .negSucc n => {{.ofNat (n+1)}, {∅, .ofNat (n+1)}} -- (n, 0) @@ -928,7 +939,8 @@ theorem mem_Int_proj' {x : ZFSet} : namespace ZFInt open Classical in -private noncomputable def outof : {x // x ∈ Int} → ZFInt := fun ⟨n, hn⟩ => +/-- Decode a member of the set-theoretic integers into its quotient representation. -/ +noncomputable def outof : {x // x ∈ Int} → ZFInt := fun ⟨n, hn⟩ => have := mem_Int_proj' hn if case : n.π₁ = ∅ ∧ n.π₂ ∈ Nat then ZFInt.mk ⟨0, n.π₂, case.right⟩ diff --git a/LeanPool/ZFLean/Isomorphisms.lean b/LeanPool/ZFLean/Isomorphisms.lean index af2f38b4da..3038f28dbc 100644 --- a/LeanPool/ZFLean/Isomorphisms.lean +++ b/LeanPool/ZFLean/Isomorphisms.lean @@ -3,13 +3,21 @@ Copyright (c) 2026 Vincent Trélat. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Trélat -/ -import LeanPool.ZFLean.Functions +module + +public import LeanPool.ZFLean.Functions +import LeanPool.ZFLean.Tactics +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ZFLean.Isomorphisms Imported Lean Pool material for `LeanPool.ZFLean.Isomorphisms`. -/ + +@[expose] public section namespace ZFSet /-- Imported ZFLean declaration. -/ def isIso (A B : ZFSet) : Prop := diff --git a/LeanPool/ZFLean/IsomorphismsFunsToPowRel.lean b/LeanPool/ZFLean/IsomorphismsFunsToPowRel.lean index f3de8fbfae..bf751e60dd 100644 --- a/LeanPool/ZFLean/IsomorphismsFunsToPowRel.lean +++ b/LeanPool/ZFLean/IsomorphismsFunsToPowRel.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Vincent Trélat. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Trélat -/ +module -import LeanPool.ZFLean.Isomorphisms +public import LeanPool.ZFLean.Isomorphisms +import LeanPool.ZFLean.Tactics +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ZFLean.IsomorphismsFunsToPowRel @@ -12,6 +17,8 @@ import LeanPool.ZFLean.Isomorphisms Imported Lean Pool material for `LeanPool.ZFLean.IsomorphismsFunsToPowRel`. -/ +@[expose] public section + namespace ZFSet open Classical in diff --git a/LeanPool/ZFLean/IsomorphismsZFNatIso.lean b/LeanPool/ZFLean/IsomorphismsZFNatIso.lean index c353d9eba7..c6568d9bf3 100644 --- a/LeanPool/ZFLean/IsomorphismsZFNatIso.lean +++ b/LeanPool/ZFLean/IsomorphismsZFNatIso.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Vincent Trélat. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Trélat -/ +module -import LeanPool.ZFLean.Isomorphisms +public import LeanPool.ZFLean.Isomorphisms +import LeanPool.ZFLean.Tactics +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ZFLean.IsomorphismsZFNatIso @@ -12,6 +17,8 @@ import LeanPool.ZFLean.Isomorphisms Imported Lean Pool material for `LeanPool.ZFLean.IsomorphismsZFNatIso`. -/ +@[expose] public section + namespace ZFSet namespace ZFNat diff --git a/LeanPool/ZFLean/Naturals.lean b/LeanPool/ZFLean/Naturals.lean index d2e2fcbda0..09a6c96030 100644 --- a/LeanPool/ZFLean/Naturals.lean +++ b/LeanPool/ZFLean/Naturals.lean @@ -3,12 +3,20 @@ Copyright (c) 2026 Vincent Trélat. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Trélat -/ - +module + +public import Mathlib.Algebra.Ring.Defs +public import Mathlib.SetTheory.ZFC.Basic +public import Mathlib.Tactic.Attr.Core +public meta import Mathlib.Tactic.Basic +public meta import Mathlib.Tactic.ToAdditive +public meta import Mathlib.Tactic.ToDual import LeanPool.ZFLean.Basic -import Mathlib.Algebra.Ring.Defs -import Mathlib.Order.WellFounded -import Mathlib.Tactic.Ring -import Mathlib.Util.Delaborators +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow +import Std.Data.DHashMap.Internal.AssocList.Lemmas +public import Mathlib.Order.WellFounded +public import Mathlib.Util.Delaborators /-! # ZFC Natural numbers @@ -18,7 +26,7 @@ natural numbers. The set of all natural numbers is defined as the smallest inductive set. Because of the axiom of separation, the definition relies on the existence of an infinite set, which is provided by the -`some_inf` constant. It can be shown that the choice of `some_inf` does not affect the definition of +`someInf` constant. It can be shown that the choice of `someInf` does not affect the definition of the natural numbers and leads to isomorphic definitions. The file also includes the definition of the `ZFNat` type for ZF natural numbers, and provides @@ -26,6 +34,8 @@ various properties and usual arithmetic operations on natural numbers. -/ +@[expose] public section + universe u noncomputable section @@ -86,10 +96,10 @@ notation "ω" => omega theorem omega_inductive : inductiveSet ω := ⟨omega_zero, fun _ => omega_succ⟩ /-- Witness for an infinite set, meant to be used for definitional purpose only. -/ -private abbrev some_inf := @Classical.choose _ inductiveSet ⟨_, omega_inductive⟩ +abbrev someInf := @Classical.choose _ inductiveSet ⟨_, omega_inductive⟩ -/-- The set `some_inf` is inductive. -/ -private lemma inductive_some_inf : inductiveSet some_inf := Classical.choose_spec _ +/-- The set `someInf` is inductive. -/ +private lemma inductive_some_inf : inductiveSet someInf := Classical.choose_spec _ /-! ## Natural numbers -/ @@ -99,7 +109,7 @@ private lemma inductive_some_inf : inductiveSet some_inf := Classical.choose_spe The set of natural numbers `Nat` is defined as the smallest inductive set. This definition avoids the use of `ω`, even though `ω` may be thought of as `ℕ`. -/ -def Nat : ZFSet := ⋂₀ ((powerset some_inf).sep inductiveSet) +def Nat : ZFSet := ⋂₀ ((powerset someInf).sep inductiveSet) /-- The type of natural numbers `ZFNat` is defined as the subtype of `Nat`. -/ abbrev ZFNat := {x // x ∈ Nat} @@ -107,32 +117,32 @@ abbrev ZFNat := {x // x ∈ Nat} namespace ZFNat /-- -`some_inf` is an inductive subset of `some_inf`: -`some_inf ∈ { a ⊆ some_inf | inductiveSet a }`. +`someInf` is an inductive subset of `someInf`: +`someInf ∈ { a ⊆ someInf | inductiveSet a }`. -/ private theorem some_inf_mem_powerset_some_inf_ind : - some_inf ∈ some_inf.powerset.sep inductiveSet := + someInf ∈ someInf.powerset.sep inductiveSet := mem_sep.mpr ⟨mem_powerset.mpr fun _ => id, inductive_some_inf⟩ /-- `Nat` is an infinite inductive set. -/ -theorem Nat_subset_some_inf : Nat ⊆ some_inf := by +theorem Nat_subset_some_inf : Nat ⊆ someInf := by intro n hn unfold Nat at hn rw [mem_sInter] at hn · have aux : - n ∈ (⋃₀ (powerset some_inf).sep inductiveSet : ZFSet) ∧ - (fun b => ∀ c, c ∈ (powerset some_inf).sep inductiveSet → b ∈ c) n := by + n ∈ (⋃₀ (powerset someInf).sep inductiveSet : ZFSet) ∧ + (fun b => ∀ c, c ∈ (powerset someInf).sep inductiveSet → b ∈ c) n := by simp only [mem_sUnion, mem_sep, and_imp] at * exact ⟨ - ⟨some_inf, + ⟨someInf, ⟨mem_powerset.mpr fun _ => id, inductive_some_inf⟩, - hn some_inf (mem_powerset.mpr fun _ => id) (inductive_some_inf)⟩, + hn someInf (mem_powerset.mpr fun _ => id) (inductive_some_inf)⟩, fun _ _ _ => hn _ ‹_› ‹_›⟩ simp only [mem_sep, mem_powerset, and_imp, mem_sUnion] at aux obtain ⟨⟨_, ⟨left, _⟩, _⟩, _⟩ := aux apply left assumption - · exact ⟨some_inf, some_inf_mem_powerset_some_inf_ind⟩ + · exact ⟨someInf, some_inf_mem_powerset_some_inf_ind⟩ theorem zero_in_Nat : ∅ ∈ Nat := by unfold Nat @@ -140,7 +150,7 @@ theorem zero_in_Nat : ∅ ∈ Nat := by · intro x hx rw [mem_sep] at hx exact hx.right.left - · exact ⟨some_inf, some_inf_mem_powerset_some_inf_ind⟩ + · exact ⟨someInf, some_inf_mem_powerset_some_inf_ind⟩ instance natZero : Zero ZFNat := ⟨∅, zero_in_Nat⟩ lemma natZero_eq : (0 : ZFNat) = ⟨∅, zero_in_Nat⟩ := rfl @@ -161,30 +171,30 @@ lemma zero_mem_inductive {a} (h : inductiveSet a) : ↑(0 : ZFNat).val ∈ a := theorem insert_mem_inductive {a n} (h : inductiveSet a) (h' : n ∈ a) : insert n n ∈ a := h.right n h' -theorem some_inf_powerset_sep_inductive_nonempty : (some_inf.powerset.sep inductiveSet).Nonempty := - ⟨some_inf, some_inf_mem_powerset_some_inf_ind⟩ +theorem some_inf_powerset_sep_inductive_nonempty : (someInf.powerset.sep inductiveSet).Nonempty := + ⟨someInf, some_inf_mem_powerset_some_inf_ind⟩ -/-- Any inductive set is a subset of `some_inf`. -/ -theorem inductive_subset_some_inf_contains_Nat {a} (h : inductiveSet a) (h' : a ⊆ some_inf) : +/-- Any inductive set is a subset of `someInf`. -/ +theorem inductive_subset_some_inf_contains_Nat {a} (h : inductiveSet a) (h' : a ⊆ someInf) : Nat ⊆ a := by intro n hn unfold Nat at hn rw [mem_sInter] at hn · have aux : - n ∈ (⋃₀ (powerset some_inf).sep inductiveSet : ZFSet) ∧ - (fun b => ∀ c, c ∈ (powerset some_inf).sep inductiveSet → b ∈ c) n := by + n ∈ (⋃₀ (powerset someInf).sep inductiveSet : ZFSet) ∧ + (fun b => ∀ c, c ∈ (powerset someInf).sep inductiveSet → b ∈ c) n := by simp only [mem_sUnion, mem_sep, and_imp] at * exact ⟨ - ⟨some_inf, + ⟨someInf, ⟨mem_powerset.mpr fun _ => id, inductive_some_inf⟩, - hn some_inf (mem_powerset.mpr fun _ => id) (inductive_some_inf)⟩, + hn someInf (mem_powerset.mpr fun _ => id) (inductive_some_inf)⟩, fun _ _ _ => hn _ ‹_› ‹_›⟩ simp only [mem_sep, mem_powerset, and_imp, mem_sUnion] at aux exact aux.2 _ h' h · exact some_inf_powerset_sep_inductive_nonempty theorem succ_mem_Nat' {n} (h : n ∈ Nat) : insert n n ∈ Nat := by - have all_sub_ind : ∀ a, a ∈ some_inf.powerset.sep inductiveSet → insert n n ∈ a := by + have all_sub_ind : ∀ a, a ∈ someInf.powerset.sep inductiveSet → insert n n ∈ a := by intro a ha rw [mem_sep] at ha exact ha.2.2 n (inductive_subset_some_inf_contains_Nat ha.2 (mem_powerset.mp ha.1) h) @@ -584,7 +594,7 @@ def rec' {motive : ZFSet → Sort u} (n : ZFSet) (h : n ∈ Nat) specialize succ (pred x) (pred x).2 ih conv at succ => arg 1 - rw [← succ_lift_eq, succ_pred x_eq_0] + rw [← private_decl% succ_lift_eq, succ_pred x_eq_0] assumption /-- Provides the base case of the recursion principle for sets in `Nat`. -/ diff --git a/LeanPool/ZFLean/Rationals.lean b/LeanPool/ZFLean/Rationals.lean index 3940ad77fc..8f9ac46587 100644 --- a/LeanPool/ZFLean/Rationals.lean +++ b/LeanPool/ZFLean/Rationals.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Vincent Trélat. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Trélat -/ +module -import LeanPool.ZFLean.Integers +public import LeanPool.ZFLean.Integers +public import Mathlib.Algebra.Field.Defs +import Mathlib.Tactic.Ring.RingNF /-! # ZFC Rational Numbers @@ -12,6 +15,8 @@ This file defines the rational numbers in ZFC, based on the integers and using t -/ +@[expose] public section + namespace ZFSet /-- Imported ZFLean declaration. -/ abbrev ZFInt' := {x : ZFInt // x ≠ 0} @@ -295,11 +300,13 @@ theorem add_eq_sub_iff {a b c : ZFRat} : a + b = c ↔ a = c - b where mpr := fun h => by rw [h, sub_add_cancel] -private noncomputable abbrev nsmul : ℕ → ZFRat → ZFRat +/-- Repeated addition by a natural-number scalar. -/ +noncomputable abbrev nsmul : ℕ → ZFRat → ZFRat | 0, _ => 0 | n+1, m => m + nsmul n m -private noncomputable abbrev zsmul (n : ℤ) (x : ZFRat) : ZFRat := +/-- Integer scalar multiplication defined using repeated addition and negation. -/ +noncomputable abbrev zsmul (n : ℤ) (x : ZFRat) : ZFRat := match n with | .ofNat n => nsmul n x | .negSucc n => -nsmul (n+1) x @@ -468,9 +475,11 @@ theorem inv_mul {a : ZFRat} (ha : a ≠ 0) : a⁻¹ * a = 1 := by noncomputable instance : RatCast ZFRat where ratCast q := ((q.num : ZFRat) / (q.den : ZFRat)) -private noncomputable def qsmul (k : ℚ) (m : ZFRat) : ZFRat := (k : ZFRat) * m +/-- Rational scalar multiplication through the encoded rational field. -/ +noncomputable def qsmul (k : ℚ) (m : ZFRat) : ZFRat := (k : ZFRat) * m -private noncomputable def nnqsmul : ℚ≥0 → ZFRat → ZFRat := +/-- Nonnegative rational scalar multiplication through the encoded rational field. -/ +noncomputable def nnqsmul : ℚ≥0 → ZFRat → ZFRat := fun ⟨k, _⟩ m ↦ qsmul k m open Classical in diff --git a/LeanPool/ZFLean/Sum.lean b/LeanPool/ZFLean/Sum.lean index ab4696eb37..d01eb85ced 100644 --- a/LeanPool/ZFLean/Sum.lean +++ b/LeanPool/ZFLean/Sum.lean @@ -3,11 +3,15 @@ Copyright (c) 2026 Vincent Trélat. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Trélat -/ +module -import LeanPool.ZFLean.Basic -import LeanPool.ZFLean.Booleans -import LeanPool.ZFLean.Integers -import LeanPool.ZFLean.Functions +public import Mathlib.Data.NNRat.Defs + +public import LeanPool.ZFLean.Functions +import LeanPool.ZFLean.Tactics +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Tactic.NormNum.Inv +import Mathlib.Tactic.NormNum.Pow /-! # LeanPool.ZFLean.Sum @@ -15,6 +19,8 @@ import LeanPool.ZFLean.Functions Imported Lean Pool material for `LeanPool.ZFLean.Sum`. -/ +@[expose] public section + universe u v namespace ZFSet @@ -220,7 +226,8 @@ noncomputable abbrev the {S : ZFSet} (S_nemp : S ≠ ∅) (x : Option S) : {x // open Classical in -private noncomputable def into {T : ZFSet} : Option T → _root_.Option {x // x ∈ T} := fun x ↦ +/-- Convert a set-theoretic option to a Lean option of members of the underlying set. -/ +noncomputable def into {T : ZFSet} : Option T → _root_.Option {x // x ∈ T} := fun x ↦ if hx : x = none then .none else .some <| Classical.choose <| Or.resolve_left (casesOn x) hx theorem _root_.ZFSet.Option.some.injEq @@ -288,7 +295,8 @@ noncomputable def instEquivZFOptionOption {T : ZFSet} : -private def outof {T : ZFSet} : _root_.Option {x // x ∈ T} → Option T +/-- Convert a Lean option of set members to the set-theoretic option encoding. -/ +def outof {T : ZFSet} : _root_.Option {x // x ∈ T} → Option T | .some ⟨x, hx⟩ => some ⟨x, hx⟩ | .none => none diff --git a/LeanPool/ZFLean/Tactics.lean b/LeanPool/ZFLean/Tactics.lean index f2a7fe77b2..d54a4ca880 100644 --- a/LeanPool/ZFLean/Tactics.lean +++ b/LeanPool/ZFLean/Tactics.lean @@ -3,14 +3,20 @@ Copyright (c) 2026 Vincent Trélat. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Trélat -/ +module -import Mathlib.CategoryTheory.Category.Basic +public meta import Lean.LabelAttribute + +import Lean.LabelAttribute +import Mathlib.CategoryTheory.Category.Init /-! # LeanPool.ZFLean.Tactics Imported Lean Pool material for `LeanPool.ZFLean.Tactics`. -/ + +public meta section /-- Imported ZFLean declaration. -/ register_label_attr zrel /-- Imported ZFLean declaration. -/ diff --git a/LeanPool/Zeta3Irrational.lean b/LeanPool/Zeta3Irrational.lean index d241c550ec..52a086ef97 100644 --- a/LeanPool/Zeta3Irrational.lean +++ b/LeanPool/Zeta3Irrational.lean @@ -3,15 +3,18 @@ Copyright (c) 2026 Junqi Liu, Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Junqi Liu, Jujian Zhang -/ +module -import LeanPool.Zeta3Irrational.Basic -import LeanPool.Zeta3Irrational.Bound -import LeanPool.Zeta3Irrational.Chebyshev -import LeanPool.Zeta3Irrational.Equality -import LeanPool.Zeta3Irrational.Integral -import LeanPool.Zeta3Irrational.LegendrePoly -import LeanPool.Zeta3Irrational.LinearForm -import LeanPool.Zeta3Irrational.D +public import LeanPool.Zeta3Irrational.Basic +public import LeanPool.Zeta3Irrational.Bound +public import LeanPool.Zeta3Irrational.Chebyshev +public import LeanPool.Zeta3Irrational.Equality +public import LeanPool.Zeta3Irrational.Integral +public import LeanPool.Zeta3Irrational.LegendrePoly +public import LeanPool.Zeta3Irrational.LinearForm +public import LeanPool.Zeta3Irrational.D +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Nat.Choose.Multinomial /-! # Irrationality of ζ(3) @@ -24,6 +27,8 @@ Tags: number-theory, analysis, zeta-functions MSC: 11M06, 11J72 -/ +@[expose] public section + /-! This project formalizes the integral identities and denominator/positivity/ upper-bound estimates used in Beukers' proof of Apéry's theorem for `ζ(3)`. diff --git a/LeanPool/Zeta3Irrational/Basic.lean b/LeanPool/Zeta3Irrational/Basic.lean index 8c21d95be1..e29a5bb247 100644 --- a/LeanPool/Zeta3Irrational/Basic.lean +++ b/LeanPool/Zeta3Irrational/Basic.lean @@ -3,22 +3,28 @@ Copyright (c) 2026 Junqi Liu, Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Junqi Liu, Jujian Zhang -/ +module -import Mathlib.Data.Int.Star -import Mathlib.Analysis.Complex.ExponentialBounds -import Mathlib.NumberTheory.LSeries.HurwitzZetaValues -import Mathlib.Order.CompletePartialOrder -import Mathlib.RingTheory.DedekindDomain.Dvr -import Mathlib.NumberTheory.Chebyshev +public import LeanPool.Zeta3Irrational.LegendrePoly +public import LeanPool.Zeta3Irrational.D +public import Mathlib.NumberTheory.LSeries.RiemannZeta import LeanPool.Zeta3Irrational.Bound import LeanPool.Zeta3Irrational.Chebyshev -import LeanPool.Zeta3Irrational.LegendrePoly import LeanPool.Zeta3Irrational.LinearForm +import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Complex.ExponentialBounds +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.Int.Star +import Mathlib.MeasureTheory.Function.AEEqOfIntegral +import Mathlib.NumberTheory.LSeries.HurwitzZetaValues +import Mathlib.RingTheory.DedekindDomain.Basic /-! # LeanPool.Zeta3Irrational.Basic -/ +@[expose] public section + namespace LeanPool.Zeta3Irrational open scoped Nat diff --git a/LeanPool/Zeta3Irrational/Bound.lean b/LeanPool/Zeta3Irrational/Bound.lean index 8cd11bcadd..cc23aa6ded 100644 --- a/LeanPool/Zeta3Irrational/Bound.lean +++ b/LeanPool/Zeta3Irrational/Bound.lean @@ -3,14 +3,19 @@ Copyright (c) 2026 Junqi Liu, Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Junqi Liu, Jujian Zhang -/ +module -import Mathlib.Analysis.RCLike.Basic +public import Mathlib.Analysis.Real.Sqrt +import Mathlib.Algebra.Order.BigOperators.Expect import Mathlib.Algebra.Order.Star.Real +import Mathlib.Analysis.Normed.Group.Basic /-! # LeanPool.Zeta3Irrational.Bound -/ +@[expose] public section + namespace LeanPool.Zeta3Irrational open scoped Nat diff --git a/LeanPool/Zeta3Irrational/Chebyshev.lean b/LeanPool/Zeta3Irrational/Chebyshev.lean index 06c757acac..cbd8d6e14d 100644 --- a/LeanPool/Zeta3Irrational/Chebyshev.lean +++ b/LeanPool/Zeta3Irrational/Chebyshev.lean @@ -3,18 +3,14 @@ Copyright (c) 2026 Junqi Liu, Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Junqi Liu, Jujian Zhang -/ +module -import Mathlib.Algebra.Lie.OfAssociative +public import Mathlib.NumberTheory.Chebyshev import Mathlib.Algebra.Order.Ring.Star import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.Complex.ExponentialBounds import Mathlib.Analysis.SpecialFunctions.Integrals.Basic -import Mathlib.Analysis.SpecialFunctions.Log.NegMulLog -import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics import Mathlib.Analysis.SumIntegralComparisons -import Mathlib.Data.Rat.Cast.OfScientific -import Mathlib.NumberTheory.Chebyshev -import Mathlib.Tactic.NormNum.BigOperators /-! # Chebyshev estimates needed for the ζ(3) irrationality argument @@ -24,6 +20,8 @@ upstream PrimeNumberTheoremAnd development. It gives an eventual bound `ψ x ≤ 1.13 x`, enough to control the lcm denominator in Beukers' proof. -/ +@[expose] public section + namespace LeanPool.Zeta3Irrational namespace ChebyshevAux diff --git a/LeanPool/Zeta3Irrational/D.lean b/LeanPool/Zeta3Irrational/D.lean index e5e2d1ce2d..207e68aaf6 100644 --- a/LeanPool/Zeta3Irrational/D.lean +++ b/LeanPool/Zeta3Irrational/D.lean @@ -3,19 +3,19 @@ Copyright (c) 2026 Junqi Liu, Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Junqi Liu, Jujian Zhang -/ +module -import Mathlib.Algebra.GCDMonoid.Finset -import Mathlib.Algebra.GCDMonoid.Nat +public import Mathlib.NumberTheory.PrimeCounting +public import Mathlib.Analysis.SpecialFunctions.Log.Basic import Mathlib.Analysis.SpecialFunctions.Log.Base import Mathlib.Data.Nat.Choose.Factorization -import Mathlib.Data.Nat.Factorization.LCM -import Mathlib.Algebra.Order.Star.Real -import Mathlib.NumberTheory.PrimeCounting /-! # LeanPool.Zeta3Irrational.D -/ +@[expose] public section + namespace LeanPool.Zeta3Irrational open scoped Nat diff --git a/LeanPool/Zeta3Irrational/Equality.lean b/LeanPool/Zeta3Irrational/Equality.lean index 32467ed335..5bad819a90 100644 --- a/LeanPool/Zeta3Irrational/Equality.lean +++ b/LeanPool/Zeta3Irrational/Equality.lean @@ -3,13 +3,18 @@ Copyright (c) 2026 Junqi Liu, Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Junqi Liu, Jujian Zhang -/ +module +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import LeanPool.Zeta3Irrational.Integral +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic /-! # LeanPool.Zeta3Irrational.Equality -/ +@[expose] public section + namespace LeanPool.Zeta3Irrational open scoped Nat diff --git a/LeanPool/Zeta3Irrational/Integral.lean b/LeanPool/Zeta3Irrational/Integral.lean index 9b0f154d63..e7edbdd21b 100644 --- a/LeanPool/Zeta3Irrational/Integral.lean +++ b/LeanPool/Zeta3Irrational/Integral.lean @@ -3,25 +3,21 @@ Copyright (c) 2026 Junqi Liu, Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Junqi Liu, Jujian Zhang -/ +module -import Mathlib.Analysis.Normed.Field.Instances +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.Algebra.Order.Star.Real import Mathlib.Analysis.PSeries import Mathlib.Analysis.SpecialFunctions.Integrals.Basic -import Mathlib.Algebra.Order.Star.Real import Mathlib.MeasureTheory.Function.AEEqOfIntegral import Mathlib.MeasureTheory.Integral.IntegralEqImproper -import Mathlib.Topology.Algebra.Module.ModuleTopology -import Mathlib.Data.Finset.Attr -import Mathlib.Tactic.Common -import Mathlib.Tactic.Continuity -import Mathlib.Tactic.Finiteness.Attr -import Mathlib.Tactic.SetLike -import Mathlib.Util.CompileInductive /-! # LeanPool.Zeta3Irrational.Integral -/ +@[expose] public section + namespace LeanPool.Zeta3Irrational open scoped Nat diff --git a/LeanPool/Zeta3Irrational/LegendrePoly.lean b/LeanPool/Zeta3Irrational/LegendrePoly.lean index 4fb1b66af3..8a95c74bba 100644 --- a/LeanPool/Zeta3Irrational/LegendrePoly.lean +++ b/LeanPool/Zeta3Irrational/LegendrePoly.lean @@ -3,24 +3,16 @@ Copyright (c) 2026 Junqi Liu, Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Junqi Liu, Jujian Zhang -/ +module -import Mathlib.Algebra.Lie.OfAssociative -import Mathlib.Algebra.Polynomial.Derivative +public import Mathlib.Algebra.Polynomial.Derivative +public import Mathlib.Analysis.Calculus.Deriv.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.Algebra.Order.Star.Real import Mathlib.Algebra.Polynomial.Eval.SMul import Mathlib.Analysis.Calculus.Deriv.Inv import Mathlib.Analysis.Calculus.Deriv.Pow -import Mathlib.Algebra.Order.Star.Real import Mathlib.MeasureTheory.Integral.IntervalIntegral.IntegrationByParts -import Mathlib.Tactic.Common -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.FieldSimp -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.LinearCombination -import Mathlib.Tactic.Polyrith /-! # Legendre Polynomials @@ -29,6 +21,8 @@ polynomial in `ℤ[X]`. We prove some basic properties of the shiftedLegendre po -/ +@[expose] public section + open scoped Nat open BigOperators Finset diff --git a/LeanPool/Zeta3Irrational/LinearForm.lean b/LeanPool/Zeta3Irrational/LinearForm.lean index 3939e5483e..6b5a734bb3 100644 --- a/LeanPool/Zeta3Irrational/LinearForm.lean +++ b/LeanPool/Zeta3Irrational/LinearForm.lean @@ -3,14 +3,20 @@ Copyright (c) 2026 Junqi Liu, Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Junqi Liu, Jujian Zhang -/ +module -import LeanPool.Zeta3Irrational.Integral -import LeanPool.Zeta3Irrational.D +public import LeanPool.Zeta3Irrational.Integral +public import LeanPool.Zeta3Irrational.D +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan +import Mathlib.MeasureTheory.Covering.Besicovitch +import Mathlib.Tactic.Positivity.Finset /-! # LeanPool.Zeta3Irrational.LinearForm -/ +@[expose] public section + namespace LeanPool.Zeta3Irrational open scoped Nat diff --git a/LeanPool/ZetaH123.lean b/LeanPool/ZetaH123.lean index 728d348421..ad527b7b27 100644 --- a/LeanPool/ZetaH123.lean +++ b/LeanPool/ZetaH123.lean @@ -3,11 +3,16 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang. All rights reser Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang -/ +module -import LeanPool.ZetaH123.H1 -import LeanPool.ZetaH123.H2 -import LeanPool.ZetaH123.H3 -import LeanPool.ZetaH123.Lem41 +public import LeanPool.ZetaH123.H1 +public import LeanPool.ZetaH123.H2 +public import LeanPool.ZetaH123.H3 +public import LeanPool.ZetaH123.Lem41 +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Thakur's hypotheses on power sums of F_q[t] @@ -19,3 +24,5 @@ Main declarations: `ZetaH123.H1.main_theorem`, `ZetaH123.Lem41.main` Tags: number-theory, function-fields, zeta-functions MSC: 11M38, 11T55, 11G09 -/ + +@[expose] public section diff --git a/LeanPool/ZetaH123/H1.lean b/LeanPool/ZetaH123/H1.lean index 5a943815ed..5f49f7b9b6 100644 --- a/LeanPool/ZetaH123/H1.lean +++ b/LeanPool/ZetaH123/H1.lean @@ -3,26 +3,30 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang. All rights reser Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang -/ +module +public import Mathlib.Data.Nat.Prime.Defs +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Order.Interval.Finset.Nat import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.Order.Ring.Star import Mathlib.Algebra.Ring.GeomSum -import Mathlib.AlgebraicTopology.SimplexCategory.Basic -import Mathlib.Analysis.Normed.Ring.Lemmas +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.ConditionallyCompleteOrder import Mathlib.Data.Int.Star -import Mathlib.Data.Nat.ModEq -import Mathlib.Data.Nat.Prime.Defs -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Order -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring +import Mathlib.Tactic.FinCases +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # H1 for Thakur's hypotheses on power sums -/ +@[expose] public section + namespace ZetaH123.H1 /- @@ -394,20 +398,10 @@ lemma F_lt_of_Phi_lt (q d _k : ℕ) (hq : 2 ≤ q) have hqpos : (0 : ℤ) < (q : ℤ) - 1 := by have : (2 : ℤ) ≤ (q : ℤ) := by exact_mod_cast hq linarith - -- (q - 1)*(F kk' - F kk) = Φ kk - Φ kk' > 0 - rw [← sub_pos] - -- goal: 0 < (bCoeff q 0 d + ∑ kk' ...) - (bCoeff q 0 d + ∑ kk ...) - have hdiff : ((q : ℤ) - 1) * - ((bCoeff q 0 d + ∑ i : Fin (d + 1), (kk' i : ℤ) * bCoeff q (i : ℕ) d) - - (bCoeff q 0 d + ∑ i : Fin (d + 1), (kk i : ℤ) * bCoeff q (i : ℕ) d)) > 0 := by - have expand : ((q : ℤ) - 1) * - ((bCoeff q 0 d + ∑ i : Fin (d + 1), (kk' i : ℤ) * bCoeff q (i : ℕ) d) - - (bCoeff q 0 d + ∑ i : Fin (d + 1), (kk i : ℤ) * bCoeff q (i : ℕ) d)) - = (((q : ℤ) - 1) * (∑ i : Fin (d + 1), (kk' i : ℤ) * bCoeff q (i : ℕ) d)) - - (((q : ℤ) - 1) * (∑ i : Fin (d + 1), (kk i : ℤ) * bCoeff q (i : ℕ) d)) := by ring - rw [expand, kkey, kkey', hkZ] - linarith [hPhiZ] - nlinarith [hdiff, hqpos] + apply add_lt_add_right + apply (mul_lt_mul_iff_of_pos_left hqpos).mp + rw [kkey, kkey', hkZ] + exact sub_lt_sub_left hPhiZ _ /-- **Row selection (take-from-top).** Given nonnegative row-counts `a` on `Fin (d + 1)` and a target `c` with `1 ≤ c ≤ ∑ a`, there is a removal function `r ≤ a` removing @@ -687,6 +681,52 @@ lemma exchange_carryfree (q d m : ℕ) (hq2 : 2 ≤ q) (kk : Fin (d + 1) → ℕ Finset.sum_le_sum (fun i _ => hle i) _ ≤ q - 1 := hcf n +/-- **`g` is strictly decreasing in the row index** (for `q ≥ 2`): the stone weight +`gWeight q d i = q ^ {d+1-i} + (q - 1)·i` strictly decreases as `i` increases within +`0..d` (informal.tex `eq:g-decreasing-H1`). -/ +lemma gWeight_anti (q d i j : ℕ) (hq : 2 ≤ q) (hij : i < j) (hjd : j ≤ d) : + gWeight q d j < gWeight q d i := by + -- Single downward step: for e < d, g_{e+1} < g_e. + have step : ∀ e : ℕ, e < d → gWeight q d (e + 1) < gWeight q d e := by + intro e he + unfold gWeight + have he1 : d + 1 - e = (d - e) + 1 := by omega + have he2 : d + 1 - (e + 1) = d - e := by omega + rw [he1, he2, pow_succ] + -- Need: q ^ (d-e) + (q - 1)*(e + 1) < q ^ (d-e)*q + (q - 1)*e + have hb : 2 ≤ q ^ (d - e) := by + calc 2 ≤ q := hq + _ = q ^ 1 := (pow_one q).symm + _ ≤ q ^ (d - e) := Nat.pow_le_pow_right (by omega) (by omega) + obtain ⟨p, rfl⟩ : ∃ p, q = p + 2 := ⟨q - 2, by omega⟩ + have hp1 : p + 2 - 1 = p + 1 := by omega + rw [hp1] + nlinarith [hb] + -- Chain from i to j using strong induction on the gap. + have chain : ∀ n : ℕ, ∀ e : ℕ, e + n ≤ d → 0 < n → + gWeight q d (e + n) < gWeight q d e := by + intro n + induction n with + | zero => omega + | succ m ih => + intro e hle hpos + rcases Nat.eq_zero_or_pos m with hm | hm + · subst hm + have : e + (0 + 1) = e + 1 := by omega + rw [this] + exact step e (by omega) + · have h1 : gWeight q d (e + (m + 1)) < gWeight q d (e + m) := by + have hlt : e + m < d := by omega + have hs := step (e + m) hlt + have heq : e + m + 1 = e + (m + 1) := by omega + rw [heq] at hs + exact hs + have h2 : gWeight q d (e + m) < gWeight q d e := ih e (by omega) hm + exact lt_trans h1 h2 + have hj : j = i + (j - i) := by omega + rw [hj] + exact chain (j - i) i (by omega) (by omega) + /-- **Strict `F`-increase for the single-column exchange.** The exchanged tuple `kk'` has strictly larger `F`, since `Φ` drops by `q ^ m·(q - 1) ^ 2·(d-jv) > 0`. -/ lemma exchange_phi_gain (q d k m : ℕ) (hq2 : 2 ≤ q) (kk : Fin (d + 1) → ℕ) @@ -788,33 +828,10 @@ lemma exchange_phi_gain (q d k m : ℕ) (hq2 : 2 ≤ q) (kk : Fin (d + 1) → · intro h; exact absurd (Finset.mem_univ _) h -- g_d is the minimum weight have hgmin : ∀ i : Fin (d + 1), gWeight q d d ≤ gWeight q d (i : ℕ) := by - -- helper power inequality - have hpow : ∀ e : ℕ, q + (q - 1) * e ≤ q ^ (e + 1) := by - obtain ⟨p, rfl⟩ : ∃ p, q = p + 2 := ⟨q - 2, by omega⟩ - have he1 : p + 2 - 1 = p + 1 := by omega - rw [he1] - intro e - induction e with - | zero => simp - | succ n ih => - have hexp : (p + 2) ^ (n + 1 + 1) = (p + 2) ^ (n + 1) * (p + 2) := by rw [pow_succ] - have hge : (p + 2) ≤ (p + 2) ^ (n + 1) := by nlinarith [ih] - have hmul : ((p + 2) + (p + 1) * n) * (p + 2) - ≤ (p + 2) ^ (n + 1) * (p + 2) := Nat.mul_le_mul_right _ ih - rw [hexp] - nlinarith [hmul, hge] intro i - have hile : (i : ℕ) ≤ d := by have := i.2; omega - simp only [gWeight] - have hexp3 : d + 1 - d = 1 := by omega - rw [hexp3, pow_one] - -- goal: q + (q - 1)*d ≤ q ^ (d+1-i) + (q - 1)*i - have he := hpow (d - (i : ℕ)) - have hexp2 : d - (i : ℕ) + 1 = d + 1 - (i : ℕ) := by omega - rw [hexp2] at he - have hsum : (q - 1) * (i : ℕ) + (q - 1) * (d - (i : ℕ)) = (q - 1) * d := by - rw [← Nat.mul_add]; congr 1; omega - omega + rcases lt_or_eq_of_le (Nat.le_of_lt_succ i.isLt) with hi | hi + · exact (gWeight_anti q d i d hq2 hi le_rfl).le + · rw [hi] -- lower bound: g_jv + (q - 1)*g_d ≤ ∑ g_i r_i have hrjv_le : r jrow ≤ q := by rw [← hrsum] @@ -882,17 +899,19 @@ lemma exchange_phi_gain (q d k m : ℕ) (hq2 : 2 ≤ q) (kk : Fin (d + 1) → have : 0 < d - jv := by omega positivity -- g_jv + (q - 1) g_d = q*g_{jv+1} + (q - 1) ^ 2(d-jv) - nlinarith [hbal, hmono, hgex, hqmpos, hdpos, - Nat.mul_le_mul_left (q ^ m) hlb] + have hweight_lt : q * gWeight q d (jv + 1) < + gWeight q d jv + (q - 1) * gWeight q d d := by omega + have hdecrease := (Nat.mul_lt_mul_of_pos_left hweight_lt hqmpos).trans_le hmono + omega -- representation preserved - have hk : (∑ i : Fin (d + 1), kk i * q ^ (i : ℕ)) - = (∑ i : Fin (d + 1), kk' i * q ^ (i : ℕ)) := by + have hrep' : k = ∑ i : Fin (d + 1), kk' i * q ^ (i : ℕ) := by + rw [hrep] have := repr_preserved q d m hq1 kk r jj jv hjjval hjm hrdig hr0 hrsum rw [← this] apply Finset.sum_congr rfl intro i _ rw [hkk' i] - exact F_lt_of_Phi_lt q d k hq2 kk kk' hk hPhilt + exact F_lt_of_Phi_lt q d k hq2 kk kk' (hrep.symm.trans hrep') hPhilt /-- **Carry-exchange improvement.** If an admissible `kk` has a *shifted carry* at some column `m` (shifted column sum `∑_i a_{i,m-i} ≥ q`), there is an admissible @@ -1041,52 +1060,6 @@ def Phi (q d : ℕ) (kk : Fin (d + 1) → ℕ) : ℕ := q ^ (d + 1) * (∑ i : Fin (d + 1), kk i) + (q - 1) * ∑ i : Fin (d + 1), (i : ℕ) * q ^ (i : ℕ) * kk i -/-- **`g` is strictly decreasing in the row index** (for `q ≥ 2`): the stone weight -`gWeight q d i = q ^ {d+1-i} + (q - 1)·i` strictly decreases as `i` increases within -`0..d` (informal.tex `eq:g-decreasing-H1`). -/ -lemma gWeight_anti (q d i j : ℕ) (hq : 2 ≤ q) (hij : i < j) (hjd : j ≤ d) : - gWeight q d j < gWeight q d i := by - -- Single downward step: for e < d, g_{e+1} < g_e. - have step : ∀ e : ℕ, e < d → gWeight q d (e + 1) < gWeight q d e := by - intro e he - unfold gWeight - have he1 : d + 1 - e = (d - e) + 1 := by omega - have he2 : d + 1 - (e + 1) = d - e := by omega - rw [he1, he2, pow_succ] - -- Need: q ^ (d-e) + (q - 1)*(e + 1) < q ^ (d-e)*q + (q - 1)*e - have hb : 2 ≤ q ^ (d - e) := by - calc 2 ≤ q := hq - _ = q ^ 1 := (pow_one q).symm - _ ≤ q ^ (d - e) := Nat.pow_le_pow_right (by omega) (by omega) - obtain ⟨p, rfl⟩ : ∃ p, q = p + 2 := ⟨q - 2, by omega⟩ - have hp1 : p + 2 - 1 = p + 1 := by omega - rw [hp1] - nlinarith [hb] - -- Chain from i to j using strong induction on the gap. - have chain : ∀ n : ℕ, ∀ e : ℕ, e + n ≤ d → 0 < n → - gWeight q d (e + n) < gWeight q d e := by - intro n - induction n with - | zero => omega - | succ m ih => - intro e hle hpos - rcases Nat.eq_zero_or_pos m with hm | hm - · subst hm - have : e + (0 + 1) = e + 1 := by omega - rw [this] - exact step e (by omega) - · have h1 : gWeight q d (e + (m + 1)) < gWeight q d (e + m) := by - have hlt : e + m < d := by omega - have hs := step (e + m) hlt - have heq : e + m + 1 = e + (m + 1) := by omega - rw [heq] at hs - exact hs - have h2 : gWeight q d (e + m) < gWeight q d e := ih e (by omega) hm - exact lt_trans h1 h2 - have hj : j = i + (j - i) := by omega - rw [hj] - exact chain (j - i) i (by omega) (by omega) - /-- **Single downward move within a column.** Move one stone from cell `(i, m-i)` down to cell `(j, m-j)` (same column, rows `i < j ≤ d`), when the source cell is occupied and the target diagonal `m-j` has slack (`≤ q-2` stones). The result is admissible diff --git a/LeanPool/ZetaH123/H2.lean b/LeanPool/ZetaH123/H2.lean index c134556a98..e848af2549 100644 --- a/LeanPool/ZetaH123/H2.lean +++ b/LeanPool/ZetaH123/H2.lean @@ -3,24 +3,31 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang. All rights reser Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang -/ +module +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Nat.Digits.Defs +public import Mathlib.Data.Nat.ModEq +public import Mathlib.Data.Nat.Prime.Defs +public import Mathlib.Order.Lattice.Nat import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.Order.Ring.Star -import Mathlib.AlgebraicTopology.SimplexCategory.Basic -import Mathlib.Analysis.Normed.Ring.Lemmas +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.ConditionallyCompleteOrder import Mathlib.Data.Int.Star import Mathlib.Data.List.GetD import Mathlib.Data.Nat.Choose.Factorization -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Order -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # H2 for Thakur's hypotheses on power sums -/ +@[expose] public section + namespace ZetaH123.H2 /- diff --git a/LeanPool/ZetaH123/H3.lean b/LeanPool/ZetaH123/H3.lean index a5e5787ab1..0513e25a1e 100644 --- a/LeanPool/ZetaH123/H3.lean +++ b/LeanPool/ZetaH123/H3.lean @@ -3,24 +3,29 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang. All rights reser Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang -/ +module +public import Mathlib.Data.Nat.Prime.Defs +public import Mathlib.Algebra.BigOperators.Group.Finset.Defs +public import Mathlib.Data.Nat.Digits.Defs +public import Mathlib.Order.Lattice.Nat import Mathlib.Algebra.Order.Ring.Star -import Mathlib.Analysis.Normed.Ring.Lemmas +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations +import Mathlib.Data.Int.ConditionallyCompleteOrder import Mathlib.Data.Int.Star import Mathlib.Data.List.GetD import Mathlib.Data.Nat.Digits.Lemmas -import Mathlib.Data.Nat.Prime.Defs -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.Order -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF +import Mathlib.Tactic.Positivity.Finset +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # H3 for Thakur's hypotheses on power sums -/ +@[expose] public section + namespace ZetaH123.H3 /- diff --git a/LeanPool/ZetaH123/Lem41.lean b/LeanPool/ZetaH123/Lem41.lean index 236f5f9f18..65b76092c8 100644 --- a/LeanPool/ZetaH123/Lem41.lean +++ b/LeanPool/ZetaH123/Lem41.lean @@ -3,33 +3,31 @@ Copyright (c) 2026 Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang. All rights reser Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Chen, Kenny Lau, Ken Ono, Jujian Zhang -/ +module +public import Mathlib.RingTheory.LaurentSeries +public import Mathlib.Data.Int.ConditionallyCompleteOrder +public import Mathlib.Data.Nat.Choose.Multinomial import Mathlib.Algebra.Order.Ring.Star -import Mathlib.Analysis.Normed.Ring.Lemmas +import Mathlib.Analysis.Normed.Group.Basic +import Mathlib.Data.EReal.Operations import Mathlib.Data.Int.Star import Mathlib.FieldTheory.Finite.Basic import Mathlib.Order.CompletePartialOrder import Mathlib.RingTheory.Henselian -import Mathlib.RingTheory.LaurentSeries import Mathlib.RingTheory.PowerSeries.Substitution import Mathlib.RingTheory.PowerSeries.WellKnown import Mathlib.RingTheory.RegularLocalRing.Defs import Mathlib.RingTheory.SimpleRing.Principal -import Mathlib.Tactic.GCongr -import Mathlib.Tactic.IntervalCases -import Mathlib.Tactic.Linarith -import Mathlib.Tactic.NormNum -import Mathlib.Tactic.Order -import Mathlib.Tactic.Positivity -import Mathlib.Tactic.Push -import Mathlib.Tactic.Ring -import Mathlib.Tactic.Ring.RingNF -import Mathlib.Tactic.Tauto +import Mathlib.Topology.Algebra.InfiniteSum.Order +import Mathlib.Topology.MetricSpace.Bounded /-! # Lemma 4.1 for Thakur's hypotheses on power sums -/ +@[expose] public section + namespace ZetaH123.Lem41 /- diff --git a/LeanPool/ZetaZeros.lean b/LeanPool/ZetaZeros.lean index 067a7edbce..e997e6dac6 100644 --- a/LeanPool/ZetaZeros.lean +++ b/LeanPool/ZetaZeros.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Axiom Math. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Axiom Math, Kenny Lau -/ +module -import LeanPool.ZetaZeros.Main -import LeanPool.ZetaZeros.Hilbert.InnerReal +public import LeanPool.ZetaZeros.Main +public import LeanPool.ZetaZeros.Hilbert.InnerReal +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # Simple zeros of the Riemann zeta function @@ -17,3 +21,5 @@ Main declarations: `ZetaZeros.simple_proportion_d4` Tags: analytic-number-theory, riemann-zeta-function, critical-line, simple-zeros, pair-correlation MSC: 11M06, 11M26 -/ + +@[expose] public section diff --git a/LeanPool/ZetaZeros/Defs.lean b/LeanPool/ZetaZeros/Defs.lean index ae88ed6958..398dea2292 100644 --- a/LeanPool/ZetaZeros/Defs.lean +++ b/LeanPool/ZetaZeros/Defs.lean @@ -7,7 +7,7 @@ module public import Mathlib.NumberTheory.LSeries.RiemannZeta public import Mathlib.Analysis.Analytic.Order -public import LeanPool.ZetaZeros.Meta.Attr +import LeanPool.ZetaZeros.Meta.Attr /-! # The vocabulary of the main results diff --git a/LeanPool/ZetaZeros/Hilbert/AlphaExpansion.lean b/LeanPool/ZetaZeros/Hilbert/AlphaExpansion.lean index a35a939ea0..ba6b520bba 100644 --- a/LeanPool/ZetaZeros/Hilbert/AlphaExpansion.lean +++ b/LeanPool/ZetaZeros/Hilbert/AlphaExpansion.lean @@ -6,17 +6,17 @@ Authors: Kenny Lau module public import LeanPool.ZetaZeros.Hilbert.Basis -public import LeanPool.ZetaZeros.Hilbert.Dimensions -public import LeanPool.ZetaZeros.Hilbert.FIdentity -public import LeanPool.ZetaZeros.Hilbert.InnerRealL2 -public import LeanPool.ZetaZeros.Hilbert.Integrals -public import LeanPool.ZetaZeros.Hilbert.L2 -public import LeanPool.ZetaZeros.Hilbert.Subspaces -public import LeanPool.ZetaZeros.Meta.Attr -public import LeanPool.ZetaZeros.Numeric.MontgomeryTaylor -public import LeanPool.ZetaZeros.Zeta.Basic -public import LeanPool.ZetaZeros.Zeta.OrderConj -public import LeanPool.ZetaZeros.Zeta.Defs +public import LeanPool.ZetaZeros.Hilbert.SymmetryL2 +import LeanPool.ZetaZeros.Hilbert.Dimensions +import LeanPool.ZetaZeros.Hilbert.FIdentity +import LeanPool.ZetaZeros.Hilbert.InnerRealL2 +import LeanPool.ZetaZeros.Hilbert.Integrals +import LeanPool.ZetaZeros.Hilbert.Symmetry +import LeanPool.ZetaZeros.Meta.Attr +import LeanPool.ZetaZeros.Zeta.Basic +import LeanPool.ZetaZeros.Zeta.OrderConj +import Mathlib.NumberTheory.LSeries.Nonvanishing +import Std.Tactic.BVDecide.Normalize.Prop /-! # Integrability and factorisation for the Bessel coefficients diff --git a/LeanPool/ZetaZeros/Hilbert/Basis.lean b/LeanPool/ZetaZeros/Hilbert/Basis.lean index 7f926eee85..f8494f063f 100644 --- a/LeanPool/ZetaZeros/Hilbert/Basis.lean +++ b/LeanPool/ZetaZeros/Hilbert/Basis.lean @@ -6,6 +6,10 @@ Authors: Kenny Lau module public import LeanPool.ZetaZeros.Hilbert.Subspaces +import LeanPool.ZetaZeros.Meta.Attr +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # Adapted orthonormal bases and the Bessel coefficients diff --git a/LeanPool/ZetaZeros/Hilbert/Defs.lean b/LeanPool/ZetaZeros/Hilbert/Defs.lean index fd8734076b..eaf9b5d6f8 100644 --- a/LeanPool/ZetaZeros/Hilbert/Defs.lean +++ b/LeanPool/ZetaZeros/Hilbert/Defs.lean @@ -5,8 +5,11 @@ Authors: Kenny Lau -/ module -public import LeanPool.ZetaZeros.Defs -public import LeanPool.ZetaZeros.Meta.Attr +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic +import LeanPool.ZetaZeros.Meta.Attr +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # The vocabulary of the Hilbert space inequality diff --git a/LeanPool/ZetaZeros/Hilbert/Dimensions.lean b/LeanPool/ZetaZeros/Hilbert/Dimensions.lean index eb2946d8c4..1613f16eb2 100644 --- a/LeanPool/ZetaZeros/Hilbert/Dimensions.lean +++ b/LeanPool/ZetaZeros/Hilbert/Dimensions.lean @@ -5,7 +5,14 @@ Authors: Kenny Lau -/ module -public import LeanPool.ZetaZeros.Hilbert.Basis +public import LeanPool.ZetaZeros.Hilbert.Subspaces +import LeanPool.ZetaZeros.Hilbert.Basis +import LeanPool.ZetaZeros.Meta.Attr +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.LinearAlgebra.FreeModule.PID +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt +import Mathlib.RingTheory.Finiteness.Prod /-! # The dimension gap between the first two subspaces diff --git a/LeanPool/ZetaZeros/Hilbert/FIdentity.lean b/LeanPool/ZetaZeros/Hilbert/FIdentity.lean index 4aeb9f4866..763f49be38 100644 --- a/LeanPool/ZetaZeros/Hilbert/FIdentity.lean +++ b/LeanPool/ZetaZeros/Hilbert/FIdentity.lean @@ -6,6 +6,7 @@ Authors: Kenny Lau module public import LeanPool.ZetaZeros.Hilbert.Defs +public import LeanPool.ZetaZeros.Defs /-! # The two-variable kernel in terms of even and odd parts diff --git a/LeanPool/ZetaZeros/Hilbert/InnerReal.lean b/LeanPool/ZetaZeros/Hilbert/InnerReal.lean index 8ac2171a1b..e8670b592c 100644 --- a/LeanPool/ZetaZeros/Hilbert/InnerReal.lean +++ b/LeanPool/ZetaZeros/Hilbert/InnerReal.lean @@ -6,6 +6,11 @@ Authors: Kenny Lau module public import LeanPool.ZetaZeros.Hilbert.Defs +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import LeanPool.ZetaZeros.Meta.Attr +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # Inner products of symmetric functions are real diff --git a/LeanPool/ZetaZeros/Hilbert/InnerRealL2.lean b/LeanPool/ZetaZeros/Hilbert/InnerRealL2.lean index 6aa95d7b06..4d1990bb01 100644 --- a/LeanPool/ZetaZeros/Hilbert/InnerRealL2.lean +++ b/LeanPool/ZetaZeros/Hilbert/InnerRealL2.lean @@ -5,7 +5,14 @@ Authors: Kenny Lau -/ module -public import LeanPool.ZetaZeros.Hilbert.SymmetryL2 +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.MeasureTheory.Measure.Haar.OfBasis +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.Data.Nat.Factorial.DoubleFactorial +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # The `L²` inner product of symmetric elements is real diff --git a/LeanPool/ZetaZeros/Hilbert/Integrals.lean b/LeanPool/ZetaZeros/Hilbert/Integrals.lean index 17946a8d16..f06b72fc97 100644 --- a/LeanPool/ZetaZeros/Hilbert/Integrals.lean +++ b/LeanPool/ZetaZeros/Hilbert/Integrals.lean @@ -6,6 +6,8 @@ Authors: Kenny Lau module public import LeanPool.ZetaZeros.Hilbert.Defs +public import LeanPool.ZetaZeros.Defs +import LeanPool.ZetaZeros.Meta.Attr /-! # The kernel as an inner product diff --git a/LeanPool/ZetaZeros/Hilbert/L2.lean b/LeanPool/ZetaZeros/Hilbert/L2.lean index cd7d3c4ac2..48c06dbb85 100644 --- a/LeanPool/ZetaZeros/Hilbert/L2.lean +++ b/LeanPool/ZetaZeros/Hilbert/L2.lean @@ -7,6 +7,10 @@ module public import LeanPool.ZetaZeros.Hilbert.Defs public import LeanPool.ZetaZeros.Zeta.Finite +public import LeanPool.ZetaZeros.Zeta.Defs +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # The twisted functions live in `L²((-lam, lam))` diff --git a/LeanPool/ZetaZeros/Hilbert/Subspaces.lean b/LeanPool/ZetaZeros/Hilbert/Subspaces.lean index 737e99088f..4a1d6fdeda 100644 --- a/LeanPool/ZetaZeros/Hilbert/Subspaces.lean +++ b/LeanPool/ZetaZeros/Hilbert/Subspaces.lean @@ -6,6 +6,10 @@ Authors: Kenny Lau module public import LeanPool.ZetaZeros.Hilbert.L2 +import LeanPool.ZetaZeros.Meta.Attr +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # The three nested subspaces diff --git a/LeanPool/ZetaZeros/Hilbert/Symmetry.lean b/LeanPool/ZetaZeros/Hilbert/Symmetry.lean index 2136771680..2730acf01f 100644 --- a/LeanPool/ZetaZeros/Hilbert/Symmetry.lean +++ b/LeanPool/ZetaZeros/Hilbert/Symmetry.lean @@ -6,6 +6,8 @@ Authors: Kenny Lau module public import LeanPool.ZetaZeros.Hilbert.Defs +public import LeanPool.ZetaZeros.Defs +import LeanPool.ZetaZeros.Meta.Attr /-! # Symmetry of the twisted functions diff --git a/LeanPool/ZetaZeros/Hilbert/SymmetryL2.lean b/LeanPool/ZetaZeros/Hilbert/SymmetryL2.lean index 8bc4dcfc0c..008e7b1aad 100644 --- a/LeanPool/ZetaZeros/Hilbert/SymmetryL2.lean +++ b/LeanPool/ZetaZeros/Hilbert/SymmetryL2.lean @@ -6,7 +6,9 @@ Authors: Kenny Lau module public import LeanPool.ZetaZeros.Hilbert.Subspaces -public import LeanPool.ZetaZeros.Hilbert.Symmetry +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # Symmetry on `L²`, as a real subspace diff --git a/LeanPool/ZetaZeros/Main.lean b/LeanPool/ZetaZeros/Main.lean index dd29ed7878..a5db6760e6 100644 --- a/LeanPool/ZetaZeros/Main.lean +++ b/LeanPool/ZetaZeros/Main.lean @@ -5,9 +5,13 @@ Authors: Axiom Math -/ module -public import LeanPool.ZetaZeros.Zeta.Proportion -public import LeanPool.ZetaZeros.Zeta.Transfer -public import LeanPool.ZetaZeros.Numeric.MontgomeryTaylor +public import LeanPool.ZetaZeros.Defs +import LeanPool.ZetaZeros.Meta.Attr +import LeanPool.ZetaZeros.Zeta.Proportion +import LeanPool.ZetaZeros.Zeta.Transfer +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # Proportion bounds for zeta zeros diff --git a/LeanPool/ZetaZeros/Meta/Attr.lean b/LeanPool/ZetaZeros/Meta/Attr.lean index 00408205e3..12b2a385ed 100644 --- a/LeanPool/ZetaZeros/Meta/Attr.lean +++ b/LeanPool/ZetaZeros/Meta/Attr.lean @@ -5,7 +5,8 @@ Authors: Kenny Lau -/ module -public meta import Lean +public meta import Lean.Attributes +import Lean.Exception /-! # The `zz_tag` attribute diff --git a/LeanPool/ZetaZeros/MontgomeryTaylor/AffineKernel.lean b/LeanPool/ZetaZeros/MontgomeryTaylor/AffineKernel.lean index a765db040b..5df6d097e5 100644 --- a/LeanPool/ZetaZeros/MontgomeryTaylor/AffineKernel.lean +++ b/LeanPool/ZetaZeros/MontgomeryTaylor/AffineKernel.lean @@ -5,7 +5,8 @@ Authors: Axiom Math -/ module -public import LeanPool.ZetaZeros.Zeta.Basic +public import LeanPool.ZetaZeros.Zeta.Defs +import Mathlib.Analysis.Real.Pi.Bounds /-! # The auxiliary kernel `G`, and why it is constant diff --git a/LeanPool/ZetaZeros/MontgomeryTaylor/Basic.lean b/LeanPool/ZetaZeros/MontgomeryTaylor/Basic.lean index 049f3f71ed..3d46afd9e8 100644 --- a/LeanPool/ZetaZeros/MontgomeryTaylor/Basic.lean +++ b/LeanPool/ZetaZeros/MontgomeryTaylor/Basic.lean @@ -5,8 +5,13 @@ Authors: Axiom Math -/ module -public import LeanPool.ZetaZeros.MontgomeryTaylor.Evaluation -public import LeanPool.ZetaZeros.MontgomeryTaylor.Reduction +public import LeanPool.ZetaZeros.Numeric.MontgomeryTaylor +public import LeanPool.ZetaZeros.Zeta.Defs +import LeanPool.ZetaZeros.Meta.Attr +import LeanPool.ZetaZeros.MontgomeryTaylor.Evaluation +import LeanPool.ZetaZeros.MontgomeryTaylor.Reduction +import LeanPool.ZetaZeros.MontgomeryTaylor.TestFunction +import LeanPool.ZetaZeros.Zeta.Mass /-! # The Montgomery--Taylor computation diff --git a/LeanPool/ZetaZeros/MontgomeryTaylor/Evaluation.lean b/LeanPool/ZetaZeros/MontgomeryTaylor/Evaluation.lean index ad893d7b67..f880842654 100644 --- a/LeanPool/ZetaZeros/MontgomeryTaylor/Evaluation.lean +++ b/LeanPool/ZetaZeros/MontgomeryTaylor/Evaluation.lean @@ -6,6 +6,8 @@ Authors: Axiom Math module public import LeanPool.ZetaZeros.MontgomeryTaylor.AffineKernel +public import LeanPool.ZetaZeros.Numeric.MontgomeryTaylor +import Mathlib.Analysis.Real.Pi.Bounds /-! # The value of the constant diff --git a/LeanPool/ZetaZeros/MontgomeryTaylor/Integrability.lean b/LeanPool/ZetaZeros/MontgomeryTaylor/Integrability.lean index 85b436c908..2a5d1b350d 100644 --- a/LeanPool/ZetaZeros/MontgomeryTaylor/Integrability.lean +++ b/LeanPool/ZetaZeros/MontgomeryTaylor/Integrability.lean @@ -5,7 +5,8 @@ Authors: Axiom Math -/ module -public import LeanPool.ZetaZeros.MontgomeryTaylor.TestFunction +public import LeanPool.ZetaZeros.Zeta.Defs +import LeanPool.ZetaZeros.MontgomeryTaylor.TestFunction /-! # Interval-integrability of the integrands diff --git a/LeanPool/ZetaZeros/MontgomeryTaylor/Reduction.lean b/LeanPool/ZetaZeros/MontgomeryTaylor/Reduction.lean index 278ebd9290..8e622d9bfc 100644 --- a/LeanPool/ZetaZeros/MontgomeryTaylor/Reduction.lean +++ b/LeanPool/ZetaZeros/MontgomeryTaylor/Reduction.lean @@ -6,7 +6,9 @@ Authors: Axiom Math module public import LeanPool.ZetaZeros.MontgomeryTaylor.AffineKernel -public import LeanPool.ZetaZeros.MontgomeryTaylor.Integrability +import LeanPool.ZetaZeros.MontgomeryTaylor.Integrability +import LeanPool.ZetaZeros.MontgomeryTaylor.TestFunction +import Mathlib.Analysis.Real.Pi.Bounds /-! # Reducing the functional to a single integral against `G` diff --git a/LeanPool/ZetaZeros/MontgomeryTaylor/TestFunction.lean b/LeanPool/ZetaZeros/MontgomeryTaylor/TestFunction.lean index 120ffe2a5c..27eeafa43d 100644 --- a/LeanPool/ZetaZeros/MontgomeryTaylor/TestFunction.lean +++ b/LeanPool/ZetaZeros/MontgomeryTaylor/TestFunction.lean @@ -5,8 +5,8 @@ Authors: Axiom Math -/ module -public import LeanPool.ZetaZeros.Zeta.Basic -public import LeanPool.ZetaZeros.Zeta.Mass +public import LeanPool.ZetaZeros.Zeta.Defs +import Mathlib.Analysis.Real.Pi.Bounds /-! # Properties of the extremal test function diff --git a/LeanPool/ZetaZeros/Numeric/MontgomeryTaylor.lean b/LeanPool/ZetaZeros/Numeric/MontgomeryTaylor.lean index ca831d0b05..97a91888ca 100644 --- a/LeanPool/ZetaZeros/Numeric/MontgomeryTaylor.lean +++ b/LeanPool/ZetaZeros/Numeric/MontgomeryTaylor.lean @@ -5,8 +5,9 @@ Authors: Kenny Lau -/ module -public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series -public import LeanPool.ZetaZeros.Meta.Attr +public import Mathlib.Analysis.Complex.Trigonometric +import LeanPool.ZetaZeros.Meta.Attr +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series /-! # The Montgomery–Taylor constant is less than `1.3275` diff --git a/LeanPool/ZetaZeros/Zeta/Basic.lean b/LeanPool/ZetaZeros/Zeta/Basic.lean index d7ec5c541e..7e2c87fdac 100644 --- a/LeanPool/ZetaZeros/Zeta/Basic.lean +++ b/LeanPool/ZetaZeros/Zeta/Basic.lean @@ -5,10 +5,12 @@ Authors: Kenny Lau -/ module -public import Mathlib.Analysis.Calculus.ContDiff.Convolution -public import Mathlib.Analysis.Real.Pi.Bounds -public import LeanPool.ZetaZeros.Numeric.MontgomeryTaylor public import LeanPool.ZetaZeros.Zeta.Defs +import LeanPool.ZetaZeros.Meta.Attr +import LeanPool.ZetaZeros.Numeric.MontgomeryTaylor +import Mathlib.Analysis.Calculus.ContDiff.Convolution +import Mathlib.Analysis.Real.Pi.Bounds +import Std.Tactic.BVDecide.Normalize.Prop /-! # First properties of the extremal test function and the rescaling diff --git a/LeanPool/ZetaZeros/Zeta/Cutoff.lean b/LeanPool/ZetaZeros/Zeta/Cutoff.lean index 771a151926..42dfbf8c5d 100644 --- a/LeanPool/ZetaZeros/Zeta/Cutoff.lean +++ b/LeanPool/ZetaZeros/Zeta/Cutoff.lean @@ -5,8 +5,9 @@ Authors: Kenny Lau -/ module -public import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension public import LeanPool.ZetaZeros.Zeta.Defs +import LeanPool.ZetaZeros.Meta.Attr +import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension /-! # Cutoffs exist diff --git a/LeanPool/ZetaZeros/Zeta/Defs.lean b/LeanPool/ZetaZeros/Zeta/Defs.lean index 6d31a1c0b8..871935cdc3 100644 --- a/LeanPool/ZetaZeros/Zeta/Defs.lean +++ b/LeanPool/ZetaZeros/Zeta/Defs.lean @@ -5,7 +5,8 @@ Authors: Kenny Lau -/ module -public import LeanPool.ZetaZeros.Hilbert.Defs +public import LeanPool.ZetaZeros.Defs +import LeanPool.ZetaZeros.Meta.Attr /-! # The zeta-side vocabulary diff --git a/LeanPool/ZetaZeros/Zeta/Finite.lean b/LeanPool/ZetaZeros/Zeta/Finite.lean index 3287734b95..83c77c8ef2 100644 --- a/LeanPool/ZetaZeros/Zeta/Finite.lean +++ b/LeanPool/ZetaZeros/Zeta/Finite.lean @@ -5,8 +5,9 @@ Authors: Kenny Lau -/ module -public import Mathlib.NumberTheory.LSeries.ZetaZeros -public import LeanPool.ZetaZeros.Zeta.Defs +public import LeanPool.ZetaZeros.Defs +import LeanPool.ZetaZeros.Meta.Attr +import Mathlib.NumberTheory.LSeries.ZetaZeros /-! # Finiteness of the zero set up to a height diff --git a/LeanPool/ZetaZeros/Zeta/Kernel.lean b/LeanPool/ZetaZeros/Zeta/Kernel.lean index dfd0fe52d7..8ef0f86008 100644 --- a/LeanPool/ZetaZeros/Zeta/Kernel.lean +++ b/LeanPool/ZetaZeros/Zeta/Kernel.lean @@ -5,13 +5,18 @@ Authors: Axiom Math -/ module -public import LeanPool.ZetaZeros.Hilbert.AlphaExpansion -public import LeanPool.ZetaZeros.MontgomeryTaylor.Basic public import LeanPool.ZetaZeros.Zeta.Asymptotics -public import LeanPool.ZetaZeros.Defs -public import LeanPool.ZetaZeros.Zeta.Cutoff -public import LeanPool.ZetaZeros.Zeta.Finite -public import LeanPool.ZetaZeros.Zeta.Mass +public import LeanPool.ZetaZeros.Numeric.MontgomeryTaylor +public import LeanPool.ZetaZeros.Zeta.Defs +import LeanPool.ZetaZeros.Hilbert.AlphaExpansion +import LeanPool.ZetaZeros.Meta.Attr +import LeanPool.ZetaZeros.MontgomeryTaylor.Basic +import LeanPool.ZetaZeros.Zeta.Basic +import LeanPool.ZetaZeros.Zeta.Cutoff +import LeanPool.ZetaZeros.Zeta.Mass +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # Construction of the pair-correlation kernel diff --git a/LeanPool/ZetaZeros/Zeta/Mass.lean b/LeanPool/ZetaZeros/Zeta/Mass.lean index f6038b5152..9fbfd7182e 100644 --- a/LeanPool/ZetaZeros/Zeta/Mass.lean +++ b/LeanPool/ZetaZeros/Zeta/Mass.lean @@ -5,7 +5,9 @@ Authors: Kenny Lau -/ module -public import LeanPool.ZetaZeros.Zeta.Basic +public import LeanPool.ZetaZeros.Zeta.Defs +import LeanPool.ZetaZeros.Meta.Attr +import LeanPool.ZetaZeros.Numeric.MontgomeryTaylor /-! # The extremal test function has total mass one diff --git a/LeanPool/ZetaZeros/Zeta/OrderConj.lean b/LeanPool/ZetaZeros/Zeta/OrderConj.lean index 6331fc2efd..1b7ef4eaae 100644 --- a/LeanPool/ZetaZeros/Zeta/OrderConj.lean +++ b/LeanPool/ZetaZeros/Zeta/OrderConj.lean @@ -5,8 +5,9 @@ Authors: Kenny Lau -/ module -public import Mathlib.NumberTheory.Harmonic.ZetaAsymp -public import LeanPool.ZetaZeros.Zeta.Defs +public import LeanPool.ZetaZeros.Defs +import LeanPool.ZetaZeros.Meta.Attr +import Mathlib.NumberTheory.Harmonic.ZetaAsymp /-! # Conjugation preserves the multiplicity of a zero diff --git a/LeanPool/ZetaZeros/Zeta/Proportion.lean b/LeanPool/ZetaZeros/Zeta/Proportion.lean index ea3e2e2f01..b554dcb1b2 100644 --- a/LeanPool/ZetaZeros/Zeta/Proportion.lean +++ b/LeanPool/ZetaZeros/Zeta/Proportion.lean @@ -5,7 +5,10 @@ Authors: Kenny Lau -/ module -public import LeanPool.ZetaZeros.Zeta.Asymptotics +public import Mathlib.Topology.MetricSpace.Pseudo.Defs +import Mathlib.Analysis.SpecialFunctions.Bernstein +import Mathlib.Analysis.SpecialFunctions.Gamma.Basic +import Mathlib.Data.Nat.Factorial.DoubleFactorial /-! # The final asymptotic passage diff --git a/LeanPool/ZetaZeros/Zeta/Transfer.lean b/LeanPool/ZetaZeros/Zeta/Transfer.lean index 88b2381d9f..f1d2699e9c 100644 --- a/LeanPool/ZetaZeros/Zeta/Transfer.lean +++ b/LeanPool/ZetaZeros/Zeta/Transfer.lean @@ -6,6 +6,11 @@ Authors: Axiom Math module public import LeanPool.ZetaZeros.Zeta.Kernel +import LeanPool.ZetaZeros.Hilbert.AlphaExpansion +import LeanPool.ZetaZeros.Meta.Attr +import Mathlib.CategoryTheory.Category.Init +import Mathlib.Combinatorics.Matroid.Init +import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt /-! # Transfer of the Hilbert-space inequalities to zeta zeros diff --git a/LeanPool/ZhangYeungInequality.lean b/LeanPool/ZhangYeungInequality.lean index 136fdec70a..6913863571 100644 --- a/LeanPool/ZhangYeungInequality.lean +++ b/LeanPool/ZhangYeungInequality.lean @@ -3,16 +3,17 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module -import LeanPool.ZhangYeungInequality.CopyLemma -import LeanPool.ZhangYeungInequality.Delta -import LeanPool.ZhangYeungInequality.EntropyRegion -import LeanPool.ZhangYeungInequality.Prelude -import LeanPool.ZhangYeungInequality.Theorem2 -import LeanPool.ZhangYeungInequality.Theorem3 -import LeanPool.ZhangYeungInequality.Theorem4 -import LeanPool.ZhangYeungInequality.Theorem5 -import LeanPool.ZhangYeungInequality.Test +public import LeanPool.ZhangYeungInequality.CopyLemma +public import LeanPool.ZhangYeungInequality.Delta +public import LeanPool.ZhangYeungInequality.EntropyRegion +public import LeanPool.ZhangYeungInequality.Prelude +public import LeanPool.ZhangYeungInequality.Theorem2 +public import LeanPool.ZhangYeungInequality.Theorem3 +public import LeanPool.ZhangYeungInequality.Theorem4 +public import LeanPool.ZhangYeungInequality.Theorem5 +public import LeanPool.ZhangYeungInequality.Test /-! # The Zhang-Yeung non-Shannon information inequality @@ -24,3 +25,5 @@ Main declarations: `ZhangYeung.zhangYeung` Tags: information-theory, entropy, non-shannon-inequality MSC: 94A17, 94A15 -/ + +@[expose] public section diff --git a/LeanPool/ZhangYeungInequality/CopyLemma.lean b/LeanPool/ZhangYeungInequality/CopyLemma.lean index bf0d61d3e2..c774d310e0 100644 --- a/LeanPool/ZhangYeungInequality/CopyLemma.lean +++ b/LeanPool/ZhangYeungInequality/CopyLemma.lean @@ -3,10 +3,10 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module -import LeanPool.ZhangYeungInequality.Delta +public import LeanPool.ZhangYeungInequality.Delta import LeanPool.ZhangYeungInequality.Prelude -import LeanPool.ZhangYeungInequality.PFR.ForMathlib.ConditionalIndependence /-! # The Zhang-Yeung copy lemma @@ -115,6 +115,8 @@ Shannon entropy, conditional mutual information, copy lemma, conditional indepen Zhang-Yeung -/ +@[expose] public section + namespace ZhangYeung open MeasureTheory ProbabilityTheory diff --git a/LeanPool/ZhangYeungInequality/Delta.lean b/LeanPool/ZhangYeungInequality/Delta.lean index ad1735532f..5d5ddbc22c 100644 --- a/LeanPool/ZhangYeungInequality/Delta.lean +++ b/LeanPool/ZhangYeungInequality/Delta.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module -import LeanPool.ZhangYeungInequality.Prelude +public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic /-! # The Zhang-Yeung delta quantity @@ -92,6 +93,8 @@ for this module. Shannon entropy, mutual information, non-Shannon information inequality, Zhang-Yeung -/ +@[expose] public section + namespace ZhangYeung open MeasureTheory ProbabilityTheory diff --git a/LeanPool/ZhangYeungInequality/EntropyRegion.lean b/LeanPool/ZhangYeungInequality/EntropyRegion.lean index 987b677663..4fb2b02c8b 100644 --- a/LeanPool/ZhangYeungInequality/EntropyRegion.lean +++ b/LeanPool/ZhangYeungInequality/EntropyRegion.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module -import LeanPool.ZhangYeungInequality.Prelude +public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic /-! # Entropy-region infrastructure for Theorem 4 @@ -20,6 +21,8 @@ map from `Fin n` down to the first four coordinates. Witness-specific `Fin n` le witness and its cone membership / violation) live in `ZhangYeung.Theorem4`. -/ +@[expose] public section + namespace ZhangYeung open MeasureTheory ProbabilityTheory diff --git a/LeanPool/ZhangYeungInequality/PFR/ForMathlib/ConditionalIndependence.lean b/LeanPool/ZhangYeungInequality/PFR/ForMathlib/ConditionalIndependence.lean index 74291c9d88..755cdccb23 100644 --- a/LeanPool/ZhangYeungInequality/PFR/ForMathlib/ConditionalIndependence.lean +++ b/LeanPool/ZhangYeungInequality/PFR/ForMathlib/ConditionalIndependence.lean @@ -6,10 +6,11 @@ Authors: PFR contributors module -public import Mathlib.Tactic.Finiteness public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.IdentDistrib -public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.FiniteRange.ConditionalProbability public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Pair +public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.FiniteRange.Defs +import LeanPool.ZhangYeungInequality.PFR.ForMathlib.FiniteRange.ConditionalProbability +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic /-! # LeanPool.ZhangYeungInequality.PFR.ForMathlib.ConditionalIndependence diff --git a/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Entropy/Basic.lean b/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Entropy/Basic.lean index 15eb22e047..750e5f1978 100644 --- a/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Entropy/Basic.lean +++ b/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Entropy/Basic.lean @@ -9,7 +9,9 @@ module public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.ConditionalIndependence public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Kernel.MutualInfo public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Uniform -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.ConditionalProbability +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Prod +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.ConditionalProbability +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic /-! # Entropy and conditional entropy diff --git a/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Entropy/Kernel/Basic.lean b/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Entropy/Kernel/Basic.lean index aea6a835f7..3b7b4150e8 100644 --- a/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Entropy/Kernel/Basic.lean +++ b/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Entropy/Kernel/Basic.lean @@ -6,9 +6,12 @@ Authors: PFR contributors module -public import Mathlib.MeasureTheory.Integral.Prod public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Measure public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Kernel.Disintegration +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Integral.Lebesgue.Basic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Integral.Lebesgue.Countable +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Real +import Mathlib.MeasureTheory.Integral.Prod /-! # Entropy of a kernel with respect to a measure diff --git a/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Entropy/Measure.lean b/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Entropy/Measure.lean index cc248781eb..aa04588174 100644 --- a/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Entropy/Measure.lean +++ b/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Entropy/Measure.lean @@ -9,9 +9,11 @@ module public import Mathlib.Analysis.SpecialFunctions.Log.NegMulLog public import Mathlib.MeasureTheory.Integral.Bochner.Basic public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.FiniteRange.Defs -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Dirac -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Real -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.UniformOn +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Basic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Dirac +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Prod +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Real +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.UniformOn /-! # Entropy of a measure diff --git a/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Pair.lean b/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Pair.lean index 3d1ef76b8e..cd3d5214b1 100644 --- a/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Pair.lean +++ b/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Pair.lean @@ -7,7 +7,6 @@ Authors: PFR contributors module public import Mathlib.Util.Notation3 -public import Mathlib.Tactic.Basic /-! # LeanPool.ZhangYeungInequality.PFR.ForMathlib.Pair diff --git a/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Uniform.lean b/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Uniform.lean index 570d1362f1..41c9b21d3a 100644 --- a/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Uniform.lean +++ b/LeanPool/ZhangYeungInequality/PFR/ForMathlib/Uniform.lean @@ -6,10 +6,10 @@ Authors: PFR contributors module -public import Mathlib.MeasureTheory.Measure.Real public import Mathlib.Probability.IdentDistrib public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.FiniteRange.Defs -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.UniformOn +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Basic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.UniformOn /-! # LeanPool.ZhangYeungInequality.PFR.ForMathlib.Uniform diff --git a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Analysis/SpecialFunctions/NegMulLog.lean b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Analysis/SpecialFunctions/NegMulLog.lean index 61edc7f2b9..ede66b854b 100644 --- a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Analysis/SpecialFunctions/NegMulLog.lean +++ b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Analysis/SpecialFunctions/NegMulLog.lean @@ -6,9 +6,9 @@ Authors: PFR contributors module -public import Mathlib.Algebra.BigOperators.Field -public import Mathlib.Analysis.Convex.Jensen -public import Mathlib.Analysis.SpecialFunctions.Log.NegMulLog +public import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Algebra.BigOperators.Field +import Mathlib.Analysis.SpecialFunctions.Log.NegMulLog /-! # Entropy function diff --git a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Data/Set/Basic.lean b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Data/Set/Basic.lean index a87e5711b2..db6c2ef3c9 100644 --- a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Data/Set/Basic.lean +++ b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Data/Set/Basic.lean @@ -6,7 +6,9 @@ Authors: PFR contributors module -public import Mathlib.Data.Set.Basic +public import Mathlib.Data.Set.Defs +public import Mathlib.Tactic.ToDual +import Mathlib.Data.Set.Basic /-! # LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Basic diff --git a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Data/Set/Card.lean b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Data/Set/Card.lean index 95f680421c..c1f76d7176 100644 --- a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Data/Set/Card.lean +++ b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Data/Set/Card.lean @@ -7,8 +7,7 @@ Authors: PFR contributors module public import Mathlib.Data.Set.Card -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Basic -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Insert +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Basic /-! # LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Card diff --git a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Data/Set/Insert.lean b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Data/Set/Insert.lean index 9447a99d85..baf9e90741 100644 --- a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Data/Set/Insert.lean +++ b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Data/Set/Insert.lean @@ -6,7 +6,8 @@ Authors: PFR contributors module -public import Mathlib.Data.Set.Insert +public import Mathlib.Data.Set.Defs +import Mathlib.Data.Set.Insert /-! # LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Insert diff --git a/LeanPool/ZhangYeungInequality/PFR/Mathlib/MeasureTheory/Integral/Lebesgue/Countable.lean b/LeanPool/ZhangYeungInequality/PFR/Mathlib/MeasureTheory/Integral/Lebesgue/Countable.lean index b2d0360b16..393aa55048 100644 --- a/LeanPool/ZhangYeungInequality/PFR/Mathlib/MeasureTheory/Integral/Lebesgue/Countable.lean +++ b/LeanPool/ZhangYeungInequality/PFR/Mathlib/MeasureTheory/Integral/Lebesgue/Countable.lean @@ -6,7 +6,8 @@ Authors: PFR contributors module -public import Mathlib.MeasureTheory.Integral.Lebesgue.Countable +public import Mathlib.MeasureTheory.Integral.Lebesgue.Basic +import Mathlib.MeasureTheory.Integral.Lebesgue.Countable /-! # LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Integral.Lebesgue.Countable diff --git a/LeanPool/ZhangYeungInequality/PFR/Mathlib/MeasureTheory/Measure/Real.lean b/LeanPool/ZhangYeungInequality/PFR/Mathlib/MeasureTheory/Measure/Real.lean index b4a7bc104b..5bdad88468 100644 --- a/LeanPool/ZhangYeungInequality/PFR/Mathlib/MeasureTheory/Measure/Real.lean +++ b/LeanPool/ZhangYeungInequality/PFR/Mathlib/MeasureTheory/Measure/Real.lean @@ -6,8 +6,9 @@ Authors: PFR contributors module -public import Mathlib.MeasureTheory.Measure.Real -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Prod +public import Mathlib.MeasureTheory.Measure.Prod +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Prod +import Mathlib.MeasureTheory.Measure.Real /-! # LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Real diff --git a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/IdentDistrib.lean b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/IdentDistrib.lean index eec3b5f4e5..1563f30679 100644 --- a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/IdentDistrib.lean +++ b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/IdentDistrib.lean @@ -7,8 +7,8 @@ Authors: PFR contributors module public import Mathlib.Probability.IdentDistrib -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Constructions.Pi -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Constructions.Pi +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic /-! # LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.IdentDistrib diff --git a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Independence/Basic.lean b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Independence/Basic.lean index 55a285cc71..01b41ff535 100644 --- a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Independence/Basic.lean +++ b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Independence/Basic.lean @@ -6,9 +6,8 @@ Authors: PFR contributors module -public import Mathlib.MeasureTheory.Constructions.Pi public import Mathlib.Probability.Independence.Basic -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Kernel.IndepFun +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Kernel.IndepFun /-! # LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Basic diff --git a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Independence/Kernel/IndepFun.lean b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Independence/Kernel/IndepFun.lean index a05b5faf03..aac1a09f8c 100644 --- a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Independence/Kernel/IndepFun.lean +++ b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Independence/Kernel/IndepFun.lean @@ -6,8 +6,8 @@ Authors: PFR contributors module -public import Mathlib.Data.Finset.Pairwise public import Mathlib.Probability.Independence.Kernel.IndepFun +import Mathlib.Data.Finset.Pairwise /-! # LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Independence.Kernel.IndepFun diff --git a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Kernel/Composition/Comp.lean b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Kernel/Composition/Comp.lean index a09ffe2e7a..b932d89167 100644 --- a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Kernel/Composition/Comp.lean +++ b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Kernel/Composition/Comp.lean @@ -6,7 +6,6 @@ Authors: PFR contributors module -public import Mathlib.Probability.Kernel.Composition.Comp public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.Kernel.Disintegration /-! diff --git a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Kernel/Disintegration.lean b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Kernel/Disintegration.lean index bf68b2b687..74dd448380 100644 --- a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Kernel/Disintegration.lean +++ b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/Kernel/Disintegration.lean @@ -7,10 +7,9 @@ Authors: PFR contributors module public import Mathlib.Probability.Independence.Basic -public import Mathlib.Probability.Kernel.Composition.Prod public import Mathlib.Probability.Kernel.CondDistrib -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Integral.Lebesgue.Basic -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Integral.Lebesgue.Countable +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Integral.Lebesgue.Basic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Integral.Lebesgue.Countable /-! # Disintegration of kernels in finite spaces diff --git a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/UniformOn.lean b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/UniformOn.lean index d062f6b8e2..c4796c8c73 100644 --- a/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/UniformOn.lean +++ b/LeanPool/ZhangYeungInequality/PFR/Mathlib/Probability/UniformOn.lean @@ -7,7 +7,8 @@ Authors: PFR contributors module public import Mathlib.Probability.UniformOn -public import LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Card +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Basic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Card /-! # LeanPool.ZhangYeungInequality.PFR.Mathlib.Probability.UniformOn diff --git a/LeanPool/ZhangYeungInequality/Prelude.lean b/LeanPool/ZhangYeungInequality/Prelude.lean index 5a655353b3..2cfbd0f3b7 100644 --- a/LeanPool/ZhangYeungInequality/Prelude.lean +++ b/LeanPool/ZhangYeungInequality/Prelude.lean @@ -9,7 +9,9 @@ I[X:Y|Z]) into scope for downstream modules, and hosts generic helpers reusable across the `ZhangYeung` hierarchy. -/ -import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic +module + +public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic /-! # LeanPool.ZhangYeungInequality.Prelude @@ -17,6 +19,8 @@ import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic Imported Lean Pool material for `LeanPool.ZhangYeungInequality.Prelude`. -/ +@[expose] public section + open MeasureTheory ProbabilityTheory open scoped ZhangYeungPFR diff --git a/LeanPool/ZhangYeungInequality/Test.lean b/LeanPool/ZhangYeungInequality/Test.lean index ce7a80d59c..890358ee37 100644 --- a/LeanPool/ZhangYeungInequality/Test.lean +++ b/LeanPool/ZhangYeungInequality/Test.lean @@ -5,16 +5,21 @@ Authors: Christopher Boone -/ /- Test import surface for the Zhang-Yeung formalization. -/ -import LeanPool.ZhangYeungInequality.Test.CopyLemma -import LeanPool.ZhangYeungInequality.Test.Delta -import LeanPool.ZhangYeungInequality.Test.EntropyRegion -import LeanPool.ZhangYeungInequality.Test.Theorem2 -import LeanPool.ZhangYeungInequality.Test.Theorem3 -import LeanPool.ZhangYeungInequality.Test.Theorem4 -import LeanPool.ZhangYeungInequality.Test.Theorem5 +module + +public import LeanPool.ZhangYeungInequality.Test.CopyLemma +public import LeanPool.ZhangYeungInequality.Test.Delta +public import LeanPool.ZhangYeungInequality.Test.EntropyRegion +public import LeanPool.ZhangYeungInequality.Test.Theorem2 +public import LeanPool.ZhangYeungInequality.Test.Theorem3 +public import LeanPool.ZhangYeungInequality.Test.Theorem4 +public import LeanPool.ZhangYeungInequality.Test.Theorem5 +import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Measure /-! # LeanPool.ZhangYeungInequality.Test Imported Lean Pool material for `LeanPool.ZhangYeungInequality.Test`. -/ + +@[expose] public section diff --git a/LeanPool/ZhangYeungInequality/Test/CopyLemma.lean b/LeanPool/ZhangYeungInequality/Test/CopyLemma.lean index 63452f476a..2081ce57cc 100644 --- a/LeanPool/ZhangYeungInequality/Test/CopyLemma.lean +++ b/LeanPool/ZhangYeungInequality/Test/CopyLemma.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module -import LeanPool.ZhangYeungInequality.CopyLemma +public import LeanPool.ZhangYeungInequality.CopyLemma + +public import Mathlib.MeasureTheory.MeasurableSpace.Defs + +import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic /-! # LeanPool.ZhangYeungInequality.Test.CopyLemma @@ -12,6 +17,8 @@ import LeanPool.ZhangYeungInequality.CopyLemma Imported Lean Pool material for `LeanPool.ZhangYeungInequality.Test.CopyLemma`. -/ +@[expose] public section + namespace ZhangYeungTest open MeasureTheory ProbabilityTheory diff --git a/LeanPool/ZhangYeungInequality/Test/Delta.lean b/LeanPool/ZhangYeungInequality/Test/Delta.lean index 3555247452..574a42c130 100644 --- a/LeanPool/ZhangYeungInequality/Test/Delta.lean +++ b/LeanPool/ZhangYeungInequality/Test/Delta.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module -import LeanPool.ZhangYeungInequality.Delta +public import LeanPool.ZhangYeungInequality.Delta + +public import Mathlib.MeasureTheory.MeasurableSpace.Defs + +import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic /-! # LeanPool.ZhangYeungInequality.Test.Delta @@ -12,6 +17,8 @@ import LeanPool.ZhangYeungInequality.Delta Imported Lean Pool material for `LeanPool.ZhangYeungInequality.Test.Delta`. -/ +@[expose] public section + namespace ZhangYeungTest open MeasureTheory ProbabilityTheory diff --git a/LeanPool/ZhangYeungInequality/Test/EntropyRegion.lean b/LeanPool/ZhangYeungInequality/Test/EntropyRegion.lean index ae37044134..a6fa0c227c 100644 --- a/LeanPool/ZhangYeungInequality/Test/EntropyRegion.lean +++ b/LeanPool/ZhangYeungInequality/Test/EntropyRegion.lean @@ -3,9 +3,13 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module -import LeanPool.ZhangYeungInequality.EntropyRegion -import LeanPool.ZhangYeungInequality.Theorem4 +public import LeanPool.ZhangYeungInequality.Theorem4 + +public import LeanPool.ZhangYeungInequality.EntropyRegion + +import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic /-! # LeanPool.ZhangYeungInequality.Test.EntropyRegion @@ -13,6 +17,8 @@ import LeanPool.ZhangYeungInequality.Theorem4 Imported Lean Pool material for `LeanPool.ZhangYeungInequality.Test.EntropyRegion`. -/ +@[expose] public section + namespace ZhangYeungTest open MeasureTheory ProbabilityTheory diff --git a/LeanPool/ZhangYeungInequality/Test/Theorem2.lean b/LeanPool/ZhangYeungInequality/Test/Theorem2.lean index c6771d1177..a8d3e6fe84 100644 --- a/LeanPool/ZhangYeungInequality/Test/Theorem2.lean +++ b/LeanPool/ZhangYeungInequality/Test/Theorem2.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module -import LeanPool.ZhangYeungInequality.Theorem2 +public import LeanPool.ZhangYeungInequality.Theorem2 + +public import Mathlib.MeasureTheory.MeasurableSpace.Defs + +import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic /-! # LeanPool.ZhangYeungInequality.Test.Theorem2 @@ -12,6 +17,8 @@ import LeanPool.ZhangYeungInequality.Theorem2 Imported Lean Pool material for `LeanPool.ZhangYeungInequality.Test.Theorem2`. -/ +@[expose] public section + namespace ZhangYeungTest open MeasureTheory ProbabilityTheory diff --git a/LeanPool/ZhangYeungInequality/Test/Theorem3.lean b/LeanPool/ZhangYeungInequality/Test/Theorem3.lean index 35e7783ca7..bfc7e8e240 100644 --- a/LeanPool/ZhangYeungInequality/Test/Theorem3.lean +++ b/LeanPool/ZhangYeungInequality/Test/Theorem3.lean @@ -3,8 +3,13 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module -import LeanPool.ZhangYeungInequality.Theorem3 +public import LeanPool.ZhangYeungInequality.Theorem3 + +public import Mathlib.MeasureTheory.MeasurableSpace.Defs + +import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic /-! # LeanPool.ZhangYeungInequality.Test.Theorem3 @@ -12,6 +17,8 @@ import LeanPool.ZhangYeungInequality.Theorem3 Imported Lean Pool material for `LeanPool.ZhangYeungInequality.Test.Theorem3`. -/ +@[expose] public section + namespace ZhangYeungTest open MeasureTheory ProbabilityTheory diff --git a/LeanPool/ZhangYeungInequality/Test/Theorem4.lean b/LeanPool/ZhangYeungInequality/Test/Theorem4.lean index edae8afc39..baaa331211 100644 --- a/LeanPool/ZhangYeungInequality/Test/Theorem4.lean +++ b/LeanPool/ZhangYeungInequality/Test/Theorem4.lean @@ -3,8 +3,11 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module -import LeanPool.ZhangYeungInequality.Theorem4 +public import LeanPool.ZhangYeungInequality.Theorem4 + +import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Measure /-! # LeanPool.ZhangYeungInequality.Test.Theorem4 @@ -12,6 +15,8 @@ import LeanPool.ZhangYeungInequality.Theorem4 Imported Lean Pool material for `LeanPool.ZhangYeungInequality.Test.Theorem4`. -/ +@[expose] public section + namespace ZhangYeungTest open MeasureTheory ProbabilityTheory diff --git a/LeanPool/ZhangYeungInequality/Test/Theorem5.lean b/LeanPool/ZhangYeungInequality/Test/Theorem5.lean index eb50247094..f10f6ff103 100644 --- a/LeanPool/ZhangYeungInequality/Test/Theorem5.lean +++ b/LeanPool/ZhangYeungInequality/Test/Theorem5.lean @@ -3,8 +3,14 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module -import LeanPool.ZhangYeungInequality.Theorem5 +public import LeanPool.ZhangYeungInequality.Theorem5 + +public import Mathlib.MeasureTheory.MeasurableSpace.Defs + +public import Mathlib.Data.Nat.Notation +import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic /-! # LeanPool.ZhangYeungInequality.Test.Theorem5 @@ -12,6 +18,8 @@ import LeanPool.ZhangYeungInequality.Theorem5 Imported Lean Pool material for `LeanPool.ZhangYeungInequality.Test.Theorem5`. -/ +@[expose] public section + namespace ZhangYeungTest open MeasureTheory ProbabilityTheory diff --git a/LeanPool/ZhangYeungInequality/Theorem2.lean b/LeanPool/ZhangYeungInequality/Theorem2.lean index e503d8e9f3..bf45e12afd 100644 --- a/LeanPool/ZhangYeungInequality/Theorem2.lean +++ b/LeanPool/ZhangYeungInequality/Theorem2.lean @@ -3,10 +3,13 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module +public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic import LeanPool.ZhangYeungInequality.Delta -import LeanPool.ZhangYeungInequality.Prelude import LeanPool.ZhangYeungInequality.PFR.Mathlib.Analysis.SpecialFunctions.NegMulLog +import LeanPool.ZhangYeungInequality.PFR.Mathlib.Data.Set.Basic +import LeanPool.ZhangYeungInequality.PFR.Mathlib.MeasureTheory.Measure.Real /-! # Zhang-Yeung Theorem 2: a conditional information inequality @@ -169,6 +172,8 @@ Shannon entropy, conditional mutual information, conditional information inequal Kullback-Leibler divergence, Zhang-Yeung, essentially conditional inequality -/ +@[expose] public section + namespace ZhangYeung open MeasureTheory ProbabilityTheory Real diff --git a/LeanPool/ZhangYeungInequality/Theorem3.lean b/LeanPool/ZhangYeungInequality/Theorem3.lean index cd0c01bd3f..533902a89d 100644 --- a/LeanPool/ZhangYeungInequality/Theorem3.lean +++ b/LeanPool/ZhangYeungInequality/Theorem3.lean @@ -3,9 +3,10 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module +public import LeanPool.ZhangYeungInequality.Delta import LeanPool.ZhangYeungInequality.CopyLemma -import LeanPool.ZhangYeungInequality.Delta import LeanPool.ZhangYeungInequality.Prelude /-! @@ -86,6 +87,8 @@ data processing -/ +@[expose] public section + namespace ZhangYeung open MeasureTheory ProbabilityTheory diff --git a/LeanPool/ZhangYeungInequality/Theorem4.lean b/LeanPool/ZhangYeungInequality/Theorem4.lean index 1aa5f9fde5..68b7aec8db 100644 --- a/LeanPool/ZhangYeungInequality/Theorem4.lean +++ b/LeanPool/ZhangYeungInequality/Theorem4.lean @@ -3,8 +3,9 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module -import LeanPool.ZhangYeungInequality.EntropyRegion +public import LeanPool.ZhangYeungInequality.EntropyRegion import LeanPool.ZhangYeungInequality.Theorem3 /-! @@ -151,6 +152,8 @@ incompleteness, entropic region -/ +@[expose] public section + namespace ZhangYeung open MeasureTheory ProbabilityTheory diff --git a/LeanPool/ZhangYeungInequality/Theorem5.lean b/LeanPool/ZhangYeungInequality/Theorem5.lean index 9d9047558f..b531747222 100644 --- a/LeanPool/ZhangYeungInequality/Theorem5.lean +++ b/LeanPool/ZhangYeungInequality/Theorem5.lean @@ -3,12 +3,11 @@ Copyright (c) 2026 Christopher Boone. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Boone -/ +module +public import LeanPool.ZhangYeungInequality.PFR.ForMathlib.Entropy.Basic import LeanPool.ZhangYeungInequality.CopyLemma -import LeanPool.ZhangYeungInequality.Delta -import LeanPool.ZhangYeungInequality.EntropyRegion import LeanPool.ZhangYeungInequality.Prelude -import LeanPool.ZhangYeungInequality.Theorem3 /-! # Theorem 5, the `n + 2`-variable Zhang-Yeung generalization @@ -55,6 +54,8 @@ conditional independence -/ +@[expose] public section + namespace ZhangYeung open MeasureTheory ProbabilityTheory