Documentation

Complexitylib.Models.TuringMachine.Experimental.Routine.Defs

Experimental first-order Turing-machine routines — definitions #

This module provides a deliberately small authoring layer over the existing executable Turing-machine combinators. A routine is either a call to a concrete machine, sequential composition, or a read-only-input loop. Routine.lower compiles the syntax structurally through TM.seqTM and TM.forInputTM, so the concrete TM remains the semantic and resource-accounting ground truth.

Routine.TransducerSafe is an explicit certificate that every called machine obeys the one-way-output discipline. Its name deliberately does not suggest input preservation, termination, or resource safety.

An experimental first-order routine assembled from concrete machine calls and existing machine combinators.

  • call {n : } (machine : TM n) : Routine n

    Invoke one concrete machine.

  • seq {n : } (first second : Routine n) : Routine n

    Run two routines sequentially on the same named tapes.

  • forInput {n : } (body : Routine n) : Routine n

    Run a routine once per Boolean input symbol, subject to the body's input-preservation contract at the proof layer.

Instances For

    Compile a first-order routine to the concrete Turing-machine model using the existing executable combinators.

    Equations
    Instances For

      Proof-carrying one-way-output safety for routines. Leaf calls expose the concrete TM.IsTransducer obligation; composition certificates are structural.

      Instances For