Documentation

Mathlib.NumberTheory.Niven

Niven's Theorem #

This file proves Niven's theorem, stating that the only rational angles in degrees which also have rational cosines, are 0, 30 degrees, and 90 degrees - up to reflection and shifts by π. Equivalently, the only rational numbers that occur as cos(π * p / q) are the five values {-1, -1/2, 0, 1/2, 1}.

@[simp]
theorem IsIntegral.ratCast_iff {α : Type u_1} [DivisionRing α] [CharZero α] {q : ℚ} :
theorem IsIntegral.exists_int_iff_exists_rat {α : Type u_1} [DivisionRing α] [CharZero α] {x : α} (h₁ : IsIntegral ℤ x) :
(∃ (q : ℚ), x = ↑q) ↔ ∃ (k : ℤ), x = ↑k

exp(q * π * I) for q : ℚ is integral over ℤ.

exp(-(q * π) * I) for q : ℚ is integral over ℤ.

2 sin(q * π) for q : ℚ is integral over ℤ, using the complex sin function.

2 cos(q * π) for q : ℚ is integral over ℤ, using the complex cos function.

sin(q * π) for q : ℚ is algebraic over ℤ, using the complex sin function.

cos(q * π) for q : ℚ is algebraic over ℤ, using the complex cos function.

tan(q * π) for q : ℚ is algebraic over ℤ, using the complex tan function.

2 sin(q * π) for q : ℚ is integral over ℤ, using the real sin function.

2 cos(q * π) for q : ℚ is integral over ℤ, using the real cos function.

sin(q * π) for q : ℚ is algebraic over ℤ, using the real sin function.

cos(q * π) for q : ℚ is algebraic over ℤ, using the real cos function.

tan(q * π) for q : ℚ is algebraic over ℤ, using the real tan function.

theorem niven {θ : ℝ} (hθ : ∃ (r : ℚ), θ = ↑r * Real.pi) (hcos : ∃ (q : ℚ), Real.cos θ = ↑q) :
Real.cos θ ∈ {-1, -1 / 2, 0, 1 / 2, 1}

Niven's theorem: The only rational values of cos that occur at rational multiples of π are {-1, -1/2, 0, 1/2, 1}.

theorem niven_sin {θ : ℝ} (hθ : ∃ (r : ℚ), θ = ↑r * Real.pi) (hcos : ∃ (q : ℚ), Real.sin θ = ↑q) :
Real.sin θ ∈ {-1, -1 / 2, 0, 1 / 2, 1}

Niven's theorem, but stated for sin instead of cos.

theorem niven_angle_eq {θ : ℝ} (hθ : ∃ (r : ℚ), θ = ↑r * Real.pi) (hcos : ∃ (q : ℚ), Real.cos θ = ↑q) (h_bnd : θ ∈ Set.Icc 0 Real.pi) :

Niven's theorem, giving the possible angles for θ in the range 0 .. π.

theorem niven_angle_div_pi_eq {r : ℚ} (hcos : ∃ (q : ℚ), Real.cos (↑r * Real.pi) = ↑q) (h_bnd : r ∈ Set.Icc 0 1) :
r ∈ {0, 1 / 3, 1 / 2, 2 / 3, 1}
theorem niven_fract_angle_div_pi_eq {r : ℚ} (hcos : ∃ (q : ℚ), Real.cos (↑r * Real.pi) = ↑q) :
Int.fract r ∈ {0, 1 / 3, 1 / 2, 2 / 3}