[GOAL]
C : Type u₁
D : Type u₂
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
⊢ IsReflexivePair (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
[PROOFSTEP]
apply IsReflexivePair.mk' ((F).map ((adj).unit.app _)) _ _
[GOAL]
C : Type u₁
D : Type u₂
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
⊢ F.map (NatTrans.app adj.unit A.A) ≫ F.map A.a = 𝟙 (F.obj ((𝟭 C).obj A.A))
[PROOFSTEP]
rw [← (F).map_comp, ← (F).map_id]
[GOAL]
C : Type u₁
D : Type u₂
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
⊢ F.map (NatTrans.app adj.unit A.A ≫ A.a) = F.map (𝟙 ((𝟭 C).obj A.A))
[PROOFSTEP]
exact congr_arg (F).map A.unit
[GOAL]
C : Type u₁
D : Type u₂
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
⊢ F.map (NatTrans.app adj.unit A.A) ≫ NatTrans.app adj.counit (F.obj A.A) = 𝟙 (F.obj ((𝟭 C).obj A.A))
[PROOFSTEP]
rw [(adj).left_triangle_components]
[GOAL]
C : Type u₁
D : Type u₂
inst✝² : Category.{v₁, u₁} C
inst✝¹ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
⊢ 𝟙 (F.obj A.A) = 𝟙 (F.obj ((𝟭 C).obj A.A))
[PROOFSTEP]
rfl
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
B : D
inst✝ : HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
⊢ { f // F.map A.a ≫ f = NatTrans.app adj.counit (F.obj A.A) ≫ f } ≃
    { g // G.map (F.map g) ≫ G.map (NatTrans.app adj.counit B) = A.a ≫ g }
[PROOFSTEP]
refine' ((adj).homEquiv _ _).subtypeEquiv _
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
B : D
inst✝ : HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
⊢ ∀ (a : F.obj A.A ⟶ B),
    F.map A.a ≫ a = NatTrans.app adj.counit (F.obj A.A) ≫ a ↔
      G.map (F.map (↑(Adjunction.homEquiv adj A.A B) a)) ≫ G.map (NatTrans.app adj.counit B) =
        A.a ≫ ↑(Adjunction.homEquiv adj A.A B) a
[PROOFSTEP]
intro f
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
B : D
inst✝ : HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
f : F.obj A.A ⟶ B
⊢ F.map A.a ≫ f = NatTrans.app adj.counit (F.obj A.A) ≫ f ↔
    G.map (F.map (↑(Adjunction.homEquiv adj A.A B) f)) ≫ G.map (NatTrans.app adj.counit B) =
      A.a ≫ ↑(Adjunction.homEquiv adj A.A B) f
[PROOFSTEP]
rw [← ((adj).homEquiv _ _).injective.eq_iff, Adjunction.homEquiv_naturality_left, (adj).homEquiv_unit,
  (adj).homEquiv_unit, G.map_comp]
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
B : D
inst✝ : HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
f : F.obj A.A ⟶ B
⊢ A.a ≫ NatTrans.app adj.unit A.A ≫ G.map f =
      NatTrans.app adj.unit ((Adjunction.toMonad adj).toFunctor.obj A.A) ≫
        G.map (NatTrans.app adj.counit (F.obj A.A)) ≫ G.map f ↔
    G.map (F.map (NatTrans.app adj.unit A.A ≫ G.map f)) ≫ G.map (NatTrans.app adj.counit B) =
      A.a ≫ NatTrans.app adj.unit A.A ≫ G.map f
[PROOFSTEP]
dsimp
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
B : D
inst✝ : HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
f : F.obj A.A ⟶ B
⊢ A.a ≫ NatTrans.app adj.unit A.A ≫ G.map f =
      NatTrans.app adj.unit (G.obj (F.obj A.A)) ≫ G.map (NatTrans.app adj.counit (F.obj A.A)) ≫ G.map f ↔
    G.map (F.map (NatTrans.app adj.unit A.A ≫ G.map f)) ≫ G.map (NatTrans.app adj.counit B) =
      A.a ≫ NatTrans.app adj.unit A.A ≫ G.map f
[PROOFSTEP]
rw [(adj).right_triangle_components_assoc, ← G.map_comp, (F).map_comp, Category.assoc, (adj).counit_naturality,
  (adj).left_triangle_components_assoc]
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
B : D
inst✝ : HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
f : F.obj A.A ⟶ B
⊢ A.a ≫ NatTrans.app adj.unit A.A ≫ G.map f = G.map f ↔ G.map f = A.a ≫ NatTrans.app adj.unit A.A ≫ G.map f
[PROOFSTEP]
apply eq_comm
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
B : D
inst✝ : HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
g : { g // G.map (F.map g) ≫ G.map (NatTrans.app adj.counit B) = A.a ≫ g }
⊢ (fun f =>
        { val := f.f,
          property := (_ : (Adjunction.toMonad adj).toFunctor.map f.f ≫ ((comparison adj).obj B).a = A.a ≫ f.f) })
      ((fun g => Algebra.Hom.mk ↑g) g) =
    g
[PROOFSTEP]
ext
[GOAL]
case a
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
B : D
inst✝ : HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
g : { g // G.map (F.map g) ≫ G.map (NatTrans.app adj.counit B) = A.a ≫ g }
⊢ ↑((fun f =>
          { val := f.f,
            property := (_ : (Adjunction.toMonad adj).toFunctor.map f.f ≫ ((comparison adj).obj B).a = A.a ≫ f.f) })
        ((fun g => Algebra.Hom.mk ↑g) g)) =
    ↑g
[PROOFSTEP]
rfl
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
B : D
inst✝ : HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
f : A ⟶ (comparison adj).obj B
⊢ (fun g => Algebra.Hom.mk ↑g)
      ((fun f =>
          { val := f.f,
            property := (_ : (Adjunction.toMonad adj).toFunctor.map f.f ≫ ((comparison adj).obj B).a = A.a ≫ f.f) })
        f) =
    f
[PROOFSTEP]
ext
[GOAL]
case h
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
B : D
inst✝ : HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
f : A ⟶ (comparison adj).obj B
⊢ ((fun g => Algebra.Hom.mk ↑g)
        ((fun f =>
            { val := f.f,
              property := (_ : (Adjunction.toMonad adj).toFunctor.map f.f ≫ ((comparison adj).obj B).a = A.a ≫ f.f) })
          f)).f =
    f.f
[PROOFSTEP]
rfl
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : ∀ (A : Algebra (Adjunction.toMonad adj)), HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
⊢ Algebra (Adjunction.toMonad adj) ⥤ D
[PROOFSTEP]
refine'
  Adjunction.leftAdjointOfEquiv (G := comparison adj) (F_obj := fun A => comparisonLeftAdjointObj A) (fun A B => _) _
[GOAL]
case refine'_1
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : ∀ (A : Algebra (Adjunction.toMonad adj)), HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
A : Algebra (Adjunction.toMonad adj)
B : D
⊢ ((fun A => comparisonLeftAdjointObj A) A ⟶ B) ≃ (A ⟶ (comparison adj).obj B)
[PROOFSTEP]
apply comparisonLeftAdjointHomEquiv
[GOAL]
case refine'_2
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : ∀ (A : Algebra (Adjunction.toMonad adj)), HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
⊢ ∀ (X : Algebra (Adjunction.toMonad adj)) (Y Y' : D) (g : Y ⟶ Y') (h : (fun A => comparisonLeftAdjointObj A) X ⟶ Y),
    ↑((fun A B => comparisonLeftAdjointHomEquiv A B) X Y') (h ≫ g) =
      ↑((fun A B => comparisonLeftAdjointHomEquiv A B) X Y) h ≫ (comparison adj).map g
[PROOFSTEP]
intro A B B' g h
[GOAL]
case refine'_2
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : ∀ (A : Algebra (Adjunction.toMonad adj)), HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
A : Algebra (Adjunction.toMonad adj)
B B' : D
g : B ⟶ B'
h : (fun A => comparisonLeftAdjointObj A) A ⟶ B
⊢ ↑((fun A B => comparisonLeftAdjointHomEquiv A B) A B') (h ≫ g) =
    ↑((fun A B => comparisonLeftAdjointHomEquiv A B) A B) h ≫ (comparison adj).map g
[PROOFSTEP]
ext1
  -- Porting note: the goal was previously closed by the following, which succeeds until
      -- `Category.assoc`.
      -- dsimp [comparisonLeftAdjointHomEquiv]
      -- rw [← (adj).homEquiv_naturality_right, Category.assoc]
[GOAL]
case refine'_2.h
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : ∀ (A : Algebra (Adjunction.toMonad adj)), HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
A : Algebra (Adjunction.toMonad adj)
B B' : D
g : B ⟶ B'
h : (fun A => comparisonLeftAdjointObj A) A ⟶ B
⊢ (↑((fun A B => comparisonLeftAdjointHomEquiv A B) A B') (h ≫ g)).f =
    (↑((fun A B => comparisonLeftAdjointHomEquiv A B) A B) h ≫ (comparison adj).map g).f
[PROOFSTEP]
simp [Cofork.IsColimit.homIso]
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
inst✝ : HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
⊢ G.map (F.map A.a) ≫ G.map (coequalizer.π (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))) =
    G.map (NatTrans.app adj.counit (F.obj A.A)) ≫
      G.map (coequalizer.π (F.map A.a) (NatTrans.app adj.counit (F.obj A.A)))
[PROOFSTEP]
change _ = G.map _ ≫ _
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
A : Algebra (Adjunction.toMonad adj)
inst✝ : HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
⊢ G.map (F.map A.a) ≫ G.map (coequalizer.π (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))) =
    G.map (NatTrans.app adj.counit (F.obj A.A)) ≫
      G.map (coequalizer.π (F.map A.a) (NatTrans.app adj.counit (F.obj A.A)))
[PROOFSTEP]
rw [← G.map_comp, coequalizer.condition, G.map_comp]
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : ∀ (A : Algebra (Adjunction.toMonad adj)), HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
A : Algebra (Adjunction.toMonad adj)
⊢ (NatTrans.app comparisonAdjunction.unit A).f = IsColimit.desc (beckCoequalizer A) (unitCofork A)
[PROOFSTEP]
apply Limits.Cofork.IsColimit.hom_ext (beckCoequalizer A)
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : ∀ (A : Algebra (Adjunction.toMonad adj)), HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
A : Algebra (Adjunction.toMonad adj)
⊢ Cofork.π (beckCofork A) ≫ (NatTrans.app comparisonAdjunction.unit A).f =
    Cofork.π (beckCofork A) ≫ IsColimit.desc (beckCoequalizer A) (unitCofork A)
[PROOFSTEP]
rw [Cofork.IsColimit.π_desc]
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : ∀ (A : Algebra (Adjunction.toMonad adj)), HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
A : Algebra (Adjunction.toMonad adj)
⊢ Cofork.π (beckCofork A) ≫ (NatTrans.app comparisonAdjunction.unit A).f = Cofork.π (unitCofork A)
[PROOFSTEP]
dsimp only [beckCofork_π, unitCofork_π]
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : ∀ (A : Algebra (Adjunction.toMonad adj)), HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
A : Algebra (Adjunction.toMonad adj)
⊢ A.a ≫ (NatTrans.app comparisonAdjunction.unit A).f =
    G.map (coequalizer.π (F.map A.a) (NatTrans.app adj.counit (F.obj A.A)))
[PROOFSTEP]
rw [comparisonAdjunction_unit_f_aux, ← (adj).homEquiv_naturality_left A.a, coequalizer.condition,
  (adj).homEquiv_naturality_right, (adj).homEquiv_unit, Category.assoc]
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : ∀ (A : Algebra (Adjunction.toMonad adj)), HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
A : Algebra (Adjunction.toMonad adj)
⊢ NatTrans.app adj.unit ((Adjunction.toMonad adj).toFunctor.obj A.A) ≫
      G.map (NatTrans.app adj.counit (F.obj A.A)) ≫
        G.map (coequalizer.π (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))) =
    G.map (coequalizer.π (F.map A.a) (NatTrans.app adj.counit (F.obj A.A)))
[PROOFSTEP]
apply (adj).right_triangle_components_assoc
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : ∀ (A : Algebra (Adjunction.toMonad adj)), HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
B : D
⊢ NatTrans.app comparisonAdjunction.counit B =
    colimit.desc (parallelPair (F.map (G.map (NatTrans.app adj.counit B))) (NatTrans.app adj.counit (F.obj (G.obj B))))
      (counitCofork B)
[PROOFSTEP]
apply coequalizer.hom_ext
[GOAL]
case h
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : ∀ (A : Algebra (Adjunction.toMonad adj)), HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
B : D
⊢ coequalizer.π (F.map ((comparison adj).obj B).a) (NatTrans.app adj.counit (F.obj ((comparison adj).obj B).A)) ≫
      NatTrans.app comparisonAdjunction.counit B =
    coequalizer.π (F.map ((comparison adj).obj B).a) (NatTrans.app adj.counit (F.obj ((comparison adj).obj B).A)) ≫
      colimit.desc
        (parallelPair (F.map (G.map (NatTrans.app adj.counit B))) (NatTrans.app adj.counit (F.obj (G.obj B))))
        (counitCofork B)
[PROOFSTEP]
change
  coequalizer.π _ _ ≫ coequalizer.desc (((adj).homEquiv _ B).symm (𝟙 _)) _ = coequalizer.π _ _ ≫ coequalizer.desc _ _
[GOAL]
case h
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : ∀ (A : Algebra (Adjunction.toMonad adj)), HasCoequalizer (F.map A.a) (NatTrans.app adj.counit (F.obj A.A))
B : D
⊢ coequalizer.π (F.map ((comparison adj).obj B).a) (NatTrans.app adj.counit (F.obj ((comparison adj).obj B).A)) ≫
      coequalizer.desc (↑(Adjunction.homEquiv adj (G.obj B) B).symm (𝟙 (G.obj B)))
        (_ :
          F.map ((comparison adj).obj B).a ≫
              ↑(↑(Equiv.subtypeEquiv (Adjunction.homEquiv adj ((comparison adj).obj B).A ((𝟭 D).obj B))
                        (_ :
                          ∀ (f : F.obj ((comparison adj).obj B).A ⟶ (𝟭 D).obj B),
                            F.map ((comparison adj).obj B).a ≫ f =
                                NatTrans.app adj.counit (F.obj ((comparison adj).obj B).A) ≫ f ↔
                              G.map (F.map (↑(Adjunction.homEquiv adj ((comparison adj).obj B).A ((𝟭 D).obj B)) f)) ≫
                                  G.map (NatTrans.app adj.counit ((𝟭 D).obj B)) =
                                ((comparison adj).obj B).a ≫
                                  ↑(Adjunction.homEquiv adj ((comparison adj).obj B).A ((𝟭 D).obj B)) f)).symm
                  (↑{ toFun := fun g => Algebra.Hom.mk ↑g,
                          invFun := fun f =>
                            { val := f.f,
                              property :=
                                (_ :
                                  (Adjunction.toMonad adj).toFunctor.map f.f ≫ ((comparison adj).obj ((𝟭 D).obj B)).a =
                                    ((comparison adj).obj B).a ≫ f.f) },
                          left_inv :=
                            (_ :
                              ∀
                                (g :
                                  { g //
                                    G.map (F.map g) ≫ G.map (NatTrans.app adj.counit ((𝟭 D).obj B)) =
                                      ((comparison adj).obj B).a ≫ g }),
                                (fun f =>
                                      { val := f.f,
                                        property :=
                                          (_ :
                                            (Adjunction.toMonad adj).toFunctor.map f.f ≫
                                                ((comparison adj).obj ((𝟭 D).obj B)).a =
                                              ((comparison adj).obj B).a ≫ f.f) })
                                    ((fun g => Algebra.Hom.mk ↑g) g) =
                                  g),
                          right_inv :=
                            (_ :
                              ∀ (f : (comparison adj).obj B ⟶ (comparison adj).obj ((𝟭 D).obj B)),
                                (fun g => Algebra.Hom.mk ↑g)
                                    ((fun f =>
                                        { val := f.f,
                                          property :=
                                            (_ :
                                              (Adjunction.toMonad adj).toFunctor.map f.f ≫
                                                  ((comparison adj).obj ((𝟭 D).obj B)).a =
                                                ((comparison adj).obj B).a ≫ f.f) })
                                      f) =
                                  f) }.symm
                    (𝟙 ((comparison adj).obj B)))) =
            NatTrans.app adj.counit (F.obj ((comparison adj).obj B).A) ≫
              ↑(↑(Equiv.subtypeEquiv (Adjunction.homEquiv adj ((comparison adj).obj B).A ((𝟭 D).obj B))
                        (_ :
                          ∀ (f : F.obj ((comparison adj).obj B).A ⟶ (𝟭 D).obj B),
                            F.map ((comparison adj).obj B).a ≫ f =
                                NatTrans.app adj.counit (F.obj ((comparison adj).obj B).A) ≫ f ↔
                              G.map (F.map (↑(Adjunction.homEquiv adj ((comparison adj).obj B).A ((𝟭 D).obj B)) f)) ≫
                                  G.map (NatTrans.app adj.counit ((𝟭 D).obj B)) =
                                ((comparison adj).obj B).a ≫
                                  ↑(Adjunction.homEquiv adj ((comparison adj).obj B).A ((𝟭 D).obj B)) f)).symm
                  (↑{ toFun := fun g => Algebra.Hom.mk ↑g,
                          invFun := fun f =>
                            { val := f.f,
                              property :=
                                (_ :
                                  (Adjunction.toMonad adj).toFunctor.map f.f ≫ ((comparison adj).obj ((𝟭 D).obj B)).a =
                                    ((comparison adj).obj B).a ≫ f.f) },
                          left_inv :=
                            (_ :
                              ∀
                                (g :
                                  { g //
                                    G.map (F.map g) ≫ G.map (NatTrans.app adj.counit ((𝟭 D).obj B)) =
                                      ((comparison adj).obj B).a ≫ g }),
                                (fun f =>
                                      { val := f.f,
                                        property :=
                                          (_ :
                                            (Adjunction.toMonad adj).toFunctor.map f.f ≫
                                                ((comparison adj).obj ((𝟭 D).obj B)).a =
                                              ((comparison adj).obj B).a ≫ f.f) })
                                    ((fun g => Algebra.Hom.mk ↑g) g) =
                                  g),
                          right_inv :=
                            (_ :
                              ∀ (f : (comparison adj).obj B ⟶ (comparison adj).obj ((𝟭 D).obj B)),
                                (fun g => Algebra.Hom.mk ↑g)
                                    ((fun f =>
                                        { val := f.f,
                                          property :=
                                            (_ :
                                              (Adjunction.toMonad adj).toFunctor.map f.f ≫
                                                  ((comparison adj).obj ((𝟭 D).obj B)).a =
                                                ((comparison adj).obj B).a ≫ f.f) })
                                      f) =
                                  f) }.symm
                    (𝟙 ((comparison adj).obj B))))) =
    coequalizer.π (F.map ((comparison adj).obj B).a) (NatTrans.app adj.counit (F.obj ((comparison adj).obj B).A)) ≫
      coequalizer.desc (NatTrans.app adj.counit B)
        (_ :
          F.map (G.map (NatTrans.app adj.counit B)) ≫ NatTrans.app adj.counit ((𝟭 D).obj B) =
            NatTrans.app adj.counit ((G ⋙ F).obj B) ≫ NatTrans.app adj.counit B)
[PROOFSTEP]
simp
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : MonadicRightAdjoint G
A B : D
f g : A ⟶ B
inst✝ : Functor.IsSplitPair G f g
⊢ CreatesColimit (parallelPair f g) G
[PROOFSTEP]
apply (config := { allowSynthFailures := true }) monadicCreatesColimitOfPreservesColimit
[GOAL]
case inst
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : MonadicRightAdjoint G
A B : D
f g : A ⟶ B
inst✝ : Functor.IsSplitPair G f g
⊢ PreservesColimit (parallelPair f g ⋙ G) (F ⋙ G)
[PROOFSTEP]
apply @preservesColimitOfIsoDiagram _ _ _ _ _ _ _ _ _ (diagramIsoParallelPair.{v₁} _).symm ?_
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : MonadicRightAdjoint G
A B : D
f g : A ⟶ B
inst✝ : Functor.IsSplitPair G f g
⊢ PreservesColimit
    (parallelPair ((parallelPair f g ⋙ G).map WalkingParallelPairHom.left)
      ((parallelPair f g ⋙ G).map WalkingParallelPairHom.right))
    (F ⋙ G)
[PROOFSTEP]
dsimp
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : MonadicRightAdjoint G
A B : D
f g : A ⟶ B
inst✝ : Functor.IsSplitPair G f g
⊢ PreservesColimit (parallelPair (G.map f) (G.map g)) (F ⋙ G)
[PROOFSTEP]
infer_instance
[GOAL]
case inst
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : MonadicRightAdjoint G
A B : D
f g : A ⟶ B
inst✝ : Functor.IsSplitPair G f g
⊢ PreservesColimit ((parallelPair f g ⋙ G) ⋙ F ⋙ G) (F ⋙ G)
[PROOFSTEP]
apply @preservesColimitOfIsoDiagram _ _ _ _ _ _ _ _ _ (diagramIsoParallelPair.{v₁} _).symm ?_
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : MonadicRightAdjoint G
A B : D
f g : A ⟶ B
inst✝ : Functor.IsSplitPair G f g
⊢ PreservesColimit
    (parallelPair (((parallelPair f g ⋙ G) ⋙ F ⋙ G).map WalkingParallelPairHom.left)
      (((parallelPair f g ⋙ G) ⋙ F ⋙ G).map WalkingParallelPairHom.right))
    (F ⋙ G)
[PROOFSTEP]
dsimp
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : MonadicRightAdjoint G
A B : D
f g : A ⟶ B
inst✝ : Functor.IsSplitPair G f g
⊢ PreservesColimit (parallelPair (G.map (F.map (G.map f))) (G.map (F.map (G.map g)))) (F ⋙ G)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
⊢ MonadicRightAdjoint G
[PROOFSTEP]
let i : IsRightAdjoint (comparison (ofRightAdjoint G)) := ⟨_, comparisonAdjunction⟩
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
⊢ MonadicRightAdjoint G
[PROOFSTEP]
constructor
[GOAL]
case eqv
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
⊢ IsEquivalence (comparison adj)
[PROOFSTEP]
let _ : ∀ X : (ofRightAdjoint G).toMonad.Algebra, IsIso ((ofRightAdjoint (comparison (ofRightAdjoint G))).unit.app X) :=
  by
  intro X
  apply @isIso_of_reflects_iso _ _ _ _ _ _ _ (Monad.forget (ofRightAdjoint G).toMonad) ?_ _
  · change IsIso (comparisonAdjunction.unit.app X).f
    rw [comparisonAdjunction_unit_f]
    change IsIso (IsColimit.coconePointUniqueUpToIso (beckCoequalizer X) (unitColimitOfPreservesCoequalizer X)).hom
    refine' IsIso.of_iso (IsColimit.coconePointUniqueUpToIso _ _)
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
⊢ ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X)
[PROOFSTEP]
intro X
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
X : Algebra (toMonad adj)
⊢ IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X)
[PROOFSTEP]
apply @isIso_of_reflects_iso _ _ _ _ _ _ _ (Monad.forget (ofRightAdjoint G).toMonad) ?_ _
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
X : Algebra (toMonad adj)
⊢ IsIso ((forget (toMonad adj)).map (NatTrans.app (ofRightAdjoint (comparison adj)).unit X))
[PROOFSTEP]
change IsIso (comparisonAdjunction.unit.app X).f
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
X : Algebra (toMonad adj)
⊢ IsIso (NatTrans.app comparisonAdjunction.unit X).f
[PROOFSTEP]
rw [comparisonAdjunction_unit_f]
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
X : Algebra (toMonad adj)
⊢ IsIso (IsColimit.desc (beckCoequalizer X) (unitCofork X))
[PROOFSTEP]
change IsIso (IsColimit.coconePointUniqueUpToIso (beckCoequalizer X) (unitColimitOfPreservesCoequalizer X)).hom
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
X : Algebra (toMonad adj)
⊢ IsIso (IsColimit.coconePointUniqueUpToIso (beckCoequalizer X) (unitColimitOfPreservesCoequalizer X)).hom
[PROOFSTEP]
refine' IsIso.of_iso (IsColimit.coconePointUniqueUpToIso _ _)
[GOAL]
case eqv
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
⊢ IsEquivalence (comparison adj)
[PROOFSTEP]
let _ : ∀ Y : D, IsIso ((ofRightAdjoint (comparison (ofRightAdjoint G))).counit.app Y) :=
  by
  intro Y
  change IsIso (comparisonAdjunction.counit.app Y)
  rw [comparisonAdjunction_counit_app]
    -- Porting note: passing instances through
  change IsIso (IsColimit.coconePointUniqueUpToIso _ ?_).hom
  infer_instance
    -- Porting note: passing instances through
  apply @counitCoequalizerOfReflectsCoequalizer _ _ _ _ _ _ _ ?_
  letI _ :
    G.IsSplitPair ((leftAdjoint G).map (G.map ((Adjunction.ofRightAdjoint G).counit.app Y)))
      ((Adjunction.ofRightAdjoint G).counit.app ((leftAdjoint G).obj (G.obj Y))) :=
    MonadicityInternal.main_pair_G_split ((comparison (Adjunction.ofRightAdjoint G)).obj Y)
  infer_instance
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
⊢ ∀ (Y : D), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).counit Y)
[PROOFSTEP]
intro Y
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).counit Y)
[PROOFSTEP]
change IsIso (comparisonAdjunction.counit.app Y)
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ IsIso (NatTrans.app comparisonAdjunction.counit Y)
[PROOFSTEP]
rw [comparisonAdjunction_counit_app]
  -- Porting note: passing instances through
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ IsIso
    (colimit.desc (parallelPair (F.map (G.map (NatTrans.app adj.counit Y))) (NatTrans.app adj.counit (F.obj (G.obj Y))))
      (counitCofork Y))
