Final coalgebras for a functor serve as semantic domains for state based systems of various types. For example, formal languages, streams, nonwell-founded sets and behaviors of CCS processes form final coalgebras. We present a uniform account of the semantics of recursive definitions in final coalgebras by combining two ideas: (1) final coalgebras are also initial completely iterative algebras (cia); (2) additional algebraic operations on final coalgebras may be presented in terms of a distributive law λ. We first show that a distributive law leads to new extended cia structures on the final coalgebra. Then we formalize recursive function definitions involving operations given by λ as recursive program schemes for λ, and we prove that unique solutions exist in the extended cias. We illustrate our results by the four concrete final coalgebras mentioned above, e. g., a finite stream circuit defines a unique stream function and we show how to define new process combinators ...
Stefan Milius, Lawrence S. Moss, Daniel Schwencke