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 (⟨⟨_ | _⟩⟩ | ⟨⟨_ | _⟩, ⟨_⟩⟩) <;>
  rcases g with ⟨⟩ <;>
  

Proof state:
case refine'_2.mk.mk.single.up.left.pair.up.right.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.right } { down := WalkingPair.left }).op ≫
      Opposite.casesOn { unop := Pairwise.pair { down := WalkingPair.right } { 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.right } { 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.right.single.up.right.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.right }).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.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)) ≫
      ((Pairwise.diagram ι).op ⋙ presheaf F).map (Pairwise.Hom.id_single { down := WalkingPair.right }).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.right.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.right }).op ≫
      Opposite.casesOn { unop := Pairwise.pair { down := WalkingPair.left } { 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.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)) ≫
      ((Pairwise.diagram ι).op ⋙ presheaf F).map
        (Pairwise.Hom.right { down := WalkingPair.left } { down := WalkingPair.right }).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.right.pair.up.right.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.right } { down := down✝ }).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.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)) ≫
      ((Pairwise.diagram ι).op ⋙ presheaf F).map (Pairwise.Hom.left { down := WalkingPair.right } { 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.right.pair.up.right.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.right } { down := WalkingPair.right }).op ≫
      Opposite.casesOn { unop := Pairwise.pair { down := WalkingPair.right } { 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.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)) ≫
      ((Pairwise.diagram ι).op ⋙ presheaf F).map
        (Pairwise.Hom.right { down := WalkingPair.right } { down := WalkingPair.right }).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.pair.up.left.up.pair.up.left.up.id_pair
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.id_pair { 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.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
        (Pairwise.Hom.id_pair { 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.pair.up.right.up.pair.up.right.up.id_pair
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.id_pair { down := WalkingPair.right } { down := down✝ }).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
        (Pairwise.Hom.id_pair { down := WalkingPair.right } { 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 ⟨⟩ <;>
  dsimp [Pairwise.diagram] <;>
  

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 ι
⊢ 𝟙 s.pt ≫ PullbackCone.fst s = PullbackCone.fst s ≫ (presheaf F).map (𝟙 (op U))

Next tactic:
simp only [Category.id_comp, s.condition, CategoryTheory.Functor.map_id, Category.comp_id]
/-- (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 ⟨⟩ <;>
  dsimp [Pairwise.diagram] <;>
  

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
⊢ 𝟙 s.pt ≫ PullbackCone.fst s ≫ F.val.map (homOfLE (_ : U ⊓ WalkingPair.rec U V down✝ ≤ U)).op =
    PullbackCone.fst s ≫
      (presheaf F).map
        (homOfLE
            (_ :
              WalkingPair.rec U V { down := WalkingPair.left }.down ⊓ WalkingPair.rec U V { down := down✝ }.down ≤
                WalkingPair.rec U V { down := WalkingPair.left }.down)).op

Next tactic:
simp only [Category.id_comp, s.condition, CategoryTheory.Functor.map_id, Category.comp_id]