(For the moment, mostly as an example of a coalgebra for an endofunctor.)
This will give the classical definition as a state-based system and then show how to turn that form into the coalgebraic form. The point is that other coalgebras should then be easier to interpret.
A deterministic automaton consists of the following data:
a set of states, ;
a set, , of inputs ;
a function, , called the next state function,
In the usual interpretation if the automaton is in state , and is ‘given’ the input , then it changes to being in state .
The ‘final’ predicate, of course, returns if a state is a final state and otherwise. (There will, in general, be a set of final or ‘accept’ states.)
(For the moment we will not look in any detail at the links between automata and languages.)
The first step in transforming this to the coalgebraic form is to curry , so as to obtain it in the form . We thus have for a state, , . We then also have a product function
\alpha = \delta \times (final) : Q \to Q^\Sigma\times bool.
If we now write , we get a functor (for you to check) and the deterministic automaton corresponded precisely to a coalgebra, , for .
Rather than start with a classically defined morphism of automata, we will take a morphism of coalgebras. We thus have that is a mapping of states, and that . Now let and , then the equation tells us that and that the final states of are mapped onto those of . In other words the concept of morphism of these -coalgebras is precisely that of functional simulation of deterministic automata.
The terminal coalgebra, , for this endofunctor is neat. It has state space, , the power set of the free monoid/ Kleene star of the set of ‘symbol labels’. This power set is precisely the set of all languages over the alphabet , as a language? is defined to be a subset of .
The next state function for is defined by .
For a summary of automata theory , look at the Wikipedia.
For a thorough treatment, see
or other texts on the subject.
For the coalgebraic treatment, this is discussed in: