Theorem: Polynomial.eval_divByMonic_pow_rootMultiplicity_ne_zero
File: Mathlib/Data/Polynomial/Div.lean

tactic: haveI : Nontrivial R := Nontrivial.of_polynomial_ne hp
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
hp : p ≠ 0
⊢ eval a (p /ₘ (X - ↑C a) ^ rootMultiplicity a p) ≠ 0

tactic: rw [Ne.def, ← IsRoot.def, ← dvd_iff_isRoot]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
hp : p ≠ 0
this : Nontrivial R
⊢ eval a (p /ₘ (X - ↑C a) ^ rootMultiplicity a p) ≠ 0

tactic: rintro ⟨q, hq⟩
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
a : R
hp : p ≠ 0
this : Nontrivial R
⊢ ¬X - ↑C a ∣ p /ₘ (X - ↑C a) ^ rootMultiplicity a p

tactic: have := divByMonic_mul_pow_rootMultiplicity_eq p a
state_before: case intro
R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q✝ p : R[X]
a : R
hp : p ≠ 0
this : Nontrivial R
q : R[X]
hq : p /ₘ (X - ↑C a) ^ rootMultiplicity a p = (X - ↑C a) * q
⊢ False

tactic: rw [mul_comm, hq, ← mul_assoc, ← pow_succ', rootMultiplicity_eq_multiplicity, dif_neg hp] at this
state_before: case intro
R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q✝ p : R[X]
a : R
hp : p ≠ 0
this✝ : Nontrivial R
q : R[X]
hq : p /ₘ (X - ↑C a) ^ rootMultiplicity a p = (X - ↑C a) * q
this : p /ₘ (X - ↑C a) ^ rootMultiplicity a p * (X - ↑C a) ^ rootMultiplicity a p = p
⊢ False

tactic: exact
  multiplicity.is_greatest'
    (multiplicity_finite_of_degree_pos_of_monic
      (show (0 : WithBot ℕ) < degree (X - C a) by rw [degree_X_sub_C]; exact by decide)
      (monic_X_sub_C _) hp)
    (Nat.lt_succ_self _) (dvd_of_mul_right_eq _ this)
state_before: case intro
R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q✝ p : R[X]
a : R
hp : p ≠ 0
this✝ : Nontrivial R
q : R[X]
hq : p /ₘ (X - ↑C a) ^ rootMultiplicity a p = (X - ↑C a) * q
this : (X - ↑C a) ^ (Part.get (multiplicity (X - ↑C a) p) (_ : multiplicity.Finite (X - ↑C a) p) + 1) * q = p
⊢ False

tactic: rw [degree_X_sub_C]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q✝ p : R[X]
a : R
hp : p ≠ 0
this✝ : Nontrivial R
q : R[X]
hq : p /ₘ (X - ↑C a) ^ rootMultiplicity a p = (X - ↑C a) * q
this : (X - ↑C a) ^ (Part.get (multiplicity (X - ↑C a) p) (_ : multiplicity.Finite (X - ↑C a) p) + 1) * q = p
⊢ 0 < degree (X - ↑C a)

tactic: exact by decide
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q✝ p : R[X]
a : R
hp : p ≠ 0
this✝ : Nontrivial R
q : R[X]
hq : p /ₘ (X - ↑C a) ^ rootMultiplicity a p = (X - ↑C a) * q
this : (X - ↑C a) ^ (Part.get (multiplicity (X - ↑C a) p) (_ : multiplicity.Finite (X - ↑C a) p) + 1) * q = p
⊢ 0 < 1

tactic: decide
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : CommRing R
p✝ q✝ p : R[X]
a : R
hp : p ≠ 0
this✝ : Nontrivial R
q : R[X]
hq : p /ₘ (X - ↑C a) ^ rootMultiplicity a p = (X - ↑C a) * q
this : (X - ↑C a) ^ (Part.get (multiplicity (X - ↑C a) p) (_ : multiplicity.Finite (X - ↑C a) p) + 1) * q = p
⊢ 0 < 1