Riemann hypothesis: the Lean proof, cleaned up together
The 2026 Lean proof of the Riemann hypothesis and GRH, machine-checked by others, not refereed, no word from Clay; cleaned up together: more readable, faster to build, the theorems unchanged

| 1 | module |
| 2 | |
| 3 | public import TauCeti.AlgebraicGeometry.RationalPoint.Image |
| 4 | public import Mathlib.RingTheory.RegularLocalRing.Defs |
| 5 | public import Mathlib.RingTheory.SimpleRing.Principal |
| 6 | import Mathlib.Topology.DiscreteSubset |
| 7 | import TauCeti.AlgebraicGeometry.Morphisms.Flat.Basic |
| 8 | import TauCeti.AlgebraicGeometry.Morphisms.Smooth.GeometricallyReduced |
| 9 | import TauCeti.AlgebraicGeometry.Morphisms.Smooth.Locus.Basic |
| 10 | import TauCeti.AlgebraicGeometry.Morphisms.Smooth.StandardSmooth |
| 11 | import TauCeti.AlgebraicGeometry.Scheme.LocalSpectrum |
| 12 | public import Lib.Cohomology.Etale.Basic |
| 13 | public import Lib.General.Geometry.DenseComplexPoints |
| 14 | public import Lib.Shimura.AbelianScheme.Basic |
| 15 | |
| 16 | /-! |
| 17 | # Geometric points, specialisation, separating products and integral abelian varieties |
| 18 | |
| 19 | Let `k` be an algebraically closed field. For schemes and morphisms locally of finite type, points |
| 20 | with values in `k` detect nonempty locally closed sets and images of morphisms, and this is used to |
| 21 | spread properties over commutative group schemes. |
| 22 | Abelian schemes over `k` are shown to be integral, using that smooth morphisms are geometrically |
| 23 | reduced (`TauCeti.AlgebraicGeometry.Smooth.geometricallyReduced`). The file also records that flat |
| 24 | morphisms are injective on stalks. Finally it gives criteria for families of complex points to be |
| 25 | separating over a stalk of the base and on a product of flat schemes. |
| 26 | |
| 27 | ## Main definitions and results |
| 28 | |
| 29 | * `New.exists_point_mem`: a nonempty locally closed set in a scheme |
| 30 | locally of finite type over `k` contains a `k`-point. |
| 31 | * `New.IsDenseFamily.of_fibres`: if the complex points `η i` are dense in `S` and `A ⟶ S` is open |
| 32 | and locally of finite type, a family containing every complex point of `A` over the `η i` is |
| 33 | dense in `A`. |
| 34 | * `New.AddObj.property_of_isOpenImmersion`: take a commutative group scheme (`New.AddObj`) locally |
| 35 | of finite type over `k`. A property induced by a property of ring maps spreads from a nonempty |
| 36 | open part to the whole scheme, by translation. |
| 37 | * `New.AddObj.smoothOfRelativeDimension_of_fibres`: the relative dimension of an abelian scheme can |
| 38 | be read off the fibres through a dense family of points. |
| 39 | * `New.isSeparatingFamily_stalk`: for reduced `A` and dense points of `A` with finitely many images |
| 40 | in `S`, the lifts of those that factor through a stalk of `S` separate the base change of `A` to |
| 41 | that stalk. |
| 42 | * `New.IsSeparatingFamily.prod`: separating points of `B`, paired with dense points of the fibres of |
| 43 | `A` over their images in `S`, separate `A ×_S B`, for `A`, `B` flat and locally of finite type, |
| 44 | `A` reduced, and `S` locally noetherian with dense complex points. |
| 45 | |
| 46 | Notions from other files: |
| 47 | * `New.IsDenseFamily`: the images of a family of complex points are dense. |
| 48 | * `New.IsSeparatingFamily`: the family is dense and the scheme is reduced. |
| 49 | * `New.IsAbelianScheme`: a smooth proper commutative group scheme on which multiplication by every |
| 50 | `m ≠ 0` is surjective. |
| 51 | * `New.translation`: translation x ↦ x + z by a section z of a commutative group scheme. |
| 52 | |
| 53 | ## Relation to the literature |
| 54 | |
| 55 | Known; see `Lib.Shimura.AbelianScheme.IsogenyFlatness` for sources. |
| 56 | -/ |
| 57 | |
| 58 | @[expose] public section |
| 59 | |
| 60 | /-! ## Points over algebraically closed fields -/ |
| 61 | |
| 62 | section GeometricPoints |
| 63 | |
| 64 | open CategoryTheory AlgebraicGeometry MonoidalCategory Scheme Over Limits.pullback Pullback Set |
| 65 | |
| 66 | namespace New |
| 67 | |
| 68 | /-- Let `X` be a scheme over `Spec k`, locally of finite type, with `k` an algebraically closed |
| 69 | field. A nonempty locally closed subset `S` of `X` contains the image of a `k`-point, that is, of a |
| 70 | morphism over `Spec k` from the unit object `𝟙_` (`Spec k` over itself) to `X`. This is |
| 71 | `IsLocallyClosed.exists_rationalPoint_mem` in the category of schemes over `Spec k`. Here |
| 72 | `default` is the unique point of `Spec k`. -/ |
| 73 | lemma exists_point_mem {k : Type*} [Field k] [IsAlgClosed k] (X : Over (Spec (.of k))) |
| 74 | [LocallyOfFiniteType X.hom] {S : Set X.left} (hS : IsLocallyClosed S) (hS_ne : S.Nonempty) : |
| 75 | ∃ x : 𝟙_ (Over (Spec (.of k))) ⟶ X, x.left (default : Spec (.of k)) ∈ S := by |
| 76 | obtain ⟨x, hx_section, hx_mem⟩ := hS.exists_rationalPoint_mem X.hom hS_ne |
| 77 | have hx_default : x (default : Spec (.of k)) ∈ S := by |
| 78 | rwa [Subsingleton.elim (default : Spec (.of k)) (IsLocalRing.closedPoint k)] |
| 79 | exact ⟨homMk x hx_section, hx_default⟩ |
| 80 | |
| 81 | /-- Let `f : A ⟶ S` be open and locally of finite type, and let `η i` be a dense family of |
| 82 | complex points of `S`. If every complex point of `A` over some `η i` is one of the points `ξ z`, |
| 83 | then the `ξ z` have dense images in `A`. -/ |
| 84 | lemma IsDenseFamily.of_fibres {A S : Scheme} {κ Z : Type} {η : κ → (Spec (.of ℂ) ⟶ S)} |
| 85 | (hη : IsDenseFamily η) (f : A ⟶ S) [LocallyOfFiniteType f] (h_open : IsOpenMap f) |
| 86 | {ξ : Z → (Spec (.of ℂ) ⟶ A)} |
| 87 | (h_all : ∀ (i : κ) (y : Spec (.of ℂ) ⟶ A), y ≫ f = η i → ∃ z : Z, ξ z = y) : |
| 88 | IsDenseFamily ξ := by |
| 89 | -- As `f` is open, the points of `A` over the `η i` are dense; so it suffices to see that each |
| 90 | -- of them lies in the closure of the `ξ z`. |
| 91 | refine (hη.preimage h_open).induction (fun x ⟨i, hx⟩ ↦ mem_closure_iff.2 fun U hU hxU ↦ ?_) |
| 92 | isClosed_closure |
| 93 | -- An open neighbourhood `U` of `x` contains a complex point over `η i`, which is some `ξ z`. |
| 94 | let V : A.Opens := ⟨U, hU⟩ |
| 95 | obtain ⟨y, hy⟩ : ∃ y : Spec (.of ℂ) ⟶ V, y ≫ V.ι ≫ f = η i := |
| 96 | (Scheme.Hom.exists_comp_eq_iff_mem_range (V.ι ≫ f) _).2 ⟨⟨x, hxU⟩, hx.symm⟩ |
| 97 | obtain ⟨z, hz⟩ := h_all i (y ≫ V.ι) hy |
| 98 | exact ⟨(y ≫ V.ι) (IsLocalRing.closedPoint ℂ), (y _).property, z, by simp only [hz]⟩ |
| 99 | |
| 100 | /-- Let `X` be a commutative group scheme (`grp`, a `New.AddObj` structure) locally of finite type |
| 101 | over an algebraically closed field `k`, with structure morphism `s`, and let `P` be a property of |
| 102 | morphisms of schemes induced by a property `Q` of ring maps. If a nonempty open subscheme |
| 103 | `i : Y ⟶ X` has `P` over `k`, so does `X`. -/ |
| 104 | lemma AddObj.property_of_isOpenImmersion {k : Type} {X : Scheme} [Field k] [IsAlgClosed k] |
| 105 | (s : X ⟶ Spec (.of k)) [LocallyOfFiniteType s] {P : MorphismProperty Scheme} |
| 106 | {Q : {R S : Type} → [CommRing R] → [CommRing S] → (R →+* S) → Prop} [HasRingHomProperty P Q] |
| 107 | (grp : AddObj (Over.mk s)) {Y : Scheme} (i : Y ⟶ X) [IsOpenImmersion i] (hY : Nonempty Y) |
| 108 | (hP : P (i ≫ s)) : P s := by |
| 109 | -- The translates of `i` (for the group structure `grp`) cover `X`, each has `P` over `k`, and |
| 110 | -- `P` is local on the source. |
| 111 | let Pt : Type := 𝟙_ (Over (Spec (.of k))) ⟶ Over.mk s |
| 112 | let c : Spec (.of k) := default |
| 113 | have : LocallyOfFiniteType (Over.mk s).hom := inferInstanceAs (LocallyOfFiniteType s) |
| 114 | obtain ⟨y, a, ha⟩ : ∃ y : Pt, y.left c ∈ range i := |
| 115 | exists_point_mem (Over.mk s) i.isLocallyClosed_range (range_nonempty i) |
| 116 | let t (z : Pt) : Y ⟶ X := i ≫ (translation z).left |
| 117 | let U : X.Opens := ⨆ z : Pt, (t z).opensRange |
| 118 | have h_cover (x : X) : ∃ (z : Pt) (b : Y), t z b = x := by |
| 119 | suffices x ∈ U by simpa [U] |
| 120 | -- Otherwise the closed complement of `U` has a `k`-point `z`; but translation by `z - y` |
| 121 | -- carries `y`, which lies in the image of `i`, to `z`. |
| 122 | by_contra hx |
| 123 | obtain ⟨z, hz⟩ : ∃ z : Pt, z.left c ∈ (U : Set X)ᶜ := |
| 124 | exists_point_mem (Over.mk s) U.isOpen.isClosed_compl.isLocallyClosed ⟨x, hx⟩ |
| 125 | refine hz (TopologicalSpace.Opens.mem_iSup.2 ⟨z - y, a, ?_⟩) |
| 126 | have h_yz : y ≫ translation (z - y) = z := by simp [Pt, comp_translation] |
| 127 | change (translation (z - y)).left (i a) = z.left c |
| 128 | rw [ha, ← Hom.comp_apply, ← comp_left, h_yz] |
| 129 | refine IsZariskiLocalAtSource.of_openCover (.mkOfCovers _ _ t h_cover) fun z ↦ ?_ |
| 130 | -- Translations are morphisms over `k`. |
| 131 | change P ((i ≫ (translation z).left) ≫ (Over.mk s).hom) |
| 132 | rwa [Category.assoc, (translation z).w] |
| 133 | |
| 134 | /-- Let `f : X ⟶ S` map the affine open `V` into the affine open `U`. If the ring map |
| 135 | `Γ(S, U) ⟶ Γ(X, V)` is standard smooth of relative dimension `n`, then `Spec Γ(X, V) ⟶ S` is smooth |
| 136 | of relative dimension `n`. -/ |
| 137 | lemma smoothOfRelativeDimension_fromSpec_comp {X S : Scheme} {f : X ⟶ S} {U : S.Opens} |
| 138 | {V : X.Opens} (hU : IsAffineOpen U) (hV : IsAffineOpen V) (hVU : V ≤ f ⁻¹ᵁ U) {n : ℕ} |
| 139 | (hn : (f.appLE U V hVU).hom.IsStandardSmoothOfRelativeDimension n) : |
| 140 | SmoothOfRelativeDimension n (hV.fromSpec ≫ f) := by |
| 141 | rw [← hU.SpecMap_appLE_fromSpec f hV hVU] |
| 142 | have : SmoothOfRelativeDimension n (Spec.map (f.appLE U V hVU)) := HasRingHomProperty.Spec_iff.2 |
| 143 | (RingHom.locally_of RingHom.isStandardSmoothOfRelativeDimension_respectsIso _ hn) |
| 144 | -- The open immersion `hU.fromSpec` has relative dimension `0`. |
| 145 | exact smoothOfRelativeDimension_comp n 0 (Spec.map (f.appLE U V hVU)) hU.fromSpec |
| 146 | |
| 147 | /-- Let `A` be an abelian scheme over `S` (`New.IsAbelianScheme`) with complex points `y i` over |
| 148 | `η i` whose images are dense in `A`. If `g` is the only possible relative dimension of each fibre |
| 149 | over `η i`, then `A` is smooth of relative dimension `g` over `S`. -/ |
| 150 | lemma AddObj.smoothOfRelativeDimension_of_fibres {S : Scheme} {κ : Type} {g : ℕ} {A : Over S} |
| 151 | [IsAbelianScheme A] {η : κ → (Spec (.of ℂ) ⟶ S)} {y : ∀ i : κ, Over.mk (η i) ⟶ A} |
| 152 | (hy : IsDenseFamily fun i : κ ↦ (y i).left) |
| 153 | (h_dim : ∀ (i : κ) (n : ℕ), SmoothOfRelativeDimension n (snd A.hom (η i)) → n = g) : |
| 154 | SmoothOfRelativeDimension g A.hom := by |
| 155 | -- Around each `x` there is an affine chart `V`, standard smooth of some relative dimension `n`. |
| 156 | -- It contains some `y i`, so it gives a nonempty open part of the fibre over `η i` that has |
| 157 | -- dimension `n`; by `property_of_isOpenImmersion` the whole fibre has dimension `n`, and `n = g` |
| 158 | -- by `h_dim`. |
| 159 | refine ⟨fun x ↦ ?_⟩ |
| 160 | obtain ⟨n, U, hU, V, hV, hxV, hVU, hn⟩ := |
| 161 | A.hom.exists_isStandardSmoothOfRelativeDimension_of_smooth x |
| 162 | let c : Spec (.of ℂ) := IsLocalRing.closedPoint ℂ |
| 163 | obtain ⟨i, hi⟩ : ∃ i : κ, (y i).left c ∈ V := hy.exists_mem_open V.isOpen ⟨x, hxV⟩ |
| 164 | suffices h_fibre : SmoothOfRelativeDimension n (snd A.hom (η i)) by |
| 165 | obtain rfl : n = g := h_dim i n h_fibre |
| 166 | exact ⟨U, hU, V, hV, hxV, hVU, hn⟩ |
| 167 | -- Let `j` be the inclusion of the open part of the fibre that lies over `V`. |
| 168 | let π : Limits.pullback A.hom (η i) ⟶ A.left := fst A.hom (η i) |
| 169 | let j : Limits.pullback hV.fromSpec π ⟶ Limits.pullback A.hom (η i) := snd hV.fromSpec π |
| 170 | -- It contains the point `p` of the fibre given by `y i`. |
| 171 | let p : Spec (.of ℂ) ⟶ Limits.pullback A.hom (η i) := lift (y i).left (𝟙 _) (y i).w |
| 172 | obtain ⟨p', -⟩ : p c ∈ range j := by |
| 173 | rwa [range_snd, mem_preimage, ← Hom.comp_apply, show p ≫ π = (y i).left from lift_fst _ _ _, |
| 174 | hV.range_fromSpec] |
| 175 | -- `pullbackAddObj` is the group structure on the fibre. |
| 176 | refine (pullbackAddObj (η i)).property_of_isOpenImmersion (snd A.hom (η i)) j ⟨p'⟩ ?_ |
| 177 | -- This open part of the fibre is the base change of the chart along `η i`. |
| 178 | have h_square : IsPullback _ (j ≫ snd A.hom (η i)) (hV.fromSpec ≫ A.hom) (η i) := |
| 179 | (IsPullback.of_hasPullback hV.fromSpec π).paste_vert (IsPullback.of_hasPullback A.hom (η i)) |
| 180 | exact (smoothOfRelativeDimension_isStableUnderBaseChange n).of_isPullback h_square |
| 181 | (smoothOfRelativeDimension_fromSpec_comp hU hV hVU hn) |
| 182 | |
| 183 | end New |
| 184 | |
| 185 | end GeometricPoints |
| 186 | |
| 187 | /-! |
| 188 | ## Geometric reducedness of smooth morphisms and integral abelian varieties |
| 189 | |
| 190 | An étale algebra over a domain is reduced (`New.Variety.isReduced_of_etale`), and an |
| 191 | abelian scheme over an algebraically closed field is integral. Here `New.IsAbelianScheme` asks a |
| 192 | commutative group scheme to be smooth, proper and divisible (multiplication by each `m ≠ 0` is |
| 193 | onto); divisibility takes the place of the usual connectedness of the fibres, and the instance |
| 194 | recovers it. |
| 195 | -/ |
| 196 | |
| 197 | section AbelianIntegral |
| 198 | |
| 199 | open CategoryTheory AlgebraicGeometry Algebra MorphismProperty TensorProduct Set LocallyOfFiniteType |
| 200 | |
| 201 | namespace New.Variety |
| 202 | |
| 203 | /-- An étale algebra over an integral domain is reduced. Étaleness of `B` over the domain `A` is |
| 204 | an explicit hypothesis, from which the algebra structure is inferred. -/ |
| 205 | @[stacks 033B "for an étale algebra over a domain"] |
| 206 | lemma isReduced_of_etale {A B : Type*} [CommRing A] [CommRing B] [IsDomain A] {alg : Algebra A B} |
| 207 | (h_etale : Algebra.Etale A B) : IsReduced B := by |
| 208 | -- Every étale algebra is smooth, and a smooth algebra over a reduced ring is reduced. |
| 209 | exact TauCeti.isReduced_of_smooth A B |
| 210 | |
| 211 | /-- An abelian scheme (`New.IsAbelianScheme`: smooth, proper and divisible) over an algebraically |
| 212 | closed field is integral. -/ |
| 213 | instance {k : Type} [Field k] [IsAlgClosed k] (A : Over (Spec ⟨k⟩)) [hA : IsAbelianScheme A] : |
| 214 | AlgebraicGeometry.IsIntegral A.left := by |
| 215 | -- The `k`-points act by translation on the finite set of irreducible components, so `n • x` fixes |
| 216 | -- every component, where `n = G.index` is the index of the kernel. As multiplication by `n` is |
| 217 | -- onto, the component of the origin is everything. |
| 218 | have : IsReduced A.left := GeometricallyReduced.isReduced_of_flat_of_isLocallyNoetherian A.hom |
| 219 | have : IsNoetherian A.left := |
| 220 | { isLocallyNoetherian A.hom, compactSpace_of_universallyClosed A.hom with } |
| 221 | have := (finite_irreducibleComponents_of_isNoetherian (X := A.left)).to_subtype |
| 222 | -- Translation by a `k`-point is a homeomorphism, so it acts on the irreducible components. |
| 223 | let P : Type := MonoidalCategoryStruct.tensorUnit (Over (Spec ⟨k⟩)) ⟶ A |
| 224 | let act : AddAction P (irreducibleComponents A.left) := |
| 225 | { vadd g C := ⟨(translation g).left ⁻¹' C, preimage_mem_irreducibleComponents C.prop |
| 226 | (translation g).left.isOpenEmbedding (by simp [C.prop.1.nonempty, Set.inter_univ])⟩ |
| 227 | zero_vadd := by simp [HVAdd.hVAdd, preimage] |
| 228 | add_vadd := by simp [P, HVAdd.hVAdd, preimage, ← Scheme.Hom.comp_apply, ← Over.comp_left, |
| 229 | translation_add] } |
| 230 | let G : AddSubgroup P := (AddAction.toPermHom P (irreducibleComponents A.left)).ker |
| 231 | let pt : Spec ⟨k⟩ := default |
| 232 | let C : irreducibleComponents A.left := |
| 233 | ⟨irreducibleComponent ((0 : P).left pt), irreducibleComponent_mem_irreducibleComponents _⟩ |
| 234 | have h_univ : C.val = univ := by |
| 235 | by_contra h_ne |
| 236 | -- Otherwise some `k`-point `x` has `n • x` outside `C`. |
| 237 | have h_onto : Surjective (G.index • 𝟙 A).left := hA.nsmul_surjective _ G.index_ne_zero_of_finite |
| 238 | obtain ⟨x, hx⟩ : ∃ x : P, x.left pt ∈ (G.index • 𝟙 A).left ⁻¹' C.valᶜ := exists_point_mem A |
| 239 | (isClosed_irreducibleComponent.isOpen_compl.preimage (by fun_prop)).isLocallyClosed |
| 240 | ((nonempty_compl.mpr h_ne).preimage h_onto.surj) |
| 241 | -- But `n • x` is the translate of the origin by `n • x`, which preserves `C`. |
| 242 | have h_ker : AddAction.toPermHom P _ (G.index • x) = 0 := G.nsmul_index_mem x |
| 243 | have h_fix : (translation (G.index • x)).left ⁻¹' C.val = C.val := |
| 244 | congrArg Subtype.val (DFunLike.congr_fun (congrArg Additive.toMul h_ker) C) |
| 245 | have h_mem : ((0 : P) ≫ translation (G.index • x)).left pt ∈ C.val := |
| 246 | h_fix.symm.subset mem_irreducibleComponent |
| 247 | have h_transl : (0 : P) ≫ translation (G.index • x) = x ≫ (G.index • 𝟙 A) := by |
| 248 | simp [comp_add, comp_nsmul] |
| 249 | exact hx (by rwa [h_transl] at h_mem) |
| 250 | have : IrreducibleSpace A.left := |
| 251 | (irreducibleSpace_def _).mpr (h_univ.subst isIrreducible_irreducibleComponent) |
| 252 | exact isIntegral_of_irreducibleSpace_of_isReduced _ |
| 253 | |
| 254 | end New.Variety |
| 255 | |
| 256 | end AbelianIntegral |
| 257 | |
| 258 | /-! |
| 259 | ## Specialisation to geometric points and flat morphisms on stalks |
| 260 | |
| 261 | `New.Variety.AllSpecializeTo S Q` says that every point of `S` specialises to a geometric point with |
| 262 | the property `Q`. |
| 263 | -/ |
| 264 | |
| 265 | section Specialisation |
| 266 | |
| 267 | open CategoryTheory AlgebraicGeometry Scheme Flat |
| 268 | |
| 269 | /-- Every point of `S` specialises to the image of the closed point under some `t : Spec k ⟶ S` with |
| 270 | `k` algebraically closed and `Q t`. -/ |
| 271 | def New.Variety.AllSpecializeTo (S : Scheme) |
| 272 | (Q : ∀ {k : Type} [Field k], (Spec ⟨k⟩ ⟶ S) → Prop) : Prop := |
| 273 | ∀ s : S, ∃ (k : Type) (_ : Field k) (_ : IsAlgClosed k) (t : Spec ⟨k⟩ ⟶ S), |
| 274 | s ⤳ t (IsLocalRing.closedPoint k) ∧ Q t |
| 275 | |
| 276 | /-- For a point `s` of a scheme `Z`, the morphism from the spectrum of the stalk at `s` to `Z` is |
| 277 | flat. -/ |
| 278 | instance {Z : Scheme} (s : Z) : Flat (fromSpecStalk Z s) := |
| 279 | -- Every stalk map of `Spec 𝒪_{Z,s} ⟶ Z` is an isomorphism, hence flat. |
| 280 | Flat.of_stalkMap _ fun _ ↦ |
| 281 | RingHom.Flat.of_bijective (ConcreteCategory.bijective_of_isIso _) |
| 282 | |
| 283 | /-- A flat morphism of schemes is injective on stalks. -/ |
| 284 | lemma New.stalkMap_injective_of_flat {X Y : Scheme} (q : X ⟶ Y) [Flat q] (x : X) : |
| 285 | Function.Injective (q.stalkMap x) := |
| 286 | -- The map of stalks is flat and local, hence faithfully flat, hence injective. |
| 287 | (q.faithfullyFlat_stalkMap x (Flat.stalkMap q x)).injective |
| 288 | |
| 289 | end Specialisation |
| 290 | |
| 291 | /-! |
| 292 | ## Separating families of points over a stalk and on products of flat schemes |
| 293 | |
| 294 | A family of complex points of a scheme is separating (`New.IsSeparatingFamily`) if the scheme is |
| 295 | reduced and the points are dense (`New.IsDenseFamily`); regular functions are then determined by |
| 296 | their values there. |
| 297 | -/ |
| 298 | |
| 299 | namespace New |
| 300 | |
| 301 | open CategoryTheory AlgebraicGeometry Limits pullback Set Scheme Spec Pullback Over PointFn Filter |
| 302 | |
| 303 | /-- A flat morphism that is surjective on stalks induces bijections on stalks. -/ |
| 304 | lemma stalkMap_bijective_of_flat {X Y : Scheme} (q : X ⟶ Y) [Flat q] [SurjectiveOnStalks q] |
| 305 | (x : X) : Function.Bijective (q.stalkMap x) := |
| 306 | ⟨stalkMap_injective_of_flat q x, q.stalkMap_surjective x⟩ |
| 307 | |
| 308 | /-- The base change of a reduced scheme along a flat preimmersion is reduced: its stalks are those |
| 309 | of the scheme. -/ |
| 310 | lemma Variety.isReduced_pullback_of_flat {X Y T : Scheme} (f : X ⟶ T) (g : Y ⟶ T) |
| 311 | [IsReduced X] [Flat g] [IsPreimmersion g] : IsReduced (pullback f g) := by |
| 312 | have (x : ↥(pullback f g)) : IsReduced ((pullback f g).presheaf.stalk x) := by |
| 313 | let e := RingEquiv.ofBijective ((fst f g).stalkMap x).hom |
| 314 | (stalkMap_bijective_of_flat (fst f g) x) |
| 315 | exact isReduced_of_injective e.symm e.symm.injective |
| 316 | exact isReduced_of_isReduced_stalk _ |
| 317 | |
| 318 | /-- The points of a finite set `C` that lie near `s` specialise to `s`. -/ |
| 319 | lemma eventually_specializes_of_finite {T : Type*} [TopologicalSpace T] {C : Set T} |
| 320 | (hC : C.Finite) (s : T) : ∀ᶠ t in nhds s, t ∈ C → t ⤳ s := by |
| 321 | have h_disjoint : Disjoint (nhdsWithin s C) cofinite := |
| 322 | disjoint_cofinite_right.mpr ⟨C, self_mem_nhdsWithin, hC⟩ |
| 323 | exact eventually_nhdsWithin_iff.mp h_disjoint.eventually_nhdsWithin_specializes |
| 324 | |
| 325 | /-- Let `A` be reduced, `z : A ⟶ S`, `s` a point of `S`, and `x w` complex points of `A` |
| 326 | with dense images and with finitely many composites `x w ≫ z`. Consider the pairs of an index `w` |
| 327 | and a map `ψ` from the stalk `𝒪_{S,s}` to `ℂ` such that `x w ≫ z` factors through `Spec 𝒪_{S,s}` |
| 328 | via `Spec.map ψ`. The points `(x w, Spec.map ψ)` of `A ×_S Spec 𝒪_{S,s}` form a separating family: |
| 329 | this scheme is reduced and the images of these points are dense. -/ |
| 330 | lemma isSeparatingFamily_stalk {S : Scheme} {W : Type} {A : Scheme} {z : A ⟶ S} |
| 331 | {x : W → (Spec (.of ℂ) ⟶ A)} [IsReduced A] (h_dense : IsDenseFamily x) |
| 332 | (h_finite : (range fun w : W ↦ x w ≫ z).Finite) (s : S) : |
| 333 | IsSeparatingFamily |
| 334 | (Z := Σ' (w : W) (ψ : S.presheaf.stalk s ⟶ .of ℂ), Spec.map ψ ≫ S.fromSpecStalk s = x w ≫ z) |
| 335 | fun ⟨w, ψ, h_factor⟩ ↦ (pullback.lift (x w) (Spec.map ψ) h_factor.symm : |
| 336 | Spec (.of ℂ) ⟶ pullback z (S.fromSpecStalk s)) := by |
| 337 | let P : Scheme := pullback z (S.fromSpecStalk s) |
| 338 | let π : P ⟶ A := fst z (S.fromSpecStalk s) |
| 339 | refine ⟨Variety.isReduced_pullback_of_flat z (S.fromSpecStalk s), |
| 340 | π.isEmbedding.dense_iff.2 fun y ↦ ?_⟩ |
| 341 | -- Of the finitely many images in `S`, only those that specialise to `s` lie near `s`, and so |
| 342 | -- near `z (π y)`, which specialises to `s`. |
| 343 | let c : Spec (.of ℂ) := IsLocalRing.closedPoint ℂ |
| 344 | let C : Set S := range fun w : W ↦ (x w ≫ z) c |
| 345 | have hC : C.Finite := (h_finite.image fun p ↦ p c).subset (by simp [C, ← range_comp']) |
| 346 | have h_spec : z (π y) ⤳ s := by |
| 347 | simpa [range_fromSpecStalk] using (range_fst z (S.fromSpecStalk s)).subset (mem_range_self y) |
| 348 | have h_near : ∀ᶠ a in nhds (π y), z a ∈ C → z a ⤳ s := (z.continuous.tendsto (π y)).eventually |
| 349 | ((eventually_specializes_of_finite hC s).filter_mono (specializes_iff_nhds.1 h_spec)) |
| 350 | -- So the `x w` whose image specialises to `s` accumulate at `π y`, and these lift. |
| 351 | refine (((mem_closure_iff_frequently.1 (h_dense (π y))).and_eventually h_near).mono |
| 352 | ?_).mem_closure |
| 353 | rintro _ ⟨⟨w, rfl⟩, hw⟩ |
| 354 | have hw_spec : (x w ≫ z) c ⤳ s := hw ⟨w, rfl⟩ |
| 355 | let ψ : S.presheaf.stalk s ⟶ .of ℂ := |
| 356 | S.presheaf.stalkSpecializes hw_spec ≫ stalkClosedPointTo (x w ≫ z) |
| 357 | have hψ : Spec.map ψ ≫ S.fromSpecStalk s = x w ≫ z := |
| 358 | comp_fromSpecStalk_of_specializes (x w ≫ z) hw_spec |
| 359 | exact ⟨pullback.lift (x w) (Spec.map ψ) hψ.symm c, ⟨⟨w, ψ, hψ⟩, rfl⟩, |
| 360 | by rw [← Hom.comp_apply, pullback.lift_fst]⟩ |
| 361 | |
| 362 | /-- Let `S` be reduced with finitely many complex points `ξ i` whose images are dense. An element |
| 363 | `a` of the stalk at `x` is zero if `ψ a = 0` for every map `ψ` from the stalk to `ℂ` such that |
| 364 | some `ξ i` factors through the spectrum of the stalk via `Spec.map ψ`. -/ |
| 365 | lemma stalk_eq_zero_of_forall_factor {S : Scheme} [IsReduced S] {J : Type} [Finite J] |
| 366 | {ξ : J → (Spec (.of ℂ) ⟶ S)} (hξ : IsDenseFamily ξ) {x : S} (a : S.presheaf.stalk x) |
| 367 | (h_vanish : ∀ (i : J) (ψ : S.presheaf.stalk x ⟶ .of ℂ), |
| 368 | Spec.map ψ ≫ S.fromSpecStalk x = ξ i → ψ a = 0) : |
| 369 | a = 0 := by |
| 370 | -- View `a` as a regular function `f` on the ring-valued points (`PointFn`) of |
| 371 | -- `S ×_S Spec 𝒪_{S,x}`, where the lifts of the `ξ i` separate. It agrees at these lifts with the |
| 372 | -- function of the zero section, hence also at the tautological point `inv q`, where it is `a`. |
| 373 | let q : pullback (𝟙 S) (S.fromSpecStalk x) ⟶ Spec (S.presheaf.stalk x) := snd _ _ |
| 374 | let f : PointFn (pullback (𝟙 S) (S.fromSpecStalk x)) := fun _ y ↦ preimage (y ≫ q) a |
| 375 | have hf : IsRegularOn f ⊤ := by simp [f, IsRegularOn] |
| 376 | have h_eq : f _ (inv q) = ofSection (U := ⊤) 0 _ (inv q) := by |
| 377 | refine (isSeparatingFamily_stalk (z := 𝟙 S) hξ (toFinite _) x).pointFn_ext hf |
| 378 | (isRegularOn_ofSection 0) (fun ⟨i, ψ, hψ⟩ _ ↦ ?_) _ (inv q) landsIn_top |
| 379 | -- At the lift given by `ψ` the function `f` takes the value `ψ a`. |
| 380 | simpa [f, q, pullback.lift_snd] using h_vanish i ψ hψ |
| 381 | simpa [f] using h_eq |
| 382 | |
| 383 | /-- The form of `New.stalk_eq_zero_of_forall_factor` in which the index `i`, the map `ψ` from the |
| 384 | stalk to `ℂ` and the factorisation of `ξ i` via `Spec.map ψ` are bundled into one triple `p` (so |
| 385 | that `p.snd.fst` is `ψ`): for `S` reduced with finitely many dense complex points `ξ i`, an element |
| 386 | `a` of the stalk at `x` is zero if `ψ a = 0` for every such triple. -/ |
| 387 | lemma stalk_eq_zero_of_dense {S : Scheme} [IsReduced S] {J : Type} [Finite J] |
| 388 | {ξ : J → (Spec (.of ℂ) ⟶ S)} (hξ : IsDenseFamily ξ) {x : S} (a : S.presheaf.stalk x) |
| 389 | (h_vanish : ∀ p : Σ' (i : J) (ψ : S.presheaf.stalk x ⟶ .of ℂ), |
| 390 | Spec.map ψ ≫ S.fromSpecStalk x = ξ i, p.snd.fst a = 0) : a = 0 := |
| 391 | stalk_eq_zero_of_forall_factor hξ a fun i ψ hψ ↦ h_vanish ⟨i, ψ, hψ⟩ |
| 392 | |
| 393 | open MonoidalCategory IsSchemeTheoreticallyDominant LocallyOfFiniteType CartesianMonoidalCategory |
| 394 | |
| 395 | /-- If complex points are dense in a scheme, each stalk has characteristic zero. -/ |
| 396 | lemma IsDenseFamily.charZero_stalk {S : Scheme} {J : Type} |
| 397 | {ξ : J → (Spec (.of ℂ) ⟶ S)} (hξ : IsDenseFamily ξ) (s : S) : |
| 398 | CharZero (S.presheaf.stalk s) := by |
| 399 | refine ⟨fun n m h_eq ↦ ?_⟩ |
| 400 | -- The two constants agree on an open neighbourhood of `s`. |
| 401 | have h_germ : S.presheaf.Γgerm s (n : Γ(S, ⊤)) = S.presheaf.Γgerm s (m : Γ(S, ⊤)) := by |
| 402 | simpa using h_eq |
| 403 | obtain ⟨U, hsU, i, j, hU⟩ := S.presheaf.germ_eq s (by simp) (by simp) _ _ h_germ |
| 404 | have h_nat : (n : Γ(S, U)) = m := by simpa using hU |
| 405 | -- Evaluate at a complex point of that neighbourhood. |
| 406 | obtain ⟨k, hk⟩ := hξ.exists_mem_open U.isOpen ⟨s, hsU⟩ |
| 407 | let ev := evalSection (ξ k) (landsIn_iff_mem.mpr hk) |
| 408 | exact Nat.cast_injective (R := ℂ) (by simpa using congrArg ev.hom h_nat) |
| 409 | |
| 410 | /-- A flat, locally finitely presented morphism from a reduced scheme to a scheme with dense |
| 411 | complex points has dense smooth locus. -/ |
| 412 | lemma dense_smoothLocus_of_isDenseFamily {S : Scheme} {J : Type} |
| 413 | {ξ : J → (Spec (.of ℂ) ⟶ S)} (hξ : IsDenseFamily ξ) {X : Scheme} |
| 414 | (f : X ⟶ S) [LocallyOfFinitePresentation f] [Flat f] [IsReduced X] : |
| 415 | Dense (f.smoothLocus : Set X) := by |
| 416 | -- At a generic point `a` of `X` the stalks of `X` and `S` are fields. The second has |
| 417 | -- characteristic zero and is perfect, so the extension is formally smooth. |
| 418 | refine (dense_iff_closure_eq.2 genericPoints.closure).mono fun a ha ↦ ?_ |
| 419 | have hX : IsField (X.presheaf.stalk a) := |
| 420 | isField_stalk_of_closure_mem_irreducibleComponents _ a ha |
| 421 | have hS : IsField (S.presheaf.stalk (f a)) := |
| 422 | IsLocalHom.isField (stalkMap_injective_of_flat f a) hX |
| 423 | let : Field (X.presheaf.stalk a) := hX.toField |
| 424 | let : Field (S.presheaf.stalk (f a)) := hS.toField |
| 425 | have : CharZero (S.presheaf.stalk (f a)) := hξ.charZero_stalk (f a) |
| 426 | have h_ft : (f.stalkMap a).hom.EssFiniteType := LocallyOfFiniteType.stalkMap f a |
| 427 | algebraize [(f.stalkMap a).hom] |
| 428 | exact Algebra.FormallySmooth.of_perfectField |
| 429 | |
| 430 | /-- Let S be locally noetherian with dense complex points. Let A and B be flat and |
| 431 | locally of finite type over S, with A reduced. Let η_w be complex |
| 432 | points of S, and let y_w be complex points of B over η_w that separate B, meaning B is reduced and |
| 433 | the images of the y_w are dense. Suppose that for each w the complex points e_w(v) of A over η_w |
| 434 | have dense image in the fibre A ×_S Spec ℂ over η_w. Then the complex points (e_w(v), y_w) separate |
| 435 | A ×_S B: it is reduced and their images are dense (`New.IsSeparatingFamily`). -/ |
| 436 | lemma IsSeparatingFamily.prod {S : Scheme} {A B : Over S} {V W J : Type} |
| 437 | {ξ : J → (Spec (.of ℂ) ⟶ S)} {η : W → (Spec (.of ℂ) ⟶ S)} [LocallyOfFiniteType A.hom] |
| 438 | [LocallyOfFiniteType B.hom] [IsLocallyNoetherian S] [Flat A.hom] [Flat B.hom] |
| 439 | {y : ∀ w : W, Over.mk (η w) ⟶ B} {e : ∀ w : W, V → (Over.mk (η w) ⟶ A)} |
| 440 | (hy : IsSeparatingFamily fun w : W ↦ (y w).left) (hξ : IsDenseFamily ξ) |
| 441 | (h_red : IsReduced A.left) |
| 442 | (he : ∀ w : W, IsDenseFamily fun v : V ↦ |
| 443 | (pullback.lift (e w v).left (𝟙 (Spec (.of ℂ))) (e w v).w : |
| 444 | Spec (.of ℂ) ⟶ pullback A.hom (η w))) : |
| 445 | IsSeparatingFamily fun ((w, v) : W × V) ↦ |
| 446 | ((CartesianMonoidalCategory.lift (e w v) (y w)).left : Spec (.of ℂ) ⟶ (A ⊗ B).left) := by |
| 447 | obtain ⟨hB_red : IsReduced B.left, hB_dense⟩ := hy |
| 448 | have : IsLocallyNoetherian A.left := isLocallyNoetherian A.hom |
| 449 | have : IsLocallyNoetherian B.left := isLocallyNoetherian B.hom |
| 450 | -- The smooth locus of `A` over `S`, with inclusion `j`, is dense. |
| 451 | let j : A.hom.smoothLocus.toScheme ⟶ A.left := A.hom.smoothLocus.ι |
| 452 | have : IsDominant j := ⟨(dense_smoothLocus_of_isDenseFamily hξ A.hom).denseRange_subtypeVal⟩ |
| 453 | have : IsSchemeTheoreticallyDominant j := of_isDominant j |
| 454 | -- Hence `A ×_S B` is reduced: the flat base change `j'` of `j` is scheme-theoretically dominant, |
| 455 | -- and its source is smooth over the reduced `B`. |
| 456 | let j' : pullback (j ≫ A.hom) B.hom ⟶ pullback A.hom B.hom := |
| 457 | (pullbackRightPullbackFstIso A.hom B.hom j).inv ≫ snd j (fst A.hom B.hom) |
| 458 | refine ⟨isReduced j', .of_closure ?_⟩ |
| 459 | -- The points of `A ⊗ B` over some `y w` are dense, as `A` is universally open over `S`. Such a |
| 460 | -- point comes from the fibre of `A` at `η w`, where the `e w v` are dense. |
| 461 | refine (hB_dense.preimage (pullback.snd A.hom B.hom).isOpenMap).mono ?_ |
| 462 | rintro t ⟨w, hw⟩ |
| 463 | have ht : pullback.snd A.hom B.hom t ∈ range (y w).left := ⟨_, hw⟩ |
| 464 | obtain ⟨u, rfl⟩ : t ∈ range (A ◁ y w).left := by simpa [range_map, whiskerLeft_left] using ht |
| 465 | refine map_mem_closure (by fun_prop) (he w u) (forall_mem_range.2 fun v ↦ ⟨(w, v), ?_⟩) |
| 466 | -- The map `A ◁ y w` from the fibre sends `(e w v, 𝟙)` to `(e w v, y w)`. |
| 467 | have h_lift : CartesianMonoidalCategory.lift (e w v) (𝟙 _) ≫ A ◁ y w = |
| 468 | CartesianMonoidalCategory.lift (e w v) (y w) := by simp |
| 469 | exact congrArg (fun m : Over.mk (η w) ⟶ A ⊗ B ↦ m.left (IsLocalRing.closedPoint ℂ)) h_lift.symm |
| 470 | |
| 471 | end New |