File: Mathlib/Algebra/TrivSqZeroExt.lean

full_name: TrivSqZeroExt
code: /-- "Trivial Square-Zero Extension".

Given a module `M` over a ring `R`, the trivial square-zero extension of `M` over `R` is defined
to be the `R`-algebra `R × M` with multiplication given by
`(r₁ + m₁) * (r₂ + m₂) = r₁ r₂ + r₁ m₂ + r₂ m₁`.

It is a square-zero extension because `M^2 = 0`.
-/
def TrivSqZeroExt (R : Type u) (M : Type v) 
goal: Type (max u v)

full_name: _aux_Mathlib_Algebra_TrivSqZeroExt___unexpand_TrivSqZeroExt_1
code: local notation "tsze" => TrivSqZeroExt
goal: Lean.PrettyPrinter.Unexpander

full_name: _aux_Mathlib_Algebra_TrivSqZeroExt___macroRules_termTsze_1
code: local notation "tsze" => TrivSqZeroExt
goal: Lean.Macro

full_name: TrivSqZeroExt.inl
code: /-- The canonical inclusion `R → TrivSqZeroExt R M`. -/
def inl [Zero M] (r : R) : tsze R M 
goal: tsze R M

full_name: TrivSqZeroExt.inr
code: /-- The canonical inclusion `M → TrivSqZeroExt R M`. -/
def inr [Zero R] (m : M) : tsze R M 
goal: tsze R M

full_name: TrivSqZeroExt.fst
code: /-- The canonical projection `TrivSqZeroExt R M → R`. -/
def fst (x : tsze R M) : R 
goal: R

full_name: TrivSqZeroExt.snd
code: /-- The canonical projection `TrivSqZeroExt R M → M`. -/
def snd (x : tsze R M) : M 
goal: M

full_name: TrivSqZeroExt.fst_mk
code: @[simp]
theorem fst_mk (r : R) (m : M) : fst (r, m) = r 
goal: TrivSqZeroExt.fst (r, m) = r

full_name: TrivSqZeroExt.snd_mk
code: @[simp]
theorem snd_mk (r : R) (m : M) : snd (r, m) = m 
goal: TrivSqZeroExt.snd (r, m) = m

full_name: TrivSqZeroExt.ext
code: @[ext]
theorem ext {x y : tsze R M} (h1 : x.fst = y.fst) (h2 : x.snd = y.snd) : x = y 
goal: x = y

full_name: TrivSqZeroExt.fst_inl
code: @[simp]
theorem fst_inl [Zero M] (r : R) : (inl r : tsze R M).fst = r 
goal: (TrivSqZeroExt.inl r).fst = r

full_name: TrivSqZeroExt.snd_inl
code: @[simp]
theorem snd_inl [Zero M] (r : R) : (inl r : tsze R M).snd = 0 
goal: (TrivSqZeroExt.inl r).snd = 0

full_name: TrivSqZeroExt.fst_comp_inl
code: @[simp]
theorem fst_comp_inl [Zero M] : fst ∘ (inl : R → tsze R M) = id 
goal: TrivSqZeroExt.fst ∘ TrivSqZeroExt.inl = id

full_name: TrivSqZeroExt.snd_comp_inl
code: @[simp]
theorem snd_comp_inl [Zero M] : snd ∘ (inl : R → tsze R M) = 0 
goal: TrivSqZeroExt.snd ∘ TrivSqZeroExt.inl = 0

full_name: TrivSqZeroExt.fst_inr
code: @[simp]
theorem fst_inr [Zero R] (m : M) : (inr m : tsze R M).fst = 0 
goal: (TrivSqZeroExt.inr m).fst = 0

full_name: TrivSqZeroExt.snd_inr
code: @[simp]
theorem snd_inr [Zero R] (m : M) : (inr m : tsze R M).snd = m 
goal: (TrivSqZeroExt.inr m).snd = m

full_name: TrivSqZeroExt.fst_comp_inr
code: @[simp]
theorem fst_comp_inr [Zero R] : fst ∘ (inr : M → tsze R M) = 0 
goal: TrivSqZeroExt.fst ∘ TrivSqZeroExt.inr = 0

full_name: TrivSqZeroExt.snd_comp_inr
code: @[simp]
theorem snd_comp_inr [Zero R] : snd ∘ (inr : M → tsze R M) = id 
goal: TrivSqZeroExt.snd ∘ TrivSqZeroExt.inr = id

full_name: TrivSqZeroExt.inl_injective
code: theorem inl_injective [Zero M] : Function.Injective (inl : R → tsze R M) 
goal: Function.Injective TrivSqZeroExt.inl

full_name: TrivSqZeroExt.inr_injective
code: theorem inr_injective [Zero R] : Function.Injective (inr : M → tsze R M) 
goal: Function.Injective TrivSqZeroExt.inr

full_name: TrivSqZeroExt.inhabited
code: instance inhabited [Inhabited R] [Inhabited M] : Inhabited (tsze R M) 
goal: Inhabited (tsze R M)

full_name: TrivSqZeroExt.zero
code: instance zero [Zero R] [Zero M] : Zero (tsze R M) 
goal: Zero (tsze R M)

full_name: TrivSqZeroExt.add
code: instance add [Add R] [Add M] : Add (tsze R M) 
goal: Add (tsze R M)

full_name: TrivSqZeroExt.sub
code: instance sub [Sub R] [Sub M] : Sub (tsze R M) 
goal: Sub (tsze R M)

full_name: TrivSqZeroExt.neg
code: instance neg [Neg R] [Neg M] : Neg (tsze R M) 
goal: Neg (tsze R M)

full_name: TrivSqZeroExt.addSemigroup
code: instance addSemigroup [AddSemigroup R] [AddSemigroup M] : AddSemigroup (tsze R M) 
goal: AddSemigroup (tsze R M)

full_name: TrivSqZeroExt.addZeroClass
code: instance addZeroClass [AddZeroClass R] [AddZeroClass M] : AddZeroClass (tsze R M) 
goal: AddZeroClass (tsze R M)

full_name: TrivSqZeroExt.addMonoid
code: instance addMonoid [AddMonoid R] [AddMonoid M] : AddMonoid (tsze R M) 
goal: AddMonoid (tsze R M)

full_name: TrivSqZeroExt.addGroup
code: instance addGroup [AddGroup R] [AddGroup M] : AddGroup (tsze R M) 
goal: AddGroup (tsze R M)

full_name: TrivSqZeroExt.addCommSemigroup
code: instance addCommSemigroup [AddCommSemigroup R] [AddCommSemigroup M] : AddCommSemigroup (tsze R M) 
goal: AddCommSemigroup (tsze R M)

