l3lab/ntp-mathlib huggingface dataset:
/-- Construct a multicofork using a collection `π` of morphisms. -/
@[simps]
def ofπ (I : MultispanIndex.{w} C) (P : C) (π : ∀ b, I.right b ⟶ P)
    (w : ∀ a, I.fst a ≫ π (I.fstFrom a) = I.snd a ≫ π (I.sndFrom a)) : Multicofork I where
  pt := P
  ι :=
    { app := fun x =>
        match x with
        | WalkingMultispan.left a => I.fst a ≫ π _
        | WalkingMultispan.right b => π _
      naturality := by
        rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.left.id
C : Type u
inst✝ : Category.{v, u} C
I✝ : MultispanIndex C
K : Multicofork I✝
I : MultispanIndex C
P : C
π : (b : I.R) → MultispanIndex.right I b ⟶ P
w :
  ∀ (a : I.L),
    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)
a✝ : I.L
⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.id (WalkingMultispan.left a✝)) ≫
      (fun x =>
          match x with
          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)
          | WalkingMultispan.right b => π b)
        (WalkingMultispan.left a✝) =
    (fun x =>
          match x with
          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)
          | WalkingMultispan.right b => π b)
        (WalkingMultispan.left a✝) ≫
      ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj P).map
        (WalkingMultispan.Hom.id (WalkingMultispan.left a✝))

Next tactic:
dsimp
/-- Construct a multicofork using a collection `π` of morphisms. -/
@[simps]
def ofπ (I : MultispanIndex.{w} C) (P : C) (π : ∀ b, I.right b ⟶ P)
    (w : ∀ a, I.fst a ≫ π (I.fstFrom a) = I.snd a ≫ π (I.sndFrom a)) : Multicofork I where
  pt := P
  ι :=
    { app := fun x =>
        match x with
        | WalkingMultispan.left a => I.fst a ≫ π _
        | WalkingMultispan.right b => π _
      naturality := by
        rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.right.fst
C : Type u
inst✝ : Category.{v, u} C
I✝ : MultispanIndex C
K : Multicofork I✝
I : MultispanIndex C
P : C
π : (b : I.R) → MultispanIndex.right I b ⟶ P
w :
  ∀ (a : I.L),
    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)
a✝ : I.L
⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.fst a✝) ≫
      (fun x =>
          match x with
          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)
          | WalkingMultispan.right b => π b)
        (WalkingMultispan.right (MultispanIndex.fstFrom I a✝)) =
    (fun x =>
          match x with
          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)
          | WalkingMultispan.right b => π b)
        (WalkingMultispan.left a✝) ≫
      ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj P).map (WalkingMultispan.Hom.fst a✝)

Next tactic:
dsimp
/-- Construct a multicofork using a collection `π` of morphisms. -/
@[simps]
def ofπ (I : MultispanIndex.{w} C) (P : C) (π : ∀ b, I.right b ⟶ P)
    (w : ∀ a, I.fst a ≫ π (I.fstFrom a) = I.snd a ≫ π (I.sndFrom a)) : Multicofork I where
  pt := P
  ι :=
    { app := fun x =>
        match x with
        | WalkingMultispan.left a => I.fst a ≫ π _
        | WalkingMultispan.right b => π _
      naturality := by
        rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.right.snd
C : Type u
inst✝ : Category.{v, u} C
I✝ : MultispanIndex C
K : Multicofork I✝
I : MultispanIndex C
P : C
π : (b : I.R) → MultispanIndex.right I b ⟶ P
w :
  ∀ (a : I.L),
    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)
a✝ : I.L
⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.snd a✝) ≫
      (fun x =>
          match x with
          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)
          | WalkingMultispan.right b => π b)
        (WalkingMultispan.right (MultispanIndex.sndFrom I a✝)) =
    (fun x =>
          match x with
          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)
          | WalkingMultispan.right b => π b)
        (WalkingMultispan.left a✝) ≫
      ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj P).map (WalkingMultispan.Hom.snd a✝)

Next tactic:
dsimp
/-- Construct a multicofork using a collection `π` of morphisms. -/
@[simps]
def ofπ (I : MultispanIndex.{w} C) (P : C) (π : ∀ b, I.right b ⟶ P)
    (w : ∀ a, I.fst a ≫ π (I.fstFrom a) = I.snd a ≫ π (I.sndFrom a)) : Multicofork I where
  pt := P
  ι :=
    { app := fun x =>
        match x with
        | WalkingMultispan.left a => I.fst a ≫ π _
        | WalkingMultispan.right b => π _
      naturality := by
        rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case right.right.id
C : Type u
inst✝ : Category.{v, u} C
I✝ : MultispanIndex C
K : Multicofork I✝
I : MultispanIndex C
P : C
π : (b : I.R) → MultispanIndex.right I b ⟶ P
w :
  ∀ (a : I.L),
    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)
a✝ : I.R
⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.id (WalkingMultispan.right a✝)) ≫
      (fun x =>
          match x with
          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)
          | WalkingMultispan.right b => π b)
        (WalkingMultispan.right a✝) =
    (fun x =>
          match x with
          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)
          | WalkingMultispan.right b => π b)
        (WalkingMultispan.right a✝) ≫
      ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj P).map
        (WalkingMultispan.Hom.id (WalkingMultispan.right a✝))

Next tactic:
dsimp
/-- Construct a multicofork using a collection `π` of morphisms. -/
@[simps]
def ofπ (I : MultispanIndex.{w} C) (P : C) (π : ∀ b, I.right b ⟶ P)
    (w : ∀ a, I.fst a ≫ π (I.fstFrom a) = I.snd a ≫ π (I.sndFrom a)) : Multicofork I where
  pt := P
  ι :=
    { app := fun x =>
        match x with
        | WalkingMultispan.left a => I.fst a ≫ π _
        | WalkingMultispan.right b => π _
      naturality := by
        rintro (_ | _) (_ | _) (_ | _ | _) <;> dsimp <;>
          

Proof state:
case left.left.id
C : Type u
inst✝ : Category.{v, u} C
I✝ : MultispanIndex C
K : Multicofork I✝
I : MultispanIndex C
P : C
π : (b : I.R) → MultispanIndex.right I b ⟶ P
w :
  ∀ (a : I.L),
    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)
a✝ : I.L
⊢ (MultispanIndex.multispan I).map (𝟙 (WalkingMultispan.left a✝)) ≫
      MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝) =
    (MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝)) ≫ 𝟙 P

Next tactic:
simp only [Functor.map_id, MultispanIndex.multispan_obj_left,
            Category.id_comp, Category.comp_id, MultispanIndex.multispan_obj_right]
/-- Construct a multicofork using a collection `π` of morphisms. -/
@[simps]
def ofπ (I : MultispanIndex.{w} C) (P : C) (π : ∀ b, I.right b ⟶ P)
    (w : ∀ a, I.fst a ≫ π (I.fstFrom a) = I.snd a ≫ π (I.sndFrom a)) : Multicofork I where
  pt := P
  ι :=
    { app := fun x =>
        match x with
        | WalkingMultispan.left a => I.fst a ≫ π _
        | WalkingMultispan.right b => π _
      naturality := by
        rintro (_ | _) (_ | _) (_ | _ | _) <;> dsimp <;>
          

Proof state:
case left.right.fst
C : Type u
inst✝ : Category.{v, u} C
I✝ : MultispanIndex C
K : Multicofork I✝
I : MultispanIndex C
P : C
π : (b : I.R) → MultispanIndex.right I b ⟶ P
w :
  ∀ (a : I.L),
    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)
a✝ : I.L
⊢ MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝) =
    (MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝)) ≫ 𝟙 P

Next tactic:
simp only [Functor.map_id, MultispanIndex.multispan_obj_left,
            Category.id_comp, Category.comp_id, MultispanIndex.multispan_obj_right]
/-- Construct a multicofork using a collection `π` of morphisms. -/
@[simps]
def ofπ (I : MultispanIndex.{w} C) (P : C) (π : ∀ b, I.right b ⟶ P)
    (w : ∀ a, I.fst a ≫ π (I.fstFrom a) = I.snd a ≫ π (I.sndFrom a)) : Multicofork I where
  pt := P
  ι :=
    { app := fun x =>
        match x with
        | WalkingMultispan.left a => I.fst a ≫ π _
        | WalkingMultispan.right b => π _
      naturality := by
        rintro (_ | _) (_ | _) (_ | _ | _) <;> dsimp <;>
          

Proof state:
case left.right.snd
C : Type u
inst✝ : Category.{v, u} C
I✝ : MultispanIndex C
K : Multicofork I✝
I : MultispanIndex C
P : C
π : (b : I.R) → MultispanIndex.right I b ⟶ P
w :
  ∀ (a : I.L),
    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)
