Theorem: Ring.image_closure
File: Mathlib/Deprecated/Subring.lean

tactic: refine' le_antisymm _ (closure_subset (RingHom.isSubring_image _ closure.isSubring) <|
  Set.image_subset _ subset_closure)
state_before: R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
⊢ ↑f '' closure s = closure (↑f '' s)

tactic: rintro _ ⟨x, hx, rfl⟩
state_before: R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
⊢ ↑f '' closure s ≤ closure (↑f '' s)

tactic: apply AddGroup.InClosure.recOn (motive := fun {x} _ ↦ f x ∈ closure (f '' s)) hx _ <;> intros
state_before: case intro.intro
R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
⊢ ↑f x ∈ closure (↑f '' s)

tactic: rw [f.map_zero]
state_before: case intro.intro.zero
R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
⊢ ↑f 0 ∈ closure (↑f '' s)

tactic: apply closure.isSubring.zero_mem
state_before: case intro.intro.zero
R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
⊢ 0 ∈ closure (↑f '' s)

tactic: rw [f.map_neg]
state_before: case intro.intro.neg
R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
a✝¹ : R
a✝ : AddGroup.InClosure (Monoid.Closure s) a✝¹
a_ih✝ : ↑f a✝¹ ∈ closure (↑f '' s)
⊢ ↑f (-a✝¹) ∈ closure (↑f '' s)

tactic: apply closure.isSubring.neg_mem
state_before: case intro.intro.neg
R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
a✝¹ : R
a✝ : AddGroup.InClosure (Monoid.Closure s) a✝¹
a_ih✝ : ↑f a✝¹ ∈ closure (↑f '' s)
⊢ -↑f a✝¹ ∈ closure (↑f '' s)

tactic: assumption
state_before: case intro.intro.neg
R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
a✝¹ : R
a✝ : AddGroup.InClosure (Monoid.Closure s) a✝¹
a_ih✝ : ↑f a✝¹ ∈ closure (↑f '' s)
⊢ ↑f a✝¹ ∈ closure (↑f '' s)

tactic: rw [f.map_add]
state_before: case intro.intro.add
R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
a✝² b✝ : R
a✝¹ : AddGroup.InClosure (Monoid.Closure s) a✝²
a✝ : AddGroup.InClosure (Monoid.Closure s) b✝
a_ih✝¹ : ↑f a✝² ∈ closure (↑f '' s)
a_ih✝ : ↑f b✝ ∈ closure (↑f '' s)
⊢ ↑f (a✝² + b✝) ∈ closure (↑f '' s)

tactic: apply closure.isSubring.add_mem
state_before: case intro.intro.add
R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
a✝² b✝ : R
a✝¹ : AddGroup.InClosure (Monoid.Closure s) a✝²
a✝ : AddGroup.InClosure (Monoid.Closure s) b✝
a_ih✝¹ : ↑f a✝² ∈ closure (↑f '' s)
a_ih✝ : ↑f b✝ ∈ closure (↑f '' s)
⊢ ↑f a✝² + ↑f b✝ ∈ closure (↑f '' s)

tactic: assumption'
state_before: case intro.intro.add.a
R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
a✝² b✝ : R
a✝¹ : AddGroup.InClosure (Monoid.Closure s) a✝²
a✝ : AddGroup.InClosure (Monoid.Closure s) b✝
a_ih✝¹ : ↑f a✝² ∈ closure (↑f '' s)
a_ih✝ : ↑f b✝ ∈ closure (↑f '' s)
⊢ ↑f a✝² ∈ closure (↑f '' s)

case intro.intro.add.a
R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
a✝² b✝ : R
a✝¹ : AddGroup.InClosure (Monoid.Closure s) a✝²
a✝ : AddGroup.InClosure (Monoid.Closure s) b✝
a_ih✝¹ : ↑f a✝² ∈ closure (↑f '' s)
a_ih✝ : ↑f b✝ ∈ closure (↑f '' s)
⊢ ↑f b✝ ∈ closure (↑f '' s)

tactic: apply AddGroup.mem_closure
state_before: R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
a✝¹ : R
a✝ : a✝¹ ∈ Monoid.Closure s
⊢ ↑f a✝¹ ∈ closure (↑f '' s)

tactic: rw [← Monoid.image_closure f.to_isMonoidHom]
state_before: case a
R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
a✝¹ : R
a✝ : a✝¹ ∈ Monoid.Closure s
⊢ ↑f a✝¹ ∈ Monoid.Closure (↑f '' s)

tactic: apply Set.mem_image_of_mem
state_before: case a
R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
a✝¹ : R
a✝ : a✝¹ ∈ Monoid.Closure s
⊢ ↑f a✝¹ ∈ ↑f '' Monoid.Closure s

tactic: assumption
state_before: case a.h
R : Type u
inst✝² : Ring R
cR : Type u
inst✝¹ : CommRing cR
s✝ : Set R
S : Type u_1
inst✝ : Ring S
f : R →+* S
s : Set R
x : R
hx : x ∈ closure s
a✝¹ : R
a✝ : a✝¹ ∈ Monoid.Closure s
⊢ a✝¹ ∈ Monoid.Closure s