Assembly (realizability)

In theoretical computer science and mathematical logic, assemblies can be informally described as sets equipped with representations for elements. Realizability toposes are completions of assembly categories.

Motivation

Algorithms do not directly manipulate objects such as graphs or lists, but representations of these objects. There may be several types of representations available. For example, graphs (viewed modulo isomorphism, i.e., two isomorphic graphs are the same) may be represented with adjacency lists or adjacency matrices. Furthermore, a given object may have several equivalent representations, e.g., a graph could be presented with any order of the vertices, and graph algorithms should give equivalent results whatever the order of the vertices in the input is. The basic idea behind assemblies is to consider sets (such as the set of finite graphs, modulo isomorphism) where each element has a number of realizers, which are understood as its algorithmic representations. A morphism between assemblies is a function between their underlying sets which can be “algorithmically realized”, in the sense that given a representation of an element of the domain, one can compute a representation of its image. For example, the function which maps a graph to the multiset of its connected components is realized: there is an algorithm which, given a representation of a graph, computes a list (which is a reasonable representation for a multiset) of representations of its connected components.

In the context of realizability, it is useful not to restrict the definition to algorithms in the Church–Turing sense. Instead, assemblies are defined over a specific partial combinatory algebra, which abstracts the model of computation. It is a set equipped with an operation thought of as program execution. The archetypal example, modelling Church–Turing computability, is the first Kleene algebra, which is where is the output (if defined) of the Turing machine represented by the integer when run on the input (thus integers are used to represent all data as well as all programs).

A possibly surprising aspect of the definition is that elements may share realizers. While unusual algorithmically, this is important to the logical side of realizability.

Definition

Let be a fixed partial combinatory algebra.

An assembly (over ) is simply a set equipped with a relation , read “realizes”, between and , such that every element of has a realizer, i.e., for all , there exists with .

Assemblies are equipped with a categorical structure as follows. A morphism between assemblies and is a function between their underlying sets, for which there exists an element such that for all element realized by , the application is defined in the pca and the element is realized by . The category of assemblies over is denoted by .

An assembly is said to be modest when elements do not share realizers, i.e., for all , if and then . The category of modest assemblies over is denoted and is a full subcategory of .

Examples

The unit assembly is carried by a singleton , where is realized all elements of the pca (alternatively, giving any non-zero number of realizers gives an isomorphic object).

The empty assembly is carried by the empty set.

The assembly of natural numbers is carried by where each natural number is realized only by its associated Curry numeral .

At the extreme opposite of modest assemblies, the constant assembly is carried by the set , where all elements of are realized by all elements of the pca.

The assembly of classical truth values is the constant assembly on a two-element set, i.e., . The assembly of decidable truth values or booleans, is carried by , where 0 is realized by and 1 is realized by the .

An intermediate between decidable and classical truth values is the assembly of semidecidable truth values. It is carried by , and all realizers are programs which compute infinite sequences of bits, i.e., elements from the pca such that for all the application is defined and has value or . The realizers of 1 are those which compute a sequence that contains the bit 1, and the realizers of 0 are the others.

Given two assemblies and , we may form their binary product as follows: its carrier is the Cartesian product of the carriers , and a pair is realized by elements such that realizes and realizes . Here, and are the projection functions in some encoding of pairs inside the pca, e.g., .)

We may also form the binary coproduct , whose carrier is the disjoint union and where a realizer of is for a realizer of , while a realizer of is for a realizer of . Here, and are the constructors for some encoding of disjoint unions, e.g., .

Categorical structure

The category has the following properties:

  • It is finitely complete. The unit assembly is a terminal object. Binary products correspond to category-theoretic binary products. The equalizer of two morphisms may be formed exactly as in the category of sets, as the canonical injection to from the subset . Each element of the subset is equipped with the same realizers as in , and the canonical injection is realized by .
  • It is finitely cocomplete. The empty assembly is initial and binary coproducts correspond to category-theoretic binary coproducts. Similarly to equalizers, the coequalizer of two morphisms may be formed exactly as in the category of sets, as the canonical surjection from to the quotient , where is the equivalence relation generated by the relations . The realizers of an equivalence class are all the realizers of its elements in . Again, the canonical surjection is realized by .
  • It is regular and cartesian closed.
  • A morphism is mono if and only if its underlying function is injective, and epi if and only if its underlying function is surjective.

References

Uses material from the Wikipedia article Assembly (realizability), released under the CC BY-SA 4.0 license.