Theorem: CategoryTheory.hasStrictInitial_of_isUniversal
File: Mathlib/CategoryTheory/Limits/VanKampen.lean

tactic: intro A f
state_before: J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.253571, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.253578, u_2} D
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
⊢ ∀ (A : C) (f : A ⟶ ⊥_ C), IsIso f
state_after: J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.253571, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.253578, u_2} D
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.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.253571, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.253578, u_2} D
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
A : C
f : A ⟶ ⊥_ C
⊢ IsIso f
state_after: J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.253571, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.253578, u_2} D
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
A : C
f : A ⟶ ⊥_ C
⊢ IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))

tactic: refine (H (BinaryCofan.mk (𝟙 _) (𝟙 _)) (mapPair f f) f (by ext ⟨⟨⟩⟩ <;> dsimp <;> simp)
  (mapPair_equifibered _) ?_).some
state_before: J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.253571, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.253578, u_2} D
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
A : C
f : A ⟶ ⊥_ C
⊢ IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))
state_after: J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.253571, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.253578, u_2} D
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: rintro ⟨⟨⟩⟩ <;> dsimp <;>
  exact IsPullback.of_horiz_isIso ⟨(Category.id_comp _).trans (Category.comp_id _).symm⟩
state_before: J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.253571, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.253578, u_2} D
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)
state_after: no goals

tactic: obtain ⟨l, h₁, h₂⟩ := Limits.BinaryCofan.IsColimit.desc' this (f ≫ initial.to A) (𝟙 A)
state_before: J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.253571, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.253578, u_2} D
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
A : C
f : A ⟶ ⊥_ C
this : IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))
⊢ IsIso f
state_after: case mk.intro
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.253571, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.253578, u_2} D
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.mk (𝟙 A) (𝟙 A)).inl ≫ l = f ≫ initial.to A
h₂ : (BinaryCofan.mk (𝟙 A) (𝟙 A)).inr ≫ l = 𝟙 A
⊢ IsIso f

tactic: rcases(Category.id_comp _).symm.trans h₂ with rfl
state_before: case mk.intro
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.253571, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.253578, u_2} D
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.mk (𝟙 A) (𝟙 A)).inl ≫ l = f ≫ initial.to A
h₂ : (BinaryCofan.mk (𝟙 A) (𝟙 A)).inr ≫ l = 𝟙 A
⊢ IsIso f
state_after: case mk.intro
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.253571, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.253578, u_2} D
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
A : C
f : A ⟶ ⊥_ C
this : IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))
h₁ : (BinaryCofan.mk (𝟙 A) (𝟙 A)).inl ≫ 𝟙 A = f ≫ initial.to A
h₂ : (BinaryCofan.mk (𝟙 A) (𝟙 A)).inr ≫ 𝟙 A = 𝟙 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.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.253571, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.253578, u_2} D
inst✝ : HasInitial C
H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))
A : C
f : A ⟶ ⊥_ C
this : IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))
h₁ : (BinaryCofan.mk (𝟙 A) (𝟙 A)).inl ≫ 𝟙 A = f ≫ initial.to A
h₂ : (BinaryCofan.mk (𝟙 A) (𝟙 A)).inr ≫ 𝟙 A = 𝟙 A
⊢ IsIso f
state_after: no goals

tactic: ext ⟨⟨⟩⟩ <;> dsimp <;> simp
state_before: J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.253571, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.253578, u_2} D
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
state_after: no goals