Theorem: CategoryTheory.Limits.BinaryCofan.isColimit_iff_isIso_inl
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: constructor
state_before: C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
⊢ Nonempty (IsColimit c) ↔ IsIso c.inl
state_after: case mp
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
⊢ Nonempty (IsColimit c) → IsIso c.inl

case mpr
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
⊢ IsIso c.inl → Nonempty (IsColimit c)

tactic: rintro ⟨H⟩
state_before: case mp
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
⊢ Nonempty (IsColimit c) → IsIso c.inl
state_after: case mp.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
H : IsColimit c
⊢ IsIso c.inl

tactic: obtain ⟨l, hl, -⟩ := BinaryCofan.IsColimit.desc' H (𝟙 X) (h.to X)
state_before: case mp.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
H : IsColimit c
⊢ IsIso c.inl
state_after: case mp.intro.mk.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
H : IsColimit c
l : c.pt ⟶ X
hl : c.inl ≫ l = 𝟙 X
⊢ IsIso c.inl

tactic: refine ⟨⟨l, hl, BinaryCofan.IsColimit.hom_ext H (?_) (h.hom_ext _ _)⟩⟩
state_before: case mp.intro.mk.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
H : IsColimit c
l : c.pt ⟶ X
hl : c.inl ≫ l = 𝟙 X
⊢ IsIso c.inl
state_after: case mp.intro.mk.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
H : IsColimit c
l : c.pt ⟶ X
hl : c.inl ≫ l = 𝟙 X
⊢ c.inl ≫ l ≫ c.inl = c.inl ≫ 𝟙 (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left })

tactic: rw [Category.comp_id]
state_before: case mp.intro.mk.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
H : IsColimit c
l : c.pt ⟶ X
hl : c.inl ≫ l = 𝟙 X
⊢ c.inl ≫ l ≫ c.inl = c.inl ≫ 𝟙 (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left })
state_after: case mp.intro.mk.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
H : IsColimit c
l : c.pt ⟶ X
hl : c.inl ≫ l = 𝟙 X
⊢ c.inl ≫ l ≫ c.inl = c.inl

tactic: rwa [Category.assoc,Category.id_comp] at e
state_before: case mp.intro.mk.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
H : IsColimit c
l : c.pt ⟶ X
hl : c.inl ≫ l = 𝟙 X
e : (c.inl ≫ l) ≫ c.inl = 𝟙 X ≫ c.inl
⊢ c.inl ≫ l ≫ c.inl = c.inl
state_after: no goals

tactic: intro
state_before: case mpr
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
⊢ IsIso c.inl → Nonempty (IsColimit c)
state_after: case mpr
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
a✝ : IsIso c.inl
⊢ Nonempty (IsColimit c)

tactic: exact
  ⟨BinaryCofan.IsColimit.mk _ (fun f _ => inv c.inl ≫ f)
      (fun _ _ => IsIso.hom_inv_id_assoc _ _) (fun _ _ => h.hom_ext _ _) fun _ _ _ e _ =>
      (IsIso.eq_inv_comp _).mpr e⟩
state_before: case mpr
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
a✝ : IsIso c.inl
⊢ Nonempty (IsColimit c)
state_after: no goals