Theorem: NonUnitalSubring.closure_induction'
File: Mathlib/RingTheory/NonUnitalSubring/Basic.lean

Proof steps:
state_before: F : Type w
R : Type u
S : Type v
T : Type u_1
inst✝⁴ : NonUnitalNonAssocRing R
inst✝³ : NonUnitalNonAssocRing S
inst✝² : NonUnitalNonAssocRing T
inst✝¹ : FunLike F R S
inst✝ : NonUnitalRingHomClass F R S
g : S →ₙ+* T
f : R →ₙ+* S
s : Set R
p : ↥(closure s) → Prop
a : ↥(closure s)
mem : ∀ (x : R) (hx : x ∈ s), p ⟨x, ⋯⟩
zero : p 0
add : ∀ (x y : ↥(closure s)), p x → p y → p (x + y)
neg : ∀ (x : ↥(closure s)), p x → p (-x)
mul : ∀ (x y : ↥(closure s)), p x → p y → p (x * y)
b : R
hb : b ∈ closure s
⊢ p ⟨b, hb⟩
state_after: F : Type w
R : Type u
S : Type v
T : Type u_1
inst✝⁴ : NonUnitalNonAssocRing R
inst✝³ : NonUnitalNonAssocRing S
inst✝² : NonUnitalNonAssocRing T
inst✝¹ : FunLike F R S
inst✝ : NonUnitalRingHomClass F R S
g : S →ₙ+* T
f : R →ₙ+* S
s : Set R
p : ↥(closure s) → Prop
a : ↥(closure s)
mem : ∀ (x : R) (hx : x ∈ s), p ⟨x, ⋯⟩
zero : p 0
add : ∀ (x y : ↥(closure s)), p x → p y → p (x + y)
neg : ∀ (x : ↥(closure s)), p x → p (-x)
mul : ∀ (x y : ↥(closure s)), p x → p y → p (x * y)
b : R
hb : b ∈ closure s
⊢ ∃ (x : b ∈ closure s), p ⟨b, x⟩
tactic: refine Exists.elim ?_ fun (hb : b ∈ closure s) (hc : p ⟨b, hb⟩) => hc
state_before: F : Type w
R : Type u
S : Type v
T : Type u_1
inst✝⁴ : NonUnitalNonAssocRing R
inst✝³ : NonUnitalNonAssocRing S
inst✝² : NonUnitalNonAssocRing T
inst✝¹ : FunLike F R S
inst✝ : NonUnitalRingHomClass F R S
g : S →ₙ+* T
f : R →ₙ+* S
s : Set R
p : ↥(closure s) → Prop
a : ↥(closure s)
mem : ∀ (x : R) (hx : x ∈ s), p ⟨x, ⋯⟩
zero : p 0
add : ∀ (x y : ↥(closure s)), p x → p y → p (x + y)
neg : ∀ (x : ↥(closure s)), p x → p (-x)
mul : ∀ (x y : ↥(closure s)), p x → p y → p (x * y)
b : R
hb : b ∈ closure s
⊢ ∃ (x : b ∈ closure s), p ⟨b, x⟩
state_after: case refine_1
F : Type w
R : Type u
S : Type v
T : Type u_1
inst✝⁴ : NonUnitalNonAssocRing R
inst✝³ : NonUnitalNonAssocRing S
inst✝² : NonUnitalNonAssocRing T
inst✝¹ : FunLike F R S
inst✝ : NonUnitalRingHomClass F R S
g : S →ₙ+* T
f : R →ₙ+* S
s : Set R
p : ↥(closure s) → Prop
a : ↥(closure s)
mem : ∀ (x : R) (hx : x ∈ s), p ⟨x, ⋯⟩
zero : p 0
add : ∀ (x y : ↥(closure s)), p x → p y → p (x + y)
neg : ∀ (x : ↥(closure s)), p x → p (-x)
mul : ∀ (x y : ↥(closure s)), p x → p y → p (x * y)
b : R
hb : b ∈ closure s
⊢ ∀ (x y : R),
    (∃ (x_1 : x ∈ closure s), p ⟨x, x_1⟩) →
      (∃ (x : y ∈ closure s), p ⟨y, x⟩) → ∃ (x_1 : x + y ∈ closure s), p ⟨x + y, x_1⟩

case refine_2
F : Type w
R : Type u
S : Type v
T : Type u_1
inst✝⁴ : NonUnitalNonAssocRing R
inst✝³ : NonUnitalNonAssocRing S
inst✝² : NonUnitalNonAssocRing T
inst✝¹ : FunLike F R S
inst✝ : NonUnitalRingHomClass F R S
g : S →ₙ+* T
f : R →ₙ+* S
s : Set R
p : ↥(closure s) → Prop
a : ↥(closure s)
mem : ∀ (x : R) (hx : x ∈ s), p ⟨x, ⋯⟩
zero : p 0
add : ∀ (x y : ↥(closure s)), p x → p y → p (x + y)
neg : ∀ (x : ↥(closure s)), p x → p (-x)
mul : ∀ (x y : ↥(closure s)), p x → p y → p (x * y)
b : R
hb : b ∈ closure s
⊢ ∀ (x : R), (∃ (x_1 : x ∈ closure s), p ⟨x, x_1⟩) → ∃ (x_1 : -x ∈ closure s), p ⟨-x, x_1⟩

case refine_3
F : Type w
R : Type u
S : Type v
T : Type u_1
inst✝⁴ : NonUnitalNonAssocRing R
inst✝³ : NonUnitalNonAssocRing S
inst✝² : NonUnitalNonAssocRing T
inst✝¹ : FunLike F R S
inst✝ : NonUnitalRingHomClass F R S
g : S →ₙ+* T
f : R →ₙ+* S
s : Set R
p : ↥(closure s) → Prop
a : ↥(closure s)
mem : ∀ (x : R) (hx : x ∈ s), p ⟨x, ⋯⟩
zero : p 0
add : ∀ (x y : ↥(closure s)), p x → p y → p (x + y)
neg : ∀ (x : ↥(closure s)), p x → p (-x)
mul : ∀ (x y : ↥(closure s)), p x → p y → p (x * y)
b : R
hb : b ∈ closure s
⊢ ∀ (x y : R),
    (∃ (x_1 : x ∈ closure s), p ⟨x, x_1⟩) →
      (∃ (x : y ∈ closure s), p ⟨y, x⟩) → ∃ (x_1 : x * y ∈ closure s), p ⟨x * y, x_1⟩
tactic: refine
      closure_induction hb (fun x hx => ⟨subset_closure hx, mem x hx⟩)
        ⟨zero_mem (closure s), zero⟩ ?_ ?_ ?_