Documentation

Complexitylib.Models.TuringMachine.Subroutines.BinaryRippleSub.Internal.Rewind

Linear-time canonical binary subtraction -- operand rewind internals #

The subtraction core already returns its result to cell one. This module packages the two remaining operand rewinds into one exact framed contract.

Canonical parked tape containing the supplied little-endian binary digits.

Equations
Instances For
    theorem Complexity.TM.binaryRippleSubRewindTM_hoareTime_frame_internal {n : } (lhsIdx rhsIdx resultIdx : Fin n) (hdistinct : BinaryRippleSubDistinct lhsIdx rhsIdx resultIdx) (lhsBits rhsBits : List Bool) (lhsBound rhsBound : ) (inp₀ : Tape) (work₀ : Fin nTape) (out₀ : Tape) (hlhs : (work₀ lhsIdx).HasBinaryContent lhsBits) (hlhsStart : (work₀ lhsIdx).cells 0 = Γ.start) (hlhsHead : 1 (work₀ lhsIdx).head (work₀ lhsIdx).head lhsBound) (hrhs : (work₀ rhsIdx).HasBinaryContent rhsBits) (hrhsStart : (work₀ rhsIdx).cells 0 = Γ.start) (hrhsHead : 1 (work₀ rhsIdx).head (work₀ rhsIdx).head rhsBound) (hresult : Parked (work₀ resultIdx)) (hinput : Parked inp₀) (hother : ∀ (i : Fin n), i lhsIdxi rhsIdxi resultIdxParked (work₀ i)) (houtput : Parked out₀) :
    ((rewindWorkTM lhsIdx).seqTM (rewindWorkTM rhsIdx)).HoareTime (fun (inp : Tape) (work : Fin nTape) (out : Tape) => inp = inp₀ work = work₀ out = out₀) (fun (inp : Tape) (work : Fin nTape) (out : Tape) => inp = inp₀ work lhsIdx = binaryRippleSubCanonicalTape lhsBits work rhsIdx = binaryRippleSubCanonicalTape rhsBits work resultIdx = work₀ resultIdx (∀ (i : Fin n), i lhsIdxi rhsIdxi resultIdxwork i = work₀ i) out = out₀) (lhsBound + rhsBound + 5)