Category theory
Category theory is a general theory of mathematical structures and their relations.
≈ 4 min read
Category theory. encyclopegia.org, snapshot enwiki-001378301089. /a/category-theory
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
Category theory is a general theory of mathematical structures and their relations. It was introduced by Samuel Eilenberg and Saunders Mac Lane in the mid-20th century in their foundational work on algebraic topology. Category theory can be used in most areas of mathematics.
In particular, many constructions of new mathematical objects from previous ones that appear similarly in several contexts are conveniently expressed and unified in terms of categories. Examples include quotient spaces, direct products, completion, and duality. Many areas of computer science also rely on category theory, such as functional programming and semantics.
A category is formed by two sorts of objects: the objects of the category, and the morphisms, which relate two objects called the source and the target of the morphism. A morphism is often represented by an arrow from its source to its target (see the figure). Morphisms can be composed if the target of the first morphism equals the source of the second one.
Morphism composition has similar properties as function composition (associativity and existence of an identity morphism for each object). Morphisms are often some sort of functions, but this is not always the case. For example, a monoid may be viewed as a category with a single object, whose morphisms are the elements of the monoid.
The second fundamental concept of category theory is the concept of a functor, which plays the role of a morphism between two categories \mathcal{C}_1 and \mathcal{C}_2 : it maps objects of \mathcal{C}_1 to objects of \mathcal{C}_2 and morphisms of \mathcal{C}_1 to morphisms of \mathcal{C}_2 in such a way that sources are mapped to sources, and targets are mapped to targets (or, in the case of a contravariant functor, sources are mapped to targets and vice-versa). A third fundamental concept is a natural transformation that may be viewed as a morphism of functors.
A binary operation \circ , called composition of morphisms, such that for any three objects , , and , we have \circ \colon \text{hom}(b, c) \times \text{hom}(a, b) \to \text{hom}(a, c) The composition of f\colon a \rightarrow b and g\colon b \rightarrow c is written as g \circ f or gf , governed by two axioms: Associativity: If f\colon a \rightarrow b , g\colon b \rightarrow c , and h\colon c \rightarrow d then h \circ (g \circ f) = (h \circ g) \circ f Identity: For every object , there exists a morphism 1_x \colon x \rightarrow x (also denoted as \text{id}_x ) called the identity morphism for , such that for every morphism f\colon a \rightarrow b , we have 1_b \circ f = f = f \circ 1_a From the axioms, it can be proved that there is exactly one identity morphism for every object.
Example
A prototypical example of a category is Set, the category of sets and functions between them. The objects of Set are just sets, and a morphism from a set to a set is a function . The category axioms are satisfied since every set has an identity function, and since composition of functions is associative.
Text derived from https://en.wikipedia.org/w/index.php?oldid=1378301089 under CC BY-SA 4.0; modifications have been made.