Skip to content

Commit 8da6dc5

Browse files
committed
feat(RingTheory): miscellaneous lemmas about etale (#30857)
1 parent b6ead3d commit 8da6dc5

File tree

8 files changed

+64
-11
lines changed

8 files changed

+64
-11
lines changed

Mathlib/AlgebraicGeometry/Morphisms/FormallyUnramified.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ theorem of_comp {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z)
9898
[FormallyUnramified (f ≫ g)] : FormallyUnramified f :=
9999
HasRingHomProperty.of_comp (fun {R S T _ _ _} f g H ↦ by
100100
algebraize [f, g, g.comp f]
101-
exact Algebra.FormallyUnramified.of_comp R S T) ‹_›
101+
exact Algebra.FormallyUnramified.of_restrictScalars R S T) ‹_›
102102

103103
instance : MorphismProperty.IsMultiplicative @FormallyUnramified where
104104
id_mem _ := inferInstance

Mathlib/RingTheory/Etale/Basic.lean

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,29 @@ end OfEquiv
108108

109109
section Comp
110110

111+
variable [Algebra A B] [IsScalarTower R A B]
112+
111113
variable (R A B) in
112-
theorem comp [Algebra A B] [IsScalarTower R A B] [FormallyEtale R A] [FormallyEtale A B] :
114+
theorem comp [FormallyEtale R A] [FormallyEtale A B] :
113115
FormallyEtale R B :=
114116
FormallyEtale.iff_formallyUnramified_and_formallySmooth.mpr
115117
⟨FormallyUnramified.comp R A B, FormallySmooth.comp R A B⟩
116118

119+
lemma Algebra.FormallyEtale.of_restrictScalars [FormallyUnramified R A] [FormallyEtale R B] :
120+
FormallyEtale A B :=
121+
have := FormallyUnramified.of_restrictScalars R A B
122+
have := FormallySmooth.of_restrictScalars R A B
123+
.of_formallyUnramified_and_formallySmooth
124+
117125
end Comp
118126

127+
lemma Algebra.FormallyEtale.iff_of_surjective
128+
{R S : Type u} [CommRing R] [CommRing S]
129+
[Algebra R S] (h : Function.Surjective (algebraMap R S)) :
130+
Algebra.FormallyEtale R S ↔ IsIdempotentElem (RingHom.ker (algebraMap R S)) := by
131+
rw [FormallyEtale.iff_formallyUnramified_and_formallySmooth, ← FormallySmooth.iff_of_surjective h,
132+
and_iff_right (FormallyUnramified.of_surjective (Algebra.ofId R S) h)]
133+
119134
section BaseChange
120135

121136
open scoped TensorProduct

