l3lab/ntp-mathlib huggingface dataset:
@[reassoc, elementwise (attr := simp)]
theorem t_inv (i j : D.J) : D.t i j ≫ D.t j i = 𝟙 _ := by
  have eq : (pullbackSymmetry (D.f i i) (D.f i j)).hom = pullback.snd ≫ inv pullback.fst := by simp
  have := D.cocycle i j i
  rw [D.t'_iij, D.t'_jii, D.t'_iji, fst_eq_snd_of_mono_eq, eq] at this
  simp only [Category.assoc, IsIso.inv_hom_id_assoc] at this
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j : D.J
eq : (pullbackSymmetry (f D i i) (f D i j)).hom = pullback.snd ≫ inv pullback.fst
this : pullback.fst ≫ t D i j ≫ t D j i ≫ inv pullback.fst = 𝟙 (pullback (f D i j) (f D i i))
⊢ t D i j ≫ t D j i = 𝟙 (V D (i, j))

Next tactic:
rw [← IsIso.eq_inv_comp, ← Category.assoc, IsIso.comp_inv_eq] at this
@[reassoc, elementwise (attr := simp)]
theorem t_inv (i j : D.J) : D.t i j ≫ D.t j i = 𝟙 _ := by
  have eq : (pullbackSymmetry (D.f i i) (D.f i j)).hom = pullback.snd ≫ inv pullback.fst := by simp
  have := D.cocycle i j i
  rw [D.t'_iij, D.t'_jii, D.t'_iji, fst_eq_snd_of_mono_eq, eq] at this
  simp only [Category.assoc, IsIso.inv_hom_id_assoc] at this
  rw [← IsIso.eq_inv_comp, ← Category.assoc, IsIso.comp_inv_eq] at this
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j : D.J
eq : (pullbackSymmetry (f D i i) (f D i j)).hom = pullback.snd ≫ inv pullback.fst
this : t D i j ≫ t D j i = (inv pullback.fst ≫ 𝟙 (pullback (f D i j) (f D i i))) ≫ pullback.fst
⊢ t D i j ≫ t D j i = 𝟙 (V D (i, j))

Next tactic:
simpa using this
theorem t'_inv (i j k : D.J) :
    D.t' i j k ≫ (pullbackSymmetry _ _).hom ≫ D.t' j i k ≫ (pullbackSymmetry _ _).hom = 𝟙 _ := by
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ t' D i j k ≫ (pullbackSymmetry (f D j k) (f D j i)).hom ≫ t' D j i k ≫ (pullbackSymmetry (f D i k) (f D i j)).hom =
    𝟙 (pullback (f D i j) (f D i k))

Next tactic:
rw [← cancel_mono (pullback.fst : pullback (D.f i j) (D.f i k) ⟶ _)]
theorem t'_inv (i j k : D.J) :
    D.t' i j k ≫ (pullbackSymmetry _ _).hom ≫ D.t' j i k ≫ (pullbackSymmetry _ _).hom = 𝟙 _ := by
  rw [← cancel_mono (pullback.fst : pullback (D.f i j) (D.f i k) ⟶ _)]
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ (t' D i j k ≫ (pullbackSymmetry (f D j k) (f D j i)).hom ≫ t' D j i k ≫ (pullbackSymmetry (f D i k) (f D i j)).hom) ≫
      pullback.fst =
    𝟙 (pullback (f D i j) (f D i k)) ≫ pullback.fst

Next tactic:
simp [t_fac, t_fac_assoc]
instance t'_isIso (i j k : D.J) : IsIso (D.t' i j k) :=
  ⟨⟨D.t' j k i ≫ D.t' k i j, D.cocycle _ _ _, by 

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ (t' D j k i ≫ t' D k i j) ≫ t' D i j k = 𝟙 (pullback (f D j k) (f D j i))

Next tactic:
simpa using D.cocycle _ _ _
@[reassoc]
theorem t'_comp_eq_pullbackSymmetry (i j k : D.J) :
    D.t' j k i ≫ D.t' k i j =
      (pullbackSymmetry _ _).hom ≫ D.t' j i k ≫ (pullbackSymmetry _ _).hom := by
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ t' D j k i ≫ t' D k i j =
    (pullbackSymmetry (f D j k) (f D j i)).hom ≫ t' D j i k ≫ (pullbackSymmetry (f D i k) (f D i j)).hom

Next tactic:
trans inv (D.t' i j k)
@[reassoc]
theorem t'_comp_eq_pullbackSymmetry (i j k : D.J) :
    D.t' j k i ≫ D.t' k i j =
      (pullbackSymmetry _ _).hom ≫ D.t' j i k ≫ (pullbackSymmetry _ _).hom := by
  trans inv (D.t' i j k)
  · 

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ t' D j k i ≫ t' D k i j = inv (t' D i j k)

Next tactic:
exact IsIso.eq_inv_of_hom_inv_id (D.cocycle _ _ _)
@[reassoc]
theorem t'_comp_eq_pullbackSymmetry (i j k : D.J) :
    D.t' j k i ≫ D.t' k i j =
      (pullbackSymmetry _ _).hom ≫ D.t' j i k ≫ (pullbackSymmetry _ _).hom := by
  trans inv (D.t' i j k)
  · exact IsIso.eq_inv_of_hom_inv_id (D.cocycle _ _ _)
  · 

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ inv (t' D i j k) =
    (pullbackSymmetry (f D j k) (f D j i)).hom ≫ t' D j i k ≫ (pullbackSymmetry (f D i k) (f D i j)).hom

Next tactic:
rw [← cancel_mono (pullback.fst : pullback (D.f i j) (D.f i k) ⟶ _)]
@[reassoc]
theorem t'_comp_eq_pullbackSymmetry (i j k : D.J) :
    D.t' j k i ≫ D.t' k i j =
      (pullbackSymmetry _ _).hom ≫ D.t' j i k ≫ (pullbackSymmetry _ _).hom := by
  trans inv (D.t' i j k)
  · exact IsIso.eq_inv_of_hom_inv_id (D.cocycle _ _ _)
  · rw [← cancel_mono (pullback.fst : pullback (D.f i j) (D.f i k) ⟶ _)]
    

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ inv (t' D i j k) ≫ pullback.fst =
    ((pullbackSymmetry (f D j k) (f D j i)).hom ≫ t' D j i k ≫ (pullbackSymmetry (f D i k) (f D i j)).hom) ≫
      pullback.fst

Next tactic:
simp [t_fac, t_fac_assoc]
/-- The pullback cone spanned by `V i j ⟶ U i` and `V i j ⟶ U j`.
This will often be a pullback diagram. -/
def vPullbackCone (i j : D.J) : PullbackCone (D.ι i) (D.ι j) :=
  PullbackCone.mk (D.f i j) (D.t i j ≫ D.f j i) (by 

Proof state:
C : Type u₁
inst✝² : Category.{v, u₁} C
C' : Type u₂
inst✝¹ : Category.{v, u₂} C'
D : GlueData C
inst✝ : HasMulticoequalizer (diagram D)
i j : D.J
⊢ f D i j ≫ ι D i = (t D i j ≫ f D j i) ≫ ι D j

Next tactic:
simp
instance π_epi : Epi D.π := by
  

Proof state:
C : Type u₁
inst✝³ : Category.{v, u₁} C
C' : Type u₂
inst✝² : Category.{v, u₂} C'
D : GlueData C
inst✝¹ : HasMulticoequalizer (diagram D)
inst✝ : HasColimits C
⊢ Epi (π D)

Next tactic:
unfold π
instance π_epi : Epi D.π := by
  unfold π
  

Proof state:
C : Type u₁
inst✝³ : Category.{v, u₁} C
C' : Type u₂
inst✝² : Category.{v, u₂} C'
D : GlueData C
inst✝¹ : HasMulticoequalizer (diagram D)
inst✝ : HasColimits C
⊢ Epi (Multicoequalizer.sigmaπ (diagram D))

Next tactic:
infer_instance
theorem types_ι_jointly_surjective (D : GlueData (Type v)) (x : D.glued) :
    ∃ (i : _) (y : D.U i), D.ι i y = x := by
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D✝ : GlueData C
D : GlueData (Type v)
x : glued D
⊢ ∃ i y, ι D i y = x

Next tactic:
delta CategoryTheory.GlueData.ι
theorem types_ι_jointly_surjective (D : GlueData (Type v)) (x : D.glued) :
    ∃ (i : _) (y : D.U i), D.ι i y = x := by
  delta CategoryTheory.GlueData.ι
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D✝ : GlueData C
D : GlueData (Type v)
x : glued D
⊢ ∃ i y, Multicoequalizer.π (diagram D) i y = x

Next tactic:
simp_rw [← Multicoequalizer.ι_sigmaπ D.diagram]
theorem types_ι_jointly_surjective (D : GlueData (Type v)) (x : D.glued) :
    ∃ (i : _) (y : D.U i), D.ι i y = x := by
  delta CategoryTheory.GlueData.ι
  simp_rw [← Multicoequalizer.ι_sigmaπ D.diagram]
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D✝ : GlueData C
D : GlueData (Type v)
x : glued D
⊢ ∃ i y, (Sigma.ι (diagram D).right i ≫ Multicoequalizer.sigmaπ (diagram D)) y = x

Next tactic:
rcases D.types_π_surjective x with ⟨x', rfl⟩
theorem types_ι_jointly_surjective (D : GlueData (Type v)) (x : D.glued) :
    ∃ (i : _) (y : D.U i), D.ι i y = x := by
  delta CategoryTheory.GlueData.ι
  simp_rw [← Multicoequalizer.ι_sigmaπ D.diagram]
  rcases D.types_π_surjective x with ⟨x', rfl⟩
  --have := colimit.isoColimitCocone (Types.coproductColimitCocone _)
  

Proof state:
case intro
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D✝ : GlueData C
D : GlueData (Type v)
x' : sigmaOpens D
⊢ ∃ i y, (Sigma.ι (diagram D).right i ≫ Multicoequalizer.sigmaπ (diagram D)) y = π D x'

Next tactic:
rw [← show (colimit.isoColimitCocone (Types.coproductColimitCocone.{v, v} _)).inv _ = x' from
      ConcreteCategory.congr_hom
        (colimit.isoColimitCocone (Types.coproductColimitCocone _)).hom_inv_id x']
theorem types_ι_jointly_surjective (D : GlueData (Type v)) (x : D.glued) :
    ∃ (i : _) (y : D.U i), D.ι i y = x := by
  delta CategoryTheory.GlueData.ι
  simp_rw [← Multicoequalizer.ι_sigmaπ D.diagram]
  rcases D.types_π_surjective x with ⟨x', rfl⟩
  --have := colimit.isoColimitCocone (Types.coproductColimitCocone _)
  rw [← show (colimit.isoColimitCocone (Types.coproductColimitCocone.{v, v} _)).inv _ = x' from
      ConcreteCategory.congr_hom
        (colimit.isoColimitCocone (Types.coproductColimitCocone _)).hom_inv_id x']
  

Proof state:
case intro
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D✝ : GlueData C
D : GlueData (Type v)
x' : sigmaOpens D
⊢ ∃ i y,
    (Sigma.ι (diagram D).right i ≫ Multicoequalizer.sigmaπ (diagram D)) y =
      π D
        ((colimit.isoColimitCocone (Types.coproductColimitCocone D.U)).inv
          ((colimit.isoColimitCocone (Types.coproductColimitCocone D.U)).hom x'))

Next tactic:
rcases (colimit.isoColimitCocone (Types.coproductColimitCocone _)).hom x' with ⟨i, y⟩
theorem types_ι_jointly_surjective (D : GlueData (Type v)) (x : D.glued) :
    ∃ (i : _) (y : D.U i), D.ι i y = x := by
  delta CategoryTheory.GlueData.ι
  simp_rw [← Multicoequalizer.ι_sigmaπ D.diagram]
  rcases D.types_π_surjective x with ⟨x', rfl⟩
  --have := colimit.isoColimitCocone (Types.coproductColimitCocone _)
  rw [← show (colimit.isoColimitCocone (Types.coproductColimitCocone.{v, v} _)).inv _ = x' from
      ConcreteCategory.congr_hom
        (colimit.isoColimitCocone (Types.coproductColimitCocone _)).hom_inv_id x']
  rcases (colimit.isoColimitCocone (Types.coproductColimitCocone _)).hom x' with ⟨i, y⟩
  

Proof state:
case intro.mk
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D✝ : GlueData C
D : GlueData (Type v)
x' : sigmaOpens D
i : D.J
y : U D i
⊢ ∃ i_1 y_1,
    (Sigma.ι (diagram D).right i_1 ≫ Multicoequalizer.sigmaπ (diagram D)) y_1 =
      π D ((colimit.isoColimitCocone (Types.coproductColimitCocone D.U)).inv { fst := i, snd := y })

Next tactic:
exact ⟨i, y, by
    simp [← Multicoequalizer.ι_sigmaπ, -Multicoequalizer.ι_sigmaπ]
    rfl ⟩
theorem types_ι_jointly_surjective (D : GlueData (Type v)) (x : D.glued) :
    ∃ (i : _) (y : D.U i), D.ι i y = x := by
  delta CategoryTheory.GlueData.ι
  simp_rw [← Multicoequalizer.ι_sigmaπ D.diagram]
  rcases D.types_π_surjective x with ⟨x', rfl⟩
  --have := colimit.isoColimitCocone (Types.coproductColimitCocone _)
  rw [← show (colimit.isoColimitCocone (Types.coproductColimitCocone.{v, v} _)).inv _ = x' from
      ConcreteCategory.congr_hom
        (colimit.isoColimitCocone (Types.coproductColimitCocone _)).hom_inv_id x']
  rcases (colimit.isoColimitCocone (Types.coproductColimitCocone _)).hom x' with ⟨i, y⟩
  exact ⟨i, y, by
    

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D✝ : GlueData C
D : GlueData (Type v)
x' : sigmaOpens D
i : D.J
y : U D i
⊢ (Sigma.ι (diagram D).right i ≫ Multicoequalizer.sigmaπ (diagram D)) y =
    π D ((colimit.isoColimitCocone (Types.coproductColimitCocone D.U)).inv { fst := i, snd := y })

Next tactic:
simp [← Multicoequalizer.ι_sigmaπ, -Multicoequalizer.ι_sigmaπ]
theorem types_ι_jointly_surjective (D : GlueData (Type v)) (x : D.glued) :
    ∃ (i : _) (y : D.U i), D.ι i y = x := by
  delta CategoryTheory.GlueData.ι
  simp_rw [← Multicoequalizer.ι_sigmaπ D.diagram]
  rcases D.types_π_surjective x with ⟨x', rfl⟩
  --have := colimit.isoColimitCocone (Types.coproductColimitCocone _)
  rw [← show (colimit.isoColimitCocone (Types.coproductColimitCocone.{v, v} _)).inv _ = x' from
      ConcreteCategory.congr_hom
        (colimit.isoColimitCocone (Types.coproductColimitCocone _)).hom_inv_id x']
  rcases (colimit.isoColimitCocone (Types.coproductColimitCocone _)).hom x' with ⟨i, y⟩
  exact ⟨i, y, by
    simp [← Multicoequalizer.ι_sigmaπ, -Multicoequalizer.ι_sigmaπ]
    

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D✝ : GlueData C
D : GlueData (Type v)
x' : sigmaOpens D
i : D.J
y : U D i
⊢ Multicoequalizer.sigmaπ (diagram D) (Sigma.ι D.U i y) =
    π D ((colimit.isoColimitCocone (Types.coproductColimitCocone D.U)).inv { fst := i, snd := y })

Next tactic:
rfl
/-- A functor that preserves the pullbacks of `f i j` and `f i k` can map a family of glue data. -/
@[simps]
def mapGlueData : GlueData C' where
  J := D.J
  U i := F.obj (D.U i)
  V i := F.obj (D.V i)
  f i j := F.map (D.f i j)
  f_mono i j := preserves_mono_of_preservesLimit _ _
  f_id i := inferInstance
  t i j := F.map (D.t i j)
  t_id i := by
    

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
F : C ⥤ C'
H : (i j k : D.J) → PreservesLimit (cospan (f D i j) (f D i k)) F
i : D.J
⊢ (fun i j => F.map (t D i j)) i i = 𝟙 ((fun i => F.obj (V D i)) (i, i))

Next tactic:
simp [D.t_id i]
/-- A functor that preserves the pullbacks of `f i j` and `f i k` can map a family of glue data. -/
@[simps]
def mapGlueData : GlueData C' where
  J := D.J
  U i := F.obj (D.U i)
  V i := F.obj (D.V i)
  f i j := F.map (D.f i j)
  f_mono i j := preserves_mono_of_preservesLimit _ _
  f_id i := inferInstance
  t i j := F.map (D.t i j)
  t_id i := by
    simp [D.t_id i]
  t' i j k :=
    (PreservesPullback.iso F (D.f i j) (D.f i k)).inv ≫
      F.map (D.t' i j k) ≫ (PreservesPullback.iso F (D.f j k) (D.f j i)).hom
  t_fac i j k := by 

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
F : C ⥤ C'
H : (i j k : D.J) → PreservesLimit (cospan (f D i j) (f D i k)) F
i j k : D.J
⊢ (fun i j k =>
          (PreservesPullback.iso F (f D i j) (f D i k)).inv ≫
            F.map (t' D i j k) ≫ (PreservesPullback.iso F (f D j k) (f D j i)).hom)
        i j k ≫
      pullback.snd =
    pullback.fst ≫ (fun i j => F.map (t D i j)) i j

Next tactic:
simpa [Iso.inv_comp_eq] using congr_arg (fun f => F.map f) (D.t_fac i j k)
/-- A functor that preserves the pullbacks of `f i j` and `f i k` can map a family of glue data. -/
@[simps]
def mapGlueData : GlueData C' where
  J := D.J
  U i := F.obj (D.U i)
  V i := F.obj (D.V i)
  f i j := F.map (D.f i j)
  f_mono i j := preserves_mono_of_preservesLimit _ _
  f_id i := inferInstance
  t i j := F.map (D.t i j)
  t_id i := by
    simp [D.t_id i]
  t' i j k :=
    (PreservesPullback.iso F (D.f i j) (D.f i k)).inv ≫
      F.map (D.t' i j k) ≫ (PreservesPullback.iso F (D.f j k) (D.f j i)).hom
  t_fac i j k := by simpa [Iso.inv_comp_eq] using congr_arg (fun f => F.map f) (D.t_fac i j k)
  cocycle i j k := by
    

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
F : C ⥤ C'
H : (i j k : D.J) → PreservesLimit (cospan (f D i j) (f D i k)) F
i j k : D.J
⊢ (fun i j k =>
          (PreservesPullback.iso F (f D i j) (f D i k)).inv ≫
            F.map (t' D i j k) ≫ (PreservesPullback.iso F (f D j k) (f D j i)).hom)
        i j k ≫
      (fun i j k =>
            (PreservesPullback.iso F (f D i j) (f D i k)).inv ≫
              F.map (t' D i j k) ≫ (PreservesPullback.iso F (f D j k) (f D j i)).hom)
          j k i ≫
        (fun i j k =>
            (PreservesPullback.iso F (f D i j) (f D i k)).inv ≫
              F.map (t' D i j k) ≫ (PreservesPullback.iso F (f D j k) (f D j i)).hom)
          k i j =
    𝟙 (pullback ((fun i j => F.map (f D i j)) i j) ((fun i j => F.map (f D i j)) i k))

Next tactic:
simp only [Category.assoc, Iso.hom_inv_id_assoc, ← Functor.map_comp_assoc, D.cocycle,
      Iso.inv_hom_id, CategoryTheory.Functor.map_id, Category.id_comp]
/-- The diagram of the image of a `GlueData` under a functor `F` is naturally isomorphic to the
original diagram of the `GlueData` via `F`.
-/
def diagramIso : D.diagram.multispan ⋙ F ≅ (D.mapGlueData F).diagram.multispan :=
  NatIso.ofComponents
    (fun x =>
      match x with
      | WalkingMultispan.left a => Iso.refl _
      | WalkingMultispan.right b => Iso.refl _)
    (by
      

Proof state:
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
F : C ⥤ C'
H : (i j k : D.J) → PreservesLimit (cospan (f D i j) (f D i k)) F
⊢ ∀ {X Y : WalkingMultispan (diagram D).fstFrom (diagram D).sndFrom} (f : X ⟶ Y),
    (MultispanIndex.multispan (diagram D) ⋙ F).map f ≫
        ((fun x =>
              match x with
              | WalkingMultispan.left a =>
                Iso.refl ((MultispanIndex.multispan (diagram D) ⋙ F).obj (WalkingMultispan.left a))
              | WalkingMultispan.right b =>
                Iso.refl ((MultispanIndex.multispan (diagram D) ⋙ F).obj (WalkingMultispan.right b)))
            Y).hom =
      ((fun x =>
              match x with
              | WalkingMultispan.left a =>
                Iso.refl ((MultispanIndex.multispan (diagram D) ⋙ F).obj (WalkingMultispan.left a))
              | WalkingMultispan.right b =>
                Iso.refl ((MultispanIndex.multispan (diagram D) ⋙ F).obj (WalkingMultispan.right b)))
            X).hom ≫
        (MultispanIndex.multispan (diagram (mapGlueData D F))).map f

Next tactic:
rintro (⟨_, _⟩ | _) _ (_ | _ | _)
/-- The diagram of the image of a `GlueData` under a functor `F` is naturally isomorphic to the
original diagram of the `GlueData` via `F`.
-/
def diagramIso : D.diagram.multispan ⋙ F ≅ (D.mapGlueData F).diagram.multispan :=
  NatIso.ofComponents
    (fun x =>
      match x with
      | WalkingMultispan.left a => Iso.refl _
      | WalkingMultispan.right b => Iso.refl _)
    (by
      rintro (⟨_, _⟩ | _) _ (_ | _ | _)
      · 

Proof state:
case left.mk.id
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
F : C ⥤ C'
H : (i j k : D.J) → PreservesLimit (cospan (f D i j) (f D i k)) F
fst✝ snd✝ : D.J
⊢ (MultispanIndex.multispan (diagram D) ⋙ F).map (WalkingMultispan.Hom.id (WalkingMultispan.left (fst✝, snd✝))) ≫
      ((fun x =>
            match x with
            | WalkingMultispan.left a =>
              Iso.refl ((MultispanIndex.multispan (diagram D) ⋙ F).obj (WalkingMultispan.left a))
            | WalkingMultispan.right b =>
              Iso.refl ((MultispanIndex.multispan (diagram D) ⋙ F).obj (WalkingMultispan.right b)))
          (WalkingMultispan.left (fst✝, snd✝))).hom =
    ((fun x =>
            match x with
            | WalkingMultispan.left a =>
              Iso.refl ((MultispanIndex.multispan (diagram D) ⋙ F).obj (WalkingMultispan.left a))
            | WalkingMultispan.right b =>
              Iso.refl ((MultispanIndex.multispan (diagram D) ⋙ F).obj (WalkingMultispan.right b)))
          (WalkingMultispan.left (fst✝, snd✝))).hom ≫
      (MultispanIndex.multispan (diagram (mapGlueData D F))).map
        (WalkingMultispan.Hom.id (WalkingMultispan.left (fst✝, snd✝)))

Next tactic:
erw [Category.comp_id, Category.id_comp, Functor.map_id]
/-- The diagram of the image of a `GlueData` under a functor `F` is naturally isomorphic to the
original diagram of the `GlueData` via `F`.
-/
def diagramIso : D.diagram.multispan ⋙ F ≅ (D.mapGlueData F).diagram.multispan :=
  NatIso.ofComponents
    (fun x =>
      match x with
      | WalkingMultispan.left a => Iso.refl _
      | WalkingMultispan.right b => Iso.refl _)
    (by
      rintro (⟨_, _⟩ | _) _ (_ | _ | _)
      · erw [Category.comp_id, Category.id_comp, Functor.map_id]
        

Proof state:
case left.mk.id
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
F : C ⥤ C'
H : (i j k : D.J) → PreservesLimit (cospan (f D i j) (f D i k)) F
fst✝ snd✝ : D.J
⊢ 𝟙 ((MultispanIndex.multispan (diagram D) ⋙ F).obj (WalkingMultispan.left (fst✝, snd✝))) =
    (MultispanIndex.multispan (diagram (mapGlueData D F))).map
      (WalkingMultispan.Hom.id (WalkingMultispan.left (fst✝, snd✝)))

Next tactic:
rfl
/-- The diagram of the image of a `GlueData` under a functor `F` is naturally isomorphic to the
original diagram of the `GlueData` via `F`.
-/
def diagramIso : D.diagram.multispan ⋙ F ≅ (D.mapGlueData F).diagram.multispan :=
  NatIso.ofComponents
    (fun x =>
      match x with
      | WalkingMultispan.left a => Iso.refl _
      | WalkingMultispan.right b => Iso.refl _)
    (by
      rintro (⟨_, _⟩ | _) _ (_ | _ | _)
      · erw [Category.comp_id, Category.id_comp, Functor.map_id]
        rfl
      · 

Proof state:
case left.mk.fst
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
F : C ⥤ C'
H : (i j k : D.J) → PreservesLimit (cospan (f D i j) (f D i k)) F
fst✝ snd✝ : D.J
⊢ (MultispanIndex.multispan (diagram D) ⋙ F).map (WalkingMultispan.Hom.fst (fst✝, snd✝)) ≫
      ((fun x =>
            match x with
            | WalkingMultispan.left a =>
              Iso.refl ((MultispanIndex.multispan (diagram D) ⋙ F).obj (WalkingMultispan.left a))
            | WalkingMultispan.right b =>
              Iso.refl ((MultispanIndex.multispan (diagram D) ⋙ F).obj (WalkingMultispan.right b)))
          (WalkingMultispan.right (MultispanIndex.fstFrom (diagram D) (fst✝, snd✝)))).hom =
    ((fun x =>
            match x with
            | WalkingMultispan.left a =>
              Iso.refl ((MultispanIndex.multispan (diagram D) ⋙ F).obj (WalkingMultispan.left a))
            | WalkingMultispan.right b =>
              Iso.refl ((MultispanIndex.multispan (diagram D) ⋙ F).obj (WalkingMultispan.right b)))
          (WalkingMultispan.left (fst✝, snd✝))).hom ≫
      (MultispanIndex.multispan (diagram (mapGlueData D F))).map (WalkingMultispan.Hom.fst (fst✝, snd✝))

Next tactic:
erw [Category.comp_id, Category.id_comp]
/-- The diagram of the image of a `GlueData` under a functor `F` is naturally isomorphic to the
original diagram of the `GlueData` via `F`.
-/
def diagramIso : D.diagram.multispan ⋙ F ≅ (D.mapGlueData F).diagram.multispan :=
  NatIso.ofComponents
    (fun x =>
      match x with
      | WalkingMultispan.left a => Iso.refl _
      | WalkingMultispan.right b => Iso.refl _)
    (by
      rintro (⟨_, _⟩ | _) _ (_ | _ | _)
      · erw [Category.comp_id, Category.id_comp, Functor.map_id]
        rfl
      · erw [Category.comp_id, Category.id_comp]
        

Proof state:
case left.mk.fst
C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
F : C ⥤ C'
H : (i j k : D.J) → PreservesLimit (cospan (f D i j) (f D i k)) F
fst✝ snd✝ : D.J
⊢ (MultispanIndex.multispan (diagram D) ⋙ F).map (WalkingMultispan.Hom.fst (fst✝, snd✝)) =
    (MultispanIndex.multispan (diagram (mapGlueData D F))).map (WalkingMultispan.Hom.fst (fst✝, snd✝))

Next tactic:
rfl