a✝ : I.L
⊢ MultispanIndex.snd I a✝ ≫ π (MultispanIndex.sndFrom I a✝) =
    (MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝)) ≫ 𝟙 P

Next tactic:
simp only [Functor.map_id, MultispanIndex.multispan_obj_left,
            Category.id_comp, Category.comp_id, MultispanIndex.multispan_obj_right]
/-- Construct a multicofork using a collection `π` of morphisms. -/
@[simps]
def ofπ (I : MultispanIndex.{w} C) (P : C) (π : ∀ b, I.right b ⟶ P)
    (w : ∀ a, I.fst a ≫ π (I.fstFrom a) = I.snd a ≫ π (I.sndFrom a)) : Multicofork I where
  pt := P
  ι :=
    { app := fun x =>
        match x with
        | WalkingMultispan.left a => I.fst a ≫ π _
        | WalkingMultispan.right b => π _
      naturality := by
        rintro (_ | _) (_ | _) (_ | _ | _) <;> dsimp <;>
          

Proof state:
case right.right.id
C : Type u
inst✝ : Category.{v, u} C
I✝ : MultispanIndex C
K : Multicofork I✝
I : MultispanIndex C
P : C
π : (b : I.R) → MultispanIndex.right I b ⟶ P
w :
  ∀ (a : I.L),
    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)
a✝ : I.R
⊢ (MultispanIndex.multispan I).map (𝟙 (WalkingMultispan.right a✝)) ≫ π a✝ = π a✝ ≫ 𝟙 P

Next tactic:
simp only [Functor.map_id, MultispanIndex.multispan_obj_left,
            Category.id_comp, Category.comp_id, MultispanIndex.multispan_obj_right]
/-- Construct a multicofork using a collection `π` of morphisms. -/
@[simps]
def ofπ (I : MultispanIndex.{w} C) (P : C) (π : ∀ b, I.right b ⟶ P)
    (w : ∀ a, I.fst a ≫ π (I.fstFrom a) = I.snd a ≫ π (I.sndFrom a)) : Multicofork I where
  pt := P
  ι :=
    { app := fun x =>
        match x with
        | WalkingMultispan.left a => I.fst a ≫ π _
        | WalkingMultispan.right b => π _
      naturality := by
        rintro (_ | _) (_ | _) (_ | _ | _) <;> dsimp <;>
          simp only [Functor.map_id, MultispanIndex.multispan_obj_left,
            Category.id_comp, Category.comp_id, MultispanIndex.multispan_obj_right]
        

Proof state:
case left.right.snd
C : Type u
inst✝ : Category.{v, u} C
I✝ : MultispanIndex C
K : Multicofork I✝
I : MultispanIndex C
P : C
π : (b : I.R) → MultispanIndex.right I b ⟶ P
w :
  ∀ (a : I.L),
    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)
a✝ : I.L
⊢ MultispanIndex.snd I a✝ ≫ π (MultispanIndex.sndFrom I a✝) = MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝)

Next tactic:
symm
/-- Construct a multicofork using a collection `π` of morphisms. -/
@[simps]
def ofπ (I : MultispanIndex.{w} C) (P : C) (π : ∀ b, I.right b ⟶ P)
    (w : ∀ a, I.fst a ≫ π (I.fstFrom a) = I.snd a ≫ π (I.sndFrom a)) : Multicofork I where
  pt := P
  ι :=
    { app := fun x =>
        match x with
        | WalkingMultispan.left a => I.fst a ≫ π _
        | WalkingMultispan.right b => π _
      naturality := by
        rintro (_ | _) (_ | _) (_ | _ | _) <;> dsimp <;>
          simp only [Functor.map_id, MultispanIndex.multispan_obj_left,
            Category.id_comp, Category.comp_id, MultispanIndex.multispan_obj_right]
        symm
        

Proof state:
case left.right.snd
C : Type u
inst✝ : Category.{v, u} C
I✝ : MultispanIndex C
K : Multicofork I✝
I : MultispanIndex C
P : C
π : (b : I.R) → MultispanIndex.right I b ⟶ P
w :
  ∀ (a : I.L),
    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)
