Category Theory

🔢Category Theory Unit 4 – Functors and Functor Categories

Functors are the backbone of category theory, serving as structure-preserving maps between categories. They maintain relationships between objects and morphisms, allowing us to study how different categories relate and how structures transfer between them. Functor categories take this concept further, treating functors as objects and natural transformations as morphisms. This higher-level perspective enables us to analyze relationships between categories themselves, providing powerful tools for abstract mathematics and theoretical computer science.

What Are Functors?

  • Functors are structure-preserving maps between categories that maintain the categorical structure
  • Consist of two components: an object function that maps objects from one category to objects in another category, and a morphism function that maps morphisms between objects in a way that respects composition and identity
  • Can be thought of as a way to transform objects and morphisms from one category to another while preserving the essential structure and relationships
  • Enable us to study how different categories relate to each other and how structures can be transferred between them
  • Play a fundamental role in category theory and have applications in various areas of mathematics and computer science
    • Used in functional programming to represent computations with context (e.g.,
      Maybe
      ,
      List
      ,
      IO
      functors in Haskell)
    • Used in algebraic topology to study invariants and properties of topological spaces
  • Functors can be composed, allowing for the creation of complex transformations between categories by combining simpler functors
  • The concept of functors is a generalization of the notion of homomorphisms between algebraic structures (groups, rings, vector spaces)

Types of Functors

  • Covariant Functors: Preserve the direction of morphisms, mapping morphisms from ABA \to B in the source category to morphisms F(A)F(B)F(A) \to F(B) in the target category
  • Contravariant Functors: Reverse the direction of morphisms, mapping morphisms from ABA \to B in the source category to morphisms F(B)F(A)F(B) \to F(A) in the target category
  • Endofunctors: Functors that map a category to itself, i.e., the source and target categories are the same
  • Faithful Functors: Injective on morphisms, i.e., distinct morphisms in the source category are mapped to distinct morphisms in the target category
  • Full Functors: Surjective on morphisms, i.e., every morphism in the target category is the image of some morphism in the source category
    • Fully Faithful Functors: Both faithful and full, providing an embedding of the source category into the target category
  • Forgetful Functors: Map from a category of algebraic structures to a category with fewer constraints, "forgetting" some structure (e.g., from
    Group
    to
    Set
    )
  • Free Functors: Left adjoint to forgetful functors, "freely" generating an algebraic structure from a less constrained category (e.g., from
    Set
    to
    Group
    )

Functor Laws and Properties

  • Identity Law: Functors preserve identity morphisms, i.e., for any object AA in the source category, F(idA)=idF(A)F(id_A) = id_{F(A)}
  • Composition Law: Functors preserve composition of morphisms, i.e., for any morphisms f:ABf: A \to B and g:BCg: B \to C in the source category, F(gf)=F(g)F(f)F(g \circ f) = F(g) \circ F(f)
  • Functors preserve isomorphisms: If f:ABf: A \to B is an isomorphism in the source category, then F(f):F(A)F(B)F(f): F(A) \to F(B) is an isomorphism in the target category
  • Functors preserve commutative diagrams: If a diagram commutes in the source category, its image under a functor will also commute in the target category
  • Functors preserve limits and colimits: If a limit (or colimit) exists in the source category, its image under a functor will be a limit (or colimit) in the target category
    • This property allows for the transfer of universal constructions between categories
  • Functors preserve monomorphisms and epimorphisms: If ff is a monomorphism (or epimorphism) in the source category, then F(f)F(f) is a monomorphism (or epimorphism) in the target category
  • Functors can be naturally isomorphic: Two functors F,G:CDF, G: \mathcal{C} \to \mathcal{D} are naturally isomorphic if there exists a natural transformation α:FG\alpha: F \Rightarrow G such that each component αA:F(A)G(A)\alpha_A: F(A) \to G(A) is an isomorphism in D\mathcal{D}

Functor Categories Explained

  • A functor category is a category whose objects are functors and whose morphisms are natural transformations between functors
  • Given two categories C\mathcal{C} and D\mathcal{D}, the functor category [C,D][\mathcal{C}, \mathcal{D}] (or DC\mathcal{D}^\mathcal{C}) has:
    • Objects: Functors F:CDF: \mathcal{C} \to \mathcal{D}
    • Morphisms: Natural transformations α:FG\alpha: F \Rightarrow G between functors F,G:CDF, G: \mathcal{C} \to \mathcal{D}
  • Composition of morphisms in a functor category is given by the vertical composition of natural transformations
  • The identity morphism for each object (functor) in a functor category is the identity natural transformation
  • Functor categories inherit properties from the target category D\mathcal{D}, such as being complete, cocomplete, or cartesian closed if D\mathcal{D} has those properties
  • The Yoneda Lemma establishes a relationship between an object AA in a category C\mathcal{C} and the functor category [Cop,Set][\mathcal{C}^{op}, \mathbf{Set}], providing a fully faithful embedding of C\mathcal{C} into its functor category
  • Functor categories play a central role in the study of adjunctions and the formulation of the Adjoint Functor Theorem

