Theorem: TopCat.subpresheafToTypes.isSheaf
File: Mathlib/Topology/Sheaves/LocalPredicate.lean

Proof steps:
state_before: X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : (subpresheafToTypes P.toPrelocalPredicate).IsCompatible U sf
⊢ ∃! s, (subpresheafToTypes P.toPrelocalPredicate).IsGluing U sf s
state_after: X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : (subpresheafToTypes P.toPrelocalPredicate).IsCompatible U sf
sf' : (i : ι) → (X.presheafToTypes T).obj (op (U i)) := fun i => ↑(sf i)
⊢ ∃! s, (subpresheafToTypes P.toPrelocalPredicate).IsGluing U sf s
tactic: let sf' : ∀ i : ι, (presheafToTypes X T).obj (op (U i)) := fun i => (sf i).val
state_before: X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : (subpresheafToTypes P.toPrelocalPredicate).IsCompatible U sf
sf' : (i : ι) → (X.presheafToTypes T).obj (op (U i)) := fun i => ↑(sf i)
⊢ ∃! s, (subpresheafToTypes P.toPrelocalPredicate).IsGluing U sf s
state_after: X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : (subpresheafToTypes P.toPrelocalPredicate).IsCompatible U sf
sf' : (i : ι) → (X.presheafToTypes T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : (X.presheafToTypes T).IsCompatible U sf'
⊢ ∃! s, (subpresheafToTypes P.toPrelocalPredicate).IsGluing U sf s
tactic: have sf'_comp : (presheafToTypes X T).IsCompatible U sf' := fun i j =>
      congr_arg Subtype.val (sf_comp i j)
state_before: X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : (subpresheafToTypes P.toPrelocalPredicate).IsCompatible U sf
sf' : (i : ι) → (X.presheafToTypes T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : (X.presheafToTypes T).IsCompatible U sf'
⊢ ∃! s, (subpresheafToTypes P.toPrelocalPredicate).IsGluing U sf s
state_after: case intro.intro
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : (subpresheafToTypes P.toPrelocalPredicate).IsCompatible U sf
sf' : (i : ι) → (X.presheafToTypes T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : (X.presheafToTypes T).IsCompatible U sf'
gl : (forget (Type v)).obj ((X.sheafToTypes T).val.obj (op (iSup U)))
gl_spec : IsGluing (X.sheafToTypes T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((X.sheafToTypes T).val.obj (op (iSup U)))),
    (fun s => IsGluing (X.sheafToTypes T).val U sf' s) y → y = gl
⊢ ∃! s, (subpresheafToTypes P.toPrelocalPredicate).IsGluing U sf s
tactic: obtain ⟨gl, gl_spec, gl_uniq⟩ := (sheafToTypes X T).existsUnique_gluing U sf' sf'_comp
state_before: case intro.intro
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : (subpresheafToTypes P.toPrelocalPredicate).IsCompatible U sf
sf' : (i : ι) → (X.presheafToTypes T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : (X.presheafToTypes T).IsCompatible U sf'
gl : (forget (Type v)).obj ((X.sheafToTypes T).val.obj (op (iSup U)))
gl_spec : IsGluing (X.sheafToTypes T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((X.sheafToTypes T).val.obj (op (iSup U)))),
    (fun s => IsGluing (X.sheafToTypes T).val U sf' s) y → y = gl
⊢ ∃! s, (subpresheafToTypes P.toPrelocalPredicate).IsGluing U sf s
state_after: case intro.intro.refine_1
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : (subpresheafToTypes P.toPrelocalPredicate).IsCompatible U sf
sf' : (i : ι) → (X.presheafToTypes T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : (X.presheafToTypes T).IsCompatible U sf'
gl : (forget (Type v)).obj ((X.sheafToTypes T).val.obj (op (iSup U)))
gl_spec : IsGluing (X.sheafToTypes T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((X.sheafToTypes T).val.obj (op (iSup U)))),
    (fun s => IsGluing (X.sheafToTypes T).val U sf' s) y → y = gl
⊢ P.pred gl

case intro.intro.refine_2
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : (subpresheafToTypes P.toPrelocalPredicate).IsCompatible U sf
sf' : (i : ι) → (X.presheafToTypes T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : (X.presheafToTypes T).IsCompatible U sf'
gl : (forget (Type v)).obj ((X.sheafToTypes T).val.obj (op (iSup U)))
gl_spec : IsGluing (X.sheafToTypes T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((X.sheafToTypes T).val.obj (op (iSup U)))),
    (fun s => IsGluing (X.sheafToTypes T).val U sf' s) y → y = gl
⊢ (fun s => (subpresheafToTypes P.toPrelocalPredicate).IsGluing U sf s) ⟨gl, ?intro.intro.refine_1⟩

case intro.intro.refine_3
X : TopCat
T : ↑X → Type v
P✝ : PrelocalPredicate T
P : LocalPredicate T
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))
sf_comp : (subpresheafToTypes P.toPrelocalPredicate).IsCompatible U sf
sf' : (i : ι) → (X.presheafToTypes T).obj (op (U i)) := fun i => ↑(sf i)
sf'_comp : (X.presheafToTypes T).IsCompatible U sf'
gl : (forget (Type v)).obj ((X.sheafToTypes T).val.obj (op (iSup U)))
gl_spec : IsGluing (X.sheafToTypes T).val U sf' gl
gl_uniq :
  ∀ (y : (forget (Type v)).obj ((X.sheafToTypes T).val.obj (op (iSup U)))),
    (fun s => IsGluing (X.sheafToTypes T).val U sf' s) y → y = gl
⊢ ∀ (y : (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (iSup U)))),
    (fun s => (subpresheafToTypes P.toPrelocalPredicate).IsGluing U sf s) y → y = ⟨gl, ?intro.intro.refine_1⟩
tactic: refine ⟨⟨gl, ?_⟩, ?_, ?_⟩