Imports
import Mathlib.Tactic import Mathlib.Topology.Instances.Irrational import Analysis.Section_11_6
set_option doc.verso.suggestions false

Analysis I, Section 11.8: The Riemann-Stieltjes integral

I have attempted to make the translation as faithful a paraphrasing as possible of the original text. When there is a choice between a more idiomatic Lean solution and a more faithful translation, I have generally chosen the latter. In particular, there will be places where the Lean code could be "golfed" to be more elegant and idiomatic, but I have consciously avoided doing so.

Main constructions and results of this section:

  • Definition of α_length.

  • The piecewise constant Riemann-Stieltjes integral.

  • The full Riemann-Stieltjes integral.

Technical notes:

  • In Lean it is more convenient to make definitions such as α_length and the Riemann-Stieltjes integral totally defined, thus assigning "junk" values to the cases where the definition is not intended to be applied. For the definition of α_length, the definition is intended to be applied in contexts where left and right limits exist, and the function is extended by constants to the left and right of its intended domain of definition; for instance, if a function x f is defined on Icc 0 1, then it is intended that f x = f 1 for all x ≥ 1 and f x = f 0 for all x ≤ 0; in particular, at a right endpoint, the value of a function is intended to agree with its right limit, and similarly for the left endpoint, although we do not enforce this in our definition of α_length. (For functions defined on open intervals, the extension is immaterial.)

  • The notion of α_length and piecewise constant Riemann-Stieltjes integral is intended for situations where left and right limits exist, such as for monotone functions or continuous functions, though technically they make sense without these hypotheses. The full Riemann-Stieltjes integral is intended for functions that are of bounded variation, though we shall restrict attention to the special case of monotone increasing functions for the most part.

namespace Chapter11open BoundedInterval Chapter9

Left and right limits. A junk value is assigned if the limit does not exist.

noncomputable abbrev right_lim (f: ℝ → ℝ) (x₀:ℝ) : ℝ := Filter.lim ((nhdsWithin x₀ (.Ioi x₀)).map f)
noncomputable abbrev left_lim (f: ℝ → ℝ) (x₀:ℝ) : ℝ := Filter.lim ((nhdsWithin x₀ (.Iio x₀)).map f)theorem right_lim_def {f: ℝ → ℝ} {x₀ L:ℝ} (h: Convergesto (.Ioi x₀) f L x₀) : right_lim f x₀ = L := f:ℝ → ℝx₀:ℝL:ℝh:Convergesto (Set.Ioi x₀) f L x₀⊢ right_lim f x₀ = L f:ℝ → ℝx₀:ℝL:ℝh:Convergesto (Set.Ioi x₀) f L x₀⊢ (Filter.map f (nhdsWithin x₀ (Set.Ioi x₀))).lim = L f:ℝ → ℝx₀:ℝL:ℝh:Convergesto (Set.Ioi x₀) f L x₀⊢ Filter.map f (nhdsWithin x₀ (Set.Ioi x₀)) ≤ nhds L; rwa [Convergesto.iff, Filter.Tendsto.eq_1f:ℝ → ℝx₀:ℝL:ℝh:Filter.map f (nhdsWithin x₀ (Set.Ioi x₀)) ≤ nhds L⊢ Filter.map f (nhdsWithin x₀ (Set.Ioi x₀)) ≤ nhds L at htheorem left_lim_def {f: ℝ → ℝ} {x₀ L:ℝ} (h: Convergesto (.Iio x₀) f L x₀) : left_lim f x₀ = L := f:ℝ → ℝx₀:ℝL:ℝh:Convergesto (Set.Iio x₀) f L x₀⊢ left_lim f x₀ = L f:ℝ → ℝx₀:ℝL:ℝh:Convergesto (Set.Iio x₀) f L x₀⊢ (Filter.map f (nhdsWithin x₀ (Set.Iio x₀))).lim = L f:ℝ → ℝx₀:ℝL:ℝh:Convergesto (Set.Iio x₀) f L x₀⊢ Filter.map f (nhdsWithin x₀ (Set.Iio x₀)) ≤ nhds L; rwa [Convergesto.iff, Filter.Tendsto.eq_1f:ℝ → ℝx₀:ℝL:ℝh:Filter.map f (nhdsWithin x₀ (Set.Iio x₀)) ≤ nhds L⊢ Filter.map f (nhdsWithin x₀ (Set.Iio x₀)) ≤ nhds L at hnoncomputable abbrev jump (f: ℝ → ℝ) (x₀:ℝ) : ℝ := right_lim f x₀ - left_lim f x₀

Right limits exist for continuous functions

theorem right_lim_of_continuous {X:Set ℝ} {f: ℝ → ℝ} {x₀:ℝ} (h : ∃ ε>0, .Ico x₀ (x₀+ε) ⊆ X) (hf: ContinuousWithinAt f X x₀) : right_lim f x₀ = f x₀ := X:Set ℝf:ℝ → ℝx₀:ℝh:∃ ε > 0, Set.Ico x₀ (x₀ + ε) ⊆ Xhf:ContinuousWithinAt f X x₀⊢ right_lim f x₀ = f x₀ X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀ε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ X⊢ right_lim f x₀ = f x₀ X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀ε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ X⊢ Convergesto (Set.Ioi x₀) f (f x₀) x₀ X:Set ℝf:ℝ → ℝx₀:ℝhf:Filter.Tendsto f (nhdsWithin x₀ X) (nhds (f x₀))ε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ X⊢ Convergesto (Set.Ioi x₀) f (f x₀) x₀ X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε))) (nhds (f x₀))⊢ Convergesto (Set.Ioi x₀) f (f x₀) x₀ X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε))) (nhds (f x₀))⊢ Filter.Tendsto f (nhdsWithin x₀ (Set.Ioi x₀)) (nhds (f x₀)) X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε))) (nhds (f x₀))⊢ nhdsWithin x₀ (Set.Ioi x₀) = nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε)) have h1 : .Ioo x₀ (x₀ + ε) ∈ nhdsWithin x₀ (.Ioi x₀) := X:Set ℝf:ℝ → ℝx₀:ℝh:∃ ε > 0, Set.Ico x₀ (x₀ + ε) ⊆ Xhf:ContinuousWithinAt f X x₀⊢ right_lim f x₀ = f x₀ X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε))) (nhds (f x₀))⊢ Set.Ioo x₀ (x₀ + ε) = Set.Ioi x₀ ∩ Set.Ioo (x₀ - ε) (x₀ + ε)X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε))) (nhds (f x₀))⊢ Set.Ioo (x₀ - ε) (x₀ + ε) ∈ nhds x₀ X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε))) (nhds (f x₀))⊢ Set.Ioo x₀ (x₀ + ε) = Set.Ioi x₀ ∩ Set.Ioo (x₀ - ε) (x₀ + ε) All goals completed! 🐙 X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε))) (nhds (f x₀))⊢ x₀ - ε < x₀X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε))) (nhds (f x₀))⊢ x₀ < x₀ + ε X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε))) (nhds (f x₀))⊢ x₀ - ε < x₀X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε))) (nhds (f x₀))⊢ x₀ < x₀ + ε All goals completed! 🐙 X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε))) (nhds (f x₀))h1:Set.Ioo x₀ (x₀ + ε) ∈ nhdsWithin x₀ (Set.Ioi x₀)⊢ nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε) ∩ Set.Ioi x₀) = nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε)); X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ico x₀ (x₀ + ε) ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo x₀ (x₀ + ε))) (nhds (f x₀))h1:Set.Ioo x₀ (x₀ + ε) ∈ nhdsWithin x₀ (Set.Ioi x₀)⊢ Set.Ioo x₀ (x₀ + ε) ∩ Set.Ioi x₀ = Set.Ioo x₀ (x₀ + ε); All goals completed! 🐙

Left limits exist for continuous functions

theorem left_lim_of_continuous {X:Set ℝ} {f: ℝ → ℝ} {x₀:ℝ} (h : ∃ ε>0, .Ioc (x₀-ε) x₀ ⊆ X) (hf: ContinuousWithinAt f X x₀) : left_lim f x₀ = f x₀ := X:Set ℝf:ℝ → ℝx₀:ℝh:∃ ε > 0, Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:ContinuousWithinAt f X x₀⊢ left_lim f x₀ = f x₀ X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀ε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ X⊢ left_lim f x₀ = f x₀ X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀ε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ X⊢ Convergesto (Set.Iio x₀) f (f x₀) x₀ X:Set ℝf:ℝ → ℝx₀:ℝhf:Filter.Tendsto f (nhdsWithin x₀ X) (nhds (f x₀))ε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ X⊢ Convergesto (Set.Iio x₀) f (f x₀) x₀ X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀)) (nhds (f x₀))⊢ Convergesto (Set.Iio x₀) f (f x₀) x₀ X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀)) (nhds (f x₀))⊢ Filter.Tendsto f (nhdsWithin x₀ (Set.Iio x₀)) (nhds (f x₀)) X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀)) (nhds (f x₀))⊢ nhdsWithin x₀ (Set.Iio x₀) = nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀) have h1 : .Ioo (x₀-ε) x₀ ∈ nhdsWithin x₀ (.Iio x₀) := X:Set ℝf:ℝ → ℝx₀:ℝh:∃ ε > 0, Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:ContinuousWithinAt f X x₀⊢ left_lim f x₀ = f x₀ X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀)) (nhds (f x₀))⊢ Set.Ioo (x₀ - ε) x₀ = Set.Iio x₀ ∩ Set.Ioo (x₀ - ε) (x₀ + ε)X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀)) (nhds (f x₀))⊢ Set.Ioo (x₀ - ε) (x₀ + ε) ∈ nhds x₀ X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀)) (nhds (f x₀))⊢ Set.Ioo (x₀ - ε) x₀ = Set.Iio x₀ ∩ Set.Ioo (x₀ - ε) (x₀ + ε) All goals completed! 🐙 X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀)) (nhds (f x₀))⊢ x₀ - ε < x₀X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀)) (nhds (f x₀))⊢ x₀ < x₀ + ε X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀)) (nhds (f x₀))⊢ x₀ - ε < x₀X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀)) (nhds (f x₀))⊢ x₀ < x₀ + ε All goals completed! 🐙 X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀)) (nhds (f x₀))h1:Set.Ioo (x₀ - ε) x₀ ∈ nhdsWithin x₀ (Set.Iio x₀)⊢ nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀ ∩ Set.Iio x₀) = nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀) X:Set ℝf:ℝ → ℝx₀:ℝε:ℝhε:ε > 0hX:Set.Ioc (x₀ - ε) x₀ ⊆ Xhf:Filter.Tendsto f (nhdsWithin x₀ (Set.Ioo (x₀ - ε) x₀)) (nhds (f x₀))h1:Set.Ioo (x₀ - ε) x₀ ∈ nhdsWithin x₀ (Set.Iio x₀)⊢ Set.Ioo (x₀ - ε) x₀ ∩ Set.Iio x₀ = Set.Ioo (x₀ - ε) x₀; All goals completed! 🐙

