Electronic Notes in Theoretical Computer Science  No  

URL httpwwwelsevier nll ocate entcs volume htm l  pages

Lo cal RealizabilityTop oses and a Mo dal Logic

for Computability

Extended Abstract

Steven Awodey

Department of Philosophy Carnegie Mel lon University

Lars Birkedal

School of Computer Science Carnegie Mel lon University

Dana S Scott

School of Computer Science Carnegie Mel lon University

Abstract

This work is a step toward developing a logic for typ es and computation that in

cludes b oth the usual spaces of and constructions and spaces from

logic and domain theory Using realizabilityweinvestigate a conguration of three

top oses whichwe regard as describing a notion of relative computabilityAttention

is fo cussed on a certain lo cal map of top oses whichwe study rst axiomatically and

then by deriving a mo dal calculus as its internal logic The resulting framework is

intended as a setting for the logical and categorical study of relative computability

Intro duction

We rep ort here on the current status of research on the Logic of Typ es and

Computation at Carnegie Mellon University  The general goal of this

research program is to develop a logical framework for the theories of typ es and

computability that includes the standard mathematical spaces alongside the

many constructions and spaces known from typ e theory and domain theory

One purp ose of this goal is to facilitate the study of computable op erations

and maps on data that is not necessarily computable such as the space of all

real numb ers

Email awodeycmuedu birkedalcscmuedu danascottcscmuedu Lars

Birkedal is supp orted in part by US National Science Foundation Grant CCR

c

 Published by Elsevier Science B V

Awodey et al

Concretely in the research describ ed here we use the realizabilitytopos

over the graph mo del P N of the untyp ed lamb da calculus together with

the subgraph mo del given by the recursively enumerable subsets to repre

sent the classical and computable worlds resp ectively There results a certain

con guration of top oses that can b e regarded as describing a notion of rel

ative computability We study this con guration axiomatically and derive

a higherorder mo dal logic in which to reason ab out it The logic can then

b e applied to the original mo del to formalize reasoning ab out computability

in that setting Moreover the resulting logical framework provides a general

categorical semantics and logical syntax for reasoning in a formal wayabout

abstract computabilitywhich it is hop ed could also b e useful for formally

similar concepts such as logical de nability

In somewhat more detail Section b egins by recalling the standard re

alizability top oses RT Aand RT A  resulting from a partial combinatory

A and a subalgebra A We then identify a third category RT A A 

whichplays a key role very roughly sp eaking it represents the world of all

continuous ob jects but with only computable maps b etween them This cat

egory RT A A  is a top os the relative realizability on A with resp ect

to the subalgebra A 

The top oses RT AandRT A  are not particularly wellrelated by them

selves the purp ose of the relative realizabilitytopos RT A A  is to remedy

this defect The three top oses are related to each other as indicated in the

following diagram in which the three functors on the left leg constitute a lo cal

geometric morphism while the right leg is a logical morphism

RT A A 



u

H

u

H

u

u



H

u

u

u

H

u

u

u

H

u

u

u

H

u

u

u

H

u

u

zu

u

u

RT A 

RT A

The lo cal geometric morphism on the left is our chief concern and the fo cus of

Section  which also mentions some examples and prop erties of these fairly

wellundersto o d maps of top oses When we rst encountered it wewere

pleased to recognize our situation as an instance of one that FW Lawvere has

already called attention to and dubb ed an adjoint cylinder or more colorfully

a unity and identity of opposites  

In Section  we present four axioms for lo cal maps of top oses and sketch

the pro of that they are sound and complete Actually since the situation we

are mainly interested inie realizabilityforces the lo cal map to b e lo calic

we give the axioms in a form that implies this condition We simply mention

here that a mo di cation of axiom ab out generators will accomo date all

b ounded lo cal maps This axiomatization has b een found useful in working

with the particular situation wehave in mind but its general utility for lo cal

maps of top oses remains to b e seen



Not to b e confused with the standard notion of computability relative to an oracle

Awodey et al

One application of sorts of the axioms for lo cal maps is the investigation

of their logical prop erties These are given in Section  in the form of a logical

calculus involving two prop ositional op erations written  and with left

