Functor

From Maths
Revision as of 14:59, 2 February 2016 by Alec (Talk | contribs) (Created page with "==Definition== Functors come in two flavours: # Covariant functor # Contravariant functor Typically "functor" refers to a covariant functor when used by itself{{rA...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

Functors come in two flavours:

  1. Covariant functor
  2. Contravariant functor

Typically "functor" refers to a covariant functor when used by itself[1].

Covariant functor

A covariant functor, [ilmath]T:C\leadsto D[/ilmath] (for categories [ilmath]C[/ilmath] and [ilmath]D[/ilmath]) is a pair of mappings[1]:

  • [ilmath]T:\left\{\begin{array}{rcl}\text{Obj}(C) & \longrightarrow & \text{Obj}(D)\\ X & \longmapsto & TX \end{array}\right.[/ilmath]
  • [ilmath]T:\left\{\begin{array}{rcl}\text{Mor}(C) & \longrightarrow & \text{Mor}(D)\\ f & \longmapsto & Tf \end{array}\right.[/ilmath]

Which preserve composition of morphisms and the identity morphism of each object, that is to say:

  • [ilmath]\forall f,g\in\text{Mor}(C)[Tfg=T(f\circ g)=Tf\circ Tg=TfTg][/ilmath] (I've added the [ilmath]\circ[/ilmath]s in to make it more obvious to the reader what is going on)
    • Where such composition makes sense. That is [ilmath]\text{target}(g)=\text{source}(f)[/ilmath].
  • and [ilmath]\forall A\in\text{Obj}(C)[T1_A=1_{TA}][/ilmath]

Thus if [ilmath]f:X\rightarrow Y[/ilmath] and [ilmath]g:Y\rightarrow Z[/ilmath] are morphisms of [ilmath]C[/ilmath], then the following diagram commutes:

[ilmath]\begin{xy}\xymatrix{TX \ar[rr]^{Tgf} \ar[dr]_{Tf} & & TZ \\ & TY \ar[ur]_{Tg} & }\end{xy}[/ilmath]

Thus the diagram just depicts the requirement that:

  • [ilmath]=Tgf=Tg\circ Tf[/ilmath]
[ilmath]\ [/ilmath] Note that the diagram is
basically just the "image" of

[ilmath]\begin{xy}\xymatrix{X \ar[rr]^{gf} \ar[dr]_{f} & & Z \\ & Y \ar[ur]_{g} & }\end{xy}[/ilmath]
under [ilmath]T[/ilmath]

Contravariant functor

A covariant functor, [ilmath]S:C\leadsto D[/ilmath] (for categories [ilmath]C[/ilmath] and [ilmath]D[/ilmath]) is a pair of mappings[1]:

  • [ilmath]S:\left\{\begin{array}{rcl}\text{Obj}(C) & \longrightarrow & \text{Obj}(D)\\ X & \longmapsto & SX \end{array}\right.[/ilmath]
  • [ilmath]S:\left\{\begin{array}{rcl}\text{Mor}(C) & \longrightarrow & \text{Mor}(D)\\ f & \longmapsto & Sf \end{array}\right.[/ilmath]
    • Note that if [ilmath]f:A\rightarrow B[/ilmath] then [ilmath]Sf:B\rightarrow A[/ilmath]

Which preserves only the identity morphism of each object - it reverses composition of morphisms, that is to say:

  • [ilmath]\forall f,g\in\text{Mor}(C)[Sgf=S(g\circ f)=Sf\circ Sg=SfSg][/ilmath] (I've added the [ilmath]\circ[/ilmath]s in to make it more obvious to the reader what is going on)
    • Where such composition makes sense. That is [ilmath]\text{target}(f)=\text{source}(g)[/ilmath].
  • and [ilmath]\forall A\in\text{Obj}(C)[S1_A=1_{SA}][/ilmath]

Thus if [ilmath]f:X\rightarrow Y[/ilmath] and [ilmath]g:Y\rightarrow Z[/ilmath] are morphisms of [ilmath]C[/ilmath], then the following diagram commutes:

[ilmath]\begin{xy}\xymatrix{SX & & SZ \ar[ll]_{Sgf} \ar[dl]^{Sg}\\ & SY \ar[ul]^{Sf} & }\end{xy}[/ilmath]

Thus the diagram just depicts the requirement that:

  • [ilmath]=Sgf=Sf\circ Sg[/ilmath]
[ilmath]\ [/ilmath] Note that the diagram is
similar to

[ilmath]\begin{xy}\xymatrix{X \ar[rr]^{gf} \ar[dr]_{f} & & Z \\ & Y \ar[ur]_{g} & }\end{xy}[/ilmath]

Discussion


TODO: Flesh this out


References

  1. 1.0 1.1 1.2 Algebra I: Rings, modules and categories - Carl Faith