Introduction to Real Analysis, Volume I (Jiri Lebl, 2025) -- Chapter 01 -- Section 03

open scoped BigOperatorssection Chap01section Section03

Proposition 1.3.1: (i) failed to synthesize AddGroup Hint: Additional diagnostic information may be available using the `set_option diagnostics true` command.|sorry| 0 : Prop|Unknown identifier `x`x| 0, and failed to synthesize AddGroup Hint: Additional diagnostic information may be available using the `set_option diagnostics true` command.|sorry| = 0 : Prop|Unknown identifier `x`x| = 0 if and only if Unknown identifier `x`sorry = 0 : Propx = 0. (ii) for all real Unknown identifier `x`x. (iii) |sorry * sorry| = |sorry| * |sorry| : Prop|Unknown identifier `x`x * Unknown identifier `y`y| = |Unknown identifier `x`x| * |Unknown identifier `y`y| for all real . (iv) |sorry| ^ 2 = sorry ^ 2 : Prop|Unknown identifier `x`x| ^ 2 = Unknown identifier `x`x ^ 2 for all real Unknown identifier `x`x. (v) |sorry| sorry : Prop|Unknown identifier `x`x| Unknown identifier `y`y if and only if -sorry sorry sorry sorry : Prop-Unknown identifier `y`y Unknown identifier `x`x Unknown identifier `x`x Unknown identifier `y`y. (vi) -|sorry| sorry sorry |sorry| : Prop-(|Unknown identifier `x`x|) Unknown identifier `x`x Unknown identifier `x`x |Unknown identifier `x`x| for all real Unknown identifier `x`x.

theorem abs_basic_properties (x y : ) : (0 |x| (|x| = 0 x = 0)) (|-x| = |x|) (|x * y| = |x| * |y|) (|x| ^ 2 = x ^ 2) (|x| y (-y x x y)) (-|x| x x |x|) := by refine ?_, ?_, ?_, ?_, ?_, ?_ · exact abs_nonneg x, by simp · simp [abs_neg] · simp [abs_mul] · simp [pow_two] · simpa using (abs_le : |x| y -y x x y) · have h : |x| |x| := le_rfl exact abs_le.mp h

Proposition 1.3.2 (Triangle Inequality): For all real numbers Unknown identifier `x`x and Unknown identifier `y`y, we have |sorry + sorry| |sorry| + |sorry| : Prop|Unknown identifier `x`x + Unknown identifier `y`y| |Unknown identifier `x`x| + |Unknown identifier `y`y|.

theorem real_abs_add_le (x y : ) : |x + y| |x| + |y| := by simpa using abs_add_le x y

Corollary 1.3.3: (i) (reverse triangle inequality) For real , . (ii) For real , |sorry - sorry| |sorry| + |sorry| : Prop|Unknown identifier `x`x - Unknown identifier `y`y| |Unknown identifier `x`x| + |Unknown identifier `y`y|.

theorem real_abs_abs_sub_abs_le (x y : ) : |(|x| - |y|)| |x - y| := by simpa using (abs_abs_sub_abs_le_abs_sub x y)
theorem real_abs_sub_le (x y : ) : |x - y| |x| + |y| := by simpa [sub_eq_add_neg, abs_neg] using (real_abs_add_le x (-y))

Corollary 1.3.4: For real numbers , the absolute value of their sum is at most the sum of their absolute values.

theorem real_abs_sum_le_sum_abs {n : } (f : Fin n ) : | i, f i| i, |f i| := by classical simpa using (Finset.abs_sum_le_sum_abs (f := f) (s := Finset.univ))
lemma abs_x_le_five_of_mem_interval {x : } (hx : x Set.Icc (-1 : ) 5) : |x| 5 := by have hx_neg5 : (-5 : ) x := by linarith [hx.1] exact (abs_le.mpr hx_neg5, hx.2)lemma abs_quad_le_linear_in_abs (x : ) : |x ^ 2 - 9 * x + 1| |x| ^ 2 + 9 * |x| + 1 := by have h1 : |x ^ 2 - 9 * x + 1| |x ^ 2 - 9 * x| + |1| := by simpa using real_abs_add_le (x ^ 2 - 9 * x) (1 : ) have h2 : |x ^ 2 - 9 * x| |x ^ 2| + 9 * |x| := by have h := real_abs_add_le (x ^ 2) (-9 * x) simpa [sub_eq_add_neg, abs_mul] using h have h3 : |x ^ 2 - 9 * x| + |1| |x ^ 2| + 9 * |x| + |1| := by nlinarith [h2] have habs : |x ^ 2| = |x| ^ 2 := by simp [pow_two, abs_mul] have h4 : |x ^ 2 - 9 * x + 1| |x| ^ 2 + 9 * |x| + 1 := by have : |x ^ 2| + 9 * |x| + |1| = |x| ^ 2 + 9 * |x| + 1 := by simp [habs] have h' := h1.trans h3 simpa [this] using h' exact h4lemma poly_bound_at_abs_le_five {a : } (ha0 : 0 |a|) (ha : |a| 5) : |a| ^ 2 + 9 * |a| + 1 (71 : ) := by nlinarith

