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

tactic: conv_lhs => rw [← (liftAlgHom S).apply_symm_apply f]
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
B : Type u₄
inst✝¹ : Semiring B
inst✝ : Algebra S B
s : A → A → Prop
f : RingQuot s →ₐ[S] B
⊢ f =
    ↑(liftAlgHom S)
      { val := AlgHom.comp f (mkAlgHom S s),
        property := (_ : ∀ (x y : A), s x y → ↑f (↑↑(mkAlgHom S s) x) = ↑f (↑↑(mkAlgHom S s) y)) }

tactic: rw [liftAlgHom]
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
B : Type u₄
inst✝¹ : Semiring B
inst✝ : Algebra S B
s : A → A → Prop
f : RingQuot s →ₐ[S] B
⊢ ↑(liftAlgHom S) (↑(liftAlgHom S).symm f) =
    ↑(liftAlgHom S)
      { val := AlgHom.comp f (mkAlgHom S s),
        property := (_ : ∀ (x y : A), s x y → ↑f (↑↑(mkAlgHom S s) x) = ↑f (↑↑(mkAlgHom S s) y)) }

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
B : Type u₄
inst✝¹ : Semiring B
inst✝ : Algebra S B
s : A → A → Prop
f : RingQuot s →ₐ[S] B
⊢ ↑{ toFun := fun f' => preLiftAlgHom S (_ : ∀ ⦃x y : A⦄, s x y → ↑↑f' x = ↑↑f' y),
          invFun := fun F =>
            { val := AlgHom.comp F (mkAlgHom S s),
              property := (_ : ∀ (x x_1 : A), s x x_1 → ↑F (↑↑(mkAlgHom S s) x) = ↑F (↑↑(mkAlgHom S s) x_1)) },
          left_inv :=
            (_ :
              ∀ (f : { f // ∀ ⦃x y : A⦄, s x y → ↑f x = ↑f y }),
                (fun F =>
                      { val := AlgHom.comp F (mkAlgHom S s),
                        property :=
                          (_ : ∀ (x x_1 : A), s x x_1 → ↑F (↑↑(mkAlgHom S s) x) = ↑F (↑↑(mkAlgHom S s) x_1)) })
                    ((fun f' => preLiftAlgHom S (_ : ∀ ⦃x y : A⦄, s x y → ↑↑f' x = ↑↑f' y)) f) =
                  f),
          right_inv :=
            (_ :
              ∀ (F : RingQuot s →ₐ[S] B),
                (fun f' => preLiftAlgHom S (_ : ∀ ⦃x y : A⦄, s x y → ↑↑f' x = ↑↑f' y))
                    ((fun F =>
                        { val := AlgHom.comp F (mkAlgHom S s),
                          property :=
                            (_ : ∀ (x x_1 : A), s x x_1 → ↑F (↑↑(mkAlgHom S s) x) = ↑F (↑↑(mkAlgHom S s) x_1)) })
                      F) =
                  F) }
      (↑{ toFun := fun f' => preLiftAlgHom S (_ : ∀ ⦃x y : A⦄, s x y → ↑↑f' x = ↑↑f' y),
              invFun := fun F =>
                { val := AlgHom.comp F (mkAlgHom S s),
                  property := (_ : ∀ (x x_1 : A), s x x_1 → ↑F (↑↑(mkAlgHom S s) x) = ↑F (↑↑(mkAlgHom S s) x_1)) },
              left_inv :=
                (_ :
                  ∀ (f : { f // ∀ ⦃x y : A⦄, s x y → ↑f x = ↑f y }),
                    (fun F =>
                          { val := AlgHom.comp F (mkAlgHom S s),
                            property :=
                              (_ : ∀ (x x_1 : A), s x x_1 → ↑F (↑↑(mkAlgHom S s) x) = ↑F (↑↑(mkAlgHom S s) x_1)) })
                        ((fun f' => preLiftAlgHom S (_ : ∀ ⦃x y : A⦄, s x y → ↑↑f' x = ↑↑f' y)) f) =
                      f),
              right_inv :=
                (_ :
                  ∀ (F : RingQuot s →ₐ[S] B),
                    (fun f' => preLiftAlgHom S (_ : ∀ ⦃x y : A⦄, s x y → ↑↑f' x = ↑↑f' y))
                        ((fun F =>
                            { val := AlgHom.comp F (mkAlgHom S s),
                              property :=
                                (_ : ∀ (x x_1 : A), s x x_1 → ↑F (↑↑(mkAlgHom S s) x) = ↑F (↑↑(mkAlgHom S s) x_1)) })
                          F) =
                      F) }.symm
        f) =
    ↑{ toFun := fun f' => preLiftAlgHom S (_ : ∀ ⦃x y : A⦄, s x y → ↑↑f' x = ↑↑f' y),
          invFun := fun F =>
            { val := AlgHom.comp F (mkAlgHom S s),
              property := (_ : ∀ (x x_1 : A), s x x_1 → ↑F (↑↑(mkAlgHom S s) x) = ↑F (↑↑(mkAlgHom S s) x_1)) },
          left_inv :=
            (_ :
              ∀ (f : { f // ∀ ⦃x y : A⦄, s x y → ↑f x = ↑f y }),
                (fun F =>
                      { val := AlgHom.comp F (mkAlgHom S s),
                        property :=
                          (_ : ∀ (x x_1 : A), s x x_1 → ↑F (↑↑(mkAlgHom S s) x) = ↑F (↑↑(mkAlgHom S s) x_1)) })
                    ((fun f' => preLiftAlgHom S (_ : ∀ ⦃x y : A⦄, s x y → ↑↑f' x = ↑↑f' y)) f) =
                  f),
          right_inv :=
            (_ :
              ∀ (F : RingQuot s →ₐ[S] B),
                (fun f' => preLiftAlgHom S (_ : ∀ ⦃x y : A⦄, s x y → ↑↑f' x = ↑↑f' y))
                    ((fun F =>
                        { val := AlgHom.comp F (mkAlgHom S s),
                          property :=
                            (_ : ∀ (x x_1 : A), s x x_1 → ↑F (↑↑(mkAlgHom S s) x) = ↑F (↑↑(mkAlgHom S s) x_1)) })
                      F) =
                  F) }
      { val := AlgHom.comp f (mkAlgHom S s),
        property := (_ : ∀ (x y : A), s x y → ↑f (↑↑(mkAlgHom S s) x) = ↑f (↑↑(mkAlgHom S s) y)) }