Suppose that we wanted to construct a mathematical universe where all objects were computable in some sense. How would we do it?
Well, we could certainly allow the set into our universe: natural numbers are the most basic computational objects there are. (Notation: I’ll use
to refer to
when we’re considering it as part of the universe we’ll building, and just
when we’re talking about the set of natural numbers in the “real” world.) What should we take as our set of functions
from
to
? Since we want to admit only computable things, we should let
be the set of computable functions from
to
, which we can represent non-uniquely by their indices (i.e., by the programs which compute them).
(For clarity, I’ll use the following notation for computable functions: denotes the partial function from
to
computed by the
th Turing machine. Given
, it is possible that the computation
never halts; in that case, I’ll write
and say that
is undefined. If it does halt, I’ll write
and say that
is defined. If it halts, then it yields an output
. To indicate what it is, I’ll write
or
.)
So, we’ve decided that should equal
. What should
equal? At this point, there is a slight subtlety: It’s not simply the set of computable functions from
(considered as a subset of
) to
(considered as
), because we would like to only admit those functions from
to
that return the same number when given inputs which represent the same element of
.
Therefore, we’ll let be the set of
such that, for all
,
, and whenever
are such that for all
,
, then
.
We can similarly define , except that there are now two places where we should take into account that we consider
equivalent if for all
,
: We’ll let
be the set of
such that, whenever
are equivalent in the aforementioned sense,
and
are defined and equivalent in the aforementioned sense.
In a similar fashion, we can define and so on; these sets are called the sets of hereditarily computable functions.
Can we generalize this construction to a category that incorporates all possible computable representations of real objects? More ambitiously, can we generalize to a category that is a genuine mathematical universe in the sense that questions like “Does the Riemann Hypothesis hold in this category?” are meaningful? The answer, due to Martin Hyland, is yes.
This material is from Jaap van Oosten‘s book “Realizability: A Categorical Perspective” (link to Preface, Introduction and Table of Contents). Unfortunately, I don’t know of a freely available explanation of the effective topos on the web, which is part of the reason why I’m writing this blog entry. (If you know of one, please leave a comment. Edit: Found one.) However, the Stanford Encyclopedia of Philosophy has a pretty good section on the realizability interpretation of intuitionistic logic, on which Hyland’s effective topos is based.
Back to the math. Notice that what we did in the case was the following: Although we represented the computable functions as a subset of
, we still kept the “real” set
hiding around in the background: we used it to determine what the appropriate elements of
should be: If two elements of
represented the same element of the “real set”
, then an element of
should assign the same number to both of them.
That suggests a generalization. Let an assembly be a pair , where
is a set, and
is a function from
to
, the power set of
. We think of
as assigning to each element of
its computable representations. We let a morphism between two assemblies
and
be a function from
to
such that there is an
such that, whenever
, and
,
.
With these morphisms, the class of assemblies forms a category. Let and
be two assemblies. Then they have a direct product
given by
, where
and
is a pairing function. They have an exponential
given by
, where
.
If we let be the assembly
, where
, then the iterated exponential objects of
correspond precisely to our initial definition of the sets of hereditarily computable objects above.
This is all great, but we still can’t call the category of assemblies a mathematical universe. Why not? Well, in the real world, we ask questions like “Is the Riemann Hypothesis true?”, “Is Goldbach’s conjecture true”, etc., but we don’t yet know how to ask questions like “Is the Riemann Hypothesis true in the category of assemblies?” any more than it makes sense to ask whether or not the Riemann Hypothesis is true in the group or in the number 17. What we need is a way to interpret statements being true or not in this category.
In turning the category of assemblies into one in which we can interpret logical statements, there are three considerations, each of which builds on the previous ones.
- The object of truth values should have more than two elements. Let’s step back to the ordinary category of sets for a moment. Say we have two sets
and
and an injection
from
to
. Given
, what is the truth value of the proposition that
is in the image of
? Well, I don’t know, but it’s clearly either
or
. But in the category of assemblies it’s more complicated due to the computational information we have lying around. Say that we have an injective morphism from an assembly
to an assembly
. Given
, now what is the truth value of the proposition that
is in the image of
? What if there is a
such that
but
? Without resolving the issue now, one plausible answer is that the truth value should be the set of indices of all computable functions taking
to
, so that the more “alike”
and
, the more “true” the proposition is, and furthermore this “alikeness” is represented in a computational way. So, a working hypothesis is that the set of truth values should be something like
.
- Objects should come equipped with an equivalence relation. In the category of assemblies, there is no question about whether or not two elements of a given object are equal. If we are making a category where the object of truth values is something like
, however, we should allow that the proposition that different elements are equal has a truth value in that object, rather than in the classical set
of truth values. Therefore, objects should be something like
, where
is a set and
is a map from
to
. (We can represent an assembly
as the object
in our new category where
and
if
).
- Morphisms should be more general than functions. If we’re allowing objects to come equipped with some sort of equivalence relation, we will have to let morphisms be more general than functions: If
is a morphism from
and
,
and
, then
is also true to some degree. So morphisms should probably be some sort of relation on
that resembles a function in some way.
Now, after listing all those (somewhat vague) considerations, I’ll describe the category that takes them into account. It’s called the Effective Topos and it was discovered/invented by Martin Hyland.
Description of the category
The objects of the effective topos are pairs where
is a set and
is a map from
to
. This map is required to satisfy the following properties:
- There must be a number
such that for all
if
then
.
- There must be a number
such that for all
if
and
then
.
(In the above, stands for “symmetric” and
stands for “transitive.”)
A morphism from to
is represented by a function
satisfying the following:
- There must be a number
such that for all
,
if
then
where
and
.
- There must be a number
such that for all
,
, if
,
, and
, then
.
- There must be a number
such that for all
,
, if
and
then
.
- There must be a number
such that for all
, if
then
.
(In the above, stands for “strict,”
stands for “relational,”
stands for “single-valued” and
stands for “total.”)
We say that two such representations and
are equivalent if there exist
such that for all
,
, if
then
and conversely if
then
. (Thus, a morphism in the Effective Topos is actually an equivalence class of representations as above.)
Figuring out how to compose such morphisms is an exercise left to the websurfer.
Let and
be two objects. Their direct product is given by
where
. To form the exponential
, take the object
, where in the definition of
, you emulate the definition of a morphism given above.
The object of truth values (often denoted in any topos) is
, where
.
The object playing the role of a singleton set is
where
.
The map from to
representing the truth value
is given by the equivalence class of the map
defined by
.
The natural numbers object of the effective topos is , where
and
where
.
Interpretation of logical formulas in the effective topos.
I’ll now describe how logical formulas can be interpreted in Hyland’s effective topos. If are variables intended to range over the objects
respectively and
is a formula with free variables from
, then I’ll show how to find a map
from
to
interpreting that formula. If
, and thus the formula has no free variables and is a sentence, then the interpretation will give a map from
to
. We say that a sentence holds in the effective topos if its interpretation is equal to the map
defined above.
The only atomic relation is equality, and the interpretation of atomic formulas is given by the component of the objects of the effective topos.
For clarity, assume that and
contain only one free variable, and that it ranges over the object
. If we know the interpretations of
and
already, then we have the following:
-
is represented by the map taking
to
.
is represented by the map taking
to
.
is represented by the map taking
to
.
Now suppose that has two free variables ranging over
and
respectively, and I’ll show you how to interpret quantifiers.
is represented by the map taking
to
.
is represented by the map taking
to
.
Now, once we observe that we can interpret the power “set” of an object in the effective topos as the exponential
, we know how to interpret all first- and higher-order sentences as holding or not in the effective topos.
Here are some interesting sentences given by Van Oosten that highlight some differences between the effective topos and the ordinary category of sets.
- Note that we may write the relation “
” as a relation on
in our language. Then the sentence
is true in the effective topos.
- For every formula
, where
is a variable ranging over
and
is a variable ranging over
, the sentence
holds in the effective topos.
- We may construct the rationals
and the reals
in the effective topos just as we do in the category of sets. However, they have different properties. For example, in the effective topos the statement “There exists a bounded monotonic sequence in
that does not converge to a limit.” holds, contradicting the Bolzano-Weierstrass theorem. Intuitively, this is because we can find a bounded, monotonic sequence converging to a real number whose binary expansion encodes the halting problem but such that every member of the sequence has a decidable binary expansion.
- The sentence
holds in the effective topos.
- Similar to the above, we may can show that the intermediate value theorem fails in the effective topos.
- In the effective topos, the statement “All functions from
to
are continuous” holds.