Difference between revisions of "Coalgebra"
Line 1: | Line 1: | ||
+ | == Idea == | ||
+ | |||
+ | Many systems can be described by having some kind of state space and a map that assigns | ||
+ | to each state the result of ''observations'' that can be made on that state and possible | ||
+ | next states that are reachable from that state. | ||
+ | From an abstract perspective, the structure of the states are described by a category '''C''' | ||
+ | and the possible observations are specified by an endofunctor <math>F</math> on this category. | ||
+ | A coalgebra is then a morphism <math>X \to FX</math> for some carrier X, the state space. | ||
+ | |||
+ | Let us take a look at some examples before we dive into formal definitions and results. | ||
+ | # '''Deterministic Automata'''. The typical, first year example one learns about in Computer Science are deterministic automata over a finite alphabet <math>A</math>. These are given by a set of states <math>Q</math>, a set of final states <math>F \subseteq Q</math> and a map <math>\delta : Q \times A \to Q</math> that assigns to a state <math>q \in Q</math> and an input symbol the next state. We can combine this data into a single map <math>c : Q \to 2 \times Q^A</math> by putting <math>c = \langle c_1, c_2 \rangle</math> with <math>c_1(q) = \top \Leftrightarrow q \in F</math> and <math>c_2(q)(a) = c(q, a)</math>. | ||
+ | # '''Non-deterministic automata'''. These are an extension of deterministic automata where we allow a state to have a set of successors, they are maps of the type <math>Q \to 2 \times \mathcal{P}(Q)^A</math>. | ||
+ | # '''Differential Equations'''. A more mathematical example are (ordinary) differential equations, these assign to each point in space a time dependent vector field, i.e., they are given on vector spaces by maps of the form <math>V \to T(V)^{\R}</math> where <math>T(V)</math> is the tangent space and <math>\R</math> are the real numbers. | ||
+ | |||
+ | Note that in all these cases we have completely ignored initial states or initial conditions. | ||
+ | These are ''not'' part of coalgebras, every element of the state space can be initial. | ||
+ | |||
+ | == Definition == | ||
+ | |||
<definition id="coalg"> | <definition id="coalg"> | ||
− | Let | + | Let '''C''' be a category and <math>F : \mathbf{C} \to \mathbf{C}</math> an endofunctor on '''C'''. |
+ | An ''F-coalgebra'' is a morphism <math>c : X \to F X</math> in '''C''', and | ||
+ | a ''homomorphism'' from a coalgebra <math>c : X \to F X</math> to <math>d : Y \to F Y</math> is | ||
+ | a morphism <math>f : X \to Y</math> such that | ||
+ | |||
+ | <math> | ||
+ | \begin{array}{ccc} | ||
+ | X & \xrightarrow{\displaystyle f} & Y \\ | ||
+ | \big\downarrow c & & \big\downarrow d \\ | ||
+ | F X & \xrightarrow{\displaystyle F f} & F Y | ||
+ | \end{array} | ||
+ | </math> | ||
+ | |||
+ | commutes. | ||
</definition> | </definition> | ||
+ | Straight from the definition, we can prove the following. | ||
<theorem id="coalg-cat"> | <theorem id="coalg-cat"> | ||
<math>F</math>-Coalgebras and their homomorphisms form a category <math>\mathrm{Coalg}(F)</math>. | <math>F</math>-Coalgebras and their homomorphisms form a category <math>\mathrm{Coalg}(F)</math>. | ||
</theorem> | </theorem> |
Revision as of 14:22, 15 February 2015
Idea
Many systems can be described by having some kind of state space and a map that assigns to each state the result of observations that can be made on that state and possible next states that are reachable from that state. From an abstract perspective, the structure of the states are described by a category C and the possible observations are specified by an endofunctor
on this category. A coalgebra is then a morphism for some carrier X, the state space.Let us take a look at some examples before we dive into formal definitions and results.
- Deterministic Automata. The typical, first year example one learns about in Computer Science are deterministic automata over a finite alphabet . These are given by a set of states , a set of final states and a map that assigns to a state and an input symbol the next state. We can combine this data into a single map by putting with and .
- Non-deterministic automata. These are an extension of deterministic automata where we allow a state to have a set of successors, they are maps of the type .
- Differential Equations. A more mathematical example are (ordinary) differential equations, these assign to each point in space a time dependent vector field, i.e., they are given on vector spaces by maps of the form where is the tangent space and are the real numbers.
Note that in all these cases we have completely ignored initial states or initial conditions. These are not part of coalgebras, every element of the state space can be initial.
Definition
<definition id="coalg"> Let C be a category and
an endofunctor on C. An F-coalgebra is a morphism in C, and a homomorphism from a coalgebra to is a morphism such that
commutes. </definition>
Straight from the definition, we can prove the following. <theorem id="coalg-cat">
-Coalgebras and their homomorphisms form a category .
</theorem>