<<

The Effective Topos

J.M.E. Hyland Department of Pure , Cambridge, England

§0 Introduction

The subject of this paper is the most accessible of a series of toposes which can be constructed from notions of realizability: it is that based on the original notion of recursive realizability in Kleene[1945]. Of course there are many other kinds of realizability (see Kleene-Vesley[1965], Kreisel[1959], Tait[1975]). All these (and even the Dialectica Interpretation) fit into a very abstract framework described in Hyland-Johnstone-Pitts[1980]. (Since we will refer to this paper frequently, we shorten the reference to HJP[1980].) In this abstract framework one passes easily (as is becoming customary, see Fourman[1977], Makkai-Reyes [1977], Boileau-Joyal[1981]) between logical and theoretic formula- tions, using whichever is most appropriate. One good example is worth a host of generalities, so it is the aim of this paper to present this abstract approach to recursive realizability in some detail. The basic strategy readily extends to other cases. Many people, most notably Beeson (see for example Beeson[1997]), have considered realizability extended to give interpretations of complicated formal systems. The flavour of the more category theoretic treatment is to have one think in terms of models. Thus the approach looks like models for intu- itionistic logic (see Fourman-Scott[1979]), where one only has natural access to the models. (This parallel between realizability and sheaf models was first made explicit, for theory, in an untitled manuscript, by Powell.) As in the case of sheaves, we will find ourselves looking at genuine mathematical structures (with their non-standard logic) when we investigate truth in the effective topos. We will be presenting “the world of effective mathematics” as it appears to the classical mathematician. (Of course, it is possible to present the ideas in the context of more or less any mathematical ideology.) While the logical approach to categories enables us to work with concrete structures and apply our experience of elementary logic, the category theoretic approach to logic enables us to do away with much logical calculation and to use instead simple facts about categories (in particular facts about toposes and geometric ). It has become clear in recent years that much of con- structive logic can be treated very elegantly in the context of topos theory. This is in harmony with work in the intuitionist tradition on Beth and Kripke mod- els (see van Dalen[1978]), and there were many contributions to the Brouwer

1 Centenary Conference in this area. This paper simply does the same kind of thing for realizability. Of course there is a surprise here: the topos of this paper is most unlike a Grothendieck topos, and it is not initially plausible that theory abstracted from notions of continuity should have any application in this most non-topological setting. The first three sections of the paper serve to introduce the effective topos as a world built out of the logic of recursive realizability. Much detail is omitted in the hope of giving a feel for the subject. The main category-theoretic ideas are explained and interpreted in §§4-6. In particular we show why the notion of a negative formula arises naturally in the theory of sheaves. In §§7-13, we apply this work to a study of analysis in the effective topos. We show that in essence it is constructive real analysis (in the sense of Markov). I am grateful to Professor Troelstra for some advice on this topic (I find the published material unreadable) and in particular for detecting an error in an early draft of this paper. §§14-17 are concerned with features of the effective topos where the matters: uniformity principles and properties of j-operators. The paper closes with some general remarks on the mathematical significance of the effective topos. Finally I would like to thank the organizers of the Brouwer Centenary Con- ference for the opportunity to present this paper (in such pleasant surroundings!) and to apologize to everyone for being so long in writing it.

§1 Recursive realizability

Recursive realizability is based on the partial applicative structure (N, ·) where as in HJP[1980] we write n·m = n(m) for the result of applying the nth partial recursive to m. (This saves on brackets compared with the notation {n}m.) One can define a notion of λ-abstraction in (N, ·) in the usual way from the combinators, and we will use it freely in what follows, so that (for example) λx.x will denote an index for the identity function. We also take for convenience a recursive pairing function

h−, −i : N × N → N;(n, m) 7→ hn, mi , and let π1, π2 be (recursive indices for) the corresponding unpairing functions. Recursive realizability is usually formulated in terms of the notion

e realizes φ where e is a natural number and φ is a sentence of (Heyting’s) arithmetic. The critical clauses in the inductive definition are implication: e realizes φ → ψ iff for all n, if n realizes φ then e(n) is defined and realizes ψ, universal quantification: e realizes ∀n.φ(n) iff for all n, e(n) is de- fined and realizes φ(n)[n the numeral for n].

2 The other inductive clauses are

and: e realizes φ ∧ ψ iff π1(e) realizes φ and π2(e) realizes ψ,

or: e realizes φ ∨ ψ iff either π1(e) = 0 and π2(e) realizes φ or π1(e) = 1 and π2(e) realizes ψ, falsity: no numbers realize ⊥,

existential quantification: e realizes ∃n.φ(n) iff π2(e) realizes φ(π1(e)) [π1(e) the numerical for π1(e)]. Finally we give the initial clause for equalities between closed terms e realizes s = t iff both s and t denote e.

For a careful treatment of the realizability interpretation of arithmetic the reader may consult Troelstra[1973]. We will see in §3, that this is the interpre- tation of arithmetic within the effective topos. For an account of the original motivation see Kleene[1973]; it is interesting to try to understand it in terms of the present paper. Apparently Dana Scott first noticed that realizability could be understood “model-theoretically” in terms of the truth-values {e | e realizes φ}. This gives us a set Σ = P(N) of non-standard truth-values, and so for each set X, a X set Σ of non-standard predicates on X. We write φ = (φx | x ∈ X) and X ψ = (ψx | x ∈ X) for elements of Σ and can reformulate our earlier definition for the proportional connectives by defining operations pointwise on ΣX as follows:

(φ ∧ ψ)x = φx ∧ ψx = {hn, mi | n ∈ φx and m ∈ ψx}, (φ ∨ ψ)x = φx ∨ ψx = {h0, ni | n ∈ φx} ∪ {h1, ni | n ∈ ψx}, (φ → ψ)x = φx → ψx = {e | if n ∈ φx, then e(n) is defined and e(n) ∈ ψx}, ⊥x = the empty set.

The reader may also like to have

>x = N. X There is a relation `X of entailment (a pre-order) defined on each Σ by T φ `X ψ iff {(φ → ψ)x | x ∈ X} is non-empty. The soundness of the realizability interpretation of intuitionistic proposi- tional logic is the following proposition.

X Proposition 1.1. (Σ , `X ) is a Heyting pre-algebra: as a category the has finite limits (meets), finite colimits (joins) and is cartesian closed (Heyting implication). Proof. The structure is given explicitly in the definitions above.

3 We now introduce the abstract notion of quantification from . For any map f : X → Y of sets we define substitution along f, f ∗ :ΣY → ΣX as composition with f: ∗ (f ψ)x = ψf(x). ∗ Y f is a (in fact a map of Heyting pre-algebras) from (Σ , `Y ) to X ∗ (Σ , `X ) and quantification along f is given by the adjoints to f . As shown in HJP[1980] these are defined by T right adjoint (∀f.φ)y = {f(x) = y → φx | x ∈ X}, S left adjoint (∃f.φ)y = {f(x) = y ∧ φx | x ∈ X}, where  >, if f(x) = y, f(x) = y = S{> | f(x) = y} = J K ⊥, otherwise, is the natural interpretation as a non-standard predicate of f(x) = y. Note that S while {φx | f(x) = y} is a satisfactory alternative definition of the left adjoint, T {φx | f(x) = y} is not a definition of the right adjoint unless f : X → Y is surjective. However usual quantification is quantification along the obvious projection, and almost all projections are surjective, so this nuance will cause the reader (and author) no further trouble. The reader will see that what we have just described is an interpretation of intuitionistic predicate logic: we have standard functions and sets, a (non- standard representation of) standard equality and a collection of non-standard predicates. We also have a “generic predicate” namely the identity in ΣΣ. We can encapsulate all this structure in the following proposition.

X ∗ Proposition 1.2. The (Σ , `X ) together with the f and their adjoints ∃f and ∀f and the “generic predicate”, form a tripos on the (in the sense of HJP[1980]). Proof. See HJP[1980]. In what we have said, we have not needed to distinguish formulae from their interpretations, and we will continue to blur this distinction as far as possible. (We will use open face brackets to indicate an interpretation when necessary to prevent confusion.) We say that

X φ ∈ Σ is valid iff > `X φ. By adjointness we have

X φ ∈ Σ is valid iff > `1 ∀X.φ, where X : X → 1 is a unique map from X to a one-element set. That is, φ is valid iff ∀x.φ(x), the universal generalization of φ is valid or realizable. We will use this notion both to describe and study the topos which we can construct on the basis of (1.2).

4 §2 Description of the effective topos

When constructing a topos from a tripos as in HJP[1980], one must (i) add new subobjects of the sets one has started with to represent the non- standard predicates, and (ii) take quotients of these by the non-standard equivalence relations.

This leads to the description of the objects of effective topos. An object of the effective topos is a set X with a non-standard predicate = on X × X such that

symmetry x = y → y = x transitivity x = y ∧ y = z → x = z

are valid. Note that we do not have reflexivity: (as is the case for Heyting arithmetic) there need be no uniform realization of (reason why) x = x. We regard and will write the predicate x = x as an existence predicate, Ex, and as a membership predicate, x ∈ X. There is a useful discussion of the logic of existence predicates in Scott[1979]. Of course we need to consider all non-standard maps to obtain the effective topos, and to do that we are reduced to considering functional relations. The maps from (X, =) to (Y, =) in the effective topos are equivalence classes of functional relations where

(a) G ∈ ΣX×Y is a functional relation iff relational G(x, y) ∧ x = x0 ∧ y = y0 → G(x0, y0) strict G(x, y) → Ex ∧ Ey single-valued G(x, y) ∧ G(x, y0) → y = y0 total Ex → ∃y.G(x, y) are all valid, (b) G is equivalent to H iff G(x, y) ↔ H(x, y) is valid. We will say that G represents the map [G]:(X, =) → (Y, =). It is useful to note that if G and H are both functional relations (from (X, =) to (Y, =)), then to show G and H equivalent, it suffices to show that an implication in one direction is valid. Functional relations can be composed: if G ∈ ΣX×Y and H ∈ ΣY ×Z are functional relations, then so is ∃y.G(x, y) ∧ H(y, z) ∈ ΣX×Z . Also = is a func- tional relation from (X, =) to itself. These give the composition and identities, and so we have a category. In view of (2.1), we call this category the effective topos and denote it by Eff hereafter. Theorem 2.1. Eff is a topos. Proof. See HJP[1980] for details.

