Theorem: Ideal.Polynomial.mem_closure_X_union_C
File: Mathlib/RingTheory/Jacobson.lean

tactic: refine Polynomial.induction_on p ?_ ?_ ?_
state_before: R : Type u_1
inst✝ : Ring R
p : R[X]
⊢ p ∈ Subring.closure (insert X {f | f.degree ≤ 0})
state_after: case refine_1
R : Type u_1
inst✝ : Ring R
p : R[X]
⊢ ∀ (a : R), C a ∈ Subring.closure (insert X {f | f.degree ≤ 0})

case refine_2
R : Type u_1
inst✝ : Ring R
p : R[X]
⊢ ∀ (p q : R[X]),
    p ∈ Subring.closure (insert X {f | f.degree ≤ 0}) →
      q ∈ Subring.closure (insert X {f | f.degree ≤ 0}) → p + q ∈ Subring.closure (insert X {f | f.degree ≤ 0})

case refine_3
R : Type u_1
inst✝ : Ring R
p : R[X]
⊢ ∀ (n : ℕ) (a : R),
    C a * X ^ n ∈ Subring.closure (insert X {f | f.degree ≤ 0}) →
      C a * X ^ (n + 1) ∈ Subring.closure (insert X {f | f.degree ≤ 0})

tactic: intro r
state_before: case refine_1
R : Type u_1
inst✝ : Ring R
p : R[X]
⊢ ∀ (a : R), C a ∈ Subring.closure (insert X {f | f.degree ≤ 0})
state_after: case refine_1
R : Type u_1
inst✝ : Ring R
p : R[X]
r : R
⊢ C r ∈ Subring.closure (insert X {f | f.degree ≤ 0})

tactic: apply Subring.subset_closure
state_before: case refine_1
R : Type u_1
inst✝ : Ring R
p : R[X]
r : R
⊢ C r ∈ Subring.closure (insert X {f | f.degree ≤ 0})
state_after: case refine_1.a
R : Type u_1
inst✝ : Ring R
p : R[X]
r : R
⊢ C r ∈ insert X {f | f.degree ≤ 0}

tactic: apply Set.mem_insert_of_mem
state_before: case refine_1.a
R : Type u_1
inst✝ : Ring R
p : R[X]
r : R
⊢ C r ∈ insert X {f | f.degree ≤ 0}
state_after: case refine_1.a.a
R : Type u_1
inst✝ : Ring R
p : R[X]
r : R
⊢ C r ∈ {f | f.degree ≤ 0}

tactic: exact degree_C_le
state_before: case refine_1.a.a
R : Type u_1
inst✝ : Ring R
p : R[X]
r : R
⊢ C r ∈ {f | f.degree ≤ 0}
state_after: no goals

tactic: intros p1 p2 h1 h2
state_before: case refine_2
R : Type u_1
inst✝ : Ring R
p : R[X]
⊢ ∀ (p q : R[X]),
    p ∈ Subring.closure (insert X {f | f.degree ≤ 0}) →
      q ∈ Subring.closure (insert X {f | f.degree ≤ 0}) → p + q ∈ Subring.closure (insert X {f | f.degree ≤ 0})
state_after: case refine_2
R : Type u_1
inst✝ : Ring R
p p1 p2 : R[X]
h1 : p1 ∈ Subring.closure (insert X {f | f.degree ≤ 0})
h2 : p2 ∈ Subring.closure (insert X {f | f.degree ≤ 0})
⊢ p1 + p2 ∈ Subring.closure (insert X {f | f.degree ≤ 0})

tactic: exact Subring.add_mem _ h1 h2
state_before: case refine_2
R : Type u_1
inst✝ : Ring R
p p1 p2 : R[X]
h1 : p1 ∈ Subring.closure (insert X {f | f.degree ≤ 0})
h2 : p2 ∈ Subring.closure (insert X {f | f.degree ≤ 0})
⊢ p1 + p2 ∈ Subring.closure (insert X {f | f.degree ≤ 0})
state_after: no goals

tactic: intros n r hr
state_before: case refine_3
R : Type u_1
inst✝ : Ring R
p : R[X]
⊢ ∀ (n : ℕ) (a : R),
    C a * X ^ n ∈ Subring.closure (insert X {f | f.degree ≤ 0}) →
      C a * X ^ (n + 1) ∈ Subring.closure (insert X {f | f.degree ≤ 0})
state_after: case refine_3
R : Type u_1
inst✝ : Ring R
p : R[X]
n : ℕ
r : R
hr : C r * X ^ n ∈ Subring.closure (insert X {f | f.degree ≤ 0})
⊢ C r * X ^ (n + 1) ∈ Subring.closure (insert X {f | f.degree ≤ 0})

tactic: rw [pow_succ, ← mul_assoc]
state_before: case refine_3
R : Type u_1
inst✝ : Ring R
p : R[X]
n : ℕ
r : R
hr : C r * X ^ n ∈ Subring.closure (insert X {f | f.degree ≤ 0})
⊢ C r * X ^ (n + 1) ∈ Subring.closure (insert X {f | f.degree ≤ 0})
state_after: case refine_3
R : Type u_1
inst✝ : Ring R
p : R[X]
n : ℕ
r : R
hr : C r * X ^ n ∈ Subring.closure (insert X {f | f.degree ≤ 0})
⊢ C r * X ^ n * X ∈ Subring.closure (insert X {f | f.degree ≤ 0})

tactic: apply Subring.mul_mem _ hr
state_before: case refine_3
R : Type u_1
inst✝ : Ring R
p : R[X]
n : ℕ
r : R
hr : C r * X ^ n ∈ Subring.closure (insert X {f | f.degree ≤ 0})
⊢ C r * X ^ n * X ∈ Subring.closure (insert X {f | f.degree ≤ 0})
state_after: case refine_3
R : Type u_1
inst✝ : Ring R
p : R[X]
n : ℕ
r : R
hr : C r * X ^ n ∈ Subring.closure (insert X {f | f.degree ≤ 0})
⊢ X ∈ Subring.closure (insert X {f | f.degree ≤ 0})

tactic: apply Subring.subset_closure
state_before: case refine_3
R : Type u_1
inst✝ : Ring R
p : R[X]
n : ℕ
r : R
hr : C r * X ^ n ∈ Subring.closure (insert X {f | f.degree ≤ 0})
⊢ X ∈ Subring.closure (insert X {f | f.degree ≤ 0})
state_after: case refine_3.a
R : Type u_1
inst✝ : Ring R
p : R[X]
n : ℕ
r : R
hr : C r * X ^ n ∈ Subring.closure (insert X {f | f.degree ≤ 0})
⊢ X ∈ insert X {f | f.degree ≤ 0}

tactic: apply Set.mem_insert
state_before: case refine_3.a
R : Type u_1
inst✝ : Ring R
p : R[X]
n : ℕ
r : R
hr : C r * X ^ n ∈ Subring.closure (insert X {f | f.degree ≤ 0})
⊢ X ∈ insert X {f | f.degree ≤ 0}
state_after: no goals