Documentation

LeanPool.CircuitComplexity.AON.Defs

AND/OR/NOT Basis — Definitions #

This module defines the AND/OR operations and various basis configurations used throughout the circuit complexity library.

Main definitions #

Operations in an AND/OR basis. Negation is handled by per-input flags on gates, so only AND and OR need explicit representation.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[implicit_reducible]
      Equations

      Evaluate an AND or OR operation on n input bits by folding. AND folds with && starting from true; OR folds with || from false.

      Equations
      Instances For

        AND/OR basis with unbounded fan-in. Negation is free (per-input flags on gates).

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          AND/OR basis with fan-in bounded by k. Negation is free (per-input flags on gates).

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Fan-in-2 AND/OR basis. Every gate has exactly 2 inputs. Negation is free (per-input flags on gates). This is the basis used in the Shannon and Schnorr lower bound theorems.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Every gate over Basis.andOr2 has fan-in exactly 2.

              theorem CircuitComplexity.AONOp.eval_two_and (inputs : BitString 2) :
              and.eval 2 inputs = (inputs 0 && inputs 1)

              A fan-in-2 AND gate computes the conjunction of its two inputs.

              theorem CircuitComplexity.AONOp.eval_two_or (inputs : BitString 2) :
              or.eval 2 inputs = (inputs 0 || inputs 1)

              A fan-in-2 OR gate computes the disjunction of its two inputs.