The enumerator's prologue #
⚠️ Unreviewed by Bolton
Before the loop can start, three tapes have to be filled: a copy of the real input, for the pair emitter to read; the horizon the counter is compared against; and the unary register that drives each pass's wipe.
TM.copyInputToWorkTM's own contract says nothing about the tapes it does not write, and it is
used here beside a dozen that must survive. It does not disturb them: every tape but its target
is written blank and moved by TM.idleDir, so a blank tape comes back blank — which is what
the frame below records, by induction along the run.
Main results #
PolyExists.blankTape_idle— an idled blank tape is unchangedPolyExists.copyInputToWorkTM_blank_frame— the copier leaves every other blank tape blankPolyExists.copyX_hoareTime— the copy stage's contract, frame included
An idled blank tape is unchanged. Writing a blank under the head of a blank tape changes
nothing, and TM.idleDir does not move a head that is off the marker.
One step of the copier leaves a blank tape blank.
The copier leaves every other blank tape blank, which is the frame its own contract does not record.
One step of the copier leaves the real output blank, for the same reason.
The blank tape carries the empty binary prefix.
The input copy, contracted with its frame.
The register subroutines state their contracts with an output accumulator; with nothing emitted that is just the blank tape.
A pinned contract with a blank output is an emit contract with nothing emitted.
A unary register of T ones is the binary numeral 2 ^ T - 1. The two encodings agree
cell for cell, which is what lets the prologue produce the horizon without a doubling loop.
A unary register holding zero is the blank tape.
And so is a counter tape holding zero.
The enumerator's prologue. Measure the input, evaluate the horizon's exponent and the
wipe height on unary registers, bump the exponent — a register of m + 1 ones is the binary
numeral 2 ^ (m + 1) - 1 — and clear the scratch.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The cap the Horner evaluation stays under.
Equations
- Complexity.PolyExists.prologueCap p lx = ((Complexity.TM.polyCoeffs p).sum + 1) * (lx + 1) ^ (Complexity.TM.polyCoeffs p).length
Instances For
The prologue's per-stage budget.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The prologue's running time.
Equations
- Complexity.PolyExists.prologueTime p q lx = 7 * (Complexity.PolyExists.prologueBnd p q lx + 1) + 1
Instances For
The prologue's contract. From the bank the copy stage leaves it lands on the loop's
starting bank: the horizon on PolyExists.nIdx, the wipe height on PolyExists.regIdx, the
input copy where the emitter reads it, and everything else blank.