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).
Because only binary AND and OR gates have arity two while constants have arity zero and negations
have arity one (Boolean.arity_le_one_add_binaryCost), only binary gates increase the number of
supporting inputs in the backward cone of a frontier
(Program.card_biUnion_wireSupport_le_cost_binaryCost). Every De Morgan circuit with m outputs
therefore depends on at most m + c.program.cost binaryCost inputs
(Circuit.card_inputSupport_le_cost_binaryCost).
Main definitions #
Cslib.Circuits.Boolean.Op.IsBinary: AND and OR, the operations of arity two.Cslib.Circuits.Boolean.binaryCost: the cost function charging one for each AND and OR gate.
Main results #
Cslib.Circuits.Boolean.arity_le_one_add_binaryCost: every De Morgan operation has arity at most1 + binaryCost op.Cslib.Circuits.Program.cost_binaryCost_le: the number of binary gates is at most the size.Cslib.Circuits.Program.cost_binaryCost_eq_iff_forall_isBinary:p.cost binaryCost = giff every line ofpis a binary AND or OR gate.Cslib.Circuits.Program.card_biUnion_wireSupport_le_cost_binaryCost: the number of inputs supporting a frontier of wires is at mostfrontier.card + p.cost binaryCost.Cslib.Circuits.Circuit.card_inputSupport_le_cost_binaryCost,Cslib.Circuits.Circuit.essential_le_cost_binaryCost: a De Morgan circuit withmoutputs has at mostm + c.program.cost binaryCostsupporting (or essential) inputs.Cslib.Circuits.Circuit.cost_binaryCost_eq_size_of_size_le: a one-output De Morgan circuit with allninputs in its support andc.size + 1 ≤ nhasc.program.cost binaryCost = c.size = n - 1and consists solely of binary AND/OR gates.
References #
The binary operations of the De Morgan basis, AND and OR.
Instances For
Decidability of whether a De Morgan operation is binary.
The conjunction operation .and is binary.
The disjunction operation .or is binary.
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
A conjunction gate has binary cost 1.
A disjunction gate has binary cost 1.
A negation gate has binary cost 0.
A constant gate has binary cost 0.
Every De Morgan operation has binary cost at most 1.
The binary cost of an operation is 1 if it is binary and 0 otherwise.
Every operation in the De Morgan basis has arity at most 1 + binaryCost op: constants have
arity 0, negations have arity 1, and binary AND/OR gates have arity 2 = 1 + 1.
The number of binary gates of a program is at most its number of gates.
In a De Morgan program, the number of inputs supporting a frontier of wires is at most the size of the frontier plus the number of binary (AND/OR) gates in the program.
A De Morgan circuit with m outputs has at most m + c.program.cost binaryCost supporting
inputs, since only binary AND and OR gates increase the number of reachable inputs.
If a De Morgan circuit computes target and every coordinate in selected is essential to
target, then selected.card ≤ m + c.program.cost binaryCost.
A De Morgan program has binaryCost equal to its gate count g if and only if every gate in
the program is a binary AND or OR gate.
In a one-output De Morgan circuit whose input support has size at least n, if c.size + 1 ≤ n
then c has size n - 1, binary cost n - 1, and every gate of c is a binary AND or OR gate.