File: Mathlib/Algebra/Ring/CentroidHom.lean

full_name: CentroidHom.map_mul_right'
code: /-- The type of centroid homomorphisms from `α` to `α`. -/
structure CentroidHom (α : Type*) [NonUnitalNonAssocSemiring α] extends α →+ α where
  /-- Commutativity of centroid homomorphims with left multiplication. -/
  map_mul_left' (a b : α) : toFun (a * b) = a * toFun b
  /-- Commutativity of centroid homomorphims with right multiplication. -/
  map_mul_right' (a b : α) : toFun (a * b) = toFun a * b
goal: (↑self.toAddMonoidHom).toFun (a * b) = (↑self.toAddMonoidHom).toFun a * b

full_name: CentroidHom.map_mul_left'
code: /-- The type of centroid homomorphisms from `α` to `α`. -/
structure CentroidHom (α : Type*) [NonUnitalNonAssocSemiring α] extends α →+ α where
  /-- Commutativity of centroid homomorphims with left multiplication. -/
  map_mul_left' (a b : α) : toFun (a * b) = a * toFun b
  /-- Commutativity of centroid homomorphims with right multiplication. -/
  map_mul_right' (a b : α) : toFun (a * b) = toFun a * b
goal: (↑self.toAddMonoidHom).toFun (a * b) = a * (↑self.toAddMonoidHom).toFun b

full_name: CentroidHom
code: /-- The type of centroid homomorphisms from `α` to `α`. -/
structure CentroidHom (α : Type*) [NonUnitalNonAssocSemiring α] extends α →+ α where
  /-- Commutativity of centroid homomorphims with left multiplication. -/
  map_mul_left' (a b : α) : toFun (a * b) = a * toFun b
  /-- Commutativity of centroid homomorphims with right multiplication. -/
  map_mul_right' (a b : α) : toFun (a * b) = toFun a * b
goal: Type u_6

full_name: CentroidHomClass
code: /-- `CentroidHomClass F α` states that `F` is a type of centroid homomorphisms.

You should extend this class when you extend `CentroidHom`. -/
class CentroidHomClass (F α : Type*) [NonUnitalNonAssocSemiring α] [FunLike F α α] extends
  AddMonoidHomClass F α α : Prop where
  /-- Commutativity of centroid homomorphims with left multiplication. -/
  map_mul_left (f : F) (a b : α) : f (a * b) = a * f b
  /-- Commutativity of centroid homomorphims with right multiplication. -/
  map_mul_right (f : F) (a b : α) : f (a * b) = f a * b
goal: Prop

full_name: CentroidHomClass.map_mul_right
code: /-- `CentroidHomClass F α` states that `F` is a type of centroid homomorphisms.

You should extend this class when you extend `CentroidHom`. -/
class CentroidHomClass (F α : Type*) [NonUnitalNonAssocSemiring α] [FunLike F α α] extends
  AddMonoidHomClass F α α : Prop where
  /-- Commutativity of centroid homomorphims with left multiplication. -/
  map_mul_left (f : F) (a b : α) : f (a * b) = a * f b
  /-- Commutativity of centroid homomorphims with right multiplication. -/
  map_mul_right (f : F) (a b : α) : f (a * b) = f a * b
goal: f (a * b) = f a * b

full_name: CentroidHomClass.map_mul_left
code: /-- `CentroidHomClass F α` states that `F` is a type of centroid homomorphisms.

You should extend this class when you extend `CentroidHom`. -/
class CentroidHomClass (F α : Type*) [NonUnitalNonAssocSemiring α] [FunLike F α α] extends
  AddMonoidHomClass F α α : Prop where
  /-- Commutativity of centroid homomorphims with left multiplication. -/
  map_mul_left (f : F) (a b : α) : f (a * b) = a * f b
  /-- Commutativity of centroid homomorphims with right multiplication. -/
  map_mul_right (f : F) (a b : α) : f (a * b) = f a * b
