<<

Groupoids and local cartesian

Erik Palmgren∗ Department of , Uppsala University

July 2, 2003

Abstract

The 2- of groupoids, and natural is shown to be locally cartesian closed in a weak sense of a pseudo- adjunction.

Key words: groupoids, 2-categories, local cartesian closure. Mathematics Subject Classification 2000: 18B40, 18D05, 18A40.

1 Introduction

A groupoid is a category in which each is invertible. The notion may be considered as a common generalisation of the notions of and . A group is a one-object groupoid. Every equivalence relation on a , viewed as a directed graph, is a groupoid. A recent indepen- dence proof in logic used groupoids. Hofmann and Streicher [8] showed that groupoids arise from a construction in Martin-Löf type theory. This is the so-called type construction, which applied to a type gives a groupoid turning the type into a projective object, in the category of types with equiv- alence relations. As a consequence there are plenty of choice objects in this category: every object has a projective cover [12] — a property which seems essential for doing constructive mathematics according to Bishop [1] inter- nally to the category. For some time the groupoids associated with types were believed to be discrete. However, in [8] a model of type theory was given using fibrations over groupoids, showing that this need not be the case. The purpose of this article is to draw some further conclusions for group- oids from the idea of Hofmann and Streicher. Since type theory has a Π- construction, one could expect that some kind of (weak) local cartesian clo- sure should hold for groupoids. The small groupoids can be organised into a category Gpd by taking the to be functors. This category has many useful properties: it is complete and cocomplete, and unlike the

∗ The author is supported by a grant from the Swedish Research Council (VR).

1 category of groups, it is also cartesian closed [4]. However, it is not lo- cally cartesian closed (see Section 2). The main goal of the present paper is to show that, from a 2-categorical perspective, the groupoids nevertheless satisfy a version of local cartesian closedness. The category Gpd may be re- organised as a 2-category G by letting the natural transformations between functors be the 2-cells, which are then necessarily natural isomorphisms. After some preliminaries on 2-categorical constructions (Section 3 and 4) the main result (Theorem 5.6) is presented. This involves a construction of dependent products of groupoids which is fairly natural, though the verifica- tion of its 2- is quite involved. We should point out that the solution is not completely satisfactory, since the notion of “semi-strict pseudo-adjunction” is probably not general enough. The proofs herein are constructive and choice free, and should be possible to formalise in a topos, or even in predicative versions of toposes.

2 The category of groupoids

In this section we see that the category Gpd of small groupoids and functors is not locally cartesian closed. This motivates the laborious 2-categorical constructions in Section 3 and onwards. For a general overview of groupoids we recommend Brown [4]. Higgins [7] contains the most basic and central constructions. The pullback construction will be of special interest, so we state it explicitly here. Let f : A / Z and g : B / Z be functors in Gpd. The pullback of these is constructed analogously to that of sets. Let P be the groupoid where the objects are pairs (x,y), where x is an object of A and y is an object of B such that f(x)= g(y). A morphism from (x,y) to (x′,y′) is a pair of morphisms (ϕ, ψ) where ϕ : x / x′ and ψ : y / y′ are morphisms satisfying f(ϕ)= g(ψ). It follows by the functoriality of f and g that this defines a groupoid. Together with the first and second projection / / π1 : P / A and π2 : P / B, this is a pullback of f and g. The coproduct of a set of groupoids can be formed by simply taking the of objects and arrows. For the construction of coequalizers, see [7]. It is known that the category Cat of small categories is not locally carte- sian closed (Conduché [5]). Johnstone [9, p. 48] gives a simple argument for this fact, which is easy to adapt to the category Gpd. Let En be the groupoid given by the coarsest equivalence relation on the set Nn = {0, 1,...,n − 1}, that is, for every pair of objects i, j ∈ En, there is a unique arrow eij : i / / j. In the terminology of [7] this is the simplicial groupoid on Nn.

2 1 2 1 h m2 0 f 0 1

m1 1

g 0 0 0 Figure 1

/ Let g, h : E2 / E3 be the unique functors such that g(e01)= e01 and / h(e01) = e12. Then the canonical map [g, h] : E2 + E2 / E3 is a regular / epi. To wit, it is the coequalizer of the arrows m1,m2 : E1 / E2 + E2 where m1 maps 0 to 1 of the first summand and m2 maps 0 to 0 of the second / summand. Now let f : E2 / E3 be the unique functor with f(e01)= e02. (See Figure 1.) The pullback of the arrow [g, h] along f is then isomorphic / to k = [k0, k1] : E1 + E1 / E2 where kj is the unique functor mapping the object 0 to j. This k is clearly not epi.

Proposition 2.1 The category Gpd is not locally cartesian closed.

Proof. Suppose that Gpd is locally cartesian closed. Then since Gpd has coequalizers [7, Ch. 9] it is also regular [9, Lemma 1.5.13]. Consequently, the pullback of a regular epi should be a regular epi. But we have just presented a counter-example to this in Gpd. This is a contradiction.

3 Some 2-categorical notions and constructions

Let C be a 2-category. We employ the notation of Borceux [3]. The compo- sition of 1-cells is denoted ◦, and for a 1-cell f : A / B, the left and right / identities are 1A and 1B respectively. A 2-cell α from f : A / B to g : A / B is written α : f ⇒ g. The vertical composition of 2-cells is denoted ⊙. The left and right vertical identities of α are if and ig. The operation ∗ stands for horizontal composition of 2-cells. The left and right horizontal / / identities for α from f : A B to g : A B are i1A and i1B , but we will denote these by iA and iB respectively. Apart from the usual identity and associativity laws these operations satisfy a further identity law and the exchange law

ig ∗ if = ig◦f , (γ ⊙ δ) ∗ (α ⊙ β) = (γ ∗ α) ⊙ (δ ∗ β).

3 β α δ γ / for f1 =⇒ f2 =⇒ f3 and g1 =⇒ g2 =⇒ g3, where f1,f2,f3 : A / B, / g1, g2, g3 : B / C. We have distributivity of vertical identities

ig ∗ (α ⊙ β) = (ig ∗ α) ⊙ (ig ∗ β)

