module public import Mathlib.RingTheory.RegularLocalRing.Defs import Mathlib.Algebra.GroupWithZero.Submonoid.CancelMulZero import Mathlib.AlgebraicGeometry.Modules.Sheaf import Mathlib.AlgebraicGeometry.ZariskisMainTheorem import Mathlib.CategoryTheory.ExtremalEpi import Mathlib.RingTheory.Artinian.Instances import Mathlib.RingTheory.Etale.Weakly import Mathlib.RingTheory.Finiteness.ModuleFinitePresentation import Mathlib.RingTheory.PicardGroup import Mathlib.Topology.Baire.BaireMeasurable import TauCeti.AlgebraicGeometry.Morphisms.Smooth.StandardSmooth import TauCeti.Analysis.Analytic.Uniqueness public import Lib.LocalGL.Green.FaithfulCharacter public import Lib.Shimura.Uniformisation.HolomorphicFamilies public import Lib.Cohomology.Etale.Basic public import Lib.General.Geometry.DenseComplexPoints import Lib.General.Algebra.ComplexEmbeddings import Lib.General.Geometry.GeometricPoints import Lib.General.Geometry.PointsOfProperSchemes import Lib.PadicComparison.Descent.TestCategory /-! # Complex points over countable rings, Zariski generic members and Galois coverings This file collects tools for passing between points of schemes over a countable ring and complex points, and for building Galois coverings from complex points: Zariski generic members of holomorphic families, reduced closures of families of complex points, and criteria for coverings to be étale or smooth. ## Main definitions and results * `New.Variety.exists_generic_member`: if `X` is locally of finite type over a countable ring and `φ` is a holomorphic family of complex points of `X` on a connected open set `U`, some `φ b` specialises, in the Zariski topology, to every `φ c`. * `New.Variety.ReducedClosure`: the reduced closure in a finite product of schemes over `S` of a family of complex points; `New.Variety.ReducedClosure.exists_lift` constructs maps between two such closures. * `New.Variety.isGaloisCovering_of_complex_points`: over a countable domain whose maps to fields of characteristic 0 are injective, a surjective map from a proper to a separated scheme, with a finite group acting simply transitively on its fibres of complex points, is a Galois covering. * `New.Variety.IsGaloisCovering.smoothOfRelativeDimension_baseChange`: for a Galois covering `W → Z` over a domain `R`, with `W` proper and reduced and `Z` separated and smooth, the base change of `W` to a field of characteristic 0 containing `R` is smooth. Notions from other files: * `New.exists_ringHom_complex_extend` (`Lib.General.Algebra.ComplexEmbeddings`): an embedding of a countable ring into ℂ extends along an embedding into a field of cardinality at most that of ℂ. * `New.Variety.IsGaloisCovering`: Δ is a finite group of automorphisms of W over c : W → Z, c is surjective, and Δ acts simply transitively on the fibres of c on points with values in fields of characteristic 0. * `New.LandsIn t U`: the morphism t lands in the open U, that is, the preimage of U is everything. * `New.HolomorphicAt φ w`: for every function regular on an open set containing φ w, the nearby members of the family φ land in that open set and the function pulls back to one analytic at w. The parameter space is a finite-dimensional complex normed space (`FinComplexSpace`). * `New.IsSeparatingFamily ξ`: the scheme is reduced and the complex points ξ z are dense in it. ## Relation to the literature The étaleness criterion is that of Chase–Harrison–Rosenberg. -/ @[expose] public section noncomputable section namespace New.Variety /-! ## Zariski generic members of holomorphic families of complex points Idea: over a countable base, an affine open of finite type has countably many functions, so Baire's theorem and the identity theorem give a `b` at which no function vanishes unless it vanishes along all of `φ` nearby. -/ section GenericPoint open CategoryTheory AlgebraicGeometry IsLocalRing PointFn Algebra Spec /-- If `X` is locally of finite type over a countable ring, the ring of sections of `X` over an affine open `W` is countable. -/ lemma countable_sections {X : Scheme} {R : CommRingCat} (s : X ⟶ Spec R) [Countable R] [LocallyOfFiniteType s] {W : X.Opens} (h : IsAffineOpen W) : Countable Γ(X, W) := by -- The ring of sections is of finite type over `R`, so a quotient of a polynomial ring in finitely -- many variables, whose elements are finitely supported families of coefficients. have h_ring : (preimage (h.fromSpec ≫ s)).hom.FiniteType := by rw [← HasRingHomProperty.Spec_iff (P := @LocallyOfFiniteType), map_preimage] infer_instance algebraize [(preimage (h.fromSpec ≫ s)).hom] obtain ⟨n, f, hf⟩ := FiniteType.iff_quotient_mvPolynomial''.1 h_ring have := (MvPolynomial.basisMonomials (Fin n) R).repr.injective.countable exact hf.countable /-- Every residue field of a scheme locally of finite type over a countable ring is countable. -/ lemma countable_residueField {X : Scheme} {R : CommRingCat} (s : X ⟶ Spec R) [Countable R] [LocallyOfFiniteType s] (z : X) : Countable (X.residueField z) := by -- In an affine neighbourhood of z, its stalk is a localisation of the ring of sections. obtain ⟨_, ⟨W, hW, rfl⟩, hz, -⟩ := X.isBasis_affineOpens.exists_subset_of_mem_open (Set.mem_univ z) isOpen_univ have : Countable Γ(X, W) := countable_sections s hW let z' : W := ⟨z, hz⟩ let := X.presheaf.algebra_section_stalk z' have : Countable (X.presheaf.stalk z) := (hW.isLocalization_stalk z').mk'_surjective.countable exact (residue_surjective (R := X.presheaf.stalk z)).countable /-- Let `X` be locally of finite type over a countable ring. Every point `t : Spec K ⟶ X` with values in a field `K` factors through the residue field of a point `z` of `X`, as `Spec` of a ring map `φ` (written `specMap φ`) followed by the canonical map to `X`, and this residue field is countable. -/ lemma exists_countable_residue_point {X : Scheme} {R : CommRingCat} (s : X ⟶ Spec R) [Countable R] [LocallyOfFiniteType s] {K : Type} [Field K] (t : Spec (CommRingCat.of K) ⟶ X) : ∃ z : X, ∃ φ : X.residueField z →+* K, specMap φ ≫ X.fromSpecResidueField z = t ∧ Countable (X.residueField z) := by let z : X := t (closedPoint K) exact ⟨z, (X.SpecToEquivOfField K t).2.hom, (X.SpecToEquivOfField K).left_inv t, countable_residueField s z⟩ /-- For countably many analytic functions on a connected open set `N` and an open set `V` meeting `N`, some point of `N ∩ V` is a zero only of those functions that vanish on all of `N`. -/ lemma exists_mem_forall_ne_zero_of_analyticOnNhd {P : Type} [FinComplexSpace P] {ι : Type*} [Countable ι] (g : ι → P → ℂ) {N V : Set P} (hN_open : IsOpen N) (hN_conn : IsPreconnected N) (hg : ∀ i : ι, AnalyticOnNhd ℂ (g i) N) (hV : IsOpen V) (h_nonempty : (N ∩ V).Nonempty) : ∃ b ∈ N, b ∈ V ∧ ∀ i : ι, ∀ e ∈ N, g i e ≠ 0 → g i b ≠ 0 := by -- Each non-vanishing set `Z i` is open, so agrees with its closure on a residual set. let Z (i : ι) : Set P := N ∩ g i ⁻¹' {x : ℂ | x ≠ 0} have hZ (i : ι) : closure (Z i) =ᶠ[residual P] Z i := closure_residualEq ((hg i).continuousOn.isOpen_inter_preimage hN_open isOpen_ne).isLocallyClosed -- Baire: there are countably many `i`, so some `b ∈ N ∩ V` is good for all of them. have h_dense : Dense {e : P | ∀ i : ι, (e ∈ closure (Z i)) = (e ∈ Z i)} := dense_of_mem_residual (eventually_countable_forall.2 fun i ↦ Filter.eventuallyEqSet_iff'.1 (hZ i)) obtain ⟨b, hb_gen, hbN, hbV⟩ := h_dense.exists_mem_open (hN_open.inter hV) h_nonempty refine ⟨b, hbN, hbV, fun i e he hne ↦ ?_⟩ -- The identity theorem makes the nonvanishing set dense in `N`. have hb_closure : b ∈ closure (Z i) := hN_open.inter_closure ⟨hbN, (hg i).subset_closure_setOf_ne_zero hN_conn he hne hbN⟩ exact ((hb_gen i).mp hb_closure).2 /-- Let `X` be locally of finite type over a countable ring and `φ` a family of complex points of `X`, parametrised by a finite-dimensional complex space and holomorphic on the open set `U` (`HolomorphicAt`: regular functions pull back to analytic ones). If `c ∈ U` lies in the closure of an open set `V`, there is `b ∈ V` such that the image point of `φ b` specialises to that of `φ e` for all `e` near `c`. -/ lemma exists_mem_eventually_specializes {P : Type} [FinComplexSpace P] {U : Set P} {X : Scheme} {R : CommRingCat} (s : X ⟶ Spec R) [Countable R] [LocallyOfFiniteType s] {φ : P → (Spec (CommRingCat.of ℂ) ⟶ X)} (hU : IsOpen U) (hφ : ∀ b ∈ U, HolomorphicAt φ b) {V : Set P} (hV : IsOpen V) {c : P} (hcV : c ∈ closure V) (hcU : c ∈ U) : ∃ b ∈ V, ∀ᶠ e in nhds c, φ b (closedPoint ℂ) ⤳ φ e (closedPoint ℂ) := by -- Baire's theorem gives a `b` at which no section over an affine open around `φ c` vanishes, -- unless it vanishes identically along `φ` near `c`. obtain ⟨W, hW, hcW⟩ := exists_isAffineOpen_landsIn (φ c) have : Countable Γ(X, W) := countable_sections s hW let val (f : Γ(X, W)) (e : P) : ℂ := PointFn.ofSection f _ (φ e) -- A connected open neighbourhood `N ⊆ U` of `c` that `φ` maps into the affine open `W`. obtain ⟨N, ⟨hN_open, hcN, hN_conn⟩, hN⟩ : ∃ N : Set P, (IsOpen N ∧ c ∈ N ∧ _root_.IsConnected N) ∧ ∀ e ∈ N, e ∈ U ∧ LandsIn (φ e) W := -- holomorphy, applied to any section over `W`, says that `φ e` lands in `W` for `e` near `c` (LocallyConnectedSpace.open_connected_basis c).mem_iff.1 ((hU.eventually_mem hcU).and (hφ c hcU (isRegularOn_ofSection 0) hcW).1) have h_an (f : Γ(X, W)) : AnalyticOnNhd ℂ (val f) N := fun e he ↦ by obtain ⟨heU, heW⟩ := hN e he exact (hφ e heU (isRegularOn_ofSection f) heW).2 obtain ⟨b, hbN, hbV, h_ne⟩ : ∃ b ∈ N, b ∈ V ∧ ∀ f : Γ(X, W), ∀ e ∈ N, val f e ≠ 0 → val f b ≠ 0 := exists_mem_forall_ne_zero_of_analyticOnNhd val hN_open hN_conn.isPreconnected h_an hV (mem_closure_iff.1 hcV N hN_open hcN) -- Test the specialisation on basic opens of `W`: a point lies in the basic open of `f` exactly -- when the value of `f` there is a unit (`landsIn_basicOpen`). refine ⟨b, hbV, (hN_open.eventually_mem hcN).mono fun e he ↦ specializes_iff_forall_open.2 fun O hO heO ↦ ?_⟩ obtain ⟨-, heW⟩ := hN e he obtain ⟨f, hfO, hef⟩ := hW.exists_basicOpen_le (V := ⟨O, hO⟩) ⟨_, heO⟩ (landsIn_iff_mem.1 heW) have hfe : val f e ≠ 0 := ((landsIn_basicOpen heW f).1 (landsIn_iff_mem.2 hef)).ne_zero have hb_lands : LandsIn (φ b) (X.basicOpen f) := (landsIn_basicOpen (hN b hbN).2 f).2 (h_ne f e he hfe).isUnit exact hfO (landsIn_iff_mem.1 hb_lands) /-- Let `X` be locally of finite type over a countable ring and `φ` a family of complex points of `X`, parametrised by a finite-dimensional complex space and holomorphic (regular functions pull back to analytic ones) on a connected open set `U`. There is `b ∈ U` such that the image point of `φ b` specialises to the image point of `φ c` for every `c ∈ U`. -/ lemma exists_generic_member {P : Type} [FinComplexSpace P] {U : Set P} {X : Scheme} {R : CommRingCat} (s : X ⟶ Spec R) [Countable R] [LocallyOfFiniteType s] {φ : P → (Spec (CommRingCat.of ℂ) ⟶ X)} (hU : IsOpen U) (h_conn : IsConnected U) (hφ : ∀ b ∈ U, HolomorphicAt φ b) : ∃ b ∈ U, ∀ c ∈ U, φ b (closedPoint ℂ) ⤳ φ c (closedPoint ℂ) := by -- Locally there is a `b` such that `φ b` specialises to all nearby `φ e` -- (`exists_mem_eventually_specializes`). Connectedness spreads this over `U`. obtain ⟨c, hc⟩ := h_conn.nonempty obtain ⟨b, hb, hbc⟩ := exists_mem_eventually_specializes s hU hφ hU (subset_closure hc) hc -- The set of points near which `φ b` specialises to `φ e` is open, and closed in `U`. let G : Set P := {x : P | ∀ᶠ e in nhds x, φ b (closedPoint ℂ) ⤳ φ e (closedPoint ℂ)} have hG : IsOpen G := isOpen_setOfPred_eventually_nhds have h_all : U ⊆ G := by refine h_conn.isPreconnected.subset_of_closure_inter_subset hG ⟨c, hc, hbc⟩ fun x hx ↦ ?_ obtain ⟨d, hdG, hdx⟩ := exists_mem_eventually_specializes s hU hφ hG hx.1 hx.2 exact hdx.mono fun e hde ↦ hdG.self_of_nhds.trans hde exact ⟨b, hb, fun e he ↦ (h_all he).self_of_nhds⟩ end GenericPoint /-! ## Reduced closures in products and Galois coverings -/ section GaloisCovers open CategoryTheory AlgebraicGeometry Limits RingHom Over Set Scheme IsArtinianRing Pi pullback CommRingCat Ideal Quotient Algebra TensorProduct Function Finset Module Spec OverMorphism FormallyUnramified LocallyQuasiFinite IsOpenImmersion IsLocalization IsIntegralClosure attribute [local instance low] Fintype.ofFinite /-- Let `b` be a complex point of a scheme `S`, let `Z j` be finitely many schemes over `S`, and let `F j a` be a complex point of `Z j` over `b` for each `a : A`. A reduced closure of the tuples `(F j a)_j` is a reduced closed subscheme `W` (the field `scheme`) of the product of the `Z j` over `S`, with a dense family of complex points that lift these tuples. -/ structure ReducedClosure {S : Scheme} {b : Spec (of ℂ) ⟶ S} {J A : Type} [Finite J] {Z : J → Over S} (F : (j : J) → A → (Over.mk b ⟶ Z j)) where /-- The closure, a scheme over `S`. -/ scheme : Over S /-- The inclusion of `scheme` in the product of the `Z j`. -/ incl : scheme ⟶ ∏ᶜ Z /-- The complex point of `scheme` indexed by `a`. -/ point (a : A) : Over.mk b ⟶ scheme /-- The point `point a` lies over the point `(F j a)_j` of the product. -/ point_incl (a : A) : point a ≫ incl = Pi.lift fun j : J ↦ F j a /-- `incl` is a closed immersion. -/ isClosedImmersion : IsClosedImmersion incl.left /-- `scheme` is reduced and its points `point a` are dense in it. -/ isSeparatingFamily : IsSeparatingFamily fun a : A ↦ (point a).left attribute [instance] ReducedClosure.isClosedImmersion -- `S` is the base scheme, `b` a complex point of it, and `F j a` a complex point of the factor -- `Z j` over `b`, for `j` in the finite set `J` and `a` in the index set `A`. variable {S : Scheme} {b : Spec (of ℂ) ⟶ S} {J A : Type} [Finite J] {Z : J → Over S} {F : (j : J) → A → (Over.mk b ⟶ Z j)} /-- A reduced closure is a reduced scheme. -/ instance (C : ReducedClosure F) : AlgebraicGeometry.IsReduced C.scheme.left := C.isSeparatingFamily.1 /-- The morphism from the closure `C.scheme` to the factor `Z j`: the inclusion into the product followed by the `j`-th projection. -/ def ReducedClosure.proj (C : ReducedClosure F) (j : J) : C.scheme ⟶ Z j := C.incl ≫ Pi.π Z j @[simp] lemma ReducedClosure.point_comp_proj (C : ReducedClosure F) (a : A) (j : J) : C.point a ≫ C.proj j = F j a := by simp [proj, reassoc_of% point_incl] /-- Every family of tuples of complex points has a reduced closure. -/ instance : Nonempty (ReducedClosure F) := by obtain ⟨Y, i, e, h_closed, he, h_sep⟩ := exists_reduced_closure fun a : A ↦ (Pi.lift fun j : J ↦ F j a).left exact ⟨{ scheme := .mk (i ≫ (∏ᶜ Z).hom), incl := homMk i point a := homMk (e a) (by simp [reassoc_of% he]) point_incl a := ext (he a) isClosedImmersion := h_closed, isSeparatingFamily := h_sep }⟩ /-- Two morphisms over `S` to a reduced closure `C.scheme` agree as soon as their composites with all projections `C.proj j` to the factors agree. -/ lemma ReducedClosure.hom_ext (C : ReducedClosure F) {T : Over S} {f g : T ⟶ C.scheme} (h : ∀ j : J, f ≫ C.proj j = g ≫ C.proj j) : f = g := (mono_of_mono_left C.incl).right_cancellation f g (Pi.hom_ext _ _ h) /-- Let `C` and `C'` be reduced closures (reduced closed subschemes of `∏ᶜ Z` and `∏ᶜ Z'` over `S` with dense complex points) of families `F` and `F'` of complex points indexed by the same set `A`. Maps `f j` from `C'` to the factors `Z j` that send the point `a` of `C'` to `F j (σ a)` come from a map `g` to the closure `C`, and `g` sends the point `a` to the point `σ a`. Here `S` is the base scheme and `F j a` is a complex point of `Z j` over the fixed complex point `b` of `S`, with `j` in the finite set `J` and `a` in `A`. -/ lemma ReducedClosure.exists_lift (C : ReducedClosure F) {J' : Type} [Finite J'] {Z' : J' → Over S} {F' : (j : J') → A → (Over.mk b ⟶ Z' j)} {C' : ReducedClosure F'} (σ : A → A) (f : (j : J) → (C'.scheme ⟶ Z j)) (h : ∀ (a : A) (j : J), C'.point a ≫ f j = F j (σ a)) : ∃ g : C'.scheme ⟶ C.scheme, (∀ j : J, g ≫ C.proj j = f j) ∧ ∀ a : A, C'.point a ≫ g = C.point (σ a) := by -- The map `Pi.lift f` sends the dense points of the reduced scheme `C'.scheme` into the closed -- subscheme `C.scheme`, so it factors through it. have h_pt (a : A) : C.point (σ a) ≫ C.incl = C'.point a ≫ Pi.lift f := (C.point_incl (σ a)).trans (Pi.hom_ext _ _ fun j ↦ by simp [h]) obtain ⟨g, hg⟩ := exists_lift_of_dense_preimage C.incl.left (Pi.lift f).left <| C'.isSeparatingFamily.2.mono <| range_subset_iff.2 fun a ↦ ⟨(C.point (σ a)).left (IsLocalRing.closedPoint ℂ), congrArg (fun y ↦ y.left (IsLocalRing.closedPoint ℂ)) (h_pt a)⟩ let g' : C'.scheme ⟶ C.scheme := homMk g (by simpa using hg =≫ hom _) have h_incl : g' ≫ C.incl = Pi.lift f := ext hg have h_proj (j : J) : g' ≫ C.proj j = f j := by simp [proj, reassoc_of% h_incl] exact ⟨g', h_proj, fun a ↦ C.hom_ext fun j ↦ by simp [h_proj, h]⟩ /-- Chase–Harrison–Rosenberg. Let `B` be a finite `A`-algebra with `A → B` injective and `G` a finite group. Assume: (a) `σ` is a right action of `G` on `B` by `A`-algebra maps, that is `σ 1 = id` and `σ (g * h) = σ h ∘ σ g`; (b) for every field `k` over `A` and any two `A`-algebra maps `x y : B → k` there is exactly one `g` with `x ∘ σ g = y`; (c) every element of `B` fixed by all `σ g` comes from `A`. Then `B` is étale over `A`. -/ lemma etale_of_simply_transitive {A : Type*} {B : Type} {G : Type*} [CommRing A] [CommRing B] [Algebra A B] [Module.Finite A B] [Group G] [Finite G] (h_inj : Function.Injective (algebraMap A B)) (σ : G →* (B →ₐ[A] B)ᵐᵒᵖ) (h_points : ∀ (k : Type) [Field k] [Algebra A k] (x y : B →ₐ[A] k), ∃! g : G, ∀ b : B, x ((σ g).unop b) = y b) (h_invariant : ∀ s : B, (∀ g : G, (σ g).unop s = s) → ∃ a : A, algebraMap A B a = s) : Algebra.Etale A B := by classical -- Find `x i`, `y i` in `B` with `∑ i, σ g (y i) * x i = if g = 1 then 1 else 0`. With the trace -- `t` they form a dual basis, so `B` is projective; and `∑ i, y i ⊗ x i` is a separability -- element, so `B` is unramified. let tr : B →ₗ[A] B := ∑ g : G, (σ g).unop.toLinearMap let t : B →ₗ[A] A := tr.codRestrictOfInjective (Algebra.linearMap A B) h_inj fun s ↦ h_invariant (tr s) fun g ↦ by simpa [tr] using Equiv.sum_comp (.mulRight g) fun h ↦ (σ h).unop s have ht (s : B) : algebraMap A B (t s) = ∑ g : G, (σ g).unop s := by simpa [tr] using tr.codRestrictOfInjective_comp_apply (Algebra.linearMap A B) h_inj _ s -- The kernels of the maps `b ⊗ b' ↦ σ g b * b'` are pairwise coprime: a maximal ideal over two -- of them gives two points of `B` in its residue field, related by both group elements. let 𝔞 (g : G) : Ideal (B ⊗[A] B) := ker (productMap (σ g).unop (.id A B)) have h_coprime : Pairwise (IsCoprime on 𝔞) := by refine fun g g' h_ne ↦ isCoprime_iff_sup_eq.2 (by_contra fun h_sup ↦ h_ne ?_) obtain ⟨𝔪, h𝔪, h_le⟩ := exists_le_maximal _ h_sup let : Field (B ⊗[A] B ⧸ 𝔪) := Quotient.field 𝔪 let left : B →ₐ[A] B ⊗[A] B ⧸ 𝔪 := (mkₐ A 𝔪).comp includeLeft let right : B →ₐ[A] B ⊗[A] B ⧸ 𝔪 := (mkₐ A 𝔪).comp includeRight have h_rel (g : G) (hg : 𝔞 g ≤ 𝔪) (b : B) : right ((σ g).unop b) = left b := Ideal.Quotient.eq.2 (hg (show 1 ⊗ₜ[A] (σ g).unop b - b ⊗ₜ[A] 1 ∈ 𝔞 g by simp [𝔞])) exact (h_points _ right left).unique (h_rel g (le_sup_left.trans h_le)) (h_rel g' (le_sup_right.trans h_le)) -- Chinese remainder theorem: `u = ∑ i, y i ⊗ x i` is `1` modulo `𝔞 1` and `0` modulo the others. obtain ⟨u, hu⟩ : ∃ u : B ⊗[A] B, ∀ g : G, u - Pi.single (M := fun _ ↦ B ⊗[A] B) 1 1 g ∈ 𝔞 g := exists_forall_sub_mem_ideal h_coprime _ obtain ⟨r, y, x, rfl⟩ := exists_sum_tmul_eq u have h_delta (g : G) : ∑ i, (σ g).unop (y i) * x i = if g = 1 then 1 else 0 := by simpa [𝔞, sub_eq_zero, single_apply, apply_ite] using hu g have h_dual (z : B) : ∑ i, t (z * y i) • x i = z := calc ∑ i, t (z * y i) • x i _ = ∑ g : G, (σ g).unop z * ∑ i, (σ g).unop (y i) * x i := by simp [Algebra.smul_def, ht, sum_mul, mul_sum, sum_comm (s := univ (α := G)), mul_assoc] _ = z := by simp [h_delta] -- Expand both sides in the dual basis and move the scalars across `⊗`. have h_swap (s : B) : ∑ i, (s * y i) ⊗ₜ[A] x i = ∑ i, x i ⊗ₜ[A] (s * y i) := calc ∑ j, (s * y j) ⊗ₜ[A] x j _ = ∑ j, (∑ i, t (s * y j * y i) • x i) ⊗ₜ[A] x j := by simp only [h_dual] _ = ∑ i, x i ⊗ₜ[A] ∑ j, t (s * y i * y j) • x j := by simp only [sum_tmul, tmul_sum, smul_tmul] exact sum_comm.trans (by simp only [mul_right_comm]) _ = ∑ i, x i ⊗ₜ[A] (s * y i) := by simp only [h_dual] have h_unramified : FormallyUnramified A B := by refine iff_exists_tensorProduct.2 ⟨∑ i, y i ⊗ₜ x i, fun s ↦ ?_, by simpa using h_delta 1⟩ have h_symm : ∑ i, y i ⊗ₜ[A] x i = ∑ i, x i ⊗ₜ[A] y i := by simpa using h_swap 1 rw [sub_mul, sub_eq_zero] calc (1 : B) ⊗ₜ[A] s * ∑ i, y i ⊗ₜ[A] x i _ = (1 : B) ⊗ₜ[A] s * ∑ i, x i ⊗ₜ[A] y i := by rw [h_symm] _ = s ⊗ₜ[A] (1 : B) * ∑ i, y i ⊗ₜ[A] x i := by simp [mul_sum, h_swap] have h_projective : Projective A B := .of_split (.pi fun i ↦ t.comp (.mulRight A (y i))) (Fintype.linearCombination A x) (LinearMap.ext h_dual) -- finite and projective, hence flat and finitely presented have : Module.FinitePresentation A B := finitePresentation_of_projective A B exact .of_formallyUnramified_of_flat /-- Let `R` be a countable domain, with a given map to `ℂ`, all of whose ring maps to fields of characteristic 0 are injective. Let `W` be proper over `R`, `Z` separated, and `c : W ⟶ Z` surjective and invariant under an action `s` of a finite group `Δ` on `W` that is simply transitive on the fibres of `c` on complex points (`specOver R ℂ` is `Spec ℂ` over `Spec R`). Then `c` is a Galois covering with group `Δ` in the sense of `New.Variety.IsGaloisCovering`: simple transitivity holds for points with values in any field of characteristic 0. -/ lemma isGaloisCovering_of_complex_points {R : CommRingCat} {W Z : Over (Spec R)} [IsProper W.hom] [IsSeparated Z.hom] {c : W ⟶ Z} {Δ : FiniteGrp} {s : Δ →* CategoryTheory.End W} [Countable R] [Algebra R ℂ] (hR : ∀ (k : Type) [Field k] [CharZero k] (f : R →+* k), Function.Injective f) (h_inv : ∀ g : Δ.toGrp, (s g).asHom ≫ c = c) (hc : AlgebraicGeometry.Surjective c.left) (h_orbit : ∀ y z : specOver R ℂ ⟶ W, y ≫ c = z ≫ c → ∃! g : Δ.toGrp, y ≫ (s g).asHom = z) : IsGaloisCovering c s := by refine ⟨h_inv, hc, fun k _ _ y y' hy ↦ ?_⟩ -- The pair `(y, y')` is a point of `W ×_Z W`. It factors through the residue field of its image -- `z`, which is countable and so embeds in `ℂ` over `R`. let p₁ : pullback c.left c.left ⟶ W.left := fst c.left c.left let p₂ : pullback c.left c.left ⟶ W.left := snd c.left c.left obtain ⟨x, rfl, rfl⟩ : ∃ x, x ≫ p₁ = y ∧ x ≫ p₂ = y' := ⟨lift y y' hy, lift_fst y y' hy, lift_snd y y' hy⟩ obtain ⟨z, φ, rfl, h_countable⟩ := exists_countable_residue_point (p₁ ≫ W.hom) x set j : Spec (residueField _ z) ⟶ pullback c.left c.left := fromSpecResidueField _ z have : CharZero (residueField _ z) := φ.charZero -- `R` maps injectively to the countable residue field and to `ℂ`, so `ψ` exists. obtain ⟨ψ, hψ⟩ : ∃ ψ : residueField _ z →+* ℂ, ψ.comp (Spec.preimage (j ≫ p₁ ≫ W.hom)).hom = algebraMap R ℂ := exists_ringHom_complex_extend (hR _ _) (hR ℂ _) (by simp [Cardinal.aleph0_le_continuum.trans']) -- Both projections of `specMap ψ ≫ j` are complex points over `R` with the same image in `Z`. have h_fibre : p₁ ≫ c.left = p₂ ≫ c.left := condition have h₁ : (specMap ψ ≫ j ≫ p₁) ≫ W.hom = (specOver R ℂ).hom := by simp [← hψ] let y₁ : specOver R ℂ ⟶ W := homMk (specMap ψ ≫ j ≫ p₁) h₁ let y₂ : specOver R ℂ ⟶ W := homMk (specMap ψ ≫ j ≫ p₂) <| by rw [← h₁, ← c.w] simp only [Category.assoc, reassoc_of% h_fibre] have h_complex : ∃! g : Δ, y₁ ≫ (s g).asHom = y₂ := h_orbit y₁ y₂ (OverMorphism.ext (by simp [y₁, y₂, h_fibre])) -- The maps `specMap φ` and `specMap ψ` between spectra of fields are epi, so they cancel. simpa [y₁, y₂, OverMorphism.ext_iff, cancel_epi] using h_complex /-- Let `c : W ⟶ Z` be a Galois covering with group `Δ` acting through `s`, and `π : T ⟶ Z` a map from a scheme whose field-valued points have characteristic zero. If `p : X ⟶ W` lies over `r : X ⟶ T`, then two points of `X` with the same image under `r` have images under `p` in the same `Δ`-orbit. -/ lemma IsGaloisCovering.exists_apply_eq_of_apply_eq.{u} {R : CommRingCat.{u}} {W Z : Over (Spec R)} {c : W ⟶ Z} {Δ : FiniteGrp} {s : Δ →* CategoryTheory.End W} (hG : IsGaloisCovering c s) {T X : Scheme} {π : T ⟶ Z.left} (h_char : ∀ (K : Type u) [Field K], (Spec (of K) ⟶ T) → CharZero K) {p : X ⟶ W.left} (r : X ⟶ T) (hr : p ≫ c.left = r ≫ π) (w v : X) (hv : r v = r w) : ∃ g : Δ, (s g).asHom.left (p w) = p v := by -- Lift `(v, w)` to a point `t` of the fibre product and use its residue field. obtain ⟨t, rfl, rfl⟩ := Pullback.exists_preimage_pullback v w hv let j : Spec (residueField _ t) ⟶ pullback r r := fromSpecResidueField _ t have : CharZero (residueField _ t) := h_char _ (j ≫ fst r r ≫ r) have h_fibre : (j ≫ snd r r ≫ p) ≫ c.left = (j ≫ fst r r ≫ p) ≫ c.left := by simp [hr, condition_assoc] obtain ⟨g, hg, -⟩ : ∃! g : Δ, (j ≫ snd r r ≫ p) ≫ (s g).asHom.left = j ≫ fst r r ≫ p := hG.torsor (residueField _ t) _ _ h_fibre refine ⟨g, ?_⟩ simpa [j] using congrArg (fun y ↦ y default) hg /-- Let `c : W ⟶ Z` be a Galois covering with group `Δ`, let `π : T ⟶ Z` be a map from a scheme whose field-valued points have characteristic zero, and let `p : X ⟶ W`, injective on points, lie over `r : X ⟶ T`. Then the fibres of `r` are finite. -/ lemma IsGaloisCovering.finite_preimage_singleton.{u} {R : CommRingCat.{u}} {W Z : Over (Spec R)} {c : W ⟶ Z} {Δ : FiniteGrp} {s : Δ →* CategoryTheory.End W} (hG : IsGaloisCovering c s) {T X : Scheme} {π : T ⟶ Z.left} (h_char : ∀ (K : Type u) [Field K], (Spec (of K) ⟶ T) → CharZero K) {p : X ⟶ W.left} (hp : Function.Injective p) (r : X ⟶ T) (hr : p ≫ c.left = r ≫ π) (x : X) : (r ⁻¹' {r x}).Finite := -- each fibre lies in the preimage of a `Δ`-orbit have h_orbit : r ⁻¹' {r x} ⊆ p ⁻¹' range fun g : Δ ↦ (s g).asHom.left (p x) := hG.exists_apply_eq_of_apply_eq h_char r hr x ((finite_range _).preimage hp.injOn).subset h_orbit /-- Let `Spec B` be the pull-back of `c : W ⟶ Z` along `u : Spec A ⟶ Z`, with projection `p` to `W`. A point `y` of `W` with values in an `A`-algebra `K` that lies over the point `Spec K ⟶ Spec A ⟶ Z` comes from an `A`-algebra map `B → K`. Here `specMap φ` is the morphism of spectra induced by a ring map `φ`. -/ lemma exists_algHom_specMap_comp_eq {W Z : Scheme} {c : W ⟶ Z} {A B : Type} [CommRing A] [CommRing B] [Algebra A B] {p : Spec (of B) ⟶ W} {u : Spec (of A) ⟶ Z} (hp : IsPullback p (specMap (algebraMap A B)) c u) (K : Type) [CommRing K] [Algebra A K] (y : Spec (of K) ⟶ W) (hy : y ≫ c = specMap (algebraMap A K) ≫ u) : ∃ χ : B →ₐ[A] K, specMap χ ≫ p = y := by let l : specOver A K ⟶ specOver A B := homMk (hp.lift y _ hy) (hp.lift_snd y _ hy) obtain ⟨χ, hχ⟩ := specOver.map_bijective.surjective l have h_left : specMap (χ : B →+* K) = hp.lift y _ hy := congrArg Hom.left hχ exact ⟨χ, by rw [h_left, hp.lift_fst]⟩ /-- Let `c : W ⟶ Z` be a Galois covering with group `Δ` acting through `s`, and let `Spec B` be its pull-back along `u : Spec A ⟶ Z`, where the field-valued points of `A` have characteristic zero. Then `Δ` acts on the `A`-algebra `B` from the right, compatibly with `s` and simply transitively on the field-valued points of `B` over `A`. (Galois covering: `c` is surjective and `Δ` is simply transitive on its fibres of points in fields of characteristic zero; `specMap φ` is the morphism of spectra induced by `φ`.) -/ lemma IsGaloisCovering.exists_simply_transitive_action {R : CommRingCat} {W Z : Over (Spec R)} {c : W ⟶ Z} {Δ : FiniteGrp} {s : Δ →* CategoryTheory.End W} (hG : IsGaloisCovering c s) {A B : Type} [CommRing A] [CommRing B] [Algebra A B] (h_char : ∀ (K : Type) [Field K], (Spec (of K) ⟶ Spec (of A)) → CharZero K) {p : Spec (of B) ⟶ W.left} {u : Spec (of A) ⟶ Z.left} (hp : IsPullback p (specMap (algebraMap A B)) c.left u) : ∃ σ : Δ →* (B →ₐ[A] B)ᵐᵒᵖ, (∀ g : Δ, specMap (σ g).unop ≫ p = p ≫ (s g).asHom.left) ∧ ∀ (K : Type) [Field K] [Algebra A K] (x y : B →ₐ[A] K), ∃! g : Δ, ∀ b : B, x ((σ g).unop b) = y b := by have h_exists (g : Δ) : ∃ χ : B →ₐ[A] B, specMap χ ≫ p = p ≫ (s g).asHom.left := exists_algHom_specMap_comp_eq hp B (p ≫ (s g).asHom.left) (by simp [← comp_left, hG.comp_eq, hp.w]) choose act h_act using h_exists -- Both points have the same projection to `Spec A`, so the pullback makes `p` detect equality. have h_base {K : Type} [CommRing K] [Algebra A K] (x : B →ₐ[A] K) : specMap (x : B →+* K) ≫ specMap (algebraMap A B) = specMap (algebraMap A K) := by simp [← Spec.map_comp, ← ofHom_comp] have h_cancel {K : Type} [CommRing K] [Algebra A K] (x y : B →ₐ[A] K) : specMap (x : B →+* K) ≫ p = specMap (y : B →+* K) ≫ p ↔ x = y := by refine ⟨fun h ↦ ?_, fun h ↦ by rw [h]⟩ have h_spec := hp.hom_ext h ((h_base x).trans (h_base y).symm) simpa [Spec.map_inj, ConcreteCategory.hom_ext_iff, AlgHom.ext_iff] using h_spec have h_comp {K : Type} [CommRing K] [Algebra A K] (x : B →ₐ[A] K) (g : Δ) : specMap (x.comp (act g) : B →+* K) ≫ p = (specMap (x : B →+* K) ≫ p) ≫ (s g).asHom.left := by rw [Category.assoc, ← h_act, ← Spec.map_comp_assoc] rfl have h_id : specMap (RingHom.id B) = 𝟙 (Spec (of B)) := Spec.map_id _ have h_one : act 1 = .id A B := (h_cancel _ _).1 (by simp [h_act, h_id]) have h_mul (g h : Δ) : act (g * h) = (act h).comp (act g) := (h_cancel _ _).1 (by simp [h_comp, h_act]) let σ : Δ →* (B →ₐ[A] B)ᵐᵒᵖ := { toFun g := .op (act g) map_one' := congrArg MulOpposite.op h_one map_mul' g h := congrArg MulOpposite.op (h_mul g h) } refine ⟨σ, h_act, fun K _ _ x y ↦ ?_⟩ have : CharZero K := h_char K (specMap (algebraMap A K)) have h_fibre : (specMap (x : B →+* K) ≫ p) ≫ c.left = (specMap (y : B →+* K) ≫ p) ≫ c.left := by simp [hp.w, ← Spec.map_comp_assoc, ← ofHom_comp] simpa [σ, ← h_comp, h_cancel, AlgHom.ext_iff] using hG.torsor K _ _ h_fibre section ProductOfFields -- `Ω m` is an algebra over the residue field of the reduced Artinian ring `N` at `m`. variable {N : Type*} [CommRing N] [IsArtinianRing N] [IsReduced N] {Ω : MaximalSpectrum N → Type*} [∀ m, CommRing (Ω m)] [∀ m, Algebra N (Ω m)] [∀ m, Algebra (N ⧸ m.asIdeal) (Ω m)] [∀ m, IsScalarTower N (N ⧸ m.asIdeal) (Ω m)] /-- A reduced Artinian ring `N` embeds in any product over its maximal ideals `m` of faithful algebras over the residue fields `N ⧸ m`. -/ lemma algebraMap_pi_injective (hΩ : ∀ m : MaximalSpectrum N, Function.Injective (algebraMap (N ⧸ m.asIdeal) (Ω m))) : Function.Injective (algebraMap N (∀ m : MaximalSpectrum N, Ω m)) := fun x y h_eq ↦ (equivPi N).injective <| funext fun m ↦ hΩ m <| by simpa [IsScalarTower.algebraMap_apply N (N ⧸ m.asIdeal) (Ω m)] using congrFun h_eq m /-- An element of the product of the `Ω m` whose components all come from the residue fields of the reduced Artinian ring `N` comes from `N`. -/ lemma exists_algebraMap_pi_eq {z : ∀ m : MaximalSpectrum N, Ω m} (hz : ∀ m : MaximalSpectrum N, z m ∈ Set.range (algebraMap (N ⧸ m.asIdeal) (Ω m))) : ∃ v : N, algebraMap N (∀ m : MaximalSpectrum N, Ω m) v = z := by choose w hw using hz obtain ⟨v, rfl⟩ := (equivPi N).surjective w exact ⟨v, funext fun m ↦ (IsScalarTower.algebraMap_apply _ _ _ _).trans (hw m)⟩ end ProductOfFields /-- If `A` is a smooth algebra over a normal domain `P`, then `A` is integrally closed in `A ⊗[P] Frac P`. -/ lemma exists_algebraMap_eq_of_isIntegral_of_smooth {P A : Type} [CommRing P] [IsIntegrallyClosed P] [CommRing A] [Algebra P A] [Algebra.Smooth P A] {v : A ⊗[P] FractionRing P} (hv : IsIntegral A v) : ∃ x : A, algebraMap A (A ⊗[P] FractionRing P) x = v := by -- Integral closure commutes with smooth base change, and `P` is its own integral closure. let F : Type := FractionRing P have h_normal : Function.Surjective (algebraMap P (integralClosure P F)) := fun z ↦ (isIntegral_iff.mp z.prop).imp fun _ ↦ Subtype.ext obtain ⟨w, hw⟩ : ∃ w : A ⊗[P] integralClosure P F, toIntegralClosure P A F w = ⟨v, hv⟩ := toIntegralClosure_bijective_of_smooth.surjective _ obtain ⟨x, rfl⟩ := includeLeft_surjective A A h_normal w exact ⟨x, congrArg Subtype.val hw⟩ /-- Let `Spec B` be the pull-back of a Galois covering `c : W ⟶ Z` with group `Δ` along `u : Spec A ⟶ Z`. Assume `K` has characteristic zero for every field-valued point `Spec K ⟶ Spec A`, `B` is integral over `A`, and `p : Spec B ⟶ W` is a monomorphism. Let `σ` be the action of `Δ` on `B` compatible with the action `s` on `W` (`specMap f` is the morphism of spectra induced by `f`). If an ideal `I` of `B` contains the image of no nonzero element of `A` and contains all the conjugates `σ g b`, then `b` is nilpotent. -/ lemma IsGaloisCovering.isNilpotent_of_forall_mem {R : CommRingCat} {W Z : Over (Spec R)} {c : W ⟶ Z} {Δ : FiniteGrp} {s : Δ →* CategoryTheory.End W} (hG : IsGaloisCovering c s) {A B : Type} [CommRing A] [CommRing B] [Algebra A B] [Algebra.IsIntegral A B] (h_char : ∀ (K : Type) [Field K], (Spec (of K) ⟶ Spec (of A)) → CharZero K) {p : Spec (of B) ⟶ W.left} {u : Spec (of A) ⟶ Z.left} [Mono p] (hp : IsPullback p (specMap (algebraMap A B)) c.left u) {σ : Δ →* (B →ₐ[A] B)ᵐᵒᵖ} (hσ : ∀ g : Δ, specMap (σ g).unop ≫ p = p ≫ (s g).asHom.left) {I : Ideal B} (hI : I.comap (algebraMap A B) = ⊥) {b : B} (hb : ∀ g : Δ, (σ g).unop b ∈ I) : IsNilpotent b := by -- Every prime of `B` is conjugate to one containing `I`. refine nilpotent_iff_mem_prime.mpr fun 𝔮 h𝔮 ↦ ?_ obtain ⟨Q, hQ, hQ_prime, h_under⟩ : ∃ Q ≥ I, Q.IsPrime ∧ Q.comap (algebraMap A B) = 𝔮.under A := exists_ideal_over_prime_of_isIntegral (𝔮.under A) I (hI.trans_le bot_le) let Q' : Spec (of B) := ⟨Q, hQ_prime⟩ let 𝔮' : Spec (of B) := ⟨𝔮, h𝔮⟩ obtain ⟨g, hg⟩ : ∃ g : Δ, (s g).asHom.left (p Q') = p 𝔮' := hG.exists_apply_eq_of_apply_eq h_char _ hp.w Q' 𝔮' (PrimeSpectrum.ext h_under.symm) -- `p` is injective on points, so `g` moves `Q` to `𝔮` already in `Spec B`. have h_move : specMap ((σ g).unop : B →+* B) Q' = 𝔮' := p.injective ((congrArg (fun f ↦ f Q') (hσ g)).trans hg) have h_comap : Q.comap (σ g).unop = 𝔮 := congrArg PrimeSpectrum.asIdeal h_move exact h_comap.le (hQ (hb g)) /-- Let `Ω` be a Galois extension of a field `K`, both algebras over `A`. If all `A`-algebra maps `B → Ω` take the same value at `z`, this value lies in `K`. -/ lemma mem_range_algebraMap_of_forall_apply_eq {A B K Ω : Type*} [CommRing A] [CommRing B] [Algebra A B] [Field K] [Field Ω] [Algebra K Ω] [IsGalois K Ω] [Algebra A K] [Algebra A Ω] [IsScalarTower A K Ω] (χ : B →ₐ[A] Ω) {z : B} (hz : ∀ x : B →ₐ[A] Ω, x z = χ z) : χ z ∈ Set.range (algebraMap K Ω) := (InfiniteGalois.mem_bot_iff_fixed _).mpr fun τ ↦ hz ((τ.restrictScalars A).toAlgHom.comp χ) /-- Let `c : W ⟶ Z` be a Galois covering with group `Δ`, with `W` proper and `Z` separated over `R`. Let `A` be étale over a normal domain `P` and suppose `K` has characteristic zero for every field-valued point `Spec K ⟶ Spec A`. Let `Spec B` be the pull-back of `c` along `u : Spec A ⟶ Z`. If `B` is reduced and finite over `A` and the projection `p : Spec B ⟶ W` is a monomorphism, then `B` is étale over `A`. (Galois covering: `c` is surjective and `Δ`, acting through `s`, is simply transitive on its fibres of points in fields of characteristic zero; `specMap f` is the morphism of spectra induced by the ring map `f`.) -/ lemma IsGaloisCovering.etale_of_isPullback {R : CommRingCat} {W Z : Over (Spec R)} [IsProper W.hom] [IsSeparated Z.hom] {c : W ⟶ Z} {Δ : FiniteGrp} {s : Δ →* CategoryTheory.End W} (hG : IsGaloisCovering c s) (P : Type) [CommRing P] [IsDomain P] [IsIntegrallyClosed P] {A B : Type} [CommRing A] [Algebra P A] [Algebra.Etale P A] [CommRing B] [IsReduced B] [Algebra A B] [Module.Finite A B] (h_char : ∀ (K : Type) [Field K], (Spec (of K) ⟶ Spec (of A)) → CharZero K) {p : Spec (of B) ⟶ W.left} {u : Spec (of A) ⟶ Z.left} [Mono p] (hp : IsPullback p (specMap (algebraMap A B)) c.left u) : Algebra.Etale A B := by -- The group `Δ` acts on `B`, simply transitively on field-valued points. By -- `etale_of_simply_transitive` it remains to see that `A → B` is injective with image `B^Δ`. obtain ⟨σ, hσ, h_points⟩ := hG.exists_simply_transitive_action h_char hp have h_charA {K : Type} [Field K] [Algebra A K] : CharZero K := h_char K (specMap (algebraMap A K)) -- `N = A ⊗ Frac P` is a finite product of fields. Choose a point of `B` over an algebraic -- closure of each factor; together they form `χ`, which is injective on `A`. let F : Type := FractionRing P let N : Type := A ⊗[P] F let : Algebra F N := rightAlgebra have : Algebra.Etale F N := .of_equiv (commRight P F A) have : IsReduced N := isReduced_of_field F N have : Module.Free F N := .of_divisionRing F N have : Module.Finite F N := finite_of_free F N have : IsArtinianRing F := DivisionRing.instIsArtinianRing have : IsArtinianRing N := of_finite F N let (m : MaximalSpectrum N) : Field (N ⧸ m.asIdeal) := Quotient.field m.asIdeal let Ω (m : MaximalSpectrum N) : Type := AlgebraicClosure (N ⧸ m.asIdeal) have hN_inj : Function.Injective (algebraMap N (∀ m : MaximalSpectrum N, Ω m)) := algebraMap_pi_injective fun _ ↦ RingHom.injective _ have h_point (m : MaximalSpectrum N) : Nonempty (B →ₐ[A] Ω m) := by obtain ⟨y, hy⟩ : ∃ y : Spec (of (Ω m)) ⟶ W.left, y ≫ c.left = specMap (algebraMap A (Ω m)) ≫ u := (Scheme.Hom.exists_comp_eq_iff_mem_range c.left _).2 (hG.surjective.surj _) exact (exists_algHom_specMap_comp_eq hp (Ω m) y hy).nonempty let χ : B →ₐ[A] ∀ m : MaximalSpectrum N, Ω m := .pi fun m ↦ (h_point m).some have hχ (x : A) : χ (algebraMap A B x) = algebraMap N _ (algebraMap A N x) := χ.commutes x have hA_inj : Function.Injective ((χ : B →+* ∀ m, Ω m).comp (algebraMap A B)) := fun x x' h ↦ includeLeft_injective (S := P) (IsFractionRing.injective P F) (hN_inj ((hχ x).symm.trans (h.trans (hχ x')))) refine etale_of_simply_transitive (.of_comp (f := χ) hA_inj) σ h_points fun z hz ↦ ?_ -- All points of `B` in a component `Ω m` agree on the invariant `z`, so `χ z` lies in `N`. have h_mem (m : MaximalSpectrum N) : χ z m ∈ Set.range (algebraMap (N ⧸ m.asIdeal) (Ω m)) := by let χₘ : B →ₐ[A] Ω m := (evalAlgHom _ _ m).comp χ refine mem_range_algebraMap_of_forall_apply_eq χₘ fun x ↦ ?_ obtain ⟨g, hg, -⟩ := h_points (Ω m) x χₘ simpa [hz] using hg z obtain ⟨v, hv⟩ : ∃ v : N, algebraMap N (∀ m : MaximalSpectrum N, Ω m) v = χ z := exists_algebraMap_pi_eq h_mem -- `v` is integral over `A`, and `A` is integrally closed in `N`, being smooth over normal `P`. have hχz_int : IsIntegral A (χ z) := .map χ (.of_finite A z) have hv_int : IsIntegral A v := .tower_bot hN_inj (by rwa [hv]) obtain ⟨x, rfl⟩ : ∃ x : A, algebraMap A N x = v := exists_algebraMap_eq_of_isIntegral_of_smooth hv_int -- The invariant `x - z` and its conjugates lie in `ker χ`, so it is nilpotent, hence zero. have h_ker (g : Δ) : (σ g).unop (algebraMap A B x - z) ∈ RingHom.ker χ := by rw [map_sub, AlgHom.commutes, hz, mem_ker, map_sub, hχ, hv, sub_self] have h_bot : (RingHom.ker χ).comap (algebraMap A B) = ⊥ := comap_bot_of_injective _ hA_inj exact ⟨x, sub_eq_zero.mp (hG.isNilpotent_of_forall_mem h_char hp hσ h_bot h_ker).eq_zero⟩ /-- If the base change of `c : W ⟶ Z` to the fibre product `Z ×_T E` is smooth of relative dimension `0` and `Z ×_T E ⟶ E` of relative dimension `d`, then the base change of `c ≫ f : W ⟶ T` along any map factoring through `i : E ⟶ T` is smooth of relative dimension `d`. -/ lemma smoothOfRelativeDimension_pullback_snd_comp (d : ℕ) {W Z T E K : Scheme} (c : W ⟶ Z) (f : Z ⟶ T) (i : E ⟶ T) (ψ : K ⟶ E) [SmoothOfRelativeDimension d (snd f i)] [SmoothOfRelativeDimension 0 (snd c (fst f i))] : SmoothOfRelativeDimension d (snd (c ≫ f) (ψ ≫ i)) := by have h_comp : SmoothOfRelativeDimension d (snd c (fst f i) ≫ snd f i) := by simpa using smoothOfRelativeDimension_comp 0 d (snd c (fst f i)) (snd f i) have h_square : IsPullback (fst c (fst f i)) (snd c (fst f i) ≫ snd f i) (c ≫ f) i := .paste_vert (.of_hasPullback _ _) (.of_hasPullback _ _) exact (smoothOfRelativeDimension_isStableUnderBaseChange d).of_isPullback ((IsPullback.of_hasPullback (c ≫ f) (ψ ≫ i)).of_right' h_square) h_comp /-- Let `c : W ⟶ Z` be a Galois covering over `Spec R` for a domain `R`: `c` is surjective, and a finite group `Δ` acts on `W` over `Z` through `s`, simply transitively on the fibres over points with values in fields of characteristic 0. Suppose `W` is proper and reduced and `Z` is separated and smooth of relative dimension `d`. Then for any field `k` of characteristic 0 into which `R` injects, the base change of `W` to `k` is smooth of relative dimension `d` over `Spec k` (`specMap f` is the morphism of spectra induced by the ring map `f`). -/ lemma IsGaloisCovering.smoothOfRelativeDimension_baseChange {R : CommRingCat} [IsDomain R] {W Z : Over (Spec R)} [IsProper W.hom] [IsSeparated Z.hom] {c : W ⟶ Z} {Δ : FiniteGrp} {s : Δ →* CategoryTheory.End W} (hG : IsGaloisCovering c s) (d : ℕ) [IsReduced W.left] [SmoothOfRelativeDimension d Z.hom] (k : Type) [Field k] [CharZero k] [Algebra R k] [FaithfulSMul R k] : SmoothOfRelativeDimension d (pullback.snd W.hom (specMap (algebraMap R k))) := by -- Pass to the function field of `R`, through which `R → k` factors. There `c` becomes a finite -- map `q` from a reduced scheme to a smooth one, and `q` is étale by `etale_of_isPullback`. let E : Type := (Spec R).functionField let ι : Spec (of E) ⟶ Spec R := (Spec R).fromSpecStalk (genericPoint (Spec R)) have hι : ι = specMap (algebraMap R E) := fromSpecStalk_eq R _ let ψ : E →+* k := IsFractionRing.lift (FaithfulSMul.algebraMap_injective R k) have hψ : specMap ψ ≫ ι = specMap (algebraMap R k) := by have h_comp : ψ.comp (algebraMap R E) = algebraMap R k := lift_comp _ rw [hι, ← h_comp, ← Spec.map_comp, ← ofHom_comp] -- The generic fibre of `Z`, and the pull-back `q` of `c` to it. let π : pullback Z.hom ι ⟶ Z.left := fst Z.hom ι let q : pullback c.left π ⟶ pullback Z.hom ι := snd c.left π have h_char (K : Type) [Field K] (y : Spec (of K) ⟶ pullback Z.hom ι) : CharZero K := (charZero_iff (Spec.preimage (y ≫ snd Z.hom ι)).hom.injective).1 ψ.charZero -- The generic fibre of `W` is reduced, and `q` has finite fibres. have : IsReduced (pullback c.left π) := isReduced_pullback_of_flat c.left π have : AlgebraicGeometry.Surjective c.left := hG.surjective have h_fibre (x : ↥(pullback c.left π)) : (q ⁻¹' {q x}).Finite := hG.finite_preimage_singleton h_char (fst c.left π).injective q condition x have : LocallyQuasiFinite q := of_finite_preimage_singleton q (q.surjective.forall.2 h_fibre) have : IsFinite q := .of_isProper_of_locallyQuasiFinite q -- By base change along `ψ` it suffices that `q` is smooth of relative dimension `0`. suffices h_zero : SmoothOfRelativeDimension 0 q by rw [← hψ, ← c.w] exact smoothOfRelativeDimension_pullback_snd_comp d c.left Z.hom ι (specMap ψ) refine ⟨fun x ↦ ?_⟩ -- Near `q x`, over an affine open `V`, the generic fibre of `Z` is étale over a polynomial ring -- over the function field; apply `etale_of_isPullback` with this ring as `P`. obtain ⟨⟨V, (hV : IsAffineOpen V)⟩, hx, h_smooth⟩ := SmoothOfRelativeDimension.exists_isStandardSmoothOfRelativeDimension_appLE_top (snd ..) d (q x) have hV' : IsAffineOpen (q ⁻¹ᵁ V) := hV.preimage q refine ⟨V, hV, q ⁻¹ᵁ V, hV', hx, le_rfl, etale_iff_isStandardSmoothOfRelativeDimension_zero.1 ?_⟩ let P : Type := MvPolynomial (Fin d) Γ(Spec (of E), ⊤) obtain ⟨f, hf_etale⟩ : ∃ f : P →+* Γ(pullback Z.hom ι, V), f.Etale := h_smooth.exists_etale_mvPolynomial.imp fun _ ↦ And.right have h_finite : (q.appLE V (q ⁻¹ᵁ V) le_rfl).hom.Finite := by simpa only [← q.app_eq_appLE] using q.finite_app V hV have h_affine : IsPullback (Spec.map (q.appLE V (q ⁻¹ᵁ V) le_rfl)) hV'.fromSpec hV.fromSpec q := isPullback _ _ _ _ (hV.SpecMap_appLE_fromSpec q hV' le_rfl).symm (by simp) -- `hf_etale` and `h_finite` become instances for the algebra structures given by the two maps algebraize [f, (q.appLE V (q ⁻¹ᵁ V) le_rfl).hom] exact hG.etale_of_isPullback P (fun K _ y ↦ h_char K (y ≫ hV.fromSpec)) (h_affine.flip.paste_horiz (.of_hasPullback c.left π)) end GaloisCovers end New.Variety end