/-- The ring equivalence between `RingQuot r` and `(Ideal.ofRel r).quotient`
-/
def ringQuotEquivIdealQuotient (r : B → B → Prop) : RingQuot r ≃+* B ⧸ Ideal.ofRel r :=
  RingEquiv.ofHomInv (ringQuotToIdealQuotient r) (idealQuotientToRingQuot r)
    (by
      ext x
      simp_rw [ringQuotToIdealQuotient, lift_def, preLift_def, mkRingHom_def]
      change mkRingHom r x = _
      rw [mkRingHom_def]
      rfl)
    (by
      ext x
      simp_rw [ringQuotToIdealQuotient, lift_def, preLift_def, mkRingHom_def]
      

Proof state:
case h.a
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 uR
inst✝ : CommRing B
r : B → B → Prop
x : B
⊢ (RingHom.comp
        (RingHom.comp
          ↑({
                toFun := fun f =>
                  {
                    toMonoidHom :=
                      {
                        toOneHom :=
                          { toFun := fun x => Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                            map_one' := (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) },
                        map_mul' :=
                          (_ :
                            ∀ (x y : RingQuot r),
                              OneHom.toFun
                                  { toFun := fun x => Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                    map_one' :=
                                      (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) }
                                  (x * y) =
                                OneHom.toFun
                                    {
                                      toFun := fun x =>
                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                      map_one' :=
                                        (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) }
                                    x *
                                  OneHom.toFun
                                    {
                                      toFun := fun x =>
                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                      map_one' :=
                                        (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) }
                                    y) },
                    map_zero' := (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 0.toQuot = 0),
                    map_add' :=
                      (_ :
                        ∀ (x y : RingQuot r),
                          OneHom.toFun
                              (↑{
                                  toOneHom :=
                                    {
                                      toFun := fun x =>
                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                      map_one' :=
                                        (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : RingQuot r),
                                        OneHom.toFun
                                            {
                                              toFun := fun x =>
                                                Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                              map_one' :=
                                                (_ :
                                                  Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot =
                                                    1) }
                                            (x * y) =
                                          OneHom.toFun
                                              {
                                                toFun := fun x =>
                                                  Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                map_one' :=
                                                  (_ :
                                                    Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot =
                                                      1) }
                                              x *
                                            OneHom.toFun
                                              {
                                                toFun := fun x =>
                                                  Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                map_one' :=
                                                  (_ :
                                                    Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot =
                                                      1) }
                                              y) })
                              (x + y) =
                            OneHom.toFun
                                (↑{
                                    toOneHom :=
                                      {
                                        toFun := fun x =>
                                          Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                        map_one' :=
                                          (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : RingQuot r),
                                          OneHom.toFun
                                              {
                                                toFun := fun x =>
                                                  Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                map_one' :=
                                                  (_ :
                                                    Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot =
                                                      1) }
                                              (x * y) =
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          1.toQuot =
                                                        1) }
                                                x *
                                              OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          1.toQuot =
                                                        1) }
                                                y) })
                                x +
                              OneHom.toFun
                                (↑{
                                    toOneHom :=
                                      {
                                        toFun := fun x =>
                                          Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                        map_one' :=
                                          (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : RingQuot r),
                                          OneHom.toFun
                                              {
                                                toFun := fun x =>
                                                  Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                map_one' :=
                                                  (_ :
                                                    Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot =
                                                      1) }
                                              (x * y) =
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          1.toQuot =
                                                        1) }
                                                x *
                                              OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          1.toQuot =
                                                        1) }
                                                y) })
                                y) },
                invFun := fun F =>
                  {
                    val :=
                      RingHom.comp F
                        {
                          toMonoidHom :=
                            {
                              toOneHom :=
                                { toFun := fun x => { toQuot := Quot.mk (Rel r) x },
                                  map_one' := (_ : { toQuot := Quot.mk (Rel r) 1 } = 1) },
                              map_mul' :=
                                (_ :
                                  ∀ (a a_1 : B),
                                    { toQuot := Quot.mk (Rel r) (a * a_1) } =
                                      { toQuot := Quot.mk (Rel r) a } * { toQuot := Quot.mk (Rel r) a_1 }) },
                          map_zero' := (_ : { toQuot := Quot.mk (Rel r) 0 } = 0),
                          map_add' :=
                            (_ :
                              ∀ (a a_1 : B),
                                { toQuot := Quot.mk (Rel r) (a + a_1) } =
                                  { toQuot := Quot.mk (Rel r) a } + { toQuot := Quot.mk (Rel r) a_1 }) },
                    property :=
                      (_ :
                        (fun f => ∀ ⦃x y : B⦄, r x y → f x = f y)
                          (RingHom.comp F
                            {
                              toMonoidHom :=
                                {
                                  toOneHom :=
                                    { toFun := fun x => { toQuot := Quot.mk (Rel r) x },
                                      map_one' := (_ : { toQuot := Quot.mk (Rel r) 1 } = 1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (a a_1 : B),
                                        { toQuot := Quot.mk (Rel r) (a * a_1) } =
                                          { toQuot := Quot.mk (Rel r) a } * { toQuot := Quot.mk (Rel r) a_1 }) },
                              map_zero' := (_ : { toQuot := Quot.mk (Rel r) 0 } = 0),
                              map_add' :=
                                (_ :
                                  ∀ (a a_1 : B),
                                    { toQuot := Quot.mk (Rel r) (a + a_1) } =
                                      { toQuot := Quot.mk (Rel r) a } + { toQuot := Quot.mk (Rel r) a_1 }) })) },
                left_inv :=
                  (_ :
                    Function.LeftInverse
                      (fun F =>
                        {
                          val :=
                            RingHom.comp F
                              {
                                toMonoidHom :=
                                  {
                                    toOneHom :=
                                      { toFun := fun x => { toQuot := Quot.mk (Rel r) x },
                                        map_one' := (_ : { toQuot := Quot.mk (Rel r) 1 } = 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (a a_1 : B),
                                          { toQuot := Quot.mk (Rel r) (a * a_1) } =
                                            { toQuot := Quot.mk (Rel r) a } * { toQuot := Quot.mk (Rel r) a_1 }) },
                                map_zero' := (_ : { toQuot := Quot.mk (Rel r) 0 } = 0),
                                map_add' :=
                                  (_ :
                                    ∀ (a a_1 : B),
                                      { toQuot := Quot.mk (Rel r) (a + a_1) } =
                                        { toQuot := Quot.mk (Rel r) a } + { toQuot := Quot.mk (Rel r) a_1 }) },
                          property :=
                            (_ :
                              (fun f => ∀ ⦃x y : B⦄, r x y → f x = f y)
                                (RingHom.comp F
                                  {
                                    toMonoidHom :=
                                      {
                                        toOneHom :=
                                          { toFun := fun x => { toQuot := Quot.mk (Rel r) x },
                                            map_one' := (_ : { toQuot := Quot.mk (Rel r) 1 } = 1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (a a_1 : B),
                                              { toQuot := Quot.mk (Rel r) (a * a_1) } =
                                                { toQuot := Quot.mk (Rel r) a } * { toQuot := Quot.mk (Rel r) a_1 }) },
                                    map_zero' := (_ : { toQuot := Quot.mk (Rel r) 0 } = 0),
                                    map_add' :=
                                      (_ :
                                        ∀ (a a_1 : B),
                                          { toQuot := Quot.mk (Rel r) (a + a_1) } =
                                            { toQuot := Quot.mk (Rel r) a } + { toQuot := Quot.mk (Rel r) a_1 }) })) })
                      fun f =>
                      {
                        toMonoidHom :=
                          {
                            toOneHom :=
                              { toFun := fun x => Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                map_one' :=
                                  (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) },
                            map_mul' :=
                              (_ :
                                ∀ (x y : RingQuot r),
                                  OneHom.toFun
                                      {
                                        toFun := fun x =>
                                          Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                        map_one' :=
                                          (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) }
                                      (x * y) =
                                    OneHom.toFun
                                        {
                                          toFun := fun x =>
                                            Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) }
                                        x *
                                      OneHom.toFun
                                        {
                                          toFun := fun x =>
                                            Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) }
                                        y) },
                        map_zero' := (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 0.toQuot = 0),
                        map_add' :=
                          (_ :
                            ∀ (x y : RingQuot r),
                              OneHom.toFun
                                  (↑{
                                      toOneHom :=
                                        {
                                          toFun := fun x =>
                                            Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (x y : RingQuot r),
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          1.toQuot =
                                                        1) }
                                                (x * y) =
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  x *
                                                OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  y) })
                                  (x + y) =
                                OneHom.toFun
                                    (↑{
                                        toOneHom :=
                                          {
                                            toFun := fun x =>
                                              Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot =
                                                  1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (x y : RingQuot r),
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  (x * y) =
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                              1.toQuot =
                                                            1) }
                                                    x *
                                                  OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                              1.toQuot =
                                                            1) }
                                                    y) })
                                    x +
                                  OneHom.toFun
                                    (↑{
                                        toOneHom :=
                                          {
                                            toFun := fun x =>
                                              Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot =
                                                  1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (x y : RingQuot r),
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  (x * y) =
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                              1.toQuot =
                                                            1) }
                                                    x *
                                                  OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                              1.toQuot =
                                                            1) }
                                                    y) })
                                    y) }),
                right_inv :=
                  (_ :
                    Function.RightInverse
                      (fun F =>
                        {
                          val :=
                            RingHom.comp F
                              {
                                toMonoidHom :=
                                  {
                                    toOneHom :=
                                      { toFun := fun x => { toQuot := Quot.mk (Rel r) x },
                                        map_one' := (_ : { toQuot := Quot.mk (Rel r) 1 } = 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (a a_1 : B),
                                          { toQuot := Quot.mk (Rel r) (a * a_1) } =
                                            { toQuot := Quot.mk (Rel r) a } * { toQuot := Quot.mk (Rel r) a_1 }) },
                                map_zero' := (_ : { toQuot := Quot.mk (Rel r) 0 } = 0),
                                map_add' :=
                                  (_ :
                                    ∀ (a a_1 : B),
                                      { toQuot := Quot.mk (Rel r) (a + a_1) } =
                                        { toQuot := Quot.mk (Rel r) a } + { toQuot := Quot.mk (Rel r) a_1 }) },
                          property :=
                            (_ :
                              (fun f => ∀ ⦃x y : B⦄, r x y → f x = f y)
                                (RingHom.comp F
                                  {
                                    toMonoidHom :=
                                      {
                                        toOneHom :=
                                          { toFun := fun x => { toQuot := Quot.mk (Rel r) x },
                                            map_one' := (_ : { toQuot := Quot.mk (Rel r) 1 } = 1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (a a_1 : B),
                                              { toQuot := Quot.mk (Rel r) (a * a_1) } =
                                                { toQuot := Quot.mk (Rel r) a } * { toQuot := Quot.mk (Rel r) a_1 }) },
                                    map_zero' := (_ : { toQuot := Quot.mk (Rel r) 0 } = 0),
                                    map_add' :=
                                      (_ :
                                        ∀ (a a_1 : B),
                                          { toQuot := Quot.mk (Rel r) (a + a_1) } =
                                            { toQuot := Quot.mk (Rel r) a } + { toQuot := Quot.mk (Rel r) a_1 }) })) })
                      fun f =>
                      {
                        toMonoidHom :=
                          {
                            toOneHom :=
                              { toFun := fun x => Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                map_one' :=
                                  (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) },
                            map_mul' :=
                              (_ :
                                ∀ (x y : RingQuot r),
                                  OneHom.toFun
                                      {
                                        toFun := fun x =>
                                          Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                        map_one' :=
                                          (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) }
                                      (x * y) =
                                    OneHom.toFun
                                        {
                                          toFun := fun x =>
                                            Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) }
                                        x *
                                      OneHom.toFun
                                        {
                                          toFun := fun x =>
                                            Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) }
                                        y) },
                        map_zero' := (_ : Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 0.toQuot = 0),
                        map_add' :=
                          (_ :
                            ∀ (x y : RingQuot r),
                              OneHom.toFun
                                  (↑{
                                      toOneHom :=
                                        {
                                          toFun := fun x =>
                                            Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot = 1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (x y : RingQuot r),
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          1.toQuot =
                                                        1) }
                                                (x * y) =
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  x *
                                                OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  y) })
                                  (x + y) =
                                OneHom.toFun
                                    (↑{
                                        toOneHom :=
                                          {
                                            toFun := fun x =>
                                              Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot =
                                                  1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (x y : RingQuot r),
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  (x * y) =
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                              1.toQuot =
                                                            1) }
                                                    x *
                                                  OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                              1.toQuot =
                                                            1) }
                                                    y) })
                                    x +
                                  OneHom.toFun
                                    (↑{
                                        toOneHom :=
                                          {
                                            toFun := fun x =>
                                              Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) 1.toQuot =
                                                  1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (x y : RingQuot r),
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b) x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  (x * y) =
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                              1.toQuot =
                                                            1) }
                                                    x *
                                                  OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ⇑↑f (_ : ∀ (a b : B), Rel r a b → ↑f a = ↑f b)
                                                              1.toQuot =
                                                            1) }
                                                    y) })
                                    y) }) }
              { val := Ideal.Quotient.mk (Ideal.ofRel r),
                property :=
                  (_ :
                    ∀ (x y : B),
                      r x y → (Ideal.Quotient.mk (Ideal.ofRel r)) x = (Ideal.Quotient.mk (Ideal.ofRel r)) y) })
          ↑(idealQuotientToRingQuot r))
        (Ideal.Quotient.mk (Ideal.ofRel r)))
      x =
    (RingHom.comp (RingHom.id (B ⧸ Ideal.ofRel r)) (Ideal.Quotient.mk (Ideal.ofRel r))) x

Next tactic:
change Quot.lift _ _ ((mkRingHom r) x).toQuot = _