[PROOFSTEP]
change IsIso (IsColimit.coconePointUniqueUpToIso _ ?_).hom
[GOAL]
case refine_2
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ IsIso
    (IsColimit.coconePointUniqueUpToIso
        (colimit.isColimit
          (parallelPair (F.map (G.map (NatTrans.app adj.counit Y))) (NatTrans.app adj.counit (F.obj (G.obj Y)))))
        ?refine_1).hom
case refine_1
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ IsColimit (counitCofork Y)
[PROOFSTEP]
infer_instance
  -- Porting note: passing instances through
[GOAL]
case refine_1
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ IsColimit (counitCofork Y)
[PROOFSTEP]
apply @counitCoequalizerOfReflectsCoequalizer _ _ _ _ _ _ _ ?_
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ ReflectsColimit (parallelPair (F.map (G.map (NatTrans.app adj.counit Y))) (NatTrans.app adj.counit (F.obj (G.obj Y))))
    G
[PROOFSTEP]
letI _ :
  G.IsSplitPair ((leftAdjoint G).map (G.map ((Adjunction.ofRightAdjoint G).counit.app Y)))
    ((Adjunction.ofRightAdjoint G).counit.app ((leftAdjoint G).obj (G.obj Y))) :=
  MonadicityInternal.main_pair_G_split ((comparison (Adjunction.ofRightAdjoint G)).obj Y)
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝¹ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
x✝ : Functor.IsSplitPair G (F.map (G.map (NatTrans.app adj.counit Y))) (NatTrans.app adj.counit (F.obj (G.obj Y))) :=
  main_pair_G_split ((comparison adj).obj Y)
