/-
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.free_non_unital_non_assoc_algebra
! leanprover-community/mathlib commit 69c6a5a12d8a2b159f20933e60115a4f2de62b58
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Algebra.Free
import Mathbin.Algebra.MonoidAlgebra.Basic

/-!
# Free algebras

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

Given a semiring `R` and a type `X`, we construct the free non-unital, non-associative algebra on
`X` with coefficients in `R`, together with its universal property. The construction is valuable
because it can be used to build free algebras with more structure, e.g., free Lie algebras.

Note that elsewhere we have a construction of the free unital, associative algebra. This is called
`free_algebra`.

## Main definitions

  * `free_non_unital_non_assoc_algebra`
  * `free_non_unital_non_assoc_algebra.lift`
  * `free_non_unital_non_assoc_algebra.of`

## Implementation details

We construct the free algebra as the magma algebra, with coefficients in `R`, of the free magma on
`X`. However we regard this as an implementation detail and thus deliberately omit the lemmas
`of_apply` and `lift_apply`, and we mark `free_non_unital_non_assoc_algebra` and `lift` as
irreducible once we have established the universal property.

## Tags

free algebra, non-unital, non-associative, free magma, magma algebra, universal property,
forgetful functor, adjoint functor
-/

universe u v w

noncomputable section

variable (R : Type u) (X : Type v) [Semiring R]

#print FreeNonUnitalNonAssocAlgebra /-
/-- The free non-unital, non-associative algebra on the type `X` with coefficients in `R`. -/
abbrev FreeNonUnitalNonAssocAlgebra :=
  MonoidAlgebra R (FreeMagma X)
#align free_non_unital_non_assoc_algebra FreeNonUnitalNonAssocAlgebra
-/

namespace FreeNonUnitalNonAssocAlgebra

variable {X}

#print FreeNonUnitalNonAssocAlgebra.of /-
/-- The embedding of `X` into the free algebra with coefficients in `R`. -/
def of : X → FreeNonUnitalNonAssocAlgebra R X :=
  MonoidAlgebra.ofMagma R _ ∘ FreeMagma.of
#align free_non_unital_non_assoc_algebra.of FreeNonUnitalNonAssocAlgebra.of
-/

variable {A : Type w} [NonUnitalNonAssocSemiring A]

variable [Module R A] [IsScalarTower R A A] [SMulCommClass R A A]

/- warning: free_non_unital_non_assoc_algebra.lift -> FreeNonUnitalNonAssocAlgebra.lift is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2))) (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2)))], Equiv.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))
but is expected to have type
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)))) (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2))))], Equiv.{max (succ u2) (succ u3), max (succ u3) (succ (max u2 u1))} (X -> A) (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))
Case conversion may be inaccurate. Consider using '#align free_non_unital_non_assoc_algebra.lift FreeNonUnitalNonAssocAlgebra.liftₓ'. -/
/-- The functor `X ↦ free_non_unital_non_assoc_algebra R X` from the category of types to the
category of non-unital, non-associative algebras over `R` is adjoint to the forgetful functor in the
other direction. -/
def lift : (X → A) ≃ (FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A) :=
  FreeMagma.lift.trans (MonoidAlgebra.liftMagma R)
#align free_non_unital_non_assoc_algebra.lift FreeNonUnitalNonAssocAlgebra.lift