Mathlib/RingTheory/RingHom/Unramified.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ lemma propertyIsLocal :
9797
have H : Submonoid.powers r ≤ (Submonoid.powers (f r)).comap f := by
9898
rintro x ⟨n, rfl⟩; exact ⟨n, by simp⟩
9999
have : IsScalarTower R R' S' := .of_algebraMap_eq' (IsLocalization.map_comp H).symm
100-
exact Algebra.FormallyUnramified.of_comp R R' S'
100+
exact Algebra.FormallyUnramified.of_restrictScalars R R' S'
101101
· exact ofLocalizationSpanTarget
102102
· exact ofLocalizationSpanTarget.ofLocalizationSpan
103103
(stableUnderComposition.stableUnderCompositionWithLocalizationAway

Mathlib/RingTheory/Smooth/Basic.lean

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Mathlib.RingTheory.FiniteStability
77
import Mathlib.RingTheory.Ideal.Quotient.Nilpotent
88
import Mathlib.RingTheory.Localization.Away.AdjoinRoot
99
import Mathlib.RingTheory.Smooth.Kaehler
10+
import Mathlib.RingTheory.Unramified.Basic
1011

1112
/-!
1213
@@ -381,6 +382,8 @@ open scoped Polynomial in
381382
instance polynomial (R : Type*) [CommRing R] :
382383
FormallySmooth R R[X] := .of_equiv (MvPolynomial.pUnitAlgEquiv.{_, 0} R)
383384

385+
instance : FormallySmooth R R := .of_equiv (MvPolynomial.isEmptyAlgEquiv R Empty)
386+
384387
end Polynomial
385388

386389
section Comp
@@ -397,8 +400,41 @@ theorem comp [FormallySmooth R A] [FormallySmooth A B] : FormallySmooth R B := b
397400
apply_fun AlgHom.restrictScalars R at e'
398401
exact ⟨f''.restrictScalars _, e'.trans (AlgHom.ext fun _ => rfl)⟩
399402

403+
lemma of_restrictScalars [FormallyUnramified R A] [FormallySmooth R B] :
404+
FormallySmooth A B := by
405+
refine iff_comp_surjective.mpr fun C _ _ I hI f ↦ ?_
406+
algebraize [(algebraMap A C).comp (algebraMap R A)]
407+
obtain ⟨g, hg⟩ := Algebra.FormallySmooth.comp_surjective _ _ I hI (f.restrictScalars R)
408+
suffices g.comp (IsScalarTower.toAlgHom R A B) = IsScalarTower.toAlgHom R A C from
409+
⟨{ __ := g, commutes' x := congr($this x) }, AlgHom.ext fun x ↦ congr($hg x)⟩
410+
apply Algebra.FormallyUnramified.comp_injective _ hI
411+
rw [← AlgHom.comp_assoc, hg]
412+
exact AlgHom.ext f.commutes
413+
400414
end Comp
401415

416+
section surjective
417+
418+
variable {R : Type*} [CommRing R]
419+
variable {P A : Type*} [CommRing A] [Algebra R A] [CommRing P] [Algebra R P]
420+
variable (f : P →ₐ[R] A)
421+
422+
lemma iff_of_surjective (h : Function.Surjective (algebraMap R A)) :
423+
Algebra.FormallySmooth R A ↔ IsIdempotentElem (RingHom.ker (algebraMap R A)) := by
424+
rw [Algebra.FormallySmooth.iff_split_surjection (Algebra.ofId R A) h]
425+
constructor
426+
· intro ⟨g, hg⟩
427+
let e : A ≃ₐ[R] R ⧸ RingHom.ker (algebraMap R A) ^ 2 :=
428+
.ofAlgHom _ _ (Ideal.Quotient.algHom_ext _ (by ext)) hg
429+
rw [IsIdempotentElem, ← pow_two, ← Ideal.mk_ker (I := _ ^ 2), ← Ideal.Quotient.algebraMap_eq,
430+
← e.toAlgHom.comp_algebraMap, RingHom.ker_comp_of_injective _ (by exact e.injective)]
431+
· intro H
432+
let e := (Ideal.quotientEquivAlgOfEq _ ((pow_two _).trans H)).trans
433+
(Ideal.quotientKerAlgEquivOfSurjective (f := Algebra.ofId R A) h)
434+
exact ⟨e.symm.toAlgHom, AlgHom.ext <| h.forall.mpr fun x ↦ by simp⟩
435+
436+
end surjective
437+
402438
section BaseChange
403439

404440
open scoped TensorProduct

Mathlib/RingTheory/Unramified/Basic.lean

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ theorem comp [FormallyUnramified R A] [FormallyUnramified A B] :
220220
congr
221221
exact FormallyUnramified.ext I ⟨2, hI⟩ (AlgHom.congr_fun e)
222222

223-
theorem of_comp [FormallyUnramified R B] : FormallyUnramified A B := by
223+
theorem of_restrictScalars [FormallyUnramified R B] : FormallyUnramified A B := by
224224
rw [iff_comp_injective]
225225
intro Q _ _ I e f₁ f₂ e'
226226
letI := ((algebraMap A Q).comp (algebraMap R A)).toAlgebra
@@ -230,6 +230,8 @@ theorem of_comp [FormallyUnramified R B] : FormallyUnramified A B := by
230230
intro x
231231
exact AlgHom.congr_fun e' x
232232

233+
@[deprecated (since := "2025-10-24")] alias of_comp := of_restrictScalars
234+
233235
end Comp
234236

235237
section of_surjective
@@ -308,7 +310,7 @@ The intended use is for copying proofs between `Formally{Unramified, Smooth, Eta
308310
without the need to change anything (including removing redundant arguments). -/
309311
@[nolint unusedArguments]
310312
theorem localization_base [FormallyUnramified R Sₘ] : FormallyUnramified Rₘ Sₘ :=
311-
FormallyUnramified.of_comp R Rₘ Sₘ
313+
FormallyUnramified.of_restrictScalars R Rₘ Sₘ
312314

313315
theorem localization_map [FormallyUnramified R S] :
314316
FormallyUnramified Rₘ Sₘ := by

Mathlib/RingTheory/Unramified/Field.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ theorem range_eq_top_of_isPurelyInseparable
197197
theorem isSeparable : Algebra.IsSeparable K L := by
198198
have := finite_of_free (R := K) (S := L)
199199
rw [← separableClosure.eq_top_iff]
200-
have := of_comp K (separableClosure K L) L
200+
have := of_restrictScalars K (separableClosure K L) L
201201
have := EssFiniteType.of_comp K (separableClosure K L) L
202202
ext
203203
change _ ↔ _ ∈ (⊤ : Subring _)

Mathlib/RingTheory/Unramified/LocalRing.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ instance : FormallyUnramified S (ResidueField S) := .quotient _
3434
instance [FormallyUnramified R S] :
3535
FormallyUnramified (ResidueField R) (ResidueField S) :=
3636
have : FormallyUnramified R (ResidueField S) := .comp _ S _
37-
.of_comp R _ _
37+
.of_restrictScalars R _ _
3838

3939
variable [EssFiniteType R S]
4040

@@ -56,7 +56,7 @@ lemma FormallyUnramified.isField_quotient_map_maximalIdeal [FormallyUnramified R
5656
have hmR : mR ≤ maximalIdeal S := ((local_hom_TFAE (algebraMap R S)).out 0 2 rfl rfl).mp ‹_›
5757
letI : Algebra (ResidueField R) (S ⧸ mR) := inferInstanceAs (Algebra (R ⧸ _) _)
5858
have : IsScalarTower R (ResidueField R) (S ⧸ mR) := inferInstanceAs (IsScalarTower R (R ⧸ _) _)
59-
have : FormallyUnramified (ResidueField R) (S ⧸ mR) := .of_comp R _ _
59+
have : FormallyUnramified (ResidueField R) (S ⧸ mR) := .of_restrictScalars R _ _
6060
have : EssFiniteType (ResidueField R) (S ⧸ mR) := .of_comp R _ _
6161
have : Module.Finite (ResidueField R) (S ⧸ mR) := FormallyUnramified.finite_of_free _ _
6262
have : IsReduced (S ⧸ mR) := FormallyUnramified.isReduced_of_field (ResidueField R) (S ⧸ mR)
@@ -131,7 +131,7 @@ lemma isUnramifiedAt_iff_map_eq [EssFiniteType R S]
131131
Localization.isLocalHom_localRingHom _ _ _ Ideal.LiesOver.over
132132
have : EssFiniteType (Localization.AtPrime p) (Localization.AtPrime q) := .of_comp R _ _
133133
trans Algebra.FormallyUnramified (Localization.AtPrime p) (Localization.AtPrime q)
134-
· exact ⟨fun _ ↦ .of_comp R _ _,
134+
· exact ⟨fun _ ↦ .of_restrictScalars R _ _,
135135
fun _ ↦ Algebra.FormallyUnramified.comp _ (Localization.AtPrime p) _⟩
136136
rw [FormallyUnramified.iff_map_maximalIdeal_eq]
137137
congr!

Mathlib/RingTheory/Unramified/Locus.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ lemma IsUnramifiedAt.comp
4848
(p : Ideal A) (P : Ideal B) [P.LiesOver p] [p.IsPrime] [P.IsPrime]
4949
[IsUnramifiedAt R p] [IsUnramifiedAt A P] : IsUnramifiedAt R P := by
5050
have : FormallyUnramified (Localization.AtPrime p) (Localization.AtPrime P) :=
51-
.of_comp A _ _
51+
.of_restrictScalars A _ _
5252
exact FormallyUnramified.comp R (Localization.AtPrime p) _
5353

5454
variable (R) in
5555
lemma IsUnramifiedAt.of_restrictScalars (P : Ideal B) [P.IsPrime]
5656
[IsUnramifiedAt R P] : IsUnramifiedAt A P :=
57-
FormallyUnramified.of_comp R _ _
57+
FormallyUnramified.of_restrictScalars R _ _
5858

5959
end
6060

0 commit comments

Comments
 (0)