VOOZH about

URL: https://en.wikipedia.org/wiki/F-Coalgebra

⇱ F-coalgebra - Wikipedia


Jump to content
From Wikipedia, the free encyclopedia
(Redirected from F-Coalgebra)
Mathematical structure
This article may be too technical for most readers to understand. Please help improve it to make it understandable to non-experts, without removing the technical details. (July 2020) (Learn how and when to remove this message)

In mathematics, specifically in category theory, an πŸ‘ {\displaystyle F}
-coalgebra
is a structure defined according to a functor πŸ‘ {\displaystyle F}
, with specific properties as defined below. For both algebras and coalgebras, a functor[1][2] is a convenient and general way of organizing a signature. This has applications in computer science: examples of coalgebras include lazy evaluation, infinite data structures, such as streams, and also transition systems.

πŸ‘ {\displaystyle F}
-coalgebras are dual to πŸ‘ {\displaystyle F}
-algebras. Just as the class of all algebras for a given signature and equational theory form a variety, so does the class of all πŸ‘ {\displaystyle F}
-coalgebras satisfying a given equational theory form a covariety, where the signature is given by πŸ‘ {\displaystyle F}
.

Definition

[edit]

Let

πŸ‘ {\displaystyle F:{\mathcal {C}}\longrightarrow {\mathcal {C}}}

be an endofunctor on a category πŸ‘ {\displaystyle {\mathcal {C}}}
. An πŸ‘ {\displaystyle F}
-coalgebra
is an object πŸ‘ {\displaystyle A}
of πŸ‘ {\displaystyle {\mathcal {C}}}
together with a morphism

πŸ‘ {\displaystyle \alpha :A\longrightarrow FA}

of πŸ‘ {\displaystyle {\mathcal {C}}}
, usually written as πŸ‘ {\displaystyle (A,\alpha )}
.

An πŸ‘ {\displaystyle F}
-coalgebra homomorphism from πŸ‘ {\displaystyle (A,\alpha )}
to another πŸ‘ {\displaystyle F}
-coalgebra πŸ‘ {\displaystyle (B,\beta )}
is a morphism

πŸ‘ {\displaystyle f:A\longrightarrow B}

in πŸ‘ {\displaystyle {\mathcal {C}}}
such that

πŸ‘ {\displaystyle Ff\circ \alpha =\beta \circ f}
.

Thus the πŸ‘ {\displaystyle F}
-coalgebras for a given functor F constitute a category.

Examples

[edit]

Consider the endofunctor πŸ‘ {\displaystyle X\mapsto X\sqcup \{*\}:\mathbf {Set} \to \mathbf {Set} }
that sends a set to its disjoint union with the singleton set πŸ‘ {\displaystyle \{\ast \}}
. A coalgebra of this endofunctor is given by πŸ‘ {\displaystyle ({\overline {\mathbb {N} }},\alpha )}
, where πŸ‘ {\displaystyle {\overline {\mathbb {N} }}=\{0,1,2,\ldots \}\sqcup \{\infty \}}
is the so-called conatural numbers, consisting of the nonnegative integers and also infinity, and the function πŸ‘ {\displaystyle \alpha }
is given by πŸ‘ {\displaystyle \alpha (0)=\ast }
, πŸ‘ {\displaystyle \alpha (n)=n-1}
for πŸ‘ {\displaystyle n=1,2,\ldots }
and πŸ‘ {\displaystyle \alpha (\infty )=\infty }
. In fact, πŸ‘ {\displaystyle ({\overline {\mathbb {N} }},\alpha )}
is the terminal coalgebra of this endofunctor.

More generally, fix some set πŸ‘ {\displaystyle A}
, and consider the functor πŸ‘ {\displaystyle F:\mathbf {Set} \longrightarrow \mathbf {Set} }
that sends πŸ‘ {\displaystyle X}
to πŸ‘ {\displaystyle (X\times A)\cup \{1\}}
. Then an πŸ‘ {\displaystyle F}
-coalgebra πŸ‘ {\displaystyle \alpha :X\longrightarrow (X\times A)\cup \{1\}=FX}
is a finite or infinite stream over the alphabet πŸ‘ {\displaystyle A}
,
where πŸ‘ {\displaystyle X}
is the set of states and πŸ‘ {\displaystyle \alpha }
is the state-transition function. Applying the state-transition function to a state may yield two possible results: either an element of πŸ‘ {\displaystyle A}
together with the next state of the stream, or the element of the singleton set πŸ‘ {\displaystyle \{1\}}
as a separate "final state" indicating that there are no more values in the stream.

In many practical applications, the state-transition function of such a coalgebraic object may be of the form πŸ‘ {\displaystyle X\rightarrow f_{1}\times f_{2}\times \ldots \times f_{n}}
, which readily factorizes into a collection of "selectors", "observers", "methods" πŸ‘ {\displaystyle X\rightarrow f_{1},\,X\rightarrow f_{2}\,\ldots \,X\rightarrow f_{n}}
. Special cases of practical interest include observers yielding attribute values, and mutator methods of the form πŸ‘ {\displaystyle X\rightarrow X^{A_{1}\times \ldots \times A_{n}}}
taking additional parameters and yielding states. This decomposition is dual to the decomposition of initial πŸ‘ {\displaystyle F}
-algebras into sums of 'constructors'.

Let P be the power set construction on the category of sets, considered as a covariant functor. The P-coalgebras are in bijective correspondence with sets with a binary relation. Now fix another set, A. Then coalgebras for the endofunctor P(AΓ—(-)) are in bijective correspondence with labelled transition systems, and homomorphisms between coalgebras correspond to functional bisimulations between labelled transition systems.

Applications

[edit]

In computer science, coalgebra has emerged as a convenient and suitably general way of specifying the behaviour of systems and data structures that are potentially infinite, for example classes in object-oriented programming, streams and transition systems. While algebraic specification deals with functional behaviour, typically using inductive datatypes generated by constructors, coalgebraic specification is concerned with behaviour modelled by coinductive process types that are observable by selectors, much in the spirit of automata theory. An important role is played here by final coalgebras, which are complete sets of possibly infinite behaviours, such as streams. The natural logic to express properties of such systems is coalgebraic modal logic.[citation needed]

See also

[edit]

References

[edit]

External links

[edit]