adjointto  It turns out that  satis es the S mo dal logic p ostulates for the

boxop eration We here term the calculus a modal logic for computability

since that is the interpretation wehave in mind but of course this mo dal

logic can b e interpreted in any lo cal top os Weintend to use it to investigate

the logical relations that hold in the relative realizability top os however this

asp ect of our work is only just b eginning

Note that any lo cal map also induces a closely related pair of adjoint

op erations on logical types ob jects in addition to the ones on formulas sub

ob jects studied here relating our work to   The idea of a mo dal com

putability op erator  is due to the senior author January  and was the

original imp etus for this work parts of which are from the second authors

do ctoral thesis  The nal brief section of the pap er sp ells out the intended

interpretation of the calculus in the relative realizability top os RT A A 

 Realizability top oses for computability

Let A K S b e a partial combinatory algebra PCA often we just denote

it by its underlying set A The binary op erator is the partial application

and combinators K and S are taken to b e part of the structure and not just

required to exist

Let A b e a subPCA of AthatisA is a subset of A containing K and

S and closed under partial application Intuitivelywe are thinking of the

realizers in A as continuous realizers and of theose in A as computable

realizers This intuition comes from the main example where A is P N the

graph mo del on the p owerset of the natural numb ers and A is RE  the

recursively enumerable subgraphmo del Note that the mo del P N has a con

tinuum of countable subPCAs As another example one may consider van

Oostens combinatory algebra B for sequential computation and its eective

subalgebra B  see  

e

The PCAs A and A give rise to two realizability top oses RT A  and

RT A in the standard way  One may think of RT Aasauniverse where

all ob jects and all maps are realized bycontinuous realizers Likewise RT A 

may b e thought ofasauniverse where all ob jects and all maps are realized

by computable realizers Unfortunately these two top oses are not very well

related in particular it is not clear how to talk ab out computable maps op

erating on continuous ob jects which is what one would liketodoforthe

purp oses of eg computable analysis  Thus one is led to intro duce an

other realizability top os RT A A  where intuitively equality on all ob jects

is realized bycontinuous realizers and all maps are realized by computable

Awodey et al



realizers

The top os RT A A  is constructed by mo difying the underlying trip os for

RT A in the following way The nonstandard predicates   on a set I are

still functions I  P A into the p owerset of A and the Heyting prealgebra

op erations are the same as in the trip os underlying RT A The mo di cation

is in the de nition of the entailment relation wesay    over I i there is

a realizer a in A not just in Asuch that for all i in I allb  i a b is

de ned and a b   i In the terminology of Pitts   wehavechanged the

designated truth values to b e those subsets of A whichhave a nonempty

op

intersection with A  Denote this new trip os by P  Set  Cat Then

RT A A isthetoposSetP  represented by P 

Explicitly ob jects of RT A A  are pairs X   with X a set and 

X X

 X  X  P A a nonstandard equality predicate with computable realiz

ers for symmetry and transitivity Morphisms from X  toY  are

X Y

equivalence classes of functional relations F  X  Y  P A with computable

realizers proving that F is a functional relation Two such functional rela

tions F and G are equivalent i there are computable realizers showing them

equivalent Wenow see that intuitivelyitmakes sense to think of ob jects

 as ob jects with continuous realizers for existence and equality of RT A A

elements and of morphisms f F as computable maps since the realizers

for the functionalityof F are required to b e computable

 Geometry of the realizabili ty top oses for computabil

ity

op

Let Q Set  Cat b e the standard realizability trip os on A  ie the trip os

underlying RT A  Wenow de ne three Setindexed functors b etween Q and

P 

 Q  P and  P  Q and r Q  P

These are de ned as follows Over I wehave

   I  P A i i

I

  I  P AiA  i

I



S

r   I  P A i   A     i

I

PA

where  and  are calculated as in P 

Theorem  Under these denitions it fol lows that



  isageometric morphism of triposes from P to Q



 r is a geometric morphism of triposes from Q to P 



We rst learned ab out the top os RT A A from Thomas Streicher in February  

but the construction has actually b een known for a long time see  Page  item ii  

Awodey et al



For al l I  Set  and r areboth ful l and faithful

I I

By Prop osition  in   these geometric morphisms lift to two geometric

