Documentation

Mathlib.RingTheory.Polynomial.Cyclotomic.Eval

Evaluating cyclotomic polynomials #

This file states some results about evaluating cyclotomic polynomials in various different ways.

Main definitions #

@[simp]
theorem Polynomial.eval_one_cyclotomic_prime {R : Type u_1} [CommRing R] {p : ℕ} [hn : Fact (Nat.Prime p)] :
eval 1 (cyclotomic p R) = ↑p
theorem Polynomial.eval₂_one_cyclotomic_prime {R : Type u_1} {S : Type u_2} [CommRing R] [Semiring S] (f : R →+* S) {p : ℕ} [Fact (Nat.Prime p)] :
eval₂ f 1 (cyclotomic p R) = ↑p
@[simp]
theorem Polynomial.eval_one_cyclotomic_prime_pow {R : Type u_1} [CommRing R] {p : ℕ} (k : ℕ) [hn : Fact (Nat.Prime p)] :
eval 1 (cyclotomic (p ^ (k + 1)) R) = ↑p
theorem Polynomial.eval₂_one_cyclotomic_prime_pow {R : Type u_1} {S : Type u_2} [CommRing R] [Semiring S] (f : R →+* S) {p : ℕ} (k : ℕ) [Fact (Nat.Prime p)] :
eval₂ f 1 (cyclotomic (p ^ (k + 1)) R) = ↑p
theorem Polynomial.cyclotomic_pos {n : ℕ} (hn : 2 < n) {R : Type u_1} [CommRing R] [LinearOrder R] [IsStrictOrderedRing R] (x : R) :
0 < eval x (cyclotomic n R)
theorem Polynomial.cyclotomic_pos_and_nonneg (n : ℕ) {R : Type u_1} [CommRing R] [LinearOrder R] [IsStrictOrderedRing R] (x : R) :
(1 < x → 0 < eval x (cyclotomic n R)) ∧ (1 ≤ x → 0 ≤ eval x (cyclotomic n R))
theorem Polynomial.cyclotomic_pos' (n : ℕ) {R : Type u_1} [CommRing R] [LinearOrder R] [IsStrictOrderedRing R] {x : R} (hx : 1 < x) :
0 < eval x (cyclotomic n R)

Cyclotomic polynomials are always positive on inputs larger than one. Similar to cyclotomic_pos but with the condition on the input rather than index of the cyclotomic polynomial.

theorem Polynomial.cyclotomic_nonneg (n : ℕ) {R : Type u_1} [CommRing R] [LinearOrder R] [IsStrictOrderedRing R] {x : R} (hx : 1 ≤ x) :
0 ≤ eval x (cyclotomic n R)

Cyclotomic polynomials are always nonnegative on inputs one or more.

theorem Polynomial.eval_one_cyclotomic_of_not_isPrimePow {R : Type u_1} [Ring R] {n : ℕ} (hn : n ≠ 1) (h : ¬IsPrimePow n) :
eval 1 (cyclotomic n R) = 1

The n-th cyclotomic polynomial takes the value 1 at 1 when n isn't a prime power (and isn't 1).

@[deprecated Polynomial.eval_one_cyclotomic_of_not_isPrimePow (since := "2026-10-27")]
theorem Polynomial.eval_one_cyclotomic_not_prime_pow {R : Type u_1} [Ring R] {n : ℕ} (h : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n) :
eval 1 (cyclotomic n R) = 1

The n-th cyclotomic polynomial takes the value 1 at 1 when n is not of the form p ^ k with p prime. See eval_one_cyclotomic_of_not_isPrimePow for a version using IsPrimePow.

theorem Polynomial.sub_one_pow_totient_lt_cyclotomic_eval {n : ℕ} {q : ℝ} (hn' : 2 ≤ n) (hq' : 1 < q) :
(q - 1) ^ n.totient < eval q (cyclotomic n ℝ)
theorem Polynomial.cyclotomic_eval_lt_add_one_pow_totient {n : ℕ} {q : ℝ} (hn' : 3 ≤ n) (hq' : 1 < q) :
eval q (cyclotomic n ℝ) < (q + 1) ^ n.totient
theorem Polynomial.sub_one_pow_totient_lt_natAbs_cyclotomic_eval {n q : ℕ} (hn' : 1 < n) (hq : q ≠ 1) :
(q - 1) ^ n.totient < (eval (↑q) (cyclotomic n ℤ)).natAbs
theorem Polynomial.sub_one_lt_natAbs_cyclotomic_eval {n q : ℕ} (hn' : 1 < n) (hq : q ≠ 1) :
q - 1 < (eval (↑q) (cyclotomic n ℤ)).natAbs

The element ζ - 1 is a unit precisely when the n-th cyclotomic polynomial takes a unit value at 1.

theorem IsPrimitiveRoot.isUnit_sub_one_of_not_isPrimePow {R : Type u_1} [CommRing R] [IsDomain R] {n : ℕ} {ζ : R} (hζ : IsPrimitiveRoot ζ n) (hn : 1 < n) (hn' : ¬IsPrimePow n) :
IsUnit (ζ - 1)

If the order of ζ is not a prime power, then ζ - 1 is a unit.

theorem IsPrimitiveRoot.isUnit_sub_one_iff_of_prime_pow {R : Type u_1} [CommRing R] [IsDomain R] {ζ : R} {p k : ℕ} [Fact (Nat.Prime p)] (hζ : IsPrimitiveRoot ζ (p ^ k)) (hk : k ≠ 0) :
IsUnit (ζ - 1) ↔ IsUnit ↑p

If the order of ζ is a power of the prime p, then ζ - 1 is a unit precisely when p is a unit in R.

theorem IsPrimitiveRoot.isUnit_sub_one_iff {R : Type u_1} [CommRing R] [IsDomain R] {n : ℕ} {ζ : R} [IsLocalHom (algebraMap ℤ R)] (hζ : IsPrimitiveRoot ζ n) (hn : 1 < n) :

If all prime numbers are not units in R, then ζ - 1 is a unit precisely when the order of ζ is not a prime power.