full_name: TrivSqZeroExt.addCommMonoid
code: instance addCommMonoid [AddCommMonoid R] [AddCommMonoid M] : AddCommMonoid (tsze R M) 
goal: AddCommMonoid (tsze R M)

full_name: TrivSqZeroExt.addCommGroup
code: instance addCommGroup [AddCommGroup R] [AddCommGroup M] : AddCommGroup (tsze R M) 
goal: AddCommGroup (tsze R M)

full_name: TrivSqZeroExt.smul
code: instance smul [SMul S R] [SMul S M] : SMul S (tsze R M) 
goal: SMul S (tsze R M)

full_name: TrivSqZeroExt.isScalarTower
code: instance isScalarTower [SMul T R] [SMul T M] [SMul S R] [SMul S M] [SMul T S]
    [IsScalarTower T S R] [IsScalarTower T S M] : IsScalarTower T S (tsze R M) 
goal: IsScalarTower T S (tsze R M)

full_name: TrivSqZeroExt.smulCommClass
code: instance smulCommClass [SMul T R] [SMul T M] [SMul S R] [SMul S M]
    [SMulCommClass T S R] [SMulCommClass T S M] : SMulCommClass T S (tsze R M) 
goal: SMulCommClass T S (tsze R M)

full_name: TrivSqZeroExt.isCentralScalar
code: instance isCentralScalar [SMul S R] [SMul S M] [SMul Sᵐᵒᵖ R] [SMul Sᵐᵒᵖ M] [IsCentralScalar S R]
    [IsCentralScalar S M] : IsCentralScalar S (tsze R M) 
goal: IsCentralScalar S (tsze R M)

full_name: TrivSqZeroExt.mulAction
code: instance mulAction [Monoid S] [MulAction S R] [MulAction S M] : MulAction S (tsze R M) 
goal: MulAction S (tsze R M)

full_name: TrivSqZeroExt.distribMulAction
code: instance distribMulAction [Monoid S] [AddMonoid R] [AddMonoid M]
    [DistribMulAction S R] [DistribMulAction S M] : DistribMulAction S (tsze R M) 
goal: DistribMulAction S (tsze R M)

full_name: TrivSqZeroExt.module
code: instance module [Semiring S] [AddCommMonoid R] [AddCommMonoid M] [Module S R] [Module S M] :
    Module S (tsze R M) 
goal: Module S (tsze R M)

full_name: TrivSqZeroExt.fst_zero
code: @[simp]
theorem fst_zero [Zero R] [Zero M] : (0 : tsze R M).fst = 0 
goal: TrivSqZeroExt.fst 0 = 0

full_name: TrivSqZeroExt.snd_zero
code: @[simp]
theorem snd_zero [Zero R] [Zero M] : (0 : tsze R M).snd = 0 
goal: TrivSqZeroExt.snd 0 = 0

full_name: TrivSqZeroExt.fst_add
code: @[simp]
theorem fst_add [Add R] [Add M] (x₁ x₂ : tsze R M) : (x₁ + x₂).fst = x₁.fst + x₂.fst 
goal: (x₁ + x₂).fst = x₁.fst + x₂.fst

full_name: TrivSqZeroExt.snd_add
code: @[simp]
theorem snd_add [Add R] [Add M] (x₁ x₂ : tsze R M) : (x₁ + x₂).snd = x₁.snd + x₂.snd 
goal: (x₁ + x₂).snd = x₁.snd + x₂.snd

full_name: TrivSqZeroExt.fst_neg
code: @[simp]
theorem fst_neg [Neg R] [Neg M] (x : tsze R M) : (-x).fst = -x.fst 
goal: (-x).fst = -x.fst

full_name: TrivSqZeroExt.snd_neg
code: @[simp]
theorem snd_neg [Neg R] [Neg M] (x : tsze R M) : (-x).snd = -x.snd 
goal: (-x).snd = -x.snd

full_name: TrivSqZeroExt.fst_sub
code: @[simp]
theorem fst_sub [Sub R] [Sub M] (x₁ x₂ : tsze R M) : (x₁ - x₂).fst = x₁.fst - x₂.fst 
goal: (x₁ - x₂).fst = x₁.fst - x₂.fst

full_name: TrivSqZeroExt.snd_sub
code: @[simp]
theorem snd_sub [Sub R] [Sub M] (x₁ x₂ : tsze R M) : (x₁ - x₂).snd = x₁.snd - x₂.snd 
goal: (x₁ - x₂).snd = x₁.snd - x₂.snd

full_name: TrivSqZeroExt.fst_smul
code: @[simp]
theorem fst_smul [SMul S R] [SMul S M] (s : S) (x : tsze R M) : (s • x).fst = s • x.fst 
goal: (s •> x).fst = s •> x.fst

full_name: TrivSqZeroExt.snd_smul
code: @[simp]
theorem snd_smul [SMul S R] [SMul S M] (s : S) (x : tsze R M) : (s • x).snd = s • x.snd 
goal: (s •> x).snd = s •> x.snd

full_name: TrivSqZeroExt.fst_sum
code: theorem fst_sum {ι} [AddCommMonoid R] [AddCommMonoid M] (s : Finset ι) (f : ι → tsze R M) :
    (∑ i ∈ s, f i).fst = ∑ i ∈ s, (f i).fst 
goal: (∑ i ∈ s, f i).fst = ∑ i ∈ s, (f i).fst

full_name: TrivSqZeroExt.snd_sum
code: theorem snd_sum {ι} [AddCommMonoid R] [AddCommMonoid M] (s : Finset ι) (f : ι → tsze R M) :
    (∑ i ∈ s, f i).snd = ∑ i ∈ s, (f i).snd 
goal: (∑ i ∈ s, f i).snd = ∑ i ∈ s, (f i).snd

full_name: TrivSqZeroExt.inl_zero
code: @[simp]
theorem inl_zero [Zero R] [Zero M] : (inl 0 : tsze R M) = 0 
goal: TrivSqZeroExt.inl 0 = 0

full_name: TrivSqZeroExt.inl_add
code: @[simp]
theorem inl_add [Add R] [AddZeroClass M] (r₁ r₂ : R) :
    (inl (r₁ + r₂) : tsze R M) = inl r₁ + inl r₂ 
goal: TrivSqZeroExt.inl (r₁ + r₂) = TrivSqZeroExt.inl r₁ + TrivSqZeroExt.inl r₂

full_name: TrivSqZeroExt.inl_neg
code: @[simp]
theorem inl_neg [Neg R] [SubNegZeroMonoid M] (r : R) : (inl (-r) : tsze R M) = -inl r 
goal: TrivSqZeroExt.inl (-r) = -TrivSqZeroExt.inl r