morphisms b etween the top oses as in





o



RT A  RT A A   a  ar



r

Here we do not distinguish notationally b etween the functors at the trip os

level and at the top os level In particular  preserves nite limits More

over  r RT A   RT A A  are easily shown to also b e b oth full and

faithful The geometric morphism   RT A A   RT A is therefore a

connected surjection while  r RT A   RT A A isanemb edding

   Note that  r

 

It follows by standard results that there is a LawvereTierney top ology j

in RT A A such that RT A  is equivalent to the category Sh RT A A 

j

of sheaves

The following theorem was known to Martin Hyland but apparently has

never b een published We include a pro of here

Theorem  Let C be a nitely complete category and let P and Q be C



triposes Suppose f f f P  Q is a geometric morphism of tri



poses Then C P  is localic over C Q via the inducedgeometric morphism



 C P   C Q f f f



Pro of Wewanttoprove that C P  is equivalent to the category of C Q

valued sheaves on the internal lo cale f  inC Q As usual  it suces



C P 

to show that for all X  C P  there exists a Y  C Q and a diagram



 

f Y

S





X



in C P  presenting X as a sub quotientoff Y for Y an ob ject of C Q Write

r  C  C P  for the functor I  I T  where   I  I  I is the

P  I

I

diagonal map the constant ob jects functor  

By a familiar prop erty of realizability top oses wehave that for all X 

C P  there exists an ob ject I  C and a diagram

 

r I  I T 

S

P 

I







X

in C P  presenting X as a sub quotient of a constant ob ject r I  Now since

P

 

f is the inverse image of a geometric morphism of trip oses f preserves



r I  existential quanti cation as an indexed left adjoint so f r I 



Q P

and the diagram in  is the required diagram 

Awodey et al

Wemay conclude from Theorems  and  that RT A A  is lo calic over

RT A via  Indeed the geometric morphism    RT A A  

RT A isalocalic local map of  since  has a right adjoint r for which

 r  Lo cal maps have b een studied by  and provide an instance of



what Lawvere   has called unity and identity of opposites The idea is

that the full sub categories RT A  and rRT A  are each equivalentto

RT A  and yet are opp osite in the sense of b eing coreective and reective

resp ectivelyin RT A A  We think of the ob jects in rRT A  as sheaves

and here we think of those in RT A  as computable

Examples of lo cal maps in addition to the basic ones mentioned in 

include the following

 Let RT A b e a realizability top os and let i C  RT Abeafull

A

sub category of partitioned assemblies of suitably large b ounded cardinality

so that C is a small generating sub category of pro jectives The covering

A

families in C are to b e those which are epimorphic in RT A Then the

A



Grothendieck top os Sh C  is lo cal let us write its structure maps as  a

A

 

 ar Set  Sh C  There is a restricted Yoneda emb edding

A

Y  RT Ai  RT A  Sh C 

A

 

for which the diagram b elow commutes in the sense that   Y  r

 

Y r





w

o

Y



RT A Sh C 

Set

A





r

r

Thus we can regard  RT A  Set as what would be the direct image of a

lo cal map if only RT A had enough colimits





C afull   Let C b e a small category with nite limits and i D

b b

sub category closed under the same The geometric morphism C  D with



b

direct image the restriction i along i is then a lo cal map The image of D



under the full emb edding i where i a i  then consists of those presheaves

 

P on C for which

colim PD PC



DhC D

These are the ob jects that we are interested in as candidates for b eing com

putable when D represents the computable sub category They are the ones

termed discrete in the sequel

Regarding the choice of terminology We use the term discrete by anal

ogy to top ological examples Wewould haveliked to call these ob jects cosheaves

since they are the ob jects that are co orthogonal to the morphisms inverted by

a

 and sheaves are those that are orthogonal However cosheaf  has already

b een used to describ e something else namely a covariant sheaf  

Awodey et al

 Axioms for lo calic lo cal maps

In this section we present a set of axioms for lo calic lo cal maps and sketcha

pro of that they are sound and complete in the sense that whenever a given

top os satis es the axioms then it gives rise to a lo calic lo cal map of top oses

and moreover any lo calic lo cal map of top oses satis es the axioms Later on

