Documentation

Complexity.Computability.Circuit.Boolean.BinaryCost

Counting the binary gates of De Morgan circuits #

The size of a De Morgan circuit counts every gate. The usual measure for lower bounds charges only the AND and OR gates and lets negations and constants be free Jukna, Section 1.2. It is the cost of a program for binaryCost, and it is at most the size (Program.cost_binaryCost_le).

Main definitions #

Main results #

References #

The binary operations of the De Morgan basis, AND and OR.

Instances For
    theorem Cslib.Circuits.Boolean.Op.IsBinary.val_lt_two {op : Op} (h : op.IsBinary) (s : Fin (signature.Arity op)) :
    ↑s < 2

    The arguments of a binary operation are numbered 0 and 1.

    theorem Cslib.Circuits.Boolean.Op.IsBinary.eq_or_eq {op : Op} (h : op.IsBinary) {s t : Fin (signature.Arity op)} (hst : s ≠ t) (u : Fin (signature.Arity op)) :
    u = s ∨ u = t

    Two different arguments of a binary operation are all of its arguments.

    The cost function charging one for each AND and OR gate and nothing for negations and constants. Its counterparts for the other bases are Monotone.binaryCost, its restriction to the monotone basis (Monotone.binaryCost_toDeMorgan), and Unbounded.andOrCost, which also charges the constants of the unbounded fan-in basis, its AND and OR gates of no arguments.

    Instances For

      The number of binary gates of a program is at most its number of gates.