AND/OR/NOT Basis — Definitions #
This module defines the AND/OR operations and various basis configurations used throughout the circuit complexity library.
Main definitions #
AndOrOp— AND/OR operations (negation is free via per-input gate flags)AndOrOp.eval— fold-based evaluation of AND/OR onninput bitsBasis.unboundedAndOr— unbounded fan-in AND/OR basisBasis.boundedAndOr— fan-in bounded bykAND/OR basisBasis.andOr2— fan-in exactly 2 AND/OR basis (used in Shannon/Schnorr bounds)
Equations
- Complexity.instReprAndOrOp.repr Complexity.AndOrOp.and prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Complexity.AndOrOp.and")).group prec✝
- Complexity.instReprAndOrOp.repr Complexity.AndOrOp.or prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Complexity.AndOrOp.or")).group prec✝
Instances For
@[implicit_reducible]
Equations
- Complexity.instReprAndOrOp = { reprPrec := Complexity.instReprAndOrOp.repr }
@[implicit_reducible]
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.