Finite Shannon synthesis #
Choosing ⌊log₂ n⌋ - 1 address bits in the shared-column construction yields a circuit
with at most 27 * 2 ^ n / n gates for every Boolean function on n ≥ 16 inputs.
The natural-number division is applied after multiplying by 27. All gates, including
constants and negations, are counted.
The synthesizer is a computable function of a supplied truth table. This module bounds the resulting circuit's size; it does not certify the synthesizer's running time.
Main definitions #
Cslib.Circuits.Boolean.ShannonSynthesis.synthesize: choose the split and build a circuit.
Main results #
Cslib.Circuits.Boolean.ShannonSynthesis.computes_synthesize: correctness of synthesis.Cslib.Circuits.Boolean.ShannonSynthesis.size_synthesize_le: the finite27 * 2 ^ n / nbound.Cslib.Circuits.Boolean.ShannonSynthesis.exists_circuit: the corresponding existence theorem.
References #
- C. E. Shannon, The Synthesis of Two-Terminal Switching Circuits.
- The parameter choice and finite constant follow MassProduction/ShannonParameters.lean and MassProduction/ShannonSynthesis.lean in S. Schlesinger, Boolean circuit mass production formalization.
Width of the address block in finite Shannon synthesis.
Instances For
Width of the remaining data block.
Instances For
@[simp]
Build a circuit from a truth table, using the chosen address/data split.
Instances For
@[simp]
theorem Cslib.Circuits.Boolean.ShannonSynthesis.eval_synthesize {n : ℕ} (f : BooleanFunction n) (x : BitString n) (i : Fin 1) :
theorem Cslib.Circuits.Boolean.ShannonSynthesis.computes_synthesize {n : ℕ} (f : BooleanFunction n) :
(synthesize f).Computes interpretation (single f)
The synthesized circuit computes the supplied Boolean function.
theorem Cslib.Circuits.Boolean.ShannonSynthesis.size_synthesize_le {n : ℕ} (hn : 16 ≤ n) (f : BooleanFunction n) :
Every gate is counted, including constants and negations.