Documentation

Complexitylib.Models.TuringMachine.Experimental.BinaryRoutine.Control.Internal

Proof-carrying binary routine control -- proof internals #

theorem Complexity.TM.BinaryForSegmentSpec.reachesIn_internal {n : } {body : TM n} {counterIdx limitIdx : Fin n} {bodyTime : } {startValue limitValue : } (spec : body.BinaryForSegmentSpec counterIdx limitIdx bodyTime startValue limitValue) (count value : ) :
startValue valuevalue + count = limitValuetimebinaryForLoopTime bodyTime limitValue value count, (body.binaryForTM counterIdx limitIdx).reachesIn time (spec.scanCfg value) spec.doneCfg

A bounded segment certificate supplies a terminating run within the standard recursive count-up-loop bound.

theorem Complexity.TM.BinaryForSegmentSpaceSpec.prefix_withinAuxSpace_internal {n : } {body : TM n} {counterIdx limitIdx : Fin n} {bodyTime : } {startValue limitValue inputLength spaceBound : } {spec : body.BinaryForSegmentSpec counterIdx limitIdx bodyTime startValue limitValue} (spaceSpec : BinaryForSegmentSpaceSpec spec inputLength spaceBound) (count value time : ) (cfg : Cfg n (body.binaryForTM counterIdx limitIdx).Q) :
startValue valuevalue + count = limitValue(body.binaryForTM counterIdx limitIdx).reachesIn time (spec.scanCfg value) cfgtime binaryForLoopTime bodyTime limitValue value countcfg.WithinAuxSpace inputLength spaceBound

Phase-local space obligations cover every prefix of a bounded loop segment, even when an iteration terminates strictly before its time bound.

theorem Complexity.BinaryRoutine.Sound.branchZero_internal {n : } {onZero onPositive : BinaryRoutine n} (hzeroSound : onZero.Sound) (hpositiveSound : onPositive.Sound) (idx : Fin n) :
(branchZero idx onZero onPositive).Sound
theorem Complexity.BinaryRoutine.Sound.binaryFor_internal {n : } {body : BinaryRoutine n} (hbodySound : body.Sound) (counterIdx limitIdx : Fin n) :
(body.binaryFor counterIdx limitIdx).Sound