Specifications of Available Oracles #
An OracleSpec ι is specieifes a set of oracles indexed by ι.
Defined as a map from each input to the type of the oracle's output.
Equations
- OracleSpec ι = (ι → Type ?u.7)
Instances For
Equations
- spec.toPFunctor = { A := ι, B := spec }
Instances For
Instances For
Instances For
Instances
Instances
- decidableEq_A : DecidableEq spec.toPFunctor.A
Instances
Type-class gadget to enable probability notation for computation over an OracleSpec.
Can be defined for any spec with spec.Range finite and inhabited, but generally should
only be instantied for things like coinSpec or unifSpec.
dtumad: we should examine if this should be used more strictly in evalDist stuff.
We could require computations without this tag to provide their own PMF embedding,
even if it can be inferred implicitly.
Instances
Equations
- OracleSpec.singletonSpec = Lean.ParserDescr.trailingNode `OracleSpec.singletonSpec 25 25 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " →ₒ ") (Lean.ParserDescr.cat `term 26))
Instances For
Equations
- OracleSpec.instDecidableEqOfFnOfDecidableEq F = { decidableEq_A := h, decidableEq_B := h' }
spec₁ + spec₂ specifies access to oracles in both spec₁ and spec₂.
The input is split as a sum type of the two original input sets.
This corresponds exactly to addition of the corresponding PFunctor.
Equations
- OracleSpec.instHAddSum = { hAdd := fun (spec : OracleSpec ι) (spec' : OracleSpec ι') => Sum.elim spec spec' }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Given an indexed set of OracleSpec, specifiy access to all of the oracles,
by requiring an index into the corresponding oracle in the input.
Equations
- OracleSpec.sigma specs t = specs t.fst t.snd
Instances For
spec₁ * spec₂ represents an oracle that takes in a pair of inputs for each set,
and returns an element in the output of one oracle or the other.
The corresponds exactly to multiplication in PFunctor.
Equations
- OracleSpec.instHMulProd = { hMul := fun (spec : OracleSpec ι) (spec' : OracleSpec ι') (t : ι × ι') => spec.Range t.1 ⊕ spec'.Range t.2 }
Given an indexed set of OracleSpec, specifiy access to an oracle that given an input to
the oracle for each index returns an index and an ouptut for that index.
Equations
- OracleSpec.pi specs t = ((i : ι) × specs i (t i))
Instances For
Specifies access to no oracles, using the empty type as the indexing type.
Equations
- []ₒ = OracleSpec.ofFn fun (x : PEmpty.{?u.4 + 1}) => PEmpty.{?u.3 + 1}
Instances For
Equations
- OracleSpec.«term[]ₒ» = Lean.ParserDescr.node `OracleSpec.«term[]ₒ» 1024 (Lean.ParserDescr.symbol "[]ₒ")
Instances For
dt: should or shouldn't we switch to this. Compare to (· + m) <$> $[0..n].
One question is that we may have empty selection
Select uniformly from a range (not starting from zero).