⊢ ReflectsColimit (parallelPair (F.map (G.map (NatTrans.app adj.counit Y))) (NatTrans.app adj.counit (F.obj (G.obj Y))))
    G
[PROOFSTEP]
infer_instance
[GOAL]
case eqv
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
inst✝ : ReflectsColimitOfIsSplitPair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝¹ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
x✝ : ∀ (Y : D), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).counit Y) :=
  fun Y =>
    let_fun this :=
      Eq.mpr
        (_root_.id (comparisonAdjunction_counit_app Y ▸ Eq.refl (IsIso (NatTrans.app comparisonAdjunction.counit Y))))
        (let_fun this := inferInstance;
        this);
    this
⊢ IsEquivalence (comparison adj)
[PROOFSTEP]
exact Adjunction.isRightAdjointToIsEquivalence
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : CreatesColimitOfIsSplitPair G
⊢ MonadicRightAdjoint G
[PROOFSTEP]
let I {A B} (f g : A ⟶ B) [G.IsSplitPair f g] : HasColimit (parallelPair f g ⋙ G) :=
  by
  apply @hasColimitOfIso _ _ _ _ _ _ ?_ (diagramIsoParallelPair.{v₁} _)
  exact inferInstanceAs <| HasCoequalizer (G.map f) (G.map g)
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝² : IsRightAdjoint G
inst✝¹ : CreatesColimitOfIsSplitPair G
A B : D
f g : A ⟶ B
inst✝ : Functor.IsSplitPair G f g
⊢ HasColimit (parallelPair f g ⋙ G)
[PROOFSTEP]
apply @hasColimitOfIso _ _ _ _ _ _ ?_ (diagramIsoParallelPair.{v₁} _)
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝² : IsRightAdjoint G
inst✝¹ : CreatesColimitOfIsSplitPair G
A B : D
f g : A ⟶ B
inst✝ : Functor.IsSplitPair G f g
⊢ HasColimit
    (parallelPair ((parallelPair f g ⋙ G).map WalkingParallelPairHom.left)
      ((parallelPair f g ⋙ G).map WalkingParallelPairHom.right))
