Chapter 08 — Lebesgue Integration

Proofs omitted. Hover over highlighted terms to see their Lean types.

Reading sections

8.1 — Simple Functions — Part 1

Lean authors: Zichen Wang, Wanli Ma, Min Cui, Zaiwen Wen.

Source header

Definition 8.1 (Simple functions): for a function f : Ω → ℝ on a measurable-domain subset Ω ⊆ ℝ^n, being simple means Ω is measurable, f is measurable, and f takes only finitely many values (equivalently, f(Ω) is finite).

def IsSimpleFunction {n : ℕ} (Ω : Set (Fin n → ℝ)) (f : Ω → ℝ) : Prop := MeasurableSet Ω ∧ Measurable f ∧ (Set.range f).Finite

Lean source

Lemma 8.1: simple functions are closed under pointwise addition and scalar multiplication.

theorem lemma_8_1 {n : ℕ} {Ω : Set (Fin n → ℝ)} {f g : Ω → ℝ} (hf : IsSimpleFunction Ω f) (hg : IsSimpleFunction Ω g) : IsSimpleFunction Ω (fun x : Ω => f x + g x) ∧ ∀ c : ℝ, IsSimpleFunction Ω (fun x : Ω => c * f x)

Lean source

Definition 8.2 (Characteristic function): for a measurable set Ω ⊆ ℝ^n and a measurable subset E ⊆ Ω, the characteristic (indicator) function χ_E : Ω → ℝ is χ_E(x) = 1 for x ∈ E and χ_E(x) = 0 for x ∉ E.

noncomputable def characteristicFunction {n : ℕ} (Ω : Set (Fin n → ℝ)) (E : Set Ω) : Ω → ℝ := letI : DecidablePred (fun y : Ω => y ∈ E) := Classical.decPred (fun y : Ω => y ∈ E) fun x => if x ∈ E then 1 else 0

Lean source

Lemma 8.2: if f : Ω → ℝ is simple, then there are N : ℕ, coefficients c : Fin N → ℝ, and pairwise disjoint measurable sets E i ⊆ Ω such that f = ∑ i=1^N c_i χ_{E_i} on Ω. In this file, IsSimpleFunction Ω f (Definition 8.1) already packages that Ω is measurable, f is measurable, and f has finite range; the book's phrase "simple, i.e. finitely many values" is used as shorthand.

theorem lemma_8_2 {n : ℕ} {Ω : Set (Fin n → ℝ)} {f : Ω → ℝ} (hΩ : MeasurableSet Ω) (hf : IsSimpleFunction Ω f) : ∃ N : ℕ, ∃ c : Fin N → ℝ, ∃ E : Fin N → Set (Fin n → ℝ), (∀ i : Fin N, MeasurableSet (E i)) ∧ (∀ i : Fin N, E i ⊆ Ω) ∧ Pairwise (fun i j : Fin N => Disjoint (E i) (E j)) ∧ ∀ x : Fin n → ℝ, ∀ hx : x ∈ Ω, f ⟨x, hx⟩ = (Finset.univ : Finset (Fin N)).sum (fun i : Fin N => c i * Set.indicator (E i) (fun _ : Fin n → ℝ => (1 : ℝ)) x)

Lean source

A non-negative simple real-valued function on Ω.

