Documentation

CslibFrontier.Computability.Circuit.Boolean.Oracle.LocalCircuit

Local oracle-circuit classes #

Oracle circuits as an OracleModel, so that OracleModel.LocalClass gives the local circuit classes [q, ℓ, a]–Circuit[S] of [ChenHiraharaOliveiraPichRajgopalSanthanam2020, Section 2.5, Definition 11, p. 13]. The measures are those of the circuit library:

Program.QueryArityAtMost bounds the fan-in of the oracle gates only, and says nothing about the De Morgan gates. A bound on the fan-in of every gate (Program.FanInAtMost) implies it (Program.QueryArityAtMost.of_fanInAtMost).

Main definitions #

Main results #

References #

The fan-in of an oracle gate is its arity, and a De Morgan operation has query arity zero.

Every oracle gate in a program has fan-in at most ℓ. The De Morgan gates are unconstrained.

Instances For
    @[instance_reducible]

    The oracle-gate fan-in bound is decidable for every concrete program.

    theorem Cslib.Circuits.Program.QueryArityAtMost.mono {n g : ℕ} {p : Program Boolean.oracleSignature n g} {ℓ ℓ' : ℕ} (h : p.QueryArityAtMost ℓ) (hℓ : ℓ ≤ ℓ') :

    An oracle-gate fan-in bound holds for every larger bound.

    A fan-in bound on every gate bounds the fan-in of the oracle gates.

    Every oracle gate in a circuit has fan-in at most ℓ. The De Morgan gates are unconstrained.

    Instances For
      @[instance_reducible]

      The oracle-gate fan-in bound is decidable for every concrete circuit.

      theorem Cslib.Circuits.Circuit.QueryArityAtMost.mono {n m : ℕ} {c : Circuit Boolean.oracleSignature n m} {ℓ ℓ' : ℕ} (h : c.QueryArityAtMost ℓ) (hℓ : ℓ ≤ ℓ') :

      An oracle-gate fan-in bound holds for every larger bound.

      A fan-in bound on every gate bounds the fan-in of the oracle gates.

      @[simp]

      A pure wiring circuit has no oracle gates.

      @[simp]

      One gate meets an oracle-gate fan-in bound exactly when its operation does.

      Oracle circuits with one output as a model of oracle devices.

      • The size is Circuit.size, which counts every gate, De Morgan or oracle, including negations and constants; the source's Circuit[s] counts gates too [ChenHiraharaOliveiraPichRajgopalSanthanam2020, Section 2.1, p. 12]. A circuit on no inputs needs a gate for its output, so the class at a size bound with S 0 = 0 is empty.
      • The quantity is the number of oracle gates, the cost under OracleOp.queryWeight.
      • The locality is Circuit.QueryArityAtMost, a bound on the fan-in of the oracle gates.
      • The adaptivity is Circuit.depthWith under OracleOp.queryWeight: the largest number of oracle gates on a path to the output. It counts paths that start at a constant or at an oracle gate of fan-in zero as well as paths from inputs, so it is at least the source's adaptivity, which counts paths from inputs; a bound on it implies the source's bound.
      @[reducible, inline]
      abbrev Cslib.Circuits.Boolean.LocalCircuitClass (q ℓ a S : ℕ → ℕ) (Yes No : Language Bool) :

      Local circuit classes [ChenHiraharaOliveiraPichRajgopalSanthanam2020, Section 2.5, Definition 11, p. 13], for promise problems: the promise problem with yes-instances Yes and no-instances No is in [q, ℓ, a]–Circuit[S] when there is one oracle language O such that, for every input length m, some oracle circuit on m inputs with

      • at most S m gates,
      • at most q m oracle gates (quantity), each of fan-in at most ℓ m (locality),
      • at most a m oracle gates on any path to the output (adaptivity), answers true on the yes-instances and false on the no-instances of length m under O. This is OracleModel.LocalClass for circuitModel, whose lemmas (mono, anti, of_two_pow) apply; circuitModel records how the measures compare with the source's.
      theorem Cslib.Circuits.Boolean.LocalCircuitClass.of_two_pow {q ℓ a S : ℕ → ℕ} {Yes No : Language Bool} (O : Language Bool) (hS : 1 ≤ S 0) (hYes : ∀ w ∈ Yes, ∃ (n : ℕ), w.length = 2 ^ n) (hNo : ∀ w ∈ No, ∃ (n : ℕ), w.length = 2 ^ n) (hpow : ∀ (n : ℕ), ∃ (c : Circuit oracleSignature (2 ^ n) 1), c.size ≤ S (2 ^ n) ∧ c.program.cost OracleOp.queryWeight ≤ q (2 ^ n) ∧ c.QueryArityAtMost (ℓ (2 ^ n)) ∧ Circuit.depthWith OracleOp.queryWeight c ≤ a (2 ^ n) ∧ (∀ (x : Fin (2 ^ n) → Bool), List.ofFn x ∈ Yes → c.eval (oracleInterpretation O) x 0 = true) ∧ ∀ (x : Fin (2 ^ n) → Bool), List.ofFn x ∈ No → c.eval (oracleInterpretation O) x 0 = false) :
      LocalCircuitClass q ℓ a S Yes No

      Instances of power-of-two length, for circuits: if every yes- and no-instance has length a power of two, such as the truth tables of a property, a promise problem is in a local circuit class once some oracle O and, at each length 2 ^ n, an oracle circuit within the bounds at 2 ^ n separates the instances of that length, provided 1 ≤ S 0. At the other lengths a circuit with no gates outputs an input, except at length zero, where a constant gate does. The hypothesis 1 ≤ S 0 is necessary: a circuit with no inputs and no gates has no wire for its output (Wire 0 0 is empty), so every circuit on zero inputs has size at least one.