we shall make use of the axiomatization in this section to describ e a modal

logic for computability First we need a couple of de nitions

For the remainder of this section let E b e an elementary top os and j a

V for the asso ciated closure LawvereTierney top ology in E We write V 

op eration on sub ob jects V X Wesaythat j is principal if for all X E



the closure op eration on SubX  has a left adjoint U  calledinterior

U

that is



V  V  U 

U

in SubX 

The interior op eration is not assumed to b e natural that is it is not assumed

to commute with pullbacks It follows that in general the interior op eration

is not induced byaninternal map on the sub ob ject classi er  in the E  and

in that sense is not a logical operation in the internal logic of E 

The interior op eration extends to a functor EE since whenever f  X 

  



Y wehave  f   Wesay that an ob ject X E is op en if X An



X Y X

ob ject is op en i the interior of its diagonal equals its diagonal An ob ject

C E is called discrete if it is co orthogonal to all morphisms inverted by

a

the asso ciated sheaf functor that is C is discrete if for all e X  Y such



a

that e is an isomorphism for all f  C  Y  there exists a unique f  C  X

such that

X



f

e





C Y

f

commutes

Recall eg from  that a sheaf can b e characterized as an ob ject which

a

is orthogonal to all morphisms inverted by  and that it suces to test orthog

onality just with resp ect to the dense monomorphisms For discrete ob jects

there is a similar simpli cation an ob ject is discrete i it is co orthogonal to

all co dense epimorphisms where an epimorphism e X  Y is co dense i

the interior of its is included in the diagonal of X We write D E for

j

the full sub category of E on the discrete ob jects

Nowwe prop ose the following axioms for a lo calic lo cal map on a top os

E with top ology j 

Axiom  The top ology j is principal 

Awodey et al

Axiom  For all X E there exists a discrete ob ject C and a diagram

 

S C





X

in E  presenting X as a sub quotientofC 

Axiom  For all discrete C EifX C is op en then X is also discrete

 

Axiom  For all discrete C C E the pro duct C  C is again discrete

Let E b e a top os with a top ology j satisfying the Axioms   for lo calic lo cal

maps We can then prove

Theorem  The category of discrete objects D E is coreective in E  that

j





D E

E has a right adjoint Moreover D E is a topos is the inclusion 

j

j

 is left exact and   ED E is a localic local map

j

Pro of Sketch The asso ciated discrete ob ject of an ob ject X E is obtained

as follows Present X as a sub quotient of a discrete ob ject C and consider the

following diagram



 



K



K

e

e

 



m

   

S C

S













e

e 





















e

   

X

h

X

X





e



e

 

and The is the co equalizer of its interior K is the kernel of where K

X

e e



e

can b e shown to b e the asso ciated discrete ob ject of X  in the sense ob ject

X

that it is couniversal among all maps from discrete ob jects into X  so that

 

e

 X is the counit of the sought adjunction

X X

By results of Kelly and Lawvere  Prop ositions  and  it now follows

that there is an equivalence of categories D ESh E  under whichED E

j j j

is shea cation Thus  has a right adjoint Moreover  can b e shown to b e

left exact Since E is lo calic over D E by Axiom  the geometric morphism

j

  ED E is a lo calic lo cal map of top oses

j

 

Corollary  For any discrete C C E and any f  C  C  and al l open



subobjects U C  the pul lback C  U

C





C  U

U

C











C

C

f

is open 

Awodey et al

Theorem  Every localic local map of toposes satises Axioms  for lo

calic local maps

a

Pro of Sketch It suces to consider lo calic lo cal maps of the form L  E

a a

Sh E with the asso ciated sheaf functor L a andD ESh E  The interior

j j j

a

of an ob ject X is obtained by taking the image of the counit L X  X  The

axioms are then easily veri ed

 A mo dal logic for computability

Let E b e a top os with a top ology j satisfying the axioms set out in the previous

section In this section our goal is to describ e a logic with which one can reason

ab out both of the two top oses E and D E  This will then apply to RT A A 

j

and RT A  see Section 

As a rst attempt one may consider the ordinary internal logic of E ex

tended with a closure op erator induced by the top ology j and try to extend