No jump for continuous functions

theorem jump_of_continuous {X:Set ℝ} {f: ℝ → ℝ} {x₀:ℝ} (h : X ∈ nhds x₀) (hf: ContinuousWithinAt f X x₀) : jump f x₀ = 0 := X:Set ℝf:ℝ → ℝx₀:ℝh:X ∈ nhds x₀hf:ContinuousWithinAt f X x₀⊢ jump f x₀ = 0 X:Set ℝf:ℝ → ℝx₀:ℝh:∃ l u, x₀ ∈ Set.Ioo l u ∧ Set.Ioo l u ⊆ Xhf:ContinuousWithinAt f X x₀⊢ jump f x₀ = 0 X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀l:ℝu:ℝhx₀:x₀ ∈ Set.Ioo l uhX:Set.Ioo l u ⊆ X⊢ jump f x₀ = 0; X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀l:ℝu:ℝhX:Set.Ioo l u ⊆ Xhx₀:l < x₀ ∧ x₀ < u⊢ jump f x₀ = 0 have hl : ∃ ε>0, .Ioc (x₀-ε) x₀ ⊆ X := ⟨ x₀-l, X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀l:ℝu:ℝhX:Set.Ioo l u ⊆ Xhx₀:l < x₀ ∧ x₀ < u⊢ x₀ - l > 0 All goals completed! 🐙, Set.Subset.trans (X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀l:ℝu:ℝhX:Set.Ioo l u ⊆ Xhx₀:l < x₀ ∧ x₀ < u⊢ Set.Ioc (x₀ - (x₀ - l)) x₀ ⊆ Set.Ioo l u intro x X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀l:ℝu:ℝhX:Set.Ioo l u ⊆ Xhx₀:l < x₀ ∧ x₀ < ux:ℝh1:x₀ - (x₀ - l) < xh2:x ≤ x₀⊢ x ∈ Set.Ioo l u; exact ⟨X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀l:ℝu:ℝhX:Set.Ioo l u ⊆ Xhx₀:l < x₀ ∧ x₀ < ux:ℝh1:x₀ - (x₀ - l) < xh2:x ≤ x₀⊢ l < x All goals completed! 🐙, X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀l:ℝu:ℝhX:Set.Ioo l u ⊆ Xhx₀:l < x₀ ∧ x₀ < ux:ℝh1:x₀ - (x₀ - l) < xh2:x ≤ x₀⊢ x < u All goals completed! 🐙⟩) hX ⟩ have hu : ∃ ε>0, .Ico x₀ (x₀+ε) ⊆ X := ⟨ u-x₀, X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀l:ℝu:ℝhX:Set.Ioo l u ⊆ Xhx₀:l < x₀ ∧ x₀ < uhl:∃ ε > 0, Set.Ioc (x₀ - ε) x₀ ⊆ X⊢ u - x₀ > 0 All goals completed! 🐙, Set.Subset.trans (X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀l:ℝu:ℝhX:Set.Ioo l u ⊆ Xhx₀:l < x₀ ∧ x₀ < uhl:∃ ε > 0, Set.Ioc (x₀ - ε) x₀ ⊆ X⊢ Set.Ico x₀ (x₀ + (u - x₀)) ⊆ Set.Ioo l u intro x X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀l:ℝu:ℝhX:Set.Ioo l u ⊆ Xhx₀:l < x₀ ∧ x₀ < uhl:∃ ε > 0, Set.Ioc (x₀ - ε) x₀ ⊆ Xx:ℝh1:x₀ ≤ xh2:x < x₀ + (u - x₀)⊢ x ∈ Set.Ioo l u; exact ⟨X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀l:ℝu:ℝhX:Set.Ioo l u ⊆ Xhx₀:l < x₀ ∧ x₀ < uhl:∃ ε > 0, Set.Ioc (x₀ - ε) x₀ ⊆ Xx:ℝh1:x₀ ≤ xh2:x < x₀ + (u - x₀)⊢ l < x All goals completed! 🐙, X:Set ℝf:ℝ → ℝx₀:ℝhf:ContinuousWithinAt f X x₀l:ℝu:ℝhX:Set.Ioo l u ⊆ Xhx₀:l < x₀ ∧ x₀ < uhl:∃ ε > 0, Set.Ioc (x₀ - ε) x₀ ⊆ Xx:ℝh1:x₀ ≤ xh2:x < x₀ + (u - x₀)⊢ x < u All goals completed! 🐙⟩) hX ⟩ All goals completed! 🐙

Right limits exist for monotone functions

theorem right_lim_of_monotone {f: ℝ → ℝ} (x₀:ℝ) (hf: Monotone f) : Convergesto (.Ioi x₀) f (sInf (f '' .Ioi x₀)) x₀ := f:ℝ → ℝx₀:ℝhf:Monotone f⊢ Convergesto (Set.Ioi x₀) f (sInf (f '' Set.Ioi x₀)) x₀ f:ℝ → ℝx₀:ℝhf:Monotone f⊢ Filter.Tendsto f (nhdsWithin x₀ (Set.Ioi x₀)) (nhds (sInf (f '' Set.Ioi x₀))) f:ℝ → ℝx₀:ℝhf:Monotone f⊢ BddBelow (f '' Set.Ioi x₀) f:ℝ → ℝx₀:ℝhf:Monotone f⊢ ∃ x, ∀ y ∈ f '' Set.Ioi x₀, x ≤ y; f:ℝ → ℝx₀:ℝhf:Monotone f⊢ ∀ y ∈ f '' Set.Ioi x₀, f x₀ ≤ y; intro y f:ℝ → ℝx₀:ℝhf:Monotone fy:ℝhy:y ∈ f '' Set.Ioi x₀⊢ f x₀ ≤ y; f:ℝ → ℝx₀:ℝhf:Monotone fy:ℝhy:∃ x, x₀ < x ∧ f x = y⊢ f x₀ ≤ y; f:ℝ → ℝx₀:ℝhf:Monotone fx:ℝhx:x₀ < x⊢ f x₀ ≤ f x; f:ℝ → ℝx₀:ℝhf:Monotone fx:ℝhx:x₀ < x⊢ x₀ ≤ x; All goals completed! 🐙
theorem right_lim_of_monotone' {f: ℝ → ℝ} (x₀:ℝ) (hf: Monotone f) : right_lim f x₀ = sInf (f '' .Ioi x₀) := right_lim_def (right_lim_of_monotone x₀ hf)

Left limits exist for monotone functions

