/-
Copyright (c) 2021 Oliver Nash. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Oliver Nash

! This file was ported from Lean 3 source module algebra.hom.non_unital_alg
! leanprover-community/mathlib commit ee05e9ce1322178f0c12004eb93c00d2c8c00ed2
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Algebra.Algebra.Hom

/-!
# Morphisms of non-unital algebras

> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
> Any changes to this file require a corresponding PR to mathlib4.

This file defines morphisms between two types, each of which carries:
 * an addition,
 * an additive zero,
 * a multiplication,
 * a scalar action.

The multiplications are not assumed to be associative or unital, or even to be compatible with the
scalar actions. In a typical application, the operations will satisfy compatibility conditions
making them into algebras (albeit possibly non-associative and/or non-unital) but such conditions
are not required to make this definition.

This notion of morphism should be useful for any category of non-unital algebras. The motivating
application at the time it was introduced was to be able to state the adjunction property for
magma algebras. These are non-unital, non-associative algebras obtained by applying the
group-algebra construction except where we take a type carrying just `has_mul` instead of `group`.

For a plausible future application, one could take the non-unital algebra of compactly-supported
functions on a non-compact topological space. A proper map between a pair of such spaces
(contravariantly) induces a morphism between their algebras of compactly-supported functions which
will be a `non_unital_alg_hom`.

TODO: add `non_unital_alg_equiv` when needed.

## Main definitions

  * `non_unital_alg_hom`
  * `alg_hom.to_non_unital_alg_hom`

## Tags

non-unital, algebra, morphism
-/

universe u v w w₁ w₂ w₃

variable (R : Type u) (A : Type v) (B : Type w) (C : Type w₁)

#print NonUnitalAlgHom /-
/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from
algebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/
structure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]
  [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A →+[R] B, A →ₙ* B
#align non_unital_alg_hom NonUnitalAlgHom
-/

-- mathport name: «expr →ₙₐ »
infixr:25 " →ₙₐ " => NonUnitalAlgHom _

-- mathport name: «expr →ₙₐ[ ] »
notation:25 A " →ₙₐ[" R "] " B => NonUnitalAlgHom R A B

attribute [nolint doc_blame] NonUnitalAlgHom.toDistribMulActionHom

attribute [nolint doc_blame] NonUnitalAlgHom.toMulHom

#print NonUnitalAlgHomClass /-
/-- `non_unital_alg_hom_class F R A B` asserts `F` is a type of bundled algebra homomorphisms
from `A` to `B`.  -/
class NonUnitalAlgHomClass (F : Type _) (R : outParam (Type _)) (A : outParam (Type _))
  (B : outParam (Type _)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]
  [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,
  MulHomClass F A B
#align non_unital_alg_hom_class NonUnitalAlgHomClass
-/

-- `R` becomes a metavariable but that's fine because it's an `out_param`
attribute [nolint dangerous_instance] NonUnitalAlgHomClass.toMulHomClass

namespace NonUnitalAlgHomClass

#print NonUnitalAlgHomClass.toNonUnitalRingHomClass /-
-- `R` becomes a metavariable but that's fine because it's an `out_param`
-- See note [lower instance priority]
@[nolint dangerous_instance]
instance (priority := 100) NonUnitalAlgHomClass.toNonUnitalRingHomClass {F R A B : Type _}
    [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A] [NonUnitalNonAssocSemiring B]
    [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=
  { ‹NonUnitalAlgHomClass F R A B› with coe := coeFn }
#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass
-/

variable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A] [NonUnitalNonAssocSemiring B]
  [Module R B]

-- see Note [lower instance priority]
instance (priority := 100) {F : Type _} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=
  { ‹NonUnitalAlgHomClass F R A B› with map_smulₛₗ := DistribMulActionHomClass.map_smul }

instance {F R A B : Type _} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]
    [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :
    CoeTC F (A →ₙₐ[R] B)
    where coe f :=
    { (f : A →ₙ+* B) with
      toFun := f
      map_smul' := map_smul f }

end NonUnitalAlgHomClass

namespace NonUnitalAlgHom

variable {R A B C} [Monoid R]

variable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]

variable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]

variable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]

/-- see Note [function coercion] -/
instance : CoeFun (A →ₙₐ[R] B) fun _ => A → B :=
  ⟨toFun⟩

/- warning: non_unital_alg_hom.to_fun_eq_coe -> NonUnitalAlgHom.toFun_eq_coe is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{max (succ u2) (succ u3)} (A -> B) (NonUnitalAlgHom.toFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 f) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{max (succ u2) (succ u3)} (A -> B) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHom.toMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (NonUnitalAlgHom.toDistribMulActionHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 f))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (f : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) f) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f)
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coeₓ'. -/
@[simp]
theorem toFun_eq_coe (f : A →ₙₐ[R] B) : f.toFun = ⇑f :=
  rfl
#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe

initialize_simps_projections NonUnitalAlgHom (toFun → apply)

/- warning: non_unital_alg_hom.coe_coe -> NonUnitalAlgHom.coe_coe is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] {F : Type.{u4}} [_inst_8 : NonUnitalAlgHomClass.{u4, u1, u2, u3} F R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5] (f : F), Eq.{max (succ u2) (succ u3)} (A -> B) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) ((fun (a : Type.{u4}) (b : Sort.{max (succ u2) (succ u3)}) [self : HasLiftT.{succ u4, max (succ u2) (succ u3)} a b] => self.0) F (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (HasLiftT.mk.{succ u4, max (succ u2) (succ u3)} F (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (CoeTCₓ.coe.{succ u4, max (succ u2) (succ u3)} F (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHomClass.NonUnitalAlgHom.hasCoeT.{u4, u1, u2, u3} F R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_8))) f)) (coeFn.{succ u4, max (succ u2) (succ u3)} F (fun (_x : F) => A -> B) (FunLike.hasCoeToFun.{succ u4, succ u2, succ u3} F A (fun (_x : A) => B) (SMulHomClass.toFunLike.{u4, u1, u2, u3} F R A B (SMulZeroClass.toHasSmul.{u1, u2} R A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)))) (DistribSMul.toSmulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) (SMulZeroClass.toHasSmul.{u1, u3} R B (AddZeroClass.toHasZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)))) (DistribSMul.toSmulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHomClass.toSmulHomClass.{u4, u1, u2, u3} F R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5 (NonUnitalAlgHomClass.toDistribMulActionHomClass.{u4, u1, u2, u3} F R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 _inst_8)))) f)
but is expected to have type
  forall {R : Type.{u2}} {A : Type.{u3}} {B : Type.{u4}} [_inst_1 : Monoid.{u2} R] [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : DistribMulAction.{u2, u3} R A _inst_1 (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u4} B] [_inst_5 : DistribMulAction.{u2, u4} R B _inst_1 (AddCommMonoid.toAddMonoid.{u4} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} B _inst_4))] {F : Type.{u1}} [_inst_8 : NonUnitalAlgHomClass.{u1, u2, u3, u4} F R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5] (f : F), Eq.{max (succ u3) (succ u4)} (forall (ᾰ : A), (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) ᾰ) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (NonUnitalAlgHom.{u2, u3, u4} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u2, u3, u4} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (let src._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1220 : NonUnitalRingHom.{u3, u4} A B _inst_2 _inst_4 := NonUnitalRingHomClass.toNonUnitalRingHom.{u1, u3, u4} F A B _inst_2 _inst_4 (NonUnitalAlgHomClass.toNonUnitalRingHomClass.{u1, u2, u3, u4} F R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_8) f; NonUnitalAlgHom.mk.{u2, u3, u4} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (DistribMulActionHom.mk.{u2, u3, u4} R _inst_1 A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u4} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} B _inst_4)) _inst_5 (MulActionHom.mk.{u2, u3, u4} R A (SMulZeroClass.toSMul.{u2, u3} R A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2))) (DistribSMul.toSMulZeroClass.{u2, u3} R A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2))) (DistribMulAction.toDistribSMul.{u2, u3} R A _inst_1 (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u2, u4} R B (AddMonoid.toZero.{u4} B (AddCommMonoid.toAddMonoid.{u4} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} B _inst_4))) (DistribSMul.toSMulZeroClass.{u2, u4} R B (AddMonoid.toAddZeroClass.{u4} B (AddCommMonoid.toAddMonoid.{u4} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} B _inst_4))) (DistribMulAction.toDistribSMul.{u2, u4} R B _inst_1 (AddCommMonoid.toAddMonoid.{u4} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} B _inst_4)) _inst_5))) (FunLike.coe.{succ u1, succ u3, succ u4} F A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) a) (SMulHomClass.toFunLike.{u1, u2, u3, u4} F R A B (SMulZeroClass.toSMul.{u2, u3} R A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2))) (DistribSMul.toSMulZeroClass.{u2, u3} R A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2))) (DistribMulAction.toDistribSMul.{u2, u3} R A _inst_1 (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)) _inst_3))) (SMulZeroClass.toSMul.{u2, u4} R B (AddMonoid.toZero.{u4} B (AddCommMonoid.toAddMonoid.{u4} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} B _inst_4))) (DistribSMul.toSMulZeroClass.{u2, u4} R B (AddMonoid.toAddZeroClass.{u4} B (AddCommMonoid.toAddMonoid.{u4} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} B _inst_4))) (DistribMulAction.toDistribSMul.{u2, u4} R B _inst_1 (AddCommMonoid.toAddMonoid.{u4} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} B _inst_4)) _inst_5))) (DistribMulActionHomClass.toSMulHomClass.{u1, u2, u3, u4} F R A B _inst_1 (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)) (AddCommMonoid.toAddMonoid.{u4} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} B _inst_4)) _inst_3 _inst_5 (NonUnitalAlgHomClass.toDistribMulActionHomClass.{u1, u2, u3, u4} F R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 _inst_8))) f) (NonUnitalAlgHomClass.instCoeTCNonUnitalAlgHom.proof_1.{u4, u2, u3, u1} F R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_8 f)) (NonUnitalRingHom.map_zero'.{u3, u4} A B _inst_2 _inst_4 src._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1220) (NonUnitalRingHom.map_add'.{u3, u4} A B _inst_2 _inst_4 src._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1220)) (NonUnitalAlgHomClass.instCoeTCNonUnitalAlgHom.proof_2.{u4, u3, u1, u2} F R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_8 f))) (FunLike.coe.{succ u1, succ u3, succ u4} F A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) _x) (SMulHomClass.toFunLike.{u1, u2, u3, u4} F R A B (SMulZeroClass.toSMul.{u2, u3} R A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2))) (DistribSMul.toSMulZeroClass.{u2, u3} R A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2))) (DistribMulAction.toDistribSMul.{u2, u3} R A _inst_1 (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)) _inst_3))) (SMulZeroClass.toSMul.{u2, u4} R B (AddMonoid.toZero.{u4} B (AddCommMonoid.toAddMonoid.{u4} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} B _inst_4))) (DistribSMul.toSMulZeroClass.{u2, u4} R B (AddMonoid.toAddZeroClass.{u4} B (AddCommMonoid.toAddMonoid.{u4} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} B _inst_4))) (DistribMulAction.toDistribSMul.{u2, u4} R B _inst_1 (AddCommMonoid.toAddMonoid.{u4} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} B _inst_4)) _inst_5))) (DistribMulActionHomClass.toSMulHomClass.{u1, u2, u3, u4} F R A B _inst_1 (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)) (AddCommMonoid.toAddMonoid.{u4} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} B _inst_4)) _inst_3 _inst_5 (NonUnitalAlgHomClass.toDistribMulActionHomClass.{u1, u2, u3, u4} F R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 _inst_8))) f)
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coeₓ'. -/
@[simp, protected]
theorem coe_coe {F : Type _} [NonUnitalAlgHomClass F R A B] (f : F) : ⇑(f : A →ₙₐ[R] B) = f :=
  rfl
