Theorem: TopCat.Presheaf.isSheaf_iff_isSheafUniqueGluing_types
File: Mathlib/Topology/Sheaves/SheafCondition/UniqueGluing.lean

tactic: simp_rw [isSheaf_iff_isSheafPairwiseIntersections, IsSheafPairwiseIntersections,
  Types.isLimit_iff, IsSheafUniqueGluing, isGluing_iff_pairwise]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι : Type x
U : ι → Opens ↑X
⊢ F.IsSheaf ↔ F.IsSheafUniqueGluing
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι : Type x
U : ι → Opens ↑X
⊢ (∀ ⦃ι : Type x⦄ (U : ι → Opens ↑X),
      ∀ s ∈ ((Pairwise.diagram U).op ⋙ F).sections,
        ∃! x, ∀ (j : (CategoryTheory.Pairwise ι)ᵒᵖ), (Functor.mapCone F (Pairwise.cocone U).op).π.app j x = s j) ↔
    ∀ ⦃ι : Type x⦄ (U : ι → Opens ↑X) (sf : (i : ι) → (forget (Type u)).obj (F.obj { unop := U i })),
      F.IsCompatible U sf →
        ∃! s,
          ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
            (Functor.mapCone F (Pairwise.cocone U).op).π.app i s = objPairwiseOfFamily sf i

tactic: refine forall₂_congr fun ι U ↦ ⟨fun h sf cpt ↦ ?_, fun h s hs ↦ ?_⟩
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι : Type x
U : ι → Opens ↑X
⊢ (∀ ⦃ι : Type x⦄ (U : ι → Opens ↑X),
      ∀ s ∈ ((Pairwise.diagram U).op ⋙ F).sections,
        ∃! x, ∀ (j : (CategoryTheory.Pairwise ι)ᵒᵖ), (Functor.mapCone F (Pairwise.cocone U).op).π.app j x = s j) ↔
    ∀ ⦃ι : Type x⦄ (U : ι → Opens ↑X) (sf : (i : ι) → (forget (Type u)).obj (F.obj { unop := U i })),
      F.IsCompatible U sf →
        ∃! s,
          ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
            (Functor.mapCone F (Pairwise.cocone U).op).π.app i s = objPairwiseOfFamily sf i
state_after: case refine_1
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι✝ : Type x
U✝ : ι✝ → Opens ↑X
ι : Type x
U : ι → Opens ↑X
h :
  ∀ s ∈ ((Pairwise.diagram U).op ⋙ F).sections,
    ∃! x, ∀ (j : (CategoryTheory.Pairwise ι)ᵒᵖ), (Functor.mapCone F (Pairwise.cocone U).op).π.app j x = s j
sf : (i : ι) → (forget (Type u)).obj (F.obj { unop := U i })
cpt : F.IsCompatible U sf
⊢ ∃! s,
    ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
      (Functor.mapCone F (Pairwise.cocone U).op).π.app i s = objPairwiseOfFamily sf i

case refine_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι✝ : Type x
U✝ : ι✝ → Opens ↑X
ι : Type x
U : ι → Opens ↑X
h :
  ∀ (sf : (i : ι) → (forget (Type u)).obj (F.obj { unop := U i })),
    F.IsCompatible U sf →
      ∃! s,
        ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
          (Functor.mapCone F (Pairwise.cocone U).op).π.app i s = objPairwiseOfFamily sf i
s : (j : (CategoryTheory.Pairwise ι)ᵒᵖ) → ((Pairwise.diagram U).op ⋙ F).obj j
hs : s ∈ ((Pairwise.diagram U).op ⋙ F).sections
⊢ ∃! x, ∀ (j : (CategoryTheory.Pairwise ι)ᵒᵖ), (Functor.mapCone F (Pairwise.cocone U).op).π.app j x = s j

tactic: exact h _ cpt.sectionPairwise.prop
state_before: case refine_1
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι✝ : Type x
U✝ : ι✝ → Opens ↑X
ι : Type x
U : ι → Opens ↑X
h :
  ∀ s ∈ ((Pairwise.diagram U).op ⋙ F).sections,
    ∃! x, ∀ (j : (CategoryTheory.Pairwise ι)ᵒᵖ), (Functor.mapCone F (Pairwise.cocone U).op).π.app j x = s j
sf : (i : ι) → (forget (Type u)).obj (F.obj { unop := U i })
cpt : F.IsCompatible U sf
⊢ ∃! s,
    ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
      (Functor.mapCone F (Pairwise.cocone U).op).π.app i s = objPairwiseOfFamily sf i
state_after: no goals