full_name: TrivSqZeroExt.inl_sub
code: @[simp]
theorem inl_sub [Sub R] [SubNegZeroMonoid M] (r₁ r₂ : R) :
    (inl (r₁ - r₂) : tsze R M) = inl r₁ - inl r₂ 
goal: TrivSqZeroExt.inl (r₁ - r₂) = TrivSqZeroExt.inl r₁ - TrivSqZeroExt.inl r₂

full_name: TrivSqZeroExt.inl_smul
code: @[simp]
theorem inl_smul [Monoid S] [AddMonoid M] [SMul S R] [DistribMulAction S M] (s : S) (r : R) :
    (inl (s • r) : tsze R M) = s • inl r 
goal: TrivSqZeroExt.inl (s •> r) = s •> TrivSqZeroExt.inl r

full_name: TrivSqZeroExt.inl_sum
code: theorem inl_sum {ι} [AddCommMonoid R] [AddCommMonoid M] (s : Finset ι) (f : ι → R) :
    (inl (∑ i ∈ s, f i) : tsze R M) = ∑ i ∈ s, inl (f i) 
goal: TrivSqZeroExt.inl (∑ i ∈ s, f i) = ∑ i ∈ s, TrivSqZeroExt.inl (f i)

full_name: TrivSqZeroExt.inr_zero
code: @[simp]
theorem inr_zero [Zero R] [Zero M] : (inr 0 : tsze R M) = 0 
goal: TrivSqZeroExt.inr 0 = 0

full_name: TrivSqZeroExt.inr_add
code: @[simp]
theorem inr_add [AddZeroClass R] [AddZeroClass M] (m₁ m₂ : M) :
    (inr (m₁ + m₂) : tsze R M) = inr m₁ + inr m₂ 
goal: TrivSqZeroExt.inr (m₁ + m₂) = TrivSqZeroExt.inr m₁ + TrivSqZeroExt.inr m₂

full_name: TrivSqZeroExt.inr_neg
code: @[simp]
theorem inr_neg [SubNegZeroMonoid R] [Neg M] (m : M) : (inr (-m) : tsze R M) = -inr m 
goal: TrivSqZeroExt.inr (-m) = -TrivSqZeroExt.inr m

full_name: TrivSqZeroExt.inr_sub
code: @[simp]
theorem inr_sub [SubNegZeroMonoid R] [Sub M] (m₁ m₂ : M) :
    (inr (m₁ - m₂) : tsze R M) = inr m₁ - inr m₂ 
goal: TrivSqZeroExt.inr (m₁ - m₂) = TrivSqZeroExt.inr m₁ - TrivSqZeroExt.inr m₂

full_name: TrivSqZeroExt.inr_smul
code: @[simp]
theorem inr_smul [Zero R] [Zero S] [SMulWithZero S R] [SMul S M] (r : S) (m : M) :
    (inr (r • m) : tsze R M) = r • inr m 
goal: TrivSqZeroExt.inr (r •> m) = r •> TrivSqZeroExt.inr m

full_name: TrivSqZeroExt.inr_sum
code: theorem inr_sum {ι} [AddCommMonoid R] [AddCommMonoid M] (s : Finset ι) (f : ι → M) :
    (inr (∑ i ∈ s, f i) : tsze R M) = ∑ i ∈ s, inr (f i) 
goal: TrivSqZeroExt.inr (∑ i ∈ s, f i) = ∑ i ∈ s, TrivSqZeroExt.inr (f i)

full_name: TrivSqZeroExt.inl_fst_add_inr_snd_eq
code: theorem inl_fst_add_inr_snd_eq [AddZeroClass R] [AddZeroClass M] (x : tsze R M) :
    inl x.fst + inr x.snd = x 
goal: TrivSqZeroExt.inl x.fst + TrivSqZeroExt.inr x.snd = x

full_name: TrivSqZeroExt.ind
code: /-- To show a property hold on all `TrivSqZeroExt R M` it suffices to show it holds
on terms of the form `inl r + inr m`. -/
@[elab_as_elim, induction_eliminator, cases_eliminator]
theorem ind {R M} [AddZeroClass R] [AddZeroClass M] {P : TrivSqZeroExt R M → Prop}
    (inl_add_inr : ∀ r m, P (inl r + inr m)) (x) : P x 
goal: P x

full_name: TrivSqZeroExt.linearMap_ext
code: /-- This cannot be marked `@[ext]` as it ends up being used instead of `LinearMap.prod_ext` when
working with `R × M`. -/
theorem linearMap_ext {N} [Semiring S] [AddCommMonoid R] [AddCommMonoid M] [AddCommMonoid N]
    [Module S R] [Module S M] [Module S N] ⦃f g : tsze R M →ₗ[S] N⦄
    (hl : ∀ r, f (inl r) = g (inl r)) (hr : ∀ m, f (inr m) = g (inr m)) : f = g 
goal: f = g

full_name: TrivSqZeroExt.inrHom_apply
code: /-- The canonical `R`-linear inclusion `M → TrivSqZeroExt R M`. -/
@[simps apply]
def inrHom [Semiring R] [AddCommMonoid M] [Module R M] : M →ₗ[R] tsze R M 
goal: (TrivSqZeroExt.inrHom R M) m = TrivSqZeroExt.inr m

full_name: TrivSqZeroExt.inrHom
code: /-- The canonical `R`-linear inclusion `M → TrivSqZeroExt R M`. -/
@[simps apply]
def inrHom [Semiring R] [AddCommMonoid M] [Module R M] : M →ₗ[R] tsze R M 
goal: M →ₗ[R] tsze R M

full_name: TrivSqZeroExt.sndHom
code: /-- The canonical `R`-linear projection `TrivSqZeroExt R M → M`. -/
@[simps apply]
def sndHom [Semiring R] [AddCommMonoid M] [Module R M] : tsze R M →ₗ[R] M 
goal: tsze R M →ₗ[R] M

full_name: TrivSqZeroExt.sndHom_apply
code: /-- The canonical `R`-linear projection `TrivSqZeroExt R M → M`. -/
@[simps apply]
def sndHom [Semiring R] [AddCommMonoid M] [Module R M] : tsze R M →ₗ[R] M 
goal: (TrivSqZeroExt.sndHom R M) x = x.snd

full_name: TrivSqZeroExt.one
code: instance one [One R] [Zero M] : One (tsze R M) 
goal: One (tsze R M)

full_name: TrivSqZeroExt.mul
code: instance mul [Mul R] [Add M] [SMul R M] [SMul Rᵐᵒᵖ M] : Mul (tsze R M) 
goal: Mul (tsze R M)

full_name: TrivSqZeroExt.fst_one
code: @[simp]
theorem fst_one [One R] [Zero M] : (1 : tsze R M).fst = 1 
goal: TrivSqZeroExt.fst 1 = 1

