Theorem: Polynomial.cyclotomic_pos
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean

Proof steps:
state_before: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
⊢ 0 < eval x (cyclotomic n R)
state_after: case h
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
⊢ 0 < eval x (cyclotomic n R)
tactic: induction' n using Nat.strong_induction_on with n ih
state_before: case h
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
⊢ 0 < eval x (cyclotomic n R)
state_after: case h
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
hn' : 0 < n
⊢ 0 < eval x (cyclotomic n R)
tactic: have hn' : 0 < n := pos_of_gt hn
state_before: case h
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
hn' : 0 < n
⊢ 0 < eval x (cyclotomic n R)
state_after: case h
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
hn' : 0 < n
hn'' : 1 < n
⊢ 0 < eval x (cyclotomic n R)
tactic: have hn'' : 1 < n := one_lt_two.trans hn
state_before: case h
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
hn' : 0 < n
hn'' : 1 < n
⊢ 0 < eval x (cyclotomic n R)
state_after: case h
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
hn' : 0 < n
hn'' : 1 < n
this : ∏ i ∈ n.divisors.erase 1, cyclotomic i R = ∑ i ∈ range n, X ^ i
⊢ 0 < eval x (cyclotomic n R)
tactic: have := prod_cyclotomic_eq_geom_sum hn' R
state_before: case h
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
hn' : 0 < n
hn'' : 1 < n
this : ∏ i ∈ n.divisors.erase 1, cyclotomic i R = ∑ i ∈ range n, X ^ i
⊢ 0 < eval x (cyclotomic n R)
state_after: case h
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
hn' : 0 < n
hn'' : 1 < n
this : eval x (∏ i ∈ n.divisors.erase 1, cyclotomic i R) = eval x (∑ i ∈ range n, X ^ i)
⊢ 0 < eval x (cyclotomic n R)
tactic: apply_fun eval x at this
state_before: case h
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
hn' : 0 < n
hn'' : 1 < n
this : eval x (∏ i ∈ n.divisors.erase 1, cyclotomic i R) = eval x (∑ i ∈ range n, X ^ i)
⊢ 0 < eval x (cyclotomic n R)
state_after: case h
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
hn' : 0 < n
hn'' : 1 < n
this : eval x (cyclotomic n R) * eval x (∏ x ∈ n.properDivisors.erase 1, cyclotomic x R) = ∑ i ∈ range n, x ^ i
⊢ 0 < eval x (cyclotomic n R)
tactic: rw [← cons_self_properDivisors hn'.ne', Finset.erase_cons_of_ne _ hn''.ne', Finset.prod_cons,
    eval_mul, eval_geom_sum] at this
state_before: case h
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
hn' : 0 < n
hn'' : 1 < n
this : eval x (cyclotomic n R) * eval x (∏ x ∈ n.properDivisors.erase 1, cyclotomic x R) = ∑ i ∈ range n, x ^ i
⊢ 0 < eval x (cyclotomic n R)
state_after: case h.inl
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
hn' : 0 < n
hn'' : 1 < n
this : eval x (cyclotomic n R) * eval x (∏ x ∈ n.properDivisors.erase 1, cyclotomic x R) = ∑ i ∈ range n, x ^ i
h : 0 < ∑ i ∈ range n, x ^ i
⊢ 0 < eval x (cyclotomic n R)

case h.inr.inl
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
hn' : 0 < n
hn'' : 1 < n
this : eval x (cyclotomic n R) * eval x (∏ x ∈ n.properDivisors.erase 1, cyclotomic x R) = ∑ i ∈ range n, x ^ i
h : 0 = ∑ i ∈ range n, x ^ i
⊢ 0 < eval x (cyclotomic n R)

case h.inr.inr
R : Type u_1
inst✝ : LinearOrderedCommRing R
x : R
n : ℕ
ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R)
hn : 2 < n
hn' : 0 < n
hn'' : 1 < n
this : eval x (cyclotomic n R) * eval x (∏ x ∈ n.properDivisors.erase 1, cyclotomic x R) = ∑ i ∈ range n, x ^ i
h : ∑ i ∈ range n, x ^ i < 0
⊢ 0 < eval x (cyclotomic n R)
tactic: rcases lt_trichotomy 0 (∑ i ∈ Finset.range n, x ^ i) with (h | h | h)