[PROOFSTEP]
exact inferInstanceAs <| HasCoequalizer (G.map f) (G.map g)
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : CreatesColimitOfIsSplitPair G
I : ∀ {A B : D} (f g : A ⟶ B) [inst : Functor.IsSplitPair G f g], HasColimit (parallelPair f g ⋙ G) :=
  fun {A B} f g [Functor.IsSplitPair G f g] => hasColimitOfIso (diagramIsoParallelPair (parallelPair f g ⋙ G))
⊢ MonadicRightAdjoint G
[PROOFSTEP]
apply @monadicOfHasPreservesReflectsGSplitCoequalizers _ _ _ _ _ _ ?_ ?_ ?_
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : CreatesColimitOfIsSplitPair G
I : ∀ {A B : D} (f g : A ⟶ B) [inst : Functor.IsSplitPair G f g], HasColimit (parallelPair f g ⋙ G) :=
  fun {A B} f g [Functor.IsSplitPair G f g] => hasColimitOfIso (diagramIsoParallelPair (parallelPair f g ⋙ G))
⊢ HasCoequalizerOfIsSplitPair G
[PROOFSTEP]
constructor
[GOAL]
case out
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : CreatesColimitOfIsSplitPair G
I : ∀ {A B : D} (f g : A ⟶ B) [inst : Functor.IsSplitPair G f g], HasColimit (parallelPair f g ⋙ G) :=
  fun {A B} f g [Functor.IsSplitPair G f g] => hasColimitOfIso (diagramIsoParallelPair (parallelPair f g ⋙ G))
