Functor

cosmos 11th November 2017 at 12:56pm
Category theory

A functor is a “Morphism of categories”. Informally, they are like functions of functions (~meteafunctions~), because basically, they map arrows to arrows (which often can be interpreted as functions)

More precisely, a functor F:CDF: C \to D (where CC and DD are Categoryes) is given by:

  • An object-map, assigning an object FAFA of DD to every object AA of CC.
  • An arrow-map, assigning an arrow Ff:FAFBFf: FA \to FB of DD to every arrow f:ABf: A \to B of CC, in such a way that composition and identities are preserved: F(gf)=FgFgF(g \circ f) = Fg \circ Fg, FidA=idFAF id_A = id_{FA}. These two conditions are called functoriality conditions.

Examples

Functors between Preorders are Monotone functions. Functors between Monoids are Monoid homomorphisms

The covariant powerset functor P:SetSet\mathcal{P}: \mathbf{Set} \to \mathbf{Set}:

XP(X)X \mapsto \mathcal{P}(X),
(f:XY)P(f):=SSX{f(x)xS}(f: X \to Y) \mapsto \mathcal{P}(f) := S \mapsto S \subseteq X \mapsto \{f(x) | x \in S\}

That is it maps functions between sets to the functions between subsets corresponding to the Image of a subset

The 'forgetful' or 'underlying' functor which sends a monoid to its set of elements, 'forgetting' the algebraic structure, and sends a homomorphism to the corresponding function between sets.

Group theory: The assignment of the commutator sub-group of a group extends to a functor from Group to Group; and the assignment of the quotient by this normal subgroup extends to a functor from Group to AbGroup. The assignment of the centraliser of a group does not!

Homology. The basic idea of algebraic topology is that there are functorial assignments of algebraic objects (e.g. groups) to topological spaces, and variants of this idea (‘(co)homology theories’) are pervasive throughout modern pure mathematics.

Covariant functor refers to the definition of functor above

Contravariant functor F:CDF: C \to D is a Covariant functor from the Opposite category to CC, to DD. For example

  • the functor taking functions between sets to the Preimage function between sets.
  • Dual space functor on vector spaces.
  • Cohomology

A Group action can be seen as a functor from a group to a set where arrows will become bijections.

I guess a Group representation is also a functor

Functor of several variable

Functors defined on Product category.


In Functional programming a lot of Data structures can be seen as functors.

List is a functor from set to {collection of lists from elements of the set} and from functions on the set to map-like functions on the list.

Hom-functors

For each object in a category there is a functor we can define.

Can also define contravariant and bivariant functors..


Categorical product can be turned into functors.


Properties of functors

See here