2023-05-15 01:32:18 +00:00
|
|
|
|
import Mathlib.Data.Real.Basic
|
2023-04-21 13:17:21 +00:00
|
|
|
|
|
2023-05-08 19:37:02 +00:00
|
|
|
|
/-! # Common.Real.Rational
|
2023-05-04 22:37:54 +00:00
|
|
|
|
|
|
|
|
|
Additional theorems and definitions useful in the context of rational numbers.
|
|
|
|
|
Most of these will likely be deleted once the corresponding functions in
|
|
|
|
|
`Mathlib` are ported to Lean 4.
|
|
|
|
|
-/
|
|
|
|
|
|
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.
|
|
|
|
|
-/
|
2023-05-02 17:29:42 +00:00
|
|
|
|
def rational (x : ℝ) := ¬ irrational x
|