5 We can extend the non-standard interpretation of §1 to give an account of the internal logic of the category Eff . This goes as for the logic of sheaves except for obvious modifications to deal with the fact that functions are (only) represented by functional relations. A general account of the internal first-order logic of categories is given in Makkai and Reyes[1977], and accounts of the higher order logic of toposes can be found in Fourman[1977] and Boileau-Joyal [1981]. As these accounts make clear, categorical constructions can be defined by means of the internal logic. Thus, not only can (an extension of) validity in the sense of §1, be used to determine what is true in Eff , but it can also be used to define categorical constructs. (Now continuing the interplay, these categorical constructs can then be used to establish further facts about what is true in Eff .) We now give some simple examples of the logical description of the structure of Eff . (On a few occasions we will need to quote some more complicated facts of the same kind.) 1) A map [G]:(X, =) → (Y, =) is monic iff G(x, y) ∧ G(x0, y) → x = x0 is valid. A subobject of (X, =) can always be represented (though not uniquely) by a canonical monic of the form [=0]:(X, =0) → (X, =) where x =0 x0 = A(x) ∧ x = x0 J K J K for some A ∈ ΣX strict and relational for (X, =). Thus subobjects always arise by restricting the membership predicate while (as far as possible) leav- ing the equality alone. 2) Given two maps [G], [H]:(X, =) → (Y, =), their equalizer is represented by the canonical monic obtained from the strict and relational ∃y.G(x, y) ∧ H(x, y) ∈ ΣX The construction of other finite limits is analogous. The diagram [G0] (W, =) (Z, =)

[H0] [H] (X, =) (Y, =) [G] is a pullback iff [H] ◦ [G0] = [G] ◦ [H0], ([G0], [H0]) : W → Z × X is a monic and G(x, y) ∧ H(z, y) → ∃w.G0(w, z) ∧ H0(w, x) is valid. The condition that other diagrams give finite limits can be expressed similarly in the logic.

6 3) A map [G]:(X, =) → (Y, =) is surjective iff

Ey → ∃x.G(x, y)

is valid. A quotient can always be represented as

[∼]:(X, =) → (X, ∼)

where ∼ is strict relational for (X, =) and such that

“∼ is an on (X, =)”

is valid. Thus quotients are a matter of extending the equality relation and leaving the membership predicate alone. We can now show that any object (X, =) of Eff is a quotient of a subobject of an “ordinary set”, justifying the explanation at the start of this section. For a set X we let ∆X (as in §4) be the object of Eff with underlying set X and (non-standard representation of) standard equality. Proposition 2.2. Any object (X, =) of Eff is a quotient of = by the subobject EX of ∆X obtained from the existence predicate of (X, =).

Proof. Obvious in view of 1) and 3) above.

Note. We have started using open face brackets to ensure readability (espe- cially in connection with equality), as promised in §1. We also abuse notation and write X for (X, =) where context makes the meaning obvious.

§3 Some objects and maps in Eff

We can easily describe a terminal object 1 in Eff . In view of §2, 1 is ({∗}, =) where {∗} is a singleton, and

∗ = ∗ = > J K Of course any p equivalent to > in Σ{∗} = Σ, that is, any non-empty p would do as the value ∗ = ∗ . We now calculate the global sections of an arbitrary object (Y, =) of EffJ, thatK is the maps from 1 to (Y, =). Since {∗} is a singleton, such maps are represented by degenerate functional relations G ∈ ΣY , such that

G(y) ∧ y = y0 → G(y0) G(y) → Ey G(y) ∧ G(y0) → y = y0 ∃y.G(y)

7 are all valid. The total condition tells us that for some y, y0 say, G(y0) is non-empty. The relational and single-valued conditions imply that G(y0) → (G(y) ↔ y0 = y) and hence (since G(y0) is non-empty)

G(y) ↔ y0 = y are valid. Clearly if y0 = y1 is non-empty, then J K y0 = y ↔ y1 = y is valid. We deduce at once the following characterization. Proposition 3.1. Each map [G] : 1 → (Y, =) determines and is completely de- termined by {y | G(y) non-empty}, which is an equivalence class for the (partial) equivalence relation “ y = y0 is non-empty”. J K Conversely any such equivalence class determines a map from 1 to (Y, =). Finite colimits in Eff are hard to get used to because for a start are odd: the realizability interpretation of disjunction is very restrictive. In particular, the 2 of 1 with itself is not the obvious object ∆2 with standard equality (see §4). Let us look at maps from ∆2 to an arbitrary object (Y, =) of Eff . Suppose G(i, y) represents such a map (where 2 = {0, 1}). Then since E0 = E1 = >, the total condition tells us that there are y0, y1 such that G(0, y0)∩G(1, y1) is non-empty. Arguing as for the terminal object we find that

G(i, y) ↔ yi = y

However [G] does not correspond simply to a pair of equivalence classes in {y | Ey non-empty}: the union of the existence of the two equivalence classes must intersect non-trivially, and this is a real restriction. In fact the object 2 in Eff can be represented as (2, =) where

E0 = {0}, E1 = {1}, i = j = Ei ∩ Ej J K (Of course any p0, p1 with p0 ∩ p1 empty would do as the values E0, E1.) An argument as above shows that maps from 2 are pairs of maps from 1. Note also that the only maps from ∆2 to 2 are constant (that is, factor through 1). There is an obvious monic from 2 to ∆2. In §16 we will show that the whole structure of Eff depends on 2 → ∆2 not being iso, in the sense that the topology inverting 2 → ∆2 collapses Eff back to Sets. Since 2 is not ∆2, we would hardly expect the natural number object N in Eff to be ∆N. In fact it is the object (N, =) where En = {n}, n = m = En ∩ Em J K There are maps 0 : 1 → N and s : N → N in Eff represented respectively by G0 and Gs where

8 G0(∗, n) = {0} ∩ {n} and Gs(n, m) = {n + 1} ∩ {m}.

Proposition 3.2. N together with 0 : 1 → N and s : N → N is a natural number object in Eff . Proof. Suppose that we are given maps a : 1 → (X, =) and g :(X, =) → X X×X (X, =) represented respectively by Ga ∈ Σ and Gg ∈ Σ . We can define n n representatives Gg for g inductively by 0 0 0 n+1 0 00 n 00 00 0 Gg(x, x ) = x = x , Gg (x, x ) = ∃x .Gg (x, x ) ∧ Gg(x , x ). J K Now we can define a function f : N → (X, =) represented by

0 0 n 0 Gf (n, x) = En ∧ ∃x .Ga(x ) ∧ Gg (x , x). We claim that

0 s 1 N N

(?) a f f

(X, =) g (X, =) commutes. This amounts to showing that

Ga(x) ↔ ∃n.G0(∗, n) ∧ Gf (n, x) and 0 0 0 ∃x .Gf (n, x ) ∧ Gg(x , x) ↔ ∃m.Gs(n, m) ∧ Gf (m, x) are both valid. These can both be established by use of elementary logic. It remains to show that f is unique such that (?) commutes. So suppose 0 that f represented by Gf 0 is another such map. By use of logic we see readily that Gf (0, x) ↔ Gf 0 (0, x) is valid and that

0 0 0 Gf (n + 1, x) ↔ ∃x .Gf (n, x ) ∧ Gg(x , x) 0 0 0 Gf 0 (n + 1, x) ↔ ∃x .Gf 0 (n, x ) ∧ Gg(x , x) are both valid. But in terms of this data we can define, by primitive recursion, a partial recursive function uniformly mapping Gf (n, x) to Gf 0 (n, x), and this is enough to show that f = f 0. Remark. Since quantification in our logic (see Fourman-Scott[1979] and Scott [1979]) involves the existence predicate, we see at once on the basis of (3.2) that the realizability interpretation corresponds to the logic of the natural number object in Eff . Corollary 3.3. A sentence of Heyting arithmetic is recursively realized iff it is true of the natural number object in Eff .

9 All the specific objects we have looked at so far have been objects (X, =) where x = x0 non-empty implies x = x0 (in X). Indeed all the objects we considerJ until §K14 will be (isomorphic to) ones of this sort (see §6 for a discussion of what the condition means). It is as well to have an example of an object not of this form. The most obvious example is the subobject classifier in Eff (that is, the object of truth values). As indicated in HJP[1980] this is the object (Σ , ↔), that is, the set Σ = P(N) with equality given by the non-standard bi-implication. We leave it as an easy exercise to show that (Σ, ↔) is not isomorphic to any object (X, =) where x = x0 non-empty implies x = x0. (Show first that X would have to have justJ twoK elements.) As further examples it is natural to consider (ΣX , ↔) where now equality is the pointwise bi-implication. These are essentially the objects out of which we constructed Eff in the first place; they are in fact the power sets of the objects ∆X (see §4).

§4 The inclusion of the category of sets in the effective topos

In the last section we saw glimpses of a functor ∆ from the category Sets of sets to Eff , the effective topos.

Definition. For a set X, define ∆X to be (X, =∆X ), where

 0 0 S 0 >, if x = x x =∆X x = {> | x = x } = J K ⊥, otherwise, is the natural interpretation of the equality in Sets. For a map f : X → Y in Sets, define ∆f : ∆X → ∆Y to be the map represented by the functional relation,

 >, if f(x) = y, f(x) = y = S{> | f(x) = y} = J K ⊥, otherwise. This definition can be made whenever we construct a topos from a tripos (see Pitts[1981]), and we always have our first result.

Proposition 4.1. ∆ : Sets → Eff is a cartesian functor (that is, functor preserving finite limits). Proof. Functoriality is obvious. That ∆ is cartesian follows easily from the way finite limits are defined logically in §3. For details see HJP[1980] or Pitts [1981].

The next result is a general feature of realizability toposes. Proposition 4.2. ∆ : Sets → Eff is full and faithful.