Example 1.3.5: On the interval [-1, 5] : List [-1, 5], the quadratic Unknown identifier `x`sorry ^ 2 - 9 * sorry + 1 : x ^ 2 - 9 * Unknown identifier `x`x + 1 is bounded in absolute value by 71 : 71; that is, a permissible Unknown identifier `M`M satisfying failed to synthesize AddGroup Hint: Additional diagnostic information may be available using the `set_option diagnostics true` command.|sorry ^ 2 - 9 * sorry + 1| sorry : Prop|Unknown identifier `x`x ^ 2 - 9 * Unknown identifier `x`x + 1| Unknown identifier `M`M for all Unknown identifier `x`x in this interval is Unknown identifier `M`sorry = 71 : PropM = 71.

lemma abs_quadratic_bound_on_interval (x : ) (hx : x Set.Icc (-1 : ) 5) : |x ^ 2 - 9 * x + 1| (71 : ) := by have h_abs_le : |x| 5 := abs_x_le_five_of_mem_interval hx have hbound := abs_quad_le_linear_in_abs x have hfinal : |x| ^ 2 + 9 * |x| + 1 (71 : ) := poly_bound_at_abs_le_five (abs_nonneg _) h_abs_le exact hbound.trans hfinal

Definition 1.3.6: A function is bounded if there exists a real Unknown identifier `M`M such that |sorry| sorry : Prop|Unknown identifier `f`f x| Unknown identifier `M`M for all Unknown identifier `x`sorry sorry : Propx Unknown identifier `D`D.

def isBoundedOnReal (D : Set ) (f : D ) : Prop := M : , x : D, |f x| M

Proposition 1.3.7: If are bounded functions on a nonempty set Unknown identifier `D`D with Unknown identifier `f`sorry sorry : Propf x Unknown identifier `g`g x for every Unknown identifier `x`sorry sorry : Propx Unknown identifier `D`D, then the supremum of the range of Unknown identifier `f`f is at most the supremum of the range of Unknown identifier `g`g, and the infimum of the range of Unknown identifier `f`f is at most the infimum of the range of Unknown identifier `g`g.

lemma sup_inf_monotone_on_nonempty {D : Set } (hD : D.Nonempty) {f g : D } (hf : isBoundedOnReal D f) (hg : isBoundedOnReal D g) (hfg : x : D, f x g x) : sSup (Set.range f) sSup (Set.range g) sInf (Set.range f) sInf (Set.range g) := by classical obtain x0, hx0 := hD obtain Mf, hMf := hf obtain Mg, hMg := hg have hne_f : (Set.range f).Nonempty := f x0, hx0, x0, hx0, rfl have hne_g : (Set.range g).Nonempty := g x0, hx0, x0, hx0, rfl have hBdd_g : BddAbove (Set.range g) := by refine Mg, ?_ intro y hy rcases hy with x, rfl exact (abs_le.mp (hMg x)).2 have hBdd_f : BddBelow (Set.range f) := by refine -Mf, ?_ intro y hy rcases hy with x, rfl exact (abs_le.mp (hMf x)).1 refine ?_, ?_ · refine csSup_le hne_f ?_ intro y hy rcases hy with x, rfl have hx : g x Set.range g := x, rfl exact (hfg x).trans (le_csSup hBdd_g hx) · refine le_csInf hne_g ?_ intro y hy rcases hy with x, rfl have hx : sInf (Set.range f) f x := csInf_le hBdd_f x, rfl exact hx.trans (hfg x)
end Section03end Chap01