Documentation

Complexitylib.Classes.PPoly.Uniform.Unrolling.Serializer.Transition.Next

Numeric schedules for next-configuration atoms #

This module exposes a common natural-number interface for the five branches of nextFormula: state, head, immutable input cell, immutable writable marker, and positive writable cell. Each nontrivial branch reuses the corresponding public transition schedule.

Main results #

@[simp]
theorem Complexity.CircuitUnrolling.Serializer.length_nextHaltedOrSchedule (haltWire available oldWire : ) (nextSchedule : CircuitCode.RawCircuit) :
List.length (nextHaltedOrSchedule haltWire available oldWire nextSchedule) = nextHaltedOrScheduleSize (List.length nextSchedule)

A one-gate old atom plus the halted-or wrapper contributes seven gates beyond the next-value child.

@[simp]
theorem Complexity.CircuitUnrolling.Serializer.length_nextStateFormulaSchedule (caseCount stateCount workCount T configBase choiceWire available stateIndex haltStateIndex : ) (selectedAt choiceAt : Bool) (caseStateIndexAt inputSymbolIndexAt outputSymbolIndexAt : ) (workSymbolIndexAt : ) :
List.length (nextStateFormulaSchedule caseCount stateCount workCount T configBase choiceWire available stateIndex haltStateIndex selectedAt choiceAt caseStateIndexAt inputSymbolIndexAt outputSymbolIndexAt workSymbolIndexAt) = nextStateFormulaScheduleSize caseCount workCount T selectedAt choiceAt

Exact gate count of a state-atom schedule.

@[simp]
theorem Complexity.CircuitUnrolling.Serializer.length_nextHeadFormulaSchedule (caseCount stateCount workCount T configBase choiceWire available tapeIndex target haltStateIndex : ) (selectedAt : Bool) (choiceAt : Bool) (caseStateIndexAt inputSymbolIndexAt outputSymbolIndexAt : ) (workSymbolIndexAt : ) :
List.length (nextHeadFormulaSchedule caseCount stateCount workCount T configBase choiceWire available tapeIndex target haltStateIndex selectedAt choiceAt caseStateIndexAt inputSymbolIndexAt outputSymbolIndexAt workSymbolIndexAt) = nextHeadFormulaScheduleSize caseCount workCount T selectedAt choiceAt

Exact gate count of a head-atom schedule.

@[simp]
theorem Complexity.CircuitUnrolling.Serializer.length_nextCellCopySchedule (stateCount tapeCount T configBase tapeIndex position symbolIndex : ) :
List.length (nextCellCopySchedule stateCount tapeCount T configBase tapeIndex position symbolIndex) = nextCellCopyScheduleSize

Immutable input and writable marker cells emit one copy gate.

@[simp]
theorem Complexity.CircuitUnrolling.Serializer.length_nextWrittenCellFormulaSchedule (caseCount stateCount workCount T configBase choiceWire available tapeIndex position symbolIndex haltStateIndex : ) (selectedAt choiceAt : Bool) (caseStateIndexAt inputSymbolIndexAt outputSymbolIndexAt : ) (workSymbolIndexAt : ) :
List.length (nextWrittenCellFormulaSchedule caseCount stateCount workCount T configBase choiceWire available tapeIndex position symbolIndex haltStateIndex selectedAt choiceAt caseStateIndexAt inputSymbolIndexAt outputSymbolIndexAt workSymbolIndexAt) = nextWrittenCellFormulaScheduleSize caseCount workCount T selectedAt choiceAt

Exact gate count of a positive writable-cell schedule.

@[simp]
theorem Complexity.CircuitUnrolling.Serializer.length_nextFormulaSchedule (caseCount stateCount workCount T configBase choiceWire available atomKind stateIndex tapeIndex position symbolIndex haltStateIndex : ) (selectedAt : Bool) (choiceAt : Bool) (caseStateIndexAt inputSymbolIndexAt outputSymbolIndexAt : ) (workSymbolIndexAt : ) :
List.length (nextFormulaSchedule caseCount stateCount workCount T configBase choiceWire available atomKind stateIndex tapeIndex position symbolIndex haltStateIndex selectedAt choiceAt caseStateIndexAt inputSymbolIndexAt outputSymbolIndexAt workSymbolIndexAt) = nextFormulaScheduleSize caseCount workCount T atomKind selectedAt choiceAt

Exact gate count selected by the common numeric atom-kind interface.

theorem Complexity.CircuitUnrolling.Serializer.compileRaw_nextStateFormula_eq_schedule {k : } (tm : NTM k) (T configBase choiceWire available : ) (state : tm.Q) :

Literal raw schedule for the state branch of nextFormula.

theorem Complexity.CircuitUnrolling.Serializer.compileRaw_nextHeadFormula_eq_schedule {k : } (tm : NTM k) (T configBase choiceWire available : ) (tape : TapeSlot k) (target : Fin (T + 1)) :

Literal raw schedule for the head branch of nextFormula.

theorem Complexity.CircuitUnrolling.Serializer.compileRaw_nextInputCellFormula_eq_schedule {k : } (tm : NTM k) (T configBase choiceWire available : ) (position : Fin (T + 2)) (symbol : Γ) :
BoolFormula.compileRaw available (nextFormula tm T configBase choiceWire (ConfigAtom.cell TapeSlot.input position symbol)) = nextCellCopySchedule (Fintype.card tm.Q) (k + 2) T configBase TapeSlot.input.index position (symbolIndex symbol)

Literal one-gate raw schedule for an immutable input-cell atom.

theorem Complexity.CircuitUnrolling.Serializer.compileRaw_nextWritableMarkerFormula_eq_schedule {k : } (tm : NTM k) (T configBase choiceWire available : ) (tape : WritableSlot k) (position : Fin (T + 2)) (symbol : Γ) (hposition : position = 0) :
BoolFormula.compileRaw available (nextFormula tm T configBase choiceWire (ConfigAtom.cell tape.toTapeSlot position symbol)) = nextCellCopySchedule (Fintype.card tm.Q) (k + 2) T configBase tape.toTapeSlot.index position (symbolIndex symbol)

Literal one-gate raw schedule for an immutable writable marker cell.

theorem Complexity.CircuitUnrolling.Serializer.compileRaw_nextWrittenCellFormula_eq_schedule {k : } (tm : NTM k) (T configBase choiceWire available : ) (tape : WritableSlot k) (position : Fin (T + 2)) (symbol : Γ) (hposition : position 0) :
BoolFormula.compileRaw available (nextFormula tm T configBase choiceWire (ConfigAtom.cell tape.toTapeSlot position symbol)) = nextWrittenCellFormulaSchedule (transitionCases tm).length (Fintype.card tm.Q) k T configBase choiceWire available (↑tape.toTapeSlot.index) (↑position) (↑(symbolIndex symbol)) (nextHaltStateIndex tm) (writtenCellEffectSelectedAt tm tape symbol) (effectCaseChoiceAt tm) (effectCaseStateIndexAt tm) (effectCaseInputSymbolIndexAt tm) (effectCaseOutputSymbolIndexAt tm) (effectCaseWorkSymbolIndexAt tm)

Literal raw schedule for a positive writable-cell atom.

Exact raw compilation order selected through the common numeric atom interface. Machine and atom data occur only in compile-time extractors; every argument of nextFormulaSchedule is natural-number or Boolean data.

theorem Complexity.CircuitUnrolling.Serializer.size_nextFormula_eq_scheduleSize {k : } (tm : NTM k) (T configBase choiceWire : ) (atom : ConfigAtom tm T) :

The syntax-tree size of every next atom equals its selected numeric schedule count.