Successful-output measure semantics for exceptional computations #
An ExceptT ε m computation denotes the pullback of its underlying Except ε α-valued
measure along the measurable embedding Except.ok. Errors are therefore missing successful
mass, while the effect-preserving denotation remains available by observing mx.run directly.
The construction uses Mathlib's Measure.comap; no transformer-specific measure operation is
needed. Native pure, map, and bind laws inherit the base monad's measure laws. Successful-output
measurability suffices for the full bind law, without requiring the error family to be measurable.
Interpret successful ExceptT results by pulling the run measure back along Except.ok.
Unfold the native successful-output semantics to Mathlib's pullback along Except.ok.
The successful-output measure of an exceptional computation on an event is the
run measure of the corresponding Except.ok outcomes.
The total successful mass of an exceptional computation is the mass of its ok branch.
Pure exceptional computations have Dirac successful-output semantics.
Native exceptional semantics preserves pure whenever the base semantics does.
Throwing an exception carries no successful-output mass.
Lifting a computation into ExceptT preserves its successful-output measure.
Lifting a lossless computation into the exceptional monad preserves its probability measure.
A measurable map of successful exceptional results is the measure pushforward.
A measurable family of full run measures suffices to compose native exceptional denotations.
Discrete intermediate values discharge the run-measurability premise of
ExceptT.evalDist_bind.
Native exceptional semantics satisfies the measurable-bind law for successful-output families. The full-run observer refines the source space, whose identity map transports the source measure.