⊢ ∀ {A B : D} (f g : A ⟶ B) [inst : Functor.IsSplitPair G f g], HasCoequalizer f g
[PROOFSTEP]
intros
[GOAL]
case out
C : Type u₁
D : Type u₂
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝² : IsRightAdjoint G
inst✝¹ : CreatesColimitOfIsSplitPair G
I : ∀ {A B : D} (f g : A ⟶ B) [inst : Functor.IsSplitPair G f g], HasColimit (parallelPair f g ⋙ G) :=
  fun {A B} f g [Functor.IsSplitPair G f g] => hasColimitOfIso (diagramIsoParallelPair (parallelPair f g ⋙ G))
A✝ B✝ : D
f✝ g✝ : A✝ ⟶ B✝
inst✝ : Functor.IsSplitPair G f✝ g✝
⊢ HasCoequalizer f✝ g✝
[PROOFSTEP]
apply hasColimit_of_created (parallelPair _ _) G
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : CreatesColimitOfIsSplitPair G
I : ∀ {A B : D} (f g : A ⟶ B) [inst : Functor.IsSplitPair G f g], HasColimit (parallelPair f g ⋙ G) :=
  fun {A B} f g [Functor.IsSplitPair G f g] => hasColimitOfIso (diagramIsoParallelPair (parallelPair f g ⋙ G))
