bookshelf/shared/Bookshelf/Real/Rational.lean

14 lines
396 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import Bookshelf.Real.Basic
/--
Assert that a real number is rational.
Note this does *not* require the found rational to be in reduced form. Members
of `` expect this (by proving the numerator and denominator are coprime).
-/
def rational (x : ) := ∃ a : , ∃ b : , b ≠ 0 ∧ x = a / b
/--
Assert that a real number is irrational.
-/
def irrational (x : ) := ¬ rational x