theorem eq_lift_comp_mkRingHom {r : R → R → Prop} (f : RingQuot r →+* T) :
    f = lift ⟨f.comp (mkRingHom r), fun x y h ↦ congr_arg f (mkRingHom_rel h)⟩ := by
  conv_lhs => rw [← lift.apply_symm_apply f]
  rw [lift_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
r : R → R → Prop
f : RingQuot r →+* T
⊢ { toFun := fun f => preLift (_ : ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y),
        invFun := fun F =>
          { val := RingHom.comp F (mkRingHom r),
            property := (_ : ∀ (x y : R), r x y → F ((mkRingHom r) x) = F ((mkRingHom r) y)) },
        left_inv :=
          (_ :
            ∀ (f : { f // ∀ ⦃x y : R⦄, r x y → f x = f y }),
              (fun F =>
                    { val := RingHom.comp F (mkRingHom r),
                      property := (_ : ∀ (x y : R), r x y → F ((mkRingHom r) x) = F ((mkRingHom r) y)) })
                  ((fun f => preLift (_ : ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y)) f) =
                f),
        right_inv :=
          (_ :
            ∀ (F : RingQuot r →+* T),
              (fun f => preLift (_ : ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y))
                  ((fun F =>
                      { val := RingHom.comp F (mkRingHom r),
                        property := (_ : ∀ (x y : R), r x y → F ((mkRingHom r) x) = F ((mkRingHom r) y)) })
                    F) =
                F) }
      ({ toFun := fun f => preLift (_ : ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y),
            invFun := fun F =>
              { val := RingHom.comp F (mkRingHom r),
                property := (_ : ∀ (x y : R), r x y → F ((mkRingHom r) x) = F ((mkRingHom r) y)) },
            left_inv :=
              (_ :
                ∀ (f : { f // ∀ ⦃x y : R⦄, r x y → f x = f y }),
                  (fun F =>
                        { val := RingHom.comp F (mkRingHom r),
                          property := (_ : ∀ (x y : R), r x y → F ((mkRingHom r) x) = F ((mkRingHom r) y)) })
                      ((fun f => preLift (_ : ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y)) f) =
                    f),
            right_inv :=
              (_ :
                ∀ (F : RingQuot r →+* T),
                  (fun f => preLift (_ : ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y))
                      ((fun F =>
                          { val := RingHom.comp F (mkRingHom r),
                            property := (_ : ∀ (x y : R), r x y → F ((mkRingHom r) x) = F ((mkRingHom r) y)) })
                        F) =
                    F) }.symm
        f) =
    { toFun := fun f => preLift (_ : ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y),
        invFun := fun F =>
          { val := RingHom.comp F (mkRingHom r),
            property := (_ : ∀ (x y : R), r x y → F ((mkRingHom r) x) = F ((mkRingHom r) y)) },
        left_inv :=
          (_ :
            ∀ (f : { f // ∀ ⦃x y : R⦄, r x y → f x = f y }),
              (fun F =>
                    { val := RingHom.comp F (mkRingHom r),
                      property := (_ : ∀ (x y : R), r x y → F ((mkRingHom r) x) = F ((mkRingHom r) y)) })
                  ((fun f => preLift (_ : ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y)) f) =
                f),
        right_inv :=
          (_ :
            ∀ (F : RingQuot r →+* T),
              (fun f => preLift (_ : ∀ ⦃x y : R⦄, r x y → ↑f x = ↑f y))
                  ((fun F =>
                      { val := RingHom.comp F (mkRingHom r),
                        property := (_ : ∀ (x y : R), r x y → F ((mkRingHom r) x) = F ((mkRingHom r) y)) })
                    F) =
                F) }
      { val := RingHom.comp f (mkRingHom r),
        property := (_ : ∀ (x y : R), r x y → f ((mkRingHom r) x) = f ((mkRingHom r) y)) }

Next tactic:
rfl