irreducible_def preLiftAlgHom {s : A → A → Prop} { f : A →ₐ[S] B }
  (h : ∀ ⦃x y⦄, s x y → f x = f y) : RingQuot s →ₐ[S] B :=
{ toFun := fun x ↦ Quot.lift f
            (by
              rintro _ _ r
              induction r with
              | of r => exact h r
              | add_left _ r' => simp only [map_add, r']
              | mul_left _ r' => simp only [map_mul, r']
              | mul_right _ r' => simp only [map_mul, r'])
            x.toQuot
  map_zero' := by simp only [← zero_quot, f.map_zero]
  map_add' := by
    rintro ⟨⟨x⟩⟩ ⟨⟨y⟩⟩
    simp only [add_quot, f.map_add x y]
  map_one' := by simp only [← one_quot, f.map_one]
  map_mul' := by
    rintro ⟨⟨x⟩⟩ ⟨⟨y⟩⟩
    simp only [mul_quot, f.map_mul x y]
  commutes' := by
    

Proof state:
R : Type uR
inst✝⁶ : Semiring R
S : Type uS
inst✝⁵ : CommSemiring S
T : Type uT
A : Type uA
inst✝⁴ : Semiring A
inst✝³ : Algebra S A
r : R → R → Prop
inst✝² : Semiring T
B : Type u₄
inst✝¹ : Semiring B
inst✝ : Algebra S B
s : A → A → Prop
f : A →ₐ[S] B
h : ∀ ⦃x y : A⦄, s x y → f x = f y
⊢ ∀ (r : S),
    OneHom.toFun
        (↑↑{
              toMonoidHom :=
                {
                  toOneHom :=
                    { toFun := fun x => Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                      map_one' := (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) },
                  map_mul' :=
                    (_ :
                      ∀ (x y : RingQuot s),
                        OneHom.toFun
                            { toFun := fun x => Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                              map_one' := (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) }
                            (x * y) =
                          OneHom.toFun
                              { toFun := fun x => Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                map_one' := (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) }
                              x *
                            OneHom.toFun
                              { toFun := fun x => Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                map_one' := (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) }
                              y) },
              map_zero' := (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 0.toQuot = 0),
              map_add' :=
                (_ :
                  ∀ (x y : RingQuot s),
                    OneHom.toFun
                        (↑{
                            toOneHom :=
                              { toFun := fun x => Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                map_one' := (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) },
                            map_mul' :=
                              (_ :
                                ∀ (x y : RingQuot s),
                                  OneHom.toFun
                                      {
                                        toFun := fun x =>
                                          Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                        map_one' :=
                                          (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) }
                                      (x * y) =
                                    OneHom.toFun
                                        {
                                          toFun := fun x =>
                                            Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                          map_one' :=
                                            (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) }
                                        x *
                                      OneHom.toFun
                                        {
                                          toFun := fun x =>
                                            Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                          map_one' :=
                                            (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) }
                                        y) })
                        (x + y) =
                      OneHom.toFun
                          (↑{
                              toOneHom :=
                                { toFun := fun x => Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                  map_one' :=
                                    (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) },
                              map_mul' :=
                                (_ :
                                  ∀ (x y : RingQuot s),
                                    OneHom.toFun
                                        {
                                          toFun := fun x =>
                                            Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                          map_one' :=
                                            (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) }
                                        (x * y) =
                                      OneHom.toFun
                                          {
                                            toFun := fun x =>
                                              Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                            map_one' :=
                                              (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) }
                                          x *
                                        OneHom.toFun
                                          {
                                            toFun := fun x =>
                                              Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                            map_one' :=
                                              (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) }
                                          y) })
                          x +
                        OneHom.toFun
                          (↑{
                              toOneHom :=
                                { toFun := fun x => Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                  map_one' :=
                                    (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) },
                              map_mul' :=
                                (_ :
                                  ∀ (x y : RingQuot s),
                                    OneHom.toFun
                                        {
                                          toFun := fun x =>
                                            Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                          map_one' :=
                                            (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) }
                                        (x * y) =
                                      OneHom.toFun
                                          {
                                            toFun := fun x =>
                                              Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                            map_one' :=
                                              (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) }
                                          x *
                                        OneHom.toFun
                                          {
                                            toFun := fun x =>
                                              Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) x.toQuot,
                                            map_one' :=
                                              (_ : Quot.lift ⇑f (_ : ∀ (a b : A), Rel s a b → f a = f b) 1.toQuot = 1) }
                                          y) })
                          y) })
        ((algebraMap S (RingQuot s)) r) =
      (algebraMap S B) r

Next tactic:
rintro x