l3lab/ntp-mathlib huggingface dataset:
/-- The sheaf condition in terms of an equalizer diagram is equivalent
to the reformulation in terms of a limit diagram over `U i` and `U i ⊓ U j`.
-/
theorem isSheaf_iff_isSheafPairwiseIntersections : F.IsSheaf ↔ F.IsSheafPairwiseIntersections := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Presheaf C X
⊢ IsSheaf F ↔ IsSheafPairwiseIntersections F

Next tactic:
rw [isSheaf_iff_isSheafOpensLeCover,
    isSheafOpensLeCover_iff_isSheafPairwiseIntersections]
/-- The sheaf condition in terms of an equalizer diagram is equivalent
to the reformulation in terms of the presheaf preserving the limit of the diagram
consisting of the `U i` and `U i ⊓ U j`.
-/
theorem isSheaf_iff_isSheafPreservesLimitPairwiseIntersections :
    F.IsSheaf ↔ F.IsSheafPreservesLimitPairwiseIntersections := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Presheaf C X
⊢ IsSheaf F ↔ IsSheafPreservesLimitPairwiseIntersections F

Next tactic:
rw [isSheaf_iff_isSheafPairwiseIntersections]
/-- The sheaf condition in terms of an equalizer diagram is equivalent
to the reformulation in terms of the presheaf preserving the limit of the diagram
consisting of the `U i` and `U i ⊓ U j`.
-/
theorem isSheaf_iff_isSheafPreservesLimitPairwiseIntersections :
    F.IsSheaf ↔ F.IsSheafPreservesLimitPairwiseIntersections := by
  rw [isSheaf_iff_isSheafPairwiseIntersections]
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Presheaf C X
⊢ IsSheafPairwiseIntersections F ↔ IsSheafPreservesLimitPairwiseIntersections F

Next tactic:
constructor
/-- The sheaf condition in terms of an equalizer diagram is equivalent
to the reformulation in terms of the presheaf preserving the limit of the diagram
consisting of the `U i` and `U i ⊓ U j`.
-/
theorem isSheaf_iff_isSheafPreservesLimitPairwiseIntersections :
    F.IsSheaf ↔ F.IsSheafPreservesLimitPairwiseIntersections := by
  rw [isSheaf_iff_isSheafPairwiseIntersections]
  constructor
  · 

Proof state:
case mp
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Presheaf C X
⊢ IsSheafPairwiseIntersections F → IsSheafPreservesLimitPairwiseIntersections F

Next tactic:
intro h ι U
/-- The sheaf condition in terms of an equalizer diagram is equivalent
to the reformulation in terms of the presheaf preserving the limit of the diagram
consisting of the `U i` and `U i ⊓ U j`.
-/
theorem isSheaf_iff_isSheafPreservesLimitPairwiseIntersections :
    F.IsSheaf ↔ F.IsSheafPreservesLimitPairwiseIntersections := by
  rw [isSheaf_iff_isSheafPairwiseIntersections]
  constructor
  · intro h ι U
    

Proof state:
case mp
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Presheaf C X
h : IsSheafPairwiseIntersections F
ι : Type w
U : ι → Opens ↑X
⊢ Nonempty (PreservesLimit (Pairwise.diagram U).op F)

Next tactic:
exact ⟨preservesLimitOfPreservesLimitCone (Pairwise.coconeIsColimit U).op (h U).some⟩
/-- The sheaf condition in terms of an equalizer diagram is equivalent
to the reformulation in terms of the presheaf preserving the limit of the diagram
consisting of the `U i` and `U i ⊓ U j`.
-/
theorem isSheaf_iff_isSheafPreservesLimitPairwiseIntersections :
    F.IsSheaf ↔ F.IsSheafPreservesLimitPairwiseIntersections := by
  rw [isSheaf_iff_isSheafPairwiseIntersections]
  constructor
  · intro h ι U
    exact ⟨preservesLimitOfPreservesLimitCone (Pairwise.coconeIsColimit U).op (h U).some⟩
  · 

Proof state:
case mpr
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Presheaf C X
⊢ IsSheafPreservesLimitPairwiseIntersections F → IsSheafPairwiseIntersections F