full_name: TrivSqZeroExt.snd_one
code: @[simp]
theorem snd_one [One R] [Zero M] : (1 : tsze R M).snd = 0 
goal: TrivSqZeroExt.snd 1 = 0

full_name: TrivSqZeroExt.fst_mul
code: @[simp]
theorem fst_mul [Mul R] [Add M] [SMul R M] [SMul Rᵐᵒᵖ M] (x₁ x₂ : tsze R M) :
    (x₁ * x₂).fst = x₁.fst * x₂.fst 
goal: (x₁ * x₂).fst = x₁.fst * x₂.fst

full_name: TrivSqZeroExt.snd_mul
code: @[simp]
theorem snd_mul [Mul R] [Add M] [SMul R M] [SMul Rᵐᵒᵖ M] (x₁ x₂ : tsze R M) :
    (x₁ * x₂).snd = x₁.fst •> x₂.snd + x₁.snd <• x₂.fst 
goal: (x₁ * x₂).snd = x₁.fst •> x₂.snd + x₁.snd <• x₂.fst

full_name: TrivSqZeroExt.inl_one
code: @[simp]
theorem inl_one [One R] [Zero M] : (inl 1 : tsze R M) = 1 
goal: TrivSqZeroExt.inl 1 = 1

full_name: TrivSqZeroExt.inl_mul
code: @[simp]
theorem inl_mul [Monoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M]
    (r₁ r₂ : R) : (inl (r₁ * r₂) : tsze R M) = inl r₁ * inl r₂ 
goal: TrivSqZeroExt.inl (r₁ * r₂) = TrivSqZeroExt.inl r₁ * TrivSqZeroExt.inl r₂

full_name: TrivSqZeroExt.inl_mul_inl
code: theorem inl_mul_inl [Monoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M]
    (r₁ r₂ : R) : (inl r₁ * inl r₂ : tsze R M) = inl (r₁ * r₂) 
goal: TrivSqZeroExt.inl r₁ * TrivSqZeroExt.inl r₂ = TrivSqZeroExt.inl (r₁ * r₂)

full_name: TrivSqZeroExt.inr_mul_inr
code: @[simp]
theorem inr_mul_inr [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M] (m₁ m₂ : M) :
    (inr m₁ * inr m₂ : tsze R M) = 0 
goal: TrivSqZeroExt.inr m₁ * TrivSqZeroExt.inr m₂ = 0

full_name: TrivSqZeroExt.inl_mul_inr
code: theorem inl_mul_inr [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M] (r : R) (m : M) :
    (inl r * inr m : tsze R M) = inr (r • m) 
goal: TrivSqZeroExt.inl r * TrivSqZeroExt.inr m = TrivSqZeroExt.inr (r •> m)

full_name: TrivSqZeroExt.inr_mul_inl
code: theorem inr_mul_inl [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M] (r : R) (m : M) :
    (inr m * inl r : tsze R M) = inr (m <• r) 
goal: TrivSqZeroExt.inr m * TrivSqZeroExt.inl r = TrivSqZeroExt.inr (m <• r)

full_name: TrivSqZeroExt.inl_mul_eq_smul
code: theorem inl_mul_eq_smul [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M]
    (r : R) (x : tsze R M) :
    inl r * x = r •> x 
goal: TrivSqZeroExt.inl r * x = r •> x

full_name: TrivSqZeroExt.mul_inl_eq_op_smul
code: theorem mul_inl_eq_op_smul [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M]
    (x : tsze R M) (r : R) :
    x * inl r = x <• r 
goal: x * TrivSqZeroExt.inl r = x <• r

full_name: TrivSqZeroExt.mulOneClass
code: instance mulOneClass [Monoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M] :
    MulOneClass (tsze R M) 
goal: MulOneClass (tsze R M)

full_name: TrivSqZeroExt.addMonoidWithOne
code: instance addMonoidWithOne [AddMonoidWithOne R] [AddMonoid M] : AddMonoidWithOne (tsze R M) 
goal: AddMonoidWithOne (tsze R M)

full_name: TrivSqZeroExt.fst_natCast
code: @[simp]
theorem fst_natCast [AddMonoidWithOne R] [AddMonoid M] (n : ℕ) : (n : tsze R M).fst = n 
goal: (↑n).fst = ↑n

full_name: TrivSqZeroExt.snd_natCast
code: @[simp]
theorem snd_natCast [AddMonoidWithOne R] [AddMonoid M] (n : ℕ) : (n : tsze R M).snd = 0 
goal: (↑n).snd = 0

full_name: TrivSqZeroExt.inl_natCast
code: @[simp]
theorem inl_natCast [AddMonoidWithOne R] [AddMonoid M] (n : ℕ) : (inl n : tsze R M) = n 
goal: TrivSqZeroExt.inl ↑n = ↑n

full_name: TrivSqZeroExt.addGroupWithOne
code: instance addGroupWithOne [AddGroupWithOne R] [AddGroup M] : AddGroupWithOne (tsze R M) 
goal: AddGroupWithOne (tsze R M)

full_name: TrivSqZeroExt.fst_intCast
code: @[simp]
theorem fst_intCast [AddGroupWithOne R] [AddGroup M] (z : ℤ) : (z : tsze R M).fst = z 
goal: (↑z).fst = ↑z

full_name: TrivSqZeroExt.snd_intCast
code: @[simp]
theorem snd_intCast [AddGroupWithOne R] [AddGroup M] (z : ℤ) : (z : tsze R M).snd = 0 
goal: (↑z).snd = 0

full_name: TrivSqZeroExt.inl_intCast
code: @[simp]
theorem inl_intCast [AddGroupWithOne R] [AddGroup M] (z : ℤ) : (inl z : tsze R M) = z 
goal: TrivSqZeroExt.inl ↑z = ↑z

full_name: TrivSqZeroExt.nonAssocSemiring
code: instance nonAssocSemiring [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M] :
    NonAssocSemiring (tsze R M) 
goal: NonAssocSemiring (tsze R M)

full_name: TrivSqZeroExt.nonAssocRing
code: instance nonAssocRing [Ring R] [AddCommGroup M] [Module R M] [Module Rᵐᵒᵖ M] :
    NonAssocRing (tsze R M) 
goal: NonAssocRing (tsze R M)

full_name: TrivSqZeroExt.instPowNatOfDistribMulActionMulOpposite
code: /-- In the general non-commutative case, the power operator is

$$\begin{align}
(r + m)^n &= r^n + r^{n-1}m + r^{n-2}mr + \cdots + rmr^{n-2} + mr^{n-1} \\
          & =r^n + \sum_{i = 0}^{n - 1} r^{(n - 1) - i} m r^{i}
\end{align}$$

