Support of a Computation #
This file defines a function OracleComp.support : OracleComp spec α → Set α
that
gives the set of possible outputs of a computation, assuming all oracle outputs are possible.
If the final output type has decidable equality we can also define a function
OracleComp.finSupport : OracleComp spec α → Finset α
with the same property.
This relies on decidable equality instances in OracleSpec
as well, and the definition
would need to be adjusted if those were moved into a seperate typeclass.
We avoid using (evalDist oa).support
as the definition of the support, as this forces
noncomputability due to the use of real numbers, and also makes defining finSupport
harder.
Possible outputs of the computation oa
given a set of possible outputs for each query.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The support
of a computation oa
is the set of all possible output values,
assuming that all output values of the oracles are possible.
This is naturally compatible with evalDist
where the oracles respond uniformly.
Equations
- oa.support = oa.supportWhen fun {α : Type ?u.5} (x : spec.OracleQuery α) => Set.univ
Instances For
Given a DecidableEq
instance on the return typ of a computation oa
,
and a finite set possible_outputs q
for any possible oracle query q
,
construct a finite set of all possible outputs of the computation oa
assuming that at each
query only the possible outputs are returned.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Case of finSupportWhen
where each oracle has a finite type as output and we assume any
possible output of oracle queries.
Equations
- oa.finSupport = oa.finSupportWhen fun {α : Type ?u.13} (x : spec.OracleQuery α) => match α, x with | .(spec.range i), OracleSpec.query i t => Finset.univ
Instances For
The support of a computation is finite if oracles have finite ranges.
The support of a computation is finite when viewed as a type.
With a DecidableEq
instance we can show that the support is actually a Fintype
,
rather than just Finite
as in support_finite
.
Equations
- One or more equations did not get rendered due to their size.
finSupport
when viewed as a Set
gives the regular support
of the computation.
If the output type of a computation has DecidableEq
then membership in the support
of a computation is also decidable as a predicate.
NOTE: will need to be restricted if we allow infinite oracle codomains.
Equations
- One or more equations did not get rendered due to their size.
Membership in finSupport
is a decidable predicate if it's defined.