Skip to content

Commit 42da4bc

Browse files
committed
feat(RingTheory): Extension.CotangentSpace commutes with base change (#35594)
From Pi1.
1 parent ea9c914 commit 42da4bc

File tree

4 files changed

+140
-0
lines changed

4 files changed

+140
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6212,6 +6212,7 @@ public import Mathlib.RingTheory.Etale.QuasiFinite
62126212
public import Mathlib.RingTheory.Etale.StandardEtale
62136213
public import Mathlib.RingTheory.EuclideanDomain
62146214
public import Mathlib.RingTheory.Extension.Basic
6215+
public import Mathlib.RingTheory.Extension.Cotangent.BaseChange
62156216
public import Mathlib.RingTheory.Extension.Cotangent.Basic
62166217
public import Mathlib.RingTheory.Extension.Cotangent.Basis
62176218
public import Mathlib.RingTheory.Extension.Cotangent.Free

Mathlib/RingTheory/Extension/Basic.lean

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,20 @@ def baseChange {T} [CommRing T] [Algebra R T] (P : Extension R S) : Extension T
161161
(IsScalarTower.toAlgHom _ _ _)) (LinearMap.lTensor_surjective T
162162
(g := (IsScalarTower.toAlgHom R P.Ring S).toLinearMap) P.algebraMap_surjective)
163163

164+
variable (T) in
165+
/--
166+
The ring `T ⊗[R] P.Ring` underlying the extension `P.baseChange T` is a `P.Ring`-algebra
167+
by action on the right. This causes a (mathematical) diamond when `T = P.Ring`, so it is
168+
not an instance.
169+
-/
170+
@[instance_reducible]
171+
noncomputable def algebraBaseChange : Algebra P.Ring (P.baseChange (T := T)).Ring :=
172+
TensorProduct.rightAlgebra
173+
174+
set_option backward.isDefEq.respectTransparency false in
175+
attribute [local instance] algebraBaseChange in
176+
instance : IsScalarTower R P.Ring (P.baseChange (T := T)).Ring :=
177+
.of_algebraMap_eq fun x ↦ by simp [baseChange, RingHom.algebraMap_toAlgebra]; rfl
164178

165179
end Construction
166180

