Documentation

Complexitylib.Circuits.Encoding.FixedWidth.Validity

Fixed-width description validity formulas #

This module exposes the exact semantics, tree size, and variable support of the structural-validity formula for bounded fixed-width circuit descriptions.

@[simp]
theorem Complexity.CircuitCode.FixedWidth.Description.ValidityFormula.eval_wellFormed (inputWidth gateBound : ) (code : BitString (codeWidth inputWidth gateBound)) :
BoolFormula.eval code.toTotal (wellFormed inputWidth gateBound) = decide (EncodedWellFormed code)

The validity formula accepts exactly codes that decode to a structurally valid fixed-width circuit description.

@[simp]
theorem Complexity.CircuitCode.FixedWidth.Description.ValidityFormula.size_wellFormed (inputWidth gateBound : ) :
(wellFormed inputWidth gateBound).size = wellFormedSize inputWidth gateBound

Exact tree size of the complete fixed-width validity formula.

theorem Complexity.CircuitCode.FixedWidth.Description.ValidityFormula.vars_wellFormed_lt (inputWidth gateBound wire : ) :
wire (wellFormed inputWidth gateBound).varswire < codeWidth inputWidth gateBound

Every variable in the validity formula addresses one bit of the incoming fixed-width description code.

@[simp]
theorem Complexity.CircuitCode.FixedWidth.Description.ValidityFormula.length_compileRaw (inputWidth gateBound : ) :
List.length (compileRaw inputWidth gateBound) = wellFormedSize inputWidth gateBound

Formula compilation preserves the exact validity-formula size.

theorem Complexity.CircuitCode.FixedWidth.Description.ValidityFormula.compileRaw_wellFormed (inputWidth gateBound : ) :
RawCircuit.WellFormed (codeWidth inputWidth gateBound) (compileRaw inputWidth gateBound)

The compiled validity formula is a valid single-output raw circuit.

@[simp]
theorem Complexity.CircuitCode.FixedWidth.Description.ValidityFormula.eval?_compileRaw (inputWidth gateBound : ) (code : BitString (codeWidth inputWidth gateBound)) :
(compileRaw inputWidth gateBound).eval? code.toList = some (decide (EncodedWellFormed code))

Raw evaluation accepts exactly structurally valid fixed-width codes.

Typed fan-in-two circuit deciding structural validity of a fixed-width circuit description code.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    @[simp]

    Exact size of the typed fixed-width description-validity circuit.

    @[simp]

    The typed circuit accepts exactly structurally valid fixed-width codes.