Constant words over the Boolean basis #
A word of any width uses two shared constant gates. All output bits select one of those gates; the circuit ignores its input and includes both gates even at zero output width.
Main definitions #
Cslib.Circuits.Boolean.wordConstCircuit: a word of shared Boolean constants.
Main results #
Cslib.Circuits.Boolean.eval_wordConstCircuit: every input gives the specified word.Cslib.Circuits.Boolean.size_wordConstCircuit: the exact gate count is two.Cslib.Circuits.Boolean.depth_wordConstCircuit_le: depth is at most one.
Extracted unchanged from the threshold-circuit construction, preserving its source credit.
@[simp]
theorem Cslib.Circuits.Boolean.eval_wordConstCircuit {n w : ℕ} (y : BitString w) (x : BitString n) :
wordConstCircuit n y evaluates to the constant bit string y on every input.
@[simp]
wordConstCircuit n y uses 2 gates (one false and one true constant gate).
wordConstCircuit n y has depth at most 1.