Oracle circuits and inlining #
An oracle circuit for a language A over Bool is a De Morgan circuit with, in addition, an
oracle gate of every arity q, which answers whether the word formed by its q arguments is in
A (oracleSignature, oracleInterpretation A). The arguments of an oracle gate may be computed
from the answers of other oracle gates, so the queries are adaptive. Such circuits are the
relativized circuits of Wilson.
Inlining replaces every oracle gate of arity q by a De Morgan circuit D q computing the slice
of A at q (inlineOracle), which is the simulation of the oracle basis by the De Morgan
basis (Circuit.simulate): the result computes what the oracle circuit computes
(eval_inlineOracle), each oracle gate costing the size and the depth of its replacement
(size_inlineOracle, depth_inlineOracle_le).
PPolyOracle A is P/poly relative to A: the languages with oracle circuits of polynomial size
whose gates have polynomially many arguments. Every language in P/poly is in it
(PPoly.subset_PPolyOracle), and when A is in P/poly, inlining its circuits, of polynomial
size at the polynomially bounded arities of the queries, shows the converse
(PPolyOracle_subset_PPoly): P/poly with oracle gates for a language in P/poly is P/poly
(PPolyOracle_eq_PPoly).
Main definitions #
Cslib.Circuits.Boolean.OracleOp,Cslib.Circuits.Boolean.OracleOp.arity,Cslib.Circuits.Boolean.oracleSignature,Cslib.Circuits.Boolean.oracleInterpretation: the De Morgan basis with oracle gates.Cslib.Circuits.Boolean.OracleOp.queryWeight,Cslib.Circuits.Boolean.OracleOp.queryArity: the weight counting oracle gates and the fan-in of an oracle gate, for measuring the oracle gates of a device.Cslib.Circuits.Boolean.toOracle: the De Morgan basis inside it.Cslib.Circuits.Boolean.oracleImpl,Cslib.Circuits.Boolean.oracleSize,Cslib.Circuits.Boolean.oracleDepth,Cslib.Circuits.Boolean.inlineOracle: gate replacement and cost functions for inlining oracle gates.Cslib.Circuits.Boolean.PPolyOracle:P/polyrelative to an oracle.
Main results #
Cslib.Circuits.Boolean.eval_inlineOracle,size_inlineOracle,size_inlineOracle_le,depth_inlineOracle_le: the inlined circuit computes what the oracle circuit computes, with bounds on its size and depth.Cslib.Circuits.Boolean.PPolyOracle_subset_PPoly,Cslib.Circuits.Boolean.PPolyOracle_eq_PPoly:P/polyrelative to a language inP/polyisP/poly.Cslib.Circuits.Boolean.fanInAtMost_mapOp_toOracle,Cslib.Circuits.Boolean.cost_mapOp_toOracle,Cslib.Circuits.Boolean.depthWith_mapOp_toOracle: a De Morgan program or circuit in the oracle basis has fan-in two and no oracle gates.
References #
The arity of an operation of the oracle basis.
One for an oracle gate and zero for a De Morgan operation: the weight whose cost counts oracle gates and whose weighted depth counts oracle gates along a path.
The fan-in of an oracle gate, and zero for a De Morgan operation.
The De Morgan basis with an oracle gate of every arity. It is reducible, so that case analysis on its operations sees their arities.
The meaning of the oracle basis for the oracle A: the oracle gate of q arguments answers
whether the word they form is in A.
Instances For
oracleInterpretation A interprets a base operation using the standard De Morgan
interpretation.
oracleInterpretation A interprets an arity-q query gate using A.slice q.
The De Morgan basis inside the oracle basis.
Instances For
The embedding toOracle of the De Morgan basis into the oracle basis preserves semantics.
Inlining #
The De Morgan circuit replacing each operation of the oracle basis: a gate for an operation of
the De Morgan basis, and D q for the oracle gate of q arguments.
The oracle circuit C with every oracle gate of q arguments replaced by the De Morgan
circuit D q.
Inlining an oracle. If every D q computes the slice of A at q, the inlined circuit
computes what the oracle circuit computes with the oracle A.
The inlined circuit has one gate for each gate of the De Morgan basis and the gates of D q
for each oracle gate of q arguments.
The inlined circuit is at most as deep as the oracle circuit when an oracle gate of q
arguments costs the depth of D q.
If every gate of an oracle circuit has at most r arguments, and every D q with
q ≤ r has at most s gates, the inlined circuit has at most size C * max 1 s gates.
P/poly relative to an oracle #
P/poly relative to the oracle A: the languages with oracle circuits, one for each input
length n, with at most s n gates, each of at most s n arguments, for a polynomially bounded
s. The size counts gates; bounding arity too bounds incoming wire occurrences by s n ^ 2.
A De Morgan program in the oracle basis has no oracle gates.
A De Morgan circuit in the oracle basis has no oracle gate on any path. Not a simp lemma:
Circuit.depthWith_mapOp rewrites its left-hand side.
A language in P/poly is in P/poly relative to any oracle.
Inlining an oracle in P/poly. If A is in P/poly, so is every language in P/poly
relative to A: its oracle gates have polynomially many arguments, at which A has circuits of
polynomial size.
P/poly relative to a language in P/poly is P/poly.