goal: f (a * b) = a * f b

full_name: instCoeTCCentroidHomOfCentroidHomClass
code: instance [NonUnitalNonAssocSemiring α] [FunLike F α α] [CentroidHomClass F α] :
    CoeTC F (CentroidHom α) 
goal: CoeTC F (CentroidHom α)

full_name: CentroidHom.instFunLike
code: instance : FunLike (CentroidHom α) α α 
goal: FunLike (CentroidHom α) α α

full_name: CentroidHom.instCentroidHomClass
code: instance : CentroidHomClass (CentroidHom α) α 
goal: CentroidHomClass (CentroidHom α) α

full_name: CentroidHom.instCoeFunForall
code: /-- Helper instance for when there's too many metavariables to apply `DFunLike.CoeFun`
directly. -/
/- Porting note: Lean gave me `unknown constant 'DFunLike.CoeFun'` and says `CoeFun` is a type
mismatch, so I used `library_search`. -/
instance : CoeFun (CentroidHom α) fun _ ↦ α → α 
goal: CoeFun (CentroidHom α) fun x => α → α

full_name: CentroidHom.toFun_eq_coe
code: theorem toFun_eq_coe {f : CentroidHom α} : f.toFun = f 
goal: (↑f.toAddMonoidHom).toFun = ⇑f

full_name: CentroidHom.ext
code: @[ext]
theorem ext {f g : CentroidHom α} (h : ∀ a, f a = g a) : f = g 
goal: f = g

full_name: CentroidHom.coe_toAddMonoidHom
code: @[simp, norm_cast]
theorem coe_toAddMonoidHom (f : CentroidHom α) : ⇑(f : α →+ α) = f 
goal: ⇑↑f = ⇑f

full_name: CentroidHom.toAddMonoidHom_eq_coe
code: @[simp]
theorem toAddMonoidHom_eq_coe (f : CentroidHom α) : f.toAddMonoidHom = f 
goal: f.toAddMonoidHom = ↑f

full_name: CentroidHom.coe_toAddMonoidHom_injective
code: theorem coe_toAddMonoidHom_injective : Injective ((↑) : CentroidHom α → α →+ α) 
goal: Function.Injective AddMonoidHomClass.toAddMonoidHom

full_name: CentroidHom.toEnd
code: /-- Turn a centroid homomorphism into an additive monoid endomorphism. -/
def toEnd (f : CentroidHom α) : AddMonoid.End α 
goal: AddMonoid.End α

full_name: CentroidHom.toEnd_injective
code: theorem toEnd_injective : Injective (CentroidHom.toEnd : CentroidHom α → AddMonoid.End α) 
goal: Function.Injective CentroidHom.toEnd

full_name: CentroidHom.copy
code: /-- Copy of a `CentroidHom` with a new `toFun` equal to the old one. Useful to fix
definitional equalities. -/
protected def copy (f : CentroidHom α) (f' : α → α) (h : f' = f) : CentroidHom α 
goal: CentroidHom α

