Conversion between raw circuits and fixed-width descriptions -- internals #
theorem
Complexity.CircuitCode.FixedWidth.GateSlot.toList_referenceBits_internal
(width value : ℕ)
:
theorem
Complexity.CircuitCode.FixedWidth.GateSlot.referenceBits_fromBitsLE_internal
{width : ℕ}
(bits : BitString width)
:
theorem
Complexity.CircuitCode.FixedWidth.GateSlot.input0Value_ofRawGate_internal
(width : ℕ)
(gate : RawGate)
:
theorem
Complexity.CircuitCode.FixedWidth.GateSlot.input1Value_ofRawGate_internal
(width : ℕ)
(gate : RawGate)
:
@[simp]
theorem
Complexity.CircuitCode.FixedWidth.Description.gateCountNat_ofRawCircuit_internal
{inputWidth gateBound : ℕ}
(circuit : RawCircuit)
(hbound : List.length circuit ≤ gateBound)
:
@[simp]
theorem
Complexity.CircuitCode.FixedWidth.Description.slot_ofRawCircuit_of_lt_internal
{inputWidth gateBound : ℕ}
(circuit : RawCircuit)
(hbound : List.length circuit ≤ gateBound)
(index : Fin gateBound)
(hindex : ↑index < List.length circuit)
:
(ofRawCircuit circuit hbound).slots index = GateSlot.ofRawGate (referenceWidth inputWidth gateBound) circuit[↑index]
@[simp]
theorem
Complexity.CircuitCode.FixedWidth.Description.slot_ofRawCircuit_of_le_internal
{inputWidth gateBound : ℕ}
(circuit : RawCircuit)
(hbound : List.length circuit ≤ gateBound)
(index : Fin gateBound)
(hindex : List.length circuit ≤ ↑index)
:
theorem
Complexity.CircuitCode.FixedWidth.Description.toRawCircuit_ofRawCircuit_internal
{inputWidth gateBound : ℕ}
{circuit : RawCircuit}
(htopological : RawCircuit.TopologicallyWellFormed inputWidth circuit)
(hbound : List.length circuit ≤ gateBound)
:
theorem
Complexity.CircuitCode.FixedWidth.Description.ofRawCircuit_wellFormed_internal
{inputWidth gateBound : ℕ}
{circuit : RawCircuit}
(hcircuit : RawCircuit.WellFormed inputWidth circuit)
(hbound : List.length circuit ≤ gateBound)
:
(ofRawCircuit circuit hbound).WellFormed
theorem
Complexity.CircuitCode.FixedWidth.Description.ofRawCircuit_toRawCircuit_internal
{inputWidth gateBound : ℕ}
{description : Description inputWidth gateBound}
(hcanonical : description.CanonicallyPadded)
:
Internal exact equivalence between valid fixed descriptions and bounded raw circuits.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Complexity.CircuitCode.FixedWidth.wellFormedEquiv_apply_val_internal
{inputWidth gateBound : ℕ}
(description : ValidDescription inputWidth gateBound)
:
theorem
Complexity.CircuitCode.FixedWidth.wellFormedEquiv_symm_val_internal
{inputWidth gateBound : ℕ}
(circuit : BoundedRawCircuit inputWidth gateBound)
:
↑((wellFormedEquivInternal inputWidth gateBound).symm circuit) = Description.ofRawCircuit ↑circuit ⋯