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
- instDecidableIrrationalSqrtOfNatReal = decidable_of_iff' (¬IsSquare (OfNat.ofNat n)) ⋯
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.
Negation #
Subtraction of rational/integer/natural numbers #
Multiplication by rational numbers #
Inverse #
Division #
Natural and integer power #
Simplification lemmas about operations #
There is an irrational number r
between any two reals x < r < y
.