Documentation

Complexity.Computability.Machines.Turing.MultiTape.Internal.CodecWordMachines

Shared codec word machines #

The original head and emptiness transducers, moved unchanged from Encodings.Basic.

Transducers for the word operations #

Emits a word determined by its input's first symbol, if any, and by drop: [true] followed by the input (drop = none), the input without its first symbol (drop = some false), or just the first symbol (drop = some true).

Instances For
    theorem Turing.MultiTapeTM.Encodings.headT_step (drop : Option Bool) (x✝ x✝¹ : Bool) :
    (headT drop).step x✝ x✝¹ = match x✝, x✝¹ with | false, b => (true, match drop with | none => [true, b] | some false => [] | some true => [b]) | true, b => (true, match drop with | none => [b] | some false => [b] | some true => [])
    theorem Turing.MultiTapeTM.Encodings.headT_final (drop : Option Bool) (x✝ : Bool) :
    (headT drop).final x✝ = match x✝ with | false => match drop with | none => [true] | x => [] | true => []

    headT (some false) drops the first symbol.

    headT (some true) keeps just the first symbol.

    Emits [true] on the empty word and [false] on every other word.

    Instances For

      isEmptyT emits the emptiness test of its input.