Mathlib.Measure­Theory.Analytic­Set­Universal­Measurability

This module gathers the Choquet-capacity proof that analytic events in Polish Borel spaces are measurable for every completed finite measure, together with the corresponding completed measurability and outer-integral bri

Capacity 4 core · 5 supporting This file isolates the small piece of Choquet capacity theory needed to prove universal measurability of analytic sets. ★ isCapacitable

Choquet capacities on Polish spaces

This file isolates the small piece of Choquet capacity theory needed to prove universal measurability of analytic sets. A capacity is represented directly as a set function, with continuity from below, finite values on compact sets, and right-continuity through open neighborhoods of compact sets. The main theorem is the Choquet capacitability theorem specialized to Mathlib's topological MeasureTheory.AnalyticSet.

The formulation deliberately avoids introducing a second notion of analytic set or a general paving library. It follows the hypotheses used in Kechris, Classical Descriptive Set Theory, Theorem 30.13, and is sufficient for the outer measure of a finite Borel measure.

structure ChoquetCapacity reviewed
MeasureTheory

A Choquet capacity on a topological sample space bundles an extended-nonnegative-real-valued set function that is monotone under set inclusion, continuous from below along increasing sequences of sets, finite on every compact set, and right-continuous at compact sets: any strict upper bound on a compact set's value is already an upper bound on some open neighborhood of that compact set.

Definition (Lean source)
Ω :
The value of the capacity on an arbitrary set.
toFun :
Set Ω → ℝ≥0∞
A capacity is monotone under inclusion.
mono' :
∀ ⦃s t : Set Ω⦄
if
s ⊆ t
then
toFun s ≤ toFun t
A capacity is continuous along increasing sequences.
iUnion_of_monotone' :
∀ (s : ℕ → Set Ω)
then
toFun (⋃ n, s n) = ⨆ n, toFun (s n)
A capacity is finite on compact sets.
isCompact_lt_top' :
∀ ⦃K : Set Ω⦄
if
IsCompact K
then
toFun K < ⊤
A capacity is right-continuous on compact sets: every strict upper bound at a compact set remains an upper bound on some open neighborhood.
exists_isOpen_superset_lt' :
∀ ⦃K : Set Ω⦄,
IsCompact K → ∀ ⦃a : ℝ≥0∞⦄, toFun K < a → ∃ U, K ⊆ U ∧ IsOpen U ∧ toFun U < a
def IsCapacitable reviewed
MeasureTheory.ChoquetCapacity

For every topological sample space, Choquet capacity on that space, and subset of the sample space, the property of being capacitable holds exactly when the capacity of the subset equals the supremum of the capacities of all compact subsets contained in it.

Definition (Lean source)
Ω :
Type u_1
shared
s :
Set Ω
IsCapacitable c s :
Prop
c s = ⨆ (K : Set Ω) (_ : K ⊆ s) (_ : IsCompact K), c K
theorem isCapacitable reviewed
MeasureTheory.AnalyticSet

Choquet's capacitability theorem. On a Polish sample space, if a set s is analytic — the continuous image of a Polish space, or empty, then s is capacitable for every Choquet capacity c: the capacity of s equals the supremum, over the compact subsets of s, of their capacities.

