Epsilon Nondeterministic Finite Automata #
This file contains the definition of an epsilon Nondeterministic Finite Automaton (εNFA), a state
machine which determines whether a string (implemented as a list over an arbitrary alphabet) is in a
regular set by evaluating the string over every possible path, also having access to ε-transitions,
which can be followed without reading a character.
Since this definition allows for automata with infinite states, a Fintype instance must be
supplied for true εNFA's.
An εNFA is a set of states (σ), a transition function from state to state labelled by the
alphabet (step), a starting state (start) and a set of acceptance states (accept).
Note the transition function sends a state to a Set of states and can make ε-transitions by
inputting none.
Since this definition allows for Automata with infinite states, a Fintype instance must be
supplied for true εNFA's.
Instances For
An induction principle for membership of M.εClosure S. If motive holds of all elements of
S and is preserved under ε-transitions, then it holds of all elements of M.εClosure S.
M.IsPath represents a traversal in M from a start state to an end state by following a list
of transitions in order.
- nil {α : Type u} {σ : Type v} {M : εNFA α σ} (s : σ) : M.IsPath s s []
- cons {α : Type u} {σ : Type v} {M : εNFA α σ} (t s u : σ) (a : Option α) (x : List (Option α)) : t ∈ M.step s a → M.IsPath t u x → M.IsPath s u (a :: x)
Instances For
Alias of the forward direction of εNFA.isPath_nil.
Regex-like operations #
Equations
- εNFA.instInhabited = { default := 0 }