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

Proof steps:
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
⊢ nonZeroDivisors R ≤ Submonoid.comap (algebraMap R S) (nonZeroDivisors S)
state_after: 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
a : R
ha : a ∈ nonZeroDivisors R
b : S
e : b * (algebraMap R S) a = 0
⊢ b = 0
tactic: rintro a ha b (e : b * algebraMap R S a = 0)
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
a : R
ha : a ∈ nonZeroDivisors R
b : S
e : b * (algebraMap R S) a = 0
⊢ b = 0
state_after: case intro.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
a : R
ha : a ∈ nonZeroDivisors R
x : R
s : ↥M
e : mk' S x s * (algebraMap R S) a = 0
⊢ mk' S x s = 0
tactic: obtain ⟨x, s, rfl⟩ := mk'_surjective M b
state_before: case intro.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
a : R
ha : a ∈ nonZeroDivisors R
x : R
s : ↥M
e : mk' S x s * (algebraMap R S) a = 0
⊢ mk' S x s = 0
state_after: case intro.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
a : R
ha : a ∈ nonZeroDivisors R
x : R
s : ↥M
e : ∃ c, ↑c * (↑1 * (x * a)) = ↑c * (↑(s * 1) * 0)
⊢ mk' S x s = 0
tactic: rw [← @mk'_one R _ M, ← mk'_mul, ← (algebraMap R S).map_zero, ← @mk'_one R _ M,
    IsLocalization.eq] at e
state_before: case intro.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
a : R
ha : a ∈ nonZeroDivisors R
x : R
s : ↥M
e : ∃ c, ↑c * (↑1 * (x * a)) = ↑c * (↑(s * 1) * 0)
⊢ mk' S x s = 0
state_after: case intro.intro.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
a : R
ha : a ∈ nonZeroDivisors R
x : R
s c : ↥M
e : ↑c * (↑1 * (x * a)) = ↑c * (↑(s * 1) * 0)
⊢ mk' S x s = 0
tactic: obtain ⟨c, e⟩ := e
state_before: case intro.intro.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
a : R
ha : a ∈ nonZeroDivisors R
x : R
s c : ↥M
e : ↑c * (↑1 * (x * a)) = ↑c * (↑(s * 1) * 0)
⊢ mk' S x s = 0
state_after: case intro.intro.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
a : R
ha : a ∈ nonZeroDivisors R
x : R
s c : ↥M
e : ↑c * x * a = 0
⊢ mk' S x s = 0
tactic: rw [mul_zero, mul_zero, Submonoid.coe_one, one_mul, ← mul_assoc] at e
state_before: case intro.intro.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
a : R
ha : a ∈ nonZeroDivisors R
x : R
s c : ↥M
e : ↑c * x * a = 0
⊢ mk' S x s = 0
state_after: case intro.intro.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
a : R
ha : a ∈ nonZeroDivisors R
x : R
s c : ↥M
e : ↑c * x * a = 0
⊢ ∃ m, ↑m * x = 0
tactic: rw [mk'_eq_zero_iff]
state_before: case intro.intro.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
a : R
ha : a ∈ nonZeroDivisors R
x : R
s c : ↥M
e : ↑c * x * a = 0
⊢ ∃ m, ↑m * x = 0
state_after: no goals
tactic: exact ⟨c, ha _ e⟩