Fixed-width binary-reference lookup formulas -- proof internals #
theorem
Complexity.CircuitCode.FixedWidth.LookupFormula.eval_wordEqual_internal
{width : ℕ}
(word : Fin width → BoolFormula)
(value : BitString width)
(assignment : ℕ → Bool)
:
theorem
Complexity.CircuitCode.FixedWidth.LookupFormula.eval_select_internal
{width count : ℕ}
(word : Fin width → BoolFormula)
(values : Fin count → BoolFormula)
(assignment : ℕ → Bool)
(hcount : count ≤ 2 ^ width)
:
BoolFormula.eval assignment (select word values) = if hvalue : (evaluatedWord word assignment).unsignedValue < count then
BoolFormula.eval assignment (values ⟨(evaluatedWord word assignment).unsignedValue, hvalue⟩)
else false
theorem
Complexity.CircuitCode.FixedWidth.LookupFormula.size_select_internal
{width count : ℕ}
(word : Fin width → BoolFormula)
(values : Fin count → BoolFormula)
(hword : ∀ (coordinate : Fin width), (word coordinate).size = 1)
(hvalues : ∀ (index : Fin count), (values index).size = 1)
:
theorem
Complexity.CircuitCode.FixedWidth.LookupFormula.vars_select_lt_internal
{width count available : ℕ}
(word : Fin width → BoolFormula)
(values : Fin count → BoolFormula)
(hword : ∀ (coordinate : Fin width), ∀ wire ∈ (word coordinate).vars, wire < available)
(hvalues : ∀ (index : Fin count), ∀ wire ∈ (values index).vars, wire < available)
(wire : ℕ)
: