l3lab/ntp-mathlib huggingface dataset:
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
⊢ ∀ {X₁ Y₁ Z₁ X₂ Y₂ Z₂ : Mon_ C} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (g₁ : Y₁ ⟶ Z₁) (g₂ : Y₂ ⟶ Z₂),
    f₁ ≫ g₁ ⊗ f₂ ≫ g₂ = (f₁ ⊗ f₂) ≫ (g₁ ⊗ g₂)

Next tactic:
intros
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X₁✝ Y₁✝ Z₁✝ X₂✝ Y₂✝ Z₂✝ : Mon_ C
f₁✝ : X₁✝ ⟶ Y₁✝
f₂✝ : X₂✝ ⟶ Y₂✝
g₁✝ : Y₁✝ ⟶ Z₁✝
g₂✝ : Y₂✝ ⟶ Z₂✝
⊢ f₁✝ ≫ g₁✝ ⊗ f₂✝ ≫ g₂✝ = (f₁✝ ⊗ f₂✝) ≫ (g₁✝ ⊗ g₂✝)

Next tactic:
ext
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; 

Proof state:
case w
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X₁✝ Y₁✝ Z₁✝ X₂✝ Y₂✝ Z₂✝ : Mon_ C
f₁✝ : X₁✝ ⟶ Y₁✝
f₂✝ : X₂✝ ⟶ Y₂✝
g₁✝ : Y₁✝ ⟶ Z₁✝
g₂✝ : Y₂✝ ⟶ Z₂✝
⊢ (f₁✝ ≫ g₁✝ ⊗ f₂✝ ≫ g₂✝).hom = ((f₁✝ ⊗ f₂✝) ≫ (g₁✝ ⊗ g₂✝)).hom

Next tactic:
apply tensor_comp
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
⊢ ∀ {X₁ X₂ X₃ Y₁ Y₂ Y₃ : Mon_ C} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (f₃ : X₃ ⟶ Y₃),
    ((f₁ ⊗ f₂) ⊗ f₃) ≫ (α_ Y₁ Y₂ Y₃).hom = (α_ X₁ X₂ X₃).hom ≫ (f₁ ⊗ f₂ ⊗ f₃)

Next tactic:
intros
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X₁✝ X₂✝ X₃✝ Y₁✝ Y₂✝ Y₃✝ : Mon_ C
f₁✝ : X₁✝ ⟶ Y₁✝
f₂✝ : X₂✝ ⟶ Y₂✝
f₃✝ : X₃✝ ⟶ Y₃✝
⊢ ((f₁✝ ⊗ f₂✝) ⊗ f₃✝) ≫ (α_ Y₁✝ Y₂✝ Y₃✝).hom = (α_ X₁✝ X₂✝ X₃✝).hom ≫ (f₁✝ ⊗ f₂✝ ⊗ f₃✝)

Next tactic:
ext
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; 

Proof state:
case w
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X₁✝ X₂✝ X₃✝ Y₁✝ Y₂✝ Y₃✝ : Mon_ C
f₁✝ : X₁✝ ⟶ Y₁✝
f₂✝ : X₂✝ ⟶ Y₂✝
f₃✝ : X₃✝ ⟶ Y₃✝
⊢ (((f₁✝ ⊗ f₂✝) ⊗ f₃✝) ≫ (α_ Y₁✝ Y₂✝ Y₃✝).hom).hom = ((α_ X₁✝ X₂✝ X₃✝).hom ≫ (f₁✝ ⊗ f₂✝ ⊗ f₃✝)).hom

Next tactic:
dsimp
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; 

Proof state:
case w
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X₁✝ X₂✝ X₃✝ Y₁✝ Y₂✝ Y₃✝ : Mon_ C
f₁✝ : X₁✝ ⟶ Y₁✝
f₂✝ : X₂✝ ⟶ Y₂✝
f₃✝ : X₃✝ ⟶ Y₃✝
⊢ ((f₁✝ ⊗ f₂✝) ⊗ f₃✝).hom ≫ (α_ Y₁✝ Y₂✝ Y₃✝).hom.hom = (α_ X₁✝ X₂✝ X₃✝).hom.hom ≫ (f₁✝ ⊗ f₂✝ ⊗ f₃✝).hom

