Pushforwards of certified meanings #
A certified meaning f : CertifiedMeaning input output agrees with its native implementation on
every encoded input: f.meaning (input x) = output (f.implementation x). Pushing a measure on
native inputs forward along the encoded meaning f.meaning ∘ input therefore gives the encoding
of the implementation's pushforward (Control.Semantics.CertifiedMeaning.map_meaning). A
correspondence on an admissible set gives the same equation when almost every input is admissible
(Control.Semantics.CorrespondsOn.map_meaning_ae).
A decoded certificate, whose output encoding is DomainResult.valueEmbedding, returns a value at
every input. Pushed forward along its encoded meaning, a measure on native inputs therefore has the
implementation's pushforward as its values and no failure mass
(Control.Semantics.CertifiedMeaning.success_map_meaning,
Control.Semantics.CertifiedMeaning.failureMass_map_meaning). A correspondence gives the same when
almost every input is admissible (Control.Semantics.CorrespondsOn.success_map_meaning_ae,
Control.Semantics.CorrespondsOn.failureMass_map_meaning_ae).
Under a lawful measure semantics, the output measure of a computation mx pushed forward along the
encoded meaning is the encoding of the output measure of f.implementation <$> mx
(Control.Semantics.CertifiedMeaning.evalDist_map_meaning,
Control.Semantics.CorrespondsOn.evalDist_map_meaning_ae).
The statements assume measurability of the output encoding and of the implementation only. The
decoded forms need the implementation to be measurable only almost everywhere. The input encoding
and the semantic carrier of inputs need no measurable structure, because the encoded meaning
equals output ∘ f.implementation on every input, or on almost every input.
Measures on native inputs #
Pushing a measure on native inputs forward along the encoded meaning gives the encoding of the implementation's pushforward.
A correspondence on the admissible inputs gives the pushforward equation of
CertifiedMeaning.map_meaning when almost every input is admissible.
Decoded meanings: values and failure #
A decoded certificate's encoded meaning pushes a measure on native inputs to a measure whose values are the implementation's pushforward.
A decoded certificate's encoded meaning pushes a measure on native inputs to a measure with no failure mass: it neither diverges nor fails at any native input.
A decoded correspondence gives the values of CertifiedMeaning.success_map_meaning when
almost every input is admissible.
A decoded correspondence gives no failure mass when almost every input is admissible.
Output measures of computations #
The output measure of a computation, pushed forward along the encoded meaning, is the encoding of the output measure of the implementation run on its result.
A correspondence gives the equation of CertifiedMeaning.evalDist_map_meaning when almost
every output of the computation is admissible.