l3lab/ntp-mathlib huggingface dataset:
/-- `ιInvApp` is the right inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_π (i j : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U ≫ D.diagramOverOpenπ U j =
      D.diagramOverOpenπ U j := by
  -- Porting note : originally, the proof of monotonicity was left a blank and proved in the end
  -- but Lean 4 doesn't like this any more, so the proof is restructured
  rw [← @cancel_mono (f := (componentwiseDiagram 𝖣.diagram.multispan _).map
    (Quiver.Hom.op (WalkingMultispan.Hom.snd (i, j))) ≫ 𝟙 _) _ _ (by
    rw [Category.comp_id]
    apply (config := { allowSynthFailures := true }) mono_comp
    change Mono ((_ ≫ D.f j i).c.app _)
    rw [comp_c_app]
    apply (config := { allowSynthFailures := true }) mono_comp
    erw [D.ι_image_preimage_eq i j U]
    · infer_instance
    · 

Proof state:
case inst
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i j : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
⊢ Mono
    ((t D.toGlueData i j).c.app
      (op
        ((Opens.map (f D.toGlueData j i).base).obj
          (op
              ((Opens.map
                    (colimit.ι (MultispanIndex.multispan (diagram D.toGlueData))
                        (op
                            (WalkingMultispan.right
                              (MultispanIndex.sndFrom (diagram D.toGlueData) (i, j)))).unop).base).obj
                ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U))).unop)))

Next tactic:
have : IsIso (D.t i j).c := by apply c_isIso_of_iso
/-- `ιInvApp` is the right inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_π (i j : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U ≫ D.diagramOverOpenπ U j =
      D.diagramOverOpenπ U j := by
  -- Porting note : originally, the proof of monotonicity was left a blank and proved in the end
  -- but Lean 4 doesn't like this any more, so the proof is restructured
  rw [← @cancel_mono (f := (componentwiseDiagram 𝖣.diagram.multispan _).map
    (Quiver.Hom.op (WalkingMultispan.Hom.snd (i, j))) ≫ 𝟙 _) _ _ (by
    rw [Category.comp_id]
    apply (config := { allowSynthFailures := true }) mono_comp
    change Mono ((_ ≫ D.f j i).c.app _)
    rw [comp_c_app]
    apply (config := { allowSynthFailures := true }) mono_comp
    erw [D.ι_image_preimage_eq i j U]
    · infer_instance
    · have : IsIso (D.t i j).c := by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i j : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
⊢ IsIso (t D.toGlueData i j).c

Next tactic:
apply c_isIso_of_iso
/-- `ιInvApp` is the right inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_π (i j : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U ≫ D.diagramOverOpenπ U j =
      D.diagramOverOpenπ U j := by
  -- Porting note : originally, the proof of monotonicity was left a blank and proved in the end
  -- but Lean 4 doesn't like this any more, so the proof is restructured
  rw [← @cancel_mono (f := (componentwiseDiagram 𝖣.diagram.multispan _).map
    (Quiver.Hom.op (WalkingMultispan.Hom.snd (i, j))) ≫ 𝟙 _) _ _ (by
    rw [Category.comp_id]
    apply (config := { allowSynthFailures := true }) mono_comp
    change Mono ((_ ≫ D.f j i).c.app _)
    rw [comp_c_app]
    apply (config := { allowSynthFailures := true }) mono_comp
    erw [D.ι_image_preimage_eq i j U]
    · infer_instance
    · have : IsIso (D.t i j).c := by apply c_isIso_of_iso
      

Proof state:
case inst
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i j : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
this : IsIso (t D.toGlueData i j).c
⊢ Mono
    ((t D.toGlueData i j).c.app
      (op
        ((Opens.map (f D.toGlueData j i).base).obj
          (op
              ((Opens.map
                    (colimit.ι (MultispanIndex.multispan (diagram D.toGlueData))
                        (op
                            (WalkingMultispan.right
                              (MultispanIndex.sndFrom (diagram D.toGlueData) (i, j)))).unop).base).obj
                ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U))).unop)))

Next tactic:
infer_instance
/-- `ιInvApp` is the right inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_π (i j : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U ≫ D.diagramOverOpenπ U j =
      D.diagramOverOpenπ U j := by
  -- Porting note : originally, the proof of monotonicity was left a blank and proved in the end
  -- but Lean 4 doesn't like this any more, so the proof is restructured
  rw [← @cancel_mono (f := (componentwiseDiagram 𝖣.diagram.multispan _).map
    (Quiver.Hom.op (WalkingMultispan.Hom.snd (i, j))) ≫ 𝟙 _) _ _ (by
    rw [Category.comp_id]
    apply (config := { allowSynthFailures := true }) mono_comp
    change Mono ((_ ≫ D.f j i).c.app _)
    rw [comp_c_app]
    apply (config := { allowSynthFailures := true }) mono_comp
    erw [D.ι_image_preimage_eq i j U]
    · infer_instance
    · have : IsIso (D.t i j).c := by apply c_isIso_of_iso
      infer_instance)]
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i j : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
⊢ (diagramOverOpenπ D U i ≫ ιInvAppπEqMap D U ≫ ιInvApp D U ≫ diagramOverOpenπ D U j) ≫
      (componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
              ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).map
          (WalkingMultispan.Hom.snd (i, j)).op ≫
        𝟙
          ((componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
                ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).obj
            (op (WalkingMultispan.left (i, j)))) =
    diagramOverOpenπ D U j ≫
      (componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
              ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).map
          (WalkingMultispan.Hom.snd (i, j)).op ≫
        𝟙
          ((componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
                ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).obj
            (op (WalkingMultispan.left (i, j))))

Next tactic:
simp_rw [Category.assoc]
/-- `ιInvApp` is the right inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_π (i j : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U ≫ D.diagramOverOpenπ U j =
      D.diagramOverOpenπ U j := by
  -- Porting note : originally, the proof of monotonicity was left a blank and proved in the end
  -- but Lean 4 doesn't like this any more, so the proof is restructured
  rw [← @cancel_mono (f := (componentwiseDiagram 𝖣.diagram.multispan _).map
    (Quiver.Hom.op (WalkingMultispan.Hom.snd (i, j))) ≫ 𝟙 _) _ _ (by
    rw [Category.comp_id]
    apply (config := { allowSynthFailures := true }) mono_comp
    change Mono ((_ ≫ D.f j i).c.app _)
    rw [comp_c_app]
    apply (config := { allowSynthFailures := true }) mono_comp
    erw [D.ι_image_preimage_eq i j U]
    · infer_instance
    · have : IsIso (D.t i j).c := by apply c_isIso_of_iso
      infer_instance)]
  simp_rw [Category.assoc]
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i j : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
⊢ diagramOverOpenπ D U i ≫
      ιInvAppπEqMap D U ≫
        ιInvApp D U ≫
          diagramOverOpenπ D U j ≫
            (componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
                    ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).map
                (WalkingMultispan.Hom.snd (i, j)).op ≫
              𝟙
                ((componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
                      ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).obj
                  (op (WalkingMultispan.left (i, j)))) =
    diagramOverOpenπ D U j ≫
      (componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
              ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).map
          (WalkingMultispan.Hom.snd (i, j)).op ≫
        𝟙
          ((componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
                ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).obj
            (op (WalkingMultispan.left (i, j))))

Next tactic:
rw [limit.w_assoc]
/-- `ιInvApp` is the right inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_π (i j : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U ≫ D.diagramOverOpenπ U j =
      D.diagramOverOpenπ U j := by
  -- Porting note : originally, the proof of monotonicity was left a blank and proved in the end
  -- but Lean 4 doesn't like this any more, so the proof is restructured
  rw [← @cancel_mono (f := (componentwiseDiagram 𝖣.diagram.multispan _).map
    (Quiver.Hom.op (WalkingMultispan.Hom.snd (i, j))) ≫ 𝟙 _) _ _ (by
    rw [Category.comp_id]
    apply (config := { allowSynthFailures := true }) mono_comp
    change Mono ((_ ≫ D.f j i).c.app _)
    rw [comp_c_app]
    apply (config := { allowSynthFailures := true }) mono_comp
    erw [D.ι_image_preimage_eq i j U]
    · infer_instance
    · have : IsIso (D.t i j).c := by apply c_isIso_of_iso
      infer_instance)]
  simp_rw [Category.assoc]
  rw [limit.w_assoc]
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i j : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
⊢ diagramOverOpenπ D U i ≫
      ιInvAppπEqMap D U ≫
        ιInvApp D U ≫
          limit.π (diagramOverOpen D U) (op (WalkingMultispan.left (i, j))) ≫
            𝟙
              ((componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
                    ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).obj
                (op (WalkingMultispan.left (i, j)))) =
    limit.π (diagramOverOpen D U) (op (WalkingMultispan.left (i, j))) ≫
      𝟙
        ((componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
              ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).obj
          (op (WalkingMultispan.left (i, j))))

Next tactic:
erw [limit.lift_π_assoc]
/-- `ιInvApp` is the right inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_π (i j : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U ≫ D.diagramOverOpenπ U j =
      D.diagramOverOpenπ U j := by
  -- Porting note : originally, the proof of monotonicity was left a blank and proved in the end
  -- but Lean 4 doesn't like this any more, so the proof is restructured
  rw [← @cancel_mono (f := (componentwiseDiagram 𝖣.diagram.multispan _).map
    (Quiver.Hom.op (WalkingMultispan.Hom.snd (i, j))) ≫ 𝟙 _) _ _ (by
    rw [Category.comp_id]
    apply (config := { allowSynthFailures := true }) mono_comp
    change Mono ((_ ≫ D.f j i).c.app _)
    rw [comp_c_app]
    apply (config := { allowSynthFailures := true }) mono_comp
    erw [D.ι_image_preimage_eq i j U]
    · infer_instance
    · have : IsIso (D.t i j).c := by apply c_isIso_of_iso
      infer_instance)]
  simp_rw [Category.assoc]
  rw [limit.w_assoc]
  erw [limit.lift_π_assoc]
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i j : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
⊢ diagramOverOpenπ D U i ≫
      ιInvAppπEqMap D U ≫
        { pt := (CategoryTheory.GlueData.U D.toGlueData i).presheaf.obj (op U),
                  π := NatTrans.mk fun j => ιInvAppπApp D U j.unop }.π.app
            (op (WalkingMultispan.left (i, j))) ≫
          𝟙
            ((componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
                  ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).obj
              (op (WalkingMultispan.left (i, j)))) =
    limit.π (diagramOverOpen D U) (op (WalkingMultispan.left (i, j))) ≫
      𝟙
        ((componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
              ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).obj
          (op (WalkingMultispan.left (i, j))))

Next tactic:
rw [Category.comp_id, Category.comp_id]
/-- `ιInvApp` is the right inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_π (i j : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U ≫ D.diagramOverOpenπ U j =
      D.diagramOverOpenπ U j := by
  -- Porting note : originally, the proof of monotonicity was left a blank and proved in the end
  -- but Lean 4 doesn't like this any more, so the proof is restructured
  rw [← @cancel_mono (f := (componentwiseDiagram 𝖣.diagram.multispan _).map
    (Quiver.Hom.op (WalkingMultispan.Hom.snd (i, j))) ≫ 𝟙 _) _ _ (by
    rw [Category.comp_id]
    apply (config := { allowSynthFailures := true }) mono_comp
    change Mono ((_ ≫ D.f j i).c.app _)
    rw [comp_c_app]
    apply (config := { allowSynthFailures := true }) mono_comp
    erw [D.ι_image_preimage_eq i j U]
    · infer_instance
    · have : IsIso (D.t i j).c := by apply c_isIso_of_iso
      infer_instance)]
  simp_rw [Category.assoc]
  rw [limit.w_assoc]
  erw [limit.lift_π_assoc]
  rw [Category.comp_id, Category.comp_id]
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i j : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
⊢ diagramOverOpenπ D U i ≫
      ιInvAppπEqMap D U ≫
        { pt := (CategoryTheory.GlueData.U D.toGlueData i).presheaf.obj (op U),
                π := NatTrans.mk fun j => ιInvAppπApp D U j.unop }.π.app
          (op (WalkingMultispan.left (i, j))) =
    limit.π (diagramOverOpen D U) (op (WalkingMultispan.left (i, j)))

Next tactic:
change _ ≫ _ ≫ (_ ≫ _) ≫ _ = _
/-- `ιInvApp` is the inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_eq_id (i : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U = 𝟙 _ := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
⊢ diagramOverOpenπ D U i ≫ ιInvAppπEqMap D U ≫ ιInvApp D U = 𝟙 (limit (diagramOverOpen D U))

Next tactic:
ext j
/-- `ιInvApp` is the inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_eq_id (i : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U = 𝟙 _ := by
  ext j
  

Proof state:
case w
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
j : (WalkingMultispan (diagram D.toGlueData).fstFrom (diagram D.toGlueData).sndFrom)ᵒᵖ
⊢ (diagramOverOpenπ D U i ≫ ιInvAppπEqMap D U ≫ ιInvApp D U) ≫ limit.π (diagramOverOpen D U) j =
    𝟙 (limit (diagramOverOpen D U)) ≫ limit.π (diagramOverOpen D U) j

Next tactic:
induction j using Opposite.rec' with | h j => ?_
/-- `ιInvApp` is the inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_eq_id (i : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U = 𝟙 _ := by
  ext j
  induction j using Opposite.rec' with | h j => ?_
  

Proof state:
case w.h
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
j : WalkingMultispan (diagram D.toGlueData).fstFrom (diagram D.toGlueData).sndFrom
⊢ (diagramOverOpenπ D U i ≫ ιInvAppπEqMap D U ≫ ιInvApp D U) ≫ limit.π (diagramOverOpen D U) (op j) =
    𝟙 (limit (diagramOverOpen D U)) ≫ limit.π (diagramOverOpen D U) (op j)

Next tactic:
rcases j with (⟨j, k⟩ | ⟨j⟩)
/-- `ιInvApp` is the inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_eq_id (i : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U = 𝟙 _ := by
  ext j
  induction j using Opposite.rec' with | h j => ?_
  rcases j with (⟨j, k⟩ | ⟨j⟩)
  · 

Proof state:
case w.h.left.mk
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
j k : D.J
⊢ (diagramOverOpenπ D U i ≫ ιInvAppπEqMap D U ≫ ιInvApp D U) ≫
      limit.π (diagramOverOpen D U) (op (WalkingMultispan.left (j, k))) =
    𝟙 (limit (diagramOverOpen D U)) ≫ limit.π (diagramOverOpen D U) (op (WalkingMultispan.left (j, k)))

Next tactic:
rw [← limit.w (componentwiseDiagram 𝖣.diagram.multispan _)
        (Quiver.Hom.op (WalkingMultispan.Hom.fst (j, k))),
      ← Category.assoc, Category.id_comp]
/-- `ιInvApp` is the inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_eq_id (i : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U = 𝟙 _ := by
  ext j
  induction j using Opposite.rec' with | h j => ?_
  rcases j with (⟨j, k⟩ | ⟨j⟩)
  · rw [← limit.w (componentwiseDiagram 𝖣.diagram.multispan _)
        (Quiver.Hom.op (WalkingMultispan.Hom.fst (j, k))),
      ← Category.assoc, Category.id_comp]
    

Proof state:
case w.h.left.mk
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
j k : D.J
⊢ ((diagramOverOpenπ D U i ≫ ιInvAppπEqMap D U ≫ ιInvApp D U) ≫
        limit.π
          (componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
            ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U))
          (op (WalkingMultispan.right (MultispanIndex.fstFrom (diagram D.toGlueData) (j, k))))) ≫
      (componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
            ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).map
        (WalkingMultispan.Hom.fst (j, k)).op =
    limit.π
        (componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
          ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U))
        (op (WalkingMultispan.right (MultispanIndex.fstFrom (diagram D.toGlueData) (j, k)))) ≫
      (componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
            ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U)).map
        (WalkingMultispan.Hom.fst (j, k)).op

Next tactic:
congr 1
/-- `ιInvApp` is the inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_eq_id (i : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U = 𝟙 _ := by
  ext j
  induction j using Opposite.rec' with | h j => ?_
  rcases j with (⟨j, k⟩ | ⟨j⟩)
  · rw [← limit.w (componentwiseDiagram 𝖣.diagram.multispan _)
        (Quiver.Hom.op (WalkingMultispan.Hom.fst (j, k))),
      ← Category.assoc, Category.id_comp]
    congr 1
    

Proof state:
case w.h.left.mk.e_a
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
j k : D.J
⊢ (diagramOverOpenπ D U i ≫ ιInvAppπEqMap D U ≫ ιInvApp D U) ≫
      limit.π
        (componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
          ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U))
        (op (WalkingMultispan.right (MultispanIndex.fstFrom (diagram D.toGlueData) (j, k)))) =
    limit.π
      (componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
        ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U))
      (op (WalkingMultispan.right (MultispanIndex.fstFrom (diagram D.toGlueData) (j, k))))

Next tactic:
simp_rw [Category.assoc]
/-- `ιInvApp` is the inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_eq_id (i : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U = 𝟙 _ := by
  ext j
  induction j using Opposite.rec' with | h j => ?_
  rcases j with (⟨j, k⟩ | ⟨j⟩)
  · rw [← limit.w (componentwiseDiagram 𝖣.diagram.multispan _)
        (Quiver.Hom.op (WalkingMultispan.Hom.fst (j, k))),
      ← Category.assoc, Category.id_comp]
    congr 1
    simp_rw [Category.assoc]
    

Proof state:
case w.h.left.mk.e_a
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
j k : D.J
⊢ diagramOverOpenπ D U i ≫
      ιInvAppπEqMap D U ≫
        ιInvApp D U ≫
          limit.π
            (componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
              ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U))
            (op (WalkingMultispan.right (MultispanIndex.fstFrom (diagram D.toGlueData) (j, k)))) =
    limit.π
      (componentwiseDiagram (MultispanIndex.multispan (diagram D.toGlueData))
        ((IsOpenMap.functor (_ : IsOpenMap ⇑(ι D.toGlueData i).base)).obj U))
      (op (WalkingMultispan.right (MultispanIndex.fstFrom (diagram D.toGlueData) (j, k))))

Next tactic:
apply π_ιInvApp_π
/-- `ιInvApp` is the inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_eq_id (i : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U = 𝟙 _ := by
  ext j
  induction j using Opposite.rec' with | h j => ?_
  rcases j with (⟨j, k⟩ | ⟨j⟩)
  · rw [← limit.w (componentwiseDiagram 𝖣.diagram.multispan _)
        (Quiver.Hom.op (WalkingMultispan.Hom.fst (j, k))),
      ← Category.assoc, Category.id_comp]
    congr 1
    simp_rw [Category.assoc]
    apply π_ιInvApp_π
  · 

Proof state:
case w.h.right
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
j : (diagram D.toGlueData).R
⊢ (diagramOverOpenπ D U i ≫ ιInvAppπEqMap D U ≫ ιInvApp D U) ≫
      limit.π (diagramOverOpen D U) (op (WalkingMultispan.right j)) =
    𝟙 (limit (diagramOverOpen D U)) ≫ limit.π (diagramOverOpen D U) (op (WalkingMultispan.right j))

Next tactic:
simp_rw [Category.assoc]
/-- `ιInvApp` is the inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_eq_id (i : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U = 𝟙 _ := by
  ext j
  induction j using Opposite.rec' with | h j => ?_
  rcases j with (⟨j, k⟩ | ⟨j⟩)
  · rw [← limit.w (componentwiseDiagram 𝖣.diagram.multispan _)
        (Quiver.Hom.op (WalkingMultispan.Hom.fst (j, k))),
      ← Category.assoc, Category.id_comp]
    congr 1
    simp_rw [Category.assoc]
    apply π_ιInvApp_π
  · simp_rw [Category.assoc]
    

Proof state:
case w.h.right
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
j : (diagram D.toGlueData).R
⊢ diagramOverOpenπ D U i ≫
      ιInvAppπEqMap D U ≫ ιInvApp D U ≫ limit.π (diagramOverOpen D U) (op (WalkingMultispan.right j)) =
    𝟙 (limit (diagramOverOpen D U)) ≫ limit.π (diagramOverOpen D U) (op (WalkingMultispan.right j))

Next tactic:
rw [Category.id_comp]
/-- `ιInvApp` is the inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_eq_id (i : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U = 𝟙 _ := by
  ext j
  induction j using Opposite.rec' with | h j => ?_
  rcases j with (⟨j, k⟩ | ⟨j⟩)
  · rw [← limit.w (componentwiseDiagram 𝖣.diagram.multispan _)
        (Quiver.Hom.op (WalkingMultispan.Hom.fst (j, k))),
      ← Category.assoc, Category.id_comp]
    congr 1
    simp_rw [Category.assoc]
    apply π_ιInvApp_π
  · simp_rw [Category.assoc]
    rw [Category.id_comp]
    

Proof state:
case w.h.right
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
j : (diagram D.toGlueData).R
⊢ diagramOverOpenπ D U i ≫
      ιInvAppπEqMap D U ≫ ιInvApp D U ≫ limit.π (diagramOverOpen D U) (op (WalkingMultispan.right j)) =
    limit.π (diagramOverOpen D U) (op (WalkingMultispan.right j))

Next tactic:
apply π_ιInvApp_π
instance componentwise_diagram_π_isIso (i : D.J) (U : Opens (D.U i).carrier) :
    IsIso (D.diagramOverOpenπ U i) := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
U : Opens ↑↑(CategoryTheory.GlueData.U D.toGlueData i)
⊢ IsIso (diagramOverOpenπ D U i)

Next tactic:
use D.ιInvAppπEqMap U ≫ D.ιInvApp U