Lectures onType Theory
Chapter 144
Chapter 144Optional

Triposes, Toposes, and Realizability

Prerequisites. Direct starred prerequisites: none. No later core chapter depends on this route.

Fix the set N and write ab for the value of the a-th partial recursive function at b, when that value is defined. Call a subset pN a proposition and an element of p a realizer of it, and put pq:={aNab is defined and lies in q, for every bp}. For a set I let PI be the set of functions φ:IP(N), and declare φψ when one number realizes the implication everywhere: φψwhenthere is aN with aφ(i)ψ(i) for every iI.

This is a hyperdoctrine in the sense of definition 143.8, and exercise 143.4 already met a construction of the same shape. The base category is still Set: its objects are bare sets, and the computational content of (144.2) lives only in the fibers. A morphism IJ of the base is an arbitrary function, computable or not.

The construction of this chapter changes that. Its objects are sets equipped with a P-valued equality, and its morphisms are equivalence classes of predicates rather than functions. The result is a category in which the object of natural numbers has exactly the total recursive functions as endomorphisms (theorem 144.23), and in which the whole of intuitionistic higher-order logic can be interpreted. Two ingredients are needed that definition 143.8 did not require: a generic predicate, which makes the fibers into objects of the base; and the observation that the fibers are preorders and not posets, so that a predicate carries more information than the set of predicates below it.

Triposes

Definition 144.1 — Heyting pre-algebra

A Heyting pre-algebra is a preorder with finite meets, finite joins, and a Heyting implication in the sense of definition 143.1. Its operations are determined only up to the equivalence a⊣⊢b, meaning ab and ba.

Antisymmetry is deliberately absent. In (144.2) two different functions φψ may satisfy φψφ while carrying different realizers; identifying them would destroy the generic predicate of definition 144.2(iii), which requires the predicates over I to be indexed by functions IΣ.

Definition 144.2 — Tripos

A tripos P consists of

  1. for each set I a Heyting pre-algebra (PI,I);

  2. for each function f:IJ a monotone map Pf:PJPI, written f, together with monotone f,f:PIPJ, such that

    1. fff;

    2. f preserves ;

    3. P is pseudo-functorial: idI⊣⊢idPI and (gf)⊣⊢fg for f:IJ, g:JK;

    4. the Beck–Chevalley condition of definition 143.7 holds for , up to ⊣⊢, on every pullback square in Set;

  3. a generic predicate: a set Σ, an element σPΣ, and for each I a chosen map {}I:PISet(I,Σ) with φ⊣⊢{φ}I(σ).

This is Definition 1.2 of Hyland, Johnstone and Pitts, Tripos theory, physical page 3 of the author archive copy (article page 207), with Definition 1.1 on the same page. Two clauses differ from definition 143.8 and the difference is exactly the subject of this chapter. Clause (ii)(b) is an assumption here: as the source records on the following page, preservation of cannot be deduced from Beck–Chevalley, because the meet is not given by a pullback in the base. Clause (iii) has no counterpart at all in definition 143.8.

Proposition 144.3 — A tripos presents a hyperdoctrine

Let P be a tripos and let PI be the poset reflection of PI, that is, its quotient by ⊣⊢. Then P is a hyperdoctrine over Set in the sense of definition 143.8.

Proof of Proposition 144.3 — A tripos presents a hyperdoctrine

Proof. ⊣⊢ is an equivalence relation, and every operation named in definition 144.2 is monotone, hence descends to the quotient and remains monotone there. Each PI is a Heyting algebra, because a meet, join or implication is determined up to ⊣⊢ by its universal property and therefore uniquely in the quotient. Clause (ii)(c) becomes strict functoriality, since two elements related by ⊣⊢ have the same class: (gf)=fg and id=id. Adjunctions and the Beck–Chevalley equations pass to the quotient for the same reason, the latter now as equalities. Set has finite products. ◻

Proposition 144.3 is what licenses the use of theorem 143.24 below: a formula of intuitionistic first-order logic interpreted in P by the clauses of definition 143.22 is sound, because it is sound in P and the interpretation of a formula in P is determined up to ⊣⊢. Higher-order features are added in section 144.3 using the generic predicate, which the reflection does not see.

Example 144.4 — The powerset tripos

PI:=P(I) with the structure of example 143.10, Σ:={0,1} and σ:={1}P(Σ). For φI let {φ}I be its characteristic function; then {φ}I1({1})=φ, so clause (iii) holds with equality rather than merely ⊣⊢. The fibers are posets, so this tripos is its own poset reflection.