10 Proof. Suppose that f, g : X → Y in Sets, and that f(x) = y ↔ g(x) = y J K J K is valid. Then f(x) = y = > iff g(x) = y = > whence f(x) = y iff g(x) = y: thus f = g. ThisJ shows thatK ∆ is faithful.J ToK show that ∆ is full, let G ∈ ΣX×Y be a functional relation from ∆X to ∆Y . The relational and strict conditions are automatically satisfied, the single-valued condition implies that for given x there is at most one y with G(x, y) non-empty (constructively, inhabited), and the total condition implies that there is at least one such y for given x. Thus we have g : X → Y such that G(x, y) is non-empty iff g(x) = y. Then clearly G(x, y) → g(x) = y J K is valid: an index for the identity realizes it. But the total condition becomes Ex → G(x, g(x)) is valid, whence g(x) = y → G(x, y) J K is valid. Thus G represents the map ∆g. This shows that ∆ is full. Remark. Andr´eJoyal has pointed out that ∆ is analogous to the Yoneda em- bedding: it is cartesian, full and faithful, and (so) preserves exponentiation. But I do not understand the force of this analogy. The main result of this section is another general feature of realizability toposes. Recall that in (3.1) we showed in effect that the global section functor on Eff is naturally isomorphic to Γ : Eff → Sets defined by (i)Γ( X, =) = {x | Ex is non-empty}/ ∼ where x ∼ x0 if x = x0 is non- empty; J K (ii) if G is a functional relation from (X, =) to (Y, =) representing g, then Γ(g)([x]) = {y | G(x, y) is non-empty} where [x] denotes the equivalence class of x. Γ is a concrete version of the global section functor, with which we can work, even constructively: starting from an arbitrary base topos E, Γ(X, =) still makes sense as the interpretation in E of “the set of maps from 1 to (X, =)”. (Of course, “non-empty” must be replaced by “inhabited”). Theorem 4.3. ∆ is the direct functor of a geometric , whose inverse image functor is Γ. Proof. The global section functor is always cartesian: alternatively, Γ as defined is cartesian by the logical construction of finite limits described in §3. So we concentrate on the adjointness. We define the unit of the adjunction ηY : Y → ∆ΓY for (Y, =) in Eff by the functional relation  Ey, if y ∼ y0 (y, [y0]) 7−→ S{Ey | y ∈ [y0]} = ⊥, otherwise.

11 Now let G be a functional relation from (Y, =) to ∆X. The total and single- valued conditions imply that if Ey is non-empty, then there is a unique x ∈ X with G(y, x) non-empty. The relational condition implies that if y = y0 is non-empty, then we get the same x for y0 as for y. Thus we have a well-definedJ K map g :ΓY → X. By logic, the composite ∆(g) ◦ ηY is represented by H(y, x) = S{Ey ∧ g([y0]) = x | y ∈ [y0] ∈ ΓY }. J K By the strict condition G(y, x) → Ey is valid; so since G(y, x) is non-empty iff x = g([y]) and since clearly Ey → H(y, g([y])) is valid, we deduce that G(y, x) → H(y, x) is valid. Since both G and H are functional relations, this shows (as remarked in §2) that they both represent the same function, and we have our factorization

[G] = ∆(g) ◦ ηY . It remains to show that g is unique with this property. But if g0 :ΓY → X is such that G(y, x) ↔ S{Ey ∧ g0([y0]) = x | y ∈ [y0] ∈ ΓY } J K is valid, then G(y, g0([y])) is non-empty, so that g0 = g. This completes the proof. Remark. It is an easy corollary of the proof of (4.3) that maps (Y, =) → ∆X in Eff have a simple canonical representative. Let g :ΓY → X correspond under the adjunction to a map (Y, =) → ∆X. Then this latter map is represented by the functional relation  Ey, if g([y]) = x, (y, x) 7−→ S{Ey | g([y]) = x} = ⊥, otherwise. We can now indicate how may be applied to study realizability. (4.2) and (4.3) together say that ∆ : Sets → Eff is an inclusion of toposes (see Johnstone[1977]) so that Sets is j-sheaves on Eff for a suitable topology j. We give an identification of j, which depends on the fact that Sets has classical logic.

Proposition 4.4. The topology j such that Eff j ' Sets is the double negation topology. Proof. In the first place, Sets is dense in Eff since ∆ preserves the initial object (see (8.1)); so j is at most ¬¬ (the greatest dense topology). But Sets is boolean, and from this it follows that j must be ¬¬. We can now describe what the use of “classical objects” in amounts to in our context: since they are defined by liberal use of ¬¬, they are when interpreted in Eff , the objects in the image of ∆. Thus ∆(Sets) should be regarded as the world of classical mathematics within Eff .

12 §5 Basic facts from the logic of sheaves

While the material presented in this section is implicit in the topos theoretic literature, it can not be found in the form we require. With Grothendieck toposes one has typically a subtopos Ej of a topos E which one understands (E is usually a ) and one requires results which enable one to discuss Ej in terms of E and the topology j. For us however the situation is different. It is the topos Ej (that is Sets) which we understand and we wish to obtain information about E (that is Eff ) in terms of Ej and j. We present the material in the following general context. E is a topos with a topology j, Ej is the full of E consisting of j-sheaves and L : E → Ej is the sheafification functor left adjoint to the inclusion Ej → E. We give the basic definitions in a number of useful equivalent forms which are implicit either in Johnstone[1977] or in Fourman-Scott[1979]. Definition. Any object F of E is j-separated iff any of the following equivalent conditions is satisfied:

0 (i) for any j-dense monic m : Y  Y and maps f, g : Y → F with fm = gm, we have f = g;

(ii) the unit ηF : F → L(F ) of the adjunction is monic; (iii) E |= ∀f, f 0 ∈ F.j(f = f 0) → (f = f 0).

A subobject (monic) A  E of an object E of E is j-closed if any one of the following equivalent conditions is satisfied:

(i) if a : E → Ω classifies A  E, then ja = a; A L(A) (ii) the commutative square is a pullback;

E L(E)

(iii) E |= ∀e.j(e ∈ A) → e ∈ A. Of these different formulations, (i) is the traditional category theoretic one, (ii) is particularly useful for understanding Eff and (iii) is the logical formulation (treating j as a propositional operator).

It is obvious from the definitions that F is j-separated iff the equality on F is j-closed, and that a subobject of a j-separated object is itself j-separated. We collect some further folkloric facts about these notions in the next theorem. Theorem 5.1.

(a) If E and F are j-separated, then so is E × F . Also ηE×F : E × F → L(E × F ) = L(E) × L(F ) is ηE × ηF .

13 (b) If F is j-separated, then so is F E for any E. Also the composite of E E E α L(E) ηF E : F → L(F ) with the natural map L(F ) → L(F ) followed by ηE L(E) E E E the isomorphism L(F ) : L(F ) → L(F ) is the monic ηF : F → L(F )E, and the evaluation map F E × E → F is obtained by factoring ev ◦ (α ◦ ηF E × ηE) through ηF . ∗ (c) If C  F is j-closed and α : E → F then α (C)  E is j-closed. Also L(α∗(C)) = L(α)∗(L(C)).

(d) If A  E and B  E are j-closed then so is A∧B  E. Also L(A∧B) = L(A) ∧ L(B).

(e) If B  E is j-closed then so is (A → B)  E for any A  E. Also L(A → B) = L(A) → L(B).

(f) If A  E is j-closed and α : E → F then ∀α.A  F is j-closed. Also L(∀α.A) = ∀L(α).L(A).

(g) If R  E × E is a j-closed equivalence relation on E, then the quotient E/R is j-separated. Also the image (or surjective monic) factorization of

E L(E) L(E)/L(R) ηE is E E/R L(E/R) = L(E)/L(R) ηE/R

Proof. All trivial by the logic of j-operators (sketched at the of Fourman- Scott[1979]). Category theoretic proofs are (implicit) in Johnstone[1977]. Let us now explain why we are interested in closed subobjects. Our under- standing of Grothendieck toposes rests on the fact that inverse image preserve coherent logic (that is ∧, ∨, ∃). But the inclusion of Sets in Eff is in the wrong direction if we wish to see some of the logic of Sets preserved in Eff . In general a preserves little, but we can get rather strong results, when dealing with inclusions Ej → E, by restricting attention to j-closed subobjects. This is significant because a j-closed subobject A  E “agrees with its meaning in Ej” in the sense that ∗ ηE(LA) = A (This is version (ii) of the definition.) Given an interpretation of the atomic formulae of a first order language in E we get (i) an interpretation φ of an arbitrary formula in E, and (ii) by applying L an interpretation of the atomicJ K formula in Ej hence an interpretation φ j of an arbitrary formula in Ej. Clearly if φ is a subobject of E, then φJ j Kis a subobject of L(E). We are interested in whenJ K φ “agrees with the interpretationJ K φ j in Ej” in the sense that J K J K ∗ ηE( φ j) = φ . J K J K The relevant definition is of a form familiar from Troelstra[1973].

14 Definition. In a first order language, the negative formulae (or formulae in the negative fragment) are those built up from atomic formulae using ∧, →, ∀. Theorem 5.2. If an interpretation of a first order language in E interprets the atomic formulae as j-closed subobjects and φ is a negative formula with φ  E, then J K ∗ ηE( φ j) = φ . J K J K Proof. Induction on the complexity of φ using (5.1)(c)(d)(e) and (f). Remarks. 1) We can only have equality for j-separated objects.

∗ 2) As φ is j-closed, ηE( φ j) = φ is equivalent to φ j = L( φ ). J K J K J K J K J K 3) The result is just a consequence of the “j-interpretation” of the logic of E. For negative formulae we are reading it not as a prescription for deriving the logic of Ej from that of E, but as the statement that the logic of E agrees with that of Ej.

§6 Separated objects and closed subobjects in Eff

In this section, we describe what (5.1) means for the particular case when E is Eff and Ej is Sets so that j is the double negation topology. (In fact we do not use this last fact, so that the material relativizes to an arbitrary base topos Ej). We will say that an object of Eff is separated when it is j-separated and that a subobject of an object is closed when it is j-closed. Proposition 6.1. An object of Eff is separated iff it is isomorphic to one of the form (X, =) where x = x0 non-empty implies x = x0. J K Proof. By version (ii) of the definition of j-separated, we see that if an object is separated, it is a subobject of some ∆X. But any canonical monic into ∆X is of the required form. Conversely any object of the required form is a subobject of a ∆X (the obvious map is monic), and subobjects of separated objects are separated. Definition. An object (X, =) of Eff , where x = x0 non-empty implies x = x0, is a canonically separated object of Eff . (SuchJ anK object is completely deter- mined by the values x ∈ X for each x in X, and is essentially (that is, modulo trivial coding) givenJ as a canonicalK monic into ∆X.) Proposition 6.2. If (X, =) and (Y, =) are canonically separated, then so is the usual product (X × Y, =) where

(x, y) = (x0, y0) = x = x0 ∧ y = y0 J K J K J K

15 Proof. Immediate from (5.1)(a) and the definition of the product of maps in the logic. The case of function spaces is more complex than that of products. Since the general description of a function (see HJP[1980]) is too clumsy, we must use (5.1)(b) to construct a suitable representation.