(γ ⊙ δ) ∗ if = (γ ∗ if ) ⊙ (δ ∗ if ), where f : A / B and g : B / C. Inverses can be computed as

(α ∗ β)−1 = α−1 ∗ β−1, for invertible α and β. Note that for 2-cells α : h ⇒ k and β : f ⇒ g, where f, g : A / B and h, k : B / C, the interchange law gives the decomposition laws

α ∗ β = (α ∗ ig) ⊙ (ih ∗ β),

α ∗ β = (ik ∗ β) ⊙ (α ∗ if ).

In the following we shall of use the syntactic convention that the operation ∗ binds stronger than ⊙. The 2-category of groupoids to be studied in Sections 4 and 5 is the following.

Example 3.1 The 2-category G has small groupoids as objects, functors as 1-cells and natural transformations as 2-cells. The vertical composition ⊙ is the usual vertical composition · of natural transformations. The horizontal composition of α ∗ β (with f,g,h,k as above) is given by

(α ∗ β)a = αg(a)h(βa)= k(βa)αf(a).

The identity if is the if : f ⇒ f defined by (if )a = 1f(a).

3.1 2-slices In an ordinary slice category C/X a morphism from α : A / X to β : B / X is a morphism f : A / B in C satisfying the equality α = β ◦ f. For morphisms between the slices of a 2-category (to be defined below), this equality is replaced by a 2-cell. The specific information given by the 2-cell seems necessary to obtain the pseudo-adjoints of Section 4 and 5.

Definition 3.2 Let C be a 2-category. For every object X of C the 2-slice category C//X of C by X is the 2-category given by the following data. (When the intended category is obvious from the context we simply write X¯ for C//X.)

4 • The objects of C//X are arrows (1-cells) of the form α : A / X of C. We also write (α, A) or even α.

• The arrows (1-cells) from (α, A) to (β,B) in C//X are pairs

f = (f, f)

such that f : A / B is an arrow of C and f : α ⇒ β ◦ f is a 2-cell of C. f / A/ B ??  ??  ? f  ?? =⇒  α ??  β ??  ?  X

– Suppose that f : (α, A) / (β,B) and g : (β,B) / (γ,C) are 1-cells. Then their composition is given by

g ◦ f = (g ◦ f, (g ∗ if ) ⊙ f). (1)

– The identity 1(α,A) on (α, A) is (1A, iα).

• Suppose f, g : (α, A) / (β,B) are 1-cells. A 2-cell τ from f to g is by definition a 2-cell τ : f ⇒ g of C such that the pasting condition

(iβ ∗ τ) ⊙ f = g (2)

is satisfied.

– Suppose that σ : f ⇒ g and τ : g ⇒ h are 2-cells, where f,g,h : (α, A) / (β,B). The vertical composition τ ⊙ σ is then just the vertical composition τ ⊙ σ in C. – Suppose that σ : f ⇒ g and τ : h ⇒ k are 2-cells, where f, g : (α, A) / (β,B) and h, k : (β,B) / (γ,C). The horizontal composition τ ∗σ : h◦f ⇒ k◦g is then the horizontal composition τ ∗ σ in C.

– The identity 2-cell if : f ⇒ f is if .

Remark 3.3 Note that in G//X the composition (1) becomes (g ◦ f, gf · f) and the pasting condition (2) becomes βτ · f = g, using standard notation for composing functors and natural transformations (Mac Lane [11]).

Proposition 3.4 If C is a 2-category and X is an object of C, then C//X is a 2-category.

5 Proof. The verification is straightforward, except possibly for the fact that / horizontal composition of 2-cells is well-defined. Let f1,f2 : (α, A) / / (β,B) and g1, g2 : (β,B) / (γ,C). Suppose that σ : f1 ⇒ f2 and τ : g1 ⇒ g2. Their horizontal composition is τ ∗ σ : g1 ◦ f1 ⇒ g2 ◦ f2. We show that it satisfies the pasting condition.

(iγ ∗ τ ∗ σ) ⊙ g1 ◦ f1 = (iγ ∗ τ ∗ σ) ⊙ (g1 ∗ if1 ) ⊙ f1

= (((iγ ∗ τ) ⊙ g1) ∗ (σ ⊙ if1 )) ⊙ f1

