Measure-to-cardinality bridge for the uniform coin-flip model
ProvedspMeasure_real_coe_finsetLet spMeasure n be the uniform i.i.d. fair-coin probability measure on SpOmega n = Fin n \to \mathrm{Bool}$, and let $S$ be any finite subset (Finset) of SpOmega n. Then the probability of $S$ under spMeasure n` is exactly its cardinality divided by the total number of outcomes:
This is the bridge lemma converting a measure-theoretic probability statement about spMeasure n into a purely combinatorial counting statement, and vice versa: any bound proved via measure-theoretic tools (e.g. a sub-Gaussian concentration inequality bounding (spMeasure n).real {event}) becomes an explicit bound on the cardinality of the corresponding Finset of outcomes, which can then be fed into purely combinatorial results (such as extremal set theory bounds on the Hamming cube) that are not stated in measure-theoretic terms.
Formalization Note. Follows from spMeasure_eq_uniform (identifying spMeasure n with the uniform measure on the finite type SpOmega n) together with PMF.toMeasure_apply_finset (the uniform measure of a Finset equals the sum of the PMF over it) and PMF.uniformOfFintype_apply.
import Definitions.Def_Komlos_RandomSignModel import Theorems.Thm_spMeasure_eq_uniform import Mathlib open Komlos MeasureTheory
theorem spMeasure_real_coe_finset (n : ℕ) (S : Finset (SpOmega n)) :
(spMeasure n).real (S : Set (SpOmega n)) = (S.card : ℝ) / (2 : ℝ) ^ n := by sorry