/- warning: free_non_unital_non_assoc_algebra.lift_symm_apply -> FreeNonUnitalNonAssocAlgebra.lift_symm_apply is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2))) (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2)))] (F : NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)), Eq.{max (succ u2) (succ u3)} (X -> A) (coeFn.{max 1 (max (max (succ (max u1 u2)) (succ u3)) (succ u2) (succ u3)) (max (succ u2) (succ u3)) (succ (max u1 u2)) (succ u3), max (max (succ (max u1 u2)) (succ u3)) (succ u2) (succ u3)} (Equiv.{max (succ (max u1 u2)) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (X -> A)) (fun (_x : Equiv.{max (succ (max u1 u2)) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (X -> A)) => (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) -> X -> A) (Equiv.hasCoeToFun.{max (succ (max u1 u2)) (succ u3), max (succ u2) (succ u3)} (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (X -> A)) (Equiv.symm.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (FreeNonUnitalNonAssocAlgebra.lift.{u1, u2, u3} R X _inst_1 A _inst_2 _inst_3 _inst_4 _inst_5)) F) (Function.comp.{succ u2, succ (max u1 u2), succ u3} X (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (coeFn.{max (succ (max u1 u2)) (succ u3), max (succ (max u1 u2)) (succ u3)} (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (fun (_x : NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) => (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) -> A) (NonUnitalAlgHom.hasCoeToFun.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F) (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1))
but is expected to have type
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)))) (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2))))] (F : NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)), Eq.{max (succ u2) (succ u3)} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) => X -> A) F) (FunLike.coe.{max (max (succ u1) (succ u3)) (succ u2), max (max (succ u1) (succ u3)) (succ u2), max (succ u3) (succ u2)} (Equiv.{max (max (succ u1) (succ u3)) (succ u2), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (X -> A)) (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (fun (_x : NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) => X -> A) _x) (Equiv.instFunLikeEquiv.{max (max (succ u1) (succ u3)) (succ u2), max (succ u3) (succ u2)} (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (X -> A)) (Equiv.symm.{max (succ u3) (succ u2), max (max (succ u1) (succ u3)) (succ u2)} (X -> A) (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (FreeNonUnitalNonAssocAlgebra.lift.{u1, u2, u3} R X _inst_1 A _inst_2 _inst_3 _inst_4 _inst_5)) F) (Function.comp.{succ u2, max (succ u1) (succ u2), succ u3} X (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (succ u1) (succ u2), succ u3} (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) (fun (_x : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => A) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F) (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1))
Case conversion may be inaccurate. Consider using '#align free_non_unital_non_assoc_algebra.lift_symm_apply FreeNonUnitalNonAssocAlgebra.lift_symm_applyₓ'. -/
@[simp]
theorem lift_symm_apply (F : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A) :
    (lift R).symm F = F ∘ of R :=
  rfl
#align free_non_unital_non_assoc_algebra.lift_symm_apply FreeNonUnitalNonAssocAlgebra.lift_symm_apply

/- warning: free_non_unital_non_assoc_algebra.of_comp_lift -> FreeNonUnitalNonAssocAlgebra.of_comp_lift is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2))) (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2)))] (f : X -> A), Eq.{max (succ u2) (succ u3)} (X -> A) (Function.comp.{succ u2, succ (max u1 u2), succ u3} X (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (coeFn.{max (succ (max u1 u2)) (succ u3), max (succ (max u1 u2)) (succ u3)} (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (fun (_x : NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) => (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) -> A) (NonUnitalAlgHom.hasCoeToFun.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (coeFn.{max 1 (max (max (succ u2) (succ u3)) (succ (max u1 u2)) (succ u3)) (max (succ (max u1 u2)) (succ u3)) (succ u2) (succ u3), max (max (succ u2) (succ u3)) (succ (max u1 u2)) (succ u3)} (Equiv.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (fun (_x : Equiv.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) => (X -> A) -> (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (Equiv.hasCoeToFun.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (FreeNonUnitalNonAssocAlgebra.lift.{u1, u2, u3} R X _inst_1 A _inst_2 _inst_3 _inst_4 _inst_5) f)) (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1)) f
but is expected to have type
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)))) (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2))))] (f : X -> A), Eq.{max (succ u2) (succ u3)} (X -> A) (Function.comp.{succ u2, max (succ u1) (succ u2), succ u3} X (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (succ u1) (succ u2), succ u3} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : X -> A) => NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) f) (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) (fun (_x : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => A) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (FunLike.coe.{max (max (succ u1) (succ u3)) (succ u2), max (succ u3) (succ u2), max (max (succ u1) (succ u3)) (succ u2)} (Equiv.{max (succ u2) (succ u3), max (succ u3) (succ (max u2 u1))} (X -> A) (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (X -> A) (fun (_x : X -> A) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : X -> A) => NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) _x) (Equiv.instFunLikeEquiv.{max (succ u3) (succ u2), max (max (succ u1) (succ u3)) (succ u2)} (X -> A) (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (FreeNonUnitalNonAssocAlgebra.lift.{u1, u2, u3} R X _inst_1 A _inst_2 _inst_3 _inst_4 _inst_5) f)) (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1)) f
Case conversion may be inaccurate. Consider using '#align free_non_unital_non_assoc_algebra.of_comp_lift FreeNonUnitalNonAssocAlgebra.of_comp_liftₓ'. -/
@[simp]
theorem of_comp_lift (f : X → A) : lift R f ∘ of R = f :=
  (lift R).left_inv f
#align free_non_unital_non_assoc_algebra.of_comp_lift FreeNonUnitalNonAssocAlgebra.of_comp_lift

/- warning: free_non_unital_non_assoc_algebra.lift_unique -> FreeNonUnitalNonAssocAlgebra.lift_unique is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2))) (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2)))] (f : X -> A) (F : NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)), Iff (Eq.{max (succ u2) (succ u3)} (X -> A) (Function.comp.{succ u2, succ (max u1 u2), succ u3} X (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (coeFn.{max (succ (max u1 u2)) (succ u3), max (succ (max u1 u2)) (succ u3)} (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (fun (_x : NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) => (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) -> A) (NonUnitalAlgHom.hasCoeToFun.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F) (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1)) f) (Eq.{max (succ (max u1 u2)) (succ u3)} (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F (coeFn.{max 1 (max (max (succ u2) (succ u3)) (succ (max u1 u2)) (succ u3)) (max (succ (max u1 u2)) (succ u3)) (succ u2) (succ u3), max (max (succ u2) (succ u3)) (succ (max u1 u2)) (succ u3)} (Equiv.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (fun (_x : Equiv.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) => (X -> A) -> (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (Equiv.hasCoeToFun.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (FreeNonUnitalNonAssocAlgebra.lift.{u1, u2, u3} R X _inst_1 A _inst_2 _inst_3 _inst_4 _inst_5) f))
but is expected to have type
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)))) (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2))))] (f : X -> A) (F : NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)), Iff (Eq.{max (succ u2) (succ u3)} (X -> A) (Function.comp.{succ u2, max (succ u1) (succ u2), succ u3} X (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (succ u1) (succ u2), succ u3} (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) (fun (_x : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => A) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F) (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1)) f) (Eq.{max (max (succ u1) (succ u2)) (succ u3)} (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F (FunLike.coe.{max (max (succ u1) (succ u3)) (succ u2), max (succ u3) (succ u2), max (max (succ u1) (succ u3)) (succ u2)} (Equiv.{max (succ u2) (succ u3), max (succ u3) (succ (max u2 u1))} (X -> A) (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (X -> A) (fun (_x : X -> A) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : X -> A) => NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) _x) (Equiv.instFunLikeEquiv.{max (succ u3) (succ u2), max (max (succ u1) (succ u3)) (succ u2)} (X -> A) (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (FreeNonUnitalNonAssocAlgebra.lift.{u1, u2, u3} R X _inst_1 A _inst_2 _inst_3 _inst_4 _inst_5) f))
Case conversion may be inaccurate. Consider using '#align free_non_unital_non_assoc_algebra.lift_unique FreeNonUnitalNonAssocAlgebra.lift_uniqueₓ'. -/
@[simp]
theorem lift_unique (f : X → A) (F : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A) :
    F ∘ of R = f ↔ F = lift R f :=
  (lift R).symm_apply_eq
#align free_non_unital_non_assoc_algebra.lift_unique FreeNonUnitalNonAssocAlgebra.lift_unique

/- warning: free_non_unital_non_assoc_algebra.lift_of_apply -> FreeNonUnitalNonAssocAlgebra.lift_of_apply is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2))) (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2)))] (f : X -> A) (x : X), Eq.{succ u3} A (coeFn.{max (succ (max u1 u2)) (succ u3), max (succ (max u1 u2)) (succ u3)} (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (fun (_x : NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) => (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) -> A) (NonUnitalAlgHom.hasCoeToFun.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (coeFn.{max 1 (max (max (succ u2) (succ u3)) (succ (max u1 u2)) (succ u3)) (max (succ (max u1 u2)) (succ u3)) (succ u2) (succ u3), max (max (succ u2) (succ u3)) (succ (max u1 u2)) (succ u3)} (Equiv.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (fun (_x : Equiv.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) => (X -> A) -> (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (Equiv.hasCoeToFun.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (FreeNonUnitalNonAssocAlgebra.lift.{u1, u2, u3} R X _inst_1 A _inst_2 _inst_3 _inst_4 _inst_5) f) (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1 x)) (f x)
but is expected to have type
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)))) (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2))))] (f : X -> A) (x : X), Eq.{succ u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => A) (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1 x)) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (succ u1) (succ u2), succ u3} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : X -> A) => NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) f) (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) (fun (_x : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => A) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (FunLike.coe.{max (max (succ u1) (succ u3)) (succ u2), max (succ u3) (succ u2), max (max (succ u1) (succ u3)) (succ u2)} (Equiv.{max (succ u2) (succ u3), max (succ u3) (succ (max u2 u1))} (X -> A) (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (X -> A) (fun (_x : X -> A) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : X -> A) => NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) _x) (Equiv.instFunLikeEquiv.{max (succ u3) (succ u2), max (max (succ u1) (succ u3)) (succ u2)} (X -> A) (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (FreeNonUnitalNonAssocAlgebra.lift.{u1, u2, u3} R X _inst_1 A _inst_2 _inst_3 _inst_4 _inst_5) f) (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1 x)) (f x)
Case conversion may be inaccurate. Consider using '#align free_non_unital_non_assoc_algebra.lift_of_apply FreeNonUnitalNonAssocAlgebra.lift_of_applyₓ'. -/
@[simp]
theorem lift_of_apply (f : X → A) (x) : lift R f (of R x) = f x :=
  congr_fun (of_comp_lift _ f) x
#align free_non_unital_non_assoc_algebra.lift_of_apply FreeNonUnitalNonAssocAlgebra.lift_of_apply

/- warning: free_non_unital_non_assoc_algebra.lift_comp_of -> FreeNonUnitalNonAssocAlgebra.lift_comp_of is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2))) (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2)))] (F : NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)), Eq.{max (succ (max u1 u2)) (succ u3)} (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (coeFn.{max 1 (max (max (succ u2) (succ u3)) (succ (max u1 u2)) (succ u3)) (max (succ (max u1 u2)) (succ u3)) (succ u2) (succ u3), max (max (succ u2) (succ u3)) (succ (max u1 u2)) (succ u3)} (Equiv.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (fun (_x : Equiv.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) => (X -> A) -> (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (Equiv.hasCoeToFun.{max (succ u2) (succ u3), max (succ (max u1 u2)) (succ u3)} (X -> A) (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (FreeNonUnitalNonAssocAlgebra.lift.{u1, u2, u3} R X _inst_1 A _inst_2 _inst_3 _inst_4 _inst_5) (Function.comp.{succ u2, succ (max u1 u2), succ u3} X (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (coeFn.{max (succ (max u1 u2)) (succ u3), max (succ (max u1 u2)) (succ u3)} (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (fun (_x : NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) => (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) -> A) (NonUnitalAlgHom.hasCoeToFun.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F) (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1))) F
but is expected to have type
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)))) (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2))))] (F : NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)), Eq.{max (max (succ u1) (succ u2)) (succ u3)} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : X -> A) => NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (Function.comp.{succ u2, max (succ u1) (succ u2), succ u3} X (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (succ u1) (succ u2), succ u3} (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) (fun (a : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => A) a) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F) (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1))) (FunLike.coe.{max (max (succ u1) (succ u3)) (succ u2), max (succ u3) (succ u2), max (max (succ u1) (succ u3)) (succ u2)} (Equiv.{max (succ u2) (succ u3), max (succ u3) (succ (max u2 u1))} (X -> A) (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (X -> A) (fun (_x : X -> A) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : X -> A) => NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) _x) (Equiv.instFunLikeEquiv.{max (succ u3) (succ u2), max (max (succ u1) (succ u3)) (succ u2)} (X -> A) (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))) (FreeNonUnitalNonAssocAlgebra.lift.{u1, u2, u3} R X _inst_1 A _inst_2 _inst_3 _inst_4 _inst_5) (Function.comp.{succ u2, max (succ u1) (succ u2), succ u3} X (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (succ u1) (succ u2), succ u3} (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) (fun (_x : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => A) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F) (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1))) F
Case conversion may be inaccurate. Consider using '#align free_non_unital_non_assoc_algebra.lift_comp_of FreeNonUnitalNonAssocAlgebra.lift_comp_ofₓ'. -/
@[simp]
theorem lift_comp_of (F : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A) : lift R (F ∘ of R) = F :=
  (lift R).apply_symm_apply F
