Theorem: AlgebraicGeometry.germ_injective_of_isIntegral
File: Mathlib/AlgebraicGeometry/FunctionField.lean

tactic: rw [injective_iff_map_eq_zero]
state_before: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : ↥U
⊢ Function.Injective ⇑(X.presheaf.germ x)
state_after: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : ↥U
⊢ ∀ (a : ↑Γ(X, U)), (X.presheaf.germ x) a = 0 → a = 0

tactic: intro y hy
state_before: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : ↥U
⊢ ∀ (a : ↑Γ(X, U)), (X.presheaf.germ x) a = 0 → a = 0
state_after: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : ↥U
y : ↑Γ(X, U)
hy : (X.presheaf.germ x) y = 0
⊢ y = 0

tactic: rw [← (X.presheaf.germ x).map_zero] at hy
state_before: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : ↥U
y : ↑Γ(X, U)
hy : (X.presheaf.germ x) y = 0
⊢ y = 0
state_after: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : ↥U
y : ↑Γ(X, U)
hy : (X.presheaf.germ x) y = (X.presheaf.germ x) 0
⊢ y = 0

tactic: obtain ⟨W, hW, iU, iV, e⟩ := X.presheaf.germ_eq _ x.prop x.prop _ _ hy
state_before: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : ↥U
y : ↑Γ(X, U)
hy : (X.presheaf.germ x) y = (X.presheaf.germ x) 0
⊢ y = 0
state_after: case intro.intro.intro.intro
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : ↥U
y : ↑Γ(X, U)
hy : (X.presheaf.germ x) y = (X.presheaf.germ x) 0
W : Opens ↑↑X.toPresheafedSpace
hW : ↑x ∈ W
iU iV : W ⟶ U
e : (X.presheaf.map iU.op) y = (X.presheaf.map iV.op) 0
⊢ y = 0

tactic: cases Subsingleton.elim iU iV
state_before: case intro.intro.intro.intro
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : ↥U
y : ↑Γ(X, U)
hy : (X.presheaf.germ x) y = (X.presheaf.germ x) 0
W : Opens ↑↑X.toPresheafedSpace
hW : ↑x ∈ W
iU iV : W ⟶ U
e : (X.presheaf.map iU.op) y = (X.presheaf.map iV.op) 0
⊢ y = 0
state_after: case intro.intro.intro.intro.refl
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : ↥U
y : ↑Γ(X, U)
hy : (X.presheaf.germ x) y = (X.presheaf.germ x) 0
W : Opens ↑↑X.toPresheafedSpace
hW : ↑x ∈ W
iU : W ⟶ U
e : (X.presheaf.map iU.op) y = (X.presheaf.map iU.op) 0
⊢ y = 0

tactic: haveI : Nonempty W := ⟨⟨_, hW⟩⟩
state_before: case intro.intro.intro.intro.refl
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : ↥U
y : ↑Γ(X, U)
hy : (X.presheaf.germ x) y = (X.presheaf.germ x) 0
W : Opens ↑↑X.toPresheafedSpace
hW : ↑x ∈ W
iU : W ⟶ U
e : (X.presheaf.map iU.op) y = (X.presheaf.map iU.op) 0
⊢ y = 0
state_after: case intro.intro.intro.intro.refl
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : ↥U
y : ↑Γ(X, U)
hy : (X.presheaf.germ x) y = (X.presheaf.germ x) 0
W : Opens ↑↑X.toPresheafedSpace
hW : ↑x ∈ W
iU : W ⟶ U
e : (X.presheaf.map iU.op) y = (X.presheaf.map iU.op) 0
this : Nonempty ↥W
⊢ y = 0

tactic: exact map_injective_of_isIntegral X iU e
state_before: case intro.intro.intro.intro.refl
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
x : ↥U
y : ↑Γ(X, U)
hy : (X.presheaf.germ x) y = (X.presheaf.germ x) 0
W : Opens ↑↑X.toPresheafedSpace
hW : ↑x ∈ W
iU : W ⟶ U
e : (X.presheaf.map iU.op) y = (X.presheaf.map iU.op) 0
this : Nonempty ↥W
⊢ y = 0
state_after: no goals