File: Mathlib/RingTheory/Generators.lean

full_name: Algebra.Generators.vars
code: /-- A family of generators of a `R`-algebra `S` consists of
1. `vars`: The type of variables.
2. `val : vars → S`: The assignment of each variable to a value in `S`.
3. `σ`: A section of `R[X] → S`. -/
structure Algebra.Generators where
  /-- The type of variables.  -/
  vars : Type w
  /-- The assignment of each variable to a value in `S`. -/
  val : vars → S
  /-- A section of `R[X] → S`. -/
  σ' : S → MvPolynomial vars R
  aeval_val_σ' : ∀ s, aeval val (σ' s) = s
goal: Type w

full_name: Algebra.Generators.aeval_val_σ'
code: /-- A family of generators of a `R`-algebra `S` consists of
1. `vars`: The type of variables.
2. `val : vars → S`: The assignment of each variable to a value in `S`.
3. `σ`: A section of `R[X] → S`. -/
structure Algebra.Generators where
  /-- The type of variables.  -/
  vars : Type w
  /-- The assignment of each variable to a value in `S`. -/
  val : vars → S
  /-- A section of `R[X] → S`. -/
  σ' : S → MvPolynomial vars R
  aeval_val_σ' : ∀ s, aeval val (σ' s) = s
goal: (MvPolynomial.aeval self.val) (self.σ' s) = s

full_name: Algebra.Generators.σ'
code: /-- A family of generators of a `R`-algebra `S` consists of
1. `vars`: The type of variables.
2. `val : vars → S`: The assignment of each variable to a value in `S`.
3. `σ`: A section of `R[X] → S`. -/
structure Algebra.Generators where
  /-- The type of variables.  -/
  vars : Type w
  /-- The assignment of each variable to a value in `S`. -/
  val : vars → S
  /-- A section of `R[X] → S`. -/
  σ' : S → MvPolynomial vars R
  aeval_val_σ' : ∀ s, aeval val (σ' s) = s
goal: S → MvPolynomial self.vars R

full_name: Algebra.Generators
code: /-- A family of generators of a `R`-algebra `S` consists of
1. `vars`: The type of variables.
2. `val : vars → S`: The assignment of each variable to a value in `S`.
3. `σ`: A section of `R[X] → S`. -/
structure Algebra.Generators where
  /-- The type of variables.  -/
  vars : Type w
  /-- The assignment of each variable to a value in `S`. -/
  val : vars → S
  /-- A section of `R[X] → S`. -/
  σ' : S → MvPolynomial vars R
  aeval_val_σ' : ∀ s, aeval val (σ' s) = s
goal: Type (max (max u v) (w + 1))

full_name: Algebra.Generators.val
code: /-- A family of generators of a `R`-algebra `S` consists of
1. `vars`: The type of variables.
2. `val : vars → S`: The assignment of each variable to a value in `S`.
3. `σ`: A section of `R[X] → S`. -/
structure Algebra.Generators where
  /-- The type of variables.  -/
  vars : Type w
  /-- The assignment of each variable to a value in `S`. -/
  val : vars → S
  /-- A section of `R[X] → S`. -/
  σ' : S → MvPolynomial vars R
  aeval_val_σ' : ∀ s, aeval val (σ' s) = s
goal: self.vars → S

full_name: Algebra.Generators.Ring
code: /-- The polynomial ring wrt a family of generators. -/
protected
abbrev Ring : Type (max w u) 
goal: Type (max w u)

full_name: Algebra.Generators.σ
code: /-- The designated section of wrt a family of generators. -/
def σ : S → P.Ring 
goal: S → P.Ring

full_name: Algebra.Generators.Simps.σ
code: /-- See Note [custom simps projection] -/
def Simps.σ : S → P.Ring 
goal: S → P.Ring

full_name: Algebra.Generators.aeval_val_σ
code: @[simp]
lemma aeval_val_σ (s) : aeval P.val (P.σ s) = s 
goal: (MvPolynomial.aeval P.val) (P.σ s) = s

full_name: Algebra.Generators.instRing
code: instance : Algebra P.Ring S 
goal: Algebra P.Ring S

