Documentation

Complexitylib.Circuits.AndOrMod.Defs

The AND/OR/MOD_m basis -- definitions #

This module defines the unbounded-fan-in basis of AND, OR, and MOD_m gates over which the classes AC^i[m] are built. A MOD_m gate outputs true exactly when the number of its true inputs is not divisible by m. Because negation is a free per-input flag, the complementary convention (true exactly when the count is divisible by m) would define the same circuit classes: a complemented MOD_m gate feeds its consumers through negated edges.

Main definitions #

Operations of the AND/OR/MOD_m basis. Negation is handled by per-input flags on gates.

  • andOr (op : AndOrOp) : AndOrModOp

    An unbounded AND or OR operation.

  • mod : AndOrModOp

    The MOD_m operation: true iff the number of true inputs is not divisible by m.

Instances For
    Equations
    Instances For

      Evaluate an AND/OR/MOD_m operation on n input bits. AND and OR use AndOrOp.eval; MOD_m outputs true exactly when the number of true inputs is not divisible by m.

      Equations
      Instances For

        The basis of unbounded-fan-in AND, OR, and MOD_m gates. Negation is free (per-input flags on gates).

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

          Every unbounded AND/OR gate is an AND/OR/MOD_m gate with the same semantics.

          Equations
          Instances For