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 Mathlib.RingTheory.RegularLocalRing.Defs |
| 4 | import Mathlib.Algebra.GroupWithZero.Submonoid.CancelMulZero |
| 5 | import Mathlib.AlgebraicGeometry.Modules.Sheaf |
| 6 | import Mathlib.AlgebraicGeometry.ZariskisMainTheorem |
| 7 | import Mathlib.CategoryTheory.ExtremalEpi |
| 8 | import Mathlib.RingTheory.Artinian.Instances |
| 9 | import Mathlib.RingTheory.Etale.Weakly |
| 10 | import Mathlib.RingTheory.Finiteness.ModuleFinitePresentation |
| 11 | import Mathlib.RingTheory.PicardGroup |
| 12 | import Mathlib.Topology.Baire.BaireMeasurable |
| 13 | import TauCeti.AlgebraicGeometry.Morphisms.Smooth.StandardSmooth |
| 14 | import TauCeti.Analysis.Analytic.Uniqueness |
| 15 | public import Lib.LocalGL.Green.FaithfulCharacter |
| 16 | public import Lib.Shimura.Uniformisation.HolomorphicFamilies |
| 17 | public import Lib.Cohomology.Etale.Basic |
| 18 | public import Lib.General.Geometry.DenseComplexPoints |
| 19 | import Lib.General.Algebra.ComplexEmbeddings |
| 20 | import Lib.General.Geometry.GeometricPoints |
| 21 | import Lib.General.Geometry.PointsOfProperSchemes |
| 22 | import Lib.PadicComparison.Descent.TestCategory |
| 23 | |
| 24 | /-! |
| 25 | # Complex points over countable rings, Zariski generic members and Galois coverings |
| 26 | |
| 27 | This file collects tools for passing between points of schemes over a countable ring and complex |
| 28 | points, and for building Galois coverings from complex points: Zariski generic members of |
| 29 | holomorphic families, reduced closures of families of complex points, and criteria for coverings |
| 30 | to be étale or smooth. |
| 31 | |
| 32 | ## Main definitions and results |
| 33 | |
| 34 | * `New.Variety.exists_generic_member`: if `X` is locally of finite type over a countable ring and |
| 35 | `φ` is a holomorphic family of complex points of `X` on a connected open set `U`, some `φ b` |
| 36 | specialises, in the Zariski topology, to every `φ c`. |
| 37 | * `New.Variety.ReducedClosure`: the reduced closure in a finite product of schemes over `S` of a |
| 38 | family of complex points; `New.Variety.ReducedClosure.exists_lift` constructs maps between two |
| 39 | such closures. |
| 40 | * `New.Variety.isGaloisCovering_of_complex_points`: over a countable domain whose maps to fields of |
| 41 | characteristic 0 are injective, a surjective map from a proper to a separated scheme, with a |
| 42 | finite group acting simply transitively on its fibres of complex points, is a Galois covering. |
| 43 | * `New.Variety.IsGaloisCovering.smoothOfRelativeDimension_baseChange`: for a Galois covering |
| 44 | `W → Z` over a domain `R`, with `W` proper and reduced and `Z` separated and smooth, the base |
| 45 | change of `W` to a field of characteristic 0 containing `R` is smooth. |
| 46 | |
| 47 | Notions from other files: |
| 48 | * `New.exists_ringHom_complex_extend` (`Lib.General.Algebra.ComplexEmbeddings`): an embedding of a |
| 49 | countable ring into ℂ extends along an embedding into a field of cardinality at most that of ℂ. |
| 50 | * `New.Variety.IsGaloisCovering`: Δ is a finite group of automorphisms of W over c : W → Z, c is |
| 51 | surjective, and Δ acts simply transitively on the fibres of c on points with values in fields of |
| 52 | characteristic 0. |
| 53 | * `New.LandsIn t U`: the morphism t lands in the open U, that is, the preimage of U is everything. |
| 54 | * `New.HolomorphicAt φ w`: for every function regular on an open set containing φ w, the nearby |
| 55 | members of the family φ land in that open set and the function pulls back to one analytic at w. |
| 56 | The parameter space is a finite-dimensional complex normed space (`FinComplexSpace`). |
| 57 | * `New.IsSeparatingFamily ξ`: the scheme is reduced and the complex points ξ z are dense in it. |
| 58 | |
| 59 | ## Relation to the literature |
| 60 | |
| 61 | The étaleness criterion is that of Chase–Harrison–Rosenberg. |
| 62 | -/ |
| 63 | |
| 64 | @[expose] public section |
| 65 | |
| 66 | noncomputable section |
| 67 | |
| 68 | namespace New.Variety |
| 69 | |
| 70 | /-! |
| 71 | ## Zariski generic members of holomorphic families of complex points |
| 72 | |
| 73 | Idea: over a countable base, an affine open of finite type has countably many functions, so Baire's |
| 74 | theorem and the identity theorem give a `b` at which no function vanishes unless it vanishes along |
| 75 | all of `φ` nearby. |
| 76 | -/ |
| 77 | |
| 78 | section GenericPoint |
| 79 | |
| 80 | open CategoryTheory AlgebraicGeometry IsLocalRing PointFn Algebra Spec |
| 81 | |
| 82 | /-- If `X` is locally of finite type over a countable ring, the ring of sections of `X` over an |
| 83 | affine open `W` is countable. -/ |
| 84 | lemma countable_sections {X : Scheme} {R : CommRingCat} (s : X ⟶ Spec R) [Countable R] |
| 85 | [LocallyOfFiniteType s] {W : X.Opens} (h : IsAffineOpen W) : Countable Γ(X, W) := by |
| 86 | -- The ring of sections is of finite type over `R`, so a quotient of a polynomial ring in finitely |
| 87 | -- many variables, whose elements are finitely supported families of coefficients. |
| 88 | have h_ring : (preimage (h.fromSpec ≫ s)).hom.FiniteType := by |
| 89 | rw [← HasRingHomProperty.Spec_iff (P := @LocallyOfFiniteType), map_preimage] |
| 90 | infer_instance |
| 91 | algebraize [(preimage (h.fromSpec ≫ s)).hom] |
| 92 | obtain ⟨n, f, hf⟩ := FiniteType.iff_quotient_mvPolynomial''.1 h_ring |
| 93 | have := (MvPolynomial.basisMonomials (Fin n) R).repr.injective.countable |
| 94 | exact hf.countable |
| 95 | |
| 96 | /-- Every residue field of a scheme locally of finite type over a countable ring is countable. -/ |
| 97 | lemma countable_residueField {X : Scheme} {R : CommRingCat} (s : X ⟶ Spec R) [Countable R] |
| 98 | [LocallyOfFiniteType s] (z : X) : Countable (X.residueField z) := by |
| 99 | -- In an affine neighbourhood of z, its stalk is a localisation of the ring of sections. |
| 100 | obtain ⟨_, ⟨W, hW, rfl⟩, hz, -⟩ := |
| 101 | X.isBasis_affineOpens.exists_subset_of_mem_open (Set.mem_univ z) isOpen_univ |
| 102 | have : Countable Γ(X, W) := countable_sections s hW |
| 103 | let z' : W := ⟨z, hz⟩ |
| 104 | let := X.presheaf.algebra_section_stalk z' |
| 105 | have : Countable (X.presheaf.stalk z) := (hW.isLocalization_stalk z').mk'_surjective.countable |
| 106 | exact (residue_surjective (R := X.presheaf.stalk z)).countable |
| 107 | |
| 108 | /-- Let `X` be locally of finite type over a countable ring. Every point `t : Spec K ⟶ X` with |
| 109 | values in a field `K` factors through the residue field of a point `z` of `X`, as `Spec` of a ring |
| 110 | map `φ` (written `specMap φ`) followed by the canonical map to `X`, and this residue field is |
| 111 | countable. -/ |
| 112 | lemma exists_countable_residue_point {X : Scheme} {R : CommRingCat} (s : X ⟶ Spec R) [Countable R] |
| 113 | [LocallyOfFiniteType s] {K : Type} [Field K] (t : Spec (CommRingCat.of K) ⟶ X) : |
| 114 | ∃ z : X, ∃ φ : X.residueField z →+* K, |
| 115 | specMap φ ≫ X.fromSpecResidueField z = t ∧ Countable (X.residueField z) := by |
| 116 | let z : X := t (closedPoint K) |
| 117 | exact ⟨z, (X.SpecToEquivOfField K t).2.hom, (X.SpecToEquivOfField K).left_inv t, |
| 118 | countable_residueField s z⟩ |
| 119 | |
| 120 | /-- For countably many analytic functions on a connected open set `N` and an open set `V` meeting |
| 121 | `N`, some point of `N ∩ V` is a zero only of those functions that vanish on all of `N`. -/ |
| 122 | lemma exists_mem_forall_ne_zero_of_analyticOnNhd {P : Type} [FinComplexSpace P] {ι : Type*} |
| 123 | [Countable ι] (g : ι → P → ℂ) {N V : Set P} (hN_open : IsOpen N) (hN_conn : IsPreconnected N) |
| 124 | (hg : ∀ i : ι, AnalyticOnNhd ℂ (g i) N) (hV : IsOpen V) (h_nonempty : (N ∩ V).Nonempty) : |
| 125 | ∃ b ∈ N, b ∈ V ∧ ∀ i : ι, ∀ e ∈ N, g i e ≠ 0 → g i b ≠ 0 := by |
| 126 | -- Each non-vanishing set `Z i` is open, so agrees with its closure on a residual set. |
| 127 | let Z (i : ι) : Set P := N ∩ g i ⁻¹' {x : ℂ | x ≠ 0} |
| 128 | have hZ (i : ι) : closure (Z i) =ᶠ[residual P] Z i := closure_residualEq |
| 129 | ((hg i).continuousOn.isOpen_inter_preimage hN_open isOpen_ne).isLocallyClosed |
| 130 | -- Baire: there are countably many `i`, so some `b ∈ N ∩ V` is good for all of them. |
| 131 | have h_dense : Dense {e : P | ∀ i : ι, (e ∈ closure (Z i)) = (e ∈ Z i)} := |
| 132 | dense_of_mem_residual |
| 133 | (eventually_countable_forall.2 fun i ↦ Filter.eventuallyEqSet_iff'.1 (hZ i)) |
| 134 | obtain ⟨b, hb_gen, hbN, hbV⟩ := h_dense.exists_mem_open (hN_open.inter hV) h_nonempty |
| 135 | refine ⟨b, hbN, hbV, fun i e he hne ↦ ?_⟩ |
| 136 | -- The identity theorem makes the nonvanishing set dense in `N`. |
| 137 | have hb_closure : b ∈ closure (Z i) := hN_open.inter_closure |
| 138 | ⟨hbN, (hg i).subset_closure_setOf_ne_zero hN_conn he hne hbN⟩ |
| 139 | exact ((hb_gen i).mp hb_closure).2 |
| 140 | |
| 141 | /-- Let `X` be locally of finite type over a countable ring and `φ` a family of complex points of |
| 142 | `X`, parametrised by a finite-dimensional complex space and holomorphic on the open set `U` |
| 143 | (`HolomorphicAt`: regular functions pull back to analytic ones). If `c ∈ U` lies in the closure of |
| 144 | an open set `V`, there is `b ∈ V` such that the image point of `φ b` specialises to that of `φ e` |
| 145 | for all `e` near `c`. -/ |
| 146 | lemma exists_mem_eventually_specializes {P : Type} [FinComplexSpace P] {U : Set P} {X : Scheme} |
| 147 | {R : CommRingCat} (s : X ⟶ Spec R) [Countable R] [LocallyOfFiniteType s] |
| 148 | {φ : P → (Spec (CommRingCat.of ℂ) ⟶ X)} (hU : IsOpen U) (hφ : ∀ b ∈ U, HolomorphicAt φ b) |
| 149 | {V : Set P} (hV : IsOpen V) {c : P} (hcV : c ∈ closure V) (hcU : c ∈ U) : |
| 150 | ∃ b ∈ V, ∀ᶠ e in nhds c, φ b (closedPoint ℂ) ⤳ φ e (closedPoint ℂ) := by |
| 151 | -- Baire's theorem gives a `b` at which no section over an affine open around `φ c` vanishes, |
| 152 | -- unless it vanishes identically along `φ` near `c`. |
| 153 | obtain ⟨W, hW, hcW⟩ := exists_isAffineOpen_landsIn (φ c) |
| 154 | have : Countable Γ(X, W) := countable_sections s hW |
| 155 | let val (f : Γ(X, W)) (e : P) : ℂ := PointFn.ofSection f _ (φ e) |
| 156 | -- A connected open neighbourhood `N ⊆ U` of `c` that `φ` maps into the affine open `W`. |
| 157 | obtain ⟨N, ⟨hN_open, hcN, hN_conn⟩, hN⟩ : ∃ N : Set P, |
| 158 | (IsOpen N ∧ c ∈ N ∧ _root_.IsConnected N) ∧ ∀ e ∈ N, e ∈ U ∧ LandsIn (φ e) W := |
| 159 | -- holomorphy, applied to any section over `W`, says that `φ e` lands in `W` for `e` near `c` |
| 160 | (LocallyConnectedSpace.open_connected_basis c).mem_iff.1 |
| 161 | ((hU.eventually_mem hcU).and (hφ c hcU (isRegularOn_ofSection 0) hcW).1) |
| 162 | have h_an (f : Γ(X, W)) : AnalyticOnNhd ℂ (val f) N := fun e he ↦ by |
| 163 | obtain ⟨heU, heW⟩ := hN e he |
| 164 | exact (hφ e heU (isRegularOn_ofSection f) heW).2 |
| 165 | obtain ⟨b, hbN, hbV, h_ne⟩ : ∃ b ∈ N, |
| 166 | b ∈ V ∧ ∀ f : Γ(X, W), ∀ e ∈ N, val f e ≠ 0 → val f b ≠ 0 := |
| 167 | exists_mem_forall_ne_zero_of_analyticOnNhd val hN_open hN_conn.isPreconnected h_an hV |
| 168 | (mem_closure_iff.1 hcV N hN_open hcN) |
| 169 | -- Test the specialisation on basic opens of `W`: a point lies in the basic open of `f` exactly |
| 170 | -- when the value of `f` there is a unit (`landsIn_basicOpen`). |
| 171 | refine ⟨b, hbV, (hN_open.eventually_mem hcN).mono fun e he ↦ |
| 172 | specializes_iff_forall_open.2 fun O hO heO ↦ ?_⟩ |
| 173 | obtain ⟨-, heW⟩ := hN e he |
| 174 | obtain ⟨f, hfO, hef⟩ := hW.exists_basicOpen_le (V := ⟨O, hO⟩) ⟨_, heO⟩ (landsIn_iff_mem.1 heW) |
| 175 | have hfe : val f e ≠ 0 := ((landsIn_basicOpen heW f).1 (landsIn_iff_mem.2 hef)).ne_zero |
| 176 | have hb_lands : LandsIn (φ b) (X.basicOpen f) := |
| 177 | (landsIn_basicOpen (hN b hbN).2 f).2 (h_ne f e he hfe).isUnit |
| 178 | exact hfO (landsIn_iff_mem.1 hb_lands) |
| 179 | |
| 180 | /-- Let `X` be locally of finite type over a countable ring and `φ` a family of complex points of |
| 181 | `X`, parametrised by a finite-dimensional complex space and holomorphic (regular functions pull back |
| 182 | to analytic ones) on a connected open set `U`. There is `b ∈ U` such that the image point of |
| 183 | `φ b` specialises to the image point of `φ c` for every `c ∈ U`. -/ |
| 184 | lemma exists_generic_member {P : Type} [FinComplexSpace P] {U : Set P} {X : Scheme} |
| 185 | {R : CommRingCat} (s : X ⟶ Spec R) [Countable R] [LocallyOfFiniteType s] |
| 186 | {φ : P → (Spec (CommRingCat.of ℂ) ⟶ X)} (hU : IsOpen U) |
| 187 | (h_conn : IsConnected U) (hφ : ∀ b ∈ U, HolomorphicAt φ b) : |
| 188 | ∃ b ∈ U, ∀ c ∈ U, φ b (closedPoint ℂ) ⤳ φ c (closedPoint ℂ) := by |
| 189 | -- Locally there is a `b` such that `φ b` specialises to all nearby `φ e` |
| 190 | -- (`exists_mem_eventually_specializes`). Connectedness spreads this over `U`. |
| 191 | obtain ⟨c, hc⟩ := h_conn.nonempty |
| 192 | obtain ⟨b, hb, hbc⟩ := exists_mem_eventually_specializes s hU hφ hU (subset_closure hc) hc |
| 193 | -- The set of points near which `φ b` specialises to `φ e` is open, and closed in `U`. |
| 194 | let G : Set P := {x : P | ∀ᶠ e in nhds x, φ b (closedPoint ℂ) ⤳ φ e (closedPoint ℂ)} |
| 195 | have hG : IsOpen G := isOpen_setOfPred_eventually_nhds |
| 196 | have h_all : U ⊆ G := by |
| 197 | refine h_conn.isPreconnected.subset_of_closure_inter_subset hG ⟨c, hc, hbc⟩ fun x hx ↦ ?_ |
| 198 | obtain ⟨d, hdG, hdx⟩ := exists_mem_eventually_specializes s hU hφ hG hx.1 hx.2 |
| 199 | exact hdx.mono fun e hde ↦ hdG.self_of_nhds.trans hde |
| 200 | exact ⟨b, hb, fun e he ↦ (h_all he).self_of_nhds⟩ |
| 201 | |
| 202 | end GenericPoint |
| 203 | |
| 204 | /-! ## Reduced closures in products and Galois coverings -/ |
| 205 | |
| 206 | section GaloisCovers |
| 207 | |
| 208 | open CategoryTheory AlgebraicGeometry Limits RingHom Over Set Scheme IsArtinianRing Pi pullback |
| 209 | CommRingCat Ideal Quotient Algebra TensorProduct Function Finset Module Spec OverMorphism |
| 210 | FormallyUnramified LocallyQuasiFinite IsOpenImmersion IsLocalization IsIntegralClosure |
| 211 | |
| 212 | attribute [local instance low] Fintype.ofFinite |
| 213 | |
| 214 | /-- Let `b` be a complex point of a scheme `S`, let `Z j` be finitely many schemes over `S`, and let |
| 215 | `F j a` be a complex point of `Z j` over `b` for each `a : A`. A reduced closure of the tuples |
| 216 | `(F j a)_j` is a reduced closed subscheme `W` (the field `scheme`) of the product of the `Z j` over |
| 217 | `S`, with a dense family of complex points that lift these tuples. -/ |
| 218 | structure ReducedClosure {S : Scheme} {b : Spec (of ℂ) ⟶ S} {J A : Type} [Finite J] |
| 219 | {Z : J → Over S} (F : (j : J) → A → (Over.mk b ⟶ Z j)) where |
| 220 | /-- The closure, a scheme over `S`. -/ |
| 221 | scheme : Over S |
| 222 | /-- The inclusion of `scheme` in the product of the `Z j`. -/ |
| 223 | incl : scheme ⟶ ∏ᶜ Z |
| 224 | /-- The complex point of `scheme` indexed by `a`. -/ |
| 225 | point (a : A) : Over.mk b ⟶ scheme |
| 226 | /-- The point `point a` lies over the point `(F j a)_j` of the product. -/ |
| 227 | point_incl (a : A) : point a ≫ incl = Pi.lift fun j : J ↦ F j a |
| 228 | /-- `incl` is a closed immersion. -/ |
| 229 | isClosedImmersion : IsClosedImmersion incl.left |
| 230 | /-- `scheme` is reduced and its points `point a` are dense in it. -/ |
| 231 | isSeparatingFamily : IsSeparatingFamily fun a : A ↦ (point a).left |
| 232 | |
| 233 | attribute [instance] ReducedClosure.isClosedImmersion |
| 234 | |
| 235 | -- `S` is the base scheme, `b` a complex point of it, and `F j a` a complex point of the factor |
| 236 | -- `Z j` over `b`, for `j` in the finite set `J` and `a` in the index set `A`. |
| 237 | variable {S : Scheme} {b : Spec (of ℂ) ⟶ S} {J A : Type} [Finite J] {Z : J → Over S} |
| 238 | {F : (j : J) → A → (Over.mk b ⟶ Z j)} |
| 239 | |
| 240 | /-- A reduced closure is a reduced scheme. -/ |
| 241 | instance (C : ReducedClosure F) : AlgebraicGeometry.IsReduced C.scheme.left := |
| 242 | C.isSeparatingFamily.1 |
| 243 | |
| 244 | /-- The morphism from the closure `C.scheme` to the factor `Z j`: the inclusion into the product |
| 245 | followed by the `j`-th projection. -/ |
| 246 | def ReducedClosure.proj (C : ReducedClosure F) (j : J) : C.scheme ⟶ Z j := C.incl ≫ Pi.π Z j |
| 247 | |
| 248 | @[simp] |
| 249 | lemma ReducedClosure.point_comp_proj (C : ReducedClosure F) (a : A) (j : J) : |
| 250 | C.point a ≫ C.proj j = F j a := by |
| 251 | simp [proj, reassoc_of% point_incl] |
| 252 | |
| 253 | /-- Every family of tuples of complex points has a reduced closure. -/ |
| 254 | instance : Nonempty (ReducedClosure F) := by |
| 255 | obtain ⟨Y, i, e, h_closed, he, h_sep⟩ := |
| 256 | exists_reduced_closure fun a : A ↦ (Pi.lift fun j : J ↦ F j a).left |
| 257 | exact ⟨{ scheme := .mk (i ≫ (∏ᶜ Z).hom), incl := homMk i |
| 258 | point a := homMk (e a) (by simp [reassoc_of% he]) |
| 259 | point_incl a := ext (he a) |
| 260 | isClosedImmersion := h_closed, isSeparatingFamily := h_sep }⟩ |
| 261 | |
| 262 | /-- Two morphisms over `S` to a reduced closure `C.scheme` agree as soon as their composites with |
| 263 | all projections `C.proj j` to the factors agree. -/ |
| 264 | lemma ReducedClosure.hom_ext (C : ReducedClosure F) {T : Over S} {f g : T ⟶ C.scheme} |
| 265 | (h : ∀ j : J, f ≫ C.proj j = g ≫ C.proj j) : f = g := |
| 266 | (mono_of_mono_left C.incl).right_cancellation f g (Pi.hom_ext _ _ h) |
| 267 | |
| 268 | /-- Let `C` and `C'` be reduced closures (reduced closed subschemes of `∏ᶜ Z` and `∏ᶜ Z'` over `S` |
| 269 | with dense complex points) of families `F` and `F'` of complex points indexed by the |
| 270 | same set `A`. Maps `f j` from `C'` to the factors `Z j` that send the point `a` of `C'` to |
| 271 | `F j (σ a)` come from a map `g` to the closure `C`, and `g` sends the point `a` to the point |
| 272 | `σ a`. Here `S` is the base scheme and `F j a` is a complex point of `Z j` over the fixed complex |
| 273 | point `b` of `S`, with `j` in the finite set `J` and `a` in `A`. -/ |
| 274 | lemma ReducedClosure.exists_lift (C : ReducedClosure F) {J' : Type} [Finite J'] {Z' : J' → Over S} |
| 275 | {F' : (j : J') → A → (Over.mk b ⟶ Z' j)} {C' : ReducedClosure F'} |
| 276 | (σ : A → A) (f : (j : J) → (C'.scheme ⟶ Z j)) |
| 277 | (h : ∀ (a : A) (j : J), C'.point a ≫ f j = F j (σ a)) : |
| 278 | ∃ g : C'.scheme ⟶ C.scheme, |
| 279 | (∀ j : J, g ≫ C.proj j = f j) ∧ ∀ a : A, C'.point a ≫ g = C.point (σ a) := by |
| 280 | -- The map `Pi.lift f` sends the dense points of the reduced scheme `C'.scheme` into the closed |
| 281 | -- subscheme `C.scheme`, so it factors through it. |
| 282 | have h_pt (a : A) : C.point (σ a) ≫ C.incl = C'.point a ≫ Pi.lift f := |
| 283 | (C.point_incl (σ a)).trans (Pi.hom_ext _ _ fun j ↦ by simp [h]) |
| 284 | obtain ⟨g, hg⟩ := exists_lift_of_dense_preimage C.incl.left (Pi.lift f).left <| |
| 285 | C'.isSeparatingFamily.2.mono <| range_subset_iff.2 fun a ↦ |
| 286 | ⟨(C.point (σ a)).left (IsLocalRing.closedPoint ℂ), |
| 287 | congrArg (fun y ↦ y.left (IsLocalRing.closedPoint ℂ)) (h_pt a)⟩ |
| 288 | let g' : C'.scheme ⟶ C.scheme := homMk g (by simpa using hg =≫ hom _) |
| 289 | have h_incl : g' ≫ C.incl = Pi.lift f := ext hg |
| 290 | have h_proj (j : J) : g' ≫ C.proj j = f j := by simp [proj, reassoc_of% h_incl] |
| 291 | exact ⟨g', h_proj, fun a ↦ C.hom_ext fun j ↦ by simp [h_proj, h]⟩ |
| 292 | |
| 293 | /-- Chase–Harrison–Rosenberg. Let `B` be a finite `A`-algebra with `A → B` injective and `G` a |
| 294 | finite group. Assume: (a) `σ` is a right action of `G` on `B` by `A`-algebra maps, that is |
| 295 | `σ 1 = id` and `σ (g * h) = σ h ∘ σ g`; (b) for every field `k` over `A` and any two `A`-algebra |
| 296 | maps `x y : B → k` there is exactly one `g` with `x ∘ σ g = y`; (c) every element of `B` fixed |
| 297 | by all `σ g` comes from `A`. Then `B` is étale over `A`. -/ |
| 298 | lemma etale_of_simply_transitive {A : Type*} {B : Type} {G : Type*} [CommRing A] [CommRing B] |
| 299 | [Algebra A B] [Module.Finite A B] [Group G] [Finite G] |
| 300 | (h_inj : Function.Injective (algebraMap A B)) (σ : G →* (B →ₐ[A] B)ᵐᵒᵖ) |
| 301 | (h_points : ∀ (k : Type) [Field k] [Algebra A k] (x y : B →ₐ[A] k), |
| 302 | ∃! g : G, ∀ b : B, x ((σ g).unop b) = y b) |
| 303 | (h_invariant : ∀ s : B, (∀ g : G, (σ g).unop s = s) → ∃ a : A, algebraMap A B a = s) : |
| 304 | Algebra.Etale A B := by |
| 305 | classical |
| 306 | -- Find `x i`, `y i` in `B` with `∑ i, σ g (y i) * x i = if g = 1 then 1 else 0`. With the trace |
| 307 | -- `t` they form a dual basis, so `B` is projective; and `∑ i, y i ⊗ x i` is a separability |
| 308 | -- element, so `B` is unramified. |
| 309 | let tr : B →ₗ[A] B := ∑ g : G, (σ g).unop.toLinearMap |
| 310 | let t : B →ₗ[A] A := tr.codRestrictOfInjective (Algebra.linearMap A B) h_inj fun s ↦ |
| 311 | h_invariant (tr s) fun g ↦ by |
| 312 | simpa [tr] using Equiv.sum_comp (.mulRight g) fun h ↦ (σ h).unop s |
| 313 | have ht (s : B) : algebraMap A B (t s) = ∑ g : G, (σ g).unop s := by |
| 314 | simpa [tr] using tr.codRestrictOfInjective_comp_apply (Algebra.linearMap A B) h_inj _ s |
| 315 | -- The kernels of the maps `b ⊗ b' ↦ σ g b * b'` are pairwise coprime: a maximal ideal over two |
| 316 | -- of them gives two points of `B` in its residue field, related by both group elements. |
| 317 | let 𝔞 (g : G) : Ideal (B ⊗[A] B) := ker (productMap (σ g).unop (.id A B)) |
| 318 | have h_coprime : Pairwise (IsCoprime on 𝔞) := by |
| 319 | refine fun g g' h_ne ↦ isCoprime_iff_sup_eq.2 (by_contra fun h_sup ↦ h_ne ?_) |
| 320 | obtain ⟨𝔪, h𝔪, h_le⟩ := exists_le_maximal _ h_sup |
| 321 | let : Field (B ⊗[A] B ⧸ 𝔪) := Quotient.field 𝔪 |
| 322 | let left : B →ₐ[A] B ⊗[A] B ⧸ 𝔪 := (mkₐ A 𝔪).comp includeLeft |
| 323 | let right : B →ₐ[A] B ⊗[A] B ⧸ 𝔪 := (mkₐ A 𝔪).comp includeRight |
| 324 | have h_rel (g : G) (hg : 𝔞 g ≤ 𝔪) (b : B) : right ((σ g).unop b) = left b := |
| 325 | Ideal.Quotient.eq.2 (hg (show 1 ⊗ₜ[A] (σ g).unop b - b ⊗ₜ[A] 1 ∈ 𝔞 g by simp [𝔞])) |
| 326 | exact (h_points _ right left).unique (h_rel g (le_sup_left.trans h_le)) |
| 327 | (h_rel g' (le_sup_right.trans h_le)) |
| 328 | -- Chinese remainder theorem: `u = ∑ i, y i ⊗ x i` is `1` modulo `𝔞 1` and `0` modulo the others. |
| 329 | obtain ⟨u, hu⟩ : ∃ u : B ⊗[A] B, ∀ g : G, u - Pi.single (M := fun _ ↦ B ⊗[A] B) 1 1 g ∈ 𝔞 g := |
| 330 | exists_forall_sub_mem_ideal h_coprime _ |
| 331 | obtain ⟨r, y, x, rfl⟩ := exists_sum_tmul_eq u |
| 332 | have h_delta (g : G) : ∑ i, (σ g).unop (y i) * x i = if g = 1 then 1 else 0 := by |
| 333 | simpa [𝔞, sub_eq_zero, single_apply, apply_ite] using hu g |
| 334 | have h_dual (z : B) : ∑ i, t (z * y i) • x i = z := |
| 335 | calc ∑ i, t (z * y i) • x i |
| 336 | _ = ∑ g : G, (σ g).unop z * ∑ i, (σ g).unop (y i) * x i := by |
| 337 | simp [Algebra.smul_def, ht, sum_mul, mul_sum, sum_comm (s := univ (α := G)), mul_assoc] |
| 338 | _ = z := by simp [h_delta] |
| 339 | -- Expand both sides in the dual basis and move the scalars across `⊗`. |
| 340 | have h_swap (s : B) : ∑ i, (s * y i) ⊗ₜ[A] x i = ∑ i, x i ⊗ₜ[A] (s * y i) := |
| 341 | calc ∑ j, (s * y j) ⊗ₜ[A] x j |
| 342 | _ = ∑ j, (∑ i, t (s * y j * y i) • x i) ⊗ₜ[A] x j := by simp only [h_dual] |
| 343 | _ = ∑ i, x i ⊗ₜ[A] ∑ j, t (s * y i * y j) • x j := by |
| 344 | simp only [sum_tmul, tmul_sum, smul_tmul] |
| 345 | exact sum_comm.trans (by simp only [mul_right_comm]) |
| 346 | _ = ∑ i, x i ⊗ₜ[A] (s * y i) := by simp only [h_dual] |
| 347 | have h_unramified : FormallyUnramified A B := by |
| 348 | refine iff_exists_tensorProduct.2 ⟨∑ i, y i ⊗ₜ x i, fun s ↦ ?_, by simpa using h_delta 1⟩ |
| 349 | have h_symm : ∑ i, y i ⊗ₜ[A] x i = ∑ i, x i ⊗ₜ[A] y i := by simpa using h_swap 1 |
| 350 | rw [sub_mul, sub_eq_zero] |
| 351 | calc (1 : B) ⊗ₜ[A] s * ∑ i, y i ⊗ₜ[A] x i |
| 352 | _ = (1 : B) ⊗ₜ[A] s * ∑ i, x i ⊗ₜ[A] y i := by rw [h_symm] |
| 353 | _ = s ⊗ₜ[A] (1 : B) * ∑ i, y i ⊗ₜ[A] x i := by simp [mul_sum, h_swap] |
| 354 | have h_projective : Projective A B := |
| 355 | .of_split (.pi fun i ↦ t.comp (.mulRight A (y i))) (Fintype.linearCombination A x) |
| 356 | (LinearMap.ext h_dual) |
| 357 | -- finite and projective, hence flat and finitely presented |
| 358 | have : Module.FinitePresentation A B := finitePresentation_of_projective A B |
| 359 | exact .of_formallyUnramified_of_flat |
| 360 | |
| 361 | /-- Let `R` be a countable domain, with a given map to `ℂ`, all of whose ring maps to fields of |
| 362 | characteristic 0 are injective. Let `W` be proper over `R`, `Z` separated, and `c : W ⟶ Z` |
| 363 | surjective and invariant under an action `s` of a finite group `Δ` on `W` that is simply transitive |
| 364 | on the fibres of `c` on complex points (`specOver R ℂ` is `Spec ℂ` over `Spec R`). Then `c` is a |
| 365 | Galois covering with group `Δ` in the sense of `New.Variety.IsGaloisCovering`: simple transitivity |
| 366 | holds for points with values in any field of characteristic 0. -/ |
| 367 | lemma isGaloisCovering_of_complex_points {R : CommRingCat} {W Z : Over (Spec R)} |
| 368 | [IsProper W.hom] [IsSeparated Z.hom] {c : W ⟶ Z} {Δ : FiniteGrp} |
| 369 | {s : Δ →* CategoryTheory.End W} [Countable R] [Algebra R ℂ] |
| 370 | (hR : ∀ (k : Type) [Field k] [CharZero k] (f : R →+* k), Function.Injective f) |
| 371 | (h_inv : ∀ g : Δ.toGrp, (s g).asHom ≫ c = c) (hc : AlgebraicGeometry.Surjective c.left) |
| 372 | (h_orbit : ∀ y z : specOver R ℂ ⟶ W, y ≫ c = z ≫ c → ∃! g : Δ.toGrp, y ≫ (s g).asHom = z) : |
| 373 | IsGaloisCovering c s := by |
| 374 | refine ⟨h_inv, hc, fun k _ _ y y' hy ↦ ?_⟩ |
| 375 | -- The pair `(y, y')` is a point of `W ×_Z W`. It factors through the residue field of its image |
| 376 | -- `z`, which is countable and so embeds in `ℂ` over `R`. |
| 377 | let p₁ : pullback c.left c.left ⟶ W.left := fst c.left c.left |
| 378 | let p₂ : pullback c.left c.left ⟶ W.left := snd c.left c.left |
| 379 | obtain ⟨x, rfl, rfl⟩ : ∃ x, x ≫ p₁ = y ∧ x ≫ p₂ = y' := |
| 380 | ⟨lift y y' hy, lift_fst y y' hy, lift_snd y y' hy⟩ |
| 381 | obtain ⟨z, φ, rfl, h_countable⟩ := exists_countable_residue_point (p₁ ≫ W.hom) x |
| 382 | set j : Spec (residueField _ z) ⟶ pullback c.left c.left := fromSpecResidueField _ z |
| 383 | have : CharZero (residueField _ z) := φ.charZero |
| 384 | -- `R` maps injectively to the countable residue field and to `ℂ`, so `ψ` exists. |
| 385 | obtain ⟨ψ, hψ⟩ : ∃ ψ : residueField _ z →+* ℂ, |
| 386 | ψ.comp (Spec.preimage (j ≫ p₁ ≫ W.hom)).hom = algebraMap R ℂ := |
| 387 | exists_ringHom_complex_extend (hR _ _) (hR ℂ _) (by simp [Cardinal.aleph0_le_continuum.trans']) |
| 388 | -- Both projections of `specMap ψ ≫ j` are complex points over `R` with the same image in `Z`. |
| 389 | have h_fibre : p₁ ≫ c.left = p₂ ≫ c.left := condition |
| 390 | have h₁ : (specMap ψ ≫ j ≫ p₁) ≫ W.hom = (specOver R ℂ).hom := by simp [← hψ] |
| 391 | let y₁ : specOver R ℂ ⟶ W := homMk (specMap ψ ≫ j ≫ p₁) h₁ |
| 392 | let y₂ : specOver R ℂ ⟶ W := |
| 393 | homMk (specMap ψ ≫ j ≫ p₂) <| by |
| 394 | rw [← h₁, ← c.w] |
| 395 | simp only [Category.assoc, reassoc_of% h_fibre] |
| 396 | have h_complex : ∃! g : Δ, y₁ ≫ (s g).asHom = y₂ := |
| 397 | h_orbit y₁ y₂ (OverMorphism.ext (by simp [y₁, y₂, h_fibre])) |
| 398 | -- The maps `specMap φ` and `specMap ψ` between spectra of fields are epi, so they cancel. |
| 399 | simpa [y₁, y₂, OverMorphism.ext_iff, cancel_epi] using h_complex |
| 400 | |
| 401 | /-- Let `c : W ⟶ Z` be a Galois covering with group `Δ` acting through `s`, and `π : T ⟶ Z` a map |
| 402 | from a scheme whose field-valued points have characteristic zero. If `p : X ⟶ W` lies over |
| 403 | `r : X ⟶ T`, then two points of `X` with the same image under `r` have images under `p` in the |
| 404 | same `Δ`-orbit. -/ |
| 405 | lemma IsGaloisCovering.exists_apply_eq_of_apply_eq.{u} {R : CommRingCat.{u}} {W Z : Over (Spec R)} |
| 406 | {c : W ⟶ Z} {Δ : FiniteGrp} {s : Δ →* CategoryTheory.End W} (hG : IsGaloisCovering c s) |
| 407 | {T X : Scheme} {π : T ⟶ Z.left} |
| 408 | (h_char : ∀ (K : Type u) [Field K], (Spec (of K) ⟶ T) → CharZero K) |
| 409 | {p : X ⟶ W.left} (r : X ⟶ T) (hr : p ≫ c.left = r ≫ π) (w v : X) (hv : r v = r w) : |
| 410 | ∃ g : Δ, (s g).asHom.left (p w) = p v := by |
| 411 | -- Lift `(v, w)` to a point `t` of the fibre product and use its residue field. |
| 412 | obtain ⟨t, rfl, rfl⟩ := Pullback.exists_preimage_pullback v w hv |
| 413 | let j : Spec (residueField _ t) ⟶ pullback r r := fromSpecResidueField _ t |
| 414 | have : CharZero (residueField _ t) := h_char _ (j ≫ fst r r ≫ r) |
| 415 | have h_fibre : (j ≫ snd r r ≫ p) ≫ c.left = (j ≫ fst r r ≫ p) ≫ c.left := by |
| 416 | simp [hr, condition_assoc] |
| 417 | obtain ⟨g, hg, -⟩ : ∃! g : Δ, (j ≫ snd r r ≫ p) ≫ (s g).asHom.left = j ≫ fst r r ≫ p := |
| 418 | hG.torsor (residueField _ t) _ _ h_fibre |
| 419 | refine ⟨g, ?_⟩ |
| 420 | simpa [j] using congrArg (fun y ↦ y default) hg |
| 421 | |
| 422 | /-- Let `c : W ⟶ Z` be a Galois covering with group `Δ`, let `π : T ⟶ Z` be a map from a scheme |
| 423 | whose field-valued points have characteristic zero, and let `p : X ⟶ W`, injective on points, lie |
| 424 | over `r : X ⟶ T`. Then the fibres of `r` are finite. -/ |
| 425 | lemma IsGaloisCovering.finite_preimage_singleton.{u} {R : CommRingCat.{u}} {W Z : Over (Spec R)} |
| 426 | {c : W ⟶ Z} {Δ : FiniteGrp} {s : Δ →* CategoryTheory.End W} (hG : IsGaloisCovering c s) |
| 427 | {T X : Scheme} {π : T ⟶ Z.left} |
| 428 | (h_char : ∀ (K : Type u) [Field K], (Spec (of K) ⟶ T) → CharZero K) |
| 429 | {p : X ⟶ W.left} (hp : Function.Injective p) (r : X ⟶ T) (hr : p ≫ c.left = r ≫ π) (x : X) : |
| 430 | (r ⁻¹' {r x}).Finite := |
| 431 | -- each fibre lies in the preimage of a `Δ`-orbit |
| 432 | have h_orbit : r ⁻¹' {r x} ⊆ p ⁻¹' range fun g : Δ ↦ (s g).asHom.left (p x) := |
| 433 | hG.exists_apply_eq_of_apply_eq h_char r hr x |
| 434 | ((finite_range _).preimage hp.injOn).subset h_orbit |
| 435 | |
| 436 | /-- Let `Spec B` be the pull-back of `c : W ⟶ Z` along `u : Spec A ⟶ Z`, with projection `p` to |
| 437 | `W`. A point `y` of `W` with values in an `A`-algebra `K` that lies over the point |
| 438 | `Spec K ⟶ Spec A ⟶ Z` comes from an `A`-algebra map `B → K`. Here `specMap φ` is the morphism |
| 439 | of spectra induced by a ring map `φ`. -/ |
| 440 | lemma exists_algHom_specMap_comp_eq {W Z : Scheme} {c : W ⟶ Z} {A B : Type} [CommRing A] |
| 441 | [CommRing B] [Algebra A B] {p : Spec (of B) ⟶ W} {u : Spec (of A) ⟶ Z} |
| 442 | (hp : IsPullback p (specMap (algebraMap A B)) c u) (K : Type) [CommRing K] [Algebra A K] |
| 443 | (y : Spec (of K) ⟶ W) (hy : y ≫ c = specMap (algebraMap A K) ≫ u) : |
| 444 | ∃ χ : B →ₐ[A] K, specMap χ ≫ p = y := by |
| 445 | let l : specOver A K ⟶ specOver A B := homMk (hp.lift y _ hy) (hp.lift_snd y _ hy) |
| 446 | obtain ⟨χ, hχ⟩ := specOver.map_bijective.surjective l |
| 447 | have h_left : specMap (χ : B →+* K) = hp.lift y _ hy := congrArg Hom.left hχ |
| 448 | exact ⟨χ, by rw [h_left, hp.lift_fst]⟩ |
| 449 | |
| 450 | /-- Let `c : W ⟶ Z` be a Galois covering with group `Δ` acting through `s`, and let `Spec B` be its |
| 451 | pull-back along `u : Spec A ⟶ Z`, where the field-valued points of `A` have characteristic zero. |
| 452 | Then `Δ` acts on the `A`-algebra `B` from the right, compatibly with `s` and simply transitively |
| 453 | on the field-valued points of `B` over `A`. |
| 454 | (Galois covering: `c` is surjective and `Δ` is simply transitive on its fibres of points in fields |
| 455 | of characteristic zero; `specMap φ` is the morphism of spectra induced by `φ`.) -/ |
| 456 | lemma IsGaloisCovering.exists_simply_transitive_action {R : CommRingCat} {W Z : Over (Spec R)} |
| 457 | {c : W ⟶ Z} {Δ : FiniteGrp} {s : Δ →* CategoryTheory.End W} (hG : IsGaloisCovering c s) |
| 458 | {A B : Type} [CommRing A] [CommRing B] [Algebra A B] |
| 459 | (h_char : ∀ (K : Type) [Field K], (Spec (of K) ⟶ Spec (of A)) → CharZero K) |
| 460 | {p : Spec (of B) ⟶ W.left} {u : Spec (of A) ⟶ Z.left} |
| 461 | (hp : IsPullback p (specMap (algebraMap A B)) c.left u) : |
| 462 | ∃ σ : Δ →* (B →ₐ[A] B)ᵐᵒᵖ, |
| 463 | (∀ g : Δ, specMap (σ g).unop ≫ p = p ≫ (s g).asHom.left) ∧ |
| 464 | ∀ (K : Type) [Field K] [Algebra A K] (x y : B →ₐ[A] K), |
| 465 | ∃! g : Δ, ∀ b : B, x ((σ g).unop b) = y b := by |
| 466 | have h_exists (g : Δ) : ∃ χ : B →ₐ[A] B, specMap χ ≫ p = p ≫ (s g).asHom.left := |
| 467 | exists_algHom_specMap_comp_eq hp B (p ≫ (s g).asHom.left) |
| 468 | (by simp [← comp_left, hG.comp_eq, hp.w]) |
| 469 | choose act h_act using h_exists |
| 470 | -- Both points have the same projection to `Spec A`, so the pullback makes `p` detect equality. |
| 471 | have h_base {K : Type} [CommRing K] [Algebra A K] (x : B →ₐ[A] K) : |
| 472 | specMap (x : B →+* K) ≫ specMap (algebraMap A B) = specMap (algebraMap A K) := by |
| 473 | simp [← Spec.map_comp, ← ofHom_comp] |
| 474 | have h_cancel {K : Type} [CommRing K] [Algebra A K] (x y : B →ₐ[A] K) : |
| 475 | specMap (x : B →+* K) ≫ p = specMap (y : B →+* K) ≫ p ↔ x = y := by |
| 476 | refine ⟨fun h ↦ ?_, fun h ↦ by rw [h]⟩ |
| 477 | have h_spec := hp.hom_ext h ((h_base x).trans (h_base y).symm) |
| 478 | simpa [Spec.map_inj, ConcreteCategory.hom_ext_iff, AlgHom.ext_iff] using h_spec |
| 479 | have h_comp {K : Type} [CommRing K] [Algebra A K] (x : B →ₐ[A] K) (g : Δ) : |
| 480 | specMap (x.comp (act g) : B →+* K) ≫ p = (specMap (x : B →+* K) ≫ p) ≫ (s g).asHom.left := by |
| 481 | rw [Category.assoc, ← h_act, ← Spec.map_comp_assoc] |
| 482 | rfl |
| 483 | have h_id : specMap (RingHom.id B) = 𝟙 (Spec (of B)) := Spec.map_id _ |
| 484 | have h_one : act 1 = .id A B := (h_cancel _ _).1 (by simp [h_act, h_id]) |
| 485 | have h_mul (g h : Δ) : act (g * h) = (act h).comp (act g) := |
| 486 | (h_cancel _ _).1 (by simp [h_comp, h_act]) |
| 487 | let σ : Δ →* (B →ₐ[A] B)ᵐᵒᵖ := |
| 488 | { toFun g := .op (act g) |
| 489 | map_one' := congrArg MulOpposite.op h_one |
| 490 | map_mul' g h := congrArg MulOpposite.op (h_mul g h) } |
| 491 | refine ⟨σ, h_act, fun K _ _ x y ↦ ?_⟩ |
| 492 | have : CharZero K := h_char K (specMap (algebraMap A K)) |
| 493 | have h_fibre : |
| 494 | (specMap (x : B →+* K) ≫ p) ≫ c.left = (specMap (y : B →+* K) ≫ p) ≫ c.left := by |
| 495 | simp [hp.w, ← Spec.map_comp_assoc, ← ofHom_comp] |
| 496 | simpa [σ, ← h_comp, h_cancel, AlgHom.ext_iff] using hG.torsor K _ _ h_fibre |
| 497 | |
| 498 | section ProductOfFields |
| 499 | |
| 500 | -- `Ω m` is an algebra over the residue field of the reduced Artinian ring `N` at `m`. |
| 501 | variable {N : Type*} [CommRing N] [IsArtinianRing N] [IsReduced N] {Ω : MaximalSpectrum N → Type*} |
| 502 | [∀ m, CommRing (Ω m)] [∀ m, Algebra N (Ω m)] [∀ m, Algebra (N ⧸ m.asIdeal) (Ω m)] |
| 503 | [∀ m, IsScalarTower N (N ⧸ m.asIdeal) (Ω m)] |
| 504 | |
| 505 | /-- A reduced Artinian ring `N` embeds in any product over its maximal ideals `m` of faithful |
| 506 | algebras over the residue fields `N ⧸ m`. -/ |
| 507 | lemma algebraMap_pi_injective |
| 508 | (hΩ : ∀ m : MaximalSpectrum N, Function.Injective (algebraMap (N ⧸ m.asIdeal) (Ω m))) : |
| 509 | Function.Injective (algebraMap N (∀ m : MaximalSpectrum N, Ω m)) := fun x y h_eq ↦ |
| 510 | (equivPi N).injective <| funext fun m ↦ hΩ m <| by |
| 511 | simpa [IsScalarTower.algebraMap_apply N (N ⧸ m.asIdeal) (Ω m)] using congrFun h_eq m |
| 512 | |
| 513 | /-- An element of the product of the `Ω m` whose components all come from the residue fields of |
| 514 | the reduced Artinian ring `N` comes from `N`. -/ |
| 515 | lemma exists_algebraMap_pi_eq {z : ∀ m : MaximalSpectrum N, Ω m} |
| 516 | (hz : ∀ m : MaximalSpectrum N, z m ∈ Set.range (algebraMap (N ⧸ m.asIdeal) (Ω m))) : |
| 517 | ∃ v : N, algebraMap N (∀ m : MaximalSpectrum N, Ω m) v = z := by |
| 518 | choose w hw using hz |
| 519 | obtain ⟨v, rfl⟩ := (equivPi N).surjective w |
| 520 | exact ⟨v, funext fun m ↦ (IsScalarTower.algebraMap_apply _ _ _ _).trans (hw m)⟩ |
| 521 | |
| 522 | end ProductOfFields |
| 523 | |
| 524 | /-- If `A` is a smooth algebra over a normal domain `P`, then `A` is integrally closed in |
| 525 | `A ⊗[P] Frac P`. -/ |
| 526 | lemma exists_algebraMap_eq_of_isIntegral_of_smooth {P A : Type} [CommRing P] |
| 527 | [IsIntegrallyClosed P] [CommRing A] [Algebra P A] [Algebra.Smooth P A] |
| 528 | {v : A ⊗[P] FractionRing P} (hv : IsIntegral A v) : |
| 529 | ∃ x : A, algebraMap A (A ⊗[P] FractionRing P) x = v := by |
| 530 | -- Integral closure commutes with smooth base change, and `P` is its own integral closure. |
| 531 | let F : Type := FractionRing P |
| 532 | have h_normal : Function.Surjective (algebraMap P (integralClosure P F)) := |
| 533 | fun z ↦ (isIntegral_iff.mp z.prop).imp fun _ ↦ Subtype.ext |
| 534 | obtain ⟨w, hw⟩ : ∃ w : A ⊗[P] integralClosure P F, toIntegralClosure P A F w = ⟨v, hv⟩ := |
| 535 | toIntegralClosure_bijective_of_smooth.surjective _ |
| 536 | obtain ⟨x, rfl⟩ := includeLeft_surjective A A h_normal w |
| 537 | exact ⟨x, congrArg Subtype.val hw⟩ |
| 538 | |
| 539 | /-- Let `Spec B` be the pull-back of a Galois covering `c : W ⟶ Z` with group `Δ` along |
| 540 | `u : Spec A ⟶ Z`. Assume `K` has characteristic zero for every field-valued point |
| 541 | `Spec K ⟶ Spec A`, `B` is integral over `A`, and `p : Spec B ⟶ W` is a monomorphism. |
| 542 | Let `σ` be the action of `Δ` on `B` compatible with the action `s` on `W` (`specMap f` is the |
| 543 | morphism of spectra induced by `f`). If an ideal `I` of `B` contains the image of no nonzero element |
| 544 | of `A` and contains all the conjugates `σ g b`, then `b` is nilpotent. -/ |
| 545 | lemma IsGaloisCovering.isNilpotent_of_forall_mem {R : CommRingCat} {W Z : Over (Spec R)} |
| 546 | {c : W ⟶ Z} {Δ : FiniteGrp} {s : Δ →* CategoryTheory.End W} (hG : IsGaloisCovering c s) |
| 547 | {A B : Type} [CommRing A] [CommRing B] [Algebra A B] [Algebra.IsIntegral A B] |
| 548 | (h_char : ∀ (K : Type) [Field K], (Spec (of K) ⟶ Spec (of A)) → CharZero K) |
| 549 | {p : Spec (of B) ⟶ W.left} {u : Spec (of A) ⟶ Z.left} [Mono p] |
| 550 | (hp : IsPullback p (specMap (algebraMap A B)) c.left u) {σ : Δ →* (B →ₐ[A] B)ᵐᵒᵖ} |
| 551 | (hσ : ∀ g : Δ, specMap (σ g).unop ≫ p = p ≫ (s g).asHom.left) {I : Ideal B} |
| 552 | (hI : I.comap (algebraMap A B) = ⊥) {b : B} (hb : ∀ g : Δ, (σ g).unop b ∈ I) : |
| 553 | IsNilpotent b := by |
| 554 | -- Every prime of `B` is conjugate to one containing `I`. |
| 555 | refine nilpotent_iff_mem_prime.mpr fun 𝔮 h𝔮 ↦ ?_ |
| 556 | obtain ⟨Q, hQ, hQ_prime, h_under⟩ : |
| 557 | ∃ Q ≥ I, Q.IsPrime ∧ Q.comap (algebraMap A B) = 𝔮.under A := |
| 558 | exists_ideal_over_prime_of_isIntegral (𝔮.under A) I (hI.trans_le bot_le) |
| 559 | let Q' : Spec (of B) := ⟨Q, hQ_prime⟩ |
| 560 | let 𝔮' : Spec (of B) := ⟨𝔮, h𝔮⟩ |
| 561 | obtain ⟨g, hg⟩ : ∃ g : Δ, (s g).asHom.left (p Q') = p 𝔮' := |
| 562 | hG.exists_apply_eq_of_apply_eq h_char _ hp.w Q' 𝔮' (PrimeSpectrum.ext h_under.symm) |
| 563 | -- `p` is injective on points, so `g` moves `Q` to `𝔮` already in `Spec B`. |
| 564 | have h_move : specMap ((σ g).unop : B →+* B) Q' = 𝔮' := |
| 565 | p.injective ((congrArg (fun f ↦ f Q') (hσ g)).trans hg) |
| 566 | have h_comap : Q.comap (σ g).unop = 𝔮 := congrArg PrimeSpectrum.asIdeal h_move |
| 567 | exact h_comap.le (hQ (hb g)) |
| 568 | |
| 569 | /-- Let `Ω` be a Galois extension of a field `K`, both algebras over `A`. If all `A`-algebra maps |
| 570 | `B → Ω` take the same value at `z`, this value lies in `K`. -/ |
| 571 | lemma mem_range_algebraMap_of_forall_apply_eq {A B K Ω : Type*} [CommRing A] [CommRing B] |
| 572 | [Algebra A B] [Field K] [Field Ω] [Algebra K Ω] [IsGalois K Ω] [Algebra A K] [Algebra A Ω] |
| 573 | [IsScalarTower A K Ω] (χ : B →ₐ[A] Ω) {z : B} (hz : ∀ x : B →ₐ[A] Ω, x z = χ z) : |
| 574 | χ z ∈ Set.range (algebraMap K Ω) := |
| 575 | (InfiniteGalois.mem_bot_iff_fixed _).mpr fun τ ↦ hz ((τ.restrictScalars A).toAlgHom.comp χ) |
| 576 | |
| 577 | /-- Let `c : W ⟶ Z` be a Galois covering with group `Δ`, with `W` proper and `Z` separated over |
| 578 | `R`. Let `A` be étale over a normal domain `P` and suppose `K` has characteristic zero for every |
| 579 | field-valued point `Spec K ⟶ Spec A`. Let `Spec B` be the pull-back of `c` along `u : Spec A ⟶ Z`. |
| 580 | If `B` is reduced and finite over `A` and the projection `p : Spec B ⟶ W` is a |
| 581 | monomorphism, then `B` is étale over `A`. |
| 582 | (Galois covering: `c` is surjective and `Δ`, acting through `s`, is simply transitive on its fibres |
| 583 | of points in fields of characteristic zero; `specMap f` is the morphism of spectra induced by the |
| 584 | ring map `f`.) -/ |
| 585 | lemma IsGaloisCovering.etale_of_isPullback {R : CommRingCat} {W Z : Over (Spec R)} [IsProper W.hom] |
| 586 | [IsSeparated Z.hom] {c : W ⟶ Z} {Δ : FiniteGrp} {s : Δ →* CategoryTheory.End W} |
| 587 | (hG : IsGaloisCovering c s) (P : Type) [CommRing P] [IsDomain P] [IsIntegrallyClosed P] |
| 588 | {A B : Type} [CommRing A] [Algebra P A] [Algebra.Etale P A] |
| 589 | [CommRing B] [IsReduced B] [Algebra A B] [Module.Finite A B] |
| 590 | (h_char : ∀ (K : Type) [Field K], (Spec (of K) ⟶ Spec (of A)) → CharZero K) |
| 591 | {p : Spec (of B) ⟶ W.left} {u : Spec (of A) ⟶ Z.left} [Mono p] |
| 592 | (hp : IsPullback p (specMap (algebraMap A B)) c.left u) : |
| 593 | Algebra.Etale A B := by |
| 594 | -- The group `Δ` acts on `B`, simply transitively on field-valued points. By |
| 595 | -- `etale_of_simply_transitive` it remains to see that `A → B` is injective with image `B^Δ`. |
| 596 | obtain ⟨σ, hσ, h_points⟩ := hG.exists_simply_transitive_action h_char hp |
| 597 | have h_charA {K : Type} [Field K] [Algebra A K] : CharZero K := |
| 598 | h_char K (specMap (algebraMap A K)) |
| 599 | -- `N = A ⊗ Frac P` is a finite product of fields. Choose a point of `B` over an algebraic |
| 600 | -- closure of each factor; together they form `χ`, which is injective on `A`. |
| 601 | let F : Type := FractionRing P |
| 602 | let N : Type := A ⊗[P] F |
| 603 | let : Algebra F N := rightAlgebra |
| 604 | have : Algebra.Etale F N := .of_equiv (commRight P F A) |
| 605 | have : IsReduced N := isReduced_of_field F N |
| 606 | have : Module.Free F N := .of_divisionRing F N |
| 607 | have : Module.Finite F N := finite_of_free F N |
| 608 | have : IsArtinianRing F := DivisionRing.instIsArtinianRing |
| 609 | have : IsArtinianRing N := of_finite F N |
| 610 | let (m : MaximalSpectrum N) : Field (N ⧸ m.asIdeal) := Quotient.field m.asIdeal |
| 611 | let Ω (m : MaximalSpectrum N) : Type := AlgebraicClosure (N ⧸ m.asIdeal) |
| 612 | have hN_inj : Function.Injective (algebraMap N (∀ m : MaximalSpectrum N, Ω m)) := |
| 613 | algebraMap_pi_injective fun _ ↦ RingHom.injective _ |
| 614 | have h_point (m : MaximalSpectrum N) : Nonempty (B →ₐ[A] Ω m) := by |
| 615 | obtain ⟨y, hy⟩ : ∃ y : Spec (of (Ω m)) ⟶ W.left, |
| 616 | y ≫ c.left = specMap (algebraMap A (Ω m)) ≫ u := |
| 617 | (Scheme.Hom.exists_comp_eq_iff_mem_range c.left _).2 (hG.surjective.surj _) |
| 618 | exact (exists_algHom_specMap_comp_eq hp (Ω m) y hy).nonempty |
| 619 | let χ : B →ₐ[A] ∀ m : MaximalSpectrum N, Ω m := .pi fun m ↦ (h_point m).some |
| 620 | have hχ (x : A) : χ (algebraMap A B x) = algebraMap N _ (algebraMap A N x) := χ.commutes x |
| 621 | have hA_inj : Function.Injective ((χ : B →+* ∀ m, Ω m).comp (algebraMap A B)) := |
| 622 | fun x x' h ↦ includeLeft_injective (S := P) (IsFractionRing.injective P F) |
| 623 | (hN_inj ((hχ x).symm.trans (h.trans (hχ x')))) |
| 624 | refine etale_of_simply_transitive (.of_comp (f := χ) hA_inj) σ h_points fun z hz ↦ ?_ |
| 625 | -- All points of `B` in a component `Ω m` agree on the invariant `z`, so `χ z` lies in `N`. |
| 626 | have h_mem (m : MaximalSpectrum N) : χ z m ∈ Set.range (algebraMap (N ⧸ m.asIdeal) (Ω m)) := by |
| 627 | let χₘ : B →ₐ[A] Ω m := (evalAlgHom _ _ m).comp χ |
| 628 | refine mem_range_algebraMap_of_forall_apply_eq χₘ fun x ↦ ?_ |
| 629 | obtain ⟨g, hg, -⟩ := h_points (Ω m) x χₘ |
| 630 | simpa [hz] using hg z |
| 631 | obtain ⟨v, hv⟩ : ∃ v : N, algebraMap N (∀ m : MaximalSpectrum N, Ω m) v = χ z := |
| 632 | exists_algebraMap_pi_eq h_mem |
| 633 | -- `v` is integral over `A`, and `A` is integrally closed in `N`, being smooth over normal `P`. |
| 634 | have hχz_int : IsIntegral A (χ z) := .map χ (.of_finite A z) |
| 635 | have hv_int : IsIntegral A v := .tower_bot hN_inj (by rwa [hv]) |
| 636 | obtain ⟨x, rfl⟩ : ∃ x : A, algebraMap A N x = v := |
| 637 | exists_algebraMap_eq_of_isIntegral_of_smooth hv_int |
| 638 | -- The invariant `x - z` and its conjugates lie in `ker χ`, so it is nilpotent, hence zero. |
| 639 | have h_ker (g : Δ) : (σ g).unop (algebraMap A B x - z) ∈ RingHom.ker χ := by |
| 640 | rw [map_sub, AlgHom.commutes, hz, mem_ker, map_sub, hχ, hv, sub_self] |
| 641 | have h_bot : (RingHom.ker χ).comap (algebraMap A B) = ⊥ := comap_bot_of_injective _ hA_inj |
| 642 | exact ⟨x, sub_eq_zero.mp (hG.isNilpotent_of_forall_mem h_char hp hσ h_bot h_ker).eq_zero⟩ |
| 643 | |
| 644 | /-- If the base change of `c : W ⟶ Z` to the fibre product `Z ×_T E` is smooth of relative dimension |
| 645 | `0` and `Z ×_T E ⟶ E` of relative dimension `d`, then the base change of `c ≫ f : W ⟶ T` along any |
| 646 | map factoring through `i : E ⟶ T` is smooth of relative dimension `d`. -/ |
| 647 | lemma smoothOfRelativeDimension_pullback_snd_comp (d : ℕ) {W Z T E K : Scheme} (c : W ⟶ Z) |
| 648 | (f : Z ⟶ T) (i : E ⟶ T) (ψ : K ⟶ E) [SmoothOfRelativeDimension d (snd f i)] |
| 649 | [SmoothOfRelativeDimension 0 (snd c (fst f i))] : |
| 650 | SmoothOfRelativeDimension d (snd (c ≫ f) (ψ ≫ i)) := by |
| 651 | have h_comp : SmoothOfRelativeDimension d (snd c (fst f i) ≫ snd f i) := by |
| 652 | simpa using smoothOfRelativeDimension_comp 0 d (snd c (fst f i)) (snd f i) |
| 653 | have h_square : IsPullback (fst c (fst f i)) (snd c (fst f i) ≫ snd f i) (c ≫ f) i := |
| 654 | .paste_vert (.of_hasPullback _ _) (.of_hasPullback _ _) |
| 655 | exact (smoothOfRelativeDimension_isStableUnderBaseChange d).of_isPullback |
| 656 | ((IsPullback.of_hasPullback (c ≫ f) (ψ ≫ i)).of_right' h_square) h_comp |
| 657 | |
| 658 | /-- Let `c : W ⟶ Z` be a Galois covering over `Spec R` for a domain `R`: `c` is surjective, and a |
| 659 | finite group `Δ` acts on `W` over `Z` through `s`, simply transitively on the fibres over points |
| 660 | with values in fields of characteristic 0. Suppose `W` is proper and reduced and `Z` is separated |
| 661 | and smooth of relative dimension `d`. Then for any field `k` of characteristic 0 into which `R` |
| 662 | injects, the base change of `W` to `k` is smooth of relative dimension `d` over `Spec k` |
| 663 | (`specMap f` is the morphism of spectra induced by the ring map `f`). -/ |
| 664 | lemma IsGaloisCovering.smoothOfRelativeDimension_baseChange {R : CommRingCat} [IsDomain R] |
| 665 | {W Z : Over (Spec R)} [IsProper W.hom] [IsSeparated Z.hom] {c : W ⟶ Z} {Δ : FiniteGrp} |
| 666 | {s : Δ →* CategoryTheory.End W} (hG : IsGaloisCovering c s) (d : ℕ) |
| 667 | [IsReduced W.left] [SmoothOfRelativeDimension d Z.hom] (k : Type) [Field k] [CharZero k] |
| 668 | [Algebra R k] [FaithfulSMul R k] : |
| 669 | SmoothOfRelativeDimension d (pullback.snd W.hom (specMap (algebraMap R k))) := by |
| 670 | -- Pass to the function field of `R`, through which `R → k` factors. There `c` becomes a finite |
| 671 | -- map `q` from a reduced scheme to a smooth one, and `q` is étale by `etale_of_isPullback`. |
| 672 | let E : Type := (Spec R).functionField |
| 673 | let ι : Spec (of E) ⟶ Spec R := (Spec R).fromSpecStalk (genericPoint (Spec R)) |
| 674 | have hι : ι = specMap (algebraMap R E) := fromSpecStalk_eq R _ |
| 675 | let ψ : E →+* k := IsFractionRing.lift (FaithfulSMul.algebraMap_injective R k) |
| 676 | have hψ : specMap ψ ≫ ι = specMap (algebraMap R k) := by |
| 677 | have h_comp : ψ.comp (algebraMap R E) = algebraMap R k := lift_comp _ |
| 678 | rw [hι, ← h_comp, ← Spec.map_comp, ← ofHom_comp] |
| 679 | -- The generic fibre of `Z`, and the pull-back `q` of `c` to it. |
| 680 | let π : pullback Z.hom ι ⟶ Z.left := fst Z.hom ι |
| 681 | let q : pullback c.left π ⟶ pullback Z.hom ι := snd c.left π |
| 682 | have h_char (K : Type) [Field K] (y : Spec (of K) ⟶ pullback Z.hom ι) : CharZero K := |
| 683 | (charZero_iff (Spec.preimage (y ≫ snd Z.hom ι)).hom.injective).1 ψ.charZero |
| 684 | -- The generic fibre of `W` is reduced, and `q` has finite fibres. |
| 685 | have : IsReduced (pullback c.left π) := isReduced_pullback_of_flat c.left π |
| 686 | have : AlgebraicGeometry.Surjective c.left := hG.surjective |
| 687 | have h_fibre (x : ↥(pullback c.left π)) : (q ⁻¹' {q x}).Finite := |
| 688 | hG.finite_preimage_singleton h_char (fst c.left π).injective q condition x |
| 689 | have : LocallyQuasiFinite q := of_finite_preimage_singleton q (q.surjective.forall.2 h_fibre) |
| 690 | have : IsFinite q := .of_isProper_of_locallyQuasiFinite q |
| 691 | -- By base change along `ψ` it suffices that `q` is smooth of relative dimension `0`. |
| 692 | suffices h_zero : SmoothOfRelativeDimension 0 q by |
| 693 | rw [← hψ, ← c.w] |
| 694 | exact smoothOfRelativeDimension_pullback_snd_comp d c.left Z.hom ι (specMap ψ) |
| 695 | refine ⟨fun x ↦ ?_⟩ |
| 696 | -- Near `q x`, over an affine open `V`, the generic fibre of `Z` is étale over a polynomial ring |
| 697 | -- over the function field; apply `etale_of_isPullback` with this ring as `P`. |
| 698 | obtain ⟨⟨V, (hV : IsAffineOpen V)⟩, hx, h_smooth⟩ := |
| 699 | SmoothOfRelativeDimension.exists_isStandardSmoothOfRelativeDimension_appLE_top (snd ..) d (q x) |
| 700 | have hV' : IsAffineOpen (q ⁻¹ᵁ V) := hV.preimage q |
| 701 | refine ⟨V, hV, q ⁻¹ᵁ V, hV', hx, le_rfl, etale_iff_isStandardSmoothOfRelativeDimension_zero.1 ?_⟩ |
| 702 | let P : Type := MvPolynomial (Fin d) Γ(Spec (of E), ⊤) |
| 703 | obtain ⟨f, hf_etale⟩ : ∃ f : P →+* Γ(pullback Z.hom ι, V), f.Etale := |
| 704 | h_smooth.exists_etale_mvPolynomial.imp fun _ ↦ And.right |
| 705 | have h_finite : (q.appLE V (q ⁻¹ᵁ V) le_rfl).hom.Finite := by |
| 706 | simpa only [← q.app_eq_appLE] using q.finite_app V hV |
| 707 | have h_affine : IsPullback (Spec.map (q.appLE V (q ⁻¹ᵁ V) le_rfl)) hV'.fromSpec hV.fromSpec q := |
| 708 | isPullback _ _ _ _ (hV.SpecMap_appLE_fromSpec q hV' le_rfl).symm (by simp) |
| 709 | -- `hf_etale` and `h_finite` become instances for the algebra structures given by the two maps |
| 710 | algebraize [f, (q.appLE V (q ⁻¹ᵁ V) le_rfl).hom] |
| 711 | exact hG.etale_of_isPullback P (fun K _ y ↦ h_char K (y ≫ hV.fromSpec)) |
| 712 | (h_affine.flip.paste_horiz (.of_hasPullback c.left π)) |
| 713 | |
| 714 | end GaloisCovers |
| 715 | |
| 716 | end New.Variety |
| 717 | |
| 718 | end |