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 Rat.cast)
Instances For
A transcendental real number is irrational.
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)]
(hxr : x ^ n = ↑m)
(hv : (multiplicity (↑p) m).get (_ : multiplicity.Finite (↑p) m) % n ≠ 0)
:
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)]
(Hpv : (multiplicity (↑p) m).get (_ : multiplicity.Finite (↑p) m) % 2 = 1)
:
Irrational (Real.sqrt ↑m)
Dot-style operations on Irrational
#
Coercion of a rational/integer/natural number is not irrational #
Irrational number is not equal to a rational/integer/natural number #
Addition of rational/integer/natural numbers #
If x + y
is irrational, then at least one of x
and y
is irrational.
Negation #
Subtraction of rational/integer/natural numbers #
Multiplication by rational numbers #
Inverse #
Division #
Natural and integer power #
theorem
one_lt_natDegree_of_irrational_root
(x : ℝ)
(p : Polynomial ℤ)
(hx : Irrational x)
(p_nonzero : p ≠ 0)
(x_is_root : (Polynomial.aeval x) p = 0)
:
Simplification lemmas about operations #
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]