Definition:Functor

From ProofWiki
(Redirected from Definition:Object Functor)
Jump to navigation Jump to search



Definition

Informally, a functor is a morphism of categories.

It may be described as what one must define in order to define a natural transformation.

This is formalized by defining the category of categories.


Covariant Functor

Let $\mathbf C$ and $\mathbf D$ be metacategories.


A covariant functor $F: \mathbf C \to \mathbf D$ consists of:

  • An object functor $F_0$ that assigns to each object $X$ of $\mathbf C$ an object $FX$ of $\mathbf D$.
  • An arrow functor $F_1$ that assigns to each arrow $f: X \to Y$ of $\mathbf C$ an arrow $Ff : FX \to FY$ of $\mathbf D$.


These functors must satisfy, for any morphisms $X \stackrel f \longrightarrow Y \stackrel g \longrightarrow Z$ in $\mathbf C$:

$\map F {g \circ f} = F g \circ F f$

and:

$\map F {\operatorname {id}_X} = \operatorname{id}_{F X}$

where $\operatorname {id}_W$ denotes the identity arrow on an object $W$, and $\circ$ is the composition of morphisms.


The behaviour of a covariant functor can be pictured as follows:

$\begin{xy} <4em,4em>*{\mathbf C} = "C", <0em,0em>*+{X} = "a", <4em,0em>*+{Y} = "b", <4em,-4em>*+{Z}= "c", "a";"b" **@{-} ?>*@{>} ?<>(.5)*!/_1em/{f}, "b";"c" **@{-} ?>*@{>} ?<>(.5)*!/_1em/{g}, "a";"c" **@{-} ?>*@{>} ?<>(.5)*!/^1em/{g \circ f}, "C"+/r9em/*{\mathbf D}, "C"+/r2em/;"C"+/r6em/ **@{-} ?>*@{>} ?*!/_1em/{F}, "b"+/r2em/+/_2em/;"b"+/r6em/+/_2em/ **@{~} ?>*@2{>} ?<>(.5)*!/_.6em/{F}, "a"+/r13em/*+{FX}="Fa", "b"+/r13em/*+{FY}="Fb", "c"+/r13em/*+{FZ}="Fc", "Fa";"Fb" **@{-} ?>*@{>} ?<>(.5)*!/_1em/{Ff}, "Fb";"Fc" **@{-} ?>*@{>} ?<>(.5)*!/_1em/{Fg}, "Fa";"Fc" **@{-} ?>*@{>} ?<>(.7)*!/r3em/{F \left({g \circ f}\right) = \\ Fg \circ Ff}, \end{xy}$


Contravariant Functor

Let $\mathbf C$ and $\mathbf D$ be metacategories.


A contravariant functor $F : \mathbf C \to \mathbf D$ consists of:

  • An object functor $F_0$ that assigns to each object $X$ of $\mathbf C$ an object $FX$ of $\mathbf D$.
  • An arrow functor $F_1$ that assigns to each arrow $f : X \to Y$ of $\mathbf C$ an arrow $Ff : FY \to FX$ of $\mathbf D$.


These functors must satisfy, for any morphisms $X \stackrel f \longrightarrow Y \stackrel g \longrightarrow Z$ in $\mathbf C$:

$\map F {g \circ f} = F f \circ F g$

and:

$\map F {\operatorname {id}_X} = \operatorname {id}_{F X}$

where:

$\operatorname {id}_W$ denotes the identity arrow on an object $W$

and:

$\circ$ is the composition of morphisms.


Co- and Contravariance

Both covariant and contravariant functors are paramount in all of contemporary mathematics.

The intention behind defining a functor is to formalise and abstract the intuitive notion of "preserving structure".

Functors thus can be understood as a generalisation of the concept of homomorphism in all its instances.


This explains why one would be led to contemplate covariant functors.

However, certain "natural" operations like transposing a matrix do not preserve the structure as rigidly as a homomorphism (we do have Transpose of Matrix Product, however).

Because of the abundant nature of this type of operation, the concept of a contravariant functors was invented to capture their behaviour as well.


Also see


Sources