Theorem: Field.closure.isSubfield
File: Mathlib/Deprecated/Subfield.lean

tactic: intro a b ha hb
state_before: F : Type u_1
inst✝ : Field F
S : Set F
⊢ ∀ {a b : F}, a ∈ closure S → b ∈ closure S → a + b ∈ closure S
state_after: F : Type u_1
inst✝ : Field F
S : Set F
a b : F
ha : a ∈ closure S
hb : b ∈ closure S
⊢ a + b ∈ closure S

tactic: rcases id ha with ⟨p, hp, q, hq, rfl⟩
state_before: F : Type u_1
inst✝ : Field F
S : Set F
a b : F
ha : a ∈ closure S
hb : b ∈ closure S
⊢ a + b ∈ closure S
state_after: case intro.intro.intro.intro
F : Type u_1
inst✝ : Field F
S : Set F
b : F
hb : b ∈ closure S
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
ha : p / q ∈ closure S
⊢ p / q + b ∈ closure S

tactic: rcases id hb with ⟨r, hr, s, hs, rfl⟩
state_before: case intro.intro.intro.intro
F : Type u_1
inst✝ : Field F
S : Set F
b : F
hb : b ∈ closure S
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
ha : p / q ∈ closure S
⊢ p / q + b ∈ closure S
state_after: case intro.intro.intro.intro.intro.intro.intro.intro
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
ha : p / q ∈ closure S
r : F
hr : r ∈ Ring.closure S
s : F
hs : s ∈ Ring.closure S
hb : r / s ∈ closure S
⊢ p / q + r / s ∈ closure S

tactic: by_cases hq0 : q = 0
state_before: case intro.intro.intro.intro.intro.intro.intro.intro
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
ha : p / q ∈ closure S
r : F
hr : r ∈ Ring.closure S
s : F
hs : s ∈ Ring.closure S
hb : r / s ∈ closure S
⊢ p / q + r / s ∈ closure S
state_after: case pos
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
ha : p / q ∈ closure S
r : F
hr : r ∈ Ring.closure S
s : F
hs : s ∈ Ring.closure S
hb : r / s ∈ closure S
hq0 : q = 0
⊢ p / q + r / s ∈ closure S

case neg
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
ha : p / q ∈ closure S
r : F
hr : r ∈ Ring.closure S
s : F
hs : s ∈ Ring.closure S
hb : r / s ∈ closure S
hq0 : ¬q = 0
⊢ p / q + r / s ∈ closure S

tactic: by_cases hs0 : s = 0
state_before: case neg
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
ha : p / q ∈ closure S
r : F
hr : r ∈ Ring.closure S
s : F
hs : s ∈ Ring.closure S
hb : r / s ∈ closure S
hq0 : ¬q = 0
⊢ p / q + r / s ∈ closure S
state_after: case pos
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
ha : p / q ∈ closure S
r : F
hr : r ∈ Ring.closure S
s : F
hs : s ∈ Ring.closure S
hb : r / s ∈ closure S
hq0 : ¬q = 0
hs0 : s = 0
⊢ p / q + r / s ∈ closure S

case neg
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
ha : p / q ∈ closure S
r : F
hr : r ∈ Ring.closure S
s : F
hs : s ∈ Ring.closure S
hb : r / s ∈ closure S
hq0 : ¬q = 0
hs0 : ¬s = 0
⊢ p / q + r / s ∈ closure S

tactic: exact ⟨p * s + q * r,
  IsAddSubmonoid.add_mem Ring.closure.isSubring.toIsAddSubgroup.toIsAddSubmonoid
    (Ring.closure.isSubring.toIsSubmonoid.mul_mem hp hs)
    (Ring.closure.isSubring.toIsSubmonoid.mul_mem hq hr),
  q * s, Ring.closure.isSubring.toIsSubmonoid.mul_mem hq hs, (div_add_div p r hq0 hs0).symm⟩
state_before: case neg
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
ha : p / q ∈ closure S
r : F
hr : r ∈ Ring.closure S
s : F
hs : s ∈ Ring.closure S
hb : r / s ∈ closure S
hq0 : ¬q = 0
hs0 : ¬s = 0
⊢ p / q + r / s ∈ closure S
state_after: no goals

tactic: rwa [hq0, div_zero, zero_add]
state_before: case pos
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
ha : p / q ∈ closure S
r : F
hr : r ∈ Ring.closure S
s : F
hs : s ∈ Ring.closure S
hb : r / s ∈ closure S
hq0 : q = 0
⊢ p / q + r / s ∈ closure S
state_after: no goals

tactic: rwa [hs0, div_zero, add_zero]
state_before: case pos
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
ha : p / q ∈ closure S
r : F
hr : r ∈ Ring.closure S
s : F
hs : s ∈ Ring.closure S
hb : r / s ∈ closure S
hq0 : ¬q = 0
hs0 : s = 0
⊢ p / q + r / s ∈ closure S
state_after: no goals

tactic: rintro _ ⟨p, hp, q, hq, rfl⟩
state_before: F : Type u_1
inst✝ : Field F
S : Set F
⊢ ∀ {a : F}, a ∈ closure S → -a ∈ closure S
state_after: case intro.intro.intro.intro
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
⊢ -(p / q) ∈ closure S

tactic: exact ⟨-p, Ring.closure.isSubring.toIsAddSubgroup.neg_mem hp, q, hq, neg_div q p⟩
state_before: case intro.intro.intro.intro
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
⊢ -(p / q) ∈ closure S
state_after: no goals

tactic: rintro _ ⟨p, hp, q, hq, rfl⟩
state_before: F : Type u_1
inst✝ : Field F
S : Set F
⊢ ∀ {x : F}, x ∈ closure S → x⁻¹ ∈ closure S
state_after: case intro.intro.intro.intro
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
⊢ (p / q)⁻¹ ∈ closure S

tactic: exact ⟨q, hq, p, hp, (inv_div _ _).symm⟩
state_before: case intro.intro.intro.intro
F : Type u_1
inst✝ : Field F
S : Set F
p : F
hp : p ∈ Ring.closure S
q : F
hq : q ∈ Ring.closure S
⊢ (p / q)⁻¹ ∈ closure S
state_after: no goals