#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe

/- warning: non_unital_alg_hom.coe_injective -> NonUnitalAlgHom.coe_injective is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], Function.Injective.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (A -> B) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (ᾰ : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], Function.Injective.{max (succ u3) (succ u2), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (A -> B) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (ᾰ : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) ᾰ) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injectiveₓ'. -/
theorem coe_injective : @Function.Injective (A →ₙₐ[R] B) (A → B) coeFn := by
  rintro ⟨f, _⟩ ⟨g, _⟩ ⟨h⟩ <;> congr
#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective

instance : NonUnitalAlgHomClass (A →ₙₐ[R] B) R A B
    where
  coe := toFun
  coe_injective' := coe_injective
  map_smul f := f.map_smul'
  map_add f := f.map_add'
  map_zero f := f.map_zero'
  map_mul f := f.map_mul'

/- warning: non_unital_alg_hom.ext -> NonUnitalAlgHom.ext is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] {f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5} {g : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5}, (forall (x : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) g x)) -> (Eq.{max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f g)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] {f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5} {g : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5}, (forall (x : A), Eq.{succ u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) g x)) -> (Eq.{max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f g)
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.ext NonUnitalAlgHom.extₓ'. -/
@[ext]
theorem ext {f g : A →ₙₐ[R] B} (h : ∀ x, f x = g x) : f = g :=
  coe_injective <| funext h
#align non_unital_alg_hom.ext NonUnitalAlgHom.ext

/- warning: non_unital_alg_hom.ext_iff -> NonUnitalAlgHom.ext_iff is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] {f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5} {g : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5}, Iff (Eq.{max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f g) (forall (x : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) g x))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] {f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5} {g : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5}, Iff (Eq.{max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f g) (forall (x : A), Eq.{succ u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) g x))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iffₓ'. -/
theorem ext_iff {f g : A →ₙₐ[R] B} : f = g ↔ ∀ x, f x = g x :=
  ⟨by
    rintro rfl x
    rfl, ext⟩
#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff

/- warning: non_unital_alg_hom.congr_fun -> NonUnitalAlgHom.congr_fun is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] {f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5} {g : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5}, (Eq.{max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f g) -> (forall (x : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) g x))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] {f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5} {g : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5}, (Eq.{max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f g) -> (forall (x : A), Eq.{succ u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) g x))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_funₓ'. -/
theorem congr_fun {f g : A →ₙₐ[R] B} (h : f = g) (x : A) : f x = g x :=
  h ▸ rfl
#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun

/- warning: non_unital_alg_hom.coe_mk -> NonUnitalAlgHom.coe_mk is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : A -> B) (h₁ : forall (m : R) (x : A), Eq.{succ u3} B (f (SMul.smul.{u1, u2} R A (SMulZeroClass.toHasSmul.{u1, u2} R A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)))) (DistribSMul.toSmulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) m x)) (SMul.smul.{u1, u3} R B (SMulZeroClass.toHasSmul.{u1, u3} R B (AddZeroClass.toHasZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)))) (DistribSMul.toSmulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) m (f x))) (h₂ : Eq.{succ u3} B (f (OfNat.ofNat.{u2} A 0 (OfNat.mk.{u2} A 0 (Zero.zero.{u2} A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)))))))) (OfNat.ofNat.{u3} B 0 (OfNat.mk.{u3} B 0 (Zero.zero.{u3} B (AddZeroClass.toHasZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)))))))) (h₃ : forall (x : A) (y : A), Eq.{succ u3} B (f (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddZeroClass.toHasAdd.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))))) x y)) (HAdd.hAdd.{u3, u3, u3} B B B (instHAdd.{u3} B (AddZeroClass.toHasAdd.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))))) (f x) (f y))) (h₄ : forall (x : A) (y : A), Eq.{succ u3} B (f (HMul.hMul.{u2, u2, u2} A A A (instHMul.{u2} A (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2))) x y)) (HMul.hMul.{u3, u3, u3} B B B (instHMul.{u3} B (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (f x) (f y))), Eq.{max (succ u2) (succ u3)} ((fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.mk.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 f h₁ h₂ h₃ h₄)) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.mk.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 f h₁ h₂ h₃ h₄)) f
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : A -> B) (h₁ : forall (m : R) (x : A), Eq.{succ u3} B (f (HSMul.hSMul.{u1, u2, u2} R A A (instHSMul.{u1, u2} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3)))) m x)) (HSMul.hSMul.{u1, u3, u3} R B B (instHSMul.{u1, u3} R B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5)))) m (f x))) (h₂ : Eq.{succ u3} B (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) f h₁) (OfNat.ofNat.{u2} A 0 (Zero.toOfNat0.{u2} A (AddZeroClass.toZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))))))) (OfNat.ofNat.{u3} B 0 (Zero.toOfNat0.{u3} B (AddZeroClass.toZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))))))) (h₃ : forall (x : A) (y : A), Eq.{succ u3} B (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) f h₁) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddZeroClass.toAdd.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))))) x y)) (HAdd.hAdd.{u3, u3, u3} B B B (instHAdd.{u3} B (AddZeroClass.toAdd.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))))) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) f h₁) x) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) f h₁) y))) (h₄ : forall (x : A) (y : A), Eq.{succ u3} B (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHom.toMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) f h₁) h₂ h₃)) (HMul.hMul.{u2, u2, u2} A A A (instHMul.{u2} A (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2)) x y)) (HMul.hMul.{u3, u3, u3} B B B (instHMul.{u3} B (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4)) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHom.toMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) f h₁) h₂ h₃)) x) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHom.toMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) f h₁) h₂ h₃)) y))), Eq.{max (succ u2) (succ u3)} (forall (a : A), (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.mk.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) f h₁) h₂ h₃) h₄)) f
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mkₓ'. -/
@[simp]
theorem coe_mk (f : A → B) (h₁ h₂ h₃ h₄) : ((⟨f, h₁, h₂, h₃, h₄⟩ : A →ₙₐ[R] B) : A → B) = f :=
  rfl
#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk

/- warning: non_unital_alg_hom.mk_coe -> NonUnitalAlgHom.mk_coe is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (h₁ : forall (m : R) (x : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (SMul.smul.{u1, u2} R A (SMulZeroClass.toHasSmul.{u1, u2} R A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)))) (DistribSMul.toSmulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) m x)) (SMul.smul.{u1, u3} R B (SMulZeroClass.toHasSmul.{u1, u3} R B (AddZeroClass.toHasZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)))) (DistribSMul.toSmulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) m (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x))) (h₂ : Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (OfNat.ofNat.{u2} A 0 (OfNat.mk.{u2} A 0 (Zero.zero.{u2} A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)))))))) (OfNat.ofNat.{u3} B 0 (OfNat.mk.{u3} B 0 (Zero.zero.{u3} B (AddZeroClass.toHasZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)))))))) (h₃ : forall (x : A) (y : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddZeroClass.toHasAdd.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))))) x y)) (HAdd.hAdd.{u3, u3, u3} B B B (instHAdd.{u3} B (AddZeroClass.toHasAdd.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))))) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f y))) (h₄ : forall (x : A) (y : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HMul.hMul.{u2, u2, u2} A A A (instHMul.{u2} A (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2))) x y)) (HMul.hMul.{u3, u3, u3} B B B (instHMul.{u3} B (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f y))), Eq.{max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.mk.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁ h₂ h₃ h₄) f
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (h₁ : forall (m : R) (x : A), Eq.{succ u3} B (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HSMul.hSMul.{u1, u2, u2} R A A (instHSMul.{u1, u2} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3)))) m x)) (HSMul.hSMul.{u1, u3, u3} R B B (instHSMul.{u1, u3} R B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5)))) m (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x))) (h₂ : Eq.{succ u3} B (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) (OfNat.ofNat.{u2} A 0 (Zero.toOfNat0.{u2} A (AddZeroClass.toZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))))))) (OfNat.ofNat.{u3} B 0 (Zero.toOfNat0.{u3} B (AddZeroClass.toZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))))))) (h₃ : forall (x : A) (y : A), Eq.{succ u3} B (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddZeroClass.toAdd.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))))) x y)) (HAdd.hAdd.{u3, u3, u3} B B B (instHAdd.{u3} B (AddZeroClass.toAdd.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))))) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) x) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) y))) (h₄ : forall (x : A) (y : A), Eq.{succ u3} B (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHom.toMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) h₂ h₃)) (HMul.hMul.{u2, u2, u2} A A A (instHMul.{u2} A (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2)) x y)) (HMul.hMul.{u3, u3, u3} B B B (instHMul.{u3} B (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4)) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHom.toMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) h₂ h₃)) x) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHom.toMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) h₂ h₃)) y))), Eq.{max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.mk.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) h₂ h₃) h₄) f
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coeₓ'. -/
@[simp]
theorem mk_coe (f : A →ₙₐ[R] B) (h₁ h₂ h₃ h₄) : (⟨f, h₁, h₂, h₃, h₄⟩ : A →ₙₐ[R] B) = f :=
  by
  ext
  rfl
#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe

instance : Coe (A →ₙₐ[R] B) (A →+[R] B) :=
  ⟨toDistribMulActionHom⟩

instance : Coe (A →ₙₐ[R] B) (A →ₙ* B) :=
  ⟨toMulHom⟩

#print NonUnitalAlgHom.toDistribMulActionHom_eq_coe /-
@[simp]
theorem toDistribMulActionHom_eq_coe (f : A →ₙₐ[R] B) : f.toDistribMulActionHom = ↑f :=
  rfl
#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe
-/

