Theorem: RingQuot.lift_mkRingHom_apply
File: Mathlib/Algebra/RingQuot.lean

tactic: simp_rw [lift_def, preLift_def, mkRingHom_def]
state_before: R : Type u₁
inst✝⁴ : Semiring R
S : Type u₂
inst✝³ : CommSemiring S
A : Type u₃
inst✝² : Semiring A
inst✝¹ : Algebra S A
r✝ : R → R → Prop
T : Type u₄
inst✝ : Semiring T
f : R →+* T
r : R → R → Prop
w : ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y
x : R
⊢ ↑(↑lift { val := f, property := w }) (↑(mkRingHom r) x) = ↑f x

tactic: rfl
state_before: R : Type u₁
inst✝⁴ : Semiring R
S : Type u₂
inst✝³ : CommSemiring S
A : Type u₃
inst✝² : Semiring A
inst✝¹ : Algebra S A
r✝ : R → R → Prop
T : Type u₄
inst✝ : Semiring T
f : R →+* T
r : R → R → Prop
w : ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y
x : R
⊢ ↑(↑{
              toFun := fun f =>
                {
                  toMonoidHom :=
                    {
                      toOneHom :=
                        {
                          toFun := fun x =>
                            Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b) x.toQuot,
                          map_one' :=
                            (_ :
                              Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b) 1.toQuot =
                                1) },
                      map_mul' :=
                        (_ :
                          ∀ (x y : RingQuot fun x y => r x y),
                            OneHom.toFun
                                {
                                  toFun := fun x =>
                                    Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                      x.toQuot,
                                  map_one' :=
                                    (_ :
                                      Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                          1.toQuot =
                                        1) }
                                (x * y) =
                              OneHom.toFun
                                  {
                                    toFun := fun x =>
                                      Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                        x.toQuot,
                                    map_one' :=
                                      (_ :
                                        Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                            1.toQuot =
                                          1) }
                                  x *
                                OneHom.toFun
                                  {
                                    toFun := fun x =>
                                      Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                        x.toQuot,
                                    map_one' :=
                                      (_ :
                                        Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                            1.toQuot =
                                          1) }
                                  y) },
                  map_zero' :=
                    (_ : Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b) 0.toQuot = 0),
                  map_add' :=
                    (_ :
                      ∀ (x y : RingQuot fun x y => r x y),
                        OneHom.toFun
                            (↑{
                                toOneHom :=
                                  {
                                    toFun := fun x =>
                                      Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                        x.toQuot,
                                    map_one' :=
                                      (_ :
                                        Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                            1.toQuot =
                                          1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (x y : RingQuot fun x y => r x y),
                                      OneHom.toFun
                                          {
                                            toFun := fun x =>
                                              Quot.lift ↑↑f
                                                (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b) x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ↑↑f
                                                    (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                    1.toQuot =
                                                  1) }
                                          (x * y) =
                                        OneHom.toFun
                                            {
                                              toFun := fun x =>
                                                Quot.lift ↑↑f
                                                  (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                  x.toQuot,
                                              map_one' :=
                                                (_ :
                                                  Quot.lift ↑↑f
                                                      (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                      1.toQuot =
                                                    1) }
                                            x *
                                          OneHom.toFun
                                            {
                                              toFun := fun x =>
                                                Quot.lift ↑↑f
                                                  (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                  x.toQuot,
                                              map_one' :=
                                                (_ :
                                                  Quot.lift ↑↑f
                                                      (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                      1.toQuot =
                                                    1) }
                                            y) })
                            (x + y) =
                          OneHom.toFun
                              (↑{
                                  toOneHom :=
                                    {
                                      toFun := fun x =>
                                        Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                          x.toQuot,
                                      map_one' :=
                                        (_ :
                                          Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                              1.toQuot =
                                            1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : RingQuot fun x y => r x y),
                                        OneHom.toFun
                                            {
                                              toFun := fun x =>
                                                Quot.lift ↑↑f
                                                  (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                  x.toQuot,
                                              map_one' :=
                                                (_ :
                                                  Quot.lift ↑↑f
                                                      (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                      1.toQuot =
                                                    1) }
                                            (x * y) =
                                          OneHom.toFun
                                              {
                                                toFun := fun x =>
                                                  Quot.lift ↑↑f
                                                    (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                    x.toQuot,
                                                map_one' :=
                                                  (_ :
                                                    Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                        1.toQuot =
                                                      1) }
                                              x *
                                            OneHom.toFun
                                              {
                                                toFun := fun x =>
                                                  Quot.lift ↑↑f
                                                    (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                    x.toQuot,
                                                map_one' :=
                                                  (_ :
                                                    Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                        1.toQuot =
                                                      1) }
                                              y) })
                              x +
                            OneHom.toFun
                              (↑{
                                  toOneHom :=
                                    {
                                      toFun := fun x =>
                                        Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                          x.toQuot,
                                      map_one' :=
                                        (_ :
                                          Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                              1.toQuot =
                                            1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : RingQuot fun x y => r x y),
                                        OneHom.toFun
                                            {
                                              toFun := fun x =>
                                                Quot.lift ↑↑f
                                                  (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                  x.toQuot,
                                              map_one' :=
                                                (_ :
                                                  Quot.lift ↑↑f
                                                      (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                      1.toQuot =
                                                    1) }
                                            (x * y) =
                                          OneHom.toFun
                                              {
                                                toFun := fun x =>
                                                  Quot.lift ↑↑f
                                                    (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                    x.toQuot,
                                                map_one' :=
                                                  (_ :
                                                    Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                        1.toQuot =
                                                      1) }
                                              x *
                                            OneHom.toFun
                                              {
                                                toFun := fun x =>
                                                  Quot.lift ↑↑f
                                                    (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                    x.toQuot,
                                                map_one' :=
                                                  (_ :
                                                    Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) 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 fun x y => r x y) x },
                                map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => r x y) 1 } = 1) },
                            map_mul' :=
                              (_ :
                                ∀ (a a_1 : R),
                                  { toQuot := Quot.mk (Rel fun x y => r x y) (a * a_1) } =
                                    { toQuot := Quot.mk (Rel fun x y => r x y) a } *
                                      { toQuot := Quot.mk (Rel fun x y => r x y) a_1 }) },
                        map_zero' := (_ : { toQuot := Quot.mk (Rel fun x y => r x y) 0 } = 0),
                        map_add' :=
                          (_ :
                            ∀ (a a_1 : R),
                              { toQuot := Quot.mk (Rel fun x y => r x y) (a + a_1) } =
                                { toQuot := Quot.mk (Rel fun x y => r x y) a } +
                                  { toQuot := Quot.mk (Rel fun x y => r x y) a_1 }) },
                  property :=
                    (_ :
                      (fun f => ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y)
                        (RingHom.comp F
                          {
                            toMonoidHom :=
                              {
                                toOneHom :=
                                  { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => r x y) x },
                                    map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => r x y) 1 } = 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (a a_1 : R),
                                      { toQuot := Quot.mk (Rel fun x y => r x y) (a * a_1) } =
                                        { toQuot := Quot.mk (Rel fun x y => r x y) a } *
                                          { toQuot := Quot.mk (Rel fun x y => r x y) a_1 }) },
                            map_zero' := (_ : { toQuot := Quot.mk (Rel fun x y => r x y) 0 } = 0),
                            map_add' :=
                              (_ :
                                ∀ (a a_1 : R),
                                  { toQuot := Quot.mk (Rel fun x y => r x y) (a + a_1) } =
                                    { toQuot := Quot.mk (Rel fun x y => r x y) a } +
                                      { toQuot := Quot.mk (Rel fun x y => r x y) a_1 }) })) },
              left_inv :=
                (_ :
                  Function.LeftInverse
                    (fun F =>
                      {
                        val :=
                          RingHom.comp F
                            {
                              toMonoidHom :=
                                {
                                  toOneHom :=
                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => r x y) x },
                                      map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => r x y) 1 } = 1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (a a_1 : R),
                                        { toQuot := Quot.mk (Rel fun x y => r x y) (a * a_1) } =
                                          { toQuot := Quot.mk (Rel fun x y => r x y) a } *
                                            { toQuot := Quot.mk (Rel fun x y => r x y) a_1 }) },
                              map_zero' := (_ : { toQuot := Quot.mk (Rel fun x y => r x y) 0 } = 0),
                              map_add' :=
                                (_ :
                                  ∀ (a a_1 : R),
                                    { toQuot := Quot.mk (Rel fun x y => r x y) (a + a_1) } =
                                      { toQuot := Quot.mk (Rel fun x y => r x y) a } +
                                        { toQuot := Quot.mk (Rel fun x y => r x y) a_1 }) },
                        property :=
                          (_ :
                            (fun f => ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y)
                              (RingHom.comp F
                                {
                                  toMonoidHom :=
                                    {
                                      toOneHom :=
                                        { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => r x y) x },
                                          map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => r x y) 1 } = 1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (a a_1 : R),
                                            { toQuot := Quot.mk (Rel fun x y => r x y) (a * a_1) } =
                                              { toQuot := Quot.mk (Rel fun x y => r x y) a } *
                                                { toQuot := Quot.mk (Rel fun x y => r x y) a_1 }) },
                                  map_zero' := (_ : { toQuot := Quot.mk (Rel fun x y => r x y) 0 } = 0),
                                  map_add' :=
                                    (_ :
                                      ∀ (a a_1 : R),
                                        { toQuot := Quot.mk (Rel fun x y => r x y) (a + a_1) } =
                                          { toQuot := Quot.mk (Rel fun x y => r x y) a } +
                                            { toQuot := Quot.mk (Rel fun x y => r x y) a_1 }) })) })
                    fun f =>
                    {
                      toMonoidHom :=
                        {
                          toOneHom :=
                            {
                              toFun := fun x =>
                                Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b) x.toQuot,
                              map_one' :=
                                (_ :
                                  Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b) 1.toQuot =
                                    1) },
                          map_mul' :=
                            (_ :
                              ∀ (x y : RingQuot fun x y => r x y),
                                OneHom.toFun
                                    {
                                      toFun := fun x =>
                                        Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                          x.toQuot,
                                      map_one' :=
                                        (_ :
                                          Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                              1.toQuot =
                                            1) }
                                    (x * y) =
                                  OneHom.toFun
                                      {
                                        toFun := fun x =>
                                          Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                            x.toQuot,
                                        map_one' :=
                                          (_ :
                                            Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                1.toQuot =
                                              1) }
                                      x *
                                    OneHom.toFun
                                      {
                                        toFun := fun x =>
                                          Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                            x.toQuot,
                                        map_one' :=
                                          (_ :
                                            Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                1.toQuot =
                                              1) }
                                      y) },
                      map_zero' :=
                        (_ : Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b) 0.toQuot = 0),
                      map_add' :=
                        (_ :
                          ∀ (x y : RingQuot fun x y => r x y),
                            OneHom.toFun
                                (↑{
                                    toOneHom :=
                                      {
                                        toFun := fun x =>
                                          Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                            x.toQuot,
                                        map_one' :=
                                          (_ :
                                            Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                1.toQuot =
                                              1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : RingQuot fun x y => r x y),
                                          OneHom.toFun
                                              {
                                                toFun := fun x =>
                                                  Quot.lift ↑↑f
                                                    (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                    x.toQuot,
                                                map_one' :=
                                                  (_ :
                                                    Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                        1.toQuot =
                                                      1) }
                                              (x * y) =
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f
                                                      (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f
                                                          (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                          1.toQuot =
                                                        1) }
                                                x *
                                              OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f
                                                      (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f
                                                          (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                          1.toQuot =
                                                        1) }
                                                y) })
                                (x + y) =
                              OneHom.toFun
                                  (↑{
                                      toOneHom :=
                                        {
                                          toFun := fun x =>
                                            Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                              x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ↑↑f
                                                  (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                  1.toQuot =
                                                1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (x y : RingQuot fun x y => r x y),
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f
                                                      (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f
                                                          (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                          1.toQuot =
                                                        1) }
                                                (x * y) =
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f
                                                            (_ :
                                                              ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  x *
                                                OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f
                                                            (_ :
                                                              ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  y) })
                                  x +
                                OneHom.toFun
                                  (↑{
                                      toOneHom :=
                                        {
                                          toFun := fun x =>
                                            Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                              x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ↑↑f
                                                  (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                  1.toQuot =
                                                1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (x y : RingQuot fun x y => r x y),
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f
                                                      (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f
                                                          (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                          1.toQuot =
                                                        1) }
                                                (x * y) =
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f
                                                            (_ :
                                                              ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  x *
                                                OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f
                                                            (_ :
                                                              ∀ (a b : R), Rel (fun x y => r x y) 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 fun x y => r x y) x },
                                      map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => r x y) 1 } = 1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (a a_1 : R),
                                        { toQuot := Quot.mk (Rel fun x y => r x y) (a * a_1) } =
                                          { toQuot := Quot.mk (Rel fun x y => r x y) a } *
                                            { toQuot := Quot.mk (Rel fun x y => r x y) a_1 }) },
                              map_zero' := (_ : { toQuot := Quot.mk (Rel fun x y => r x y) 0 } = 0),
                              map_add' :=
                                (_ :
                                  ∀ (a a_1 : R),
                                    { toQuot := Quot.mk (Rel fun x y => r x y) (a + a_1) } =
                                      { toQuot := Quot.mk (Rel fun x y => r x y) a } +
                                        { toQuot := Quot.mk (Rel fun x y => r x y) a_1 }) },
                        property :=
                          (_ :
                            (fun f => ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y)
                              (RingHom.comp F
                                {
                                  toMonoidHom :=
                                    {
                                      toOneHom :=
                                        { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => r x y) x },
                                          map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => r x y) 1 } = 1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (a a_1 : R),
                                            { toQuot := Quot.mk (Rel fun x y => r x y) (a * a_1) } =
                                              { toQuot := Quot.mk (Rel fun x y => r x y) a } *
                                                { toQuot := Quot.mk (Rel fun x y => r x y) a_1 }) },
                                  map_zero' := (_ : { toQuot := Quot.mk (Rel fun x y => r x y) 0 } = 0),
                                  map_add' :=
                                    (_ :
                                      ∀ (a a_1 : R),
                                        { toQuot := Quot.mk (Rel fun x y => r x y) (a + a_1) } =
                                          { toQuot := Quot.mk (Rel fun x y => r x y) a } +
                                            { toQuot := Quot.mk (Rel fun x y => r x y) a_1 }) })) })
                    fun f =>
                    {
                      toMonoidHom :=
                        {
                          toOneHom :=
                            {
                              toFun := fun x =>
                                Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b) x.toQuot,
                              map_one' :=
                                (_ :
                                  Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b) 1.toQuot =
                                    1) },
                          map_mul' :=
                            (_ :
                              ∀ (x y : RingQuot fun x y => r x y),
                                OneHom.toFun
                                    {
                                      toFun := fun x =>
                                        Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                          x.toQuot,
                                      map_one' :=
                                        (_ :
                                          Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                              1.toQuot =
                                            1) }
                                    (x * y) =
                                  OneHom.toFun
                                      {
                                        toFun := fun x =>
                                          Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                            x.toQuot,
                                        map_one' :=
                                          (_ :
                                            Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                1.toQuot =
                                              1) }
                                      x *
                                    OneHom.toFun
                                      {
                                        toFun := fun x =>
                                          Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                            x.toQuot,
                                        map_one' :=
                                          (_ :
                                            Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                1.toQuot =
                                              1) }
                                      y) },
                      map_zero' :=
                        (_ : Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b) 0.toQuot = 0),
                      map_add' :=
                        (_ :
                          ∀ (x y : RingQuot fun x y => r x y),
                            OneHom.toFun
                                (↑{
                                    toOneHom :=
                                      {
                                        toFun := fun x =>
                                          Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                            x.toQuot,
                                        map_one' :=
                                          (_ :
                                            Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                1.toQuot =
                                              1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : RingQuot fun x y => r x y),
                                          OneHom.toFun
                                              {
                                                toFun := fun x =>
                                                  Quot.lift ↑↑f
                                                    (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                    x.toQuot,
                                                map_one' :=
                                                  (_ :
                                                    Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                        1.toQuot =
                                                      1) }
                                              (x * y) =
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f
                                                      (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f
                                                          (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                          1.toQuot =
                                                        1) }
                                                x *
                                              OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f
                                                      (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f
                                                          (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                          1.toQuot =
                                                        1) }
                                                y) })
                                (x + y) =
                              OneHom.toFun
                                  (↑{
                                      toOneHom :=
                                        {
                                          toFun := fun x =>
                                            Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                              x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ↑↑f
                                                  (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                  1.toQuot =
                                                1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (x y : RingQuot fun x y => r x y),
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f
                                                      (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f
                                                          (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                          1.toQuot =
                                                        1) }
                                                (x * y) =
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f
                                                            (_ :
                                                              ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  x *
                                                OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f
                                                            (_ :
                                                              ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  y) })
                                  x +
                                OneHom.toFun
                                  (↑{
                                      toOneHom :=
                                        {
                                          toFun := fun x =>
                                            Quot.lift ↑↑f (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                              x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ↑↑f
                                                  (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                  1.toQuot =
                                                1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (x y : RingQuot fun x y => r x y),
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f
                                                      (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f
                                                          (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                          1.toQuot =
                                                        1) }
                                                (x * y) =
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f
                                                            (_ :
                                                              ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  x *
                                                OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f
                                                        (_ : ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f
                                                            (_ :
                                                              ∀ (a b : R), Rel (fun x y => r x y) a b → ↑↑f a = ↑↑f b)
                                                            1.toQuot =
                                                          1) }
                                                  y) })
                                  y) }) }
          { val := f, property := w })
      (↑{
            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 : R),
                      { 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 : R),
                  { toQuot := Quot.mk (Rel r) (a + a_1) } =
                    { toQuot := Quot.mk (Rel r) a } + { toQuot := Quot.mk (Rel r) a_1 }) }
        x) =
    ↑f x