2023-04-21 13:17:21 +00:00
|
|
|
|
import Bookshelf.Real.Basic
|
|
|
|
|
|
2023-05-02 17:29:42 +00:00
|
|
|
|
/--
|
|
|
|
|
Assert that a real number is irrational.
|
|
|
|
|
-/
|
|
|
|
|
def irrational (x : ℝ) := x ∉ Set.range RatCast.ratCast
|
|
|
|
|
|
2023-04-21 13:17:21 +00:00
|
|
|
|
/--
|
|
|
|
|
Assert that a real number is rational.
|
|
|
|
|
|
|
|
|
|
Note this does *not* require the found rational to be in reduced form. Members
|
2023-04-22 19:11:50 +00:00
|
|
|
|
of `ℚ` expect this (by proving the numerator and denominator are co-prime).
|
2023-04-21 13:17:21 +00:00
|
|
|
|
-/
|
2023-05-02 17:29:42 +00:00
|
|
|
|
def rational (x : ℝ) := ¬ irrational x
|