Definition 144.5 — Partial applicative structure

A partial applicative structure is a set A with a partial binary operation (a,b)ab for which there are e,k,sA with eaa,(ka)ba,((sa)b)c(ac)(bc) for all a,b,cA, where xy means that one side is defined exactly when the other is and then they are equal.

Example 144.6 — The realizability tripos

Let A be a partial applicative structure. Put PI:=P(A)I with defined by (144.1) and I by (144.2), both read with A in place of N. For f:IJ put fφ:=φf, and (fφ)(j):=iI([[f(i)=j]]φ(i)),[[f(i)=j]]:={A,f(i)=j,,otherwise, with the corresponding definition of f. The generic predicate is Σ:=P(A) with σ:=idP(A) and {φ}I:=φ. This is the structure of Hyland, Johnstone and Pitts, §1.7, physical page 7 (article page 211); the choice A=N with Kleene application gives the recursive realizability tripos of their §1.8(ii).

Proposition 144.7 — The realizability preorder

In example 144.6, I is reflexive and transitive.

Proof of Proposition 144.7 — The realizability preorder

Proof. Reflexivity. For every bφ(i) we have ebbφ(i), so eφ(i)φ(i) for every i, and the single element e witnesses φIφ.

Transitivity. Suppose aθ(i)φ(i) and bφ(i)ψ(i) for all i. Let cθ(i). Then acφ(i) and b(ac)ψ(i). Now ((s(kb))a)c((kb)c)(ac)b(ac), using the s-equation and then the k-equation, so the single element (s(kb))a realizes θ(i)ψ(i) for every i. ◻

The number produced in that proof does not depend on i. That is the whole force of (144.2): entailment in a realizability tripos is uniform realizability, one algorithm for all indices, and it is strictly stronger than pointwise entailment.

Example 144.8 — Uniform and pointwise entailment differ

Take A=N with Kleene application, I=N, and let TN be a set that is not recursively enumerable. Put φ(i):=N for all i, and ψ(i):=N if iT and ψ(i):= otherwise. Pointwise, φ(i)ψ(i) is nonempty exactly for iT, so φ(i)ψ(i) fails at some i and the two orders already differ on this example; taking instead ψ(i)=N for iT and ψ(i)={0} for iT makes every pointwise implication inhabited, while a uniform realizer a would compute, from any input, an element of ψ(i) together with the information needed to decide membership in T; no such a exists because T is not decidable. The fibers of the realizability tripos are therefore genuine preorders, not posets.

Example 144.9 — An indexed preorder with no generic predicate

Let A be an infinite Heyting algebra and let PI be the set of maps IA with finite image, with the pointwise structure. Clauses (i) and (ii) of definition 144.2 hold. A generic predicate would be a set Σ and σPΣ, that is, a map σ:ΣA with finite image, such that every φ:IA with finite image factors as σ{φ}I up to ⊣⊢; taking I=A and φ a map with image of cardinality larger than that of the image of σ makes the factorization impossible. So clause (iii) is not a consequence of the others. This is §1.6(iii) of the source, physical page 7.

Exercise 144.1

★☆☆ In the recursive realizability tripos compute pq for p= and for q=, p. Which is all of N and which is empty?

Exercise 144.2

★★☆ The source remarks that the simpler formula (fφ)(j)={φ(i)f(i)=j} fails to be right adjoint to f when f is not surjective (§1.8(i), physical page 8). Take f:{} and exhibit the failure by computing both sides of the adjunction at φ the empty family.

Exercise 144.3

★☆☆ Verify that the powerset tripos of example 144.4 satisfies clause (ii)(b): f preserves . Which proposition of chapter 143 was this?

P-valued sets

Fix a tripos P. A first-order language is interpreted in P by the clauses of definition 143.22. A sort goes to a set; a relation symbol of sort (X1,,Xn) goes to an element of the fiber over the product of those sets; the connectives and quantifiers go to the operations of definition 144.2. Write Pφ for validity, meaning [[φ]] in the fiber over the interpreted context. By proposition 144.3 and theorem 143.24, every derivable sequent of intuitionistic logic is valid. Every verification below appeals to that one fact.

Definition 144.10 — P-valued set

A P-valued set is a pair (X,=) consisting of a set X and an element [[x=x]]P(X×X) such that Px,x(x=xx=x),Px,x,x(x=xx=xx=x). Its existence predicate is [[xX]]:=[[x=x]]PX.

Reflexivity is not required. An element x of the underlying set with [[x=x]]= is present in the set-theoretic carrier and absent from the object it presents; the carrier is scaffolding, and the predicate [[xX]] says how much of it survives. This is Definition 2.2 of Hyland, Johnstone and Pitts, physical page 11 (article page 215).

Example 144.11 — Partial equivalence relations

In the recursive realizability tripos take X:=N and [[n=m]]:={aa=n,m} if n and m are related by a fixed partial equivalence relation R on N, and otherwise, where , is a recursive pairing. Symmetry and transitivity of [[=]] hold with uniform realizers computing the pair swap and the composition of pairs, so this is a P-set exactly when R is symmetric and transitive. Its existence predicate is inhabited at n exactly when nRn, that is, on the domain of R. The reflexivity that definition 144.10 omits is the reflexivity that a partial equivalence relation omits.

Definition 144.12 — Relations and functional relations

Let (X,=) and (Y,=) be P-sets, with the product X×Y made into a P-set by [[(x,y)=(x,y)]]:=[[x=x]][[y=y]]. An element RPX is a relation on (X,=) when Px,x(x=xR(x)R(x)), and it is strict when in addition Px(R(x)xX). A relation F on X×Y is functional when it is strict and Px,y,y(F(x,y)F(x,y)y=y)(single-valued),Px(xXyF(x,y))(total). Two functional relations F,G are equivalent when Px,y(F(x,y)G(x,y)).

Equivalence of functional relations is an equivalence relation by soundness. For the transitivity of the relation itself one needs only that is intuitionistically transitive.

Definition 144.13 — The category of P-sets

Set[P] has the P-sets as objects and, as arrows (X,=)(Y,=), the equivalence classes of functional relations on X×Y. The identity on (X,=) is the class of [[x=x]], and the composite of the classes of F on X×Y and G on Y×Z is the class of [[y(F(x,y)G(y,z))]]P(X×Z).

Hyland, Johnstone and Pitts write P-Set for this category; the notation Set[P] follows Pitts’s thesis, where the base is allowed to vary.

Lemma 144.14 — [ P] is a category

Definition 144.13 is well posed: the composite of two functional relations is functional, its class depends only on the two classes, the identities are two-sided units, and composition is associative.

Proof of Lemma 144.14 — [ P] is a category

Proof. Every clause is an intuitionistic deduction from the defining formulas, valid by soundness.

The composite is functional. Strictness: from F(x,y) strict, F(x,y)G(y,z)xXzZ. Single-valuedness: from y(F(x,y)G(y,z)) and y(F(x,y)G(y,z)), single-valuedness of F gives y=y; G is a relation, so G(y,z) and y=y give G(y,z); then single-valuedness of G gives z=z. Totality: from xX, totality of F gives some y with F(x,y); strictness of F gives yY; totality of G gives some z with G(y,z).

Independence of representatives. If FF and GG then y(FG)y(FG) by congruence of the connectives.

Units. The composite of [[x=x]] with F is x(x=xF(x,y)). From x=x and F(x,y) and the fact that F respects equality in its first argument, F(x,y) follows; and conversely F(x,y) gives xX by strictness, hence x=x, hence the existential with witness x. The other unit law is the same argument on the second argument.

Associativity. Both composites are equivalent to yz(F(x,y)G(y,z)H(z,w)), by the intuitionistic equivalence z(y(FG)H)y(Fz(GH)), which holds because F does not contain z and H does not contain y. ◻

Lemma 144.14 is Lemma 2.5 of the source, physical pages 12–13. Its proof is reproduced here rather than cited because every later verification in this chapter has the same shape: write the set-theoretic definition as a formula, and check it intuitionistically.

Exercise 144.4

★★☆ Show that the unit law fails if strictness is dropped from definition 144.12: exhibit a P-set and a single-valued total relation F that does not satisfy F(x,y)xX, for which x(x=xF(x,y)) is not equivalent to F(x,y).

Exercise 144.5

★★☆ Continue example 144.11. For two partial equivalence relations R,S on N, describe the functional relations from (N,R) to (N,S) concretely, and show that each is realized by a partial recursive function tracking R-classes to S-classes.

The topos

Lemma 144.15 — Finite limits

Set[P] has a terminal object, binary products, and equalizers, hence all finite limits by theorem 142.15.

Proof of Lemma 144.15 — Finite limits

Proof. Terminal object. Let 1 be a one-element set with [[=]]:=. For any (X,=) the existence predicate [[xX]], read as an element of P(X×1), is strict, single-valued (its second component has one value) and total, so it is functional. If F is any functional relation X1 then totality gives xXF(x,) and strictness gives F(x,)xX, so F is equivalent to it.

Products. The product P-set is the one named in definition 144.12. The projections are the classes of [[x=xyY]]P(X×Y×X),[[xXy=y]]P(X×Y×Y), and the pairing of f:ZX and g:ZY is the class of [[F(z,x)G(z,y)]]. Functionality and the two equations of (142.2) are intuitionistic deductions from definition 144.12; for uniqueness, a functional H on Z×X×Y whose composites with the projections are F and G satisfies H(z,x,y)F(z,x)G(z,y), the direction from left to right by composing and the converse by single-valuedness of H together with totality.

Equalizers. Let f,g:XY with representatives F,G. Let E have underlying set X and [[xE]]:=[[y(F(x,y)G(x,y))]],[[x=Ex]]:=[[x=XxxExE]], and let h:EX be the class of [[xEx=Xx]]. Then [[=E]] is symmetric and transitive because [[=X]] is, and h is functional. From the definition of E, fh=gh. Let k:ZX satisfy fk=gk, so that Pz,x,y(K(z,x)F(x,y)G(x,y)). Since F is total, K(z,x)y(F(x,y)G(x,y)), that is, K(z,x)xE. So K is still strict as a relation on Z×E, hence functional there, and defines the unique factorization k¯:ZE with hk¯=k. ◻

Remark 144.16 — Where choice enters the metatheory

The object E built in the last paragraph depends on the chosen representatives F and G, not only on f and g. Different representatives give isomorphic but distinct P-sets. Consequently, without a choice principle in the metatheory there is no function assigning an equalizer to each parallel pair: the category has equalizers in the sense that one exists for each pair, and a selection of them is an extra hypothesis. This is Remark 2.7 of the source, physical page 14, and it is the same distinction between property and structure that section 142.10 met for chosen pullbacks.

Lemma 144.17 — Monomorphisms

An arrow f:XY of Set[P] is a monomorphism in the sense of definition 141.28 if and only if Px,x,y(F(x,y)F(x,y)x=x) for some, equivalently any, representative F.

Proof of Lemma 144.17 — Monomorphisms

Proof. Suppose the displayed formula holds and let u,v:ZX with fu=fv, that is, x(U(z,x)F(x,y))x(V(z,x)F(x,y)). Let U(z,x). By strictness xX, by totality of F there is y with F(x,y), so the left side holds; hence there is x with V(z,x) and F(x,y), and the hypothesis gives x=x. Since V respects equality, V(z,x). By symmetry of the argument UV, so u=v.

Conversely suppose f is a monomorphism. Let P be the P-set with underlying set X×X and [[(x1,x2)P]]:=[[y(F(x1,y)F(x2,y))]], with equality inherited from X×X and restricted to P as in the equalizer construction. The two projections PX are functional, and composing either with f gives the same arrow, by the definition of P. Monicity forces the two projections to be equal, which is exactly the displayed formula. ◻

Definition 144.18 — Canonical monomorphism

Let A be a strict relation on a P-set (X,=X). Let A be the P-set with underlying set X, [[xA]]:=[[A(x)]] and [[x=Ax]]:=[[x=XxxAxA]], and let mA:AX be the class of [[aAa=Xx]].

Lemma 144.19 — Subobjects are canonical

Every monomorphism f:YX of Set[P] factors as mAf¯ with f¯ an isomorphism, where [[A(x)]]:=[[yF(y,x)]]. Moreover, for f:YX and a strict relation A on X, the square with vertical arrows mf1A and mA, where [[f1A(y)]]:=[[x(F(y,x)A(x))]], is a pullback.

Proof of Lemma 144.19 — Subobjects are canonical

Proof. A is strict because F is. The relation F, read on Y×A, is functional in both directions: it is functional from Y by hypothesis, and single-valued in the other direction by lemma 144.17, total by the definition of A; so it is an isomorphism f¯ with mAf¯=f. For the second claim, f1A is strict because F is, the top arrow of the square is the restriction of f, represented by [[F(y,x)A(x)]], and the pullback property is the intuitionistic statement that a z mapping into X through mA and into Y compatibly is exactly a z mapping into f1A. ◻

These are Lemmas 2.9–2.11 of the source, physical pages 14–15. The factorization is called canonical rather than unique on purpose: if Px(A(x)B(x)) then A and B are isomorphic over X without being equal, which is again remark 144.16.

Theorem 144.20 — Power objects

Let (X,=) be a P-set and let Σ be the index set of the generic predicate. Define PX to have underlying set ΣX, with [[RPX]]:=[[x,x(xXRx=xxXR)]][[x(xXRxX)]],[[R=PXS]]:=[[RPXSPXx(xXRxXS)]], where XP(X×ΣX) is the membership predicate evX(σ) for the evaluation map evX:X×ΣXΣ. Then PX is a P-set and there is a bijection, natural in Y, homSet[P](Y,PX)Sub(X×Y), where Sub denotes the set of subobjects.

Proof of Theorem 144.20 — Power objects

Proof. Symmetry and transitivity of =PX follow from those of . Let EP(X×PX) be [[RPXxXR]], a strict relation, and let EX×PX be the associated canonical monomorphism. Sending f:YPX to the subobject (idX×f)1E is natural in Y by lemma 144.19, so it remains to prove bijectivity.

Surjectivity. Let a subobject of X×Y be given; by lemma 144.19 it is A for a strict relation A on X×Y. Clause (iii) of definition 144.2, applied in the form of the membership predicate, supplies a function g:YΣX in Set with (idX×g)(X)⊣⊢A in P(X×Y). Put [[F(y,R)]]:=[[yYg(y)=PXR]]. Because A is strict, yYPg(y)PX, and F is then functional, so it represents an arrow f:YPX. Unfolding, A(x,y)R(F(y,R)E(x,R)), so A is the subobject assigned to f.

Injectivity. Suppose f,f are assigned the same subobject. Then R(F(y,R)E(x,R))R(F(y,R)E(x,R)). Fix yY; totality gives R with F(y,R) and R with F(y,R), and the displayed equivalence gives x(xXRxXR). Both lie in PX, so R=PXR, and since F respects equality, F(y,R)F(y,R). By symmetry FF, so f=f. ◻

Corollary 144.21 — [ P] is a topos

Set[P] has finite limits and power objects, hence is an elementary topos. Its subobject classifier is the P-set Ω with underlying set Σ and [[p=Ωq]]:=[[pq]], and the exponential YX has underlying set ΣX×Y with [[FYX]] the formula asserting that F is a functional relation and [[F=G]]:=[[FYXGYXx,y((x,y)F(x,y)G)]].

Proof of Corollary 144.21 — [ P] is a topos

Proof. Lemma 144.15 and theorem 144.20 give the two clauses of the definition of an elementary topos. The subobject classifier is the power object of the terminal P-set: taking X=1 in theorem 144.20 gives Σ1=Σ and the displayed equality, and the bijection becomes homSet[P](Y,Ω)Sub(Y). The exponential is obtained from the power object of X×Y by restricting along the strict relation asserting functionality, which is definition 144.18 applied to that relation. ◻

Corollary 144.21 is Theorem 2.13 and item 2.14 of the source, physical pages 16–17. Nothing about Grothendieck toposes, sheaves or sites is used or claimed; “topos” here means exactly finite limits plus power objects, and the two constructions above are the only ones this chapter exports.

One object of the realizability topos

Fix A=N with Kleene application and let P be the recursive realizability tripos of example 144.6. Fix a recursive pairing , with recursive inverses fst,snd, and record the three operations used below, each stated up to ⊣⊢: (φψ)(i)={a,baφ(i), bψ(i)},(φψ)(i)=φ(i)ψ(i)as in (144.1),(pφ)(n)=mφ(n,m)for the projection p:N2N.

Definition 144.22 — The P-set of numbers

Let N have underlying set N and [[n=m]]:={{n},n=m,,nm.

N is a P-set: symmetry is realized by e, since [[n=m]] and [[m=n]] are the same set; transitivity is realized by the recursive function pfstp, because a realizer of the conjunction is a pair n,m with n=m=k and the required realizer of n=k is n. Its existence predicate is [[nN]]={n}, which is inhabited for every n.

Theorem 144.23 — Endomorphisms of N

The arrows NN of Set[P] are in bijection with the total recursive functions NN.

Proof of Theorem 144.23 — Endomorphisms of N

Proof. From a recursive function to an arrow. Let u be total recursive. Put [[Fu(n,m)]]:={n,m} if u(n)=m and otherwise. It is strict: from n,m the identity computes a realizer of nNmN, which is the same pair. It is single-valued: if [[Fu(n,m)]] and [[Fu(n,m)]] are both inhabited then m=u(n)=m, and from the realizer n,m,n,m of the conjunction the recursive function qsnd(fstq) returns m, a realizer of [[m=m]]. It is total: by (144.3) a realizer of mFu(n,m) at n is any element of m[[Fu(n,m)]]={n,u(n)}, and the recursive function nn,u(n) produces one uniformly.

From an arrow to a recursive function. Let F be functional. Strictness gives a number s with sc[[nN]]×[[mN]]coded as n,m,for every c[[F(n,m)]], so from any realizer of F(n,m) the recursive operation csnd(sc) returns m. Totality gives a number a with anm[[F(n,m)]] for every n; in particular an is defined for every n. Define uF(n):=snd(s(an)). This is a composition of total operations, hence total recursive. The set [[F(n,uF(n))]] is inhabited, and uF(n) is the only value with that property. For suppose [[F(n,m)]] is inhabited. Then single-valuedness produces a realizer of m=uF(n), and by definition 144.22 that set is nonempty only for m=uF(n).

The two passages are mutually inverse. Given F, the relations F and FuF are equivalent: the direction F(n,m)FuF(n,m) is realized by csc, which returns n,m and is applicable exactly when [[F(n,m)]] is inhabited, in which case uF(n)=m; the converse direction is realized by qa(fstq), which from n,m with uF(n)=m returns an element of [[F(n,m)]]. Conversely uFu=u, since [[Fu(n,m)]] is inhabited exactly when m=u(n).

Finally the assignment is injective on total recursive functions: if uu, choose n with u(n)u(n); then [[Fu(n,u(n))]] is inhabited and [[Fu(n,u(n))]] is empty, so no realizer of n,m(FuFu) exists. ◻

The base category of the tripos was Set, whose arrows NN are all functions. The category built from it has, at the same underlying set, exactly the computable ones. That is the sense in which the construction internalizes realizability: the computational content of (144.2) has moved from the fibers into the arrows.

Remark 144.24 — What this does not say

Theorem 144.23 is a statement about one object of one realizability topos. It is not a transfer of any theorem about partial equivalence relations proved elsewhere in this book: a comparison between Set[P] and a category of PERs is a functor that must be constructed and checked, and none is constructed here. Example 144.11 exhibits partial equivalence relations as particular P-sets and nothing more.

The universal property, as an import

The construction PSet[P] has a characterization, and this chapter states it without proving it, because its proof needs the theory of geometric morphisms and partial-map classifiers, which this book does not develop.

Theorem 144.25 — Pitts

Let C be a finitely complete category, E a topos, and Δ:CE a left exact functor. The following are equivalent.

  1. Δ is equivalent over C to ΔP:CC[P] for some C-tripos P.

  2. For each object A of E there are an object A^ of C and a map βA:ΔA^A~ in E, where A~ is the partial-map classifier of A, such that every f:ΔXA~ factors as βAΔg for some g:XA^ in C; and every βA is an epimorphism.

This is Theorem 3.10 of Pitts, The theory of triposes, PhD thesis, University of Cambridge 1981, physical page 43 of the author archive copy (thesis page 39); the accompanying Proposition 3.11, physical pages 44–45, adds that under the same hypotheses there is a hyperconnected geometric morphism EC[P] for P=SubEΔop. What theorem 144.25 supplies here is a criterion: a topos arises from a tripos over C exactly when every object is a subquotient of something in the image of Δ, uniformly. What is proved locally in this chapter is corollary 144.21 and theorem 144.23; nothing in theorem 144.25 is used to prove either.

Remark 144.26 — The construction factors

The passage from a tripos to its topos can be decomposed into separate completion steps — adding extensionality, comprehension, quotients, and Cauchy completion — each of which is a free construction on a doctrine of its own. That analysis is carried out by Pasquali [Pas14], and the 2-categorical form of the correspondence, including the biadjunction between triposes and toposes, is Frey’s. Neither is used above, and neither strengthens corollary 144.21: the exports of this chapter are the tripos axioms of definition 144.2, the construction of definition 144.13, and the two results proved from them.

Suggested first pass.

Begin with exercise 144.6 and exercise 144.7, then complete exercise 144.10.

Exercise 144.6

★☆☆ Show that in Set[P] the P-set with empty underlying set is initial, and that the P-set with underlying set {} and [[=]]= is isomorphic to it. Which clause of definition 144.10 permits the second object at all?

Exercise 144.7

★★☆ In the recursive realizability tripos compute the underlying set of the subobject classifier Ω of corollary 144.21 and its equality predicate. Then exhibit two subsets p,qN with [[p=Ωq]]= although p and q are both nonempty, and explain what this says about the arrows 1Ω.

Exercise 144.8

★★★ Show that Ω in the recursive realizability topos is not the two-element object: exhibit a subobject of N that is not complemented, using a set TN that is recursively enumerable but not recursive. State precisely which of p¬p fails and at which index, and check that your failure is a failure of uniform realizability rather than of pointwise inhabitation.

Exercise 144.9

★★★ Prove that the object N of definition 144.22 is a natural numbers object: exhibit arrows z:1N and s:NN and show that for every X with x0:1X and t:XX there is exactly one h:NX with hz=x0 and hs=th. Use primitive recursion to produce the realizer for h, and identify where single-valuedness is needed for uniqueness.

Exercise 144.10

★★★ Practical project.tripos-functional-relation-checker Implement a checker for functional relations over a finite partial applicative structure. The input is: a finite carrier A given as a list; a partial application table for A, given as a list of triples (a,b,c) meaning ab=c, with absent pairs undefined; nominated elements e,k,s; two finite P-sets (X,=X) and (Y,=Y), each given by its underlying finite set together with a table assigning a subset of A to every pair of elements; and a candidate relation F given as a table assigning a subset of A to every pair in X×Y.

Invariant. Before any logical check, the program verifies that the nominated e,k,s satisfy the three equations of definition 144.5 on the given table, and that =X and =Y are symmetric and transitive in the sense of definition 144.10 with uniform realizers, that is, with a single element of A witnessing the implication at every index. It rejects the input if either check fails, naming the failing equation or index.

Concrete result. The program prints, for each of the three clauses of definition 144.12 — strict, single-valued, total — either realized together with a witnessing element of A, or unrealized together with the index at which every candidate element fails. It then prints functional or not functional.

Acceptance test. Take A={0,1,2} with a table making 0 act as the identity on all of A and 1,2 nowhere defined, and e=k=s=0; take X=Y={} with [[=]]={0} in both. The relation F(,)={0} must print realized three times and functional; the relation F(,)= must print unrealized for totality, with index , and not functional. Then repeat with X of two elements whose equality predicate is {0} on the diagonal and off it, and a relation sending both elements of X to the same element of Y; it must print functional. A run that reports totality realized for the empty relation has quantified the realizer inside the index rather than outside it, which is the distinction of (144.2).

Sources. Triposes, P-valued sets, and the construction of the associated topos are due to J. M. E. Hyland, P. T. Johnstone and A. M. Pitts, Tripos theory, Mathematical Proceedings of the Cambridge Philosophical Society 88 (1980), 205–232. Definition 144.1 and definition 144.2 are their Definitions 1.1 and 1.2 (physical page 3 of the author archive copy); the realizability tripos is their §1.7 (physical page 7) and the recursive case their §1.8(ii) (physical page 8); the example without a generic predicate is their §1.6(iii) (physical page 7). Definition 144.10 through corollary 144.21 follow their §2: Definitions 2.2–2.4 and Lemma 2.5 on physical pages 11–13, finite limits and the choice caveat in Lemma 2.6 and Remark 2.7 on physical pages 13–14, the monomorphism and canonical-subobject lemmas 2.9–2.11 on physical pages 14–15, the power object in Proposition 2.12 and the topos theorem 2.13 on physical page 16, and the exponential and subobject classifier in 2.14 on physical page 17. The longer development, with the universal characterization quoted as theorem 144.25, is A. M. Pitts, The theory of triposes, PhD thesis, University of Cambridge 1981, Theorem 3.10 and Proposition 3.11 on physical pages 43–45. The effective topos and its realizability objects are developed by Hyland [Hyl82]; the step-by-step decomposition of the tripos-to-topos passage is Pasquali [Pas14]; a proof-bearing modern route through realizability, categorical structure and PER models is De Jong [dJ25], and the fibrational background is Jacobs [Jac99].

Search the book

Type to search the local edition.