Formal statement
Ω :
shared
hs :
c.IsCapacitable s
Proof (Lean source)
theorem _root_.MeasureTheory.AnalyticSet.isCapacitable [PolishSpace Ω] {c : ChoquetCapacity Ω} {s : Set Ω} (hs : AnalyticSet s) : c.IsCapacitable s := by apply le_antisymm · rw [AnalyticSet] at hs rcases hs with rfl | ⟨f, hf, hfs⟩ · exact le_iSup_of_le ∅ (le_iSup_of_le (Set.empty_subset _) (le_iSup_of_le isCompact_empty le_rfl)) · subst hfs apply le_of_forall_lt_imp_le_of_dense intro t ht have hrange_union : range f = ⋃ k, f '' {g : ℕ → ℕ | g 0 ≤ k} := by rw [← Set.image_univ, show (Set.univ : Set (ℕ → ℕ)) = ⋃ k, {g : ℕ → ℕ | g 0 ≤ k} from by ext g simp [Set.mem_iUnion] exact ⟨g 0, le_refl _⟩, Set.image_iUnion] have hmono_base : Monotone (fun k => f '' {g : ℕ → ℕ | g 0 ≤ k}) := by intro a b hab exact Set.image_mono fun _ hx => hx.trans hab rw [hrange_union, c.iUnion_of_monotone' _ hmono_base] at ht obtain ⟨k₀, hk₀⟩ := lt_iSup_iff.mp ht have hcyl0 : f '' {g : ℕ → ℕ | g 0 ≤ k₀} = f '' Cyl (fun _ => k₀) 0 := by congr 1 ext g simp [Cyl] have rec_step : ∀ (M : ℕ → ℕ) (n : ℕ), t < c (f '' Cyl M n) → ∃ k, t < c (f '' Cyl (update M (n + 1) k) (n + 1)) := by intro M n hlt have hsplit : c (f '' Cyl M n) = ⨆ k, c (f '' (Cyl M n ∩ {g | g (n + 1) ≤ k})) := by conv_lhs => rw [cyl_succ_eq M n, Set.image_iUnion] exact c.iUnion_of_monotone' _ (fun _ _ h => Set.image_mono (monotone_cyl_split M n h)) rw [hsplit] at hlt obtain ⟨k, hk⟩ := lt_iSup_iff.mp hlt exact ⟨k, by rwa [cyl_inter_eq_cyl_update] at hk⟩ let build : (n : ℕ) → {M : ℕ → ℕ // t < c (f '' Cyl M n)} := fun n => Nat.rec ⟨fun _ => k₀, hcyl0 ▸ hk₀⟩ (fun m ⟨M, hM⟩ => ⟨Function.update M (m + 1) (choose (rec_step M m hM)), Classical.choose_spec (rec_step M m hM)⟩) n let Nseq : ℕ → (ℕ → ℕ) := fun n => (build n).val have hNseq_prop : ∀ n, t < c (f '' Cyl (Nseq n) n) := fun n => (build n).property have hNseq_consistent : ∀ n i, i ≤ n → Nseq (n + 1) i = Nseq n i := by intro n i hi show (update (Nseq n) (n + 1) _) i = Nseq n i exact Function.update_of_ne (by omega) .. let N : ℕ → ℕ := fun i => Nseq i i have hN_agree : ∀ n i, i ≤ n → N i = Nseq n i := by intro n induction n with | zero => intro i hi simp only [Nat.le_zero] at hi subst hi rfl | succ m ih => intro i hi by_cases heq : i = m + 1 · subst heq rfl · have him : i ≤ m := by omega show Nseq i i = Nseq (m + 1) i rw [hNseq_consistent m i him] exact ih i him have hcyl_eq : ∀ n, Cyl N n = Cyl (Nseq n) n := fun n => cyl_ext N (Nseq n) n (hN_agree n) have hcap_bound : ∀ n, t < c (f '' Cyl N n) := fun n => hcyl_eq n ▸ hNseq_prop n let K := f '' Bnd N have hK_compact : IsCompact K := (isCompact_bnd N).image hf have hK_sub : K ⊆ range f := Set.image_subset_range f _ have htK : t ≤ c K := by by_contra hnot have hcKt : c K < t := lt_of_not_ge hnot obtain ⟨U, hKU, hU, hcUt⟩ := c.exists_isOpen_superset_lt hK_compact hcKt obtain ⟨n, hn⟩ := exists_closure_image_cyl_subset hf N hU hKU have := (hcap_bound n).trans_le (c.mono subset_closure) exact (not_lt_of_ge hcUt.le) (this.trans_le (c.mono hn)) exact htK.trans (le_iSup_of_le K (le_iSup_of_le hK_sub (le_iSup_of_le hK_compact le_rfl))) · exact iSup_le fun K => iSup_le fun hKs => iSup_le fun _ => c.mono hKs
def toChoquetCapacity reviewed
MeasureTheory.Measure

For every Polish topological sample space equipped with its Borel σ-algebra and finite measure on that space, the Choquet capacity induced by the measure assigns each subset the measure’s value on that subset.

Definition (Lean source)
Ω :
shared
toChoquetCapacity μ :
clause 1
toFun := μ
clause 2
mono' := fun {_ _} hst ↦ μ.mono hst
clause 3
iUnion_of_monotone' := fun _ hs ↦ hs.measure_iUnion
clause 4
isCompact_lt_top' := fun {_} hK ↦ hK.measure_lt_top
clause 5
exists_isOpen_superset_lt' := fun {_} hK {_} ha ↦ hK.exists_isOpen_lt_of_lt _ ha
5 supporting declarations (lemmas, instances)
Universal­Measurability 1 core · 1 supporting This file converts Choquet capacitability for the outer measure of a finite Borel measure into membership in the completed sigma-algebra. ★ nullMeasurableSet

Universal measurability of analytic sets

This file converts Choquet capacitability for the outer measure of a finite Borel measure into membership in the completed sigma-algebra. Its main declaration is the public universal measurability theorem for Mathlib's MeasureTheory.AnalyticSet.

theorem nullMeasurableSet reviewed
MeasureTheory.AnalyticSet

On a Polish sample space equipped with its Borel σ-algebra, if a set s is analytic, then s is null-measurable for every finite Borel measure μ: it becomes measurable after completing μ, so it differs from an ordinary measurable event only on a μ-null set.

Formal statement
Ω :
Type u_1
Set Ω
shared
hs :
Proof (Lean source)
theorem AnalyticSet.nullMeasurableSet [PolishSpace Ω] [BorelSpace Ω] {s : Set Ω} (hs : AnalyticSet s) (μ : Measure Ω) [IsFiniteMeasure μ] : NullMeasurableSet s μ := by exact (hs.isCapacitable (c := μ.toChoquetCapacity)).nullMeasurableSet
1 supporting declaration (lemmas, instances)
  • nullMeasurableSet theorem — A set capacitable for the outer measure of a finite measure is null-measurable for that measure.
    Ω :
    shared
    s :
    Set Ω
    hs :
    μ.toChoquetCapacity.IsCapacitable s
    Proof (Lean source)
    theorem ChoquetCapacity.IsCapacitable.nullMeasurableSet [PolishSpace Ω] [BorelSpace Ω] {μ : Measure Ω} [IsFiniteMeasure μ] {s : Set Ω} (hs : μ.toChoquetCapacity.IsCapacitable s) : NullMeasurableSet s μ := by by_cases hzero : μ s = 0 · exact NullMeasurableSet.of_null hzero have hlt (n : ℕ) : μ s * (1 - (n + 1 : ℝ≥0∞)⁻¹) < μ s := by nth_rw 2 [← mul_one (μ s)] refine (ENNReal.mul_lt_mul_iff_right hzero (by finiteness)).2 ?_ refine ENNReal.sub_lt_of_lt_add (by simp) ?_ exact ENNReal.lt_add_right (by simp) (by simp) have hex (n : ℕ) : ∃ K : Set Ω, K ⊆ s ∧ IsCompact K ∧ μ s * (1 - (n + 1 : ℝ≥0∞)⁻¹) < μ K := by rw [ChoquetCapacity.IsCapacitable] at hs have hsc : μ s = ⨆ (K : Set Ω) (_ : K ⊆ s) (_ : IsCompact K), μ K := by simpa only [Measure.toChoquetCapacity_apply] using hs have h : μ s * (1 - (n + 1 : ℝ≥0∞)⁻¹) < ⨆ (K : Set Ω) (_ : K ⊆ s) (_ : IsCompact K), μ K := (hlt n).trans_eq hsc simpa only [lt_iSup_iff, exists_prop] using h choose K hKsub hKcompact hKgt using hex let B : Set Ω := ⋃ n, K n have hBsub : B ⊆ s := iUnion_subset hKsub have hBmeas : MeasurableSet B := MeasurableSet.iUnion fun n ↦ (hKcompact n).isClosed.measurableSet have hBmeasure : μ B = μ s := by refine le_antisymm (μ.mono hBsub) ?_ have htend : Tendsto (fun n : ℕ ↦ μ s * (1 - (n + 1 : ℝ≥0∞)⁻¹)) atTop (𝓝 (μ s)) := by nth_rw 2 [← mul_one (μ s)] refine ENNReal.Tendsto.const_mul ?_ (by simp) nth_rw 3 [← tsub_zero 1] refine ENNReal.Tendsto.sub tendsto_const_nhds ?_ (by simp) convert ENNReal.tendsto_inv_nat_nhds_zero.comp (tendsto_add_atTop_nat 1) with n simp refine le_of_tendsto_of_tendsto' htend tendsto_const_nhds fun n ↦ (hKgt n).le.trans ?_ exact μ.mono (Set.subset_iUnion K n) have hnull : μ (s \ B) = 0 := by rw [measure_diff hBsub hBmeas.nullMeasurableSet (by finiteness), hBmeasure, tsub_self] rw [← union_diff_cancel hBsub] exact hBmeas.nullMeasurableSet.union (NullMeasurableSet.of_null hnull)
Upper­Semianalytic 3 core · 8 supporting This file provides only the function-level compatibility needed by downstream statistical applications: an extended-nonnegative function whose strict superlevel sets are analytic is measurable on the completion of every ★ lintegral_completion_eq_outerLIntegral

Completed measurability of upper-semi-analytic losses

This file provides only the function-level compatibility needed by downstream statistical applications: an extended-nonnegative function whose strict superlevel sets are analytic is measurable on the completion of every finite Borel measure, and its completed lower integral agrees with the lower integral computed against the original measure.

def outerLIntegral reviewed
MeasureTheory

The outer integral of an extended-nonnegative-valued function on a measurable sample space, under a measure on that sample space, is the infimum of the lower Lebesgue integrals of all measurable functions that dominate the given function pointwise.

Definition (Lean source)
Ω :
Type u_1
shared
μ :
f :
Ω → ℝ≥0∞
outerLIntegral μ f :
ℝ≥0∞
⨅ (g : Ω → ℝ≥0∞) (_ : Measurable g) (_ : f ≤ g), ∫⁻ ω, g ω ∂μ
def UpperSemianalytic reviewed
MeasureTheory

An extended-nonnegative-valued function on a topological sample space is upper-semi-analytic exactly when, for every extended-nonnegative threshold aa, the set of sample points at which its value is strictly greater than aa is analytic.

Definition (Lean source)
Ω :
Type u_1
shared
f :
Ω → ℝ≥0∞
a :
ℝ≥0∞
UpperSemianalytic f :
Prop
AnalyticSet {ω | a < f ω}
theorem lintegral_completion_eq_outerLIntegral reviewed
MeasureTheory.UpperSemianalytic

On a Polish sample space equipped with its Borel σ-algebra and a finite measure μ, if f is upper-semi-analytic — every strict superlevel set {ω | a < f ω} is analytic, then the lower Lebesgue integral of f against the completion of μ equals the outer integral of f with respect to μ, i.e. the infimum of the lower integrals of all measurable pointwise majorants of f.

Formal statement
Ω :
Type u_1
Ω → ℝ≥0∞
shared
(∫⁻ ω, f ω ∂μ.completion) = outerLIntegral μ f
Proof (Lean source)
theorem lintegral_completion_eq_outerLIntegral [PolishSpace Ω] [BorelSpace Ω] {f : Ω → ℝ≥0∞} (hf : UpperSemianalytic f) (μ : Measure Ω) [IsFiniteMeasure μ] : (∫⁻ ω, f ω ∂μ.completion) = outerLIntegral μ f := by classical let m₀ : MeasurableSpace (NullMeasurableSpace Ω μ) := ‹MeasurableSpace Ω› have hm : m₀ ≤ (@NullMeasurableSpace.instMeasurableSpace Ω ‹MeasurableSpace Ω› μ) := by intro s hs change NullMeasurableSet s μ exact hs.nullMeasurableSet let μ' : @Measure (NullMeasurableSpace Ω μ) m₀ := by unfold m₀ NullMeasurableSpace exact μ have htrim : μ.completion.trim hm = μ' := by apply @Measure.ext (NullMeasurableSpace Ω μ) m₀ intro s hs rw [trim_measurableSet_eq hm hs] rfl have h_lintegral (g : Ω → ℝ≥0∞) (hg : Measurable g) : (∫⁻ ω, g ω ∂μ.completion) = ∫⁻ ω, g ω ∂μ := by have hμ' : (∫⁻ ω, g ω ∂μ') = ∫⁻ ω, g ω ∂μ := by unfold μ' m₀ NullMeasurableSpace rfl have hg' : @Measurable (NullMeasurableSpace Ω μ) ℝ≥0∞ m₀ _ g := by unfold m₀ NullMeasurableSpace exact hg have ht := @lintegral_trim (NullMeasurableSpace Ω μ) m₀ (@NullMeasurableSpace.instMeasurableSpace Ω ‹MeasurableSpace Ω› μ) μ.completion hm g hg' rw [← hμ', ← htrim] exact ht.symm rw [outerLIntegral] apply le_antisymm · refine le_iInf fun g ↦ le_iInf fun hg ↦ le_iInf fun hfg ↦ ?_ calc (∫⁻ ω, f ω ∂μ.completion) ≤ ∫⁻ ω, g ω ∂μ.completion := lintegral_mono hfg _ = ∫⁻ ω, g ω ∂μ := h_lintegral g hg · let hfm : AEMeasurable f μ := (hf.nullMeasurable μ).aemeasurable let g : Ω → ℝ≥0∞ := hfm.mk f have hgm : Measurable g := hfm.measurable_mk have hfg : f =ᵐ[μ] g := hfm.ae_eq_mk have hDnull : μ {ω | f ω ≠ g ω} = 0 := by rw [← compl_mem_ae_iff] have hfg' : {ω | f ω = g ω} ∈ ae μ := hfg simpa only [compl_setOf, Classical.not_not] using hfg' obtain ⟨N, hDN, hNm, hNnull⟩ := exists_measurable_superset_of_null hDnull let G : Ω → ℝ≥0∞ := N.piecewise (fun _ ↦ ⊤) g have hGm : Measurable G := by fun_prop have hfG : f ≤ G := by intro ω by_cases hω : ω ∈ N · simp [G, hω] · have hEq : f ω = g ω := by by_contra hne exact hω (hDN hne) simp [G, hω, hEq] have hGg : G =ᵐ[μ] g := by filter_upwards [compl_mem_ae_iff.2 hNnull] with ω hω have hωN : ω ∉ N := by simpa using hω simp [G, hωN] have hGf : G =ᵐ[μ.completion] f := by rw [μ.ae_completion] exact hGg.trans hfg.symm have houter : (⨅ (g : Ω → ℝ≥0∞) (_ : Measurable g) (_ : f ≤ g), ∫⁻ ω, g ω ∂μ) ≤ ∫⁻ ω, G ω ∂μ := iInf₂_le_of_le G hGm (iInf_le_of_le hfG le_rfl) calc (⨅ (g : Ω → ℝ≥0∞) (_ : Measurable g) (_ : f ≤ g), ∫⁻ ω, g ω ∂μ) ≤ ∫⁻ ω, G ω ∂μ := houter _ = ∫⁻ ω, G ω ∂μ.completion := (h_lintegral G hGm).symm _ = ∫⁻ ω, f ω ∂μ.completion := lintegral_congr_ae hGf
8 supporting declarations (lemmas, instances)