Binary work-tape equality — definitions #
TM.binaryEqTM compares two canonical binary strings and writes the Boolean
result on a third work tape. Unlike the legacy output-oriented comparator, it
preserves the public output tape and every unrelated work tape.
The binary comparator scans until the first mismatch or simultaneous termination, then halts immediately.
- scan : BinaryEqPhase
- done : BinaryEqPhase
Instances For
@[implicit_reducible]
@[implicit_reducible]
Equations
- Complexity.TM.instFintypeBinaryEqPhase = { elems := {Complexity.TM.BinaryEqPhase.scan, Complexity.TM.BinaryEqPhase.done}, complete := ⋯ }
Compare canonical binary strings on lhsIdx and rhsIdx, writing one to
resultIdx exactly when they agree. The compared heads advance together over
matching bits; all tape contents are preserved except the single result cell.
Equations
- One or more equations did not get rendered due to their size.