Theorem: CategoryTheory.Presheaf.final_toCostructuredArrow_comp_pre
File: Mathlib/CategoryTheory/Limits/Presheaf.lean

Proof steps:
state_before: C✝ : Type u₁
inst✝⁴ : Category.{v₁, u₁} C✝
ℰ : Type u₂
inst✝³ : Category.{v₁, u₂} ℰ
A✝ A : C✝ ⥤ ℰ
inst✝² : yoneda.HasPointwiseLeftKanExtension A
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
P : Cᵒᵖ ⥤ Type v₁
I : Type v₁
inst✝ : SmallCategory I
F : I ⥤ C
c : Cocone (F ⋙ yoneda)
hc : IsColimit c
⊢ (c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt).Final
state_after: case h
C✝ : Type u₁
inst✝⁴ : Category.{v₁, u₁} C✝
ℰ : Type u₂
inst✝³ : Category.{v₁, u₂} ℰ
A✝ A : C✝ ⥤ ℰ
inst✝² : yoneda.HasPointwiseLeftKanExtension A
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
P : Cᵒᵖ ⥤ Type v₁
I : Type v₁
inst✝ : SmallCategory I
F : I ⥤ C
c : Cocone (F ⋙ yoneda)
hc : IsColimit c
⊢ IsTerminal (colimit ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙ yoneda))
tactic: apply Functor.cofinal_of_isTerminal_colimit_comp_yoneda
state_before: case h
C✝ : Type u₁
inst✝⁴ : Category.{v₁, u₁} C✝
ℰ : Type u₂
inst✝³ : Category.{v₁, u₂} ℰ
A✝ A : C✝ ⥤ ℰ
inst✝² : yoneda.HasPointwiseLeftKanExtension A
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
P : Cᵒᵖ ⥤ Type v₁
I : Type v₁
inst✝ : SmallCategory I
F : I ⥤ C
c : Cocone (F ⋙ yoneda)
hc : IsColimit c
⊢ IsTerminal (colimit ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙ yoneda))
state_after: case h
C✝ : Type u₁
inst✝⁴ : Category.{v₁, u₁} C✝
ℰ : Type u₂
inst✝³ : Category.{v₁, u₂} ℰ
A✝ A : C✝ ⥤ ℰ
inst✝² : yoneda.HasPointwiseLeftKanExtension A
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
P : Cᵒᵖ ⥤ Type v₁
I : Type v₁
inst✝ : SmallCategory I
F : I ⥤ C
c : Cocone (F ⋙ yoneda)
hc : IsColimit c
⊢ IsTerminal
    (colimit ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙ CostructuredArrow.toOver yoneda c.pt))
tactic: suffices IsTerminal (colimit ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙
      CostructuredArrow.toOver yoneda c.pt)) by
    apply IsTerminal.isTerminalOfObj (overEquivPresheafCostructuredArrow c.pt).inverse
    apply IsTerminal.ofIso this
    refine ?_ ≪≫ (preservesColimitIso (overEquivPresheafCostructuredArrow c.pt).inverse _).symm
    apply HasColimit.isoOfNatIso
    exact isoWhiskerLeft _
      (CostructuredArrow.toOverCompOverEquivPresheafCostructuredArrow c.pt).isoCompInverse
state_before: case h
C✝ : Type u₁
inst✝⁴ : Category.{v₁, u₁} C✝
ℰ : Type u₂
inst✝³ : Category.{v₁, u₂} ℰ
A✝ A : C✝ ⥤ ℰ
inst✝² : yoneda.HasPointwiseLeftKanExtension A
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
P : Cᵒᵖ ⥤ Type v₁
I : Type v₁
inst✝ : SmallCategory I
F : I ⥤ C
c : Cocone (F ⋙ yoneda)
hc : IsColimit c
⊢ IsTerminal
    (colimit ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙ CostructuredArrow.toOver yoneda c.pt))
state_after: case h
C✝ : Type u₁
inst✝⁴ : Category.{v₁, u₁} C✝
ℰ : Type u₂
inst✝³ : Category.{v₁, u₂} ℰ
A✝ A : C✝ ⥤ ℰ
inst✝² : yoneda.HasPointwiseLeftKanExtension A
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
P : Cᵒᵖ ⥤ Type v₁
I : Type v₁
inst✝ : SmallCategory I
F : I ⥤ C
c : Cocone (F ⋙ yoneda)
hc : IsColimit c
⊢ Over.mk (𝟙 c.pt) ≅
    colimit ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙ CostructuredArrow.toOver yoneda c.pt)
tactic: apply IsTerminal.ofIso Over.mkIdTerminal
state_before: case h
C✝ : Type u₁
inst✝⁴ : Category.{v₁, u₁} C✝
ℰ : Type u₂
inst✝³ : Category.{v₁, u₂} ℰ
A✝ A : C✝ ⥤ ℰ
inst✝² : yoneda.HasPointwiseLeftKanExtension A
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
P : Cᵒᵖ ⥤ Type v₁
I : Type v₁
inst✝ : SmallCategory I
F : I ⥤ C
c : Cocone (F ⋙ yoneda)
hc : IsColimit c
⊢ Over.mk (𝟙 c.pt) ≅
    colimit ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙ CostructuredArrow.toOver yoneda c.pt)
state_after: case h
C✝ : Type u₁
inst✝⁴ : Category.{v₁, u₁} C✝
ℰ : Type u₂
inst✝³ : Category.{v₁, u₂} ℰ
A✝ A : C✝ ⥤ ℰ
inst✝² : yoneda.HasPointwiseLeftKanExtension A
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
P : Cᵒᵖ ⥤ Type v₁
I : Type v₁
inst✝ : SmallCategory I
F : I ⥤ C
c : Cocone (F ⋙ yoneda)
hc : IsColimit c
isc : IsColimit
  ((Over.forget c.pt).mapCocone
    (colimit.cocone
      ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙ CostructuredArrow.toOver yoneda c.pt))) :=
  PreservesColimit.preserves
    (colimit.isColimit
      ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙ CostructuredArrow.toOver yoneda c.pt))
⊢ Over.mk (𝟙 c.pt) ≅
    colimit ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙ CostructuredArrow.toOver yoneda c.pt)
tactic: let isc : IsColimit ((Over.forget _).mapCocone _) := PreservesColimit.preserves
    (colimit.isColimit ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙
      CostructuredArrow.toOver yoneda c.pt))
state_before: case h
C✝ : Type u₁
inst✝⁴ : Category.{v₁, u₁} C✝
ℰ : Type u₂
inst✝³ : Category.{v₁, u₂} ℰ
A✝ A : C✝ ⥤ ℰ
inst✝² : yoneda.HasPointwiseLeftKanExtension A
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
P : Cᵒᵖ ⥤ Type v₁
I : Type v₁
inst✝ : SmallCategory I
F : I ⥤ C
c : Cocone (F ⋙ yoneda)
hc : IsColimit c
isc : IsColimit
  ((Over.forget c.pt).mapCocone
    (colimit.cocone
      ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙ CostructuredArrow.toOver yoneda c.pt))) :=
  PreservesColimit.preserves
    (colimit.isColimit
      ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙ CostructuredArrow.toOver yoneda c.pt))
⊢ Over.mk (𝟙 c.pt) ≅
    colimit ((c.toCostructuredArrow ⋙ CostructuredArrow.pre F yoneda c.pt) ⋙ CostructuredArrow.toOver yoneda c.pt)
state_after: no goals
tactic: exact Over.isoMk (hc.coconePointUniqueUpToIso isc) (hc.hom_ext fun i => by simp)