Fix up (ir)rational definition and point/line segment set definitions.

finite-set-exercises
Joshua Potter 2023-05-02 11:29:42 -06:00
parent 6d03a9383a
commit fcbd510dbe
3 changed files with 9 additions and 11 deletions

View File

@ -1,14 +1,14 @@
import Bookshelf.Real.Basic
/--
Assert that a real number is irrational.
-/
def irrational (x : ) := x ∉ Set.range RatCast.ratCast
/--
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 co-prime).
-/
def rational (x : ) := ∃ a : , ∃ b : , b ≠ 0 ∧ x = a / b
/--
Assert that a real number is irrational.
-/
def irrational (x : ) := ¬ rational x
def rational (x : ) := ¬ irrational x

View File

@ -112,7 +112,7 @@ example (x y : ) (h : x < y) : ∃ r : , x < r ∧ r < y := by
-- ========================================
example (x : ) (hx : x ≠ 0) (y : ) (hy : irrational y)
: irrational (x + y) := by
: irrational (x + y) :=
sorry
example (x : ) (hx : x ≠ 0) (y : ) (hy : irrational y)

View File

@ -70,8 +70,7 @@ namespace Point
/--
A `Point` is the set consisting of just itself.
-/
def set_def (p : Point) : Set ℝ² :=
{ x : ℝ² | x = p.val.top_left }
def set_def (p : Point) : Set ℝ² := p.val.set_def
/--
The width of a `Point` is `0`.
@ -106,8 +105,7 @@ namespace LineSegment
A `LineSegment` `s` is the set of points corresponding to the shortest line
segment joining the two distinct points of `s`.
-/
def set_def (s : LineSegment) : Set ℝ² :=
sorry
def set_def (s : LineSegment) : Set ℝ² := s.val.set_def
/--
Either the width or height of a `LineSegment` is zero.