theorem left_lim_of_monotone {f: ℝ → ℝ} (x₀:ℝ) (hf: Monotone f) : Convergesto (.Iio x₀) f (sSup (f '' .Iio x₀)) x₀ := f:ℝ → ℝx₀:ℝhf:Monotone f⊢ Convergesto (Set.Iio x₀) f (sSup (f '' Set.Iio x₀)) x₀ f:ℝ → ℝx₀:ℝhf:Monotone f⊢ Filter.Tendsto f (nhdsWithin x₀ (Set.Iio x₀)) (nhds (sSup (f '' Set.Iio x₀))) f:ℝ → ℝx₀:ℝhf:Monotone f⊢ BddAbove (f '' Set.Iio x₀) f:ℝ → ℝx₀:ℝhf:Monotone f⊢ ∃ x, ∀ y ∈ f '' Set.Iio x₀, y ≤ x; f:ℝ → ℝx₀:ℝhf:Monotone f⊢ ∀ y ∈ f '' Set.Iio x₀, y ≤ f x₀; intro y f:ℝ → ℝx₀:ℝhf:Monotone fy:ℝhy:y ∈ f '' Set.Iio x₀⊢ y ≤ f x₀; f:ℝ → ℝx₀:ℝhf:Monotone fy:ℝhy:∃ x < x₀, f x = y⊢ y ≤ f x₀; f:ℝ → ℝx₀:ℝhf:Monotone fx:ℝhx:x < x₀⊢ f x ≤ f x₀; f:ℝ → ℝx₀:ℝhf:Monotone fx:ℝhx:x < x₀⊢ x ≤ x₀; All goals completed! 🐙
theorem left_lim_of_monotone' {f: ℝ → ℝ} (x₀:ℝ) (hf: Monotone f) : left_lim f x₀ = sSup (f '' .Iio x₀) := left_lim_def (left_lim_of_monotone x₀ hf)theorem jump_of_monotone {f: ℝ → ℝ} (x₀:ℝ) (hf: Monotone f) : 0 ≤ jump f x₀ := f:ℝ → ℝx₀:ℝhf:Monotone f⊢ 0 ≤ jump f x₀ f:ℝ → ℝx₀:ℝhf:Monotone f⊢ sSup (f '' Set.Iio x₀) ≤ sInf (f '' Set.Ioi x₀) apply csSup_le (f:ℝ → ℝx₀:ℝhf:Monotone f⊢ (f '' Set.Iio x₀).Nonempty All goals completed! 🐙); intro a f:ℝ → ℝx₀:ℝhf:Monotone fa:ℝha:a ∈ f '' Set.Iio x₀⊢ a ≤ sInf (f '' Set.Ioi x₀) apply le_csInf (f:ℝ → ℝx₀:ℝhf:Monotone fa:ℝha:a ∈ f '' Set.Iio x₀⊢ (f '' Set.Ioi x₀).Nonempty All goals completed! 🐙); intro b f:ℝ → ℝx₀:ℝhf:Monotone fa:ℝha:a ∈ f '' Set.Iio x₀b:ℝhb:b ∈ f '' Set.Ioi x₀⊢ a ≤ b; f:ℝ → ℝx₀:ℝhf:Monotone fa:ℝb:ℝha:∃ x < x₀, f x = ahb:∃ x, x₀ < x ∧ f x = b⊢ a ≤ b f:ℝ → ℝx₀:ℝhf:Monotone fb:ℝhb:∃ x, x₀ < x ∧ f x = bx:ℝhx:x < x₀⊢ f x ≤ b; f:ℝ → ℝx₀:ℝhf:Monotone fx:ℝhx:x < x₀y:ℝhy:x₀ < y⊢ f x ≤ f y f:ℝ → ℝx₀:ℝhf:Monotone fx:ℝhx:x < x₀y:ℝhy:x₀ < y⊢ x ≤ y; All goals completed! 🐙theorem right_lim_le_left_lim_of_monotone {f:ℝ → ℝ} {a b:ℝ} (hab: a < b) (hf: Monotone f) : right_lim f a ≤ left_lim f b := f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ right_lim f a ≤ left_lim f b f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ sInf (f '' Set.Ioi a) ≤ sSup (f '' Set.Iio b) calc _ ≤ f ((a+b)/2) := f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ sInf (f '' Set.Ioi a) ≤ f ((a + b) / 2) f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ BddBelow (f '' Set.Ioi a)f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ f ((a + b) / 2) ∈ f '' Set.Ioi a f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ BddBelow (f '' Set.Ioi a) f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ ∃ x, ∀ y ∈ f '' Set.Ioi a, x ≤ y; f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ ∀ y ∈ f '' Set.Ioi a, f a ≤ y; intro y f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone fy:ℝhy:y ∈ f '' Set.Ioi a⊢ f a ≤ y; f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone fy:ℝhy:∃ x, a < x ∧ f x = y⊢ f a ≤ y; f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone fx:ℝhx:a < x⊢ f a ≤ f x; f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone fx:ℝhx:a < x⊢ a ≤ x; All goals completed! 🐙 f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ ∃ x, a < x ∧ f x = f ((a + b) / 2); f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ a < (a + b) / 2 ∧ f ((a + b) / 2) = f ((a + b) / 2); f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ a < (a + b) / 2; All goals completed! 🐙 _ ≤ _ := f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ f ((a + b) / 2) ≤ sSup (f '' Set.Iio b) f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ BddAbove (f '' Set.Iio b)f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ f ((a + b) / 2) ∈ f '' Set.Iio b f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ BddAbove (f '' Set.Iio b) f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ ∃ x, ∀ y ∈ f '' Set.Iio b, y ≤ x; f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ ∀ y ∈ f '' Set.Iio b, y ≤ f b; intro y f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone fy:ℝhy:y ∈ f '' Set.Iio b⊢ y ≤ f b; f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone fy:ℝhy:∃ x < b, f x = y⊢ y ≤ f b; f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone fx:ℝhx:x < b⊢ f x ≤ f b; f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone fx:ℝhx:x < b⊢ x ≤ b; All goals completed! 🐙 f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ ∃ x < b, f x = f ((a + b) / 2); f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ (a + b) / 2 < b ∧ f ((a + b) / 2) = f ((a + b) / 2); f:ℝ → ℝa:ℝb:ℝhab:a < bhf:Monotone f⊢ (a + b) / 2 < b; All goals completed! 🐙

Definition 11.8.1