Next tactic:
apply associator_naturality
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
⊢ ∀ {X Y : Mon_ C} (f : X ⟶ Y), (𝟙 (𝟙_ (Mon_ C)) ⊗ f) ≫ (λ_ Y).hom = (λ_ X).hom ≫ f

Next tactic:
intros
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X✝ Y✝ : Mon_ C
f✝ : X✝ ⟶ Y✝
⊢ (𝟙 (𝟙_ (Mon_ C)) ⊗ f✝) ≫ (λ_ Y✝).hom = (λ_ X✝).hom ≫ f✝

Next tactic:
ext
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; 

Proof state:
case w
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X✝ Y✝ : Mon_ C
f✝ : X✝ ⟶ Y✝
⊢ ((𝟙 (𝟙_ (Mon_ C)) ⊗ f✝) ≫ (λ_ Y✝).hom).hom = ((λ_ X✝).hom ≫ f✝).hom

Next tactic:
dsimp
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; dsimp; 

Proof state:
case w
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X✝ Y✝ : Mon_ C
f✝ : X✝ ⟶ Y✝
⊢ (𝟙 (𝟙_ (Mon_ C)) ⊗ f✝).hom ≫ (λ_ Y✝).hom.hom = (λ_ X✝).hom.hom ≫ f✝.hom