a✝ : I.L
⊢ MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝) = MultispanIndex.snd I a✝ ≫ π (MultispanIndex.sndFrom I a✝)

Next tactic:
apply w
@[reassoc (attr := simp)]
theorem condition (a) : I.fst a ≫ K.π (I.fstFrom a) = I.snd a ≫ K.π (I.sndFrom a) := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
a : I.L
⊢ MultispanIndex.fst I a ≫ π K (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π K (MultispanIndex.sndFrom I a)

Next tactic:
rw [← K.snd_app_right, ← K.fst_app_right]
/-- This definition provides a convenient way to show that a multicofork is a colimit. -/
@[simps]
def IsColimit.mk (desc : ∀ E : Multicofork I, K.pt ⟶ E.pt)
    (fac : ∀ (E : Multicofork I) (i : I.R), K.π i ≫ desc E = E.π i)
    (uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ i : I.R, K.π i ≫ m = E.π i) → m = desc E) :
    IsColimit K :=
  { desc
    fac := by
      

Proof state:
C : Type u
inst✝ : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
desc : (E : Multicofork I) → K.pt ⟶ E.pt
fac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i
uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E
⊢ ∀ (s : Cocone (MultispanIndex.multispan I)) (j : WalkingMultispan I.fstFrom I.sndFrom), K.ι.app j ≫ desc s = s.ι.app j

Next tactic:
rintro S (a | b)
/-- This definition provides a convenient way to show that a multicofork is a colimit. -/
@[simps]
def IsColimit.mk (desc : ∀ E : Multicofork I, K.pt ⟶ E.pt)
    (fac : ∀ (E : Multicofork I) (i : I.R), K.π i ≫ desc E = E.π i)
    (uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ i : I.R, K.π i ≫ m = E.π i) → m = desc E) :
    IsColimit K :=
  { desc
    fac := by
      rintro S (a | b)
      · 

Proof state:
case left
C : Type u
inst✝ : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
desc : (E : Multicofork I) → K.pt ⟶ E.pt
fac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i
uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E
S : Cocone (MultispanIndex.multispan I)
a : I.L
⊢ K.ι.app (WalkingMultispan.left a) ≫ desc S = S.ι.app (WalkingMultispan.left a)

Next tactic:
rw [← K.w (WalkingMultispan.Hom.fst a), ← S.w (WalkingMultispan.Hom.fst a),
          Category.assoc]
/-- This definition provides a convenient way to show that a multicofork is a colimit. -/
@[simps]
def IsColimit.mk (desc : ∀ E : Multicofork I, K.pt ⟶ E.pt)
    (fac : ∀ (E : Multicofork I) (i : I.R), K.π i ≫ desc E = E.π i)
    (uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ i : I.R, K.π i ≫ m = E.π i) → m = desc E) :
    IsColimit K :=
  { desc
    fac := by
      rintro S (a | b)
      · rw [← K.w (WalkingMultispan.Hom.fst a), ← S.w (WalkingMultispan.Hom.fst a),
          Category.assoc]
        

Proof state:
case left
C : Type u
inst✝ : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
desc : (E : Multicofork I) → K.pt ⟶ E.pt
fac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i
uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E
S : Cocone (MultispanIndex.multispan I)
a : I.L
⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.fst a) ≫
      K.ι.app (WalkingMultispan.right (MultispanIndex.fstFrom I a)) ≫ desc S =
    (MultispanIndex.multispan I).map (WalkingMultispan.Hom.fst a) ≫
      S.ι.app (WalkingMultispan.right (MultispanIndex.fstFrom I a))

