Discrete subprobability monad #
Discreteness invariant #
A measure on the discrete (⊤) σ-algebra is discrete when it is the sum of its point masses,
μ A = ∑_{x ∈ A} μ {x}. This is the invariant our semantics always satisfies (every measure is
built from pure/bind/uniform/⊥), and it is exactly what lets the framework reconstruct a
measure from its singletons and swap integration order without any countability assumption on the
type — replacing the [Countable a] side-conditions (the goal of subtask 4).
A measure on the discrete σ-algebra is discrete (purely atomic) when μ A = ∑_{x∈A} μ{x}.
Instances For
Structural form: a discrete measure is the Measure.sum of its weighted point masses.
Singleton extensionality: two discrete measures agreeing on all singletons are equal
(countability-free — the replacement for Measure.ext_of_singleton, which needs [Countable]).
Integration against a discrete measure is the weighted sum of point evaluations.
Fubini for discrete measures — integration order swaps with no σ-finiteness/countability
side-condition, via ENNReal.tsum_comm.
Bind preserves discreteness (the keystone — countability-free, via ENNReal.tsum_comm).
A monotone supremum of discrete measures is discrete (for the ωSup of the OCPO).
Scaling preserves discreteness.
A Measure.sum of discrete measures is discrete (countability-free, via ENNReal.tsum_comm).
The canonical discrete measure ∑ₜ w t • δₜ is discrete.
Countable additivity over an arbitrary disjoint family for a discrete measure — the
countability-free replacement for measure_iUnion (the index ι may be uncountable; the
measure's countable support makes the sum well-defined). Proved by reindexing the
singleton-sum across the disjoint union (ENNReal.tsum_sigma' + Set.unionEqSigmaOfDisjoint).
The sub-probability monad #
Equations
- GaudisCrypt.SubProbability a = { mu : MeasureTheory.Measure a // mu ⊤ ≤ 1 ∧ GaudisCrypt.discreteMeasure mu }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
Instances For
Instances For
Instances For
The total weight (mass) of a sub-probability: the measure of the whole space. 1 for a
genuine probability, less when the computation can fail. The observable behind
Footprint.indistinguishable.
TODO: remove that and use : ofEvent ⊤ instead
Instances For
Post-composing with a deterministic (Dirac) kernel preserves the total weight.
Equations
- GaudisCrypt.instCoeFunSubProbabilityForallNNReal = { coe := fun (μ : GaudisCrypt.SubProbability a) (x : a) => μ.ofEvent {x} }
Equations
- GaudisCrypt.instFunLikeSubProbabilityNNReal = { coe := fun (μ : GaudisCrypt.SubProbability a) (x : a) => μ.ofEvent {x}, coe_injective := ⋯ }
Equations
- GaudisCrypt.instPartialOrderSubProbability = { le := fun (p q : GaudisCrypt.SubProbability a) => ↑p ≤ ↑q, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯, le_antisymm := ⋯ }
Equations
- One or more equations did not get rendered due to their size.
Binding a probability (total mass 1) into a constant pure collapses to that pure:
a lossless computation whose result is discarded is invisible.
Kleisli composition for SubProbability: f * g applies g first, then f
on the result (so f * g = f ∘ₖ g), with pure as the identity. This is the
monoid of sub-probability kernels m → SubProbability m, the probabilistic
analogue of Function.End.
Equations
- One or more equations did not get rendered due to their size.
pure is injective on SubProbability (it is the Dirac embedding):
pure x = pure y → x = y. Lets us extract a plain pointwise state equation from a
Dirac-kernel commutation identity.
Bicommutant closure is monotone.