Shannon synthesis with a shared column library #
Split the inputs into a short address block and a data block. Build both tables of minterms, then every Boolean function of the address block. For each data assignment, select its column of the supplied truth table, conjoin it with that assignment's minterm, and disjoin the rows.
The construction uses native CSLib circuits and the existing balanced Boolean formulas. Its
finite gate bound counts constants and negations, as well as binary gates. The companion
ShannonSynthesis module chooses the address width to obtain a uniform 27 * 2 ^ n / n bound.
Main definitions #
Cslib.Circuits.Boolean.ShannonSynthesis.columnFormula,Cslib.Circuits.Boolean.ShannonSynthesis.columnLibrary: disjunction formula for a bit pattern and circuit computing all disjunctions of an address minterm table.Cslib.Circuits.Boolean.ShannonSynthesis.column,Cslib.Circuits.Boolean.ShannonSynthesis.rowFormula,Cslib.Circuits.Boolean.ShannonSynthesis.outputFormula: truth-table column index, single-row conjunction formula, and final disjunction of rows.Cslib.Circuits.Boolean.ShannonSynthesis.splitMinterms,Cslib.Circuits.Boolean.ShannonSynthesis.libraryAndData,Cslib.Circuits.Boolean.ShannonSynthesis.circuit: block minterm tables, address library paired with data minterms, and synthesized circuit on split inputs.Cslib.Circuits.Boolean.ShannonSynthesis.bound: the finite construction budget.
Main results #
Cslib.Circuits.Boolean.ShannonSynthesis.eval_circuit: correctness of the synthesized circuit.Cslib.Circuits.Boolean.ShannonSynthesis.size_circuit_le: the complete finite gate ledger.
References #
- C. E. Shannon, The Synthesis of Two-Terminal Switching Circuits.
- Adapted from MassProduction/ShannonCircuit.lean in S. Schlesinger, Boolean circuit mass production formalization.
columnFormula pattern evaluates to true on x if and only if some coordinate i has both
pattern i = true and x i = true.
A nonempty ambient table bounds even the empty disjunction's constant gate.
Evaluating columnLibrary k on the minterm indicators of x yields at output p the value of
the pth Boolean function at the index of x.
columnLibrary k has size at most 2 ^ (2 ^ k) * 2 ^ k.
The truth-table column at one data assignment, indexed as an address-value bit string.
Instances For
outputFormula f has size at most 2 * 2 ^ d.
Synthesize a Boolean function from shared minterms, address columns and row selection.
Instances For
The selected row and address column reconstruct the original input.
The complete gate budget, before choosing the split.
Instances For
Shared minterms, shared columns and the final row disjunction account for every gate.