Proposition 6.3. Let (Y, =) and (Z, =) be objects of Eff with (Z, =) canonically separated. Then the function space (Z, =)(Y,=) may be taken to be the canonically separated object (ΓZΓY , =) where (taking Γ(Z, =) ⊆ Z)

α = α0 = ∀y ∈ Y.α([y]) = α0([y]) = T{ Ey → α([y]) = α0([y]) | y ∈ y} J K J K J K and where the evaluation map is represented by the functional relation

Eα ∧ Ey ∧ α([y]) = z . J K Proof. (5.1)(b) gives us a monic from (Z, =)(Y,=) to ΓZΓY defined in the logic by ∀y ∈ Y.α([y]) ∈ Z J K which is equivalent to the formulae given as (Z, =) is canonically separated. The representation of the evaluation map follows from the definition in the logic of the map described in (5.1)(b) by elementary logic. Remark. If for every y ∈ Y ,Ey is non-empty (and we may disregard the others), then the following alternative representation of the function space is canonically separated: (ZY , =) where

α = α0 = T{ y = y0 → α(y) = α0(y0) | y, y0 ∈ Y } J K J K and where the evaluation map is represented as above. (We get this alternative representation by considering the obvious map from ΓZ(Y,=) to ZEY , where EY is the canonical subobject of ∆Y of which (Y, =) is a quotient.) Then if we disregard those α in ZY such that Eα is non-empty, we can continue this process and obtain a simple description of iterated function spaces of separated objects. We consider this further in §§7 and 11. We next consider closed subobjects in Eff . Proposition 6.4. A subobject of an object (X, =) of Eff is closed iff it is represented by a canonical monic determined by A ∈ ΣX of the form

 Ex, if [x] ∈ A A(x) = S{Ex | [x] ∈ A} = ⊥, otherwise, for some A ⊆ Γ(X, =). (It does no harm to let A denote the of Γ(X, =), the canonical monic as defined and the closed subobject which it represents.)

16 Proof. By version (ii) of the definition of j-closed, a closed subobject of (X, =) −1 must be of the form ηX (∆A) for some A ⊆ Γ(X, =). But what we have −1 described is easily seen to be equivalent to the definition of ηX (∆A) in the logic.

[=0] Definition. A monic of form (X, =0) → (X, =) where  0 0 S 0 x = x , if [x] ∈ A x = x = { x = x | [x] ∈ A} = J K J K J K ⊥, otherwise, for some A ⊆ Γ(X, =) is a canonical closed monic.((6.4) shows essentially that the closed subobjects are just those represented by canonical closed monics). Remark. On many occasions it is more natural to disregard in (X, =0) the x which are not in A. We shall suit terminology to need and refer to this modifi- cation also as a canonical closed monic. Note that the notion becomes particu- larly simple in case (X, =) is canonically separated, as then we may take A ⊆ X (taking Γ(X, =) ⊆ X again). We now say what (5.1)(c),(d),(f) mean for the effective topos.

Proposition 6.5. Let A  (X, =) and B  (X, =) be subobjects of (X, =), C  (Y, =) a subobject of (Y, =) and [G]:(X, =) → (Y, =) a map in Eff . If C is a canonical closed monic (defined from C ⊆ Γ(Y, =)), then [G]−1(C) is the canonical closed monic defined from

(Γ(G))−1(C) = {[x] | {y | G(x, y) non-empty} ∈ C}

If A, B are canonical closed monics (defined from A, B ⊆ Γ(X, =)), then A ∧ B is the canonical closed monic defined from A ∩ B. If B is a canonical closed monic (defined from B ⊆ Γ(X, =)), then A → B is the canonical closed monic defined from ΓA → B = {[x] | if [x] ∈ ΓA then [x] ∈ B}, and ∀[G].B is the canonical closed monic defined from

∀Γ([G]).B = {[y] | if G(x, y) non-empty then [x] ∈ B}.

Proof. (5.1) tells us that the relevant subobjects are closed and that we get a representation by applying Γ, doing the required construction in Sets, and taking the corresponding canonical closed monic. Remark. The constructions described in 6.5 are particularly simple in case the objects (X, =) and (Y, =) are canonically separated. Finally we consider the meaning of (5.1)(g) for the effective topos. It gives a converse to the obvious remark that if (X, =) is canonically separated, then the equality (or diagonal) in (X, =) × (X, =) is the canonical closed monic defined by the diagonal in X × X.

17 Proposition 6.6. Suppose that ∼ ∈ ΣX×X represents a closed equivalence relation on (X, =) in Eff . Then the quotient (X, ∼) is isomorphic (in the obvious way) to the canonically separated object (Γ(X, ∼), ≈) where

S 0 0 0 0 [x] ≈ [x1] = { x ∼ x1 | x ∈ [x] and x1 ∈ [x1]}. J K J K Proof. The composite (X, =) −→ (X, ∼) −→ ∆Γ(X, ∼) is represented by [∼] η(X,∼)

S 0 0 H(x, [x1]) = { x ∼ x1 | x1 ∈ [x1]} J K By (5.1)(g) we require the image factorization of [H], and what we have is a standard definition of this factorization in the logic.

§7 The effective objects

Since Sets is included in Eff , Eff contains classical mathematics so much of it is not particularly “effective”. In this section we consider objects whose close relation to the applicative structure (N, ·) ensures that operations on them are genuinely “effective”. In later sections we will show that the objects of analysis in Eff are (quite familiar) objects of this kind.

Definition. An object (X, =) is (strictly) effective iff (i) x ∈ X is non-empty each x ∈ X, J K (ii) x ∈ X ∩ x0 ∈ X non-empty implies x = x0, and J K J K (iii) x = x0 = x ∈ X ∩ x0 ∈ X . J K J K J K (Occasionally we may describe an object as effective when it is isomorphic to one of the above form. It will be obvious when this loose sense is meant.) Clearly effective objects are (canonically) separated, and we can easily show that they share the closure properties of separated objects.

Proposition 7.1. (a) If (X, =) and (Y, =) are effective, then so is their product. (b) If (Z, =) is effective, then so is the function space (Z, =)(Y,=) for any (Y, =) in Eff .

(c) A subobject of an effective object is effective. (d) A quotient of an effective object by a closed equivalence relation is effective. Proof. (a) is trivial; look at (6.2).

18 (b) follows by inspection of (6.3). If we restrict to those α ∈ ΓZΓY with Eα non-empty, then we get an object satisfying (i),(ii) and (iii) above. (c) requires more work. Let (X, =) be strictly effective and let (X, =0) → (X, =) be a canonical monic with x =0 x0 = R(x) ∧ x = x0 for some strict relational R ∈ ΣX . Write x ∈J 0 X for Kx =0 x and putJ K X0 = {x ∈ X | x ∈0 X is non-empty}. Since x ∈0 X ∩ x0 ∈0 X non- empty implies xJ∈ X ∩K x0 ∈ X non-empty whichJ impliesK xJ = x0, weK get a strictly effectiveJ objectK (JX0, =) withK x ∈ X0 = x ∈0 X . It is isomorphic to (X, =0) because J K J K T(( x ∈ X0 ∩ x0 ∈ X0 ) ↔ x =0 x0 ) J K J K J K is non-empty. (d) follows from (6.6). If ∼ is a closed equivalence relation on (X, =) which is strictly effective, then x ∼ x ∩ x0 ∼ x0 non-empty implies x ∈ X ∩ x0 ∈ X Jnon-emptyK J whichK implies x = x0. It follows that (Γ(J X, =)K, ≈)J is strictlyK effective. The full subcategory of Eff whose objects are the effective ones has a concrete representation familiar to logicians in connection with the effective operations. Take partial equivalence relations on N (that is equivalence relations on their fields) R, S, . . . and write N/R = {[n]R | n ∈ Field(R)} for the set of equivalence classes of R. Let a map F : R → S be a map F : N/R → N/S such that there is f ∈ N with F ([n]R) = [f(n)]S for all n ∈ Field(R). Clearly we have a category. Each partial equivalence relation R gives rise to a strictly effective object (N/R, =) of Eff where E([n]R) = [n]R. A map F : R → S gives rise to a map (N/R, =) → (N/S, =) represented by S F ([n]R, [m]S) = {[n]R ∧ [m]S | F ([n]R) = [m]S}, and so we have a functor into Eff which is clearly faithful and is full by applying global sections to (7.1)(b). Clearly any strictly effective object is isomorphic to one obtained from a partial equivalence relation. Let us describe the function space SR in the category of partial equivalence relations. It is given by eSRf iff nRm implies e(n)Sf(m). A moment’s thought shows that this corresponds to the prescription for finding the spaces of functions from (N/R, =) to (N/S, =) given by (7.1)(b). This is a useful way to think of the material in §§10 and 11. (In fact the embedding of the partial equivalence relations in Eff preserves the local cartesian closed structure of the former category.) One particular effective object is crying out for attention: that corresponding to the equality relation on N. This is the object N = (N, =) where n = m = {n} ∩ {m} J K

19 As we noted in §3, this is the natural number object; we consider some of its properties in later sections. First however, we will use it to give a character- ization of effective objects. Recall that any object (X, =) is a quotient of a subobject of ∆X. For effective objects we can replace ∆X by (N, =). Proposition 7.2. Every effective object is a quotient by a closed equivalence relation of a closed subobject of (N, =). Proof. If (X, =) corresponds as above to the partial equivalence relation R on N, then the closed subobject of (N, =) is that determined by Fld(R) ⊆ N and the closed equivalence relation ∼ is given by

 {hn, mi} , if nRm, n ∼ m = S{hn, mi | nRm} = J K ⊥, otherwise

That the resulting quotient of a subobject of (N, =) gives rise to the same R is immediate in view of (6.4) and (6.6). Now we can state our characterization theorem. Theorem 7.3. The following conditions on a object X of Eff are equivalent: (i) X is isomorphic to a strictly effective object;

(ii) X is a closed quotient of a closed subobject of (N, =); (iii) X is a closed quotient of a subobject of (N, =). Proof. (i) implies (ii) is (7.2), (ii) implies (iii) is trivial and (ii) implies (i) follows from (7.1)(c) and (d).

Remark. Since (N, =) is the natural number object, we have shown that the effective objects are those subnumerable in a certain way. However the equality on an effective object must be closed (as it is a separated object) and there are quotients of (N, =) by equivalence relations which are emphatically not closed. (The reader will know where to look after reading the next section!) So the effective objects are a proper subclass of the quotients of decidable objects recently studied by Peter Johnstone in a general context.

