Measure-valued oracle specifications #
An oracle specification assigns a probability measure to each query's response type. A uniform specification identifies each chosen response measure with the uniform measure on its response type; this is a proposition about the chosen measures, and finiteness and inhabitedness of the response types follow from it rather than being carried as data. These certificates are explicit: finiteness alone does not select a probabilistic interpretation.
Combined signatures retain each summand's chosen answer measurable space.
Discrete answer spaces are preserved by combining signatures.
A measure-valued response distribution for each query in an oracle specification.
Instances For
The probability measure assigned to the response of query t.
Instances For
Each response measure is a probability measure. This restates the polynomial-functor
instance at the oracle API, whose response types are spec.Range t rather than
spec.toPFunctor.B t, so that instance search finds it for oracle goals.
A chosen measure interpretation that samples uniformly from each response type.
This is a proposition about the chosen response measures: each one is the uniform measure on
its response type. It carries no finiteness or inhabitedness data. uniformOn Set.univ is a
probability measure exactly on a finite, nonempty type, which
IsMeasureSpec.isProbabilityMeasure records, so IsUniformMeasureSpec.finite_range and
IsUniformMeasureSpec.nonempty_range recover both facts. Statements about cardinalities take
[Fintype (spec.Range t)] for the queries they mention.
- toMeasure_eq_uniform (t : spec.toPFunctor.A) : PFunctor.IsMeasureSpec.toMeasure t = ProbabilityTheory.uniformOn Set.univ
Each query uses the uniform probability measure on its response type.
Instances
The response measure exposed by the oracle API is uniform for a uniform specification.
Select uniform measure semantics for an oracle specification whose response types are finite and nonempty.
Instances For
Native uniform measure semantics for the finite-range selection oracle.
Native uniform measure semantics for the fair-coin oracle.
A uniform response measure is a probability measure only on a finite response type.
Not an instance: for a generic spec its conclusion Finite (spec.Range t) would be a
candidate for every Finite _ goal.
A uniform response measure is a probability measure only on a nonempty response type.
Not an instance, for the reason given at finite_range.
Every response has positive probability under a uniform response measure.
On a finite response type, each response has probability the inverse cardinality.
Combining uniform specifications preserves each configured answer measure.
Lifting a primitive query denotes its configured answer measure.
A single oracle query denotes its configured answer measure.
A query in a uniform measure specification has the uniform response measure.
A program over discrete, lossless oracle responses has total output mass one.
Discarding the result of a lossless oracle computation leaves the continuation's output measure unchanged. The discarded result type needs no ambient measurable-space instance.
A constant output map on a lossless oracle program is a Dirac measure. No measurable-space instance on the discarded result type is needed.