In the commutative case this becomes the simpler $(r + m)^n = r^n + nr^{n-1}m$.
-/
instance [Monoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M] :
    Pow (tsze R M) ℕ 
goal: Pow (tsze R M) ℕ

full_name: TrivSqZeroExt.fst_pow
code: @[simp]
theorem fst_pow [Monoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M]
    (x : tsze R M) (n : ℕ) : fst (x ^ n) = x.fst ^ n 
goal: (x ^ n).fst = x.fst ^ n

full_name: TrivSqZeroExt.snd_pow_eq_sum
code: theorem snd_pow_eq_sum [Monoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M]
    (x : tsze R M) (n : ℕ) :
    snd (x ^ n) = ((List.range n).map fun i => x.fst ^ (n.pred - i) •> x.snd <• x.fst ^ i).sum 
goal: (x ^ n).snd = (List.map (fun i => x.fst ^ (n.pred - i) •> x.snd <• x.fst ^ i) (List.range n)).sum

full_name: TrivSqZeroExt.snd_pow_of_smul_comm
code: theorem snd_pow_of_smul_comm [Monoid R] [AddMonoid M] [DistribMulAction R M]
    [DistribMulAction Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] (x : tsze R M) (n : ℕ)
    (h : x.snd <• x.fst = x.fst •> x.snd) : snd (x ^ n) = n • x.fst ^ n.pred •> x.snd 
goal: (x ^ n).snd = n •> x.fst ^ n.pred •> x.snd

full_name: TrivSqZeroExt.snd_pow_of_smul_comm.aux
code: theorem snd_pow_of_smul_comm [Monoid R] [AddMonoid M] [DistribMulAction R M]
    [DistribMulAction Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] (x : tsze R M) (n : ℕ)
    (h : x.snd <• x.fst = x.fst •> x.snd) : snd (x ^ n) = n • x.fst ^ n.pred •> x.snd 
goal: x.snd <• x.fst ^ n = x.fst ^ n •> x.snd

full_name: TrivSqZeroExt.snd_pow_of_smul_comm'
code: theorem snd_pow_of_smul_comm' [Monoid R] [AddMonoid M] [DistribMulAction R M]
    [DistribMulAction Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] (x : tsze R M) (n : ℕ)
    (h : x.snd <• x.fst = x.fst •> x.snd) : snd (x ^ n) = n • (x.snd <• x.fst ^ n.pred) 
goal: (x ^ n).snd = n •> (x.snd <• x.fst ^ n.pred)

full_name: TrivSqZeroExt.snd_pow
code: @[simp]
theorem snd_pow [CommMonoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M]
    [IsCentralScalar R M] (x : tsze R M) (n : ℕ) : snd (x ^ n) = n • x.fst ^ n.pred • x.snd 
goal: (x ^ n).snd = n •> x.fst ^ n.pred •> x.snd

full_name: TrivSqZeroExt.inl_pow
code: @[simp]
theorem inl_pow [Monoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M] (r : R)
    (n : ℕ) : (inl r ^ n : tsze R M) = inl (r ^ n) 
goal: TrivSqZeroExt.inl r ^ n = TrivSqZeroExt.inl (r ^ n)

full_name: TrivSqZeroExt.monoid
code: instance monoid [Monoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M]
    [SMulCommClass R Rᵐᵒᵖ M] : Monoid (tsze R M) 
goal: Monoid (tsze R M)

full_name: TrivSqZeroExt.fst_list_prod
code: theorem fst_list_prod [Monoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M]
    [SMulCommClass R Rᵐᵒᵖ M] (l : List (tsze R M)) : l.prod.fst = (l.map fst).prod 
goal: l.prod.fst = (List.map TrivSqZeroExt.fst l).prod

full_name: TrivSqZeroExt.semiring
code: instance semiring [Semiring R] [AddCommMonoid M]
    [Module R M] [Module Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] : Semiring (tsze R M) 
goal: Semiring (tsze R M)

full_name: TrivSqZeroExt.snd_list_prod
code: /-- The second element of a product $\prod_{i=0}^n (r_i + m_i)$ is a sum of terms of the form
$r_0\cdots r_{i-1}m_ir_{i+1}\cdots r_n$. -/
theorem snd_list_prod [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M]
    [SMulCommClass R Rᵐᵒᵖ M] (l : List (tsze R M)) :
    l.prod.snd =
      (l.enum.map fun x : ℕ × tsze R M =>
          ((l.map fst).take x.1).prod •> x.snd.snd <• ((l.map fst).drop x.1.succ).prod).sum 
goal: l.prod.snd =
  (List.map
      (fun x =>
        (List.take x.1 (List.map TrivSqZeroExt.fst l)).prod •> x.2.snd <•
          (List.drop x.1.succ (List.map TrivSqZeroExt.fst l)).prod)
      l.enum).sum

full_name: TrivSqZeroExt.ring
code: instance ring [Ring R] [AddCommGroup M] [Module R M] [Module Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] :
    Ring (tsze R M) 
goal: Ring (tsze R M)

full_name: TrivSqZeroExt.commMonoid
code: instance commMonoid [CommMonoid R] [AddCommMonoid M] [DistribMulAction R M]
    [DistribMulAction Rᵐᵒᵖ M] [IsCentralScalar R M] : CommMonoid (tsze R M) 
goal: CommMonoid (tsze R M)

full_name: TrivSqZeroExt.commSemiring
code: instance commSemiring [CommSemiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M]
    [IsCentralScalar R M] : CommSemiring (tsze R M) 
goal: CommSemiring (tsze R M)

full_name: TrivSqZeroExt.commRing
code: instance commRing [CommRing R] [AddCommGroup M] [Module R M] [Module Rᵐᵒᵖ M] [IsCentralScalar R M] :
    CommRing (tsze R M) 
goal: CommRing (tsze R M)

full_name: TrivSqZeroExt.inlHom
code: /-- The canonical inclusion of rings `R → TrivSqZeroExt R M`. -/
@[simps apply]
def inlHom [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M] : R →+* tsze R M 
goal: R →+* tsze R M

full_name: TrivSqZeroExt.inlHom_apply
code: /-- The canonical inclusion of rings `R → TrivSqZeroExt R M`. -/
@[simps apply]
def inlHom [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M] : R →+* tsze R M 
goal: (TrivSqZeroExt.inlHom R M) r = TrivSqZeroExt.inl r

full_name: TrivSqZeroExt.instInv
code: /-- Inversion of the trivial-square-zero extension, sending $r + m$ to $r^{-1} - r^{-1}mr^{-1}$. -/
instance instInv : Inv (tsze R M) 
goal: Inv (tsze R M)

full_name: TrivSqZeroExt.fst_inv
code: @[simp] theorem fst_inv (x : tsze R M) : fst x⁻¹ = (fst x)⁻¹ 
goal: x⁻¹.fst = x.fst⁻¹