§8 Markov’s principle and almost negative formulae

In this section we see how the general result of (5.2) can be extended in the case of the topos Eff and (double negation) topology j with Eff j = Sets. Lemma 8.1. ∆ : Sets → Eff preserves the initial object. Thus ⊥ is always a closed subobject, and hence decidable objects are closed. J K Proof. Trivial category theory.

20 Lemma 8.2. Markov’s principle

∀R ∈ P(N).(∀n.R(n) ∨ ¬R(n)) ∧ ¬¬∃n.R(n) → ∃nR(n) holds in Eff . Proof. As the arithmetical statements holding in Eff are those realized in the original sense of Kleene (see §3) this is the standard argument (Troelstra[1973]). Note that we do not need to know about P(N):

Lemma 8.3. If R  N × X is a decidable subobject in Eff , then ∃n.R(n, x)  X is closed and Γ(∃n.R(n, x)) = ∃n.Γ(R(n, x)). Proof. This amounts to ¬¬∃n.R(n, x) ≤ ∃n.R(n, x) which follows by (8.2). Remark. Though (8.2) depends on Markov’s principle in Sets, and so does not relativize to an arbitrary topos, (8.3) does relativize: we will always have j(∃n.R(n, x)) ≤ ∃n.R(n, x). (8.1) and (8.3) suggest that we extend the class of negative formulae. Definition. A formula is called almost negative iff it is built up from atomic formulae using ∧, →, ∀, ⊥, and sequences of ∃n applied to decidable formulae (typically equations between numerical-valued terms). We now give our extension of (5.2). Theorem 8.4. If the atomic formulae of a first order language are interpreted as closed subobjects in Eff and φ is almost negative with φ  E, then J K ∗ ηE( φ j) = φ J K J K Proof. As for (5.2) using (8.1) and (8.3) as well. The force of (8.4) is that, for φ almost negative φ is true in Eff iff the corresponding interpretation of φ in Sets is true: that is, the meaning of φ in Eff “agrees with” its classical meaning. (8.4) is a version of 3.2.11(i) and (ii) of Troelstra[1973]; we could obtain a more proof-theoretic version by relativizing to the free topos (with natural number object). For a language which can “express its own realizability” we could obviously obtain versions of 3.2.12 and 3.2.13 of Troelstra[1973]. For the sake of completeness we give a version of 3.6.5 of Troelstra[1973]. Definition. (cf. Hyland[1977]) PR(a.n) is the least class C of formulae such that (i) C contains all atomic formulae; (ii) C is closed under ∧,∨,∀,∃; (iii) if φ is almost negative (more generally almost negative preceded by exis- tential quantifiers) and ψ is in C, then (φ → ψ) is in C.

21 Proposition 8.5. In the situation of (8.4), if φ is in PR(a.n) with φ  E, then J K ∗ φ ≤ ηE( φ j). J K J K Proof. By induction on the complexity of φ. (Note that ∨ and ∃ are calculated differently in Ej from the way they are in E).

∗ Remark. For a general sheaf subtopos Ej of E we have φ ≤ ηE( φ j) for all φ in PR(j-closed). So if atomics are interpreted as j-closed,J thenK weJ getK the result for all φ in PR(negative). The force of (8.5) is that, for φ in PR(a.n), if φ is true in Eff , then the corresponding interpretation of φ in Sets is true. This gives rise to a conservative extension result (when relativized) as in Troelstra[1973] §3.6.

§9 Choice principles and the real numbers

In this section we make a start towards showing that analysis in Eff is just constructive recursive analysis. (We already have Markov’s principle (8.2).) We do this in two steps. First we show that we have the choice principles to ensure that the Dedekind reals (the right reals in a topos) are Cauchy (see Fourman-Hyland[1979] and also Fourman-Grayson this volume). Then we use the results of §7 to show that the Cauchy reals in Eff can be identified with a familiar strictly effective object used in constructive recursive analysis. First we need to know what the space of functions from N to an arbitrary (X, =) looks like in Eff . As stated in HJP[1980], by logical considerations it is

(ΣN×X , =) where T G = H = EG ∧ {G(n, x) ↔ H(n, x) | n ∈ N, x ∈ X}, J K with EG the non-standard value of “G is a functional relation”. Suppose now that e realizes ∀n ∈ N, ∃x ∈ (X, =).φ(n, x). Then for every S n, e(n) ∈ {Ex ∧ φ(n, x) | x ∈ X}. For each n pick xn such that e(n) ∈ Exn ∧ φ(n, xn) . SetJ G(n,K x) = En ∧ x = xn . Now (uniformly in e) we can find numbersJ realizingK EG and ∀n.∃x.G(Jn, x)∧φK(n, x): G is relational, strict and singlevalued in a standard way from its definition; λn. hn, π1(e(n))i realizes G is total; λn. hπ1(e(n)), hhn, π1(e, n)i , π2(e, n)ii realizes ∀n.∃x.G(n, x) ∧ φ(n, x). Thus (uniformly in e) we have a number realizing

∃g : N → (X, =).∀n.φ(n, g(n)) and so we have proved the following result.

Proposition 9.1. AC(N,X), the from the natural numbers to an arbitrary type X, holds in Eff .

22 Remark. We used AC(N,X) in Sets in the above proof. But if (X, =) is effective, then no use of a choice principle in the base topos is needed (compare (7.1)(b)): in this case the argument is contained with Troelstra[1973] 3.2.15. By a similar proof (left to the reader) we also have the stronger result. Proposition 9.2. DC(X), the axiom of dependent choices on an arbitrary type X, holds in Eff . Remark. Again DC(X) is used in the proof, but is not needed for effective objects X. AC(N, N) is enough to show that the Cauchy and Dedekind reals are the same. To get an explicit representation of R as a strictly effective object, we use the Cauchy sequence definition.

