Irrational real numbers
In this file we define a predicate irrational
on ℝ
, prove that the n
-th root of an integer
number is irrational if it is not integer, and that sqrt q
is irrational if and only if
rat.sqrt q * rat.sqrt q ≠ q ∧ 0 ≤ q
.
We also provide dot-style constructors like irrational.add_rat
, irrational.rat_sub
etc.
A real number is irrational if it is not equal to any rational number.
Equations
- irrational x = (x ∉ set.range coe)
Irrationality of roots of integer and rational numbers
theorem
irrational_nrt_of_n_not_dvd_multiplicity
{x : ℝ}
(n : ℕ)
{m : ℤ}
(hm : m ≠ 0)
(p : ℕ)
[hp : fact (nat.prime p)] :
x ^ n = ↑m → (multiplicity ↑p m).get _ % n ≠ 0 → irrational x
If x^n = m
is an integer and n
does not divide the multiplicity p m
, then x
is irrational.
theorem
irrational_sqrt_of_multiplicity_odd
(m : ℤ)
(hm : 0 < m)
(p : ℕ)
[hp : fact (nat.prime p)] :
(multiplicity ↑p m).get _ % 2 = 1 → irrational (real.sqrt ↑m)
@[instance]
Equations
- irrational.decidable q = decidable_of_iff' (rat.sqrt q * rat.sqrt q ≠ q ∧ 0 ≤ q) _