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
The εClosure
of a set is the set of states which can be reached by taking a finite string of
ε-transitions from an element of the set.
- base: ∀ {α : Type u} {σ : Type v} {M : εNFA α σ} {S : Set σ}, ∀ s ∈ S, M.εClosure S s
- step: ∀ {α : Type u} {σ : Type v} {M : εNFA α σ} {S : Set σ} (s t : σ), t ∈ M.step s none → M.εClosure S s → M.εClosure S t