Next tactic:
congr 1
/-- This definition provides a convenient way to show that a multicofork is a colimit. -/
@[simps]
def IsColimit.mk (desc : ∀ E : Multicofork I, K.pt ⟶ E.pt)
    (fac : ∀ (E : Multicofork I) (i : I.R), K.π i ≫ desc E = E.π i)
    (uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ i : I.R, K.π i ≫ m = E.π i) → m = desc E) :
    IsColimit K :=
  { desc
    fac := by
      rintro S (a | b)
      · rw [← K.w (WalkingMultispan.Hom.fst a), ← S.w (WalkingMultispan.Hom.fst a),
          Category.assoc]
        congr 1
        

Proof state:
case left.e_a
C : Type u
inst✝ : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
desc : (E : Multicofork I) → K.pt ⟶ E.pt
fac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i
uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E
S : Cocone (MultispanIndex.multispan I)
a : I.L
⊢ K.ι.app (WalkingMultispan.right (MultispanIndex.fstFrom I a)) ≫ desc S =
    S.ι.app (WalkingMultispan.right (MultispanIndex.fstFrom I a))

Next tactic:
apply fac
/-- This definition provides a convenient way to show that a multicofork is a colimit. -/
@[simps]
def IsColimit.mk (desc : ∀ E : Multicofork I, K.pt ⟶ E.pt)
    (fac : ∀ (E : Multicofork I) (i : I.R), K.π i ≫ desc E = E.π i)
    (uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ i : I.R, K.π i ≫ m = E.π i) → m = desc E) :
    IsColimit K :=
  { desc
    fac := by
      rintro S (a | b)
      · rw [← K.w (WalkingMultispan.Hom.fst a), ← S.w (WalkingMultispan.Hom.fst a),
          Category.assoc]
        congr 1
        apply fac
      · 

Proof state:
case right
C : Type u
inst✝ : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
desc : (E : Multicofork I) → K.pt ⟶ E.pt
fac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i
uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E
S : Cocone (MultispanIndex.multispan I)
b : I.R
⊢ K.ι.app (WalkingMultispan.right b) ≫ desc S = S.ι.app (WalkingMultispan.right b)

Next tactic:
apply fac
/-- This definition provides a convenient way to show that a multicofork is a colimit. -/
@[simps]
def IsColimit.mk (desc : ∀ E : Multicofork I, K.pt ⟶ E.pt)
    (fac : ∀ (E : Multicofork I) (i : I.R), K.π i ≫ desc E = E.π i)
    (uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ i : I.R, K.π i ≫ m = E.π i) → m = desc E) :
    IsColimit K :=
  { desc
    fac := by
      rintro S (a | b)
      · rw [← K.w (WalkingMultispan.Hom.fst a), ← S.w (WalkingMultispan.Hom.fst a),
          Category.assoc]
        congr 1
        apply fac
      · apply fac
    uniq := by
      

Proof state:
C : Type u
inst✝ : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
desc : (E : Multicofork I) → K.pt ⟶ E.pt
fac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i
uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E
⊢ ∀ (s : Cocone (MultispanIndex.multispan I)) (m : K.pt ⟶ s.pt),
    (∀ (j : WalkingMultispan I.fstFrom I.sndFrom), K.ι.app j ≫ m = s.ι.app j) → m = desc s

Next tactic:
intro S m hm
/-- This definition provides a convenient way to show that a multicofork is a colimit. -/
@[simps]
def IsColimit.mk (desc : ∀ E : Multicofork I, K.pt ⟶ E.pt)
    (fac : ∀ (E : Multicofork I) (i : I.R), K.π i ≫ desc E = E.π i)
    (uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ i : I.R, K.π i ≫ m = E.π i) → m = desc E) :
    IsColimit K :=
  { desc
    fac := by
      rintro S (a | b)
      · rw [← K.w (WalkingMultispan.Hom.fst a), ← S.w (WalkingMultispan.Hom.fst a),
          Category.assoc]
        congr 1
        apply fac
      · apply fac
    uniq := by
      intro S m hm
      

Proof state:
C : Type u
inst✝ : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
desc : (E : Multicofork I) → K.pt ⟶ E.pt
fac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i
uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E
S : Cocone (MultispanIndex.multispan I)
m : K.pt ⟶ S.pt
hm : ∀ (j : WalkingMultispan I.fstFrom I.sndFrom), K.ι.app j ≫ m = S.ι.app j
⊢ m = desc S

Next tactic:
apply uniq
/-- This definition provides a convenient way to show that a multicofork is a colimit. -/
@[simps]
def IsColimit.mk (desc : ∀ E : Multicofork I, K.pt ⟶ E.pt)
    (fac : ∀ (E : Multicofork I) (i : I.R), K.π i ≫ desc E = E.π i)
    (uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ i : I.R, K.π i ≫ m = E.π i) → m = desc E) :
    IsColimit K :=
  { desc
    fac := by
      rintro S (a | b)
      · rw [← K.w (WalkingMultispan.Hom.fst a), ← S.w (WalkingMultispan.Hom.fst a),
          Category.assoc]
        congr 1
        apply fac
      · apply fac
    uniq := by
      intro S m hm
      apply uniq
      

Proof state:
case a
C : Type u
inst✝ : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
desc : (E : Multicofork I) → K.pt ⟶ E.pt
fac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i
uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E
S : Cocone (MultispanIndex.multispan I)
m : K.pt ⟶ S.pt
hm : ∀ (j : WalkingMultispan I.fstFrom I.sndFrom), K.ι.app j ≫ m = S.ι.app j
⊢ ∀ (i : I.R), π K i ≫ m = π S i

Next tactic:
intro i
/-- This definition provides a convenient way to show that a multicofork is a colimit. -/
@[simps]
def IsColimit.mk (desc : ∀ E : Multicofork I, K.pt ⟶ E.pt)
    (fac : ∀ (E : Multicofork I) (i : I.R), K.π i ≫ desc E = E.π i)
    (uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ i : I.R, K.π i ≫ m = E.π i) → m = desc E) :
    IsColimit K :=
  { desc
    fac := by
      rintro S (a | b)
      · rw [← K.w (WalkingMultispan.Hom.fst a), ← S.w (WalkingMultispan.Hom.fst a),
          Category.assoc]
        congr 1
        apply fac
      · apply fac
    uniq := by
      intro S m hm
      apply uniq
      intro i
      

Proof state:
case a
C : Type u
inst✝ : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
desc : (E : Multicofork I) → K.pt ⟶ E.pt
fac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i
uniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E
S : Cocone (MultispanIndex.multispan I)
m : K.pt ⟶ S.pt
hm : ∀ (j : WalkingMultispan I.fstFrom I.sndFrom), K.ι.app j ≫ m = S.ι.app j
i : I.R
⊢ π K i ≫ m = π S i

Next tactic:
apply hm
@[reassoc (attr := simp)]
theorem sigma_condition : I.fstSigmaMap ≫ Sigma.desc K.π = I.sndSigmaMap ≫ Sigma.desc K.π := by
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
inst✝¹ : HasCoproduct I.left
inst✝ : HasCoproduct I.right
⊢ MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K) = MultispanIndex.sndSigmaMap I ≫ Sigma.desc (π K)