def NonnegSimpleFunction {n : ℕ} (Ω : Set (Fin n → ℝ)) : Type _ := { f : Ω → ℝ // IsSimpleFunction Ω f ∧ ∀ x : Ω, 0 ≤ f x }

Lean source

Definition 8.3 (Lebesgue integral of a non-negative simple function): for f : Ω → [0, ∞) simple, define ∫_Ω f dm = ∑_{λ ∈ f(Ω), λ > 0} λ * m({x ∈ Ω | f x = λ}).

noncomputable def lebesgueIntegralNonnegSimple {n : ℕ} {Ω : Set (Fin n → ℝ)} (f : NonnegSimpleFunction Ω) : ENNReal := (((f.2.1.2.2.toFinset).filter (fun r : ℝ => 0 < r)).sum (fun r : ℝ => ENNReal.ofReal r * MeasureTheory.volume (((↑) : Ω → Fin n → ℝ) '' (f.1 ⁻¹' {r}))))

Lean source

Proposition 8.1.1: for a non-negative simple function f on Ω, one has 0 ≤ ∫_Ω f dm ≤ ∞; moreover ∫_Ω f dm = 0 iff m({x ∈ Ω | f(x) ≠ 0}) = 0.

theorem lebesgueIntegralNonnegSimple_nonneg_le_top_and_eq_zero_iff {n : ℕ} {Ω : Set (Fin n → ℝ)} (f : NonnegSimpleFunction Ω) : (0 : ENNReal) ≤ lebesgueIntegralNonnegSimple f ∧ lebesgueIntegralNonnegSimple f ≤ ⊤ ∧ (lebesgueIntegralNonnegSimple f = 0 ↔ MeasureTheory.volume (((↑) : Ω → Fin n → ℝ) '' {x : Ω | f.1 x ≠ 0}) = 0)

Lean source

Lemma 8.3: if Ω ⊆ ℝ^n is measurable and f : Ω → [0, +∞] is measurable, then there exists a sequence (f_n) of nonnegative simple functions f_n : Ω → ℝ such that (i) 0 ≤ f_n ≤ f_{n+1} pointwise, and (ii) for every x ∈ Ω, f_n x converges to f x in [0, +∞] (via ENNReal.ofReal).

theorem lemma_8_3 {n : ℕ} {Ω : Set (Fin n → ℝ)} (hΩ : MeasurableSet Ω) {f : Ω → ENNReal} (hf : Measurable f) : ∃ fSeq : ℕ → Ω → ℝ, (∀ n : ℕ, IsSimpleFunction Ω (fSeq n)) ∧ (∀ n : ℕ, ∀ x : Ω, 0 ≤ fSeq n x ∧ fSeq n x ≤ fSeq (n + 1) x) ∧ ∀ x : Ω, Filter.Tendsto (fun n : ℕ => ENNReal.ofReal (fSeq n x)) Filter.atTop (nhds (f x))

Lean source

Lemma 8.4: if a nonnegative simple function on Ω is represented by a finite pairwise-disjoint indicator expansion ∑ c_i χ_{E_i}, then its integral is ∑ c_i m(E_i).

theorem lemma_8_4 {n N : ℕ} {Ω : Set (Fin n → ℝ)} (E : Fin N → Set (Fin n → ℝ)) (hE_meas : ∀ i : Fin N, MeasurableSet (E i)) (hE_subset : ∀ i : Fin N, E i ⊆ Ω) (hE_disjoint : Pairwise (fun i j : Fin N => Disjoint (E i) (E j))) (c : Fin N → ℝ) (hc_nonneg : ∀ i : Fin N, 0 ≤ c i) (f : NonnegSimpleFunction Ω) (hf_repr : ∀ x : Fin n → ℝ, ∀ hx : x ∈ Ω, f.1 ⟨x, hx⟩ = (Finset.univ : Finset (Fin N)).sum (fun i : Fin N => c i * Set.indicator (E i) (fun _ : Fin n → ℝ => (1 : ℝ)) x)) : lebesgueIntegralNonnegSimple f = (Finset.univ : Finset (Fin N)).sum (fun i : Fin N => ENNReal.ofReal (c i) * MeasureTheory.volume (E i))

Lean source

Helper for Lemma 8.1: the range of a pointwise sum is contained in the image of the sum-map on the product of ranges.

lemma helperForLemma_8_1_range_add_subset_image_prod {n : ℕ} {Ω : Set (Fin n → ℝ)} (f g : Ω → ℝ) : Set.range (fun x : Ω => f x + g x) ⊆ (fun p : ℝ × ℝ => p.1 + p.2) '' ((Set.range f) ×ˢ (Set.range g))

Lean source

Helper for Lemma 8.1: finite range is preserved by pointwise addition.

lemma helperForLemma_8_1_range_add_finite {n : ℕ} {Ω : Set (Fin n → ℝ)} (f g : Ω → ℝ) (hf : (Set.range f).Finite) (hg : (Set.range g).Finite) : (Set.range (fun x : Ω => f x + g x)).Finite

Lean source

Helper for Lemma 8.1: finite range is preserved by scalar multiplication.

lemma helperForLemma_8_1_range_constMul_finite {n : ℕ} {Ω : Set (Fin n → ℝ)} (f : Ω → ℝ) (c : ℝ) (hf : (Set.range f).Finite) : (Set.range (fun x : Ω => c * f x)).Finite

Lean source

Helper for Lemma 8.1: simple functions are closed under pointwise addition.

namespace IsSimpleFunction lemma add {n : ℕ} {Ω : Set (Fin n → ℝ)} {f g : Ω → ℝ} (hf : IsSimpleFunction Ω f) (hg : IsSimpleFunction Ω g) : IsSimpleFunction Ω (fun x : Ω => f x + g x)

Lean source

Helper for Lemma 8.1: simple functions are closed under real scalar multiplication.

namespace IsSimpleFunction lemma const_mul {n : ℕ} {Ω : Set (Fin n → ℝ)} {f : Ω → ℝ} (hf : IsSimpleFunction Ω f) (c : ℝ) : IsSimpleFunction Ω (fun x : Ω => c * f x)

Lean source

Helper for Lemma 8.2: indexing coefficients by an equivalence with Fin N is injective after coercing from Set.range f to ℝ.

lemma helperForLemma_8_2_coeffIndexing_injective {n N : ℕ} {Ω : Set (Fin n → ℝ)} {f : Ω → ℝ} (e : Fin N ≃ Set.range f) : Function.Injective (fun i : Fin N => (e i).1)

Lean source

Helper for Lemma 8.2: the ambient-space fibers of a measurable f : Ω → ℝ are measurable and lie inside Ω.

lemma helperForLemma_8_2_fiberSets_measurable_subset {n N : ℕ} {Ω : Set (Fin n → ℝ)} {f : Ω → ℝ} (hΩ : MeasurableSet Ω) (hf_meas : Measurable f) (c : Fin N → ℝ) : (∀ i : Fin N, MeasurableSet (((↑) : Ω → Fin n → ℝ) '' (f ⁻¹' {c i}))) ∧ (∀ i : Fin N, (((↑) : Ω → Fin n → ℝ) '' (f ⁻¹' {c i})) ⊆ Ω)

Lean source

Helper for Lemma 8.2: for x ∈ Ω, membership in an ambient fiber is equivalent to the corresponding value equation for f.

lemma helperForLemma_8_2_mem_fiberSet_iff {n N : ℕ} {Ω : Set (Fin n → ℝ)} {f : Ω → ℝ} (c : Fin N → ℝ) {x : Fin n → ℝ} (hx : x ∈ Ω) (i : Fin N) : x ∈ (((↑) : Ω → Fin n → ℝ) '' (f ⁻¹' {c i})) ↔ f ⟨x, hx⟩ = c i

Lean source

Helper for Lemma 8.2: distinct fibers of coefficient values are disjoint.

lemma helperForLemma_8_2_pairwiseDisjoint_fiberSets {n N : ℕ} {Ω : Set (Fin n → ℝ)} {f : Ω → ℝ} (c : Fin N → ℝ) (hc_inj : Function.Injective c) : Pairwise (fun i j : Fin N => Disjoint (((↑) : Ω → Fin n → ℝ) '' (f ⁻¹' {c i})) (((↑) : Ω → Fin n → ℝ) '' (f ⁻¹' {c j})))

Lean source

Helper for Lemma 8.2: at each x ∈ Ω, the finite coefficient/indicator sum collapses to the unique index corresponding to the value f x.

lemma helperForLemma_8_2_pointwise_sum_representation {n N : ℕ} {Ω : Set (Fin n → ℝ)} {f : Ω → ℝ} (e : Fin N ≃ Set.range f) {x : Fin n → ℝ} (hx : x ∈ Ω) : f ⟨x, hx⟩ = (Finset.univ : Finset (Fin N)).sum (fun i : Fin N => (e i).1 * Set.indicator (((↑) : Ω → Fin n → ℝ) '' (f ⁻¹' {(e i).1})) (fun _ : Fin n → ℝ => (1 : ℝ)) x)

Lean source

Helper for Proposition 8.1.1: the integral sum is zero exactly when each positive-value fiber has zero ambient volume.

lemma helperForProposition_8_1_1_integral_eq_zero_iff_forall_posFiber_zero {n : ℕ} {Ω : Set (Fin n → ℝ)} (f : NonnegSimpleFunction Ω) : (((f.2.1.2.2.toFinset).filter (fun r : ℝ => 0 < r)).sum (fun r : ℝ => ENNReal.ofReal r * MeasureTheory.volume (((↑) : Ω → Fin n → ℝ) '' (f.1 ⁻¹' {r}))) = 0) ↔ ∀ r ∈ ((f.2.1.2.2.toFinset).filter (fun r : ℝ => 0 < r)), MeasureTheory.volume (((↑) : Ω → Fin n → ℝ) '' (f.1 ⁻¹' {r})) = 0

Lean source

Helper for Proposition 8.1.1: each positive-value fiber is contained in the ambient nonzero image of f.

lemma helperForProposition_8_1_1_posFiber_subset_nonzeroImage {n : ℕ} {Ω : Set (Fin n → ℝ)} (f : NonnegSimpleFunction Ω) {r : ℝ} (hr : r ∈ ((f.2.1.2.2.toFinset).filter (fun t : ℝ => 0 < t))) : (((↑) : Ω → Fin n → ℝ) '' (f.1 ⁻¹' {r})) ⊆ (((↑) : Ω → Fin n → ℝ) '' {x : Ω | f.1 x ≠ 0})

Lean source

Helper for Proposition 8.1.1: every ambient nonzero point belongs to a positive-value fiber from the finite range of f.

lemma helperForProposition_8_1_1_nonzeroImage_subset_iUnion_posFibers {n : ℕ} {Ω : Set (Fin n → ℝ)} (f : NonnegSimpleFunction Ω) : (((↑) : Ω → Fin n → ℝ) '' {x : Ω | f.1 x ≠ 0}) ⊆ (⋃ r ∈ ((f.2.1.2.2.toFinset).filter (fun t : ℝ => 0 < t)), (((↑) : Ω → Fin n → ℝ) '' (f.1 ⁻¹' {r})))

Lean source

Helper for Proposition 8.1.1: a finite union has zero volume when each indexed piece has zero volume.

lemma helperForProposition_8_1_1_union_volume_zero_of_fibers_zero {n : ℕ} (S : Finset ℝ) (F : ℝ → Set (Fin n → ℝ)) (hvol : ∀ r ∈ S, MeasureTheory.volume (F r) = 0) : MeasureTheory.volume (⋃ r ∈ S, F r) = 0

Lean source

Helper for Lemma 8.3: each approximation x ↦ (eapprox f k x).toReal is a simple function on Ω.

lemma helperForLemma_8_3_isSimple_toReal_eapprox {n : ℕ} {Ω : Set (Fin n → ℝ)} (hΩ : MeasurableSet Ω) {f : Ω → ENNReal} (k : ℕ) : IsSimpleFunction Ω (fun x : Ω => (MeasureTheory.SimpleFunc.eapprox f k x).toReal)

Lean source

Helper for Lemma 8.3: toReal ∘ eapprox is pointwise nonnegative and monotone in the approximation index.

lemma helperForLemma_8_3_nonneg_mono_toReal_eapprox {n : ℕ} {Ω : Set (Fin n → ℝ)} {f : Ω → ENNReal} (k : ℕ) (x : Ω) : 0 ≤ (MeasureTheory.SimpleFunc.eapprox f k x).toReal ∧ (MeasureTheory.SimpleFunc.eapprox f k x).toReal ≤ (MeasureTheory.SimpleFunc.eapprox f (k + 1) x).toReal

Lean source

Helper for Lemma 8.3: converting eapprox to ℝ and back with ofReal recovers the original ENNReal value.

lemma helperForLemma_8_3_ofReal_toReal_eapprox {n : ℕ} {Ω : Set (Fin n → ℝ)} {f : Ω → ENNReal} (x : Ω) (k : ℕ) : ENNReal.ofReal ((MeasureTheory.SimpleFunc.eapprox f k x).toReal) = MeasureTheory.SimpleFunc.eapprox f k x

Lean source

Helper for Lemma 8.3: ENNReal.ofReal applied to toReal ∘ eapprox converges pointwise to f.

lemma helperForLemma_8_3_tendsto_ofReal_toReal_eapprox {n : ℕ} {Ω : Set (Fin n → ℝ)} {f : Ω → ENNReal} (hf : Measurable f) (x : Ω) : Filter.Tendsto (fun k : ℕ => ENNReal.ofReal ((MeasureTheory.SimpleFunc.eapprox f k x).toReal)) Filter.atTop (nhds (f x))

Lean source

Helper for Lemma 8.4: if x lies in none of the sets E i, then the indicator expansion at x vanishes.

lemma helperForLemma_8_4_sum_indicator_eq_zero_of_not_mem {n N : ℕ} {E : Fin N → Set (Fin n → ℝ)} (c : Fin N → ℝ) {x : Fin n → ℝ} (hx : ∀ i : Fin N, x ∉ E i) : (Finset.univ : Finset (Fin N)).sum (fun i : Fin N => c i * Set.indicator (E i) (fun _ : Fin n → ℝ => (1 : ℝ)) x) = 0

Lean source

Helper for Lemma 8.4: if x ∈ E i, pairwise disjointness makes the indicator expansion collapse to c i.

lemma helperForLemma_8_4_sum_indicator_eq_coeff_of_mem {n N : ℕ} {E : Fin N → Set (Fin n → ℝ)} (hE_disjoint : Pairwise (fun i j : Fin N => Disjoint (E i) (E j))) (c : Fin N → ℝ) {x : Fin n → ℝ} {i : Fin N} (hxi : x ∈ E i) : (Finset.univ : Finset (Fin N)).sum (fun j : Fin N => c j * Set.indicator (E j) (fun _ : Fin n → ℝ => (1 : ℝ)) x) = c i

Lean source

Helper for Lemma 8.4: for positive r, membership in the r-fiber is equivalent to lying in some E i with coefficient c i = r.

lemma helperForLemma_8_4_value_pos_fiber_iff_exists_index {n N : ℕ} {Ω : Set (Fin n → ℝ)} {E : Fin N → Set (Fin n → ℝ)} (hE_disjoint : Pairwise (fun i j : Fin N => Disjoint (E i) (E j))) (c : Fin N → ℝ) (f : NonnegSimpleFunction Ω) (hf_repr : ∀ x : Fin n → ℝ, ∀ hx : x ∈ Ω, f.1 ⟨x, hx⟩ = (Finset.univ : Finset (Fin N)).sum (fun i : Fin N => c i * Set.indicator (E i) (fun _ : Fin n → ℝ => (1 : ℝ)) x)) {r : ℝ} (hr_pos : 0 < r) {x : Fin n → ℝ} (hxΩ : x ∈ Ω) : x ∈ (((↑) : Ω → Fin n → ℝ) '' (f.1 ⁻¹' {r})) ↔ ∃ i : Fin N, x ∈ E i ∧ c i = r

Lean source

Helper for Lemma 8.4: each positive fiber has measure equal to the sum of the measures of those E i whose coefficients equal that value.

lemma helperForLemma_8_4_measure_pos_fiber_as_filtered_sum {n N : ℕ} {Ω : Set (Fin n → ℝ)} {E : Fin N → Set (Fin n → ℝ)} (hE_meas : ∀ i : Fin N, MeasurableSet (E i)) (hE_subset : ∀ i : Fin N, E i ⊆ Ω) (hE_disjoint : Pairwise (fun i j : Fin N => Disjoint (E i) (E j))) (c : Fin N → ℝ) (f : NonnegSimpleFunction Ω) (hf_repr : ∀ x : Fin n → ℝ, ∀ hx : x ∈ Ω, f.1 ⟨x, hx⟩ = (Finset.univ : Finset (Fin N)).sum (fun i : Fin N => c i * Set.indicator (E i) (fun _ : Fin n → ℝ => (1 : ℝ)) x)) {r : ℝ} (hr_pos : 0 < r) : MeasureTheory.volume (((↑) : Ω → Fin n → ℝ) '' (f.1 ⁻¹' {r})) = (Finset.univ.filter (fun i : Fin N => c i = r)).sum (fun i : Fin N => MeasureTheory.volume (E i))

Lean source

Helper for Lemma 8.4: replacing positive values in the range of f by positive values in the coefficient-image changes only zero terms.

lemma helperForLemma_8_4_range_to_coeff_image_on_positive_part {n N : ℕ} {Ω : Set (Fin n → ℝ)} {E : Fin N → Set (Fin n → ℝ)} (hE_disjoint : Pairwise (fun i j : Fin N => Disjoint (E i) (E j))) (c : Fin N → ℝ) (f : NonnegSimpleFunction Ω) (hf_repr : ∀ x : Fin n → ℝ, ∀ hx : x ∈ Ω, f.1 ⟨x, hx⟩ = (Finset.univ : Finset (Fin N)).sum (fun i : Fin N => c i * Set.indicator (E i) (fun _ : Fin n → ℝ => (1 : ℝ)) x)) : (f.2.1.2.2.toFinset.filter (fun r : ℝ => 0 < r)).sum (fun r : ℝ => ENNReal.ofReal r * MeasureTheory.volume (((↑) : Ω → Fin n → ℝ) '' (f.1 ⁻¹' {r}))) = ((Finset.univ.image c).filter (fun r : ℝ => 0 < r)).sum (fun r : ℝ => ENNReal.ofReal r * MeasureTheory.volume (((↑) : Ω → Fin n → ℝ) '' (f.1 ⁻¹' {r})))

Lean source

Helper for Lemma 8.4: regrouping the coefficient-filtered double sum gives the direct index-sum formula.

lemma helperForLemma_8_4_reindex_double_sum_to_index_sum {n N : ℕ} (c : Fin N → ℝ) (hc_nonneg : ∀ i : Fin N, 0 ≤ c i) (E : Fin N → Set (Fin n → ℝ)) : ((Finset.univ.image c).filter (fun r : ℝ => 0 < r)).sum (fun r : ℝ => ENNReal.ofReal r * (Finset.univ.filter (fun i : Fin N => c i = r)).sum (fun i : Fin N => MeasureTheory.volume (E i))) = (Finset.univ : Finset (Fin N)).sum (fun i : Fin N => ENNReal.ofReal (c i) * MeasureTheory.volume (E i))

8.1 — Simple Functions — Part 2

Lean authors: Zichen Wang, Wanli Ma, Min Cui, Zaiwen Wen.

Source header

Pointwise sum of two non-negative simple functions on Ω.

noncomputable def NonnegSimpleFunction.add {n : ℕ} {Ω : Set (Fin n → ℝ)} (f g : NonnegSimpleFunction Ω) : NonnegSimpleFunction Ω := ⟨(fun x : Ω => f.1 x + g.1 x), ⟨IsSimpleFunction.add f.2.1 g.2.1, fun x : Ω => add_nonneg (f.2.2 x) (g.2.2 x)⟩⟩

Lean source

Proposition 8.1.2: for non-negative simple functions f, g : Ω → ℝ, the integral is additive: ∫_Ω (f + g) dm = ∫_Ω f dm + ∫_Ω g dm.

theorem lebesgueIntegralNonnegSimple_add {n : ℕ} {Ω : Set (Fin n → ℝ)} (f g : NonnegSimpleFunction Ω) : lebesgueIntegralNonnegSimple (NonnegSimpleFunction.add f g) = lebesgueIntegralNonnegSimple f + lebesgueIntegralNonnegSimple g

Lean source

Pointwise scalar multiplication of a non-negative simple function by a nonnegative real.

noncomputable def NonnegSimpleFunction.constMul {n : ℕ} {Ω : Set (Fin n → ℝ)} (c : ℝ) (hc : 0 ≤ c) (f : NonnegSimpleFunction Ω) : NonnegSimpleFunction Ω := ⟨(fun x : Ω => c * f.1 x), ⟨IsSimpleFunction.const_mul f.2.1 c, fun x : Ω => mul_nonneg hc (f.2.2 x)⟩⟩

Lean source

Proposition 8.1.3: if f : Ω → ℝ is a non-negative simple function and c > 0, then the integral scales linearly: ∫_Ω (c f) dm = c ∫_Ω f dm.

theorem lebesgueIntegralNonnegSimple_constMul {n : ℕ} {Ω : Set (Fin n → ℝ)} (f : NonnegSimpleFunction Ω) {c : ℝ} (hc : 0 < c) : lebesgueIntegralNonnegSimple (NonnegSimpleFunction.constMul c (le_of_lt hc) f) = ENNReal.ofReal c * lebesgueIntegralNonnegSimple f

Lean source

Proposition 8.1.4: if f, g : Ω → ℝ are non-negative simple functions and f(x) ≤ g(x) for every x ∈ Ω, then ∫_Ω f dm ≤ ∫_Ω g dm.

theorem lebesgueIntegralNonnegSimple_mono {n : ℕ} {Ω : Set (Fin n → ℝ)} (f g : NonnegSimpleFunction Ω) (hfg : ∀ x : Ω, f.1 x ≤ g.1 x) : lebesgueIntegralNonnegSimple f ≤ lebesgueIntegralNonnegSimple g

Lean source

Definition 8.4: A property P holds for almost every x ∈ Ω (with respect to μ) if there is a measurable null set N ⊆ Ω such that P x holds for all x ∈ Ω \ N.

def HoldsForAlmostEverywhereOn {α : Type*} [MeasurableSpace α] (μ : MeasureTheory.Measure α) (Ω : Set α) (P : α → Prop) : Prop := ∃ N : Set α, N ⊆ Ω ∧ MeasurableSet N ∧ μ N = 0 ∧ ∀ ⦃x : α⦄, x ∈ Ω \ N → P x

Lean source

Proposition 8.2: if f : α → [0, ∞] is measurable, then its integral is zero iff f x = 0 for μ-almost every x.

theorem proposition_8_2_lintegral_eq_zero_iff_holdsForAlmostEverywhereOn {α : Type*} [MeasurableSpace α] (μ : MeasureTheory.Measure α) {f : α → ENNReal} (hf : Measurable f) : (∫⁻ x, f x ∂ μ) = 0 ↔ f =ᵐ[μ] 0

Lean source

Helper for Proposition 8.1.4: the pointwise difference of two non-negative simple functions is simple.

lemma helperForProposition_8_1_4_difference_isSimple {n : ℕ} {Ω : Set (Fin n → ℝ)} (f g : NonnegSimpleFunction Ω) : IsSimpleFunction Ω (fun x : Ω => g.1 x - f.1 x)

Lean source

Helper for Proposition 8.1.4: if f ≤ g pointwise then g - f is pointwise nonnegative.

lemma helperForProposition_8_1_4_difference_nonneg {n : ℕ} {Ω : Set (Fin n → ℝ)} (f g : NonnegSimpleFunction Ω) (hfg : ∀ x : Ω, f.1 x ≤ g.1 x) : ∀ x : Ω, 0 ≤ g.1 x - f.1 x

Lean source

Helper for Proposition 8.1.4: the non-negative simple remainder g - f.

noncomputable def helperForProposition_8_1_4_difference {n : ℕ} {Ω : Set (Fin n → ℝ)} (f g : NonnegSimpleFunction Ω) (hfg : ∀ x : Ω, f.1 x ≤ g.1 x) : NonnegSimpleFunction Ω := ⟨(fun x : Ω => g.1 x - f.1 x), ⟨helperForProposition_8_1_4_difference_isSimple f g, helperForProposition_8_1_4_difference_nonneg f g hfg⟩⟩

Lean source

Helper for Proposition 8.1.4: f + (g - f) = g as non-negative simple functions.

lemma helperForProposition_8_1_4_add_difference_eq {n : ℕ} {Ω : Set (Fin n → ℝ)} (f g : NonnegSimpleFunction Ω) (hfg : ∀ x : Ω, f.1 x ≤ g.1 x) : NonnegSimpleFunction.add f (helperForProposition_8_1_4_difference f g hfg) = g

Lean source

Helper for Proposition 8.2: almost-everywhere vanishing gives a null nonzero set.

lemma helperForProposition_8_2_nonzeroSetNull_of_aeEqZero {α : Type*} [MeasurableSpace α] {μ : MeasureTheory.Measure α} {f : α → ENNReal} (hAe : f =ᵐ[μ] 0) : μ {x | f x ≠ 0} = 0

Lean source

Helper for Proposition 8.2: convert f = 0 almost everywhere to Definition 8.4 on univ.

lemma helperForProposition_8_2_holdsOnUniv_of_aeEqZero {α : Type*} [MeasurableSpace α] {μ : MeasureTheory.Measure α} {f : α → ENNReal} (hf : Measurable f) : (f =ᵐ[μ] 0) → HoldsForAlmostEverywhereOn μ Set.univ (fun x => f x = 0)

Lean source

Helper for Proposition 8.2: convert Definition 8.4 on univ to f = 0 almost everywhere.

lemma helperForProposition_8_2_aeEqZero_of_holdsOnUniv {α : Type*} [MeasurableSpace α] {μ : MeasureTheory.Measure α} {f : α → ENNReal} : HoldsForAlmostEverywhereOn μ Set.univ (fun x => f x = 0) → (f =ᵐ[μ] 0)

Lean source

Helper for Proposition 8.2: Definition 8.4 on univ is equivalent to f = 0 almost everywhere.

lemma helperForProposition_8_2_holdsOnUniv_iff_aeEqZero {α : Type*} [MeasurableSpace α] {μ : MeasureTheory.Measure α} {f : α → ENNReal} (hf : Measurable f) : HoldsForAlmostEverywhereOn μ Set.univ (fun x => f x = 0) ↔ (f =ᵐ[μ] 0)

8.2 — Integration of Non-negative Measurable Functions — Part 1

Lean authors: Zichen Wang, Wanli Ma, Min Cui, Zaiwen Wen.

Source header

Definition 8.5 (Majorization): for functions f, g : Ω → ℝ, f majorizes g (equivalently, g minorizes f) iff ∀ x : Ω, f x ≥ g x.

def Majorizes {Ω : Type*} (f g : Ω → ℝ) : Prop := ∀ x : Ω, f x ≥ g x

Lean source

Integral of a nonnegative function over a set, encoded via an indicator on the ambient space.

noncomputable def integralOver {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) (Ω : Set X) (f : X → ENNReal) : ENNReal := ∫⁻ x, Set.indicator Ω f x ∂μ

Lean source

Rewrite the indicator-based set integral as a restricted lintegral.

lemma helperForProposition_8_3_1_integralOver_eq_setLIntegral {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) {Ω : Set X} (hΩ : MeasurableSet Ω) (f : X → ENNReal) : integralOver μ Ω f = ∫⁻ x in Ω, f x ∂μ

Lean source

A restricted lintegral vanishes iff the function vanishes almost everywhere on the set.

lemma helperForProposition_8_3_1_setLIntegral_eq_zero_iff_aeOn {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) {Ω : Set X} (hΩ : MeasurableSet Ω) {f : X → ENNReal} (hf : Measurable f) : (∫⁻ x in Ω, f x ∂μ = 0) ↔ ∀ᵐ x ∂μ, x ∈ Ω → f x = 0

Lean source

The integral over a set is bounded between 0 and ⊤.

lemma helperForProposition_8_3_1_integralOver_nonneg_le_top {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) (Ω : Set X) (f : X → ENNReal) : 0 ≤ integralOver μ Ω f ∧ integralOver μ Ω f ≤ ⊤

Lean source

Bridge restricted-measure a.e. and ambient a.e.-on-set formulations.

lemma helperForProposition_8_3_1_aeOn_restrict_bridge {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) {Ω : Set X} (hΩ : MeasurableSet Ω) (f : X → ENNReal) : (∀ᵐ x ∂μ.restrict Ω, f x = 0) ↔ ∀ᵐ x ∂μ, x ∈ Ω → f x = 0

Lean source

Proposition 8.3.1: for a measurable set Ω and measurable f : X → [0, ∞], the indicator-based integral over Ω is in [0, ∞], and it is zero iff f = 0 for μ-almost every x ∈ Ω.

theorem proposition_8_3_1 {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) {Ω : Set X} (hΩ : MeasurableSet Ω) {f : X → ENNReal} (hf : Measurable f) : (0 ≤ integralOver μ Ω f ∧ integralOver μ Ω f ≤ ⊤) ∧ (integralOver μ Ω f = 0 ↔ ∀ᵐ x ∂μ, x ∈ Ω → f x = 0)

Lean source

Proposition 8.3.2: for a measurable set Ω and measurable f : X → [0, ∞], if c > 0 then integrating cf over Ω scales the integral by c.

theorem proposition_8_3_2 {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) {Ω : Set X} (hΩ : MeasurableSet Ω) {f : X → ENNReal} (hf : Measurable f) (c : ENNReal) (hc : 0 < c) : integralOver μ Ω (fun x => c * f x) = c * integralOver μ Ω f

Lean source

Extension by zero from Ω to the ambient space.

noncomputable def extendByZero {X : Type*} (Ω : Set X) (f : Ω → ENNReal) : X → ENNReal := letI : DecidablePred (fun x => x ∈ Ω) := Classical.decPred (fun x => x ∈ Ω) fun x => if hx : x ∈ Ω then f ⟨x, hx⟩ else 0

Lean source

Proposition 8.3.3: if f, g : Ω → [0, ∞] are measurable and f x ≤ g x for all x ∈ Ω, then the indicator-defined integral over Ω is monotone after extending by zero: ∫_Ω f dμ ≤ ∫_Ω g dμ.

theorem proposition_8_3_3 {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) {Ω : Set X} (hΩ : MeasurableSet Ω) {f g : Ω → ENNReal} (hf : Measurable f) (hg : Measurable g) (hfg : ∀ x : Ω, f x ≤ g x) : integralOver μ Ω (extendByZero Ω f) ≤ integralOver μ Ω (extendByZero Ω g)

Lean source

Proposition 8.3.4: let Ω be measurable and let f, g : Ω → [0, ∞] be measurable. If f = g for μ-almost every x ∈ Ω, then their indicator-defined integrals over Ω are equal.

theorem proposition_8_3_4 {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) {Ω : Set X} (hΩ : MeasurableSet Ω) {f g : Ω → ENNReal} (hf : Measurable f) (hg : Measurable g) (hfg : ∀ᵐ x ∂μ, x ∈ Ω → extendByZero Ω f x = extendByZero Ω g x) : integralOver μ Ω (extendByZero Ω f) = integralOver μ Ω (extendByZero Ω g)

Lean source

Proposition 8.3.5: for measurable Ω' ⊆ Ω and measurable f : Ω → [0, ∞], the integral over Ω' equals the integral over Ω of extendByZero Ω f multiplied by χ_{Ω'}, and this quantity is at most the integral over Ω of extendByZero Ω f.

theorem proposition_8_3_5 {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) {Ω Ω' : Set X} (hΩ : MeasurableSet Ω) (hΩ' : MeasurableSet Ω') (hΩ'sub : Ω' ⊆ Ω) {f : Ω → ENNReal} (hf : Measurable f) : integralOver μ Ω' (extendByZero Ω f) = integralOver μ Ω (Set.indicator Ω' (extendByZero Ω f)) ∧ integralOver μ Ω (Set.indicator Ω' (extendByZero Ω f)) ≤ integralOver μ Ω (extendByZero Ω f)

Lean source

A non-negative simple function on Ω is a finite sum of non-negative coefficients times indicators of measurable subsets of Ω.

def IsNonnegativeSimpleFunctionOn {n : ℕ} (Ω : Set (Fin n → ℝ)) (s : (Fin n → ℝ) → ENNReal) : Prop := ∃ (m : ℕ) (a : Fin m → NNReal) (E : Fin m → Set (Fin n → ℝ)), (∀ k : Fin m, MeasurableSet (E k)) ∧ (∀ k : Fin m, E k ⊆ Ω) ∧ s = fun x => ∑ k : Fin m, (a k : ENNReal) * Set.indicator (E k) (fun _ => (1 : ENNReal)) x

Lean source

Integral formula for a represented non-negative simple function.

noncomputable def nonnegativeSimpleFunctionIntegral {n : ℕ} (m : ℕ) (a : Fin m → NNReal) (E : Fin m → Set (Fin n → ℝ)) : ENNReal := ∑ k : Fin m, (a k : ENNReal) * MeasureTheory.volume (E k)

Lean source

For a represented simple function, integration over Ω matches the coefficient-measure sum.

theorem lintegral_eq_nonnegativeSimpleFunctionIntegral {n : ℕ} (Ω : Set (Fin n → ℝ)) (m : ℕ) (a : Fin m → NNReal) (E : Fin m → Set (Fin n → ℝ)) (hE_meas : ∀ k : Fin m, MeasurableSet (E k)) (hE_sub : ∀ k : Fin m, E k ⊆ Ω) : (∫⁻ x in Ω, (∑ k : Fin m, (a k : ENNReal) * Set.indicator (E k) (fun _ => (1 : ENNReal)) x) ∂MeasureTheory.volume) = nonnegativeSimpleFunctionIntegral (n := n) m a E

Lean source

Supremum over non-negative simple functions bounded above by f on Ω.

noncomputable def lebesgueIntegralNonnegSup {n : ℕ} (Ω : Set (Fin n → ℝ)) (f : (Fin n → ℝ) → ENNReal) : ENNReal := ⨆ (s : (Fin n → ℝ) → ENNReal) (_hs : IsNonnegativeSimpleFunctionOn Ω s) (_hdom : ∀ x ∈ Ω, s x ≤ f x), ∫⁻ x in Ω, s x ∂MeasureTheory.volume

Lean source

Definition 8.6 (Lebesgue integral for non-negative functions): define ∫_Ω f dx by the restricted Lebesgue integral.

noncomputable def lebesgueIntegralNonneg {n : ℕ} (Ω : Set (Fin n → ℝ)) (f : (Fin n → ℝ) → ENNReal) : ENNReal := ∫⁻ x in Ω, f x ∂MeasureTheory.volume

Lean source

Lemma 8.5 (Interchange of addition and integration): if Ω ⊆ ℝ^n is measurable and f, g : Ω → [0, ∞] are measurable, then integrating f + g over Ω equals the sum of the integrals of f and g over Ω.

theorem lintegral_add_on_measurableSet_subtype {n : ℕ} {Ω : Set (Fin n → ℝ)} (hΩ : MeasurableSet Ω) {f g : Ω → ENNReal} (hf : Measurable f) (hg : Measurable g) : ∫⁻ x : Ω, (f x + g x) ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ))) = (∫⁻ x : Ω, f x ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ)))) + (∫⁻ x : Ω, g x ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ))))

Lean source

Lemma 8.6 (Fatou's lemma): if Ω ⊆ ℝ^n is measurable and f_n : Ω → [0, ∞] is measurable for each n, then ∫_Ω liminf_{n→∞} f_n ≤ liminf_{n→∞} ∫_Ω f_n.

theorem lintegral_liminf_le_liminf_lintegral_subtype {n : ℕ} {Ω : Set (Fin n → ℝ)} (hΩ : MeasurableSet Ω) (f : ℕ → Ω → ENNReal) (hf : ∀ k : ℕ, Measurable (f k)) : ∫⁻ x : Ω, Filter.liminf (fun k => f k x) Filter.atTop ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ))) ≤ Filter.liminf (fun k : ℕ => ∫⁻ x : Ω, f k x ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ)))) Filter.atTop

Lean source

A non-negative simple function on Ω vanishes outside Ω.

lemma isNonnegativeSimpleFunctionOn_eq_zero_outside {n : ℕ} {Ω : Set (Fin n → ℝ)} {s : (Fin n → ℝ) → ENNReal} (hs : IsNonnegativeSimpleFunctionOn Ω s) : ∀ x ∉ Ω, s x = 0

Lean source

An admissible non-negative simple minorant is bounded by the restricted integral of f.

lemma lintegral_le_of_isNonnegativeSimpleFunctionOn_minorized {n : ℕ} {Ω : Set (Fin n → ℝ)} {f s : (Fin n → ℝ) → ENNReal} (hs : IsNonnegativeSimpleFunctionOn Ω s) (hdom : ∀ x ∈ Ω, s x ≤ f x) : (∫⁻ x in Ω, s x ∂MeasureTheory.volume) ≤ (∫⁻ x in Ω, f x ∂MeasureTheory.volume)

Lean source

Restricting an NNReal simple function to measurable t ⊆ Ω yields an admissible non-negative simple function on Ω after coercion to ENNReal.

lemma isNonnegativeSimpleFunctionOn_of_restricted_nnreal_simpleFunc {n : ℕ} {Ω t : Set (Fin n → ℝ)} (ht : MeasurableSet t) (htΩ : t ⊆ Ω) (φ : MeasureTheory.SimpleFunc (Fin n → ℝ) NNReal) : IsNonnegativeSimpleFunctionOn Ω (fun x => ((φ.restrict t).map ((↑) : NNReal → ENNReal)) x)

Lean source

Under measurability assumptions on Ω and f, the restricted lintegral agrees with the supremum over non-negative simple functions bounded by f on Ω.

theorem lebesgueIntegralNonneg_eq_iSup_simple {n : ℕ} (Ω : Set (Fin n → ℝ)) (f : (Fin n → ℝ) → ENNReal) (hΩ : MeasureTheory.NullMeasurableSet Ω MeasureTheory.volume) (hf : AEMeasurable f (MeasureTheory.volume.restrict Ω)) : lebesgueIntegralNonneg Ω f = lebesgueIntegralNonnegSup Ω f

Lean source

Theorem 8.1 (Lebesgue monotone convergence theorem): if Ω ⊆ ℝ^n is measurable and f : ℕ → (Fin n → ℝ) → ENNReal is pointwise monotone on Ω (so f 0, f 1, ... models f₁, f₂, ...), then the restricted integrals are monotone and ∫_Ω (⨆ n, f n) = ⨆ n, ∫_Ω f n.

theorem lebesgue_monotone_convergence {n : ℕ} {Ω : Set (Fin n → ℝ)} (hΩ : MeasurableSet Ω) (f : ℕ → (Fin n → ℝ) → ENNReal) (hf_meas : ∀ n, Measurable (fun x : Ω => f n x)) (hmono : ∀ x ∈ Ω, Monotone (fun n => f n x)) : (0 ≤ lebesgueIntegralNonneg Ω (f 0) ∧ Monotone (fun n => lebesgueIntegralNonneg Ω (f n))) ∧ lebesgueIntegralNonneg Ω (fun x => ⨆ n, f n x) = ⨆ n, lebesgueIntegralNonneg Ω (f n)

Lean source

Theorem 8.2: for a measurable set Ω ⊆ ℝ^n and measurable g_n : Ω → [0,∞], define G(x) = ∑' n, g (n + 1) x (series indexed by n ≥ 1). Then G is measurable and integrating G over Ω equals the sum of the integrals of the g_n, with values in [0,∞].

theorem lintegral_tsum_subtype_eq_tsum_lintegral_subtype {n : ℕ} {Ω : Set (Fin n → ℝ)} (hΩ : MeasurableSet Ω) (g : ℕ → Ω → ENNReal) (hg : ∀ k : ℕ, Measurable (g (k + 1))) : Measurable (fun x : Ω => ∑' k : ℕ, g (k + 1) x) ∧ (∫⁻ x : Ω, (∑' k : ℕ, g (k + 1) x) ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ)))) = ∑' k : ℕ, ∫⁻ x : Ω, g (k + 1) x ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ)))

Lean source

Proposition 8.4: for a measure space (Ω, 𝓕, μ) and a measurable function f : Ω → [0, +∞], if ∫⁻ ω, f ω ∂μ < +∞, then f ω < +∞ for μ-almost every ω.

theorem proposition_8_4_ae_lt_top_of_lintegral_lt_top {Ω : Type*} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) {f : Ω → ENNReal} (hf : Measurable f) (hfin : (∫⁻ ω, f ω ∂μ) < ⊤) : ∀ᵐ ω ∂μ, f ω < ⊤

Lean source

Lemma 8.7: if Ω ⊆ ℝ^n is measurable and f : Ω → [0, +∞] is measurable with ∫_Ω f dx < +∞, then f x < +∞ for almost every x ∈ Ω (equivalently, |{x ∈ Ω : f x = +∞}| = 0).

theorem lemma_8_7_ae_lt_top_on_measurable_set {n : ℕ} {Ω : Set (Fin n → ℝ)} (hΩ : MeasurableSet Ω) {f : Ω → ENNReal} (hf : Measurable f) (hfin : (∫⁻ x : Ω, f x ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ)))) < ⊤) : ∀ᵐ x : Ω ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ))), f x < ⊤