/- warning: non_unital_alg_hom.to_mul_hom_eq_coe -> NonUnitalAlgHom.toMulHom_eq_coe is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{max (succ u3) (succ u2)} (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (NonUnitalAlgHom.toMulHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 f) ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u3) (succ u2)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u3) (succ u2)} a b] => self.0) (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (MulHom.hasCoeT.{u2, u3, max u2 u3} A B (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4)) (NonUnitalAlgHomClass.toMulHomClass.{max u2 u3, u1, u2, u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 (NonUnitalAlgHom.nonUnitalAlgHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))))) f)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{max (succ u2) (succ u3)} (MulHom.{u2, u3} A B (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2) (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4)) (NonUnitalAlgHom.toMulHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 f) (MulHomClass.toMulHom.{u2, u3, max u2 u3} A B (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2) (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4) (NonUnitalAlgHomClass.toMulHomClass.{max u2 u3, u1, u2, u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 (NonUnitalAlgHom.instNonUnitalAlgHomClassNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) f)
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coeₓ'. -/
@[simp]
theorem toMulHom_eq_coe (f : A →ₙₐ[R] B) : f.toMulHom = ↑f :=
  rfl
#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe

#print NonUnitalAlgHom.coe_to_distribMulActionHom /-
@[simp, norm_cast]
theorem coe_to_distribMulActionHom (f : A →ₙₐ[R] B) : ((f : A →+[R] B) : A → B) = f :=
  rfl
#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom
-/

/- warning: non_unital_alg_hom.coe_to_mul_hom -> NonUnitalAlgHom.coe_to_mulHom is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{max (succ u2) (succ u3)} ((fun (_x : MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) => A -> B) ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u3) (succ u2)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u3) (succ u2)} a b] => self.0) (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (MulHom.hasCoeT.{u2, u3, max u2 u3} A B (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4)) (NonUnitalAlgHomClass.toMulHomClass.{max u2 u3, u1, u2, u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 (NonUnitalAlgHom.nonUnitalAlgHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))))) f)) (coeFn.{max (succ u3) (succ u2), max (succ u2) (succ u3)} (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (fun (_x : MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) => A -> B) (MulHom.hasCoeToFun.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u3) (succ u2)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u3) (succ u2)} a b] => self.0) (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (MulHom.hasCoeT.{u2, u3, max u2 u3} A B (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4)) (NonUnitalAlgHomClass.toMulHomClass.{max u2 u3, u1, u2, u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 (NonUnitalAlgHom.nonUnitalAlgHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))))) f)) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{max (succ u2) (succ u3)} (forall (a : A), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => B) a) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (MulHom.{u2, u3} A B (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2) (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4)) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => B) _x) (MulHomClass.toFunLike.{max u2 u3, u2, u3} (MulHom.{u2, u3} A B (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2) (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4)) A B (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2) (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4) (MulHom.mulHomClass.{u2, u3} A B (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2) (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4))) (MulHomClass.toMulHom.{u2, u3, max u2 u3} A B (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2) (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4) (NonUnitalAlgHomClass.toMulHomClass.{max u2 u3, u1, u2, u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 (NonUnitalAlgHom.instNonUnitalAlgHomClassNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) f)) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f)
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHomₓ'. -/
@[simp, norm_cast]
theorem coe_to_mulHom (f : A →ₙₐ[R] B) : ((f : A →ₙ* B) : A → B) = f :=
  rfl
#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom

#print NonUnitalAlgHom.to_distribMulActionHom_injective /-
theorem to_distribMulActionHom_injective {f g : A →ₙₐ[R] B}
    (h : (f : A →+[R] B) = (g : A →+[R] B)) : f = g :=
  by
  ext a
  exact DistribMulActionHom.congr_fun h a
#align non_unital_alg_hom.to_distrib_mul_action_hom_injective NonUnitalAlgHom.to_distribMulActionHom_injective
-/

/- warning: non_unital_alg_hom.to_mul_hom_injective -> NonUnitalAlgHom.to_mulHom_injective is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] {f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5} {g : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5}, (Eq.{max (succ u3) (succ u2)} (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u3) (succ u2)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u3) (succ u2)} a b] => self.0) (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (MulHom.hasCoeT.{u2, u3, max u2 u3} A B (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4)) (NonUnitalAlgHomClass.toMulHomClass.{max u2 u3, u1, u2, u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 (NonUnitalAlgHom.nonUnitalAlgHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))))) f) ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u3) (succ u2)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u3) (succ u2)} a b] => self.0) (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (MulHom.hasCoeT.{u2, u3, max u2 u3} A B (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4)) (NonUnitalAlgHomClass.toMulHomClass.{max u2 u3, u1, u2, u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 (NonUnitalAlgHom.nonUnitalAlgHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))))) g)) -> (Eq.{max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f g)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] {f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5} {g : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5}, (Eq.{max (succ u2) (succ u3)} (MulHom.{u2, u3} A B (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2) (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4)) (MulHomClass.toMulHom.{u2, u3, max u2 u3} A B (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2) (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4) (NonUnitalAlgHomClass.toMulHomClass.{max u2 u3, u1, u2, u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 (NonUnitalAlgHom.instNonUnitalAlgHomClassNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) f) (MulHomClass.toMulHom.{u2, u3, max u2 u3} A B (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2) (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4) (NonUnitalAlgHomClass.toMulHomClass.{max u2 u3, u1, u2, u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 (NonUnitalAlgHom.instNonUnitalAlgHomClassNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) g)) -> (Eq.{max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f g)
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.to_mul_hom_injective NonUnitalAlgHom.to_mulHom_injectiveₓ'. -/
theorem to_mulHom_injective {f g : A →ₙₐ[R] B} (h : (f : A →ₙ* B) = (g : A →ₙ* B)) : f = g :=
  by
  ext a
  exact MulHom.congr_fun h a
#align non_unital_alg_hom.to_mul_hom_injective NonUnitalAlgHom.to_mulHom_injective

/- warning: non_unital_alg_hom.coe_distrib_mul_action_hom_mk -> NonUnitalAlgHom.coe_distribMulActionHom_mk is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (h₁ : forall (m : R) (x : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (SMul.smul.{u1, u2} R A (SMulZeroClass.toHasSmul.{u1, u2} R A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)))) (DistribSMul.toSmulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) m x)) (SMul.smul.{u1, u3} R B (SMulZeroClass.toHasSmul.{u1, u3} R B (AddZeroClass.toHasZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)))) (DistribSMul.toSmulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) m (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x))) (h₂ : Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (OfNat.ofNat.{u2} A 0 (OfNat.mk.{u2} A 0 (Zero.zero.{u2} A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)))))))) (OfNat.ofNat.{u3} B 0 (OfNat.mk.{u3} B 0 (Zero.zero.{u3} B (AddZeroClass.toHasZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)))))))) (h₃ : forall (x : A) (y : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddZeroClass.toHasAdd.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))))) x y)) (HAdd.hAdd.{u3, u3, u3} B B B (instHAdd.{u3} B (AddZeroClass.toHasAdd.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))))) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f y))) (h₄ : forall (x : A) (y : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HMul.hMul.{u2, u2, u2} A A A (instHMul.{u2} A (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2))) x y)) (HMul.hMul.{u3, u3, u3} B B B (instHMul.{u3} B (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f y))), Eq.{max (succ u2) (succ u3)} (DistribMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5) ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u2) (succ u3)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u2) (succ u3)} a b] => self.0) (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (DistribMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (DistribMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (DistribMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5) (coeBase.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (DistribMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5) (NonUnitalAlgHom.DistribMulActionHom.hasCoe.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)))) (NonUnitalAlgHom.mk.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁ h₂ h₃ h₄)) (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁ h₂ h₃)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (h₁ : forall (m : R) (x : A), Eq.{succ u3} B (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HSMul.hSMul.{u1, u2, u2} R A A (instHSMul.{u1, u2} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3)))) m x)) (HSMul.hSMul.{u1, u3, u3} R B B (instHSMul.{u1, u3} R B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5)))) m (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x))) (h₂ : Eq.{succ u3} B (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) (OfNat.ofNat.{u2} A 0 (Zero.toOfNat0.{u2} A (AddZeroClass.toZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))))))) (OfNat.ofNat.{u3} B 0 (Zero.toOfNat0.{u3} B (AddZeroClass.toZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))))))) (h₃ : forall (x : A) (y : A), Eq.{succ u3} B (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddZeroClass.toAdd.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))))) x y)) (HAdd.hAdd.{u3, u3, u3} B B B (instHAdd.{u3} B (AddZeroClass.toAdd.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))))) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) x) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) y))) (h₄ : forall (x : A) (y : A), Eq.{succ u3} B (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHom.toMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) h₂ h₃)) (HMul.hMul.{u2, u2, u2} A A A (instHMul.{u2} A (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2)) x y)) (HMul.hMul.{u3, u3, u3} B B B (instHMul.{u3} B (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4)) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHom.toMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) h₂ h₃)) x) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHom.toMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) h₂ h₃)) y))), Eq.{max (succ u2) (succ u3)} (DistribMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5) (DistribMulActionHomClass.toDistribMulActionHom.{u1, u2, u3, max u2 u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u3, u1, u2, u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 (NonUnitalAlgHom.instNonUnitalAlgHomClassNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) (NonUnitalAlgHom.mk.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) h₂ h₃) h₄)) (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) h₂ h₃)
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.coe_distrib_mul_action_hom_mk NonUnitalAlgHom.coe_distribMulActionHom_mkₓ'. -/
@[norm_cast]
theorem coe_distribMulActionHom_mk (f : A →ₙₐ[R] B) (h₁ h₂ h₃ h₄) :
    ((⟨f, h₁, h₂, h₃, h₄⟩ : A →ₙₐ[R] B) : A →+[R] B) = ⟨f, h₁, h₂, h₃⟩ :=
  by
  ext
  rfl
#align non_unital_alg_hom.coe_distrib_mul_action_hom_mk NonUnitalAlgHom.coe_distribMulActionHom_mk

