Boolean circuits for encoded bounded-arity computations #
A carrier with a left-invertible fixed-width encoding admits Boolean circuit simulation of any circuit whose operations have at most two arguments. Inputs and outputs are packed in wire-major order. The circuit has free Boolean input wires; correctness is required on valid encoded carrier inputs. Malformed codes are not assigned source semantics.
The construction lifts the source operations to whole bit strings, simulates that interpretation in the full binary basis, and bit-blasts with the identity encoding. Carrier homomorphisms supply correctness on the original carrier. This avoids an extra per-input decoding budget.
This module provides an intermediate helper for
CslibFrontier.Computability.Circuit.Boolean.FiniteSimulation, which instantiates the encoding
with BitString.fintypeEncoding to establish the arithmetic-to-Boolean direction of
Arora–Barak, web draft 2007-01-08, Chapter 14 Exercise 1,
printed p. 265/PDF p. 281 without a caller-supplied encoding hypothesis.
Main declarations #
Cslib.Circuits.Circuit.exists_encoded_boolean: intermediate helper constructing a Boolean simulation on valid encoded inputs from a caller-supplied left-invertible encoding.
Intermediate helper for Cslib.Circuits.Circuit.exists_finite_boolean (not the
finite-carrier simulation result itself): given a caller-supplied w-bit encoding enc and left
inverse decode, a circuit whose operations have arity at most two has a Boolean circuit on free
input bits. All encoded outputs are preserved on valid encoded inputs; constants count as gates,
wires are free, and no additive input-size overhead is charged.