Lean source

Proposition 8.5: if Ω ⊆ ℝ^n is measurable and f, g : Ω → [0,+∞] are measurable, then ∫ (f + g) ≥ ∫ f + ∫ g over Ω (with respect to Lebesgue measure on the subtype).

theorem proposition_8_5_lintegral_add_ge {n : ℕ} {Ω : Set (Fin n → ℝ)} (hΩ : MeasurableSet Ω) {f g : Ω → ENNReal} (hf : Measurable f) (hg : Measurable g) : ∫⁻ x : Ω, (f x + g x) ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ))) ≥ (∫⁻ x : Ω, f x ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ)))) + (∫⁻ x : Ω, g x ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ))))

Lean source

Lemma 8.8 (Borel--Cantelli): for measurable sets Ω₁, Ω₂, ... ⊆ ℝ^n, if ∑' k, volume (Ω k) < ∞, then the limsup set ⋂ N, ⋃ k ≥ N, Ω k has Lebesgue measure zero.

theorem lemma_8_8_borel_cantelli {n : ℕ} (Ω : ℕ → Set (Fin n → ℝ)) (hmeas : ∀ k : ℕ, MeasurableSet (Ω k)) (hsum : (∑' k : ℕ, MeasureTheory.volume (Ω k)) < ⊤) : MeasureTheory.volume (⋂ N : ℕ, ⋃ k ≥ N, Ω k) = 0

Lean source

Proposition 8.6: let p > 2 and c > 0, and define E = {x ∈ [0,1] : |x - a / q| ≤ c / q^p for infinitely many positive integer pairs (a,q)}. Then E has Lebesgue measure zero.

theorem proposition_8_6_measure_zero_of_infinitely_many_rational_approximations {p c : ℝ} (hp : 2 < p) (hc : 0 < c) : MeasureTheory.volume {x : ℝ | x ∈ Set.Icc (0 : ℝ) 1 ∧ Set.Infinite {aq : ℕ × ℕ | 0 < aq.1 ∧ 0 < aq.2 ∧ |x - (aq.1 : ℝ) / (aq.2 : ℝ)| ≤ c / (aq.2 : ℝ) ^ p}} = 0

Lean source

Definition 8.7: a real number x is diophantine if there exist constants p > 0 and C > 0 such that |x - a/q| > C / |q|^p for every nonzero integer q and every integer a.

def IsDiophantineReal (x : ℝ) : Prop := ∃ p C : ℝ, 0 < p ∧ 0 < C ∧ ∀ q : ℤ, q ≠ 0 → ∀ a : ℤ, |x - (a : ℝ) / (q : ℝ)| > C / (Int.natAbs q : ℝ) ^ p

Lean source

Helper for Proposition 8.3.4: convert a.e.-on-Ω equality into a.e. equality of indicator integrands.

lemma helperForProposition_8_3_4_ae_indicator_congr {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) {Ω : Set X} {u v : X → ENNReal} (huv : ∀ᵐ x ∂μ, x ∈ Ω → u x = v x) : ∀ᵐ x ∂μ, Set.indicator Ω u x = Set.indicator Ω v x

Lean source

Helper for Proposition 8.3.4: a.e.-on-Ω equality implies equality of indicator-defined integrals over Ω.

lemma helperForProposition_8_3_4_integralOver_congr_aeOn {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) (Ω : Set X) {u v : X → ENNReal} (huv : ∀ᵐ x ∂μ, x ∈ Ω → u x = v x) : integralOver μ Ω u = integralOver μ Ω v

Lean source

Helper for Proposition 8.3.5: collapsing nested indicators when Ω' ⊆ Ω.

lemma helperForProposition_8_3_5_indicator_collapse_under_subset {X : Type*} {Ω Ω' : Set X} (hΩ'sub : Ω' ⊆ Ω) (u : X → ENNReal) : Set.indicator Ω (Set.indicator Ω' u) = Set.indicator Ω' u

Lean source

Helper for Proposition 8.3.5: rewriting the Ω'-integral as an Ω-integral of an indicator-restricted integrand.

lemma helperForProposition_8_3_5_integralOver_indicator_eq {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) {Ω Ω' : Set X} (hΩ'sub : Ω' ⊆ Ω) (u : X → ENNReal) : integralOver μ Ω' u = integralOver μ Ω (Set.indicator Ω' u)

Lean source

Helper for Proposition 8.3.5: monotonicity of integralOver under set inclusion.

lemma helperForProposition_8_3_5_integralOver_mono_subset {X : Type*} [MeasurableSpace X] (μ : MeasureTheory.Measure X) {Ω Ω' : Set X} (hΩ'sub : Ω' ⊆ Ω) (u : X → ENNReal) : integralOver μ Ω' u ≤ integralOver μ Ω u

Lean source

Helper for Theorem 8.1: rewrite lebesgueIntegralNonneg as a subtype-domain integral.

lemma helperForTheorem_8_1_subtypeIntegral_repr {n : ℕ} {Ω : Set (Fin n → ℝ)} (hΩ : MeasurableSet Ω) (g : (Fin n → ℝ) → ENNReal) : lebesgueIntegralNonneg Ω g = ∫⁻ x : Ω, g x ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ)))

Lean source

Helper for Theorem 8.1: pointwise monotonicity on Ω as monotonicity over the subtype.

lemma helperForTheorem_8_1_subtypePointwiseMonotone {n : ℕ} {Ω : Set (Fin n → ℝ)} (f : ℕ → (Fin n → ℝ) → ENNReal) (hmono : ∀ x ∈ Ω, Monotone (fun k => f k x)) : Monotone (fun k => fun x : Ω => f k x)

Lean source

Helper for Theorem 8.1: monotonicity of subtype integrals for a pointwise monotone sequence.

lemma helperForTheorem_8_1_subtypeIntegral_monotone {n : ℕ} {Ω : Set (Fin n → ℝ)} (f : ℕ → (Fin n → ℝ) → ENNReal) (hmono : ∀ x ∈ Ω, Monotone (fun k => f k x)) : Monotone (fun k => ∫⁻ x : Ω, f k x ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ))))

