DFA prefix states and block-boundary path observations
DefinitionFSS23105365_DFARunFor all natural numbers , every deterministic binary automaton with states, and every binary word of length , the function , defined for each natural number , is the state obtained by starting at the specified initial state of and applying its transition function successively to the first bits of in index order. Thus at it returns the initial state; at it returns the state after the entire word, and for it returns the initial state for every . The accepting set plays no role. An automaton with cannot be supplied because its structure requires an initial state.
For all natural numbers , every deterministic binary automaton with states, every map from its state set to the set of states, all natural numbers , and every binary word of length , the function is the sequence of states whose entry at each index is applied to the state of after it reads the first bits of . The automaton starts at its specified initial state and reads prefixes from that same start for these evaluations. The final observation is at the full word length . This definition imposes no positivity conditions on or : if , the first observed state is the projection of the initial state, and if , all entries are the projection of the same state reached after bits. If , the sequence has just the observation after bits. The accepting set is unused. The initial-state field requires , and existence of the supplied map from that inhabited state set requires .
import Definitions.Def_FSS23105365_FiniteState
set_option autoImplicit false
namespace FSS23105365
/-- The state after reading the first `t` bits of the supplied word. -/
def BinaryDFA.stateAfter {r m : ℕ} (B : BinaryDFA r) (x : Bits m) (t : ℕ) : Fin r :=
((List.ofFn x).take t).foldl B.step B.start
/-- States of a binary DFA observed after the initial `v` bits and then at
successive `s`-bit block boundaries. The last time is the full word length. -/
def BinaryDFA.sampledPath {q r n : ℕ} (B : BinaryDFA r)
(φ : Fin r → Fin q) (v s : ℕ) (x : Bits (v + n * s)) : Path q n :=
fun i => φ (B.stateAfter x (v + s * i.val))
end FSS23105365
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.