In the last section we proved that every small category C is isomorphic to a full subcategory of F u n c t(Co p ,Set) through the Yoneda embedding Y. For its relevance, the category Funct(Cop,Set) has its own name: a functor F: Cop →Set is called presheaf on C, and Funct(Cop,Set) is the category of presheaves on C.
The category of presheaves inherits many interesting properties from Set, and in particular it is itself a topos. For the moment, we only prove the following properties:
3.5.1 Theorem Given a category C, the category of presheaves on C has pullbacks for every pair of morphisms and is Cartesian closed.
Proof. The terminal object is the functor T : Cop→Set, which takes every object c in ObC to the single set {*} and every arrow to the identity on this set.
Given two natural transformations η: F→H and τ: G→H , their pullback is defined objectwise: for every c in ObC let (π1,c: Xc→F(c), π2,c: Xc→G(c) ) be the pullback in Set of ηc:
F(c)→H(c) and τc: G(c)→H(c) . Then define a functor X: Cop→Set where X(c) = Xc , and for every f:c→d, X(f) is the only arrow that makes the following diagram commute:
In the same way we define two natural transformations π1: X→F, π2: X→F, where for every c in ObC, π1(c) = π1,c and π2(c) = π2,c. Then it is easily verified that ( π1: X→F, π2: X→F ) is the pullback of η: F→H and τ: G→H.
As always, the pullback of two functors F and G on the terminal T gives the product F×G. It is easy to verify that F×G(c) = F(c)×G(c) and F×G(f) = F(f)×G(f).
Exponents are defined by using the Yoneda lemma.
If GF is the exponent of F and G, we must have an isomorphism Nat[H×F,G] ≅Nat[H,GF] for every H. In particular, if H is C[_,c], and since by the Yoneda lemma, Nat[C[_,c],K] ≅K(c) for every K, we have: Nat[C[_,c]×F,G] ≅Nat[C[_,c],GF] ≅GF(c). Thus, we define GF(c) = Nat[C[_,c]×F,G].
Given an arrow f: c→d, we must now define GF(f): Nat[C[_,d]×F,G]→Nat[C[_,c]×F,G]. Let σ be a natural transformation from C[_,d]×F to G; then GF(f)(σ) must be a natural transformation from C[_,c]×F to G. We define GF(f)(σ) = σ °C[_,f]×idF (see example 3.2.2 for the definition of the natural transformation C[_,f] : C[_,c]→C[_,d] ).
GF is a functor, indeed GF(id)(σ) = σ. Moreover : GF(f ° g)(σ) = σ °C[_, f ° g]×idF
= σ °C[_,f]×idF °C[_,g]×idF = GF(g)(σ °C[_,f]×idF ) = GF(g)(GF(f)(σ)).
Let us define the natural transformation of evaluation εF,G: GF×F→G. For every d in ObC,
εF,G(d): Nat[C[_,d]×F,G]×F(d)→G(d) is defined by εF,G(d)(σ,n) = σ(d)(idd,n).
We prove now that for any H: Cop→Set we have an isomorphism Θ: Nat[H×F,G] ≅Nat[H,GF]. Let τ: H×F→G be a natural transformation. For any c in ObC, Θ(τ)(c) ought to be a function from H(c) to GF(c) = Nat[C[_,c]×F,G]. By the Yoneda lemma, we have for every c in ObC an isomorphism γc: Nat[C[_,c],H] ≅H(c); thus, if m∈H(c),
γc-1(m)∈Nat[C[_,c],H]
τ ° (γ-1(m)×idF) ∈Nat[C[_,c]×F,G].
Define then Θ(τ)(c) = λm. τ ° ( γc-1(m)×idF): H(c)→GF(c) = Nat[C[_,c]×F,G]. We must prove that, for every τ: H×F→G, µ: H→GF,
1. εF,G ° (Θ(τ)×idF) = τ
2. Θ(εF,G ° (σ×idF)) = σ
For (1) we have, for every d∈ObC, m∈H(d), n∈F(d), the following: (εF,G(d) ° (Θ(τ)×idF)(d))(m,n) =
= εF,G(d) (Θ(τ)(d)(m),n)
= εF,G(d) ( τ ° (γd-1(m)×idF),n) by def. of Θ
= (τ ° (γd-1(m)×idF))(d)(idd,n) by def. of εF,G
= τ (d)(m,n) as (γd-1(m))(d)(idd) = m
For (2) we have, for every d∈ObC, m∈H(d), c∈ObC, h∈C[c,d], n∈F(d), the following: (Θ(εF,G ° (µ×idF))(d)(m)(c)(h,n) =
= εF,G(c) ( (µ×idF)(c)( γd-1(m)(c)(h), n ) )
= εF,G(c) ( (µ×idF)(c)( H(h)(m), n ) by def of γd-1
= εF,G(c) (µ(c)(H(h)(m)), n)
= µ(c)(H(h)(m))(c) (idc,n) by def. of εF,G(c)
= GF(h)(µ(d)(m))(c) (idc,n) by naturality of µ = (µ(d)(m) °C[_,h]×idF) (c)(idc,n) by def. of GF(h) = (µ(d)(m)(c) ((C[c,h]×idF(c))(idc,n))
= (µ(d)(m)(c)(h,n). ♦
References
We only give some references for the examples we mentioned, as they are not usually presented in other books and are mostly endebted to the theory of computing. Partial equivalence relations as a model for higher type computations were given in Kreisel (1959) and later applied to the semantics of higher order intuitionistic logic in Girard (1972) and Troelstra (1973c). They recently came again to the limelight as relevant structures for the semantics of polymorphism in functional languages (see chapter 12). Limit spaces and their closure properties can be found in Kuratowski (1952). With our perspective, filter spaces are used in Hyland (1979).For (pre)sheaves and related notions, the reader should consult the previous references for Topos Theory (as well as Fourman (1977) and Lambek and Scott (1986), among others). See also Scott (1980) for an application of Yoneda’s embedding of arbitrary CCC’s (and their reflexive objects, if any) into topoi of presheaves.
Chapter 4
CATEGORIES DERIVED FROM FUNCTORS AND
NATURAL TRANSFORMATIONS
This chapter has two main motivations. One derives from the use of algebraic methods in computer science, the other from recent developments in (applied) Proof Theory. The two research directions are brought together nicely by the underlying categorical structures, which tidily generalize two constructions crucial form the perspective of this book namely, products and exponents. Here, they will be discussed in the context of monoidal and monoidal closed categories.
As already mentioned, geometry and algebra provided the background and motivations for the early developments of Category Theory. In these areas, Category Theory often suggested both a unified language and effective tools for an abstract description or specification of mathematical structures. This method, which is typical of the categorical approach, has been widely explored in computer science, in connection with ideas from universal algebra. The point is that, before performing a complicated task, a programmer needs a clear specification of it. This may be given, for example, by a set of equations, or by a logical system, or also by declarations of types (or sorts) and operations on them. Inference rules may specify a theory.
This abstract approach, in computer science as well as in mathematics, is meant to simplify the work for a concrete implementation, since only the essential or desired aspects of a task, a problem, or a mathematical structure are focused on and dealt with. Unstructured lists of goals or properties are hard to understand, are prone to errors, and may hide the core of the issue.
As we shall recall in section 4.1, algebras are usually described as sets with operations. Now (binary) operations need some kind of “product” on the carrier sets to be specified or typed, e.g., a group operation “.” is .: G×G→G. However, “×” does not need to be the familar Cartesian product, as several relevant examples may be given by using (binary) functors that do not need to possess projections. One may then ask whether these functors may relate to suitable exponents, in a way that is similar for CCC’s. This further step will take us to the natural (and fruitful) generalization of CCC’s as monoidal closed categories and will relate the algebraic perspective to the “functional” one, which permeates this book.