Documentation

Complexitylib.Classes.PPoly.Uniform.Unrolling.Serializer.Finalization

Numeric finalization schedule for direct tableau serialization #

This module exposes a natural-number acceptance gate, exact padding and terminal-copy phase laws, and the complete literal decomposition of every normalized positive padded direct-unrolling circuit. Together with the numeric initialization schedule and canonical transition fragments, the decomposition specifies the raw gate stream without run-time configuration atoms or formulas.

Main results #

theorem Complexity.CircuitUnrolling.Serializer.numericAcceptanceGate_eq_acceptanceGate {k : } (tm : TM k) (T finalConfigBase : ) :
numericAcceptanceGate (Fintype.card tm.Q) (stateIndex tm.toNTM tm.qhalt) (k + 2) T finalConfigBase = acceptanceGate tm.toNTM T finalConfigBase

The numeric state/output-cell addresses literally produce the existing acceptance gate for the fixed deterministic machine.

@[simp]
theorem Complexity.CircuitUnrolling.Serializer.length_directPaddingSchedule (originalRawGateCount closedBound : ) :
List.length (directPaddingSchedule originalRawGateCount closedBound) = closedBound - originalRawGateCount

The numeric padding phase contains exactly the closed-bound shortfall.

theorem Complexity.CircuitUnrolling.Serializer.getElem_directPaddingSchedule (originalRawGateCount closedBound : ) (index : Fin (closedBound - originalRawGateCount)) :
(directPaddingSchedule originalRawGateCount closedBound)[index] = CircuitCode.RawGate.constant 0 false

Every index in the numeric padding phase emits a dead constant-false gate.

@[simp]
theorem Complexity.CircuitUnrolling.Serializer.length_directFinalizationSuffix (n originalRawGateCount closedBound : ) :
List.length (directFinalizationSuffix n originalRawGateCount closedBound) = closedBound - originalRawGateCount + 1

Padding followed by the terminal copy has shortfall-plus-one gates.

theorem Complexity.CircuitUnrolling.Serializer.getElem_directFinalizationSuffix_padding (n originalRawGateCount closedBound : ) (index : Fin (closedBound - originalRawGateCount)) :
(directFinalizationSuffix n originalRawGateCount closedBound)[index] = CircuitCode.RawGate.constant 0 false

Indices before the finalization boundary are exactly the padding phase.

theorem Complexity.CircuitUnrolling.Serializer.getElem_directFinalizationSuffix_terminal (n originalRawGateCount closedBound : ) :
(directFinalizationSuffix n originalRawGateCount closedBound)[closedBound - originalRawGateCount] = directTerminalCopyGate n originalRawGateCount

The gate at the finalization boundary is the terminal original-output copy.

@[simp]

Every canonical deterministic transition fragment has the fixed numeric layer size.

@[simp]

The unpadded raw tableau has one initial block, T equal transition fragments, and one acceptance gate.

A normalized positive padded direct tableau is literally numeric initialization, canonical transition fragments, numeric acceptance, dead padding, and one terminal copy of the original acceptance output.