Documentation

Complexitylib.Interop.Mathlib.TM0.Guard.Defs

Validating a finite Mathlib machine's input #

A DFA scans the binary input without changing it. Accepted inputs are rewound and passed to the source machine. Rejected inputs halt at the first blank, so their complete right-of-head output is empty.

Control for input validation, rewinding, and source execution.

  • scan {σ Q : Type} : σ → GuardState σ Q

    Scan the input using a DFA state.

  • rewind {σ Q : Type} : GuardState σ Q

    Return to the blank preceding the input.

  • run {σ Q : Type} : Q → GuardState σ Q

    Execute a source state.

Instances For
    @[reducible, inline]

    A DFA check followed by the original machine on accepted inputs.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For