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_sqrt_of_multiplicity_odd
(m : ℤ)
(hm : 0 < m)
(p : ℕ)
[hp : fact (nat.prime p)]
(Hpv : (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) _