Theorem: TopCat.Presheaf.app_surjective_of_injective_of_locally_surjective
File: Mathlib/Topology/Sheaves/Stalks.lean

tactic: intro t
state_before: C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
⊢ Function.Surjective ((forget C).map (f.val.app U.op))

tactic: choose V mV iVU sf heq using hsurj t
state_before: C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
⊢ ∃ a, (forget C).map (f.val.app U.op) a = t

tactic: have V_cover : U ≤ iSup V := by
  intro x hxU
  erw [Opens.mem_iSup]
  exact ⟨⟨x, hxU⟩, mV ⟨x, hxU⟩⟩
state_before: C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
⊢ ∃ a, (forget C).map (f.val.app U.op) a = t

tactic: intro x y
state_before: C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
V_cover : U ≤ iSup V
⊢ IsCompatible F.val V sf

tactic: apply section_ext
state_before: C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
V_cover : U ≤ iSup V
x y : { x // x ∈ U }
⊢ (forget C).map (F.val.map (Opens.infLELeft (V x) (V y)).op) (sf x) =
    (forget C).map (F.val.map (Opens.infLERight (V x) (V y)).op) (sf y)

tactic: intro z
state_before: case h
C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
V_cover : U ≤ iSup V
x y : { x // x ∈ U }
⊢ ∀ (x_1 : { x_1 // x_1 ∈ V x ⊓ V y }),
    (forget C).map (germ (Sheaf.presheaf F) x_1) ((forget C).map (F.val.map (Opens.infLELeft (V x) (V y)).op) (sf x)) =
      (forget C).map (germ (Sheaf.presheaf F) x_1) ((forget C).map (F.val.map (Opens.infLERight (V x) (V y)).op) (sf y))

tactic: apply hinj ⟨z, (iVU x).le ((inf_le_left : V x ⊓ V y ≤ V x) z.2)⟩
state_before: case h
C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
V_cover : U ≤ iSup V
x y : { x // x ∈ U }
z : { x_1 // x_1 ∈ V x ⊓ V y }
⊢ (forget C).map (germ (Sheaf.presheaf F) z) ((forget C).map (F.val.map (Opens.infLELeft (V x) (V y)).op) (sf x)) =
    (forget C).map (germ (Sheaf.presheaf F) z) ((forget C).map (F.val.map (Opens.infLERight (V x) (V y)).op) (sf y))

tactic: dsimp only
state_before: case h.a
C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
V_cover : U ≤ iSup V
x y : { x // x ∈ U }
z : { x_1 // x_1 ∈ V x ⊓ V y }
⊢ (forget C).map ((stalkFunctor C ↑{ val := ↑z, property := (_ : ↑z ∈ ↑U) }).map f.val)
      ((forget C).map (germ (Sheaf.presheaf F) z)
        ((forget C).map (F.val.map (Opens.infLELeft (V x) (V y)).op) (sf x))) =
    (forget C).map ((stalkFunctor C ↑{ val := ↑z, property := (_ : ↑z ∈ ↑U) }).map f.val)
      ((forget C).map (germ (Sheaf.presheaf F) z) ((forget C).map (F.val.map (Opens.infLERight (V x) (V y)).op) (sf y)))

tactic: erw [stalkFunctor_map_germ_apply, stalkFunctor_map_germ_apply]
state_before: case h.a
C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
V_cover : U ≤ iSup V
x y : { x // x ∈ U }
z : { x_1 // x_1 ∈ V x ⊓ V y }
⊢ (forget C).map ((stalkFunctor C ↑z).map f.val)
      ((forget C).map (germ (Sheaf.presheaf F) z)
        ((forget C).map (F.val.map (Opens.infLELeft (V x) (V y)).op) (sf x))) =
    (forget C).map ((stalkFunctor C ↑z).map f.val)
      ((forget C).map (germ (Sheaf.presheaf F) z) ((forget C).map (F.val.map (Opens.infLERight (V x) (V y)).op) (sf y)))

tactic: simp_rw [← comp_apply, f.1.naturality, comp_apply, heq, ← comp_apply, ← G.1.map_comp]
state_before: case h.a
C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
V_cover : U ≤ iSup V
x y : { x // x ∈ U }
z : { x_1 // x_1 ∈ V x ⊓ V y }
⊢ (forget C).map
      (colimit.ι (Functor.op (OpenNhds.inclusion ↑z) ⋙ G.val) { obj := V x ⊓ V y, property := (_ : ↑z ∈ V x ⊓ V y) }.op)
      ((forget C).map (f.val.app (V x ⊓ V y).op) ((forget C).map (F.val.map (Opens.infLELeft (V x) (V y)).op) (sf x))) =
    (forget C).map
      (colimit.ι (Functor.op (OpenNhds.inclusion ↑z) ⋙ G.val) { obj := V x ⊓ V y, property := (_ : ↑z ∈ V x ⊓ V y) }.op)
      ((forget C).map (f.val.app (V x ⊓ V y).op) ((forget C).map (F.val.map (Opens.infLERight (V x) (V y)).op) (sf y)))

tactic: rfl
state_before: case h.a
C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
V_cover : U ≤ iSup V
x y : { x // x ∈ U }
z : { x_1 // x_1 ∈ V x ⊓ V y }
⊢ (forget C).map
      (G.val.map ((iVU x).op ≫ (Opens.infLELeft (V x) (V y)).op) ≫
        colimit.ι (Functor.op (OpenNhds.inclusion ↑z) ⋙ G.val)
          { obj := V x ⊓ V y, property := (_ : ↑z ∈ V x ⊓ V y) }.op)
      t =
    (forget C).map
      (G.val.map ((iVU y).op ≫ (Opens.infLERight (V x) (V y)).op) ≫
        colimit.ι (Functor.op (OpenNhds.inclusion ↑z) ⋙ G.val)
          { obj := V x ⊓ V y, property := (_ : ↑z ∈ V x ⊓ V y) }.op)
      t

tactic: intro x hxU
state_before: C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
⊢ U ≤ iSup V

tactic: erw [Opens.mem_iSup]
state_before: C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
x : ↑X
hxU : x ∈ ↑U
⊢ x ∈ ↑(iSup V)

tactic: exact ⟨⟨x, hxU⟩, mV ⟨x, hxU⟩⟩
state_before: C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
x : ↑X
hxU : x ∈ ↑U
⊢ ∃ i, x ∈ V i

tactic: obtain ⟨s, s_spec, -⟩ := F.existsUnique_gluing' V U iVU V_cover sf this
state_before: C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
V_cover : U ≤ iSup V
this : IsCompatible F.val V sf
⊢ ∃ a, (forget C).map (f.val.app U.op) a = t

tactic: use s
state_before: case intro.intro
C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
V_cover : U ≤ iSup V
this : IsCompatible F.val V sf
s : (forget C).obj (F.val.obj U.op)
s_spec : ∀ (i : { x // x ∈ U }), (forget C).map (F.val.map (iVU i).op) s = sf i
⊢ ∃ a, (forget C).map (f.val.app U.op) a = t

tactic: apply G.eq_of_locally_eq' V U iVU V_cover
state_before: case intro.intro
C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
V_cover : U ≤ iSup V
this : IsCompatible F.val V sf
s : (forget C).obj (F.val.obj U.op)
s_spec : ∀ (i : { x // x ∈ U }), (forget C).map (F.val.map (iVU i).op) s = sf i
⊢ (forget C).map (f.val.app U.op) s = t

tactic: intro x
state_before: case intro.intro.h
C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
V_cover : U ≤ iSup V
this : IsCompatible F.val V sf
s : (forget C).obj (F.val.obj U.op)
s_spec : ∀ (i : { x // x ∈ U }), (forget C).map (F.val.map (iVU i).op) s = sf i
⊢ ∀ (i : { x // x ∈ U }),
    (forget C).map (G.val.map (iVU i).op) ((forget C).map (f.val.app U.op) s) = (forget C).map (G.val.map (iVU i).op) t

tactic: rw [← comp_apply, ← f.1.naturality, comp_apply, s_spec, heq]
state_before: case intro.intro.h
C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F G : Sheaf C X
f : F ⟶ G
U : Opens ↑X
hinj : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f.val))
hsurj :
  ∀ (t : (forget C).obj (G.val.obj U.op)) (x : { x // x ∈ U }),
    ∃ V x iVU s, (forget C).map (f.val.app V.op) s = (forget C).map (G.val.map iVU.op) t
t : (forget C).obj (G.val.obj U.op)
V : { x // x ∈ U } → Opens ↑X
mV : ∀ (x : { x // x ∈ U }), ↑x ∈ V x
iVU : (x : { x // x ∈ U }) → V x ⟶ U
sf : (x : { x // x ∈ U }) → (forget C).obj (F.val.obj (V x).op)
heq : ∀ (x : { x // x ∈ U }), (forget C).map (f.val.app (V x).op) (sf x) = (forget C).map (G.val.map (iVU x).op) t
V_cover : U ≤ iSup V
this : IsCompatible F.val V sf
s : (forget C).obj (F.val.obj U.op)
s_spec : ∀ (i : { x // x ∈ U }), (forget C).map (F.val.map (iVU i).op) s = sf i
x : { x // x ∈ U }
⊢ (forget C).map (G.val.map (iVU x).op) ((forget C).map (f.val.app U.op) s) = (forget C).map (G.val.map (iVU x).op) t