l3lab/ntp-mathlib huggingface dataset:
/-- (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
  have : f = g.op := rfl
  clear_value g
  subst this
  rcases i with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  rcases j with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  

Proof state:
case refine'_2.mk.mk.pair.up.left.up.pair.up.right.up
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 ι
down✝¹ down✝ : WalkingPair
g :
  Pairwise.pair { down := WalkingPair.right } { down := down✝ } ⟶
    Pairwise.pair { down := WalkingPair.left } { down := down✝¹ }
⊢ (((Functor.const (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ).obj s.pt).map g.op ≫
      Opposite.casesOn { unop := Pairwise.pair { down := WalkingPair.right } { down := down✝ } } 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 := Pairwise.pair { down := WalkingPair.left } { down := down✝¹ } } 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 g.op

Next tactic:
rcases g with ⟨⟩
/-- (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
  have : f = g.op := rfl
  clear_value g
  subst this
  rcases i with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  rcases j with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  

Proof state:
case refine'_2.mk.mk.pair.up.right.up.single.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
hι : U ⊔ V = iSup ι
down✝ : WalkingPair
g : Pairwise.single { down := WalkingPair.left } ⟶ Pairwise.pair { down := WalkingPair.right } { down := down✝ }
⊢ (((Functor.const (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ).obj s.pt).map g.op ≫
      Opposite.casesOn { unop := Pairwise.single { down := WalkingPair.left } } 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 := Pairwise.pair { down := WalkingPair.right } { down := down✝ } } 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 g.op

Next tactic:
rcases g with ⟨⟩
/-- (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
  have : f = g.op := rfl
  clear_value g
  subst this
  rcases i with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  rcases j with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  

Proof state:
case refine'_2.mk.mk.pair.up.right.up.single.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
hι : U ⊔ V = iSup ι
down✝ : WalkingPair
g : Pairwise.single { down := WalkingPair.right } ⟶ Pairwise.pair { down := WalkingPair.right } { down := down✝ }
⊢ (((Functor.const (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ).obj s.pt).map g.op ≫
      Opposite.casesOn { unop := Pairwise.single { down := WalkingPair.right } } 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 := Pairwise.pair { down := WalkingPair.right } { down := down✝ } } 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 g.op

Next tactic:
rcases g with ⟨⟩
/-- (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
  have : f = g.op := rfl
  clear_value g
  subst this
  rcases i with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  rcases j with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  

Proof state:
case refine'_2.mk.mk.pair.up.right.up.pair.up.left.up
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 ι
down✝¹ down✝ : WalkingPair
g :
  Pairwise.pair { down := WalkingPair.left } { down := down✝ } ⟶
    Pairwise.pair { down := WalkingPair.right } { down := down✝¹ }
⊢ (((Functor.const (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ).obj s.pt).map g.op ≫
      Opposite.casesOn { unop := Pairwise.pair { down := WalkingPair.left } { down := down✝ } } 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 := Pairwise.pair { down := WalkingPair.right } { down := down✝¹ } } 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 g.op

Next tactic:
rcases g with ⟨⟩
/-- (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
  have : f = g.op := rfl
  clear_value g
  subst this
  rcases i with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  rcases j with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  

Proof state:
case refine'_2.mk.mk.pair.up.right.up.pair.up.right.up
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 ι
down✝¹ down✝ : WalkingPair
g :
  Pairwise.pair { down := WalkingPair.right } { down := down✝ } ⟶
    Pairwise.pair { down := WalkingPair.right } { down := down✝¹ }
⊢ (((Functor.const (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ).obj s.pt).map g.op ≫
      Opposite.casesOn { unop := Pairwise.pair { down := WalkingPair.right } { down := down✝ } } 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 := Pairwise.pair { down := WalkingPair.right } { down := down✝¹ } } 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 g.op

Next tactic:
rcases g with ⟨⟩
/-- (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
  have : f = g.op := rfl
  clear_value g
  subst this
  rcases i with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  rcases j with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  rcases g with ⟨⟩ <;>
  

Proof state:
case refine'_2.mk.mk.single.up.left.single.up.left.id_single
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 ι
⊢ (((Functor.const (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ).obj s.pt).map
        (Pairwise.Hom.id_single { down := WalkingPair.left }).op ≫
      Opposite.casesOn { unop := Pairwise.single { down := WalkingPair.left } } 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 := Pairwise.single { down := WalkingPair.left } } 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 (Pairwise.Hom.id_single { down := WalkingPair.left }).op

Next tactic:
dsimp [Pairwise.diagram]
/-- (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
  have : f = g.op := rfl
  clear_value g
  subst this
  rcases i with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  rcases j with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  rcases g with ⟨⟩ <;>
  

Proof state:
case refine'_2.mk.mk.single.up.left.pair.up.left.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
hι : U ⊔ V = iSup ι
down✝ : WalkingPair
⊢ (((Functor.const (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ).obj s.pt).map
        (Pairwise.Hom.left { down := WalkingPair.left } { down := down✝ }).op ≫
      Opposite.casesOn { unop := Pairwise.pair { down := WalkingPair.left } { down := down✝ } } 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 := Pairwise.single { down := WalkingPair.left } } 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 (Pairwise.Hom.left { down := WalkingPair.left } { down := down✝ }).op

Next tactic:
dsimp [Pairwise.diagram]
/-- (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
  have : f = g.op := rfl
  clear_value g
  subst this
  rcases i with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  rcases j with (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  rcases g with ⟨⟩ <;>
  

Proof state:
case refine'_2.mk.mk.single.up.left.pair.up.left.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
hι : U ⊔ V = iSup ι
⊢ (((Functor.const (CategoryTheory.Pairwise (ULift.{w, 0} WalkingPair))ᵒᵖ).obj s.pt).map
        (Pairwise.Hom.right { down := WalkingPair.left } { down := WalkingPair.left }).op ≫
      Opposite.casesOn { unop := Pairwise.pair { down := WalkingPair.left } { down := WalkingPair.left } } 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 := Pairwise.single { down := WalkingPair.left } } 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
        (Pairwise.Hom.right { down := WalkingPair.left } { down := WalkingPair.left }).op

Next tactic:
dsimp [Pairwise.diagram]