tactic: specialize h (fun i ↦ s <| op <| Pairwise.single i) fun i j ↦
  (hs <| op <| Pairwise.Hom.left i j).trans (hs <| op <| Pairwise.Hom.right i j).symm
state_before: case refine_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι✝ : Type x
U✝ : ι✝ → Opens ↑X
ι : Type x
U : ι → Opens ↑X
h :
  ∀ (sf : (i : ι) → (forget (Type u)).obj (F.obj { unop := U i })),
    F.IsCompatible U sf →
      ∃! s,
        ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
          (Functor.mapCone F (Pairwise.cocone U).op).π.app i s = objPairwiseOfFamily sf i
s : (j : (CategoryTheory.Pairwise ι)ᵒᵖ) → ((Pairwise.diagram U).op ⋙ F).obj j
hs : s ∈ ((Pairwise.diagram U).op ⋙ F).sections
⊢ ∃! x, ∀ (j : (CategoryTheory.Pairwise ι)ᵒᵖ), (Functor.mapCone F (Pairwise.cocone U).op).π.app j x = s j
state_after: case refine_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι✝ : Type x
U✝ : ι✝ → Opens ↑X
ι : Type x
U : ι → Opens ↑X
s : (j : (CategoryTheory.Pairwise ι)ᵒᵖ) → ((Pairwise.diagram U).op ⋙ F).obj j
hs : s ∈ ((Pairwise.diagram U).op ⋙ F).sections
h :
  ∃! s_1,
    ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
      (Functor.mapCone F (Pairwise.cocone U).op).π.app i s_1 =
        objPairwiseOfFamily (fun i => s { unop := Pairwise.single i }) i
⊢ ∃! x, ∀ (j : (CategoryTheory.Pairwise ι)ᵒᵖ), (Functor.mapCone F (Pairwise.cocone U).op).π.app j x = s j

tactic: convert h
state_before: case refine_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι✝ : Type x
U✝ : ι✝ → Opens ↑X
ι : Type x
U : ι → Opens ↑X
s : (j : (CategoryTheory.Pairwise ι)ᵒᵖ) → ((Pairwise.diagram U).op ⋙ F).obj j
hs : s ∈ ((Pairwise.diagram U).op ⋙ F).sections
h :
  ∃! s_1,
    ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
      (Functor.mapCone F (Pairwise.cocone U).op).π.app i s_1 =
        objPairwiseOfFamily (fun i => s { unop := Pairwise.single i }) i
⊢ ∃! x, ∀ (j : (CategoryTheory.Pairwise ι)ᵒᵖ), (Functor.mapCone F (Pairwise.cocone U).op).π.app j x = s j
state_after: case h.e'_2.h.h.h.h.e'_3.h.e
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι✝ : Type x
U✝ : ι✝ → Opens ↑X
ι : Type x
U : ι → Opens ↑X
s : (j : (CategoryTheory.Pairwise ι)ᵒᵖ) → ((Pairwise.diagram U).op ⋙ F).obj j
hs : s ∈ ((Pairwise.diagram U).op ⋙ F).sections
h :
  ∃! s_1,
    ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
      (Functor.mapCone F (Pairwise.cocone U).op).π.app i s_1 =
        objPairwiseOfFamily (fun i => s { unop := Pairwise.single i }) i
e_1✝ : (Functor.mapCone F (Pairwise.cocone U).op).pt = (forget (Type u)).obj (F.obj { unop := iSup U })
x✝ : (Functor.mapCone F (Pairwise.cocone U).op).pt
a✝ : (CategoryTheory.Pairwise ι)ᵒᵖ
⊢ s = objPairwiseOfFamily fun i => s { unop := Pairwise.single i }

tactic: ext (i|⟨i,j⟩)
state_before: case h.e'_2.h.h.h.h.e'_3.h.e
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι✝ : Type x
U✝ : ι✝ → Opens ↑X
ι : Type x
U : ι → Opens ↑X
s : (j : (CategoryTheory.Pairwise ι)ᵒᵖ) → ((Pairwise.diagram U).op ⋙ F).obj j
hs : s ∈ ((Pairwise.diagram U).op ⋙ F).sections
h :
  ∃! s_1,
    ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
      (Functor.mapCone F (Pairwise.cocone U).op).π.app i s_1 =
        objPairwiseOfFamily (fun i => s { unop := Pairwise.single i }) i
