Documentation

Complexity.Computability.Machines.Turing.MultiTape.Encodings.List.Index

The first-occurrence index fold #

Pure transition and invariant shared by the direct list certificate and its legacy client.

def Turing.MultiTapeTM.Internal.ListIndex.idxStep {α : Type u_1} [DecidableEq α] (v : α) (s : Bool × ℕ) (a : α) :

Keep the first matching position, incrementing only while no match has appeared.

Instances For
    theorem Turing.MultiTapeTM.Internal.ListIndex.foldl_idxStep {α : Type u_1} [DecidableEq α] (v : α) (l : List α) (s : Bool × ℕ) :

    The original first-occurrence fold returns the starting count plus the first index.