Next tactic:
intro h ι U
/-- The sheaf condition in terms of an equalizer diagram is equivalent
to the reformulation in terms of the presheaf preserving the limit of the diagram
consisting of the `U i` and `U i ⊓ U j`.
-/
theorem isSheaf_iff_isSheafPreservesLimitPairwiseIntersections :
    F.IsSheaf ↔ F.IsSheafPreservesLimitPairwiseIntersections := by
  rw [isSheaf_iff_isSheafPairwiseIntersections]
  constructor
  · intro h ι U
    exact ⟨preservesLimitOfPreservesLimitCone (Pairwise.coconeIsColimit U).op (h U).some⟩
  · intro h ι U
    

Proof state:
case mpr
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Presheaf C X
h : IsSheafPreservesLimitPairwiseIntersections F
ι : Type w
U : ι → Opens ↑X
⊢ Nonempty (IsLimit (F.mapCone (Cocone.op (Pairwise.cocone U))))

Next tactic:
haveI := (h U).some
/-- The sheaf condition in terms of an equalizer diagram is equivalent
to the reformulation in terms of the presheaf preserving the limit of the diagram
consisting of the `U i` and `U i ⊓ U j`.
-/
theorem isSheaf_iff_isSheafPreservesLimitPairwiseIntersections :
    F.IsSheaf ↔ F.IsSheafPreservesLimitPairwiseIntersections := by
  rw [isSheaf_iff_isSheafPairwiseIntersections]
  constructor
  · intro h ι U
    exact ⟨preservesLimitOfPreservesLimitCone (Pairwise.coconeIsColimit U).op (h U).some⟩
  · intro h ι U
    haveI := (h U).some
    

Proof state:
case mpr
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Presheaf C X
h : IsSheafPreservesLimitPairwiseIntersections F
ι : Type w
U : ι → Opens ↑X
this : PreservesLimit (Pairwise.diagram U).op F
⊢ Nonempty (IsLimit (F.mapCone (Cocone.op (Pairwise.cocone U))))

Next tactic:
exact ⟨PreservesLimit.preserves (Pairwise.coconeIsColimit U).op⟩
/-- For a sheaf `F`, `F(U ⊔ V)` is the pullback of `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)`.
This is the pullback cone. -/
def interUnionPullbackCone :
    PullbackCone (F.1.map (homOfLE inf_le_left : U ⊓ V ⟶ _).op)
      (F.1.map (homOfLE inf_le_right).op) :=
  PullbackCone.mk (F.1.map (homOfLE le_sup_left).op) (F.1.map (homOfLE le_sup_right).op) <| by
    

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
⊢ F.val.map (homOfLE (_ : U ≤ U ⊔ V)).op ≫ F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op =
    F.val.map (homOfLE (_ : V ≤ U ⊔ V)).op ≫ F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op

Next tactic:
rw [← F.1.map_comp, ← F.1.map_comp]
/-- For a sheaf `F`, `F(U ⊔ V)` is the pullback of `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)`.
This is the pullback cone. -/
def interUnionPullbackCone :
    PullbackCone (F.1.map (homOfLE inf_le_left : U ⊓ V ⟶ _).op)
      (F.1.map (homOfLE inf_le_right).op) :=
  PullbackCone.mk (F.1.map (homOfLE le_sup_left).op) (F.1.map (homOfLE le_sup_right).op) <| by
    rw [← F.1.map_comp, ← F.1.map_comp]
    

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
⊢ F.val.map ((homOfLE (_ : U ≤ U ⊔ V)).op ≫ (homOfLE (_ : U ⊓ V ≤ U)).op) =
    F.val.map ((homOfLE (_ : V ≤ U ⊔ V)).op ≫ (homOfLE (_ : U ⊓ V ≤ V)).op)

Next tactic:
congr 1
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
⊢ s.pt ⟶ F.val.obj (op (U ⊔ V))

Next tactic:
let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
⊢ s.pt ⟶ F.val.obj (op (U ⊔ V))

Next tactic:
have hι : U ⊔ V = iSup ι := by
    ext
    rw [Opens.coe_iSup, Set.mem_iUnion]
    constructor
    · rintro (h | h)
      exacts [⟨⟨WalkingPair.left⟩, h⟩, ⟨⟨WalkingPair.right⟩, h⟩]
    · rintro ⟨⟨_ | _⟩, h⟩
      exacts [Or.inl h, Or.inr h]
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
  have hι : U ⊔ V = iSup ι := by
    

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
⊢ U ⊔ V = iSup ι

Next tactic:
ext
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
  have hι : U ⊔ V = iSup ι := by
    ext
    

Proof state:
case h.h
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
x✝ : ↑X
⊢ x✝ ∈ ↑(U ⊔ V) ↔ x✝ ∈ ↑(iSup ι)