⊢ PreservesColimitOfIsSplitPair G
[PROOFSTEP]
constructor
[GOAL]
case out
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : CreatesColimitOfIsSplitPair G
I : ∀ {A B : D} (f g : A ⟶ B) [inst : Functor.IsSplitPair G f g], HasColimit (parallelPair f g ⋙ G) :=
  fun {A B} f g [Functor.IsSplitPair G f g] => hasColimitOfIso (diagramIsoParallelPair (parallelPair f g ⋙ G))
⊢ {A B : D} → (f g : A ⟶ B) → [inst : Functor.IsSplitPair G f g] → PreservesColimit (parallelPair f g) G
[PROOFSTEP]
intros
[GOAL]
case out
C : Type u₁
D : Type u₂
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝² : IsRightAdjoint G
inst✝¹ : CreatesColimitOfIsSplitPair G
I : ∀ {A B : D} (f g : A ⟶ B) [inst : Functor.IsSplitPair G f g], HasColimit (parallelPair f g ⋙ G) :=
  fun {A B} f g [Functor.IsSplitPair G f g] => hasColimitOfIso (diagramIsoParallelPair (parallelPair f g ⋙ G))
A✝ B✝ : D
f✝ g✝ : A✝ ⟶ B✝
inst✝ : Functor.IsSplitPair G f✝ g✝
⊢ PreservesColimit (parallelPair f✝ g✝) G
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : CreatesColimitOfIsSplitPair G
I : ∀ {A B : D} (f g : A ⟶ B) [inst : Functor.IsSplitPair G f g], HasColimit (parallelPair f g ⋙ G) :=
  fun {A B} f g [Functor.IsSplitPair G f g] => hasColimitOfIso (diagramIsoParallelPair (parallelPair f g ⋙ G))