full_name: CentroidHom.coe_copy
code: @[simp]
theorem coe_copy (f : CentroidHom α) (f' : α → α) (h : f' = f) : ⇑(f.copy f' h) = f' 
goal: ⇑(f.copy f' h) = f'

full_name: CentroidHom.copy_eq
code: theorem copy_eq (f : CentroidHom α) (f' : α → α) (h : f' = f) : f.copy f' h = f 
goal: f.copy f' h = f

full_name: CentroidHom.id
code: /-- `id` as a `CentroidHom`. -/
protected def id : CentroidHom α 
goal: CentroidHom α

full_name: CentroidHom.instInhabited
code: instance : Inhabited (CentroidHom α) 
goal: Inhabited (CentroidHom α)

full_name: CentroidHom.coe_id
code: @[simp, norm_cast]
theorem coe_id : ⇑(CentroidHom.id α) = id 
goal: ⇑(CentroidHom.id α) = id

full_name: CentroidHom.toAddMonoidHom_id
code: @[simp, norm_cast]
theorem toAddMonoidHom_id : (CentroidHom.id α : α →+ α) = AddMonoidHom.id α 
goal: ↑(CentroidHom.id α) = AddMonoidHom.id α

full_name: CentroidHom.id_apply
code: @[simp]
theorem id_apply (a : α) : CentroidHom.id α a = a 
goal: (CentroidHom.id α) a = a

full_name: CentroidHom.comp
code: /-- Composition of `CentroidHom`s as a `CentroidHom`. -/
def comp (g f : CentroidHom α) : CentroidHom α 
goal: CentroidHom α

full_name: CentroidHom.coe_comp
code: @[simp, norm_cast]
theorem coe_comp (g f : CentroidHom α) : ⇑(g.comp f) = g ∘ f 
goal: ⇑(g.comp f) = ⇑g ∘ ⇑f

full_name: CentroidHom.comp_apply
code: @[simp]
theorem comp_apply (g f : CentroidHom α) (a : α) : g.comp f a = g (f a) 
goal: (g.comp f) a = g (f a)

full_name: CentroidHom.coe_comp_addMonoidHom
code: @[simp, norm_cast]
theorem coe_comp_addMonoidHom (g f : CentroidHom α) : (g.comp f : α →+ α) = (g : α →+ α).comp f 
goal: ↑(g.comp f) = (↑g).comp ↑f

full_name: CentroidHom.comp_assoc
code: @[simp]
theorem comp_assoc (h g f : CentroidHom α) : (h.comp g).comp f = h.comp (g.comp f) 
goal: (h.comp g).comp f = h.comp (g.comp f)

full_name: CentroidHom.comp_id
code: @[simp]
theorem comp_id (f : CentroidHom α) : f.comp (CentroidHom.id α) = f 
goal: f.comp (CentroidHom.id α) = f

full_name: CentroidHom.id_comp
code: @[simp]
theorem id_comp (f : CentroidHom α) : (CentroidHom.id α).comp f = f 
goal: (CentroidHom.id α).comp f = f

full_name: CentroidHom.cancel_right
code: @[simp]
theorem cancel_right {g₁ g₂ f : CentroidHom α} (hf : Surjective f) :
    g₁.comp f = g₂.comp f ↔ g₁ = g₂ 
goal: g₁.comp f = g₂.comp f ↔ g₁ = g₂

full_name: CentroidHom.cancel_left
code: @[simp]
theorem cancel_left {g f₁ f₂ : CentroidHom α} (hg : Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂ 
goal: g.comp f₁ = g.comp f₂ ↔ f₁ = f₂

full_name: CentroidHom.instZero
code: instance : Zero (CentroidHom α) 
goal: Zero (CentroidHom α)

full_name: CentroidHom.instOne
code: instance : One (CentroidHom α) 
goal: One (CentroidHom α)

full_name: CentroidHom.instAdd
code: instance : Add (CentroidHom α) 
goal: Add (CentroidHom α)

full_name: CentroidHom.instMul
code: instance : Mul (CentroidHom α) 
goal: Mul (CentroidHom α)

full_name: CentroidHom.instSMul
code: instance instSMul : SMul M (CentroidHom α) 
goal: SMul M (CentroidHom α)

full_name: CentroidHom.instIsScalarTower
code: instance [SMul M N] [IsScalarTower M N α] : IsScalarTower M N (CentroidHom α) 
goal: IsScalarTower M N (CentroidHom α)

full_name: CentroidHom.instSMulCommClass
code: instance [SMulCommClass M N α] : SMulCommClass M N (CentroidHom α) 
goal: SMulCommClass M N (CentroidHom α)

full_name: CentroidHom.instIsCentralScalar
code: instance [DistribMulAction Mᵐᵒᵖ α] [IsCentralScalar M α] : IsCentralScalar M (CentroidHom α) 
goal: IsCentralScalar M (CentroidHom α)

full_name: CentroidHom.isScalarTowerRight
code: instance isScalarTowerRight : IsScalarTower M (CentroidHom α) (CentroidHom α) 
goal: IsScalarTower M (CentroidHom α) (CentroidHom α)

full_name: CentroidHom.hasNPowNat
code: instance hasNPowNat : Pow (CentroidHom α) ℕ 
goal: Pow (CentroidHom α) ℕ

full_name: CentroidHom.coe_zero
code: @[simp, norm_cast]
theorem coe_zero : ⇑(0 : CentroidHom α) = 0 
goal: ⇑0 = 0

full_name: CentroidHom.coe_one
code: @[simp, norm_cast]
theorem coe_one : ⇑(1 : CentroidHom α) = id 
goal: ⇑1 = id

full_name: CentroidHom.coe_add
code: @[simp, norm_cast]
theorem coe_add (f g : CentroidHom α) : ⇑(f + g) = f + g 
goal: ⇑(f + g) = ⇑f + ⇑g

full_name: CentroidHom.coe_mul
code: @[simp, norm_cast]
theorem coe_mul (f g : CentroidHom α) : ⇑(f * g) = f ∘ g 
goal: ⇑(f * g) = ⇑f ∘ ⇑g

full_name: CentroidHom.coe_smul
code: @[simp, norm_cast]
theorem coe_smul (n : M) (f : CentroidHom α) : ⇑(n • f) = n • ⇑f 
goal: ⇑(n • f) = n • ⇑f

full_name: CentroidHom.zero_apply
code: @[simp]
theorem zero_apply (a : α) : (0 : CentroidHom α) a = 0 
goal: 0 a = 0

full_name: CentroidHom.one_apply
code: @[simp]
theorem one_apply (a : α) : (1 : CentroidHom α) a = a 
goal: 1 a = a

full_name: CentroidHom.add_apply
code: @[simp]
theorem add_apply (f g : CentroidHom α) (a : α) : (f + g) a = f a + g a 
goal: (f + g) a = f a + g a

full_name: CentroidHom.mul_apply
code: @[simp]
theorem mul_apply (f g : CentroidHom α) (a : α) : (f * g) a = f (g a) 
goal: (f * g) a = f (g a)

full_name: CentroidHom.smul_apply
code: @[simp]
theorem smul_apply (n : M) (f : CentroidHom α) (a : α) : (n • f) a = n • f a 
goal: (n • f) a = n • f a

full_name: CentroidHom.toEnd_zero
code: @[simp]
theorem toEnd_zero : (0 : CentroidHom α).toEnd = 0 
goal: CentroidHom.toEnd 0 = 0

full_name: CentroidHom.toEnd_add
code: @[simp]
theorem toEnd_add (x y : CentroidHom α) : (x + y).toEnd = x.toEnd + y.toEnd 
goal: (x + y).toEnd = x.toEnd + y.toEnd

full_name: CentroidHom.toEnd_smul
code: theorem toEnd_smul (m : M) (x : CentroidHom α) : (m • x).toEnd = m • x.toEnd 
goal: (m • x).toEnd = m • x.toEnd

full_name: CentroidHom.instAddCommMonoid
code: instance : AddCommMonoid (CentroidHom α) 
goal: AddCommMonoid (CentroidHom α)

full_name: CentroidHom.instNatCast
code: instance : NatCast (CentroidHom α) 
goal: NatCast (CentroidHom α)

full_name: CentroidHom.coe_natCast
code: @[simp, norm_cast]
theorem coe_natCast (n : ℕ) : ⇑(n : CentroidHom α) = n • (CentroidHom.id α) 
goal: ⇑↑n = n • ⇑(CentroidHom.id α)

full_name: CentroidHom.natCast_apply
code: theorem natCast_apply (n : ℕ) (m : α) : (n : CentroidHom α) m = n • m 
goal: ↑n m = n • m

full_name: CentroidHom.toEnd_one
code: @[simp]
theorem toEnd_one : (1 : CentroidHom α).toEnd = 1 
goal: CentroidHom.toEnd 1 = 1

full_name: CentroidHom.toEnd_mul
code: @[simp]
theorem toEnd_mul (x y : CentroidHom α) : (x * y).toEnd = x.toEnd * y.toEnd 
goal: (x * y).toEnd = x.toEnd * y.toEnd

full_name: CentroidHom.toEnd_pow
code: @[simp]
theorem toEnd_pow (x : CentroidHom α) (n : ℕ) : (x ^ n).toEnd = x.toEnd ^ n 
goal: (x ^ n).toEnd = x.toEnd ^ n

full_name: CentroidHom.toEnd_natCast
code: @[simp, norm_cast]
theorem toEnd_natCast (n : ℕ) : (n : CentroidHom α).toEnd = ↑n 
goal: (↑n).toEnd = ↑n

full_name: CentroidHom.instSemiring
code: instance : Semiring (CentroidHom α) 
goal: Semiring (CentroidHom α)

full_name: CentroidHom.toEndRingHom
code: /-- `CentroidHom.toEnd` as a `RingHom`. -/
@[simps]
def toEndRingHom : CentroidHom α →+* AddMonoid.End α 
goal: CentroidHom α →+* AddMonoid.End α

full_name: CentroidHom.toEndRingHom_apply
code: /-- `CentroidHom.toEnd` as a `RingHom`. -/
@[simps]
def toEndRingHom : CentroidHom α →+* AddMonoid.End α 
goal: (CentroidHom.toEndRingHom α) f = f.toEnd

full_name: CentroidHom.comp_mul_comm
code: theorem comp_mul_comm (T S : CentroidHom α) (a b : α) : (T ∘ S) (a * b) = (S ∘ T) (a * b) 
goal: (⇑T ∘ ⇑S) (a * b) = (⇑S ∘ ⇑T) (a * b)

full_name: CentroidHom.instDistribMulAction
code: instance : DistribMulAction M (CentroidHom α) 
goal: DistribMulAction M (CentroidHom α)

full_name: CentroidHom.instModule
code: instance : Module R (CentroidHom α) 
goal: Module R (CentroidHom α)

full_name: CentroidHom.applyModule
code: /-- The tautological action by `CentroidHom α` on `α`.

This generalizes `Function.End.applyMulAction`. -/
instance applyModule : Module (CentroidHom α) α 
goal: Module (CentroidHom α) α

full_name: CentroidHom.smul_def
code: @[simp]
lemma smul_def (T : CentroidHom α) (a : α) : T • a = T a 
goal: T • a = T a

full_name: CentroidHom.instSMulCommClass_1
code: instance : SMulCommClass (CentroidHom α) α α 
goal: SMulCommClass (CentroidHom α) α α

full_name: CentroidHom.instSMulCommClass_2
code: instance : SMulCommClass α (CentroidHom α) α 
goal: SMulCommClass α (CentroidHom α) α

full_name: CentroidHom.instIsScalarTower_1
code: instance : IsScalarTower (CentroidHom α) α α 
goal: IsScalarTower (CentroidHom α) α α

full_name: Module.toCentroidHom_apply_toFun
code: /-- The natural ring homomorphism from `R` into `CentroidHom α`.

This is a stronger version of `Module.toAddMonoidEnd`. -/
@[simps! apply_toFun]
def _root_.Module.toCentroidHom : R →+* CentroidHom α 
goal: (Module.toCentroidHom x) a = x • a

full_name: Module.toCentroidHom
code: /-- The natural ring homomorphism from `R` into `CentroidHom α`.

This is a stronger version of `Module.toAddMonoidEnd`. -/
@[simps! apply_toFun]
def _root_.Module.toCentroidHom : R →+* CentroidHom α 
goal: R →+* CentroidHom α

full_name: CentroidHom._aux_Mathlib_Algebra_Ring_CentroidHom___macroRules_CentroidHom_termL_1
code: local notation "L" => AddMonoid.End.mulLeft
goal: Lean.Macro

full_name: CentroidHom._aux_Mathlib_Algebra_Ring_CentroidHom___unexpand_AddMonoid_End_mulLeft_1
code: local notation "L" => AddMonoid.End.mulLeft
goal: Lean.PrettyPrinter.Unexpander

full_name: CentroidHom._aux_Mathlib_Algebra_Ring_CentroidHom___unexpand_AddMonoid_End_mulRight_1
code: local notation "R" => AddMonoid.End.mulRight
goal: Lean.PrettyPrinter.Unexpander

full_name: CentroidHom._aux_Mathlib_Algebra_Ring_CentroidHom___macroRules_CentroidHom_termR_1
code: local notation "R" => AddMonoid.End.mulRight
goal: Lean.Macro

full_name: CentroidHom.centroid_eq_centralizer_mulLeftRight
code: lemma centroid_eq_centralizer_mulLeftRight :
    RingHom.rangeS (toEndRingHom α) = Subsemiring.centralizer (Set.range L ∪ Set.range R) 
goal: (CentroidHom.toEndRingHom α).rangeS =
  Subsemiring.centralizer (Set.range ⇑AddMonoid.End.mulLeft ∪ Set.range ⇑AddMonoid.End.mulRight)

full_name: CentroidHom.centerToCentroidCenter
code: /-- The canonical homomorphism from the center into the center of the centroid -/
def centerToCentroidCenter :
    NonUnitalSubsemiring.center α →ₙ+* Subsemiring.center (CentroidHom α) 
goal: ↥(NonUnitalSubsemiring.center α) →ₙ+* ↥(Subsemiring.center (CentroidHom α))

full_name: CentroidHom.instFunLikeSubtypeMemSubsemiringCenter
code: instance : FunLike (Subsemiring.center (CentroidHom α)) α α 
goal: FunLike (↥(Subsemiring.center (CentroidHom α))) α α

full_name: CentroidHom.centerToCentroidCenter_apply
code: lemma centerToCentroidCenter_apply (z : NonUnitalSubsemiring.center α) (a : α) :
    (centerToCentroidCenter z) a = z * a 
goal: (CentroidHom.centerToCentroidCenter z) a = ↑z * a

full_name: CentroidHom.centerToCentroid
code: /-- The canonical homomorphism from the center into the centroid -/
def centerToCentroid : NonUnitalSubsemiring.center α →ₙ+* CentroidHom α 
goal: ↥(NonUnitalSubsemiring.center α) →ₙ+* CentroidHom α

full_name: CentroidHom.centerToCentroid_apply
code: lemma centerToCentroid_apply (z : NonUnitalSubsemiring.center α) (a : α) :
    (centerToCentroid z) a = z * a 
goal: (CentroidHom.centerToCentroid z) a = ↑z * a

full_name: NonUnitalNonAssocSemiring.mem_center_iff
code: lemma _root_.NonUnitalNonAssocSemiring.mem_center_iff (a : α) :
    a ∈ NonUnitalSubsemiring.center α ↔ R a = L a ∧ (L a) ∈ RingHom.rangeS (toEndRingHom α) 
goal: a ∈ NonUnitalSubsemiring.center α ↔
  AddMonoid.End.mulRight a = AddMonoid.End.mulLeft a ∧ AddMonoid.End.mulLeft a ∈ (CentroidHom.toEndRingHom α).rangeS

full_name: CentroidHom._aux_Mathlib_Algebra_Ring_CentroidHom___macroRules_CentroidHom_termL_2
code: local notation "L" => AddMonoid.End.mulLeft
goal: Lean.Macro

full_name: CentroidHom._aux_Mathlib_Algebra_Ring_CentroidHom___unexpand_AddMonoid_End_mulLeft_2
code: local notation "L" => AddMonoid.End.mulLeft
goal: Lean.PrettyPrinter.Unexpander

full_name: NonUnitalNonAssocCommSemiring.mem_center_iff
code: lemma _root_.NonUnitalNonAssocCommSemiring.mem_center_iff (a : α) :
    a ∈ NonUnitalSubsemiring.center α ↔ ∀ b : α, Commute (L b) (L a) 
goal: a ∈ NonUnitalSubsemiring.center α ↔ ∀ (b : α), Commute (AddMonoid.End.mulLeft b) (AddMonoid.End.mulLeft a)

full_name: CentroidHom.centerIsoCentroid
code: /-- The canonical isomorphism from the center of a (non-associative) semiring onto its centroid. -/
def centerIsoCentroid : Subsemiring.center α ≃+* CentroidHom α 
goal: ↥(Subsemiring.center α) ≃+* CentroidHom α

full_name: CentroidHom.instNeg
code: /-- Negation of `CentroidHom`s as a `CentroidHom`. -/
instance : Neg (CentroidHom α) 
goal: Neg (CentroidHom α)

full_name: CentroidHom.instSub
code: instance : Sub (CentroidHom α) 
goal: Sub (CentroidHom α)

full_name: CentroidHom.instIntCast
code: instance : IntCast (CentroidHom α) 
goal: IntCast (CentroidHom α)

full_name: CentroidHom.coe_intCast
code: @[simp, norm_cast]
theorem coe_intCast (z : ℤ) : ⇑(z : CentroidHom α) = z • (CentroidHom.id α) 
goal: ⇑↑z = z • ⇑(CentroidHom.id α)

full_name: CentroidHom.intCast_apply
code: theorem intCast_apply (z : ℤ) (m : α) : (z : CentroidHom α) m = z • m 
goal: ↑z m = z • m

full_name: CentroidHom.toEnd_neg
code: @[simp]
theorem toEnd_neg (x : CentroidHom α) : (-x).toEnd = -x.toEnd 
goal: (-x).toEnd = -x.toEnd

full_name: CentroidHom.toEnd_sub
code: @[simp]
theorem toEnd_sub (x y : CentroidHom α) : (x - y).toEnd = x.toEnd - y.toEnd 
goal: (x - y).toEnd = x.toEnd - y.toEnd

full_name: CentroidHom.instAddCommGroup
code: instance : AddCommGroup (CentroidHom α) 
goal: AddCommGroup (CentroidHom α)

full_name: CentroidHom.coe_neg
code: @[simp, norm_cast]
theorem coe_neg (f : CentroidHom α) : ⇑(-f) = -f 
goal: ⇑(-f) = -⇑f

full_name: CentroidHom.coe_sub
code: @[simp, norm_cast]
theorem coe_sub (f g : CentroidHom α) : ⇑(f - g) = f - g 
goal: ⇑(f - g) = ⇑f - ⇑g

full_name: CentroidHom.neg_apply
code: @[simp]
theorem neg_apply (f : CentroidHom α) (a : α) : (-f) a = -f a 
goal: (-f) a = -f a

full_name: CentroidHom.sub_apply
code: @[simp]
theorem sub_apply (f g : CentroidHom α) (a : α) : (f - g) a = f a - g a 
goal: (f - g) a = f a - g a

full_name: CentroidHom.toEnd_intCast
code: @[simp, norm_cast]
theorem toEnd_intCast (z : ℤ) : (z : CentroidHom α).toEnd = ↑z 
goal: (↑z).toEnd = ↑z

full_name: CentroidHom.instRing
code: instance instRing : Ring (CentroidHom α) 
goal: Ring (CentroidHom α)

full_name: CentroidHom.commRing
code: /-- A prime associative ring has commutative centroid. -/
abbrev commRing
    (h : ∀ a b : α, (∀ r : α, a * r * b = 0) → a = 0 ∨ b = 0) : CommRing (CentroidHom α) 
goal: CommRing (CentroidHom α)