Unary registers #
A register is a work tape holding a natural number in unary: cells 1..v
hold 1, everything beyond is blank, and the head is parked at cell 1. All
arithmetic in the Cook–Levin reduction emitter (docs/A5-ReductionEmitter.md)
is over registers — the CNF encoding is unary, so no binary arithmetic is
ever needed.
IsReg strengthens Tape.HasUnaryCounter with the cell-0 sentinel and
all-blanks-beyond, making registers literally preserved by parked no-op
actions and stable under the combinator phase transitions.
Main definitions #
TM.Parked— a tape whose head is off▷and which has no spurious▷sTM.IsReg— the register predicate
Main results #
TM.IsReg.parked,TM.IsReg.hasUnaryCounter— bridgesTM.reg_zero_init_bumped— a freshly bumped blank tape isIsReg 0
A tape parked for preservation: head off ▷ (so idleDir stays put and
δ_right_of_start is moot) and no ▷ outside cell 0 (so readBackWrite
writes back the read symbol verbatim). Machines that do not use a tape
keep it parked and literally unchanged.
Equations
- Complexity.TM.Parked t = (1 ≤ t.head ∧ ∀ (j : ℕ), 1 ≤ j → t.cells j ≠ Complexity.Γ.start)
Instances For
A binary prefix has its head past the start marker and no later start cells.
A parked tape is untouched by the no-op action writeAndMove (readBackWrite read) (idleDir read).
Parked tapes pass through combinator phase boundaries unchanged.
Parked input tapes pass through combinator phase boundaries unchanged.
Parked input, work, and output tapes are fixed by a phase transition.
Register. The tape holds v in unary: ▷ at cell 0, 1 at cells
1..v, blank everywhere beyond, head parked at cell 1.
Equations
- Complexity.TM.IsReg v t = (t.head = 1 ∧ t.cells 0 = Complexity.Γ.start ∧ (∀ i < v, t.cells (i + 1) = Complexity.Γ.one) ∧ ∀ (j : ℕ), v + 1 ≤ j → t.cells j = Complexity.Γ.blank)
Instances For
A register is a unary counter (the weaker shape used by the counter subroutines).
Canonical register cells holding v in unary.
Equations
Instances For
The canonical register tape holding v.
Equations
- Complexity.TM.regTape v = { head := 1, cells := Complexity.TM.regCells v }
Instances For
The canonical register tape is parked.