= ((g2 ∗ (σ ⊙ if1 )) ⊙ f1

= (g2 ∗ σ) ⊙ f1

= (g2 ∗ if2 ) ⊙ (iβ ∗ σ) ⊙ f1

= (g2 ∗ if2 ) ⊙ f2 = g2 ◦ f2

The equations are obtained by applying (in order): the interchange law, the pasting condition of τ, identity law, the decomposition law and the pasting condition of σ.

Remark 3.5 Note that if τ : f ⇒ g is a 2-cell in C//X and τ is invertible in C, then τ −1 : g ⇒ f is inverse to τ in C//X. In particular, this means that the 2-cells of G//X are all invertible.

3.2 2-dimensional functors Definition 3.6 Let C and D be 2-categories. A 2-functor F : C / D consists of an object F (A) of D for each object A of C, and for each pair of objects A, B ∈C a functor / FA,B : C(A, B) / D(FA,FB) such that

FA,A(1A) = 1FA FA,C (g ◦ f)= FB,C (g) ◦ FA,B(f), (3) for 1-cells f : A / B, g : B / C, and moreover

FA,A(iA)= iFA FA,C (β ∗ α)= FB,C (β) ∗ FA,B(α), (4) / for 2-cells α : f1 ⇒ f2 and β : g1 ⇒ g2, where f1,f2 : A / B and g1, g2 : B / C. The composition GF : C / E with another 2-functor G : D / E is given by

(G ◦ F )(A)= G(F (A)) (G ◦ F )A,B = GFA,FB ◦ FA,B.

6 Remark 3.7 Note that the first equality of (4) actually follows from (3) and the fact that FA,A is a functor.

Example 3.8 Let C be a 2-category. The identity 2-functor IC on C is defined by IC(A)= A, and (IC )A,B is the identity functor on C(A, B).

Example 3.9 Let C be a 2-category and let h : X / Y be an arrow (1-cell) in this category. Then we define the post-composition 2-functor / Σh : C//X / C//Y as follows on 0-cells, 1-cells and 2-cells respectively:

Σh(α, A) = (h ◦ α, A),

(Σh)(α,A),(β,B)(f) = (f, ih ∗ f),

(Σh)(α,A),(β,B)(τ) = τ.

3.3 2-dimensional transformations and adjunctions We recall the definition of a 2-natural transformation [3].

Definition 3.10 Suppose that F, G : A / B are 2-functors. A 2-natural · / transformation θ : F / G is a collection of arrows of B, θA : F (A) / G(A), where A ranges over objects of A. They satisfy the following naturality condition

′ B(FA,θA′ ) ◦ FA,A′ = B(θA, GA ) ◦ GA,A′ (5) for objects A and A′ of A. This means that for 1-cells f ∈A(A, A′)

θA′ ◦ FA,A′ (f)= GA,A′ (f) ◦ θA (6) and for 2-cells α : f ⇒ f ′ in A(A, A′)

′ ′ iθA′ ∗ FA,A (α)= GA,A (α) ∗ iθA . (7)

Example 3.11 Let F : A / B be a 2-functor. The identity 2-natural · / transformation on F is IF : F / F given by (IF )A = 1FA.

G G Example 3.12 Specialising to A = //X, B = //Y , and θA = (θA, θA) then (7) reads θA′ FA,A′ (α)= GA,A′ (α)θA. (8)

7 The definition of composition of 2-functors and 2-natural transformation are formally identical to the 1-dimensional case. Let H : B / C, F, G : C · / D and K : D / E be 2-functors, and suppose that ε : F / G is a 2-natural transformation. Then define 2-natural transformations · · εH : FH / GH, Kε : KF / KG by / (εH)A = εHA : F HA / GHA and / (Kε)A = KFA,GA(εA) : KF A / KGA. To formulate the desired adjunction property we need a more liberal ver- sion of 2-natural transformations. The notion of lax 2-natural transformation (Borceux [3]) can be applied to (strict) 2-functors as well. We specialise the notion to this case. (Note the direction of τA,B.)

Definition 3.13 Let F, G : A / B be 2-functors. A lax natural transfor- · mation from F to G is a pair (α, τ) (notation: (α, τ) : F / G) consisting / of arrows αA : F A / GA, for A ∈A, and for each pair of objects A, B ∈A a natural transformation / τA,B : B(αA, GB) ◦ GA,B / B(F A, αB) ◦ FA,B. (9)

These should satisfy the following functoriality conditions:

(τA,A)1A = iαA (10) and

(τA,C )g◦f = (τB,C )g ∗ iFA,B (f) ⊙ iGB,C (g) ∗ (τA,B)f (11) / / for f : A / B and g : B / C. In case each τA,B is a natural isomor- phism, (α, τ) is called a pseudo-natural transformation.

Remark 3.14 Condition (9) means, explicitly, that for f, g : A / B and σ : f ⇒ g the following diagram of 2-cells commutes:

(τ ) A,B f 3+ GA,B(f) ◦ αA αB ◦ FA,B(f)

GA,B(σ)∗iαA iαB ∗FA,B(σ)

  3+ GA,B(g) ◦ αA αB ◦ FA,B(g) (12) (τA,B )g

8 · / Example 3.15 Given a 2-natural transformation α : F / G, then GA,B(f)◦ αA = αB ◦ FA,B(f). We may define

(τA,B)f = iGA,B (f)◦αA = iαB ◦FA,B(f).

It is straightforward to see that (α, τ) defines a pseudo-natural transforma- · / tion F / G, the lax version of α. Conversely, any lax (α, τ) where (τA,B)f · / is the identity for each f, is called 2-natural. In case α = IF : F / F is the identity 2-natural transformation on F, then (τA,B)f = iFA,B (f).

The compositions given just before Definition 3.13 are now generalised to lax natural transformations.

· Definition 3.16 Let (α, τ) : F / G be a lax natural transformation between the 2-functors F, G : A / B. We define the left and right com- positions with the 2-functors H : Z / A and K : B / C. Define

· / (α, τ)H =def (αH,τH) : FH / GH by letting (αH)U = αHU and (τH)U,V = τHU,HV HU,V , where the right hand side is an ordinary composition of a natural transfor- mation with a functor. Define · / K(α, τ)=def (Kα,Kτ) : KF / KG by assigning (Kα)A = KFA,GA(αA) and (Kτ)A,B = KFA,GBτA,B. Here the right hand side is the composition of a functor with a natural transformation.

Proposition 3.17 With assumptions as in Definition 3.16:

(i) (α, τ)H is lax natural, and it is pseudo-natural whenever (α, τ) is,

(ii) K(α, τ) is lax natural, and it is pseudo-natural whenever (α, τ) is.

Remark 3.18 These compositions generalise those for 2-natural transfor- mation. (Cf. Example 3.15.) So, e.g., that if (α, τ) is 2-natural, then (α, τ)H is the lax version of αH.

9 · · Definition 3.19 Let F,G,H : A / B be 2-functors. Let (α, σ) : F / · G and (β,τ) : G / H be lax natural transformations. Define their vertical composition

· / (β,τ) ⊙ (α, σ)=def (β ⊙ α, τ ⊙ σ) : F / H as follows (β ⊙ α)A = βA ◦ αA and, for f : A / B,

((τ ⊙ σ)A,B)f = iβB ∗ (σA,B)f ⊙ (τA,B)f ∗ iαA . (13)

Remark 3.20 If (α, σ) is 2-natural, the right hand side of (13) becomes

(τA,B)f ∗ iαA , and in case (β,τ) is 2-natural, it becomes iβB ∗ (σA,B)f .

Proposition 3.21 With assumptions as in Definition 3.19: (β,τ)⊙(α, σ) is a lax natural transformation, and it is pseudo-natural if both (β,τ) and (α, σ) are. Moreover, in case (β,τ) and (α, σ) are both 2-natural transformations (considered as lax natural transformation), then (β,τ) ⊙ (α, σ) is again a 2-natural transformation.

We now define the notion of adjunction to be employed.

Definition 3.22 A semi-strict pseudo-adjunction hF, G, ε, ηi : C / D consists of the 2-functors F : C / D and G : D / C and pseudo-natural transformations · / · / ε : F G / ID η : IC / GF such that both

G F ?? ?? ?? ?? ? IG ? IF ηG ?? F η ?? ?? ?? ?? ??  ?  ? / / GF GGε G F GFεF F commute. These are called the triangular identities for G and F , respectively. Here IH denotes the lax version of the identity 2-natural transformation on the 2-functor H. (See Example 3.15.)

Given an adjunction as in Definition 3.22, we define functors / PA,B : C(A, GB) / D(FA,B) and / QA,B : D(FA,B) / C(A, GB)

10 as follows for arrows f and 2-cells α:

1 PA,B(f)= ε ◦ FA,GB(f), PA,B(α)= i 1 ∗ FA,GB(α) (14) B εB and 1 QA,B(f)= GFA,B(f) ◦ η , QA,B(α)= GFA,B(α) ∗ i 1 , (15) A ηA where η = (η1, η2) and ε = (ε1, ε2).

Theorem 3.23 Let hF, G, ε, ηi : C / D be a semi-strict pseudo-adjunction. With P and Q defined as in (14) and (15):

(i) QA,B ◦ PA,B ≃ IC(A,GB) and QA,B ◦ PA,B = IC(A,GB), whenever η is 2-natural,

(ii) PA,B ◦ QA,B ≃ ID(FA,B), and PA,B ◦ QA,B = ID(FA,B), whenever ε is 2-natural.

Proof. (i): Write η = (η1, η2) and ε = (ε1, ε2). For arrows g : A / GB we have

1 1 QA,B(PA,B(g)) = GFA,B(εB ◦ FA,GB(g)) ◦ ηA 1 1 = GFGB,B(εB ) ◦ GFA,FGB(FA,GB(g)) ◦ ηA 1 1 = GFGB,B(εB ) ◦ (GF )A,GB(g) ◦ ηA

2 / Let τg = i 1 ∗ (η )g, for g : A / GB. Thus GF GB,B (εB) A,GB

1 1 1 1 τg : GF GB(εB) ◦ (GF )A,GB(g) ◦ ηA =⇒ GFGB,B(εB) ◦ ηGB ◦ (IC )A,GB(g), by the fact that η is pseudo-natural. Moreover, by the triangular identity for G: 1 1 GFGB,B(εB ) ◦ ηGB ◦ (IC )A,GB(g) = 1GB ◦ g = g

By the above equations, it follows that τg : QA,B(PA,B(g)) ⇒ g is a well- defined . To demonstrate that τ gives the desired equivalence it suffices to show that τ is natural. Suppose α : f ⇒ g. Then:

τg ⊙ QA,B(PA,B(α)) = τg ⊙ GFA,B(i 1 ∗ FA,GB(α)) ∗ i 1 εB ηA = τg ⊙ GFGB,B(i 1 ) ∗ GFA,FGB(FA,GB(α)) ∗ i 1 εB ηA = τg ⊙ i 1 ∗ GFA,FGB(FA,GB(α)) ∗ i 1 GF GB,B (εB) ηA 2 = i 1 ∗ ((η )g ⊙ GFA,FGB(FA,GB(α)) ∗ i 1 ) GF GB,B (εB) A,GB ηA 2 = i 1 ∗ ((η )g ⊙ (GF )A,GB (α) ∗ i 1 ) GF GB,B (εB) A,GB ηA 2 = i 1 ∗ (i 1 ∗ α ⊙ (η )f ) (nat.) GF GB,B (εB) ηGB A,GB = i 1 1 ∗ α ⊙ τf (def. of τf ) GF GB,B (εB)◦ηGB

= i1GB ∗ α ⊙ τf = α ⊙ τf . (triang.)

11 2 In this calculation we used distributivity of vertical identities, that ηA,GB is natural and the triangular equality for G. This shows that τ is an equivalence. Suppose now that η is a 2-natural transformation. Then 2 (ηA,GB)g is the identity, so τg is the identity for each g. Hence, in this case, QA,B ◦ PA,B = IC(A,GB). The proof of (ii) is analogous.

Remark 3.24 A good notion of “pseudo-adjunction” should probably be flexible enough to allow the functors to be pseudo-functors rather than strict, and the triangular identities to be “iso-modifications”. (See also Remark 5.2 in [2].) We have not investigated this possibility fully.

4 Groupoids and weak pullbacks

We consider here the 2-category G of small groupoids. For arrows f : A / C and g : B / C in G the comma groupoid f ↓ g consists of triples (a, b, ϕ) such that ϕ : f(a) / g(b) as objects. A morphism (a, b, ϕ) / (a′, b′, ϕ′) is a pair (α, β) of arrows α : a / a′, β : b / b′ such that

ϕ / f(a) / g(b)

f(α) g(β)   / f(a′) / g(b′) (16) ϕ′ commutes. The identity morphism on (a, b, ϕ) is (1a, 1b). It is immediate that all arrows of the category f ↓ g are invertible, so that it constitutes / a groupoid. Denote by p1 : (f ↓ g) / A the functor given by the first projections p1(a, b, ϕ) = a and p1(α, β) = α. Similarly, there is a functor / p2 : (f ↓ g) / B given by second projections. We do not in general have fp1 = gp2. However, there is a natural isomorphism

σ : fp1 ⇒ gp2

f,g f,g f,g given by σ(a,b,ϕ) = ϕ. Writing p1 = p1, p2 = p2 and σ = σ, we depict this as: pf,g 2 / (f ↓ g) / B

σf,g pf,g g 1 ⇒   / (17) A f C

12 Now given h : D / A and k : D / B and a natural isomorphism ρ : fh ⇒ gk. / Define a functor t : D / (f ↓ g) by t(d) = (h(d), k(d), ρd) and t(θ) = (h(θ), k(θ)). Then p1t = h and p2f = k.

4.1 2-pullback functor Next we introduce what can be considered as a 2-analogue of the pullback functor k∗ along a morphism k. We use the notation X¯ for the 2-slice G//X. For each f the construction of a comma groupoid (f ↓ g) can be considered as a 2-functor, which is a right pseudo-adjoint of Σf (cf. Theorem 4.4 below). Let f : X / Y be a functor in G. Define a 2-functor f + : Y¯ / X¯ that constructs comma groupoids along f. For α : A / Y let + f,α f (α, A) = (p1 ,f ↓ α) Write A = (α, A), B = (β,B) etc. for objects in 2-slice categories. Let A and B be objects in Y¯ , and suppose that h : A / B is an arrow. Define + + / + fA,B(h) : f (A) f (B) by + fA,B(h) = (F (h), F (h)) (18) where

F (h)(x, a, ϕ) = (x, h(a), ha ◦ ϕ),

F (h)(θ1,θ2) = (θ1, h(θ2)),

F (h)(x,a,ϕ) = 1x. Let h, p : A / B be two arrows, and let τ : h ⇒ p be a 2-cell between ¯ + + + these arrows in Y . Then define fA,B(τ) : fA,B(h) ⇒ fA,B(p) by + (fA,B(τ))(x,a,ϕ) = (1x,τa).

Lemma 4.1 For any functor f : X / Y in G, f + : Y¯ / X¯ is a 2-functor.

Let f : X / Y be a functor in G. Consider the composition of 2- functors + ¯ / ¯ Σf ◦ f : Y¯ / Y.¯ For each A ∈ Y¯ define f,α f,α εA = (p2 ,σ ), f,α f,α f,α where p1 , p2 and σ are the projection and 2-cell associated with the · ¯ / ¯ comma category f ↓ α, see diagram (17). Let I = IY¯ : Y Y be the + f,α identity 2-natural transformation. Note that Σf ◦ f (A) = (f ◦ p1 ,f ↓ α), + so εA :Σf ◦ f (A) ⇒ A. In fact, we have

13 · + / Lemma 4.2 ε :Σf ◦ f / I is a 2-natural transformation.

The counit of the adjunction will merely be a pseudo-natural transfor- mation. Let f : X / Y be a functor in G, and consider the composition

+ ¯ / ¯ f ◦ Σf : X¯ / X.¯

+ f,f◦β For B = (β,B) we have f ◦ Σf (B) = (p1 ,f ↓ f ◦ β). Define a pseudo- natural transformation

· / + (η, ρ) : I / f ◦ Σf

/ as follows: ηB = (ηB, ηB) where ηB : B f ↓ (f ◦ β) is the functor defined by

ηB(b) = (β(b), b, 1f(β(b)) ) / ′ A for b ∈ B and ηB(θ) = (β(θ),θ) for θ : b b . Moreover, ηB = iβ. For ¯ and B in X¯, define ρA,B as

((ρA,B)h)a = (ha, 1h(a)) for arrows h : A / B and a ∈ A.

· / + Lemma 4.3 (η, ρ) : I / f ◦ Σf is a pseudo-natural transformation.

Theorem 4.4 For any functor f : X / Y in G,

+ ¯ / ¯ hΣf ,f , ε, (η, ρ)i : X¯ / Y¯ is a semi-strict pseudo-adjunction, where ε is 2-natural.

Remark 4.5 The above adjunction seems to be known, in some form, among category theorists, but I have not been able to locate a reference. It might implicitly be contained in the theory of 2-monad [2], but then again we have not be able figure this out.

5 Dependent products of groupoids

First we introduce some auxiliary notions. Let f : X / Y be a functor in G and let y be an object of Y . Define f −1(y) be the groupoid consisting of objects (x, ϕ) where ϕ : f(x) / y is an arrow in Y . A morphism ψ : (x, ϕ) / (x′, ϕ′) in f −1(y) is an arrow ψ : x / x′ in X such that ϕ = ϕ′◦f(ψ). In fact, this construction can be considered as a special comma category: f ↓ y. For θ : y / y′ in Y we have a functor f −1(θ) : f −1(y) / f −1(y′) defined by f −1(θ)(x, ϕ) = (x,θϕ) and f −1(θ)(ψ) = ψ. Also, −1 ′ −1 ′ −1 ′ ′ / ′′ −1 − f (θ θ)= f (θ )f (θ), if θ : y y , and f (1y) = 1f 1(y).

14 −1 / For each object y of Y there is a projection functor py : f (y) / X / ′ −1 given by py(x, ϕ)= x and py(ψ)= ψ. For θ : y / y we have py′ ◦f (θ)= py so −1 −1 / ′ f (θ)=def (f (θ), 1py ) : py py is a 1-cell in X¯.

Definition 5.1 Let γ : C / X and f : X / Y be functors in G. The groupoid Πf (γ) is constructed as follows. / • Objects are pairs (y, h) where y ∈ Y , and h = (h, h) : py / γ is a 1-cell in X¯. More explicitly

h : f −1(y) / C

and h : py ⇒ γh. In a diagram: h / f −1(y) / C ?  ??  ?? h  ?? =⇒  py ?  γ ??  ?  X

• Morphisms are pairs (θ, η) : (y, h) / (y′, h′) where

θ : y / y′

and η : h =⇒ h′ ◦ f −1(θ) is a 2-cell in X¯. Explicitly, this means that the 2-cell in G

η : h ⇒ h′ ◦ f −1(θ)

is such that the diagram of natural transformations

h 3+ py γh

ipy iγ ∗η

  ′ −1 3+ ′ −1 py f (θ) ′ γh f (θ) (19) − h ∗if 1(θ)

′ commutes, i.e. h ∗ if −1(θ) = (iγ ∗ η) ⊙ h. This is the pasting condition for η.

15 • The identity morphism on (y, h) is (1y, ih). • Composition of (θ, η) : (y, h) / (y′, h′) and (θ′, η′) : (y′, h′) / (y′′, h′′) is given by

′ ′ ′ ′ (θ , η ) ◦ (θ, η) = (θ ◦ θ, η ∗ if −1(θ) ⊙ η).

/ ′ ′ −1 −1 − − • The inverse of (θ, η) : (y, h) (y , h ) is (θ , η ∗ if 1(θ 1)).

The following is now easily verified.

Lemma 5.2 Πf (γ) is a groupoid. / The first projection of this groupoid πf (γ)= πf,γ : Πf (γ) / Y defined by πf (γ)(y, h) = y and πf (γ)(θ, η) = θ is clearly a functor. We now extend the Π-construction to a 2-functor ¯ / ¯ Πf : X¯ / Y,¯ for each f : X / Y . For objects C = (γ,C) of X¯, let

Πf (C) = (πf (γ), Πf (γ)).

For each pair C, D of objects in X¯ define the functor ¯ / ¯ (Πf )C,D : X¯(C, D) / Y¯ (Πf (C), Πf (D)) as follows. ¯ • For a 1-cell q = (q, q) in X¯, let (Πf )C,D(q) = (P (q), P (q)) where

P (q)(y, h) =def (y,q ◦ h) = (y, (qh, q ∗ ih ⊙ h))

P (q)(θ, η) = (θ, iq ∗ η)

and P (q) : πf (γ) ⇒ πf (δ) ◦ P (q) is given by

P (q)(y,h) = 1y.

¯ ¯ • For a 2-cell β : q ⇒ r in X¯ define the 2-cell (Πf )C,D(β) in Y¯ by

(Πf )C,D(β)(y,h) = (1y, β ∗ ih).

Theorem 5.3 For every functor f : X / Y in G, ¯ / ¯ Πf : X¯ / Y¯ is a 2-functor.

16 Proof. A tedious but straightforward verification.

· + / Next define the unit, or the evaluation operator: ε : f ◦ Πf IX¯ . Construct the composition of 2-functors

+ ¯ / ¯ Φ= f ◦ Πf : X¯ / X.¯

For C = (γ,C) of X¯, observe that

f,πf (γ) Φ(C) = (p1 , (f ↓ πf (γ)))

Explicitly, the objects of (f ↓ πf (γ)) will be tuples (x, (y, h),ν) where ν : f(x) / y. A morphism

(β, (θ, η)) : (x, (y, h),ν) / (x′, (y′, h′),ν′) (20)

/ ′ / ′ ′ consists of β : x / x and (θ, η) : (y, h) / (y , h ) in Πf (γ) such that θν = ν′f(β). For C ∈ X¯ define a 1-cell

/ εC = (εC, εC):Φ(C) C as follows: Let εC(x, (y, h),ν)= h(x,ν) on objects, and for a morphism (β, (θ, η)) as in (20), let

′ εC(β, (θ, η)) = h (β) ◦ η(x,ν). (21) / It can readily be checked that εC is a functor (f ↓ πf (γ)) C. There is a natural transformation

f,γ εC : p1 ⇒ γ ◦ εC given by (εC)(x,(y,h),ν) = h(x,ν). A calculation shows · + / Lemma 5.4 ε : f ◦ Πf IX¯ is a 2-natural transformation. · / + Next we define a counit IY¯ Πf ◦ f , which will merely be a pseudo- natural transformation. For C = (γ,C) note that

+ f,γ f,γ (Πf ◦ f )(C) = (πf (p1 ), Πf (p1 )). ¯ C / Π + C Define a 1-cell in Y : ψC = (ψC, ψC) : ( f ◦ f )( ) by c c ψC(c) = (γ(c), (k ,τ )) (c ∈ C) where

17 • kc : f −1(γ(c)) / (f ↓ γ) is given by

– kc(x, ϕ) = (x, c, ϕ) for (x, ϕ) ∈ f −1(γ(c)) and c / ′ ′ −1 – k (α) = (α, 1c) for α : (x, ϕ) / (x , ϕ ) in f (γ(c))

c f,γ c c • τ : pγ(c) ⇒ p1 k is defined by τ(x,ϕ) = 1x. / ′ β Furthermore for β : c c let ψC(β) = (γ(β), η ) where

β η(x,ϕ) = (1x, β). Let pf,γ ψC = iγ : γ ⇒ πf ( 1 ) ◦ ψC. This defines the first component ψ of the pseudo-natural transformation. The second component ρ is a family of 2-cells

+ (Πf ◦f )C,D(q)◦ψC - + C  (ρC,D)q 1 (Πf ◦ f )(D) ψD◦q

(for q : C / D in Y¯ ) given by

((ρC,D)q)c = (qc, iF (q)kc ) (c ∈ C). (22)

Here F is defined as in (18).

· / + Lemma 5.5 (ψ, ρ) : IY¯ Πf ◦ f is a pseudo-natural transformation.

Proof. We consider first the obstacle for ψ being a strict 2-natural trans- formation. Write C = (γ,C) and D = (δ, D). For a 1-cell q : C / D the + first component of (Πf ◦ f )(q) ◦ ψC at the object c ∈ C is

c c c c P (F (q))(ψC(c)) = (γ(c), F (q) ◦ (κ ,τ )) = (γ(c), (F (q)κ , F (q) ∗ iκc ⊙ τ )) (23) whereas the first component of ψD ◦ q computed at c is

q(c) q(c) ψD(q(c)) = (δ(q(c)), (κ ,τ )). (24)

These are clearly not equal. However, it can be checked that (qc, iF (q)κc ) as in (22) above is an isomorphism from (23) to (24). We next check that ρC,D is natural: we need to show that for q, r : C / D and α : q ⇒ r

+ iψD ∗ α ⊙ (ρC,D)q = (ρC,D)r ⊙ (Πf ◦ f )C,D(α) ∗ iψC . (25)

18 Computing the left hand side of (25) at c yields

(i ∗ α ⊙ (ρ ) ) = (i ∗ α) ◦ ((ρ ) ) ψD C,D q c ψD c C,D q c

c = ψD(αc) ◦ (qc, iF (q)κ ) αc = (δ(α ) ◦ q , η ∗ i −1 ⊙ i c ). c c f (qc) F (q)κ The right hand side of (25) at c is

+ + ((ρ ) ⊙ (Π ◦ f ) (α) ∗ i ) = (r , i c ) ◦ (Π ◦ f ) (α) C,D r f C,D ψC c c F (r)κ f C,D ψC(c) + = (rc, iF (r)κc ) ◦ (Πf )f +C,f +D(fC,D(α))(γ(c),(κc,τ c)) + = (rc, iF (r)κc ) ◦ (1γ(c),fC,D(α) ∗ iκc ) + c −1 c = (rc, iF (r)κ ∗ if (1γ(c)) ⊙ fC,D(α) ∗ iκ ) + = (rc,fC,D(α) ∗ iκc )

From α : q ⇒ r follows, by the pasting condition, δ(αc) ◦ qc = rc. This shows that the first components of (25) are the same. As for the second components evaluate at an arbitrary (x, ϕ) ∈ f −1(γ):

α αc − c (η ∗ if 1(q ))(x,ϕ) = η −1 c f (qc)(x,ϕ) = ηαc (x,qc,ϕ) = (1x, αc) + = fC,D(α)(x,c,ϕ) + = fC,D(α)κc(x,ϕ) + = (fC,D(α) ∗ iκc )(x,ϕ). showing that they are identical as well. The functoriality conditions (10) and (11) on ρ are straightforward to check.

Theorem 5.6 For each f : X / Y in G,

+ ¯ / ¯ hf , Πf , ε, (ψ, ρ)i : Y¯ / X¯ is a semi-strict pseudo-adjunction, where ε is 2-natural.

Proof. We compute the composition of pseudo-natural transformations

+ + + / + + / + (θ,σ)= εf ⊙ f (ψ, ρ) : f / (f ◦ Πf ◦ f ) / f .

For A ∈ Y¯ we have

θA = (εB ◦ F (ψA), εB ∗ iF (ψA) ⊙ F (ψA) (26)

19 where B = f +A. Now evaluating the first component of (26) at an arbitrary object (x, a, ϕ) ∈ (f ↓ α) we get

a a a εB(F (ψA)(x, a, ϕ)) = εB(x, (α(a), (κ ,τ )), 1α(a) ◦ ϕ)= κ(x,ϕ) = (x, a, ϕ).

/ ′ ′ ′ For an arbitrary morphism (θ1,θ2) : (x, a, ϕ) / (x , a ,x ) we have

θ2 εB(F (ψA)(θ1,θ2)) = εB(θ1, (α(θ2), η )) ′ a θ2 = κ (θ1) ◦ η(x,ϕ) = (θ1, 1a′ ) ◦ (1x,θ2) = (θ1,θ2).

This shows that εB ◦ F (ψA) = 1f↓α. The second component in (26) is

(εB ∗ iF (ψA) ⊙ F (ψA))(x,a,ϕ) = (εB)F (ψA)(x,a,ϕ)F (ψA)(x,a,ϕ)

= (εB) ◦ 1x (x,ψA(a),(ψA)a◦ϕ)

a a = (εB)(x,(α(a),(κ ,τ )),1α(a)◦ϕ) a = τ (x, ϕ) = 1x.

But 1x = 1 f,α (x, a, ϕ) = (i f,α )(x,a,ϕ). Thus p1 p1

θA = (1f↓α, i f,α ) = 1A. p1 Next consider σ. Let A and B be arbitrary and let h : A / B. Then since εf + is 2-natural we have by Remark 3.20

+ (σA,B)h = i(εf +)B ∗ ((f ρ)A,B)h. (27) and + + (σA,B)h : (f )A,B(h) ◦ θA =⇒ θB ◦ (f )A,B(h).

Since θC = 1C for all C we have

+ + (σA,B)h : (f )A,B(h)=⇒ (f )A,B(h).

Consider an arbitrary (x, a, ϕ). Then by (27)

+ ((σA,B)h)(x,a,ϕ) = (εf )B(ω(x,a,ϕ)) where + + ω = ((f ρ)A,B)h = f + ((ρA,B)h) A,(Πf ◦f )(B) and + (ρA,B)h : (Πf ◦ f )A,B ◦ ψA =⇒ ψB ◦ h. (28) Denote the domain and codomain in (28) by q and r respectively. We need to find the data for (21) so we compute domain and codomains for

/ ω(x,a,ϕ) = (1x, (ha, iF (h)κa )) : (x,q(a), qa ◦ ϕ) (x, r(a), ra ◦ ϕ).

20 Here we have

a a qa = P (F (h), F (h))(α(a),κ ,τ ) = 1α(a) and r(a) = (β(h(a)), (κh(a),τ h(a))). Thus

+ (εf )B(ω(x,a,ϕ)) = εf +B((1x, (ha, iF (h)κa ))) h(a) = κ (1x) ◦ (iF κa )(x,ϕ)

= (1x, 1h(a)) ◦ 1F (h)κa(x,ϕ)

= 1F (h)(x,a,ϕ)

= (iF (h))(x,a,ϕ).

This shows (σA,B)h = iF (h), so (θ,σ) is indeed the lax version of the identity 2-natural transformation. We now prove the second triangular equality, by computing the compo- sition

/ + / (ξ,ζ) = (Πf )ε ⊙ (ψ, ρ)Πf : Πf / (Πf ◦ f ◦ Πf ) / Πf . (29) Then for a given A

ξ = (P (ε ) ◦ ψ , P (ψ ) ∗ i ⊙ ψ ), (30) A A C A ψC C where C = Πf (A). We examine the first component, a functor. For an object (y, h) ∈ Πf (α)

(y,h) (y,h) P (εA)(ψC(y, h)) = P (εA)(πf (α)(y, h), (κ ,τ )) (y,h) (y,h) = (y, (εA ◦ κ , εA ∗ iκ(y,h) ⊙ τ )) = (y, (h, h)) = (y, h).

The third step follows because of the equations (31, 32, 33)

(y,h) εA(κ (x, ϕ)) = εA((x, (y, h), ϕ)) = h(x, ϕ) (31) for (x, ϕ) ∈ f −1(y). For β : (x, ϕ) / (x′, ϕ′) in f −1(y), and so κ(y,h)(β) : (x, (y, h), ϕ) / (x′, (y, h), ϕ′), we have

(y,h) εA(κ (β)) = εA((β, 1(y,h))) = εA((β, (1y, ih))) = h(β) ◦ (ih)(x,ϕ) = h(β). (32) For (x, ϕ) ∈ f −1(y)

(y,h) (y,h) (εA∗iκ(y,h) ⊙τ )(x,ϕ) = (εA)κ(y,h)(x,ϕ)τ(x,ϕ) = (εA)(x,(y,h),ϕ) = h(x,ϕ). (33) This proves that the first component is the identity on objects. As for morphisms consider (θ, δ) : (y, h) / (y′, h′)

(θ,δ) (θ,δ) P (εA)(ψC(θ, δ)) = P (εA)(θ, η ) = (θ, iεA ∗ η ) (34)

21 (θ,δ) / ′ ′ Now η(x,ϕ) = (1x, (θ, δ)) : (x, (y, h), ϕ) (x, (y , h ), ϕ) so

(θ,δ) ′ (iεA ∗ η )(x,ϕ) = εA((1x, (θ, δ))) = h (1x) ◦ δ(x,ϕ) = δ(x,ϕ).

Thus (34) is (θ, δ) and consequently

P (εA) ◦ ψC = 1Πf (α). We now consider the second component in (30):

(P (ψ ) ∗ i ⊙ ψ )) y, h) = P (ψ ) (ψ ) A ψC C ( A ψC(y,h) C (y,h) (y,h) (y,h) = P (ψA)(y, (κ ,τ )) ◦ 1πf (α)(y,h)

= 1y ◦ 1πf (α)(y,h)

= 1πf (α)(y,h) = (iπf (α))(y,h).

Thus

ξA = (1Πf (α), iπf (α)) = 1Πf (A). Finally, we compute ζ. For q : A / B we have

′ ζ = (ζA,B)q : H(q) ◦ ξA =⇒ ξB ◦ H(q),

′ where H(q) = (Πf )A,B. Noting that ξA = 1A and ξB = 1B we get ζ : H(q)=⇒ H(q) and so ζ′ : P (q)=⇒ P (q),

Since Πf ε is strict 2-natural we may, according to Remark 3.20, compute

′ ζ = i(Πf ε)B ∗ ((ρΠf )A,B)q = iP (εB) ∗ (ρΠf (A),Πf (B))r where r = H(q). Thus

′ (ζ )(y,h) = P (εB)(((ρΠf (A),Πf (B))r)(y,h))

= P (εB)(P (r)(y,h), iF (r)κ(y,h) )

= (P (r)(y,h), iεB ∗ iF (r)κ(y,h) )

(y,h) = (1y, iεB◦F (r)κ )

The last component can be simplified as follows: consider an arbitrary (x, ϕ)

(y,h) εB(F (r)(κ (x, ϕ))) = εB(F (r)(x, (y, h), ϕ))

= εB(x, r(y, h), r(y,h) ◦ ϕ))

