Theorem: Ideal.Quotient.torsionBy_eq_span_singleton
File: Mathlib/Algebra/Module/Torsion.lean

tactic: ext x
state_before: R✝ : Type ?u.707004
M : Type ?u.707007
R : Type w
inst✝ : CommRing R
a b : R
ha : a ∈ R⁰
⊢ torsionBy R (R ⧸ Submodule.span R {a * b}) a = Submodule.span R {↑(mk (Submodule.span R {a * b})) b}

tactic: rw [mem_torsionBy_iff, Submodule.mem_span_singleton]
state_before: case h
R✝ : Type ?u.707004
M : Type ?u.707007
R : Type w
inst✝ : CommRing R
a b : R
ha : a ∈ R⁰
x : R ⧸ Submodule.span R {a * b}
⊢ x ∈ torsionBy R (R ⧸ Submodule.span R {a * b}) a ↔ x ∈ Submodule.span R {↑(mk (Submodule.span R {a * b})) b}

tactic: obtain ⟨x, rfl⟩ := mk_surjective x
state_before: case h
R✝ : Type ?u.707004
M : Type ?u.707007
R : Type w
inst✝ : CommRing R
a b : R
ha : a ∈ R⁰
x : R ⧸ Submodule.span R {a * b}
⊢ a • x = 0 ↔ ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = x

tactic: constructor <;> intro h
state_before: case h.intro
R✝ : Type ?u.707004
M : Type ?u.707007
R : Type w
inst✝ : CommRing R
a b : R
ha : a ∈ R⁰
x : R
⊢ a • ↑(mk (Submodule.span R {a * b})) x = 0 ↔
    ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x

tactic: rw [← mk_eq_mk, ← Quotient.mk_smul, Quotient.mk_eq_zero, Submodule.mem_span_singleton] at h
state_before: case h.intro.mp
R✝ : Type ?u.707004
M : Type ?u.707007
R : Type w
inst✝ : CommRing R
a b : R
ha : a ∈ R⁰
x : R
h : a • ↑(mk (Submodule.span R {a * b})) x = 0
⊢ ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x

tactic: obtain ⟨c, h⟩ := h
state_before: case h.intro.mp
R✝ : Type ?u.707004
M : Type ?u.707007
R : Type w
inst✝ : CommRing R
a b : R
ha : a ∈ R⁰
x : R
h : ∃ a_1, a_1 • (a * b) = a • x
⊢ ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x

tactic: rw [smul_eq_mul, smul_eq_mul, mul_comm, mul_assoc, mul_cancel_left_mem_nonZeroDivisors ha,
  mul_comm] at h
state_before: case h.intro.mp.intro
R✝ : Type ?u.707004
M : Type ?u.707007
R : Type w
inst✝ : CommRing R
a b : R
ha : a ∈ R⁰
x c : R
h : c • (a * b) = a • x
⊢ ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x

tactic: use c
state_before: case h.intro.mp.intro
R✝ : Type ?u.707004
M : Type ?u.707007
R : Type w
inst✝ : CommRing R
a b : R
ha : a ∈ R⁰
x c : R
h : c * b = x
⊢ ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x

tactic: rw [← h, ← mk_eq_mk, ← Quotient.mk_smul, smul_eq_mul, mk_eq_mk]
state_before: case h.intro.mp.intro
R✝ : Type ?u.707004
M : Type ?u.707007
R : Type w
inst✝ : CommRing R
a b : R
ha : a ∈ R⁰
x c : R
h : c * b = x
⊢ c • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x

tactic: obtain ⟨c, h⟩ := h
state_before: case h.intro.mpr
R✝ : Type ?u.707004
M : Type ?u.707007
R : Type w
inst✝ : CommRing R
a b : R
ha : a ∈ R⁰
x : R
h : ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x
⊢ a • ↑(mk (Submodule.span R {a * b})) x = 0

tactic: rw [← h, smul_comm, ← mk_eq_mk, ← Quotient.mk_smul,
  (Quotient.mk_eq_zero _).mpr <| mem_span_singleton_self _, smul_zero]
state_before: case h.intro.mpr.intro
R✝ : Type ?u.707004
M : Type ?u.707007
R : Type w
inst✝ : CommRing R
a b : R
ha : a ∈ R⁰
x c : R
h : c • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x
⊢ a • ↑(mk (Submodule.span R {a * b})) x = 0