Skip to content

Commit 672ea22

Browse files
committed
feat(RingTheory): local structure of unramified algebras (leanprover-community#35023)
1 parent 1932ef2 commit 672ea22

3 files changed

Lines changed: 142 additions & 13 deletions

File tree

Mathlib/RingTheory/Localization/Away/AdjoinRoot.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ lemma Algebra.FinitePresentation.of_isLocalizationAway
5252
instance {S : Type*} [CommRing S] [Algebra R S] [Algebra.FinitePresentation R S] (f : S) :
5353
Algebra.FinitePresentation R (Localization.Away f) :=
5454
.of_isLocalizationAway f
55+
56+
instance {S : Type*} [CommRing S] [Algebra R S] [Algebra.FiniteType R S] (f : S) :
57+
Algebra.FiniteType R (Localization.Away f) :=
58+
.trans ‹_› inferInstance

Mathlib/RingTheory/Localization/Away/Basic.lean

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,30 @@ lemma awayMap_surjective_iff {f : R →+* S} {r : R} :
478478
Function.Surjective (Localization.awayMap f r) ↔ ∀ a, ∃ b m, f b = f r ^ m * a :=
479479
IsLocalization.Away.map_surjective_iff _ _ _ _
480480

481+
lemma awayMap_injective_of_dvd {R : Type*} [CommRing R] (f : R →+* S)
482+
{a b : R} (h : a ∣ b) (H : Function.Injective (awayMap f a)) :
483+
Function.Injective (awayMap f b) := by
484+
simp only [awayMap_injective_iff] at H ⊢
485+
obtain ⟨b, rfl⟩ := h
486+
refine fun x hx ↦ ?_
487+
obtain ⟨n, hn⟩ := H x hx
488+
exact ⟨n, by simp [mul_pow, mul_assoc, mul_left_comm (a ^ n), hn]⟩
489+
490+
omit [Algebra R S] in
491+
lemma awayMap_surjective_of_dvd (f : R →+* S)
492+
{a b : R} (h : a ∣ b) (H : Function.Surjective (awayMap f a)) :
493+
Function.Surjective (awayMap f b) := by
494+
simp only [awayMap_surjective_iff] at H ⊢
495+
obtain ⟨b, rfl⟩ := h
496+
refine fun x ↦ ?_
497+
obtain ⟨c, m, e⟩ := H x
498+
exact ⟨b ^ m * c, m, by simp [mul_pow, e, mul_assoc, mul_left_comm]⟩
499+
500+
lemma awayMap_bijective_of_dvd {R : Type*} [CommRing R] (f : R →+* S)
501+
{a b : R} (h : a ∣ b) (H : Function.Bijective (awayMap f a)) :
502+
Function.Bijective (awayMap f b) :=
503+
⟨awayMap_injective_of_dvd f h H.1, awayMap_surjective_of_dvd f h H.2
504+
481505
variable {A : Type*} [CommSemiring A] [Algebra R A]
482506
variable {B : Type*} [CommSemiring B] [Algebra R B]
483507

Mathlib/RingTheory/Unramified/LocalStructure.lean

Lines changed: 114 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Authors: Andrew Yang
55
-/
66
module
77

8+
public import Mathlib.RingTheory.Etale.Locus
89
public import Mathlib.RingTheory.Etale.StandardEtale
910
public import Mathlib.RingTheory.LocalRing.ResidueField.Instances
10-
public import Mathlib.RingTheory.LocalRing.ResidueField.Polynomial
11-
public import Mathlib.RingTheory.Spectrum.Prime.Noetherian
11+
public import Mathlib.RingTheory.RingHom.StandardSmooth
1212
public import Mathlib.RingTheory.Unramified.LocalRing
13-
public import Mathlib.RingTheory.QuasiFinite.Basic
13+
public import Mathlib.RingTheory.ZariskisMainTheorem
1414

1515
/-!
1616
@@ -20,16 +20,21 @@ In this file, we will prove that if `S` is a finite type `R`-algebra unramified
2020
there exists `f ∉ Q` and a standard etale algebra `A` over `R` that surjects onto `S[1/f]`.
2121
Geometrically, this says that unramified morphisms locally are closed subsets of etale covers.
2222
23+
As a corollary, we also obtain results about the local structure of etale and smooth algebras.
24+
2325
## Main definition and results
2426
- `HasStandardEtaleSurjectionOn`: The predicate
2527
"there exists a standard etale algebra `A` over `R` that surjects onto `S[1/f]`".
26-
- `Algebra.IsUnramified.exist_HasStandardEtaleSurjectionOn_of_exists_adjoin_singleton_eq_top`:
27-
The claim is true when `S` has the form `R[X]/I` and is finite over `R`.
28-
- `Algebra.IsUnramified.exist_HasStandardEtaleSurjectionOn_of_finite`:
29-
The claim is true when `S` is finite over `R`.
30-
31-
## TODO (@erdOne)
32-
- Extend the result to arbitrary finite-type algebras (needs Zariski's main theorem).
28+
- `Algebra.IsUnramifiedAt.exists_hasStandardEtaleSurjectionOn`:
29+
If `S` is a finite type `R`-algebra that is unramified at a prime `p`, then
30+
there exists a standard etale algebra over `R` that surjects onto `S[1/f]` for some `f ∉ p`.
31+
- `Algebra.IsEtaleAt.exists_isStandardEtale`:
32+
If `S` is a finitely presented `R`-algebra that is etale at a prime `p`, then
33+
`S[1/f]` is standard etale for some `f ∉ p`.
34+
- `Algebra.IsSmoothAt.exists_isStandardEtale_mvPolynomial`:
35+
If `S` is a finitely presented `R`-algebra that is smooth at a prime `p`, then
36+
there exists some `f ∉ p` such that `S[1/f]` is `R`-isomorphic to a standard etale algebra
37+
over `R[x₁,...,xₙ]`.
3338
3439
-/
3540

@@ -118,7 +123,8 @@ private theorem exists_hasStandardEtaleSurjectionOn_of_exists_adjoin_singleton_e
118123
· simp [← Algebra.TensorProduct.right_algebraMap_apply, ← IsScalarTower.algebraMap_apply]
119124

120125
attribute [local simp] aeval_algebraMap_apply in
121-
lemma exists_hasStandardEtaleSurjectionOn_of_exists_adjoin_singleton_eq_top
126+
-- Subsumed by `Algebra.IsUnramifiedAt.exists_hasStandardEtaleSurjectionOn`.
127+
private lemma exists_hasStandardEtaleSurjectionOn_of_exists_adjoin_singleton_eq_top
122128
[Module.Finite R S] (H : ∃ x : S, Algebra.adjoin R {x} = ⊤)
123129
(Q : Ideal S) [Q.IsPrime] [Algebra.IsUnramifiedAt R Q] :
124130
∃ f ∉ Q, HasStandardEtaleSurjectionOn R f := by
@@ -261,7 +267,8 @@ lemma exists_primesOver_under_adjoin_eq_singleton_and_residueField_bijective
261267
rw [AlgHom.toRingHom_eq_coe, IsScalarTower.coe_toAlgHom, ← IsScalarTower.algebraMap_apply]
262268
rfl
263269

264-
lemma exists_hasStandardEtaleSurjectionAt_of_finite
270+
-- Subsumed by `Algebra.IsUnramifiedAt.exists_hasStandardEtaleSurjectionOn`.
271+
private lemma exists_hasStandardEtaleSurjectionOn_of_finite
265272
(Q : Ideal S) [Q.IsPrime] [Module.Finite R S] [Algebra.IsUnramifiedAt R Q] :
266273
∃ f ∉ Q, HasStandardEtaleSurjectionOn R f := by
267274
obtain ⟨x, hQ', hQ'Q⟩ :=
@@ -286,4 +293,98 @@ lemma exists_hasStandardEtaleSurjectionAt_of_finite
286293
((Localization.awayMapₐ (IsScalarTower.toAlgHom _ _ S) (f * r)).comp φ)
287294
(by exact (H _ (by simp)).surjective.comp hP)⟩
288295

289-
end Algebra.IsUnramifiedAt
296+
attribute [local instance high] Module.Free.of_divisionRing in
297+
instance (priority := low)
298+
[Algebra.EssFiniteType R S] [Algebra.FormallyUnramified R S] : Algebra.QuasiFinite R S where
299+
finite_fiber _ _ := Algebra.FormallyUnramified.finite_of_free _ _
300+
301+
lemma exists_hasStandardEtaleSurjectionOn
302+
(Q : Ideal S) [Q.IsPrime] [FiniteType R S] [IsUnramifiedAt R Q] :
303+
∃ f ∉ Q, HasStandardEtaleSurjectionOn R f := by
304+
wlog H : Algebra.Unramified R S
305+
· obtain ⟨s, hsQ, hs⟩ := Algebra.exists_formallyUnramified_of_isUnramifiedAt (R := R) Q
306+
have hQ : (Ideal.map (algebraMap S (Localization.Away s)) Q).IsPrime :=
307+
IsLocalization.isPrime_of_isPrime_disjoint (.powers s) _ _ ‹_› (by simp [Set.disjoint_iff,
308+
Set.ext_iff, Submonoid.mem_powers_iff, mt (‹Q.IsPrime›.mem_of_pow_mem _) hsQ])
309+
have inst : Unramified R (Localization.Away s) := {}
310+
obtain ⟨f, hf, H⟩ := this (R := R)
311+
(Q.map (algebraMap _ (Localization.Away s))) inferInstance
312+
obtain ⟨f, t, rfl⟩ := IsLocalization.exists_mk'_eq (.powers s) f
313+
refine ⟨s * f, ?_, ?_⟩
314+
· simpa [IsLocalization.mk'_mem_map_algebraMap_iff, Submonoid.mem_powers_iff,
315+
Ideal.IsPrime.mul_mem_left_iff, hsQ, (mt (‹Q.IsPrime›.mem_of_pow_mem _) hsQ)] using hf
316+
obtain ⟨P, φ, hφ⟩ : HasStandardEtaleSurjectionOn R (algebraMap S (Localization.Away s) f) :=
317+
H.of_dvd ⟨algebraMap _ _ t.1, by simp⟩
318+
exact .mk _ hφ
319+
obtain ⟨S', hS', r, hrQ, hr⟩ := ZariskisMainProperty.of_finiteType (R := R) Q
320+
|>.exists_fg_and_exists_notMem_and_awayMap_bijective
321+
have : Module.Finite R S' := ⟨(Submodule.fg_top _).mpr hS'⟩
322+
have : Algebra.FormallyUnramified R (Localization.Away r) :=
323+
.of_equiv (AlgEquiv.ofBijective (Localization.awayMapₐ S'.val r) hr:).symm
324+
have : IsUnramifiedAt R (Ideal.under (↥S') Q) := by
325+
rw [← Algebra.basicOpen_subset_unramifiedLocus_iff] at this
326+
exact @this ⟨Q.under S', inferInstance⟩ hrQ
327+
obtain ⟨f, hfQ, hf⟩ :=
328+
Algebra.IsUnramifiedAt.exists_hasStandardEtaleSurjectionOn_of_finite (R := R) (Q.under S')
329+
let e : Localization.Away (r * f) ≃ₐ[R] Localization.Away (r.1 * f.1) :=
330+
.ofBijective (Localization.awayMapₐ S'.val (r * f))
331+
(Localization.awayMap_bijective_of_dvd _ (dvd_mul_right r f) hr)
332+
obtain ⟨P, φ, hφ⟩ := hf.of_dvd (g := r * f) (by simp)
333+
refine ⟨_, ‹Q.IsPrime›.mul_notMem hrQ hfQ,
334+
.mk (f := r.1 * f.1) (e.toAlgHom.comp φ) (e.surjective.comp hφ)⟩
335+
336+
end IsUnramifiedAt
337+
338+
@[stacks 00UE]
339+
lemma IsEtaleAt.exists_isStandardEtale
340+
(Q : Ideal S) [Q.IsPrime] [Algebra.FinitePresentation R S] [Algebra.IsEtaleAt R Q] :
341+
∃ f, f ∉ Q ∧ IsStandardEtale R (Localization.Away f) := by
342+
obtain ⟨f, hfQ, h⟩ := exists_etale_of_isEtaleAt (R := R) Q
343+
obtain ⟨g, hgQ, hg⟩ := Algebra.IsUnramifiedAt.exists_hasStandardEtaleSurjectionOn (R := R) Q
344+
have : Etale R (Localization.Away (f * g)) := by
345+
rw [← basicOpen_subset_etaleLocus_iff_etale] at h ⊢
346+
exact .trans (PrimeSpectrum.basicOpen_mul_le_left _ _) h
347+
exact ⟨f * g, ‹Q.IsPrime›.mul_notMem hfQ hgQ, (hg.of_dvd (by simp)).isStandardEtale⟩
348+
349+
/-- Given `S` a finitely presented `R`-algebra, and `p` a prime of `S`. If `S` is smooth over `R`
350+
at `p`, then there exists `f ∉ p` such that `R → S[1/f]` factors through some `R[X₁,...,Xₙ]`,
351+
and that `S[1/f]` is standard etale over `R[X₁,...,Xₙ]`. -/
352+
theorem IsSmoothAt.exists_isStandardEtale_mvPolynomial
353+
{p : Ideal S} [p.IsPrime] [Algebra.FinitePresentation R S] [Algebra.IsSmoothAt R p] :
354+
∃ f ∉ p, ∃ (n : ℕ) (_ : Algebra (MvPolynomial (Fin n) R) (Localization.Away f)),
355+
IsScalarTower R (MvPolynomial (Fin n) R) (Localization.Away f) ∧
356+
Algebra.IsStandardEtale (MvPolynomial (Fin n) R) (Localization.Away f) := by
357+
classical
358+
obtain ⟨f, hfp, H⟩ := Algebra.IsSmoothAt.exists_notMem_isStandardSmooth R p
359+
obtain ⟨n, φ, hgC, hg⟩ := RingHom.IsStandardSmooth.exists_etale_mvPolynomial
360+
(f := algebraMap R (Localization.Away f)) (by simpa [RingHom.isStandardSmooth_algebraMap])
361+
algebraize [φ]
362+
have := IsScalarTower.of_algebraMap_eq' hgC.symm
363+
have : (Ideal.map (algebraMap S (Localization.Away f)) p).IsPrime :=
364+
IsLocalization.isPrime_of_isPrime_disjoint (.powers f) _ _ ‹_›
365+
((Ideal.disjoint_powers_iff_notMem _ (Ideal.IsPrime.isRadical ‹_›)).mpr hfp)
366+
obtain ⟨g₀, hg, H⟩ := Algebra.IsEtaleAt.exists_isStandardEtale (R := (MvPolynomial (Fin n) R))
367+
(S := (Localization.Away f)) (p.map (algebraMap _ _))
368+
obtain ⟨g, ⟨_, m, rfl⟩, hg₀⟩ := IsLocalization.exists_mk'_eq (.powers f) g₀
369+
replace hg : g ∉ p := by simpa [Submonoid.mem_powers_iff, Ideal.IsPrime.mul_mem_iff_mem_or_mem,
370+
IsLocalization.mk'_mem_map_algebraMap_iff, mt (‹p.IsPrime›.mem_of_pow_mem _) hfp,
371+
← hg₀] using hg
372+
have : IsLocalization.Away (f * g) (Localization.Away g₀) := by
373+
suffices IsLocalization.Away (algebraMap _ (Localization.Away f) g) (Localization.Away g₀) from
374+
.mul' (Localization.Away f) _ _ _
375+
refine IsLocalization.Away.of_associated (r := g₀)
376+
⟨(IsLocalization.Away.algebraMap_pow_isUnit f m).unit, ?_⟩
377+
simp only [← hg₀, IsUnit.unit_spec, ← map_pow, mul_comm, IsLocalization.mk'_spec'_mk]
378+
let e : Localization.Away g₀ ≃ₐ[S] Localization.Away (f * g) :=
379+
IsLocalization.algEquiv (.powers (f * g)) _ _
380+
let : Algebra (MvPolynomial (Fin n) R) (Localization.Away (f * g)) :=
381+
(e.toRingHom.comp (algebraMap (MvPolynomial (Fin n) R) _)).toAlgebra
382+
have : IsScalarTower R (MvPolynomial (Fin n) R) (Localization.Away (f * g)) := by
383+
refine .of_algebraMap_eq' ?_
384+
simp only [RingHom.algebraMap_toAlgebra, RingHom.comp_assoc, ← IsScalarTower.algebraMap_eq]
385+
exact (e.toAlgHom.comp_algebraMap_of_tower (R := R)).symm
386+
let e' : Localization.Away g₀ ≃ₐ[MvPolynomial (Fin n) R] Localization.Away (f * g) :=
387+
{ __ := e, commutes' r := rfl }
388+
exact ⟨f * g, ‹p.IsPrime›.mul_notMem ‹_› ‹_›, n, ‹_›, ‹_›, .of_equiv e'⟩
389+
390+
end Algebra

0 commit comments

Comments
 (0)