full_name: TrivSqZeroExt.snd_inv
code: @[simp] theorem snd_inv (x : tsze R M) : snd x⁻¹ = -((fst x)⁻¹ •> snd x <• (fst x)⁻¹) 
goal: x⁻¹.snd = -(x.fst⁻¹ •> x.snd <• x.fst⁻¹)

full_name: TrivSqZeroExt.inv_inl
code: protected theorem inv_inl (r : R) :
    (inl r)⁻¹ = (inl (r⁻¹ : R) : tsze R M) 
goal: (TrivSqZeroExt.inl r)⁻¹ = TrivSqZeroExt.inl r⁻¹

full_name: TrivSqZeroExt.inv_inr
code: @[simp]
theorem inv_inr (m : M) : (inr m)⁻¹ = (0 : tsze R M) 
goal: (TrivSqZeroExt.inr m)⁻¹ = 0

full_name: TrivSqZeroExt.inv_zero
code: @[simp]
protected theorem inv_zero : (0 : tsze R M)⁻¹ = (0 : tsze R M) 
goal: 0⁻¹ = 0

full_name: TrivSqZeroExt.inv_one
code: @[simp]
protected theorem inv_one : (1 : tsze R M)⁻¹ = (1 : tsze R M) 
goal: 1⁻¹ = 1

full_name: TrivSqZeroExt.mul_inv_cancel
code: protected theorem mul_inv_cancel {x : tsze R M} (hx : fst x ≠ 0) : x * x⁻¹ = 1 
goal: x * x⁻¹ = 1

full_name: TrivSqZeroExt.inv_mul_cancel
code: protected theorem inv_mul_cancel {x : tsze R M} (hx : fst x ≠ 0) : x⁻¹ * x = 1 
goal: x⁻¹ * x = 1

full_name: TrivSqZeroExt.mul_inv_rev
code: protected theorem mul_inv_rev (a b : tsze R M) :
    (a * b)⁻¹ = b⁻¹ * a⁻¹ 
goal: (a * b)⁻¹ = b⁻¹ * a⁻¹

full_name: TrivSqZeroExt.inv_inv
code: protected theorem inv_inv {x : tsze R M} (hx : fst x ≠ 0) : x⁻¹⁻¹ = x 
goal: x⁻¹⁻¹ = x

full_name: TrivSqZeroExt.inv_neg
code: protected theorem inv_neg {x : tsze R M} : (-x)⁻¹ = -(x⁻¹) 
goal: (-x)⁻¹ = -x⁻¹

full_name: TrivSqZeroExt.algebra'
code: instance algebra' : Algebra S (tsze R M) 
goal: Algebra S (tsze R M)

full_name: TrivSqZeroExt.instAlgebra
code: instance : Algebra R' (tsze R' M) 
goal: Algebra R' (tsze R' M)

full_name: TrivSqZeroExt.algebraMap_eq_inl
code: theorem algebraMap_eq_inl : ⇑(algebraMap R' (tsze R' M)) = inl 
goal: ⇑(algebraMap R' (tsze R' M)) = TrivSqZeroExt.inl

full_name: TrivSqZeroExt.algebraMap_eq_inlHom
code: theorem algebraMap_eq_inlHom : algebraMap R' (tsze R' M) = inlHom R' M 
goal: algebraMap R' (tsze R' M) = TrivSqZeroExt.inlHom R' M

full_name: TrivSqZeroExt.algebraMap_eq_inl'
code: theorem algebraMap_eq_inl' (s : S) : algebraMap S (tsze R M) s = inl (algebraMap S R s) 
goal: (algebraMap S (tsze R M)) s = TrivSqZeroExt.inl ((algebraMap S R) s)

full_name: TrivSqZeroExt.fstHom
code: /-- The canonical `S`-algebra projection `TrivSqZeroExt R M → R`. -/
@[simps]
def fstHom : tsze R M →ₐ[S] R 
goal: tsze R M →ₐ[S] R

full_name: TrivSqZeroExt.fstHom_apply
code: /-- The canonical `S`-algebra projection `TrivSqZeroExt R M → R`. -/
@[simps]
def fstHom : tsze R M →ₐ[S] R 
goal: (TrivSqZeroExt.fstHom S R M) x = x.fst

full_name: TrivSqZeroExt.inlAlgHom_apply
code: /-- The canonical `S`-algebra inclusion `R → TrivSqZeroExt R M`. -/
@[simps]
def inlAlgHom : R →ₐ[S] tsze R M 
goal: (TrivSqZeroExt.inlAlgHom S R M) r = TrivSqZeroExt.inl r

full_name: TrivSqZeroExt.inlAlgHom
code: /-- The canonical `S`-algebra inclusion `R → TrivSqZeroExt R M`. -/
@[simps]
def inlAlgHom : R →ₐ[S] tsze R M 
goal: R →ₐ[S] tsze R M