= εB(x, (y, (qh, q ∗ ih ⊙ h)), 1y ◦ ϕ)) = qh(x, ϕ)

22 On the other hand,

(iH(q))(y,h) = (iP (q))(y,h)

= 1P (q)(y,h) = 1 (y,(qh,q∗ih⊙h))

= (1y, iqh) ′ = ζ(y,h)

Hence ′ ζ = iH(q) which shows that (ξ,ζ) a lax version of the identity 2-functor as well.

6 Further work

There are several further type constructions [8] whose counterpart in G might be worth investigating, if they exist. For instance, general inductive and recursive types, in particular the type of well-founded trees with infinite branching, and universes closed under type construction. Whether there exists some counterpart to the subobject classifier seems also to be an inter- esting question.

Acknowledgements I am grateful to Anders Kock for instructive conversations on 2-categorical notions of universality (Section 4) and to Ieke Moerdijk for first directing me to 2-categories in connection with intensional type theory. Also remarks of Thorsten Altenkirch and John Power have been suggestive and helpful. Most of the work reported here was carried out at the Institut Mittag-Leffler during spring 2001. This paper was presented at the 79th Peripatetic Seminar on Sheaves and Logic in Doorn, 2003.

References

[1] E. Bishop and D.S. Bridges. Constructive Analysis. Springer 1985.