/- warning: non_unital_alg_hom.coe_mul_hom_mk -> NonUnitalAlgHom.coe_mulHom_mk is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (h₁ : forall (m : R) (x : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (SMul.smul.{u1, u2} R A (SMulZeroClass.toHasSmul.{u1, u2} R A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)))) (DistribSMul.toSmulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) m x)) (SMul.smul.{u1, u3} R B (SMulZeroClass.toHasSmul.{u1, u3} R B (AddZeroClass.toHasZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)))) (DistribSMul.toSmulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) m (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x))) (h₂ : Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (OfNat.ofNat.{u2} A 0 (OfNat.mk.{u2} A 0 (Zero.zero.{u2} A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)))))))) (OfNat.ofNat.{u3} B 0 (OfNat.mk.{u3} B 0 (Zero.zero.{u3} B (AddZeroClass.toHasZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)))))))) (h₃ : forall (x : A) (y : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddZeroClass.toHasAdd.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))))) x y)) (HAdd.hAdd.{u3, u3, u3} B B B (instHAdd.{u3} B (AddZeroClass.toHasAdd.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))))) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f y))) (h₄ : forall (x : A) (y : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HMul.hMul.{u2, u2, u2} A A A (instHMul.{u2} A (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2))) x y)) (HMul.hMul.{u3, u3, u3} B B B (instHMul.{u3} B (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f y))), Eq.{max (succ u3) (succ u2)} (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u3) (succ u2)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u3) (succ u2)} a b] => self.0) (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (MulHom.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (MulHom.hasCoeT.{u2, u3, max u2 u3} A B (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4)) (NonUnitalAlgHomClass.toMulHomClass.{max u2 u3, u1, u2, u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 (NonUnitalAlgHom.nonUnitalAlgHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))))) (NonUnitalAlgHom.mk.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁ h₂ h₃ h₄)) (MulHom.mk.{u2, u3} A B (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2)) (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4)) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₄)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (h₁ : forall (m : R) (x : A), Eq.{succ u3} B (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HSMul.hSMul.{u1, u2, u2} R A A (instHSMul.{u1, u2} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3)))) m x)) (HSMul.hSMul.{u1, u3, u3} R B B (instHSMul.{u1, u3} R B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5)))) m (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x))) (h₂ : Eq.{succ u3} B (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) (OfNat.ofNat.{u2} A 0 (Zero.toOfNat0.{u2} A (AddZeroClass.toZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))))))) (OfNat.ofNat.{u3} B 0 (Zero.toOfNat0.{u3} B (AddZeroClass.toZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))))))) (h₃ : forall (x : A) (y : A), Eq.{succ u3} B (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddZeroClass.toAdd.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))))) x y)) (HAdd.hAdd.{u3, u3, u3} B B B (instHAdd.{u3} B (AddZeroClass.toAdd.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))))) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) x) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) y))) (h₄ : forall (x : A) (y : A), Eq.{succ u3} B (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHom.toMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) h₂ h₃)) (HMul.hMul.{u2, u2, u2} A A A (instHMul.{u2} A (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2)) x y)) (HMul.hMul.{u3, u3, u3} B B B (instHMul.{u3} B (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4)) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHom.toMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) h₂ h₃)) x) (MulActionHom.toFun.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (DistribMulActionHom.toMulActionHom.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) h₂ h₃)) y))), Eq.{max (succ u2) (succ u3)} (MulHom.{u2, u3} A B (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2) (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4)) (MulHomClass.toMulHom.{u2, u3, max u2 u3} A B (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2) (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4) (NonUnitalAlgHomClass.toMulHomClass.{max u2 u3, u1, u2, u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B _inst_1 _inst_2 _inst_4 _inst_3 _inst_5 (NonUnitalAlgHom.instNonUnitalAlgHomClassNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) (NonUnitalAlgHom.mk.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (DistribMulActionHom.mk.{u1, u2, u3} R _inst_1 A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3 B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5 (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₁) h₂ h₃) h₄)) (MulHom.mk.{u2, u3} A B (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2) (NonUnitalNonAssocSemiring.toMul.{u3} B _inst_4) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) h₄)
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.coe_mul_hom_mk NonUnitalAlgHom.coe_mulHom_mkₓ'. -/
@[norm_cast]
theorem coe_mulHom_mk (f : A →ₙₐ[R] B) (h₁ h₂ h₃ h₄) :
    ((⟨f, h₁, h₂, h₃, h₄⟩ : A →ₙₐ[R] B) : A →ₙ* B) = ⟨f, h₄⟩ :=
  by
  ext
  rfl
#align non_unital_alg_hom.coe_mul_hom_mk NonUnitalAlgHom.coe_mulHom_mk

/- warning: non_unital_alg_hom.map_smul -> NonUnitalAlgHom.map_smul is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (c : R) (x : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (SMul.smul.{u1, u2} R A (SMulZeroClass.toHasSmul.{u1, u2} R A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)))) (DistribSMul.toSmulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3))) c x)) (SMul.smul.{u1, u3} R B (SMulZeroClass.toHasSmul.{u1, u3} R B (AddZeroClass.toHasZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)))) (DistribSMul.toSmulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_5))) c (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (c : R) (x : A), Eq.{succ u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) (HSMul.hSMul.{u1, u2, u2} R A A (instHSMul.{u1, u2} R A (SMulZeroClass.toSMul.{u1, u2} R A (MulZeroClass.toZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A _inst_2)) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3)))) c x)) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HSMul.hSMul.{u1, u2, u2} R A A (instHSMul.{u1, u2} R A (SMulZeroClass.toSMul.{u1, u2} R A (MulZeroClass.toZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A _inst_2)) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))) (DistribMulAction.toDistribSMul.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) _inst_3)))) c x)) (HSMul.hSMul.{u1, u3, u3} R ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (instHSMul.{u1, u3} R ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (SMulZeroClass.toSMul.{u1, u3} R ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (MulZeroClass.toZero.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) _inst_4)) (DistribSMul.toSMulZeroClass.{u1, u3} R ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (AddMonoid.toAddZeroClass.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (AddCommMonoid.toAddMonoid.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) _inst_4))) (DistribMulAction.toDistribSMul.{u1, u3} R ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) _inst_1 (AddCommMonoid.toAddMonoid.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) _inst_4)) _inst_5)))) c (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.map_smul NonUnitalAlgHom.map_smulₓ'. -/
@[simp]
protected theorem map_smul (f : A →ₙₐ[R] B) (c : R) (x : A) : f (c • x) = c • f x :=
  map_smul _ _ _
#align non_unital_alg_hom.map_smul NonUnitalAlgHom.map_smul

/- warning: non_unital_alg_hom.map_add -> NonUnitalAlgHom.map_add is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (x : A) (y : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (Distrib.toHasAdd.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2))) x y)) (HAdd.hAdd.{u3, u3, u3} B B B (instHAdd.{u3} B (Distrib.toHasAdd.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f y))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (x : A) (y : A), Eq.{succ u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (Distrib.toAdd.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2))) x y)) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (Distrib.toAdd.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2))) x y)) (HAdd.hAdd.{u3, u3, u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) y) ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (instHAdd.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (Distrib.toAdd.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (NonUnitalNonAssocSemiring.toDistrib.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) _inst_4))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f y))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.map_add NonUnitalAlgHom.map_addₓ'. -/
@[simp]
protected theorem map_add (f : A →ₙₐ[R] B) (x y : A) : f (x + y) = f x + f y :=
  map_add _ _ _
#align non_unital_alg_hom.map_add NonUnitalAlgHom.map_add

/- warning: non_unital_alg_hom.map_mul -> NonUnitalAlgHom.map_mul is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (x : A) (y : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HMul.hMul.{u2, u2, u2} A A A (instHMul.{u2} A (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A _inst_2))) x y)) (HMul.hMul.{u3, u3, u3} B B B (instHMul.{u3} B (Distrib.toHasMul.{u3} B (NonUnitalNonAssocSemiring.toDistrib.{u3} B _inst_4))) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f y))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (x : A) (y : A), Eq.{succ u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) (HMul.hMul.{u2, u2, u2} A A A (instHMul.{u2} A (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2)) x y)) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (HMul.hMul.{u2, u2, u2} A A A (instHMul.{u2} A (NonUnitalNonAssocSemiring.toMul.{u2} A _inst_2)) x y)) (HMul.hMul.{u3, u3, u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) y) ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (instHMul.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) (NonUnitalNonAssocSemiring.toMul.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) x) _inst_4)) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f x) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f y))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.map_mul NonUnitalAlgHom.map_mulₓ'. -/
@[simp]
protected theorem map_mul (f : A →ₙₐ[R] B) (x y : A) : f (x * y) = f x * f y :=
  map_mul _ _ _
#align non_unital_alg_hom.map_mul NonUnitalAlgHom.map_mul

/- warning: non_unital_alg_hom.map_zero -> NonUnitalAlgHom.map_zero is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (OfNat.ofNat.{u2} A 0 (OfNat.mk.{u2} A 0 (Zero.zero.{u2} A (MulZeroClass.toHasZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A _inst_2)))))) (OfNat.ofNat.{u3} B 0 (OfNat.mk.{u3} B 0 (Zero.zero.{u3} B (MulZeroClass.toHasZero.{u3} B (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} B _inst_4)))))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{succ u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) (OfNat.ofNat.{u2} A 0 (Zero.toOfNat0.{u2} A (MulZeroClass.toZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A _inst_2))))) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f (OfNat.ofNat.{u2} A 0 (Zero.toOfNat0.{u2} A (MulZeroClass.toZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A _inst_2))))) (OfNat.ofNat.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) (OfNat.ofNat.{u2} A 0 (Zero.toOfNat0.{u2} A (MulZeroClass.toZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A _inst_2))))) 0 (Zero.toOfNat0.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) (OfNat.ofNat.{u2} A 0 (Zero.toOfNat0.{u2} A (MulZeroClass.toZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A _inst_2))))) (MulZeroClass.toZero.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) (OfNat.ofNat.{u2} A 0 (Zero.toOfNat0.{u2} A (MulZeroClass.toZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A _inst_2))))) (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) (OfNat.ofNat.{u2} A 0 (Zero.toOfNat0.{u2} A (MulZeroClass.toZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A _inst_2))))) _inst_4))))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.map_zero NonUnitalAlgHom.map_zeroₓ'. -/
@[simp]
protected theorem map_zero (f : A →ₙₐ[R] B) : f 0 = 0 :=
  map_zero _
#align non_unital_alg_hom.map_zero NonUnitalAlgHom.map_zero

instance : Zero (A →ₙₐ[R] B) :=
  ⟨{ (0 : A →+[R] B) with map_mul' := by simp }⟩

instance : One (A →ₙₐ[R] A) :=
  ⟨{ (1 : A →+[R] A) with map_mul' := by simp }⟩

/- warning: non_unital_alg_hom.coe_zero -> NonUnitalAlgHom.coe_zero is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], Eq.{max (succ u2) (succ u3)} ((fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (OfNat.ofNat.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) 0 (OfNat.mk.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) 0 (Zero.zero.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.hasZero.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))))) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (OfNat.ofNat.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) 0 (OfNat.mk.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) 0 (Zero.zero.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.hasZero.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))))) (OfNat.ofNat.{max u2 u3} ((fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (Zero.zero.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.hasZero.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))) 0 (OfNat.mk.{max u2 u3} ((fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (Zero.zero.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.hasZero.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))) 0 (Zero.zero.{max u2 u3} ((fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (Zero.zero.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.hasZero.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))) (Pi.instZero.{u2, u3} A (fun (ᾰ : A) => B) (fun (i : A) => MulZeroClass.toHasZero.{u3} B (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} B _inst_4))))))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], Eq.{max (succ u2) (succ u3)} (forall (a : A), (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (OfNat.ofNat.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) 0 (Zero.toOfNat0.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.instZeroNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)))) (OfNat.ofNat.{max u2 u3} (forall (a : A), (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) 0 (Zero.toOfNat0.{max u2 u3} (forall (a : A), (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (Pi.instZero.{u2, u3} A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (fun (i : A) => MulZeroClass.toZero.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) i) (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) i) _inst_4)))))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.coe_zero NonUnitalAlgHom.coe_zeroₓ'. -/
@[simp]
theorem coe_zero : ((0 : A →ₙₐ[R] B) : A → B) = 0 :=
  rfl
#align non_unital_alg_hom.coe_zero NonUnitalAlgHom.coe_zero

