Theorem: IsLocalization.map_eq_zero_iff
File: Mathlib/RingTheory/Localization/Basic.lean

tactic: constructor
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
r : R
⊢ (algebraMap R S) r = 0 ↔ ∃ m, ↑m * r = 0
state_after: case mp
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
r : R
⊢ (algebraMap R S) r = 0 → ∃ m, ↑m * r = 0

case mpr
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
r : R
⊢ (∃ m, ↑m * r = 0) → (algebraMap R S) r = 0

tactic: intro h
state_before: case mp
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
r : R
⊢ (algebraMap R S) r = 0 → ∃ m, ↑m * r = 0
state_after: case mp
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
r : R
h : (algebraMap R S) r = 0
⊢ ∃ m, ↑m * r = 0

tactic: obtain ⟨m, hm⟩ := (IsLocalization.eq_iff_exists M S).mp ((algebraMap R S).map_zero.trans h.symm)
state_before: case mp
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
r : R
h : (algebraMap R S) r = 0
⊢ ∃ m, ↑m * r = 0
state_after: case mp.intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
r : R
h : (algebraMap R S) r = 0
m : ↥M
hm : ↑m * 0 = ↑m * r
⊢ ∃ m, ↑m * r = 0

tactic: exact ⟨m, by simpa using hm.symm⟩
state_before: case mp.intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
r : R
h : (algebraMap R S) r = 0
m : ↥M
hm : ↑m * 0 = ↑m * r
⊢ ∃ m, ↑m * r = 0
state_after: no goals

tactic: simpa using hm.symm
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
r : R
h : (algebraMap R S) r = 0
m : ↥M
hm : ↑m * 0 = ↑m * r
⊢ ↑m * r = 0
state_after: no goals

tactic: rintro ⟨m, hm⟩
state_before: case mpr
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
r : R
⊢ (∃ m, ↑m * r = 0) → (algebraMap R S) r = 0
state_after: case mpr.intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
r : R
m : ↥M
hm : ↑m * r = 0
⊢ (algebraMap R S) r = 0

tactic: rw [← (IsLocalization.map_units S m).mul_right_inj, mul_zero, ← RingHom.map_mul, hm,
  RingHom.map_zero]
state_before: case mpr.intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
r : R
m : ↥M
hm : ↑m * r = 0
⊢ (algebraMap R S) r = 0
state_after: no goals