The witness enumerator's tape layout #
⚠️ Unreviewed by Bolton
Two placements fix where every tape sits, and they have to agree. The pair emitter is
TM.pairInputWorkTM on one work tape — the copy of the real input — wrapped so that it reads the
witness as a virtual input and writes onto a work tape; those wrappers append their tapes, so the
witness lands at index one and the emitted pair at index two. The matrix machine is TM.applyTM
placed by TM.placeWorkTM 3 _, which puts its own k scratch tapes at 3 … k + 2, the input it
reads at k + 3, and the verdict it writes at k + 4.
The emitted pair and the input the matrix machine reads are therefore different tapes — the two
placements cannot be made to share one — and TM.copyToVirtualInputTM moves the pair from the
first to the second, which is exactly the shape TM.retargetInputStartedCfg demands anyway.
Seven registers follow: the counter, the horizon it is compared against, scratch for that comparison, the two tallies the counting loop's state carries, a permanently blank tape to blank slots from, and the unary register that drives the wipe.
Main results #
PolyExists.enumTapes— the tape count, and the named indices into itPolyExists.enumIdx_distinct— the indices are pairwise distinctPolyExists.matrixTapes— the matrix machine's own scratch tapesPolyExists.scratchTargets,PolyExists.scratchTargets_nodup— the tapes the body blanks on its way out
The enumerator's tape count: three for the emitter, the matrix machine's k + 2, and six
registers.
Equations
- Complexity.PolyExists.enumTapes k = 3 + (k + 2) + 7
Instances For
The copy of the real input, which the emitter reads as the pair's first component.
Equations
- Complexity.PolyExists.xIdx k = ⟨0, ⋯⟩
Instances For
The witness, which the emitter reads as the pair's second component.
Equations
- Complexity.PolyExists.wIdx k = ⟨1, ⋯⟩
Instances For
The tape the emitter writes the pair onto.
Equations
- Complexity.PolyExists.y1Idx k = ⟨2, ⋯⟩
Instances For
The tape the matrix machine reads its input from.
Equations
- Complexity.PolyExists.yIdx k = ⟨3 + k, ⋯⟩
Instances For
The matrix machine's own scratch tapes: the block TM.placeWorkTM 3 _ puts them in.
Equations
- Complexity.PolyExists.matrixTapes k = List.filter (fun (j : Fin (Complexity.PolyExists.enumTapes k)) => decide (3 ≤ ↑j ∧ ↑j < 3 + k)) (List.finRange (Complexity.PolyExists.enumTapes k))
Instances For
The tapes one pass of the body leaves dirty, and must blank before the next: the emitted pair, the matrix machine's scratch and its two placed tapes, and the verdict slot.
Equations
Instances For
The scratch block has no repeats, which the wipe requires of its targets.
The named indices are pairwise distinct. Every frame lemma the assembly uses asks for some of these disequalities; this states all of them at once.
The registers and the input copy are outside the scratch block, so the wipe leaves them alone.