Theorem: _private.Mathlib.RingTheory.Polynomial.Cyclotomic.Eval.0.Polynomial.cyclotomic_neg_one_pos
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean

Proof steps:
state_before: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
⊢ 0 < eval (-1) (cyclotomic n R)
state_after: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
⊢ 0 < eval (-1) (cyclotomic n R)
tactic: haveI := NeZero.of_gt hn
state_before: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
⊢ 0 < eval (-1) (cyclotomic n R)
state_after: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
⊢ 0 < eval (↑(-1)) (cyclotomic n ℤ)
tactic: rw [← map_cyclotomic_int, ← Int.cast_one, ← Int.cast_neg, eval_intCast_map, Int.coe_castRingHom,
    Int.cast_pos]
state_before: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
⊢ 0 < eval (↑(-1)) (cyclotomic n ℤ)
state_after: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
⊢ 0 < eval (↑(-1)) (cyclotomic n ℝ)
tactic: suffices 0 < eval (↑(-1 : ℤ)) (cyclotomic n ℝ) by
    rw [← map_cyclotomic_int n ℝ, eval_intCast_map, Int.coe_castRingHom] at this
    simpa only [Int.cast_pos] using this
state_before: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
⊢ 0 < eval (↑(-1)) (cyclotomic n ℝ)
state_after: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
⊢ 0 < eval (-1) (cyclotomic n ℝ)
tactic: simp only [Int.cast_one, Int.cast_neg]
state_before: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
⊢ 0 < eval (-1) (cyclotomic n ℝ)
state_after: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
h0 : (cyclotomic n ℝ).coeff 0 = 1
⊢ 0 < eval (-1) (cyclotomic n ℝ)
tactic: have h0 := cyclotomic_coeff_zero ℝ hn.le
state_before: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
h0 : (cyclotomic n ℝ).coeff 0 = 1
⊢ 0 < eval (-1) (cyclotomic n ℝ)
state_after: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
h0 : eval 0 (cyclotomic n ℝ) = 1
⊢ 0 < eval (-1) (cyclotomic n ℝ)
tactic: rw [coeff_zero_eq_eval_zero] at h0
state_before: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
h0 : eval 0 (cyclotomic n ℝ) = 1
⊢ 0 < eval (-1) (cyclotomic n ℝ)
state_after: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
h0 : eval 0 (cyclotomic n ℝ) = 1
hx : eval (-1) (cyclotomic n ℝ) ≤ 0
⊢ False
tactic: by_contra! hx
state_before: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this : NeZero n
h0 : eval 0 (cyclotomic n ℝ) = 1
hx : eval (-1) (cyclotomic n ℝ) ≤ 0
⊢ False
state_after: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this✝ : NeZero n
h0 : eval 0 (cyclotomic n ℝ) = 1
hx : eval (-1) (cyclotomic n ℝ) ≤ 0
this : Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ)) ⊆ Set.range fun x => eval x (cyclotomic n ℝ)
⊢ False
tactic: have := intermediate_value_univ (-1) 0 (cyclotomic n ℝ).continuous
state_before: n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this✝ : NeZero n
h0 : eval 0 (cyclotomic n ℝ) = 1
hx : eval (-1) (cyclotomic n ℝ) ≤ 0
this : Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ)) ⊆ Set.range fun x => eval x (cyclotomic n ℝ)
⊢ False
state_after: case intro
n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this✝ : NeZero n
h0 : eval 0 (cyclotomic n ℝ) = 1
hx : eval (-1) (cyclotomic n ℝ) ≤ 0
this : Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ)) ⊆ Set.range fun x => eval x (cyclotomic n ℝ)
y : ℝ
hy : (cyclotomic n ℝ).IsRoot y
⊢ False
tactic: obtain ⟨y, hy : IsRoot _ y⟩ := this (show (0 : ℝ) ∈ Set.Icc _ _ by simpa [h0] using hx)
state_before: case intro
n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this✝ : NeZero n
h0 : eval 0 (cyclotomic n ℝ) = 1
hx : eval (-1) (cyclotomic n ℝ) ≤ 0
this : Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ)) ⊆ Set.range fun x => eval x (cyclotomic n ℝ)
y : ℝ
hy : (cyclotomic n ℝ).IsRoot y
⊢ False
state_after: case intro
n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this✝ : NeZero n
h0 : eval 0 (cyclotomic n ℝ) = 1
hx : eval (-1) (cyclotomic n ℝ) ≤ 0
this : Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ)) ⊆ Set.range fun x => eval x (cyclotomic n ℝ)
y : ℝ
hy : IsPrimitiveRoot y n
⊢ False
tactic: rw [@isRoot_cyclotomic_iff] at hy
state_before: case intro
n : ℕ
hn : 2 < n
R : Type u_1
inst✝ : LinearOrderedCommRing R
this✝ : NeZero n
h0 : eval 0 (cyclotomic n ℝ) = 1
hx : eval (-1) (cyclotomic n ℝ) ≤ 0
this : Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ)) ⊆ Set.range fun x => eval x (cyclotomic n ℝ)
y : ℝ
hy : IsPrimitiveRoot y n
⊢ False
state_after: case intro
n : ℕ
R : Type u_1
inst✝ : LinearOrderedCommRing R
this✝ : NeZero n
h0 : eval 0 (cyclotomic n ℝ) = 1
hx : eval (-1) (cyclotomic n ℝ) ≤ 0
this : Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ)) ⊆ Set.range fun x => eval x (cyclotomic n ℝ)
y : ℝ
hn : 2 < orderOf y
hy : IsPrimitiveRoot y n
⊢ False
tactic: rw [hy.eq_orderOf] at hn
state_before: case intro
n : ℕ
R : Type u_1
inst✝ : LinearOrderedCommRing R
this✝ : NeZero n
h0 : eval 0 (cyclotomic n ℝ) = 1
hx : eval (-1) (cyclotomic n ℝ) ≤ 0
this : Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ)) ⊆ Set.range fun x => eval x (cyclotomic n ℝ)
y : ℝ
hn : 2 < orderOf y
hy : IsPrimitiveRoot y n
⊢ False
state_after: no goals
tactic: exact hn.not_le LinearOrderedRing.orderOf_le_two