Theorem: CategoryTheory.hasStrictInitial_of_isUniversal
File: Mathlib/CategoryTheory/Extensive.lean

tactic: intro A f
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X Y : C
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
⊢ ∀ (A : C) (f : A ⟶ ⊥_ C), IsIso f

tactic: suffices IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A)) by
  obtain ⟨l, h₁, h₂⟩ := Limits.BinaryCofan.IsColimit.desc' this (f ≫ initial.to A) (𝟙 A)
  rcases(Category.id_comp _).symm.trans h₂ with rfl
  exact ⟨⟨_, ((Category.id_comp _).symm.trans h₁).symm, initialIsInitial.hom_ext _ _⟩⟩
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X Y : C
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
A : C
f : A ⟶ ⊥_ C
⊢ IsIso f

tactic: refine' (H (BinaryCofan.mk (𝟙 _) (𝟙 _)) (mapPair f f) f (by ext ⟨⟨⟩⟩ <;> dsimp <;> simp)
  (mapPair_equifibered _) _).some
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X Y : C
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
A : C
f : A ⟶ ⊥_ C
⊢ IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))

tactic: rintro ⟨⟨⟩⟩ <;> dsimp <;>
  exact IsPullback.of_horiz_isIso ⟨(Category.id_comp _).trans (Category.comp_id _).symm⟩
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X Y : C
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
A : C
f : A ⟶ ⊥_ C
⊢ ∀ (j : Discrete WalkingPair),
    IsPullback ((BinaryCofan.mk (𝟙 A) (𝟙 A)).ι.app j) ((mapPair f f).app j) f
      ((BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C))).ι.app j)

tactic: obtain ⟨l, h₁, h₂⟩ := Limits.BinaryCofan.IsColimit.desc' this (f ≫ initial.to A) (𝟙 A)
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X Y : C
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
A : C
f : A ⟶ ⊥_ C
this : IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))
⊢ IsIso f

tactic: rcases(Category.id_comp _).symm.trans h₂ with rfl
state_before: case mk.intro
J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X Y : C
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
A : C
f : A ⟶ ⊥_ C
this : IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))
l : (BinaryCofan.mk (𝟙 A) (𝟙 A)).pt ⟶ A
h₁ : BinaryCofan.inl (BinaryCofan.mk (𝟙 A) (𝟙 A)) ≫ l = f ≫ initial.to A
h₂ : BinaryCofan.inr (BinaryCofan.mk (𝟙 A) (𝟙 A)) ≫ l = 𝟙 A
⊢ IsIso f

tactic: exact ⟨⟨_, ((Category.id_comp _).symm.trans h₁).symm, initialIsInitial.hom_ext _ _⟩⟩
state_before: case mk.intro
J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X Y : C
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
A : C
f : A ⟶ ⊥_ C
this : IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))
h₁ : BinaryCofan.inl (BinaryCofan.mk (𝟙 A) (𝟙 A)) ≫ 𝟙 A = f ≫ initial.to A
h₂ : BinaryCofan.inr (BinaryCofan.mk (𝟙 A) (𝟙 A)) ≫ 𝟙 A = 𝟙 A
⊢ IsIso f

tactic: ext ⟨⟨⟩⟩ <;> dsimp <;> simp
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
X Y : C
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
A : C
f : A ⟶ ⊥_ C
⊢ mapPair f f ≫ (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C))).ι =
    (BinaryCofan.mk (𝟙 A) (𝟙 A)).ι ≫ (Functor.const (Discrete WalkingPair)).map f