it futher with a logical op erator corresp onding to the interior op eration But

since interior do es not commute with pullback in general it is not a logical

op eration on all sub ob jects of ob jects of E However since the interior of an

ob ject X is the least dense sub ob ject of X  one may instead add a new atomic

predicate U for eachtyp e X and write down axioms expressing that it is the

X

least dense sub ob ject This is straightforward But as yet wedonothavea

convenientinternal logical characterization of the discrete ob jects

Instead we shall describ e another approach where typ es and terms are

ob jects and morphisms of D E and predicates are all the predicates in E on

j

ob jects from D E  More preciselywe consider the internal logic of the bration

j

Pred

obtained bychangeofbase as indicated in

D E

j



SubE 

Pred







D E

j E 



Thus a predicate on an ob ject X  D E is a sub ob ject of X in E  Since

j

  D E X   E X   Sub X 

 

j E E E

Pred

the internal lo cale  is a generic ob ject for the bration  Hence the

E

D E

j

internal logic is manysorted higherorder intuitionistic logic

Note that since E is lo calic over D E we can completely describ e E in

j

this internal logic in the standard way  as partial equivalence relations and

functional relations b etween such

By Corollary   the interior op eration is a logical op eration on predicates

we denote it by  Note that the ordinary logic of D E is obtained by restricting

j

attention to predicates of the form  The top ology j in E induces a closure 

Awodey et al

op erator whichwe are pleased to denote  on predicates in this internal logic

Wenow describ e howthe and  op erations can b e axiomatized Log

ical entailment is written  j     where  is a context of the form

x   x   giving typ es  to variables x  and where  and  are for

  n n i i

mulas with free variables in  We write  for an empty list of assumptions

There are the usual rules of manysorted higherorder intuitionistic logic plus

the following axioms and rules

  

 j     j   

 

 j T   j        

 j   





x y  j x  y  x  y 

 j   

One can then show that  has the formal prop erties of the b ox op erator in the

mo dal logic S ie for formulas  and  in context 

   

         

   

and

 



 

We therefore refer to this logic as a mo dal logic for computability 

We remark that the following principles of inference for quanti ers can b e

derived from   

 j  xX 

 

 j  xX 



 j  xX  a xX 

Quite generally the mo dal logic of any lo cal map of top oses

 EF  a  ar

can b e used to compare the internal logic of E with that of F sincethetyp es

are then the discrete ob jects E in E  for which E E and



O penS ub E  Sub E 



F

E

where OpenS ub E   Sub E  is the subp oset of op en sub ob jects of E in

E

E

E  Observe eg that the natural numb ers ob ject N is among the discrete

ob jects and that the identity relation on any discrete ob ject is op en

Togive a sample application call a formula  stable if it is built up from

atomic predicates including equations and rstorder logic and if for every

subformula of the form     the formula  has no  or For anysentence 

Awodey et al

we write F   to mean that  holds in the standard internal logic of F

with basic typ es  interpreted by ob jects X of F and atomic formulas R on



typ e  interpreted as sub ob jects S X We then write E   to mean that

R 

 holds in the standard logic of E with basic typ es  interpreted by ob jects

X and atomic formulas R interpreted byS X 

 R 

Prop osition  For any stable sentence 

F   i E  

Pro of Sketch There are the interpretations  and  for whichone

F E

shows by induction that for any stable formula 

 

F E

using the fact that  preserves  along maps b etween discrete ob jects Thus

for any stable sentence 

F   i 

F

i  

F E

i E  

i E  

The prop osition can b e used to show that egifF has choice for functions

from N to N in the external sense then so do es E  Indeed let R byany

relation not necessarily op en on N in E and supp ose that

E  nN mN Rn m

Then we reason informally as follows

E  nN mN Rn m

E  nN mN Rn m by

E  nN mN Rn m by 

E  nN mN Rn m by

F  nN mN Rn m by stability

F  nN Rn f n for some f  N  N

byACin F

E  nN Rn f n by stability

E  nN Rn f n by 

Pred

The mo del of the mo dal logic for computabilitygiven by the bration

D E

j

de ned ab ove is in fact a trip os namely the standard trip os on the internal

lo cale   see   Indeed we can give the following general de nition and

