Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.
Python
refactor(Geometry): factor points through an atlas of a quasi-compact scheme
alkor2000d751733b6c75
diff --git a/src/Lib/General/Geometry/PointsOfProperSchemes.lean b/src/Lib/General/Geometry/PointsOfProperSchemes.leanindex c1352c05a76..58832e49f27 100644--- a/src/Lib/General/Geometry/PointsOfProperSchemes.lean+++ b/src/Lib/General/Geometry/PointsOfProperSchemes.lean@@ -28,7 +28,7 @@ change to `k`, it also has an étale atlas.of `X` with values in `S`, one ideal `I` of `S` describes the ring maps `γ : S →+* B` along which`a` lands in `Z`, namely those that kill `I`. It is finitely generated if `i` is of finitepresentation.-* `New.Variety.exists_locallyOfFiniteType_forall_factors`: a proper scheme `X` over `Spec R`+* `New.Variety.exists_locallyOfFiniteType_forall_factors`: a quasi-compact scheme `X`receives a morphism `Spec T ⟶ X` from one affine scheme, locally of finite type, through whichevery point with values in a comparable ring (`New.Variety.IsComparableRing`) factors.* `New.Variety.isProperOver_pointsToBase`: the functor of points of `X` over `R` satisfies@@ -160,11 +160,11 @@ open CategoryTheory Limits AlgebraicGeometry CommRingCat Scheme Spec terminal Idvariable {X : Scheme} {R : CommRingCat} (s : X ⟶ Spec R)-/-- If X is proper over Spec R, there is a morphism a: Spec T → X, locally of finite type, through+/-- If X is quasi-compact, there is a morphism a: Spec T → X, locally of finite type, throughwhich every morphism Spec O → X factors, for all rings O whose identity map satisfies`New.Variety.IsComparableRing`: any two elements are comparable for divisibility after a partitionby an idempotent. -/-lemma New.Variety.exists_locallyOfFiniteType_forall_factors [IsProper s] :+lemma New.Variety.exists_locallyOfFiniteType_forall_factors (X : Scheme) [CompactSpace X] :∃ (T : CommRingCat) (a : Spec T ⟶ X),LocallyOfFiniteType a ∧∀ O : CommRingCat,@@ -172,7 +172,6 @@ lemma New.Variety.exists_locallyOfFiniteType_forall_factors [IsProper s] :∀ z : Spec O ⟶ X, ∃ u : T ⟶ O, Spec.map u ≫ a = z := by-- Take the disjoint union of a finite affine open cover `𝒰` of `X`. Partition `Spec O` into-- finitely many clopen pieces, each sent by the `O`-valued point `z` into one member of `𝒰`.- have : CompactSpace X := QuasiCompact.compactSpace_of_compactSpace slet 𝒰 : X.OpenCover := X.affineCover.finiteSubcoverhave : LocallyOfFiniteType (Sigma.desc 𝒰.f) :=HasRingHomProperty.instIsZariskiLocalAtSource.sigmaDesc inferInstance@@ -230,7 +229,8 @@ lemma New.Variety.isProperOver_pointsToBase [IsProper s] : IsProperOver (pointsT· -- A geometric point `z` whose ring map on `R` lands in the valuation ring `O` extends to-- an `O`-point by the valuative criterion, and `O`-points factor through the atlas `a`,-- as a valuation ring is a comparable ring.- obtain ⟨T, a, -, ha⟩ := exists_locallyOfFiniteType_forall_factors s+ have : CompactSpace X := QuasiCompact.compactSpace_of_compactSpace s+ obtain ⟨T, a, -, ha⟩ := exists_locallyOfFiniteType_forall_factors Xrefine ⟨T, ⟨a⟩, fun {K} _ _ O z hz ↦ ?_⟩let ρ₀ : R →+* O := (baseRingMap (pointsToBase s) z).hom.codRestrict O hzobtain ⟨⟨⟨l, hl, -⟩⟩⟩ := (UniversallyClosed.eq_valuativeCriterion.le X (Spec R) s@@ -454,7 +454,9 @@ lemma isAffinelyCovered_algPointsOf {C : Type 1} [Category C] {ι : C ⥤ CommAl-- Take the affine scheme `Spec T` of `exists_locallyOfFiniteType_forall_factors` for the base-- change of `W` to `k`: every point with values in a comparable ring factors through `t`.let b : Spec (.of k) ⟶ Spec R := specMap (algebraMap R k)- obtain ⟨T, t, -, h_lift⟩ := exists_locallyOfFiniteType_forall_factors (snd W.hom b)+ have : CompactSpace (Limits.pullback W.hom b : Scheme) :=+ QuasiCompact.compactSpace_of_compactSpace (snd W.hom b)+ obtain ⟨T, t, -, h_lift⟩ := exists_locallyOfFiniteType_forall_factors (Limits.pullback W.hom b)obtain ⟨ρ, hρ⟩ : ∃ ρ : CommRingCat.of k ⟶ T, Spec.map ρ = t ≫ snd W.hom b := map_surjective _let : Algebra k T := ρ.hom.toAlgebra-- `t` followed by the first projection is a `T`-point of `W` over `Spec R`.diff --git a/src/Lib/PadicComparison/CrystallineFrobenius.lean b/src/Lib/PadicComparison/CrystallineFrobenius.leanindex 2386b5201f6..a6509b6dc15 100644--- a/src/Lib/PadicComparison/CrystallineFrobenius.lean+++ b/src/Lib/PadicComparison/CrystallineFrobenius.lean@@ -239,7 +239,8 @@ lemma New.Variety.exists_cancels_frobPow_locally {p : ℕ} [ThePrime p] {R : Typ-- `α = 𝔴 T` contains a product of primes `𝔮 l ⊇ α`. A point `β` of `T` in a test sends, on each-- factor, some `𝔮 l` into `(z)`; partition the factors by this `l`: where `z` dies, `β` factors-- through `T ⧸ 𝔮 l`.- obtain ⟨T, t, h_finiteType, lift_pt⟩ := exists_locallyOfFiniteType_forall_factors W.hom+ have : CompactSpace W.left := QuasiCompact.compactSpace_of_compactSpace W.hom+ obtain ⟨T, t, h_finiteType, lift_pt⟩ := exists_locallyOfFiniteType_forall_factors W.lefthave h_noetherian : IsNoetherianRing T :=isLocallyNoetherian_Spec.mp (LocallyOfFiniteType.isLocallyNoetherian (t ≫ W.hom))let α : Ideal T := 𝔴.map (preimage (t ≫ W.hom)).hom