Skip to content

Commit 4b80520

Browse files
committed
chore(RingTheory): redefine FormallySmooth in terms of Ω[S⁄R] and H¹(L_{S/R}) (#30876)
Previously `FormallySmooth` was defined in terms of an infinitesimal lifting criterion, which involved quantifying over all algebras in an universe. We also showed that this is equivalent to `Ω[S⁄R]` being projective and `H¹(L_{S/R}) = 0`. We change the definition to switch to the latter so that we do not need to quantify over types. As a plus we can generalize the universes of `FormallySmooth` and by extension `Smooth`, `Etale` etc.
1 parent 6f99f1e commit 4b80520

File tree

16 files changed

+447
-444
lines changed

16 files changed

+447
-444
lines changed

Mathlib/LinearAlgebra/Quotient/Defs.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Authors: Johannes Hölzl, Mario Carneiro, Kevin Buzzard, Yury Kudryashov
66
import Mathlib.Algebra.Module.Equiv.Defs
77
import Mathlib.Algebra.Module.Submodule.Defs
88
import Mathlib.GroupTheory.QuotientGroup.Defs
9+
import Mathlib.Logic.Small.Basic
910

1011
/-!
1112
# Quotients by submodules
@@ -197,6 +198,11 @@ theorem mk_surjective : Function.Surjective (@mk _ _ _ _ _ p) := by
197198
rintro ⟨x⟩
198199
exact ⟨x, rfl⟩
199200

201+
universe u in
202+
instance {R M : Type*} [Ring R] [AddCommGroup M] [Module R M] {N : Submodule R M} [Small.{u} M] :
203+
Small.{u} (M ⧸ N) :=
204+
small_of_surjective (Submodule.Quotient.mk_surjective _)
205+
200206
end Quotient
201207

202208
section

Mathlib/LinearAlgebra/TensorProduct/Basic.lean

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Copyright (c) 2018 Kenny Lau. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Kenny Lau, Mario Carneiro
55
-/
6-
import Mathlib.Algebra.Module.Submodule.Bilinear
76
import Mathlib.Algebra.Module.Equiv.Basic
7+
import Mathlib.Algebra.Module.Shrink
8+
import Mathlib.Algebra.Module.Submodule.Bilinear
89
import Mathlib.GroupTheory.Congruence.Hom
910
import Mathlib.Tactic.Abel
10-
import Mathlib.Tactic.SuppressCompilation
1111

1212
/-!
1313
# Tensor product of modules over commutative semirings.
@@ -1010,6 +1010,12 @@ lemma map_bijective {f : M →ₗ[R] N} {g : P →ₗ[R] Q}
10101010
Function.Bijective (map f g) :=
10111011
(TensorProduct.congr (.ofBijective f hf) (.ofBijective g hg)).bijective
10121012

1013+
universe u in
1014+
instance {R M N : Type*} [CommSemiring R] [AddCommMonoid M] [AddCommMonoid N]
1015+
[Module R M] [Module R N] [Small.{u} M] [Small.{u} N] : Small.{u} (M ⊗[R] N) :=
1016+
⟨_, ⟨(TensorProduct.congr
1017+
(Shrink.linearEquiv R M) (Shrink.linearEquiv R N)).symm.toEquiv⟩⟩
1018+
10131019
end TensorProduct
10141020

10151021
open scoped TensorProduct

Mathlib/RingTheory/Etale/Basic.lean

Lines changed: 66 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ import Mathlib.RingTheory.Unramified.Basic
1111
1212
# Étale morphisms
1313
14-
An `R`-algebra `A` is formally étale if for every `R`-algebra `B`,
14+
An `R`-algebra `A` is formally etale if `Ω[A⁄R]` and `H¹(L_{A/R})` both vanish.
15+
This is equivalent to the standard definition that "for every `R`-algebra `B`,
1516
every square-zero ideal `I : Ideal B` and `f : A →ₐ[R] B ⧸ I`, there exists
16-
exactly one lift `A →ₐ[R] B`.
17-
It is étale if it is formally étale and of finite presentation.
17+
exactly one lift `A →ₐ[R] B`".
18+
An `R`-algebra `A` is étale if it is formally étale and of finite presentation.
1819
1920
We show that the property extends onto nilpotent ideals, and that these properties are stable
2021
under `R`-algebra homomorphisms and compositions.
@@ -26,58 +27,78 @@ localization at an element.
2627

2728
open scoped TensorProduct
2829

29-
universe u
30+
universe u v
3031

3132
namespace Algebra
3233

33-
section
34+
variable {R : Type u} {A : Type v} {B : Type*} [CommRing R] [CommRing A] [Algebra R A]
35+
[CommRing B] [Algebra R B]
3436

35-
variable (R : Type u) [CommRing R]
36-
variable (A : Type u) [CommRing A] [Algebra R A]
37+
section
3738

38-
/-- An `R` algebra `A` is formally étale if for every `R`-algebra, every square-zero ideal
39-
`I : Ideal B` and `f : A →ₐ[R] B ⧸ I`, there exists exactly one lift `A →ₐ[R] B`. -/
39+
variable (R A) in
40+
/-- An `R`-algebra `A` is formally etale if both `Ω[A⁄R]` and `H¹(L_{A/R})` are zero.
41+
For the infinitesimal lifting definition, see `FormallyEtale.iff_comp_bijective`. -/
4042
@[mk_iff, stacks 00UQ]
4143
class FormallyEtale : Prop where
42-
comp_bijective :
43-
∀ ⦃B : Type u⦄ [CommRing B],
44-
∀ [Algebra R B] (I : Ideal B) (_ : I ^ 2 = ⊥),
45-
Function.Bijective ((Ideal.Quotient.mkₐ R I).comp : (A →ₐ[R] B) → A →ₐ[R] B ⧸ I)
44+
subsingleton_kaehlerDifferential : Subsingleton Ω[A⁄R]
45+
subsingleton_h1Cotangent : Subsingleton (H1Cotangent R A)
46+
47+
attribute [instance]
48+
FormallyEtale.subsingleton_kaehlerDifferential FormallyEtale.subsingleton_h1Cotangent
4649

4750
end
4851

4952
namespace FormallyEtale
5053

5154
section
5255

53-
variable {R : Type u} [CommRing R]
54-
variable {A : Type u} [CommRing A] [Algebra R A]
56+
instance (priority := 100) [FormallyEtale R A] :
57+
FormallyUnramified R A := ⟨inferInstance⟩
58+
59+
instance (priority := 100) [FormallyEtale R A] : FormallySmooth R A :=
60+
⟨inferInstance, inferInstance⟩
5561

56-
theorem iff_unramified_and_smooth :
57-
FormallyEtale R A ↔ FormallyUnramified R A ∧ FormallySmooth R A := by
58-
rw [FormallyUnramified.iff_comp_injective, formallySmooth_iff, formallyEtale_iff]
59-
simp_rw [← forall_and, Function.Bijective]
62+
theorem iff_formallyUnramified_and_formallySmooth :
63+
FormallyEtale R A ↔ FormallyUnramified R A ∧ FormallySmooth R A :=
64+
fun _ ↦ ⟨inferInstance, inferInstance⟩, fun ⟨_, _⟩ ↦ ⟨inferInstance, inferInstance⟩⟩
6065

61-
instance (priority := 100) to_unramified [h : FormallyEtale R A] :
62-
FormallyUnramified R A :=
63-
(FormallyEtale.iff_unramified_and_smooth.mp h).1
66+
@[deprecated (since := "2025-11-03")]
67+
alias iff_unramified_and_smooth := iff_formallyUnramified_and_formallySmooth
6468

65-
instance (priority := 100) to_smooth [h : FormallyEtale R A] : FormallySmooth R A :=
66-
(FormallyEtale.iff_unramified_and_smooth.mp h).2
69+
theorem of_formallyUnramified_and_formallySmooth [FormallyUnramified R A]
70+
[FormallySmooth R A] : FormallyEtale R A :=
71+
FormallyEtale.iff_formallyUnramified_and_formallySmooth.mpr ⟨‹_›, ‹_›⟩
6772

68-
theorem of_unramified_and_smooth [h₁ : FormallyUnramified R A]
69-
[h₂ : FormallySmooth R A] : FormallyEtale R A :=
70-
FormallyEtale.iff_unramified_and_smooth.mpr ⟨h₁, h₂⟩
73+
@[deprecated (since := "2025-11-03")]
74+
alias of_unramified_and_smooth := of_formallyUnramified_and_formallySmooth
75+
76+
variable (R A) in
77+
lemma comp_bijective [FormallyEtale R A] (I : Ideal B) (hI : I ^ 2 = ⊥) :
78+
Function.Bijective ((Ideal.Quotient.mkₐ R I).comp : (A →ₐ[R] B) → A →ₐ[R] B ⧸ I) :=
79+
⟨FormallyUnramified.comp_injective I hI, FormallySmooth.comp_surjective R A I hI⟩
80+
81+
/--
82+
An `R`-algebra `A` is formally etale iff "for every `R`-algebra `B`,
83+
every square-zero ideal `I : Ideal B` and `f : A →ₐ[R] B ⧸ I`, there exists
84+
a unique lift `A →ₐ[R] B`".
85+
-/
86+
theorem iff_comp_bijective :
87+
FormallyEtale R A ↔ ∀ ⦃B : Type max u v⦄ [CommRing B] [Algebra R B] (I : Ideal B), I ^ 2 = ⊥ →
88+
Function.Bijective ((Ideal.Quotient.mkₐ R I).comp : (A →ₐ[R] B) → A →ₐ[R] B ⧸ I) :=
89+
fun _ _ ↦ comp_bijective R A, fun H ↦
90+
have : FormallyUnramified R A := FormallyUnramified.iff_comp_injective_of_small.{max u v}.mpr
91+
(by aesop (add safe Function.Bijective.injective))
92+
have : FormallySmooth R A := FormallySmooth.of_comp_surjective
93+
(by aesop (add safe Function.Bijective.surjective))
94+
.of_formallyUnramified_and_formallySmooth⟩
7195

7296
end
7397

7498
section OfEquiv
7599

76-
variable {R : Type u} [CommRing R]
77-
variable {A B : Type u} [CommRing A] [Algebra R A] [CommRing B] [Algebra R B]
78-
79100
theorem of_equiv [FormallyEtale R A] (e : A ≃ₐ[R] B) : FormallyEtale R B :=
80-
FormallyEtale.iff_unramified_and_smooth.mpr
101+
FormallyEtale.iff_formallyUnramified_and_formallySmooth.mpr
81102
⟨FormallyUnramified.of_equiv e, FormallySmooth.of_equiv e⟩
82103

83104
theorem iff_of_equiv (e : A ≃ₐ[R] B) : FormallyEtale R A ↔ FormallyEtale R B :=
@@ -87,12 +108,10 @@ end OfEquiv
87108

88109
section Comp
89110

90-
variable (R : Type u) [CommRing R]
91-
variable (A : Type u) [CommRing A] [Algebra R A]
92-
variable (B : Type u) [CommRing B] [Algebra R B] [Algebra A B] [IsScalarTower R A B]
93-
94-
theorem comp [FormallyEtale R A] [FormallyEtale A B] : FormallyEtale R B :=
95-
FormallyEtale.iff_unramified_and_smooth.mpr
111+
variable (R A B) in
112+
theorem comp [Algebra A B] [IsScalarTower R A B] [FormallyEtale R A] [FormallyEtale A B] :
113+
FormallyEtale R B :=
114+
FormallyEtale.iff_formallyUnramified_and_formallySmooth.mpr
96115
⟨FormallyUnramified.comp R A B, FormallySmooth.comp R A B⟩
97116

98117
end Comp
@@ -101,12 +120,8 @@ section BaseChange
101120

102121
open scoped TensorProduct
103122

104-
variable {R : Type u} [CommRing R]
105-
variable {A : Type u} [CommRing A] [Algebra R A]
106-
variable (B : Type u) [CommRing B] [Algebra R B]
107-
108-
instance base_change [FormallyEtale R A] : FormallyEtale B (B ⊗[R] A) :=
109-
FormallyEtale.iff_unramified_and_smooth.mpr ⟨inferInstance, inferInstance⟩
123+
instance [FormallyEtale R A] : FormallyEtale B (B ⊗[R] A) :=
124+
.of_formallyUnramified_and_formallySmooth
110125

111126
end BaseChange
112127

@@ -129,7 +144,7 @@ subset `M` of `R`.
129144
-/
130145

131146
/-! Let R, S, Rₘ, Sₘ be commutative rings -/
132-
variable {R S Rₘ Sₘ : Type u} [CommRing R] [CommRing S] [CommRing Rₘ] [CommRing Sₘ]
147+
variable {R S Rₘ Sₘ : Type*} [CommRing R] [CommRing S] [CommRing Rₘ] [CommRing Sₘ]
133148
/-! Let M be a multiplicatively closed subset of `R` -/
134149
variable (M : Submonoid R)
135150
/-! Assume that the rings are in a commutative diagram as above. -/
@@ -140,11 +155,11 @@ variable [IsLocalization M Rₘ] [IsLocalization (M.map (algebraMap R S)) Sₘ]
140155
include M
141156

142157
theorem of_isLocalization : FormallyEtale R Rₘ :=
143-
FormallyEtale.iff_unramified_and_smooth.mpr
158+
FormallyEtale.iff_formallyUnramified_and_formallySmooth.mpr
144159
⟨FormallyUnramified.of_isLocalization M, FormallySmooth.of_isLocalization M⟩
145160

146161
theorem localization_base [FormallyEtale R Sₘ] : FormallyEtale Rₘ Sₘ :=
147-
FormallyEtale.iff_unramified_and_smooth.mpr
162+
FormallyEtale.iff_formallyUnramified_and_formallySmooth.mpr
148163
⟨FormallyUnramified.localization_base M, FormallySmooth.localization_base M⟩
149164

150165
/-- The localization of a formally étale map is formally étale. -/
@@ -159,9 +174,7 @@ end FormallyEtale
159174

160175
section
161176

162-
variable (R : Type u) [CommRing R]
163-
variable (A : Type u) [CommRing A] [Algebra R A]
164-
177+
variable (R A) in
165178
/-- An `R`-algebra `A` is étale if it is formally étale and of finite presentation. -/
166179
@[stacks 00U1 "Note that this is a different definition from this Stacks entry, but
167180
<https://stacks.math.columbia.edu/tag/00UR> shows that it is equivalent to the definition here."]
@@ -175,9 +188,6 @@ namespace Etale
175188

176189
attribute [instance] formallyEtale finitePresentation
177190

178-
variable {R : Type u} [CommRing R]
179-
variable {A B : Type u} [CommRing A] [Algebra R A] [CommRing B] [Algebra R B]
180-
181191
/-- Being étale is transported via algebra isomorphisms. -/
182192
theorem of_equiv [Etale R A] (e : A ≃ₐ[R] B) : Etale R B where
183193
formallyEtale := FormallyEtale.of_equiv e
@@ -198,17 +208,19 @@ instance baseChange [Etale R A] : Etale B (B ⊗[R] A) where
198208
end Comp
199209

200210
/-- Localization at an element is étale. -/
201-
theorem of_isLocalization_Away (r : R) [IsLocalization.Away r A] : Etale R A where
211+
theorem of_isLocalizationAway (r : R) [IsLocalization.Away r A] : Etale R A where
202212
formallyEtale := Algebra.FormallyEtale.of_isLocalization (Submonoid.powers r)
203213
finitePresentation := IsLocalization.Away.finitePresentation r
204214

215+
@[deprecated (since := "2025-11-03")] alias of_isLocalization_Away := of_isLocalizationAway
216+
205217
end Etale
206218

207219
end Algebra
208220

209221
namespace RingHom
210222

211-
variable {R S : Type u} [CommRing R] [CommRing S]
223+
variable {R S : Type*} [CommRing R] [CommRing S]
212224

213225
/--
214226
A ring homomorphism `R →+* A` is formally étale if it is formally unramified and formally smooth.

Mathlib/RingTheory/Etale/Field.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Let `K` be a field, `A` be a `K`-algebra and `L` be a field extension of `K`.
3232

3333
universe u
3434

35-
variable (K L A : Type u) [Field K] [Field L] [CommRing A] [Algebra K L] [Algebra K A]
35+
variable (K L : Type*) (A : Type u) [Field K] [Field L] [CommRing A] [Algebra K L] [Algebra K A]
3636

3737
open Algebra Polynomial
3838

@@ -52,10 +52,10 @@ theorem of_isSeparable_aux [Algebra.IsSeparable K L] [EssFiniteType K L] :
5252
-- IsSeparable + EssFiniteType => FormallyUnramified + Finite
5353
have := FormallyUnramified.of_isSeparable K L
5454
have := FormallyUnramified.finite_of_free (R := K) (S := L)
55-
constructor
5655
-- We shall show that any `f : L → B/I` can be lifted to `L → B` if `I^2 = ⊥`
57-
intro B _ _ I h
58-
refine ⟨FormallyUnramified.iff_comp_injective.mp (FormallyUnramified.of_isSeparable K L) I h, ?_⟩
56+
refine FormallyEtale.iff_comp_bijective.mpr fun B _ _ I h ↦ ?_
57+
refine ⟨FormallyUnramified.iff_comp_injective_of_small.mp
58+
(FormallyUnramified.of_isSeparable K L) I h, ?_⟩
5959
intro f
6060
-- By separability and finiteness, we may assume `L = K(α)` with `p` the minpoly of `α`.
6161
let pb := Field.powerBasisOfFiniteOfSeparable K L
@@ -89,12 +89,12 @@ theorem of_isSeparable_aux [Algebra.IsSeparable K L] [EssFiniteType K L] :
8989

9090
open scoped IntermediateField in
9191
lemma of_isSeparable [Algebra.IsSeparable K L] : FormallyEtale K L := by
92-
constructor
93-
intro B _ _ I h
9492
-- We shall show that any `f : L → B/I` can be lifted to `L → B` if `I^2 = ⊥`.
93+
refine FormallyEtale.iff_comp_bijective.mpr fun B _ _ I h ↦ ?_
9594
-- But we already know that there exists a unique lift for every finite subfield of `L`
9695
-- by `of_isSeparable_aux`, so we can glue them all together.
97-
refine ⟨FormallyUnramified.iff_comp_injective.mp (FormallyUnramified.of_isSeparable K L) I h, ?_⟩
96+
refine ⟨FormallyUnramified.iff_comp_injective_of_small.mp
97+
(FormallyUnramified.of_isSeparable K L) I h, ?_⟩
9898
intro f
9999
have : ∀ k : L, ∃! g : K⟮k⟯ →ₐ[K] B,
100100
(Ideal.Quotient.mkₐ K I).comp g = f.comp (IsScalarTower.toAlgHom K _ L) := by

Mathlib/RingTheory/Etale/Kaehler.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Mathlib.RingTheory.Flat.Localization
2121

2222
universe u
2323

24-
variable (R S T : Type u) [CommRing R] [CommRing S] [CommRing T]
24+
variable (R S T : Type*) [CommRing R] [CommRing S] [CommRing T]
2525
variable [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
2626

2727
open TensorProduct

Mathlib/RingTheory/Etale/Pi.lean

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,17 @@ import Mathlib.RingTheory.Etale.Basic
1818
1919
-/
2020

21-
universe u v
22-
2321
namespace Algebra.FormallyEtale
2422

25-
variable {R : Type (max u v)} {I : Type u} (A : I → Type (max u v))
23+
variable {R : Type*} {I : Type*} (A : I → Type*)
2624
variable [CommRing R] [∀ i, CommRing (A i)] [∀ i, Algebra R (A i)]
2725

2826
theorem pi_iff [Finite I] :
2927
FormallyEtale R (Π i, A i) ↔ ∀ i, FormallyEtale R (A i) := by
30-
simp_rw [FormallyEtale.iff_unramified_and_smooth, forall_and]
28+
simp_rw [FormallyEtale.iff_formallyUnramified_and_formallySmooth, forall_and]
3129
rw [FormallyUnramified.pi_iff A, FormallySmooth.pi_iff A]
3230

3331
instance [Finite I] [∀ i, FormallyEtale R (A i)] : FormallyEtale R (Π i, A i) :=
34-
.of_unramified_and_smooth
32+
.of_formallyUnramified_and_formallySmooth
3533

3634
end Algebra.FormallyEtale

Mathlib/RingTheory/RingHom/Etale.lean

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,27 @@ universe u
1616

1717
namespace RingHom
1818

19-
variable {R S : Type u} [CommRing R] [CommRing S]
19+
variable {R S : Type*} [CommRing R] [CommRing S]
2020

2121
/-- A ring hom `R →+* S` is étale, if `S` is an étale `R`-algebra. -/
2222
@[algebraize RingHom.Etale.toAlgebra]
23-
def Etale {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) : Prop :=
24-
@Algebra.Etale R _ S _ f.toAlgebra
23+
def Etale {R S : Type*} [CommRing R] [CommRing S] (f : R →+* S) : Prop :=
24+
@Algebra.Etale R S _ _ f.toAlgebra
2525

2626
/-- Helper lemma for the `algebraize` tactic -/
2727
lemma Etale.toAlgebra {f : R →+* S} (hf : Etale f) :
28-
@Algebra.Etale R _ S _ f.toAlgebra := hf
28+
@Algebra.Etale R S _ _ f.toAlgebra := hf
2929

30-
variable {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S)
30+
variable {R S : Type*} [CommRing R] [CommRing S] (f : R →+* S)
3131

3232
lemma etale_algebraMap [Algebra R S] : (algebraMap R S).Etale ↔ Algebra.Etale R S := by
3333
rw [RingHom.Etale, toAlgebra_algebraMap]
3434

3535
lemma etale_iff_formallyUnramified_and_smooth : f.Etale ↔ f.FormallyUnramified ∧ f.Smooth := by
3636
algebraize [f]
3737
simp only [Etale, Smooth, FormallyUnramified]
38-
refine ⟨fun h ↦ ⟨inferInstance, ?_⟩, fun ⟨h1, h2⟩ ↦ ⟨?_, inferInstance⟩⟩
39-
· constructor <;> infer_instance
40-
· rw [Algebra.FormallyEtale.iff_unramified_and_smooth]
41-
constructor <;> infer_instance
38+
exact ⟨fun h ↦ ⟨inferInstance, inferInstance, inferInstance⟩,
39+
fun ⟨h1, h2⟩ ↦ ⟨.of_formallyUnramified_and_formallySmooth, inferInstance⟩⟩
4240

4341
lemma Etale.eq_formallyUnramified_and_smooth :
4442
@Etale = fun R S (_ : CommRing R) (_ : CommRing S) f ↦ f.FormallyUnramified ∧ f.Smooth := by

0 commit comments

Comments
 (0)