l3lab/ntp-mathlib huggingface dataset:
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> 

Proof state:
case none
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ (cospan f g ⋙ F).obj none ≅ (cospan (F.map f) (F.map g)).obj none

Next tactic:
exact Iso.refl _
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> 

Proof state:
case some.left
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ (cospan f g ⋙ F).obj (some WalkingPair.left) ≅ (cospan (F.map f) (F.map g)).obj (some WalkingPair.left)

Next tactic:
exact Iso.refl _
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> 

Proof state:
case some.right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ (cospan f g ⋙ F).obj (some WalkingPair.right) ≅ (cospan (F.map f) (F.map g)).obj (some WalkingPair.right)

Next tactic:
exact Iso.refl _
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ ∀ {X_1 Y_1 : WalkingCospan} (f_1 : X_1 ⟶ Y_1),
    (cospan f g ⋙ F).map f_1 ≫
        (Option.casesOn Y_1 (Iso.refl ((cospan f g ⋙ F).obj none)) fun val =>
            WalkingPair.casesOn val (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.left)))
              (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.right)))).hom =
      (Option.casesOn X_1 (Iso.refl ((cospan f g ⋙ F).obj none)) fun val =>
            WalkingPair.casesOn val (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.left)))
              (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.right)))).hom ≫
        (cospan (F.map f) (F.map g)).map f_1

Next tactic:
rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> 