full_name: TrivSqZeroExt.algHom_ext
code: theorem algHom_ext {A} [Semiring A] [Algebra R' A] ⦃f g : tsze R' M →ₐ[R'] A⦄
    (h : ∀ m, f (inr m) = g (inr m)) : f = g 
goal: f = g

full_name: TrivSqZeroExt.algHom_ext'
code: @[ext]
theorem algHom_ext' {A} [Semiring A] [Algebra S A] ⦃f g : tsze R M →ₐ[S] A⦄
    (hinl : f.comp (inlAlgHom S R M) = g.comp (inlAlgHom S R M))
    (hinr : f.toLinearMap.comp (inrHom R M |>.restrictScalars S) =
      g.toLinearMap.comp (inrHom R M |>.restrictScalars S)) : f = g 
goal: f = g

full_name: TrivSqZeroExt.lift
code: /--
Assemble an algebra morphism `TrivSqZeroExt R M →ₐ[S] A` from separate morphisms on `R` and `M`.

Namely, we require that for an algebra morphism `f : R →ₐ[S] A` and a linear map `g : M →ₗ[S] A`,
we have:

* `g x * g y = 0`: the elements of `M` continue to square to zero.
* `g (r •> x) = f r * g x` and `g (x <• r) = g x * f r`: scalar multiplication on the left and
  right is sent to left- and right- multiplication by the image under `f`.

See `TrivSqZeroExt.liftEquiv` for this as an equiv; namely that any such algebra morphism can be
factored in this way.

When `R` is commutative, this can be invoked with `f = Algebra.ofId R A`, which satisfies `hfg` and
`hgf`. This version is captured as an equiv by `TrivSqZeroExt.liftEquivOfComm`. -/
def lift (f : R →ₐ[S] A) (g : M →ₗ[S] A)
    (hg : ∀ x y, g x * g y = 0)
    (hfg : ∀ r x, g (r •> x) = f r * g x)
    (hgf : ∀ r x, g (x <• r) = g x * f r) : tsze R M →ₐ[S] A 
goal: tsze R M →ₐ[S] A

full_name: TrivSqZeroExt.lift_def
code: theorem lift_def (f : R →ₐ[S] A) (g : M →ₗ[S] A)
    (hg : ∀ x y, g x * g y = 0)
    (hfg : ∀ r x, g (r • x) = f r * g x)
    (hgf : ∀ r x, g (op r • x) = g x * f r) (x : tsze R M) :
    lift f g hg hfg hgf x = f x.fst + g x.snd 
goal: (TrivSqZeroExt.lift f g hg hfg hgf) x = f x.fst + g x.snd

full_name: TrivSqZeroExt.lift_apply_inl
code: @[simp]
theorem lift_apply_inl (f : R →ₐ[S] A) (g : M →ₗ[S] A)
    (hg : ∀ x y, g x * g y = 0)
    (hfg : ∀ r x, g (r •> x) = f r * g x)
    (hgf : ∀ r x, g (x <• r) = g x * f r)
    (r : R) :
    lift f g hg hfg hgf (inl r) = f r 
goal: (TrivSqZeroExt.lift f g hg hfg hgf) (TrivSqZeroExt.inl r) = f r

full_name: TrivSqZeroExt.lift_apply_inr
code: @[simp]
theorem lift_apply_inr (f : R →ₐ[S] A) (g : M →ₗ[S] A)
    (hg : ∀ x y, g x * g y = 0)
    (hfg : ∀ r x, g (r •> x) = f r * g x)
    (hgf : ∀ r x, g (x <• r) = g x * f r)
    (m : M) :
    lift f g hg hfg hgf (inr m) = g m 
goal: (TrivSqZeroExt.lift f g hg hfg hgf) (TrivSqZeroExt.inr m) = g m

full_name: TrivSqZeroExt.lift_comp_inlHom
code: @[simp]
theorem lift_comp_inlHom (f : R →ₐ[S] A) (g : M →ₗ[S] A)
    (hg : ∀ x y, g x * g y = 0)
    (hfg : ∀ r x, g (r •> x) = f r * g x)
    (hgf : ∀ r x, g (x <• r) = g x * f r) :
    (lift f g hg hfg hgf).comp (inlAlgHom S R M) = f 
goal: (TrivSqZeroExt.lift f g hg hfg hgf).comp (TrivSqZeroExt.inlAlgHom S R M) = f

full_name: TrivSqZeroExt.lift_comp_inrHom
code: @[simp]
theorem lift_comp_inrHom (f : R →ₐ[S] A) (g : M →ₗ[S] A)
    (hg : ∀ x y, g x * g y = 0)
    (hfg : ∀ r x, g (r •> x) = f r * g x)
    (hgf : ∀ r x, g (x <• r) = g x * f r) :
    (lift f g hg hfg hgf).toLinearMap.comp (inrHom R M |>.restrictScalars S) = g 
goal: (TrivSqZeroExt.lift f g hg hfg hgf).toLinearMap ∘ₗ ↑S (TrivSqZeroExt.inrHom R M) = g

full_name: TrivSqZeroExt.lift_inlAlgHom_inrHom
code: /-- When applied to `inr` and `inl` themselves, `lift` is the identity. -/
@[simp]
theorem lift_inlAlgHom_inrHom :
    lift (inlAlgHom _ _ _) (inrHom R M |>.restrictScalars S)
      (inr_mul_inr R) (fun _ _ => (inl_mul_inr _ _).symm) (fun _ _ => (inr_mul_inl _ _).symm) =
    AlgHom.id S (tsze R M) 
goal: TrivSqZeroExt.lift (TrivSqZeroExt.inlAlgHom S R M) (↑S (TrivSqZeroExt.inrHom R M)) ⋯ ⋯ ⋯ = AlgHom.id S (tsze R M)

full_name: TrivSqZeroExt.liftEquiv
code: /-- A universal property of the trivial square-zero extension, providing a unique
`TrivSqZeroExt R M →ₐ[R] A` for every pair of maps `f : R →ₐ[S] A` and `g : M →ₗ[S] A`,
where the range of `g` has no non-zero products, and scaling the input to `g` on the left or right
amounts to a corresponding multiplication by `f` in the output.

This isomorphism is named to match the very similar `Complex.lift`. -/
@[simps! apply symm_apply_coe]
def liftEquiv :
    {fg : (R →ₐ[S] A) × (M →ₗ[S] A) //
      (∀ x y, fg.2 x * fg.2 y = 0) ∧
      (∀ r x, fg.2 (r •> x) = fg.1 r * fg.2 x) ∧
      (∀ r x, fg.2 (x <• r) = fg.2 x * fg.1 r)} ≃ (tsze R M →ₐ[S] A) 
goal: { fg //
    (∀ (x y : M), fg.2 x * fg.2 y = 0) ∧
      (∀ (r : R) (x : M), fg.2 (r •> x) = fg.1 r * fg.2 x) ∧ ∀ (r : R) (x : M), fg.2 (x <• r) = fg.2 x * fg.1 r } ≃
  (tsze R M →ₐ[S] A)

full_name: TrivSqZeroExt.liftEquiv_apply
code: /-- A universal property of the trivial square-zero extension, providing a unique
`TrivSqZeroExt R M →ₐ[R] A` for every pair of maps `f : R →ₐ[S] A` and `g : M →ₗ[S] A`,
where the range of `g` has no non-zero products, and scaling the input to `g` on the left or right
amounts to a corresponding multiplication by `f` in the output.

This isomorphism is named to match the very similar `Complex.lift`. -/
@[simps! apply symm_apply_coe]
def liftEquiv :
    {fg : (R →ₐ[S] A) × (M →ₗ[S] A) //
      (∀ x y, fg.2 x * fg.2 y = 0) ∧
      (∀ r x, fg.2 (r •> x) = fg.1 r * fg.2 x) ∧
      (∀ r x, fg.2 (x <• r) = fg.2 x * fg.1 r)} ≃ (tsze R M →ₐ[S] A) 
goal: TrivSqZeroExt.liftEquiv fg = TrivSqZeroExt.lift (↑fg).1 (↑fg).2 ⋯ ⋯ ⋯

full_name: TrivSqZeroExt.liftEquiv_symm_apply_coe
code: /-- A universal property of the trivial square-zero extension, providing a unique
`TrivSqZeroExt R M →ₐ[R] A` for every pair of maps `f : R →ₐ[S] A` and `g : M →ₗ[S] A`,
where the range of `g` has no non-zero products, and scaling the input to `g` on the left or right
amounts to a corresponding multiplication by `f` in the output.

This isomorphism is named to match the very similar `Complex.lift`. -/
@[simps! apply symm_apply_coe]
def liftEquiv :
    {fg : (R →ₐ[S] A) × (M →ₗ[S] A) //
      (∀ x y, fg.2 x * fg.2 y = 0) ∧
      (∀ r x, fg.2 (r •> x) = fg.1 r * fg.2 x) ∧
      (∀ r x, fg.2 (x <• r) = fg.2 x * fg.1 r)} ≃ (tsze R M →ₐ[S] A) 
goal: ↑(TrivSqZeroExt.liftEquiv.symm F) =
  (F.comp (TrivSqZeroExt.inlAlgHom S R M), F.toLinearMap ∘ₗ ↑S (TrivSqZeroExt.inrHom R M))

full_name: TrivSqZeroExt.liftEquivOfComm
code: /-- A simplified version of `TrivSqZeroExt.liftEquiv` for the commutative case. -/
@[simps! apply symm_apply_coe]
def liftEquivOfComm :
    { f : M →ₗ[R'] A // ∀ x y, f x * f y = 0 } ≃ (tsze R' M →ₐ[R'] A) 
goal: { f // ∀ (x y : M), f x * f y = 0 } ≃ (tsze R' M →ₐ[R'] A)

full_name: TrivSqZeroExt.liftEquivOfComm_symm_apply_coe
code: /-- A simplified version of `TrivSqZeroExt.liftEquiv` for the commutative case. -/
@[simps! apply symm_apply_coe]
def liftEquivOfComm :
    { f : M →ₗ[R'] A // ∀ x y, f x * f y = 0 } ≃ (tsze R' M →ₐ[R'] A) 
goal: ∀ (a : tsze R' M →ₐ[R'] A), ↑(TrivSqZeroExt.liftEquivOfComm.symm a) = a.toLinearMap ∘ₗ ↑R' (TrivSqZeroExt.inrHom R' M)

full_name: TrivSqZeroExt.liftEquivOfComm_apply
code: /-- A simplified version of `TrivSqZeroExt.liftEquiv` for the commutative case. -/
@[simps! apply symm_apply_coe]
def liftEquivOfComm :
    { f : M →ₗ[R'] A // ∀ x y, f x * f y = 0 } ≃ (tsze R' M →ₐ[R'] A) 
goal: ∀ (a : { f // ∀ (x y : M), f x * f y = 0 }),
  TrivSqZeroExt.liftEquivOfComm a = TrivSqZeroExt.lift (Algebra.ofId R' A) ↑a ⋯ ⋯ ⋯

full_name: TrivSqZeroExt.map
code: /-- Functoriality of `TrivSqZeroExt` when the ring is commutative: a linear map
`f : M →ₗ[R'] N` induces a morphism of `R'`-algebras from `TrivSqZeroExt R' M` to
`TrivSqZeroExt R' N`.

Note that we cannot neatly state the non-commutative case, as we do not have morphisms of bimodules.
-/
def map (f : M →ₗ[R'] N) : TrivSqZeroExt R' M →ₐ[R'] TrivSqZeroExt R' N 
goal: tsze R' M →ₐ[R'] tsze R' N

full_name: TrivSqZeroExt.map_inl
code: @[simp]
theorem map_inl (f : M →ₗ[R'] N) (r : R') : map f (inl r) = inl r 
goal: (TrivSqZeroExt.map f) (TrivSqZeroExt.inl r) = TrivSqZeroExt.inl r

full_name: TrivSqZeroExt.map_inr
code: @[simp]
theorem map_inr (f : M →ₗ[R'] N) (x : M) : map f (inr x) = inr (f x) 
goal: (TrivSqZeroExt.map f) (TrivSqZeroExt.inr x) = TrivSqZeroExt.inr (f x)

full_name: TrivSqZeroExt.fst_map
code: @[simp]
theorem fst_map (f : M →ₗ[R'] N) (x : TrivSqZeroExt R' M) : fst (map f x) = fst x 
goal: ((TrivSqZeroExt.map f) x).fst = x.fst

full_name: TrivSqZeroExt.snd_map
code: @[simp]
theorem snd_map (f : M →ₗ[R'] N) (x : TrivSqZeroExt R' M) : snd (map f x) = f (snd x) 
goal: ((TrivSqZeroExt.map f) x).snd = f x.snd

full_name: TrivSqZeroExt.map_comp_inlAlgHom
code: @[simp]
theorem map_comp_inlAlgHom (f : M →ₗ[R'] N) :
    (map f).comp (inlAlgHom R' R' M) = inlAlgHom R' R' N 
goal: (TrivSqZeroExt.map f).comp (TrivSqZeroExt.inlAlgHom R' R' M) = TrivSqZeroExt.inlAlgHom R' R' N

full_name: TrivSqZeroExt.map_comp_inrHom
code: @[simp]
theorem map_comp_inrHom (f : M →ₗ[R'] N) :
    (map f).toLinearMap ∘ₗ inrHom R' M = inrHom R' N ∘ₗ f 
goal: (TrivSqZeroExt.map f).toLinearMap ∘ₗ TrivSqZeroExt.inrHom R' M = TrivSqZeroExt.inrHom R' N ∘ₗ f

full_name: TrivSqZeroExt.fstHom_comp_map
code: @[simp]
theorem fstHom_comp_map (f : M →ₗ[R'] N) :
    (fstHom R' R' N).comp (map f) = fstHom R' R' M 
goal: (TrivSqZeroExt.fstHom R' R' N).comp (TrivSqZeroExt.map f) = TrivSqZeroExt.fstHom R' R' M

full_name: TrivSqZeroExt.sndHom_comp_map
code: @[simp]
theorem sndHom_comp_map (f : M →ₗ[R'] N) :
    sndHom R' N ∘ₗ (map f).toLinearMap = f ∘ₗ sndHom R' M 
goal: TrivSqZeroExt.sndHom R' N ∘ₗ (TrivSqZeroExt.map f).toLinearMap = f ∘ₗ TrivSqZeroExt.sndHom R' M

full_name: TrivSqZeroExt.map_id
code: @[simp]
theorem map_id : map (LinearMap.id : M →ₗ[R'] M) = AlgHom.id R' _ 
goal: TrivSqZeroExt.map LinearMap.id = AlgHom.id R' (tsze R' M)

full_name: TrivSqZeroExt.map_comp_map
code: theorem map_comp_map (f : M →ₗ[R'] N) (g : N →ₗ[R'] P) :
    map (g.comp f) = (map g).comp (map f) 
goal: TrivSqZeroExt.map (g ∘ₗ f) = (TrivSqZeroExt.map g).comp (TrivSqZeroExt.map f)