Examples and Applications

  • The category of presheaves on a category C\mathcal{C} is the functor category [Cop,Set][\mathcal{C}^{op}, \mathbf{Set}], where objects are contravariant functors from C\mathcal{C} to Set\mathbf{Set} (presheaves) and morphisms are natural transformations
    • Presheaf categories are used in algebraic geometry and sheaf theory to study local-to-global properties of structures
  • The category of diagrams of type C\mathcal{C} in a category D\mathcal{D} is the functor category [C,D][\mathcal{C}, \mathcal{D}], where objects are functors from C\mathcal{C} to D\mathcal{D} (diagrams) and morphisms are natural transformations
    • Diagram categories are used to study commutative diagrams, limits, and colimits in a unified framework
  • In homotopy theory, the category of simplicial sets is a functor category [Δop,Set][\Delta^{op}, \mathbf{Set}], where Δ\Delta is the simplex category and objects are contravariant functors from Δ\Delta to Set\mathbf{Set}
    • Simplicial sets are used as a combinatorial model for topological spaces and are central to the development of abstract homotopy theory
  • In representation theory, the category of representations of a group GG over a field kk is a functor category [CG,Vectk][\mathcal{C}_G, \mathbf{Vect}_k], where CG\mathcal{C}_G is the single-object category with morphisms corresponding to elements of GG, and Vectk\mathbf{Vect}_k is the category of vector spaces over kk
  • Functors and natural transformations are used in programming to model type classes and their instances in languages like Haskell, enabling ad-hoc polymorphism and generic programming

Common Misconceptions

  • Functors are not just "mappings" or "functions" between categories; they must preserve the categorical structure (composition and identity) to be considered functors
  • Not all mappings between categories are functors; a mapping that fails to preserve composition or identity is not a functor
  • Functors do not always preserve all properties of objects and morphisms; they are only required to preserve the basic categorical structure
    • For example, a functor may not preserve monic or epic morphisms, or certain limits and colimits
  • The composition of functors is not always commutative; in general, FGGFF \circ G \neq G \circ F for functors FF and GG
  • Functor categories are not the same as product categories; while a functor category has functors as objects and natural transformations as morphisms, a product category has pairs of objects and pairs of morphisms from the constituent categories
  • The Yoneda Lemma does not state that a category is isomorphic to its functor category; rather, it provides a fully faithful embedding of a category into its functor category
  • Not all categories are functor categories; a category must have functors as objects and natural transformations as morphisms to be considered a functor category

Key Theorems and Proofs

  • Functor Category Theorem: Given categories C\mathcal{C} and D\mathcal{D}, the functor category [C,D][\mathcal{C}, \mathcal{D}] is a category with functors as objects and natural transformations as morphisms
    • Proof: Verify that the composition of natural transformations is associative and that identity natural transformations exist for each functor
  • Yoneda Lemma: For a category C\mathcal{C} and a functor F:CopSetF: \mathcal{C}^{op} \to \mathbf{Set}, there is a natural isomorphism between F(A)F(A) and Nat(HomC(,A),F)\text{Nat}(\text{Hom}_\mathcal{C}(-, A), F) for each object AA in C\mathcal{C}
    • Proof: Construct the natural isomorphism using the bijection between elements of F(A)F(A) and natural transformations from HomC(,A)\text{Hom}_\mathcal{C}(-, A) to FF
  • Adjoint Functor Theorem: A functor G:DCG: \mathcal{D} \to \mathcal{C} has a left adjoint if and only if, for each object AA in C\mathcal{C}, the functor D(F(),A):DopSet\mathcal{D}(F(-), A): \mathcal{D}^{op} \to \mathbf{Set} is representable
    • Proof: Use the Yoneda Lemma to establish the correspondence between the existence of a left adjoint and the representability of the functor D(F(),A)\mathcal{D}(F(-), A)
  • Preservation of Limits and Colimits: A functor F:CDF: \mathcal{C} \to \mathcal{D} preserves limits (or colimits) if, for every diagram D:JCD: \mathcal{J} \to \mathcal{C} with a limit (or colimit) in C\mathcal{C}, the diagram FD:JDF \circ D: \mathcal{J} \to \mathcal{D} has a limit (or colimit) in D\mathcal{D}, and FF maps the limit (or colimit) of DD to the limit (or colimit) of FDF \circ D
    • Proof: Use the universal property of limits (or colimits) to show that the image of a limit (or colimit) under FF satisfies the same universal property in D\mathcal{D}

Practical Exercises

  1. Prove that the composition of two functors is a functor.
  2. Given a functor F:CDF: \mathcal{C} \to \mathcal{D}, show that FF preserves isomorphisms, i.e., if f:ABf: A \to B is an isomorphism in C\mathcal{C}, then F(f):F(A)F(B)F(f): F(A) \to F(B) is an isomorphism in D\mathcal{D}.
  3. Prove that a functor F:CDF: \mathcal{C} \to \mathcal{D} preserves monomorphisms (or epimorphisms) if and only if it is faithful.
  4. Show that the category of small categories, Cat\mathbf{Cat}, is a functor category.
  5. Given a group GG, construct the category of GG-sets as a functor category.
  6. Prove that a functor F:CDF: \mathcal{C} \to \mathcal{D} preserves products (or coproducts) if and only if it preserves binary products (or binary coproducts).
  7. Show that a functor F:CDF: \mathcal{C} \to \mathcal{D} has a right adjoint if and only if, for each object BB in D\mathcal{D}, the functor C(F(),B):CopSet\mathcal{C}(F(-), B): \mathcal{C}^{op} \to \mathbf{Set} is representable.
  8. Given a commutative diagram in a category C\mathcal{C}, prove that its image under a functor F:CDF: \mathcal{C} \to \mathcal{D} is also a commutative diagram in D\mathcal{D}.


© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.

© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.