Theorem: Subring.mem_closure_iff
File: Mathlib/Algebra/Ring/Subring/Basic.lean

tactic: rw [zero_mul q]
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q : R
hq : q ∈ ↑(Submonoid.closure s)
⊢ 0 * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q : R
hq : q ∈ ↑(Submonoid.closure s)
⊢ 0 ∈ AddSubgroup.closure ↑(Submonoid.closure s)

tactic: apply AddSubgroup.zero_mem _
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q : R
hq : q ∈ ↑(Submonoid.closure s)
⊢ 0 ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: no goals

tactic: rw [add_mul p₁ p₂ q]
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q : R
hq : q ∈ ↑(Submonoid.closure s)
p₁ p₂ : R
ihp₁ : p₁ * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
ihp₂ : p₂ * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
⊢ (p₁ + p₂) * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q : R
hq : q ∈ ↑(Submonoid.closure s)
p₁ p₂ : R
ihp₁ : p₁ * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
ihp₂ : p₂ * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
⊢ p₁ * q + p₂ * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)

tactic: apply AddSubgroup.add_mem _ ihp₁ ihp₂
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q : R
hq : q ∈ ↑(Submonoid.closure s)
p₁ p₂ : R
ihp₁ : p₁ * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
ihp₂ : p₂ * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
⊢ p₁ * q + p₂ * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: no goals

tactic: have f : -x * q = -(x * q) := by simp
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝¹ : R
h : x✝¹ ∈ closure s
x✝ y : R
hx✝ : x✝ ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q : R
hq : q ∈ ↑(Submonoid.closure s)
x : R
hx : x * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
⊢ -x * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝¹ : R
h : x✝¹ ∈ closure s
x✝ y : R
hx✝ : x✝ ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q : R
hq : q ∈ ↑(Submonoid.closure s)
x : R
hx : x * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
f : -x * q = -(x * q)
⊢ -x * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)

tactic: rw [f]
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝¹ : R
h : x✝¹ ∈ closure s
x✝ y : R
hx✝ : x✝ ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q : R
hq : q ∈ ↑(Submonoid.closure s)
x : R
hx : x * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
f : -x * q = -(x * q)
⊢ -x * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝¹ : R
h : x✝¹ ∈ closure s
x✝ y : R
hx✝ : x✝ ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q : R
hq : q ∈ ↑(Submonoid.closure s)
x : R
hx : x * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
f : -x * q = -(x * q)
⊢ -(x * q) ∈ AddSubgroup.closure ↑(Submonoid.closure s)

tactic: apply AddSubgroup.neg_mem _ hx
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝¹ : R
h : x✝¹ ∈ closure s
x✝ y : R
hx✝ : x✝ ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q : R
hq : q ∈ ↑(Submonoid.closure s)
x : R
hx : x * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
f : -x * q = -(x * q)
⊢ -(x * q) ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: no goals

tactic: simp
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝¹ : R
h : x✝¹ ∈ closure s
x✝ y : R
hx✝ : x✝ ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q : R
hq : q ∈ ↑(Submonoid.closure s)
x : R
hx : x * q ∈ AddSubgroup.closure ↑(Submonoid.closure s)
⊢ -x * q = -(x * q)
state_after: no goals

tactic: rw [mul_zero x]
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
⊢ x * 0 ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
⊢ 0 ∈ AddSubgroup.closure ↑(Submonoid.closure s)

tactic: apply AddSubgroup.zero_mem _
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
⊢ 0 ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: no goals

tactic: rw [mul_add x q₁ q₂]
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q₁ q₂ : R
ihq₁ : x * q₁ ∈ AddSubgroup.closure ↑(Submonoid.closure s)
ihq₂ : x * q₂ ∈ AddSubgroup.closure ↑(Submonoid.closure s)
⊢ x * (q₁ + q₂) ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q₁ q₂ : R
ihq₁ : x * q₁ ∈ AddSubgroup.closure ↑(Submonoid.closure s)
ihq₂ : x * q₂ ∈ AddSubgroup.closure ↑(Submonoid.closure s)
⊢ x * q₁ + x * q₂ ∈ AddSubgroup.closure ↑(Submonoid.closure s)

tactic: apply AddSubgroup.add_mem _ ihq₁ ihq₂
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
q₁ q₂ : R
ihq₁ : x * q₁ ∈ AddSubgroup.closure ↑(Submonoid.closure s)
ihq₂ : x * q₂ ∈ AddSubgroup.closure ↑(Submonoid.closure s)
⊢ x * q₁ + x * q₂ ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: no goals

tactic: have f : x * -z = -(x * z) := by simp
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
z : R
hz : x * z ∈ AddSubgroup.closure ↑(Submonoid.closure s)
⊢ x * -z ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
z : R
hz : x * z ∈ AddSubgroup.closure ↑(Submonoid.closure s)
f : x * -z = -(x * z)
⊢ x * -z ∈ AddSubgroup.closure ↑(Submonoid.closure s)

tactic: rw [f]
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
z : R
hz : x * z ∈ AddSubgroup.closure ↑(Submonoid.closure s)
f : x * -z = -(x * z)
⊢ x * -z ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
z : R
hz : x * z ∈ AddSubgroup.closure ↑(Submonoid.closure s)
f : x * -z = -(x * z)
⊢ -(x * z) ∈ AddSubgroup.closure ↑(Submonoid.closure s)

tactic: apply AddSubgroup.neg_mem _ hz
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
z : R
hz : x * z ∈ AddSubgroup.closure ↑(Submonoid.closure s)
f : x * -z = -(x * z)
⊢ -(x * z) ∈ AddSubgroup.closure ↑(Submonoid.closure s)
state_after: no goals

tactic: simp
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Set R
x✝ : R
h : x✝ ∈ closure s
x y : R
hx : x ∈ AddSubgroup.closure ↑(Submonoid.closure s)
hy : y ∈ AddSubgroup.closure ↑(Submonoid.closure s)
z : R
hz : x * z ∈ AddSubgroup.closure ↑(Submonoid.closure s)
⊢ x * -z = -(x * z)
state_after: no goals