Lean source

Helper for Theorem 8.1: subtype-domain monotone convergence identity.

lemma helperForTheorem_8_1_subtype_mct_identity {n : ℕ} {Ω : Set (Fin n → ℝ)} (f : ℕ → (Fin n → ℝ) → ENNReal) (hf_meas : ∀ n, Measurable (fun x : Ω => f n x)) (hmono : ∀ x ∈ Ω, Monotone (fun k => f k x)) : ∫⁻ x : Ω, (⨆ k, f k x) ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ))) = ⨆ k, ∫⁻ x : Ω, f k x ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ)))

Lean source

Helper for Theorem 8.2: each shifted term x ↦ g (k + 1) x is measurable.

lemma helperForTheorem_8_2_shiftedFamily_measurable {n : ℕ} {Ω : Set (Fin n → ℝ)} (g : ℕ → Ω → ENNReal) (hg : ∀ k : ℕ, Measurable (g (k + 1))) : ∀ k : ℕ, Measurable (fun x : Ω => g (k + 1) x)

Lean source

Helper for Theorem 8.2: the shifted pointwise series is measurable.

lemma helperForTheorem_8_2_tsum_measurable {n : ℕ} {Ω : Set (Fin n → ℝ)} (g : ℕ → Ω → ENNReal) (hg : ∀ k : ℕ, Measurable (g (k + 1))) : Measurable (fun x : Ω => ∑' k : ℕ, g (k + 1) x)

Lean source

Helper for Theorem 8.2: each shifted term is a.e.-measurable for the subtype measure.

lemma helperForTheorem_8_2_shiftedFamily_aemeasurable {n : ℕ} {Ω : Set (Fin n → ℝ)} (g : ℕ → Ω → ENNReal) (hg : ∀ k : ℕ, Measurable (g (k + 1))) : ∀ k : ℕ, AEMeasurable (fun x : Ω => g (k + 1) x) (MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ)))

Lean source

Helper for Theorem 8.2: lintegral of the shifted series equals the series of lintegrals.

lemma helperForTheorem_8_2_lintegral_tsum {n : ℕ} {Ω : Set (Fin n → ℝ)} (g : ℕ → Ω → ENNReal) (hg : ∀ k : ℕ, Measurable (g (k + 1))) : (∫⁻ x : Ω, (∑' k : ℕ, g (k + 1) x) ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ)))) = ∑' k : ℕ, ∫⁻ x : Ω, g (k + 1) x ∂(MeasureTheory.volume.comap ((↑) : Ω → (Fin n → ℝ)))

Lean source

Helper for Proposition 8.6: exact equality with a positive-denominator natural ratio gives a rational real.

lemma helperForProposition_8_6_rational_of_exists_exact_ratio {x : ℝ} (h : ∃ aq : ℕ × ℕ, 0 < aq.2 ∧ x = (aq.1 : ℝ) / (aq.2 : ℝ)) : x ∈ Set.range ((↑) : ℚ → ℝ)

Lean source

Helper for Proposition 8.6: for x ∈ [0,1], admissible pairs with denominator bounded by N form a finite set.

lemma helperForProposition_8_6_finite_pairs_if_denominator_bounded {p c x : ℝ} (hp : 2 < p) (hc : 0 < c) (hx01 : x ∈ Set.Icc (0 : ℝ) 1) {N : ℕ} : ({aq : ℕ × ℕ | 0 < aq.1 ∧ 0 < aq.2 ∧ aq.2 ≤ N ∧ |x - (aq.1 : ℝ) / (aq.2 : ℝ)| ≤ c / (aq.2 : ℝ) ^ p}).Finite

Lean source

Helper for Proposition 8.6: for nonrational x ∈ [0,1], infinitely many admissible pairs imply LiouvilleWith p x.

lemma helperForProposition_8_6_liouvilleWith_of_infinite_pairs_nonrational {p c x : ℝ} (hp : 2 < p) (hc : 0 < c) (hx01 : x ∈ Set.Icc (0 : ℝ) 1) (hx_nonrat : x ∉ Set.range ((↑) : ℚ → ℝ)) (hInf : Set.Infinite {aq : ℕ × ℕ | 0 < aq.1 ∧ 0 < aq.2 ∧ |x - (aq.1 : ℝ) / (aq.2 : ℝ)| ≤ c / (aq.2 : ℝ) ^ p}) : LiouvilleWith p x

Lean source

Helper for Proposition 8.6: the fixed-exponent Liouville set has measure zero when p > 2.

lemma helperForProposition_8_6_volume_setOf_liouvilleWith_zero {p : ℝ} (hp : 2 < p) : MeasureTheory.volume {x : ℝ | LiouvilleWith p x} = 0

Lean source

Helper for Theorem 8.3: x has a uniform Diophantine lower bound with exponent τ over positive natural denominators.

def helperForTheorem_8_3_diophantineExponent (τ : ℝ) (x : ℝ) : Prop := ∃ c : ℝ, 0 < c ∧ ∀ p : ℤ, ∀ q : ℕ, 0 < q → |x - (p : ℝ) / (q : ℝ)| ≥ c / (q : ℝ) ^ τ

Lean source

Helper for Theorem 8.3: increasing the exponent preserves the Diophantine lower-bound property.

lemma helperForTheorem_8_3_monotone_in_exponent {τ τ' x : ℝ} (hτ : τ ≤ τ') : helperForTheorem_8_3_diophantineExponent τ x → helperForTheorem_8_3_diophantineExponent τ' x

Lean source

Helper for Theorem 8.3: adding a nonnegative increment to the exponent preserves the Diophantine lower-bound property.

lemma helperForTheorem_8_3_monotone_in_exponent_add_nonneg {τ δ x : ℝ} (hδ : 0 ≤ δ) : helperForTheorem_8_3_diophantineExponent τ x → helperForTheorem_8_3_diophantineExponent (τ + δ) x

Lean source

Helper for Theorem 8.3: a Diophantine lower bound at exponent τ also gives one at exponent τ + 1.

lemma helperForTheorem_8_3_diophantineExponent_succ {τ x : ℝ} : helperForTheorem_8_3_diophantineExponent τ x → helperForTheorem_8_3_diophantineExponent (τ + 1) x

Lean source

Helper for Theorem 8.3: strict exponent increase preserves the Diophantine lower-bound property.

lemma helperForTheorem_8_3_monotone_in_exponent_strict {τ τ' x : ℝ} (hτ : τ < τ') : helperForTheorem_8_3_diophantineExponent τ x → helperForTheorem_8_3_diophantineExponent τ' x

Lean source

Helper for Theorem 8.3: for natural denominators, the side condition 0 < q is equivalent to q ≠ 0 in the Diophantine exponent formulation.

lemma helperForTheorem_8_3_diophantineExponent_iff_denominator_ne_zero {τ x : ℝ} : helperForTheorem_8_3_diophantineExponent τ x ↔ ∃ c : ℝ, 0 < c ∧ ∀ p : ℤ, ∀ q : ℕ, q ≠ 0 →

Lean source

Helper for Theorem 8.3: a non-strict Diophantine lower bound can be upgraded to a strict lower bound by shrinking the constant.

lemma helperForTheorem_8_3_diophantineExponent_strict_of_non_strict {τ x : ℝ} : helperForTheorem_8_3_diophantineExponent τ x → ∃ c : ℝ, 0 < c ∧ ∀ p : ℤ, ∀ q : ℕ, 0 < q →

Lean source

Helper for Theorem 8.3: strict integer-denominator Diophantine bounds imply the corresponding non-strict bounds.

lemma helperForTheorem_8_3_exists_non_strict_parameters_of_IsDiophantineReal {x : ℝ} (hx : IsDiophantineReal x) : ∃ p C : ℝ, 0 < p ∧ 0 < C ∧ ∀ q : ℤ, q ≠ 0 → ∀ a : ℤ,

Lean source

Helper for Theorem 8.3: non-strict integer-denominator Diophantine bounds imply IsDiophantineReal after shrinking the constant.

lemma helperForTheorem_8_3_isDiophantineReal_of_exists_non_strict_parameters {x : ℝ} (hx : ∃ p C : ℝ, 0 < p ∧ 0 < C ∧ ∀ q : ℤ, q ≠ 0 → ∀ a : ℤ, |x - (a : ℝ) / (q : ℝ)| ≥ C / (Int.natAbs q : ℝ) ^ p) : IsDiophantineReal x

Lean source

Helper for Theorem 8.3: IsDiophantineReal is equivalent to the existence of positive-parameter non-strict integer-denominator Diophantine bounds.

lemma helperForTheorem_8_3_isDiophantineReal_iff_exists_non_strict_parameters {x : ℝ} : IsDiophantineReal x ↔ ∃ p C : ℝ, 0 < p ∧ 0 < C ∧ ∀ q : ℤ, q ≠ 0 → ∀ a : ℤ,

Lean source

Helper for Theorem 8.3: rewrite an integer-denominator rational into a positive-denominator one using Int.sign and Int.natAbs.

lemma helperForTheorem_8_3_signed_numerator_div_natAbs_eq_div_int (a q : ℤ) (hq : q ≠ 0) : ((a * Int.sign q : ℤ) : ℝ) / (Int.natAbs q : ℝ) = (a : ℝ) / (q : ℝ)

Lean source

Helper for Theorem 8.3: an IsDiophantineReal number satisfies the natural-denominator Diophantine lower-bound formulation at some positive exponent.

lemma helperForTheorem_8_3_exists_exponent_with_diophantineExponent_of_IsDiophantineReal {x : ℝ} (hx : IsDiophantineReal x) : ∃ τ : ℝ, 0 < τ ∧ helperForTheorem_8_3_diophantineExponent τ x

Lean source

Helper for Theorem 8.3: a positive-exponent natural-denominator Diophantine lower bound implies IsDiophantineReal.

lemma helperForTheorem_8_3_isDiophantineReal_of_diophantineExponent {x τ : ℝ} (hτ : 0 < τ) (hx : helperForTheorem_8_3_diophantineExponent τ x) : IsDiophantineReal x

Lean source

Helper for Theorem 8.3: a natural-denominator Diophantine lower bound at an exponent strictly greater than 1 implies IsDiophantineReal.

lemma helperForTheorem_8_3_isDiophantineReal_of_diophantineExponent_gt_one {x τ : ℝ} (hτ : 1 < τ) (hx : helperForTheorem_8_3_diophantineExponent τ x) : IsDiophantineReal x

Lean source

Helper for Theorem 8.3: the integer-denominator and positive-natural-denominator Diophantine formulations are equivalent.

lemma helperForTheorem_8_3_isDiophantineReal_iff_exists_positive_exponent {x : ℝ} : IsDiophantineReal x ↔ ∃ τ : ℝ, 0 < τ ∧ helperForTheorem_8_3_diophantineExponent τ x

Lean source

Helper for Theorem 8.3: any IsDiophantineReal number admits a natural-denominator Diophantine lower bound at some exponent strictly greater than 1.

lemma helperForTheorem_8_3_exists_exponent_gt_one_of_IsDiophantineReal {x : ℝ} (hx : IsDiophantineReal x) : ∃ τ : ℝ, 1 < τ ∧ helperForTheorem_8_3_diophantineExponent τ x

Lean source

Helper for Theorem 8.3: existence of a strict-> 1 natural-denominator Diophantine lower bound implies IsDiophantineReal.

lemma helperForTheorem_8_3_isDiophantineReal_of_exists_exponent_gt_one {x : ℝ} (hx : ∃ τ : ℝ, 1 < τ ∧ helperForTheorem_8_3_diophantineExponent τ x) : IsDiophantineReal x

Lean source

Helper for Theorem 8.3: IsDiophantineReal is equivalent to existence of a natural-denominator Diophantine lower bound at an exponent > 1.

lemma helperForTheorem_8_3_isDiophantineReal_iff_exists_exponent_gt_one {x : ℝ} : IsDiophantineReal x ↔ ∃ τ : ℝ, 1 < τ ∧ helperForTheorem_8_3_diophantineExponent τ x

Lean source

Helper for Theorem 8.3: if IsDiophantineReal holds almost everywhere, then almost every point admits an exponent τ > 1 with a natural-denominator Diophantine lower bound.

lemma helperForTheorem_8_3_ae_exists_exponent_gt_one_of_ae_isDiophantineReal (hae : ∀ᵐ x : ℝ ∂MeasureTheory.volume, IsDiophantineReal x) : ∀ᵐ x : ℝ ∂MeasureTheory.volume, ∃ τ : ℝ, 1 < τ ∧ helperForTheorem_8_3_diophantineExponent τ x

Lean source

Helper for Theorem 8.3: if almost every point admits an exponent τ > 1 with a natural-denominator Diophantine lower bound, then IsDiophantineReal holds almost everywhere.

lemma helperForTheorem_8_3_ae_isDiophantineReal_of_ae_exists_exponent_gt_one (hae : ∀ᵐ x : ℝ ∂MeasureTheory.volume, ∃ τ : ℝ, 1 < τ ∧ helperForTheorem_8_3_diophantineExponent τ x) : ∀ᵐ x : ℝ ∂MeasureTheory.volume, IsDiophantineReal x

Lean source

Helper for Theorem 8.3: almost-everywhere IsDiophantineReal is equivalent to almost-everywhere existence of an exponent τ > 1 with the natural-denominator Diophantine lower bound.

lemma helperForTheorem_8_3_ae_isDiophantineReal_iff_ae_exists_exponent_gt_one : (∀ᵐ x : ℝ ∂MeasureTheory.volume, IsDiophantineReal x) ↔ (∀ᵐ x : ℝ ∂MeasureTheory.volume, ∃ τ : ℝ, 1 < τ ∧ helperForTheorem_8_3_diophantineExponent τ x)

Lean source

Helper for Theorem 8.3: IsDiophantineReal is equivalent to the existence of an exponent τ > 1 and a constant c > 0 giving the natural-denominator lower bound.

lemma helperForTheorem_8_3_isDiophantineReal_iff_exists_exponent_gt_one_and_constant {x : ℝ} : IsDiophantineReal x ↔ ∃ τ c : ℝ, 1 < τ ∧ 0 < c ∧ ∀ p : ℤ, ∀ q : ℕ, 0 < q →

Lean source

Helper for Theorem 8.3: IsDiophantineReal is equivalent to an exponent τ > 1 and a constant c > 0 with the lower bound quantified over all nonzero natural denominators.

lemma helperForTheorem_8_3_isDiophantineReal_iff_exists_exponent_gt_one_and_constant_ne_zero {x : ℝ} : IsDiophantineReal x ↔ ∃ τ c : ℝ, 1 < τ ∧ 0 < c ∧ ∀ p : ℤ, ∀ q : ℕ, q ≠ 0 →

Lean source

Helper for Theorem 8.3: for Lebesgue measure on ℝ, an almost-everywhere Diophantine lower bound is equivalent to the complement having measure zero.

lemma helperForTheorem_8_3_ae_iff_volume_complement_zero {τ : ℝ} : (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x) ↔ MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0

Lean source

Helper for Theorem 8.3: measure-zero complement implies the almost-everywhere Diophantine lower bound formulation.

lemma helperForTheorem_8_3_ae_of_volume_complement_zero {τ : ℝ} (hnull : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0) : ∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x

Lean source

Helper for Theorem 8.3: an almost-everywhere fixed-exponent Diophantine lower bound implies the complement has Lebesgue measure zero.

lemma helperForTheorem_8_3_volume_complement_zero_of_ae {τ : ℝ} (hae : ∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x) : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0

Lean source

Helper for Theorem 8.3: a null complement yields both the null-complement and almost-everywhere formulations in one conjunction.

lemma helperForTheorem_8_3_full_measure_pair_of_volume_complement_zero {τ : ℝ} (hnull : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0) : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)

Lean source

Helper for Theorem 8.3: proving the full-measure pair is equivalent to proving just the null-complement statement.

lemma helperForTheorem_8_3_full_measure_pair_iff_volume_complement_zero {τ : ℝ} : (MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)) ↔ MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0

