Skip to content

Commit 3bd1307

Browse files
committed
feat(RingTheory/Extension/Cotangent): basis of free cotangent space can be realized as a presentation (#31034)
Let `S` be a finitely presented `R`-algebra and suppose `P : R[X] → S` generates `S` with kernel `I`. In this PR we show that if `I/I²` is free, there exists an `R`-presentation `P'` of `S` extending `P` with kernel `I'`, such that `I'/I'²` is free on the images of the relations of `P'`. From Pi1.
1 parent 6f5bfe8 commit 3bd1307

File tree

4 files changed

+332
-0
lines changed

4 files changed

+332
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5847,6 +5847,7 @@ public import Mathlib.RingTheory.EuclideanDomain
58475847
public import Mathlib.RingTheory.Extension
58485848
public import Mathlib.RingTheory.Extension.Basic
58495849
public import Mathlib.RingTheory.Extension.Cotangent.Basic
5850+
public import Mathlib.RingTheory.Extension.Cotangent.Basis
58505851
public import Mathlib.RingTheory.Extension.Cotangent.Free
58515852
public import Mathlib.RingTheory.Extension.Cotangent.LocalizationAway
58525853
public import Mathlib.RingTheory.Extension.Generators
Lines changed: 321 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,321 @@
1+
/-
2+
Copyright (c) 2025 Christian Merten. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Christian Merten
5+
-/
6+
module
7+
8+
public import Mathlib.RingTheory.Extension.Cotangent.Basic
9+
public import Mathlib.RingTheory.Smooth.StandardSmoothCotangent
10+
public import Mathlib.RingTheory.Extension.Cotangent.LocalizationAway
11+
12+
/-!
13+
# Basis of cotangent space can be realized as a presentation
14+
15+
Let `S` be a finitely presented `R`-algebra and suppose `P : R[X] → S` generates `S` with
16+
kernel `I`.
17+
18+
In this file we show `Algebra.Generators.exists_presentation_of_free`: If `I/I²` is free, there
19+
exists an `R`-presentation `P'` of `S` extending `P` with kernel `I'`, such that `I'/I'²` is
20+
free on the images of the relations of `P'`.
21+
22+
## References
23+
24+
- https://stacks.math.columbia.edu/tag/07CF
25+
-/
26+
27+
open Pointwise MvPolynomial TensorProduct
28+
namespace Algebra.Generators
29+
30+
variable {R : Type*} {S : Type*} [CommRing R] [CommRing S] [Algebra R S] {σ : Type*}
31+
32+
noncomputable section
33+
34+
namespace PresentationOfFreeCotangent
35+
36+
variable {ι : Type*} (P : Generators R S ι) {σ : Type*}
37+
(b : Module.Basis σ S P.toExtension.Cotangent)
38+
39+
/-- An auxiliary structure containing the data to construct the presentation in
40+
`Generators.exists_presentation_of_free`. -/
41+
structure Aux where
42+
/-- A section of the projection `I → I/I²`. -/
43+
f : P.toExtension.Cotangent → P.toExtension.ker
44+
hf : ∀ (b : P.toExtension.Cotangent), Extension.Cotangent.mk (f b) = b
45+
/-- An element `g` that becomes invertible in `S = R[X₁, ..., Xₙ] / I`. -/
46+
g : P.Ring
47+
hgmem : g - 1 ∈ P.ker
48+
hg : g • P.ker ≤ Ideal.span (Set.range <| Subtype.val ∘ f ∘ b)
49+
50+
namespace Aux
51+
52+
variable {P} {b}
53+
variable (D : Aux P b)
54+
55+
/-- `T = R[X₁, ..., Xₙ] / (b₁, ..., bᵣ)` where the `bᵢ` are lifts of the basis elements
56+
of `I/I²` in `I`. -/
57+
abbrev T :=
58+
MvPolynomial ι R ⧸ (Ideal.span <| Set.range <| Subtype.val ∘ D.f ∘ b)
59+
60+
/-- The map `R[X₁, ..., Xₙ] → S` factors via `T`, because the `bᵢ` are in `I`. -/
61+
def hom : D.T →ₐ[R] S := Ideal.Quotient.liftₐ _ (aeval P.val) <| by
62+
simp_rw [← RingHom.mem_ker, ← SetLike.le_def, Ideal.span_le, Set.range_subset_iff]
63+
intro i
64+
simpa only [Generators.toExtension_Ring, Generators.toExtension_commRing, Function.comp_apply,
65+
SetLike.mem_coe, RingHom.mem_ker, ← P.algebraMap_apply] using (D.f _).property
66+
67+
instance : Algebra D.T S := D.hom.toAlgebra
68+
instance [Nontrivial S] : Nontrivial D.T := RingHom.domain_nontrivial (algebraMap D.T S)
69+
instance : IsScalarTower P.Ring D.T S := by
70+
refine ⟨fun x y z ↦ ?_⟩
71+
obtain ⟨y, rfl⟩ := Ideal.Quotient.mk_surjective y
72+
obtain ⟨z, rfl⟩ := P.algebraMap_surjective z
73+
simp only [Algebra.smul_def, map_mul, Generators.algebraMap_apply, ← mul_assoc]
74+
rfl
75+
76+
/-- The image of `g : R[X₁, ..., Xₙ]` in `T`. -/
77+
abbrev gbar : D.T := D.g
78+
79+
/-- `S` is the localization of `T` away from `S`. -/
80+
instance : IsLocalization.Away D.gbar S := by
81+
refine .of_surjective_of_isScalarTower (n := 1) ?_ ?_ _ ?_ (by simpa using D.hg)
82+
· refine .of_comp (g := algebraMap P.Ring D.T) ?_
83+
convert P.algebraMap_surjective
84+
ext x
85+
exact (IsScalarTower.algebraMap_apply _ D.T S x).symm
86+
· simp [T, Ideal.Quotient.mk_surjective]
87+
· suffices h : (algebraMap P.Ring S) D.g = 1 by simp [h]
88+
rw [← map_one (algebraMap P.Ring S), ← sub_eq_zero, ← map_sub, ← RingHom.mem_ker]
89+
exact D.hgmem
90+
91+
open Classical in
92+
/-- The "naive" presentation of `T = R[X₁, ..., Xₙ] / (b₁, ..., bᵣ)` over `R`.
93+
We make sure the section `T → R[X₁, ..., Xₙ]` maps `-1` to `-1` and `0` to `0`. -/
94+
def presLeft : Presentation R D.T ι σ :=
95+
.naive (fun x ↦ if x = 0 then 0 else if x = -1 then -1 else
96+
Function.surjInv Ideal.Quotient.mk_surjective x) fun x ↦ by
97+
dsimp only; split_ifs
98+
· next h => subst h; rfl
99+
· next h => subst h; rfl
100+
· simp [Function.surjInv_eq]
101+
102+
/-- The `i`-th generator of the kernel `(b₁, ..., bᵣ)` of the naive presentation of `T`. -/
103+
def kerGen (i : σ) : D.presLeft.toExtension.ker :=
104+
⟨(D.f (b i)).val, Presentation.mem_ker_naive _ _ i⟩
105+
106+
/-- The identity on `R[X₁, ..., Xₙ]` as a map of presentations of `T` to `S`. -/
107+
def fhom : D.presLeft.Hom P where
108+
val i := X i
109+
aeval_val i := by simp [RingHom.algebraMap_toAlgebra, presLeft, hom, T]
110+
111+
@[simp]
112+
lemma toAlgHom_fhom : D.fhom.toAlgHom = AlgHom.id R P.Ring := by
113+
ext : 1
114+
simp [fhom]
115+
116+
lemma ker_presLeft_le : D.presLeft.ker ≤ P.ker := by
117+
intro x hx
118+
simpa only [toExtension_commRing, toExtension_Ring, RingHom.mem_ker,
119+
toExtension_algebra₂, algebraMap_apply, Ideal.Quotient.algebraMap_eq,
120+
map_zero] using (algebraMap D.T S).congr_arg hx
121+
122+
/-- The forward direction of the isomorphism `S ⊗[T] J/J² ≃ₗ[S] I/I²`. -/
123+
def tensorCotangentHom : S ⊗[D.T] D.presLeft.toExtension.Cotangent →ₗ[S] P.toExtension.Cotangent :=
124+
LinearMap.liftBaseChange _ (Extension.Cotangent.map D.fhom.toExtensionHom)
125+
126+
lemma tensorCotangentHom_tmul (x : D.presLeft.toExtension.ker) :
127+
D.tensorCotangentHom (1 ⊗ₜ[D.T] Extension.Cotangent.mk x) =
128+
.mk ⟨x.val, D.ker_presLeft_le x.2⟩ := by
129+
simp only [tensorCotangentHom, LinearMap.liftBaseChange_tmul, one_smul, presLeft,
130+
Extension.Cotangent.map_mk, Extension.Hom.toAlgHom_apply, Hom.toExtensionHom_toRingHom,
131+
toAlgHom_fhom, AlgHom.toRingHom_eq_coe, AlgHom.id_toRingHom]
132+
rfl
133+
134+
/-- The backwards direction of the isomorphism `S ⊗[T] J/J² ≃ₗ[S] I/I²`. -/
135+
def tensorCotangentInv : P.toExtension.Cotangent →ₗ[S] S ⊗[D.T] D.presLeft.toExtension.Cotangent :=
136+
b.constr S fun i : σ ↦ 1 ⊗ₜ Extension.Cotangent.mk (D.kerGen i)
137+
138+
@[simp]
139+
lemma tensorCotangentInv_apply (i : σ) :
140+
D.tensorCotangentInv (b i) = 1 ⊗ₜ Extension.Cotangent.mk (D.kerGen i) :=
141+
Module.Basis.constr_basis _ _ _ _
142+
143+
lemma span_range_mk_kerGen : Submodule.span D.T
144+
(Set.range fun i ↦ Extension.Cotangent.mk (D.kerGen i)) = ⊤ := by
145+
refine Extension.Cotangent.span_eq_top_of_span_eq_ker _ ?_
146+
dsimp only [presLeft, Presentation.naive_toGenerators]
147+
exact (Generators.ker_naive _ _).symm
148+
149+
/-- The linear isomorphism `S ⊗[T] J/J² ≃ₗ[S] I/I²`. -/
150+
def tensorCotangentEquiv :
151+
S ⊗[D.T] D.presLeft.toExtension.Cotangent ≃ₗ[S] P.toExtension.Cotangent := by
152+
refine LinearEquiv.ofLinear D.tensorCotangentHom D.tensorCotangentInv ?_ ?_
153+
· refine b.ext fun i ↦ ?_
154+
simpa only [LinearMap.coe_comp, Function.comp_apply, tensorCotangentInv_apply,
155+
tensorCotangentHom_tmul] using D.hf (b i)
156+
· ext : 2
157+
refine LinearMap.ext_on_range D.span_range_mk_kerGen fun i ↦ ?_
158+
simp [-toExtension_commRing, -toExtension_Ring, -toExtension_algebra₂, tensorCotangentHom_tmul,
159+
kerGen, D.hf]
160+
161+
lemma tensorCotangentEquiv_symm_apply (i : σ) :
162+
D.tensorCotangentEquiv.symm (b i) = 1 ⊗ₜ Extension.Cotangent.mk (D.kerGen i) :=
163+
D.tensorCotangentInv_apply i
164+
165+
/-- The canonical presentation of `S` as the localization of `T` away from `g`. -/
166+
def presRight : Presentation D.T S Unit Unit :=
167+
Presentation.localizationAway S D.gbar
168+
169+
/-- The presentation of `S` over `R` obtained from composing the naive presentation of
170+
`T = R[X₁, ..., Xₙ]/(b₁, ..., bᵣ)` with the presentation of the localization away from `g`. -/
171+
def pres : Presentation R S (Unit ⊕ ι) (Unit ⊕ σ) :=
172+
D.presRight.comp D.presLeft
173+
174+
lemma map_ofComp_mk [Nontrivial S] :
175+
(Extension.Cotangent.map
176+
((localizationAway S D.gbar).ofComp D.presLeft.toGenerators).toExtensionHom)
177+
(Extension.Cotangent.mk ⟨D.pres.relation (Sum.inl ()), D.pres.relation_mem_ker _⟩) =
178+
Generators.cMulXSubOneCotangent S D.gbar := by
179+
simp_rw [Extension.Cotangent.map_mk, Generators.Hom.toExtensionHom_toAlgHom_apply]
180+
congr 2
181+
have : Nontrivial D.T := inferInstance
182+
dsimp only [T, Generators.toExtension_Ring, Generators.toExtension_commRing] at this
183+
rw [pres, presLeft, presRight, Presentation.relation_comp_localizationAway_inl]
184+
· exact Generators.toAlgHom_ofComp_localizationAway _ _
185+
· rw [Presentation.naive, Generators.naive_σ];
186+
simp
187+
· rw [Presentation.naive, Generators.naive_σ]
188+
simp
189+
190+
/-- The cotangent space of the constructed presentation is isomorphic
191+
to `(g X - 1)/(g X - 1)² × S ⊗[T] J/J²`. -/
192+
def cotangentEquivProd [Nontrivial S] : D.pres.toExtension.Cotangent ≃ₗ[S]
193+
D.presRight.toExtension.Cotangent × S ⊗[D.T] D.presLeft.toExtension.Cotangent :=
194+
(D.presLeft.cotangentCompLocalizationAwayEquiv (T := S) D.gbar D.map_ofComp_mk) ≪≫ₗ
195+
LinearEquiv.prodComm _ _ _
196+
197+
lemma cotangentEquivProd_symm_apply [Nontrivial S] (x : D.presRight.toExtension.Cotangent)
198+
(y : S ⊗[D.T] D.presLeft.toExtension.Cotangent) :
199+
D.cotangentEquivProd.symm (x, y) =
200+
(D.presLeft.cotangentCompLocalizationAwayEquiv (T := S) D.gbar D.map_ofComp_mk).symm (y, x) :=
201+
rfl
202+
203+
/-- The basis of `S ⊗[T] J/J²` induced from the basis on `I/I²`. -/
204+
def basisLeft : Module.Basis σ S (S ⊗[D.T] D.presLeft.toExtension.Cotangent) :=
205+
b.map D.tensorCotangentEquiv.symm
206+
207+
/-- The canonical basis on `(g X - 1)/(g X - 1)²`. -/
208+
def basisRight : Module.Basis Unit S D.presRight.toExtension.Cotangent :=
209+
Generators.basisCotangentAway S D.gbar
210+
211+
/-- The basis on the cotangent space of the constructed presentation. -/
212+
def basis [Nontrivial S] : Module.Basis (Unit ⊕ σ) S D.pres.toExtension.Cotangent :=
213+
(Module.Basis.prod D.basisRight D.basisLeft).map D.cotangentEquivProd.symm
214+
215+
lemma basis_inl [Nontrivial S] :
216+
D.basis (.inl ()) =
217+
D.cotangentEquivProd.symm (Generators.cMulXSubOneCotangent S D.gbar, 0) := by
218+
simpa [basis] using Generators.basisCotangentAway_apply _ _
219+
220+
lemma basis_inr [Nontrivial S] (i : σ) :
221+
D.basis (.inr i) = D.cotangentEquivProd.symm (0, D.basisLeft i) := by
222+
simp [basis]
223+
224+
lemma pres_val_comp_inr : D.pres.val ∘ Sum.inr = P.val := funext (aeval_X _)
225+
226+
/-- The constructed basis indeed is given by the images of the relations. -/
227+
lemma basis_apply [Nontrivial S] (r : Unit ⊕ σ) :
228+
D.basis r = Extension.Cotangent.mk ⟨D.pres.relation r, D.pres.relation_mem_ker r⟩ := by
229+
obtain (r | r) := r
230+
· rw [basis_inl, cotangentEquivProd_symm_apply]
231+
exact cotangentCompLocalizationAwayEquiv_symm_inr _ _ _
232+
· rw [basis_inr, cotangentEquivProd_symm_apply, cotangentCompLocalizationAwayEquiv_symm_inl,
233+
basisLeft, Module.Basis.map_apply, tensorCotangentEquiv_symm_apply,
234+
LinearMap.liftBaseChange_tmul, one_smul, Extension.Cotangent.map_mk]
235+
rfl
236+
237+
end PresentationOfFreeCotangent.Aux
238+
239+
end
240+
241+
open PresentationOfFreeCotangent in
242+
/--
243+
Version of `Algebra.Generators.exists_presentation_of_free_cotangent` taking a basis instead
244+
of a `Module.Free` assumption.
245+
Note that the basis `b₀` only serves as a way of saying
246+
that `I/I²` is free of rank `σ`, which gives more definitional control over `σ`.
247+
If this does not matter, use `Algebra.Generators.exists_presentation_of_free_cotangent` instead.
248+
-/
249+
@[stacks 07CF]
250+
public lemma exists_presentation_of_basis_cotangent [Algebra.FinitePresentation R S]
251+
{α : Type*} (P : Generators R S α) [Finite α] {σ : Type*}
252+
(b₀ : Module.Basis σ S P.toExtension.Cotangent) :
253+
∃ (P' : Presentation R S (Unit ⊕ α) (Unit ⊕ σ))
254+
(b : Module.Basis (Unit ⊕ σ) S P'.toExtension.Cotangent),
255+
P'.val ∘ Sum.inr = P.val ∧
256+
∀ r, b r = Extension.Cotangent.mk ⟨P'.relation r, P'.relation_mem_ker r⟩ := by
257+
cases subsingleton_or_nontrivial S
258+
· let P' : Presentation R S (Unit ⊕ α) (Unit ⊕ σ) :=
259+
{ toGenerators := .ofSurjective (fun i : Unit ⊕ α ↦ 0) (Function.surjective_to_subsingleton _)
260+
relation _ := 1
261+
span_range_relation_eq_ker := by simpa using (RingHom.ker_eq_top_of_subsingleton _).symm }
262+
have : Subsingleton P'.toExtension.Cotangent := Module.subsingleton S _
263+
exact ⟨P', default, by subsingleton, by subsingleton⟩
264+
classical
265+
choose f hf using Extension.Cotangent.mk_surjective (P := P.toExtension)
266+
let v (i : σ) : P.ker := f (b₀ i)
267+
let J : Ideal P.Ring := Ideal.span (Set.range <| Subtype.val ∘ v)
268+
have hJfg : P.ker.FG := by
269+
rw [P.ker_eq_ker_aeval_val]
270+
apply FinitePresentation.ker_fG_of_surjective
271+
convert P.algebraMap_surjective
272+
simp [P.algebraMap_eq]
273+
have hJ : J ≤ P.ker := by simp [J, Ideal.span_le, Set.range_subset_iff]
274+
suffices hJ : P.ker ≤ J ⊔ P.ker • P.ker by
275+
obtain ⟨g, hgmem, hg⟩ := Submodule.exists_sub_one_mem_and_smul_le_of_fg_of_le_sup hJfg le_rfl hJ
276+
let D : Aux P b₀ := { f := f, hf := hf, g := g, hgmem := hgmem, hg := hg }
277+
exact ⟨D.pres, D.basis, D.pres_val_comp_inr, D.basis_apply⟩
278+
rw [← Submodule.comap_le_comap_iff_of_le_range (f := P.ker.subtype) (by simp),
279+
Submodule.comap_subtype_self,
280+
Submodule.comap_sup_of_injective P.ker.subtype_injective (by simpa using hJ)
281+
(by simp [Ideal.mul_le_left]),
282+
Submodule.comap_smul'' P.ker.subtype_injective (by simp)]
283+
simp only [Submodule.comap_subtype_self, J]
284+
rw [← Submodule.coe_subtype, Ideal.span, Set.range_comp, ← Submodule.map_span,
285+
Submodule.comap_map_eq_of_injective P.ker.subtype_injective,
286+
← Extension.Cotangent.ker_mk]
287+
dsimp
288+
simp only [← LinearMap.map_le_map_iff, Submodule.map_span, ← Set.range_comp,
289+
Function.comp_def, ← Submodule.restrictScalars_span P.Ring S P.algebraMap_surjective]
290+
refine le_trans le_top (top_le_iff.mpr ?_)
291+
rw [Submodule.restrictScalars_eq_top_iff]
292+
convert b₀.span_eq
293+
exact hf _
294+
295+
open PresentationOfFreeCotangent in
296+
/-- Let `S` be a finitely presented `R`-algebra and suppose `P : R[X] → S` generates `S` with
297+
kernel `I`. If `I/I²` is free, there exists an `R`-presentation `P'` of `S` extending `P` with
298+
kernel `I'`, such that `I'/I'²` is free on the images of the relations of `P'`.
299+
See `Algebra.Generators.exists_presentation_of_basis_cotangent` for a version taking
300+
a basis of `I/I²` instead. -/
301+
@[stacks 07CF]
302+
public lemma exists_presentation_of_free_cotangent [Algebra.FinitePresentation R S]
303+
{α : Type*} (P : Generators R S α) [Finite α]
304+
[Module.Free S P.toExtension.Cotangent] :
305+
∃ (P' : Presentation R S (Unit ⊕ α) (Unit ⊕ Fin (Module.finrank S P.toExtension.Cotangent)))
306+
(b : Module.Basis (Unit ⊕ Fin (Module.finrank S P.toExtension.Cotangent))
307+
S P'.toExtension.Cotangent),
308+
P'.val ∘ Sum.inr = P.val ∧
309+
∀ r, b r = Extension.Cotangent.mk ⟨P'.relation r, P'.relation_mem_ker r⟩ := by
310+
cases subsingleton_or_nontrivial S
311+
· let P' : Presentation R S (Unit ⊕ α) (Unit ⊕ Fin (Module.finrank S P.toExtension.Cotangent)) :=
312+
{ toGenerators := .ofSurjective (fun i : Unit ⊕ α ↦ 0) (Function.surjective_to_subsingleton _)
313+
relation _ := 1
314+
span_range_relation_eq_ker := by simpa using (RingHom.ker_eq_top_of_subsingleton _).symm }
315+
have : Subsingleton P'.toExtension.Cotangent := Module.subsingleton S _
316+
exact ⟨P', default, by subsingleton, by subsingleton⟩
317+
have : Module.Finite S P.toExtension.Cotangent :=
318+
Algebra.Extension.Cotangent.finite P.fg_ker_of_finitePresentation
319+
exact exists_presentation_of_basis_cotangent _ <| Module.finBasis S P.toExtension.Cotangent
320+
321+
end Algebra.Generators

Mathlib/RingTheory/Extension/Generators.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ lemma σ_injective : P.σ.Injective := by
110110
intro x y e
111111
rw [← P.aeval_val_σ x, ← P.aeval_val_σ y, e]
112112

113+
lemma aeval_val_surjective : Function.Surjective (aeval (R := R) P.val) :=
114+
fun x ↦ ⟨P.σ x, by simp⟩
115+
113116
lemma algebraMap_surjective : Function.Surjective (algebraMap P.Ring S) :=
114117
(⟨_, P.algebraMap_apply _ ▸ P.aeval_val_σ ·⟩)
115118

Mathlib/RingTheory/Extension/Presentation/Basic.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,17 @@ lemma naive_relation : (naive s hs).relation = v := rfl
509509

510510
@[simp] lemma naive_relation_apply (i : ι) : (naive s hs).relation i = v i := rfl
511511

512+
lemma mem_ker_naive (i : ι) : v i ∈ (naive s hs).ker := relation_mem_ker _ i
513+
512514
end
513515

514516
end Construction
515517

516518
end Presentation
517519

520+
lemma Generators.fg_ker_of_finitePresentation [Algebra.FinitePresentation R S] {α : Type*}
521+
(P : Generators R S α) [Finite α] : P.ker.FG := by
522+
rw [Generators.ker_eq_ker_aeval_val]
523+
exact Algebra.FinitePresentation.ker_fG_of_surjective _ P.aeval_val_surjective
524+
518525
end Algebra

0 commit comments

Comments
 (0)