Documentation

Complexity.Computability.Circuit.Boolean.Unbounded

The Boolean basis with unbounded fan-in #

The basis of AC⁰: negation, and conjunctions and disjunctions of any number of arguments. Circuits and formulas over this basis of constant depth are the setting of Håstad's lower bound for parity. The conjunction and the disjunction of no arguments are the constants true and false.

Adding one gate of every arity, computing a given family of Boolean functions g, gives the bases of TC⁰ (majority gates) and AC⁰[q] (MOD_q gates): extSignature and extInterpretation g, into which the unbounded fan-in basis maps by toExt.

Main definitions #

Main results #

Negation, and conjunction and disjunction of m arguments for every m.

  • not : Op

    Negation.

  • and (m : ℕ) : Op

    Conjunction of m arguments.

  • or (m : ℕ) : Op

    Disjunction of m arguments.

Instances For
    Instances For
      @[reducible, inline]

      The arity of an operation.

      Instances For
        @[reducible, inline]

        The signature of negation and of conjunction and disjunction of unbounded fan-in. It is reducible, so that case analysis on its operations sees their arities.

        Instances For

          The Boolean meaning of the operations.

          Instances For
            @[simp]
            @[simp]
            theorem Cslib.Circuits.Boolean.Unbounded.interpretation_of_op_eq_not {n g : ℕ} {l : Line signature n g} (h : l.op = Op.not) (v : Wire n g → Bool) :
            (interpretation l.op fun (a : Fin (signature.Arity l.op)) => v (l.wires a)) = !v (l.wires ⟨0, ⋯⟩)

            A negation gate negates its argument.

            theorem Cslib.Circuits.Boolean.Unbounded.interpretation_of_op_eq_and {n g : ℕ} {l : Line signature n g} {m : ℕ} (h : l.op = Op.and m) (v : Wire n g → Bool) :
            (interpretation l.op fun (a : Fin (signature.Arity l.op)) => v (l.wires a)) = true ↔ ∀ (a : Fin (signature.Arity l.op)), v (l.wires a) = true

            A conjunction gate is true when all its arguments are.

            theorem Cslib.Circuits.Boolean.Unbounded.interpretation_of_op_eq_or {n g : ℕ} {l : Line signature n g} {m : ℕ} (h : l.op = Op.or m) (v : Wire n g → Bool) :
            (interpretation l.op fun (a : Fin (signature.Arity l.op)) => v (l.wires a)) = true ↔ ∃ (a : Fin (signature.Arity l.op)), v (l.wires a) = true

            A disjunction gate is true when one of its arguments is.

            The cost of an operation in the AND/OR depth: negations are free. With these costs, Circuit.depthWith is the largest number of conjunctions and disjunctions on a path, the usual depth of AC⁰ circuits, in which negations sit at the inputs.

            This is the counterpart of Boolean.binaryCost and Monotone.binaryCost for the bases of fan-in two, which charge one for AND and OR and nothing for negations and constants. It is not their transport along deMorganToUnbounded: this basis has no constants, and the De Morgan constants become the conjunction and the disjunction of no arguments, which cost one here.

            Instances For

              Conjunctions and disjunctions cost one in the AND/OR depth.

              The AND/OR cost of a program is its number of conjunctions and disjunctions.

              The operations of the unbounded fan-in basis, and one extra gate of every arity.

              • ac (op : Op) : ExtOp

                An operation of the unbounded fan-in basis.

              • gate (m : ℕ) : ExtOp

                The extra gate of m arguments.

              Instances For
                @[reducible, inline]

                The arity of an operation of the extended basis.

                Instances For
                  @[reducible, inline]

                  The signature of the unbounded fan-in basis with one extra gate of every arity. It is reducible, so that case analysis on its operations sees their arities.

                  Instances For

                    The Boolean meaning of the extended basis, with the extra gate of m arguments computing g m.

                    Instances For

                      The unbounded fan-in basis inside its extension.

                      Instances For

                        The operations of the De Morgan basis as operations of the unbounded fan-in basis: the constants as the conjunction and disjunction of nothing.

                        Instances For

                          The De Morgan basis inside the unbounded fan-in basis.

                          Instances For