Lemma 9.3. The integers Z and rationals Q in Eff can be taken as strictly effective objects (Z, =) and (Q, =) where for x in Z or Q, Ex = {#x} where #x is an elementary code for x.

Proof. They are obtained successively from (N, =) by taking closed (decidable) quotients of closed (decidable) subobjects of products: so the result follows from the prescriptions involved in (7.1)(a), (c) [easy case of closed subobjects] and (d).

Lemma 9.4. The space of maps from N to Q in Eff is the strictly effective object (QN, =) where

QN = the recursive functions from N to Q and α ∈ QN = {e | e(n) = #a(n)}, the set of indices for α. J K Proof. This is the prescription implicit in (7.1)(b).

Since we have enough choice to show that any reasonable notions of Cauchy sequence give the same reals in Eff we define CS, the collection of (restricted) Cauchy sequences by

N 1 CS = {r ∈ Q | ∀n, p.|rn − rn+p| < 2 n} This definition is in the negative fragment and so since < is decidable on the rationals and hence by (8.1) closed, defines a closed subobject of QN in Eff . In view of (8.4) we can identify it. Lemma 9.5. The space of Cauchy sequences in Eff is the strictly effective object (CS, =) where CS is the set of recursive Cauchy sequences and r ∈ CS is the set of indices for r. J K Proof. By the discussion above.

To obtain the reals R, we take the quotient of CS by the equivalence relation

23 1 r ∼ s iff ∀n.|rn − sn| < 2n−3 (This choice of definition gives one plenty of “elbow room”.)

Proposition 9.6. The space R of reals in Eff is the strictly effective object (R, =) where R = the recursive reals (that is reals with recursive Cauchy sequences converging to them) and x ∈ R = the set of indices for Cauchy sequences converging to x. J K Proof. As before ∼ defines a closed equivalence relation so this is by the pre- scription of (7.1)(d). We have shown that the reals in Eff are represented just as they are in (con- structive) recursive analysis. Of course, as they too are defined in the negative fragment, the operations of addition, multiplication and so forth are what they should be. To do serious analysis however we need to consider functions which we do in the next few sections. Remark. It is seldom efficient to grind things out in models for constructive analysis: where possible one should use the axiomatic point of view. Consider for example the question of the fundamental theorem of algebra in Eff . This theorem is proved in Bishop[1967]. One way of reading Bishop’s constructive mathematics (though not the intended one!) is to regard it as formalized in an intuitionistic with extensional equality and using (DC). Hence in view of (9.2) the fundamental theorem of algebra is true in Eff (as it is in other realizability toposes). In view of the obvious representation of C in Eff derived from (9.6), and the fact that

n n−1 “α1, . . . , αn are the roots of z + an−1z + ··· + a0 = 0” defines a closed subobject (in C2n) we can interpret this fact as follows. There is an effective process taking indices for the recursive complex coefficients of a monic polynomial of degree n over the recursive complex numbers to indices for the recursive roots. It is not trivial that a recursive polynomial has recursive roots and any natural proof would seem to establish the stronger result and as such would have the form of an abstract proof using (DC).

§10 Effectivity and Church’s Thesis

It is time to give substance to the claim made in §7 that operations on effective objects are “effective”. We first consider the special case of Church’s Thesis.

Lemma 10.1. The space of maps from N to N in Eff is the strictly effective object (NN, =) where NN = the recursive functions from N to N and α ∈ NN = {e | e(n) = α(n)}, the set of indices for α. J K

24 Proof. This is the prescription implicit in (7.1)(b). Proposition 10.2. “Church’s Thesis” that all functions are recursive,

∀α ∈ NN.∃e.∀n.∃y(T (e, n, y) ∧ U(y) = α(n)) holds in Eff . [T is Kleene’s T -predicate and U his output function.] Proof. In view of (3.3) elementary recursion theory can be developed in Eff as in Troelstra[1973]. So by (8.4) ∀n.∃y.(T (e, n, y) ∧ U(y) = α(n)) in Eff agrees with its meaning in Sets. Then λe. he, he, eii realizes “Church’s Thesis”. Remark. Church’s Thesis as traditionally formulated in Heyting’s Arithmetic (see Troelstra[1973]) is an amalgam of our “Church’s Thesis” and AC( N, N). We can hope to generalize (10.2) to all effective objects in view of (7.3) which states that they can in a certain way be subnumerated (by the codes for their elements). Lemma 10.3. If (Z, =) is strictly effective and (Y, =) is arbitrary in Eff , then the space of maps from (Y, =) to (Z, =) in Eff is the strictly effective object (ZΓY , =) where ZΓY = the “recursive” maps from ΓY to Z (that is, the maps with indices), and α ∈ ZΓY = {e | e(n) ∈ Eα(y) for all n ∈ Ey}, the set of indices for α.

Proof. This is the prescription implicit in (7.1)(b).

Here then is a generalization of (10.2).

Proposition 10.4. Let (Y, =) ← B  N represent the effective object (Y, =) SY as a quotient of a closed subobject of N, and let (X, =) ← A  N represent SX (X, =) as a quotient of a closed subobject of N. Then a “generalized Church’s Thesis”

X ∀α ∈ Y .∃e.∀a ∈ A.∃z(T (e, a, a) ∧ α(SX (a)) = SY (U(z))) holds in Eff . (One can usefully compare this result with the treatment of the extended Church’s Thesis in Troelstra[1973].)

Proof. The conditions given ensure that α(SX (a)) = SY (U(z)) interprets as a closed subobject. (Note that U(y) ∈ B is implicit, so we need B closed.) Since

∃z(T (e, a, z) ∧ α(SX (a)) = SY (U(z))) is equivalent to

∃z.T (e, a, z) ∧ ∀z.(T (e, a, z) → α(SX (a)) = SY (U(z)),

25 it also interprets as a closed subobject. It remains to determine e from an index for α. The total condition for SX gives a map taking any a ∈ A to an element of ESX (a); an index for α maps this to EαSX (a); the condition that SY is onto provides a map from this to some b ∈ B with SY (b) = αSX (a). e is an index for this composite which can clearly be chosen effectively in the index for α.

In particular, we can see that when effective objects are presented (via partial equivalence relations) as closed quotients of closed subobjects of N, then maps between them are effective in the indices (and this holds in Eff ). This is typically the situation in constructive recursive analysis.

§11 The effective operations

In this section we use (10.4) as the induction step to show that the statement that the finite types over N are the hereditarily (extensional) effective operations holds in Eff . Assume for notational purposes a collection of type symbols generated from O by × (for products) and → (for function spaces). The finite types over the natural numbers (Nσ | σ a type symbol) are defined inductively by

NO = N Nσ×τ = Nσ × Nτ , σ Nσ→τ = (Nτ )N

The hereditarily effective operations (HEOσ | σ a type symbol) (see Kreisel [1959] and Troelstra[1973]) may be defined by first defining a collection (Rσ | σ a type symbol) of partial equivalence relations inductively by

nROm iff n = m, nRσ×τ m iff π1(n)Rσπ1(m) and π2(n)Rτ π2(m), eRσ→τ f iff if nRσm then e(n), f(m) are defined and e(n)Rτ f(m).

We can then regard HEOσ as the equivalence classes N/Rσ. In view of the discussion in §7, we can equally regard HEOσ as built up (together with indices for its elements) from the natural number object in Eff , by taking the usual products and function spaces as in (10.3). Thus in Eff Nσ = (HEOσ, =) where Ex = the indices for x and where nRσm iff n, m are indices for the same x ∈ HEOσ. Then we can regard HEOσ as the global sections of the finite types over N in Eff . These definitions all relativize and our next result states that Eff “knows that its finite types are the effective operations”.

Theorem 11.1. For each σ, Nσ = HEOσ holds in Eff , in such a way that the products and function spaces correspond.

26 Proof. The Rσ’s are defined by negative formulae, and so by (8.4) interpret in Eff as closed partial equivalence relations agreeing with their meaning in Sets. If we calculate the equivalence classes in the obvious way using (7.1)(d) we just get (HEOσ, =) that is Nσ in Eff . Clearly the rest of the structure corresponds as it ought. (If this is too abstract, the reader can use a laborious induction, with (10.4) dealing with the main induction step.) Remark. Something quite deep is going on behind (11.1) which is connected with iterations of the effective topos construction as studied in Pitts[1981]. It is in connection with the effective objects that we can get a general expression of the idempotency of realizability (see Troelstra[1973] 3.2.16).

§12 Sequential continuity

From (8.2),(9.2),(10.4) and discussion in §9, it should be clear that analysis in Eff is just constructive recursive analysis. So we have the usual continuity results which are versions of the Kreisel-Lacombe-Shoenfield theorem.

Theorem 12.1. “Brouwer’s Theorem” that every map from R to R is contin- uous holds in Eff . Proof. The reader will have to do this himself (along the lines of (12.4) below) or else find (as I have failed to do) a readable account from the Russian school.

(12.1) is only moderately spectacular. Recursive maps on the recursive reals, while not the restriction of continuous functions on the (classical) reals (see (13.4)), are continuous on their domain. (This is stated as Exercise 15.35 in Rogers[1967].) So we just need effectivity to get (12.1). By passing to higher types we get a more interesting phenomenon: we get effective maps, which are not continuous on their effective domain, but which are still continuous from the point of view of Eff . We consider the hereditarily effective operations. By (11.1), in Eff these are just the finite types. (The reader will see that much of the material can be developed for an arbitrary “type structure” over N.) We define a notion of sequence convergence on each HEOσ inductively as follows:

on HEOO = N, xn → x iff ∃k, ∀n ≥ k.xn = x; on HEOσ×τ = HEOσ × HEOτ ,(xn, yn) → (x, y) iff xn → x and yn → y; HEOσ on HEOσ→τ = (HEOτ ) , fn → f iff xn → x implies fn(xn) → f(x).

We say that a function f ∈ HEOσ→τ is continuous iff f preserves sequence convergence. Remark. The meaning of these definitions in Eff does not agree with the mean- ing in Sets.

27 Let us initially restrict attention to the hereditarily effective operations of pure type (HEOk | k a pure type symbol) where each k + 1 denotes (k → O). For fn, f in HEOk+1, we say that µ ∈ HEOk+1 is a modulus for fn → f iff

∀x ∈ HEOk.∀n ≥ µ(x).fn(x) = f(x)

(We do not assume here that fn → f in HEOk+1: this is false in Sets, though true in Eff .)

Lemma 12.2. (In Eff .) Assume functions in HEOk+1 are continuous. If µ is a modulus for fn → f in HEOk+1, then fn → f.

Proof. Let xn → x. Since µ is continuous, there is a k such that for all n ≥ k, 0 00 0 µ(xn) = µ(x) = k say. As f is continuous there is k such that for all n ≥ k , 0 00 f(xn) = f(x). Then for all n ≥ max(k, k , k ),

fn(xn) = f(xn) = f(x).

Remark. This argument is entirely elementary and has useful application to a variety of type structures in a variety of toposes.

Lemma 12.3. (In Eff .) Assume all functions in HEOk are continuous. If fn → f in HEOk+1, then there is a modulus µ for fn → f.

Proof. The sequence with constant value x converges to x in HEOk, so we can deduce fn(x) → f(x), that is

∀x.∃k.∀m ≥ k.fm(x) = f(x).

By basic arithmetic choose k minimal for each x. This gives us a function µ : HEOk → N which by (11.1) or (10.4) is in HEOk+1. Remark. This argument depends on effectivity in Eff . Again there are many useful versions of it.

Lemma 12.4. (In Eff .) If µ is a modulus for fn → f in HEOk+1 and F ∈ HEOk+2, then there is an r such that

∀n ≥ r.F (fn) = F (f).

Proof. From indices bn, m, b, c for fn, µ, f, F respectively we wish to find an r such that ∀n ≥ r.F (fn) = F (f). Following Gandy, use the second recursion theorem to define an index b0 by,

 b(a) if m(a) < least y. y shows c(b) = c(b0) [= y say], b0(a) = 0 bn(a) for n least ≥ y0 with c(bn) 6= c(b), otherwise.

0 0 [y shows c(b) = c(b ) iff T (c, b, π1(y)) ∧ T (c, b , π2(y)) ∧ U(π1(y)) = U(π2(y)).] We see easily that y0 exists and that ∀n ≥ y0.c(bn) = c(b) (using Markov’s principle). Thus y0 is clearly what we want.

28 Remark. This essentially is Gandy’s proof of the Kreisel-Lacombe-Shoenfield theorem. Since both ∀n ≥ k.F (fn) = F (f) and µ is a modulus for fn → f are interpreted as closed subobjects in Eff , it makes no difference whether we do (12.4) externally in Sets or internally in Eff . Theorem 12.5.

(i) In Eff it holds for all pure types r + 1 that fn → f in HEOr+1 iff there is a modulus µ for fn → f in HEOr+1, and that all members of HEOr+1 are continuous.

(ii) In Eff it holds for any types σ, τ, that all members of HEOσ→τ are con- tinuous. Proof. (i) follows by induction using (12.2), (12.3) and (12.4). (ii) follows by extension using cartesian closedness of the hereditarily effective operations and of the continuous functionals (in the sequential version, see Hyland[1979]). The reader should compare (12.5) with the example of Gandy (see Gandy- Hyland[1977]) of a type 3 effective operation not continuous on the type 2 effective operations. Continuity has a quite different meaning internally in Eff . Remark. The finite types over N in Eff coincide not only with the hereditarily effective operations in Eff , but also with the sequentially continuous functionals in Eff . The use of the modulus was introduced originally in the context of recursion theory on the (sequentially) continuous functionals by Stan Wainer.

§13 Failure of compactness

As is well known, there are decidable R of 2

(i) any recursive α ∈ 2N extends some u ∈ R,

(ii) there are α ∈ 2N which extend no u ∈ R (so that no finite S ⊆ R will satisfy (i)). This has an immediate consequence for Eff .

Proposition 13.1. In Eff there is a decidable subobject R of 2N such that (i) any α extends some u ∈ R,

(ii) for any k, there is an α which extends no u ∈ R of length ≤ k.

Thus in Eff there is a decidable cover of 2N, Cantor space, by basic clopen sets, with no finite subcover.

29 Proof. EITHER (i) and (ii) are almost negative and hold in Sets of the recursive reals, OR immediate from Church’s Thesis.

Corollary 13.2. In Eff there is a continuous but unbounded function F : 2N → N. Proof. Set F (α) = least length of u ∈ R with α extending u. (13.1) shows that the Fan Theorem fails as badly as possible in Eff . This is why we get (13.2). There are Grothendieck toposes in which (13.1) holds without the stipulation that R is decidable. In the known examples, all continuous functions from 2N to N are uniformly continuous and so bounded. It is not know whether there are Grothendieck toposes in which (13.1) holds. The traditional way to obtain results analogous to (13.1) and (13.2) for the reals is to use “singular coverings” as studied in Zaslavski˘ı-Ce˘ıtin[1962]. (Of course one can set up (13.1) and (13.2) in an analogous fashion.)

Proposition 13.3. In Eff , there is a sequence of rational intervals covering R, but of arbitrarily small measure. Proof. Essentially a diagonal enumeration, see Zaslavski˘ı-Ce˘ıtin[1962]. The proof is also sketched in Rogers[1967] Exercises 15.36, without considerations of effectivity. But the conditions, to be satisfied by the sequence of rational intervals, can be expressed as almost negative formulae, so by (8.4) this does not matter.

Corollary 13.4. If Eff there is a continuous function R to R which is un- bounded on some closed bounded interval, and so in particular is not uniformly continuous on some closed bounded interval. Proof. Same references as for (13.3).

Remark. The results of this section can all be regarded as proved internally in Eff , that is, they follow from the effectivity we established in §10. Though we know Grothendieck toposes in which R fails to be locally compact (Fourman-Hyland[1979]), in all known examples, the typical consequences of local compactness for analysis still hold. Certainly continuous functions on bounded closed intervals are uniformly continuous. So the effective topos opens up possibilities unknown amongst Grothendieck toposes. Further examples can be found in Zaslavski˘ı-Ce˘ıtin[1962].

§14 Quotients of classical objects, and power objects

It is a familiar feature of intuitionistic mathematics that collections of sets (spec- ifies) can appear far more amorphous than collections of functions. We have

30 seen in Eff that the object of functions between “well-behaved” objects is itself “well-behaved” ((16.3) and (7.1)(b)). We have seen this good behaviour in other contexts (Moschovakis[1973], Scott[1970], are the early references), and it can be made the basis for nice proof-theoretic results. However, when the subobject classifier is itself complicated, the power set of however simple a (to some extent inhabited) object will be complex. It is time to look at such objects in Eff . As we mentioned in §3, the subobject classifier Ω in Eff can be taken as (Σ, ↔) where ↔ is the realizability bi-implication on Σ = P(N). We may and so do think of the members of Σ as existing “globally”. Clearly then (Σ, ↔) is a quotient of ∆Σ. This will mean that we can obtain maps to Ω in Eff from suitable maps to Σ in Sets. Lemma 14.1. Suppose ∆Y → (Y, =) is a surjection. Then a map f : X → Y induces a map f :(X, =) → (Y, =) in Eff such that

EX ∆(X) ∆(Y ) ∆(f)

(X, =) (Y, =) commutes f iff x = x0 → f(x) = f(x0) is valid. (That is, iff f preserves the equality relation.) Under these circumstances f is represented by the functional relation Ex ∧ f(x) = y . J K Proof. By a routine use of logic. In the case of the surjection ∆Σ → Ω, every map arises as in (14.1). Proposition 14.2. Any map from (X, =) to Ω = (Σ, ↔) in Eff is f as defined in (14.1) for an f : X → Σ such that both (i) x = x0 → (f(x) ↔ f(x0)) and (ii) f(x) → Ex are valid. Remark. Given f : X → Σ with (i) valid, one can easily define g : X → Σ with both (i) and (ii) valid, and such that f = g. Set g(x) = Ex ∧ f(x). Proof. Since maps from (X, =) to Ω are in bijective correspondence with maps 1 → P(X, =), (14.2) is immediate from the description of the power set in (2.12) of HJP[1980]. A reader who finds that proof unpalatable, can take a representative G(x, p) for a map (X, =) to Ω, set f(x) = ∀q.(∀p(G(x, p) ∧ p → q) → q) , and check that G(x, p) ↔ Ex ∧ (f(x) ↔ p) is valid:J since (i) is valid for f, theK remark above applies to give (ii) for g(x) = Ex ∧ f(x). (Suitably relativized, this is a proof of (2.12) of HJP[1980].) From (14.2) we see that if (X, =) is separated then any map (X, =) → Ω factors through q : ∆Σ → Ω. Our next result gives this within Eff .

31 Proposition 14.3. The map q(X,=) : ∆Σ(X,=) → Ω(X,=) is a surjection for any separated (X, =) in Eff . Proof. From (6.3) we see that ∆Σ(X,=) is (isomorphic to) ∆(ΣΓX ). Then q(X,=) : ∆(ΣΓX ) → P((X, =)) is represented by

H(f, R) = ER ∧ T{R(x) ↔ Ex ∧ f([x]) | x ∈ X}.

But we can take ΓX ⊆ X (assuming (X, =) canonically separated) and so by setting f to be the restriction of R to ΓX, we see at once that

ER → ∃f.H(f, R) is valid, so that [H] is surjective.

§15 The Uniformity Principle

First a general uniformity principle for Eff .

Proposition 15.1. Let ∆X → (X, =) be a surjection and let (Y, =) be an effective object. Then

∀φ[∀x ∈ (X, =).∃y ∈ (Y, =).φ(x, y) → ∃y ∈ (Y, =).∀x ∈ (X, =).φ(x, y)] holds in Eff . Proof. Take (Y, =) strict effective and consider first the case when (X, =) is ∆X. Let e ∈ ∀x.∃y.φ(x, y) . Then 0 ∈ Ex each x ∈ X, so b = π1(e(0)) ∈ Ey for some y ∈ JY , unique asK (Y, =) is strict effective; and c = π2(e(0)) is in φ(x, y) . But then if d = λn.c, we find that λe. hb, di realizes the formula in Jsquare brackets.K (There is no dependence on Eφ.) The result for a quotient of ∆X is an immediate consequence of the special case. We have an immediate corollary. Corollary 15.2. The “Uniformity Principle”

∀φ[∀X ∈ P(N).∃n ∈ N.φ(X, n) → ∃n ∈ N.∀X ∈ P(N).φ(X, n)] holds in Eff .

Proof. N is an effective object and by (14.3) P(N) is quotient of ∆(ΣN). The uniformity principle is an extreme form of choice principle: the choice function is constant because the domain is amorphous while the range is well- behaved. Conditions on both the range and the domain are necessary. Obviously there are non-constant functions from N to N. As regards conditions on the range, the reader may like to show that the quotient map from ∆Σ to Ω does not split.

32 §16 j-operators: forcing 2 → ∆2 to be iso

In a topos, j-operators are maps j :Ω → Ω satisfying p ≤ j(p) p → q ≤ j(p) → j(q) j(p ∧ q) = j(p) ∧ j(q) or equivalently > ≤ j(>) j(j(p)) = j(p) j(j(p)) ≤ j(p)

Of course there is also an internal object of j-operators, a subobject of ΩΩ which we can describe in Eff as follows. Proposition 16.1.

(i) The object ΩΩ in Eff can be taken as (ΣΣ, =) where

f = g = ∀p.f(p) ↔ g(p) J K J K (ii) The object of j-operators in Eff is the subobject of (ΣΣ, =) represented by the canonical monic defined by either of the above ways of giving the notion of j-operator. Alternatively it is (J, =) where J is the set of j-operators and where j = k = Ej ∧ ∀p.j(p) ↔ k(p) J K J K with Ej = j is a j-operator . J K Proof. (i) follows from (14.2) in the matter of (14.3) and (ii) is then immediate.

Remark. As explained in Johnstone[1977] j-operators correspond to topologies and so to subtoposes. It is known that the lattice of j-operators under point- wise ≤ is a complete (internally). The reader should refer to Fourman-Scott[1979] for an explicit constructive treatment. It is perhaps worth commenting further on the order relation. We have

j ≤ k = Ej ∧ Ek ∧ ∀p.j(p) → k(p) J K J K defining the appropriate subobject in Eff . If were are looking at external j- operators, then j ≤ k iff ∀p.j(p) → k(p) is valid. Finally note that if j(⊥) is non-empty then j is the degenerate topology which collapses the topos. Let us look again at the double negation topology. (We do not bother with a constructive version.)

 >, if p non-empty, (¬¬)p = S{> | p is non-empty} = ⊥, otherwise

Clearly then we have the following lemma.

33 Lemma 16.2. For any j, (¬¬) ≤ j iff T{j(p) | p nonempty} is non-empty. Proof. Trivial. We now consider how to force monics to be iso. Let a subobject of (X, =) be given by a canonical monic A and define a map Ω to Ω by

φA(p) = ∃x ∈ (X, =).A(x) → p . J K Clearly if j forces A  (X, =) to be iso, then

φA(j(p)) → j(p) is valid. This gives us a way to describe the least j-operator forcing A  (X, =) to be iso.

Proposition 16.3. In the above situation, jA, the least j-operator forcing A  (X, =) to be iso, is

jA(p) = ∀q.((φA(q) → q) ∧ (p → q) → q) . J K Proof. Obvious, as in the logic this says V jA(p) = {q | φAq ≤ q ∧ p ≤ q} V where is taken internally in Ω. It is easy to check that (as (p → q) ≤ (φA(p) → φA(q)) is valid) jA is a j-operator.

We now show that forcing 2  ∆2 to be iso collapses Eff to Sets. Proposition 16.4. The least j-operator forcing 2  ∆2 to be iso is (¬¬). Proof. Let j be the least j-operator forcing 2  ∆2, obtained as in (16.3) from φ :Ω → Ω. Here φ(p) = {0}→p ∪ {1}→p = {e | e(0) ∈ p or e(1) ∈ p}}. Clearly it suffices to show (¬¬) ≤ j, that is by (16.2) T{j(p) | p non-empty} is T non-empty. In fact it is enough to show that {j({n}) | n ∈ N} is non-empty: for if a is in T ∀p, q.(p → q) → (j(p) → j(q)) and x is in {j({n}) | n ∈ N}, then (a(λn.n))x is in T{j(p) | p non-empty}. Now take b in ∀p.p → j(p) , c J K in ∀p.j(j(p)) → j(p) , and take as 2  ∆2 is j-dense d in j({0}) ∩ j({1}). NoteJ that e = λx.c((axK )d) is in ∀p.φ(j(p)) → j(p) . Define using the second recursion theorem an index f byJ K (fk)(0) = b(k) 1 (fk)(1) = U(least y.T (e, S1 (f, k + 1), y)). Now by a standard kind of argument, we can show that 1 S1 (f, k)(0) = (fk)(0) = b(k) ∈ j({k}) 1 1 and S1 (f, k)(1) = (fk)(1) = e(S1 (f, k + 1)) 1 are all defined, and then we see that S1 (f, 0) is in φ(j({n})) for all n and so 1 T e(S1 (f, 0)) is in {j({n}) | n ∈ N} as required.

34 §17 j-operators and decidability

(16.4) appears to restrict the j-operators in Eff , but in fact we can show that they have a rich structure. Apparently it was Powell who first realized that there is a connection between notions of degree and the forcing of decidability in recursive realizability. We content ourselves with a precise statement and a sketch of a proof. First we give a lemma of Andy Pitts which simplifies the presentation of the proof.

Lemma 17.1. In the situation of (16.3) jA can alternatively be defined by ∗ T φA(p) = {q ⊆ N | p ∧ {∗} ⊆ q and φA(q) ⊆ q}, where ∗ is an index for the empty partial function, so long as Ex non-empty implies A(x) non-empty. Proof. Let us drop the subscript A. Note that φ preserves inclusion. Hence because p → (p ∧ {∗}) ≤ φ(p) → φ(p ∧ {∗}) is valid, we can deduce that φ(p) ≤ φ∗(p) is valid. Also we have

φ(φ∗(p)) ⊆ T{φ(q) | p ∧ {∗} ⊆ q and φ(q) ⊆ q} ⊆ T{q | ∧{∗} ⊆ q and φ(q) ⊆ q} = φ∗(p), so that φ(φ∗(p)) ≤ φ∗(p) is valid, rather trivially. Thus by the definition of j in (16.3) we have j ≤ φ∗ in Eff , and it remains to show that φ∗ ≤ j. We can take a ∈ ∀p.p → j(p) and since φ(j(p)) ≤ j(p) in Eff , we can take b ∈ ∀x ∈ (X, =).(A(Jx) → j(p)) →K j(p) . Now define an index e by the second recursionJ theorem as follows. K  a(n), if x = hn, ∗i e(x) = b(m)(λy.e(z(y))), if x = hm, zi , z 6= ∗.

Consider for any p, the set S(p) = {x | e(x) ∈ j(p)}. We see easily that (i) p ∧ {∗} ⊆ S(p), and (ii) φ(S(p)) ⊆ S(p), so we can deduce that φ∗(p) ⊆ S(p). Thus clearly e realizes ∀p.φ∗(p) ≤ j(p), and this completes the proof.

Now for A ⊆ N, let DA(n) = {h0, ni | n ∈ A} ∪ h1, ni | n 6∈ A} so that DA represents canonically the subobject

A ∨ ¬A  N, the “decidability of A”. We write

ψA(p) = ∃n ∈ N.DA(n) → p , J K

35 and kA for the least j-operator generated by ψA, that is, the least j-operator ∗ forcing A to be decidable. By (17.1) kA is equal to ψA in Eff .

Theorem 17.2. (External version). kA ≤ kB in Eff iff A is Turing reducible to B. ∗ Proof. Note first that kA ≤ kB in Eff iff ∀n.ψB(DA(n)) is valid (holds in Eff ). ∗ Suppose that e(n) ∈ ψB(DA(n)) for each n. We wish to show how to com- pute A from B, that is how to determine DA(n) from a knowledge of DB(m) ∗ for finitely many m. Let x = e(n) ∈ ψB(DA(n)); then either x is of form hy, ∗i and we easily see that y must be DA(n) so we are home, ∗ or x is of form hm, e1i say in which case e1 ∈ DB(m) → ψB(DA(n)) so we take ∗ x1 to be e1(h0, mi) or e1(h1, mi) as appropriate, x1 ∈ ψB(DA(n)), and repeat ∗ this process. From the definition of ψB, this terminates in a finite number of steps giving DA(n) as required. Suppose conversely that A is Turing reducible to B via an index f. Define using the second recursion theorem e(n, y) where y is (a code for) a finite set of numbers of form hm, 0i or hm, 1i as follows.  y  hk, ∗i , if there is a computation {f} (n) = k   (using only information in y), e(n, y) = hm, gi , if the computation {f}y(n) asks for a   value not in y, and g is an index for  hm, ii 7→ e(n, y ∪ {hm, ii}). It is easy to see that for all n, and for y information true of B, e(n, y) is defined ∗ and in φB(DA(n)). In particular for y the empty set, we have for all n, ∗ e(n, y) in φB(DA(n)). ∗ Thus ∀n.ψB(DA(n)) is valid. This completes the proof. Remark. In fact there is a proof of the implication from right to left along the following lines; if j forces B decidable, then the statement that A is reducible to B and that the computation is always defined, are almost negative for Eff j, and so hold in Eff j; hence in Eff j A is decidable, that is j forces A decidable. We cannot find a crude internal version of (17.2) in view of Goodman[1978]. However the proof of (17.2) is effective, so we can get something out of it. Clearly the function which associates kA with A is internally defined in Eff . We must say what we mean by “A Turing reducible to B”: we mean the natural notion of computability relative to (partial) characteristic functions. We obtain a result by restricting attention to closed subsets of N, that is to P(N) = {A ⊆ N | ∀n.¬¬n ∈ A → n ∈ A}. Proposition 17.3. The statement

∀A, B ∈ P (N).(A Turing reducible to B) ↔ kA ≤ kB holds in Eff . Proof. By the effectivity of the proof of (17.2).

36 §18 General remarks on the effective topos

The pleasing feature of the effective topos is that in it, ideas about effectivity in mathematics seem to have their natural home. We mention the two main examples. 1) Constructive real analysis. We have tried to indicate that this is what analy- sis in Eff is in essence in §§8-13. It is worth noting how the realizability logic makes distinctions for us. Consider the examples (Kreisel[1959]) that the intermediate value theorem holds classically but not effectively for recursive (continuous) functions on the recursive reals. In Eff ,