8.2 — Integration of Non-negative Measurable Functions — Part 2

Lean authors: Zichen Wang, Wanli Ma, Min Cui, Zaiwen Wen.

Source header

Theorem 8.3: if τ > 2, then the set of real numbers x for which there exists c(x) > 0 such that |x - p/q| ≥ c(x) / q^τ for all p ∈ ℤ and q ∈ ℕ with q > 0 has full Lebesgue measure; equivalently, this Diophantine bound holds for Lebesgue-almost every real x.

theorem theorem_8_3_full_measure_diophantine_exponent {τ : ℝ} (hτ : 2 < τ) : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)

Lean source

Proposition 8.7: if (f_n)_{n ≥ 1} are nonnegative Lebesgue measurable functions on ℝ with ∫⁻ f_n dm ≤ 4^{-n} for all n ≥ 1, then for every ε > 0 there exists a Lebesgue measurable set E with m(E) ≤ ε such that f_n x → 0 for all x ∈ ℝ \ E.

theorem proposition_8_7_tendsto_zero_outside_small_exceptional_set (f : ℕ → ℝ → ℝ) (hmeas : ∀ n : ℕ, AEMeasurable (f n) MeasureTheory.volume) (hnonneg : ∀ n : ℕ, ∀ x : ℝ, 0 ≤ f n x) (hintegral : ∀ n : ℕ, 1 ≤ n → (∫⁻ x : ℝ, ENNReal.ofReal (f n x) ∂MeasureTheory.volume) ≤ (1 / 4 : ENNReal) ^ n) : ∀ ε : ℝ, 0 < ε → ∃ E : Set ℝ, MeasurableSet E ∧ MeasureTheory.volume E ≤ ENNReal.ofReal ε ∧ ∀ x ∈ Eᶜ, Filter.Tendsto (fun n : ℕ => f n x) Filter.atTop (nhds (0 : ℝ))

Lean source

Theorem 8.4 (Egoroff on [0,1]): if (f_n) are measurable and nonnegative on [0,1] and satisfy f_n(x) → 0 for every x ∈ [0,1], then for every ε > 0 there exists a measurable E ⊆ [0,1] with m(E) ≤ ε such that f_n → 0 uniformly on [0,1] \ E.

theorem theorem_8_4_egoroff_on_unit_interval (f : ℕ → Set.Icc (0 : ℝ) 1 → ℝ) (hmeas : ∀ n : ℕ, Measurable (f n)) (hnonneg : ∀ n : ℕ, ∀ x : Set.Icc (0 : ℝ) 1, 0 ≤ f n x) (hlim : ∀ x : Set.Icc (0 : ℝ) 1, Filter.Tendsto (fun n : ℕ => f n x) Filter.atTop (nhds 0)) : ∀ ε : ℝ, 0 < ε → ∃ E : Set (Set.Icc (0 : ℝ) 1), MeasurableSet E ∧ MeasureTheory.volume E ≤ ENNReal.ofReal ε ∧ TendstoUniformlyOn (fun n : ℕ => f n) (fun _ : Set.Icc (0 : ℝ) 1 => (0 : ℝ)) Filter.atTop Eᶜ

Lean source

Proposition 8.8: there exists a bounded function f : ℕ × ℕ → ℝ≥0 such that (i) for every n, the series ∑_{m=1}^∞ f(n,m) converges; (ii) for every m, the limit lim_{n→∞} f(n,m) exists; (iii) nevertheless, the limit of row sums is not equal to the sum of pointwise limits.

theorem proposition_8_8_exists_bounded_nonnegative_function_with_noncommuting_limit_and_series : ∃ f : ℕ × ℕ → NNReal, (∃ C : NNReal, ∀ n m : ℕ, f (n, m) ≤ C) ∧ (∀ n : ℕ, Summable (fun m : ℕ => (f (n, m + 1) : ℝ))) ∧ (∀ m : ℕ, ∃ l : ℝ, Filter.Tendsto (fun n : ℕ => (f (n, m + 1) : ℝ)) Filter.atTop (nhds l)) ∧ (∃ g : ℕ → ℝ, (∀ m : ℕ, Filter.Tendsto (fun n : ℕ => (f (n, m + 1) : ℝ)) Filter.atTop (nhds (g m))) ∧ Summable g ∧ (∃ L : ℝ, Filter.Tendsto (fun n : ℕ => ∑' m : ℕ, (f (n, m + 1) : ℝ)) Filter.atTop (nhds L) ∧ L ≠ ∑' m : ℕ, g m))

Lean source

Helper for Theorem 8.3: every rational number fails a fixed-exponent Diophantine lower bound with a strictly positive constant.

lemma helperForTheorem_8_3_not_diophantineExponent_of_rat {τ : ℝ} (p : ℤ) (q : ℕ) (hq : 0 < q) : ¬ helperForTheorem_8_3_diophantineExponent τ ((p : ℝ) / (q : ℝ))

Lean source

Helper for Theorem 8.3: every rational number lies in the complement of the fixed-exponent Diophantine set.

lemma helperForTheorem_8_3_rat_mem_complement {τ : ℝ} (r : ℚ) : (r : ℝ) ∈ {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x}

Lean source

Helper for Theorem 8.3: the embedded rationals form a subset of the fixed-exponent complement.

lemma helperForTheorem_8_3_range_rat_subset_complement {τ : ℝ} : Set.range ((↑) : ℚ → ℝ) ⊆ {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x}

Lean source

Helper for Theorem 8.3: every integer belongs to the complement of the fixed-exponent Diophantine set.

lemma helperForTheorem_8_3_int_mem_complement {τ : ℝ} (p : ℤ) : (p : ℝ) ∈ {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x}

Lean source

Helper for Theorem 8.3: the complement of the fixed-exponent Diophantine set is nonempty (for instance, it contains rational numbers).

lemma helperForTheorem_8_3_complement_nonempty {τ : ℝ} : Set.Nonempty {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x}

Lean source

Helper for Theorem 8.3: the complement of the fixed-exponent Diophantine set is infinite because it contains every integer.

lemma helperForTheorem_8_3_complement_infinite {τ : ℝ} : Set.Infinite {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x}

Lean source

Helper for Theorem 8.3: negating the fixed-exponent Diophantine lower-bound is equivalent to saying that every positive constant is violated by some rational approximation.

lemma helperForTheorem_8_3_not_diophantineExponent_iff_forall_pos_constant_exists_close_rational {τ x : ℝ} : ¬ helperForTheorem_8_3_diophantineExponent τ x ↔ ∀ c : ℝ, 0 < c → ∃ p : ℤ, ∃ q : ℕ, 0 < q ∧

Lean source

Helper for Theorem 8.3: if τ ≤ τ', then the complement of the τ'-Diophantine set is contained in the complement of the τ-Diophantine set.

lemma helperForTheorem_8_3_complement_antitone_in_exponent {τ τ' : ℝ} (hττ' : τ ≤ τ') : {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ' x} ⊆ {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x}

Lean source

Helper for Theorem 8.3: the complement-measure is antitone with respect to the Diophantine exponent.

lemma helperForTheorem_8_3_volume_complement_antitone_in_exponent {τ τ' : ℝ} (hττ' : τ ≤ τ') : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ' x} ≤ MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x}

Lean source

Helper for Theorem 8.3: if a fixed exponent τ > 1 Diophantine lower bound holds Lebesgue-almost everywhere, then IsDiophantineReal also holds almost everywhere.

lemma helperForTheorem_8_3_ae_isDiophantineReal_of_ae_diophantineExponent_gt_one {τ : ℝ} (hτ : 1 < τ) (hae : ∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x) : ∀ᵐ x : ℝ ∂MeasureTheory.volume, IsDiophantineReal x

Lean source

Helper for Theorem 8.3: an almost-everywhere fixed-exponent bound with τ > 1 forces the complement of IsDiophantineReal to have Lebesgue measure zero.

lemma helperForTheorem_8_3_volume_not_isDiophantineReal_zero_of_ae_diophantineExponent_gt_one {τ : ℝ} (hτ : 1 < τ) (hae : ∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x) : MeasureTheory.volume {x : ℝ | ¬ IsDiophantineReal x} = 0

Lean source

Helper for Theorem 8.3: a full-measure fixed-exponent Diophantine pair with τ > 1 implies that IsDiophantineReal holds almost everywhere.

lemma helperForTheorem_8_3_ae_isDiophantineReal_of_full_measure_pair {τ : ℝ} (hτ : 1 < τ) (hpair : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)) : ∀ᵐ x : ℝ ∂MeasureTheory.volume, IsDiophantineReal x

