Documentation

Complexitylib.Circuits.Encoding.FixedWidth.Lookup.Internal

Fixed-width binary-reference lookup formulas -- proof internals #

theorem Complexity.CircuitCode.FixedWidth.LookupFormula.eval_wordEqual_internal {width : } (word : Fin widthBoolFormula) (value : BitString width) (assignment : Bool) :
BoolFormula.eval assignment (wordEqual word value) = decide (evaluatedWord word assignment = value)
theorem Complexity.CircuitCode.FixedWidth.LookupFormula.eval_select_internal {width count : } (word : Fin widthBoolFormula) (values : Fin countBoolFormula) (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_wordEqual_internal {width : } (word : Fin widthBoolFormula) (value : BitString width) (hword : ∀ (coordinate : Fin width), (word coordinate).size = 1) :
(wordEqual word value).size = 30 * width + 3
theorem Complexity.CircuitCode.FixedWidth.LookupFormula.size_select_internal {width count : } (word : Fin widthBoolFormula) (values : Fin countBoolFormula) (hword : ∀ (coordinate : Fin width), (word coordinate).size = 1) (hvalues : ∀ (index : Fin count), (values index).size = 1) :
(select word values).size = selectSize width count
theorem Complexity.CircuitCode.FixedWidth.LookupFormula.vars_select_lt_internal {width count available : } (word : Fin widthBoolFormula) (values : Fin countBoolFormula) (hword : ∀ (coordinate : Fin width), wire(word coordinate).vars, wire < available) (hvalues : ∀ (index : Fin count), wire(values index).vars, wire < available) (wire : ) :
wire (select word values).varswire < available