∀f ∈ RR.f(0) < 0 ∧ f(1) > 0 → ∃x ∈ (0, 1).f(x) = 0 is false while

∀f ∈ RR.f(0) < 0 ∧ f(1) > 0 → ¬¬∃x ∈ (0, 1).f(x) = 0 is true (as it is true in Sets and equivalent to a negative formula). 2) Effective algebra. We have not discussed this at all, but it seems worth pointing out that the definitions have a natural meaning in Eff . A recursively presented field (see Metakides-Nerode[1979]) is an enumerable (decidable) field in Eff . It has a splitting algorithm iff irreducibility of polynomials is decidable in Eff . Thus the effective content of a recursively presented structure corresponds to properties of it which hold in Eff . This suggests that positive results in effective algebra should be established by proving results in constructive logic from axioms which hold in Eff , and interpreting the results in Eff . That is, one should use the axiomatic method. Of course, negative results obtained in effective algebra can be interpreted in Eff to give independence resutls. What we lack, above all, in our treatment of the effective topos, is any real information about axiomatization analogous to the results obtained in Troelstra [1973] axiomatizing realizability over both Heyting and Peano arithmetic. Of course, one would expect to look at the effective topos defined over a topos other than Sets (say over the free topos with natural number object) to get a result corresponding precisely to an axiomatization. But all I wish to point out is that (despite the suggestive work of Pitts[1981] on iteration) we have no good information in this area. We can not properly be said to understand realizability until we do.