/- warning: non_unital_alg_hom.coe_one -> NonUnitalAlgHom.coe_one is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))], Eq.{succ u2} ((fun (_x : NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) => A -> A) (OfNat.ofNat.{u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) 1 (OfNat.mk.{u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) 1 (One.one.{u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) (NonUnitalAlgHom.hasOne.{u1, u2} R A _inst_1 _inst_2 _inst_3))))) (coeFn.{succ u2, succ u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) (fun (_x : NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) => A -> A) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) (OfNat.ofNat.{u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) 1 (OfNat.mk.{u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) 1 (One.one.{u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) (NonUnitalAlgHom.hasOne.{u1, u2} R A _inst_1 _inst_2 _inst_3))))) (id.{succ u2} A)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))], Eq.{succ u2} (forall (a : A), (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => A) a) (FunLike.coe.{succ u2, succ u2, succ u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => A) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) (OfNat.ofNat.{u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) 1 (One.toOfNat1.{u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) (NonUnitalAlgHom.instOneNonUnitalAlgHom.{u1, u2} R A _inst_1 _inst_2 _inst_3)))) (id.{succ u2} A)
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.coe_one NonUnitalAlgHom.coe_oneₓ'. -/
@[simp]
theorem coe_one : ((1 : A →ₙₐ[R] A) : A → A) = id :=
  rfl
#align non_unital_alg_hom.coe_one NonUnitalAlgHom.coe_one

/- warning: non_unital_alg_hom.zero_apply -> NonUnitalAlgHom.zero_apply is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (a : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (OfNat.ofNat.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) 0 (OfNat.mk.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) 0 (Zero.zero.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.hasZero.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)))) a) (OfNat.ofNat.{u3} B 0 (OfNat.mk.{u3} B 0 (Zero.zero.{u3} B (MulZeroClass.toHasZero.{u3} B (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} B _inst_4)))))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (a : A), Eq.{succ u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (OfNat.ofNat.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) 0 (Zero.toOfNat0.{max u2 u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.instZeroNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))) a) (OfNat.ofNat.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) 0 (Zero.toOfNat0.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (MulZeroClass.toZero.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) _inst_4))))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.zero_apply NonUnitalAlgHom.zero_applyₓ'. -/
theorem zero_apply (a : A) : (0 : A →ₙₐ[R] B) a = 0 :=
  rfl
#align non_unital_alg_hom.zero_apply NonUnitalAlgHom.zero_apply

/- warning: non_unital_alg_hom.one_apply -> NonUnitalAlgHom.one_apply is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] (a : A), Eq.{succ u2} A (coeFn.{succ u2, succ u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) (fun (_x : NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) => A -> A) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) (OfNat.ofNat.{u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) 1 (OfNat.mk.{u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) 1 (One.one.{u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) (NonUnitalAlgHom.hasOne.{u1, u2} R A _inst_1 _inst_2 _inst_3)))) a) a
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] (a : A), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => A) a) (FunLike.coe.{succ u2, succ u2, succ u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => A) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) (OfNat.ofNat.{u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) 1 (One.toOfNat1.{u2} (NonUnitalAlgHom.{u1, u2, u2} R A A _inst_1 _inst_2 _inst_3 _inst_2 _inst_3) (NonUnitalAlgHom.instOneNonUnitalAlgHom.{u1, u2} R A _inst_1 _inst_2 _inst_3))) a) a
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.one_apply NonUnitalAlgHom.one_applyₓ'. -/
theorem one_apply (a : A) : (1 : A →ₙₐ[R] A) a = a :=
  rfl
#align non_unital_alg_hom.one_apply NonUnitalAlgHom.one_apply

instance : Inhabited (A →ₙₐ[R] B) :=
  ⟨0⟩

#print NonUnitalAlgHom.comp /-
/-- The composition of morphisms is a morphism. -/
def comp (f : B →ₙₐ[R] C) (g : A →ₙₐ[R] B) : A →ₙₐ[R] C :=
  { (f : B →ₙ* C).comp (g : A →ₙ* B), (f : B →+[R] C).comp (g : A →+[R] B) with }
#align non_unital_alg_hom.comp NonUnitalAlgHom.comp
-/

/- warning: non_unital_alg_hom.coe_comp -> NonUnitalAlgHom.coe_comp is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} {C : Type.{u4}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] [_inst_6 : NonUnitalNonAssocSemiring.{u4} C] [_inst_7 : DistribMulAction.{u1, u4} R C _inst_1 (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6))] (f : NonUnitalAlgHom.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) (g : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{max (succ u2) (succ u4)} ((fun (_x : NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) => A -> C) (NonUnitalAlgHom.comp.{u1, u2, u3, u4} R A B C _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 f g)) (coeFn.{max (succ u2) (succ u4), max (succ u2) (succ u4)} (NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) (fun (_x : NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) => A -> C) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) (NonUnitalAlgHom.comp.{u1, u2, u3, u4} R A B C _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 f g)) (Function.comp.{succ u2, succ u3, succ u4} A B C (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (NonUnitalAlgHom.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) (fun (_x : NonUnitalAlgHom.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) => B -> C) (NonUnitalAlgHom.hasCoeToFun.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) f) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) g))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} {C : Type.{u4}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] [_inst_6 : NonUnitalNonAssocSemiring.{u4} C] [_inst_7 : DistribMulAction.{u1, u4} R C _inst_1 (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6))] (f : NonUnitalAlgHom.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) (g : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{max (succ u2) (succ u4)} (forall (a : A), (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => C) a) (FunLike.coe.{max (succ u2) (succ u4), succ u2, succ u4} (NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => C) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) (NonUnitalAlgHom.comp.{u1, u2, u3, u4} R A B C _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 f g)) (Function.comp.{succ u2, succ u3, succ u4} A B C (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (NonUnitalAlgHom.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) B (fun (_x : B) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : B) => C) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) f) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) g))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.coe_comp NonUnitalAlgHom.coe_compₓ'. -/
@[simp, norm_cast]
theorem coe_comp (f : B →ₙₐ[R] C) (g : A →ₙₐ[R] B) :
    (f.comp g : A → C) = (f : B → C) ∘ (g : A → B) :=
  rfl
#align non_unital_alg_hom.coe_comp NonUnitalAlgHom.coe_comp

/- warning: non_unital_alg_hom.comp_apply -> NonUnitalAlgHom.comp_apply is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} {C : Type.{u4}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] [_inst_6 : NonUnitalNonAssocSemiring.{u4} C] [_inst_7 : DistribMulAction.{u1, u4} R C _inst_1 (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6))] (f : NonUnitalAlgHom.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) (g : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (x : A), Eq.{succ u4} C (coeFn.{max (succ u2) (succ u4), max (succ u2) (succ u4)} (NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) (fun (_x : NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) => A -> C) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) (NonUnitalAlgHom.comp.{u1, u2, u3, u4} R A B C _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 f g) x) (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (NonUnitalAlgHom.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) (fun (_x : NonUnitalAlgHom.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) => B -> C) (NonUnitalAlgHom.hasCoeToFun.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) f (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) g x))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} {C : Type.{u4}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] [_inst_6 : NonUnitalNonAssocSemiring.{u4} C] [_inst_7 : DistribMulAction.{u1, u4} R C _inst_1 (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6))] (f : NonUnitalAlgHom.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) (g : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (x : A), Eq.{succ u4} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => C) x) (FunLike.coe.{max (succ u2) (succ u4), succ u2, succ u4} (NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => C) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) (NonUnitalAlgHom.comp.{u1, u2, u3, u4} R A B C _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 f g) x) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (NonUnitalAlgHom.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) B (fun (_x : B) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : B) => C) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u3, u4} R B C _inst_1 _inst_4 _inst_5 _inst_6 _inst_7) f (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) g x))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.comp_apply NonUnitalAlgHom.comp_applyₓ'. -/
theorem comp_apply (f : B →ₙₐ[R] C) (g : A →ₙₐ[R] B) (x : A) : f.comp g x = f (g x) :=
  rfl
#align non_unital_alg_hom.comp_apply NonUnitalAlgHom.comp_apply

/- warning: non_unital_alg_hom.inverse -> NonUnitalAlgHom.inverse is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (g : B -> A), (Function.LeftInverse.{succ u2, succ u3} A B g (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f)) -> (Function.RightInverse.{succ u2, succ u3} A B g (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f)) -> (NonUnitalAlgHom.{u1, u3, u2} R B A _inst_1 _inst_4 _inst_5 _inst_2 _inst_3)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (g : B -> A), (Function.LeftInverse.{succ u2, succ u3} A B g (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f)) -> (Function.RightInverse.{succ u2, succ u3} A B g (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f)) -> (NonUnitalAlgHom.{u1, u3, u2} R B A _inst_1 _inst_4 _inst_5 _inst_2 _inst_3)
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.inverse NonUnitalAlgHom.inverseₓ'. -/
/-- The inverse of a bijective morphism is a morphism. -/
def inverse (f : A →ₙₐ[R] B) (g : B → A) (h₁ : Function.LeftInverse g f)
    (h₂ : Function.RightInverse g f) : B →ₙₐ[R] A :=
  { (f : A →ₙ* B).inverse g h₁ h₂, (f : A →+[R] B).inverse g h₁ h₂ with }
#align non_unital_alg_hom.inverse NonUnitalAlgHom.inverse

/- warning: non_unital_alg_hom.coe_inverse -> NonUnitalAlgHom.coe_inverse is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (g : B -> A) (h₁ : Function.LeftInverse.{succ u2, succ u3} A B g (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f)) (h₂ : Function.RightInverse.{succ u2, succ u3} A B g (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f)), Eq.{max (succ u3) (succ u2)} ((fun (_x : NonUnitalAlgHom.{u1, u3, u2} R B A _inst_1 _inst_4 _inst_5 _inst_2 _inst_3) => B -> A) (NonUnitalAlgHom.inverse.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 f g h₁ h₂)) (coeFn.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, u3, u2} R B A _inst_1 _inst_4 _inst_5 _inst_2 _inst_3) (fun (_x : NonUnitalAlgHom.{u1, u3, u2} R B A _inst_1 _inst_4 _inst_5 _inst_2 _inst_3) => B -> A) (NonUnitalAlgHom.hasCoeToFun.{u1, u3, u2} R B A _inst_1 _inst_4 _inst_5 _inst_2 _inst_3) (NonUnitalAlgHom.inverse.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 f g h₁ h₂)) g
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (g : B -> A) (h₁ : Function.LeftInverse.{succ u2, succ u3} A B g (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f)) (h₂ : Function.RightInverse.{succ u2, succ u3} A B g (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f)), Eq.{max (succ u2) (succ u3)} (forall (a : B), (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : B) => A) a) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (NonUnitalAlgHom.{u1, u3, u2} R B A _inst_1 _inst_4 _inst_5 _inst_2 _inst_3) B (fun (_x : B) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : B) => A) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u3, u2} R B A _inst_1 _inst_4 _inst_5 _inst_2 _inst_3) (NonUnitalAlgHom.inverse.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 f g h₁ h₂)) g
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.coe_inverse NonUnitalAlgHom.coe_inverseₓ'. -/
@[simp]
theorem coe_inverse (f : A →ₙₐ[R] B) (g : B → A) (h₁ : Function.LeftInverse g f)
    (h₂ : Function.RightInverse g f) : (inverse f g h₁ h₂ : B → A) = g :=
  rfl
#align non_unital_alg_hom.coe_inverse NonUnitalAlgHom.coe_inverse

/-! ### Operations on the product type

Note that much of this is copied from [`linear_algebra/prod`](../../linear_algebra/prod). -/

section Prod

variable (R A B)

