Theory Two_Way_DFA_HF
theory Two_Way_DFA_HF
imports "Finite_Automata_HF.Finite_Automata_HF"
begin
text ‹A formalization of two-way deterministic finite automata (2DFA),
based on Paulson's theory of DFAs using hereditarily finite sets \<^cite>‹Paulson›.
Both the definition of 2DFAs and the proof follow Kozen \<^cite>‹Kozen›.›
section ‹Definition of Two-Way Deterministic Finite Automata›
subsection ‹Basic Definitions›
type_synonym state = hf
datatype dir = Left | Right
text ‹Left and right markers to prevent the 2DFA from reading out of bounds. The input for a 2DFA
with alphabet ‹Σ› is ‹⊢w⊣› for some ‹w ∈ Σ⇧*›. Note that ‹⊢,⊣ ∉ Σ›:›