Lean source

Helper for Theorem 8.3: a full-measure fixed-exponent Diophantine pair with τ > 1 forces the non-diophantine set to have measure zero.

lemma helperForTheorem_8_3_volume_not_isDiophantineReal_zero_of_full_measure_pair {τ : ℝ} (hτ : 1 < τ) (hpair : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)) : MeasureTheory.volume {x : ℝ | ¬ IsDiophantineReal x} = 0

Lean source

Helper for Theorem 8.3: at exponent τ = 2, the origin fails the fixed-exponent Diophantine lower bound.

lemma helperForTheorem_8_3_zero_not_diophantineExponent_two : ¬ helperForTheorem_8_3_diophantineExponent (2 : ℝ) 0

Lean source

Helper for Theorem 8.3: at exponent τ = 2, every integer lies in the complement of the fixed-exponent Diophantine set.

lemma helperForTheorem_8_3_int_mem_complement_two (p : ℤ) : (p : ℝ) ∈ {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent (2 : ℝ) x}

Lean source

Helper for Theorem 8.3: at exponent τ = 2, the complement of the fixed-exponent Diophantine set is nonempty.

lemma helperForTheorem_8_3_complement_nonempty_two : Set.Nonempty {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent (2 : ℝ) x}

Lean source

Helper for Theorem 8.3: a full-measure fixed-exponent pair at τ = 2 implies IsDiophantineReal almost everywhere.

lemma helperForTheorem_8_3_ae_isDiophantineReal_of_full_measure_pair_two (hpair : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent (2 : ℝ) x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent (2 : ℝ) x)) : ∀ᵐ x : ℝ ∂MeasureTheory.volume, IsDiophantineReal x

Lean source

Helper for Theorem 8.3: a full-measure fixed-exponent pair at τ = 2 forces the non-diophantine set to have Lebesgue measure zero.

lemma helperForTheorem_8_3_volume_not_isDiophantineReal_zero_of_full_measure_pair_two (hpair : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent (2 : ℝ) x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent (2 : ℝ) x)) : MeasureTheory.volume {x : ℝ | ¬ IsDiophantineReal x} = 0

Lean source

Helper for Theorem 8.3: at τ = 2, a full-measure fixed-exponent pair yields both almost-everywhere IsDiophantineReal and measure-zero non-diophantine complement.

lemma helperForTheorem_8_3_consequences_of_full_measure_pair_two (hpair : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent (2 : ℝ) x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent (2 : ℝ) x)) : (∀ᵐ x : ℝ ∂MeasureTheory.volume, IsDiophantineReal x) ∧ MeasureTheory.volume {x : ℝ | ¬ IsDiophantineReal x} = 0

Lean source

Helper for Theorem 8.3: any universal fixed-exponent full-measure claim for all τ > 1 specializes to the case τ = 2.

lemma helperForTheorem_8_3_full_measure_pair_two_of_universal_fixed_exponent_claim (hall : ∀ τ : ℝ, 1 < τ → MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)) : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent (2 : ℝ) x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent (2 : ℝ) x)

Lean source

Helper for Theorem 8.3: a universal fixed-exponent full-measure claim would imply IsDiophantineReal almost everywhere by specializing to τ = 2.

lemma helperForTheorem_8_3_ae_isDiophantineReal_of_universal_fixed_exponent_claim (hall : ∀ τ : ℝ, 1 < τ → MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)) : ∀ᵐ x : ℝ ∂MeasureTheory.volume, IsDiophantineReal x

Lean source

Helper for Theorem 8.3: a universal fixed-exponent full-measure claim would force the non-diophantine set to have Lebesgue measure zero.

lemma helperForTheorem_8_3_volume_not_isDiophantineReal_zero_of_universal_fixed_exponent_claim (hall : ∀ τ : ℝ, 1 < τ → MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)) : MeasureTheory.volume {x : ℝ | ¬ IsDiophantineReal x} = 0

Lean source

Helper for Theorem 8.3: a universal fixed-exponent full-measure claim yields both almost-everywhere IsDiophantineReal and measure-zero non-diophantine complement.

lemma helperForTheorem_8_3_consequences_of_universal_fixed_exponent_claim (hall : ∀ τ : ℝ, 1 < τ → MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)) : (∀ᵐ x : ℝ ∂MeasureTheory.volume, IsDiophantineReal x) ∧ MeasureTheory.volume {x : ℝ | ¬ IsDiophantineReal x} = 0

Lean source

Helper for Theorem 8.3: once the fixed-exponent complement has measure zero, one gets both the almost-everywhere exponent-τ bound and almost-everywhere IsDiophantineReal (for τ > 1).

lemma helperForTheorem_8_3_ae_consequences_of_volume_complement_zero {τ : ℝ} (hτ : 1 < τ) (hnull : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0) : (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x) ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, IsDiophantineReal x)

Lean source

Helper for Theorem 8.3: for a fixed exponent τ > 1, the theorem's target full-measure pair follows from the null-complement statement.

lemma helperForTheorem_8_3_full_measure_pair_of_hτ_and_volume_complement_zero {τ : ℝ} (hτ : 1 < τ) (hnull : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0) : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)

Lean source

Helper for Theorem 8.3: for a fixed exponent τ > 1, proving the theorem's target pair is equivalent to proving the null-complement statement.

lemma helperForTheorem_8_3_full_measure_pair_iff_volume_complement_zero_of_gt_one {τ : ℝ} (hτ : 1 < τ) : (MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)) ↔ MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0

Lean source

Helper for Theorem 8.3: from a fixed exponent τ > 1 null-complement statement, one obtains both the theorem's target full-measure pair and almost-everywhere IsDiophantineReal.

lemma helperForTheorem_8_3_target_pair_and_ae_isDiophantineReal_of_hτ_and_volume_complement_zero {τ : ℝ} (hτ : 1 < τ) (hnull : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0) : (MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)) ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, IsDiophantineReal x)

Lean source

Helper for Theorem 8.3: for τ > 1, augmenting the theorem's target pair with the derived almost-everywhere IsDiophantineReal consequence is equivalent to the target pair itself.

lemma helperForTheorem_8_3_target_pair_iff_target_pair_and_ae_isDiophantineReal {τ : ℝ} (hτ : 1 < τ) : (MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)) ↔ ((MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)) ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, IsDiophantineReal x))

Lean source

Helper for Theorem 8.3: for a fixed exponent τ > 1, the theorem's target pair implies both almost-everywhere IsDiophantineReal and measure-zero non-IsDiophantineReal complement.

lemma helperForTheorem_8_3_consequences_of_target_pair {τ : ℝ} (hτ : 1 < τ) (hpair : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0 ∧ (∀ᵐ x : ℝ ∂MeasureTheory.volume, helperForTheorem_8_3_diophantineExponent τ x)) : (∀ᵐ x : ℝ ∂MeasureTheory.volume, IsDiophantineReal x) ∧ MeasureTheory.volume {x : ℝ | ¬ IsDiophantineReal x} = 0

Lean source

Helper for Theorem 8.3: a nonrational real has a uniform positive lower bound for |x - p/q| against all integers p and all positive denominators q ≤ N; with τ ≥ 0, this yields a bound of the form c / q^τ.

lemma helperForTheorem_8_3_positive_lower_bound_for_bounded_denominators_nonrat {τ x : ℝ} (hτ : 0 ≤ τ) (hx_nonrat : x ∉ Set.range ((↑) : ℚ → ℝ)) (N : ℕ) : ∃ c : ℝ, 0 < c ∧ ∀ p : ℤ, ∀ q : ℕ, 0 < q → q ≤ N → c / (q : ℝ) ^ τ ≤ |x - (p : ℝ) / (q : ℝ)|

Lean source

Helper for Theorem 8.3: for nonrational x and nonnegative exponent τ, failure of the fixed-exponent Diophantine lower bound implies LiouvilleWith τ x.

lemma helperForTheorem_8_3_liouvilleWith_of_not_diophantineExponent_nonrat {τ x : ℝ} (hτ : 0 ≤ τ) (hx_nonrat : x ∉ Set.range ((↑) : ℚ → ℝ)) (hnot : ¬ helperForTheorem_8_3_diophantineExponent τ x) : LiouvilleWith τ x

Lean source

Helper for Theorem 8.3: the complement of the fixed-exponent Diophantine set is contained in the union of the embedded rationals and the fixed-exponent Liouville set (for nonnegative exponent).

lemma helperForTheorem_8_3_complement_subset_rat_or_liouvilleWith {τ : ℝ} (hτ : 0 ≤ τ) : {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} ⊆ Set.range ((↑) : ℚ → ℝ) ∪ {x : ℝ | LiouvilleWith τ x}

Lean source

Helper for Theorem 8.3: for τ > 2, the complement of the fixed-exponent Diophantine set has Lebesgue measure zero.

lemma helperForTheorem_8_3_volume_complement_zero_of_gt_two {τ : ℝ} (hτ : 2 < τ) : MeasureTheory.volume {x : ℝ | ¬ helperForTheorem_8_3_diophantineExponent τ x} = 0

Lean source

Helper for Proposition 8.7: the shifted geometric series with ratio 1/2 is finite in ℝ≥0∞.

lemma helperForProposition_8_7_geometric_series_ne_top : (∑' n : ℕ, (1 / 2 : ENNReal) ^ (n + 1)) ≠ ⊤

Lean source

Helper for Proposition 8.7: Markov/Chebyshev gives the superlevel-set measure bound m({x | 2^{-(n+1)} ≤ f_{n+1}(x)}) ≤ 2^{-(n+1)}.

lemma helperForProposition_8_7_superlevel_measure_bound (f : ℕ → ℝ → ℝ) (hmeas : ∀ n : ℕ, AEMeasurable (f n) MeasureTheory.volume) (hintegral : ∀ n : ℕ, 1 ≤ n → (∫⁻ x : ℝ, ENNReal.ofReal (f n x) ∂MeasureTheory.volume) ≤ (1 / 4 : ENNReal) ^ n) (n : ℕ) : MeasureTheory.volume {x : ℝ | ((1 / 2 : ENNReal) ^ (n + 1)) ≤ ENNReal.ofReal (f (n + 1) x)} ≤ ((1 / 2 : ENNReal) ^ (n + 1))

Lean source

Helper for Proposition 8.7: the limsup of superlevel sets has Lebesgue measure zero.

lemma helperForProposition_8_7_volume_limsup_zero (A : ℕ → Set ℝ) (hA : ∀ n : ℕ, MeasureTheory.volume (A n) ≤ (1 / 2 : ENNReal) ^ (n + 1)) : MeasureTheory.volume (Filter.limsup A Filter.atTop) = 0

Lean source

Helper for Proposition 8.7: outside the limsup superlevel set, one eventually has the pointwise bound f_{n+1}(x) ≤ 2^{-(n+1)}.

lemma helperForProposition_8_7_eventually_upper_bound_outside_limsup (f : ℕ → ℝ → ℝ) (hnonneg : ∀ n : ℕ, ∀ x : ℝ, 0 ≤ f n x) (x : ℝ) (hx : x ∉ Filter.limsup (fun n : ℕ => {y : ℝ | ((1 / 2 : ENNReal) ^ (n + 1)) ≤ ENNReal.ofReal (f (n + 1) y)}) Filter.atTop) : ∀ᶠ n : ℕ in Filter.atTop, f (n + 1) x ≤ (1 / 2 : ℝ) ^ (n + 1)

Lean source

Helper for Proposition 8.7: an eventual geometric bound on the shifted sequence implies f_n(x) → 0.

lemma helperForProposition_8_7_tendsto_shifted_then_unshift (f : ℕ → ℝ → ℝ) (x : ℝ) (hnonneg : ∀ n : ℕ, ∀ y : ℝ, 0 ≤ f n y) (hbound : ∀ᶠ n : ℕ in Filter.atTop, f (n + 1) x ≤ (1 / 2 : ℝ) ^ (n + 1)) : Filter.Tendsto (fun n : ℕ => f n x) Filter.atTop (nhds (0 : ℝ))

Lean source

Helper for Theorem 8.4: measurable functions on [0,1] are strongly measurable.

lemma helperForTheorem_8_4_stronglyMeasurable_seq_on_Icc (f : ℕ → Set.Icc (0 : ℝ) 1 → ℝ) (hmeas : ∀ n : ℕ, Measurable (f n)) : ∀ n : ℕ, MeasureTheory.StronglyMeasurable (f n)

Lean source

Helper for Theorem 8.4: pointwise convergence to zero implies almost-everywhere convergence to the zero function on [0,1].

lemma helperForTheorem_8_4_ae_tendsto_zero_on_Icc (f : ℕ → Set.Icc (0 : ℝ) 1 → ℝ) (hlim : ∀ x : Set.Icc (0 : ℝ) 1, Filter.Tendsto (fun n : ℕ => f n x) Filter.atTop (nhds 0)) : ∀ᵐ x : Set.Icc (0 : ℝ) 1 ∂MeasureTheory.volume, Filter.Tendsto (fun n : ℕ => f n x) Filter.atTop (nhds ((fun _ : Set.Icc (0 : ℝ) 1 => (0 : ℝ)) x))

Lean source

Helper for Theorem 8.4: Egorov's theorem on the finite-measure space [0,1].

lemma helperForTheorem_8_4_apply_mathlib_egorov_finite_measure (f : ℕ → Set.Icc (0 : ℝ) 1 → ℝ) (hmeas : ∀ n : ℕ, Measurable (f n)) (hlim : ∀ x : Set.Icc (0 : ℝ) 1, Filter.Tendsto (fun n : ℕ => f n x) Filter.atTop (nhds 0)) {ε : ℝ} (hε : 0 < ε) : ∃ E : Set (Set.Icc (0 : ℝ) 1), MeasurableSet E ∧ MeasureTheory.volume E ≤ ENNReal.ofReal ε ∧ TendstoUniformlyOn (fun n : ℕ => f n) (fun _ : Set.Icc (0 : ℝ) 1 => (0 : ℝ)) Filter.atTop Eᶜ

Lean source

Helper for Proposition 8.8: rewrite the shifted diagonal term into Kronecker-delta form.

lemma helperForProposition_8_8_shiftedDiagonal_term_eq_ite_eq (n m : ℕ) : (((if m + 1 = n + 1 then (1 : NNReal) else 0) : NNReal) : ℝ) = (((if m = n then (1 : NNReal) else 0) : NNReal) : ℝ)

Lean source

Helper for Proposition 8.8: each row of the diagonal indicator has sum 1.

lemma helperForProposition_8_8_row_hasSum_one (n : ℕ) : HasSum (fun m : ℕ => (((if m = n then (1 : NNReal) else 0) : NNReal) : ℝ)) 1

Lean source

Helper for Proposition 8.8: each fixed column converges pointwise to 0.

lemma helperForProposition_8_8_column_tendsto_zero (m : ℕ) : Filter.Tendsto (fun n : ℕ => (((if n = m then (1 : NNReal) else 0) : NNReal) : ℝ)) Filter.atTop (nhds 0)

Lean source

Helper for Proposition 8.8: the row sums converge to 1.

lemma helperForProposition_8_8_rowSum_tendsto_one : Filter.Tendsto (fun n : ℕ => ∑' m : ℕ, (((if m = n then (1 : NNReal) else 0) : NNReal) : ℝ)) Filter.atTop (nhds 1)

Lean source

Helper for Proposition 8.8: the sum of the pointwise limit function 0 is 0.

lemma helperForProposition_8_8_tsum_of_pointwise_limits_eq_zero : (∑' _ : ℕ, (0 : ℝ)) = 0

8.3 — Integration of Absolutely Integrable Functions

Lean authors: Zichen Wang, Wanli Ma, Min Cui, Zaiwen Wen.

Source header

Definition 8.8: let Ω ⊆ ℝ^n be measurable. A measurable function f is absolutely integrable on Ω iff the Lebesgue integral over Ω of |f| is finite.

def IsAbsolutelyIntegrableOn {n : ℕ} (Ω : Set (Fin n → ℝ)) (f : Ω → EReal) : Prop := MeasurableSet Ω ∧ Measurable f ∧ (∫⁻ x, (f x).abs ∂(MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume)) < ⊤

Lean source

Definition 8.9: for a real-valued function f, define its positive and negative parts by f⁺ x = max (f x) 0 and f⁻ x = -min (f x) 0.

def positiveNegativeParts {α : Type*} (f : α → ℝ) : (α → ℝ) × (α → ℝ) := (fun x => max (f x) 0, fun x => -min (f x) 0)

Lean source

Proposition 8.9: for a real-valued function f, defining f⁺ x := max (f x) 0 and f⁻ x := -min (f x) 0, one has f⁺ ≥ 0, f⁻ ≥ 0, f = f⁺ - f⁻, and |f| = f⁺ + f⁻ pointwise.

theorem proposition_8_9 {α : Type*} (f : α → ℝ) : (∀ x : α, 0 ≤ max (f x) 0) ∧ (∀ x : α, 0 ≤ -min (f x) 0) ∧ (∀ x : α, f x = max (f x) 0 - (-min (f x) 0)) ∧ (∀ x : α, |f x| = max (f x) 0 + -min (f x) 0)

Lean source

The positive part of an extended-real-valued function, f⁺ = max (f, 0).

noncomputable def erealPositivePart {Ω : Type*} (f : Ω → EReal) : Ω → EReal := fun x => max (f x) 0

Lean source

The negative part of an extended-real-valued function, f⁻ = max (-f, 0).

noncomputable def erealNegativePart {Ω : Type*} (f : Ω → EReal) : Ω → EReal := fun x => max (-f x) 0

Lean source

Predicate asserting that an extended-real-valued function has finite absolute Lebesgue integral.

def HasFiniteAbsIntegral {Ω : Type*} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) (f : Ω → EReal) : Prop := (∫⁻ x, EReal.abs (f x) ∂ μ) < ⊤

Lean source

Definition 8.10 (Lebesgue integral): for a measurable f : Ω → EReal with ∫ |f| dμ < ∞, define f⁺ := max (f, 0), f⁻ := max (-f, 0), and set ∫ f dμ := ∫ f⁺ dμ - ∫ f⁻ dμ.

noncomputable def lebesgueIntegral {Ω : Type*} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) (f : Ω → EReal) (hf_measurable : Measurable f) (hf_abs : HasFiniteAbsIntegral μ f) : EReal := (fun (_ : Measurable f) (_ : HasFiniteAbsIntegral μ f) => ((∫⁻ x, (erealPositivePart f x).toENNReal ∂ μ) : EReal) - ((∫⁻ x, (erealNegativePart f x).toENNReal ∂ μ) : EReal)) hf_measurable hf_abs

Lean source

Proposition 8.10.1: if f,g : Ω → ℝ are absolutely integrable, then for every c : ℝ, cf is absolutely integrable and ∫ cf dμ = c ∫ f dμ.

theorem proposition_8_10_1 {Ω : Type*} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) (f g : Ω → ℝ) (hf : MeasureTheory.Integrable f μ) (_hg : MeasureTheory.Integrable g μ) (c : ℝ) : MeasureTheory.Integrable (fun x => c * f x) μ ∧ (∫ x, c * f x ∂ μ) = c * ∫ x, f x ∂ μ