@@ -242,6 +256,16 @@ def Hom.mapKer (f : P.Hom P')
242256
map_add' _ _ := Subtype.ext (map_add _ _ _)
243257
map_smul' := by simp [Algebra.smul_def, ← halg]
244258

259+
set_option backward.isDefEq.respectTransparency false in
260+
attribute [local instance] Algebra.TensorProduct.rightAlgebra in
261+
/-- The canonical hom from `P` to its base change `P.baseChange`. -/
262+
@[simps]
263+
noncomputable def toBaseChange (T : Type*) [CommRing T] [Algebra R T] :
264+
P.Hom (P.baseChange (T := T)) where
265+
toRingHom := TensorProduct.includeRight.toRingHom
266+
toRingHom_algebraMap x := by simp [baseChange]
267+
algebraMap_toRingHom x := rfl
268+
245269
end
246270

247271
end Hom
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
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.Kaehler.TensorProduct
10+
11+
/-!
12+
# Base change for the naive cotangent complex
13+
14+
This file shows that the cotangent space and first homology of the naive cotangent complex
15+
commute with base change.
16+
17+
## Main results
18+
19+
- `Algebra.Extension.tensorCotangentSpace`: If `T` is an `R`-algebra, there is a `T`-linear
20+
isomorphism `T ⊗[R] P.CotangentSpace ≃ₗ[T] (P.baseChange).CotangentSpace`.
21+
22+
## TODOs (@chrisflav)
23+
24+
- Show that `P.Cotangent` commutes with flat base change.
25+
- Show that `P.H1Cotangent` commutes with flat base change.
26+
-/
27+
28+
public section
29+
30+
universe u
31+
32+
open TensorProduct
33+
34+
namespace Algebra
35+
36+
namespace Extension
37+
38+
variable {R S : Type*} [CommRing R] [CommRing S] [Algebra R S]
39+
variable (P : Extension.{u} R S)
40+
variable (T : Type*) [CommRing T] [Algebra R T]
41+
42+
set_option backward.isDefEq.respectTransparency false in
43+
/-- The cotangent space of an extension commutes with base change. -/
44+
noncomputable
45+
def tensorCotangentSpace (P : Extension.{u} R S) (T : Type*) [CommRing T] [Algebra R T] :
46+
T ⊗[R] P.CotangentSpace ≃ₗ[T] (P.baseChange (T := T)).CotangentSpace :=
47+
letI := P.algebraBaseChange T
48+
letI : Algebra S (T ⊗[R] S) := TensorProduct.rightAlgebra
49+
letI : Algebra P.Ring (T ⊗[R] S) := Algebra.compHom _ (algebraMap P.Ring S)
50+
haveI : IsScalarTower R P.Ring (T ⊗[R] S) :=
51+
.of_algebraMap_eq fun x ↦ by
52+
rw [TensorProduct.algebraMap_apply, RingHom.algebraMap_toAlgebra,
53+
Algebra.TensorProduct.tmul_one_eq_one_tmul, IsScalarTower.algebraMap_apply R P.Ring]
54+
rfl
55+
letI PT : Extension T (T ⊗[R] S) := P.baseChange
56+
haveI : IsPushout R T P.Ring PT.Ring := by
57+
convert TensorProduct.isPushout (R := R) (T := P.Ring) (S := T)
58+
exact Algebra.algebra_ext _ _ fun _ ↦ rfl
59+
haveI : IsScalarTower P.Ring PT.Ring (T ⊗[R] S) := .of_algebraMap_eq' rfl
60+
(IsTensorProduct.assocOfMapSMul (TensorProduct.mk R T S) (isTensorProduct _ _ _)
61+
(TensorProduct.mk _ _ _) (isTensorProduct _ _ _) (by simp [Algebra.smul_def])
62+
(by simp [Algebra.smul_def, RingHom.algebraMap_toAlgebra])).symm ≪≫ₗ
63+
(AlgebraTensorModule.cancelBaseChange _ PT.Ring PT.Ring _ _).symm.restrictScalars T ≪≫ₗ
64+
(AlgebraTensorModule.congr (LinearEquiv.refl PT.Ring (T ⊗[R] S))
65+
(KaehlerDifferential.tensorKaehlerEquiv R T P.Ring PT.Ring)).restrictScalars T
66+
67+
attribute [local instance] algebraBaseChange in
68+
lemma tensorCotangentSpace_tmul_tmul (t : T) (s : S) (x : Ω[P.Ring⁄R]) :
69+
P.tensorCotangentSpace T (t ⊗ₜ (s ⊗ₜ x)) = t ⊗ₜ s ⊗ₜ KaehlerDifferential.map _ _ _ _ x := by
70+
simp only [tensorCotangentSpace, LinearEquiv.trans_apply, LinearEquiv.restrictScalars_apply,
71+
← mk_apply s x, IsTensorProduct.assocOfMapSMul_symm_tmul]
72+
simp only [mk_apply, AlgebraTensorModule.cancelBaseChange_symm_tmul,
73+
AlgebraTensorModule.congr_tmul, LinearEquiv.refl_apply]
74+
have this : x ∈ Submodule.span P.Ring (Set.range (KaehlerDifferential.D R P.Ring)) := by
75+
rw [KaehlerDifferential.span_range_derivation]
76+
trivial
77+
induction this using Submodule.span_induction with
78+
| zero => simp
79+
| add x y _ _ hx hy => simp [tmul_add, hx, hy]
80+
| mem y hy =>
81+
obtain ⟨y, rfl⟩ := hy
82+
simp
83+
| smul a x _ hx =>
84+
rw [tmul_smul, ← algebraMap_smul (P.baseChange (T := T)).Ring a, LinearEquiv.map_smul,
85+
tmul_smul, hx, LinearMap.map_smul, ← algebraMap_smul (P.baseChange (T := T)).Ring a,
86+
tmul_smul]
87+
88+
set_option backward.isDefEq.respectTransparency false in
89+
attribute [local instance] Algebra.TensorProduct.rightAlgebra in
90+
@[simp]
91+
lemma tensorCotangentSpace_tmul (t : T) (x : P.CotangentSpace) :
92+
P.tensorCotangentSpace T (t ⊗ₜ x) = t • CotangentSpace.map (P.toBaseChange T) x := by
93+
dsimp only [CotangentSpace] at x
94+
induction x with
95+
| zero => rw [tmul_zero, LinearEquiv.map_zero, LinearMap.map_zero, smul_zero]
96+
| add x y hx hy => rw [tmul_add, LinearEquiv.map_add, LinearMap.map_add, smul_add, hx, hy]
97+
| tmul s y =>
98+
simp [tensorCotangentSpace_tmul_tmul, CotangentSpace.map_tmul_eq_tmul_map,
99+
smul_tmul', Algebra.smul_def, RingHom.algebraMap_toAlgebra]
100+
101+
end Extension
102+
103+
end Algebra

Mathlib/RingTheory/Extension/Cotangent/Basic.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ lemma map_tmul (f : Hom P P') (x y) :
159159
rw [smul_tmul', ← Algebra.algebraMap_eq_smul_one]
160160
rfl
161161

162+
lemma map_tmul_eq_tmul_map (f : P.Hom P') (x : S) (y : Ω[P.Ring⁄R]) :
163+
letI : Algebra P.Ring P'.Ring := f.toAlgHom.toAlgebra
164+
(CotangentSpace.map f) (x ⊗ₜ[P.Ring] y) =
165+
(algebraMap S S') x ⊗ₜ[P'.Ring] KaehlerDifferential.map _ _ _ _ y := by
166+
rw [CotangentSpace.map, LinearMap.liftBaseChange_tmul, LinearMap.coe_comp, Function.comp_apply,
167+
LinearMap.restrictScalars_apply, mk_apply, smul_tmul', Algebra.smul_def, mul_one]
168+
162169
@[simp]
163170
lemma map_id :
164171
CotangentSpace.map (.id P) = LinearMap.id := by ext; simp
@@ -371,6 +378,11 @@ lemma h1Cotangentι_injective : Function.Injective P.h1Cotangentι := Subtype.va
371378

372379
@[ext] lemma h1Cotangentι_ext (x y : P.H1Cotangent) (e : x.1 = y.1) : x = y := Subtype.ext e
373380

381+
/-- The sequence `H¹(L_{S/R}) → P.Cotangent → P.CotangentSpace` is exact. -/
382+
lemma exact_hCotangentι_cotangentComplex : Function.Exact h1Cotangentι P.cotangentComplex := by
383+
rw [LinearMap.exact_iff]
384+
exact (Submodule.range_subtype _).symm
385+
374386
/--
375387
The induced map on the first homology of the (naive) cotangent complex.
376388
-/

0 commit comments

Comments
 (0)