Documentation

Complexitylib.Models.TuringMachine.Combinators.ForBinaryWork

Binary work-tape loop combinator #

TM.forBinaryWorkTM driverIdx body invokes body once per Boolean cell on a designated work tape and stops at the first blank. The body sees the current bit; the loopback seam advances the driver. This supplies width-driven control for bitwise algorithms without iterating over the represented numeric value.

Main results #

theorem Complexity.TM.ForBinaryWorkLoopSpec.reachesIn {n : } {driverIdx : Fin n} {body : TM n} {bodyTime : } {total count value : } (spec : ForBinaryWorkLoopSpec driverIdx body bodyTime total) (htotal : value + count = total) :
(forBinaryWorkTM driverIdx body).reachesIn (forBinaryWorkLoopTime bodyTime value count) (spec.scanCfg value) spec.doneCfg

Exact remaining execution of a certified binary work-tape loop.

theorem Complexity.TM.ForBinaryWorkLoopSpaceSpec.prefix_withinAuxSpace {n : } {driverIdx : Fin n} {body : TM n} {bodyTime : } {total inputLength spaceBound count value t : } {spec : ForBinaryWorkLoopSpec driverIdx body bodyTime total} (spaceSpec : ForBinaryWorkLoopSpaceSpec spec inputLength spaceBound) {c : Cfg n (forBinaryWorkTM driverIdx body).Q} (htotal : value + count = total) (hreach : (forBinaryWorkTM driverIdx body).reachesIn t (spec.scanCfg value) c) (htime : t forBinaryWorkLoopTime bodyTime value count) :
c.WithinAuxSpace inputLength spaceBound

Every prefix up to the exact remaining runtime of a certified binary-work loop respects its all-reachable auxiliary-space budget.

theorem Complexity.TM.IsTransducer.forBinaryWorkTM {n : } {driverIdx : Fin n} {body : TM n} (hbody : body.IsTransducer) :

Iterating a one-way-output body over a binary work tape remains a transducer.