MindFormal v1.0.0One Mind

MindFormal.Tools.FiniteMargins

Finite signed contrasts, threshold sets and probability enclosures.

theorem MindFormal.finite_contrast_error {A : Type u_1} [Fintype A] (γ x y e : A → ℝ) (he : ∀ (a : A), |x a - y a| ≤ e a) :
|∑ a : A, γ a * x a - ∑ a : A, γ a * y a| ≤ ∑ a : A, |γ a| * e a

A finite contrast pays the absolute coefficient times each error. Correlation and cancellation assumptions are unnecessary.

theorem MindFormal.margin_sign {x y e : ℝ} (he : |x - y| ≤ e) (hm : e < |y|) :
(0 < x ↔ 0 < y) ∧ (x < 0 ↔ y < 0)

A strict margin transfers either sign; equality at the boundary earns no sign.

theorem MindFormal.threshold_sandwich {A : Type u_1} (x y e : A → ℝ) (bar : ℝ) (he : ∀ (a : A), |x a - y a| ≤ e a) :
{a : A | bar + e a ≤ y a} ⊆ {a : A | bar ≤ x a} ∧ {a : A | bar ≤ x a} ⊆ {a : A | bar - e a ≤ y a}

A uniform coordinate enclosure gives inner and outer threshold sets.

theorem MindFormal.margin_probability {Ω : Type u_1} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (x y e : Ω → ℝ) (good : Set Ω) (hg : MeasurableSet good) (ε : ℝ) (hmass : 1 - ε ≤ μ.real good) (he : ∀ ω ∈ good, |x ω - y ω| ≤ e ω) :
max 0 (μ.real {ω : Ω | e ω < y ω} - ε) ≤ μ.real {ω : Ω | 0 < x ω} ∧ μ.real {ω : Ω | 0 < x ω} ≤ min 1 (μ.real {ω : Ω | -e ω ≤ y ω} + ε)

A common high-probability error event sandwiches a strict positive decision's probability between the two comparison margins. The reference may vary across preparations; it need not be independent of the error event.