Proof state:
case none.none
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f✝ : X ⟶ Z
g : Y ⟶ Z
f : none ⟶ none
⊢ (cospan f✝ g ⋙ F).map f ≫
      (Option.casesOn none (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn none (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f✝) (F.map g)).map f

Next tactic:
cases f
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> 

Proof state:
case none.some.left
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f✝ : X ⟶ Z
g : Y ⟶ Z
f : none ⟶ some WalkingPair.left
⊢ (cospan f✝ g ⋙ F).map f ≫
      (Option.casesOn (some WalkingPair.left) (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn none (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f✝) (F.map g)).map f

Next tactic:
cases f
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> 

Proof state:
case none.some.right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f✝ : X ⟶ Z
g : Y ⟶ Z
f : none ⟶ some WalkingPair.right
⊢ (cospan f✝ g ⋙ F).map f ≫
      (Option.casesOn (some WalkingPair.right) (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn none (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f✝) (F.map g)).map f

Next tactic:
cases f
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> 

Proof state:
case some.left.none
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f✝ : X ⟶ Z
g : Y ⟶ Z
f : some WalkingPair.left ⟶ none
⊢ (cospan f✝ g ⋙ F).map f ≫
      (Option.casesOn none (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn (some WalkingPair.left) (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f✝) (F.map g)).map f

Next tactic:
cases f
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> 

Proof state:
case some.left.some.left
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f✝ : X ⟶ Z
g : Y ⟶ Z
f : some WalkingPair.left ⟶ some WalkingPair.left
⊢ (cospan f✝ g ⋙ F).map f ≫
      (Option.casesOn (some WalkingPair.left) (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn (some WalkingPair.left) (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f✝) (F.map g)).map f

Next tactic:
cases f
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> 

Proof state:
case some.left.some.right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f✝ : X ⟶ Z
g : Y ⟶ Z
f : some WalkingPair.left ⟶ some WalkingPair.right
⊢ (cospan f✝ g ⋙ F).map f ≫
      (Option.casesOn (some WalkingPair.right) (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn (some WalkingPair.left) (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f✝) (F.map g)).map f

Next tactic:
cases f
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> 

Proof state:
case some.right.none
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f✝ : X ⟶ Z
g : Y ⟶ Z
f : some WalkingPair.right ⟶ none
⊢ (cospan f✝ g ⋙ F).map f ≫
      (Option.casesOn none (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn (some WalkingPair.right) (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f✝) (F.map g)).map f

Next tactic:
cases f
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> 

Proof state:
case some.right.some.left
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f✝ : X ⟶ Z
g : Y ⟶ Z
f : some WalkingPair.right ⟶ some WalkingPair.left
⊢ (cospan f✝ g ⋙ F).map f ≫
      (Option.casesOn (some WalkingPair.left) (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn (some WalkingPair.right) (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f✝) (F.map g)).map f

Next tactic:
cases f
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> 

Proof state:
case some.right.some.right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f✝ : X ⟶ Z
g : Y ⟶ Z
f : some WalkingPair.right ⟶ some WalkingPair.right
⊢ (cospan f✝ g ⋙ F).map f ≫
      (Option.casesOn (some WalkingPair.right) (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn (some WalkingPair.right) (Iso.refl ((cospan f✝ g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f✝ g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f✝) (F.map g)).map f

Next tactic:
cases f
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> cases f <;> 

Proof state:
case none.none.id
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ (cospan f g ⋙ F).map (WidePullbackShape.Hom.id none) ≫
      (Option.casesOn none (Iso.refl ((cospan f g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn none (Iso.refl ((cospan f g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f) (F.map g)).map (WidePullbackShape.Hom.id none)

Next tactic:
dsimp
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> cases f <;> 

Proof state:
case some.left.none.term
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ (cospan f g ⋙ F).map (term WalkingPair.left) ≫
      (Option.casesOn none (Iso.refl ((cospan f g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn (some WalkingPair.left) (Iso.refl ((cospan f g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f) (F.map g)).map (term WalkingPair.left)

Next tactic:
dsimp
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> cases f <;> 

Proof state:
case some.left.some.left.id
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ (cospan f g ⋙ F).map (WidePullbackShape.Hom.id (some WalkingPair.left)) ≫
      (Option.casesOn (some WalkingPair.left) (Iso.refl ((cospan f g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn (some WalkingPair.left) (Iso.refl ((cospan f g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f) (F.map g)).map (WidePullbackShape.Hom.id (some WalkingPair.left))

Next tactic:
dsimp
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> cases f <;> 

Proof state:
case some.right.none.term
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ (cospan f g ⋙ F).map (term WalkingPair.right) ≫
      (Option.casesOn none (Iso.refl ((cospan f g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn (some WalkingPair.right) (Iso.refl ((cospan f g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f) (F.map g)).map (term WalkingPair.right)

Next tactic:
dsimp
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> cases f <;> 

Proof state:
case some.right.some.right.id
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ (cospan f g ⋙ F).map (WidePullbackShape.Hom.id (some WalkingPair.right)) ≫
      (Option.casesOn (some WalkingPair.right) (Iso.refl ((cospan f g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.right)))).hom =
    (Option.casesOn (some WalkingPair.right) (Iso.refl ((cospan f g ⋙ F).obj none)) fun val =>
          WalkingPair.casesOn val (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.left)))
            (Iso.refl ((cospan f g ⋙ F).obj (some WalkingPair.right)))).hom ≫
      (cospan (F.map f) (F.map g)).map (WidePullbackShape.Hom.id (some WalkingPair.right))

Next tactic:
dsimp
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> cases f <;> dsimp <;> 

Proof state:
case none.none.id
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ F.map ((cospan f g).map (𝟙 none)) ≫ 𝟙 (F.obj Z) = 𝟙 (F.obj Z) ≫ (cospan (F.map f) (F.map g)).map (𝟙 none)

Next tactic:
simp
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> cases f <;> dsimp <;> 

Proof state:
case some.left.none.term
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ F.map f ≫ 𝟙 (F.obj Z) = 𝟙 (F.obj X) ≫ F.map f

Next tactic:
simp
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> cases f <;> dsimp <;> 

Proof state:
case some.left.some.left.id
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ F.map ((cospan f g).map (𝟙 (some WalkingPair.left))) ≫ 𝟙 (F.obj X) =
    𝟙 (F.obj X) ≫ (cospan (F.map f) (F.map g)).map (𝟙 (some WalkingPair.left))

Next tactic:
simp
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> cases f <;> dsimp <;> 

Proof state:
case some.right.none.term
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ F.map g ≫ 𝟙 (F.obj Z) = 𝟙 (F.obj Y) ≫ F.map g

Next tactic:
simp
/-- A functor applied to a cospan is a cospan. -/
def cospanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    cospan f g ⋙ F ≅ cospan (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f <;> cases f <;> dsimp <;> 

Proof state:
case some.right.some.right.id
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ F.map ((cospan f g).map (𝟙 (some WalkingPair.right))) ≫ 𝟙 (F.obj Y) =
    𝟙 (F.obj Y) ≫ (cospan (F.map f) (F.map g)).map (𝟙 (some WalkingPair.right))

Next tactic:
simp
/-- A functor applied to a span is a span. -/
def spanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Y) (g : X ⟶ Z) :
    span f g ⋙ F ≅ span (F.map f) (F.map g) :=
  NatIso.ofComponents (by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Y
g : X ⟶ Z
⊢ (X_1 : WalkingSpan) → (span f g ⋙ F).obj X_1 ≅ (span (F.map f) (F.map g)).obj X_1

Next tactic:
rintro (⟨⟩ | ⟨⟨⟩⟩)
/-- A functor applied to a span is a span. -/
def spanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Y) (g : X ⟶ Z) :
    span f g ⋙ F ≅ span (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> 

Proof state:
case none
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Y
g : X ⟶ Z
⊢ (span f g ⋙ F).obj none ≅ (span (F.map f) (F.map g)).obj none

Next tactic:
exact Iso.refl _
/-- A functor applied to a span is a span. -/
def spanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Y) (g : X ⟶ Z) :
    span f g ⋙ F ≅ span (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> 

Proof state:
case some.left
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Y
g : X ⟶ Z
⊢ (span f g ⋙ F).obj (some WalkingPair.left) ≅ (span (F.map f) (F.map g)).obj (some WalkingPair.left)

Next tactic:
exact Iso.refl _
/-- A functor applied to a span is a span. -/
def spanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Y) (g : X ⟶ Z) :
    span f g ⋙ F ≅ span (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> 

Proof state:
case some.right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Y
g : X ⟶ Z
⊢ (span f g ⋙ F).obj (some WalkingPair.right) ≅ (span (F.map f) (F.map g)).obj (some WalkingPair.right)

Next tactic:
exact Iso.refl _
/-- A functor applied to a span is a span. -/
def spanCompIso (F : C ⥤ D) {X Y Z : C} (f : X ⟶ Y) (g : X ⟶ Z) :
    span f g ⋙ F ≅ span (F.map f) (F.map g) :=
  NatIso.ofComponents (by rintro (⟨⟩ | ⟨⟨⟩⟩) <;> exact Iso.refl _)
    (by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y Z : C
f : X ⟶ Y
g : X ⟶ Z
⊢ ∀ {X_1 Y_1 : WalkingSpan} (f_1 : X_1 ⟶ Y_1),
    (span f g ⋙ F).map f_1 ≫
        (Option.casesOn Y_1 (Iso.refl ((span f g ⋙ F).obj none)) fun val =>
            WalkingPair.casesOn val (Iso.refl ((span f g ⋙ F).obj (some WalkingPair.left)))
              (Iso.refl ((span f g ⋙ F).obj (some WalkingPair.right)))).hom =
      (Option.casesOn X_1 (Iso.refl ((span f g ⋙ F).obj none)) fun val =>
            WalkingPair.casesOn val (Iso.refl ((span f g ⋙ F).obj (some WalkingPair.left)))
              (Iso.refl ((span f g ⋙ F).obj (some WalkingPair.right)))).hom ≫
        (span (F.map f) (F.map g)).map f_1

Next tactic:
rintro (⟨⟩ | ⟨⟨⟩⟩) (⟨⟩ | ⟨⟨⟩⟩) f