- Boxes
- definitions
- Ellipses
- theorems and lemmas
- Blue border
- the statement of this result is ready to be formalized; all prerequisites are done
- Orange border
- the statement of this result is not ready to be formalized; the blueprint needs more work
- Blue background
- the proof of this result is ready to be formalized; all prerequisites are done
- Green border
- the statement of this result is formalized
- Green background
- the proof of this result is formalized
- Dark green background
- the proof of this result and all its ancestors are formalized
- Dark green border
- this is in math-comp
\(\mathrm{bin\_ digit}(x, n)\) extracts the \(n\)-th binary digit of \(x \in [0,1)\) via the doubling map. \(\mathrm{bin\_ partial\_ sum}(d, n) = \sum _{i{\lt}n} d(i) \cdot 2^{-(i+1)}\) and \(\mathrm{bin\_ sum}(d) = \lim _n \mathrm{bin\_ partial\_ sum}(d, n)\).
For a measurable index type \(I\) and a family \(X : I \to \mathbf{QBS}\), the general coproduct \(\coprod _{i:I} X_i\) has carrier \(\{ i : I ~ \& ~ X_i\} \) (dependent sum). A random element \(\alpha \) factors as \(\alpha (r) = (P(r), F_{P(r)}(r))\) for measurable \(P : \mathbb {R} \to I\) and family \(F_i \in M_{X_i}\).
A quasi-Borel space (QBS) over \(R\) is a type \(T\) equipped with a set \(M_X \subseteq (\mathbb {R} \to T)\) of random elements satisfying three axioms:
Composition (qbs_Mx_comp): If \(\alpha \in M_X\) and \(f : \texttt{\{ mfun mR {\gt}-{\gt} mR\} }\) (a bundled measurable function), then \(\alpha \circ f \in M_X\).
Constants (qbs_Mx_const): For every \(x : T\), the constant function \(\lambda r.\; x\) is in \(M_X\).
Gluing (qbs_Mx_glue): If \(P : \texttt{\{ mfun mR {\gt}-{\gt} nat\} }\) and \(F_i \in M_X\) for all \(i\), then \(\lambda r.\; F_{P(r)}(r) \in M_X\).
The HB structure QBSpace packages this mixin with a short type name qbsType R. All type constructions (prodQ, expQ, unitQ, etc.) use the Section + HB.instance Definition pattern recommended by mathcomp maintainers.
For a QBS \(X\) with inhabitant \(x_0 : X\), the list QBS \(\mathrm{list}(X)\) has \(\alpha \) random iff there exist measurable \(\mathrm{len} : \mathbb {R} \to \mathbb {N}\) and random \(F_i \in M_X\) such that \(\alpha (r) = \mathrm{mkseq}(\lambda i.\; F_i(r), \mathrm{len}(r))\).
Given \(p : P(X \times \mathbb {R})\) with weight function \(w(r) = \mathrm{snd}(\alpha _p(r)) \geq 0\) and evidence \(Z = \int w \, d\mu _p \in (0,+\infty )\), the normalized measure is \(\nu (A) = \int _A (w/Z) \, d\mu _p\). This is a probability measure (\(\nu (\Omega ) = 1\)).
Given \(p = (\alpha , \mu )\) on \(X\) and \(f : X \to P(Y)\), the bind \(p \mathbin {{\gt}\! \! {\gt}\! \! =} f\) is \((\lambda r.\; \alpha _{f(\alpha (r))}(r),\; \mu )\). The key obligation is that the diagonal \(r \mapsto \alpha _{f(\alpha (r))}(r)\) is random in \(Y\).
For functions \(f, g\) depending on disjoint coordinates of a product measure: \(\int _{p_X \otimes p_Y} f(x) \cdot g(y) = \mathbb {E}_{p_X}[f] \cdot \mathbb {E}_{p_Y}[g]\). This is a tautology of products, not a non-trivial statistical independence theorem – the lemma has no independence hypothesis. The actual qbs_indep predicate is defined separately but is not yet connected to a non-trivial independence theorem.
A function \(f : X \to M\) is a QBS morphism \(X \to R(M)\) if and only if it pulls back measurable sets to \(L(X)\)-measurable sets:
This is a single-object biconditional, not a full categorical naturality statement (the functorial squares are not formalized).
For \(s, s' \neq 0\):
where \(\mu _{\mathrm{new}} = \frac{m s'^2 + m' s^2}{s^2 + s'^2}\), \(\sigma _{\mathrm{new}} = \frac{s s'}{\sqrt{s^2 + s'^2}}\), and \(K\) is a scalar involving \(|m - m'|\) and \(\sqrt{s^2 + s'^2}\).
The joint integral equals the iterated integral: \(\int _{p \otimes q} h = \int _p \int _q h(x, y)\). This is a special case of Fubini for the specific QBS product measure construction, not the full Fubini theorem on arbitrary product measures.