Documentation

Complexitylib.Models.TuringMachine.Subroutines.PairValidate.Internal

Pair-encoding validator — proof internals #

The finite-state fold is related to unpair?, then the generic scanner correctness theorem supplies the executable machine proof and exact time bound.

The finite-state pair validator decides all well-formed pair encodings in the generic scanner's exact n + 2 time bound.

theorem Complexity.TM.pairValidateTM_lift_hoareTime_internal (workTapes : ) (bits : List Bool) :
(pairValidateTM.liftTM workTapes).HoareTime (fun (inp : Tape) (work : Fin (0 + workTapes)Tape) (out : Tape) => inp = Tape.init (List.map Γ.ofBool bits) (work = fun (x : Fin (0 + workTapes)) => Tape.init []) out = Tape.init []) (fun (inp : Tape) (work : Fin (0 + workTapes)Tape) (out : Tape) => AllTapesWF inp work out inp.cells = (Tape.init (List.map Γ.ofBool bits)).cells inp.head bits.length + 2 (∀ (i : Fin (0 + workTapes)), work i = (Tape.init []).move Dir3.right) out.head bits.length + 2 (bits validPairEncodingout.cells 1 = Γ.one) (bitsvalidPairEncodingout.cells 1 = Γ.zero)) (bits.length + 2)

Frame-rich initialized specification for the lifted validator.