/- warning: non_unital_alg_hom.fst -> NonUnitalAlgHom.fst is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (A : Type.{u2}) (B : Type.{u3}) [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], NonUnitalAlgHom.{u1, max u2 u3, u2} R (Prod.{u2, u3} A B) A _inst_1 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5) _inst_2 _inst_3
but is expected to have type
  forall (R : Type.{u1}) (A : Type.{u2}) (B : Type.{u3}) [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], NonUnitalAlgHom.{u1, max u3 u2, u2} R (Prod.{u2, u3} A B) A _inst_1 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5) _inst_2 _inst_3
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.fst NonUnitalAlgHom.fstₓ'. -/
/-- The first projection of a product is a non-unital alg_hom. -/
@[simps]
def fst : A × B →ₙₐ[R] A where
  toFun := Prod.fst
  map_zero' := rfl
  map_add' x y := rfl
  map_smul' x y := rfl
  map_mul' x y := rfl
#align non_unital_alg_hom.fst NonUnitalAlgHom.fst

/- warning: non_unital_alg_hom.snd -> NonUnitalAlgHom.snd is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (A : Type.{u2}) (B : Type.{u3}) [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], NonUnitalAlgHom.{u1, max u2 u3, u3} R (Prod.{u2, u3} A B) B _inst_1 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5) _inst_4 _inst_5
but is expected to have type
  forall (R : Type.{u1}) (A : Type.{u2}) (B : Type.{u3}) [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], NonUnitalAlgHom.{u1, max u3 u2, u3} R (Prod.{u2, u3} A B) B _inst_1 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5) _inst_4 _inst_5
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.snd NonUnitalAlgHom.sndₓ'. -/
/-- The second projection of a product is a non-unital alg_hom. -/
@[simps]
def snd : A × B →ₙₐ[R] B where
  toFun := Prod.snd
  map_zero' := rfl
  map_add' x y := rfl
  map_smul' x y := rfl
  map_mul' x y := rfl
#align non_unital_alg_hom.snd NonUnitalAlgHom.snd

variable {R A B}

/- warning: non_unital_alg_hom.prod -> NonUnitalAlgHom.prod is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} {C : Type.{u4}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] [_inst_6 : NonUnitalNonAssocSemiring.{u4} C] [_inst_7 : DistribMulAction.{u1, u4} R C _inst_1 (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6))], (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) -> (NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) -> (NonUnitalAlgHom.{u1, u2, max u3 u4} R A (Prod.{u3, u4} B C) _inst_1 _inst_2 _inst_3 (Prod.nonUnitalNonAssocSemiring.{u3, u4} B C _inst_4 _inst_6) (Prod.distribMulAction.{u1, u3, u4} R B C _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6)) _inst_5 _inst_7))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} {C : Type.{u4}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] [_inst_6 : NonUnitalNonAssocSemiring.{u4} C] [_inst_7 : DistribMulAction.{u1, u4} R C _inst_1 (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6))], (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) -> (NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) -> (NonUnitalAlgHom.{u1, u2, max u4 u3} R A (Prod.{u3, u4} B C) _inst_1 _inst_2 _inst_3 (Prod.instNonUnitalNonAssocSemiringProd.{u3, u4} B C _inst_4 _inst_6) (Prod.distribMulAction.{u1, u3, u4} R B C _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6)) _inst_5 _inst_7))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.prod NonUnitalAlgHom.prodₓ'. -/
/-- The prod of two morphisms is a morphism. -/
@[simps]
def prod (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) : A →ₙₐ[R] B × C
    where
  toFun := Pi.prod f g
  map_zero' := by simp only [Pi.prod, Prod.zero_eq_mk, map_zero]
  map_add' x y := by simp only [Pi.prod, Prod.mk_add_mk, map_add]
  map_mul' x y := by simp only [Pi.prod, Prod.mk_mul_mk, map_mul]
  map_smul' c x := by simp only [Pi.prod, Prod.smul_mk, map_smul, RingHom.id_apply]
#align non_unital_alg_hom.prod NonUnitalAlgHom.prod

/- warning: non_unital_alg_hom.coe_prod -> NonUnitalAlgHom.coe_prod is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} {C : Type.{u4}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] [_inst_6 : NonUnitalNonAssocSemiring.{u4} C] [_inst_7 : DistribMulAction.{u1, u4} R C _inst_1 (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (g : NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7), Eq.{max (succ u2) (succ (max u3 u4))} (A -> (Prod.{u3, u4} B C)) (coeFn.{max (succ u2) (succ (max u3 u4)), max (succ u2) (succ (max u3 u4))} (NonUnitalAlgHom.{u1, u2, max u3 u4} R A (Prod.{u3, u4} B C) _inst_1 _inst_2 _inst_3 (Prod.nonUnitalNonAssocSemiring.{u3, u4} B C _inst_4 _inst_6) (Prod.distribMulAction.{u1, u3, u4} R B C _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6)) _inst_5 _inst_7)) (fun (_x : NonUnitalAlgHom.{u1, u2, max u3 u4} R A (Prod.{u3, u4} B C) _inst_1 _inst_2 _inst_3 (Prod.nonUnitalNonAssocSemiring.{u3, u4} B C _inst_4 _inst_6) (Prod.distribMulAction.{u1, u3, u4} R B C _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6)) _inst_5 _inst_7)) => A -> (Prod.{u3, u4} B C)) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, max u3 u4} R A (Prod.{u3, u4} B C) _inst_1 _inst_2 _inst_3 (Prod.nonUnitalNonAssocSemiring.{u3, u4} B C _inst_4 _inst_6) (Prod.distribMulAction.{u1, u3, u4} R B C _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6)) _inst_5 _inst_7)) (NonUnitalAlgHom.prod.{u1, u2, u3, u4} R A B C _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 f g)) (Pi.prod.{u2, u3, u4} A (fun (ᾰ : A) => B) (fun (ᾰ : A) => C) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) (coeFn.{max (succ u2) (succ u4), max (succ u2) (succ u4)} (NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) (fun (_x : NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) => A -> C) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) g))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} {C : Type.{u4}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] [_inst_6 : NonUnitalNonAssocSemiring.{u4} C] [_inst_7 : DistribMulAction.{u1, u4} R C _inst_1 (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6))] (f : NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (g : NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7), Eq.{max (max (succ u2) (succ u3)) (succ u4)} (forall (ᾰ : A), (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => Prod.{u3, u4} B C) ᾰ) (FunLike.coe.{max (max (succ u2) (succ u3)) (succ u4), succ u2, max (succ u3) (succ u4)} (NonUnitalAlgHom.{u1, u2, max u4 u3} R A (Prod.{u3, u4} B C) _inst_1 _inst_2 _inst_3 (Prod.instNonUnitalNonAssocSemiringProd.{u3, u4} B C _inst_4 _inst_6) (Prod.distribMulAction.{u1, u3, u4} R B C _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6)) _inst_5 _inst_7)) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => Prod.{u3, u4} B C) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, max u3 u4} R A (Prod.{u3, u4} B C) _inst_1 _inst_2 _inst_3 (Prod.instNonUnitalNonAssocSemiringProd.{u3, u4} B C _inst_4 _inst_6) (Prod.distribMulAction.{u1, u3, u4} R B C _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6)) _inst_5 _inst_7)) (NonUnitalAlgHom.prod.{u1, u2, u3, u4} R A B C _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 f g)) (Pi.prod.{u2, u3, u4} A (fun (ᾰ : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) ᾰ) (fun (ᾰ : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => C) ᾰ) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f) (FunLike.coe.{max (succ u2) (succ u4), succ u2, succ u4} (NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => C) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7) g))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.coe_prod NonUnitalAlgHom.coe_prodₓ'. -/
theorem coe_prod (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) : ⇑(f.Prod g) = Pi.prod f g :=
  rfl
#align non_unital_alg_hom.coe_prod NonUnitalAlgHom.coe_prod

#print NonUnitalAlgHom.fst_prod /-
@[simp]
theorem fst_prod (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) : (fst R B C).comp (prod f g) = f := by
  ext <;> rfl
#align non_unital_alg_hom.fst_prod NonUnitalAlgHom.fst_prod
-/

#print NonUnitalAlgHom.snd_prod /-
@[simp]
theorem snd_prod (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) : (snd R B C).comp (prod f g) = g := by
  ext <;> rfl
#align non_unital_alg_hom.snd_prod NonUnitalAlgHom.snd_prod
-/

/- warning: non_unital_alg_hom.prod_fst_snd -> NonUnitalAlgHom.prod_fst_snd is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], Eq.{succ (max u2 u3)} (NonUnitalAlgHom.{u1, max u2 u3, max u2 u3} R (Prod.{u2, u3} A B) (Prod.{u2, u3} A B) _inst_1 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5) (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (NonUnitalAlgHom.prod.{u1, max u2 u3, u2, u3} R (Prod.{u2, u3} A B) A B _inst_1 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5) _inst_2 _inst_3 _inst_4 _inst_5 (NonUnitalAlgHom.fst.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.snd.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) (OfNat.ofNat.{max u2 u3} (NonUnitalAlgHom.{u1, max u2 u3, max u2 u3} R (Prod.{u2, u3} A B) (Prod.{u2, u3} A B) _inst_1 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5) (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) 1 (OfNat.mk.{max u2 u3} (NonUnitalAlgHom.{u1, max u2 u3, max u2 u3} R (Prod.{u2, u3} A B) (Prod.{u2, u3} A B) _inst_1 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5) (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) 1 (One.one.{max u2 u3} (NonUnitalAlgHom.{u1, max u2 u3, max u2 u3} R (Prod.{u2, u3} A B) (Prod.{u2, u3} A B) _inst_1 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5) (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (NonUnitalAlgHom.hasOne.{u1, max u2 u3} R (Prod.{u2, u3} A B) _inst_1 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)))))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], Eq.{max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, max u2 u3, max u3 u2} R (Prod.{u2, u3} A B) (Prod.{u2, u3} A B) _inst_1 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5) (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (NonUnitalAlgHom.prod.{u1, max u2 u3, u2, u3} R (Prod.{u2, u3} A B) A B _inst_1 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5) _inst_2 _inst_3 _inst_4 _inst_5 (NonUnitalAlgHom.fst.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.snd.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) (OfNat.ofNat.{max u2 u3} (NonUnitalAlgHom.{u1, max u2 u3, max u3 u2} R (Prod.{u2, u3} A B) (Prod.{u2, u3} A B) _inst_1 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5) (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) 1 (One.toOfNat1.{max u2 u3} (NonUnitalAlgHom.{u1, max u2 u3, max u3 u2} R (Prod.{u2, u3} A B) (Prod.{u2, u3} A B) _inst_1 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5) (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (NonUnitalAlgHom.instOneNonUnitalAlgHom.{u1, max u2 u3} R (Prod.{u2, u3} A B) _inst_1 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5))))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.prod_fst_snd NonUnitalAlgHom.prod_fst_sndₓ'. -/
@[simp]
theorem prod_fst_snd : prod (fst R A B) (snd R A B) = 1 :=
  coe_injective Pi.prod_fst_snd
#align non_unital_alg_hom.prod_fst_snd NonUnitalAlgHom.prod_fst_snd

/- warning: non_unital_alg_hom.prod_equiv -> NonUnitalAlgHom.prodEquiv is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} {C : Type.{u4}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] [_inst_6 : NonUnitalNonAssocSemiring.{u4} C] [_inst_7 : DistribMulAction.{u1, u4} R C _inst_1 (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6))], Equiv.{max (succ (max u2 u3)) (succ (max u2 u4)), max (succ u2) (succ (max u3 u4))} (Prod.{max u2 u3, max u2 u4} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7)) (NonUnitalAlgHom.{u1, u2, max u3 u4} R A (Prod.{u3, u4} B C) _inst_1 _inst_2 _inst_3 (Prod.nonUnitalNonAssocSemiring.{u3, u4} B C _inst_4 _inst_6) (Prod.distribMulAction.{u1, u3, u4} R B C _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6)) _inst_5 _inst_7))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} {C : Type.{u4}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] [_inst_6 : NonUnitalNonAssocSemiring.{u4} C] [_inst_7 : DistribMulAction.{u1, u4} R C _inst_1 (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6))], Equiv.{max (succ (max u4 u2)) (succ (max u3 u2)), max (succ (max u4 u3)) (succ u2)} (Prod.{max u3 u2, max u4 u2} (NonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.{u1, u2, u4} R A C _inst_1 _inst_2 _inst_3 _inst_6 _inst_7)) (NonUnitalAlgHom.{u1, u2, max u4 u3} R A (Prod.{u3, u4} B C) _inst_1 _inst_2 _inst_3 (Prod.instNonUnitalNonAssocSemiringProd.{u3, u4} B C _inst_4 _inst_6) (Prod.distribMulAction.{u1, u3, u4} R B C _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) (AddCommMonoid.toAddMonoid.{u4} C (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} C _inst_6)) _inst_5 _inst_7))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.prod_equiv NonUnitalAlgHom.prodEquivₓ'. -/
/-- Taking the product of two maps with the same domain is equivalent to taking the product of
their codomains. -/
@[simps]
def prodEquiv : (A →ₙₐ[R] B) × (A →ₙₐ[R] C) ≃ (A →ₙₐ[R] B × C)
    where
  toFun f := f.1.Prod f.2
  invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)
  left_inv f := by ext <;> rfl
  right_inv f := by ext <;> rfl
