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

tactic: rw [isSheaf_iff_isSheafEqualizerProducts] at Fsh
state_before: C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι : Type v
U : ι → Opens ↑X
Fsh : IsSheaf F
⊢ IsSheafUniqueGluing F

tactic: intro ι U sf hsf
state_before: C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι : Type v
U : ι → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
⊢ IsSheafUniqueGluing F

tactic: let sf' := (piOpensIsoSectionsFamily F U).inv sf
state_before: C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
⊢ ∃! s, IsGluing F U sf s

tactic: have hsf' : leftRes F U sf' = rightRes F U sf' := by
  rwa [← compatible_iff_leftRes_eq_rightRes F U sf', inv_hom_id_apply]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
sf' : piOpens F U := (piOpensIsoSectionsFamily F U).inv sf
⊢ ∃! s, IsGluing F U sf s

tactic: choose s s_spec s_uniq using Types.unique_of_type_equalizer _ _ (Fsh U).some sf' hsf'
state_before: C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
sf' : piOpens F U := (piOpensIsoSectionsFamily F U).inv sf
hsf' : leftRes F U sf' = rightRes F U sf'
⊢ ∃! s, IsGluing F U sf s

tactic: use s
state_before: C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
sf' : piOpens F U := (piOpensIsoSectionsFamily F U).inv sf
hsf' : leftRes F U sf' = rightRes F U sf'
s : F.obj (iSup U).op
s_spec : res F U s = sf'
s_uniq : ∀ (y : F.obj (iSup U).op), (fun x => res F U x = sf') y → y = s
⊢ ∃! s, IsGluing F U sf s

tactic: dsimp
state_before: C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
sf' : piOpens F U := (piOpensIsoSectionsFamily F U).inv sf
hsf' : leftRes F U sf' = rightRes F U sf'
s : F.obj (iSup U).op
s_spec : res F U s = sf'
s_uniq : ∀ (y : F.obj (iSup U).op), (fun x => res F U x = sf') y → y = s
⊢ (fun s => IsGluing F U sf s) s ∧
    ∀ (y : (forget (Type v)).obj (F.obj (iSup U).op)), (fun s => IsGluing F U sf s) y → y = s

tactic: constructor
state_before: C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
sf' : piOpens F U := (piOpensIsoSectionsFamily F U).inv sf
hsf' : leftRes F U sf' = rightRes F U sf'
s : F.obj (iSup U).op
s_spec : res F U s = sf'
s_uniq : ∀ (y : F.obj (iSup U).op), (fun x => res F U x = sf') y → y = s
⊢ IsGluing F U sf s ∧ ∀ (y : (forget (Type v)).obj (F.obj (iSup U).op)), IsGluing F U sf y → y = s

tactic: rwa [← compatible_iff_leftRes_eq_rightRes F U sf', inv_hom_id_apply]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
sf' : piOpens F U := (piOpensIsoSectionsFamily F U).inv sf
⊢ leftRes F U sf' = rightRes F U sf'

tactic: convert(isGluing_iff_eq_res F U sf' _).mpr s_spec
state_before: case left
C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
sf' : piOpens F U := (piOpensIsoSectionsFamily F U).inv sf
hsf' : leftRes F U sf' = rightRes F U sf'
s : F.obj (iSup U).op
s_spec : res F U s = sf'
s_uniq : ∀ (y : F.obj (iSup U).op), (fun x => res F U x = sf') y → y = s
⊢ IsGluing F U sf s

tactic: rw [inv_hom_id_apply]
state_before: case h.e'_8
C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
sf' : piOpens F U := (piOpensIsoSectionsFamily F U).inv sf
hsf' : leftRes F U sf' = rightRes F U sf'
s : F.obj (iSup U).op
s_spec : res F U s = sf'
s_uniq : ∀ (y : F.obj (iSup U).op), (fun x => res F U x = sf') y → y = s
⊢ sf = (piOpensIsoSectionsFamily F U).hom sf'

tactic: intro y hy
state_before: case right
C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
sf' : piOpens F U := (piOpensIsoSectionsFamily F U).inv sf
hsf' : leftRes F U sf' = rightRes F U sf'
s : F.obj (iSup U).op
s_spec : res F U s = sf'
s_uniq : ∀ (y : F.obj (iSup U).op), (fun x => res F U x = sf') y → y = s
⊢ ∀ (y : (forget (Type v)).obj (F.obj (iSup U).op)), IsGluing F U sf y → y = s

tactic: apply s_uniq
state_before: case right
C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
sf' : piOpens F U := (piOpensIsoSectionsFamily F U).inv sf
hsf' : leftRes F U sf' = rightRes F U sf'
s : F.obj (iSup U).op
s_spec : res F U s = sf'
s_uniq : ∀ (y : F.obj (iSup U).op), (fun x => res F U x = sf') y → y = s
y : (forget (Type v)).obj (F.obj (iSup U).op)
hy : IsGluing F U sf y
⊢ y = s

tactic: rw [← isGluing_iff_eq_res F U]
state_before: case right.a
C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
sf' : piOpens F U := (piOpensIsoSectionsFamily F U).inv sf
hsf' : leftRes F U sf' = rightRes F U sf'
s : F.obj (iSup U).op
s_spec : res F U s = sf'
s_uniq : ∀ (y : F.obj (iSup U).op), (fun x => res F U x = sf') y → y = s
y : (forget (Type v)).obj (F.obj (iSup U).op)
hy : IsGluing F U sf y
⊢ res F U y = sf'

tactic: convert hy
state_before: case right.a
C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
sf' : piOpens F U := (piOpensIsoSectionsFamily F U).inv sf
hsf' : leftRes F U sf' = rightRes F U sf'
s : F.obj (iSup U).op
s_spec : res F U s = sf'
s_uniq : ∀ (y : F.obj (iSup U).op), (fun x => res F U x = sf') y → y = s
y : (forget (Type v)).obj (F.obj (iSup U).op)
hy : IsGluing F U sf y
⊢ IsGluing F U ((piOpensIsoSectionsFamily F U).hom sf') y

tactic: rw [inv_hom_id_apply]
state_before: case h.e'_8
C : Type u
inst✝¹ : Category C
inst✝ : ConcreteCategory C
X : TopCat
F : Presheaf (Type v) X
ι✝ : Type v
U✝ : ι✝ → Opens ↑X
Fsh✝ : IsSheaf F
Fsh : IsSheafEqualizerProducts F
ι : Type v
U : ι → Opens ↑X
sf : (i : ι) → (forget (Type v)).obj (F.obj (U i).op)
hsf : IsCompatible F U sf
sf' : piOpens F U := (piOpensIsoSectionsFamily F U).inv sf
hsf' : leftRes F U sf' = rightRes F U sf'
s : F.obj (iSup U).op
s_spec : res F U s = sf'
s_uniq : ∀ (y : F.obj (iSup U).op), (fun x => res F U x = sf') y → y = s
y : (forget (Type v)).obj (F.obj (iSup U).op)
hy : IsGluing F U sf y
⊢ (piOpensIsoSectionsFamily F U).hom sf' = sf