37 References

M.J. Beeson [1977], Principles of continuous choice, Ann. Math. Log. 12, 249- 322. E. Bishop [1967], Foundations of Constructive Analysis (McGraw-Hill). A. Boileau & A. Joyal [1981], La logigue des topos, J.S.L. 46, 6-16. D. van Dalen [1978], An interpretation of intuitionistic analysis, Ann. Math. Log. 13, 1-43. M.P. Fourman [1977], The logic of topoi, in Handbook of (ed. Barwise) (North-Holland). M.P. Fourman & R.J. Grayson, this volume, Formal spaces. M.P. Fourman & J.M.E. Hyland [1979], Sheaf models for analysis, in Applica- tions of Sheaves (Springer Lecture Notes 753). M.P. Fourman & D.S. Scott [1979], Notes on Sheaves and Logic, in Applications of Sheaves (Springer Lecture Notes 753). R.O. Gandy & J.M.E. Hyland [1977], Computable and recursively countable functions of higher type, in Logic Colloquium ’76 (ed. Gandy, Hyland) (North- Holland). N.D. Goodman [1978], The non-constructive content of sentences of arithmetic, J.S.L. 43, 497-501. J.M.E. Hyland [1977], Aspects of constructivity in mathematics, in Logic Col- loquium ’76 (ed. Gandy, Hyland) (North-Holland). J.M.E. Hyland [1979], Filter spaces and continuous functionals, Ann. Math. Log. 16, 101-143. J.M.E. Hyland, P.T. Johnstone & A.M. Pitts [1980] (HJP [1980]), Tripos theory, Math. Proc. Camb. Phil. Soc. 88, 205-232. P.T. Johnstone [1977], Topos Theory (Academic Press). S.C. Kleene [1945], On the interpretation of intuitionistic number theory, J.S.L. 10, 109-124. S.C. Kleene [1973], Realizability: A Retrospective Survey, in Cambridge Sum- mer School in Mathematical Logic (Springer Lecture Notes 337). S.C. Kleene & R.E. Vesley [1965], The foundations of intuitionistic mathematics (North-Holland). G. Kreisel [1959], Interpretation of analysis by means of constructive function- als of finite type, in Constructivity in Mathematics (ed. Heyting) (North- Holland).

38 M. Makkai & G.E. Reyes [1977], First order categorical logic (Springer Lecture Notes 611). G. Metakides & A. Nerode [1979], Effective content of field theory, Ann. Math. Log. 17, 289-320.

J.R. Moschovakis [1973], A topological interpretation of second order intuition- istic arithmetic, Comp. Math. 26, 261-276. A.M. Pitts [1981], The theory of triposes, Cambridge Ph.D. Thesis. H. Rogers jnr. [1967], Theory of recursive functions and effective computability (McGraw-Hill).

D.S. Scott [1970], Extending the topological interpretation to intuitionistic anal- ysis II, in Intuitionism and Proof Theory (ed. Kino, Myhill, Vesley) (North- Holland). D.S. Scott [1979], Identity and existence in intuitionistic logic, in Application of Sheaves (Springer Lecture Notes 753). W.W. Tait [1975], A realizability interpretation of the theory of species in Logic Colloquium (Springer Lecture Notes 453). A.S. Troelstra [1973], Metamathematical Investigation of Intuitionistic Arith- metic and Analysis (Springer Lecture Notes 344).

I.D. Zaslavski˘ı& G.S. Ce˘ıtin[1962], On singular coverings and properties of constructive functions connected with them, Trudy Mat. Inst. Steklov 67, 458-502 (translated in AMS Translations (2) 98, 41-89 (1971)).

39