Skip to main content

Posts about Real numbers

If (∀ ε > 0, y ≤ x + ε), then y ≤ x

Let \(x, y ∈ ℝ\). Prove that \[ (∀ ε > 0, y ≤ x + ε) → y ≤ x \]

To do this, complete the following Lean4 theory:

import Mathlib.Data.Real.Basic
import Mathlib.Tactic

variable {x y : ℝ}

example :
  (∀ ε > 0, y ≤ x + ε) → y ≤ x :=
by sorry

Read more…

If x is the supremum of set A, then ((∀ y)[y < x → (∃ a ∈ A)[y < a]]

In Lean4, one can define that \(x\) is an upper bound of \(A\) by

   def is_upper_bound (A : Set ℝ) (x : ℝ) :=
     ∀ a ∈ A, a ≤ x

and \(x\) is supremum of \(A\) by

   def is_supremum (A : Set ℝ) (x : ℝ) :=
     is_upper_bound A x ∧ ∀ y, is_upper_bound A y → x ≤ y

Prove that if \(x\) is the supremum of \(A\), then \[ (∀ y)[y < x → (∃ a ∈ A)[y < a]] \]

To do this, complete the following Lean4 theory:

import Mathlib.Data.Real.Basic
variable {A : Set ℝ}
variable {x : ℝ}

def is_upper_bound (A : Set ℝ) (x : ℝ) :=
  ∀ a ∈ A, a ≤ x

def is_supremum (A : Set ℝ) (x : ℝ) :=
  is_upper_bound A x ∧ ∀ y, is_upper_bound A y → x ≤ y

example
  (hx : is_supremum A x)
  : ∀ y, y < x → ∃ a ∈ A, y < a :=
by sorry

Read more…