Primary and discrete compatibility for free-program measure semantics #
The dependency-light native fold lives in VCVio.EvalDist.PFunctorMeasure.Core. This module
reexports the fold's primary EvalDistSemantics and connects it to the legacy discrete
IsProbabilitySpec evaluator.
Main statements #
PFunctor.IsMeasureSpec.Compatible— the measure and probability specifications of an interface agree;IsProbabilitySpec.toMeasureSpecsatisfies it definitionally.PFunctor.FreeM.denote_eq_toMeasure— under agreement, the fold is the measure of thePMFdenotation ofVCVio.EvalDist.PFunctor.- The
DiscreteEvalDistCompatible (FreeM P)instance — under agreement,𝒟[…]satisfies the façade bridge, soevalDist_apply_singleton,evalDist_apply_setOfandlintegral_evalDistread existingPr[…]facts off the measure denotation.
Agreement with the PMF denotation #
For a polynomial interface carrying both interpretations compatibly, the measure denotation is
the measure of the PMF denotation. This is what lets a Pr[…] statement proved against
VCVio.EvalDist.PFunctor be transported here rather than reproved.
The measure and probability interpretations of an interface agree. Instances are explicit
(IsProbabilitySpec.toMeasureSpec) or proved per interface, never derived from finiteness
alone.
Every answer measure is the measure of the answer distribution.
Instances
Every PMF-valued interpretation induces a measure-valued one, by taking the measure of
each answer distribution.
Deliberately not an instance, matching PFunctor.IsUniformSpec.ofFintypeInhabited: measure
semantics stay an explicit opt-in rather than being derived silently wherever a PMF
interpretation happens to be in scope. Introduce it with letI or a local instance at a use
site; it is IsMeasureSpec.Compatible by rfl.
Instances For
Under an agreeing measure specification the free-monad fold satisfies the façade bridge, so
the generic evalDist_apply_singleton/evalDist_apply_setOf/lintegral_evalDist read existing
Pr[…] facts off the measure denotation.