Next tactic:
rw [Opens.coe_iSup, Set.mem_iUnion]
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
  have hι : U ⊔ V = iSup ι := by
    ext
    rw [Opens.coe_iSup, Set.mem_iUnion]
    

Proof state:
case h.h
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
x✝ : ↑X
⊢ x✝ ∈ ↑(U ⊔ V) ↔ ∃ i, x✝ ∈ ↑(WalkingPair.casesOn i.down U V)

Next tactic:
constructor
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
  have hι : U ⊔ V = iSup ι := by
    ext
    rw [Opens.coe_iSup, Set.mem_iUnion]
    constructor
    · 

Proof state:
case h.h.mp
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
x✝ : ↑X
⊢ x✝ ∈ ↑(U ⊔ V) → ∃ i, x✝ ∈ ↑(WalkingPair.casesOn i.down U V)

Next tactic:
rintro (h | h)
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
  have hι : U ⊔ V = iSup ι := by
    ext
    rw [Opens.coe_iSup, Set.mem_iUnion]
    constructor
    · rintro (h | h)
      

Proof state:
case h.h.mp.inl
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
x✝ : ↑X
h : x✝ ∈ ↑U
⊢ ∃ i, x✝ ∈ ↑(WalkingPair.casesOn i.down U V)
case h.h.mp.inr
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
x✝ : ↑X
h : x✝ ∈ ↑V
⊢ ∃ i, x✝ ∈ ↑(WalkingPair.casesOn i.down U V)

Next tactic:
exacts [⟨⟨WalkingPair.left⟩, h⟩, ⟨⟨WalkingPair.right⟩, h⟩]
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
  have hι : U ⊔ V = iSup ι := by
    ext
    rw [Opens.coe_iSup, Set.mem_iUnion]
    constructor
    · rintro (h | h)
      exacts [⟨⟨WalkingPair.left⟩, h⟩, ⟨⟨WalkingPair.right⟩, h⟩]
    · 

Proof state:
case h.h.mpr
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
x✝ : ↑X
⊢ (∃ i, x✝ ∈ ↑(WalkingPair.casesOn i.down U V)) → x✝ ∈ ↑(U ⊔ V)

Next tactic:
rintro ⟨⟨_ | _⟩, h⟩
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
  have hι : U ⊔ V = iSup ι := by
    ext
    rw [Opens.coe_iSup, Set.mem_iUnion]
    constructor
    · rintro (h | h)
      exacts [⟨⟨WalkingPair.left⟩, h⟩, ⟨⟨WalkingPair.right⟩, h⟩]
    · rintro ⟨⟨_ | _⟩, h⟩
      

Proof state:
case h.h.mpr.intro.up.left
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
x✝ : ↑X
h : x✝ ∈ ↑(WalkingPair.casesOn { down := WalkingPair.left }.down U V)
⊢ x✝ ∈ ↑(U ⊔ V)
case h.h.mpr.intro.up.right
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
x✝ : ↑X
h : x✝ ∈ ↑(WalkingPair.casesOn { down := WalkingPair.right }.down U V)
⊢ x✝ ∈ ↑(U ⊔ V)

Next tactic:
exacts [Or.inl h, Or.inr h]
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
  have hι : U ⊔ V = iSup ι := by
    ext
    rw [Opens.coe_iSup, Set.mem_iUnion]
    constructor
    · rintro (h | h)
      exacts [⟨⟨WalkingPair.left⟩, h⟩, ⟨⟨WalkingPair.right⟩, h⟩]
    · rintro ⟨⟨_ | _⟩, h⟩
      exacts [Or.inl h, Or.inr h]
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
hι : U ⊔ V = iSup ι
⊢ s.pt ⟶ F.val.obj (op (U ⊔ V))

Next tactic:
refine'
    (F.presheaf.isSheaf_iff_isSheafPairwiseIntersections.mp F.2 ι).some.lift
        ⟨s.pt,
          { app := _
            naturality := _ }⟩ ≫
      F.1.map (eqToHom hι).op
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
  have hι : U ⊔ V = iSup ι := by
    ext
    rw [Opens.coe_iSup, Set.mem_iUnion]
    constructor
    · rintro (h | h)
      exacts [⟨⟨WalkingPair.left⟩, h⟩, ⟨⟨WalkingPair.right⟩, h⟩]
    · rintro ⟨⟨_ | _⟩, h⟩
      exacts [Or.inl h, Or.inr h]
  refine'
    (F.presheaf.isSheaf_iff_isSheafPairwiseIntersections.mp F.2 ι).some.lift
        ⟨s.pt,
          { app := _
            naturality := _ }⟩ ≫
      F.1.map (eqToHom hι).op
  · 