#align non_unital_alg_hom.prod_equiv NonUnitalAlgHom.prodEquiv

variable (R A B)

/- warning: non_unital_alg_hom.inl -> NonUnitalAlgHom.inl is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (A : Type.{u2}) (B : Type.{u3}) [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], NonUnitalAlgHom.{u1, u2, max u2 u3} R A (Prod.{u2, u3} A B) _inst_1 _inst_2 _inst_3 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)
but is expected to have type
  forall (R : Type.{u1}) (A : Type.{u2}) (B : Type.{u3}) [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], NonUnitalAlgHom.{u1, u2, max u3 u2} R A (Prod.{u2, u3} A B) _inst_1 _inst_2 _inst_3 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.inl NonUnitalAlgHom.inlₓ'. -/
/-- The left injection into a product is a non-unital algebra homomorphism. -/
def inl : A →ₙₐ[R] A × B :=
  prod 1 0
#align non_unital_alg_hom.inl NonUnitalAlgHom.inl

/- warning: non_unital_alg_hom.inr -> NonUnitalAlgHom.inr is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (A : Type.{u2}) (B : Type.{u3}) [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], NonUnitalAlgHom.{u1, u3, max u2 u3} R B (Prod.{u2, u3} A B) _inst_1 _inst_4 _inst_5 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)
but is expected to have type
  forall (R : Type.{u1}) (A : Type.{u2}) (B : Type.{u3}) [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], NonUnitalAlgHom.{u1, u3, max u3 u2} R B (Prod.{u2, u3} A B) _inst_1 _inst_4 _inst_5 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.inr NonUnitalAlgHom.inrₓ'. -/
/-- The right injection into a product is a non-unital algebra homomorphism. -/
def inr : B →ₙₐ[R] A × B :=
  prod 0 1
#align non_unital_alg_hom.inr NonUnitalAlgHom.inr

variable {R A B}

/- warning: non_unital_alg_hom.coe_inl -> NonUnitalAlgHom.coe_inl is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], Eq.{max (succ u2) (succ u3)} ((fun (_x : NonUnitalAlgHom.{u1, u2, max u2 u3} R A (Prod.{u2, u3} A B) _inst_1 _inst_2 _inst_3 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) => A -> (Prod.{u2, u3} A B)) (NonUnitalAlgHom.inl.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) (coeFn.{max (succ u2) (succ (max u2 u3)), max (succ u2) (succ (max u2 u3))} (NonUnitalAlgHom.{u1, u2, max u2 u3} R A (Prod.{u2, u3} A B) _inst_1 _inst_2 _inst_3 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (fun (_x : NonUnitalAlgHom.{u1, u2, max u2 u3} R A (Prod.{u2, u3} A B) _inst_1 _inst_2 _inst_3 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) => A -> (Prod.{u2, u3} A B)) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, max u2 u3} R A (Prod.{u2, u3} A B) _inst_1 _inst_2 _inst_3 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (NonUnitalAlgHom.inl.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) (fun (x : A) => Prod.mk.{u2, u3} A B x (OfNat.ofNat.{u3} B 0 (OfNat.mk.{u3} B 0 (Zero.zero.{u3} B (MulZeroClass.toHasZero.{u3} B (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} B _inst_4))))))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], Eq.{max (succ u2) (succ u3)} (forall (a : A), (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => Prod.{u2, u3} A B) a) (FunLike.coe.{max (succ u2) (succ u3), succ u2, max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, max u3 u2} R A (Prod.{u2, u3} A B) _inst_1 _inst_2 _inst_3 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => Prod.{u2, u3} A B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, max u2 u3} R A (Prod.{u2, u3} A B) _inst_1 _inst_2 _inst_3 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (NonUnitalAlgHom.inl.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) (fun (x : A) => Prod.mk.{u2, u3} A B x (OfNat.ofNat.{u3} B 0 (Zero.toOfNat0.{u3} B (MulZeroClass.toZero.{u3} B (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} B _inst_4)))))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.coe_inl NonUnitalAlgHom.coe_inlₓ'. -/
@[simp]
theorem coe_inl : (inl R A B : A → A × B) = fun x => (x, 0) :=
  rfl
#align non_unital_alg_hom.coe_inl NonUnitalAlgHom.coe_inl

/- warning: non_unital_alg_hom.inl_apply -> NonUnitalAlgHom.inl_apply is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (x : A), Eq.{max (succ u2) (succ u3)} (Prod.{u2, u3} A B) (coeFn.{max (succ u2) (succ (max u2 u3)), max (succ u2) (succ (max u2 u3))} (NonUnitalAlgHom.{u1, u2, max u2 u3} R A (Prod.{u2, u3} A B) _inst_1 _inst_2 _inst_3 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (fun (_x : NonUnitalAlgHom.{u1, u2, max u2 u3} R A (Prod.{u2, u3} A B) _inst_1 _inst_2 _inst_3 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) => A -> (Prod.{u2, u3} A B)) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, max u2 u3} R A (Prod.{u2, u3} A B) _inst_1 _inst_2 _inst_3 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (NonUnitalAlgHom.inl.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) x) (Prod.mk.{u2, u3} A B x (OfNat.ofNat.{u3} B 0 (OfNat.mk.{u3} B 0 (Zero.zero.{u3} B (MulZeroClass.toHasZero.{u3} B (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} B _inst_4))))))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (x : A), Eq.{max (succ u2) (succ u3)} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => Prod.{u2, u3} A B) x) (FunLike.coe.{max (succ u2) (succ u3), succ u2, max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, max u3 u2} R A (Prod.{u2, u3} A B) _inst_1 _inst_2 _inst_3 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => Prod.{u2, u3} A B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, max u2 u3} R A (Prod.{u2, u3} A B) _inst_1 _inst_2 _inst_3 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (NonUnitalAlgHom.inl.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) x) (Prod.mk.{u2, u3} A B x (OfNat.ofNat.{u3} B 0 (Zero.toOfNat0.{u3} B (MulZeroClass.toZero.{u3} B (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} B _inst_4)))))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.inl_apply NonUnitalAlgHom.inl_applyₓ'. -/
theorem inl_apply (x : A) : inl R A B x = (x, 0) :=
  rfl
#align non_unital_alg_hom.inl_apply NonUnitalAlgHom.inl_apply

/- warning: non_unital_alg_hom.coe_inr -> NonUnitalAlgHom.coe_inr is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], Eq.{max (succ u2) (succ u3)} ((fun (_x : NonUnitalAlgHom.{u1, u3, max u2 u3} R B (Prod.{u2, u3} A B) _inst_1 _inst_4 _inst_5 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) => B -> (Prod.{u2, u3} A B)) (NonUnitalAlgHom.inr.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) (coeFn.{max (succ u3) (succ (max u2 u3)), max (succ u3) (succ (max u2 u3))} (NonUnitalAlgHom.{u1, u3, max u2 u3} R B (Prod.{u2, u3} A B) _inst_1 _inst_4 _inst_5 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (fun (_x : NonUnitalAlgHom.{u1, u3, max u2 u3} R B (Prod.{u2, u3} A B) _inst_1 _inst_4 _inst_5 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) => B -> (Prod.{u2, u3} A B)) (NonUnitalAlgHom.hasCoeToFun.{u1, u3, max u2 u3} R B (Prod.{u2, u3} A B) _inst_1 _inst_4 _inst_5 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (NonUnitalAlgHom.inr.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) (Prod.mk.{u2, u3} A B (OfNat.ofNat.{u2} A 0 (OfNat.mk.{u2} A 0 (Zero.zero.{u2} A (MulZeroClass.toHasZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A _inst_2))))))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))], Eq.{max (succ u2) (succ u3)} (forall (a : B), (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : B) => Prod.{u2, u3} A B) a) (FunLike.coe.{max (succ u2) (succ u3), succ u3, max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u3, max u3 u2} R B (Prod.{u2, u3} A B) _inst_1 _inst_4 _inst_5 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) B (fun (_x : B) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : B) => Prod.{u2, u3} A B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u3, max u2 u3} R B (Prod.{u2, u3} A B) _inst_1 _inst_4 _inst_5 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (NonUnitalAlgHom.inr.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) (Prod.mk.{u2, u3} A B (OfNat.ofNat.{u2} A 0 (Zero.toOfNat0.{u2} A (MulZeroClass.toZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A _inst_2)))))
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.coe_inr NonUnitalAlgHom.coe_inrₓ'. -/
@[simp]
theorem coe_inr : (inr R A B : B → A × B) = Prod.mk 0 :=
  rfl
#align non_unital_alg_hom.coe_inr NonUnitalAlgHom.coe_inr

