The areas / V12. Number theory
Mathlib.NumberTheory.Niven
19 declarations. Mathlib docs · Source
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}.
theorem Complex.exp_rat_mul_pi_mul_I_pow_two_mul_den E1 #
∀ (q : ℚ), Complex.exp (↑q * ↑Real.pi * Complex.I) ^ (2 * q.den) = 1
theorem Complex.isIntegral_exp_rat_mul_pi_mul_I E1 #
∀ (q : ℚ), IsIntegral ℤ (Complex.exp (↑q * ↑Real.pi * Complex.I))
exp(q * π * I) for q : ℚ is integral over ℤ.
theorem Complex.isIntegral_exp_neg_rat_mul_pi_mul_I E1 #
∀ (q : ℚ), IsIntegral ℤ (Complex.exp (-(↑q * ↑Real.pi) * Complex.I))
exp(-(q * π) * I) for q : ℚ is integral over ℤ.
theorem Complex.isIntegral_two_mul_sin_rat_mul_pi E1 #
∀ (q : ℚ), IsIntegral ℤ (2 * Complex.sin (↑q * ↑Real.pi))
2 sin(q * π) for q : ℚ is integral over ℤ, using the complex sin function.
theorem Complex.isIntegral_two_mul_cos_rat_mul_pi E1 #
∀ (q : ℚ), IsIntegral ℤ (2 * Complex.cos (↑q * ↑Real.pi))
2 cos(q * π) for q : ℚ is integral over ℤ, using the complex cos function.
theorem Complex.isAlgebraic_sin_rat_mul_pi E1 #
∀ (q : ℚ), IsAlgebraic ℤ (Complex.sin (↑q * ↑Real.pi))
sin(q * π) for q : ℚ is algebraic over ℤ, using the complex sin function.
theorem Complex.isAlgebraic_cos_rat_mul_pi E1 #
∀ (q : ℚ), IsAlgebraic ℤ (Complex.cos (↑q * ↑Real.pi))
cos(q * π) for q : ℚ is algebraic over ℤ, using the complex cos function.
theorem Complex.isAlgebraic_tan_rat_mul_pi E1 #
∀ (q : ℚ), IsAlgebraic ℤ (Complex.tan (↑q * ↑Real.pi))
tan(q * π) for q : ℚ is algebraic over ℤ, using the complex tan function.
theorem Real.isIntegral_two_mul_sin_rat_mul_pi E1 #
∀ (q : ℚ), IsIntegral ℤ (2 * Real.sin (↑q * Real.pi))
2 sin(q * π) for q : ℚ is integral over ℤ, using the real sin function.
theorem Real.isIntegral_two_mul_cos_rat_mul_pi E1 #
∀ (q : ℚ), IsIntegral ℤ (2 * Real.cos (↑q * Real.pi))
2 cos(q * π) for q : ℚ is integral over ℤ, using the real cos function.
theorem Real.isAlgebraic_sin_rat_mul_pi E1 #
∀ (q : ℚ), IsAlgebraic ℤ (Real.sin (↑q * Real.pi))
sin(q * π) for q : ℚ is algebraic over ℤ, using the real sin function.
theorem Real.isAlgebraic_cos_rat_mul_pi E1 #
∀ (q : ℚ), IsAlgebraic ℤ (Real.cos (↑q * Real.pi))
cos(q * π) for q : ℚ is algebraic over ℤ, using the real cos function.
theorem Real.isAlgebraic_tan_rat_mul_pi E1 #
∀ (q : ℚ), IsAlgebraic ℤ (Real.tan (↑q * Real.pi))
tan(q * π) for q : ℚ is algebraic over ℤ, using the real tan function.
theorem niven E3 #
∀ {θ : ℝ}, (∃ r, θ = ↑r * Real.pi) → (∃ 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 E2 #
∀ {θ : ℝ}, (∃ r, θ = ↑r * Real.pi) → (∃ 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 E0 #
∀ {θ : ℝ},
(∃ r, θ = ↑r * Real.pi) →
(∃ q, Real.cos θ = ↑q) → θ ∈ Set.Icc 0 Real.pi → θ ∈ {0, Real.pi / 3, Real.pi / 2, Real.pi * (2 / 3), Real.pi}
Niven's theorem, giving the possible angles for θ in the range 0 .. π.
theorem niven_angle_div_pi_eq E0 #
∀ {r : ℚ}, (∃ q, Real.cos (↑r * Real.pi) = ↑q) → r ∈ Set.Icc 0 1 → r ∈ {0, 1 / 3, 1 / 2, 2 / 3, 1}
theorem niven_fract_angle_div_pi_eq E0 #
∀ {r : ℚ}, (∃ q, Real.cos (↑r * Real.pi) = ↑q) → Int.fract r ∈ {0, 1 / 3, 1 / 2, 2 / 3}
theorem irrational_cos_rat_mul_pi E1 #
∀ {r : ℚ}, 3 < r.den → Irrational (Real.cos (↑r * Real.pi))