Documentation

Complexitylib.Circuits.Encoding.FixedWidth.Internal

Fixed-width binary circuit descriptions -- proof internals #

theorem Complexity.CircuitCode.FixedWidth.one_le_referenceWidth_internal (inputWidth gateBound : ℕ) :
1 ≤ referenceWidth inputWidth gateBound
theorem Complexity.CircuitCode.FixedWidth.inputWidth_add_gateBound_le_two_pow_referenceWidth_internal (inputWidth gateBound : ℕ) :
inputWidth + gateBound ≤ 2 ^ referenceWidth inputWidth gateBound
theorem Complexity.CircuitCode.FixedWidth.card_description_internal (inputWidth gateBound : ℕ) :
Fintype.card (Description inputWidth gateBound) = (gateBound + 1) * 2 ^ (gateBound * gateSlotWidth inputWidth gateBound)
theorem Complexity.CircuitCode.FixedWidth.Description.gateCountNat_le_gateBound_internal {inputWidth gateBound : ℕ} (description : Description inputWidth gateBound) :
description.gateCountNat ≤ gateBound
theorem Complexity.CircuitCode.FixedWidth.Description.length_toRawCircuit_internal {inputWidth gateBound : ℕ} (description : Description inputWidth gateBound) :
List.length description.toRawCircuit = description.gateCountNat
@[simp]
theorem Complexity.CircuitCode.FixedWidth.Description.getElem_toRawCircuit_internal {inputWidth gateBound : ℕ} (description : Description inputWidth gateBound) (index : Fin (List.length description.toRawCircuit)) :
description.toRawCircuit[↑index] = (description.activeSlot ⟨↑index, ⋯⟩).toRawGate
theorem Complexity.CircuitCode.FixedWidth.Description.wellFormed_toRawCircuit_internal {inputWidth gateBound : ℕ} {description : Description inputWidth gateBound} (hdescription : description.WellFormed) :
RawCircuit.WellFormed inputWidth description.toRawCircuit