Shared Boolean minterms #
The circuit computes the indicator of every assignment to its input bits. Each stage retains the preceding minterms and extends them by one new bit. Sharing the preceding table gives a linear bound in the number of assignments, including all constants and negations.
Main definitions #
Cslib.Circuits.Boolean.mintermCircuit: all assignment indicators inBitString.equivFinorder.
Main results #
Cslib.Circuits.Boolean.eval_mintermCircuit: the output is the indicator of the input's index.Cslib.Circuits.Boolean.size_mintermCircuit_add_three_le: at most4 * 2 ^ n - 3gates.
References #
- Adapted from MassProduction/ShannonCircuit.lean in S. Schlesinger, Boolean circuit mass production formalization.
@[simp]
Each output is true precisely for the assignment bearing that index.
All minterms together use at most 4 * 2 ^ n - 3 gates, counting constants too.