noncomputable abbrev α_length (α: ℝ → ℝ) (I: BoundedInterval) : ℝ := match I with | Icc a b => if a ≤ b then (right_lim α b) - (left_lim α a) else 0 | Ico a b => if a ≤ b then (left_lim α b) - (left_lim α a) else 0 | Ioc a b => if a ≤ b then (right_lim α b) - (right_lim α a) else 0 | Ioo a b => if a < b then (left_lim α b) - (right_lim α a) else 0
syntax:max term "[" term "]ₗ" : termmacro_rules | `($α[$I]ₗ) => `(α_length $α $I)theorem α_length_of_empty (α: ℝ → ℝ) {I: BoundedInterval} (hI: (I:Set ℝ) = ∅) : α[I]ₗ = 0 := match I with α:ℝ → ℝI:BoundedIntervala✝:ℝb✝:ℝhI:↑(Icc a✝ b✝) = ∅⊢ α_length α (Icc a✝ b✝) = 0 α:ℝ → ℝI:BoundedIntervala✝:ℝb✝:ℝhI:↑(Icc a✝ b✝) = ∅⊢ α_length α (Icc a✝ b✝) = 0 α:ℝ → ℝI:BoundedIntervala✝:ℝb✝:ℝhI:b✝ < a✝⊢ a✝ ≤ b✝ → right_lim α b✝ - left_lim α a✝ = 0; All goals completed! 🐙 α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhI:↑(Ico a b) = ∅⊢ α_length α (Ico a b) = 0 α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhI:↑(Ico a b) = ∅⊢ α_length α (Ico a b) = 0 α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhI:b ≤ a⊢ a ≤ b → left_lim α b - left_lim α a = 0; α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhI:b ≤ ah:a ≤ b⊢ left_lim α b - left_lim α a = 0; α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhI:b ≤ ah:a ≤ bthis:b = a⊢ left_lim α b - left_lim α a = 0; α:ℝ → ℝI:BoundedIntervalb:ℝhI:b ≤ bh:b ≤ b⊢ left_lim α b - left_lim α b = 0; All goals completed! 🐙 α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhI:↑(Ioc a b) = ∅⊢ α_length α (Ioc a b) = 0 α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhI:↑(Ioc a b) = ∅⊢ α_length α (Ioc a b) = 0 α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhI:b ≤ a⊢ a ≤ b → right_lim α b - right_lim α a = 0; α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhI:b ≤ ah:a ≤ b⊢ right_lim α b - right_lim α a = 0; α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhI:b ≤ ah:a ≤ bthis:b = a⊢ right_lim α b - right_lim α a = 0; α:ℝ → ℝI:BoundedIntervalb:ℝhI:b ≤ bh:b ≤ b⊢ right_lim α b - right_lim α b = 0; All goals completed! 🐙 α:ℝ → ℝI:BoundedIntervala✝:ℝb✝:ℝhI:↑(Ioo a✝ b✝) = ∅⊢ α_length α (Ioo a✝ b✝) = 0 α:ℝ → ℝI:BoundedIntervala✝:ℝb✝:ℝhI:↑(Ioo a✝ b✝) = ∅⊢ α_length α (Ioo a✝ b✝) = 0 α:ℝ → ℝI:BoundedIntervala✝:ℝb✝:ℝhI:b✝ ≤ a✝⊢ a✝ < b✝ → left_lim α b✝ - right_lim α a✝ = 0; All goals completed! 🐙@[simp] theorem α_length_of_pt {α: ℝ → ℝ} (a:ℝ) : α[Icc a a]ₗ = jump α a := α:ℝ → ℝa:ℝ⊢ α_length α (Icc a a) = jump α a All goals completed! 🐙theorem α_length_of_cts {α:ℝ → ℝ} {I: BoundedInterval} {a b: ℝ} (haa: a < I.a) (hab: I.a ≤ I.b) (hbb: I.b < b) (hI : I ⊆ Ioo a b) (hα: ContinuousOn α (Ioo a b)) : α[I]ₗ = α I.b - α I.a := α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)⊢ α_length α I = α I.b - α I.a have ha_left : left_lim α I.a = α I.a := α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)⊢ α_length α I = α I.b - α I.a apply left_lim_of_continuous _ (hα.continuousWithinAt (α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)⊢ I.a ∈ ↑(Ioo a b) α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)⊢ a < I.a ∧ I.a < b; All goals completed! 🐙)) exact ⟨ I.a - a, α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)⊢ I.a - a > 0 All goals completed! 🐙, α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)⊢ Set.Ioc (I.a - (I.a - a)) I.a ⊆ ↑(Ioo a b) α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)a✝:ℝ⊢ a✝ ∈ Set.Ioc (I.a - (I.a - a)) I.a → a✝ ∈ ↑(Ioo a b); α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)a✝:ℝ⊢ a < a✝ → a✝ ≤ I.a → a < a✝ ∧ a✝ < b; All goals completed! 🐙 ⟩ have ha_right : right_lim α I.a = α I.a := α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)⊢ α_length α I = α I.b - α I.a apply right_lim_of_continuous _ (hα.continuousWithinAt (α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.a⊢ I.a ∈ ↑(Ioo a b) α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.a⊢ a < I.a ∧ I.a < b; All goals completed! 🐙)) exact ⟨ b - I.a, α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.a⊢ b - I.a > 0 All goals completed! 🐙, α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.a⊢ Set.Ico I.a (I.a + (b - I.a)) ⊆ ↑(Ioo a b) α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aa✝:ℝ⊢ a✝ ∈ Set.Ico I.a (I.a + (b - I.a)) → a✝ ∈ ↑(Ioo a b); α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aa✝:ℝ⊢ I.a ≤ a✝ → a✝ < b → a < a✝ ∧ a✝ < b; All goals completed! 🐙 ⟩ have hb_left : left_lim α I.b = α I.b := α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)⊢ α_length α I = α I.b - α I.a apply left_lim_of_continuous _ (hα.continuousWithinAt (α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aha_right:right_lim α I.a = α I.a⊢ I.b ∈ ↑(Ioo a b) α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aha_right:right_lim α I.a = α I.a⊢ a < I.b ∧ I.b < b; All goals completed! 🐙)) exact ⟨ I.b - a, α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aha_right:right_lim α I.a = α I.a⊢ I.b - a > 0 All goals completed! 🐙, α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aha_right:right_lim α I.a = α I.a⊢ Set.Ioc (I.b - (I.b - a)) I.b ⊆ ↑(Ioo a b) α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aha_right:right_lim α I.a = α I.aa✝:ℝ⊢ a✝ ∈ Set.Ioc (I.b - (I.b - a)) I.b → a✝ ∈ ↑(Ioo a b); α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aha_right:right_lim α I.a = α I.aa✝:ℝ⊢ a < a✝ → a✝ ≤ I.b → a < a✝ ∧ a✝ < b; All goals completed! 🐙 ⟩ have hb_right : right_lim α I.b = α I.b := α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)⊢ α_length α I = α I.b - α I.a apply right_lim_of_continuous _ (hα.continuousWithinAt (α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aha_right:right_lim α I.a = α I.ahb_left:left_lim α I.b = α I.b⊢ I.b ∈ ↑(Ioo a b) α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aha_right:right_lim α I.a = α I.ahb_left:left_lim α I.b = α I.b⊢ a < I.b ∧ I.b < b; All goals completed! 🐙)) exact ⟨ b - I.b, α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aha_right:right_lim α I.a = α I.ahb_left:left_lim α I.b = α I.b⊢ b - I.b > 0 All goals completed! 🐙, α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aha_right:right_lim α I.a = α I.ahb_left:left_lim α I.b = α I.b⊢ Set.Ico I.b (I.b + (b - I.b)) ⊆ ↑(Ioo a b) α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aha_right:right_lim α I.a = α I.ahb_left:left_lim α I.b = α I.ba✝:ℝ⊢ a✝ ∈ Set.Ico I.b (I.b + (b - I.b)) → a✝ ∈ ↑(Ioo a b); α:ℝ → ℝI:BoundedIntervala:ℝb:ℝhaa:a < I.ahab:I.a ≤ I.bhbb:I.b < bhI:I ⊆ Ioo a bhα:ContinuousOn α ↑(Ioo a b)ha_left:left_lim α I.a = α I.aha_right:right_lim α I.a = α I.ahb_left:left_lim α I.b = α I.ba✝:ℝ⊢ I.b ≤ a✝ → a✝ < b → a < a✝ ∧ a✝ < b; All goals completed! 🐙 ⟩ cases I with α:ℝ → ℝa:ℝb:ℝhα:ContinuousOn α ↑(Ioo a b)a✝:ℝb✝:ℝhaa:a < (Icc a✝ b✝).ahab:(Icc a✝ b✝).a ≤ (Icc a✝ b✝).bhbb:(Icc a✝ b✝).b < bhI:Icc a✝ b✝ ⊆ Ioo a bha_left:left_lim α (Icc a✝ b✝).a = α (Icc a✝ b✝).aha_right:right_lim α (Icc a✝ b✝).a = α (Icc a✝ b✝).ahb_left:left_lim α (Icc a✝ b✝).b = α (Icc a✝ b✝).bhb_right:right_lim α (Icc a✝ b✝).b = α (Icc a✝ b✝).b⊢ α_length α (Icc a✝ b✝) = α (Icc a✝ b✝).b - α (Icc a✝ b✝).a All goals completed! 🐙 α:ℝ → ℝa:ℝb:ℝhα:ContinuousOn α ↑(Ioo a b)a✝:ℝb✝:ℝhaa:a < (Ico a✝ b✝).ahab:(Ico a✝ b✝).a ≤ (Ico a✝ b✝).bhbb:(Ico a✝ b✝).b < bhI:Ico a✝ b✝ ⊆ Ioo a bha_left:left_lim α (Ico a✝ b✝).a = α (Ico a✝ b✝).aha_right:right_lim α (Ico a✝ b✝).a = α (Ico a✝ b✝).ahb_left:left_lim α (Ico a✝ b✝).b = α (Ico a✝ b✝).bhb_right:right_lim α (Ico a✝ b✝).b = α (Ico a✝ b✝).b⊢ α_length α (Ico a✝ b✝) = α (Ico a✝ b✝).b - α (Ico a✝ b✝).a All goals completed! 🐙 α:ℝ → ℝa:ℝb:ℝhα:ContinuousOn α ↑(Ioo a b)a✝:ℝb✝:ℝhaa:a < (Ioc a✝ b✝).ahab:(Ioc a✝ b✝).a ≤ (Ioc a✝ b✝).bhbb:(Ioc a✝ b✝).b < bhI:Ioc a✝ b✝ ⊆ Ioo a bha_left:left_lim α (Ioc a✝ b✝).a = α (Ioc a✝ b✝).aha_right:right_lim α (Ioc a✝ b✝).a = α (Ioc a✝ b✝).ahb_left:left_lim α (Ioc a✝ b✝).b = α (Ioc a✝ b✝).bhb_right:right_lim α (Ioc a✝ b✝).b = α (Ioc a✝ b✝).b⊢ α_length α (Ioc a✝ b✝) = α (Ioc a✝ b✝).b - α (Ioc a✝ b✝).a All goals completed! 🐙 α:ℝ → ℝa:ℝb:ℝhα:ContinuousOn α ↑(Ioo a b)a✝:ℝb✝:ℝhaa:a < (Ioo a✝ b✝).ahab:(Ioo a✝ b✝).a ≤ (Ioo a✝ b✝).bhbb:(Ioo a✝ b✝).b < bhI:Ioo a✝ b✝ ⊆ Ioo a bha_left:left_lim α (Ioo a✝ b✝).a = α (Ioo a✝ b✝).aha_right:right_lim α (Ioo a✝ b✝).a = α (Ioo a✝ b✝).ahb_left:left_lim α (Ioo a✝ b✝).b = α (Ioo a✝ b✝).bhb_right:right_lim α (Ioo a✝ b✝).b = α (Ioo a✝ b✝).b⊢ α_length α (Ioo a✝ b✝) = α (Ioo a✝ b✝).b - α (Ioo a✝ b✝).a α:ℝ → ℝa:ℝb:ℝhα:ContinuousOn α ↑(Ioo a b)a✝:ℝb✝:ℝhaa:a < (Ioo a✝ b✝).ahab:(Ioo a✝ b✝).a ≤ (Ioo a✝ b✝).bhbb:(Ioo a✝ b✝).b < bhI:Ioo a✝ b✝ ⊆ Ioo a bha_left:left_lim α (Ioo a✝ b✝).a = α (Ioo a✝ b✝).aha_right:right_lim α (Ioo a✝ b✝).a = α (Ioo a✝ b✝).ahb_left:left_lim α (Ioo a✝ b✝).b = α (Ioo a✝ b✝).bhb_right:right_lim α (Ioo a✝ b✝).b = α (Ioo a✝ b✝).b⊢ b✝ ≤ a✝ → 0 = α (Ioo a✝ b✝).b - α (Ioo a✝ b✝).a; α:ℝ → ℝa:ℝb:ℝhα:ContinuousOn α ↑(Ioo a b)a✝:ℝb✝:ℝhaa:a < (Ioo a✝ b✝).ahab:(Ioo a✝ b✝).a ≤ (Ioo a✝ b✝).bhbb:(Ioo a✝ b✝).b < bhI:Ioo a✝ b✝ ⊆ Ioo a bha_left:left_lim α (Ioo a✝ b✝).a = α (Ioo a✝ b✝).aha_right:right_lim α (Ioo a✝ b✝).a = α (Ioo a✝ b✝).ahb_left:left_lim α (Ioo a✝ b✝).b = α (Ioo a✝ b✝).bhb_right:right_lim α (Ioo a✝ b✝).b = α (Ioo a✝ b✝).bh:b✝ ≤ a✝⊢ 0 = α (Ioo a✝ b✝).b - α (Ioo a✝ b✝).a; have := le_antisymm h (α:ℝ → ℝa:ℝb:ℝhα:ContinuousOn α ↑(Ioo a b)a✝:ℝb✝:ℝhaa:a < (Ioo a✝ b✝).ahab:(Ioo a✝ b✝).a ≤ (Ioo a✝ b✝).bhbb:(Ioo a✝ b✝).b < bhI:Ioo a✝ b✝ ⊆ Ioo a bha_left:left_lim α (Ioo a✝ b✝).a = α (Ioo a✝ b✝).aha_right:right_lim α (Ioo a✝ b✝).a = α (Ioo a✝ b✝).ahb_left:left_lim α (Ioo a✝ b✝).b = α (Ioo a✝ b✝).bhb_right:right_lim α (Ioo a✝ b✝).b = α (Ioo a✝ b✝).bh:b✝ ≤ a✝⊢ a✝ ≤ b✝ All goals completed! 🐙); α:ℝ → ℝa:ℝb:ℝhα:ContinuousOn α ↑(Ioo a b)b✝:ℝhaa:a < (Ioo b✝ b✝).ahab:(Ioo b✝ b✝).a ≤ (Ioo b✝ b✝).bhbb:(Ioo b✝ b✝).b < bhI:Ioo b✝ b✝ ⊆ Ioo a bha_left:left_lim α (Ioo b✝ b✝).a = α (Ioo b✝ b✝).aha_right:right_lim α (Ioo b✝ b✝).a = α (Ioo b✝ b✝).ahb_left:left_lim α (Ioo b✝ b✝).b = α (Ioo b✝ b✝).bhb_right:right_lim α (Ioo b✝ b✝).b = α (Ioo b✝ b✝).bh:b✝ ≤ b✝⊢ 0 = α (Ioo b✝ b✝).b - α (Ioo b✝ b✝).a; All goals completed! 🐙/-- Example 11.8.2 -/ declaration uses `sorry`example : (fun x ↦ x^2)[Icc 2 3]ₗ = 5 := ⊢ α_length (fun x ↦ x ^ 2) (Icc 2 3) = 5 All goals completed! 🐙declaration uses `sorry`example : (fun x ↦ x^2)[Icc 2 2]ₗ = 0 := ⊢ α_length (fun x ↦ x ^ 2) (Icc 2 2) = 0 All goals completed! 🐙declaration uses `sorry`example : (fun x ↦ x^2)[Ioo 2 2]ₗ = 0 := ⊢ α_length (fun x ↦ x ^ 2) (Ioo 2 2) = 0 All goals completed! 🐙

