forked from leanprover-community/mathlib4
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLocal.lean
More file actions
101 lines (91 loc) · 5.05 KB
/
Copy pathLocal.lean
File metadata and controls
101 lines (91 loc) · 5.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/-
Copyright (c) 2024 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-/
module
public import Mathlib.RingTheory.Flat.FaithfullyFlat.Basic
public import Mathlib.RingTheory.LocalRing.Module
public import Mathlib.RingTheory.Smooth.Basic
public import Mathlib.RingTheory.TensorProduct.Free
/-!
# Formally smooth local algebras
-/
public section
open TensorProduct IsLocalRing KaehlerDifferential
variable {R S : Type*} [CommRing R] [CommRing S] [IsLocalRing S] [Algebra R S]
namespace Algebra
/--
The **Jacobian criterion** for smoothness of local algebras.
Suppose `S` is a local `R`-algebra, and `0 → I → P → S → 0` is a presentation such that
`P` is formally-smooth over `R`, `Ω[P⁄R]` is finite free over `P`,
(typically satisfied when `P` is the localization of a polynomial ring of finite type)
and `I` is finitely generated.
Then `S` is formally smooth iff `k ⊗ₛ I/I² → k ⊗ₚ Ω[P/R]` is injective,
where `k` is the residue field of `S`.
-/
theorem FormallySmooth.iff_injective_lTensor_residueField.{u}
(P : Algebra.Extension.{u} R S)
[FormallySmooth R P.Ring]
[Module.Free P.Ring Ω[P.Ring⁄R]] [Module.Finite P.Ring Ω[P.Ring⁄R]]
(h' : P.ker.FG) :
Algebra.FormallySmooth R S ↔
Function.Injective (P.cotangentComplex.lTensor (ResidueField S)) := by
have : Module.Finite P.Ring P.Cotangent :=
have : Module.Finite P.Ring P.ker := .of_fg h'
.of_surjective _ Extension.Cotangent.mk_surjective
have : Module.Finite S P.Cotangent := Module.Finite.of_restrictScalars_finite P.Ring _ _
rw [← IsLocalRing.split_injective_iff_lTensor_residueField_injective,
P.formallySmooth_iff_split_injection]
set_option backward.isDefEq.respectTransparency false in
theorem FormallySmooth.iff_injective_cotangentComplexBaseChange_residueField
(P : Type*) [CommRing P] [Algebra R P] [Algebra P S]
[IsScalarTower R P S] [FormallySmooth R P] [Module.Free P Ω[P⁄R]] [Module.Finite P Ω[P⁄R]]
(h₁ : Function.Surjective (algebraMap P S)) (h₂ : (RingHom.ker (algebraMap P S)).FG) :
Algebra.FormallySmooth R S ↔
Function.Injective (cotangentComplexBaseChange R S P (ResidueField S)) := by
let P' : Extension R S := { Ring := P, σ := _, algebraMap_σ := Function.surjInv_eq h₁ }
rw [Algebra.FormallySmooth.iff_injective_lTensor_residueField P' h₂]
rw [P'.cotangentComplexBaseChange_eq_lTensor_cotangentComplex (ResidueField S)]
refine .trans ?_ ((AlgebraTensorModule.cancelBaseChange P'.Ring S _ _
Ω[P'.Ring⁄R]).comp_injective _).symm
exact (((AlgebraTensorModule.cancelBaseChange P'.Ring S _ _ P'.ker).symm ≪≫ₗ
P'.cotangentEquiv.baseChange (A := _)).injective_comp _).symm
/--
The **Jacobian criterion** for smoothness of local algebras.
Suppose `S` is a local `R`-algebra, and `0 → I → P → S → 0` is a presentation such that
`P` is formally-smooth over `R`, `Ω[P⁄R]` is finite free over `P`,
(typically satisfied when `P` is the localization of a polynomial ring of finite type)
and `I` is finitely generated.
Then `S` is formally smooth iff `k ⊗ₛ I → k ⊗ₚ Ω[P/R]` is injective,
where `k` any field extension of the residue field of `S`.
-/
theorem FormallySmooth.iff_injective_cotangentComplexBaseChange
(P K : Type*) [Field K] [CommRing P] [Algebra R P] [Algebra P S]
[IsScalarTower R P S] [Algebra S K] [Algebra P K] [IsScalarTower P S K]
[FormallySmooth R P] [Module.Free P Ω[P⁄R]] [Module.Finite P Ω[P⁄R]]
(h₁ : Function.Surjective (algebraMap P S)) (h₂ : (RingHom.ker (algebraMap P S)).FG)
(h₃ : maximalIdeal S ≤ RingHom.ker (algebraMap S K)) :
Algebra.FormallySmooth R S ↔ Function.Injective (cotangentComplexBaseChange R S P K) := by
let f : ResidueField S →ₐ[S] K := Ideal.Quotient.liftₐ _ (Algebra.ofId _ _) h₃
let := f.toAlgebra
have := IsScalarTower.of_algebraMap_eq' f.comp_algebraMap.symm
have : IsScalarTower P (ResidueField S) K := .to₁₃₄ _ S _ _
rw [FormallySmooth.iff_injective_cotangentComplexBaseChange_residueField P h₁ h₂,
← Module.FaithfullyFlat.lTensor_injective_iff_injective _ K]
have : (AlgebraTensorModule.cancelBaseChange _ _ _ _ _).toLinearMap ∘ₗ
(cotangentComplexBaseChange R S P (ResidueField S)).baseChange K ∘ₗ
(AlgebraTensorModule.cancelBaseChange _ _ _ _ _).symm.toLinearMap =
(cotangentComplexBaseChange R S P K) := by
ext
#adaptation_note /-- Prior to nightly-2026-04-06, this was just `simp`. -/
simp_rw [AlgebraTensorModule.curry_apply, LinearMap.restrictScalars_comp, curry_apply,
LinearMap.coe_comp, LinearMap.coe_restrictScalars, LinearEquiv.coe_coe, Function.comp_apply,
AlgebraTensorModule.cancelBaseChange_symm_tmul, LinearMap.baseChange_tmul,
cotangentComplexBaseChange_tmul, kerToTensor_apply, one_smul]
erw [AlgebraTensorModule.cancelBaseChange_tmul]
simp
rw [← this]
refine .trans ?_ ((AlgebraTensorModule.cancelBaseChange _ _ _ _ _).comp_injective _).symm
exact ((AlgebraTensorModule.cancelBaseChange _ _ _ _ _).symm.injective_comp _).symm
end Algebra