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

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
⊢ 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
  closure_induction hb (fun x hx => ⟨subset_closure hx, mem x hx⟩)
    ⟨zero_mem (closure s), zero⟩ ?_ ?_ ?_
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: rintro x y ⟨hx, hpx⟩ ⟨hy, hpy⟩
state_before: 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⟩
state_after: case refine_1.intro.intro
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
hx : x ∈ closure s
hpx : p ⟨x, hx⟩
hy : y ∈ closure s
hpy : p ⟨y, hy⟩
⊢ ∃ (x_1 : x + y ∈ closure s), p ⟨x + y, x_1⟩

tactic: exact ⟨add_mem hx hy, add _ _ hpx hpy⟩
state_before: case refine_1.intro.intro
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
hx : x ∈ closure s
hpx : p ⟨x, hx⟩
hy : y ∈ closure s
hpy : p ⟨y, hy⟩
⊢ ∃ (x_1 : x + y ∈ closure s), p ⟨x + y, x_1⟩
state_after: no goals

tactic: rintro x ⟨hx, hpx⟩
state_before: 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⟩
state_after: case refine_2.intro
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
hx : x ∈ closure s
hpx : p ⟨x, hx⟩
⊢ ∃ (x_1 : -x ∈ closure s), p ⟨-x, x_1⟩

tactic: exact ⟨neg_mem hx, neg _ hpx⟩
state_before: case refine_2.intro
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
hx : x ∈ closure s
hpx : p ⟨x, hx⟩
⊢ ∃ (x_1 : -x ∈ closure s), p ⟨-x, x_1⟩
state_after: no goals

tactic: rintro x y ⟨hx, hpx⟩ ⟨hy, hpy⟩
state_before: 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⟩
state_after: case refine_3.intro.intro
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
hx : x ∈ closure s
hpx : p ⟨x, hx⟩
hy : y ∈ closure s
hpy : p ⟨y, hy⟩
⊢ ∃ (x_1 : x * y ∈ closure s), p ⟨x * y, x_1⟩

tactic: exact ⟨mul_mem hx hy, mul _ _ hpx hpy⟩
state_before: case refine_3.intro.intro
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
hx : x ∈ closure s
hpx : p ⟨x, hx⟩
hy : y ∈ closure s
hpy : p ⟨y, hy⟩
⊢ ∃ (x_1 : x * y ∈ closure s), p ⟨x * y, x_1⟩
state_after: no goals