full_name: Algebra.Generators.instIsScalarTowerRing
code: noncomputable instance {R₀} [CommRing R₀] [Algebra R₀ R] [Algebra R₀ S] [IsScalarTower R₀ R S] :
    IsScalarTower R₀ P.Ring S 
goal: IsScalarTower R₀ P.Ring S

full_name: Algebra.Generators.algebraMap_eq
code: lemma algebraMap_eq : algebraMap P.Ring S = ↑(aeval (R := R) P.val) 
goal: algebraMap P.Ring S = ↑(MvPolynomial.aeval P.val)

full_name: Algebra.Generators.algebraMap_apply
code: @[simp]
lemma algebraMap_apply (x) : algebraMap P.Ring S x = aeval (R := R) P.val x 
goal: (algebraMap P.Ring S) x = (MvPolynomial.aeval P.val) x

full_name: Algebra.Generators.σ_smul
code: @[simp]
lemma σ_smul (x y) : P.σ x • y = x * y 
goal: P.σ x • y = x * y

full_name: Algebra.Generators.σ_injective
code: lemma σ_injective : P.σ.Injective 
goal: Function.Injective P.σ

full_name: Algebra.Generators.algebraMap_surjective
code: lemma algebraMap_surjective : Function.Surjective (algebraMap P.Ring S) 
goal: Function.Surjective ⇑(algebraMap P.Ring S)

full_name: Algebra.Generators.ofSurjective_vars
code: /-- Construct `Generators` from an assignment `I → S` such that `R[X] → S` is surjective. -/
@[simps val, simps (config := .lemmasOnly) vars]
noncomputable
def ofSurjective {vars} (val : vars → S) (h : Function.Surjective (aeval (R := R) val)) :
    Generators R S 
goal: (Algebra.Generators.ofSurjective val h).vars = vars

full_name: Algebra.Generators.ofSurjective
code: /-- Construct `Generators` from an assignment `I → S` such that `R[X] → S` is surjective. -/
@[simps val, simps (config := .lemmasOnly) vars]
noncomputable
def ofSurjective {vars} (val : vars → S) (h : Function.Surjective (aeval (R := R) val)) :
    Generators R S 
goal: Algebra.Generators R S

full_name: Algebra.Generators.ofSurjective_val
code: /-- Construct `Generators` from an assignment `I → S` such that `R[X] → S` is surjective. -/
@[simps val, simps (config := .lemmasOnly) vars]
noncomputable
def ofSurjective {vars} (val : vars → S) (h : Function.Surjective (aeval (R := R) val)) :
    Generators R S 
goal: ∀ (a : vars), (Algebra.Generators.ofSurjective val h).val a = val a

full_name: Algebra.Generators.ofAlgHom
code: /-- Construct `Generators` from an assignment `I → S` such that `R[X] → S` is surjective. -/
noncomputable
def ofAlgHom {I} (f : MvPolynomial I R →ₐ[R] S) (h : Function.Surjective f) :
    Generators R S 
goal: Algebra.Generators R S

full_name: Algebra.Generators.ofSet
code: /-- Construct `Generators` from a family of generators of `S`. -/
noncomputable
def ofSet {s : Set S} (hs : Algebra.adjoin R s = ⊤) : Generators R S 
goal: Algebra.Generators R S

full_name: Algebra.Generators.self_σ
code: /-- The `Generators` containing the whole algebra, which induces the canonical map  `R[S] → S`. -/
@[simps]
noncomputable
def self : Generators R S 
goal: (Algebra.Generators.self R S).σ n = MvPolynomial.X n

full_name: Algebra.Generators.self_vars
code: /-- The `Generators` containing the whole algebra, which induces the canonical map  `R[S] → S`. -/
@[simps]
noncomputable
def self : Generators R S 
goal: (Algebra.Generators.self R S).vars = S

full_name: Algebra.Generators.self
code: /-- The `Generators` containing the whole algebra, which induces the canonical map  `R[S] → S`. -/
@[simps]
noncomputable
def self : Generators R S 
goal: Algebra.Generators R S

