theorem eq_zero_of_basicOpen_eq_bot {X : Scheme} [hX : IsReduced X] {U : Opens X.carrier}
    (s : X.presheaf.obj (op U)) (hs : X.basicOpen s = ⊥) : s = 0 := by
  apply TopCat.Presheaf.section_ext X.sheaf U
  conv => intro x; rw [RingHom.map_zero]
  refine' (@reduce_to_affine_global (fun X U =>
     ∀ [IsReduced X] (s : X.presheaf.obj (op U)),
       X.basicOpen s = ⊥ → ∀ x, (X.sheaf.presheaf.germ x) s = 0) _ _ _) X U s hs
  · intro X U hx hX s hs x
    obtain ⟨V, hx, i, H⟩ := hx x
    specialize H (X.presheaf.map i.op s)
    erw [Scheme.basicOpen_res] at H
    rw [hs] at H
    specialize H inf_bot_eq ⟨x, hx⟩
    erw [TopCat.Presheaf.germ_res_apply] at H
    exact H
  · rintro X Y f hf
    have e : f.val.base ⁻¹' Set.range ↑f.val.base = Set.univ := by
      rw [← Set.image_univ, Set.preimage_image_eq _ hf.base_open.inj]
    refine' ⟨_, _, e, rfl, _⟩
    rintro H hX s hs ⟨_, x, rfl⟩
    haveI := isReducedOfOpenImmersion f
    specialize H (f.1.c.app _ s) _ ⟨x, by rw [Opens.mem_mk, e]; trivial⟩
    · rw [← Scheme.preimage_basicOpen, hs]; ext1; simp [Opens.map]
    · erw [← PresheafedSpace.stalkMap_germ_apply f.1 ⟨_, _⟩ ⟨x, _⟩] at H
      apply_fun inv <| PresheafedSpace.stalkMap f.val x at H
      

Proof state:
case h.refine'_2.mk.intro
X✝¹ : Scheme
X✝ : Scheme
hX✝ : IsReduced X✝
U : Opens ↑↑X✝.toPresheafedSpace
s✝ : ↑(X✝.presheaf.obj (op U))
hs✝ : X✝.basicOpen s✝ = ⊥
X Y : Scheme
f : X ⟶ Y
hf : IsOpenImmersion f
e : ⇑f.val.base ⁻¹' Set.range ⇑f.val.base = Set.univ
hX : IsReduced Y
s : ↑(Y.presheaf.obj (op { carrier := Set.range ⇑f.val.base, is_open' := (_ : IsOpen (Set.range ⇑f.val.base)) }))
hs : Y.basicOpen s = ⊥
x : (forget TopCat).obj ↑X.toPresheafedSpace
this : IsReduced X
H :
  (inv (PresheafedSpace.stalkMap f.val x))
      ((PresheafedSpace.stalkMap f.val
          ↑{ val := x,
              property :=
                (_ :
                  x ∈
                    { carrier := ⇑f.val.base ⁻¹' Set.range ⇑f.val.base,
                      is_open' := (_ : IsOpen (⇑f.val.base ⁻¹' Set.range ⇑f.val.base)) }) })
        ((Presheaf.germ Y.presheaf
            {
              val :=
                f.val.base
                  ↑{ val := x,
                      property :=
                        (_ :
                          x ∈
                            { carrier := ⇑f.val.base ⁻¹' Set.range ⇑f.val.base,
                              is_open' := (_ : IsOpen (⇑f.val.base ⁻¹' Set.range ⇑f.val.base)) }) },
              property :=
                (_ :
                  ↑{ val := x,
                        property :=
                          (_ :
                            x ∈
                              { carrier := ⇑f.val.base ⁻¹' Set.range ⇑f.val.base,
                                is_open' := (_ : IsOpen (⇑f.val.base ⁻¹' Set.range ⇑f.val.base)) }) } ∈
                    f⁻¹ᵁ
                      { carrier := fun x => ∃ y, f.val.base y = x,
                        is_open' := (_ : IsOpen (Set.range ⇑f.val.base)) }) })
          s)) =
    (inv (PresheafedSpace.stalkMap f.val x)) 0
⊢ (Presheaf.germ (Sheaf.presheaf (Scheme.sheaf Y))
        { val := f.val.base x, property := (_ : ∃ y, f.val.base y = f.val.base x) })
      s =
    0

Next tactic:
erw [CategoryTheory.IsIso.hom_inv_id_apply, map_zero] at H