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

tactic: let f : ι → C := F.obj ∘ Discrete.mk
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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
F : Discrete ι ⥤ C
c : Cocone F
hc : IsVanKampenColimit c
i : Discrete ι
⊢ Mono (c.ι.app i)
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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
F : Discrete ι ⥤ C
c : Cocone F
hc : IsVanKampenColimit c
i : Discrete ι
f : ι → C := F.obj ∘ Discrete.mk
⊢ Mono (c.ι.app i)

tactic: have : F = Discrete.functor f :=
  Functor.hext (fun i ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp [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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
F : Discrete ι ⥤ C
c : Cocone F
hc : IsVanKampenColimit c
i : Discrete ι
f : ι → C := F.obj ∘ Discrete.mk
⊢ Mono (c.ι.app i)
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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
F : Discrete ι ⥤ C
c : Cocone F
hc : IsVanKampenColimit c
i : Discrete ι
f : ι → C := F.obj ∘ Discrete.mk
this : F = Discrete.functor f
⊢ Mono (c.ι.app i)

tactic: clear_value 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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
F : Discrete ι ⥤ C
c : Cocone F
hc : IsVanKampenColimit c
i : Discrete ι
f : ι → C := F.obj ∘ Discrete.mk
this : F = Discrete.functor f
⊢ Mono (c.ι.app i)
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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
F : Discrete ι ⥤ C
c : Cocone F
hc : IsVanKampenColimit c
i : Discrete ι
f : ι → C
this : F = Discrete.functor f
⊢ Mono (c.ι.app i)

tactic: subst this
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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
F : Discrete ι ⥤ C
c : Cocone F
hc : IsVanKampenColimit c
i : Discrete ι
f : ι → C
this : F = Discrete.functor f
⊢ Mono (c.ι.app i)
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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ Mono (c.ι.app i)

tactic: refine PullbackCone.mono_of_isLimitMkIdId _ (IsPullback.isLimit ?_)
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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ Mono (c.ι.app i)
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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ IsPullback (𝟙 ((Discrete.functor f).obj i)) (𝟙 ((Discrete.functor f).obj i)) (c.ι.app i) (c.ι.app i)

tactic: nth_rw 1 [← Category.id_comp (c.ι.app i)]
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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ IsPullback (𝟙 ((Discrete.functor f).obj i)) (𝟙 ((Discrete.functor f).obj i)) (c.ι.app i) (c.ι.app i)
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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ IsPullback (𝟙 ((Discrete.functor f).obj i)) (𝟙 ((Discrete.functor f).obj i))
    (𝟙 ((Discrete.functor f).obj i) ≫ c.ι.app i) (c.ι.app i)

tactic: convert IsPullback.paste_vert _ (isPullback_of_cofan_isVanKampen hc i.as i.as)
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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ IsPullback (𝟙 ((Discrete.functor f).obj i)) (𝟙 ((Discrete.functor f).obj i))
    (𝟙 ((Discrete.functor f).obj i) ≫ c.ι.app i) (c.ι.app i)
state_after: case h.e'_8.h
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
e_5✝ : (Discrete.functor f).obj i = f i.as
⊢ 𝟙 ((Discrete.functor f).obj i) = ?convert_4 ≫ if h : i.as = i.as then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to (f i.as)

case convert_4
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ (Discrete.functor f).obj i ⟶ if i.as = i.as then f i.as else ⊥_ C

case convert_6
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ IsPullback (𝟙 ((Discrete.functor f).obj i)) ?convert_4 (𝟙 ((Discrete.functor f).obj i))
    (if h : i.as = i.as then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to (f i.as))

tactic: swap
state_before: case h.e'_8.h
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
e_5✝ : (Discrete.functor f).obj i = f i.as
⊢ 𝟙 ((Discrete.functor f).obj i) = ?convert_4 ≫ if h : i.as = i.as then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to (f i.as)

case convert_4
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ (Discrete.functor f).obj i ⟶ if i.as = i.as then f i.as else ⊥_ C

case convert_6
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ IsPullback (𝟙 ((Discrete.functor f).obj i)) ?convert_4 (𝟙 ((Discrete.functor f).obj i))
    (if h : i.as = i.as then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to (f i.as))
state_after: case convert_4
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ (Discrete.functor f).obj i ⟶ if i.as = i.as then f i.as else ⊥_ C

case h.e'_8.h
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
e_5✝ : (Discrete.functor f).obj i = f i.as
⊢ 𝟙 ((Discrete.functor f).obj i) = ?convert_4 ≫ if h : i.as = i.as then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to (f i.as)

case convert_6
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ IsPullback (𝟙 ((Discrete.functor f).obj i)) ?convert_4 (𝟙 ((Discrete.functor f).obj i))
    (if h : i.as = i.as then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to (f i.as))

tactic: rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩
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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
F : Discrete ι ⥤ C
c : Cocone F
hc : IsVanKampenColimit c
i : Discrete ι
f : ι → C := F.obj ∘ Discrete.mk
⊢ ∀ (X Y : Discrete ι) (f_1 : X ⟶ Y), HEq (F.map f_1) ((Discrete.functor f).map f_1)
state_after: case mk.mk.up.up
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
F : Discrete ι ⥤ C
c : Cocone F
hc : IsVanKampenColimit c
i✝ : Discrete ι
f : ι → C := F.obj ∘ Discrete.mk
i : ι
⊢ HEq (F.map { down := { down := ⋯ } }) ((Discrete.functor f).map { down := { down := ⋯ } })

tactic: simp [f]
state_before: case mk.mk.up.up
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
F : Discrete ι ⥤ C
c : Cocone F
hc : IsVanKampenColimit c
i✝ : Discrete ι
f : ι → C := F.obj ∘ Discrete.mk
i : ι
⊢ HEq (F.map { down := { down := ⋯ } }) ((Discrete.functor f).map { down := { down := ⋯ } })
state_after: no goals

tactic: exact (eqToHom (if_pos rfl).symm)
state_before: case convert_4
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ (Discrete.functor f).obj i ⟶ if i.as = i.as then f i.as else ⊥_ C
state_after: no goals

tactic: simp
state_before: case h.e'_8.h
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
e_5✝ : (Discrete.functor f).obj i = f i.as
⊢ 𝟙 ((Discrete.functor f).obj i) = eqToHom ⋯ ≫ if h : i.as = i.as then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to (f i.as)
state_after: no goals

tactic: exact IsPullback.of_vert_isIso ⟨by simp⟩
state_before: case convert_6
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ IsPullback (𝟙 ((Discrete.functor f).obj i)) (eqToHom ⋯) (𝟙 ((Discrete.functor f).obj i))
    (if h : i.as = i.as then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to (f i.as))
state_after: no goals

tactic: 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.351012, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.351019, u_2} D
inst✝ : HasInitial C
ι : Type u_3
i : Discrete ι
f : ι → C
c : Cocone (Discrete.functor f)
hc : IsVanKampenColimit c
⊢ 𝟙 ((Discrete.functor f).obj i) ≫ 𝟙 ((Discrete.functor f).obj i) =
    eqToHom ⋯ ≫ if h : i.as = i.as then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to (f i.as)
state_after: no goals