Mathlib.MeasureTheory
Measure-theoretic helpers staged for Mathlib: integral-bind lemmas for kernel compositions.
CondExpIndicatorTower 1 core · 0 supporting The theorem condExp_setIndicator_condExp_of_le is a generic conditional-expectation identity (no probability/causal content): for a tower of σ-algebras m ≤ m', an m'-measurable set s, and integrable f, conditioning the m ★ condExp_setIndicator_condExp_of_le
Conditioning ↔ inner-regression weighting across a σ-algebra tower
The theorem condExp_setIndicator_condExp_of_le is a generic
conditional-expectation identity (no probability/causal content): for a tower of
σ-algebras m ≤ m', an m'-measurable set s, and integrable f, conditioning the
masked outcome 1_s · f on the coarse m is the same as first replacing f by its
inner regression μ[f | m'] and then conditioning on m:
μ[1_s · f | m] =ᵐ μ[1_s · μ[f | m'] | m].
This is the measure-theoretic kernel behind "regression adjustment = inverse-
propensity weighting": with m = σ(X), m' = σ(D, X), s = {D = d}, dividing both
sides by μ[1_s | m] = P[D=d | σX] turns the left side into the IPW/adjustment
functional and the right side into the outcome regression. It recurs across ATE /
ATT / DTR back-door arguments, so it is factored out here as a reusable lemma and a
candidate Mathlib contribution.
Proof is the inner condExp_indicator (s is m'-measurable) followed by the
tower condExp_condExp_of_le.
Conditioning a masked outcome equals conditioning its inner regression. Given a tower of σ-algebras m ≤ m' ≤ m0 on the sample space, with the trim of the measure μ to m' σ-finite, a set s measurable with respect to the finer σ-algebra m', and an integrable function f, the conditional expectation given m of the masked outcome 1_s · f agrees μ-almost everywhere with the conditional expectation given m of f — first replaced by its conditional expectation given m', then masked by s.
Formal statement
Proof (Lean source)
EqOfRnDerivEq 1 core · 0 supporting The theorem Measure.eq_of_rnDeriv_eq says that two measures which are both absolutely continuous with respect to a common reference and whose Radon–Nikodym derivatives against that reference agree almost everywhere are e ★ eq_of_rnDeriv_eq
Equality of measures from equality of Radon–Nikodym derivatives
The theorem Measure.eq_of_rnDeriv_eq says that two measures which are both absolutely
continuous with respect to a common reference and whose Radon–Nikodym derivatives against
that reference agree almost everywhere are equal. This is the "uniqueness" direction of
the Radon–Nikodym theorem, packaged as a term-mode lemma so that it can be applied by
unification rather than by syntactic rewriting — the latter is brittle when the measures
carry heavy dependent-type indexing.
It is a project-independent statement about measures over a generic measurable space and a candidate Mathlib contribution.
A measure is determined by its Radon–Nikodym derivative against a fixed reference. If the measure μ is absolutely continuous with respect to a σ-finite reference measure ρ, the measure ν is likewise absolutely continuous with respect to ρ, and their Radon–Nikodym densities dμ/dρ and dν/dρ agree ρ-almost everywhere, then μ and ν are equal as measures.
Formal statement
Proof (Lean source)
FiniteAtomicMeasure 1 core · 2 supporting This file provides decomposition, pointwise recovery, and integrability facts for finite measures concentrated on a finite family of measurable atoms. ★ measure_eq_fin_sum_smul_dirac_of_range
Measures carried by finitely many atoms
This file provides decomposition, pointwise recovery, and integrability facts for finite measures concentrated on a finite family of measurable atoms.
Let μ be a finite measure and cell an injective family of finitely many points of the sample space, indexed by a finite type ι. If every singleton {cell i} is measurable and μ assigns its full mass to the range of cell, i.e. μ puts no mass outside these finitely many points, then μ equals the sum, over the index i, of the point mass μ {cell i} scaling the Dirac measure at cell i.
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
property_at_of_ae_of_singleton_poslemma — An almost-sure property holds at every point to which the measure assigns nonzero mass.Proof (Lean source)
lemma property_at_of_ae_of_singleton_pos (μ : Measure 𝒳) (p : 𝒳 → Prop) {x : 𝒳} (hp : ∀ᵐ y ∂μ, p y) (hx : μ {x} ≠ 0) : p x := by by_contra hpx have hnull : μ {y | ¬p y} = 0 := by change {y | p y} ∈ ae μ at hp rw [mem_ae_iff] at hp simpa only [Set.compl_setOf] using hp apply hx exact measure_mono_null (by simpa [Set.singleton_subset_iff]) hnull -
integrable_of_finite_atomic_supportlemma — Every strongly measurable normed-vector-valued function is integrable under a finite measure concentrated on finitely many measurable points.hypothesesconclusionIntegrable f μProof (Lean source)
lemma integrable_of_finite_atomic_support (μ : Measure 𝒳) [IsFiniteMeasure μ] {ι : Type*} [Finite ι] (cell : ι ↪ 𝒳) (hcell : ∀ i, MeasurableSet {cell i}) (hrange : μ (range cell) = μ univ) {E : Type*} [NormedAddCommGroup E] (f : 𝒳 → E) (hf : StronglyMeasurable f) : Integrable f μ := by letI := ofFinite ι rw [measure_eq_fin_sum_smul_dirac_of_range μ cell hcell hrange] apply integrable_finset_sum_measure.2 intro i hi exact (integrable_dirac' hf (by simp)).smul_measure (measure_ne_top μ {cell i})
FinsetValues 7 core · 4 supporting This file provides the graph- and model-agnostic value-space infrastructure shared by the structural-causal-model and potential-outcome frameworks: typed value assignments over a finite node set (ValuesOn), their measura ★ measurable_valuesProjection★ comap_valuesProjection_le★ measurePreserving_valuesEquivOfEq
Value assignments over finite node sets
This file provides the graph- and model-agnostic value-space infrastructure shared by the
structural-causal-model and potential-outcome frameworks: typed value assignments over a finite
node set (ValuesOn), their measurable coordinate restrictions, and the canonical measurable
equivalence and measure transport between assignments over propositionally equal node sets.
Nothing here mentions graphs, SWIGs, or the SCM structure — it is pure product-space
bookkeeping over a finite index Finset, so it lives in the Mathlib staging area rather than
in SCM/. The restriction map coincides with Mathlib's Finset.restrict₂; we keep the named
valuesProjection/ValuesOn vocabulary because it reads better at the many downstream call
sites and because simp lemmas throughout the library are keyed on these names.
A value assignment over a finite node set gives one value in the appropriate space for each node in the set.
A value assignment can be restricted from a larger finite node set to a smaller one.
Definition (Lean source)
For value assignments over a finite node set, if a finite node set J is a subset of a larger finite node set I, then restricting a value assignment over I to its coordinates in J is a measurable map.
Formal statement
Proof (Lean source)
For value assignments over a finite node set, if a finite node set W is a subset of a larger finite node set I, then the σ-algebra pulled back, via the coordinate restriction to W, from the measurable space on value assignments over W is a sub-σ-algebra of the ambient measurable space on value assignments over I.
Formal statement
Proof (Lean source)
Value assignments over propositionally equal finite node sets are canonically measurably equivalent.
Definition (Lean source)
Given two propositionally equal finite node sets I and J and a family μ of measures, one per coordinate of I, the canonical measurable equivalence between value assignments over I and over J carries the product measure Measure.pi μ to the product measure built from μ re-indexed along J through the equality.
Formal statement
Proof (Lean source)
This map combines two coordinate assignments into one assignment on their union.
Definition (Lean source)
4 supporting declarations (lemmas, instances)
-
valuesUnionMk_apply_leftlemma — Projecting a union assignment to a coordinate from the first input returns that value.hypothesesconclusionvaluesUnionMk a b ⟨v, mem_union_left B hA⟩ = a ⟨v, hA⟩Proof (Lean source)
@[simp] lemma valuesUnionMk_apply_left {M : Type*} [DecidableEq M] {Ω : M → Type*} [∀ n, MeasurableSpace (Ω n)] {A B : Finset M} (a : ValuesOn A Ω) (b : ValuesOn B Ω) {v : M} (hA : v ∈ A) : valuesUnionMk a b ⟨v, mem_union_left B hA⟩ = a ⟨v, hA⟩ := by unfold valuesUnionMk exact dif_pos hA -
valuesUnionMk_apply_rightlemma — Projecting a union assignment outside the first input returns the second input's value.hypothesesM :∀ n, MeasurableSpace (Ω n)A B :Finset Ma :ValuesOn A Ωb :ValuesOn B Ωv :Mhv :v ∈ A ∪ BhA :v ∉ AconclusionvaluesUnionMk a b ⟨v, hv⟩ = b ⟨v, (Finset.mem_union.mp hv).resolve_left hA⟩Proof (Lean source)
@[simp] lemma valuesUnionMk_apply_right {M : Type*} [DecidableEq M] {Ω : M → Type*} [∀ n, MeasurableSpace (Ω n)] {A B : Finset M} (a : ValuesOn A Ω) (b : ValuesOn B Ω) {v : M} (hv : v ∈ A ∪ B) (hA : v ∉ A) : valuesUnionMk a b ⟨v, hv⟩ = b ⟨v, (Finset.mem_union.mp hv).resolve_left hA⟩ := by unfold valuesUnionMk exact dif_neg hA -
measurable_valuesUnionMk_rightlemma — Combining assignments is measurable in the second assignment with the first held fixed.hypothesesconclusionProof (Lean source)
lemma measurable_valuesUnionMk_right {M : Type*} [DecidableEq M] {Ω : M → Type*} [∀ n, MeasurableSpace (Ω n)] {A B : Finset M} (a : ValuesOn A Ω) : Measurable (fun b : ValuesOn B Ω => valuesUnionMk a b) := by refine measurable_pi_iff.mpr ?_ rintro ⟨v, hv⟩ by_cases hA : v ∈ A · have h_eq : (fun b : ValuesOn B Ω => valuesUnionMk a b ⟨v, hv⟩) = (fun _ => a ⟨v, hA⟩) := funext fun _ => valuesUnionMk_apply_left a _ hA rw [h_eq] exact measurable_const · have hB : v ∈ B := (Finset.mem_union.mp hv).resolve_left hA have h_eq : (fun b : ValuesOn B Ω => valuesUnionMk a b ⟨v, hv⟩) = (fun b => b ⟨v, hB⟩) := funext fun _ => valuesUnionMk_apply_right a _ hv hA rw [h_eq] exact measurable_pi_apply _ -
measurable_valuesUnionMklemma — Combining assignments is jointly measurable in both input assignments.hypothesesconclusionProof (Lean source)
lemma measurable_valuesUnionMk {M : Type*} [DecidableEq M] {Ω : M → Type*} [∀ n, MeasurableSpace (Ω n)] {A B : Finset M} : Measurable (fun p : ValuesOn A Ω × ValuesOn B Ω => valuesUnionMk p.1 p.2) := by refine measurable_pi_iff.mpr ?_ rintro ⟨v, hv⟩ by_cases hA : v ∈ A · have h_eq : (fun p : ValuesOn A Ω × ValuesOn B Ω => valuesUnionMk p.1 p.2 ⟨v, hv⟩) = (fun p => p.1 ⟨v, hA⟩) := by funext p exact valuesUnionMk_apply_left _ _ hA rw [h_eq] exact (measurable_pi_apply _).comp measurable_fst · have hB : v ∈ B := (Finset.mem_union.mp hv).resolve_left hA have h_eq : (fun p : ValuesOn A Ω × ValuesOn B Ω => valuesUnionMk p.1 p.2 ⟨v, hv⟩) = (fun p => p.2 ⟨v, hB⟩) := by funext p exact valuesUnionMk_apply_right _ _ hv hA rw [h_eq] exact (measurable_pi_apply _).comp measurable_snd
IntegralBind 6 core · 0 supporting This file proves Bochner-integral identities for Giry-monad binds and for binds whose fibres are pushforwards. ★ integral_bind★ integral_bind_map★ integral_bind_bind_map★ integral_bind_of_ae_eq_const★ map_bind_bind_map_proj★ integral_bind_bind_map_proj
Bochner Integrals Against Measure Binds
This file proves Bochner-integral identities for Giry-monad binds and for binds whose fibres are pushforwards. These identities convert an integral against a bound measure into the corresponding iterated integral, supporting nested-kernel calculations in the causal and statistical parts of the library.
The main public results are integral_bind, integral_bind_map,
integral_bind_bind_map, integral_bind_of_ae_eq_const, map_bind_bind_map_proj, and
integral_bind_bind_map_proj. Together they cover one-level binds, bind-then-map
integrals, doubly nested bind-then-map integrals, fibrewise constant collapses, and
projection back to a reattached base coordinate.
If κ is a measurable family of measures, one per point of the base space (a measurable kernel) and f is Bochner-integrable against the measure m.bind κ obtained by mixing κ over the base measure m, then the Bochner integral of f against m.bind κ equals the iterated integral: first integrate f against κ a for each base point a, then integrate the result against m. This is the Bochner analogue of MeasureTheory.Measure.lintegral_bind.
Formal statement
Proof (Lean source)
Suppose each map g a is measurable, the kernel sending a base point a to the pushforward measure (κ a).map (g a) is itself measurable, and f is Bochner-integrable against the mixed measure m.bind (fun a => (κ a).map (g a)). Then the Bochner integral of f against that mixed measure equals the iterated integral of the pulled-back integrand a ↦ ∫ x, f (g a x) ∂κ a against the base measure m. This packages a single application of integral_bind with the fibrewise MeasureTheory.integral_map, supplying the bridge needed to expand a nested bind-then-map Bochner integral.
Formal statement
Proof (Lean source)
Suppose each map g a b is measurable, for every base point a the pushforward kernel b ↦ (κ₂ a b).map (g a b) is measurable, the resulting doubly-nested mixed kernel a ↦ (κ₁ a).bind (fun b => (κ₂ a b).map (g a b)) is itself measurable, and f is Bochner-integrable against the measure obtained by mixing κ₁ over the base measure m and, within each fibre, mixing the pushforward of κ₂ under g. Then the Bochner integral of f against that triply-nested mixed measure equals the threefold iterated integral of the pulled-back integrand (a, b, c) ↦ f (g a b c), integrated successively against κ₂ a b, κ₁ a, and m. This is the single bridge for a bind-then-bind-then-map integrand, which neither integral_bind nor integral_bind_map covers in one step.
Formal statement
Proof (Lean source)
Suppose κ is a measurable family of measures, every fibre κ a is a probability measure, the integrand f agrees κ a-almost everywhere with a constant f' a on that fibre, for every base point a, and f is Bochner-integrable against the mixed measure m.bind κ. Then the Bochner integral of f against m.bind κ equals the integral of the fibrewise constant f' against the base measure m. This is the bridge for the situation where the integrand only depends on a coordinate that is constant within each inner kernel, so the inner integral evaluates to that constant and the bind reduces to ∫ a, f' a ∂m.
Formal statement
Proof (Lean source)
Suppose every fibre κ₁ a is a probability measure, every inner fibre κ₂ a b is a probability measure, each map g a b is measurable, for every base point a the pushforward kernel b ↦ (κ₂ a b).map (g a b) is measurable, the resulting doubly-nested mixed kernel is measurable, the projection π is measurable, and π undoes g by recovering the base point: π (g a b c) = a for all a, b, c. Then pushing the triply-nested mixed measure forward along π returns exactly the base measure m. This is the underlying measure identity behind integral_bind_bind_map_proj, stated without any integrability or integrand hypotheses: the two inner probability fibres each contribute total mass one over a fixed base point, so transporting back along π returns m unchanged (no hypothesis on m is needed). It is the bridge for marginalising a nested Giry-monad construction onto its reattached coordinate when only measurability of the eventual integrand is available.
Formal statement
Proof (Lean source)
Suppose every fibre κ₁ a is a probability measure, every inner fibre κ₂ a b is a probability measure, each map g a b is measurable, for every base point a the pushforward kernel b ↦ (κ₂ a b).map (g a b) is measurable, the resulting doubly-nested mixed kernel is measurable, the projection π is measurable, π undoes g by recovering the base point: π (g a b c) = a for all a, b, c, and f is Bochner-integrable against the base measure m. Then integrating the pulled-back function f ∘ π against the triply-nested mixed measure equals integrating f directly against the base measure m. This is the one-step bridge for marginalising a nested Giry-monad construction back onto the coordinate that the innermost pushforward carries through; the fibrewise probability-mass-one hypotheses are what make the two inner integrals of the constant f a evaluate to f a (no assumption on m is needed).
Formal statement
Proof (Lean source)
MemLp 1 core · 0 supporting This file proves MemLp.of_measurable_of_integral_sq_le, which turns an explicit integrability witness for the squared norm of an almost-everywhere strongly measurable function into membership of that function in L². ★ of_measurable_of_integral_sq_le
MemLp from square-integrability
This file proves MemLp.of_measurable_of_integral_sq_le, which turns an explicit
integrability witness for the squared norm of an almost-everywhere strongly measurable
function into membership of that function in L².
If a normed-vector-space-valued function f is almost-everywhere strongly measurable with respect to Q and the squared norm ‖f x‖^2 is integrable against Q, then f belongs to .
Formal statement
Proof (Lean source)
MomentSliceSupport 4 core · 11 supporting Let K = [a,b] be a compact interval and s : ℝ. ★ card_le_three_of_isExtremePoint
Moment-slice extreme-point support bound (Richter–Rogosinski / Winkler)
Let K = [a,b] be a compact interval and s : ℝ. The moment slice is the set of
probability measures on K with mean 0 and second moment s:
C = { μ | μ Kᶜ = 0 ∧ ∫ x ∂μ = 0 ∧ ∫ x² ∂μ = s }.
This file proves the support-size part of the Richter–Rogosinski / Karr / Winkler
canonical representation theorem for this two-moment slice. It starts with the
finite-atom perturbation argument: three homogeneous linear constraints (total mass,
mean, second moment) on four-or-more atom weights always admit a nonzero perturbation
δ, and μ ± ε·δ are then two distinct measures of C whose midpoint is μ,
contradicting extremality. The later support argument upgrades this from a finite atom
set to an arbitrary extreme probability measure in the slice.
Main results:
* exists_moment_perturbation — pure linear algebra: on 4-or-more reals there is a
nonzero weight perturbation killing the three moments 1, x, x² simultaneously.
* card_le_three_of_isExtremePoint — an extreme point of the moment slice supported on a
finite positive-weight atom set has at most three atoms.
* exists_isMinOn_momentSlice — on a compact Hausdorff space the moment slice is weak-*
compact, so a bounded-continuous objective attains its minimum over the slice.
* support_finite_ncard_le_three_of_isExtremePoint — any extreme probability measure in
the two-moment slice has finite topological support of cardinality at most three.
* isAtomic_le_three_of_isExtremePoint and
exists_cardSupportLe_three_of_isExtremePoint — the same conclusion as a positive
discrete-measure representation and as a finite support carrier.
The discrete probability-measure builder: ∑_{x ∈ T} w x · δ_x, the weighted sum of Dirac masses at the points of T.
Definition (Lean source)
The moment slice: probability measures supported on [a,b] with mean 0 and second moment s.
Definition (Lean source)
μ is an extreme point of a set C of measures: it lies in C and is not an interior point of any nondegenerate segment inside C.
Definition (Lean source)
Richter–Rogosinski support bound (finite-atom case). Consider the discrete probability measure μ = ∑_{x∈T} w x · δ_x carried by a finite set T ⊆ ℝ. If every atom weight w x is strictly positive for x ∈ T, every atom lies in the interval [a, b], and μ is an extreme point of the moment slice — the probability measures on [a, b] with mean 0 and second moment s, then T has at most three elements: μ is supported on at most three atoms.
Formal statement
Proof (Lean source)
11 supporting declarations (lemmas, instances)
-
exists_moment_perturbationtheorem — Three-moment perturbation. On any finite set T ⊆ ℝ of more than three points there is a nonzero real weighting δ whose total mass, first moment and second moment all vanish. This is rank–nullity: three linear functionals (∑ δ, ∑ δ·x, ∑ δ·x²) on a space of dimension > 3 have a nonzero common kernel.hypothesesT :Finset ℝhT :3 < T.cardconclusion∃ δ : ℝ → ℝ,(∑ x ∈ T, δ x = 0) ∧(∑ x ∈ T, δ x * x = 0) ∧(∑ x ∈ T, δ x * x ^ 2 = 0) ∧(∃ x ∈ T, δ x ≠ 0)Proof (Lean source)
theorem exists_moment_perturbation {T : Finset ℝ} (hT : 3 < T.card) : ∃ δ : ℝ → ℝ, (∑ x ∈ T, δ x = 0) ∧ (∑ x ∈ T, δ x * x = 0) ∧ (∑ x ∈ T, δ x * x ^ 2 = 0) ∧ (∃ x ∈ T, δ x ≠ 0) := by classical set φ : ℝ → (Fin 2 → ℝ) := fun x => ![x, x ^ 2] with hφ have hφinj : Injective φ := by intro x y h; have := congrFun h 0; simpa [hφ] using this have hinjOn : InjOn φ T := hφinj.injOn have hcard : finrank ℝ (Fin 2 → ℝ) + 1 < (T.image φ).card := by rw [Finset.card_image_of_injOn hinjOn, Module.finrank_pi]; simpa using hT obtain ⟨g, hsum0, hgsum, v, hv, hvne⟩ := Module.exists_nontrivial_relation_sum_zero_of_finrank_succ_lt_card hcard rw [Finset.sum_image hinjOn] at hgsum hsum0 have h0 := congrFun hsum0 0 have h1 := congrFun hsum0 1 simp only [Finset.sum_apply, Pi.smul_apply, Pi.zero_apply, smul_eq_mul, hφ, Matrix.cons_val_zero, Matrix.cons_val_one] at h0 h1 obtain ⟨x, hxT, hxne⟩ : ∃ x ∈ T, g (φ x) ≠ 0 := by rw [mem_image] at hv; obtain ⟨x, hxT, rfl⟩ := hv; exact ⟨x, hxT, hvne⟩ exact ⟨fun x => g (φ x), hgsum, h0, h1, x, hxT, hxne⟩ -
discreteMeasure_apply_compl_of_subsettheorem — A discrete measure whose atoms all lie in a set gives zero mass to that set's complement.Proof (Lean source)
theorem discreteMeasure_apply_compl_of_subset {α : Type*} [MeasurableSpace α] [MeasurableSingletonClass α] {T : Finset α} {w : α → ℝ} {K : Set α} (hTK : ∀ x ∈ T, x ∈ K) : discreteMeasure T w Kᶜ = 0 := by rw [discreteMeasure, Measure.finset_sum_apply] apply Finset.sum_eq_zero intro x hx rw [Measure.smul_apply, Measure.dirac_apply, smul_eq_mul] have : x ∉ Kᶜ := by simp [hTK x hx] simp [this] -
isProbabilityMeasure_discreteMeasuretheorem — A finite discrete measure is a probability measure when all atom weights are nonnegative and their sum is one.hypothesesconclusionProof (Lean source)
theorem isProbabilityMeasure_discreteMeasure {α : Type*} [MeasurableSpace α] {T : Finset α} {w : α → ℝ} (hw : ∀ x ∈ T, 0 ≤ w x) (hsum : ∑ x ∈ T, w x = 1) : IsProbabilityMeasure (discreteMeasure T w) := by constructor rw [discreteMeasure, Measure.finset_sum_apply] have : ∀ x ∈ T, (ofReal (w x) • Measure.dirac x) univ = ofReal (w x) := by intro x hx; rw [Measure.smul_apply, smul_eq_mul]; simp rw [Finset.sum_congr rfl this, ← ENNReal.ofReal_sum_of_nonneg hw, hsum, ENNReal.ofReal_one] -
integral_discreteMeasuretheorem — Integral against a discrete measure is the weighted sum of the integrand over the atoms. Every function into a real normed vector space is integrable because the measure has finite support.hypothesesconclusion∫ x, f x ∂(discreteMeasure T w) = ∑ x ∈ T, w x • f xProof (Lean source)
theorem integral_discreteMeasure {α E : Type*} [MeasurableSpace α] [MeasurableSingletonClass α] [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {T : Finset α} {w : α → ℝ} (hw : ∀ x ∈ T, 0 ≤ w x) (f : α → E) : ∫ x, f x ∂(discreteMeasure T w) = ∑ x ∈ T, w x • f x := by rw [discreteMeasure, integral_finset_sum_measure] · apply Finset.sum_congr rfl intro x hx rw [integral_smul_measure, integral_dirac, ENNReal.toReal_ofReal (hw x hx)] · intro x hx exact (integrable_dirac enorm_lt_top).smul_measure (by simp) -
discreteMeasure_singletontheorem — The mass assigned by a finite discrete measure to an atom in its support is the corresponding atom weight, coerced to ℝ≥0∞.Proof (Lean source)
theorem discreteMeasure_singleton {α : Type*} [MeasurableSpace α] [MeasurableSingletonClass α] {T : Finset α} {w : α → ℝ} {x₀ : α} (hx₀ : x₀ ∈ T) : discreteMeasure T w {x₀} = ofReal (w x₀) := by classical rw [discreteMeasure, Measure.finset_sum_apply] have : ∀ x ∈ T, (ofReal (w x) • Measure.dirac x) {x₀} = if x = x₀ then ofReal (w x) else 0 := by intro x hx rw [Measure.smul_apply, Measure.dirac_apply, smul_eq_mul] by_cases h : x = x₀ <;> simp [h, Set.mem_singleton_iff] rw [Finset.sum_congr rfl this, Finset.sum_ite_eq' T x₀ (fun x => ofReal (w x))] simp [hx₀] -
discreteMeasure_midpointtheorem — A discrete measure whose atom weights are the pointwise average of two nonnegative weightings is the midpoint of the two corresponding discrete measures.hypothesesα :hp :∀ x ∈ T, 0 ≤ wp xhm :∀ x ∈ T, 0 ≤ wm xhmid :∀ x ∈ T, w x = (1 / 2) * wp x + (1 / 2) * wm xconclusiondiscreteMeasure T w= (1 / 2 : ℝ≥0∞) • discreteMeasure T wp + (1 / 2 : ℝ≥0∞) • discreteMeasure T wmProof (Lean source)
theorem discreteMeasure_midpoint {α : Type*} [MeasurableSpace α] {T : Finset α} {w wp wm : α → ℝ} (hp : ∀ x ∈ T, 0 ≤ wp x) (hm : ∀ x ∈ T, 0 ≤ wm x) (hmid : ∀ x ∈ T, w x = (1 / 2) * wp x + (1 / 2) * wm x) : discreteMeasure T w = (1 / 2 : ℝ≥0∞) • discreteMeasure T wp + (1 / 2 : ℝ≥0∞) • discreteMeasure T wm := by rw [discreteMeasure, discreteMeasure, discreteMeasure, Finset.smul_sum, Finset.smul_sum, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro x hx rw [smul_smul, smul_smul, ← add_smul] congr 1 have e2 : (1 / 2 : ℝ≥0∞) = ofReal (1 / 2) := by rw [ENNReal.ofReal_div_of_pos] <;> simp rw [e2, ← ENNReal.ofReal_mul (by norm_num), ← ENNReal.ofReal_mul (by norm_num), ← ENNReal.ofReal_add (mul_nonneg (by norm_num) (hp x hx)) (mul_nonneg (by norm_num) (hm x hx)), ← hmid x hx] -
exists_isMinOn_momentSlicetheorem — Attainment of the minimum over a moment slice. On a compact Hausdorff space Ω, the set of probability measures pinned by two bounded-continuous moment constraints ∫ g₁ = c₁, ∫ g₂ = c₂ is weak-* compact, so any bounded-continuous objective ∫ f attains its minimum over that (nonempty) slice. The number of constraints is immaterial; the two-moment case is stated to match the mean/second-moment slice.hypothesesΩ :g₁ g₂ f :Ω →ᵇ ℝc₁ c₂ :ℝhne :{μ : ProbabilityMeasure Ω | ∫ x, g₁ x ∂μ = c₁ ∧ ∫ x, g₂ x ∂μ = c₂}.Nonemptyconclusion∃ μ ∈ {μ : ProbabilityMeasure Ω | ∫ x, g₁ x ∂μ = c₁ ∧ ∫ x, g₂ x ∂μ = c₂},∀ ν ∈ {μ : ProbabilityMeasure Ω | ∫ x, g₁ x ∂μ = c₁ ∧ ∫ x, g₂ x ∂μ = c₂},Proof (Lean source)
theorem exists_isMinOn_momentSlice {Ω : Type*} [MeasurableSpace Ω] [TopologicalSpace Ω] [T2Space Ω] [BorelSpace Ω] [CompactSpace Ω] (g₁ g₂ f : Ω →ᵇ ℝ) (c₁ c₂ : ℝ) (hne : {μ : ProbabilityMeasure Ω | ∫ x, g₁ x ∂μ = c₁ ∧ ∫ x, g₂ x ∂μ = c₂}.Nonempty) : ∃ μ ∈ {μ : ProbabilityMeasure Ω | ∫ x, g₁ x ∂μ = c₁ ∧ ∫ x, g₂ x ∂μ = c₂}, ∀ ν ∈ {μ : ProbabilityMeasure Ω | ∫ x, g₁ x ∂μ = c₁ ∧ ∫ x, g₂ x ∂μ = c₂}, ∫ x, f x ∂(μ : Measure Ω) ≤ ∫ x, f x ∂(ν : Measure Ω) := by set C := {μ : ProbabilityMeasure Ω | ∫ x, g₁ x ∂μ = c₁ ∧ ∫ x, g₂ x ∂μ = c₂} with hC have hcont1 : Continuous fun μ : ProbabilityMeasure Ω => ∫ x, g₁ x ∂μ := ProbabilityMeasure.continuous_integral_boundedContinuousFunction g₁ have hcont2 : Continuous fun μ : ProbabilityMeasure Ω => ∫ x, g₂ x ∂μ := ProbabilityMeasure.continuous_integral_boundedContinuousFunction g₂ have hcontf : Continuous fun μ : ProbabilityMeasure Ω => ∫ x, f x ∂μ := ProbabilityMeasure.continuous_integral_boundedContinuousFunction f have hCclosed : IsClosed C := by have : C = (fun μ : ProbabilityMeasure Ω => ∫ x, g₁ x ∂μ) ⁻¹' {c₁} ∩ (fun μ : ProbabilityMeasure Ω => ∫ x, g₂ x ∂μ) ⁻¹' {c₂} := rfl rw [this] exact (isClosed_singleton.preimage hcont1).inter (isClosed_singleton.preimage hcont2) have hCcompact : IsCompact C := hCclosed.isCompact obtain ⟨μ, hμC, hmin⟩ := hCcompact.exists_isMinOn hne hcontf.continuousOn exact ⟨μ, hμC, fun ν hν => hmin hν⟩ -
not_four_distinct_in_supporttheorem — An extreme probability measure in the two-moment slice cannot have four distinct support points. Four separated neighborhoods would give a nonzero signed perturbation preserving mass, mean, and second moment, so the measure would be the midpoint of two different slice members.hypothesesa b s :ℝμ :Measure ℝhext :IsExtremePoint (MomentSlice a b s) μx :Fin 4 → ℝhinj :hsupp :∀ i, x i ∈ μ.supportconclusionProof (Lean source)
theorem not_four_distinct_in_support {a b s : ℝ} {μ : Measure ℝ} (hext : IsExtremePoint (MomentSlice a b s) μ) (x : Fin 4 → ℝ) (hinj : Injective x) (hsupp : ∀ i, x i ∈ μ.support) : False := by classical obtain ⟨hprob, hcompl, hmean, hsec⟩ := hext.1 -- (a) integrability of `id` and `t^2` against the probability measure `μ`. have hbdd : ∀ᵐ t ∂μ, t ∈ Icc a b := by rw [ae_iff]; exact hcompl set C : ℝ := max |a| |b| with hC_def have hCnn : 0 ≤ C := le_trans (abs_nonneg a) (le_max_left _ _) have hbound1 : ∀ᵐ t ∂μ, ‖(fun t => t) t‖ ≤ (fun _ => C) t := by filter_upwards [hbdd] with t ht obtain ⟨hat, htb⟩ := ht simp only [Real.norm_eq_abs] rw [abs_le] refine ⟨?_, ?_⟩ · have h1 : -|a| ≤ a := neg_abs_le a have h2 : |a| ≤ C := le_max_left _ _ linarith · have h1 : b ≤ |b| := le_abs_self b have h2 : |b| ≤ C := le_max_right _ _ linarith have hint1 : Integrable (fun t => t) μ := (integrable_const C).mono' (by fun_prop) hbound1 have hbound2 : ∀ᵐ t ∂μ, ‖(fun t => t ^ 2) t‖ ≤ (fun _ => C ^ 2) t := by filter_upwards [hbound1] with t ht simp only [Real.norm_eq_abs] at ht ⊢ rw [abs_pow] nlinarith [abs_nonneg t, ht, hCnn] have hint2 : Integrable (fun t => t ^ 2) μ := (integrable_const (C ^ 2)).mono' (by fun_prop) hbound2 -- (b) four pairwise-disjoint open balls around the support points. have hdist_pos : ∀ i j, i ≠ j → 0 < dist (x i) (x j) := fun i j hij => dist_pos.mpr (fun h => hij (hinj h)) set r : ℝ := (Finset.univ.inf' Finset.univ_nonempty (fun p : Fin 4 × Fin 4 => if p.1 = p.2 then (1 : ℝ) else dist (x p.1) (x p.2))) / 2 with hr_def have hr_pos : 0 < r := by have hpos : 0 < Finset.univ.inf' Finset.univ_nonempty (fun p : Fin 4 × Fin 4 => if p.1 = p.2 then (1 : ℝ) else dist (x p.1) (x p.2)) := by rw [Finset.lt_inf'_iff] intro p _ by_cases hp : p.1 = p.2 · simp [hp] · simp only [hp, if_false]; exact hdist_pos p.1 p.2 hp rw [hr_def]; linarith have hr_le : ∀ i j, i ≠ j → 2 * r ≤ dist (x i) (x j) := by intro i j hij have hle := Finset.inf'_le (fun p : Fin 4 × Fin 4 => if p.1 = p.2 then (1 : ℝ) else dist (x p.1) (x p.2)) (Finset.mem_univ (i, j)) simp only [hij, if_false] at hle rw [hr_def]; linarith set U : Fin 4 → Set ℝ := fun i => ball (x i) r with hU_def have hUopen : ∀ i, IsOpen (U i) := fun i => Metric.isOpen_ball have hxU : ∀ i, x i ∈ U i := fun i => Metric.mem_ball_self hr_pos have hUdisj : Pairwise (onFun Disjoint U) := by intro i j hij refine Metric.ball_disjoint_ball ?_ have := hr_le i j hij; linarith have hUmeas : ∀ i, MeasurableSet (U i) := fun i => (hUopen i).measurableSet have hUpos : ∀ i, 0 < μ (U i) := fun i => (Measure.mem_support_iff_forall (x i)).1 (hsupp i) (U i) ((hUopen i).mem_nhds (hxU i)) have hUne : ∀ i, μ (U i) ≠ ∞ := fun i => measure_ne_top μ (U i) -- (d)–(e) linear dependence of the four restriction moment vectors in ℝ³. set v : Fin 4 → (Fin 3 → ℝ) := fun i => ![(μ (U i)).toReal, ∫ t in U i, t ∂μ, ∫ t in U i, t ^ 2 ∂μ] with hv_def have hdep : ¬ LinearIndependent ℝ v := by intro hli have hcard := hli.fintype_card_le_finrank simp only [Fintype.card_fin, Module.finrank_pi] at hcard omega rw [Fintype.not_linearIndependent_iff] at hdep obtain ⟨g, hgsum, i₀, hi₀⟩ := hdep have H0 : ∑ i, g i * (μ (U i)).toReal = 0 := by have h := congrFun hgsum 0 simpa [Finset.sum_apply, Pi.smul_apply, hv_def, smul_eq_mul] using h have H1 : ∑ i, g i * (∫ t in U i, t ∂μ) = 0 := by have h := congrFun hgsum 1 simpa [Finset.sum_apply, Pi.smul_apply, hv_def, smul_eq_mul] using h have H2 : ∑ i, g i * (∫ t in U i, t ^ 2 ∂μ) = 0 := by have h := congrFun hgsum 2 simpa [Finset.sum_apply, Pi.smul_apply, hv_def, smul_eq_mul] using h -- (f) small step size keeping all perturbed weights nonnegative. set Mg : ℝ := Finset.univ.sup' Finset.univ_nonempty (fun i => |g i|) with hMg_def have hMgnn : 0 ≤ Mg := le_trans (abs_nonneg (g i₀)) (Finset.le_sup' (fun i => |g i|) (Finset.mem_univ i₀)) set ε : ℝ := 1 / (2 * (1 + Mg)) with hε_def have hden : 0 < 2 * (1 + Mg) := by positivity have hε_pos : 0 < ε := by rw [hε_def]; positivity have hε_bound : ∀ i, ε * |g i| ≤ 1 / 2 := by intro i have hgi : |g i| ≤ Mg := Finset.le_sup' (fun i => |g i|) (Finset.mem_univ i) have heq : ε * |g i| = |g i| / (2 * (1 + Mg)) := by rw [hε_def]; ring rw [heq, div_le_iff₀ hden]; nlinarith have hcoef_pos : ∀ (σ : ℝ), |σ| ≤ 1 → ∀ i, 0 ≤ 1 + σ * ε * g i := by intro σ hσ i have h1 : |σ * ε * g i| ≤ 1 / 2 := by have heq : |σ * ε * g i| = |σ| * (ε * |g i|) := by rw [abs_mul, abs_mul, abs_of_pos hε_pos]; ring rw [heq] calc |σ| * (ε * |g i|) ≤ 1 * (1 / 2) := mul_le_mul hσ (hε_bound i) (by positivity) (by norm_num) _ = 1 / 2 := by norm_num have := (abs_le.mp h1).1; linarith -- (g) measure decomposition over the disjoint cover. set W : Set ℝ := ⋃ i, U i with hW_def have hWmeas : MeasurableSet W := MeasurableSet.iUnion hUmeas have hrestrictW : μ.restrict W = ∑ i, μ.restrict (U i) := by rw [hW_def, Measure.restrict_iUnion hUdisj hUmeas, Measure.sum_fintype] have hdecomp : μ = μ.restrict Wᶜ + ∑ i, μ.restrict (U i) := by rw [← hrestrictW, add_comm] exact (Measure.restrict_add_restrict_compl hWmeas).symm -- (h) the two perturbed measures. set pert : ℝ → Measure ℝ := fun σ => μ.restrict Wᶜ + ∑ i, ofReal (1 + σ * ε * g i) • μ.restrict (U i) with hpert_def have hpert_integral : ∀ (σ : ℝ), |σ| ≤ 1 → ∀ (f : ℝ → ℝ), Integrable f μ → ∫ t, f t ∂(pert σ) = (∫ t in Wᶜ, f t ∂μ) + ∑ i, (1 + σ * ε * g i) * (∫ t in U i, f t ∂μ) := by intro σ hσ f hf have hsum_int : Integrable f (∑ i, ofReal (1 + σ * ε * g i) • μ.restrict (U i)) := (integrable_finset_sum_measure).2 (fun i _ => (hf.restrict).smul_measure ENNReal.ofReal_ne_top) rw [hpert_def, integral_add_measure hf.restrict hsum_int, integral_finset_sum_measure (fun i _ => (hf.restrict).smul_measure ENNReal.ofReal_ne_top)] congr 1 apply Finset.sum_congr rfl intro i _ rw [integral_smul_measure, ENNReal.toReal_ofReal (hcoef_pos σ hσ i), smul_eq_mul] have hsplit : ∀ (f : ℝ → ℝ), Integrable f μ → (∫ t in Wᶜ, f t ∂μ) + ∑ i, (∫ t in U i, f t ∂μ) = ∫ t, f t ∂μ := by intro f hf conv_rhs => rw [hdecomp] rw [integral_add_measure hf.restrict ((integrable_finset_sum_measure).2 (fun i _ => hf.restrict)), integral_finset_sum_measure (fun i _ => hf.restrict)] have hmass1 : (μ Wᶜ).toReal + ∑ i, (μ (U i)).toReal = 1 := by have hsplit1 := hsplit (fun _ => (1 : ℝ)) (integrable_const 1) simpa [setIntegral_const, integral_const, hprob.measure_univ, measureReal_def] using hsplit1 have hpert_mem : ∀ (σ : ℝ), |σ| ≤ 1 → pert σ ∈ MomentSlice a b s := by intro σ hσ have hmean' : ∫ t, t ∂(pert σ) = 0 := by rw [hpert_integral σ hσ (fun t => t) hint1] have hcollect : (∫ t in Wᶜ, t ∂μ) + ∑ i, (1 + σ * ε * g i) * (∫ t in U i, t ∂μ) = ((∫ t in Wᶜ, t ∂μ) + ∑ i, (∫ t in U i, t ∂μ)) + σ * ε * ∑ i, g i * (∫ t in U i, t ∂μ) := by rw [add_assoc] congr 1 rw [Finset.mul_sum, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl; intro i _; ring rw [hcollect, hsplit (fun t => t) hint1, hmean, H1]; ring have hsec' : ∫ t, t ^ 2 ∂(pert σ) = s := by rw [hpert_integral σ hσ (fun t => t ^ 2) hint2] have hcollect : (∫ t in Wᶜ, t ^ 2 ∂μ) + ∑ i, (1 + σ * ε * g i) * (∫ t in U i, t ^ 2 ∂μ) = ((∫ t in Wᶜ, t ^ 2 ∂μ) + ∑ i, (∫ t in U i, t ^ 2 ∂μ)) + σ * ε * ∑ i, g i * (∫ t in U i, t ^ 2 ∂μ) := by rw [add_assoc] congr 1 rw [Finset.mul_sum, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl; intro i _; ring rw [hcollect, hsplit (fun t => t ^ 2) hint2, hsec, H2]; ring have hsupp' : (pert σ) (Icc a b)ᶜ = 0 := by rw [hpert_def] simp only [Measure.add_apply, Measure.finset_sum_apply, Measure.smul_apply, smul_eq_mul] have hWc : μ.restrict Wᶜ (Icc a b)ᶜ = 0 := by rw [Measure.restrict_apply measurableSet_Icc.compl] exact le_antisymm (le_trans (measure_mono Set.inter_subset_left) (le_of_eq hcompl)) zero_le have hUc : ∀ i, μ.restrict (U i) (Icc a b)ᶜ = 0 := by intro i rw [Measure.restrict_apply measurableSet_Icc.compl] exact le_antisymm (le_trans (measure_mono Set.inter_subset_left) (le_of_eq hcompl)) zero_le rw [hWc, zero_add] apply Finset.sum_eq_zero intro i _ rw [hUc i, mul_zero] have hprob' : IsProbabilityMeasure (pert σ) := by refine ⟨?_⟩ rw [hpert_def] simp only [Measure.add_apply, Measure.finset_sum_apply, Measure.smul_apply, smul_eq_mul, Measure.restrict_apply_univ] have hreg : ∀ i, (1 + σ * ε * g i) * (μ (U i)).toReal = (μ (U i)).toReal + (σ * ε) * (g i * (μ (U i)).toReal) := by intro i; ring have hreal : (μ Wᶜ).toReal + ∑ i, (1 + σ * ε * g i) * (μ (U i)).toReal = 1 := by rw [Finset.sum_congr rfl (fun i _ => hreg i), Finset.sum_add_distrib, ← Finset.mul_sum, H0, mul_zero, add_zero] exact hmass1 have hWfin : μ Wᶜ ≠ ∞ := measure_ne_top μ _ have hnn : (0 : ℝ) ≤ ∑ i, (1 + σ * ε * g i) * (μ (U i)).toReal := sum_nonneg (fun i _ => mul_nonneg (hcoef_pos σ hσ i) ENNReal.toReal_nonneg) calc μ Wᶜ + ∑ i, ofReal (1 + σ * ε * g i) * μ (U i) = ofReal ((μ Wᶜ).toReal + ∑ i, (1 + σ * ε * g i) * (μ (U i)).toReal) := by rw [ENNReal.ofReal_add ENNReal.toReal_nonneg hnn, ENNReal.ofReal_toReal hWfin] congr 1 rw [ENNReal.ofReal_sum_of_nonneg (fun i _ => mul_nonneg (hcoef_pos σ hσ i) ENNReal.toReal_nonneg)] apply Finset.sum_congr rfl intro i _ rw [ENNReal.ofReal_mul (hcoef_pos σ hσ i), ENNReal.ofReal_toReal (hUne i)] _ = ofReal 1 := by rw [hreal] _ = 1 := by simp exact ⟨hprob', hsupp', hmean', hsec'⟩ -- (j) the two perturbations are distinct, witnessed on `U i₀`. have hval : ∀ (σ : ℝ), (pert σ) (U i₀) = ofReal (1 + σ * ε * g i₀) * μ (U i₀) := by intro σ rw [hpert_def] simp only [Measure.add_apply, Measure.finset_sum_apply, Measure.smul_apply, smul_eq_mul] have hsubW : U i₀ ⊆ W := fun y hy => Set.mem_iUnion.2 ⟨i₀, hy⟩ have hWc0 : μ.restrict Wᶜ (U i₀) = 0 := by rw [Measure.restrict_apply (hUmeas i₀)] rw [(disjoint_compl_right.mono_left hsubW).inter_eq, measure_empty] have hUi : ∀ j, μ.restrict (U j) (U i₀) = if j = i₀ then μ (U i₀) else 0 := by intro j rw [Measure.restrict_apply (hUmeas i₀)] by_cases hji : j = i₀ · subst hji; rw [Set.inter_self]; simp · have hdis : Disjoint (U i₀) (U j) := hUdisj (fun h => hji h.symm) rw [hdis.inter_eq, measure_empty]; simp [hji] rw [hWc0, zero_add, Finset.sum_eq_single i₀ (fun j _ hj => by rw [hUi j]; simp [hj]) (fun h => absurd (Finset.mem_univ i₀) h)] rw [hUi i₀]; simp have hdistinct : pert 1 ≠ pert (-1) := by intro heq have e1 := hval 1 have e2 := hval (-1) rw [heq] at e1 rw [e1] at e2 -- e2 : ofReal (1+1εg i₀) * μ (U i₀) = ofReal (1+(-1)εg i₀) * μ (U i₀) have hreal := congrArg toReal e2 rw [ENNReal.toReal_mul, ENNReal.toReal_mul, ENNReal.toReal_ofReal (hcoef_pos 1 (by norm_num) i₀), ENNReal.toReal_ofReal (hcoef_pos (-1) (by norm_num) i₀)] at hreal have hpos : 0 < (μ (U i₀)).toReal := ENNReal.toReal_pos (hUpos i₀).ne' (hUne i₀) have hz : ε * g i₀ = 0 := by have h2 : (ε * g i₀) * (μ (U i₀)).toReal = 0 := by linear_combination hreal / 2 -- … truncated; follow the source link for the rest … -
support_finite_ncard_le_three_of_isExtremePointtheorem — An extreme probability measure in the two-moment slice has a finite topological support with at most three points.hypothesesconclusionμ.support.Finite ∧ μ.support.ncard ≤ 3Proof (Lean source)
theorem support_finite_ncard_le_three_of_isExtremePoint {a b s : ℝ} {μ : Measure ℝ} (hext : IsExtremePoint (MomentSlice a b s) μ) : μ.support.Finite ∧ μ.support.ncard ≤ 3 := by classical let S : Set ℝ := μ.support have hno : ∀ (y : Fin 4 → ℝ), Injective y → (∀ i, y i ∈ S) → False := by intro y hyinj hysupp exact not_four_distinct_in_support hext y hyinj hysupp constructor · by_contra hinf have hInf : S.Infinite := by simpa [S, Set.not_finite] using hinf obtain ⟨t, hts, htfin, htc⟩ := hInf.exists_subset_ncard_eq 4 have hcard : htfin.toFinset.card = 4 := by simpa [Set.ncard_eq_toFinset_card t htfin] using htc let e : Fin 4 ↪o ℝ := htfin.toFinset.orderEmbOfFin hcard exact hno (fun i => e i) e.injective (fun i => by have hmemFin : e i ∈ htfin.toFinset := by change htfin.toFinset.orderEmbOfFin hcard i ∈ htfin.toFinset exact Finset.orderEmbOfFin_mem htfin.toFinset hcard i exact hts (by simpa [Set.Finite.mem_toFinset] using hmemFin)) · by_contra hle push_neg at hle have h4 : 4 ≤ S.ncard := Nat.succ_le_of_lt hle obtain ⟨t, hts, htc⟩ := Set.exists_subset_card_eq (s := S) h4 have htfin : t.Finite := Set.finite_of_ncard_ne_zero (by rw [htc]; simp) have hcard : htfin.toFinset.card = 4 := by simpa [Set.ncard_eq_toFinset_card t htfin] using htc let e : Fin 4 ↪o ℝ := htfin.toFinset.orderEmbOfFin hcard exact hno (fun i => e i) e.injective (fun i => by have hmemFin : e i ∈ htfin.toFinset := by change htfin.toFinset.orderEmbOfFin hcard i ∈ htfin.toFinset exact Finset.orderEmbOfFin_mem htfin.toFinset hcard i exact hts (by simpa [Set.Finite.mem_toFinset] using hmemFin)) -
isAtomic_le_three_of_isExtremePointtheorem — An extreme probability measure in the two-moment slice is a positive discrete measure supported on at most three points of the interval.hypothesesconclusion∃ (T : Finset ℝ) (w : ℝ → ℝ),(∀ x ∈ T, 0 < w x) ∧ (∀ x ∈ T, x ∈ Icc a b) ∧ T.card ≤ 3 ∧ μ = discreteMeasure T wProof (Lean source)
theorem isAtomic_le_three_of_isExtremePoint {a b s : ℝ} {μ : Measure ℝ} (hext : IsExtremePoint (MomentSlice a b s) μ) : ∃ (T : Finset ℝ) (w : ℝ → ℝ), (∀ x ∈ T, 0 < w x) ∧ (∀ x ∈ T, x ∈ Icc a b) ∧ T.card ≤ 3 ∧ μ = discreteMeasure T w := by classical obtain ⟨hprob, hcompl, _, _⟩ := hext.1 obtain ⟨hsuppfin, hsuppcard⟩ := support_finite_ncard_le_three_of_isExtremePoint hext let T : Finset ℝ := hsuppfin.toFinset let w : ℝ → ℝ := fun x => (μ {x}).toReal have hTsupport : (T : Set ℝ) = μ.support := by simp [T] have hTcard : T.card ≤ 3 := by have hcard : T.card = μ.support.ncard := by simp [T, Set.ncard_eq_toFinset_card μ.support hsuppfin] omega have hsingle_pos : ∀ x ∈ μ.support, 0 < μ {x} := by intro x hx let V : Set ℝ := (μ.support \ {x})ᶜ have hVopen : IsOpen V := (hsuppfin.diff (t := ({x} : Set ℝ))).isClosed.isOpen_compl have hxV : x ∈ V := by simp [V] have hVpos : 0 < μ V := (Measure.mem_support_iff_forall x).1 hx V (hVopen.mem_nhds hxV) have hVS : V ∩ μ.support = {x} := by ext y by_cases hyx : y = x · subst hyx simp [V, hx] · simp [V, hyx] have hconull : μ μ.supportᶜ = 0 := Measure.measure_compl_support have hVeq : μ (V ∩ μ.support) = μ V := measure_inter_conull (μ := μ) (s := V) hconull rw [hVS] at hVeq rwa [hVeq] have hpos : ∀ x ∈ T, 0 < w x := by intro x hxT have hxS : x ∈ μ.support := hTsupport ▸ Finset.mem_coe.mpr hxT have hlt : μ {x} ≠ ∞ := by have hle : μ {x} ≤ μ univ := measure_mono (Set.subset_univ _) rw [hprob.measure_univ] at hle exact ne_top_of_le_ne_top ENNReal.one_ne_top hle have hxpos := hsingle_pos x hxS simpa only [w] using ENNReal.toReal_pos hxpos.ne' hlt have hTab : ∀ x ∈ T, x ∈ Icc a b := by intro x hxT by_contra hxnot have hxS : x ∈ μ.support := hTsupport ▸ Finset.mem_coe.mpr hxT have hxpos : 0 < μ {x} := hsingle_pos x hxS have hsub : ({x} : Set ℝ) ⊆ (Icc a b)ᶜ := by simpa [Set.subset_def] using hxnot have hle : μ {x} ≤ μ (Icc a b)ᶜ := measure_mono hsub rw [hcompl] at hle exact (ne_of_gt hxpos) (le_antisymm hle zero_le) refine ⟨T, w, hpos, hTab, hTcard, ?_⟩ refine Measure.ext fun A hA => ?_ have hconull : μ μ.supportᶜ = 0 := Measure.measure_compl_support have hAinter : μ (A ∩ μ.support) = μ A := measure_inter_conull (μ := μ) (s := A) hconull rw [← hAinter] have hUnion : A ∩ μ.support = ⋃ x ∈ T.filter (fun x => x ∈ A), ({x} : Set ℝ) := by ext y simp [T, Set.Finite.mem_toFinset, and_left_comm, and_assoc] rw [hUnion] rw [measure_biUnion_finset] · rw [discreteMeasure, Measure.finset_sum_apply, Finset.sum_filter] apply Finset.sum_congr rfl intro x hx rw [Measure.smul_apply, Measure.dirac_apply, smul_eq_mul] have hlt : μ {x} ≠ ∞ := by have hle : μ {x} ≤ μ univ := measure_mono (Set.subset_univ _) rw [hprob.measure_univ] at hle exact ne_top_of_le_ne_top ENNReal.one_ne_top hle by_cases hxA : x ∈ A · simp [hxA, w, ENNReal.ofReal_toReal hlt] · simp [hxA] · intro x _ y _ hxy exact Set.disjoint_singleton.2 hxy · intro x _ exact MeasurableSet.singleton x -
exists_cardSupportLe_three_of_isExtremePointtheorem — An extreme probability measure in the two-moment slice is carried by a finite set of at most three points.hypothesesProof (Lean source)
theorem exists_cardSupportLe_three_of_isExtremePoint {a b s : ℝ} {μ : Measure ℝ} (hext : IsExtremePoint (MomentSlice a b s) μ) : ∃ T : Finset ℝ, T.card ≤ 3 ∧ μ (↑T : Set ℝ)ᶜ = 0 := by classical obtain ⟨hsuppfin, hsuppcard⟩ := support_finite_ncard_le_three_of_isExtremePoint hext refine ⟨hsuppfin.toFinset, ?_, ?_⟩ · simpa [Set.ncard_eq_toFinset_card μ.support hsuppfin] using hsuppcard · rw [Set.Finite.coe_toFinset]; exact Measure.measure_compl_support
PartitionIntegral 2 core · 1 supporting This file decomposes integrals over the fibres of a finite-valued map with measurable fibres and proves that cell-constant weights can be pulled out fibre by fibre. ★ integral_eq_sum_setIntegral_fiber★ integral_cellConst_mul
Finite-partition integral algebra
This file decomposes integrals over the fibres of a finite-valued map with measurable fibres and
proves that cell-constant weights can be pulled out fibre by fibre. The public lemmas
are integral_eq_sum_setIntegral_fiber, integral_cellConst_mul, and
integral_cellConst, which turn a finite partition of a sample space into finite sums
of set integrals or cell weights.
If H is a finite-valued map on the sample space whose fibers H⁻¹{h} are all measurable and f is integrable with respect to the ambient measure, then the integral of f splits as the sum, over the finitely many values h of H, of the set integrals of f restricted to the fiber H⁻¹{h}.
Formal statement
Proof (Lean source)
Cell-constant pull-out. If H is a finite-valued map on the sample space whose fibers H⁻¹{h} are all measurable and f is integrable with respect to the ambient measure, then, for any weighting c of the fiber values, the integral of the ω-dependent product c (H ω) • f ω decomposes as the sum, over the values h of H, of c h scaling the set integral of f over the fiber H⁻¹{h}. No measurability of c is needed: on each fiber c (H ω) is the constant c h.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
integral_cellConsttheorem — Cell-weight aggregation. For a finite measure, the integral of a cell-constant function c (H ω) is the cell-weighted sum ∑ h, c h · μ(H⁻¹{h}). Special case of integral_cellConst_mul with f ≡ 1.hypothesesconclusion∫ ω, c (H ω) ∂μ = ∑ h : ι, c h * (μ (H ⁻¹' {h})).toRealProof (Lean source)
theorem integral_cellConst {ι : Type*} [Fintype ι] [IsFiniteMeasure μ] {H : Ω → ι} (hfiber : ∀ h, MeasurableSet (H ⁻¹' {h})) (c : ι → ℝ) : ∫ ω, c (H ω) ∂μ = ∑ h : ι, c h * (μ (H ⁻¹' {h})).toReal := by have h := integral_cellConst_mul hfiber c (f := fun _ => (1 : ℝ)) (hf := (integrable_const (1 : ℝ) : Integrable (fun _ : Ω => (1 : ℝ)) μ)) simpa [mul_one, setIntegral_const, smul_eq_mul, measureReal_def] using h
PartitionRnDeriv 2 core · 0 supporting This file proves two general measure-theoretic facts about a numerator measure μ that is a constant multiple of a denominator measure ν on each cell of a finite measurable partition (s i) of the ambient space (μ.restrict ★ partition_restrict_absolutelyContinuous★ partition_restrict_integrable_pow_rnDeriv
Radon–Nikodym derivative on a finite measurable partition
This file proves two general measure-theoretic facts about a numerator measure μ that is
a constant multiple of a denominator measure ν on each cell of a finite measurable
partition (s i) of the ambient space (μ.restrict (s i) = r i • ν.restrict (s i)):
* partition_restrict_absolutelyContinuous — μ ≪ ν (absolute continuity);
* partition_restrict_integrable_pow_rnDeriv — every natural-power deviation
((dμ/dν) − 1)^n of the Radon–Nikodym derivative from 1 is ν-integrable.
Both are the standard building blocks of a piecewise-constant least-favorable construction in a
two-point minimax lower bound: the per-cell density is the cell ratio, so the global density is
the simple function ∑ i, r i · 1_{s i}.
Absolute continuity from a finite proportional partition. Suppose each cell s i of a finite family is measurable, the cells are pairwise disjoint, and the cells cover the whole ambient space — together, (s i) is a finite measurable partition — and suppose on every cell the numerator measure μ restricted to that cell equals the denominator measure ν restricted to the same cell, scaled by the constant r i. Then μ is absolutely continuous with respect to ν. The global density is the simple function whose value on cell i is r i, so μ = ν.withDensity d.
Formal statement
Proof (Lean source)
Power-deviation integrability from a finite proportional partition. Under the same partition hypotheses as partition_restrict_absolutelyContinuous — the cells s i are measurable, pairwise disjoint, and cover the ambient space — and again assuming on every cell the numerator measure μ restricted to that cell equals the denominator measure ν restricted to the same cell, scaled by the constant r i, with ν finite, then for any natural number n, the n-th power of the deviation of the Radon–Nikodym derivative dμ/dν from 1 is integrable against ν. On each cell the derivative equals r i, so the function is a finite simple function and the integral is a finite sum of per-cell constants.
Formal statement
Proof (Lean source)
RnDerivCompProdSigmaFinite 1 core · 1 supporting Mathlib's ProbabilityTheory.rnDeriv_compProd (Mathlib/Probability/Kernel/Composition/RadonNikodym.lean) computes (μ ⊗ₘ κ).rnDeriv (ν ⊗ₘ η) but leaves the conditional factor as (μ ⊗ₘ κ).rnDeriv (μ ⊗ₘ η) rather than the fi ★ rnDeriv_compProd_prod_sigmaFinite
Radon–Nikodym derivative of a composition-product against a σ-finite fibre reference
Mathlib's ProbabilityTheory.rnDeriv_compProd
(Mathlib/Probability/Kernel/Composition/RadonNikodym.lean) computes
(μ ⊗ₘ κ).rnDeriv (ν ⊗ₘ η) but leaves the conditional factor as
(μ ⊗ₘ κ).rnDeriv (μ ⊗ₘ η) rather than the fibre derivative ∂κ/∂η, and its
kernel Radon–Nikodym API requires the reference kernel to be finite.
This file proves the product-reference formula used when a composition product is
compared against a product reference ν ×ₘ ρ. It takes product
a.e.-measurability of the raw per-slice fibre derivative
(a, b) ↦ (dκ_a/dρ)(b) as an explicit hypothesis; with that representative in
hand the fibre reference ρ need only be σ-finite, so the public theorem
rnDeriv_compProd_prod_sigmaFinite covers continuous references (Lebesgue), not
just finite/discrete ones. It takes the μ-a.e. fibre domination κ_a ≪ ρ
directly as a hypothesis (rather than re-deriving it from joint domination, which
would route through the finite kernel Kernel.const α ρ), and assembles the
formula by withDensity bookkeeping that never needs ρ to be finite.
The remaining Mathlib gap is only in constructing that measurable fibre density
automatically: when ρ is infinite, Kernel.const α ρ is not a finite kernel, so
the current kernel RN API cannot build a jointly measurable σ-finite
representative. Callers that already possess such a representative (for instance
from a stepwise fibre Radon–Nikodym assumption) obtain the full σ-finite formula
here.
σ-finite-reference Radon–Nikodym derivative of a composition-product. Fix an s-finite measure μ, a σ-finite base reference ν, a σ-finite fibre reference ρ, and an s-finite kernel κ from the base space to the fibre space, together with a candidate base density f. If μ is absolutely continuous with respect to ν, μ-almost every fibre κ a is absolutely continuous with respect to ρ, the raw per-slice fibre derivative (a, b) ↦ (dκ_a/dρ)(b) is almost-everywhere measurable with respect to the product reference ν × ρ, and f agrees ν-almost everywhere with the Radon–Nikodym derivative dμ/dν, then the Radon–Nikodym derivative of the composition-product μ ⊗ₘ κ with respect to the product reference ν × ρ agrees, ν × ρ-almost everywhere, with the pointwise product (a, b) ↦ f a · (dκ_a/dρ)(b) of the base density and the fibre derivative.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
compProd_eq_prod_withDensity_fiberlemma — A composition product is the product reference measure weighted by the fibrewise Radon–Nikodym derivative whenever the fibres are almost everywhere dominated by the reference measure and that derivative is almost everywhere measurable.hypothesesμ :Measure αρ :Measure βκ :Kernel α βSFinite μhfiber :∀ᵐ a ∂μ, κ a ≪ ρhmeas :AEMeasurable (fun p : α × β => (κ p.1).rnDeriv ρ p.2) (μ.prod ρ)conclusionμ ⊗ₘ κ = (μ.prod ρ).withDensity (fun p : α × β => (κ p.1).rnDeriv ρ p.2)Proof (Lean source)
lemma compProd_eq_prod_withDensity_fiber (μ : Measure α) (ρ : Measure β) (κ : Kernel α β) [SFinite μ] [SigmaFinite ρ] [IsSFiniteKernel κ] (hfiber : ∀ᵐ a ∂μ, κ a ≪ ρ) (hmeas : AEMeasurable (fun p : α × β => (κ p.1).rnDeriv ρ p.2) (μ.prod ρ)) : μ ⊗ₘ κ = (μ.prod ρ).withDensity (fun p : α × β => (κ p.1).rnDeriv ρ p.2) := by ext s hs rw [Measure.compProd_apply hs, withDensity_apply _ hs] rw [← lintegral_indicator hs] rw [lintegral_prod] · refine lintegral_congr_ae ?_ filter_upwards [hfiber] with a ha have hsec : MeasurableSet (Prod.mk a ⁻¹' s) := measurable_prodMk_left hs change (κ a) (Prod.mk a ⁻¹' s) = ∫⁻ y, (Prod.mk a ⁻¹' s).indicator (fun y => (κ a).rnDeriv ρ y) y ∂ρ rw [lintegral_indicator hsec] rw [← Measure.setLIntegral_rnDeriv ha (Prod.mk a ⁻¹' s)] · exact hmeas.indicator hs
SetIntegralRecovery 1 core · 1 supporting This file recovers either a weighted measure or an almost-everywhere pointwise bound from identities and inequalities known for every measurable set integral. ★ measure_eq_withDensity_of_toReal_setIntegral
Recovery from set integrals
This file recovers either a weighted measure or an almost-everywhere pointwise bound from identities and inequalities known for every measurable set integral.
If a weight function w is integrable with respect to a reference measure μ and a finite measure ν's mass on every measurable event A equals, as a real number, the integral of w over A against μ, then ν is obtained from μ by weighting with the nonnegative part of w: ν = μ.withDensity (fun x => ENNReal.ofReal (w x)).
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
abs_le_one_ae_of_setIntegral_le_measurelemma — A measurable function is bounded in absolute value by one almost everywhere if the absolute value of its integral over every measurable event is at most that event's measure.hypothesesΩ :Type*mu :f :Ω → ℝhf :hdom :∀ Aifthen|∫ x in A, f x ∂mu| ≤ (mu A).toRealconclusion∀ᵐ x ∂mu, |f x| ≤ 1Proof (Lean source)
lemma abs_le_one_ae_of_setIntegral_le_measure {Ω : Type*} [MeasurableSpace Ω] (mu : Measure Ω) [IsFiniteMeasure mu] (f : Ω → ℝ) (hf : Measurable f) (hdom : ∀ A, MeasurableSet A → |∫ x in A, f x ∂mu| ≤ (mu A).toReal) : ∀ᵐ x ∂mu, |f x| ≤ 1 := by have hupper : ∀ q : ℝ, 1 < q → ∀ᵐ x ∂mu, f x ≤ q := by intro q hq have hslice : ∀ m : ℕ, ∀ᵐ x ∂mu, ¬(q < f x ∧ f x ≤ (m : ℝ)) := by intro m let A : Set Ω := {x | q < f x ∧ f x ≤ (m : ℝ)} have hA : MeasurableSet A := (measurableSet_Ioi.preimage hf).inter (measurableSet_Iic.preimage hf) have hfin : mu A < ∞ := measure_lt_top mu A have hfA : IntegrableOn f A mu := by apply IntegrableOn.of_bound hfin hf.aestronglyMeasurable.restrict (m : ℝ) filter_upwards [self_mem_ae_restrict hA] with x hxA rw [Real.norm_eq_abs, abs_of_pos (lt_trans (by linarith) hxA.1)] exact hxA.2 have hconst : IntegrableOn (fun _ : Ω => q) A mu := integrableOn_const hfin.ne have hlower : q * (mu A).toReal ≤ ∫ x in A, f x ∂mu := by calc q * (mu A).toReal = ∫ _ in A, q ∂mu := by rw [setIntegral_const] simp [Measure.real] ring _ ≤ ∫ x in A, f x ∂mu := integral_mono_ae hconst hfA (ae_restrict_iff' hA |>.2 <| by filter_upwards with x hx exact hx.1.le) have hupperInt : (∫ x in A, f x ∂mu) ≤ (mu A).toReal := (le_abs_self _).trans (hdom A hA) have hzeroReal : (mu A).toReal = 0 := by have hnonneg : 0 ≤ (mu A).toReal := ENNReal.toReal_nonneg nlinarith have hzero : mu A = 0 := by rw [ENNReal.toReal_eq_zero_iff] at hzeroReal exact hzeroReal.resolve_right hfin.ne rw [ae_iff] simpa [A] using hzero rw [← ae_all_iff] at hslice filter_upwards [hslice] with x hx by_contra hqx have hqfx : q < f x := lt_of_not_ge hqx obtain ⟨m, hm⟩ := exists_nat_ge (f x) exact hx m ⟨hqfx, hm⟩ have hlower : ∀ q : ℝ, 1 < q → ∀ᵐ x ∂mu, -q ≤ f x := by intro q hq have hslice : ∀ m : ℕ, ∀ᵐ x ∂mu, ¬(-(m : ℝ) ≤ f x ∧ f x < -q) := by intro m let A : Set Ω := {x | -(m : ℝ) ≤ f x ∧ f x < -q} have hA : MeasurableSet A := (measurableSet_Ici.preimage hf).inter (measurableSet_Iio.preimage hf) have hfin : mu A < ∞ := measure_lt_top mu A have hfA : IntegrableOn f A mu := by apply IntegrableOn.of_bound hfin hf.aestronglyMeasurable.restrict (m : ℝ) filter_upwards [self_mem_ae_restrict hA] with x hxA rw [Real.norm_eq_abs, abs_of_neg (lt_trans hxA.2 (neg_lt_zero.mpr (by linarith)))] linarith [hxA.1] have hconst : IntegrableOn (fun _ : Ω => -q) A mu := integrableOn_const hfin.ne have hupperSlice : (∫ x in A, f x ∂mu) ≤ -q * (mu A).toReal := by calc (∫ x in A, f x ∂mu) ≤ ∫ _ in A, -q ∂mu := integral_mono_ae hfA hconst (ae_restrict_iff' hA |>.2 <| by filter_upwards with x hx exact hx.2.le) _ = -q * (mu A).toReal := by rw [setIntegral_const] simp [Measure.real] ring have hlowerInt : -(mu A).toReal ≤ ∫ x in A, f x ∂mu := by have := hdom A hA linarith [neg_abs_le (∫ x in A, f x ∂mu)] have hzeroReal : (mu A).toReal = 0 := by have hnonneg : 0 ≤ (mu A).toReal := ENNReal.toReal_nonneg nlinarith have hzero : mu A = 0 := by rw [ENNReal.toReal_eq_zero_iff] at hzeroReal exact hzeroReal.resolve_right hfin.ne rw [ae_iff] simpa [A] using hzero rw [← ae_all_iff] at hslice filter_upwards [hslice] with x hx by_contra hqx have hfxq : f x < -q := lt_of_not_ge hqx obtain ⟨m, hm⟩ := exists_nat_ge (-f x) exact hx m ⟨by linarith, hfxq⟩ have hupperOne : ∀ᵐ x ∂mu, f x ≤ 1 := by have hq := fun j : ℕ => hupper (1 + 1 / ((j + 1 : ℕ) : ℝ)) (by have : 0 < 1 / ((j + 1 : ℕ) : ℝ) := by positivity linarith) rw [← ae_all_iff] at hq filter_upwards [hq] with x hx by_contra hx1 have hpos : 0 < f x - 1 := sub_pos.mpr (lt_of_not_ge hx1) obtain ⟨j, hj⟩ := exists_nat_one_div_lt hpos have hxj := hx j norm_num [Nat.cast_add, cast_one] at hxj have hj' : ((j : ℝ) + 1)⁻¹ < f x - 1 := by simpa [one_div] using hj linarith have hlowerOne : ∀ᵐ x ∂mu, -1 ≤ f x := by have hq := fun j : ℕ => hlower (1 + 1 / ((j + 1 : ℕ) : ℝ)) (by have : 0 < 1 / ((j + 1 : ℕ) : ℝ) := by positivity linarith) rw [← ae_all_iff] at hq filter_upwards [hq] with x hx by_contra hx1 have hlt : f x < -1 := lt_of_not_ge hx1 have hpos : 0 < -f x - 1 := by linarith obtain ⟨j, hj⟩ := exists_nat_one_div_lt hpos have hxj := hx j norm_num [Nat.cast_add, cast_one] at hxj have hj' : ((j : ℝ) + 1)⁻¹ < -f x - 1 := by simpa [one_div] using hj linarith filter_upwards [hupperOne, hlowerOne] with x hxU hxL exact abs_le.mpr ⟨by linarith, hxU⟩
SupCountableDense 1 core · 3 supporting A recurring pattern in localized empirical-process arguments is the need to show that a supremum ω ↦ sSup { F ω π : π ∈ S } of a real process over an index class S is measurable and integrable, when S carries a *countabl ★ integrable_sSup_image_of_countable_dense
Integrability of suprema over a countable-dense-skeletoned index class
A recurring pattern in localized empirical-process arguments is the need to show that a
supremum ω ↦ sSup { F ω π : π ∈ S } of a real process over an index class S is
measurable and integrable, when S carries a countable dense skeleton D ⊆ S (every
point of S is approached by a D-valued sequence along which the process converges) and
the process is uniformly bounded.
This file packages that pattern into a small, paper-agnostic API on an arbitrary measurable space, so that individual empirical-process developments (policy-regret ERM suprema, orthogonal-learning localized processes, set-valued support processes, …) reduce their Bochner side conditions to a single invocation.
Main results:
* sSup_image_eq_of_dense_tendsto — for a real functional F bounded above on S, if
every x ∈ S is reached by a D-valued sequence along which F converges to F x,
then the supremum over S equals the supremum over the countable skeleton D.
* measurable_sSup_image_of_countable_dense — the pointwise supremum ω ↦ sSup (F ω '' S)
is measurable, given a countable D, per-index measurability on D, and the skeleton
supremum-equality for every ω.
* integrable_sSup_image_of_countable_dense — on a finite measure, the same supremum is
integrable, given in addition a uniform bound |F ω π| ≤ C over S; the accompanying
bddAbove_image_of_bound supplies the pointwise BddAbove fact for free.
On a finite measure μ, if the bound C is nonnegative, the skeleton index set D is countable, each coordinate map ω ↦ F ω π is measurable for π in the skeleton D, the pointwise supremum of F ω over the index class S equals its supremum over the countable skeleton D, for every ω, and F ω π is bounded in absolute value by C uniformly over π ∈ S, then the pointwise supremum ω ↦ sSup ((F ω) '' S) is integrable against μ. This is the entry point that discharges the Bochner side conditions of a localized empirical-process supremum in one call.
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
sSup_image_eq_of_dense_tendstotheorem — If F is bounded above on S, D ⊆ S, and every x ∈ S is the limit along a D-valued sequence of F-values (F (seq j) → F x), then the supremum of F over S coincides with the supremum over the countable skeleton D. This is the density-side input that turns a supremum over an uncountable class into a supremum over a countable skeleton (used both for measurability and for evaluating the supremum).Proof (Lean source)
theorem sSup_image_eq_of_dense_tendsto {ι : Type*} (F : ι → ℝ) (S D : Set ι) (hDS : D ⊆ S) (hbdd : BddAbove (F '' S)) (hdense : ∀ x ∈ S, ∃ seq : ℕ → ι, (∀ j, seq j ∈ D) ∧ Tendsto (fun j => F (seq j)) atTop (nhds (F x))) : sSup (F '' S) = sSup (F '' D) := by classical by_cases hS : S = ∅ · have hD : D = ∅ := Set.eq_empty_of_subset_empty (by simpa [hS] using hDS) simp [hS, hD] · obtain ⟨x0, hx0⟩ := Set.nonempty_iff_ne_empty.mpr hS obtain ⟨seq, hseqD, _⟩ := hdense x0 hx0 have hDne : D.Nonempty := ⟨seq 0, hseqD 0⟩ have himageDne : (F '' D).Nonempty := hDne.image F have hbddD : BddAbove (F '' D) := hbdd.mono (Set.image_mono hDS) apply le_antisymm · refine csSup_le (Set.image_nonempty.mpr ⟨x0, hx0⟩) ?_ rintro y ⟨x, hx, rfl⟩ obtain ⟨seq, hseqD, htendsto⟩ := hdense x hx refine le_of_tendsto htendsto (Filter.Eventually.of_forall fun j => ?_) exact le_csSup hbddD ⟨seq j, hseqD j, rfl⟩ · exact csSup_le_csSup hbdd himageDne (Set.image_mono hDS) -
measurable_sSup_image_of_countable_densetheorem — The pointwise supremum ω ↦ sSup ((F ω) '' S) of a real process over an index class S is measurable, provided S has a countable skeleton D on which the process is measurable in ω, and the supremum over S agrees pointwise with the supremum over D. Paper-agnostic generalization of the policy-class skeleton measurability step.hypothesesconclusionMeasurable (fun ω => sSup ((fun π => F ω π) '' S))Proof (Lean source)
theorem measurable_sSup_image_of_countable_dense {Ω ι : Type*} [MeasurableSpace Ω] (S D : Set ι) (F : Ω → ι → ℝ) (hD : D.Countable) (hF : ∀ π ∈ D, Measurable (fun ω => F ω π)) (heq : ∀ ω, sSup ((fun π => F ω π) '' S) = sSup ((fun π => F ω π) '' D)) : Measurable (fun ω => sSup ((fun π => F ω π) '' S)) := by classical let _ : Countable D := hD.to_subtype have hsup : Measurable (fun ω : Ω => ⨆ π : D, F ω π.1) := Measurable.iSup (fun π => hF π.1 π.2) convert hsup using 1 ext ω rw [heq ω] have himage : ((fun π : ι => F ω π) '' D) = ((fun π : D => F ω π.1) '' univ) := by ext y constructor · rintro ⟨π, hπ, rfl⟩ exact ⟨⟨π, hπ⟩, Set.mem_univ _, rfl⟩ · rintro ⟨π, _hπ, rfl⟩ exact ⟨π.1, π.2, rfl⟩ rw [himage] have huniv : ((fun π : D => F ω π.1) '' univ) = range (fun π : D => F ω π.1) := by ext y constructor · rintro ⟨π, _hπ, rfl⟩ exact ⟨π, rfl⟩ · rintro ⟨π, rfl⟩ exact ⟨π, Set.mem_univ _, rfl⟩ rw [huniv, sSup_range] -
bddAbove_image_of_boundtheorem — A uniform upper bound F ω π ≤ C over the index class S makes the image (F ω) '' S bounded above (for every ω). Companion BddAbove fact accompanying the integrability lemma.hypothesesconclusionBddAbove ((fun π => F ω π) '' S)Proof (Lean source)
theorem bddAbove_image_of_bound {Ω ι : Type*} (S : Set ι) (F : Ω → ι → ℝ) (C : ℝ) (hbound : ∀ ω, ∀ π ∈ S, F ω π ≤ C) (ω : Ω) : BddAbove ((fun π => F ω π) '' S) := by exact bddAbove_def.mpr ⟨C, by rintro _ ⟨π, hπ, rfl⟩ exact hbound ω π hπ⟩