⊢ ReflectsColimitOfIsSplitPair G
[PROOFSTEP]
constructor
[GOAL]
case out
C : Type u₁
D : Type u₂
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₁, u₂} D
G : D ⥤ C
inst✝¹ : IsRightAdjoint G
inst✝ : CreatesColimitOfIsSplitPair G
I : ∀ {A B : D} (f g : A ⟶ B) [inst : Functor.IsSplitPair G f g], HasColimit (parallelPair f g ⋙ G) :=
  fun {A B} f g [Functor.IsSplitPair G f g] => hasColimitOfIso (diagramIsoParallelPair (parallelPair f g ⋙ G))
⊢ {A B : D} → (f g : A ⟶ B) → [inst : Functor.IsSplitPair G f g] → ReflectsColimit (parallelPair f g) G
[PROOFSTEP]
intros
[GOAL]
case out
C : Type u₁
D : Type u₂
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝² : IsRightAdjoint G
inst✝¹ : CreatesColimitOfIsSplitPair G
I : ∀ {A B : D} (f g : A ⟶ B) [inst : Functor.IsSplitPair G f g], HasColimit (parallelPair f g ⋙ G) :=
  fun {A B} f g [Functor.IsSplitPair G f g] => hasColimitOfIso (diagramIsoParallelPair (parallelPair f g ⋙ G))
