@[simp]
theorem ringQuotToIdealQuotient_apply (r : B → B → Prop) (x : B) :
    ringQuotToIdealQuotient r (mkRingHom r x) = Ideal.Quotient.mk (Ideal.ofRel r) x := by
  simp_rw [ringQuotToIdealQuotient, lift_def, preLift_def, mkRingHom_def]
  

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 uR
inst✝ : CommRing B
r : B → B → Prop
x : B
⊢ ({
          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) })
      ({
          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 }) }
        x) =
    (Ideal.Quotient.mk (Ideal.ofRel r)) x

Next tactic:
rfl