Lean source

Proposition 8.10.2: if f,g : Ω → ℝ are absolutely integrable (equivalently, integrable), then f + g is absolutely integrable and ∫ (f + g) dμ = ∫ f dμ + ∫ g dμ.

theorem proposition_8_10_2 {Ω : Type*} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) (f g : Ω → ℝ) (hf : MeasureTheory.Integrable f μ) (hg : MeasureTheory.Integrable g μ) : MeasureTheory.Integrable (fun x => f x + g x) μ ∧ (∫ x, (f x + g x) ∂ μ) = (∫ x, f x ∂ μ) + (∫ x, g x ∂ μ)

Lean source

Proposition 8.10.3: let (Ω, 𝒜, μ) be a measure space and let f, g : Ω → ℝ be absolutely integrable (∫ |f| dμ < ∞ and ∫ |g| dμ < ∞). If f x ≤ g x for all x ∈ Ω, then ∫ f dμ ≤ ∫ g dμ.

theorem proposition_8_10_3 {Ω : Type*} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) (f g : Ω → ℝ) (hf : MeasureTheory.Integrable f μ) (hg : MeasureTheory.Integrable g μ) (hfg : ∀ x : Ω, f x ≤ g x) : (∫ x, f x ∂ μ) ≤ (∫ x, g x ∂ μ)

Lean source

Proposition 8.10.4: let (Ω, 𝒜, μ) be a measure space and let f, g : Ω → ℝ be absolutely integrable (∫ |f| dμ < ∞ and ∫ |g| dμ < ∞). If f(x) = g(x) for μ-almost every x ∈ Ω, then ∫ f dμ = ∫ g dμ.

theorem proposition_8_10_4 {Ω : Type*} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) (f g : Ω → ℝ) (hf : MeasureTheory.Integrable f μ) (hg : MeasureTheory.Integrable g μ) (hfg : f =ᵐ[μ] g) : (∫ x, f x ∂ μ) = (∫ x, g x ∂ μ)

Lean source

Theorem 8.5 (Lebesgue dominated convergence theorem): let Ω ⊆ ℝ^n be measurable, let fₙ : Ω → EReal be measurable with pointwise limit f, and suppose there is a measurable F : Ω → [0, ∞] with finite integral such that |fₙ x| ≤ F x for all x and all n. Then f is measurable, ∫ |f| < ∞, and ∫ f is the limit of ∫ fₙ.

theorem lebesgue_dominated_convergence_on_subtype {n : ℕ} (Ω : Set (Fin n → ℝ)) (hΩ : MeasurableSet Ω) (fSeq : ℕ → Ω → EReal) (f : Ω → EReal) (h_measurable : ∀ n : ℕ, Measurable (fSeq n)) (h_tendsto : ∀ x : Ω, Filter.Tendsto (fun n : ℕ => fSeq n x) Filter.atTop (nhds (f x))) (F : Ω → ENNReal) (hF_measurable : Measurable F) (hF_integrable : (∫⁻ x, F x ∂ (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume)) < ⊤) (h_dom : ∀ n : ℕ, ∀ x : Ω, EReal.abs (fSeq n x) ≤ (F x : EReal)) : ∃ (hf_measurable : Measurable f) (hf_abs : HasFiniteAbsIntegral (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) f) (hfSeq_abs : ∀ n : ℕ, HasFiniteAbsIntegral (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) (fSeq n)), Filter.Tendsto (fun n : ℕ => lebesgueIntegral (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) (fSeq n) (h_measurable n) (hfSeq_abs n)) Filter.atTop (nhds (lebesgueIntegral (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) f hf_measurable hf_abs))

Lean source

Definition 8.11 (Upper and lower Lebesgue integrals): let Ω ⊆ ℝ^n be measurable and f : Ω → ℝ. The upper integral is the infimum of integrals of absolutely integrable majorants of f, and the lower integral is the supremum of integrals of absolutely integrable minorants of f.

noncomputable def upperLowerLebesgueIntegralsOn {n : ℕ} (Ω : Set (Fin n → ℝ)) (hΩ : MeasurableSet Ω) (f : Ω → ℝ) : EReal × EReal := let _ : MeasurableSet Ω := hΩ let μ : MeasureTheory.Measure Ω := MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume (sInf {I : EReal | ∃ g : Ω → ℝ, MeasureTheory.Integrable g μ ∧ (∀ x : Ω, f x ≤ g x) ∧ I = (∫ x, g x ∂ μ : ℝ)}, sSup {I : EReal | ∃ g : Ω → ℝ, MeasureTheory.Integrable g μ ∧ (∀ x : Ω, g x ≤ f x) ∧ I = (∫ x, g x ∂ μ : ℝ)})

Lean source

Lemma 8.9: let Ω ⊆ ℝ^n be measurable and f : Ω → ℝ. If the upper and lower Lebesgue-integral components of f are both equal to a finite value A : ℝ, then f is integrable (hence absolutely integrable) on the subtype measure, the integral of f is A, the upper/lower components for f are A, and the upper/lower components for -f are -A. In particular, the usual integral agrees with both upper and lower components.

theorem lemma_8_9 {n : ℕ} (Ω : Set (Fin n → ℝ)) (hΩ : MeasurableSet Ω) (f : Ω → ℝ) (A : ℝ) (hUpper : (upperLowerLebesgueIntegralsOn Ω hΩ f).1 = (A : EReal)) (hLower : (upperLowerLebesgueIntegralsOn Ω hΩ f).2 = (A : EReal)) : (upperLowerLebesgueIntegralsOn Ω hΩ f).1 = (upperLowerLebesgueIntegralsOn Ω hΩ f).2 ∧ MeasureTheory.Integrable f (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) ∧ MeasureTheory.Integrable (fun x => |f x|) (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) ∧ (∫ x, f x ∂ (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume)) = A ∧ (let Ωneg : Set (Fin n → ℝ) := (fun x => -x) ⁻¹' Ω let fneg : Ωneg → ℝ := fun x => f ⟨-x.1, x.2⟩ (∫ x, fneg x ∂ (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume)) = A) ∧ (upperLowerLebesgueIntegralsOn Ω hΩ f).1 = (A : EReal) ∧ (upperLowerLebesgueIntegralsOn Ω hΩ f).2 = (A : EReal) ∧ (upperLowerLebesgueIntegralsOn Ω hΩ (fun x => -f x)).1 = (-A : EReal) ∧ (upperLowerLebesgueIntegralsOn Ω hΩ (fun x => -f x)).2 = (-A : EReal)

Lean source

Proposition 8.11: if measurable real-valued functions f and g on ℝ are integrable, satisfy f x ≤ g x for all x, and have equal integrals, then f = g almost everywhere with respect to Lebesgue measure.

theorem ae_eq_of_integrable_le_and_integral_eq_on_real (f g : ℝ → ℝ) (hf_measurable : Measurable f) (hg_measurable : Measurable g) (hf_integrable : MeasureTheory.Integrable f) (hg_integrable : MeasureTheory.Integrable g) (hfg_le : ∀ x : ℝ, f x ≤ g x) (h_integral_eq : (∫ x, f x) = ∫ x, g x) : f =ᵐ[MeasureTheory.volume] g

Lean source

Proposition 8.12: defining fₙ = χ_[n,n+1) - χ_[n+1,n+2) on ℝ, the partial sums from n = 1 converge pointwise to g = χ_[1,2), and integration does not commute with this series: ∫ (∑_{n=1}^∞ fₙ) dm ≠ ∑_{n=1}^∞ ∫ fₙ dm.

theorem proposition_8_12 : let f : ℕ → ℝ → ℝ := fun n x => Set.indicator (Set.Ico (n : ℝ) ((n : ℝ) + 1)) (fun _ => (1 : ℝ)) x - Set.indicator (Set.Ico ((n : ℝ) + 1) ((n : ℝ) + 2)) (fun _ => (1 : ℝ)) x let g : ℝ → ℝ := fun x => Set.indicator (Set.Ico (1 : ℝ) 2) (fun _ => (1 : ℝ)) x (∀ x : ℝ, Filter.Tendsto (fun N : ℕ => Finset.sum (Finset.range N) (fun n => f (n + 1) x)) Filter.atTop (nhds (g x))) ∧ (∫ x, (tsum (fun n : ℕ => f (n + 1) x)) ∂ MeasureTheory.volume) ≠ tsum (fun n : ℕ => (∫ x, f (n + 1) x ∂ MeasureTheory.volume))

Lean source

Helper for Proposition 8.9: the positive part max (f x) 0 is nonnegative.

lemma helperForProposition_8_9_posPart_nonneg {α : Type*} (f : α → ℝ) (x : α) : 0 ≤ max (f x) 0

Lean source

Helper for Proposition 8.9: the negative part -min (f x) 0 is nonnegative.

lemma helperForProposition_8_9_negPart_nonneg {α : Type*} (f : α → ℝ) (x : α) : 0 ≤ -min (f x) 0

Lean source

Helper for Proposition 8.9: pointwise decomposition f = f⁺ - f⁻ using max/min.

lemma helperForProposition_8_9_self_eq_posPart_sub_negPart_pointwise {α : Type*} (f : α → ℝ) (x : α) : f x = max (f x) 0 - (-min (f x) 0)

Lean source

Helper for Proposition 8.9: pointwise decomposition |f| = f⁺ + f⁻ using max/min.

lemma helperForProposition_8_9_abs_eq_posPart_add_negPart_pointwise {α : Type*} (f : α → ℝ) (x : α) :

Lean source

Helper for Theorem 8.5: measurability of a pointwise limit in EReal.

lemma helperForTheorem_8_5_measurableLimitFromPointwiseTendsto {Ω : Type*} [MeasurableSpace Ω] (fSeq : ℕ → Ω → EReal) (f : Ω → EReal) (h_measurable : ∀ n : ℕ, Measurable (fSeq n)) (h_tendsto : ∀ x : Ω, Filter.Tendsto (fun n : ℕ => fSeq n x) Filter.atTop (nhds (f x))) : Measurable f

Lean source

Helper for Theorem 8.5: the positive-part ENNReal map is bounded by absolute value.

lemma helperForTheorem_8_5_posPartToENNReal_le_abs (z : EReal) : (max z 0).toENNReal ≤ EReal.abs z

Lean source

Helper for Theorem 8.5: the negative-part ENNReal map is bounded by absolute value.

lemma helperForTheorem_8_5_negPartToENNReal_le_abs (z : EReal) : (max (-z) 0).toENNReal ≤ EReal.abs z

Lean source

Helper for Theorem 8.5: decomposition of absolute value into positive and negative ENNReal parts.

lemma helperForTheorem_8_5_abs_eq_posPartAddNegPart (z : EReal) : EReal.abs z = (max z 0).toENNReal + (max (-z) 0).toENNReal

Lean source

Helper for Theorem 8.5: absolute value is bounded by positive and negative ENNReal parts.

lemma helperForTheorem_8_5_abs_le_posPartAddNegPart (z : EReal) : EReal.abs z ≤ (max z 0).toENNReal + (max (-z) 0).toENNReal

Lean source

Helper for Theorem 8.5: domination by an integrable bound yields finite absolute integral.

lemma helperForTheorem_8_5_hasFiniteAbsIntegral_of_domination {Ω : Type*} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) (g : Ω → EReal) (F : Ω → ENNReal) (hF_integrable : (∫⁻ x, F x ∂μ) < ⊤) (h_dom : ∀ x : Ω, EReal.abs (g x) ≤ (F x : EReal)) : HasFiniteAbsIntegral μ g

