l3lab/ntp-mathlib huggingface dataset:
instance instNonAssocSemiring [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A] :
    NonAssocSemiring (Unitization R A) :=
  { Unitization.instMulOneClass,
    Unitization.instAddCommMonoid with
    zero_mul := fun x =>
      ext (zero_mul x.1) <|
        show (0 : R) • x.2 + x.1 • (0 : A) + 0 * x.2 = 0 by
          

Proof state:
R : Type u_1
A : Type u_2
inst✝² : Semiring R
inst✝¹ : NonUnitalNonAssocSemiring A
inst✝ : Module R A
src✝¹ : MulOneClass (Unitization R A) := instMulOneClass
src✝ : AddCommMonoid (Unitization R A) := instAddCommMonoid
x : Unitization R A
⊢ 0 • x.2 + x.1 • 0 + 0 * x.2 = 0

Next tactic:
rw [zero_smul, zero_add, smul_zero, zero_mul, add_zero]
instance instNonAssocSemiring [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A] :
    NonAssocSemiring (Unitization R A) :=
  { Unitization.instMulOneClass,
    Unitization.instAddCommMonoid with
    zero_mul := fun x =>
      ext (zero_mul x.1) <|
        show (0 : R) • x.2 + x.1 • (0 : A) + 0 * x.2 = 0 by
          rw [zero_smul, zero_add, smul_zero, zero_mul, add_zero]
    mul_zero := fun x =>
      ext (mul_zero x.1) <|
        show x.1 • (0 : A) + (0 : R) • x.2 + x.2 * 0 = 0 by
          

Proof state:
R : Type u_1
A : Type u_2
inst✝² : Semiring R
inst✝¹ : NonUnitalNonAssocSemiring A
inst✝ : Module R A
src✝¹ : MulOneClass (Unitization R A) := instMulOneClass
src✝ : AddCommMonoid (Unitization R A) := instAddCommMonoid
x : Unitization R A
⊢ x.1 • 0 + 0 • x.2 + x.2 * 0 = 0

Next tactic:
rw [smul_zero, zero_add, zero_smul, mul_zero, add_zero]
instance instMonoid [CommMonoid R] [NonUnitalSemiring A] [DistribMulAction R A]
    [IsScalarTower R A A] [SMulCommClass R A A] : Monoid (Unitization R A) :=
  { Unitization.instMulOneClass with
    mul_assoc := fun x y z =>
      ext (mul_assoc x.1 y.1 z.1) <|
        show (x.1 * y.1) • z.2 + z.1 • (x.1 • y.2 + y.1 • x.2 + x.2 * y.2) +
            (x.1 • y.2 + y.1 • x.2 + x.2 * y.2) * z.2 =
            x.1 • (y.1 • z.2 + z.1 • y.2 + y.2 * z.2) + (y.1 * z.1) • x.2 +
            x.2 * (y.1 • z.2 + z.1 • y.2 + y.2 * z.2) by
          

Proof state:
R : Type u_1
A : Type u_2
inst✝⁴ : CommMonoid R
inst✝³ : NonUnitalSemiring A
inst✝² : DistribMulAction R A
inst✝¹ : IsScalarTower R A A
inst✝ : SMulCommClass R A A
src✝ : MulOneClass (Unitization R A) := instMulOneClass
x y z : Unitization R A
⊢ (x.1 * y.1) • z.2 + z.1 • (x.1 • y.2 + y.1 • x.2 + x.2 * y.2) + (x.1 • y.2 + y.1 • x.2 + x.2 * y.2) * z.2 =
    x.1 • (y.1 • z.2 + z.1 • y.2 + y.2 * z.2) + (y.1 * z.1) • x.2 + x.2 * (y.1 • z.2 + z.1 • y.2 + y.2 * z.2)

Next tactic:
simp only [smul_add, mul_add, add_mul, smul_smul, smul_mul_assoc, mul_smul_comm,
            mul_assoc]
instance instMonoid [CommMonoid R] [NonUnitalSemiring A] [DistribMulAction R A]
    [IsScalarTower R A A] [SMulCommClass R A A] : Monoid (Unitization R A) :=
  { Unitization.instMulOneClass with
    mul_assoc := fun x y z =>
      ext (mul_assoc x.1 y.1 z.1) <|
        show (x.1 * y.1) • z.2 + z.1 • (x.1 • y.2 + y.1 • x.2 + x.2 * y.2) +
            (x.1 • y.2 + y.1 • x.2 + x.2 * y.2) * z.2 =
            x.1 • (y.1 • z.2 + z.1 • y.2 + y.2 * z.2) + (y.1 * z.1) • x.2 +
            x.2 * (y.1 • z.2 + z.1 • y.2 + y.2 * z.2) by
          simp only [smul_add, mul_add, add_mul, smul_smul, smul_mul_assoc, mul_smul_comm,
            mul_assoc]
          

Proof state:
R : Type u_1
A : Type u_2
inst✝⁴ : CommMonoid R
inst✝³ : NonUnitalSemiring A
inst✝² : DistribMulAction R A
inst✝¹ : IsScalarTower R A A
inst✝ : SMulCommClass R A A
src✝ : MulOneClass (Unitization R A) := instMulOneClass
x y z : Unitization R A
⊢ (x.1 * y.1) • z.2 + ((z.1 * x.1) • y.2 + (z.1 * y.1) • x.2 + z.1 • (x.2 * y.2)) +
      (x.1 • (y.2 * z.2) + y.1 • (x.2 * z.2) + x.2 * (y.2 * z.2)) =
    (x.1 * y.1) • z.2 + (x.1 * z.1) • y.2 + x.1 • (y.2 * z.2) + (y.1 * z.1) • x.2 +
      (y.1 • (x.2 * z.2) + z.1 • (x.2 * y.2) + x.2 * (y.2 * z.2))

Next tactic:
rw [mul_comm z.1 x.1]
instance instMonoid [CommMonoid R] [NonUnitalSemiring A] [DistribMulAction R A]
    [IsScalarTower R A A] [SMulCommClass R A A] : Monoid (Unitization R A) :=
  { Unitization.instMulOneClass with
    mul_assoc := fun x y z =>
      ext (mul_assoc x.1 y.1 z.1) <|
        show (x.1 * y.1) • z.2 + z.1 • (x.1 • y.2 + y.1 • x.2 + x.2 * y.2) +
            (x.1 • y.2 + y.1 • x.2 + x.2 * y.2) * z.2 =
            x.1 • (y.1 • z.2 + z.1 • y.2 + y.2 * z.2) + (y.1 * z.1) • x.2 +
            x.2 * (y.1 • z.2 + z.1 • y.2 + y.2 * z.2) by
          simp only [smul_add, mul_add, add_mul, smul_smul, smul_mul_assoc, mul_smul_comm,
            mul_assoc]
          rw [mul_comm z.1 x.1]
          

Proof state:
R : Type u_1
A : Type u_2
inst✝⁴ : CommMonoid R
inst✝³ : NonUnitalSemiring A
inst✝² : DistribMulAction R A
inst✝¹ : IsScalarTower R A A
inst✝ : SMulCommClass R A A
src✝ : MulOneClass (Unitization R A) := instMulOneClass
x y z : Unitization R A
⊢ (x.1 * y.1) • z.2 + ((x.1 * z.1) • y.2 + (z.1 * y.1) • x.2 + z.1 • (x.2 * y.2)) +
      (x.1 • (y.2 * z.2) + y.1 • (x.2 * z.2) + x.2 * (y.2 * z.2)) =
    (x.1 * y.1) • z.2 + (x.1 * z.1) • y.2 + x.1 • (y.2 * z.2) + (y.1 * z.1) • x.2 +
      (y.1 • (x.2 * z.2) + z.1 • (x.2 * y.2) + x.2 * (y.2 * z.2))

Next tactic:
rw [mul_comm z.1 y.1]
instance instMonoid [CommMonoid R] [NonUnitalSemiring A] [DistribMulAction R A]
    [IsScalarTower R A A] [SMulCommClass R A A] : Monoid (Unitization R A) :=
  { Unitization.instMulOneClass with
    mul_assoc := fun x y z =>
      ext (mul_assoc x.1 y.1 z.1) <|
        show (x.1 * y.1) • z.2 + z.1 • (x.1 • y.2 + y.1 • x.2 + x.2 * y.2) +
            (x.1 • y.2 + y.1 • x.2 + x.2 * y.2) * z.2 =
            x.1 • (y.1 • z.2 + z.1 • y.2 + y.2 * z.2) + (y.1 * z.1) • x.2 +
            x.2 * (y.1 • z.2 + z.1 • y.2 + y.2 * z.2) by
          simp only [smul_add, mul_add, add_mul, smul_smul, smul_mul_assoc, mul_smul_comm,
            mul_assoc]
          rw [mul_comm z.1 x.1]
          rw [mul_comm z.1 y.1]
          

Proof state:
R : Type u_1
A : Type u_2
inst✝⁴ : CommMonoid R
inst✝³ : NonUnitalSemiring A
inst✝² : DistribMulAction R A
inst✝¹ : IsScalarTower R A A
inst✝ : SMulCommClass R A A
src✝ : MulOneClass (Unitization R A) := instMulOneClass
x y z : Unitization R A
⊢ (x.1 * y.1) • z.2 + ((x.1 * z.1) • y.2 + (y.1 * z.1) • x.2 + z.1 • (x.2 * y.2)) +
      (x.1 • (y.2 * z.2) + y.1 • (x.2 * z.2) + x.2 * (y.2 * z.2)) =
    (x.1 * y.1) • z.2 + (x.1 * z.1) • y.2 + x.1 • (y.2 * z.2) + (y.1 * z.1) • x.2 +
      (y.1 • (x.2 * z.2) + z.1 • (x.2 * y.2) + x.2 * (y.2 * z.2))

Next tactic:
abel
instance instCommMonoid [CommMonoid R] [NonUnitalCommSemiring A] [DistribMulAction R A]
    [IsScalarTower R A A] [SMulCommClass R A A] : CommMonoid (Unitization R A) :=
  { Unitization.instMonoid with
    mul_comm := fun x₁ x₂ =>
      ext (mul_comm x₁.1 x₂.1) <|
        show x₁.1 • x₂.2 + x₂.1 • x₁.2 + x₁.2 * x₂.2 = x₂.1 • x₁.2 + x₁.1 • x₂.2 + x₂.2 * x₁.2 by
          

Proof state:
R : Type u_1
A : Type u_2
inst✝⁴ : CommMonoid R
inst✝³ : NonUnitalCommSemiring A
inst✝² : DistribMulAction R A
inst✝¹ : IsScalarTower R A A
inst✝ : SMulCommClass R A A
src✝ : Monoid (Unitization R A) := instMonoid
x₁ x₂ : Unitization R A
⊢ x₁.1 • x₂.2 + x₂.1 • x₁.2 + x₁.2 * x₂.2 = x₂.1 • x₁.2 + x₁.1 • x₂.2 + x₂.2 * x₁.2

Next tactic:
rw [add_comm (x₁.1 • x₂.2), mul_comm]
@[simp]
theorem inl_star [Star R] [AddMonoid A] [StarAddMonoid A] (r : R) :
    inl (star r) = star (inl r : Unitization R A) :=
  ext rfl (by 

Proof state:
R : Type u_1
A : Type u_2
inst✝² : Star R
inst✝¹ : AddMonoid A
inst✝ : StarAddMonoid A
r : R
⊢ snd (inl (star r)) = snd (star (inl r))

Next tactic:
simp only [snd_star, star_zero, snd_inl]
@[simp]
theorem inr_star [AddMonoid R] [StarAddMonoid R] [Star A] (a : A) :
    ↑(star a) = star (a : Unitization R A) :=
  ext (by 

Proof state:
R : Type u_1
A : Type u_2
inst✝² : AddMonoid R
inst✝¹ : StarAddMonoid R
inst✝ : Star A
a : A
⊢ fst ↑(star a) = fst (star ↑a)

Next tactic:
simp only [fst_star, star_zero, fst_inr]
instance instStarModule [CommSemiring R] [StarRing R] [AddCommMonoid A] [StarAddMonoid A]
    [Module R A] [StarModule R A] : StarModule R (Unitization R A) where
  star_smul r x := ext (by 

Proof state:
R : Type u_1
A : Type u_2
inst✝⁵ : CommSemiring R
inst✝⁴ : StarRing R
inst✝³ : AddCommMonoid A
inst✝² : StarAddMonoid A
inst✝¹ : Module R A
inst✝ : StarModule R A
r : R
x : Unitization R A
⊢ fst (star (r • x)) = fst (star r • star x)

Next tactic:
simp
instance instStarModule [CommSemiring R] [StarRing R] [AddCommMonoid A] [StarAddMonoid A]
    [Module R A] [StarModule R A] : StarModule R (Unitization R A) where
  star_smul r x := ext (by simp) (by 

Proof state:
R : Type u_1
A : Type u_2
inst✝⁵ : CommSemiring R
inst✝⁴ : StarRing R
inst✝³ : AddCommMonoid A
inst✝² : StarAddMonoid A
inst✝¹ : Module R A
inst✝ : StarModule R A
r : R
x : Unitization R A
⊢ snd (star (r • x)) = snd (star r • star x)

Next tactic:
simp
instance instStarRing [CommSemiring R] [StarRing R] [NonUnitalNonAssocSemiring A] [StarRing A]
    [Module R A] [StarModule R A] :
    StarRing (Unitization R A) :=
  { Unitization.instStarAddMonoid with
    star_mul := fun x y =>
      ext (by 

Proof state:
R : Type u_1
A : Type u_2
inst✝⁵ : CommSemiring R
inst✝⁴ : StarRing R
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : StarRing A
inst✝¹ : Module R A
inst✝ : StarModule R A
src✝ : StarAddMonoid (Unitization R A) := instStarAddMonoid
x y : Unitization R A
⊢ fst (star (x * y)) = fst (star y * star x)

Next tactic:
simp [-star_mul']
instance instStarRing [CommSemiring R] [StarRing R] [NonUnitalNonAssocSemiring A] [StarRing A]
    [Module R A] [StarModule R A] :
    StarRing (Unitization R A) :=
  { Unitization.instStarAddMonoid with
    star_mul := fun x y =>
      ext (by simp [-star_mul']) (by 

Proof state:
R : Type u_1
A : Type u_2
inst✝⁵ : CommSemiring R
inst✝⁴ : StarRing R
inst✝³ : NonUnitalNonAssocSemiring A
inst✝² : StarRing A
inst✝¹ : Module R A
inst✝ : StarModule R A
src✝ : StarAddMonoid (Unitization R A) := instStarAddMonoid
x y : Unitization R A
⊢ snd (star (x * y)) = snd (star y * star x)

Next tactic:
simp [-star_mul', add_comm (star x.fst • star y.snd)]
instance instAlgebra : Algebra S (Unitization R A) :=
  { (Unitization.inlRingHom R A).comp (algebraMap S R) with
    commutes' := fun s x => by
      

Proof state:
S : Type u_1
R : Type u_2
A : Type u_3
inst✝⁸ : CommSemiring S
inst✝⁷ : CommSemiring R
inst✝⁶ : NonUnitalSemiring A
inst✝⁵ : Module R A
inst✝⁴ : IsScalarTower R A A
inst✝³ : SMulCommClass R A A
inst✝² : Algebra S R
inst✝¹ : DistribMulAction S A
inst✝ : IsScalarTower S R A
src✝ : S →+* Unitization R A := RingHom.comp (inlRingHom R A) (algebraMap S R)
s : S
x : Unitization R A
⊢ { toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
          map_add' :=
            (_ : ∀ (x y : S), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
        s *
      x =
    x *
      { toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
          map_add' :=
            (_ : ∀ (x y : S), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
        s

Next tactic:
induction' x using Unitization.ind with r a
instance instAlgebra : Algebra S (Unitization R A) :=
  { (Unitization.inlRingHom R A).comp (algebraMap S R) with
    commutes' := fun s x => by
      induction' x using Unitization.ind with r a
      

Proof state:
case h
S : Type u_1
R : Type u_2
A : Type u_3
inst✝⁸ : CommSemiring S
inst✝⁷ : CommSemiring R
inst✝⁶ : NonUnitalSemiring A
inst✝⁵ : Module R A
inst✝⁴ : IsScalarTower R A A
inst✝³ : SMulCommClass R A A
inst✝² : Algebra S R
inst✝¹ : DistribMulAction S A
inst✝ : IsScalarTower S R A
src✝ : S →+* Unitization R A := RingHom.comp (inlRingHom R A) (algebraMap S R)
s : S
r : R
a : A
⊢ { toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
          map_add' :=
            (_ : ∀ (x y : S), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
        s *
      (inl r + ↑a) =
    (inl r + ↑a) *
      { toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
          map_add' :=
            (_ : ∀ (x y : S), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
        s

Next tactic:
show inl (algebraMap S R s) * _ = _ * inl (algebraMap S R s)
instance instAlgebra : Algebra S (Unitization R A) :=
  { (Unitization.inlRingHom R A).comp (algebraMap S R) with
    commutes' := fun s x => by
      induction' x using Unitization.ind with r a
      show inl (algebraMap S R s) * _ = _ * inl (algebraMap S R s)
      

Proof state:
case h
S : Type u_1
R : Type u_2
A : Type u_3
inst✝⁸ : CommSemiring S
inst✝⁷ : CommSemiring R
inst✝⁶ : NonUnitalSemiring A
inst✝⁵ : Module R A
inst✝⁴ : IsScalarTower R A A
inst✝³ : SMulCommClass R A A
inst✝² : Algebra S R
inst✝¹ : DistribMulAction S A
inst✝ : IsScalarTower S R A
src✝ : S →+* Unitization R A := RingHom.comp (inlRingHom R A) (algebraMap S R)
s : S
r : R
a : A
⊢ inl ((algebraMap S R) s) * (inl r + ↑a) = (inl r + ↑a) * inl ((algebraMap S R) s)

Next tactic:
rw [mul_add, add_mul, inl_mul_inl, inl_mul_inl, inl_mul_inr, inr_mul_inl, mul_comm]
instance instAlgebra : Algebra S (Unitization R A) :=
  { (Unitization.inlRingHom R A).comp (algebraMap S R) with
    commutes' := fun s x => by
      induction' x using Unitization.ind with r a
      show inl (algebraMap S R s) * _ = _ * inl (algebraMap S R s)
      rw [mul_add, add_mul, inl_mul_inl, inl_mul_inl, inl_mul_inr, inr_mul_inl, mul_comm]
    smul_def' := fun s x => by
      

Proof state:
S : Type u_1
R : Type u_2
A : Type u_3
inst✝⁸ : CommSemiring S
inst✝⁷ : CommSemiring R
inst✝⁶ : NonUnitalSemiring A
inst✝⁵ : Module R A
inst✝⁴ : IsScalarTower R A A
inst✝³ : SMulCommClass R A A
inst✝² : Algebra S R
inst✝¹ : DistribMulAction S A
inst✝ : IsScalarTower S R A
src✝ : S →+* Unitization R A := RingHom.comp (inlRingHom R A) (algebraMap S R)
s : S
x : Unitization R A
⊢ s • x =
    { toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
          map_add' :=
            (_ : ∀ (x y : S), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
        s *
      x

Next tactic:
induction' x using Unitization.ind with r a
instance instAlgebra : Algebra S (Unitization R A) :=
  { (Unitization.inlRingHom R A).comp (algebraMap S R) with
    commutes' := fun s x => by
      induction' x using Unitization.ind with r a
      show inl (algebraMap S R s) * _ = _ * inl (algebraMap S R s)
      rw [mul_add, add_mul, inl_mul_inl, inl_mul_inl, inl_mul_inr, inr_mul_inl, mul_comm]
    smul_def' := fun s x => by
      induction' x using Unitization.ind with r a
      

Proof state:
case h
S : Type u_1
R : Type u_2
A : Type u_3
inst✝⁸ : CommSemiring S
inst✝⁷ : CommSemiring R
inst✝⁶ : NonUnitalSemiring A
inst✝⁵ : Module R A
inst✝⁴ : IsScalarTower R A A
inst✝³ : SMulCommClass R A A
inst✝² : Algebra S R
inst✝¹ : DistribMulAction S A
inst✝ : IsScalarTower S R A
src✝ : S →+* Unitization R A := RingHom.comp (inlRingHom R A) (algebraMap S R)
s : S
r : R
a : A
⊢ s • (inl r + ↑a) =
    { toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
          map_add' :=
            (_ : ∀ (x y : S), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }
        s *
      (inl r + ↑a)

Next tactic:
show _ = inl (algebraMap S R s) * _
instance instAlgebra : Algebra S (Unitization R A) :=
  { (Unitization.inlRingHom R A).comp (algebraMap S R) with
    commutes' := fun s x => by
      induction' x using Unitization.ind with r a
      show inl (algebraMap S R s) * _ = _ * inl (algebraMap S R s)
      rw [mul_add, add_mul, inl_mul_inl, inl_mul_inl, inl_mul_inr, inr_mul_inl, mul_comm]
    smul_def' := fun s x => by
      induction' x using Unitization.ind with r a
      show _ = inl (algebraMap S R s) * _
      

Proof state:
case h
S : Type u_1
R : Type u_2
A : Type u_3
inst✝⁸ : CommSemiring S
inst✝⁷ : CommSemiring R
inst✝⁶ : NonUnitalSemiring A
inst✝⁵ : Module R A
inst✝⁴ : IsScalarTower R A A
inst✝³ : SMulCommClass R A A
inst✝² : Algebra S R
inst✝¹ : DistribMulAction S A
inst✝ : IsScalarTower S R A
src✝ : S →+* Unitization R A := RingHom.comp (inlRingHom R A) (algebraMap S R)
s : S
r : R
a : A
⊢ s • (inl r + ↑a) = inl ((algebraMap S R) s) * (inl r + ↑a)

Next tactic:
rw [mul_add, smul_add,Algebra.algebraMap_eq_smul_one, inl_mul_inl, inl_mul_inr, smul_one_mul,
        inl_smul, inr_smul, smul_one_smul]
theorem algHom_ext {F : Type*} [AlgHomClass F S (Unitization R A) B] {φ ψ : F}
    (h : ∀ a : A, φ a = ψ a)
    (h' : ∀ r, φ (algebraMap R (Unitization R A) r) = ψ (algebraMap R (Unitization R A) r)) :
    φ = ψ := by
  

Proof state:
S : Type u_1
R : Type u_2
A : Type u_3
inst✝¹³ : CommSemiring S
inst✝¹² : CommSemiring R
inst✝¹¹ : NonUnitalSemiring A
inst✝¹⁰ : Module R A
inst✝⁹ : SMulCommClass R A A
inst✝⁸ : IsScalarTower R A A
B : Type u_4
inst✝⁷ : Semiring B
inst✝⁶ : Algebra S B
inst✝⁵ : Algebra S R
inst✝⁴ : DistribMulAction S A
inst✝³ : IsScalarTower S R A
C : Type u_5
inst✝² : Semiring C
inst✝¹ : Algebra R C
F : Type u_6
inst✝ : AlgHomClass F S (Unitization R A) B
φ ψ : F
h : ∀ (a : A), φ ↑a = ψ ↑a
h' : ∀ (r : R), φ ((algebraMap R (Unitization R A)) r) = ψ ((algebraMap R (Unitization R A)) r)
⊢ φ = ψ

Next tactic:
refine FunLike.ext φ ψ (fun x ↦ ?_)
theorem algHom_ext {F : Type*} [AlgHomClass F S (Unitization R A) B] {φ ψ : F}
    (h : ∀ a : A, φ a = ψ a)
    (h' : ∀ r, φ (algebraMap R (Unitization R A) r) = ψ (algebraMap R (Unitization R A) r)) :
    φ = ψ := by
  refine FunLike.ext φ ψ (fun x ↦ ?_)
  

Proof state:
S : Type u_1
R : Type u_2
A : Type u_3
inst✝¹³ : CommSemiring S
inst✝¹² : CommSemiring R
inst✝¹¹ : NonUnitalSemiring A
inst✝¹⁰ : Module R A
inst✝⁹ : SMulCommClass R A A
inst✝⁸ : IsScalarTower R A A
B : Type u_4
inst✝⁷ : Semiring B
inst✝⁶ : Algebra S B
inst✝⁵ : Algebra S R
inst✝⁴ : DistribMulAction S A
inst✝³ : IsScalarTower S R A
C : Type u_5
inst✝² : Semiring C
inst✝¹ : Algebra R C
F : Type u_6
inst✝ : AlgHomClass F S (Unitization R A) B
φ ψ : F
h : ∀ (a : A), φ ↑a = ψ ↑a
h' : ∀ (r : R), φ ((algebraMap R (Unitization R A)) r) = ψ ((algebraMap R (Unitization R A)) r)
x : Unitization R A
⊢ φ x = ψ x

Next tactic:
induction x using Unitization.ind
theorem algHom_ext {F : Type*} [AlgHomClass F S (Unitization R A) B] {φ ψ : F}
    (h : ∀ a : A, φ a = ψ a)
    (h' : ∀ r, φ (algebraMap R (Unitization R A) r) = ψ (algebraMap R (Unitization R A) r)) :
    φ = ψ := by
  refine FunLike.ext φ ψ (fun x ↦ ?_)
  induction x using Unitization.ind
  

Proof state:
case h
S : Type u_1
R : Type u_2
A : Type u_3
inst✝¹³ : CommSemiring S
inst✝¹² : CommSemiring R
inst✝¹¹ : NonUnitalSemiring A
inst✝¹⁰ : Module R A
inst✝⁹ : SMulCommClass R A A
inst✝⁸ : IsScalarTower R A A
B : Type u_4
inst✝⁷ : Semiring B
inst✝⁶ : Algebra S B
inst✝⁵ : Algebra S R
inst✝⁴ : DistribMulAction S A
inst✝³ : IsScalarTower S R A
C : Type u_5
inst✝² : Semiring C
inst✝¹ : Algebra R C
F : Type u_6
inst✝ : AlgHomClass F S (Unitization R A) B
φ ψ : F
h : ∀ (a : A), φ ↑a = ψ ↑a
h' : ∀ (r : R), φ ((algebraMap R (Unitization R A)) r) = ψ ((algebraMap R (Unitization R A)) r)
r✝ : R
a✝ : A
⊢ φ (inl r✝ + ↑a✝) = ψ (inl r✝ + ↑a✝)

Next tactic:
simp only [map_add, ← algebraMap_eq_inl, h, h']
lemma algHom_ext'' {F : Type*} [AlgHomClass F R (Unitization R A) C] {φ ψ : F}
    (h : ∀ a : A, φ a = ψ a) : φ = ψ :=
  algHom_ext h (fun r => by 

Proof state:
S : Type u_1
R : Type u_2
A : Type u_3
inst✝¹³ : CommSemiring S
inst✝¹² : CommSemiring R
inst✝¹¹ : NonUnitalSemiring A
inst✝¹⁰ : Module R A
inst✝⁹ : SMulCommClass R A A
inst✝⁸ : IsScalarTower R A A
B : Type u_4
inst✝⁷ : Semiring B
inst✝⁶ : Algebra S B
inst✝⁵ : Algebra S R
inst✝⁴ : DistribMulAction S A
inst✝³ : IsScalarTower S R A
C : Type u_5
inst✝² : Semiring C
inst✝¹ : Algebra R C
F : Type u_6
inst✝ : AlgHomClass F R (Unitization R A) C
φ ψ : F
h : ∀ (a : A), φ ↑a = ψ ↑a
r : R
⊢ φ ((algebraMap R (Unitization R A)) r) = ψ ((algebraMap R (Unitization R A)) r)

Next tactic:
simp only [AlgHomClass.commutes]
/-- A non-unital algebra homomorphism from `A` into a unital `R`-algebra `C` lifts to a unital
algebra homomorphism from the unitization into `C`. This is extended to an `Equiv` in
`Unitization.lift` and that should be used instead. This declaration only exists for performance
reasons. -/
@[simps]
def _root_.NonUnitalAlgHom.toAlgHom (φ :A →ₙₐ[R] C) : Unitization R A →ₐ[R] C where
  toFun := fun x => algebraMap R C x.fst + φ x.snd
  map_one' := by 

Proof state:
S : Type u_1
R : Type u_2
A : Type u_3
inst✝¹² : CommSemiring S
inst✝¹¹ : CommSemiring R
inst✝¹⁰ : NonUnitalSemiring A
inst✝⁹ : Module R A
inst✝⁸ : SMulCommClass R A A
inst✝⁷ : IsScalarTower R A A
B : Type u_4
inst✝⁶ : Semiring B
inst✝⁵ : Algebra S B
inst✝⁴ : Algebra S R
inst✝³ : DistribMulAction S A
inst✝² : IsScalarTower S R A
C : Type u_5
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ : A →ₙₐ[R] C
⊢ (fun x => (algebraMap R C) (fst x) + φ (snd x)) 1 = 1

Next tactic:
simp only [fst_one, map_one, snd_one, φ.map_zero, add_zero]
/-- A non-unital algebra homomorphism from `A` into a unital `R`-algebra `C` lifts to a unital
algebra homomorphism from the unitization into `C`. This is extended to an `Equiv` in
`Unitization.lift` and that should be used instead. This declaration only exists for performance
reasons. -/
@[simps]
def _root_.NonUnitalAlgHom.toAlgHom (φ :A →ₙₐ[R] C) : Unitization R A →ₐ[R] C where
  toFun := fun x => algebraMap R C x.fst + φ x.snd
  map_one' := by simp only [fst_one, map_one, snd_one, φ.map_zero, add_zero]
  map_mul' := fun x y => by
    

Proof state:
S : Type u_1
R : Type u_2
A : Type u_3
inst✝¹² : CommSemiring S
inst✝¹¹ : CommSemiring R
inst✝¹⁰ : NonUnitalSemiring A
inst✝⁹ : Module R A
inst✝⁸ : SMulCommClass R A A
inst✝⁷ : IsScalarTower R A A
B : Type u_4
inst✝⁶ : Semiring B
inst✝⁵ : Algebra S B
inst✝⁴ : Algebra S R
inst✝³ : DistribMulAction S A
inst✝² : IsScalarTower S R A
C : Type u_5
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ : A →ₙₐ[R] C
x y : Unitization R A
⊢ OneHom.toFun
      { toFun := fun x => (algebraMap R C) (fst x) + φ (snd x), map_one' := (_ : (algebraMap R C) 1 + φ 0 = 1) }
      (x * y) =
    OneHom.toFun
        { toFun := fun x => (algebraMap R C) (fst x) + φ (snd x), map_one' := (_ : (algebraMap R C) 1 + φ 0 = 1) } x *
      OneHom.toFun
        { toFun := fun x => (algebraMap R C) (fst x) + φ (snd x), map_one' := (_ : (algebraMap R C) 1 + φ 0 = 1) } y

Next tactic:
induction' x using Unitization.ind with x_r x_a
/-- A non-unital algebra homomorphism from `A` into a unital `R`-algebra `C` lifts to a unital
algebra homomorphism from the unitization into `C`. This is extended to an `Equiv` in
`Unitization.lift` and that should be used instead. This declaration only exists for performance
reasons. -/
@[simps]
def _root_.NonUnitalAlgHom.toAlgHom (φ :A →ₙₐ[R] C) : Unitization R A →ₐ[R] C where
  toFun := fun x => algebraMap R C x.fst + φ x.snd
  map_one' := by simp only [fst_one, map_one, snd_one, φ.map_zero, add_zero]
  map_mul' := fun x y => by
    induction' x using Unitization.ind with x_r x_a
    

Proof state:
case h
S : Type u_1
R : Type u_2
A : Type u_3
inst✝¹² : CommSemiring S
inst✝¹¹ : CommSemiring R
inst✝¹⁰ : NonUnitalSemiring A
inst✝⁹ : Module R A
inst✝⁸ : SMulCommClass R A A
inst✝⁷ : IsScalarTower R A A
B : Type u_4
inst✝⁶ : Semiring B
inst✝⁵ : Algebra S B
inst✝⁴ : Algebra S R
inst✝³ : DistribMulAction S A
inst✝² : IsScalarTower S R A
C : Type u_5
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ : A →ₙₐ[R] C
y : Unitization R A
x_r : R
x_a : A
⊢ OneHom.toFun
      { toFun := fun x => (algebraMap R C) (fst x) + φ (snd x), map_one' := (_ : (algebraMap R C) 1 + φ 0 = 1) }
      ((inl x_r + ↑x_a) * y) =
    OneHom.toFun
        { toFun := fun x => (algebraMap R C) (fst x) + φ (snd x), map_one' := (_ : (algebraMap R C) 1 + φ 0 = 1) }
        (inl x_r + ↑x_a) *
      OneHom.toFun
        { toFun := fun x => (algebraMap R C) (fst x) + φ (snd x), map_one' := (_ : (algebraMap R C) 1 + φ 0 = 1) } y

Next tactic:
induction' y using Unitization.ind with y_r y_a