Transition Monoid for DFA?
subttle opened this issue · 1 comments
subttle commented
Is there a good way to represent the transition semigroup/monoid for DFA? I can think of a way to put all the induced functions q → q
into a list for a given DFA q s
but I'm not sure that would be helpful just yet.
This could come in handy for that later:
transition ∷ (Finite q, Finite s) ⇒ DFA q s → s → (q → q)
transition (DFA δ _ _) σ = \q → δ (q, σ)
transitions ∷ (Finite q, Finite s) ⇒ DFA q s → [s] → (q → q)
transitions m w = \q → delta' m (q, w)
subttle commented
TODO: consider Endo
's instances for Semigroup
and Monoid
.