A functor is a homomorphism of categories.
A functor between small categories is a homomorphism of the underlying graphs that respects the composition of edges.
So, for , two categories, a functor consists of
a component-function of sets of morphisms
or equivalently:
for each pair of objects, a component-function
between hom-sets;
such that:
it respects source and target of morphisms: coincides with on source and target objects;
it respects identity morphisms: ;
it respects composition: the image of the composite of two morphisms under is the composite of their images.
These last two properties are the decisive ones of a functor; they are called the functoriality conditions. These are a direct generalization of the notion of homomorphism (of monoids, groups, algebras, etc.) to the case that there are more objects. As a slogan:
The notion of functor is a horizontal categorification of that of homomorphism.
A functor from a category to a category is a map sending each object to an object and each morphism in to morphism in , such that
preserves composition: whenever the left-hand side is well-defined,
preserves identity morphisms: for each object , .
Or equivalently, since compositions (commuting triangles) and identities (commuting loops) are both simple commuting diagrams, we can combine the above conditions to the single statement
Given morphisms , , and , declaring the triangle commutes amounts to declaring
In this case, for to preserve the commutative triangle means
as depicted below
Preserving commuting triangles means preserves compositions.
Given morphisms , , and , declaring the loop commutes amounts to declaring
In this case, for to preserve the commutative loop means
as depicted below
However, it means more than that. Since any commutative loop is equal to the identity morphism, we must also have
implying
Preserving commuting loops means preserves identity morphisms.
Another equivalent way to say this is that a functor is precisely a morphism of simplicial sets between the nerves of these categories
the objects of and are the 0-cells of and , so maps objects of to objects of ;
the morphisms of and are the 1-cells of and , so maps morphisms of to objects of ;
the identity morphisms of and are the degenerate 1-cells of and , so the fact that respects degeneracy maps means that respects identities;
the commuting triangles of and are the 2-cells of and , so the fact that maps 2-cells to 2-cells means that it respects commuting triangles, hence that it respects composition.
See nerve for more details on this.
The functors between two categories and form themselves a category, the functor category , whose morphisms are natural transformations. Equipped with these functor categories as hom-objects, we have a -category Cat of categories, functors and natural transformations. In other words, functors are morphisms in .
If and are internal categories in some ambient category , then an internal functor is
a morphism of objects in ;
a morphisms of morphisms in ;
such that the following diagrams commute
respect for the source map: ;
respect for the target map: ;
respect for identities ;
respect for composition .
This reproduces the external definition of functors above for small categories, which are categories internal to Set
In many cases, this notion is too restrictive, and we should use internal anafunctors instead.
In enriched category theory a functor maps not hom-sets but the given hom-objects to each other, in a way that respects their composition. This is described at
A generalization of the notion of enriched functor is the notion of profunctor.
In higher category theory there are corresponding higher notions of functor, such as
See also an informal discussion about an experimental alternative definition of functor.
Note: the HoTT book calls a category a “precategory” and a univalent category a “category”, but here we shall refer to the standard terminology of “category” and “univalent category” respectively.
The definition of functor in homotopy type theory is a straightforward translation of the ordinary one. However, the notion of univalent category allows us to construct some such functors that in classical mathematics would require either the axiom of choice or the use of anafunctors.
Let and be categories. Informally, a functor consists of
Formally, the type of functors from to is
A formal definition in Coq can be found in Ahrens-Kapulkin-Shulman 13.
These properties come from the HoTT book.
By induction on identity, a functor also preserves (See category).
For functors and , their composite is given by
Composition of functors is associative .
Proof: Since composition of functions is associative, this follows immediately for the actions on objects and on homs. And since hom-sets are sets, the rest of the data is automatic.
Lemma 9.2.9 is coherent, i.e. the following pentagon of equalities commutes:
Specific types of functors are important in applications. See for instance
And for more background on this see stuff, structure, property.
For monoids or groups, let , , be the corresponding one-object categories (as described at delooping). Then functors
are canonically in bijection with monoid homomorphisms and accordingly functors
are canonically in bijection with group homomorphisms .
With as above, functors on with values in Vect are the same as linear representations of the group . In fact, we have a canonical isomorphism of categories
of the functor category with the representation category.
Let and be one-object categories whose objects are each finite-dimensional vector space and whose morphisms are all of the linear endomorphisms on that space, i.e. one-object full subcategories of .
If the linear map has a left inverse, i.e.
where is the preimage, then we can construct a functor
by defining its action on objects by
where on the right-hand side is the image and its action on endomorphisms by
Composition follows immediately
Identity morphisms are preserved since for any vector in , then
for some vector in and we have
so that
as required. Hence, is a functor.
If the linear map has a right inverse, i.e.
where is the preimage, then we can construct a functor
by defining its action on objects by
where on the right-hand side is preimage, and its action on endomorphisms by
Composition follows immediately
Identity morphisms are preserved since for any vector in , then
for some vector in and we have
so that
as required. Hence, is a functor.
Functors with values in Set are also called presheaves. As such one calls them presheaves on the opposite category of . See presheaf for more on this.
For a category, and an object, and any other object, a morphism may be regarded as a generalized element of , written (For this language applied to the category Set of sets see ETCS. For the general case see type theory).
The set of generalized elements of an object is thus the union of hom-sets .
While a morphism in an arbitrary category need not at all come to us as a function of sets, it always induces a function of sets of generalized elements : it sends the generalized element of to the generalized element
of , using the composition of the morphism with the morphism in .
In terms of this notation, the functoriality condition on a functor , which is
appears as
This can be illustrated in the following diagram
which provides an alternative expression of the functoriality condition as simply a statement that commuting diagrams in map to commuting diagrams in .
functor
basic properties of…
Textbook accounts:
Saunders MacLane, §I.3 of: Categories for the Working Mathematician, Graduate Texts in Mathematics 5 Springer (1971, second ed. 1997) [doi:10.1007/978-1-4757-4721-8]
Francis Borceux, Section 1.2 in: Handbook of Categorical Algebra Vol. 1: Basic Category Theory [doi:10.1017/CBO9780511525858]
See also the references at:
André Joyal‘s CatLab: Functors
For functors in homotopy type theory
Benedikt Ahrens, Chris Kapulkin, Michael Shulman, section 4 of Univalent categories and the Rezk completion, Mathematical Structures in Computer Science 25.5 (2015): 1010-1039 (arXiv:1303.0584)
Univalent Foundations Project, section 9.2 of Homotopy Type Theory – Univalent Foundations of Mathematics, IAS 2013
Coq code formalizing the concept of functors includes the following:
Formalization in cubical Agda:
Last revised on February 24, 2024 at 07:26:58. See the history of this page for a list of all contributions to it.