Mathlib.Probability.IdentDistrib.EighthMoment
Let X_r be i.i.d.
Counting 5 core · 7 supporting This module bounds the variance-weighted sum of index maps supported on an arbitrary finite set. ★ weighted_survivingPatterns_le
Counting eighth-power index patterns without singleton fibers
This module bounds the variance-weighted sum of index maps supported on an arbitrary finite set. It uses a deliberately loose counting bound: group maps by their image, bound the number with a fixed k-element image by k⁸, and use choose(m,k) ≤ mᵏ/k!. This avoids enumerating set partitions while retaining ample room below the requested coefficient 8!.
Primary library references include Finset.sum_pow', Finset.card_powersetCard,
Nat.choose_le_pow_div, and Finset.card_eq_sum_card_image.
The multiplicity of an index value r in a map a assigning an index to each of eight slots is the number of slots that a sends to r.
Definition (Lean source)
The image of an eight-slot index map is given by the finite set of its used coordinates.
An eight-slot index map has no singleton fibers when every used coordinate is required to occur at least twice.
Definition (Lean source)
The surviving patterns on a finite coordinate set are given by filtering the supported eight-slot maps to retain fibers of size at least two.
For a nonnegative weight, the sum over surviving patterns on a finite coordinate set of the weight raised to the number of distinct coordinates the pattern uses is at most eight factorial times the sum of the first and fourth powers of size times weight.
Formal statement
Proof (Lean source)
7 supporting declarations (lemmas, instances)
-
patternImage_card_boundstheorem — An index map without singleton fibers uses between one and four coordinates.hypothesesProof (Lean source)
theorem patternImage_card_bounds (a : Fin 8 → α) (ha : NoSingleton a) : 1 ≤ (patternImage a).card ∧ (patternImage a).card ≤ 4 := by -- Sum fiber cardinalities to 8 using `Finset.card_eq_sum_card_image`; all fibers contribute ≥2. have hsum : ∑ r ∈ patternImage a, multiplicity a r = 8 := by simpa [patternImage, multiplicity] using (Finset.card_eq_sum_card_image a univ).symm have hle : (patternImage a).card * 2 ≤ 8 := by calc (patternImage a).card * 2 = ∑ r ∈ patternImage a, 2 := by simp _ ≤ ∑ r ∈ patternImage a, multiplicity a r := Finset.sum_le_sum ha _ = 8 := hsum constructor · exact Finset.card_pos.mpr ⟨a 0, Finset.mem_image.mpr ⟨0, Finset.mem_univ _, rfl⟩⟩ · omega -
card_patterns_with_image_letheorem — Among eight-slot maps supported on a finite set, the number with a prescribed image is at most the eighth power of that image's size.Proof (Lean source)
theorem card_patterns_with_image_le (S T : Finset α) : ((piFinset (fun _ : Fin 8 => S)).filter (fun a => patternImage a = T)).card ≤ T.card ^ 8 := by -- Containment in `piFinset (fun _ : Fin 8 => T)` suffices; its card is T.card^8. classical calc _ ≤ (piFinset (fun _ : Fin 8 => T)).card := by apply Finset.card_le_card intro a ha apply Fintype.mem_piFinset.mpr intro j rw [← (Finset.mem_filter.mp ha).2] exact Finset.mem_image.mpr ⟨j, Finset.mem_univ _, rfl⟩ _ = T.card ^ 8 := Fintype.card_piFinset_const T 8 -
weighted_survivingPatterns_le_choose_sumtheorem — For a nonnegative weight, the sum of image-size powers over surviving maps on a finite coordinate set is bounded by an image-size binomial sum.hypothesesconclusion(∑ a ∈ survivingPatterns S, v ^ (patternImage a).card)≤ ∑ k ∈ Icc 1 4, (S.card.choose k : ℝ) * (k : ℝ) ^ 8 * v ^ kProof (Lean source)
theorem weighted_survivingPatterns_le_choose_sum (S : Finset α) (v : ℝ) (hv : 0 ≤ v) : (∑ a ∈ survivingPatterns S, v ^ (patternImage a).card) ≤ ∑ k ∈ Icc 1 4, (S.card.choose k : ℝ) * (k : ℝ) ^ 8 * v ^ k := by -- Group by image T ∈ S.powerset, then by T.card. Use the preceding two lemmas and -- `Finset.card_powersetCard`. The nonnegative weight permits enlarging each image fiber. classical let P := S.powerset.filter (fun T => T.card ∈ Icc 1 4) have hmaps : ∀ a ∈ survivingPatterns S, patternImage a ∈ P := by intro a ha obtain ⟨hs, hn⟩ := Finset.mem_filter.mp ha apply Finset.mem_filter.mpr constructor · apply Finset.mem_powerset.mpr intro r hr obtain ⟨j, _, rfl⟩ := Finset.mem_image.mp hr exact Fintype.mem_piFinset.mp hs j · exact Finset.mem_Icc.mpr (patternImage_card_bounds a hn) calc _ = ∑ T ∈ P, ∑ a ∈ (survivingPatterns S).filter (fun a => patternImage a = T), v ^ (patternImage a).card := (Finset.sum_fiberwise_of_maps_to hmaps _).symm _ ≤ ∑ T ∈ P, (T.card : ℝ) ^ 8 * v ^ T.card := by apply Finset.sum_le_sum intro T hT have hc : ((survivingPatterns S).filter (fun a => patternImage a = T)).card ≤ T.card ^ 8 := by apply le_trans (Finset.card_le_card _) (card_patterns_with_image_le S T) intro a ha obtain ⟨hs, he⟩ := Finset.mem_filter.mp ha exact Finset.mem_filter.mpr ⟨(Finset.mem_filter.mp hs).1, he⟩ calc _ = (((survivingPatterns S).filter (fun a => patternImage a = T)).card : ℝ) * v ^ T.card := by rw [← nsmul_eq_mul] rw [← Finset.sum_const] apply Finset.sum_congr rfl intro a ha rw [(Finset.mem_filter.mp ha).2] _ ≤ (T.card : ℝ) ^ 8 * v ^ T.card := mul_le_mul_of_nonneg_right (by exact_mod_cast hc) (pow_nonneg hv _) _ = ∑ k ∈ Icc 1 4, ∑ T ∈ P.filter (fun T => T.card = k), (T.card : ℝ) ^ 8 * v ^ T.card := by symm apply Finset.sum_fiberwise_of_maps_to intro T hT exact (Finset.mem_filter.mp hT).2 _ = _ := by apply Finset.sum_congr rfl intro k hk have hfilter : P.filter (fun T => T.card = k) = S.powersetCard k := by ext T simp only [P, mem_filter, Finset.mem_powersetCard, Finset.mem_powerset] constructor · rintro ⟨⟨hT, _⟩, he⟩ exact ⟨hT, he⟩ · rintro ⟨hT, he⟩ exact ⟨⟨hT, he ▸ hk⟩, he⟩ calc _ = ∑ T ∈ P.filter (fun T => T.card = k), (k : ℝ) ^ 8 * v ^ k := by apply Finset.sum_congr rfl intro T hT rw [(Finset.mem_filter.mp hT).2] _ = _ := by rw [Finset.sum_const, nsmul_eq_mul, hfilter, Finset.card_powersetCard] exact mul_assoc _ _ _ |>.symm -
choose_sum_le_polynomialtheorem — For a nonnegative weight and a finite set size, the loose image counting polynomial is bounded by an explicit polynomial in size times weight.hypothesesm :ℕv :ℝhv :0 ≤ vconclusion(∑ k ∈ Icc 1 4, (m.choose k : ℝ) * (k : ℝ) ^ 8 * v ^ k)≤ (m : ℝ) * v+ 128 * ((m : ℝ) * v) ^ 2+ 1094 * ((m : ℝ) * v) ^ 3+ 2731 * ((m : ℝ) * v) ^ 4Proof (Lean source)
theorem choose_sum_le_polynomial (m : ℕ) (v : ℝ) (hv : 0 ≤ v) : (∑ k ∈ Icc 1 4, (m.choose k : ℝ) * (k : ℝ) ^ 8 * v ^ k) ≤ (m : ℝ) * v + 128 * ((m : ℝ) * v) ^ 2 + 1094 * ((m : ℝ) * v) ^ 3 + 2731 * ((m : ℝ) * v) ^ 4 := by -- Use `Nat.choose_le_pow_div (α := ℝ)` for k=1,2,3,4 and nonnegativity of v^k. -- The coefficients round up 1^8/1!, 2^8/2!, 3^8/3!, and 4^8/4! respectively. have h2 := mul_le_mul_of_nonneg_right (Nat.choose_le_pow_div (α := ℝ) 2 m) (pow_nonneg hv 2) have h3 := mul_le_mul_of_nonneg_right (Nat.choose_le_pow_div (α := ℝ) 3 m) (pow_nonneg hv 3) have h4 := mul_le_mul_of_nonneg_right (Nat.choose_le_pow_div (α := ℝ) 4 m) (pow_nonneg hv 4) norm_num [factorial] at h2 h3 h4 have hIcc : Icc 1 4 = {1, 2, 3, 4} := by decide norm_num [hIcc, mul_pow, Nat.choose_one_right] nlinarith [mul_nonneg (pow_nonneg (Nat.cast_nonneg m : (0 : ℝ) ≤ m) 3) (pow_nonneg hv 3), mul_nonneg (pow_nonneg (Nat.cast_nonneg m : (0 : ℝ) ≤ m) 4) (pow_nonneg hv 4)] -
sq_le_self_add_fourththeorem — For a nonnegative scalar, the second power is bounded by its first plus fourth powers.hypothesest :ℝht :0 ≤ tconclusiont ^ 2 ≤ t + t ^ 4Proof (Lean source)
theorem sq_le_self_add_fourth (t : ℝ) (ht : 0 ≤ t) : t ^ 2 ≤ t + t ^ 4 := by by_cases h : t ≤ 1 · have h2 : t ^ 2 ≤ t := by nlinarith nlinarith [sq_nonneg (t ^ 2)] · have h2 : 1 ≤ t ^ 2 := by nlinarith nlinarith [sq_nonneg (t ^ 2 - 1)] -
cube_le_self_add_fourththeorem — For a nonnegative scalar, the third power is bounded by its first plus fourth powers.hypothesest :ℝht :0 ≤ tconclusiont ^ 3 ≤ t + t ^ 4Proof (Lean source)
theorem cube_le_self_add_fourth (t : ℝ) (ht : 0 ≤ t) : t ^ 3 ≤ t + t ^ 4 := by by_cases h : t ≤ 1 · have h2 : t ^ 2 ≤ 1 := by nlinarith have := mul_nonneg ht (sub_nonneg.mpr h2) nlinarith [sq_nonneg (t ^ 2)] · have h3 : 0 ≤ t ^ 3 := pow_nonneg ht _ have := mul_nonneg h3 (sub_nonneg.mpr (le_of_not_ge h)) nlinarith -
polynomial_le_factorialtheorem — For a nonnegative scalar, the loose counting polynomial is bounded by eight factorial times the sum of its first and fourth powers.hypothesest :ℝht :0 ≤ tconclusiont + 128 * t ^ 2 + 1094 * t ^ 3 + 2731 * t ^ 4 ≤ (factorial 8 : ℝ) * (t ^ 4 + t)Proof (Lean source)
theorem polynomial_le_factorial (t : ℝ) (ht : 0 ≤ t) : t + 128 * t ^ 2 + 1094 * t ^ 3 + 2731 * t ^ 4 ≤ (factorial 8 : ℝ) * (t ^ 4 + t) := by have h2 := sq_le_self_add_fourth t ht have h3 := cube_le_self_add_fourth t ht norm_num [factorial] at * nlinarith [sq_nonneg (t ^ 2)]
Main 1 core · 3 supporting The headline theorem iid_centered_bounded_sum_eighth_moment applies to a measurable real mark in [0,1], any finite coordinate type, and any finite subset of those coordinates. ★ iid_centered_bounded_sum_eighth_moment
Eighth moment of a centered bounded iid sum over a finite coordinate subset
The headline theorem iid_centered_bounded_sum_eighth_moment applies to a measurable real
mark in [0,1], any finite coordinate type, and any finite subset of those coordinates. It bounds
the eighth moment of the centered sum by 8! times the sum of the fourth and first powers of
subset size times the mark's variance. Empty subsets and empty coordinate types are allowed.
The proof expands via Finset.sum_pow', cancels singleton fibers by product integration,
bounds the other patterns by variance powers, and applies the generic counting theorem.
centered_sum_eighth_moment_le also exposes the useful mean-zero, absolute-bound-one version.
A measurable real mark valued in the unit interval has its centered sum over any finite coordinate subset bounded in eighth moment by eight factorial times the fourth plus first powers of subset size times the one-mark variance under an iid probability product law.
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
integral_eighth_sum_eq_pattern_sumtheorem — For a measurable mark with absolute value at most one, the eighth moment of its sum on a finite coordinate subset is the sum of the integrals of all supported eight-slot products under an iid probability law.hypothesesProof (Lean source)
theorem integral_eighth_sum_eq_pattern_sum (μ : Measure Ω) [IsProbabilityMeasure μ] (g : Ω → ℝ) (hg : Measurable g) (hb : ∀ y, |g y| ≤ 1) (S : Finset ι) : (∫ x : ι → Ω, (∑ r ∈ S, g (x r)) ^ 8 ∂Measure.pi (fun _ : ι => μ)) = ∑ a ∈ piFinset (fun _ : Fin 8 => S), ∫ x : ι → Ω, (∏ j : Fin 8, g (x (a j))) ∂Measure.pi (fun _ : ι => μ) := by -- Rewrite pointwise by `Finset.sum_pow'`, then use `integral_finsetSum` and -- `integrable_pattern` for each term. No independence argument is needed in this step. classical have hexpand (x : ι → Ω) := Finset.sum_pow' S (fun r => g (x r)) 8 simp_rw [hexpand] exact integral_finsetSum _ (fun a _ => integrable_pattern μ g hg hb a) -
integral_eighth_sum_le_survivorstheorem — For a measurable mark with absolute value at most one and zero mean, the eighth moment of its sum on a finite coordinate subset is bounded by the second-moment-weighted surviving patterns under an iid probability law.hypothesesΩ :sharedType u_1ι :sharedType u_2μ :g :Ω → ℝhg :hb :∀ y, |g y| ≤ 1hcenter :(∫ y, g y ∂μ) = 0S :Finset ιconclusion(∫ x : ι → Ω, (∑ r ∈ S, g (x r)) ^ 8 ∂Measure.pi (fun _ : ι => μ))≤ ∑ a ∈ survivingPatterns S, (∫ y, g y ^ 2 ∂μ) ^ (patternImage a).cardProof (Lean source)
theorem integral_eighth_sum_le_survivors (μ : Measure Ω) [IsProbabilityMeasure μ] (g : Ω → ℝ) (hg : Measurable g) (hb : ∀ y, |g y| ≤ 1) (hcenter : (∫ y, g y ∂μ) = 0) (S : Finset ι) : (∫ x : ι → Ω, (∑ r ∈ S, g (x r)) ^ 8 ∂Measure.pi (fun _ : ι => μ)) ≤ ∑ a ∈ survivingPatterns S, (∫ y, g y ^ 2 ∂μ) ^ (patternImage a).card := by -- Start with the expansion above. If ¬NoSingleton a, a used coordinate has -- positive multiplicity <2, hence multiplicity 1; cancel using -- `integral_pattern_eq_zero_of_singleton`. Keep only the filter, use le_abs_self, -- and apply `abs_integral_pattern_le` termwise. classical rw [integral_eighth_sum_eq_pattern_sum μ g hg hb S] have hrestrict : (∑ a ∈ survivingPatterns S, ∫ x : ι → Ω, (∏ j : Fin 8, g (x (a j))) ∂Measure.pi (fun _ : ι => μ)) = ∑ a ∈ piFinset (fun _ : Fin 8 => S), ∫ x : ι → Ω, (∏ j : Fin 8, g (x (a j))) ∂Measure.pi (fun _ : ι => μ) := by apply Finset.sum_subset (filter_subset NoSingleton _) intro a ha hnot have hn : ¬NoSingleton a := fun h => hnot (Finset.mem_filter.mpr ⟨ha, h⟩) simp only [NoSingleton] at hn push Not at hn obtain ⟨r, hr, hlt⟩ := hn have hpos : 0 < multiplicity a r := by obtain ⟨j, _, hj⟩ := Finset.mem_image.mp hr exact Finset.card_pos.mpr ⟨j, Finset.mem_filter.mpr ⟨Finset.mem_univ j, hj⟩⟩ exact integral_pattern_eq_zero_of_singleton μ g hcenter a r (by omega) rw [← hrestrict] apply Finset.sum_le_sum intro a ha exact (le_abs_self _).trans (abs_integral_pattern_le μ g hg hb a (Finset.mem_filter.mp ha).2) -
centered_sum_eighth_moment_letheorem — A measurable mark with absolute value at most one and zero mean has its eighth moment over a finite coordinate subset bounded by eight factorial times the first and fourth powers of subset size times its second moment under an iid probability law.hypothesesΩ :sharedType u_1ι :sharedType u_2μ :g :Ω → ℝhg :hb :∀ y, |g y| ≤ 1hcenter :(∫ y, g y ∂μ) = 0S :Finset ιconclusion(∫ x : ι → Ω, (∑ r ∈ S, g (x r)) ^ 8 ∂Measure.pi (fun _ : ι => μ))≤ (factorial 8 : ℝ) * (((S.card : ℝ) * (∫ y, g y ^ 2 ∂μ)) ^ 4 + (S.card : ℝ) * (∫ y, g y ^ 2 ∂μ))Proof (Lean source)
theorem centered_sum_eighth_moment_le (μ : Measure Ω) [IsProbabilityMeasure μ] (g : Ω → ℝ) (hg : Measurable g) (hb : ∀ y, |g y| ≤ 1) (hcenter : (∫ y, g y ∂μ) = 0) (S : Finset ι) : (∫ x : ι → Ω, (∑ r ∈ S, g (x r)) ^ 8 ∂Measure.pi (fun _ : ι => μ)) ≤ (factorial 8 : ℝ) * (((S.card : ℝ) * (∫ y, g y ^ 2 ∂μ)) ^ 4 + (S.card : ℝ) * (∫ y, g y ^ 2 ∂μ)) := by classical exact (integral_eighth_sum_le_survivors μ g hg hb hcenter S).trans (weighted_survivingPatterns_le S _ (integral_nonneg (fun y => sq_nonneg (g y))))
Patterns 1 core · 3 supporting An eight-slot product is regrouped by coordinate multiplicities before applying finite-product integration. ★ abs_integral_pattern_le
Product integration of repeated index patterns
An eight-slot product is regrouped by coordinate multiplicities before applying finite-product integration. A singleton fiber contributes the centered first moment, hence makes the integral zero. For patterns with no singleton fibers, each used coordinate contributes at most the second moment of a bounded mark.
Use Finset.prod_fiberwise' to regroup the product and
MeasureTheory.integral_fintype_prod_eq_prod for independence. The latter theorem imposes no
measurability or integrability hypotheses; integrability is separately supplied for sum-integral
interchange.
For a measurable mark with absolute value at most one, an eight-slot product specified by a map without singleton fibers has absolute integral bounded by its second moment raised to the image size under an iid probability product law.
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
integral_pattern_factorizationtheorem — Under an iid probability product law, the integral of an eight-slot coordinate product specified by an index map is the product of the scalar moments indexed by coordinate multiplicities, for any real mark.hypothesesconclusion(∫ x : ι → Ω, (∏ j : Fin 8, g (x (a j))) ∂Measure.pi (fun _ : ι => μ))= ∏ r : ι, ∫ y, g y ^ multiplicity a r ∂μProof (Lean source)
theorem integral_pattern_factorization (μ : Measure Ω) [IsProbabilityMeasure μ] (g : Ω → ℝ) (a : Fin 8 → ι) : (∫ x : ι → Ω, (∏ j : Fin 8, g (x (a j))) ∂Measure.pi (fun _ : ι => μ)) = ∏ r : ι, ∫ y, g y ^ multiplicity a r ∂μ := by -- Pointwise regroup via `Finset.prod_fiberwise'`, rewriting each fiber product as a power. -- Then apply `integral_fintype_prod_eq_prod` to the coordinate-dependent powers. have hprod (x : ι → Ω) : (∏ j : Fin 8, g (x (a j))) = ∏ r : ι, g (x r) ^ multiplicity a r := by simpa [multiplicity] using (Finset.prod_fiberwise' univ a (fun r => g (x r))).symm simp_rw [hprod] exact integral_fintype_prod_eq_prod (fun r y => g y ^ multiplicity a r) -
integrable_patterntheorem — An eight-slot coordinate product of a measurable mark with absolute value at most one, specified by an index map, is integrable under an iid probability product law.hypothesesconclusionIntegrable (fun x : ι → Ω => ∏ j : Fin 8, g (x (a j))) (Measure.pi (fun _ : ι => μ))Proof (Lean source)
@[fun_prop] theorem integrable_pattern (μ : Measure Ω) [IsProbabilityMeasure μ] (g : Ω → ℝ) (hg : Measurable g) (hb : ∀ y, |g y| ≤ 1) (a : Fin 8 → ι) : Integrable (fun x : ι → Ω => ∏ j : Fin 8, g (x (a j))) (Measure.pi (fun _ : ι => μ)) := by classical have hm : Measurable (fun x : ι → Ω => ∏ j : Fin 8, g (x (a j))) := by fun_prop refine (integrable_const (1 : ℝ)).mono' hm.aestronglyMeasurable ?_ exact ae_of_all _ fun x => by rw [Real.norm_eq_abs, Finset.abs_prod] exact Finset.prod_le_one (fun j _ => abs_nonneg _) (fun j _ => hb _) -
integral_pattern_eq_zero_of_singletontheorem — If a real mark has zero mean and a coordinate occurs exactly once in an eight-slot map, the corresponding product has zero integral under an iid probability product law.hypothesesΩ :sharedType u_1ι :sharedType u_2μ :g :Ω → ℝhcenter :(∫ y, g y ∂μ) = 0a :Fin 8 → ιr :ιhr :multiplicity a r = 1conclusion(∫ x : ι → Ω, (∏ j : Fin 8, g (x (a j))) ∂Measure.pi (fun _ : ι => μ)) = 0Proof (Lean source)
theorem integral_pattern_eq_zero_of_singleton (μ : Measure Ω) [IsProbabilityMeasure μ] (g : Ω → ℝ) (hcenter : (∫ y, g y ∂μ) = 0) (a : Fin 8 → ι) (r : ι) (hr : multiplicity a r = 1) : (∫ x : ι → Ω, (∏ j : Fin 8, g (x (a j))) ∂Measure.pi (fun _ : ι => μ)) = 0 := by -- Factorization has a zero factor at r, since its multiplicity is one. rw [integral_pattern_factorization] exact Finset.prod_eq_zero (Finset.mem_univ r) (by simpa [hr] using hcenter)
Scalar 1 core · 5 supporting Bounded measurable marks are integrable to every natural power. ★ abs_integral_centered_pow_le_variance
Scalar bounded marks and centered moments
Bounded measurable marks are integrable to every natural power. A mark in [0,1] has a mean in [0,1] and a centered value of absolute magnitude at most one. Consequently the absolute value of every centered moment of order at least two is bounded by the mark's variance.
The variance API is Mathlib's ProbabilityTheory.variance, with the bridge
ProbabilityTheory.variance_eq_integral; no additional integrability hypothesis is imposed
on consumers because it follows from boundedness.
Every centered power of order at least two of a measurable mark in the unit interval has its absolute integral bounded by the variance under a probability law.
Formal statement
Proof (Lean source)
5 supporting declarations (lemmas, instances)
-
integrable_pow_of_abs_le_onetheorem — A measurable real mark whose absolute value is at most one has integrable natural powers under a probability law.hypothesesΩ :sharedType u_1μ :g :Ω → ℝhg :hb :∀ y, |g y| ≤ 1n :ℕconclusionIntegrable (fun y => g y ^ n) μProof (Lean source)
@[fun_prop] theorem integrable_pow_of_abs_le_one (μ : Measure Ω) [IsProbabilityMeasure μ] (g : Ω → ℝ) (hg : Measurable g) (hb : ∀ y, |g y| ≤ 1) (n : ℕ) : Integrable (fun y => g y ^ n) μ := by -- Dominate |g|^n by the integrable constant 1. refine (integrable_const (1 : ℝ)).mono' (hg.pow_const n).aestronglyMeasurable ?_ exact ae_of_all μ fun y => by simpa only [Real.norm_eq_abs, abs_pow] using (pow_le_one₀ (abs_nonneg (g y)) (hb y) : |g y| ^ n ≤ 1) -
abs_integral_pow_le_secondMomenttheorem — For a measurable real mark with absolute value at most one, the absolute integral of a power of order at least two is at most its second moment under a probability law.hypothesesΩ :sharedType u_1μ :g :Ω → ℝhg :hb :∀ y, |g y| ≤ 1n :ℕhn :2 ≤ nconclusion|∫ y, g y ^ n ∂μ| ≤ ∫ y, g y ^ 2 ∂μProof (Lean source)
theorem abs_integral_pow_le_secondMoment (μ : Measure Ω) [IsProbabilityMeasure μ] (g : Ω → ℝ) (hg : Measurable g) (hb : ∀ y, |g y| ≤ 1) (n : ℕ) (hn : 2 ≤ n) : |∫ y, g y ^ n ∂μ| ≤ ∫ y, g y ^ 2 ∂μ := by -- |g|^n ≤ |g|^2 follows from |g|≤1. Integrate the pointwise inequality and use -- `abs_integral_le_integral_abs`, with the integrability lemma above. have hi := integrable_pow_of_abs_le_one μ g hg hb n have hi2 := integrable_pow_of_abs_le_one μ g hg hb 2 refine abs_integral_le_integral_abs.trans (integral_mono hi.abs hi2 ?_) intro y change |g y ^ n| ≤ g y ^ 2 rw [abs_pow, ← sq_abs] exact pow_le_pow_of_le_one (abs_nonneg (g y)) (hb y) hn -
mean_mem_unitIntervaltheorem — A measurable mark valued in the unit interval has its mean in the unit interval under a probability law.hypothesesΩ :sharedType u_1μ :f :Ω → ℝhf :h0 :∀ y, 0 ≤ f yh1 :∀ y, f y ≤ 1conclusionconclusion 10 ≤ (∫ y, f y ∂μ)conclusion 2(∫ y, f y ∂μ) ≤ 1Proof (Lean source)
theorem mean_mem_unitInterval (μ : Measure Ω) [IsProbabilityMeasure μ] (f : Ω → ℝ) (hf : Measurable f) (h0 : ∀ y, 0 ≤ f y) (h1 : ∀ y, f y ≤ 1) : 0 ≤ (∫ y, f y ∂μ) ∧ (∫ y, f y ∂μ) ≤ 1 := by -- Integrability follows from `integrable_pow_of_abs_le_one` with n=1. have hb : ∀ y, |f y| ≤ 1 := fun y => by rw [abs_of_nonneg (h0 y)] exact h1 y have hi : Integrable f μ := by simpa only [pow_one] using integrable_pow_of_abs_le_one μ f hf hb 1 refine ⟨integral_nonneg h0, ?_⟩ simpa using integral_mono hi (integrable_const (1 : ℝ)) h1 -
abs_centered_mark_le_onetheorem — A measurable mark valued in the unit interval differs from its mean by at most one in absolute value under a probability law.hypothesesΩ :sharedType u_1μ :f :Ω → ℝhf :h0 :∀ y, 0 ≤ f yh1 :∀ y, f y ≤ 1y :Ωconclusion|f y - ∫ z, f z ∂μ| ≤ 1Proof (Lean source)
theorem abs_centered_mark_le_one (μ : Measure Ω) [IsProbabilityMeasure μ] (f : Ω → ℝ) (hf : Measurable f) (h0 : ∀ y, 0 ≤ f y) (h1 : ∀ y, f y ≤ 1) (y : Ω) : |f y - ∫ z, f z ∂μ| ≤ 1 := by obtain ⟨hm0, hm1⟩ := mean_mem_unitInterval μ f hf h0 h1 rw [abs_le] constructor <;> linarith [h0 y, h1 y] -
integral_centered_mark_eq_zerotheorem — Subtracting the mean from a measurable mark in the unit interval gives a zero integral under a probability law.hypothesesΩ :sharedType u_1μ :f :Ω → ℝhf :h0 :∀ y, 0 ≤ f yh1 :∀ y, f y ≤ 1conclusion(∫ y, (f y - ∫ z, f z ∂μ) ∂μ) = 0Proof (Lean source)
theorem integral_centered_mark_eq_zero (μ : Measure Ω) [IsProbabilityMeasure μ] (f : Ω → ℝ) (hf : Measurable f) (h0 : ∀ y, 0 ≤ f y) (h1 : ∀ y, f y ≤ 1) : (∫ y, (f y - ∫ z, f z ∂μ) ∂μ) = 0 := by have hb : ∀ y, |f y| ≤ 1 := fun y => by rw [abs_of_nonneg (h0 y)]; exact h1 y have hi : Integrable f μ := by simpa only [pow_one] using integrable_pow_of_abs_le_one μ f hf hb 1 rw [integral_sub hi (integrable_const _)] simp