Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Counting.ChoiceTable

Parsimonious binary replay of list-choice machines #

A transition occurrence is selected by a fixed-width binary block. The native input and work tapes remain still while the block is read; its last bit performs the selected native action. Out-of-range indices reject. After the original machine halts, only zero bits are permitted. The finite control tracks the original output until the first original halt, so a running output prefix is never accepted. Equal transition occurrences remain separate binary codes.

Main definitions #

Main results #

The finite scanner remembers one unfinished binary index and the original output track.

  • original : Option State

    The original control, with none denoting canonical terminal padding.

  • Empty, accepting, or other original output.

  • cursor : Fin width

    The number of digits already read in this block.

  • value : Fin (2 ^ width)

    The binary prefix.

Instances For
    @[instance_reducible]
    instance Turing.MultiTapeCTM.CountingChoice.instFintypeScanState {width✝ : ℕ} {State✝ : Type} [Fintype State✝] :
    Fintype (ScanState width✝ State✝)
    def Turing.MultiTapeCTM.CountingChoice.table {k : ℕ} {State : Type} {width : ℕ} (hw : 0 < width) (machine : MultiTapeCTM k Bool State) :
    MultiTapePTM k Bool (ScanState width State)

    The binary table preserves each list occurrence and rejects noncanonical terminal padding.

    theorem Turing.MultiTapeCTM.CountingChoice.acceptCount_table {k : ℕ} {State : Type} {width : ℕ} (hw : 0 < width) (machine : MultiTapeCTM k Bool State) (input : List Bool) (hbound : ∀ (cfg : Cfg k Bool State input), (machine.actions cfg).length ≤ 2 ^ width) (count : ℕ) :
    (table hw machine).acceptCount input (count * width) = machine.acceptCount count (Cfg.init machine.initial input)

    Each occurrence-labelled terminal accepting branch corresponds to exactly one binary word. Repeated actions retain their multiplicity, while early halts have a unique zero continuation.

    theorem Turing.MultiTapeCTM.CountingChoice.acceptCount_table_div {k : ℕ} {State : Type} {width : ℕ} (hw : 0 < width) (machine : MultiTapeCTM k Bool State) (input : List Bool) (hbound : ∀ (cfg : Cfg k Bool State input), (machine.actions cfg).length ≤ 2 ^ width) (horizon : ℕ) :
    (table hw machine).acceptCount input horizon = machine.acceptCount (horizon / width) (Cfg.init machine.initial input)

    At every horizon, complete binary blocks count native terminal branches; the remaining partial block has a unique accepting all-zero continuation after a native halt.

    theorem Turing.MultiTapeCTM.CountingChoice.acceptCount_table_of_halts {k : ℕ} {State : Type} {width : ℕ} (hw : 0 < width) (machine : MultiTapeCTM k Bool State) (input : List Bool) (hbound : ∀ (cfg : Cfg k Bool State input), (machine.actions cfg).length ≤ 2 ^ width) {time horizon : ℕ} (hhalt : machine.HaltsWithin time (Cfg.init machine.initial input)) (hle : time * width ≤ horizon) :
    (table hw machine).acceptCount input horizon = machine.acceptCount time (Cfg.init machine.initial input)

    Once every native branch has halted, the exact count is stable at every sufficiently large binary horizon, including horizons that are not multiples of the fixed block width.