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 √(q : ℚ) is irrational if and only if
¬IsSquare q ∧ 0 ≤ q.
We also provide dot-style constructors like Irrational.add_ratCast, Irrational.ratCast_sub etc.
With the Decidable instances in this file, is possible to prove Irrational √n using decide,
when n is a numeric literal or cast;
but this only works if you unseal Nat.sqrt.iter in before the theorem where you use this proof.
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 % 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 % 2 = 1)
:
Irrational √↑m
@[implicit_reducible]
instance
instDecidableIrrationalSqrtOfNatReal
{n : ℕ}
[n.AtLeastTwo]
:
Decidable (Irrational √(OfNat.ofNat n))
This can be used as
unseal Nat.sqrt.iter in
example : Irrational √24 := by decide
Equations
@[implicit_reducible]
Equations
@[implicit_reducible]
Equations
- instDecidableIrrationalSqrtCastReal_1 z = decidable_of_iff' (¬IsSquare z ∧ 0 ≤ z) ⋯
@[implicit_reducible]
Equations
- instDecidableIrrationalSqrtCastReal_2 q = decidable_of_iff' (¬IsSquare q ∧ 0 ≤ q) ⋯
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 #
@[simp]
Addition of rational/integer/natural numbers #
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]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]