Math. Struct. in Comp. Science (2002), vol. 12, pp. 265–279. Printed in the United Kingdom c 2002 Cambridge University Press
Tripos theory in retrospect
A N D R E W M. P I T T S Cambridge University Computer Laboratory, William Gates Building, JJ Thomson Avenue, Cambridge CB3 0FD, UK
Received 7 December 1999; revised 7 August 2000
The notion of tripos (Hyland, Johnstone, and Pitts 1980; Pitts 1981) was motivated by the desire to
explain in what sense Higg’s description of sheaf toposes as ¡ -valued sets and Hyland’s realizability toposes are instances of the same construction. The construction itself can be seen as the universal solution to the problem of realizing the predicates of a first order hyperdoctrine as subobjects in a logos with effective equivalence relations. In this note it is shown that the resulting logos is actually a topos if and only if the original hyperdoctrine satisfies a certain comprehension property. Triposes satisfy this property, but there are examples of non-triposes satisfying this form of comprehension.
1. Introduction In 1979 I was fortunate enough to attend some lectures in which Martin Hyland described, for the first time in public, how to use Kleene’s notion of recursive realizability (Kleene 1945) to build what subsequently came to be known as the effective topos (Hyland 1982). Although motivated by applications in constructive analysis, this topos turned out to have some intriguing proper- ties (Hyland 1988; Rosolini 1990) of use to the related fields of type theory and programming language semantics; see (Phoa 1990) and (Reus and Streicher 1999), for example. But back in 1979, the personal significance of Hyland’s lectures was that they led me to formulate the notion of ‘tripos’ and were the catalyst for the research that formed my PhD thesis. The description Hy-
land gave of his topos was analogous to Higg’s version of the category of sheaves on a complete ¢ Heyting algebra ¢ , in terms of ‘ -valued sets’ (see Fourman and Scott 1979, Section 4). Yet the properties of the effective topos are in many respects quite different from those of a category of sheaves. For example, it is not a Grothendieck topos (see Hyland, Johnstone, and Pitts 1980, p 222). Thus the following question naturally arose:
Question. Is there a common generalisation, with useful properties, of the constructions of ¢ - valued sets and of the effective topos?
Drawing upon Lawvere’s treatment of logic in terms of hyperdoctrines (Lawvere 1969; Lawvere 1970), I came up with an answer to this question based on a structure of indexed collections of posets with certain properties. Peter Johnstone (my PhD supervisor) suggested naming these structures with the acronym tripos—standing for Topos Representing Indexed Partially Ordered Andrew M. Pitts 2
Set £ — and the rest, as they say, is history. Well in any case, the three of us developed the initial
properties of set-based triposes in (Hyland, Johnstone, and Pitts 1980) ¤ and I went on in my thesis (Pitts 1981) to develop and apply the theory of triposes over an arbitrary base. The purpose of this note is to point out that there is a slightly more general class of hyper- doctrines than triposes answering the above Question. The generalisation hinges upon a careful analysis of the comprehension properties that a hyperdoctrine may possess (different from the ones in the classic paper by Lawvere (1970) to do with reflecting predicates into subobjects). Thus there are hyperdoctrines that generate toposes in just the same way that triposes do, yet whose ‘powerobject’ structure is weaker than that required of triposes. This is explained, and ex- amples given, in Section 4. The scene is set by recalling material on hyperdoctrines in Section 2 and the category of partial equivalence relations of a hyperdoctrine (i.e. the ‘tripos to topos’ construction) in Section 3. I have been aware of this generalisation of triposes since about 1982, but never found a good excuse to air it in print. I’m grateful to the Tutorial Workshop on Realizability Semantics held as part of FLoC’99 for providing the opportunity to do so. A preliminary version of this paper appears in the proceedings of that workshop (Birkedal and Rosolini 1999).
2. First order hyperdoctrines We will be concerned with categorical structures that are based on the notion of hyperdoc- trine (Lawvere 1969) and that are tailored to modelling theories in first order intuitionistic pred-
icate logic with equality. Such a structure has a ‘base’ category ¥ (with finite products) for
modelling the sorts and terms of a first order theory; and a ¥ -indexed category (Johnstone and
Pare´ 1978) ¦ for modelling its formulas. Since we will only be concerned with provability rather than proofs, we restrict attention to indexed partially ordered sets rather than indexed categories.
The following definition recalls the properties of §¨¥ © ¦ needed to soundly model first order in- tuitionistic predicate logic with equality. The fact that we are dealing with full first order logic, rather than a fragment of it, masks some properties (‘Frobenius reciprocity’, stability of the equality predicate under re-indexing, etc) which the definition would otherwise have to contain:
see (Pitts 2000, Section 5) for more details.
¦ ¥
Definition 2.1. Let ¥ be a category with finite products. A first order hyperdoctrine over
¥ "# $ is specified by a contravariant functor ¦¥ ! from into the category of
partially ordered sets and monotone functions, with the following properties.
% ¦ §&%'
(i) For each ¥ -object , the partially ordered set is a Heyting algebra, i.e. has a greatest
) * + element ( ( ), binary meets ( ), a least element ( ), binary joins ( ), and relative pseudo-
complements ( ).
,-.%/#10 ¦ §2,3 45¦ §206 7¦ §&%' (ii) For each ¥ -morphism , the monotone function is a
homomorphism of Heyting algebras. 8 It was partly a joke: the Tripos is the name Cambridge University gives to its examinations; for example, Martin’s lectures were a graduate-level course on Constructive Analysis for Part III of that year’s Mathematical Tripos. Maybe
Peter was not making a serious suggestion, but being an obedient pupil, I adopted it. 9 How appropriate that the first paper on triposes should have three authors.
Tripos theory in retrospect 3
F G H¨:I;7J
(iii) For each diagonal morphism :<;>=@?BA#CD?E6? in , the left adjoint to at the top
KMLG HN?'J O G HN?PE?'J element exists. In other words there is an element ; of satisfying
for all QRLSG HN?DET?UJ that O4;YVZQ6[
K>VWG H¨: ;7JXH2Q"J if and only if
F G H&\^J_=`G H&]aJbA#C
(iv) For each product projection \'=$]IE?DACB] in , the monotone function
H2de?'J f Hhg?UJif
G H&]cES?'J has both a left adjoint and a right adjoint :
Q>V-G H&\^JXH2QjNJ H¨de?'J H2Q"JbVkQj
if and only if f Q"j^VmHng?'JifoH&Q"JX[
G HN\^JlH&QjNJ_VkQ if and only if
] pq=r]cACB] F
Moreover, these adjoints are natural in , i.e. given j in , we have
tvulw.xnyXz|{ tvulw.xnyXz|{
G H&] ET?'J s G H2]cET?UJ s G H2]cET?UJ G H&] ET?'J
j j
~ ~
tv} {N~ tv} { t {N~ t {
; ; ; ;
G H2] J G H&]aJ G H2] J G H&]aJ[
thu{ thu{
j j
s s
? F G The elements of G H&?'J , as ranges over -objects, will be referred to as -predicates.
Here are two examples of first order hyperdoctrines that are relevant to the development of tripos theory.
Example 2.2 (Hyperdoctrine of a complete Heyting algebra). Let be a complete Heyting
algebra. It determines a first order hyperdoctrine over the category ^! of sets and functions
;
G H&?'JO ?
as follows. For each set ? we take , the -fold product of in the category of
Heyting algebras; so the G -predicates are indexed families of elements of , ordered componen-
; G H¨3J4=# 'RA#C1
twise. Given -=#?A#C1 , is the Heyting algebra homomorphism given
w
; ;
O;
by re-indexing along . Equality predicates in are given by
Ok K
if j
O4;IHN^ J'lO
j
-Ok
if j
where of course K and are respectively the greatest and least elements of . The quantifiers
QL
use set-indexed joins ( ) and meets ( ), which possesses because it is complete: given
w
f ;
one has
r¡ 6 r¡
H2d5?'JfoH2Q"J O.L][ Q6H& J Hng?'Jif¢H2Q"J O£¤LS][ Q HN ¢J
l l
; ; f in .
Example 2.3 (Realizability hyperdoctrines). A partial combinatory algebra (PCA) is specified H AJ§¦!H AJb=r¥RES¥©¨B¥
by a set ¥ together with a partial binary operation for which there exist
ª¢«pqLT¥ ¬#«¬ «¬ LS¥
j j
elements satisfying for all j that
ªI¦l¬6 H2ª ¦®¬5Ja¦ ¬ ¬
and j#¯
p¦l¬q°H¨p±¦ ¬eJa¦ ¬ HH2p±¦ ¬5J§¦l¬ J§¦®¬ H&¬q¦ ¬ J§¦rH2¬ ¦®¬ J
j j j#¯ j j j j j j and
Andrew M. Pitts 4
² ²T´²@µ ²
where in general ²³ means ‘ is defined’ and is Kleene equivalence, i.e. ‘ is defined
µ ¶
if and only ² is, and in that case they are equal’. For example the set of natural numbers
¹ · is a partial combinatory algebra if we define ·P¸$¹ to be the value at (if any) of the th
partial recursive function, for some suitable enumeration. Another important example, in which ½|¾ the application function ºi»¼b¸.º »¼ is total, is given by the untyped lambda terms modulo -
conversion.
À Á^Â$Ã Ä
Given a PCA ¿ , we can form a first order hyperdoctrine over . For each set , the źN¿Æ¼Ç
partially ordered set À ºNÄ'¼ is defined as follows. Let denote the set of functions from
¿ È ÉÊÈÊÉ˵
Ä to the powerset of . Let denote the binary relation on this set defined by: if and
ÎRÍ©Ä ÌÏÍ>É4ºNμ Ì5µo¸!Ì only if there is some Ì5µ7Í©¿ such that for all and , is defined and in
É_µºNμ . Standard properties of PCAs imply that this relation is reflexive and transitive, i.e. is a ź&¿Ð¼«Ç
preorder. Then define À ºNÄ'¼ to be the quotient of by the equivalence relation generated
ÑÒÉÓ È
by È ; the partial order between equivalence classes is that induced by . Given a function
ÔcÕ Ô Õ Ô
À º ¼ À º&ØI¼Ë»¢×ÙÀ ºNÄ'¼ ÑÒÉÓ ÑÒÉÛÚ Ó ÄÖ»×/Ø , the function sends to ; it is easily seen to be
well-defined, monotone and functorial. Ý
As is well known, PCAs are functionally complete. In particular, from Ü and one can con-
µ µ
º2ÌßÌ ¼qâ×ãºäÞ¸@Ìe¼_¸@Ì ¿Yå'¿ ¿
struct elements Þ|ß&Þ3à`ß&Þ#á so that is an injection of into with left
Ìæâ×çºÞ ¸èÌß2Þ ¸èÌ5¼ À ºNÄ'¼ á inverse à . From this it follows that each is a Heyting algebra with the
Heyting operations given as follows.
é/êlëì
í
Ñ î.ÎæÍTÄï¿|Ó
êlëì
í
µ µ^ò µ µ
ÑÒÉÓeð'Ñ É Ó Ñ î.ÎæÍTÄïlñ$ºÞ¸®Ìe¼Ð¸®Ì Ì ÍÉ4º&μoóZÌ ÍæÉ º&μôlÓ
õ
êlëì
í
Ñ î.ÎæÍTÄïöèÓ
êlëì
í
ò ò
µ µ µ µ
ÑÒÉÓe÷'Ñ É Ó Ñ î.ÎæÍTÄïlñ$ºÞ¸ Þ¢àX¼Ð¸®Ì ÌøÍæÉ4ºNμô_ùúñ$ºäÞ¸iÞ#á ¼§¸®Ì Ì ÍúÉ ºN΢¼ôlÓ
êlëì
í
µ µ^ò®û µ µ
ÑÒÉÓ5×PÑ É Ó Ñ î.ÎæÍTÄïlñ Ì ÌÍÉ4º&μ¢ï«Ì ¸lÌ º&μôlÓï
is defined and in É Ä
The equality À -predicate for is given by
êlëì
í í í
µ µ
Ñ î|ºNÎ^ßÎ ¼bÍSÄBåTÄï Î ¿ ö Ó
if Î then else Ç
and the quantifier operations on any ÑÒÉÓÍÀ º&üýåWÄ'¼ are given by set-theoretic union and
intersection:
êlëì
í
º¨þeÄ'¼ÿoºÑ ÉÓN¼ Ñ î¡ Íü¥¤§¦ É4º¨ ß Î¢¼Ó
Ç
êlëì
í
û
º Ä'¼iÿ¢ºÑ ÉÓN¼ Ñ î¡ Íü¥¤§¦ É4º¨ ß Î¢¼Óï Ç We will call this first order hyperdoctrine the realizability hyperdoctrine determined by the partial
combinatory algebra ¿ . Let us recall briefly the connection between first order hyperdoctrines and first order logic
(see Makkai 1993; or Pitts 2000, Section 5 for an overview). Given a first order signature of sorts
Ô'Õ
ÄTàèß®ïlï®ïlß Ä ×ÖÄ kÄTàèß®ïlïlï®ß Ä
Ä , function symbols , and relation symbols , a structure
Ñä»bÓ Ó º ßiÀ ¼ Ñ Ñ ÄÓ Ó
Ñ for the signature in a first order hyperdoctrine assigns a -object to each sort,
Ô Õ
Ñ Ñ Ó Ó Ñ Ñ Ä à«Ó ÓÆåÛ¸®¸l¸¢åWÑ Ñ Ä $Ó Ób»#×çÑ Ñ ÄÓ Ó À a -morphism to each function symbol, and a -predicate
Tripos theory in retrospect 5
£ "!#!$!% & (') ¨*
to each relation symbol. Then each term + over the signature, with
/ /
10 32$4#4#4$2 '"0 ' 5
variables in ,.- and of sort say, can be interpreted as a -morphism
6£78 9 : ;!$!#!< = '>
0
, , - ?
+ , where ; and each first order formula , with
@" A*
? , +
free variables in , say, can be interpreted as a -predicate . The definitions of
and ? proceed by induction on the structure of those expressions, using the various properties
given in Definition 2.1 to interpret the logical symbols. For example, the atomic formula +B-¥C;+ED
GF ¨I*# *
2
+ +HD -KJ J L
asserting the equality of two terms of sort is mapped to the -predicate CML ;
/ 9 A* A*
0 4
N ? N J J O ? L and a universally quantified formula is mapped to L . Note in particular
that a first order sentence (i.e. a formula with no free variables) gets interpreted as an element of
EP3* P
? ?
, where is the terminal object in 5 . We say that the structure satisfies a sentence if is PQ* the top element of . This notion of satisfaction is sound for first order intuitionistic logic, in the sense that all provable sentences are satisfied. It is also complete, in the sense that a sentence is provable if it is satisfied by all structures in first order hyperdoctrines. This completeness result is not very informative because the collection of such structures includes one (in a ‘Lindenbaum- Tarski’ hyperdoctrine constructed from syntax) in which satisfaction coincides with provability.
A more useful R consequence of this connection between first order logic and first order hyper- doctrines is the ability to use the familiar language of first order logic to give constructions in a hyperdoctrine that would otherwise involve complicated, order-enriched commutative diagrams. To do this one uses the following language.
Definition 2.4 (Internal language of a hyperdoctrine). One can associate to each first order
¥*
2
5 S
hyperdoctrine 5 a signature having a sort for each -object, an -ary function symbol for
¥ T!#!$!U V 'T6£7W S
each 5 -morphism of the form and an -ary relation symbol for each
¨ V!#!$!X 'Y* (' 2#4#4$4#2 -predicate in (for each list of objects and each object ). The
terms and first order formulas over this signature form the internal language of the hyperdoctrine.
¥* 2
There is an obvious structure in 5 for this signature and this enables one to use the
5 internal language to name various 5 -objects, -morphisms and -predicates; and satisfaction by this structure of sentences in the internal language can be used to express conditions on the hyperdoctrine. We make extensive use of this in the rest of the paper.
3. The category of partial equivalence relations of a hyperdoctrine Higg’s version of the topos of sheaves on a complete Heyting algebra and Hyland’s realizability topos on a partial combinatory algebra can be obtained by applying the same construction to the indexed partially ordered sets in Examples 2.2 and 2.3 respectively. The construction only relies upon the fact that these indexed posets are first order hyperdoctrines in the sense of Definition 2.1.
(In fact it only relies upon the -[Z]\ part of first order logic/hyperdoctrines, but the considerations
in the next section need full first order logic.) Here is the construction.
] 5
Definition 3.1 (The category 5 ). Let be a category with finite products and a first order
] 5
hyperdoctrine over 5 . Define a category as follows. ^ More useful, of course, only for those people who prefer the ‘element-centric’ language of predicate logic; others prefer to stick with the ‘arrow-centric’ language of category theory.
Andrew M. Pitts 6
` e cgfih_¨`kj"`Vd h (i) An object is a pair _a`&bGcKd with a -object and a -predicate satisfying
the following sentences of the internal language of _lebh¥d expressing that it is a partial
equivalence relation (i.e. symmetric and transitive, but not necessarily reflexive).
mon nqpsr n nqp n£p n
`gt%c_ b d9uvc_ b d
b (1)
m£n n£p nqp pUr n nqp nqp n£p p n n£p p
b `gt%c_ b dswTc_ b d"uxc_ b dyt
b (2)
_¨` {%bGc|{3d h }~fh_¨`z ing the following sentences of the internal language of _ebEh¥d expressing that it respects the c{ partial equivalence relations cz and , and is single-valued and total with respect to them. mon r n r n n n n n n `z3b { ` {Bt} _ z§b {$d9uxcz§_ z§b z#dowTc|{)_ {%b {3d z (3) m£n n£p r n nqp r n nqp n n£p n n nqp nqp z z { { z z { { z { b ` b b ` tc _ b dswTc _ b dowT} _ b d"uv} _ b d { z { z { z (4) m£n r n n r n n n n n n p p p z `z3b {%b ` {Bt} _ z§b {$dswT} _ zb diuxc{%_ {%b d { { { (5) mon r n n n r n n z z z z z { { z { tc _ b d9ux ` tG} _ b dt ` (6) c (iii) The identity morphism on _¨`&bHcKd is given by itself. r r z z { { { { _a` bGc di £_a` bGc d _¨` bGc d" q_¨` bGc|Qd h (iv) Composition of } and is the - n r n n n n h_¨`z]j9` d { `({tG} _ zb {3dw; _ {)b d predicate in determined by the formula in the internal language of _lebh¥d . h] That composition in e is well defined, associative and has the indicated morphisms as identities all follows from the soundness of first order hyperdoctrines for first order intuitionistic logic. The same is true for the following characterisation of finite products and subobjects in h] e . h] Lemma 3.2 (Finite products in e ). z h] _E%b d e (i) e has a terminal object: it is , where is terminal in . z z { { h] _¨` bHc d _¨` bGc d (ii) The product of e -objects and is > % _¨`z3bHczyd _¨`zj` {%bGcz[j"c|{3d _¨` {bGc|{Qd e c[z:jc{]fh_G_¨`z|j` {$dMj z z { { ` j` ` where ` is the product in , and z { z { j` dGd <Bfih_G_¨` j` dj` d _a` and are defined by: p p p _acz]jic|{Qdy_a£bG d@$l cz%_¨sz_aXdybsz§_a ddUwc|{)_¨£{_aYdb£{_a dGd n n $l <H_¨ob d c|H_¨£G_aYdb dt h] Lemma 3.3 (Subobjects in e ). h] _a`&bGc¥d (i) Every subobject of a e -object can be represented by a monomorphism of the form r _a`&bGc [d q¡_¨`¢bGcKd £fih_¨`.d c where satisfies mon9r n n n d&uvc_ b d `gt% K_ (7) m£n n r n n nqp n£p b `gt% K_ dwc_ b d9u¤ ¥_ d b (8) Tripos theory in retrospect 7 §£¨i©ªa«¬i«V® ¥ § and where ¥¦ is defined from and by ¶ ª¯¥¦ §®yªa°±G°q²a®¢³#´lµ ¥ª¨°±G°q²A®s·T§Kªa°£®¸ § This sets up an isomorphism between the sub-poset of ©ª¨«.® consisting of those satisfying ¹º ©]» (7) and (8) and the usual poset of subobjects of ªa«&±G¥K® in . ©]» ¥¦ §½¼ª¨«&±H¥¦ §®"¾£¿8ª¨«&±H¥K® (ii) ¹º has pullbacks of subobjects. The pullback of along a ÀÁ¼¡ª¨« ±G¥ ®Â¾£¿¡ªa«&±G¥¥® ªa« ±H¥ ® ² ² ² morphism ² is the subobject of determined, as in (i), by the § ¨©ªa« ® ² element ² given by ¶ à ² ² ² § ªa° ®¢³#´lµ °9¼%«¸HÀ ª¨° ±G°£®s·T§Kªa°£®y¸ Recall that a category Ä is a logos if it has finite limits, pullback-stable images and dual images of subobjects along morphisms, and pullback-stable finite joins of subobjects (Makkai and Reyes Ä ÅqÆ¡ÇÈɼĥÊl˾q¿ÍÌΣÏ$Ð)Ñ 1977). Any category Ä with finite limits determines an -indexed poset Ä mapping Ä -objects to their posets of subobjects and mapping -morphisms to pullback func- tions. (Well of course the posets involved may actually be poclasses unless one assumes Ä is well-powered, but size is not an issue here.) Then we can give an alternative characterisation of logoses in terms of hyperdoctrines: they are precisely the finitely complete categories Ä for Ä which ţơÇyÈ is a first order hyperdoctrine over . Using this fact combined with Lemmas 3.2 ©]» and 3.3, we can deduce some exactness properties of ¹º . ©]» Theorem 3.4. The category ¹º of partial equivalence relations of a first order hyperdoctrine ©]» is a logos. Moreover, all equivalence relations in ¹º have a quotient, i.e. have a coequalizer whose kernel-pair is the equivalence relation (see Makkai and Reyes 1977, Definition 3.3.7); one says that a logos has effective equivalence relations in this case. ©]» Proof. Since ¹º has finite products (Lemma 3.2) and pullbacks of all monomorphisms (Lemma 3.3), it also has equalizers and hence all finite limits. Using the soundness of first order logic for the internal language of ªl¹±©¥® and the characterisation of subobjects in Lemma 3.3, ÔUÕ ¹º ©]» it is straightforward to deduce that ÅqÆ¡Ç3ÒMÓ is a first order hyperdoctrine over and hence that the latter is a logos. As for quotients of equivalence relations, if a monomorphism ªa«Ö¬ «&±$ª¯¥×¬¢¥¥®#¦ Ø®1¾£¿Ùª¨«Ú¬¢«&±G¥Û¬&¥K® ¹º ©]» determines an equivalence relation on ª¨«¢±G¥K® in , ¹º ©]» Ø ª¨«&±H¥K® then it follows that ª¨«&±HØ® is also a -object, and that determines a morphism from to ª¨«¢±GØ]® which is the quotient of the equivalence relation. Ô ©]» Ü ¼|¹Ý¾£¿x¹º ©]» Definition 3.5 (Constant objects in ¹º ). We can define a functor as Ô Ô « ªa«&± Þß[® Ü àá¼X«âK¾q¿ã« ä follows. On objects, Ü maps to ; and on morphisms, maps to â ßå ä ß<æ â ß<æ ä ± Þ ® ª¨« ±Þ ® à@ªa° ®Þ ° the morphism from ª¨« to given by the formula in the internal Ô Ü language of ª¹±©¥® . From Lemma 3.2 we have that preserves finite products; and from Ô ÔUÕª¯Ü ª¨«V®G® ©ªa«V® « Lemma 3.3 it follows that ţơÇ$ÒMÓ is isomorphic to , naturally in . Objects of Ô ª¨«V® ¹º ©]» the form Ü in are called constant objects in (Pitts 1981). Andrew M. Pitts 8 é]ê ë¨ì¢íGîKï It is not hard to see that any çè -object can be presented as a quotient of the subobject é îë¨òíò£ï î of ð¥ñëaìVï determined by the -predicate , with the quotient morphism given by itself: è è îë¨òíò£ïê ê ó ëaì&íGî¥ï ñ ð ëaìVïô From this observation it is but a short step to the following (folklore?) characterisation of the category of partial equivalence relations of a first order hyperdoctrine. ñ=õ ç÷öqøùçè é]ê ç Theorem 3.6 (Universal property of ð ). Let be a category with finite prod- ñTõ ç ð çgöqøùçè é]ê ucts and let é be a first order hyperdoctrine over . Then gives the universal way of realizing é -predicates as subobjects in a logos with effective equivalence relations. For if ú ú õ ç÷ö£ø is such a logos and û is a functor preserving finite products, then there is a natural equivalence üqý¡þ$ÿÂëaû£ëEöïï poset of first order hyperdoctrine morphisms: éëEöï ç çè é]ê category of logos morphisms over : î ô ¡ ¢¤£ ¥ ç ú õ §¦øùçè é]ê û ç÷ö£ø Thus é provides a left adjoint (qua bicategories) to the functor mapping to ú ÿ ÿ ë¯ûqëöïï çè ü£ý¡þ ë¯ûqëöïïlê<öqø üqý¡þ . The logos morphism which is the counit of this adjunction ú õ ç ö£ø at û is always full and faithful; moreover, it is also essentially surjective (and hence an equivalence) if and only if every ú -object is a quotient of a subobject of some object in the image of û . ¨¦øvçè é]ê In a sense the construction ëçíEé¥ï falls between two stools. If one just wants to çè é]ê realize é -predicates as subobjects in a logos, then the full subcategory of consisting of subobjects of constant objects is the universal solution. On the other hand, as well as considering logoses with effective equivalence relations, it is very natural to consider ones with finite disjoint coproducts as well—i.e. Heyting pretoposes (cf. Pitts 1989). The universal solution to realizing çè é]ê é -predicates in a Heyting pretopos is the mild generalisation of (implicit in Makkai and Reyes 1977, Part II) whose objects are partial equivalence relations ‘spread over a finite number of ç -objects’: the definition is like that given on pp 45–46 of (Pitts 1989). é]ê 4. When is çè a topos? é Let ç be a category with finite products and a first order hyperdoctrine over it. Suppose that é]ê çè does happen to be a topos (Johnstone 1977). So for each object, and in particular for each £ ¢ © ñ ëaìVï constant object ð there is a powerobject equipped with a membership relation ¢¤£ © ¢¤£ ñ ð ë¨ìVï ð¥ñëaìVï such that every subobject arises Tripos theory in retrospect 9 via a pullback ¨! "$#&%(' (9) , * - .0 )+*¤,+-/.0 1 32 *¤, - .0 *¤,;- .0 . !87:9 2 2 =<>@?BADC from a unique morphism 465 . Let us suppose that is , . )E*¤, - .0 ) GIH say. So the membership relation is given, as in Lemma 3.3, by a F -predicate . . J <>1 AKC GIH F . Amongst other things, must respect the partial equivalence relation : LNM M M . . . O?QP&?RPTS <>VU ?RPW+XYADC ZP&?BP[S$3\ ?BP[S$]U 5 GIH G]H 5 (10) ^=_`bacZ_¤?]aedQ Specialising to the case when ! is a constant object , for which subobjects =1 !caf J _E ) h i_E g F 4 are determined by arbitrary F -predicates , we find that the morphism is a =_j <>1 F F -predicate in which, in order for (9) to be a pullback, satisfies L:M M M . O?lk _mU ?lknporq(P <>VU ?BPW+X kB?BPTIU 5 5 g 5 G]H 4 (11) . d =_b?Ba 7:9sZ<>O?BADC Since 4 does determine a morphism it also satisfies L . k _b?RP&?RPTS <>tU kB?BPT+X kB?RPTS$¨\uADC vPw?BPTS/ 5 4 4 5 (12) L . . k _mUxk`a ky\zq(P <>VU kB?BPT k{a k 5 4 | and 5 , which since is means that L k _mU&qQP <>VU kB?RPWIU 5 4 5 (13) From (10), (11) and (12) we deduce L L:M M M . k _b?QP <>tU kB?BPT\ }U ?BPTlo ?lkn 5 5 4 5 G]H g which combined with (13) gives L L:M M M . k _mURq(P <>tU tU ?BPTpo ?~kn]U 5 5 5 G]H g (14) ? F F So we have shown that if y is a topos, then satisfies the following Comprehension Axiom. . ) <> F GIH F Axiom 4.1 (CA). For all -objects there is a -object and a -predicate ) <>1 _ ^_E F g F F such that for any -object and -predicate , satisfies the sentence (14) of its internal language. Theorem 4.2 (First order hyperdoctrine + CA = topos). Suppose is a category with finite products and F is a first order hyperdoctrine over . Then the associated category of partial ? F F equivalence relations y is a topos if and only if satisfies (CA). E0 Proof. The argument above gives the ‘only if’ direction. Conversely suppose- . the hyperdoc- trine does satisfy (CA). We will show how to construct the powerobject 2 of any object ) . O?R ADC =<>J ¨<> y F in . Define F by LNM M M . . . . S S ADC vPw?BP @o A{ vPT¨X }U ?RPWno ?BP 5 GIH G]H Andrew M. Pitts 10 where {QZW1 $N3xVR] N ¡BWE¢¤£¥= ¡~:l ¦ §:E¡l©¨ xVRI E¡RW;¦ª£¥E¡l©¨E¢6] =©¨v¡RW~] =«>O¡]D¬ ] ; ¡BWD¦t{:ZW ¯° One can show that is a y® -object and that the formula determines (via Lemma 3.3) a subobject =O¡~£D² Z«>O¡BD¬ I ± (15) Z³¤¡~´µ ¯° For any other y® -object and subobject O¡R£²j=³¤¡R´µ ¶ (16) J²¨³` =³j²«>1 ± ± ¯ ¸ ¯ determined by · say, let be ¹B¡RW §:3xVRI E¡RW ¹B¡~:l+¦º´m=¹R¡~¹n ¸ · ¡ Z³¤¡R´µ ¯ ¸ Routine calculation in the internal logic of shows that is a morphism from to =«>O¡]D¬ ² ¸ ¸ , that the subobject (16) is the pullback of (15) along »=¼ , and that is the unique =«>O¡]D¬ O¡R£ ¯° morphism in y® with this property. So is indeed a powerobject for . Thus ¡ ¯ y® ¯° when satisfies (CA), has finite limits (Theorem 3.4) and powerobjects and hence is a topos. In Axiom 4.1, one way to satisfy (14) is to insist that its ‘Skolemized’ version holds, i.e. that ¾³j¿©ÀJ«> ½ there is a -morphism satisfying :¹¤&³mÁN¨wtÂ] N= ¡ ¹nl E¡l¹n ½ · }² Iv] NÆ s² ³` »=¼ ½ ¯ ½ i.e. such that ·ÄÃů in . (Of course, such an is not necessarily unique up to equality of -morphisms.) This leads to the definition of tripos. Definition 4.3 (Triposes). Let be a category with finite products. A -tripos is a first order hyperdoctrine ¯ over equipped with the following extra structure. For each -object there «> ] ; Dzȫ>1 ³ ± ± ¯ ¯ · is a -object and a -predicate such that given any and ² Iv] ¤²^³E &³j¿©ÀË«> ÉW·Ê ÉW·Ê ·ÌÃͯ »=¼ ¯ , there is a -morphism with . Since this y® ¯° implies that ¯ satisfies (CA) we know from the above theorem that is a topos—the topos ¯ generated by the -tripos . If the base category happens to be cartesian closed, one can further simplify this Skolemized version of (CA). ¯ Theorem 4.4 (Generic predicates). Let be a category with finite products and a first order hyperdoctrine over (i) If ¯ is a tripos, then it possesses a generic predicate (Hyland, Johnstone, and Pitts 1980, Def- ÎÏRÐRÑ ¯ inition 1.2(iii)). By definition this means that there is some -object and -predicate =³` &³j¿:À ³ ± ± ¯ ÎÏ~ÐRÑ Ó ¯ ÔÕÓ>Ö ÎÏ~ÐBÑ ÎÏÒ such that for any and there is a -morphism ÔxÓÆÖ ÎÏÒ with Ó×ÃY¯ . ¯ (ii) Conversely, assuming is cartesian closed, if has a generic predicate, then it is a tripos. Tripos theory in retrospect 11 ÙÚ~ÛRÜÝsÞ^ß ÙÚàÝ Proof. For part (i), using the tripos structure of Ø we can take and Øâálãlä å[æ=ç(èEéêlëIávì]í éIë ãnä/åæ=çQèEé[ê¥îpÞ^ßï ßmðjÞ^ß ñóòYØâá=ô`ë , using the isomorphism Ý . For any , we øÕñ>ù ú[ØâáõNö[ëIáZñeë]ûfîeô¤üNýuÞ^ß get Øâá=õ©öTëIáZñeë÷òtØâálßyðªôEë and can define to be . A simple calculation shows that ØâáøÕñÆùwëIáÙÚà:ë¤Ý×ñ . Hence we do have a generic predicate. Ø For part (ii) suppose that þ is cartesian closed and that the hyperdoctrine has a generic þ ÿ Þ>ÿ ÙÚ~ÛRÜ¡ predicate ÙÚà3ò¨ØâávÙÚ~ÛRÜ ë . For each -object define to be the exponential and the ò¨Øâá=ÿ×ðÙÚRÛRÜ¢ >ë Øâᤣ¦¥ ëIáÙÚà;ë £¦¥ îwÿ×ðÙÚRÛRÜ¢ ü©ý membership predicate ì]í to be , where § ÙÚ~ÛBÜ ÿ ðªálüë álüë ÙÚ~ÛBÜ is evaluation (counit of the exponential adjunction at ). For any ¨ ¨ ø ùîxÿ ð>ô ü:ý ÙÚRÛRÜ òyØâáÿtðÆô`ë we have and can take its transpose across the exponential ¨ û^îQôÍü:ýhÙÚ~ÛBÜ© adjunction to get a morphism ú . It is straightforward to see that this has the property required in Definition 4.3. Example 4.5. The hyperdoctrines in Examples 2.2 and 2.3 both possess generic predicates and hence by Theorem 4.4 are -triposes (since is cartesian closed). ÙÚàÍò÷Øâá@ëÆÝ In the first case we can take ÙÚ~ÛRÜ to be (the underlying set of) and øxñÆù ñ to be the identity function; for any ñ§òOØâáÿ1ë , is just itself. The topos generated by this tripos is precisely Higg’s category of -valued sets, equivalent to the category of sheaves on the complete Heyting algebra : see (Fourman and Scott 1979). Þmá¤ë ÙÚàÈò In the second example we can take ÙÚ~ÛRÜ to be the powerset of the PCA and {ë~ë ñ6òÍØâáZôEë Øâá=Þmá to be equivalence class of the identity function; for any , choosing a rep- ò Þmá¤ë øÕñÆù@Ý ØâáëIávÙÚà:ëÝØâáëIá æ=ç ëÝ ! #"%$ resentative for it, we can take since è æ=ç Ý( Ýtñ ! #"'& $ $ è . The topos generated by this tripos is the so-called realizability topos of the partial combinatory algebra : see (Hyland, Johnstone, and Pitts 1980; Pitts 1981; van Oosten 1991; Longley 1995). There are two minor differences between Definition 4.3 and the definition of tripos given in (Hyland, Johnstone, and Pitts 1980) or (Pitts 1981). The first has to do with generalised quan- tifiers; the second has to do with the use of preorders rather than partial orders. These differences are discussed in the next two remarks. Remark 4.6 (Generalised quantification). The original definition of tripos assumes that þ (å,+-* has all finite limits, rather than just finite products, and that there are adjoints ( )¢* ) for all /.;ë . the monotone functions Øâá , rather than just for the case when is a product projection or diagonal; furthermore these adjoints are required to be stable in the sense that ‘Beck-Chevalley’ conditions hold: 0 3 0 1 3 Øâá ë 687 Øâá ë 9 2 9 2 4 4 " " implies 5 5 ÿ Øâá ë Øâá=ÿ1ë * 6;: <>=@?# pullback in þ commutes in . ) (If this holds for all pullbacks, then a similar condition holds for the left adjoints * as well.) From the work of Lawvere (1969) we know that in a first order hyperdoctrine as defined in Andrew M. Pitts 12 Section 2 such generalised quantifiers are definable from the usual ones: ACB-DFEHGIAJ¢GLK#MN B@PRQ;SUT;JWVYX[Z AP\G^]_E`AP\G O A/a\DEHGIAJ¢GLK#MN abPWQ;SUT;JWVYX[Z AP\GdceE`AP\G%T O AZ-G These formulas do define adjoints to f and these adjoints satisfy the Beck-Chevalley condi- tion for certain pullback squares—the ones that exist by dint of the finite product structure in g . However, there is no reason why the Beck-Chevalley condition should hold for all the pullback squares that happen to exist in g . In this sense the definitions in (Hyland, Johnstone, and Pitts 1980) and (Pitts 1981) assume a bit more than is strictly necessary. Remark 4.7 (Canonically presented hyperdoctrines). The original definition of tripos was nporqbsto8u phrased in terms of indexed preordered sets gihjlk¢m , rather than indexed posets n>s@w#qx gWhjvk@m . Each setting has its conveniences and it is easy to pass between the two. However, one advantage of using preorders is that one can often identify predicates on y with y functions from to some fixed object. For example if we present the realizabilityX triposes of A G A{UG y z Example 2.3 using indexed preordered sets, then we can take f to be rather than a quotient of it. Triposes in which predicates are functions are called canonically presented in (Hy- land, Johnstone, and Pitts 1980; Pitts 1981). In the partially ordered setting we are using here, we can say that a first order hyperdoctrine A G g }~ g gR|,f as in Definition 2.1 is canonically presented by a -object if for each -object Q A G A G g |}'~¤ f | there is a surjective function natural in . For then we can make A G ZZ© A G k|}'~¤ g f g |%}~¤ g into a -indexed preordered set equivalent to by declaring in AZ-G A/Z¢CG A G f f to mean that holds in . Note that from Theorem 4.4(i) we have that if is Q f gWhjktmen>s@w#qx z f a g -tripos, then can be canonically presented by . However, if merely satisfies (CA), then it is not necessarily canonically presentable. The following example shows this. It already occurs in (Pitts 1981, Section 2.9). However, I was not aware at that time of the general result (Theorem 4.2) of which it is an instance. (If I had been, doubtless the definition of tripos would have been different.) Example 4.8 (A non-tripos satisfying CA). Let denote the category of finite sets and fH / functions. From any infinite Boolean algebra we can define a hyperdoctrine over that satisfies (CA), but which is not a tripos, as follows. In fact f is just like Example 2.2 except that we restrict the base category to be finite sets so that the quantifiers use only the finite meets and joins assumedX to exist in . Thus for each finite A G y f y y set , define to be the the -fold product of the BooleanD algebra ; and for each X ZQ S A/Z-GQ ASG A G V f f k¢mf y yk@m in , define to be . Equality predicates in A G f ydy are given by the functions JiVJt X KIMN AJ J G V V if | J VJt if and quantification is given by KIMN KIMN A/a G AEYG V¢¡¤£¦¥ Tt§¨;© E`A£ J@G ACB G A/EHG V¢¡¤£¦¥ Ttª¨;© E`A£ J@G¦T X X y | y | The fact that f is a first order hyperdoctrine of course only depends upon the Heyting algebra Tripos theory in retrospect 13 structure of « . However, to see that it also satisfies the Comprehension Axiom 4.1 we make ¬ essential use of the fact that « has complements ( ) rather than just relative pseudocomplements ( ). ¯p® °²±³´`µ8¶ ® For each finite set ® , we take to be the set of functions from to the two- « · ¸¦¹ ·R¼®¾½¯p®À¿ element Boolean subalgebra °²±³´`µ of . The membership -predicate is ¶»º ·>Â>¼®Ã½iÄÅ¿ given by function application. Then for any Á we have º ´ÇÆÉÈÊ˲Ì>È`Í;Ë ´ ¶ ÈÊ˲Ì>È`Í;Ë Æ Á¼Î©³Ï,¿-Ði¬ Á¼ÎųÏ,¿ ¶ Æ ÊË²Ì Í;Ë ËÓ¤Ô Õ Ö¡×-Ø%ÙÚÁ¼Î©³ÏÛ¿ È È ¶ÑÒ ÈÊË²Ì ËÓÔÝÕ ÖÅ×ÞWÈÍ;Ë Æ ¼Î¢¿,ÙÁ¼Î©³Ï,¿ ÑÜ ¶Lß ¯p® ¸%¹ the last step using the fact that « is a distributive lattice. Thus by definition of and , the ¶ à formula à ÏUá;Äãâ¤ä á;¯p®â Î^á²®âF¸%¹ ¼Î©³ ¿ÝÙeÁ¼ÎųÏ,¿ ¶ ß ß ÂÝé åæç¦è · of the internal language of · is satisfied. Hence (CA) holds and is a topos for any Boolean algebra « , whether or not it is infinite.  · ® ê However, if « is infinite then cannot be made into a tripos for any choice of ¿ ¼¯p®³¸%¹ . For if it could, then by Theorem 4.4 it would possess a generic predicate and hence ¶ åæç be canonically presented by some object ëì¤í¤î in . So in particular there would be a surjection  ëìíîï åæ/禼ð;³ë'ìí¤î ¿ · ¼,ðr¿ï « Æ from the finite set Æ onto , which is impossible. Remark 4.9 (An open problem in topos theory). If ñ is a category with finite products and ñ · a first order hyperdoctrine over , then Lemmas 3.2 and 3.3 imply that the Heyting algebra òtó¤ôõUö ÷©ø é ð ñWè · ·R¼ð¿ ¼ð¿ of subobjects of the terminal object in the logos is isomorphic to . In  Âé ¼ð¿ « åæçè · Example 4.8, · is the Boolean algebra . Thus by Theorem 4.2, is a topos with òtó¤ô#ù¤ú!û\ö ÷@ü¤ø « ð ý ¼ð¿ isomorphic to . In general the subobjects of in a topos (i.e. its ‘truth-values’) òtó¤ô²þ form a Heyting algebra. We have just seen that every Boolean algebra can arise as ¼ð¿ for some topos ý . However, it is not known whether every Heyting algebra can arise in this way. (Probably the free Heyting algebra on countably many generators cannot be the Heyting algebra of truth-values of a topos; see Pitts 1992, Section 1 for more on this topic.) 5. Conclusion The notion of ‘tripos’ was motivated by the desire to explain in what sense Higg’s description of sheaf toposes as ÿ -valued sets and Hyland’s realizability toposes are instances of the same construction. The construction itself involves building a category of partial equivalence relations and can be seen as the universal way of realizing the predicates of a first order hyperdoctrine as subobjects in a logos having effective equivalence relations (Theorem 3.6). This yields a topos if and only if the hyperdoctrine satisfies a certain comprehension property (Theorem 4.2). Triposes satisfy this property, but there are examples of non-triposes satisfying this form of comprehension (Example 4.8). So should the definition of tripos in (Pitts 1981) have used this more general form? The main use for triposes seems to occur when one has some non-standard notion of predicate and one Andrew M. Pitts 14 wishes to see that it can be used to generate a topos. For examples see (van Oosten 1991; Hof- mann 1999; Awody, Birkedal, and Scott 1999). In this respect the condition (CA) seems useful, because it is more permissive that its Skolemized form. However, triposes often arise by applying various constructions to other triposes. In particular, (Pitts 1981) establishes quite a rich theory of triposes akin to that for sheaf theory, involving notions of geometric morphism, Lawvere-Tierney topologies, etc. I do not know how far this theory extends to the case of hyperdoctrines satisfy- ing the (CA) axiom, but I guess it is not very far. For example, one of the most useful results ¡ ¢ in (Pitts 1981) concerns the question of iteration: if is a tripos over and a tripos over ¦¥ §©¨ § ¡¡¤£ ¦¥¡¤£ ¦¥£ ¢¥ ¡¤£ , when is the topos of partial equivalence relations of a ¡ -tripos? Theorem 6.2 of (Pitts 1981) provides a practically useful answer to this question— ¡ ¡¤£ ¢)*¥ ¡)£ ¦¥+£ ¢¥ ¢ namely that ¢¤ ! #"$¢%§ &'! ( is a -tripos with equivalent to , provided has ‘fibrewise quantification’. Fibrewise quantification is a concept that applies to triposes based on toposes and occurs frequently (e.g. Examples 2.2 and 2.3 have fibrewise quantification). It ¢ , #2&35467$98#:(;=< means that the quantifiers in are induced by morphisms ¨.-0/1¨ in a certain obvious fashion (cf. Hyland, Johnstone, and Pitts 1980, Proposition 1.12), where 2 is the subobject classifier of the topos and 8#:(;=< the carrier of the generic predicate of the tripos (The- orem 4.4). We saw in Example 4.8 that hyperdoctrines satisfying (CA) do not necessarily have generic predicates, so the notion of fibrewise quantification and its consequences for iteration are not so useful in that setting. References Awody, S., L. Birkedal, and D. S. Scott (1999). Local realizability toposes and a modal logic for computability. In L. Birkedal and G. Rosolini (Eds.), Tutorial Workshop on Realizability Semantics, FLoC’99, Trento, Italy, 1999, Volume 23 of Electronic Notes in Theoretical Computer Science. Elsevier. Birkedal, L. and G. Rosolini (Eds.) (1999). Tutorial Workshop on Realizability Semantics, FLoC’99, Trento, Italy, 1999, Volume 23 of Electronic Notes in Theoretical Computer Science. Elsevier. Fourman, M. P. and D. S. Scott (1979). Sheaves and logic. In M. P. Fourman, C. J. Mulvey, and D. S. Scott (Eds.), Applications of Sheaves, Proceedings, Durham 1977, Volume 753 of Lecture Notes in Mathematics, pp. 302–401. Springer-Verlag, Berlin. Hofmann, M. (1999). Semantical analysis of higher-order abstract syntax. In 14th Annual Sym- posium on Logic in Computer Science, pp. 204–213. IEEE Computer Society Press, Wash- ington. Hyland, J. M. E. (1982). The effective topos. In A. S. Troelstra and D. van Dalen (Eds.), The L. E. J. Brouwer Centenary Symposium, pp. 165–216. North-Holland, Amsterdam. Hyland, J. M. E. (1988). A small complete category. Annals of Pure and Applied Logic 40, 135–165. Hyland, J. M. E., P. T. Johnstone, and A. M. Pitts (1980). Tripos theory. Math. Proc. Cambridge Philos. Soc. 88, 205–232. Johnstone, P. T. (1977). Topos Theory. Number 10 in LMS Mathematical Monographs. Aca- demic Press, London. Tripos theory in retrospect 15 Johnstone, P. T. and R. Pare´ (Eds.) (1978). Indexed Categories and Their Applications, Volume 661 of Lecture Notes in Mathematics. Springer-Verlag, Berlin. Kleene, S. C. (1945). On the interpretation of intuitionistic number theory. Journal of Symbolic Logic 10, 109–124. Lawvere, F. W. (1969). Adjointness in foundations. Dialectica 23, 281–296. Lawvere, F. W. (1970). Equality in hyperdoctrines and the comprehension schema as an ad- joint functor. In A. Heller (Ed.), Applications of Categorical Algebra, pp. 1–14. American Mathematical Society, Providence RI. Longley, J. (1995). Realizability Toposes and Language Semantics. Ph. D. thesis, Edinburgh University. Makkai, M. (1993). The fibrational formulation of intuitionistic predicate logic. I: Complete- ness according to Godel,¨ Kripke, and Lauchli.¨ Notre Dame Journal of Formal Logic 34, 334–377. Makkai, M. and G. E. Reyes (1977). First Order Categorical Logic, Volume 611 of Lecture Notes in Mathematics. Springer-Verlag, Berlin. Phoa, W. (1990). Domain Theory in Realizability Toposes. Ph. D. thesis, Cambridge Univer- sity. Pitts, A. M. (1981). The Theory of Triposes. Ph. D. thesis, Cambridge University. Pitts, A. M. (1989). Conceptual completeness for first order intuitionistic logic: an application of categorical logic. Annals Pure Applied Logic 41, 33–81. Pitts, A. M. (1992). On an interpretation of second order quantification in first order intuition- istic propositional logic. Jour. Symbolic Logic 57, 33–52. Pitts, A. M. (2000). Categorical logic. In S. Abramsky, D. M. Gabbay, and T. S. E. Maibaum (Eds.), Handbook of Logic in Computer Science, Volume 5. Algebraic and Logical Struc- tures, Chapter 2. Oxford University Press. Reus, B. and T. Streicher (1999). General synthetic domain theory—a logical approach. Math- ematical Structures in Computer Science 9, 177–223. Rosolini, G. (1990). About modest sets. International Journal of Foundations of Computer Science 1, 341–353. van Oosten, J. (1991). Exercises in Realizability. Ph. D. thesis, Universiteit van Amsterdam.