full_name: Algebra.Generators.self_val
code: /-- The `Generators` containing the whole algebra, which induces the canonical map  `R[S] → S`. -/
@[simps]
noncomputable
def self : Generators R S 
goal: (Algebra.Generators.self R S).val a = id a

full_name: Algebra.Generators.localizationAway
code: /-- If `S` is the localization of `R` away from `r`, we obtain a canonical generator mapping
to the inverse of `r`. -/
@[simps val, simps (config := .lemmasOnly) vars σ]
noncomputable
def localizationAway : Generators R S 
goal: Algebra.Generators R S

full_name: Algebra.Generators.localizationAway_σ
code: /-- If `S` is the localization of `R` away from `r`, we obtain a canonical generator mapping
to the inverse of `r`. -/
@[simps val, simps (config := .lemmasOnly) vars σ]
noncomputable
def localizationAway : Generators R S 
goal: (Algebra.Generators.localizationAway r).σ s =
  MvPolynomial.C (IsLocalization.Away.sec r s).1 * MvPolynomial.X () ^ (IsLocalization.Away.sec r s).2

full_name: Algebra.Generators.localizationAway_val
code: /-- If `S` is the localization of `R` away from `r`, we obtain a canonical generator mapping
to the inverse of `r`. -/
@[simps val, simps (config := .lemmasOnly) vars σ]
noncomputable
def localizationAway : Generators R S 
goal: ∀ (x : Unit), (Algebra.Generators.localizationAway r).val x = IsLocalization.Away.invSelf r

full_name: Algebra.Generators.localizationAway_vars
code: /-- If `S` is the localization of `R` away from `r`, we obtain a canonical generator mapping
to the inverse of `r`. -/
@[simps val, simps (config := .lemmasOnly) vars σ]
noncomputable
def localizationAway : Generators R S 
goal: (Algebra.Generators.localizationAway r).vars = Unit

full_name: Algebra.Generators.comp_σ
code: /-- Given two families of generators `S[X] → T` and `R[Y] → S`,
we may constuct the family of generators `R[X, Y] → T`. -/
@[simps val, simps (config := .lemmasOnly) vars σ]
noncomputable
def comp (Q : Generators S T) (P : Generators R S) : Generators R T 
goal: (Q.comp P).σ x =
  Finsupp.sum (Q.σ x) fun n r =>
    (MvPolynomial.rename Sum.inr) (P.σ r) * (MvPolynomial.monomial (Finsupp.mapDomain Sum.inl n)) 1

full_name: Algebra.Generators.comp
code: /-- Given two families of generators `S[X] → T` and `R[Y] → S`,
we may constuct the family of generators `R[X, Y] → T`. -/
@[simps val, simps (config := .lemmasOnly) vars σ]
noncomputable
def comp (Q : Generators S T) (P : Generators R S) : Generators R T 
goal: Algebra.Generators R T

full_name: Algebra.Generators.comp_val
code: /-- Given two families of generators `S[X] → T` and `R[Y] → S`,
we may constuct the family of generators `R[X, Y] → T`. -/
@[simps val, simps (config := .lemmasOnly) vars σ]
noncomputable
def comp (Q : Generators S T) (P : Generators R S) : Generators R T 
goal: ∀ (a : Q.vars ⊕ P.vars), (Q.comp P).val a = Sum.elim Q.val (⇑(algebraMap S T) ∘ P.val) a

full_name: Algebra.Generators.comp_vars
code: /-- Given two families of generators `S[X] → T` and `R[Y] → S`,
we may constuct the family of generators `R[X, Y] → T`. -/
@[simps val, simps (config := .lemmasOnly) vars σ]
noncomputable
def comp (Q : Generators S T) (P : Generators R S) : Generators R T 
goal: (Q.comp P).vars = (Q.vars ⊕ P.vars)

full_name: Algebra.Generators.extendScalars
code: /-- If `R → S → T` is a tower of algebras, a family of generators `R[X] → T`
gives a family of generators `S[X] → T`. -/
@[simps val, simps (config := .lemmasOnly) vars]
noncomputable
def extendScalars (P : Generators R T) : Generators S T 
goal: Algebra.Generators S T

