Documentation

Books.IntroductiontoRealAnalysisVolumeI_JiriLebl_2025.Chapters.Chap01.section02

theorem real_exists_complete_ordered_field :
∃ (R : Type) (hF : Field R) (hL : LinearOrder R) (hS : IsStrictOrderedRing R), let x := hF; let x_1 := hL; have x_2 := hS; (∀ {E : Set R}, E.NonemptyBddAbove E∃ (supE : R), IsLUB E supE) Function.Injective fun (q : ) => q

Theorem 1.2.1: There exists an ordered field with the least-upper-bound property containing the rationals ; such a structure is unique up to an order-preserving field isomorphism.

Any two ordered fields with the least-upper-bound property that contain the rationals are isomorphic as ordered fields.

theorem real_le_zero_of_le_pos {x : } (h : ε > 0, x ε) :
x 0

Proposition 1.2.2: If a real number x satisfies x ≤ ε for every ε > 0, then x ≤ 0.

theorem exists_unique_pos_sq_eq_two :
∃! r : , 0 < r r ^ 2 = 2

Example 1.2.3: There exists a unique positive real number r such that r ^ 2 = 2; this number is denoted √2.

noncomputable def sqrtTwo :

The book's notation √2 realized via the mathlib square root.

Equations
Instances For

    The element sqrtTwo is positive and squares to 2, matching the defining property of √2.

    theorem sqrtTwo_unique {r : } (hr : 0 < r r ^ 2 = 2) :

    Uniqueness of the positive square root of 2.

    theorem archimedean_and_rat_dense :
    (∀ (x y : ), 0 < x∃ (n : ), n * x > y) ∀ (x y : ), x < y∃ (r : ), x < r r < y

    Theorem 1.2.4: (i) (Archimedean property) If x, y ∈ ℝ with x > 0, then there exists n ∈ ℕ such that n * x > y. (ii) ( is dense in ) If x, y ∈ ℝ with x < y, then there exists r ∈ ℚ such that x < r < y.

    theorem inf_nat_inv_eq_zero :
    sInf (Set.range fun (n : ) => 1 / n.succ) = 0

    Corollary 1.2.5: The infimum of the set {1 / n : n ∈ ℕ} is 0.

    theorem sup_inf_arithmetic {A : Set } (hA : A.Nonempty) :
    (∀ (x : ), BddAbove AsSup ((fun (a : ) => x + a) '' A) = x + sSup A) (∀ (x : ), BddBelow AsInf ((fun (a : ) => x + a) '' A) = x + sInf A) (∀ {x : }, 0 < xBddAbove AsSup ((fun (a : ) => x * a) '' A) = x * sSup A) (∀ {x : }, 0 < xBddBelow AsInf ((fun (a : ) => x * a) '' A) = x * sInf A) (∀ {x : }, x < 0BddBelow AsSup ((fun (a : ) => x * a) '' A) = x * sInf A) ∀ {x : }, x < 0BddAbove AsInf ((fun (a : ) => x * a) '' A) = x * sSup A

    Proposition 1.2.6: Let A ⊆ ℝ be nonempty. (i) If A is bounded above, then sup (x + A) = x + sup A. (ii) If A is bounded below, then inf (x + A) = x + inf A. (iii) If x > 0 and A is bounded above, then sup (x * A) = x * sup A. (iv) If x > 0 and A is bounded below, then inf (x * A) = x * inf A. (v) If x < 0 and A is bounded below, then sup (x * A) = x * inf A. (vi) If x < 0 and A is bounded above, then inf (x * A) = x * sup A.

    theorem sup_le_inf_of_forall_le {A B : Set } (hA : A.Nonempty) (hB : B.Nonempty) (h : xA, yB, x y) :

    Proposition 1.2.7: If nonempty sets A, B ⊆ ℝ satisfy x ≤ y whenever x ∈ A and y ∈ B, then A is bounded above, B is bounded below, and sSup A ≤ sInf B.

    theorem exists_mem_between_sub_sup {S : Set } (hS : S.Nonempty) (hSb : BddAbove S) {ε : } ( : 0 < ε) :
    xS, sSup S - ε < x x sSup S

    Proposition 1.2.8: If S ⊆ ℝ is nonempty and bounded above, then for every ε > 0 there exists x ∈ S with sSup S - ε < x ≤ sSup S.

    noncomputable def extendedSup (A : Set ) :

    Definition 1.2.9: For a subset A ⊆ ℝ, extend sup and inf to the extended reals so that (i) sup ∅ = -∞, (ii) if A is unbounded above then sup A = ∞, (iii) inf ∅ = ∞, and (iv) if A is unbounded below then inf A = -∞. These agree with sSup and sInf on EReal when we view A as a set of extended real numbers.

    Equations
    Instances For

      (i) The extended supremum of the empty set is -∞.

      (ii) If a set of reals is not bounded above, its extended supremum is .

      noncomputable def extendedInf (A : Set ) :

      The extended infimum of a set of reals, computed in EReal.

      Equations
      Instances For

        (iii) The extended infimum of the empty set is .

        (iv) If a set of reals is not bounded below, its extended infimum is -∞.