🔢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.
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 A→B in the source category to morphisms F(A)→F(B) in the target category
Contravariant Functors: Reverse the direction of morphisms, mapping morphisms from A→B in the source category to morphisms F(B)→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 A in the source category, F(idA)=idF(A)
Composition Law: Functors preserve composition of morphisms, i.e., for any morphisms f:A→B and g:B→C in the source category, F(g∘f)=F(g)∘F(f)
Functors preserve isomorphisms: If f:A→B is an isomorphism in the source category, then F(f):F(A)→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 f is a monomorphism (or epimorphism) in the source category, then F(f) is a monomorphism (or epimorphism) in the target category
Functors can be naturally isomorphic: Two functors F,G:C→D are naturally isomorphic if there exists a natural transformation α:F⇒G such that each component αA:F(A)→G(A) is an isomorphism in 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 and D, the functor category [C,D] (or DC) has:
Objects: Functors F:C→D
Morphisms: Natural transformations α:F⇒G between functors F,G:C→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, such as being complete, cocomplete, or cartesian closed if D has those properties
The Yoneda Lemma establishes a relationship between an object A in a category C and the functor category [Cop,Set], providing a fully faithful embedding of 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 is the functor category [Cop,Set], where objects are contravariant functors from C to 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 in a category D is the functor category [C,D], where objects are functors from C to 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], where Δ is the simplex category and objects are contravariant functors from Δ to 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 G over a field k is a functor category [CG,Vectk], where CG is the single-object category with morphisms corresponding to elements of G, and Vectk is the category of vector spaces over k
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, F∘G=G∘F for functors F and G
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 and D, the functor category [C,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 and a functor F:Cop→Set, there is a natural isomorphism between F(A) and Nat(HomC(−,A),F) for each object A in C
Proof: Construct the natural isomorphism using the bijection between elements of F(A) and natural transformations from HomC(−,A) to F
Adjoint Functor Theorem: A functor G:D→C has a left adjoint if and only if, for each object A in C, the functor D(F(−),A):Dop→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)
Preservation of Limits and Colimits: A functor F:C→D preserves limits (or colimits) if, for every diagram D:J→C with a limit (or colimit) in C, the diagram F∘D:J→D has a limit (or colimit) in D, and F maps the limit (or colimit) of D to the limit (or colimit) of F∘D
Proof: Use the universal property of limits (or colimits) to show that the image of a limit (or colimit) under F satisfies the same universal property in D
Practical Exercises
Prove that the composition of two functors is a functor.
Given a functor F:C→D, show that F preserves isomorphisms, i.e., if f:A→B is an isomorphism in C, then F(f):F(A)→F(B) is an isomorphism in D.
Prove that a functor F:C→D preserves monomorphisms (or epimorphisms) if and only if it is faithful.
Show that the category of small categories, Cat, is a functor category.
Given a group G, construct the category of G-sets as a functor category.
Prove that a functor F:C→D preserves products (or coproducts) if and only if it preserves binary products (or binary coproducts).
Show that a functor F:C→D has a right adjoint if and only if, for each object B in D, the functor C(F(−),B):Cop→Set is representable.
Given a commutative diagram in a category C, prove that its image under a functor F:C→D is also a commutative diagram in D.