Fixed-width multiplexers #
This module exposes a fan-in-two circuit selecting one of two fixed-width payloads. The control bit chooses the left payload when true and the right payload when false. The construction has exactly three gates per payload bit.
@[simp]
theorem
Complexity.Circuit.eval_multiplexer
(width : ℕ)
[NeZero width]
(control : Bool)
(left right : BitString width)
:
(multiplexer width).eval (BitString.multiplexerInput control left right) = if control = true then left else right
The multiplexer selects the left payload exactly when its control is true.
@[simp]
A width-bit multiplexer has exactly three gates per payload bit.