full_name: Algebra.Generators.extendScalars_val
code: /-- If `R → S → T` is a tower of algebras, a family of generators `R[X] → T`
gives a family of generators `S[X] → T`. -/
@[simps val, simps (config := .lemmasOnly) vars]
noncomputable
def extendScalars (P : Generators R T) : Generators S T 
goal: ∀ (a : P.vars), (Algebra.Generators.extendScalars S P).val a = P.val a

full_name: Algebra.Generators.extendScalars_vars
code: /-- If `R → S → T` is a tower of algebras, a family of generators `R[X] → T`
gives a family of generators `S[X] → T`. -/
@[simps val, simps (config := .lemmasOnly) vars]
noncomputable
def extendScalars (P : Generators R T) : Generators S T 
goal: (Algebra.Generators.extendScalars S P).vars = P.vars

full_name: Algebra.Generators.baseChange_val
code: /-- If `P` is a family of generators of `S` over `R` and `T` is an `R`-algebra, we
obtain a natural family of generators of `T ⊗[R] S` over `T`. -/
@[simps! val, simps! (config := .lemmasOnly) vars]
noncomputable
def baseChange {T} [CommRing T] [Algebra R T] (P : Generators R S) : Generators T (T ⊗[R] S) 
goal: P.baseChange.val x = 1 ⊗ₜ[R] P.val x

full_name: Algebra.Generators.baseChange_vars
code: /-- If `P` is a family of generators of `S` over `R` and `T` is an `R`-algebra, we
obtain a natural family of generators of `T ⊗[R] S` over `T`. -/
@[simps! val, simps! (config := .lemmasOnly) vars]
noncomputable
def baseChange {T} [CommRing T] [Algebra R T] (P : Generators R S) : Generators T (T ⊗[R] S) 
goal: P.baseChange.vars = P.vars

full_name: Algebra.Generators.baseChange
code: /-- If `P` is a family of generators of `S` over `R` and `T` is an `R`-algebra, we
obtain a natural family of generators of `T ⊗[R] S` over `T`. -/
@[simps! val, simps! (config := .lemmasOnly) vars]
noncomputable
def baseChange {T} [CommRing T] [Algebra R T] (P : Generators R S) : Generators T (T ⊗[R] S) 
goal: Algebra.Generators T (T ⊗[R] S)

full_name: Algebra.Generators.Hom
code: /-- Given a commuting square
R --→ P = R[X] ---→ S
|                   |
↓                   ↓
R' -→ P' = R'[X'] → S
A hom between `P` and `P'` is an assignment `I → P'` such that the arrows commute.
Also see `Algebra.Generators.Hom.equivAlgHom`.
-/
@[ext]
structure Hom where
  /-- The assignment of each variable in `I` to a value in `P' = R'[X']`. -/
  val : P.vars → P'.Ring
  aeval_val : ∀ i, aeval P'.val (val i) = algebraMap S S' (P.val i)
goal: Type (max (max u_1 u_3) w)

full_name: Algebra.Generators.Hom.val
code: /-- Given a commuting square
R --→ P = R[X] ---→ S
|                   |
↓                   ↓
R' -→ P' = R'[X'] → S
A hom between `P` and `P'` is an assignment `I → P'` such that the arrows commute.
Also see `Algebra.Generators.Hom.equivAlgHom`.
-/
@[ext]
structure Hom where
  /-- The assignment of each variable in `I` to a value in `P' = R'[X']`. -/
  val : P.vars → P'.Ring
  aeval_val : ∀ i, aeval P'.val (val i) = algebraMap S S' (P.val i)
goal: P.vars → P'.Ring

full_name: Algebra.Generators.Hom.aeval_val
code: /-- Given a commuting square
R --→ P = R[X] ---→ S
|                   |
↓                   ↓
R' -→ P' = R'[X'] → S
A hom between `P` and `P'` is an assignment `I → P'` such that the arrows commute.
Also see `Algebra.Generators.Hom.equivAlgHom`.
-/
@[ext]
structure Hom where
  /-- The assignment of each variable in `I` to a value in `P' = R'[X']`. -/
  val : P.vars → P'.Ring
  aeval_val : ∀ i, aeval P'.val (val i) = algebraMap S S' (P.val i)
