Theorem: AlgebraicGeometry.LocallyRingedSpace.preimage_basicOpen
File: Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean

tactic: ext x
state_before: X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
⊢ (Opens.map f.val.base).obj (Y.toRingedSpace.basicOpen s) = X.toRingedSpace.basicOpen ((f.val.c.app { unop := U }) s)
state_after: case h.h
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
x : ↑↑X.toPresheafedSpace
⊢ x ∈ ↑((Opens.map f.val.base).obj (Y.toRingedSpace.basicOpen s)) ↔
    x ∈ ↑(X.toRingedSpace.basicOpen ((f.val.c.app { unop := U }) s))

tactic: constructor
state_before: case h.h
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
x : ↑↑X.toPresheafedSpace
⊢ x ∈ ↑((Opens.map f.val.base).obj (Y.toRingedSpace.basicOpen s)) ↔
    x ∈ ↑(X.toRingedSpace.basicOpen ((f.val.c.app { unop := U }) s))
state_after: case h.h.mp
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
x : ↑↑X.toPresheafedSpace
⊢ x ∈ ↑((Opens.map f.val.base).obj (Y.toRingedSpace.basicOpen s)) →
    x ∈ ↑(X.toRingedSpace.basicOpen ((f.val.c.app { unop := U }) s))

case h.h.mpr
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
x : ↑↑X.toPresheafedSpace
⊢ x ∈ ↑(X.toRingedSpace.basicOpen ((f.val.c.app { unop := U }) s)) →
    x ∈ ↑((Opens.map f.val.base).obj (Y.toRingedSpace.basicOpen s))

tactic: rintro ⟨⟨y, hyU⟩, hy : IsUnit _, rfl : y = _⟩
state_before: case h.h.mp
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
x : ↑↑X.toPresheafedSpace
⊢ x ∈ ↑((Opens.map f.val.base).obj (Y.toRingedSpace.basicOpen s)) →
    x ∈ ↑(X.toRingedSpace.basicOpen ((f.val.c.app { unop := U }) s))
state_after: case h.h.mp.intro.mk.intro
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
x : ↑↑X.toPresheafedSpace
hyU : f.val.base x ∈ U
hy : IsUnit ((Y.toRingedSpace.presheaf.germ ⟨f.val.base x, hyU⟩) s)
⊢ x ∈ ↑(X.toRingedSpace.basicOpen ((f.val.c.app { unop := U }) s))

tactic: erw [RingedSpace.mem_basicOpen _ _ ⟨x, show x ∈ (Opens.map f.1.base).obj U from hyU⟩,
  ← PresheafedSpace.stalkMap_germ_apply]
state_before: case h.h.mp.intro.mk.intro
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
x : ↑↑X.toPresheafedSpace
hyU : f.val.base x ∈ U
hy : IsUnit ((Y.toRingedSpace.presheaf.germ ⟨f.val.base x, hyU⟩) s)
⊢ x ∈ ↑(X.toRingedSpace.basicOpen ((f.val.c.app { unop := U }) s))
state_after: case h.h.mp.intro.mk.intro
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
x : ↑↑X.toPresheafedSpace
hyU : f.val.base x ∈ U
hy : IsUnit ((Y.toRingedSpace.presheaf.germ ⟨f.val.base x, hyU⟩) s)
⊢ IsUnit ((PresheafedSpace.stalkMap f.val ↑⟨x, ⋯⟩) ((Y.presheaf.germ ⟨f.val.base ↑⟨x, ⋯⟩, ⋯⟩) s))

tactic: exact (PresheafedSpace.stalkMap f.1 _).isUnit_map hy
state_before: case h.h.mp.intro.mk.intro
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
x : ↑↑X.toPresheafedSpace
hyU : f.val.base x ∈ U
hy : IsUnit ((Y.toRingedSpace.presheaf.germ ⟨f.val.base x, hyU⟩) s)
⊢ IsUnit ((PresheafedSpace.stalkMap f.val ↑⟨x, ⋯⟩) ((Y.presheaf.germ ⟨f.val.base ↑⟨x, ⋯⟩, ⋯⟩) s))
state_after: no goals

tactic: rintro ⟨y, hy : IsUnit _, rfl⟩
state_before: case h.h.mpr
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
x : ↑↑X.toPresheafedSpace
⊢ x ∈ ↑(X.toRingedSpace.basicOpen ((f.val.c.app { unop := U }) s)) →
    x ∈ ↑((Opens.map f.val.base).obj (Y.toRingedSpace.basicOpen s))
state_after: case h.h.mpr.intro.intro
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
y : ↥((Opens.map f.val.base).obj U)
hy : IsUnit ((X.toRingedSpace.presheaf.germ y) ((f.val.c.app { unop := U }) s))
⊢ ↑y ∈ ↑((Opens.map f.val.base).obj (Y.toRingedSpace.basicOpen s))

tactic: erw [RingedSpace.mem_basicOpen _ _ ⟨f.1.base y.1, y.2⟩]
state_before: case h.h.mpr.intro.intro
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
y : ↥((Opens.map f.val.base).obj U)
hy : IsUnit ((X.toRingedSpace.presheaf.germ y) ((f.val.c.app { unop := U }) s))
⊢ ↑y ∈ ↑((Opens.map f.val.base).obj (Y.toRingedSpace.basicOpen s))
state_after: case h.h.mpr.intro.intro
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
y : ↥((Opens.map f.val.base).obj U)
hy : IsUnit ((X.toRingedSpace.presheaf.germ y) ((f.val.c.app { unop := U }) s))
⊢ IsUnit ((Y.presheaf.germ ⟨f.val.base ↑y, ⋯⟩) s)

tactic: erw [← PresheafedSpace.stalkMap_germ_apply] at hy
state_before: case h.h.mpr.intro.intro
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
y : ↥((Opens.map f.val.base).obj U)
hy : IsUnit ((X.toRingedSpace.presheaf.germ y) ((f.val.c.app { unop := U }) s))
⊢ IsUnit ((Y.presheaf.germ ⟨f.val.base ↑y, ⋯⟩) s)
state_after: case h.h.mpr.intro.intro
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
y : ↥((Opens.map f.val.base).obj U)
hy : IsUnit ((PresheafedSpace.stalkMap f.val ↑y) ((Y.presheaf.germ ⟨f.val.base ↑y, ⋯⟩) s))
⊢ IsUnit ((Y.presheaf.germ ⟨f.val.base ↑y, ⋯⟩) s)

tactic: exact (isUnit_map_iff (PresheafedSpace.stalkMap f.1 _) _).mp hy
state_before: case h.h.mpr.intro.intro
X✝ X Y : LocallyRingedSpace
f : X ⟶ Y
U : Opens ↑Y.toTopCat
s : ↑(Y.presheaf.obj { unop := U })
y : ↥((Opens.map f.val.base).obj U)
hy : IsUnit ((PresheafedSpace.stalkMap f.val ↑y) ((Y.presheaf.germ ⟨f.val.base ↑y, ⋯⟩) s))
⊢ IsUnit ((Y.presheaf.germ ⟨f.val.base ↑y, ⋯⟩) s)
state_after: no goals