Lean source

Helper for Lemma 8.9: upper-candidate membership for -f is equivalent to lower-candidate membership for f after negating the candidate value.

lemma helperForLemma_8_9_negUpperCandidate_iff_lowerCandidate {n : ℕ} (Ω : Set (Fin n → ℝ)) (f : Ω → ℝ) (I : EReal) : (I ∈ {J : EReal | ∃ g : Ω → ℝ, MeasureTheory.Integrable g (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) ∧ (∀ x : Ω, (-f x) ≤ g x) ∧ J = (∫ x, g x ∂ (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) : ℝ)}) ↔ (-I ∈ {J : EReal | ∃ g : Ω → ℝ, MeasureTheory.Integrable g (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) ∧ (∀ x : Ω, g x ≤ f x) ∧ J = (∫ x, g x ∂ (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) : ℝ)})

Lean source

Helper for Lemma 8.9: lower-candidate membership for -f is equivalent to upper-candidate membership for f after negating the candidate value.

lemma helperForLemma_8_9_negLowerCandidate_iff_upperCandidate {n : ℕ} (Ω : Set (Fin n → ℝ)) (f : Ω → ℝ) (I : EReal) : (I ∈ {J : EReal | ∃ g : Ω → ℝ, MeasureTheory.Integrable g (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) ∧ (∀ x : Ω, g x ≤ (-f x)) ∧ J = (∫ x, g x ∂ (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) : ℝ)}) ↔ (-I ∈ {J : EReal | ∃ g : Ω → ℝ, MeasureTheory.Integrable g (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) ∧ (∀ x : Ω, f x ≤ g x) ∧ J = (∫ x, g x ∂ (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume) : ℝ)})

Lean source

Helper for Lemma 8.9: the upper/lower components for -f are the negations of the lower/upper components for f.

lemma helperForLemma_8_9_upperLower_neg_components {n : ℕ} (Ω : Set (Fin n → ℝ)) (hΩ : MeasurableSet Ω) (f : Ω → ℝ) : (upperLowerLebesgueIntegralsOn Ω hΩ (fun x => -f x)).1 = -(upperLowerLebesgueIntegralsOn Ω hΩ f).2 ∧ (upperLowerLebesgueIntegralsOn Ω hΩ (fun x => -f x)).2 = -(upperLowerLebesgueIntegralsOn Ω hΩ f).1

Lean source

Helper for Lemma 8.9: from equal upper/lower component values at A, conclude the same equalities for f and the corresponding sign-flipped values for -f.

lemma helperForLemma_8_9_finalize_from_component_equalities {n : ℕ} (Ω : Set (Fin n → ℝ)) (hΩ : MeasurableSet Ω) (f : Ω → ℝ) (A : ℝ) (hUpper : (upperLowerLebesgueIntegralsOn Ω hΩ f).1 = (A : EReal)) (hLower : (upperLowerLebesgueIntegralsOn Ω hΩ f).2 = (A : EReal)) : (upperLowerLebesgueIntegralsOn Ω hΩ f).1 = (A : EReal) ∧ (upperLowerLebesgueIntegralsOn Ω hΩ f).2 = (A : EReal) ∧ (upperLowerLebesgueIntegralsOn Ω hΩ (fun x => -f x)).1 = (-A : EReal) ∧ (upperLowerLebesgueIntegralsOn Ω hΩ (fun x => -f x)).2 = (-A : EReal)

8.4 — Comparison with the Riemann Integral

Lean authors: Zichen Wang, Wanli Ma, Min Cui, Zaiwen Wen.

Source header

Tao's book-level predicate asserting that f is Riemann integrable on a bounded interval I.

def TaoRiemannIntegrableOn (I : Set ℝ) (f : ℝ → ℝ) : Prop := MeasureTheory.IntegrableOn f I MeasureTheory.volume

Lean source

The Riemann integral of f over a bounded interval I.

noncomputable def riemannIntegralOn (I : Set ℝ) (f : ℝ → ℝ) : ℝ := ∫ x in I, f x ∂ MeasureTheory.volume

Lean source

Proposition 8.13: Let I ⊆ ℝ be a bounded interval, and let f : I → ℝ be Riemann integrable. Then f is Lebesgue measurable and Lebesgue integrable on I, and the Lebesgue integral on I equals the Riemann integral on I.

theorem proposition_8_13 {I : Set ℝ} (hinterval : Set.OrdConnected I) (hbounded : Bornology.IsBounded I) {f : ℝ → ℝ} (hriemann : TaoRiemannIntegrableOn I f) : AEMeasurable f (MeasureTheory.volume.restrict I) ∧ MeasureTheory.IntegrableOn f I MeasureTheory.volume ∧ (∫ x in I, f x ∂ MeasureTheory.volume) = riemannIntegralOn I f

Lean source

Proposition 8.14: Define f : [0,1] → ℝ by f(x) = 1 for rational x and f(x) = 0 for irrational x. Then f is Lebesgue integrable on [0,1] and ∫_[0,1] f dμ = 0, where μ is Lebesgue measure.

theorem proposition_8_14 : let f : ℝ → ℝ := (Set.range ((↑) : ℚ → ℝ)).indicator (fun _ => (1 : ℝ)) MeasureTheory.IntegrableOn f (Set.Icc (0 : ℝ) 1) MeasureTheory.volume ∧ (∫ x in Set.Icc (0 : ℝ) 1, f x ∂ MeasureTheory.volume) = 0

Lean source

Helper for Proposition 8.13: unpacking TaoRiemannIntegrableOn yields IntegrableOn.

lemma helperForProposition_8_13_integrableOn_of_riemann {I : Set ℝ} {f : ℝ → ℝ} (hriemann : TaoRiemannIntegrableOn I f) : MeasureTheory.IntegrableOn f I MeasureTheory.volume

Lean source

Helper for Proposition 8.13: a Riemann-integrable function is a.e.-measurable on I.

lemma helperForProposition_8_13_aemeasurable_of_riemann {I : Set ℝ} {f : ℝ → ℝ} (hriemann : TaoRiemannIntegrableOn I f) : AEMeasurable f (MeasureTheory.volume.restrict I)

Lean source

Helper for Proposition 8.14: the set of rational real numbers has Lebesgue measure zero.

lemma helperForProposition_8_14_rationalRange_measure_zero : MeasureTheory.volume (Set.range ((↑) : ℚ → ℝ)) = 0

Lean source

Helper for Proposition 8.14: the Dirichlet function is almost everywhere zero on [0,1].

lemma helperForProposition_8_14_ae_zero_on_interval : (Set.range ((↑) : ℚ → ℝ)).indicator (fun _ => (1 : ℝ)) =ᵐ[MeasureTheory.volume.restrict (Set.Icc (0 : ℝ) 1)] (fun _ => (0 : ℝ))

Lean source

Helper for Proposition 8.14: the Dirichlet function is integrable on [0,1].

lemma helperForProposition_8_14_integrableOn : MeasureTheory.IntegrableOn ((Set.range ((↑) : ℚ → ℝ)).indicator (fun _ => (1 : ℝ))) (Set.Icc (0 : ℝ) 1) MeasureTheory.volume

Lean source

Helper for Proposition 8.14: the integral of the Dirichlet function over [0,1] is zero.

lemma helperForProposition_8_14_integral_eq_zero : (∫ x in Set.Icc (0 : ℝ) 1, ((Set.range ((↑) : ℚ → ℝ)).indicator (fun _ => (1 : ℝ))) x ∂ MeasureTheory.volume) = 0

8.5 — Fubini's Theorem

Lean authors: Zichen Wang, Wanli Ma, Min Cui, Zaiwen Wen.

Source header

Theorem 8.6 (Fubini--Tonelli for absolutely integrable functions on ℝ²): if f : ℝ × ℝ → ℝ is Lebesgue measurable and ∫ |f| < ∞ on ℝ², then for almost every x the section y ↦ f (x, y) is integrable, for almost every y the section x ↦ f (x, y) is integrable, the iterated-integral functions are integrable, and both the Fubini equalities for f and for |f| hold.

open MeasureTheory theorem fubini_tonelli_absolutely_integrable_R2 (f : ℝ × ℝ → ℝ) (hf_meas : AEMeasurable f (volume : Measure (ℝ × ℝ))) (hfin : Integrable (fun z : ℝ × ℝ => |f z|)) : (∀ᵐ x : ℝ ∂(volume : Measure ℝ), Integrable (fun y : ℝ => f (x, y))) ∧ (∀ᵐ y : ℝ ∂(volume : Measure ℝ), Integrable (fun x : ℝ => f (x, y))) ∧ Integrable (fun x : ℝ => ∫ y : ℝ, f (x, y) ∂(volume : Measure ℝ)) ∧ Integrable (fun y : ℝ => ∫ x : ℝ, f (x, y) ∂(volume : Measure ℝ)) ∧ (∫ z : ℝ × ℝ, f z ∂(volume : Measure (ℝ × ℝ))) = (∫ x : ℝ, (∫ y : ℝ, f (x, y) ∂(volume : Measure ℝ)) ∂(volume : Measure ℝ)) ∧ (∫ x : ℝ, (∫ y : ℝ, f (x, y) ∂(volume : Measure ℝ)) ∂(volume : Measure ℝ)) = (∫ y : ℝ, (∫ x : ℝ, f (x, y) ∂(volume : Measure ℝ)) ∂(volume : Measure ℝ)) ∧ (∫ x : ℝ, (∫ y : ℝ, |f (x, y)| ∂(volume : Measure ℝ)) ∂(volume : Measure ℝ)) = (∫ z : ℝ × ℝ, |f z| ∂(volume : Measure (ℝ × ℝ))) ∧ (∫ z : ℝ × ℝ, |f z| ∂(volume : Measure (ℝ × ℝ))) = (∫ y : ℝ, (∫ x : ℝ, |f (x, y)| ∂(volume : Measure ℝ)) ∂(volume : Measure ℝ))

Lean source

Theorem 8.7 (Fubini's theorem): if f : ℝ × ℝ → ℝ is Lebesgue measurable and ∫ |f| < ∞ on ℝ², then (1) for almost every x, the section y ↦ f (x, y) is absolutely integrable and F x := ∫ y, f (x, y) defines an L¹ function of x; (2) for almost every y, the section x ↦ f (x, y) is absolutely integrable and G y := ∫ x, f (x, y) defines an L¹ function of y; and (3) the two iterated integrals agree with the integral over ℝ².

open MeasureTheory theorem fubini_theorem_R2 (f : ℝ × ℝ → ℝ) (hf_meas : AEMeasurable f (volume : Measure (ℝ × ℝ))) (hfin : Integrable (fun z : ℝ × ℝ => |f z|)) : (∀ᵐ x : ℝ ∂(volume : Measure ℝ), Integrable (fun y : ℝ => f (x, y))) ∧ Integrable (fun x : ℝ => ∫ y : ℝ, f (x, y) ∂(volume : Measure ℝ)) ∧ (∀ᵐ y : ℝ ∂(volume : Measure ℝ), Integrable (fun x : ℝ => f (x, y))) ∧ Integrable (fun y : ℝ => ∫ x : ℝ, f (x, y) ∂(volume : Measure ℝ)) ∧ (∫ x : ℝ, (∫ y : ℝ, f (x, y) ∂(volume : Measure ℝ)) ∂(volume : Measure ℝ)) = (∫ z : ℝ × ℝ, f z ∂(volume : Measure (ℝ × ℝ))) ∧ (∫ z : ℝ × ℝ, f z ∂(volume : Measure (ℝ × ℝ))) = (∫ y : ℝ, (∫ x : ℝ, f (x, y) ∂(volume : Measure ℝ)) ∂(volume : Measure ℝ))

Lean source

Helper for Theorem 8.6: absolute integrability of a real-valued function on ℝ² implies its integrability.

open MeasureTheory lemma helperForTheorem_8_6_integrable_of_absIntegrable (f : ℝ × ℝ → ℝ) (hf_meas : AEMeasurable f (volume : Measure (ℝ × ℝ))) (hfin : Integrable (fun z : ℝ × ℝ => |f z|)) : Integrable f

Lean source

Helper for Theorem 8.6: integrability on ℝ² gives a.e. integrable sections and integrability of the iterated-integral functions.

open MeasureTheory lemma helperForTheorem_8_6_sections_and_outer_integrable (f : ℝ × ℝ → ℝ) (hf_int : Integrable f) : (∀ᵐ x : ℝ ∂(volume : Measure ℝ), Integrable (fun y : ℝ => f (x, y))) ∧ (∀ᵐ y : ℝ ∂(volume : Measure ℝ), Integrable (fun x : ℝ => f (x, y))) ∧ Integrable (fun x : ℝ => ∫ y : ℝ, f (x, y) ∂(volume : Measure ℝ)) ∧ Integrable (fun y : ℝ => ∫ x : ℝ, f (x, y) ∂(volume : Measure ℝ))

Lean source

Helper for Theorem 8.6: Fubini equalities for an integrable real-valued function on ℝ².

open MeasureTheory lemma helperForTheorem_8_6_fubini_equalities_for_f (f : ℝ × ℝ → ℝ) (hf_int : Integrable f) : (∫ z : ℝ × ℝ, f z ∂(volume : Measure (ℝ × ℝ))) = (∫ x : ℝ, (∫ y : ℝ, f (x, y) ∂(volume : Measure ℝ)) ∂(volume : Measure ℝ)) ∧ (∫ x : ℝ, (∫ y : ℝ, f (x, y) ∂(volume : Measure ℝ)) ∂(volume : Measure ℝ)) = (∫ y : ℝ, (∫ x : ℝ, f (x, y) ∂(volume : Measure ℝ)) ∂(volume : Measure ℝ))

Lean source

Helper for Theorem 8.6: Tonelli equalities for the absolute value |f| on ℝ².

open MeasureTheory lemma helperForTheorem_8_6_tonelli_equalities_for_abs (f : ℝ × ℝ → ℝ) (hfin : Integrable (fun z : ℝ × ℝ => |f z|)) : (∫ x : ℝ, (∫ y : ℝ, |f (x, y)| ∂(volume : Measure ℝ)) ∂(volume : Measure ℝ)) = (∫ z : ℝ × ℝ, |f z| ∂(volume : Measure (ℝ × ℝ))) ∧ (∫ z : ℝ × ℝ, |f z| ∂(volume : Measure (ℝ × ℝ))) = (∫ y : ℝ, (∫ x : ℝ, |f (x, y)| ∂(volume : Measure ℝ)) ∂(volume : Measure ℝ))