Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.
Python
refactor(Lib/General/Geometry): detect unramifiedness by Nakayama at a field-valued point
alkor2000e75a66c4a434
diff --git a/src/Lib/General/Geometry/SmoothnessCriterion.lean b/src/Lib/General/Geometry/SmoothnessCriterion.leanindex 8018597b945..92214531b9d 100644--- a/src/Lib/General/Geometry/SmoothnessCriterion.lean+++ b/src/Lib/General/Geometry/SmoothnessCriterion.lean@@ -5,6 +5,7 @@ public import Mathlib.RingTheory.SimpleRing.Principalimport Mathlib.Analysis.Analytic.Polynomialimport Mathlib.RingTheory.Unramified.LocalStructureimport TauCeti.RingTheory.Derivation.TrivSqZeroExt+import TauCeti.RingTheory.Finiteness.Nakayamaimport TauCeti.RingTheory.MvPolynomial.IntegrallyClosedpublic import Lib.Shimura.Uniformisation.HolomorphicFamiliespublic import Lib.Cohomology.Etale.Basic@@ -105,19 +106,17 @@ lemma New.Variety.isUnramifiedAt_of_span_differentials {R A B k : Type*} {ι : S(hx : Submodule.span k(Set.range fun i : ι ↦ TensorProduct.mk B k Ω[B⁄R] 1 (D R B (algebraMap A B (x i)))) = ⊤) :IsUnramifiedAt A (PrimeSpectrum.comap (algebraMap B k) ⊥).asIdeal := by- set p : PrimeSpectrum B := PrimeSpectrum.comap (algebraMap B k) ⊥- -- `k` is an algebra over the residue field of `p`, as `p` is the kernel of `B → k`- let toK : p.asIdeal.ResidueField →ₐ[B] k :=- Ideal.ResidueField.liftₐ p.asIdeal (ofId B k) le_rfl fun _ ↦ .mk0 _- algebraize [toK.toRingHom]- refine unramifiedLocus_eq_compl_support.superset fun hp : p ∈ Module.support B Ω[B⁄A] ↦ ?_- -- then `k ⊗ Ω[B⁄A]` is non-zero, but it is the image of `k ⊗ Ω[B⁄R]` under the zero map- rw [mem_support_iff_nontrivial_residueField_tensorProduct] at hp- have : Nontrivial (k ⊗[B] Ω[B⁄A]) :=- (AlgebraTensorModule.cancelBaseChange B p.asIdeal.ResidueField k k Ω[B⁄A]).symm.nontrivial+ -- The surjection onto the relative cotangent space over `A` kills the spanning differentials.let pr : k ⊗[B] Ω[B⁄R] →ₗ[k] k ⊗[B] Ω[B⁄A] := (KaehlerDifferential.map R A B B).baseChange k- have pr_zero : pr = 0 := ext_on_range hx (by simp [pr])- exact ne_zero_of_surjective (baseChange_surjective k (map_surjective R A B)) pr_zero+ have h_pr_zero : pr = 0 := ext_on_range hx (by simp [pr])+ have h_pr_surj : Function.Surjective pr := baseChange_surjective k (map_surjective R A B)+ have h_fibre : Subsingleton (k ⊗[B] Ω[B⁄A]) :=+ not_nontrivial_iff_subsingleton.mp fun _ ↦ ne_zero_of_surjective h_pr_surj h_pr_zero+ -- Nakayama gives an annihilator of the relative differentials that is nonzero at the point.+ obtain ⟨g, hg, h_ann⟩ := exists_algebraMap_ne_zero_and_smul_eq_zero h_fibre+ refine unramifiedLocus_eq_compl_support.superset fun hp ↦ hg ?_+ have h_mem := mem_support_iff_of_finite.mp hp (mem_annihilator.mpr h_ann)+ simpa [PrimeSpectrum.comap_asIdeal, PrimeSpectrum.asIdeal_bot, Ideal.mem_comap] using h_mem/-- An algebra that is standard smooth of relative dimension `0` over the polynomial ring in `d`variables over `R` is standard smooth of relative dimension `d` over `R`. -/