Next tactic:
ext
@[reassoc (attr := simp)]
theorem sigma_condition : I.fstSigmaMap ≫ Sigma.desc K.π = I.sndSigmaMap ≫ Sigma.desc K.π := by
  ext
  

Proof state:
case h
C : Type u
inst✝² : Category.{v, u} C
I : MultispanIndex C
K : Multicofork I
inst✝¹ : HasCoproduct I.left
inst✝ : HasCoproduct I.right
b✝ : I.L
⊢ Sigma.ι I.left b✝ ≫ MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K) =
    Sigma.ι I.left b✝ ≫ MultispanIndex.sndSigmaMap I ≫ Sigma.desc (π K)

Next tactic:
simp
/-- Given a multicofork, we may obtain a cofork over `∐ I.left ⇉ ∐ I.right`. -/
@[simps pt]
noncomputable def toSigmaCofork (K : Multicofork I) : Cofork I.fstSigmaMap I.sndSigmaMap where
  pt := K.pt
  ι :=
    { app := fun x =>
        match x with
        | WalkingParallelPair.zero => I.fstSigmaMap ≫ Sigma.desc K.π
        | WalkingParallelPair.one => Sigma.desc K.π
      naturality := by
        

Proof state:
C : Type u
inst✝² : Category.{v, u} C
I : MultispanIndex C
K✝ : Multicofork I
inst✝¹ : HasCoproduct I.left
inst✝ : HasCoproduct I.right
K : Multicofork I
⊢ ∀ ⦃X Y : WalkingParallelPair⦄ (f : X ⟶ Y),
    (parallelPair (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I)).map f ≫
        (fun x =>
            match x with
            | WalkingParallelPair.zero => MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)
            | WalkingParallelPair.one => Sigma.desc (π K))
          Y =
      (fun x =>
            match x with
            | WalkingParallelPair.zero => MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)
            | WalkingParallelPair.one => Sigma.desc (π K))
          X ≫
        ((Functor.const WalkingParallelPair).obj K.pt).map f

Next tactic:
rintro (_ | _) (_ | _) (_ | _ | _)