#align free_non_unital_non_assoc_algebra.lift_comp_of FreeNonUnitalNonAssocAlgebra.lift_comp_of

/- warning: free_non_unital_non_assoc_algebra.hom_ext -> FreeNonUnitalNonAssocAlgebra.hom_ext is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2))) (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)))) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (Mul.toSMul.{u3} A (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A _inst_2)))] {F₁ : NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)} {F₂ : NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)}, (forall (x : X), Eq.{succ u3} A (coeFn.{max (succ (max u1 u2)) (succ u3), max (succ (max u1 u2)) (succ u3)} (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (fun (_x : NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) => (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) -> A) (NonUnitalAlgHom.hasCoeToFun.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F₁ (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1 x)) (coeFn.{max (succ (max u1 u2)) (succ u3), max (succ (max u1 u2)) (succ u3)} (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (fun (_x : NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) => (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) -> A) (NonUnitalAlgHom.hasCoeToFun.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F₂ (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1 x))) -> (Eq.{max (succ (max u1 u2)) (succ u3)} (NonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.hasMul.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F₁ F₂)
but is expected to have type
  forall (R : Type.{u1}) {X : Type.{u2}} [_inst_1 : Semiring.{u1} R] {A : Type.{u3}} [_inst_2 : NonUnitalNonAssocSemiring.{u3} A] [_inst_3 : Module.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2)] [_inst_4 : IsScalarTower.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)))) (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3))))] [_inst_5 : SMulCommClass.{u1, u3, u3} R A A (SMulZeroClass.toSMul.{u1, u3} R A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R _inst_1) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (Module.toMulActionWithZero.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)))) (SMulZeroClass.toSMul.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (SMulWithZero.toSMulZeroClass.{u3, u3} A A (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2)) (MulZeroClass.toSMulWithZero.{u3} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u3} A _inst_2))))] {F₁ : NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)} {F₂ : NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)}, (forall (x : X), Eq.{succ u3} ((fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => A) (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1 x)) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (succ u1) (succ u2), succ u3} (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) (fun (_x : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => A) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F₁ (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1 x)) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (succ u1) (succ u2), succ u3} (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) (fun (_x : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => (fun (x._@.Mathlib.Algebra.Hom.NonUnitalAlg._hyg.1412 : FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) => A) _x) (NonUnitalAlgHom.instFunLikeNonUnitalAlgHom.{u1, max u1 u2, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F₂ (FreeNonUnitalNonAssocAlgebra.of.{u1, u2} R X _inst_1 x))) -> (Eq.{max (max (succ u1) (succ u2)) (succ u3)} (NonUnitalAlgHom.{u1, max u2 u1, u3} R (FreeNonUnitalNonAssocAlgebra.{u1, u2} R X _inst_1) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (MonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R (FreeMagma.{u2} X) _inst_1 (FreeMagma.instMulFreeMagma.{u2} X)) (MonoidAlgebra.distribMulAction.{u1, u2, u1} R (FreeMagma.{u2} X) R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) _inst_1 (Module.toDistribMulAction.{u1, u1} R R _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))) (Semiring.toModule.{u1} R _inst_1))) _inst_2 (Module.toDistribMulAction.{u1, u3} R A _inst_1 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A _inst_2) _inst_3)) F₁ F₂)
Case conversion may be inaccurate. Consider using '#align free_non_unital_non_assoc_algebra.hom_ext FreeNonUnitalNonAssocAlgebra.hom_extₓ'. -/
@[ext]
theorem hom_ext {F₁ F₂ : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A}
    (h : ∀ x, F₁ (of R x) = F₂ (of R x)) : F₁ = F₂ :=
  (lift R).symm.Injective <| funext h
#align free_non_unital_non_assoc_algebra.hom_ext FreeNonUnitalNonAssocAlgebra.hom_ext

end FreeNonUnitalNonAssocAlgebra