MindFormal v1.0.0One Mind

MindFormal.Tools.Moments

theorem MindFormal.live_second_moment_tail {Ω : Type u_1} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (bad : Set Ω) (X : Ω → ℝ) (hn : ∀ (z : Ω), 0 ≤ X z) (hX : MeasureTheory.MemLp X 2 μ) {M p : ℝ} (hM : 0 ≤ M) (hsecond : ∫ (z : Ω), X z ^ 2 ∂μ ≤ M ^ 2) (hbad : μ.real bad ≤ p) :
∫ (z : Ω) in bad, X z ∂μ ≤ M * √p

02.19 F9, 03.15 S3, 03.18 FR11: second moments charge an exceptional set by M sqrt(p). The probability measure, nonnegative read, MemLp 2, nonnegative M, second-moment bound and exceptional mass bound are explicit. This is Cauchy--Schwarz, independent of any finite-horizon corridor.

theorem MindFormal.live_window_mean {Ω : Type u_1} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (good : Set Ω) (hg : MeasurableSet good) (X : Ω → ℝ) (hn : ∀ (z : Ω), 0 ≤ X z) (hX : MeasureTheory.MemLp X 2 μ) {L U M p : ℝ} (hL : 0 ≤ L) (hU : 0 ≤ U) (hM : 0 ≤ M) (hsecond : ∫ (z : Ω), X z ^ 2 ∂μ ≤ M ^ 2) (hbad : μ.real goodᶜ ≤ p) (hw : ∀ z ∈ good, X z ∈ Set.Icc L U) :
L * (1 - p) ≤ ∫ (z : Ω), X z ∂μ ∧ ∫ (z : Ω), X z ∂μ ≤ U + M * √p

02.19 F9: for a nonnegative uncensored L2 latency, a measurable good set of failure at most p and a window [L,U] there imply the displayed lower and upper means. L,U,M are nonnegative and the global second moment is bounded by M squared. No moment assumption is inferred from the corridor.

theorem MindFormal.live_mean_gap {Ω : Type u_1} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (good : Set Ω) (hg : MeasurableSet good) (slow fast : Ω → ℝ) (hsn : ∀ (z : Ω), 0 ≤ slow z) (hfn : ∀ (z : Ω), 0 ≤ fast z) (hsi : MeasureTheory.Integrable slow μ) (hfi : MeasureTheory.MemLp fast 2 μ) {Δ M p : ℝ} (hΔ : 0 ≤ Δ) (hM : 0 ≤ M) (hsecond : ∫ (z : Ω), fast z ^ 2 ∂μ ≤ M ^ 2) (hbad : μ.real goodᶜ ≤ p) (hgap : ∀ z ∈ good, Δ ≤ slow z - fast z) :
(1 - p) * Δ - M * √p ≤ ∫ (z : Ω), slow z ∂μ - ∫ (z : Ω), fast z ∂μ

03.15 S3, 03.18 FR11--FR12: an actual pair of nonnegative uncensored reads separated by Delta on a measurable event of mass at least 1-p has mean gap at least (1-p)Delta-M sqrt(p). The slow read is integrable, the fast read is L2 with second moment <=M squared; Delta,M are nonnegative. This proves the tail step explicitly and permits dependence of the reads.

theorem MindFormal.live_cond_real {Ω : Type u_1} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (A B : Set Ω) (hA : MeasurableSet A) :
μ[|A].real B = μ.real (A ∩ B) / μ.real A

02.15 opportunities, 02.19 correct trials, 03.18 confidence groups: conditioning means restriction and normalization of the actual probability measure. For a measurable group A the real probability is its intersection mass divided by its own group mass; no conditional failure is borrowed from an unconditional one. This identity includes zero-mass groups algebraically.

theorem MindFormal.live_cond_failure_of_good_subset {Ω : Type u_1} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (A good : Set Ω) (hA : MeasurableSet A) (hg : MeasurableSet good) (hpos : 0 < μ.real A) (hsub : good ⊆ A) {p : ℝ} (hbad : μ.real goodᶜ ≤ p) :
μ[|A].real goodᶜ ≤ p

02.19 F9: if every good path is a correct trial, conditioning on the positive measurable correct-trial group preserves the original failure allowance p. The proof uses normalization by a probability <=1; it does not replace this sharper estimate by p/(1-p).