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_rat
, Irrational.rat_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 #
If x^n = m
is an integer and n
does not divide the multiplicity p m
, then x
is irrational.
This can be used as
unseal Nat.sqrt.iter in
example : Irrational √24 := by decide
Equations
Equations
Equations
- instDecidableIrrationalSqrtCastReal_1 z = decidable_of_iff' (¬IsSquare z ∧ 0 ≤ z) ⋯
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 #
Addition of rational/integer/natural numbers #
If x + y
is irrational, then at least one of x
and y
is irrational.
Alias of Irrational.of_ratCast_add
.
Alias of Irrational.ratCast_add
.
Alias of Irrational.of_add_ratCast
.
Alias of Irrational.add_ratCast
.
Alias of Irrational.of_intCast_add
.
Alias of Irrational.of_add_intCast
.
Alias of Irrational.intCast_add
.
Alias of Irrational.add_intCast
.
Alias of Irrational.of_natCast_add
.
Alias of Irrational.of_add_natCast
.
Alias of Irrational.natCast_add
.
Alias of Irrational.add_natCast
.
Negation #
Subtraction of rational/integer/natural numbers #
Alias of Irrational.sub_ratCast
.
Alias of Irrational.ratCast_sub
.
Alias of Irrational.of_sub_ratCast
.
Alias of Irrational.of_ratCast_sub
.
Alias of Irrational.sub_intCast
.
Alias of Irrational.intCast_sub
.
Alias of Irrational.of_sub_intCast
.
Alias of Irrational.of_intCast_sub
.
Alias of Irrational.sub_natCast
.
Alias of Irrational.natCast_sub
.
Alias of Irrational.of_sub_natCast
.
Alias of Irrational.of_natCast_sub
.
Multiplication by rational numbers #
Alias of Irrational.of_mul_ratCast
.
Alias of Irrational.mul_ratCast
.
Alias of Irrational.of_ratCast_mul
.
Alias of Irrational.ratCast_mul
.
Alias of Irrational.of_mul_intCast
.
Alias of Irrational.of_intCast_mul
.
Alias of Irrational.mul_intCast
.
Alias of Irrational.intCast_mul
.
Alias of Irrational.of_mul_natCast
.
Alias of Irrational.of_natCast_mul
.
Alias of Irrational.mul_natCast
.
Alias of Irrational.natCast_mul
.
Inverse #
Division #
Alias of Irrational.of_ratCast_div
.
Alias of Irrational.of_div_ratCast
.
Alias of Irrational.ratCast_div
.
Alias of Irrational.div_ratCast
.
Alias of Irrational.of_intCast_div
.
Alias of Irrational.of_div_intCast
.
Alias of Irrational.intCast_div
.
Alias of Irrational.div_intCast
.
Alias of Irrational.of_natCast_div
.
Alias of Irrational.of_div_natCast
.
Alias of Irrational.natCast_div
.
Alias of Irrational.div_natCast
.
Natural and integer power #
Simplification lemmas about operations #
Alias of irrational_ratCast_add_iff
.
Alias of irrational_intCast_add_iff
.
Alias of irrational_natCast_add_iff
.
Alias of irrational_add_ratCast_iff
.
Alias of irrational_add_intCast_iff
.
Alias of irrational_add_natCast_iff
.
Alias of irrational_ratCast_sub_iff
.
Alias of irrational_intCast_sub_iff
.
Alias of irrational_natCast_sub_iff
.
Alias of irrational_sub_ratCast_iff
.
Alias of irrational_sub_intCast_iff
.
Alias of irrational_sub_natCast_iff
.
Alias of irrational_ratCast_mul_iff
.
Alias of irrational_mul_ratCast_iff
.
Alias of irrational_intCast_mul_iff
.
Alias of irrational_mul_intCast_iff
.
Alias of irrational_natCast_mul_iff
.
Alias of irrational_mul_natCast_iff
.
Alias of irrational_ratCast_div_iff
.
Alias of irrational_div_ratCast_iff
.
Alias of irrational_intCast_div_iff
.
Alias of irrational_div_intCast_iff
.
Alias of irrational_natCast_div_iff
.
Alias of irrational_div_natCast_iff
.
There is an irrational number r
between any two reals x < r < y
.