e_1✝ : (Functor.mapCone F (Pairwise.cocone U).op).pt = (forget (Type u)).obj (F.obj { unop := iSup U })
x✝ : (Functor.mapCone F (Pairwise.cocone U).op).pt
a✝ : (CategoryTheory.Pairwise ι)ᵒᵖ
⊢ s = objPairwiseOfFamily fun i => s { unop := Pairwise.single i }
state_after: case h.e'_2.h.h.h.h.e'_3.h.e.h.op.single
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι✝ : Type x
U✝ : ι✝ → Opens ↑X
ι : Type x
U : ι → Opens ↑X
s : (j : (CategoryTheory.Pairwise ι)ᵒᵖ) → ((Pairwise.diagram U).op ⋙ F).obj j
hs : s ∈ ((Pairwise.diagram U).op ⋙ F).sections
h :
  ∃! s_1,
    ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
      (Functor.mapCone F (Pairwise.cocone U).op).π.app i s_1 =
        objPairwiseOfFamily (fun i => s { unop := Pairwise.single i }) i
e_1✝ : (Functor.mapCone F (Pairwise.cocone U).op).pt = (forget (Type u)).obj (F.obj { unop := iSup U })
x✝ : (Functor.mapCone F (Pairwise.cocone U).op).pt
a✝ : (CategoryTheory.Pairwise ι)ᵒᵖ
i : ι
⊢ s { unop := Pairwise.single i } =
    objPairwiseOfFamily (fun i => s { unop := Pairwise.single i }) { unop := Pairwise.single i }

case h.e'_2.h.h.h.h.e'_3.h.e.h.op.pair
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι✝ : Type x
U✝ : ι✝ → Opens ↑X
ι : Type x
U : ι → Opens ↑X
s : (j : (CategoryTheory.Pairwise ι)ᵒᵖ) → ((Pairwise.diagram U).op ⋙ F).obj j
hs : s ∈ ((Pairwise.diagram U).op ⋙ F).sections
h :
  ∃! s_1,
    ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
      (Functor.mapCone F (Pairwise.cocone U).op).π.app i s_1 =
        objPairwiseOfFamily (fun i => s { unop := Pairwise.single i }) i
e_1✝ : (Functor.mapCone F (Pairwise.cocone U).op).pt = (forget (Type u)).obj (F.obj { unop := iSup U })
x✝ : (Functor.mapCone F (Pairwise.cocone U).op).pt
a✝ : (CategoryTheory.Pairwise ι)ᵒᵖ
i j : ι
⊢ s { unop := Pairwise.pair i j } =
    objPairwiseOfFamily (fun i => s { unop := Pairwise.single i }) { unop := Pairwise.pair i j }

tactic: rfl
state_before: case h.e'_2.h.h.h.h.e'_3.h.e.h.op.single
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι✝ : Type x
U✝ : ι✝ → Opens ↑X
ι : Type x
U : ι → Opens ↑X
s : (j : (CategoryTheory.Pairwise ι)ᵒᵖ) → ((Pairwise.diagram U).op ⋙ F).obj j
hs : s ∈ ((Pairwise.diagram U).op ⋙ F).sections
h :
  ∃! s_1,
    ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
      (Functor.mapCone F (Pairwise.cocone U).op).π.app i s_1 =
        objPairwiseOfFamily (fun i => s { unop := Pairwise.single i }) i
e_1✝ : (Functor.mapCone F (Pairwise.cocone U).op).pt = (forget (Type u)).obj (F.obj { unop := iSup U })
x✝ : (Functor.mapCone F (Pairwise.cocone U).op).pt
a✝ : (CategoryTheory.Pairwise ι)ᵒᵖ
i : ι
⊢ s { unop := Pairwise.single i } =
    objPairwiseOfFamily (fun i => s { unop := Pairwise.single i }) { unop := Pairwise.single i }
state_after: no goals

tactic: exact (hs <| op <| Pairwise.Hom.left i j).symm
state_before: case h.e'_2.h.h.h.h.e'_3.h.e.h.op.pair
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type u) X
ι✝ : Type x
U✝ : ι✝ → Opens ↑X
ι : Type x
U : ι → Opens ↑X
s : (j : (CategoryTheory.Pairwise ι)ᵒᵖ) → ((Pairwise.diagram U).op ⋙ F).obj j
hs : s ∈ ((Pairwise.diagram U).op ⋙ F).sections
h :
  ∃! s_1,
    ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
      (Functor.mapCone F (Pairwise.cocone U).op).π.app i s_1 =
        objPairwiseOfFamily (fun i => s { unop := Pairwise.single i }) i
e_1✝ : (Functor.mapCone F (Pairwise.cocone U).op).pt = (forget (Type u)).obj (F.obj { unop := iSup U })
x✝ : (Functor.mapCone F (Pairwise.cocone U).op).pt
a✝ : (CategoryTheory.Pairwise ι)ᵒᵖ
i j : ι
⊢ s { unop := Pairwise.pair i j } =
    objPairwiseOfFamily (fun i => s { unop := Pairwise.single i }) { unop := Pairwise.pair i j }
state_after: no goals