Jump to content

Category theory: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
→‎See also: add link to applied category theory
Tags: Mobile edit Mobile web edit
Reverted 2 edits by Logic314 (talk): Too technical for the lead; the lead if for giving the contex and an overview of the content. The exact definition must be given in separate sections
 
(17 intermediate revisions by 9 users not shown)
Line 2: Line 2:
{{More footnotes|date=November 2009}}
{{More footnotes|date=November 2009}}


[[File:Commutative diagram for morphism.svg|right|thumb|200px|Schematic representation of a category with objects ''X'', ''Y'', ''Z'' and morphisms ''f'', ''g'', ''g'' ∘ ''f''. (The category's three identity morphisms 1<sub>''X''</sub>, 1<sub>''Y''</sub> and 1<sub>''Z''</sub>, if explicitly represented, would appear as three arrows, from the letters X, Y, and Z to themselves, respectively.)]]
[[File:Commutative diagram for morphism.svg|right|thumb|200px|Schematic representation of a category with objects ''X'', ''Y'', ''Z'' and morphisms ''f'', ''g'', {{nowrap|1=''g'' ∘ ''f''}}. (The category's three identity morphisms 1<sub>''X''</sub>, 1<sub>''Y''</sub> and 1<sub>''Z''</sub>, if explicitly represented, would appear as three arrows, from the letters ''X'', ''Y'', and ''Z'' to themselves, respectively.)]]


'''Category theory''' is a general theory of [[mathematical structure]]s and their relations that was introduced by [[Samuel Eilenberg]] and [[Saunders Mac Lane]] in the middle of the 20th century in their foundational work on [[algebraic topology]]. Category theory is used in almost all areas of mathematics. In particular, many constructions of new [[mathematical object]]s from previous ones that appear similarly in several contexts are conveniently expressed and unified in terms of categories. Examples include [[quotient space (disambiguation)|quotient space]]s, [[direct product]]s, [[completion (disambiguation)#Mathematics|completion]], and [[duality (mathematics)|duality]].
'''Category theory''' is a general theory of [[mathematical structure]]s and their relations that was introduced by [[Samuel Eilenberg]] and [[Saunders Mac Lane]] in the middle of the 20th century in their foundational work on [[algebraic topology]].<ref>{{Citation |last=Marquis |first=Jean-Pierre |title=Category Theory |date=2023 |work=The Stanford Encyclopedia of Philosophy |editor-last=Zalta |editor-first=Edward N. |url=https://plato.stanford.edu/archives/fall2023/entries/category-theory/ |access-date=2024-04-23 |edition=Fall 2023 |publisher=Metaphysics Research Lab, Stanford University |editor2-last=Nodelman |editor2-first=Uri}}</ref> Category theory is used in almost all areas of mathematics. In particular, many constructions of new [[mathematical object]]s from previous ones that appear similarly in several contexts are conveniently expressed and unified in terms of categories. Examples include [[quotient space (disambiguation)|quotient space]]s, [[direct product]]s, [[completion (disambiguation)#Mathematics|completion]], and [[duality (mathematics)|duality]].


Many areas of [[computer science]] also rely on category theory, such as [[functional programming]] and [[Semantics (computer science) | semantics]].
Many areas of [[computer science]] also rely on category theory, such as [[functional programming]] and [[Semantics (computer science) | semantics]].


A [[category (mathematics)|category]] is formed by two sorts of [[mathematical object|objects]]: the [[object (category theory)|object]]s of the category, and the [[morphism]]s, which relate two objects called the ''source'' and the ''target'' of the morphism. One often says that a morphism is an ''arrow'' that ''maps'' its source to its target. Morphisms can be ''composed'' if the target of the first morphism equals the source of the second one, and morphism composition has similar properties as [[function composition]] ([[associativity]] and existence of [[identity element|identity morphisms]]). Morphisms are often some sort of [[function (mathematics)|function]], 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.
A [[category (mathematics)|category]] is formed by two sorts of [[mathematical object|objects]]: the [[object (category theory)|object]]s of the category, and the [[morphism]]s, which relate two objects called the ''source'' and the ''target'' of the morphism. One often says that a morphism is an ''arrow'' that ''maps'' its source to its target. Morphisms can be ''composed'' if the target of the first morphism equals the source of the second one, and morphism composition has similar properties as [[function composition]] ([[associativity]] and existence of an [[identity element|identity morphisms]] for each object). Morphisms are often some sort of [[function (mathematics)|function]], 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 <math>C_1</math> and <math>C_2:</math> it maps objects of <math>C_1</math> to objects of <math>C_2</math> and morphisms of <math>C_1</math> to morphisms of <math>C_2</math> 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.
The second fundamental concept of category theory is the concept of a [[functor]], which plays the role of a morphism between two categories ''C''<sub>1</sub> and ''C''<sub>2</sub>: it maps objects of ''C''<sub>1</sub> to objects of ''C''<sub>2</sub> and morphisms of ''C''<sub>1</sub> to morphisms of ''C''<sub>2</sub> 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.


== Categories, objects, and morphisms ==
== Categories, objects, and morphisms ==
Line 20: Line 20:
* A class hom(''C''), whose elements are called [[morphism]]s or [[Map (mathematics)|maps]] or ''arrows''. <br />Each morphism '''''f''''' has a ''source object '''a''''' and ''target object '''b'''''. <br />The expression {{nowrap|1=''f'' : ''a'' → ''b''}}, would be verbally stated as "''f'' is a morphism from ''a'' to ''b''".<br />The expression {{nowrap|1='''hom(''a'', ''b'')'''}} – alternatively expressed as {{nowrap|1='''hom<sub>''C''</sub>(''a'', ''b'')'''}}, {{nowrap|1='''mor(''a'', ''b'')'''}}, or {{nowrap|1='''''C''(''a'', ''b'')'''}} – denotes the ''hom-class'' of all morphisms from ''a'' to ''b''.
* A class hom(''C''), whose elements are called [[morphism]]s or [[Map (mathematics)|maps]] or ''arrows''. <br />Each morphism '''''f''''' has a ''source object '''a''''' and ''target object '''b'''''. <br />The expression {{nowrap|1=''f'' : ''a'' → ''b''}}, would be verbally stated as "''f'' is a morphism from ''a'' to ''b''".<br />The expression {{nowrap|1='''hom(''a'', ''b'')'''}} – alternatively expressed as {{nowrap|1='''hom<sub>''C''</sub>(''a'', ''b'')'''}}, {{nowrap|1='''mor(''a'', ''b'')'''}}, or {{nowrap|1='''''C''(''a'', ''b'')'''}} – denotes the ''hom-class'' of all morphisms from ''a'' to ''b''.
* A [[binary operation]] ∘, called ''composition of morphisms'', such that <br /> for any three objects ''a'', ''b'', and ''c'', we have
* A [[binary operation]] ∘, called ''composition of morphisms'', such that <br /> for any three objects ''a'', ''b'', and ''c'', we have
::{{nowrap|1=∘ : hom(''b'', ''c'') × hom(''a'', ''b'') → hom(''a'', ''c'')}}.
:: {{nowrap|1=∘ : hom(''b'', ''c'') × hom(''a'', ''b'') → hom(''a'', ''c'')}}.
:The composition of {{nowrap|1=''f'' : ''a'' → ''b''}} and {{nowrap|1=''g'' : ''b'' → ''c''}} is written as {{nowrap|1=''g'' ∘ ''f''}} or ''gf'',{{efn|Some authors compose in the opposite order, writing ''fg'' or {{nowrap|1=''f'' ∘ ''g''}} for {{nowrap|1=''g'' ∘ ''f''}}. Computer scientists using category theory very commonly write {{nowrap|1=''f'' ; ''g''}} for {{nowrap|1=''g'' ∘ ''f''}}}} governed by two axioms:
: The composition of {{nowrap|1=''f'' : ''a'' → ''b''}} and {{nowrap|1=''g'' : ''b'' → ''c''}} is written as {{nowrap|1=''g'' ∘ ''f''}} or ''gf'',{{efn|Some authors compose in the opposite order, writing ''fg'' or {{nowrap|1=''f'' ∘ ''g''}} for {{nowrap|1=''g'' ∘ ''f''}}. Computer scientists using category theory very commonly write {{nowrap|1=''f'' ; ''g''}} for {{nowrap|1=''g'' ∘ ''f''}}}} governed by two axioms:
::1. [[Associativity]]: If {{nowrap|1=''f'' : ''a'' → ''b''}}, {{nowrap|1=''g'' : ''b'' → ''c''}}, and {{nowrap|1=''h'' : ''c'' → ''d''}} then
:: 1. [[Associativity]]: If {{nowrap|1=''f'' : ''a'' → ''b''}}, {{nowrap|1=''g'' : ''b'' → ''c''}}, and {{nowrap|1=''h'' : ''c'' → ''d''}} then
:::{{nowrap|1=''h'' ∘ (''g'' ∘ ''f'') = (''h'' ∘ ''g'') ∘ ''f''}}
::: {{nowrap|1=''h'' ∘ (''g'' ∘ ''f'') = (''h'' ∘ ''g'') ∘ ''f''}}
::2. [[Identity (mathematics)|Identity]]: For every object ''x'', there exists a morphism {{nowrap|1=''1''<sub>''x''</sub> : ''x'' → ''x''}} (also denoted as {{nowrap|1=''id''<sub>''x''</sub>}}) called the ''[[identity morphism]] for x'', <br />such that
:: 2. [[Identity (mathematics)|Identity]]: For every object ''x'', there exists a morphism {{nowrap|1=1<sub>''x''</sub> : ''x'' → ''x''}} (also denoted as {{nowrap|1=id<sub>''x''</sub>}}) called the ''[[identity morphism]] for x'', <br />such that
:::for every morphism {{nowrap|1=''f'' : ''a'' → ''b''}}, we have
::: for every morphism {{nowrap|1=''f'' : ''a'' → ''b''}}, we have
:::{{nowrap|1=''1''<sub>''b''</sub> ∘ ''f'' = ''f'' = ''f'' ∘ ''1''<sub>''a''</sub>}}
::: {{nowrap|1=1<sub>''b''</sub> ∘ ''f'' = ''f'' = ''f'' ∘ 1<sub>''a''</sub>}}
:: From the axioms, it can be proved that there is exactly one [[identity morphism]] for every object.
:: From the axioms, it can be proved that there is exactly one [[identity morphism]] for every object.


Line 34: Line 34:
[[Morphism]]s can have any of the following properties. A morphism {{nowrap|1=''f'' : ''a'' → ''b''}} is a:
[[Morphism]]s can have any of the following properties. A morphism {{nowrap|1=''f'' : ''a'' → ''b''}} is a:
* [[monomorphism]] (or ''monic'') if {{nowrap|1=''f'' ∘ ''g''<sub>1</sub> = ''f'' ∘ ''g''<sub>2</sub>}} implies {{nowrap|1=''g''<sub>1</sub> = ''g''<sub>2</sub>}} for all morphisms {{nowrap|1=''g''<sub>1</sub>, ''g<sub>2</sub>'' : ''x'' → ''a''}}.
* [[monomorphism]] (or ''monic'') if {{nowrap|1=''f'' ∘ ''g''<sub>1</sub> = ''f'' ∘ ''g''<sub>2</sub>}} implies {{nowrap|1=''g''<sub>1</sub> = ''g''<sub>2</sub>}} for all morphisms {{nowrap|1=''g''<sub>1</sub>, ''g<sub>2</sub>'' : ''x'' → ''a''}}.
* [[epimorphism]] (or ''epic'') if {{nowrap|1=''g''<sub>1</sub> ∘ ''f'' = ''g''<sub>2</sub> ∘ ''f''}} implies {{nowrap|1=''g<sub>1</sub>'' = ''g<sub>2</sub>''}} for all morphisms {{nowrap|1=''g<sub>1</sub>'', ''g<sub>2</sub>'' : ''b'' → ''x''}}.
* [[epimorphism]] (or ''epic'') if {{nowrap|1=''g''<sub>1</sub> ∘ ''f'' = ''g''<sub>2</sub> ∘ ''f''}} implies {{nowrap|1=''g<sub>1</sub>'' = ''g<sub>2</sub>''}} for all morphisms {{nowrap|1=''g''<sub>1</sub>, ''g''<sub>2</sub> : ''b'' → ''x''}}.
* ''bimorphism'' if ''f'' is both epic and monic.
* ''bimorphism'' if ''f'' is both epic and monic.
* [[isomorphism]] if there exists a morphism {{nowrap|1=''g'' : ''b'' → ''a''}} such that {{nowrap|1=''f'' ∘ ''g'' = 1<sub>''b''</sub> and ''g'' ∘ ''f'' = 1<sub>''a''</sub>}}.{{efn|A morphism that is both epic and monic is not necessarily an isomorphism! An elementary counterexample: in the category consisting of two objects ''A'' and ''B'', the identity morphisms, and a single morphism ''f'' from ''A'' to ''B'', ''f'' is both epic and monic but is not an isomorphism.}}
* [[isomorphism]] if there exists a morphism {{nowrap|1=''g'' : ''b'' → ''a''}} such that {{nowrap|1=''f'' ∘ ''g'' = 1<sub>''b''</sub> and ''g'' ∘ ''f'' = 1<sub>''a''</sub>}}.{{efn|A morphism that is both epic and monic is not necessarily an isomorphism. An elementary counterexample: in the category consisting of two objects ''A'' and ''B'', the identity morphisms, and a single morphism ''f'' from ''A'' to ''B'', ''f'' is both epic and monic but is not an isomorphism.}}
* [[endomorphism]] if {{nowrap|1=''a'' = ''b''}}. end(''a'') denotes the class of endomorphisms of ''a''.
* [[endomorphism]] if {{nowrap|1=''a'' = ''b''}}. end(''a'') denotes the class of endomorphisms of ''a''.
* [[automorphism]] if ''f'' is both an endomorphism and an isomorphism. aut(''a'') denotes the class of automorphisms of ''a''.
* [[automorphism]] if ''f'' is both an endomorphism and an isomorphism. aut(''a'') denotes the class of automorphisms of ''a''.
Line 47: Line 47:
* ''f'' is an isomorphism.
* ''f'' is an isomorphism.


==Functors==
== Functors ==
{{Main|Functor}}
{{Main|Functor}}


Line 62: Line 62:
A '''contravariant''' functor {{nowrap|1=''F'': ''C'' → ''D''}} is like a covariant functor, except that it "turns morphisms around" ("reverses all the arrows"). More specifically, every morphism {{nowrap|1=''f'' : ''x'' → ''y''}} in ''C'' must be assigned to a morphism {{nowrap|1=''F''(''f'') : ''F''(''y'') → ''F''(''x'')}} in ''D''. In other words, a contravariant functor acts as a covariant functor from the [[opposite category]] ''C''<sup>op</sup> to ''D''.
A '''contravariant''' functor {{nowrap|1=''F'': ''C'' → ''D''}} is like a covariant functor, except that it "turns morphisms around" ("reverses all the arrows"). More specifically, every morphism {{nowrap|1=''f'' : ''x'' → ''y''}} in ''C'' must be assigned to a morphism {{nowrap|1=''F''(''f'') : ''F''(''y'') → ''F''(''x'')}} in ''D''. In other words, a contravariant functor acts as a covariant functor from the [[opposite category]] ''C''<sup>op</sup> to ''D''.


==Natural transformations==
== Natural transformations ==
{{Main|Natural transformation}}
{{Main|Natural transformation}}


A ''natural transformation'' is a relation between two functors. Functors often describe "natural constructions" and natural transformations then describe "natural homomorphisms" between two such constructions. Sometimes two quite different constructions yield "the same" result; this is expressed by a natural isomorphism between the two functors.
A ''natural transformation'' is a relation between two functors. Functors often describe "natural constructions" and natural transformations then describe "natural homomorphisms" between two such constructions. Sometimes two quite different constructions yield "the same" result; this is expressed by a natural isomorphism between the two functors.


If ''F'' and ''G'' are (covariant) functors between the categories ''C'' and ''D'', then a natural transformation η from ''F'' to ''G'' associates to every object ''X'' in ''C'' a morphism {{nowrap|1=η<sub>''X''</sub> : ''F''(''X'') → ''G''(''X'')}} in ''D'' such that for every morphism {{nowrap|1=''f'' : ''X'' → ''Y''}} in ''C'', we have {{nowrap|1=η<sub>''Y''</sub> ∘ ''F''(''f'') = ''G''(''f'') ∘ η<sub>''X''</sub>}}; this means that the following diagram is [[commutative diagram|commutative]]:
If ''F'' and ''G'' are (covariant) functors between the categories ''C'' and ''D'', then a natural transformation ''η'' from ''F'' to ''G'' associates to every object ''X'' in ''C'' a morphism {{nowrap|1=''η''<sub>''X''</sub> : ''F''(''X'') → ''G''(''X'')}} in ''D'' such that for every morphism {{nowrap|1=''f'' : ''X'' → ''Y''}} in ''C'', we have {{nowrap|1=''η''<sub>''Y''</sub> ∘ ''F''(''f'') = ''G''(''f'') ∘ ''η''<sub>''X''</sub>}}; this means that the following diagram is [[commutative diagram|commutative]]:


[[Image:Natural transformation.svg|175px|center|Commutative diagram defining natural transformations]]
[[Image:Natural transformation.svg|175px|center|Commutative diagram defining natural transformations]]


The two functors ''F'' and ''G'' are called ''naturally isomorphic'' if there exists a natural transformation from ''F'' to ''G'' such that η<sub>''X''</sub> is an isomorphism for every object ''X'' in ''C''.
The two functors ''F'' and ''G'' are called ''naturally isomorphic'' if there exists a natural transformation from ''F'' to ''G'' such that ''η''<sub>''X''</sub> is an isomorphism for every object ''X'' in ''C''.


==Other concepts==
== Other concepts ==


===Universal constructions, limits, and colimits===
=== Universal constructions, limits, and colimits ===
{{Main|Universal property|Limit (category theory)}}
{{Main|Universal property|Limit (category theory)}}


Line 84: Line 84:
Numerous important constructions can be described in a purely categorical way if the ''category limit'' can be developed and dualized to yield the notion of a ''colimit''.
Numerous important constructions can be described in a purely categorical way if the ''category limit'' can be developed and dualized to yield the notion of a ''colimit''.


===Equivalent categories===
=== Equivalent categories ===
{{Main|Equivalence of categories|Isomorphism of categories}}
{{Main|Equivalence of categories|Isomorphism of categories}}


It is a natural question to ask: under which conditions can two categories be considered ''essentially the same'', in the sense that theorems about one category can readily be transformed into theorems about the other category? The major tool one employs to describe such a situation is called ''equivalence of categories'', which is given by appropriate functors between two categories. Categorical equivalence has found [[Equivalence of categories#Examples|numerous applications]] in mathematics.
It is a natural question to ask: under which conditions can two categories be considered ''essentially the same'', in the sense that theorems about one category can readily be transformed into theorems about the other category? The major tool one employs to describe such a situation is called ''equivalence of categories'', which is given by appropriate functors between two categories. Categorical equivalence has found [[Equivalence of categories#Examples|numerous applications]] in mathematics.


===Further concepts and results===
=== Further concepts and results ===
The definitions of categories and functors provide only the very basics of categorical algebra; additional important topics are listed below. Although there are strong interrelations between all of these topics, the given order can be considered as a guideline for further reading.
The definitions of categories and functors provide only the very basics of categorical algebra; additional important topics are listed below. Although there are strong interrelations between all of these topics, the given order can be considered as a guideline for further reading.
* The [[functor category]] ''D''<sup>''C''</sup> has as objects the functors from ''C'' to ''D'' and as morphisms the natural transformations of such functors. The [[Yoneda lemma]] is one of the most famous basic results of category theory; it describes representable functors in functor categories.
* The [[functor category]] ''D''<sup>''C''</sup> has as objects the functors from ''C'' to ''D'' and as morphisms the natural transformations of such functors. The [[Yoneda lemma]] is one of the most famous basic results of category theory; it describes representable functors in functor categories.
Line 95: Line 95:
* [[Adjoint functors]]: A functor can be left (or right) adjoint to another functor that maps in the opposite direction. Such a pair of adjoint functors typically arises from a construction defined by a universal property; this can be seen as a more abstract and powerful view on universal properties.
* [[Adjoint functors]]: A functor can be left (or right) adjoint to another functor that maps in the opposite direction. Such a pair of adjoint functors typically arises from a construction defined by a universal property; this can be seen as a more abstract and powerful view on universal properties.


===Higher-dimensional categories===
=== Higher-dimensional categories ===
{{Main|Higher category theory}}
{{Main|Higher category theory}}
Many of the above concepts, especially equivalence of categories, adjoint functor pairs, and functor categories, can be situated into the context of ''higher-dimensional categories''. Briefly, if we consider a morphism between two objects as a "process taking us from one object to another", then higher-dimensional categories allow us to profitably generalize this by considering "higher-dimensional processes".
Many of the above concepts, especially equivalence of categories, adjoint functor pairs, and functor categories, can be situated into the context of ''higher-dimensional categories''. Briefly, if we consider a morphism between two objects as a "process taking us from one object to another", then higher-dimensional categories allow us to profitably generalize this by considering "higher-dimensional processes".
Line 105: Line 105:
Higher-dimensional categories are part of the broader mathematical field of [[higher-dimensional algebra]], a concept introduced by [[Ronald Brown (mathematician)|Ronald Brown]]. For a conversational introduction to these ideas, see [http://math.ucr.edu/home/baez/week73.html John Baez, 'A Tale of ''n''-categories' (1996).]
Higher-dimensional categories are part of the broader mathematical field of [[higher-dimensional algebra]], a concept introduced by [[Ronald Brown (mathematician)|Ronald Brown]]. For a conversational introduction to these ideas, see [http://math.ucr.edu/home/baez/week73.html John Baez, 'A Tale of ''n''-categories' (1996).]


==Historical notes==
== Historical notes ==
{{more citations needed section|date=November 2015}}
{{more citations needed section|date=November 2015}}
{{main|Timeline of category theory and related mathematics}}
{{main|Timeline of category theory and related mathematics}}
Line 119: Line 119:
[[Categorical logic]] is now a well-defined field based on [[type theory]] for [[intuitionistic logic]]s, with applications in [[functional programming]] and [[domain theory]], where a [[cartesian closed category]] is taken as a non-syntactic description of a [[lambda calculus]]. At the very least, category theoretic language clarifies what exactly these related areas have in common (in some [[wikt:abstract|abstract]] sense).
[[Categorical logic]] is now a well-defined field based on [[type theory]] for [[intuitionistic logic]]s, with applications in [[functional programming]] and [[domain theory]], where a [[cartesian closed category]] is taken as a non-syntactic description of a [[lambda calculus]]. At the very least, category theoretic language clarifies what exactly these related areas have in common (in some [[wikt:abstract|abstract]] sense).


Category theory has been applied in other fields as well, see [[applied category theory]]. For example, [[John Baez]] has shown a link between [[Feynman diagrams]] in [[physics]] and monoidal categories.<ref name="Baez09">{{cite book |first1=J.C. |last1=Baez |first2=M. |last2=Stay |chapter=Physics, Topology, Logic and Computation: A Rosetta Stone |title=New Structures for Physics |series=Lecture Notes in Physics |date=2010 |volume=813 |pages=95–172 |doi=10.1007/978-3-642-12821-9_2 |arxiv=0903.0340 |isbn=978-3-642-12820-2 |s2cid=115169297 }}</ref> Another application of category theory, more specifically: topos theory, has been made in mathematical music theory, see for example the book ''The Topos of Music, Geometric Logic of Concepts, Theory, and Performance'' by [[Guerino Mazzola]].
Category theory has been applied in other fields as well, see [[applied category theory]]. For example, [[John Baez]] has shown a link between [[Feynman diagrams]] in [[physics]] and monoidal categories.<ref name="Baez09">{{cite book |first1=J.C. |last1=Baez |first2=M. |last2=Stay |chapter=Physics, Topology, Logic and Computation: A Rosetta Stone |title=New Structures for Physics |series=Lecture Notes in Physics |date=2010 |volume=813 |pages=95–172 |doi=10.1007/978-3-642-12821-9_2 |arxiv=0903.0340 |isbn=978-3-642-12820-2 |s2cid=115169297 }}</ref> Another application of category theory, more specifically topos theory, has been made in mathematical music theory, see for example the book ''The Topos of Music, Geometric Logic of Concepts, Theory, and Performance'' by [[Guerino Mazzola]].


More recent efforts to introduce undergraduates to categories as a foundation for mathematics include those of [[William Lawvere]] and Rosebrugh (2003) and Lawvere and [[Stephen Schanuel]] (1997) and Mirroslav Yotov (2012).
More recent efforts to introduce undergraduates to categories as a foundation for mathematics include those of [[William Lawvere]] and Rosebrugh (2003) and Lawvere and [[Stephen Schanuel]] (1997) and Mirroslav Yotov (2012).
Line 140: Line 140:


== Notes ==
== Notes ==
{{Notelist}}
{{notelist|30em}}


== References ==
== References ==
=== Citations ===
=== Citations ===
{{Reflist}}
{{reflist|30em}}


=== Sources ===
=== Sources ===
{{refbegin|30em}}

* {{cite book |title = Category Theory |last1 = Adámek |first1 = Jiří |last2 = Herrlich |first2 = Horst |author2-link = Horst Herrlich |last3 = Strecker |first3 = George E. |publisher = Heldermann Verlag Berlin |year = 2004 |url = http://katmat.math.uni-bremen.de/acc/acc.htm }}
* {{cite book |title = Abstract and Concrete Categories |last1 = Adámek |first1 = Jiří |last2 = Herrlich |first2 = Horst |author2-link = Horst Herrlich |last3 = Strecker |first3 = George E. |publisher = Heldermann Verlag Berlin |year = 2004 |url = http://katmat.math.uni-bremen.de/acc/acc.htm }}
* {{cite book |title = Category Theory |last1 = Awodey |first1 = Steve |publisher = Oxford University Press |year = 2010 |isbn = 978-0199237180 }}
<!-- Awodey -->
* {{cite book |title = Abstract and Concrete Categories |last1 = Awodey |first1 = Steve |publisher = Oxford University Press |year = 2010 |url = https://www.amazon.com/Category-Theory-Oxford-Logic-Guides/dp/0199237182 }}
<!-- Barr -->
* {{citation
* {{citation
| last1 = Barr
| last1 = Barr
Line 165: Line 163:
| volume = 22
| volume = 22
| year = 2012 |orig-year=1995
| year = 2012 |orig-year=1995
}}.
}}.
* {{citation
* {{citation
| last1 = Barr | first1 = Michael | author1-link = Michael Barr (mathematician)
| last1 = Barr | first1 = Michael | author1-link = Michael Barr (mathematician)
Line 184: Line 182:
| first1 = Francis
| first1 = Francis
| url = https://books.google.com/books?id=YfzImoopB-IC&q=%22Handbook+of+categorical+algebra%22&pg=PP1
| url = https://books.google.com/books?id=YfzImoopB-IC&q=%22Handbook+of+categorical+algebra%22&pg=PP1
| isbn = 9780521441780
| isbn = 9780521441780
}}
}}
* {{cite book |last=Freyd |first=Peter J. |title = Abelian Categories |orig-year=1964 |url = http://www.tac.mta.ca/tac/reprints/articles/3/tr3abs.html |author-link=Peter J. Freyd |year=2003 |series=Reprints in Theory and Applications of Categories |volume=3}}
* {{cite book |last=Freyd |first=Peter J. |title = Abelian Categories |orig-year=1964 |url = http://www.tac.mta.ca/tac/reprints/articles/3/tr3abs.html |author-link=Peter J. Freyd |year=2003 |series=Reprints in Theory and Applications of Categories |volume=3}}
* {{cite book |title = Categories, allegories |publisher=North Holland |year=1990 |series=North Holland Mathematical Library |volume=39 |last1=Freyd |first1=Peter J. |author1-link=Peter J. Freyd |last2=Scedrov |first2=Andre |url = https://books.google.com/books?id=fCSJRegkKdoC |isbn = 978-0-08-088701-2 }}
* {{cite book |title = Categories, allegories |publisher=North Holland |year=1990 |series=North Holland Mathematical Library |volume=39 |last1=Freyd |first1=Peter J. |author1-link=Peter J. Freyd |last2=Scedrov |first2=Andre |url = https://books.google.com/books?id=fCSJRegkKdoC |isbn = 978-0-08-088701-2 }}
Line 203: Line 201:
* {{cite book |first=Benjamin C. |last=Pierce |author-link=Benjamin C. Pierce |title = Basic Category Theory for Computer Scientists |url = https://books.google.com/books?id=ezdeaHfpYPwC |year=1991 |publisher=MIT Press |isbn = 978-0-262-66071-6 }}
* {{cite book |first=Benjamin C. |last=Pierce |author-link=Benjamin C. Pierce |title = Basic Category Theory for Computer Scientists |url = https://books.google.com/books?id=ezdeaHfpYPwC |year=1991 |publisher=MIT Press |isbn = 978-0-262-66071-6 }}
* {{cite book |title=An introduction to Category Theory in four easy movements |year=2005 |url=http://www.cs.man.ac.uk/~hsimmons/BOOKS/CatTheory.pdf |last1=Schalk |first1=A. |last2=Simmons |first2=H. |access-date=2007-12-03 |archive-url=https://web.archive.org/web/20170321152109/http://www.cs.man.ac.uk/~hsimmons/BOOKS/CatTheory.pdf |archive-date=2017-03-21 |url-status=dead }} Notes for a course offered as part of the MSc. in [[Mathematical Logic]], [[Manchester University]].
* {{cite book |title=An introduction to Category Theory in four easy movements |year=2005 |url=http://www.cs.man.ac.uk/~hsimmons/BOOKS/CatTheory.pdf |last1=Schalk |first1=A. |last2=Simmons |first2=H. |access-date=2007-12-03 |archive-url=https://web.archive.org/web/20170321152109/http://www.cs.man.ac.uk/~hsimmons/BOOKS/CatTheory.pdf |archive-date=2017-03-21 |url-status=dead }} Notes for a course offered as part of the MSc. in [[Mathematical Logic]], [[Manchester University]].
<!-- Harold Simmons, 2011 CUP book -->
* {{citation <!-- Harold Simmons, 2011 CUP book -->
* {{citation
| last1 = Simmons
| last1 = Simmons
| first1 = Harold
| first1 = Harold
| title = An Introduction to Category Theory
| title = An Introduction to Category Theory
| url = https://www.amazon.com/Introduction-Category-Theory-Harold-Simmons/dp/0521283043/ref=sr_1_
| year = 2011
| year = 2011
| isbn = 978-0521283045
}}.
}}.
* {{cite book |title = Homotopy theory of higher categories |url = https://archive.org/details/arxiv-1001.4071 |last=Simpson |first=Carlos |author-link=Carlos Simpson |arxiv=1001.4071 |bibcode=2010arXiv1001.4071S |year=2010 }}, draft of a book.
* {{cite book |title = Homotopy theory of higher categories |url = https://archive.org/details/arxiv-1001.4071 |last=Simpson |first=Carlos |author-link=Carlos Simpson |arxiv=1001.4071 |bibcode=2010arXiv1001.4071S |year=2010 }}, draft of a book.
* {{cite book |first=Paul |last=Taylor |title=Practical Foundations of Mathematics |url= https://books.google.com/books?id=iSCqyNgzamcC |year=1999 |publisher= Cambridge University Press |isbn = 978-0-521-63107-5 |series = Cambridge Studies in Advanced Mathematics |volume = 59 }}
* {{cite book |first=Paul |last=Taylor |title=Practical Foundations of Mathematics |url= https://books.google.com/books?id=iSCqyNgzamcC |year=1999 |publisher= Cambridge University Press |isbn = 978-0-521-63107-5 |series = Cambridge Studies in Advanced Mathematics |volume = 59 }}
* {{cite web |url = http://www.dcs.ed.ac.uk/home/dt/CT/categories.pdf |title = Category Theory Lecture Notes |last=Turi |first=Daniele |date = 1996–2001 |access-date = 11 December 2009 }} Based on {{harvnb|Mac Lane|1998}}.
* {{cite web |url = http://www.dcs.ed.ac.uk/home/dt/CT/categories.pdf |title = Category Theory Lecture Notes |last=Turi |first=Daniele |date = 1996–2001 |access-date = 11 December 2009 }} Based on {{harvnb|Mac Lane|1998}}.
{{refend}}


==Further reading==
== Further reading ==
{{refbegin}}
* {{cite book |first=Jean-Pierre |last=Marquis |title=From a Geometrical Point of View: A Study of the History and Philosophy of Category Theory |year=2008 |publisher=Springer |isbn=978-1-4020-9384-5}}
* {{cite book |first=Jean-Pierre |last=Marquis |title=From a Geometrical Point of View: A Study of the History and Philosophy of Category Theory |year=2008 |publisher=Springer |isbn=978-1-4020-9384-5}}
{{refend}}


== External links ==
== External links ==
{{Commons category}}
{{Commons category}}
{{wikiquote}}
{{wikiquote}}
{{refbegin}}
* [http://www.tac.mta.ca/tac/ Theory and Application of Categories], an electronic journal of category theory, full text, free, since 1995.
* [http://www.tac.mta.ca/tac/ Theory and Application of Categories], an electronic journal of category theory, full text, free, since 1995.
* [http://ncatlab.org/nlab nLab], a wiki project on mathematics, physics and philosophy with emphasis on the ''n''-categorical point of view.
* [http://ncatlab.org/nlab nLab], a wiki project on mathematics, physics and philosophy with emphasis on the ''n''-categorical point of view.
Line 238: Line 239:
* [https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/ Category Theory for Programmers] A book in blog form explaining category theory for computer programmers.
* [https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/ Category Theory for Programmers] A book in blog form explaining category theory for computer programmers.
* [http://math.mit.edu/~dspivak/teaching/sp18/7Sketches.pdf Introduction to category theory.]
* [http://math.mit.edu/~dspivak/teaching/sp18/7Sketches.pdf Introduction to category theory.]
{{refend}}


{{Areas of mathematics}}
{{Areas of mathematics}}

Latest revision as of 08:05, 7 May 2024

Schematic representation of a category with objects X, Y, Z and morphisms f, g, gf. (The category's three identity morphisms 1X, 1Y and 1Z, if explicitly represented, would appear as three arrows, from the letters X, Y, and Z to themselves, respectively.)

Category theory is a general theory of mathematical structures and their relations that was introduced by Samuel Eilenberg and Saunders Mac Lane in the middle of the 20th century in their foundational work on algebraic topology.[1] Category theory is used in almost all 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. One often says that a morphism is an arrow that maps its source to its target. Morphisms can be composed if the target of the first morphism equals the source of the second one, and morphism composition has similar properties as function composition (associativity and existence of an identity morphisms for each object). Morphisms are often some sort of function, 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 C1 and C2: it maps objects of C1 to objects of C2 and morphisms of C1 to morphisms of C2 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.

Categories, objects, and morphisms[edit]

Categories[edit]

A category C consists of the following three mathematical entities:

  • A class ob(C), whose elements are called objects;
  • A class hom(C), whose elements are called morphisms or maps or arrows.
    Each morphism f has a source object a and target object b.
    The expression f : ab, would be verbally stated as "f is a morphism from a to b".
    The expression hom(a, b) – alternatively expressed as homC(a, b), mor(a, b), or C(a, b) – denotes the hom-class of all morphisms from a to b.
  • A binary operation ∘, called composition of morphisms, such that
    for any three objects a, b, and c, we have
∘ : hom(b, c) × hom(a, b) → hom(a, c).
The composition of f : ab and g : bc is written as gf or gf,[a] governed by two axioms:
1. Associativity: If f : ab, g : bc, and h : cd then
h ∘ (gf) = (hg) ∘ f
2. Identity: For every object x, there exists a morphism 1x : xx (also denoted as idx) called the identity morphism for x,
such that
for every morphism f : ab, we have
1bf = f = f ∘ 1a
From the axioms, it can be proved that there is exactly one identity morphism for every object.

Morphisms[edit]

Relations among morphisms (such as fg = h) are often depicted using commutative diagrams, with "points" (corners) representing objects and "arrows" representing morphisms.

Morphisms can have any of the following properties. A morphism f : ab is a:

  • monomorphism (or monic) if fg1 = fg2 implies g1 = g2 for all morphisms g1, g2 : xa.
  • epimorphism (or epic) if g1f = g2f implies g1 = g2 for all morphisms g1, g2 : bx.
  • bimorphism if f is both epic and monic.
  • isomorphism if there exists a morphism g : ba such that fg = 1b and gf = 1a.[b]
  • endomorphism if a = b. end(a) denotes the class of endomorphisms of a.
  • automorphism if f is both an endomorphism and an isomorphism. aut(a) denotes the class of automorphisms of a.
  • retraction if a right inverse of f exists, i.e. if there exists a morphism g : ba with fg = 1b.
  • section if a left inverse of f exists, i.e. if there exists a morphism g : ba with gf = 1a.

Every retraction is an epimorphism, and every section is a monomorphism. Furthermore, the following three statements are equivalent:

  • f is a monomorphism and a retraction;
  • f is an epimorphism and a section;
  • f is an isomorphism.

Functors[edit]

Functors are structure-preserving maps between categories. They can be thought of as morphisms in the category of all (small) categories.

A (covariant) functor F from a category C to a category D, written F : CD, consists of:

  • for each object x in C, an object F(x) in D; and
  • for each morphism f : xy in C, a morphism F(f) : F(x) → F(y) in D,

such that the following two properties hold:

  • For every object x in C, F(1x) = 1F(x);
  • For all morphisms f : xy and g : yz, F(gf) = F(g) ∘ F(f).

A contravariant functor F: CD is like a covariant functor, except that it "turns morphisms around" ("reverses all the arrows"). More specifically, every morphism f : xy in C must be assigned to a morphism F(f) : F(y) → F(x) in D. In other words, a contravariant functor acts as a covariant functor from the opposite category Cop to D.

Natural transformations[edit]

A natural transformation is a relation between two functors. Functors often describe "natural constructions" and natural transformations then describe "natural homomorphisms" between two such constructions. Sometimes two quite different constructions yield "the same" result; this is expressed by a natural isomorphism between the two functors.

If F and G are (covariant) functors between the categories C and D, then a natural transformation η from F to G associates to every object X in C a morphism ηX : F(X) → G(X) in D such that for every morphism f : XY in C, we have ηYF(f) = G(f) ∘ ηX; this means that the following diagram is commutative:

Commutative diagram defining natural transformations
Commutative diagram defining natural transformations

The two functors F and G are called naturally isomorphic if there exists a natural transformation from F to G such that ηX is an isomorphism for every object X in C.

Other concepts[edit]

Universal constructions, limits, and colimits[edit]

Using the language of category theory, many areas of mathematical study can be categorized. Categories include sets, groups and topologies.

Each category is distinguished by properties that all its objects have in common, such as the empty set or the product of two topologies, yet in the definition of a category, objects are considered atomic, i.e., we do not know whether an object A is a set, a topology, or any other abstract concept. Hence, the challenge is to define special objects without referring to the internal structure of those objects. To define the empty set without referring to elements, or the product topology without referring to open sets, one can characterize these objects in terms of their relations to other objects, as given by the morphisms of the respective categories. Thus, the task is to find universal properties that uniquely determine the objects of interest.

Numerous important constructions can be described in a purely categorical way if the category limit can be developed and dualized to yield the notion of a colimit.

Equivalent categories[edit]

It is a natural question to ask: under which conditions can two categories be considered essentially the same, in the sense that theorems about one category can readily be transformed into theorems about the other category? The major tool one employs to describe such a situation is called equivalence of categories, which is given by appropriate functors between two categories. Categorical equivalence has found numerous applications in mathematics.

Further concepts and results[edit]

The definitions of categories and functors provide only the very basics of categorical algebra; additional important topics are listed below. Although there are strong interrelations between all of these topics, the given order can be considered as a guideline for further reading.

  • The functor category DC has as objects the functors from C to D and as morphisms the natural transformations of such functors. The Yoneda lemma is one of the most famous basic results of category theory; it describes representable functors in functor categories.
  • Duality: Every statement, theorem, or definition in category theory has a dual which is essentially obtained by "reversing all the arrows". If one statement is true in a category C then its dual is true in the dual category Cop. This duality, which is transparent at the level of category theory, is often obscured in applications and can lead to surprising relationships.
  • Adjoint functors: A functor can be left (or right) adjoint to another functor that maps in the opposite direction. Such a pair of adjoint functors typically arises from a construction defined by a universal property; this can be seen as a more abstract and powerful view on universal properties.

Higher-dimensional categories[edit]

Many of the above concepts, especially equivalence of categories, adjoint functor pairs, and functor categories, can be situated into the context of higher-dimensional categories. Briefly, if we consider a morphism between two objects as a "process taking us from one object to another", then higher-dimensional categories allow us to profitably generalize this by considering "higher-dimensional processes".

For example, a (strict) 2-category is a category together with "morphisms between morphisms", i.e., processes which allow us to transform one morphism into another. We can then "compose" these "bimorphisms" both horizontally and vertically, and we require a 2-dimensional "exchange law" to hold, relating the two composition laws. In this context, the standard example is Cat, the 2-category of all (small) categories, and in this example, bimorphisms of morphisms are simply natural transformations of morphisms in the usual sense. Another basic example is to consider a 2-category with a single object; these are essentially monoidal categories. Bicategories are a weaker notion of 2-dimensional categories in which the composition of morphisms is not strictly associative, but only associative "up to" an isomorphism.

This process can be extended for all natural numbers n, and these are called n-categories. There is even a notion of ω-category corresponding to the ordinal number ω.

Higher-dimensional categories are part of the broader mathematical field of higher-dimensional algebra, a concept introduced by Ronald Brown. For a conversational introduction to these ideas, see John Baez, 'A Tale of n-categories' (1996).

Historical notes[edit]

It should be observed first that the whole concept of a category is essentially an auxiliary one; our basic concepts are essentially those of a functor and of a natural transformation [...]

— Eilenberg and Mac Lane (1945) [2]

Whilst specific examples of functors and natural transformations had been given by Samuel Eilenberg and Saunders Mac Lane in a 1942 paper on group theory,[3] these concepts were introduced in a more general sense, together with the additional notion of categories, in a 1945 paper by the same authors[2] (who discussed applications of category theory to the field of algebraic topology).[4] Their work was an important part of the transition from intuitive and geometric homology to homological algebra, Eilenberg and Mac Lane later writing that their goal was to understand natural transformations, which first required the definition of functors, then categories.

Stanislaw Ulam, and some writing on his behalf, have claimed that related ideas were current in the late 1930s in Poland. Eilenberg was Polish, and studied mathematics in Poland in the 1930s. Category theory is also, in some sense, a continuation of the work of Emmy Noether (one of Mac Lane's teachers) in formalizing abstract processes;[5] Noether realized that understanding a type of mathematical structure requires understanding the processes that preserve that structure (homomorphisms).[citation needed] Eilenberg and Mac Lane introduced categories for understanding and formalizing the processes (functors) that relate topological structures to algebraic structures (topological invariants) that characterize them.

Category theory was originally introduced for the need of homological algebra, and widely extended for the need of modern algebraic geometry (scheme theory). Category theory may be viewed as an extension of universal algebra, as the latter studies algebraic structures, and the former applies to any kind of mathematical structure and studies also the relationships between structures of different nature. For this reason, it is used throughout mathematics. Applications to mathematical logic and semantics (categorical abstract machine) came later.

Certain categories called topoi (singular topos) can even serve as an alternative to axiomatic set theory as a foundation of mathematics. A topos can also be considered as a specific type of category with two additional topos axioms. These foundational applications of category theory have been worked out in fair detail as a basis for, and justification of, constructive mathematics. Topos theory is a form of abstract sheaf theory, with geometric origins, and leads to ideas such as pointless topology.

Categorical logic is now a well-defined field based on type theory for intuitionistic logics, with applications in functional programming and domain theory, where a cartesian closed category is taken as a non-syntactic description of a lambda calculus. At the very least, category theoretic language clarifies what exactly these related areas have in common (in some abstract sense).

Category theory has been applied in other fields as well, see applied category theory. For example, John Baez has shown a link between Feynman diagrams in physics and monoidal categories.[6] Another application of category theory, more specifically topos theory, has been made in mathematical music theory, see for example the book The Topos of Music, Geometric Logic of Concepts, Theory, and Performance by Guerino Mazzola.

More recent efforts to introduce undergraduates to categories as a foundation for mathematics include those of William Lawvere and Rosebrugh (2003) and Lawvere and Stephen Schanuel (1997) and Mirroslav Yotov (2012).

See also[edit]

Notes[edit]

  1. ^ Some authors compose in the opposite order, writing fg or fg for gf. Computer scientists using category theory very commonly write f ; g for gf
  2. ^ A morphism that is both epic and monic is not necessarily an isomorphism. An elementary counterexample: in the category consisting of two objects A and B, the identity morphisms, and a single morphism f from A to B, f is both epic and monic but is not an isomorphism.

References[edit]

Citations[edit]

  1. ^ Marquis, Jean-Pierre (2023), Zalta, Edward N.; Nodelman, Uri (eds.), "Category Theory", The Stanford Encyclopedia of Philosophy (Fall 2023 ed.), Metaphysics Research Lab, Stanford University, retrieved 2024-04-23
  2. ^ a b Eilenberg, Samuel; Mac Lane, Saunders (1945). "General theory of natural equivalences" (PDF). Transactions of the American Mathematical Society. 58: 247. doi:10.1090/S0002-9947-1945-0013131-6. ISSN 0002-9947. Archived (PDF) from the original on 2022-10-10.
  3. ^ Eilenberg, S.; Mac Lane, S. (1942). "Group Extensions and Homology". Annals of Mathematics. 43 (4): 757–831. doi:10.2307/1968966. ISSN 0003-486X. JSTOR 1968966 – via JSTOR.
  4. ^ Marquis, Jean-Pierre (2019). "Category Theory". Stanford Encyclopedia of Philosophy. Department of Philosophy, Stanford University. Retrieved 26 September 2022.
  5. ^ Reck, Erich (2020). The Prehistory of Mathematical Structuralism (1st ed.). Oxford University Press. pp. 215–219. ISBN 9780190641221.
  6. ^ Baez, J.C.; Stay, M. (2010). "Physics, Topology, Logic and Computation: A Rosetta Stone". New Structures for Physics. Lecture Notes in Physics. Vol. 813. pp. 95–172. arXiv:0903.0340. doi:10.1007/978-3-642-12821-9_2. ISBN 978-3-642-12820-2. S2CID 115169297.

Sources[edit]

Further reading[edit]

  • Marquis, Jean-Pierre (2008). From a Geometrical Point of View: A Study of the History and Philosophy of Category Theory. Springer. ISBN 978-1-4020-9384-5.

External links[edit]