instance instAlgebra {A} [CommSemiring A] [Algebra R A] : Algebra R (FreeAlgebra A X) where
  toRingHom := ({
      toFun := fun r => Quot.mk _ r
      map_one' := rfl
      map_mul' := fun _ _ => Quot.sound Rel.mul_scalar
      map_zero' := rfl
      map_add' := fun _ _ => Quot.sound Rel.add_scalar } : A →+* FreeAlgebra A X).comp
      (algebraMap R A)
  commutes' _ := by
    

Proof state:
R : Type u_1
inst✝² : CommSemiring R
X : Type u_2
A : Type ?u.70928
inst✝¹ : CommSemiring A
inst✝ : Algebra R A
x✝ : R
⊢ ∀ (x : FreeAlgebra A X),
    (RingHom.comp
            {
              toMonoidHom :=
                {
                  toOneHom :=
                    { toFun := fun r => Quot.mk (Rel A X) (Pre.ofScalar r),
                      map_one' :=
                        (_ :
                          (fun r => Quot.mk (Rel A X) (Pre.ofScalar r)) 1 =
                            (fun r => Quot.mk (Rel A X) (Pre.ofScalar r)) 1) },
                  map_mul' :=
                    (_ :
                      ∀ (x x_1 : A),
                        Quot.mk (Rel A X) (Pre.ofScalar (x * x_1)) =
                          Quot.mk (Rel A X) (Pre.ofScalar x * Pre.ofScalar x_1)) },
              map_zero' :=
                (_ :
                  OneHom.toFun
                      (↑{
                          toOneHom :=
                            { toFun := fun r => Quot.mk (Rel A X) (Pre.ofScalar r),
                              map_one' :=
                                (_ :
                                  (fun r => Quot.mk (Rel A X) (Pre.ofScalar r)) 1 =
                                    (fun r => Quot.mk (Rel A X) (Pre.ofScalar r)) 1) },
                          map_mul' :=
                            (_ :
                              ∀ (x x_1 : A),
                                Quot.mk (Rel A X) (Pre.ofScalar (x * x_1)) =
                                  Quot.mk (Rel A X) (Pre.ofScalar x * Pre.ofScalar x_1)) })
                      0 =
                    OneHom.toFun
                      (↑{
                          toOneHom :=
                            { toFun := fun r => Quot.mk (Rel A X) (Pre.ofScalar r),
                              map_one' :=
                                (_ :
                                  (fun r => Quot.mk (Rel A X) (Pre.ofScalar r)) 1 =
                                    (fun r => Quot.mk (Rel A X) (Pre.ofScalar r)) 1) },
                          map_mul' :=
                            (_ :
                              ∀ (x x_1 : A),
                                Quot.mk (Rel A X) (Pre.ofScalar (x * x_1)) =
                                  Quot.mk (Rel A X) (Pre.ofScalar x * Pre.ofScalar x_1)) })
                      0),
              map_add' :=
                (_ :
                  ∀ (x x_1 : A),
                    Quot.mk (Rel A X) (Pre.ofScalar (x + x_1)) =
                      Quot.mk (Rel A X) (Pre.ofScalar x + Pre.ofScalar x_1)) }
            (algebraMap R A))
          x✝ *
        x =
      x *
        (RingHom.comp
            {
              toMonoidHom :=
                {
                  toOneHom :=
                    { toFun := fun r => Quot.mk (Rel A X) (Pre.ofScalar r),
                      map_one' :=
                        (_ :
                          (fun r => Quot.mk (Rel A X) (Pre.ofScalar r)) 1 =
                            (fun r => Quot.mk (Rel A X) (Pre.ofScalar r)) 1) },
                  map_mul' :=
                    (_ :
                      ∀ (x x_1 : A),
                        Quot.mk (Rel A X) (Pre.ofScalar (x * x_1)) =
                          Quot.mk (Rel A X) (Pre.ofScalar x * Pre.ofScalar x_1)) },
              map_zero' :=
                (_ :
                  OneHom.toFun
                      (↑{
                          toOneHom :=
                            { toFun := fun r => Quot.mk (Rel A X) (Pre.ofScalar r),
                              map_one' :=
                                (_ :
                                  (fun r => Quot.mk (Rel A X) (Pre.ofScalar r)) 1 =
                                    (fun r => Quot.mk (Rel A X) (Pre.ofScalar r)) 1) },
                          map_mul' :=
                            (_ :
                              ∀ (x x_1 : A),
                                Quot.mk (Rel A X) (Pre.ofScalar (x * x_1)) =
                                  Quot.mk (Rel A X) (Pre.ofScalar x * Pre.ofScalar x_1)) })
                      0 =
                    OneHom.toFun
                      (↑{
                          toOneHom :=
                            { toFun := fun r => Quot.mk (Rel A X) (Pre.ofScalar r),
                              map_one' :=
                                (_ :
                                  (fun r => Quot.mk (Rel A X) (Pre.ofScalar r)) 1 =
                                    (fun r => Quot.mk (Rel A X) (Pre.ofScalar r)) 1) },
                          map_mul' :=
                            (_ :
                              ∀ (x x_1 : A),
                                Quot.mk (Rel A X) (Pre.ofScalar (x * x_1)) =
                                  Quot.mk (Rel A X) (Pre.ofScalar x * Pre.ofScalar x_1)) })
                      0),
              map_add' :=
                (_ :
                  ∀ (x x_1 : A),
                    Quot.mk (Rel A X) (Pre.ofScalar (x + x_1)) =
                      Quot.mk (Rel A X) (Pre.ofScalar x + Pre.ofScalar x_1)) }
            (algebraMap R A))
          x✝

Next tactic:
rintro ⟨⟩