goal: (MvPolynomial.aeval P'.val) (self.val i) = (algebraMap S S') (P.val i)

full_name: Algebra.Generators.Hom.toAlgHom
code: /-- A hom between two families of generators gives
an algebra homomorphism between the polynomial rings. -/
noncomputable
def Hom.toAlgHom (f : Hom P P') : P.Ring →ₐ[R] P'.Ring 
goal: P.Ring →ₐ[R] P'.Ring

full_name: Algebra.Generators.Hom.algebraMap_toAlgHom
code: @[simp]
lemma Hom.algebraMap_toAlgHom (f : Hom P P') (x) : MvPolynomial.aeval P'.val (f.toAlgHom x) =
    algebraMap S S' (MvPolynomial.aeval P.val x) 
goal: (MvPolynomial.aeval P'.val) (f.toAlgHom x) = (algebraMap S S') ((MvPolynomial.aeval P.val) x)

full_name: Algebra.Generators.Hom.toAlgHom_X
code: @[simp]
lemma Hom.toAlgHom_X (f : Hom P P') (i) : f.toAlgHom (.X i) = f.val i 
goal: f.toAlgHom (MvPolynomial.X i) = f.val i

full_name: Algebra.Generators.Hom.toAlgHom_C
code: lemma Hom.toAlgHom_C (f : Hom P P') (r) : f.toAlgHom (.C r) = .C (algebraMap _ _ r) 
goal: f.toAlgHom (MvPolynomial.C r) = MvPolynomial.C ((algebraMap R R') r)

full_name: Algebra.Generators.Hom.toAlgHom_monomial
code: lemma Hom.toAlgHom_monomial (f : Generators.Hom P P') (v r) :
    f.toAlgHom (monomial v r) = r • v.prod (f.val · ^ ·) 
goal: f.toAlgHom ((MvPolynomial.monomial v) r) = r • v.prod fun x x_1 => f.val x ^ x_1

full_name: Algebra.Generators.Hom.equivAlgHom_apply_coe
code: /-- Giving a hom between two families of generators is equivalent to
giving an algebra homomorphism between the polynomial rings. -/
@[simps]
noncomputable
def Hom.equivAlgHom :
    Hom P P' ≃ { f : P.Ring →ₐ[R] P'.Ring //
      ∀ x, aeval P'.val (f x) = algebraMap S S' (aeval P.val x) } 
goal: ↑(Algebra.Generators.Hom.equivAlgHom f) = f.toAlgHom

full_name: Algebra.Generators.Hom.equivAlgHom_symm_apply_val
code: /-- Giving a hom between two families of generators is equivalent to
giving an algebra homomorphism between the polynomial rings. -/
@[simps]
noncomputable
def Hom.equivAlgHom :
    Hom P P' ≃ { f : P.Ring →ₐ[R] P'.Ring //
      ∀ x, aeval P'.val (f x) = algebraMap S S' (aeval P.val x) } 
goal: (Algebra.Generators.Hom.equivAlgHom.symm f).val i = ↑f (MvPolynomial.X i)

full_name: Algebra.Generators.Hom.equivAlgHom
code: /-- Giving a hom between two families of generators is equivalent to
giving an algebra homomorphism between the polynomial rings. -/
@[simps]
noncomputable
def Hom.equivAlgHom :
    Hom P P' ≃ { f : P.Ring →ₐ[R] P'.Ring //
      ∀ x, aeval P'.val (f x) = algebraMap S S' (aeval P.val x) } 
goal: P.Hom P' ≃ { f // ∀ (x : P.Ring), (MvPolynomial.aeval P'.val) (f x) = (algebraMap S S') ((MvPolynomial.aeval P.val) x) }

full_name: Algebra.Generators.defaultHom_val
code: /-- The hom from `P` to `P'` given by the designated section of `P'`. -/
@[simps]
def defaultHom : Hom P P' 
goal: ∀ (a : P.vars), (P.defaultHom P').val a = (P'.σ ∘ ⇑(algebraMap S S') ∘ P.val) a

full_name: Algebra.Generators.defaultHom
code: /-- The hom from `P` to `P'` given by the designated section of `P'`. -/
@[simps]
def defaultHom : Hom P P' 
goal: P.Hom P'

full_name: Algebra.Generators.instInhabitedHom
code: instance : Inhabited (Hom P P') 
goal: Inhabited (P.Hom P')

full_name: Algebra.Generators.Hom.id
code: /-- The identity hom. -/
@[simps]
protected noncomputable def Hom.id : Hom P P 
goal: P.Hom P

full_name: Algebra.Generators.Hom.id_val
code: /-- The identity hom. -/
@[simps]
protected noncomputable def Hom.id : Hom P P 
goal: (Algebra.Generators.Hom.id P).val n = MvPolynomial.X n

full_name: Algebra.Generators.Hom.toAlgHom_id
code: @[simp]
lemma Hom.toAlgHom_id : Hom.toAlgHom (.id P) = AlgHom.id _ _ 
goal: (Algebra.Generators.Hom.id P).toAlgHom = AlgHom.id R P.Ring

full_name: Algebra.Generators.Hom.comp_val
code: /-- The composition of two homs. -/
@[simps]
noncomputable def Hom.comp (f : Hom P' P'') (g : Hom P P') : Hom P P'' 
goal: (f.comp g).val x = (MvPolynomial.aeval f.val) (g.val x)

full_name: Algebra.Generators.Hom.comp
code: /-- The composition of two homs. -/
@[simps]
noncomputable def Hom.comp (f : Hom P' P'') (g : Hom P P') : Hom P P'' 
goal: P.Hom P''

full_name: Algebra.Generators.Hom.comp_id
code: @[simp]
lemma Hom.comp_id (f : Hom P P') : f.comp (Hom.id P) = f 
goal: f.comp (Algebra.Generators.Hom.id P) = f

full_name: Algebra.Generators.Hom.id_comp
code: @[simp]
lemma Hom.id_comp (f : Hom P P') : (Hom.id P').comp f = f 
goal: (Algebra.Generators.Hom.id P').comp f = f

full_name: Algebra.Generators.Hom.toAlgHom_comp_apply
code: @[simp]
lemma Hom.toAlgHom_comp_apply (f : Hom P P') (g : Hom P' P'') (x) :
    (g.comp f).toAlgHom x = g.toAlgHom (f.toAlgHom x) 
goal: (g.comp f).toAlgHom x = g.toAlgHom (f.toAlgHom x)

full_name: Algebra.Generators.toComp_val
code: /-- Given families of generators `X ⊆ T` over `S` and `Y ⊆ S` over `R`,
there is a map of generators `R[Y] → R[X, Y]`. -/
@[simps]
noncomputable
def toComp (Q : Generators S T) (P : Generators R S) : Hom P (Q.comp P) 
goal: (Q.toComp P).val i = MvPolynomial.X (Sum.inr i)

full_name: Algebra.Generators.toComp
code: /-- Given families of generators `X ⊆ T` over `S` and `Y ⊆ S` over `R`,
there is a map of generators `R[Y] → R[X, Y]`. -/
@[simps]
noncomputable
def toComp (Q : Generators S T) (P : Generators R S) : Hom P (Q.comp P) 
goal: P.Hom (Q.comp P)

full_name: Algebra.Generators.ofComp
code: /-- Given families of generators `X ⊆ T` over `S` and `Y ⊆ S` over `R`,
there is a map of generators `R[X, Y] → S[X]`. -/
@[simps]
noncomputable
def ofComp (Q : Generators S T) (P : Generators R S) : Hom (Q.comp P) Q 
goal: (Q.comp P).Hom Q

full_name: Algebra.Generators.ofComp_val
code: /-- Given families of generators `X ⊆ T` over `S` and `Y ⊆ S` over `R`,
there is a map of generators `R[X, Y] → S[X]`. -/
@[simps]
noncomputable
def ofComp (Q : Generators S T) (P : Generators R S) : Hom (Q.comp P) Q 
goal: (Q.ofComp P).val i = Sum.elim MvPolynomial.X (⇑MvPolynomial.C ∘ P.val) i

full_name: Algebra.Generators.toExtendScalars_val
code: /-- Given families of generators `X ⊆ T`, there is a map `R[X] → S[X]`. -/
@[simps]
noncomputable
def toExtendScalars (P : Generators R T) : Hom P (P.extendScalars S) 
goal: P.toExtendScalars.val n = MvPolynomial.X n

full_name: Algebra.Generators.toExtendScalars
code: /-- Given families of generators `X ⊆ T`, there is a map `R[X] → S[X]`. -/
@[simps]
noncomputable
def toExtendScalars (P : Generators R T) : Hom P (P.extendScalars S) 
goal: P.Hom (Algebra.Generators.extendScalars S P)

full_name: Algebra.Generators.ker
code: /-- The kernel of a presentation. -/
abbrev ker : Ideal P.Ring 
goal: Ideal P.Ring

full_name: Algebra.Generators.ker_eq_ker_aeval_val
code: lemma ker_eq_ker_aeval_val : P.ker = RingHom.ker (aeval P.val) 
goal: P.ker = RingHom.ker (MvPolynomial.aeval P.val)

full_name: Algebra.Generators.Cotangent
code: /-- The cotangent space of a presentation.
This is a type synonym so that `P = R[X]` can act on it through the action of `S` without creating
a diamond. -/
def Cotangent : Type _ 
goal: Type (max u w)

full_name: Algebra.Generators.instAddCommGroupCotangent
code: noncomputable
instance : AddCommGroup P.Cotangent 
goal: AddCommGroup P.Cotangent

full_name: Algebra.Generators.Cotangent.of
code: /-- The identity map `P.ker.Cotangent → P.Cotangent` into the type synonym.  -/
def Cotangent.of (x : P.ker.Cotangent) : P.Cotangent 
goal: P.Cotangent

full_name: Algebra.Generators.Cotangent.val
code: /-- The identity map `P.Cotangent → P.ker.Cotangent` from the type synonym.  -/
def Cotangent.val (x : P.Cotangent) : P.ker.Cotangent 
goal: P.ker.Cotangent

full_name: Algebra.Generators.Cotangent.ext
code: @[ext]
lemma Cotangent.ext {x y : P.Cotangent} (e : x.val = y.val) : x = y 
goal: x = y

full_name: Algebra.Generators.Cotangent.val_add
code: @[simp] lemma val_add : (x + y).val = x.val + y.val 
goal: (x + y).val = x.val + y.val

full_name: Algebra.Generators.Cotangent.val_zero
code: @[simp] lemma val_zero : (0 : P.Cotangent).val = 0 
goal: Algebra.Generators.Cotangent.val 0 = 0

full_name: Algebra.Generators.Cotangent.of_add
code: @[simp] lemma of_add : of (w + z) = of w + of z 
goal: Algebra.Generators.Cotangent.of (w + z) = Algebra.Generators.Cotangent.of w + Algebra.Generators.Cotangent.of z

full_name: Algebra.Generators.Cotangent.of_zero
code: @[simp] lemma of_zero : (of 0 : P.Cotangent) = 0 
goal: Algebra.Generators.Cotangent.of 0 = 0

full_name: Algebra.Generators.Cotangent.of_val
code: @[simp] lemma of_val : of x.val = x 
goal: Algebra.Generators.Cotangent.of x.val = x

full_name: Algebra.Generators.Cotangent.val_of
code: @[simp] lemma val_of : (of w).val = w 
goal: (Algebra.Generators.Cotangent.of w).val = w

full_name: Algebra.Generators.Cotangent.val_sub
code: @[simp] lemma val_sub : (x - y).val = x.val - y.val 
goal: (x - y).val = x.val - y.val

full_name: Algebra.Generators.Cotangent.smul_eq_zero_of_mem
code: lemma Cotangent.smul_eq_zero_of_mem (p : P.Ring) (hp : p ∈ P.ker) (m : P.ker.Cotangent) :
    p • m = 0 
goal: p • m = 0

full_name: Algebra.Generators.Cotangent.module
code: noncomputable
instance Cotangent.module : Module S P.Cotangent 
goal: Module S P.Cotangent

full_name: Algebra.Generators.Cotangent.module'
code: noncomputable
instance Cotangent.module' {R₀} [CommRing R₀] [Algebra R₀ S] : Module R₀ P.Cotangent 
goal: Module R₀ P.Cotangent

full_name: Algebra.Generators.instIsScalarTowerCotangent
code: instance {R₁ R₂} [CommRing R₁] [CommRing R₂] [Algebra R₁ S] [Algebra R₂ S] [Algebra R₁ R₂]
    [IsScalarTower R₁ R₂ S] :
  IsScalarTower R₁ R₂ P.Cotangent 
goal: IsScalarTower R₁ R₂ P.Cotangent

full_name: Algebra.Generators.Cotangent.val_smul'''
code: lemma Cotangent.val_smul''' {R₀} [CommRing R₀] [Algebra R₀ S] (r : R₀) (x : P.Cotangent) :
    (r • x).val = P.σ (algebraMap R₀ S r) • x.val 
goal: (r • x).val = P.σ ((algebraMap R₀ S) r) • x.val

full_name: Algebra.Generators.Cotangent.val_smul
code: @[simp]
lemma Cotangent.val_smul (r : S) (x : P.Cotangent) : (r • x).val = P.σ r • x.val 
goal: (r • x).val = P.σ r • x.val

full_name: Algebra.Generators.Cotangent.val_smul'
code: @[simp]
lemma Cotangent.val_smul' (r : P.Ring) (x : P.Cotangent) : (r • x).val = r • x.val 
goal: (r • x).val = r • x.val

full_name: Algebra.Generators.Cotangent.val_smul''
code: @[simp]
lemma Cotangent.val_smul'' (r : R) (x : P.Cotangent) : (r • x).val = r • x.val 
goal: (r • x).val = r • x.val

full_name: Algebra.Generators.Cotangent.mk
code: /-- The quotient map from the kernel of `P = R[X] → S` onto the cotangent space. -/
def Cotangent.mk : P.ker →ₗ[P.Ring] P.Cotangent 
goal: ↥P.ker →ₗ[P.Ring] P.Cotangent

full_name: Algebra.Generators.Cotangent.val_mk
code: @[simp]
lemma Cotangent.val_mk (x : P.ker) : (mk x).val = Ideal.toCotangent _ x 
goal: (Algebra.Generators.Cotangent.mk x).val = P.ker.toCotangent x

full_name: Algebra.Generators.Cotangent.mk_surjective
code: lemma Cotangent.mk_surjective : Function.Surjective (mk (P := P)) 
goal: Function.Surjective ⇑Algebra.Generators.Cotangent.mk

full_name: Algebra.Generators.Cotangent.map
code: /-- A hom between families of generators induce a map between cotangent spaces. -/
noncomputable
def Cotangent.map (f : Hom P P') : P.Cotangent →ₗ[S] P'.Cotangent 
goal: P.Cotangent →ₗ[S] P'.Cotangent

full_name: Algebra.Generators.Cotangent.map_mk
code: @[simp]
lemma Cotangent.map_mk (f : Hom P P') (x) :
    Cotangent.map f (.mk x) =
      .mk ⟨f.toAlgHom x, by simpa [-map_aeval] using RingHom.congr_arg (algebraMap S S') x.2⟩ 
goal: (Algebra.Generators.Cotangent.map f) (Algebra.Generators.Cotangent.mk x) =
  Algebra.Generators.Cotangent.mk ⟨f.toAlgHom ↑x, ⋯⟩

full_name: Algebra.Generators.Cotangent.map_id
code: @[simp]
lemma Cotangent.map_id :
    Cotangent.map (.id P) = LinearMap.id 
goal: Algebra.Generators.Cotangent.map (Algebra.Generators.Hom.id P) = LinearMap.id

full_name: Algebra.Generators.Cotangent.map_comp
code: lemma Cotangent.map_comp (f : Hom P P') (g : Hom P' P'') :
    Cotangent.map (g.comp f) = (map g).restrictScalars S ∘ₗ map f 
goal: Algebra.Generators.Cotangent.map (g.comp f) =
  ↑S (Algebra.Generators.Cotangent.map g) ∘ₗ Algebra.Generators.Cotangent.map f