A✝ B✝ : D
f✝ g✝ : A✝ ⟶ B✝
inst✝ : Functor.IsSplitPair G f✝ g✝
⊢ ReflectsColimit (parallelPair f✝ g✝) G
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : ReflectsIsomorphisms G
inst✝¹ : HasCoequalizerOfIsSplitPair G
inst✝ : PreservesColimitOfIsSplitPair G
⊢ MonadicRightAdjoint G
[PROOFSTEP]
apply (config := { allowSynthFailures := true }) @monadicOfHasPreservesReflectsGSplitCoequalizers
[GOAL]
case inst
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : ReflectsIsomorphisms G
inst✝¹ : HasCoequalizerOfIsSplitPair G
inst✝ : PreservesColimitOfIsSplitPair G
⊢ ReflectsColimitOfIsSplitPair G
[PROOFSTEP]
constructor
[GOAL]
case inst.out
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : ReflectsIsomorphisms G
inst✝¹ : HasCoequalizerOfIsSplitPair G
inst✝ : PreservesColimitOfIsSplitPair G
⊢ {A B : D} → (f g : A ⟶ B) → [inst : Functor.IsSplitPair G f g] → ReflectsColimit (parallelPair f g) G
[PROOFSTEP]
intro _ _ f g _
[GOAL]
case inst.out
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝⁴ : IsRightAdjoint G
inst✝³ : ReflectsIsomorphisms G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
A✝ B✝ : D
f g : A✝ ⟶ B✝
inst✝ : Functor.IsSplitPair G f g
⊢ ReflectsColimit (parallelPair f g) G
[PROOFSTEP]
have := HasCoequalizerOfIsSplitPair.out G f g
[GOAL]
case inst.out
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝⁴ : IsRightAdjoint G
inst✝³ : ReflectsIsomorphisms G
inst✝² : HasCoequalizerOfIsSplitPair G
inst✝¹ : PreservesColimitOfIsSplitPair G
A✝ B✝ : D
f g : A✝ ⟶ B✝
inst✝ : Functor.IsSplitPair G f g
this : HasCoequalizer f g
⊢ ReflectsColimit (parallelPair f g) G
[PROOFSTEP]
apply reflectsColimitOfReflectsIsomorphisms
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
⊢ MonadicRightAdjoint G
[PROOFSTEP]
letI i : IsRightAdjoint (comparison (Adjunction.ofRightAdjoint G)) := ⟨_, comparisonAdjunction⟩
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
⊢ MonadicRightAdjoint G
[PROOFSTEP]
constructor
[GOAL]
case eqv
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
⊢ IsEquivalence (comparison adj)
[PROOFSTEP]
let _ :
  ∀ X : (Adjunction.ofRightAdjoint G).toMonad.Algebra,
    IsIso ((Adjunction.ofRightAdjoint (comparison (Adjunction.ofRightAdjoint G))).unit.app X) :=
  by
  intro X
  apply @isIso_of_reflects_iso _ _ _ _ _ _ _ (Monad.forget (Adjunction.ofRightAdjoint G).toMonad) ?_ _
  · change IsIso (comparisonAdjunction.unit.app X).f
    rw [comparisonAdjunction_unit_f]
    change IsIso (IsColimit.coconePointUniqueUpToIso (beckCoequalizer X) (unitColimitOfPreservesCoequalizer X)).hom
    apply IsIso.of_iso (IsColimit.coconePointUniqueUpToIso _ _)
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
⊢ ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X)
[PROOFSTEP]
intro X
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
X : Algebra (toMonad adj)
⊢ IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X)
[PROOFSTEP]
apply @isIso_of_reflects_iso _ _ _ _ _ _ _ (Monad.forget (Adjunction.ofRightAdjoint G).toMonad) ?_ _
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
X : Algebra (toMonad adj)
⊢ IsIso ((forget (toMonad adj)).map (NatTrans.app (ofRightAdjoint (comparison adj)).unit X))
[PROOFSTEP]
change IsIso (comparisonAdjunction.unit.app X).f
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
X : Algebra (toMonad adj)
⊢ IsIso (NatTrans.app comparisonAdjunction.unit X).f
[PROOFSTEP]
rw [comparisonAdjunction_unit_f]
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
X : Algebra (toMonad adj)
⊢ IsIso (IsColimit.desc (beckCoequalizer X) (unitCofork X))
[PROOFSTEP]
change IsIso (IsColimit.coconePointUniqueUpToIso (beckCoequalizer X) (unitColimitOfPreservesCoequalizer X)).hom
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
X : Algebra (toMonad adj)
⊢ IsIso (IsColimit.coconePointUniqueUpToIso (beckCoequalizer X) (unitColimitOfPreservesCoequalizer X)).hom
[PROOFSTEP]
apply IsIso.of_iso (IsColimit.coconePointUniqueUpToIso _ _)
[GOAL]
case eqv
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
⊢ IsEquivalence (comparison adj)
[PROOFSTEP]
let _ : ∀ Y : D, IsIso ((ofRightAdjoint (comparison (Adjunction.ofRightAdjoint G))).counit.app Y) :=
  by
  intro Y
  change IsIso (comparisonAdjunction.counit.app Y)
  rw [comparisonAdjunction_counit_app]
    -- Porting note: passing instances through
  change IsIso (IsColimit.coconePointUniqueUpToIso _ ?_).hom
  infer_instance
    -- Porting note: passing instances through
  apply @counitCoequalizerOfReflectsCoequalizer _ _ _ _ _ _ _ ?_
  apply reflectsColimitOfReflectsIsomorphisms
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
⊢ ∀ (Y : D), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).counit Y)
[PROOFSTEP]
intro Y
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).counit Y)
[PROOFSTEP]
change IsIso (comparisonAdjunction.counit.app Y)
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ IsIso (NatTrans.app comparisonAdjunction.counit Y)
[PROOFSTEP]
rw [comparisonAdjunction_counit_app]
  -- Porting note: passing instances through
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ IsIso
    (colimit.desc (parallelPair (F.map (G.map (NatTrans.app adj.counit Y))) (NatTrans.app adj.counit (F.obj (G.obj Y))))
      (counitCofork Y))
[PROOFSTEP]
change IsIso (IsColimit.coconePointUniqueUpToIso _ ?_).hom
[GOAL]
case refine_2
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ IsIso
    (IsColimit.coconePointUniqueUpToIso
        (colimit.isColimit
          (parallelPair (F.map (G.map (NatTrans.app adj.counit Y))) (NatTrans.app adj.counit (F.obj (G.obj Y)))))
        ?refine_1).hom
case refine_1
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ IsColimit (counitCofork Y)
[PROOFSTEP]
infer_instance
  -- Porting note: passing instances through
[GOAL]
case refine_1
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ IsColimit (counitCofork Y)
[PROOFSTEP]
apply @counitCoequalizerOfReflectsCoequalizer _ _ _ _ _ _ _ ?_
[GOAL]
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
Y : D
⊢ ReflectsColimit (parallelPair (F.map (G.map (NatTrans.app adj.counit Y))) (NatTrans.app adj.counit (F.obj (G.obj Y))))
    G
[PROOFSTEP]
apply reflectsColimitOfReflectsIsomorphisms
[GOAL]
case eqv
C : Type u₁
D : Type u₂
inst✝⁵ : Category.{v₁, u₁} C
inst✝⁴ : Category.{v₁, u₂} D
G : D ⥤ C
inst✝³ : IsRightAdjoint G
inst✝² : HasReflexiveCoequalizers D
inst✝¹ : ReflectsIsomorphisms G
inst✝ : PreservesColimitOfIsReflexivePair G
i : IsRightAdjoint (comparison adj) := { left := leftAdjointComparison, adj := comparisonAdjunction }
x✝¹ : ∀ (X : Algebra (toMonad adj)), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) :=
  fun X => isIso_of_reflects_iso (NatTrans.app (ofRightAdjoint (comparison adj)).unit X) (forget (toMonad adj))
x✝ : ∀ (Y : D), IsIso (NatTrans.app (ofRightAdjoint (comparison adj)).counit Y) :=
  fun Y =>
    let_fun this :=
      Eq.mpr
        (_root_.id (comparisonAdjunction_counit_app Y ▸ Eq.refl (IsIso (NatTrans.app comparisonAdjunction.counit Y))))
        (let_fun this := inferInstance;
        this);
    this
⊢ IsEquivalence (comparison adj)
[PROOFSTEP]
exact Adjunction.isRightAdjointToIsEquivalence
