Boolean-formula raw compiler internals #
This module proves the structural and semantic invariants of the proof-free
formula compiler. Public statements are re-exported by
Complexitylib.Circuits.Encoding.Formula.
Internal exact gate-count theorem for formula compilation.
Internal bound placing the output inside its compiled fragment.
Internal equation identifying the fragment's final wire.
theorem
Complexity.BoolFormula.evalAux?_compileRaw_of_agree_internal
(available : ℕ)
[NeZero available]
(formula : BoolFormula)
(assignment : ℕ → Bool)
(wires : Array Bool)
(hsize : wires.size = available)
(hvars : ∀ i ∈ formula.vars, i < available)
(hagree : ∀ i ∈ formula.vars, wires[i]? = some (assignment i))
:
theorem
Complexity.BoolFormula.evalAux?_compileRaw_internal
(available : ℕ)
[NeZero available]
(formula : BoolFormula)
(assignment : ℕ → Bool)
(wires : Array Bool)
(hsize : wires.size = available)
(hinput : ∀ i < available, wires[i]? = some (assignment i))
(hvars : ∀ i ∈ formula.vars, i < available)
:
Internal semantic correctness theorem for formula fragments.
theorem
Complexity.BoolFormula.topologicallyWellFormed_compileRaw_internal
(available : ℕ)
[NeZero available]
(formula : BoolFormula)
(hvars : ∀ i ∈ formula.vars, i < available)
:
CircuitCode.RawCircuit.TopologicallyWellFormed available (compileRaw available formula)
Internal topological correctness theorem for formula fragments.