Example 11.8.3

@[simp] theorem declaration uses `sorry`α_len_of_id (I: BoundedInterval) : (fun x ↦ x)[I]ₗ = |I|ₗ := I:BoundedInterval⊢ α_length (fun x ↦ x) I = I.length All goals completed! 🐙

An improved version of BoundedInterval.­joins that also controls α_length.

abbrev BoundedInterval.joins' (K I J: BoundedInterval) : Prop := K.joins I J ∧ ∀ α:ℝ → ℝ, α[K]ₗ = α[I]ₗ + α[J]ₗ
theorem BoundedInterval.join_Icc_Ioc' {a b c:ℝ} (hab: a ≤ b) (hbc: b ≤ c) : (Icc a c).joins' (Icc a b) (Ioc b c) := ⟨ join_Icc_Ioc hab hbc, a:ℝb:ℝc:ℝhab:a ≤ bhbc:b ≤ c⊢ ∀ (α : ℝ → ℝ), α_length α (Icc a c) = α_length α (Icc a b) + α_length α (Ioc b c) All goals completed! 🐙 ⟩theorem BoundedInterval.join_Icc_Ioo' {a b c:ℝ} (hab: a ≤ b) (hbc: b < c) : (Ico a c).joins' (Icc a b) (Ioo b c) := ⟨ join_Icc_Ioo hab hbc, a:ℝb:ℝc:ℝhab:a ≤ bhbc:b < c⊢ ∀ (α : ℝ → ℝ), α_length α (Ico a c) = α_length α (Icc a b) + α_length α (Ioo b c) All goals completed! 🐙 ⟩theorem BoundedInterval.join_Ioc_Ioc' {a b c:ℝ} (hab: a ≤ b) (hbc: b ≤ c) : (Ioc a c).joins' (Ioc a b) (Ioc b c) := ⟨ join_Ioc_Ioc hab hbc, a:ℝb:ℝc:ℝhab:a ≤ bhbc:b ≤ c⊢ ∀ (α : ℝ → ℝ), α_length α (Ioc a c) = α_length α (Ioc a b) + α_length α (Ioc b c) All goals completed! 🐙 ⟩theorem BoundedInterval.join_Ioc_Ioo' {a b c:ℝ} (hab: a ≤ b) (hbc: b < c) : (Ioo a c).joins' (Ioc a b) (Ioo b c) := ⟨ join_Ioc_Ioo hab hbc, a:ℝb:ℝc:ℝhab:a ≤ bhbc:b < c⊢ ∀ (α : ℝ → ℝ), α_length α (Ioo a c) = α_length α (Ioc a b) + α_length α (Ioo b c) All goals completed! 🐙 ⟩theorem BoundedInterval.join_Ico_Icc' {a b c:ℝ} (hab: a ≤ b) (hbc: b ≤ c) : (Icc a c).joins' (Ico a b) (Icc b c) := ⟨ join_Ico_Icc hab hbc, a:ℝb:ℝc:ℝhab:a ≤ bhbc:b ≤ c⊢ ∀ (α : ℝ → ℝ), α_length α (Icc a c) = α_length α (Ico a b) + α_length α (Icc b c) All goals completed! 🐙 ⟩theorem BoundedInterval.join_Ico_Ico' {a b c:ℝ} (hab: a ≤ b) (hbc: b ≤ c) : (Ico a c).joins' (Ico a b) (Ico b c) := ⟨ join_Ico_Ico hab hbc, a:ℝb:ℝc:ℝhab:a ≤ bhbc:b ≤ c⊢ ∀ (α : ℝ → ℝ), α_length α (Ico a c) = α_length α (Ico a b) + α_length α (Ico b c) All goals completed! 🐙 ⟩theorem BoundedInterval.join_Ioo_Icc' {a b c:ℝ} (hab: a < b) (hbc: b ≤ c) : (Ioc a c).joins' (Ioo a b) (Icc b c) := ⟨ join_Ioo_Icc hab hbc, a:ℝb:ℝc:ℝhab:a < bhbc:b ≤ c⊢ ∀ (α : ℝ → ℝ), α_length α (Ioc a c) = α_length α (Ioo a b) + α_length α (Icc b c) All goals completed! 🐙 ⟩theorem BoundedInterval.join_Ioo_Ico' {a b c:ℝ} (hab: a < b) (hbc: b ≤ c) : (Ioo a c).joins' (Ioo a b) (Ico b c) := ⟨ join_Ioo_Ico hab hbc, a:ℝb:ℝc:ℝhab:a < bhbc:b ≤ c⊢ ∀ (α : ℝ → ℝ), α_length α (Ioo a c) = α_length α (Ioo a b) + α_length α (Ico b c) All goals completed! 🐙 ⟩

Theorem 11.8.4 / Exercise 11.8.1

theorem declaration uses `sorry`Partition.sum_of_α_length {I: BoundedInterval} (P: Partition I) (α: ℝ → ℝ) : ∑ J ∈ P.intervals, α[J]ₗ = α[I]ₗ := I:BoundedIntervalP:Partition Iα:ℝ → ℝ⊢ ∑ J ∈ P.intervals, α_length α J = α_length α I All goals completed! 🐙

Definition 11.8.5 (Piecewise constant RS integral).

noncomputable abbrev PiecewiseConstantWith.RS_integ (f:ℝ → ℝ) {I: BoundedInterval} (P: Partition I) (α: ℝ → ℝ) : ℝ := ∑ J ∈ P.intervals, constant_value_on f (J:Set ℝ) * α[J]ₗ

Example 11.8.6

noncomputable abbrev f_11_8_6 (x:ℝ) : ℝ := if x < 2 then 4 else 2
noncomputable abbrev P_11_8_6 : Partition (Icc 1 3) := (⊥: Partition (Ico 1 2)).join (⊥ : Partition (Icc 2 3)) (join_Ico_Icc (⊢ 1 ≤ 2 All goals completed! 🐙) (⊢ 2 ≤ 3 All goals completed! 🐙) )theorem declaration uses `sorry`f_11_8_6_RS_integ : PiecewiseConstantWith.RS_integ f_11_8_6 P_11_8_6 (fun x ↦ x^2) = 22 := ⊢ (PiecewiseConstantWith.RS_integ f_11_8_6 P_11_8_6 fun x ↦ x ^ 2) = 22 All goals completed! 🐙

Example 11.8.7

theorem declaration uses `sorry`PiecewiseConstantWith.RS_integ_eq_integ {f:ℝ → ℝ} {I: BoundedInterval} (P: Partition I) :RS_integ f P (fun x ↦ x) = integ f P := f:ℝ → ℝI:BoundedIntervalP:Partition I⊢ (RS_integ f P fun x ↦ x) = integ f P All goals completed! 🐙

Analogue of Proposition 11.2.13

