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