Functor

From Maths
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, T:CD (for categories C and D) is a pair of mappings[1]:

  • T:{Obj(C)Obj(D)XTX
  • T:{Mor(C)Mor(D)fTf

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

  • f,gMor(C)[Tfg=T(fg)=TfTg=TfTg] (I've added the s in to make it more obvious to the reader what is going on)
    • Where such composition makes sense. That is target(g)=source(f).
  • and AObj(C)[T1A=1TA]

Thus if f:XY and g:YZ are morphisms of C, then the following diagram commutes:

Thus the diagram just depicts the requirement that:

  • =Tgf=TgTf
  Note that the diagram is
basically just the "image" of


under T

Contravariant functor

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

  • S:{Obj(C)Obj(D)XSX
  • S:{Mor(C)Mor(D)fSf
    • Note that if f:AB then Sf:BA

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

  • f,gMor(C)[Sgf=S(gf)=SfSg=SfSg] (I've added the s in to make it more obvious to the reader what is going on)
    • Where such composition makes sense. That is target(f)=source(g).
  • and AObj(C)[S1A=1SA]

Thus if f:XY and g:YZ are morphisms of C, then the following diagram commutes:

Thus the diagram just depicts the requirement that:

  • =Sgf=SfSg
  Note that the diagram is
similar to

Discussion


TODO: Flesh this out


References

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