Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Functor
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Definition == [[File:Commutative_diagram_for_morphism.svg|thumb|A category with objects X, Y, Z and morphisms f, g, g โ f]] [[File:Commutative_diagram_of_a_functor.svg|thumb|Functor <math>F</math> must preserve the composition of morphisms <math>g</math> and <math>f</math>]] Let ''C'' and ''D'' be [[category (mathematics)|categories]]. A '''functor''' ''F'' from ''C'' to ''D'' is a mapping that{{sfnp|Jacobson|2009|loc=p. 19, def. 1.2}} * associates each [[Mathematical object|object]] <math>X</math> in ''C'' to an object <math>F(X)</math> in ''D'', * associates each [[morphism]] <math>f \colon X \to Y</math> in ''C'' to a morphism <math>F(f) \colon F(X) \to F(Y)</math> in ''D'' such that the following two conditions hold: ** <math>F(\mathrm{id}_{X}) = \mathrm{id}_{F(X)}\,\!</math> for every object <math>X</math> in ''C'', ** <math>F(g \circ f) = F(g) \circ F(f)</math> for all morphisms <math>f \colon X \to Y\,\!</math> and <math>g \colon Y\to Z</math> in ''C''. That is, functors must preserve [[Morphism#Definition|identity morphisms]] and [[Function composition|composition]] of morphisms. === Covariance and contravariance === {{See also|Covariance and contravariance (computer science)}} There are many constructions in mathematics that would be functors but for the fact that they "turn morphisms around" and "reverse composition". We then define a '''contravariant functor''' ''F'' from ''C'' to ''D'' as a mapping that *associates each object <math>X</math> in ''C'' with an object <math>F(X)</math> in ''D'', *associates each morphism <math>f \colon X\to Y</math> in ''C'' with a morphism <math>F(f) \colon F(Y) \to F(X)</math> in ''D'' such that the following two conditions hold: **<math>F(\mathrm{id}_X) = \mathrm{id}_{F(X)}\,\!</math> for every object <math>X</math> in ''C'', **<math>F(g \circ f) = F(f) \circ F(g)</math> for all morphisms <math>f \colon X\to Y</math> and <math>g \colon Y\to Z</math> in ''C''. Variance of functor (composite){{sfnp|Simmons|2011|loc=Exercise 3.1.4}} *The composite of two functors of the same variance: **<math>\mathrm{Covariant} \circ \mathrm{Covariant} \to \mathrm{Covariant}</math> **<math>\mathrm{Contravariant} \circ \mathrm{Contravariant} \to \mathrm{Covariant}</math> *The composite of two functors of opposite variance: **<math>\mathrm{Covariant} \circ \mathrm{Contravariant} \to \mathrm{Contravariant}</math> **<math>\mathrm{Contravariant} \circ \mathrm{Covariant} \to \mathrm{Contravariant}</math> Note that contravariant functors reverse the direction of composition. Ordinary functors are also called '''covariant functors''' in order to distinguish them from contravariant ones. Note that one can also define a contravariant functor as a ''covariant'' functor on the [[opposite category]] <math>C^\mathrm{op}</math>.{{sfnp|Jacobson|2009|pp=19โ20}} Some authors prefer to write all expressions covariantly. That is, instead of saying <math>F \colon C\to D</math> is a contravariant functor, they simply write <math>F \colon C^{\mathrm{op}} \to D</math> (or sometimes <math>F \colon C \to D^{\mathrm{op}}</math>) and call it a functor. Contravariant functors are also occasionally called ''cofunctors''.<ref name="Popescu1979">{{cite book|last1=Popescu|first1=Nicolae|last2=Popescu|first2=Liliana|title=Theory of categories|date=1979|publisher=Springer|location=Dordrecht|isbn=9789400995505|page=12|url=https://books.google.com/books?id=YnHwCAAAQBAJ&q=cofunctor+covariant&pg=PA12|access-date=23 April 2016}}</ref> There is a convention which refers to "vectors"โi.e., [[vector field]]s, elements of the space of sections <math>\Gamma(TM)</math> of a [[tangent bundle]] <math>TM</math>โas "contravariant" and to "covectors"โi.e., [[1-forms]], elements of the space of sections <math>\Gamma\mathord\left(T^*M\right)</math> of a [[cotangent bundle]] <math>T^*M</math>โas "covariant". This terminology originates in physics, and its rationale has to do with the position of the indices ("upstairs" and "downstairs") in [[Einstein summation|expressions]] such as <math>{x'}^{\,i} = \Lambda^i_j x^j</math> for <math>\mathbf{x}' = \boldsymbol{\Lambda}\mathbf{x}</math> or <math>\omega'_i = \Lambda^j_i \omega_j</math> for <math>\boldsymbol{\omega}' = \boldsymbol{\omega}\boldsymbol{\Lambda}^\textsf{T}.</math> In this formalism it is observed that the coordinate transformation symbol <math>\Lambda^j_i</math> (representing the matrix <math>\boldsymbol{\Lambda}^\textsf{T}</math>) acts on the "covector coordinates" "in the same way" as on the basis vectors: <math>\mathbf{e}_i = \Lambda^j_i\mathbf{e}_j</math>โwhereas it acts "in the opposite way" on the "vector coordinates" (but "in the same way" as on the basis covectors: <math>\mathbf{e}^i = \Lambda^i_j \mathbf{e}^j</math>). This terminology is contrary to the one used in category theory because it is the covectors that have ''pullbacks'' in general and are thus ''contravariant'', whereas vectors in general are ''covariant'' since they can be ''pushed forward''. See also [[Covariance and contravariance of vectors]]. === Opposite functor === Every functor <math>F \colon C\to D</math> induces the '''opposite functor''' <math>F^\mathrm{op} \colon C^\mathrm{op}\to D^\mathrm{op}</math>, where <math>C^\mathrm{op}</math> and <math>D^\mathrm{op}</math> are the [[opposite category|opposite categories]] to <math>C</math> and <math>D</math>.<ref>{{citation|first1=Saunders|last1=Mac Lane|author-link1=Saunders Mac Lane|first2=Ieke|last2=Moerdijk|author-link2=Ieke Moerdijk|title=Sheaves in geometry and logic: a first introduction to topos theory|publisher=Springer|year=1992|isbn=978-0-387-97710-2}}</ref> By definition, <math>F^\mathrm{op}</math> maps objects and morphisms in the identical way as does <math>F</math>. Since <math>C^\mathrm{op}</math> does not coincide with <math>C</math> as a category, and similarly for <math>D</math>, <math>F^\mathrm{op}</math> is distinguished from <math>F</math>. For example, when composing <math>F \colon C_0\to C_1</math> with <math>G \colon C_1^\mathrm{op}\to C_2</math>, one should use either <math>G\circ F^\mathrm{op}</math> or <math>G^\mathrm{op}\circ F</math>. Note that, following the property of [[opposite category]], <math>\left(F^\mathrm{op}\right)^\mathrm{op} = F</math>. === Bifunctors and multifunctors === A '''bifunctor''' (also known as a '''binary functor''') is a functor whose domain is a [[product category]]. For example, the [[Hom functor]] is of the type {{nowrap|''C<sup>op</sup>'' ร ''C'' โ '''Set'''}}. It can be seen as a functor in ''two'' arguments; it is contravariant in one argument, covariant in the other. A '''multifunctor''' is a generalization of the functor concept to ''n'' variables. So, for example, a bifunctor is a multifunctor with {{nowrap|1=''n'' = 2}}.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)