Next tactic:
apply leftUnitor_naturality
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; dsimp; apply leftUnitor_naturality)
  (rightUnitor_naturality := by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
⊢ ∀ {X Y : Mon_ C} (f : X ⟶ Y), (f ⊗ 𝟙 (𝟙_ (Mon_ C))) ≫ (ρ_ Y).hom = (ρ_ X).hom ≫ f

Next tactic:
intros
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; dsimp; apply leftUnitor_naturality)
  (rightUnitor_naturality := by intros; 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X✝ Y✝ : Mon_ C
f✝ : X✝ ⟶ Y✝
⊢ (f✝ ⊗ 𝟙 (𝟙_ (Mon_ C))) ≫ (ρ_ Y✝).hom = (ρ_ X✝).hom ≫ f✝

Next tactic:
ext
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; dsimp; apply leftUnitor_naturality)
  (rightUnitor_naturality := by intros; ext; 

Proof state:
case w
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X✝ Y✝ : Mon_ C
f✝ : X✝ ⟶ Y✝
⊢ ((f✝ ⊗ 𝟙 (𝟙_ (Mon_ C))) ≫ (ρ_ Y✝).hom).hom = ((ρ_ X✝).hom ≫ f✝).hom

Next tactic:
dsimp
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; dsimp; apply leftUnitor_naturality)
  (rightUnitor_naturality := by intros; ext; dsimp; 

Proof state:
case w
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X✝ Y✝ : Mon_ C
f✝ : X✝ ⟶ Y✝
⊢ (f✝ ⊗ 𝟙 (𝟙_ (Mon_ C))).hom ≫ (ρ_ Y✝).hom.hom = (ρ_ X✝).hom.hom ≫ f✝.hom

Next tactic:
apply rightUnitor_naturality
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; dsimp; apply leftUnitor_naturality)
  (rightUnitor_naturality := by intros; ext; dsimp; apply rightUnitor_naturality)
  (pentagon := by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
⊢ ∀ (W X Y Z : Mon_ C),
    ((α_ W X Y).hom ⊗ 𝟙 Z) ≫ (α_ W (X ⊗ Y) Z).hom ≫ (𝟙 W ⊗ (α_ X Y Z).hom) = (α_ (W ⊗ X) Y Z).hom ≫ (α_ W X (Y ⊗ Z)).hom

Next tactic:
intros
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; dsimp; apply leftUnitor_naturality)
  (rightUnitor_naturality := by intros; ext; dsimp; apply rightUnitor_naturality)
  (pentagon := by intros; 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
W✝ X✝ Y✝ Z✝ : Mon_ C
⊢ ((α_ W✝ X✝ Y✝).hom ⊗ 𝟙 Z✝) ≫ (α_ W✝ (X✝ ⊗ Y✝) Z✝).hom ≫ (𝟙 W✝ ⊗ (α_ X✝ Y✝ Z✝).hom) =
    (α_ (W✝ ⊗ X✝) Y✝ Z✝).hom ≫ (α_ W✝ X✝ (Y✝ ⊗ Z✝)).hom

Next tactic:
ext
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; dsimp; apply leftUnitor_naturality)
  (rightUnitor_naturality := by intros; ext; dsimp; apply rightUnitor_naturality)
  (pentagon := by intros; ext; 

Proof state:
case w
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
W✝ X✝ Y✝ Z✝ : Mon_ C
⊢ (((α_ W✝ X✝ Y✝).hom ⊗ 𝟙 Z✝) ≫ (α_ W✝ (X✝ ⊗ Y✝) Z✝).hom ≫ (𝟙 W✝ ⊗ (α_ X✝ Y✝ Z✝).hom)).hom =
    ((α_ (W✝ ⊗ X✝) Y✝ Z✝).hom ≫ (α_ W✝ X✝ (Y✝ ⊗ Z✝)).hom).hom

Next tactic:
dsimp
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; dsimp; apply leftUnitor_naturality)
  (rightUnitor_naturality := by intros; ext; dsimp; apply rightUnitor_naturality)
  (pentagon := by intros; ext; dsimp; 

Proof state:
case w
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
W✝ X✝ Y✝ Z✝ : Mon_ C
⊢ ((α_ W✝ X✝ Y✝).hom ⊗ 𝟙 Z✝).hom ≫ (α_ W✝ (X✝ ⊗ Y✝) Z✝).hom.hom ≫ (𝟙 W✝ ⊗ (α_ X✝ Y✝ Z✝).hom).hom =
    (α_ (W✝ ⊗ X✝) Y✝ Z✝).hom.hom ≫ (α_ W✝ X✝ (Y✝ ⊗ Z✝)).hom.hom

Next tactic:
apply pentagon
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; dsimp; apply leftUnitor_naturality)
  (rightUnitor_naturality := by intros; ext; dsimp; apply rightUnitor_naturality)
  (pentagon := by intros; ext; dsimp; apply pentagon)
  (triangle := by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
⊢ ∀ (X Y : Mon_ C), (α_ X (𝟙_ (Mon_ C)) Y).hom ≫ (𝟙 X ⊗ (λ_ Y).hom) = (ρ_ X).hom ⊗ 𝟙 Y

Next tactic:
intros
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; dsimp; apply leftUnitor_naturality)
  (rightUnitor_naturality := by intros; ext; dsimp; apply rightUnitor_naturality)
  (pentagon := by intros; ext; dsimp; apply pentagon)
  (triangle := by intros; 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X✝ Y✝ : Mon_ C
⊢ (α_ X✝ (𝟙_ (Mon_ C)) Y✝).hom ≫ (𝟙 X✝ ⊗ (λ_ Y✝).hom) = (ρ_ X✝).hom ⊗ 𝟙 Y✝

Next tactic:
ext
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; dsimp; apply leftUnitor_naturality)
  (rightUnitor_naturality := by intros; ext; dsimp; apply rightUnitor_naturality)
  (pentagon := by intros; ext; dsimp; apply pentagon)
  (triangle := by intros; ext; 

Proof state:
case w
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X✝ Y✝ : Mon_ C
⊢ ((α_ X✝ (𝟙_ (Mon_ C)) Y✝).hom ≫ (𝟙 X✝ ⊗ (λ_ Y✝).hom)).hom = ((ρ_ X✝).hom ⊗ 𝟙 Y✝).hom

Next tactic:
dsimp
instance monMonoidal : MonoidalCategory (Mon_ C) := .ofTensorHom
  (tensor_id := by intros; ext; apply tensor_id)
  (tensor_comp := by intros; ext; apply tensor_comp)
  (associator_naturality := by intros; ext; dsimp; apply associator_naturality)
  (leftUnitor_naturality := by intros; ext; dsimp; apply leftUnitor_naturality)
  (rightUnitor_naturality := by intros; ext; dsimp; apply rightUnitor_naturality)
  (pentagon := by intros; ext; dsimp; apply pentagon)
  (triangle := by intros; ext; dsimp; 

Proof state:
case w
C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
X✝ Y✝ : Mon_ C
⊢ (α_ X✝ (𝟙_ (Mon_ C)) Y✝).hom.hom ≫ (𝟙 X✝ ⊗ (λ_ Y✝).hom).hom = ((ρ_ X✝).hom ⊗ 𝟙 Y✝).hom

Next tactic:
apply triangle
instance : CentroidHomClass (CentroidHom α) α where
  coe f := f.toFun
  coe_injective' f g h := by
    

Proof state:
F : Type u_1
M : Type u_2
N : Type u_3
R : Type u_4
α : Type u_5
inst✝ : NonUnitalNonAssocSemiring α
f g : CentroidHom α
h : (fun f => f.toFun) f = (fun f => f.toFun) g
⊢ f = g

Next tactic:
cases f
instance : CentroidHomClass (CentroidHom α) α where
  coe f := f.toFun
  coe_injective' f g h := by
    cases f
    

Proof state:
case mk
F : Type u_1
M : Type u_2
N : Type u_3
R : Type u_4
α : Type u_5
inst✝ : NonUnitalNonAssocSemiring α
g : CentroidHom α
toAddMonoidHom✝ : α →+ α
map_mul_left'✝ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝) (a * b) = a * ZeroHom.toFun (↑toAddMonoidHom✝) b
map_mul_right'✝ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝) (a * b) = ZeroHom.toFun (↑toAddMonoidHom✝) a * b
h :
  (fun f => f.toFun)
      { toAddMonoidHom := toAddMonoidHom✝, map_mul_left' := map_mul_left'✝, map_mul_right' := map_mul_right'✝ } =
    (fun f => f.toFun) g
⊢ { toAddMonoidHom := toAddMonoidHom✝, map_mul_left' := map_mul_left'✝, map_mul_right' := map_mul_right'✝ } = g

Next tactic:
cases g
instance : CentroidHomClass (CentroidHom α) α where
  coe f := f.toFun
  coe_injective' f g h := by
    cases f
    cases g
    

Proof state:
case mk.mk
F : Type u_1
M : Type u_2
N : Type u_3
R : Type u_4
α : Type u_5
inst✝ : NonUnitalNonAssocSemiring α
toAddMonoidHom✝¹ : α →+ α
map_mul_left'✝¹ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝¹) (a * b) = a * ZeroHom.toFun (↑toAddMonoidHom✝¹) b
map_mul_right'✝¹ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝¹) (a * b) = ZeroHom.toFun (↑toAddMonoidHom✝¹) a * b
toAddMonoidHom✝ : α →+ α
map_mul_left'✝ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝) (a * b) = a * ZeroHom.toFun (↑toAddMonoidHom✝) b
map_mul_right'✝ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝) (a * b) = ZeroHom.toFun (↑toAddMonoidHom✝) a * b
h :
  (fun f => f.toFun)
      { toAddMonoidHom := toAddMonoidHom✝¹, map_mul_left' := map_mul_left'✝¹, map_mul_right' := map_mul_right'✝¹ } =
    (fun f => f.toFun)
      { toAddMonoidHom := toAddMonoidHom✝, map_mul_left' := map_mul_left'✝, map_mul_right' := map_mul_right'✝ }
⊢ { toAddMonoidHom := toAddMonoidHom✝¹, map_mul_left' := map_mul_left'✝¹, map_mul_right' := map_mul_right'✝¹ } =
    { toAddMonoidHom := toAddMonoidHom✝, map_mul_left' := map_mul_left'✝, map_mul_right' := map_mul_right'✝ }

Next tactic:
congr with x
instance : CentroidHomClass (CentroidHom α) α where
  coe f := f.toFun
  coe_injective' f g h := by
    cases f
    cases g
    congr with x
    

Proof state:
case mk.mk.e_toAddMonoidHom.h
F : Type u_1
M : Type u_2
N : Type u_3
R : Type u_4
α : Type u_5
inst✝ : NonUnitalNonAssocSemiring α
toAddMonoidHom✝¹ : α →+ α
map_mul_left'✝¹ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝¹) (a * b) = a * ZeroHom.toFun (↑toAddMonoidHom✝¹) b
map_mul_right'✝¹ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝¹) (a * b) = ZeroHom.toFun (↑toAddMonoidHom✝¹) a * b
toAddMonoidHom✝ : α →+ α
map_mul_left'✝ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝) (a * b) = a * ZeroHom.toFun (↑toAddMonoidHom✝) b
map_mul_right'✝ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝) (a * b) = ZeroHom.toFun (↑toAddMonoidHom✝) a * b
h :
  (fun f => f.toFun)
      { toAddMonoidHom := toAddMonoidHom✝¹, map_mul_left' := map_mul_left'✝¹, map_mul_right' := map_mul_right'✝¹ } =
    (fun f => f.toFun)
      { toAddMonoidHom := toAddMonoidHom✝, map_mul_left' := map_mul_left'✝, map_mul_right' := map_mul_right'✝ }
x : α
⊢ toAddMonoidHom✝¹ x = toAddMonoidHom✝ x

Next tactic:
exact congrFun h x
/-- 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 α :=
  { f.toAddMonoidHom.copy f' <| h with
    toFun := f'
    map_mul_left' := fun a b ↦ by 

Proof state:
F : Type u_1
M : Type u_2
N : Type u_3
R : Type u_4
α : Type u_5
inst✝ : NonUnitalNonAssocSemiring α
f : CentroidHom α
f' : α → α
h : f' = ⇑f
src✝ : α →+ α := AddMonoidHom.copy f.toAddMonoidHom f' h
a b : α
⊢ ZeroHom.toFun
      (↑{ toZeroHom := { toFun := f', map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0) },
          map_add' :=
            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })
      (a * b) =
    a *
      ZeroHom.toFun
        (↑{ toZeroHom := { toFun := f', map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0) },
            map_add' :=
              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })
        b

Next tactic:
simp_rw [h, map_mul_left]
/-- 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 α :=
  { f.toAddMonoidHom.copy f' <| h with
    toFun := f'
    map_mul_left' := fun a b ↦ by simp_rw [h, map_mul_left]
    map_mul_right' := fun a b ↦ by 

Proof state:
F : Type u_1
M : Type u_2
N : Type u_3
R : Type u_4
α : Type u_5
inst✝ : NonUnitalNonAssocSemiring α
f : CentroidHom α
f' : α → α
h : f' = ⇑f
src✝ : α →+ α := AddMonoidHom.copy f.toAddMonoidHom f' h
a b : α
⊢ ZeroHom.toFun
      (↑{ toZeroHom := { toFun := f', map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0) },
          map_add' :=
            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })
      (a * b) =
    ZeroHom.toFun
        (↑{ toZeroHom := { toFun := f', map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0) },
            map_add' :=
              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })
        a *
      b

Next tactic:
simp_rw [h, map_mul_right]
@[simp]
theorem cancel_left {g f₁ f₂ : CentroidHom α} (hg : Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂ :=
  ⟨fun h ↦ ext fun a ↦ hg <| by 

Proof state:
F : Type u_1
M : Type u_2
N : Type u_3
R : Type u_4
α : Type u_5
inst✝ : NonUnitalNonAssocSemiring α
g f₁ f₂ : CentroidHom α
hg : Injective ⇑g
h : comp g f₁ = comp g f₂
a : α
⊢ g (f₁ a) = g (f₂ a)

Next tactic:
rw [← comp_apply, h, comp_apply]
instance : Add (CentroidHom α) :=
  ⟨fun f g ↦
    { (f + g : α →+ α) with
      map_mul_left' := fun a b ↦ by
        

Proof state:
F : Type u_1
M : Type u_2
N : Type u_3
R : Type u_4
α : Type u_5
inst✝ : NonUnitalNonAssocSemiring α
f g : CentroidHom α
src✝ : α →+ α := ↑f + ↑g
a b : α
⊢ ZeroHom.toFun
      (↑{ toZeroHom := ↑src✝,
          map_add' :=
            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })
      (a * b) =
    a *
      ZeroHom.toFun
        (↑{ toZeroHom := ↑src✝,
            map_add' :=
              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })
        b

Next tactic:
show f (a * b) + g (a * b) = a * (f b + g b)
instance : Add (CentroidHom α) :=
  ⟨fun f g ↦
    { (f + g : α →+ α) with
      map_mul_left' := fun a b ↦ by
        show f (a * b) + g (a * b) = a * (f b + g b)
        

Proof state:
F : Type u_1
M : Type u_2
N : Type u_3
R : Type u_4
α : Type u_5
inst✝ : NonUnitalNonAssocSemiring α
f g : CentroidHom α
src✝ : α →+ α := ↑f + ↑g
a b : α
⊢ f (a * b) + g (a * b) = a * (f b + g b)

Next tactic:
simp [map_mul_left, mul_add]
instance : Add (CentroidHom α) :=
  ⟨fun f g ↦
    { (f + g : α →+ α) with
      map_mul_left' := fun a b ↦ by
        show f (a * b) + g (a * b) = a * (f b + g b)
        simp [map_mul_left, mul_add]
      map_mul_right' := fun a b ↦ by
        

Proof state:
F : Type u_1
M : Type u_2
N : Type u_3
R : Type u_4
α : Type u_5
inst✝ : NonUnitalNonAssocSemiring α
f g : CentroidHom α
src✝ : α →+ α := ↑f + ↑g
a b : α
⊢ ZeroHom.toFun
      (↑{ toZeroHom := ↑src✝,
          map_add' :=
            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })
      (a * b) =
    ZeroHom.toFun
        (↑{ toZeroHom := ↑src✝,
            map_add' :=
              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })
        a *
      b

Next tactic:
show f (a * b) + g (a * b) = (f a + g a) * b
instance : Add (CentroidHom α) :=
  ⟨fun f g ↦
    { (f + g : α →+ α) with
      map_mul_left' := fun a b ↦ by
        show f (a * b) + g (a * b) = a * (f b + g b)
        simp [map_mul_left, mul_add]
      map_mul_right' := fun a b ↦ by
        show f (a * b) + g (a * b) = (f a + g a) * b
        

Proof state:
F : Type u_1
M : Type u_2
N : Type u_3
R : Type u_4
α : Type u_5
inst✝ : NonUnitalNonAssocSemiring α
f g : CentroidHom α
src✝ : α →+ α := ↑f + ↑g
a b : α
⊢ f (a * b) + g (a * b) = (f a + g a) * b

Next tactic:
simp [map_mul_right, add_mul]
instance instSMul : SMul M (CentroidHom α) where
  smul n f :=
    { (n • f : α →+ α) with
      map_mul_left' := fun a b ↦ by
        

Proof state:
F : Type u_1
M : Type u_2
N : Type u_3
R : Type u_4
α : Type u_5
inst✝¹² : NonUnitalNonAssocSemiring α
inst✝¹¹ : Monoid M
inst✝¹⁰ : Monoid N
inst✝⁹ : Semiring R
inst✝⁸ : DistribMulAction M α
inst✝⁷ : SMulCommClass M α α
inst✝⁶ : IsScalarTower M α α
inst✝⁵ : DistribMulAction N α
inst✝⁴ : SMulCommClass N α α
inst✝³ : IsScalarTower N α α
inst✝² : Module R α
inst✝¹ : SMulCommClass R α α
inst✝ : IsScalarTower R α α
n : M
f : CentroidHom α
src✝ : α →+ α := n • ↑f
a b : α
⊢ ZeroHom.toFun
      (↑{ toZeroHom := ↑src✝,
          map_add' :=
            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })
      (a * b) =
    a *
      ZeroHom.toFun
        (↑{ toZeroHom := ↑src✝,
            map_add' :=
              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })
        b

Next tactic:
change n • f (a * b) = a * n • f b
instance instSMul : SMul M (CentroidHom α) where
  smul n f :=
    { (n • f : α →+ α) with
      map_mul_left' := fun a b ↦ by
        change n • f (a * b) = a * n • f b
        

Proof state:
F : Type u_1
M : Type u_2
N : Type u_3
R : Type u_4
α : Type u_5
inst✝¹² : NonUnitalNonAssocSemiring α
inst✝¹¹ : Monoid M
inst✝¹⁰ : Monoid N
inst✝⁹ : Semiring R
inst✝⁸ : DistribMulAction M α
inst✝⁷ : SMulCommClass M α α
inst✝⁶ : IsScalarTower M α α
inst✝⁵ : DistribMulAction N α
inst✝⁴ : SMulCommClass N α α
inst✝³ : IsScalarTower N α α
inst✝² : Module R α
inst✝¹ : SMulCommClass R α α
inst✝ : IsScalarTower R α α
n : M
f : CentroidHom α
src✝ : α →+ α := n • ↑f
a b : α
⊢ n • f (a * b) = a * n • f b

Next tactic:
rw [map_mul_left f, ← mul_smul_comm]