theorem declaration uses `sorry`PiecewiseConstantWith.RS_integ_eq {f:ℝ → ℝ} {I: BoundedInterval} {P P': Partition I} (hP: PiecewiseConstantWith f P) (hP': PiecewiseConstantWith f P') (α:ℝ → ℝ): RS_integ f P α = RS_integ f P' α := f:ℝ → ℝI:BoundedIntervalP:Partition IP':Partition IhP:PiecewiseConstantWith f PhP':PiecewiseConstantWith f P'α:ℝ → ℝ⊢ RS_integ f P α = RS_integ f P' α All goals completed! 🐙
open Classical in noncomputable abbrev PiecewiseConstantOn.RS_integ (f:ℝ → ℝ) (I: BoundedInterval) (α:ℝ → ℝ): ℝ := if h: PiecewiseConstantOn f I then PiecewiseConstantWith.RS_integ f h.choose α else 0theorem PiecewiseConstantOn.RS_integ_def {f:ℝ → ℝ} {I: BoundedInterval} {P: Partition I} (h: PiecewiseConstantWith f P) (α:ℝ → ℝ) : RS_integ f I α = PiecewiseConstantWith.RS_integ f P α := f:ℝ → ℝI:BoundedIntervalP:Partition Ih:PiecewiseConstantWith f Pα:ℝ → ℝ⊢ RS_integ f I α = PiecewiseConstantWith.RS_integ f P α have h' : PiecewiseConstantOn f I := f:ℝ → ℝI:BoundedIntervalP:Partition Ih:PiecewiseConstantWith f Pα:ℝ → ℝ⊢ RS_integ f I α = PiecewiseConstantWith.RS_integ f P α All goals completed! 🐙 f:ℝ → ℝI:BoundedIntervalP:Partition Ih:PiecewiseConstantWith f Pα:ℝ → ℝh':PiecewiseConstantOn f I⊢ PiecewiseConstantWith.RS_integ f (Exists.choose ⋯) α = PiecewiseConstantWith.RS_integ f P α; All goals completed! 🐙

α_length non-negative when α monotone

theorem declaration uses `sorry`α_length_nonneg_of_monotone {α:ℝ → ℝ} (hα: Monotone α) (I: BoundedInterval): 0 ≤ α[I]ₗ := α:ℝ → ℝhα:Monotone αI:BoundedInterval⊢ 0 ≤ α_length α I All goals completed! 🐙

Analogue of Theorem 11.2.16 (a) (Laws of integration) / Exercise 11.8.3

theorem declaration uses `sorry`PiecewiseConstantOn.RS_integ_add {f g: ℝ → ℝ} {I: BoundedInterval} (hf: PiecewiseConstantOn f I) (hg: PiecewiseConstantOn g I) {α:ℝ → ℝ} (hα: Monotone α): RS_integ (f + g) I α = RS_integ f I α + RS_integ g I α := f:ℝ → ℝg:ℝ → ℝI:BoundedIntervalhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn g Iα:ℝ → ℝhα:Monotone α⊢ RS_integ (f + g) I α = RS_integ f I α + RS_integ g I α All goals completed! 🐙

Analogue of Theorem 11.2.16 (b) (Laws of integration) / Exercise 11.8.3

theorem declaration uses `sorry`PiecewiseConstantOn.RS_integ_smul {f: ℝ → ℝ} {I: BoundedInterval} (c:ℝ) (hf: PiecewiseConstantOn f I) {α:ℝ → ℝ} (hα: Monotone α) : RS_integ (c • f) I α = c * RS_integ f I α := f:ℝ → ℝI:BoundedIntervalc:ℝhf:PiecewiseConstantOn f Iα:ℝ → ℝhα:Monotone α⊢ RS_integ (c • f) I α = c * RS_integ f I α All goals completed! 🐙

Theorem 11.8.8 (c) (Laws of RS integration) / Exercise 11.8.3

theorem declaration uses `sorry`PiecewiseConstantOn.RS_integ_sub {f g: ℝ → ℝ} {I: BoundedInterval} {α:ℝ → ℝ} (hα: Monotone α) (hf: PiecewiseConstantOn f I) (hg: PiecewiseConstantOn g I) : RS_integ (f - g) I α = RS_integ f I α - RS_integ g I α := f:ℝ → ℝg:ℝ → ℝI:BoundedIntervalα:ℝ → ℝhα:Monotone αhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn g I⊢ RS_integ (f - g) I α = RS_integ f I α - RS_integ g I α All goals completed! 🐙

Theorem 11.8.8 (d) (Laws of RS integration) / Exercise 11.8.3

theorem declaration uses `sorry`PiecewiseConstantOn.RS_integ_of_nonneg {f: ℝ → ℝ} {I: BoundedInterval} {α:ℝ → ℝ} (hα: Monotone α) (h: ∀ x ∈ I, 0 ≤ f x) (hf: PiecewiseConstantOn f I) : 0 ≤ RS_integ f I α := f:ℝ → ℝI:BoundedIntervalα:ℝ → ℝhα:Monotone αh:∀ x ∈ I, 0 ≤ f xhf:PiecewiseConstantOn f I⊢ 0 ≤ RS_integ f I α All goals completed! 🐙

Theorem 11.8.8 (e) (Laws of RS integration) / Exercise 11.8.3

theorem declaration uses `sorry`PiecewiseConstantOn.RS_integ_mono {f g: ℝ → ℝ} {I: BoundedInterval} {α:ℝ → ℝ} (hα: Monotone α) (h: ∀ x ∈ I, f x ≤ g x) (hf: PiecewiseConstantOn f I) (hg: PiecewiseConstantOn g I) : RS_integ f I α ≤ RS_integ g I α := f:ℝ → ℝg:ℝ → ℝI:BoundedIntervalα:ℝ → ℝhα:Monotone αh:∀ x ∈ I, f x ≤ g xhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn g I⊢ RS_integ f I α ≤ RS_integ g I α All goals completed! 🐙

Theorem 11.8.8 (f) (Laws of RS integration) / Exercise 11.8.3

theorem declaration uses `sorry`PiecewiseConstantOn.RS_integ_const (c: ℝ) (I: BoundedInterval) {α:ℝ → ℝ} (hα: Monotone α) : RS_integ (fun _ ↦ c) I α = c * α[I]ₗ := c:ℝI:BoundedIntervalα:ℝ → ℝhα:Monotone α⊢ RS_integ (fun x ↦ c) I α = c * α_length α I All goals completed! 🐙

Theorem 11.8.8 (f') (Laws of RS integration) / Exercise 11.8.3

theorem declaration uses `sorry`PiecewiseConstantOn.RS_integ_const' {f:ℝ → ℝ} {I: BoundedInterval} {α:ℝ → ℝ} (hα: Monotone α) (h: ConstantOn f I) : RS_integ f I α = (constant_value_on f I) * α[I]ₗ := f:ℝ → ℝI:BoundedIntervalα:ℝ → ℝhα:Monotone αh:ConstantOn f ↑I⊢ RS_integ f I α = constant_value_on f ↑I * α_length α I All goals completed! 🐙

Theorem 11.8.8 (g) (Laws of RS integration) / Exercise 11.8.3

open Classical intheorem declaration uses `sorry`PiecewiseConstantOn.RS_of_extend {I J: BoundedInterval} (hIJ: I ⊆ J) {f: ℝ → ℝ} (h: PiecewiseConstantOn f I) {α:ℝ → ℝ} (hα: Monotone α): PiecewiseConstantOn (fun x ↦ if x ∈ I then f x else 0) J := I:BoundedIntervalJ:BoundedIntervalhIJ:I ⊆ Jf:ℝ → ℝh:PiecewiseConstantOn f Iα:ℝ → ℝhα:Monotone α⊢ PiecewiseConstantOn (fun x ↦ if x ∈ I then f x else 0) J All goals completed! 🐙

Theorem 11.8.8 (g') (Laws of RS integration) / Exercise 11.8.3

open Classical intheorem declaration uses `sorry`PiecewiseConstantOn.RS_integ_of_extend {I J: BoundedInterval} (hIJ: I ⊆ J) {f: ℝ → ℝ} (h: PiecewiseConstantOn f I) {α:ℝ → ℝ} (hα: Monotone α): RS_integ (fun x ↦ if x ∈ I then f x else 0) J α = RS_integ f I α := I:BoundedIntervalJ:BoundedIntervalhIJ:I ⊆ Jf:ℝ → ℝh:PiecewiseConstantOn f Iα:ℝ → ℝhα:Monotone α⊢ RS_integ (fun x ↦ if x ∈ I then f x else 0) J α = RS_integ f I α All goals completed! 🐙

Theorem 11.8.8 (h) (Laws of RS integration) / Exercise 11.8.3

theorem declaration uses `sorry`PiecewiseConstantOn.RS_integ_of_join {I J K: BoundedInterval} (hIJK: K.joins' I J) {f: ℝ → ℝ} (h: PiecewiseConstantOn f K) {α:ℝ → ℝ} (hα: Monotone α): RS_integ f K α = RS_integ f I α + RS_integ f J α := I:BoundedIntervalJ:BoundedIntervalK:BoundedIntervalhIJK:K.joins' I Jf:ℝ → ℝh:PiecewiseConstantOn f Kα:ℝ → ℝhα:Monotone α⊢ RS_integ f K α = RS_integ f I α + RS_integ f J α All goals completed! 🐙

Analogue of Definition 11.3.2 (Upper and lower Riemann integrals ).

noncomputable abbrev upper_RS_integral (f:ℝ → ℝ) (I: BoundedInterval) (α: ℝ → ℝ): ℝ := sInf ((PiecewiseConstantOn.RS_integ · I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I})
noncomputable abbrev lower_RS_integral (f:ℝ → ℝ) (I: BoundedInterval) (α: ℝ → ℝ): ℝ := sSup ((PiecewiseConstantOn.RS_integ · I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I})lemma RS_integral_bound_upper_of_bounded {f:ℝ → ℝ} {M:ℝ} {I: BoundedInterval} (h: ∀ x ∈ (I:Set ℝ), |f x| ≤ M) {α:ℝ → ℝ} (hα:Monotone α) : M * α[I]ₗ ∈ (PiecewiseConstantOn.RS_integ · I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I} := f:ℝ → ℝM:ℝI:BoundedIntervalh:∀ x ∈ ↑I, |f x| ≤ Mα:ℝ → ℝhα:Monotone α⊢ M * α_length α I ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I} f:ℝ → ℝM:ℝI:BoundedIntervalh:∀ x ∈ ↑I, |f x| ≤ Mα:ℝ → ℝhα:Monotone α⊢ ∃ x, (MajorizesOn x f I ∧ PiecewiseConstantOn x I) ∧ PiecewiseConstantOn.RS_integ x I α = M * α_length α I; f:ℝ → ℝM:ℝI:BoundedIntervalh:∀ x ∈ ↑I, |f x| ≤ Mα:ℝ → ℝhα:Monotone α⊢ MajorizesOn (fun x ↦ M) f If:ℝ → ℝM:ℝI:BoundedIntervalh:∀ x ∈ ↑I, |f x| ≤ Mα:ℝ → ℝhα:Monotone α⊢ PiecewiseConstantOn (fun x ↦ M) I f:ℝ → ℝM:ℝI:BoundedIntervalh:∀ x ∈ ↑I, |f x| ≤ Mα:ℝ → ℝhα:Monotone α⊢ MajorizesOn (fun x ↦ M) f I All goals completed! 🐙 exact (ConstantOn.of_const (c := M) (f:ℝ → ℝM:ℝI:BoundedIntervalh:∀ x ∈ ↑I, |f x| ≤ Mα:ℝ → ℝhα:Monotone α⊢ ∀ x ∈ ↑I, M = M All goals completed! 🐙)).piecewiseConstantOnlemma RS_integral_bound_lower_of_bounded {f:ℝ → ℝ} {M:ℝ} {I: BoundedInterval} (h: ∀ x ∈ (I:Set ℝ), |f x| ≤ M) {α:ℝ → ℝ} (hα:Monotone α) : -M * α[I]ₗ ∈ (PiecewiseConstantOn.RS_integ · I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I} := f:ℝ → ℝM:ℝI:BoundedIntervalh:∀ x ∈ ↑I, |f x| ≤ Mα:ℝ → ℝhα:Monotone α⊢ -M * α_length α I ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I} f:ℝ → ℝM:ℝI:BoundedIntervalh:∀ x ∈ ↑I, |f x| ≤ Mα:ℝ → ℝhα:Monotone α⊢ ∃ x, (MinorizesOn x f I ∧ PiecewiseConstantOn x I) ∧ PiecewiseConstantOn.RS_integ x I α = -(M * α_length α I); refine ⟨ fun _ ↦ -M, ⟨ ⟨ ?_, ?_ ⟩, f:ℝ → ℝM:ℝI:BoundedIntervalh:∀ x ∈ ↑I, |f x| ≤ Mα:ℝ → ℝhα:Monotone α⊢ PiecewiseConstantOn.RS_integ (fun x ↦ -M) I α = -(M * α_length α I) f:ℝ → ℝM:ℝI:BoundedIntervalh:∀ x ∈ ↑I, |f x| ≤ Mα:ℝ → ℝhα:Monotone α⊢ -(M * α_length α I) = -M * α_length α I; All goals completed! 🐙 ⟩ ⟩ f:ℝ → ℝM:ℝI:BoundedIntervalh:∀ x ∈ ↑I, |f x| ≤ Mα:ℝ → ℝhα:Monotone α⊢ MinorizesOn (fun x ↦ -M) f I All goals completed! 🐙 exact (ConstantOn.of_const (c := -M) (f:ℝ → ℝM:ℝI:BoundedIntervalh:∀ x ∈ ↑I, |f x| ≤ Mα:ℝ → ℝhα:Monotone α⊢ ∀ x ∈ ↑I, -M = -M All goals completed! 🐙)).piecewiseConstantOnlemma RS_integral_bound_upper_nonempty {f:ℝ → ℝ} {I: BoundedInterval} (h: BddOn f I) {α:ℝ → ℝ} (hα: Monotone α) : ((PiecewiseConstantOn.RS_integ · I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}).Nonempty := f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone α⊢ ((fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}).Nonempty f:ℝ → ℝI:BoundedIntervalα:ℝ → ℝhα:Monotone αM:ℝh:∀ x ∈ ↑I, |f x| ≤ M⊢ ((fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}).Nonempty; All goals completed! 🐙lemma RS_integral_bound_lower_nonempty {f:ℝ → ℝ} {I: BoundedInterval} (h: BddOn f I) {α:ℝ → ℝ} (hα: Monotone α) : ((PiecewiseConstantOn.RS_integ · I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}).Nonempty := f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone α⊢ ((fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}).Nonempty f:ℝ → ℝI:BoundedIntervalα:ℝ → ℝhα:Monotone αM:ℝh:∀ x ∈ ↑I, |f x| ≤ M⊢ ((fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}).Nonempty; All goals completed! 🐙lemma RS_integral_bound_lower_le_upper {f:ℝ → ℝ} {I: BoundedInterval} {a b:ℝ} {α:ℝ → ℝ} (hα: Monotone α) (ha: a ∈ (PiecewiseConstantOn.RS_integ · I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}) (hb: b ∈ (PiecewiseConstantOn.RS_integ · I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}) : b ≤ a:= f:ℝ → ℝI:BoundedIntervala:ℝb:ℝα:ℝ → ℝhα:Monotone αha:a ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}hb:b ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}⊢ b ≤ a f:ℝ → ℝI:BoundedIntervala:ℝb:ℝα:ℝ → ℝhα:Monotone αha:a ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}hb:b ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}g:ℝ → ℝhmaj:MajorizesOn g f Ihgp:PiecewiseConstantOn g Ihgi:(fun x ↦ PiecewiseConstantOn.RS_integ x I α) g = a⊢ b ≤ a f:ℝ → ℝI:BoundedIntervala:ℝb:ℝα:ℝ → ℝhα:Monotone αha:a ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}hb:b ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}g:ℝ → ℝhmaj:MajorizesOn g f Ihgp:PiecewiseConstantOn g Ihgi:(fun x ↦ PiecewiseConstantOn.RS_integ x I α) g = ah:ℝ → ℝhmin:MinorizesOn h f Ihhp:PiecewiseConstantOn h Ihhi:(fun x ↦ PiecewiseConstantOn.RS_integ x I α) h = b⊢ b ≤ a f:ℝ → ℝI:BoundedIntervala:ℝb:ℝα:ℝ → ℝhα:Monotone αha:a ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}hb:b ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}g:ℝ → ℝhmaj:MajorizesOn g f Ihgp:PiecewiseConstantOn g Ihgi:(fun x ↦ PiecewiseConstantOn.RS_integ x I α) g = ah:ℝ → ℝhmin:MinorizesOn h f Ihhp:PiecewiseConstantOn h Ihhi:(fun x ↦ PiecewiseConstantOn.RS_integ x I α) h = b⊢ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) h ≤ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) g; f:ℝ → ℝI:BoundedIntervala:ℝb:ℝα:ℝ → ℝhα:Monotone αha:a ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}hb:b ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}g:ℝ → ℝhmaj:MajorizesOn g f Ihgp:PiecewiseConstantOn g Ihgi:(fun x ↦ PiecewiseConstantOn.RS_integ x I α) g = ah:ℝ → ℝhmin:MinorizesOn h f Ihhp:PiecewiseConstantOn h Ihhi:(fun x ↦ PiecewiseConstantOn.RS_integ x I α) h = b⊢ ∀ x ∈ I, h x ≤ g x; intro _ f:ℝ → ℝI:BoundedIntervala:ℝb:ℝα:ℝ → ℝhα:Monotone αha:a ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}hb:b ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}g:ℝ → ℝhmaj:MajorizesOn g f Ihgp:PiecewiseConstantOn g Ihgi:(fun x ↦ PiecewiseConstantOn.RS_integ x I α) g = ah:ℝ → ℝhmin:MinorizesOn h f Ihhp:PiecewiseConstantOn h Ihhi:(fun x ↦ PiecewiseConstantOn.RS_integ x I α) h = bx✝:ℝhx:x✝ ∈ I⊢ h x✝ ≤ g x✝; All goals completed! 🐙lemma RS_integral_bound_below {f:ℝ → ℝ} {I: BoundedInterval} (h: BddOn f I) {α:ℝ → ℝ} (hα: Monotone α) : BddBelow ((PiecewiseConstantOn.RS_integ · I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}) := f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone α⊢ BddBelow ((fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}) f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone α⊢ ∃ x, ∀ y ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}, x ≤ y; f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone α⊢ ∀ y ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}, ⋯.some ≤ y intro a f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone αa:ℝha:a ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}⊢ ⋯.some ≤ a; All goals completed! 🐙lemma RS_integral_bound_above {f:ℝ → ℝ} {I: BoundedInterval} (h: BddOn f I) {α:ℝ → ℝ} (hα: Monotone α): BddAbove ((PiecewiseConstantOn.RS_integ · I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}) := f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone α⊢ BddAbove ((fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}) f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone α⊢ ∃ x, ∀ y ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}, y ≤ x; f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone α⊢ ∀ y ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}, y ≤ ⋯.some intro b f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone αb:ℝhb:b ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}⊢ b ≤ ⋯.some; All goals completed! 🐙lemma le_lower_RS_integral {f:ℝ → ℝ} {I: BoundedInterval} {M:ℝ} (h: ∀ x ∈ (I:Set ℝ), |f x| ≤ M) {α:ℝ → ℝ} (hα: Monotone α) : -M * α[I]ₗ ≤ lower_RS_integral f I α := le_csSup (RS_integral_bound_above (BddOn.of_bounded h) hα) (RS_integral_bound_lower_of_bounded h hα)lemma lower_RS_integral_le_upper {f:ℝ → ℝ} {I: BoundedInterval} (h: BddOn f I) {α:ℝ → ℝ} (hα: Monotone α) : lower_RS_integral f I α ≤ upper_RS_integral f I α := f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone α⊢ lower_RS_integral f I α ≤ upper_RS_integral f I α f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone α⊢ ∀ b ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}, b ≤ upper_RS_integral f I α f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone αb✝:ℝa✝:b✝ ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}⊢ b✝ ≤ upper_RS_integral f I α f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone αb✝:ℝa✝:b✝ ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}⊢ ∀ b ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}, b✝ ≤ b f:ℝ → ℝI:BoundedIntervalh:BddOn f ↑Iα:ℝ → ℝhα:Monotone αb✝¹:ℝa✝¹:b✝ ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}b✝:ℝa✝:b✝ ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}⊢ b✝¹ ≤ b✝; All goals completed! 🐙lemma RS_upper_integral_le {f:ℝ → ℝ} {I: BoundedInterval} {M:ℝ} (h: ∀ x ∈ (I:Set ℝ), |f x| ≤ M) {α:ℝ → ℝ} (hα: Monotone α) : upper_RS_integral f I α ≤ M * α[I]ₗ := csInf_le (RS_integral_bound_below (.of_bounded h) hα) (RS_integral_bound_upper_of_bounded h hα)lemma upper_RS_integral_le_integ {f g:ℝ → ℝ} {I: BoundedInterval} (hf: BddOn f I) (hfg: MajorizesOn g f I) (hg: PiecewiseConstantOn g I) {α:ℝ → ℝ} (hα: Monotone α) : upper_RS_integral f I α ≤ PiecewiseConstantOn.RS_integ g I α := csInf_le (RS_integral_bound_below hf hα) ⟨ g, f:ℝ → ℝg:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Ihfg:MajorizesOn g f Ihg:PiecewiseConstantOn g Iα:ℝ → ℝhα:Monotone α⊢ g ∈ {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I} ∧ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) g = PiecewiseConstantOn.RS_integ g I α All goals completed! 🐙 ⟩lemma integ_le_lower_RS_integral {f h:ℝ → ℝ} {I: BoundedInterval} (hf: BddOn f I) (hfh: MinorizesOn h f I) (hg: PiecewiseConstantOn h I) {α:ℝ → ℝ} (hα: Monotone α) : PiecewiseConstantOn.RS_integ h I α ≤ lower_RS_integral f I α := le_csSup (RS_integral_bound_above hf hα) ⟨ h, f:ℝ → ℝh:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Ihfh:MinorizesOn h f Ihg:PiecewiseConstantOn h Iα:ℝ → ℝhα:Monotone α⊢ h ∈ {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I} ∧ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) h = PiecewiseConstantOn.RS_integ h I α All goals completed! 🐙 ⟩lemma lt_of_gt_upper_RS_integral {f:ℝ → ℝ} {I: BoundedInterval} (hf: BddOn f I) {α: ℝ → ℝ} (hα: Monotone α) {X:ℝ} (hX: upper_RS_integral f I α < X ) : ∃ g, MajorizesOn g f I ∧ PiecewiseConstantOn g I ∧ PiecewiseConstantOn.RS_integ g I α < X := f:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Iα:ℝ → ℝhα:Monotone αX:ℝhX:upper_RS_integral f I α < X⊢ ∃ g, MajorizesOn g f I ∧ PiecewiseConstantOn g I ∧ PiecewiseConstantOn.RS_integ g I α < X f:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Iα:ℝ → ℝhα:Monotone αX:ℝhX:upper_RS_integral f I α < XY:ℝhY:Y ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MajorizesOn g f I ∧ PiecewiseConstantOn g I}hYX:Y < X⊢ ∃ g, MajorizesOn g f I ∧ PiecewiseConstantOn g I ∧ PiecewiseConstantOn.RS_integ g I α < X f:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Iα:ℝ → ℝhα:Monotone αX:ℝhX:upper_RS_integral f I α < XY:ℝhYX:Y < XhY:∃ x, (MajorizesOn x f I ∧ PiecewiseConstantOn x I) ∧ PiecewiseConstantOn.RS_integ x I α = Y⊢ ∃ g, MajorizesOn g f I ∧ PiecewiseConstantOn g I ∧ PiecewiseConstantOn.RS_integ g I α < X; f:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Iα:ℝ → ℝhα:Monotone αX:ℝhX:upper_RS_integral f I α < XY:ℝhYX:Y < XhY:∃ x, (MajorizesOn x f I ∧ PiecewiseConstantOn x I) ∧ PiecewiseConstantOn.RS_integ x I α = Yg:ℝ → ℝhmaj:MajorizesOn g f Ihgp:PiecewiseConstantOn g Ihgi:PiecewiseConstantOn.RS_integ g I α = Y⊢ ∃ g, MajorizesOn g f I ∧ PiecewiseConstantOn g I ∧ PiecewiseConstantOn.RS_integ g I α < X; exact ⟨ g, hmaj, hgp, f:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Iα:ℝ → ℝhα:Monotone αX:ℝhX:upper_RS_integral f I α < XY:ℝhYX:Y < XhY:∃ x, (MajorizesOn x f I ∧ PiecewiseConstantOn x I) ∧ PiecewiseConstantOn.RS_integ x I α = Yg:ℝ → ℝhmaj:MajorizesOn g f Ihgp:PiecewiseConstantOn g Ihgi:PiecewiseConstantOn.RS_integ g I α = Y⊢ PiecewiseConstantOn.RS_integ g I α < X rwa [hgif:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Iα:ℝ → ℝhα:Monotone αX:ℝhX:upper_RS_integral f I α < XY:ℝhYX:Y < XhY:∃ x, (MajorizesOn x f I ∧ PiecewiseConstantOn x I) ∧ PiecewiseConstantOn.RS_integ x I α = Yg:ℝ → ℝhmaj:MajorizesOn g f Ihgp:PiecewiseConstantOn g Ihgi:PiecewiseConstantOn.RS_integ g I α = Y⊢ Y < X ⟩lemma gt_of_lt_lower_RS_integral {f:ℝ → ℝ} {I: BoundedInterval} (hf: BddOn f I) {α:ℝ → ℝ} (hα: Monotone α) {X:ℝ} (hX: X < lower_RS_integral f I α) : ∃ h, MinorizesOn h f I ∧ PiecewiseConstantOn h I ∧ X < PiecewiseConstantOn.RS_integ h I α := f:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Iα:ℝ → ℝhα:Monotone αX:ℝhX:X < lower_RS_integral f I α⊢ ∃ h, MinorizesOn h f I ∧ PiecewiseConstantOn h I ∧ X < PiecewiseConstantOn.RS_integ h I α f:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Iα:ℝ → ℝhα:Monotone αX:ℝhX:X < lower_RS_integral f I αY:ℝhY:Y ∈ (fun x ↦ PiecewiseConstantOn.RS_integ x I α) '' {g | MinorizesOn g f I ∧ PiecewiseConstantOn g I}hYX:X < Y⊢ ∃ h, MinorizesOn h f I ∧ PiecewiseConstantOn h I ∧ X < PiecewiseConstantOn.RS_integ h I α f:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Iα:ℝ → ℝhα:Monotone αX:ℝhX:X < lower_RS_integral f I αY:ℝhYX:X < YhY:∃ x, (MinorizesOn x f I ∧ PiecewiseConstantOn x I) ∧ PiecewiseConstantOn.RS_integ x I α = Y⊢ ∃ h, MinorizesOn h f I ∧ PiecewiseConstantOn h I ∧ X < PiecewiseConstantOn.RS_integ h I α; f:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Iα:ℝ → ℝhα:Monotone αX:ℝhX:X < lower_RS_integral f I αY:ℝhYX:X < YhY:∃ x, (MinorizesOn x f I ∧ PiecewiseConstantOn x I) ∧ PiecewiseConstantOn.RS_integ x I α = Yh:ℝ → ℝhmin:MinorizesOn h f Ihhp:PiecewiseConstantOn h Ihhi:PiecewiseConstantOn.RS_integ h I α = Y⊢ ∃ h, MinorizesOn h f I ∧ PiecewiseConstantOn h I ∧ X < PiecewiseConstantOn.RS_integ h I α; exact ⟨ h, hmin, hhp, f:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Iα:ℝ → ℝhα:Monotone αX:ℝhX:X < lower_RS_integral f I αY:ℝhYX:X < YhY:∃ x, (MinorizesOn x f I ∧ PiecewiseConstantOn x I) ∧ PiecewiseConstantOn.RS_integ x I α = Yh:ℝ → ℝhmin:MinorizesOn h f Ihhp:PiecewiseConstantOn h Ihhi:PiecewiseConstantOn.RS_integ h I α = Y⊢ X < PiecewiseConstantOn.RS_integ h I α rwa [hhif:ℝ → ℝI:BoundedIntervalhf:BddOn f ↑Iα:ℝ → ℝhα:Monotone αX:ℝhX:X < lower_RS_integral f I αY:ℝhYX:X < YhY:∃ x, (MinorizesOn x f I ∧ PiecewiseConstantOn x I) ∧ PiecewiseConstantOn.RS_integ x I α = Yh:ℝ → ℝhmin:MinorizesOn h f Ihhp:PiecewiseConstantOn h Ihhi:PiecewiseConstantOn.RS_integ h I α = Y⊢ X < Y ⟩

Analogue of Definition 11.3.4

noncomputable abbrev RS_integ (f:ℝ → ℝ) (I: BoundedInterval) (α:ℝ → ℝ) : ℝ := upper_RS_integral f I α
noncomputable abbrev RS_IntegrableOn (f:ℝ → ℝ) (I: BoundedInterval) (α: ℝ → ℝ) : Prop := BddOn f I ∧ lower_RS_integral f I α = upper_RS_integral f I α

Analogue of various components of Lemma 11.3.3

theorem declaration uses `sorry`upper_RS_integral_eq_upper_integral (f:ℝ → ℝ) (I: BoundedInterval) : upper_RS_integral f I (fun x ↦ x) = upper_integral f I := f:ℝ → ℝI:BoundedInterval⊢ (upper_RS_integral f I fun x ↦ x) = upper_integral f I All goals completed! 🐙
theorem declaration uses `sorry`lower_RS_integral_eq_lower_integral (f:ℝ → ℝ) (I: BoundedInterval) : lower_RS_integral f I (fun x ↦ x) = lower_integral f I := f:ℝ → ℝI:BoundedInterval⊢ (lower_RS_integral f I fun x ↦ x) = lower_integral f I All goals completed! 🐙theorem declaration uses `sorry`RS_integ_eq_integ (f:ℝ → ℝ) (I: BoundedInterval) : RS_integ f I (fun x ↦ x) = integ f I := f:ℝ → ℝI:BoundedInterval⊢ (RS_integ f I fun x ↦ x) = integ f I All goals completed! 🐙theorem declaration uses `sorry`RS_IntegrableOn_iff_IntegrableOn (f:ℝ → ℝ) (I: BoundedInterval) : RS_IntegrableOn f I (fun x ↦ x) ↔ IntegrableOn f I := f:ℝ → ℝI:BoundedInterval⊢ (RS_IntegrableOn f I fun x ↦ x) ↔ IntegrableOn f I All goals completed! 🐙

Exercise 11.8.4

theorem declaration uses `sorry`RS_integ_of_uniform_cts {I: BoundedInterval} {f:ℝ → ℝ} (hf: UniformContinuousOn f I) {α:ℝ → ℝ} (hα: Monotone α): RS_IntegrableOn f I α := I:BoundedIntervalf:ℝ → ℝhf:UniformContinuousOn f ↑Iα:ℝ → ℝhα:Monotone α⊢ RS_IntegrableOn f I α All goals completed! 🐙

Exercise 11.8.5

theorem declaration uses `sorry`RS_integ_with_sign (f:ℝ → ℝ) (hf: ContinuousOn f (.Icc (-1) 1)) : RS_IntegrableOn f (Icc (-1) 1) Real.sign ∧ RS_integ f (Icc (-1) 1) Real.sign = 2 * f 0 := f:ℝ → ℝhf:ContinuousOn f (Set.Icc (-1) 1)⊢ RS_IntegrableOn f (Icc (-1) 1) Real.sign ∧ RS_integ f (Icc (-1) 1) Real.sign = 2 * f 0 All goals completed! 🐙

Analogue of Lemma 11.3.7

theorem declaration uses `sorry`RS_integ_of_piecewise_const {f:ℝ → ℝ} {I: BoundedInterval} (hf: PiecewiseConstantOn f I) {α: ℝ → ℝ} (hα: Monotone α): RS_IntegrableOn f I α ∧ RS_integ f I α = PiecewiseConstantOn.RS_integ f I α := f:ℝ → ℝI:BoundedIntervalhf:PiecewiseConstantOn f Iα:ℝ → ℝhα:Monotone α⊢ RS_IntegrableOn f I α ∧ RS_integ f I α = PiecewiseConstantOn.RS_integ f I α All goals completed! 🐙
end Chapter11