Skip to content

Commit fe78577

Browse files
justus-springerBergschaf
authored andcommitted
feat(RingTheory/Smooth/Basic): add Generators.mvPolynomial (leanprover-community#39708)
Define trivial `Generators` for `MvPolynomial` and use it to golf `FormallySmooth.mvPolynomial` (where they were previously defined inline). This also removes a `set_option backward.isDefEq.respectTransparency false`. - [x] depends on: leanprover-community#39706
1 parent 90d3d85 commit fe78577

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

Mathlib/RingTheory/Extension/Generators.lean

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public import Mathlib.RingTheory.Extension.Basic
3535
- `Algebra.Generators.Cotangent`: The cotangent space w.r.t. `P = R[X] → S`, i.e. the
3636
space `I/I²` with `I` being the kernel of the presentation.
3737
38+
- `Algebra.Generators.mvPolynomial`: The canonical `R`-generators of the polynomial algebra
39+
`MvPolynomial ι R`, indexed by `ι` via the variables `X`.
40+
3841
## TODOs
3942
4043
Currently, Lean does not see through the `ι` field of terms of `Generators R S` obtained
@@ -139,6 +142,15 @@ noncomputable def id : Generators R R PEmpty.{w + 1} := ofSurjectiveAlgebraMap <
139142
rw [algebraMap_self]
140143
exact RingHomSurjective.is_surjective
141144

145+
variable (R ι) in
146+
/-- The canonical `R`-generators of the polynomial algebra `MvPolynomial ι R`,
147+
indexed by `ι` via the variables `X`. -/
148+
@[simps σ, simps -fullyApplied val]
149+
noncomputable def mvPolynomial : Generators R (MvPolynomial ι R) ι where
150+
val := X
151+
σ' f := f
152+
aeval_val_σ' := aeval_X_left_apply
153+
142154
/-- Construct `Generators` from an assignment `I → S` such that `R[X] → S` is surjective. -/
143155
noncomputable
144156
def ofAlgHom {I : Type*} (f : MvPolynomial I R →ₐ[R] S) (h : Function.Surjective f) :
@@ -606,6 +618,9 @@ lemma ker_eq_ker_aeval_val : P.ker = RingHom.ker (aeval P.val) := by
606618
simp only [ker, Extension.ker, toExtension_Ring, algebraMap_eq]
607619
rfl
608620

621+
lemma ker_mvPolynomial : (mvPolynomial R ι).ker = ⊥ := by
622+
simp [ker_eq_ker_aeval_val, SetLike.ext_iff, aeval_X_left]
623+
609624
variable {P} in
610625
lemma aeval_val_eq_zero {x} (hx : x ∈ P.ker) : aeval P.val x = 0 := by rwa [← algebraMap_apply]
611626

Mathlib/RingTheory/Smooth/Basic.lean

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,10 @@ lemma FormallySmooth.comp_surjective [FormallySmooth R A] (I : Ideal B) (hI : I
107107
simpa using (Function.surjInv_eq _ _).symm
108108
exact ⟨l.comp g, by rw [← AlgHom.comp_assoc, ← this, AlgHom.comp_assoc, hg, AlgHom.comp_id]⟩
109109

110-
set_option backward.isDefEq.respectTransparency false in
111110
instance instFormallySmoothMvPolynomial (σ : Type*) : FormallySmooth R (MvPolynomial σ R) := by
112-
let P : Generators R (MvPolynomial σ R) σ :=
113-
.ofSurjective X (by simp [aeval_X_left, Function.Surjective])
111+
let P := Generators.mvPolynomial R σ
114112
have : Subsingleton ↥P.toExtension.ker :=
115-
Submodule.subsingleton_iff_eq_bot.mpr <| by
116-
simp [SetLike.ext_iff, P, Generators.ofSurjective, aeval_X_left]
113+
Submodule.subsingleton_iff_eq_bot.mpr Generators.ker_mvPolynomial
117114
have : Subsingleton P.toExtension.Cotangent := Cotangent.mk_surjective.subsingleton
118115
have := P.toExtension.h1Cotangentι_injective.subsingleton
119116
exact ⟨inferInstance, P.equivH1Cotangent.symm.subsingleton⟩

0 commit comments

Comments
 (0)