Measure events for computation notation #
Pr{...}[...] interprets an ordinary Lean do computation as the successful-output
measure of its Boolean or propositional result. These equations identify that measure
with an event in the underlying computation when the event is measurable.
Probability of a successful event after an ordinary Lean do sequence.
The event is interpreted by the primary measure semantics.
Instances For
Format an event sequence directly after its opening delimiter, keeping the ordinary Lean formatter for subsequent statements and explicitly braced sequences. Explicit line breaks after the opening delimiter are preserved.
Instances For
A measurable predicate returned by a computation has the probability of its event.
On a discrete output space every predicate is a measurable event.
Equality to one output has its singleton mass whenever singletons are measurable.
A final decidable event has the same success mass whether it is returned as a proposition or decided to a Boolean; no measurable structure on intermediate values is needed.
Pointwise equivalent predicates have the same probability after a common computation.
Measurable predicates agreeing almost everywhere have equal event probabilities.
An event that never occurs has probability zero.
Almost-everywhere implication bounds probabilities of measurable events.
Implication between events bounds their probabilities on a discrete output space.
Implication between final events bounds their probabilities without a measurable-space argument on the intermediate values.
An observed bind integrates the event probability of each measurable continuation.
Only the common draw needs a selected measurable space; the continuation is observed in Prop.
A discrete common draw discharges the observed continuation's measurability.
AE equality of measurable observed continuation probabilities gives equality after a draw.
Pointwise equality of observed continuation probabilities gives equality after a common draw. Neither the draw nor the continuation outputs need a measurable-space argument.
Events of independent draws have the product of their probabilities.
The trivially true event is the successful mass of the computation, observed in the discrete structure on its outputs.
Computations with the same output measure in the discrete structure have the same events.
A false constant event has probability zero.