Proof state:
case refine'_1
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
hι : U ⊔ V = iSup ι
⊢ (X_1 : (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ) →
    ((Functor.const (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ).obj s.pt).obj X_1 ⟶
      ((Pairwise.diagram ι).op ⋙ presheaf F).obj X_1

Next tactic:
rintro ((_ | _) | (_ | _))
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
  have hι : U ⊔ V = iSup ι := by
    ext
    rw [Opens.coe_iSup, Set.mem_iUnion]
    constructor
    · rintro (h | h)
      exacts [⟨⟨WalkingPair.left⟩, h⟩, ⟨⟨WalkingPair.right⟩, h⟩]
    · rintro ⟨⟨_ | _⟩, h⟩
      exacts [Or.inl h, Or.inr h]
  refine'
    (F.presheaf.isSheaf_iff_isSheafPairwiseIntersections.mp F.2 ι).some.lift
        ⟨s.pt,
          { app := _
            naturality := _ }⟩ ≫
      F.1.map (eqToHom hι).op
  · rintro ((_ | _) | (_ | _))
    exacts [s.fst, s.snd, s.fst ≫ F.1.map (homOfLE inf_le_left).op,
      s.snd ≫ F.1.map (homOfLE inf_le_left).op]
  

Proof state:
case refine'_2
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
hι : U ⊔ V = iSup ι
⊢ ∀ ⦃X_1 Y : (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ⦄ (f : X_1 ⟶ Y),
    (((Functor.const (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ).obj s.pt).map f ≫
        Opposite.casesOn Y fun unop =>
          Pairwise.casesOn unop
            (fun a => ULift.casesOn a fun down => WalkingPair.casesOn down (PullbackCone.fst s) (PullbackCone.snd s))
            fun a a_1 =>
            ULift.casesOn a fun down =>
              WalkingPair.casesOn down (PullbackCone.fst s ≫ F.val.map (homOfLE (_ : U ⊓ ι a_1 ≤ U)).op)
                (PullbackCone.snd s ≫ F.val.map (homOfLE (_ : V ⊓ ι a_1 ≤ V)).op)) =
      (Opposite.casesOn X_1 fun unop =>
          Pairwise.casesOn unop
            (fun a => ULift.casesOn a fun down => WalkingPair.casesOn down (PullbackCone.fst s) (PullbackCone.snd s))
            fun a a_1 =>
            ULift.casesOn a fun down =>
              WalkingPair.casesOn down (PullbackCone.fst s ≫ F.val.map (homOfLE (_ : U ⊓ ι a_1 ≤ U)).op)
                (PullbackCone.snd s ≫ F.val.map (homOfLE (_ : V ⊓ ι a_1 ≤ V)).op)) ≫
        ((Pairwise.diagram ι).op ⋙ presheaf F).map f

Next tactic:
rintro ⟨i⟩ ⟨j⟩ f
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
  have hι : U ⊔ V = iSup ι := by
    ext
    rw [Opens.coe_iSup, Set.mem_iUnion]
    constructor
    · rintro (h | h)
      exacts [⟨⟨WalkingPair.left⟩, h⟩, ⟨⟨WalkingPair.right⟩, h⟩]
    · rintro ⟨⟨_ | _⟩, h⟩
      exacts [Or.inl h, Or.inr h]
  refine'
    (F.presheaf.isSheaf_iff_isSheafPairwiseIntersections.mp F.2 ι).some.lift
        ⟨s.pt,
          { app := _
            naturality := _ }⟩ ≫
      F.1.map (eqToHom hι).op
  · rintro ((_ | _) | (_ | _))
    exacts [s.fst, s.snd, s.fst ≫ F.1.map (homOfLE inf_le_left).op,
      s.snd ≫ F.1.map (homOfLE inf_le_left).op]
  rintro ⟨i⟩ ⟨j⟩ f
  

Proof state:
case refine'_2.mk.mk
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
hι : U ⊔ V = iSup ι
i j : CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair)
f : { unop := i } ⟶ { unop := j }
⊢ (((Functor.const (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ).obj s.pt).map f ≫
      Opposite.casesOn { unop := j } fun unop =>
        Pairwise.casesOn unop
          (fun a => ULift.casesOn a fun down => WalkingPair.casesOn down (PullbackCone.fst s) (PullbackCone.snd s))
          fun a a_1 =>
          ULift.casesOn a fun down =>
            WalkingPair.casesOn down (PullbackCone.fst s ≫ F.val.map (homOfLE (_ : U ⊓ ι a_1 ≤ U)).op)
              (PullbackCone.snd s ≫ F.val.map (homOfLE (_ : V ⊓ ι a_1 ≤ V)).op)) =
    (Opposite.casesOn { unop := i } fun unop =>
        Pairwise.casesOn unop
          (fun a => ULift.casesOn a fun down => WalkingPair.casesOn down (PullbackCone.fst s) (PullbackCone.snd s))
          fun a a_1 =>
          ULift.casesOn a fun down =>
            WalkingPair.casesOn down (PullbackCone.fst s ≫ F.val.map (homOfLE (_ : U ⊓ ι a_1 ≤ U)).op)
              (PullbackCone.snd s ≫ F.val.map (homOfLE (_ : V ⊓ ι a_1 ≤ V)).op)) ≫
      ((Pairwise.diagram ι).op ⋙ presheaf F).map f

Next tactic:
let g : j ⟶ i := f.unop
/-- (Implementation).
Every cone over `F(U) ⟶ F(U ⊓ V)` and `F(V) ⟶ F(U ⊓ V)` factors through `F(U ⊔ V)`.
-/
def interUnionPullbackConeLift : s.pt ⟶ F.1.obj (op (U ⊔ V)) := by
  let ι : ULift.{w} WalkingPair → Opens X := fun j => WalkingPair.casesOn j.down U V
  have hι : U ⊔ V = iSup ι := by
    ext
    rw [Opens.coe_iSup, Set.mem_iUnion]
    constructor
    · rintro (h | h)
      exacts [⟨⟨WalkingPair.left⟩, h⟩, ⟨⟨WalkingPair.right⟩, h⟩]
    · rintro ⟨⟨_ | _⟩, h⟩
      exacts [Or.inl h, Or.inr h]
  refine'
    (F.presheaf.isSheaf_iff_isSheafPairwiseIntersections.mp F.2 ι).some.lift
        ⟨s.pt,
          { app := _
            naturality := _ }⟩ ≫
      F.1.map (eqToHom hι).op
  · rintro ((_ | _) | (_ | _))
    exacts [s.fst, s.snd, s.fst ≫ F.1.map (homOfLE inf_le_left).op,
      s.snd ≫ F.1.map (homOfLE inf_le_left).op]
  rintro ⟨i⟩ ⟨j⟩ f
  let g : j ⟶ i := f.unop
  

Proof state:
case refine'_2.mk.mk
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F : Sheaf C X
U V : Opens ↑X
s : PullbackCone (F.val.map (homOfLE (_ : U ⊓ V ≤ U)).op) (F.val.map (homOfLE (_ : U ⊓ V ≤ V)).op)
ι : ULift.{w, 0} WalkingPair → Opens ↑X := fun j => WalkingPair.casesOn j.down U V
hι : U ⊔ V = iSup ι
i j : CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair)
f : { unop := i } ⟶ { unop := j }
g : j ⟶ i := f.unop
⊢ (((Functor.const (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ).obj s.pt).map f ≫
      Opposite.casesOn { unop := j } fun unop =>
        Pairwise.casesOn unop
          (fun a => ULift.casesOn a fun down => WalkingPair.casesOn down (PullbackCone.fst s) (PullbackCone.snd s))
          fun a a_1 =>
          ULift.casesOn a fun down =>
            WalkingPair.casesOn down (PullbackCone.fst s ≫ F.val.map (homOfLE (_ : U ⊓ ι a_1 ≤ U)).op)
              (PullbackCone.snd s ≫ F.val.map (homOfLE (_ : V ⊓ ι a_1 ≤ V)).op)) =
    (Opposite.casesOn { unop := i } fun unop =>
        Pairwise.casesOn unop
          (fun a => ULift.casesOn a fun down => WalkingPair.casesOn down (PullbackCone.fst s) (PullbackCone.snd s))
          fun a a_1 =>
          ULift.casesOn a fun down =>
            WalkingPair.casesOn down (PullbackCone.fst s ≫ F.val.map (homOfLE (_ : U ⊓ ι a_1 ≤ U)).op)
              (PullbackCone.snd s ≫ F.val.map (homOfLE (_ : V ⊓ ι a_1 ≤ V)).op)) ≫
      ((Pairwise.diagram ι).op ⋙ presheaf F).map f

Next tactic:
have : f = g.op := rfl