[2] R. Blackwell, G.M. Kelly and A.J. Power. Two-dimensional monad the- ory. J. Pure Appl. Algebra 59(1989), 1 – 41.

[3] F. Borceux. Handbook of Categorical Algebra, vol. 1. Cambridge Univer- sity Press, 1994.

[4] R. Brown. From groups to groupoids: a brief survey. Bull. London Math. Soc. 19(1987), 113 – 134.

23 [5] F. Conduché. Au sujet de l’existence d’adjoints à droite aux func- teurs “image reciproque” dans la catégorie de catégories. C.R. Acad. Sc. 275(1972), 891 – 894.

[6] J.W. Gray. Formal : Adjointness for 2-categories. Lec- ture Notes in Mathematics, vol. 391. Springer 1974.

[7] P.J. Higgins. Notes on Categories and Groupoids. Van Nostrand 1971.

[8] M. Hofmann and T. Streicher. The groupoid interpretation of type theory. In: G. Sambin and J. Smith (eds.) Twenty-Five Years of Constructive Type Theory, pp. 83 – 111. Oxford 1998.

[9] P.T. Johnstone. Sketches of an Elephant: A Topos Theory Compendium, vol. 1. Oxford University Press 2002.

[10] G.M. Kelly and R. Street. Review of the elements of 2-categories. In: Lecture Notes in Mathematics, vol. 420, pp. 75 – 103. Springer 1974.

[11] S. Mac Lane. Categories for the Working Mathematician. Springer 1971.

[12] I. Moerdijk and E. Palmgren. Type Theories, Toposes and Construc- tive Set Theory: Predicative Aspects of AST. Ann. Pure Appl. Logic 114(2002), 155 – 201.

Erik Palmgren Department of Mathematics, Uppsala University PO Box 480, SE-751 06 Uppsala, Sweden E-mail: [email protected] WWW: www.math.uu.se/˜palmgren

24