E 

Awodey et al

theorem

Denition  Acanonical ly presented tripos P  E   on a topos E is

local if there is a topology   on P see   Page  and an interior

map   such that



 T



p  q  p  q 



p  q i p  q 

Theorem  Alocal tripos induces a localic local map of toposes and more

over every localic local map of toposes arises from a local tripos

The trip os P underlying the top os RT A A islocal  P A  P A is induced

by the functor  

  A

and  P A  P A is induced by the functor r 



     A    A 

 P A

 Interpretation of the mo dal logic in RT A  and RT A A 

 

Finallywe briey describ e in concrete terms how the mo dal logic for com

putabilityisinterpreted in RT A and RT A A 

Typ es and terms are interpreted by ob jects and morphisms of RT A 

in the standard way A predicate  on an typ e X    RT A isan

X

equivalence class of a strict extensional relation in P X  X  recall P is the

trip os underlying RT A A  that is  is an equivalence class of settheoretic

functions X  X  P A which are strict and extensional via computable

realizers twosuch functions b eing equivalent i they are isomorphic as ob jects

of P X  X 

On such a predicate  on an ob ject X   is just x  x  A and

 is



x      A  x  A 

 P A

Thus we can think of  as  b eing computably true ie realized via

computable realizers

Ob jects of RT A A  are then describ ed as pairs X  with X 

  RT A and a partial equivalence in Pred on X   X  Likewise

morphisms are describ ed as functional relations in the standard way

In this realizabilitymodelwehave the following further principle for 

 j a 

b ecause the typ es are the ob jects of RT A  From this it follows that

 j a  

Awodey et al

which accords with the intuition that doublenegation closed formulas have

no computational content

Note also that since  RT A   Set has a right adjoint the same is true

for the global sections functor  RT A A   SetThus in RT A A too

 is indecomp osable and pro jective so RT A A  has the logical disjunction

and existence prop erties

Acknowledgements

We gratefully acknowledge very useful discussions with Andrej Bauer Martin

Hyland Peter Johnstone John LongleyJaapvan Oosten Pino Rosolini Alex

Simpson and Thomas Streicher

References

 ZEL Benaissa E Moggi W Taha and T Sheard A categorical analysis of

multilevel languages Manuscript January 

 PN Benton A mixed linear and nonlinear logic Pro ofs terms and mo dels

preliminary rep ort  Technical rep ort UniversityofCambridge  

  L Birkedal Developing theories of typ es and computability Thesis Prop osal

April 

 MPFourman and DS Scott Sheaves and logic In MPFourman CJ

Mulvey and DS Scott editors Applications of Sheaves pages 

SpringerVerlag 

  JME Hyland PT Johnstone and AM Pitts Trip os theory Math Proc

Camb Phil Soc     

 PT Johnstone Topos TheoryNumb er  in LMS Mathematical Monographs

Academic Press London 

 PT Johnstone and I Mo erdijk Lo cal maps of top oses Proc London Math

Soc     

 GM Kelly and FW Lawvere On the complete lattice of essential

lo calizations Bul l Soc Math Belg Ser A XLI    

 FW Lawvere Top oses generated by co discrete ob jects in combinatorial

top ology and functional analysis Notes for Collo quium lectures given at North

Ryde New South Wales Australia on April   and at Madison USA on

Decemb er   

 FW Lawvere Some thoughts on the future of category theory In A Carb oni

MC Pedicchio and G Rosolini editors Category Theory Proceedings of the

International Conference held in Como Italy July  volume 

of Lecture Notes in Mathematics pages   SpringerVerlag  

Awodey et al

 J Longley The sequentially realizable functionals Technical Rep ort ECS

LFCS University of Edinburgh 

 J van Oosten A combinatory algebra for sequential functionals of nite typ e

Technical Rep ort  University of Utrecht 

  AM Pitts The Theory of Triposes PhD thesis Cambridge University 

 MB PourEl and JI Richards Computability in Analysis and Physics

SpringerVerlag 

  DS Scott S Awodey A Bauer L Birkedal and J Hughes Logics of Typ es

and Computation at Carnegie Mellon University

httpwwwcscmueduGroupsLTC