/- warning: non_unital_alg_hom.inr_apply -> NonUnitalAlgHom.inr_apply is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (x : B), Eq.{max (succ u2) (succ u3)} (Prod.{u2, u3} A B) (coeFn.{max (succ u3) (succ (max u2 u3)), max (succ u3) (succ (max u2 u3))} (NonUnitalAlgHom.{u1, u3, max u2 u3} R B (Prod.{u2, u3} A B) _inst_1 _inst_4 _inst_5 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (fun (_x : NonUnitalAlgHom.{u1, u3, max u2 u3} R B (Prod.{u2, u3} A B) _inst_1 _inst_4 _inst_5 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) => B -> (Prod.{u2, u3} A B)) (NonUnitalAlgHom.hasCoeToFun.{u1, u3, max u2 u3} R B (Prod.{u2, u3} A B) _inst_1 _inst_4 _inst_5 (Prod.nonUnitalNonAssocSemiring.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (NonUnitalAlgHom.inr.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) x) (Prod.mk.{u2, u3} A B (OfNat.ofNat.{u2} A 0 (OfNat.mk.{u2} A 0 (Zero.zero.{u2} A (MulZeroClass.toHasZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A _inst_2))))) x)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : Monoid.{u1} R] [_inst_2 : NonUnitalNonAssocSemiring.{u2} A] [_inst_3 : DistribMulAction.{u1, u2} R A _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2))] [_inst_4 : NonUnitalNonAssocSemiring.{u3} B] [_inst_5 : DistribMulAction.{u1, u3} R B _inst_1 (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4))] (x : B), Eq.{max (succ u2) (succ u3)} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : B) => Prod.{u2, u3} A B) x) (FunLike.coe.{max (succ u2) (succ u3), succ u3, max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u3, max u3 u2} R B (Prod.{u2, u3} A B) _inst_1 _inst_4 _inst_5 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) B (fun (_x : B) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : B) => Prod.{u2, u3} A B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u3, max u2 u3} R B (Prod.{u2, u3} A B) _inst_1 _inst_4 _inst_5 (Prod.instNonUnitalNonAssocSemiringProd.{u2, u3} A B _inst_2 _inst_4) (Prod.distribMulAction.{u1, u2, u3} R A B _inst_1 (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A _inst_2)) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B _inst_4)) _inst_3 _inst_5)) (NonUnitalAlgHom.inr.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) x) (Prod.mk.{u2, u3} A B (OfNat.ofNat.{u2} A 0 (Zero.toOfNat0.{u2} A (MulZeroClass.toZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A _inst_2)))) x)
Case conversion may be inaccurate. Consider using '#align non_unital_alg_hom.inr_apply NonUnitalAlgHom.inr_applyₓ'. -/
theorem inr_apply (x : B) : inr R A B x = (0, x) :=
  rfl
#align non_unital_alg_hom.inr_apply NonUnitalAlgHom.inr_apply

end Prod

end NonUnitalAlgHom

/-! ### Interaction with `alg_hom` -/

namespace AlgHom

variable {R A B} [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B]

-- see Note [lower instance priority]
instance (priority := 100) {F : Type _} [AlgHomClass F R A B] : NonUnitalAlgHomClass F R A B :=
  { ‹AlgHomClass F R A B› with map_smul := map_smul }

#print AlgHom.toNonUnitalAlgHom /-
/-- A unital morphism of algebras is a `non_unital_alg_hom`. -/
def toNonUnitalAlgHom (f : A →ₐ[R] B) : A →ₙₐ[R] B :=
  { f with map_smul' := map_smul f }
#align alg_hom.to_non_unital_alg_hom AlgHom.toNonUnitalAlgHom
-/

/- warning: alg_hom.non_unital_alg_hom.has_coe -> AlgHom.NonUnitalAlgHom.hasCoe is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : CommSemiring.{u1} R] [_inst_2 : Semiring.{u2} A] [_inst_3 : Semiring.{u3} B] [_inst_4 : Algebra.{u1, u2} R A _inst_1 _inst_2] [_inst_5 : Algebra.{u1, u3} R B _inst_1 _inst_3], Coe.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} {_inst_1 : CommSemiring.{u1} R} {_inst_2 : Semiring.{u2} A} {_inst_3 : Semiring.{u3} B} {_inst_4 : Algebra.{u1, u2} R A _inst_1 _inst_2} {_inst_5 : Algebra.{u1, u3} R B _inst_1 _inst_3}, CoeOut.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)))
Case conversion may be inaccurate. Consider using '#align alg_hom.non_unital_alg_hom.has_coe AlgHom.NonUnitalAlgHom.hasCoeₓ'. -/
instance NonUnitalAlgHom.hasCoe : Coe (A →ₐ[R] B) (A →ₙₐ[R] B) :=
  ⟨toNonUnitalAlgHom⟩
#align alg_hom.non_unital_alg_hom.has_coe AlgHom.NonUnitalAlgHom.hasCoe

/- warning: alg_hom.to_non_unital_alg_hom_eq_coe -> AlgHom.toNonUnitalAlgHom_eq_coe is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : CommSemiring.{u1} R] [_inst_2 : Semiring.{u2} A] [_inst_3 : Semiring.{u3} B] [_inst_4 : Algebra.{u1, u2} R A _inst_1 _inst_2] [_inst_5 : Algebra.{u1, u3} R B _inst_1 _inst_3] (f : AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) (AlgHom.toNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 f) ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u2) (succ u3)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u2) (succ u3)} a b] => self.0) (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) (NonUnitalAlgHomClass.NonUnitalAlgHom.hasCoeT.{max u2 u3, u1, u2, u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)) (AlgHom.nonUnitalAlgHomClass.{u1, u2, u3, max u2 u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (AlgHom.algHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))))) f)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} {_inst_1 : CommSemiring.{u1} R} {_inst_2 : Semiring.{u2} A} {_inst_3 : Semiring.{u3} B} {_inst_4 : Algebra.{u1, u2} R A _inst_1 _inst_2} {_inst_5 : Algebra.{u1, u3} R B _inst_1 _inst_3} (f : AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) (AlgHom.toNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 f) (let src._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1220 : NonUnitalRingHom.{u2, u3} A B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) := NonUnitalRingHomClass.toNonUnitalRingHom.{max u2 u3, u2, u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (NonUnitalAlgHomClass.toNonUnitalRingHomClass.{max u2 u3, u1, u2, u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u1, u2, u3, max u2 u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (AlgHom.algHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))) f; NonUnitalAlgHom.mk.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)) (DistribMulActionHom.mk.{u1, u2, u3} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)))) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)) (MulActionHom.mk.{u1, u2, u3} R A (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))))) (DistribMulAction.toDistribSMul.{u1, u2} R A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4))))) B (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))))) (DistribMulAction.toDistribSMul.{u1, u3} R B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)))) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))))) (FunLike.coe.{succ (max u2 u3), succ u2, succ u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (a : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) a) (SMulHomClass.toFunLike.{max u2 u3, u1, u2, u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))))) (DistribMulAction.toDistribSMul.{u1, u2} R A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4))))) (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))))) (DistribMulAction.toDistribSMul.{u1, u3} R B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)))) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u3, u1, u2, u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)))) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u3, u1, u2, u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u1, u2, u3, max u2 u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (AlgHom.algHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))))) f) (NonUnitalAlgHomClass.instCoeTCNonUnitalAlgHom.proof_1.{u3, u1, u2, max u2 u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u1, u2, u3, max u2 u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (AlgHom.algHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) f)) (NonUnitalRingHom.map_zero'.{u2, u3} A B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) src._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1220) (NonUnitalRingHom.map_add'.{u2, u3} A B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) src._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1220)) (NonUnitalAlgHomClass.instCoeTCNonUnitalAlgHom.proof_2.{u3, u2, max u2 u3, u1} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u1, u2, u3, max u2 u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (AlgHom.algHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) f))
Case conversion may be inaccurate. Consider using '#align alg_hom.to_non_unital_alg_hom_eq_coe AlgHom.toNonUnitalAlgHom_eq_coeₓ'. -/
@[simp]
theorem toNonUnitalAlgHom_eq_coe (f : A →ₐ[R] B) : f.toNonUnitalAlgHom = f :=
  rfl
#align alg_hom.to_non_unital_alg_hom_eq_coe AlgHom.toNonUnitalAlgHom_eq_coe

/- warning: alg_hom.coe_to_non_unital_alg_hom -> AlgHom.coe_to_nonUnitalAlgHom is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_1 : CommSemiring.{u1} R] [_inst_2 : Semiring.{u2} A] [_inst_3 : Semiring.{u3} B] [_inst_4 : Algebra.{u1, u2} R A _inst_1 _inst_2] [_inst_5 : Algebra.{u1, u3} R B _inst_1 _inst_3] (f : AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{max (succ u2) (succ u3)} ((fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) => A -> B) ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u2) (succ u3)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u2) (succ u3)} a b] => self.0) (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) (NonUnitalAlgHomClass.NonUnitalAlgHom.hasCoeT.{max u2 u3, u1, u2, u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)) (AlgHom.nonUnitalAlgHomClass.{u1, u2, u3, max u2 u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (AlgHom.algHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))))) f)) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) (fun (_x : NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) => A -> B) (NonUnitalAlgHom.hasCoeToFun.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u2) (succ u3)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u2) (succ u3)} a b] => self.0) (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) (NonUnitalAlgHomClass.NonUnitalAlgHom.hasCoeT.{max u2 u3, u1, u2, u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)) (AlgHom.nonUnitalAlgHomClass.{u1, u2, u3, max u2 u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (AlgHom.algHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))))) f)) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (fun (_x : AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) => A -> B) ([anonymous].{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) f)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} {_inst_1 : CommSemiring.{u1} R} {_inst_2 : Semiring.{u2} A} {_inst_3 : Semiring.{u3} B} {_inst_4 : Algebra.{u1, u2} R A _inst_1 _inst_2} {_inst_5 : Algebra.{u1, u3} R B _inst_1 _inst_3} (f : AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5), Eq.{max (succ u2) (succ u3)} (forall (a : A), (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) a) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (NonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : A) => B) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, u2, u3} R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))) (AlgHom.toNonUnitalAlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 f)) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) _x) (SMulHomClass.toFunLike.{max u2 u3, u1, u2, u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))))) (DistribMulAction.toDistribSMul.{u1, u2} R A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4))))) (SMulZeroClass.toSMul.{u1, u3} R B (AddMonoid.toZero.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))))) (DistribSMul.toSMulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))))) (DistribMulAction.toDistribSMul.{u1, u3} R B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)))) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u3, u1, u2, u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)))) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u3, u1, u2, u3} (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_3))) (Algebra.toModule.{u1, u3} R B _inst_1 _inst_3 _inst_5)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u1, u2, u3, max u2 u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 (AlgHom.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5) (AlgHom.algHomClass.{u1, u2, u3} R A B _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))))) f)
Case conversion may be inaccurate. Consider using '#align alg_hom.coe_to_non_unital_alg_hom AlgHom.coe_to_nonUnitalAlgHomₓ'. -/
@[simp, norm_cast]
theorem coe_to_nonUnitalAlgHom (f : A →ₐ[R] B) : ((f : A →ₙₐ[R] B) : A → B) = f :=
  rfl
#align alg_hom.coe_to_non_unital_alg_hom AlgHom.coe_to_nonUnitalAlgHom

end AlgHom