A topological view on algebraic computation models

A topological view on algebraic computation models

Eike Neumann
Aston University, Birmingham, UK
neumaef1@aston.ac.uk
   Arno Pauly
Computer Laboratory, University of Cambridge, UK & University of Birmingham, Birmingham, UK
Arno.Pauly@cl.cam.ac.uk
Pauly has since moved to the Département d’Informatique, Université libre de Bruxelles, Belgium.
Abstract

We investigate the topological aspects of some algebraic computation models, in particular the BSS-model. Our results can be seen as bounds on how different BSS-computability and computability in the sense of computable analysis can be. The framework for this is Weihrauch reducibility. As a consequence of our characterizations, we establish that the solvability complexity index is (mostly) independent of the computational model, and that there thus is common ground in the study of non-computability between the BSS and TTE setting.

A topological view on algebraic computation models

Eike Neumann
Aston University, Birmingham, UK
neumaef1@aston.ac.uk and Arno Pauly
Computer Laboratory, University of Cambridge, UKthanks: Pauly has since moved to the Département d’Informatique, Université libre de Bruxelles, Belgium.
&
University of Birmingham, Birmingham, UK
Arno.Pauly@cl.cam.ac.uk

1 Introduction

There are two major paradigms for computability on functions on the real numbers: On the one hand, computable analysis in the tradition of Grzegorczyk [33, 34] and Lacombe [45] as championed by Weihrauch [63, 65] (see also the equivalent approaches by Pour-El and Richards [59] or Ko [44]). On the other hand, the BSS-machines by Blum, Shub and Smale [4, 3], or the very similar real-RAM model. Incidentally, both schools claim to be in the tradition of Turing.

Computable analysis can, to a large extent, be understood as effective topology [24, 54] – this becomes particularly clear when one moves beyond just the real numbers, and is interested in computability on spaces of subsets or functionals. In particular, we find that the effective Borel hierarchy occupies the position analogous to the arithmetical hierarchy in classical recursion theory; and that incomputability of natural problems is typically a consequence of discontinuity. A more fine-grained view becomes possible in the framework of Weihrauch reducibility (more below).

In contrast, the study of BSS-computability is essentially a question akin to (logical) definability in algebraic structures. This causes the lack of a stable notion of BSS-computability on the reals: BSS-computability on the ring differs from BSS-computability on the unordered field , which in turn differs from BSS-computability on the ordered field . Taking into account as basic functions further maps such as square root or the exponential function induces additional variants. There are, however, also topological obstacles to being BSS-computable – and as we shall demonstrate, these obstacles are common to all variants of BSS-machines.

Hotz and his coauthors [22, 42, 25] have introduced and studied a number of extensions of BSS-machines (called analytic machines), which can (in various ways) make use of approximations. These additional features enable the “computation” of even more discontinuous functions, however, there are still topological limitations.

In the present article, we characterize the maximal degrees of discontinuity for functions computable by each of the algebraic machine models in the framework of Weihrauch reducibility. We thus continue and extend the work by Gärtner and Ziegler in [26]. This allows us to differentiate between topological and algebraic reasons for non-computability in these models. Moreover, we can show that for sufficiently discontinuous problems the difference between the various computational models vanishes: This can be formalized using Hansen’s solvability complexity index (SCI) [35, 2], which is the least number of limits one needs in order to solve a particular problem over some basic computational model. Our results show e.g. that for values of 2 or greater the SCI based on the BSS-model coincides with the SCI based on the computable analysis model.

In Section 3 we characterise the computational power of generalized register machines with LPO-tests (Proposition 10) as well as BSS-machines over the reals with equality- and order-tests (Corollary 14). We show that their strength is captured by the Weihrauch degree of closed choice over the natural numbers, in the sense that any function computable by either type of machine is Weihrauch-reducible to and for each type of machine there exists a function which is Weihrauch-equivalent to and computable by that type of machine. We furthermore show that all BSS-computable total functions are strictly below (Corollary 18 and Proposition 19) and that the strength of BSS-machines with equality-tests but without order-tests is characterised by the strictly weaker Weihrauch degree (Proposition 20).

In Section 4 we study the BSS-halting problem from the point of view of Weihrauch-reducibility. We show in particular that the halting problem of a machine over the signature cannot be solved by any machine over a signature which expands by continuous operations only. Therefore, the inability of BSS-machines to solve their halting problem already holds for topological reasons.

In Section 5 we prepare the discussion of analytic machines and the solvability complexity index by some more technical results on Weihrauch degrees. We introduce the Weihrauch degree of the problem Sort of “sorting” an infinite binary sequence. We discuss its position in the Weihrauch lattice in detail and prove in particular that (Corollary 27) and that we have the absorption (Corollary 32).

In Section 6 we characterise the strength of analytic machines. We show that the computational power of analytic machines is characterised by the Weihrauch degree in the same way as the power of BSS-machines is characterised by (Observation 35 and Corollary 39).

In Section 7 we combine the results of the two previous sections to show that the SCI of an uncomputable function over the BSS-model is the same as the SCI over the computable analysis model as soon as the SCI over either model is greater than or equal to 2 (Theorem 44).

2 Background on the models and Weihrauch reducibility

2.1 Algebraic computation models

We introduce the notion of a register machine over some algebraic structure, following Gaßner [27, 28, 30] (1997+) and Tavana and Weihrauch (2011) [61]. Other approaches to computation over algebraic structures were put forth e.g. by Tucker and Zucker (2000) [62] and Hemmerling (1998) [36]. For this consider some algebraic structure , where is a set, each is a (partial) function of type , and each is a relation of type . In the usual examples, the signatures will be finite, but this is not essential for our considerations.

Generalized register machines will compute functions of type . They have registers holding elements of , and index registers holding natural numbers. Programs are finite lists of commands, consisting of:

  • standard register machine operations on the index registers

  • copying the value of the register indexed by into

  • applying some to the values contained in and writing the result into

  • branching to a line in the program depending on the value of on the values contained in

  • HALT, in which case the values currently in the registers constitute the output

Initially, the register contains the length of the input, all other start at . The input is in , all other contain some fixed value . If the program either fails to halt on some input, or invokes a partial function on some values outside its domain, the computed function is undefined on these values. We call a (partial) function -computable, if there is a generalized register machine program computing it.

In analogy to the situation in computable analysis, we shall call sections of -computable function -continuous. This boils down to programs being allowed additional assignment operations for any element . These are usually included in the algebraic models, but have the undesirable consequence of there being more than countably many programs, if itself is uncountable.

The primary example of a structure will be (yielding BSS-computability). Secondary examples include (additive machines with equality) and other combinations of continuous functions and tests in .

2.2 Analytic machines

The analytic machines introduced in [22, 42] enhance BSS-machines by means to approximate functions. More generally, if we consider the algebraic structure to also carry a metric, we can define functions computable by strongly -analytic machines and functions computable by weakly -analytic machines in one of two equivalent ways: Either a generalized register machine receives an additional input ; thus computes a function , which is then considered as weakly approximating iff , and as strongly approximating iff . Alternatively there is no extra input, and the machine keeps running, and produces an infinite sequence (plus some information on the length of the desired output). The limit conditions are the same.

We shall speak just of “functions computable by a strongly (weakly) analytic machine” if the underlying structure is . As functions computable by an analytic machine receive their input exactly, but produce their output in an approximative fashion, they are generally not closed under composition.

Further variants of analytic machines have been considered, which are not relevant for the present paper though. We refer to [67] by Ziegler for an excellent discussion.

2.3 Type-2 Turing machines

The fundamental model for computable analysis/the TTE-framework [65] are the Type-2 Turing machines. Structurally, these do not differ from ordinary Turing machines with a designated write-once only output tape. What differs is that instead of halting and thus producing a finite output, the machine continues to run for ever. As long as it keeps writing on the output tape, this produces an infinite sequence in the limit. While some might object to the use of infinitely long computations, this model is realistic in as far as anything written on the output tape at some finite time constitutes a prefix to the infinite output (as each cell in the output tape can be changed just once). Thus, this model inherently captures approximating computations – and its intricate connection to topology is perhaps unsurprising. In particular, we find that any computable function is automatically continuous w.r.t. the standard topology on – and vice versa, every continuous function becomes computable relative to some oracle.

Type-2 machines natively provide us with a notion of computability on . This is then transferred to the spaces of actual interest by means of a representation. A represented space is a pair of a set and a partial surjection . A (multi-valued) function between represented spaces is a partial relation . We write for these; here denotes (potential) partiality, and (potential) multi-valuedness. We write and . We recall that composition of multi-valued functions is defined via and for , if .

For and , we call a realizer of (notation ), iff for all . A function between represented spaces is called computable (continuous), iff it has a computable (continuous) realizer. Note that, unlike in the case of algebraic models, the behaviour of a Type-2 machine which computes a partial function is completely unconstrained on inputs outside of the function’s domain.

Figure 1: The notion of a realizer

As we are primarily interested in computability on and , we shall introduce the standard representations for these spaces. Fix some standard enumeration . Then let if and . In other words, a name for a real number is a sequence of rationals converging to it with some prescribed speed. We thus understand to be the represented space . As we can form products and coproducts of represented spaces, we automatically obtain a representation for .

We will encounter decision problems, and thus need spaces of truth-values. For this, we use both the space represented by defined by , as well as Sierpiński space . The latter has the underlying set and the representation with and iff . As usual, we identify with and with . The space captures decidability, and captures semi-decidability. The usual boolean connectives and are computable on both spaces. Negation is computable, whereas is not computable.

We also make use of the represented space , represented via . Any represented space naturally comes with a topology, namely the final topology along the representation, where the domain of the representation just inherits the subspace topology of the usual complete metric on . For , this is the discrete topology, for the usual Euclidean topology. Via the utm-theorem, we obtain the represented space of the open subsets of the represented space in a canonical manner, by identifying them with continuous functions from to . By considering complements instead we obtain a representation of the space . Here, the space is the space of closed subsets represented with negative information, or equipped with the upper Fell topology. A representation via positive information is obtained by identifying a closed set with the open set of all open sets which intersect . The corresponding represented space is denoted by and called the space of overt subsets of . We only use the special cases and here though. One may consider to be represented by with iff is a subword of ; and thus by with iff is not a subword of . Note that the computable points of are precisely the computably enumerable sets, and the computable points of are the co-c.e. sets.

2.4 Weihrauch reducibility

Weihrauch reducibility is a preorder on multivalued functions between represented spaces, and serves as a framework for comparing incomputability in the Type-2 setting, similar to the role of many-one or Turing reductions in classical recursion theory:

Definition 1 (Weihrauch reducibility).

Let be multi-valued functions on represented spaces. Then is said to be Weihrauch reducible to , in symbols , if there are computable functions such that for all . Accordingly, is said to be continuously Weihrauch reducible to , in symbols , if there exist continuous functions and satisfying this condition.

The relation is reflexive and transitive. We use to denote equivalence regarding , and by we denote strict reducibility. By we refer to the partially ordered set of equivalence classes. As shown in [52, 10], is a distributive lattice, and also the usual product operation on multivalued function induces an operation on . The algebraic structure on has been investigated in further detail in [39, 15].

There are two relevant unary operations defined on , both happen to be closure operators. The operation was introduced in [52, 51] by setting , and then . It corresponds to making any finite number of parallel uses of available. Similarly, the parallelization operation from [10, 9] makes countably many parallel uses available by .

We will make use of an operation defined on that captures aspects of function composition. Following [12, 14], let . We understand that the quantification is running over all suitable functions , with matching types for the function composition. It is not obvious that this maximum always exists, this is shown in [15] using an explicit construction for . Like function composition, is associative but generally not commutative. We use to introduce iterated composition by setting and .

All computable multivalued functions with a computable point in their domain are Weihrauch equivalent, this degree is denoted by .

An important source for examples of Weihrauch degrees that are relevant for the classification of theorems are the closed choice principles studied in e.g. [9, 8]:

Definition 2.

Given a represented space , the associated closed choice principle is the partial multivalued function mapping a non-empty closed set to an arbitrary point in it.

The Weihrauch degree corresponding to has received significant attention, e.g. in [9, 8, 49, 47, 48, 11, 50, 56, 57]. In particular, as shown in [55], a function between computable Polish spaces is Weihrauch reducible to iff it is piecewise computable iff it is effectively -measurable.

The second standard Weihrauch degree very relevant for our investigation will be , with its representative defined via . It was shown in [7] that is Weihrauch-complete for -measurable functions, and that, more generally, is Weihrauch-complete for -measurable function. This line of research was continued in [41].

The third standard Weihrauch degree we will refer to is LPO, which has the eponymous representative mapping to and to . By virtue of having the same realizers, we also find in this class. Furthermore, , and are members of the Weihrauch degree LPO. In the context of computable analysis the degree was first introduced and named as such in [64], based on earlier usage in constructive mathematics [18].

For our purposes, the following representatives and properties of the degree are also relevant:

Lemma 3 ([56]).

The following are Weihrauch equivalent:

  1. , that is closed choice on the natural numbers.

  2. , defined via .

  3. defined on the non-empty closed subsets of .

  4. defined on the non-empty bounded open subsets of .

  5. defined by .

  6. , where iff .

Lemma 4 ([12]).

The following are Weihrauch equivalent:

  1. , where maps an eventually constant sequence to its limit

Lemma 5 ([47, 49]).
  1. For we have .

Lemma 6 ([8]).

2.5 On the difference between algebraic and topological models of computation

Penrose [58] posed and made popular the question whether the Mandelbrot set is computable – albeit without specifying any formal definition of computable for this question. In the BSS-model, a negative answer was readily obtained in [3]. Brattka [6], however, argued that this result just reflects that the Mandelbrot set is not an algebraic object, without being meaningful for computability as naively understood: A very similar proof applies also to the epigraph of the exponential function – which, as many111Including Penrose himself, see e.g. [58, Figure 4.5, p. 167]. would agree, ought to be computable.(222The question whether the (distance function of the) Mandelbrot set is computable in the computable analysis sense is still open – as shown by Hertling [38], this would be implied by the hyperbolicity conjecture. See the book [16] for a general discussion of Julia sets and computability.)

The usual focal point for disagreement between the two communities, however, is not about functions computable in the Type-2 sense but non-computable in the BSS-sense, but vice versa. As is commonly understood, and will be proven formally below, this boils down to equality (or any other non-trivial property of real numbers) being decidable in the BSS-model. Brattka and Hertling [13] proposed the feasible real RAM’s, a variation on the BSS-model that rather than deterministic tests can only perform non-deterministic tests that may give a wrong answer for very close numbers. The functions approximable by a feasible real RAM are precisely those computable in the Type-2 sense; i.e. allowing approximation and removing exact tests is precisely what is needed to move from BSS-computability to Type-2 computability.

The complexity of (semi)decidable sets in the two models was compared by Zhong [66], and Boldi and Vigna [5]. In [66] it is proved that every TTE-semi-decidable set is BSS semi-decidable, and a criterion is given under which the converse holds true. In [5] it is shown amongst other things that if an open set is BSS decidable with constants , then the Turing degree of some standard name of is below the jump of the degrees of the binary expansion of the constants. Furthermore, a particular set is constructed for which the degree of every standard name of is above the jump of the degrees of the binary expansion of the constants. It is also shown that the halting set of any BSS machine with constants is computably (Turing-)overt relative to the constants.

We can translate some of their results into our parlance. Let denote the space of open subsets of that are decidable by a BSS-machine using constants, represented in the obvious way by a Gödel-number of the machine together with names for the constants. Let denote the space of Halting sets of BSS-machines using constants, again represented in the obvious way. Then:

Proposition 7.
  1. is computable.

  2. .

  3. There is some such that .

  4. There is some such that , where denotes the closure operator.

Proof.
  1. This is the uniform version of [66, Theorem 3.1].

  2. This follows by noting that the proof of [5, Theorem 10] is completely uniform.

  3. This follows from [5, Theorem 7].

  4. This is the statement of [5, Corollary 6].

While making these classifications precise, and attending to the numerous remaining questions on the complexity of sets in terms of Weihrauch reducibility seems like an interesting endeavour, we leave it to future work.

In [MorozovKorovina], the notion of semi-decidability in the TTE model is related to -definability over the reals without equality: It is shown that the -definable sets without equality are precisely the semi-decidable sets in the TTE-model. The main result of the paper is that there is no effective procedure which takes as input a finite formula that defines an open set with equality and takes it to a formula that defines the same open set without equality.

2.6 Relativization

Prima facie, several of our most general result might look unsatisfactory to the reader coming from the algebraic computation model side: We restrict our operations to be computable, hence presuppose the Type-2 notion of computability, and disallow the use of arbitrary constants that is customary for BSS-machines. These issues can be resolved directly, using the technique of relativization from classical recursion theory. The idea here is that almost all computability-theoretic arguments remain true relative to some arbitrary, but fixed oracle . This is of crucial importance for us due to the following:

Fact 8.

A function is continuous iff it is computable relative to some oracle.

All of our proofs relativize. Thus, for each of our results replacing each instance of computable by continuous again yields a true statement. Moreover, for the relativized version of a statement about an algebraic computation model, it does not change anything to allow arbitrary constants.

3 The complexity of finitely many tests

3.1 Generalized register machines with Lpo-tests

As explained above, the crucial distinguishing feature giving the algebraic computation models additional power is the ability to make finitely many tests, usually either equality or order. Both examples are Weihrauch equivalent to LPO. Thus we are lead to the problem of classifying the computational power inherent in being allowed to make finitely many uses of LPO. Note that we are not required to state any bounds in advance (which would just yield ), but simply have to cease making additional queries to LPO eventually.

We can formalize this using the generalized register machines: We allow all computable functions on as functions, and LPO as test333Alternatively, we could have used the rather cumbersome Oracle-Type-Two machines suggested in [50]..

Definition 9.

Let take as input a Gödel-number of some generalized register machine on with computable functions (specified as part of the Gödel-number) and LPO-tests, as well as some input for such a machine. The output of is whatever would output on input .

Of course, the preceding definition makes sense with some arbitrary multi-valued function in place of LPO, and would give rise to an operation on the Weihrauch degrees. This operation is related to the generalized Weihrauch reductions proposed by Hirschfeldt in [40]. While a detailed investigation of seems highly desirable, it is beyond the scope of the present paper and thus relegated to future work.

Proposition 10.

.

Proof.

We describe a generalized register machine program using computable functions and LPO that solves . Given and , we can compute some such that . Starting with , we simply test . If yes, we output and terminate. Else we continue with .

Consider some generalized register machine with computable functions and LPO-tests. Each computation path of the machine corresponding to some valid input is finite, in particular, uses LPO only finitely many times. We encode the results of the LPO-tests along such a finite path by a sequence of numbers in the following way: If the result of the test is , we put . If it is , we put , where is a “precision parameter”, intended to represent a bound on the occurrence of the first in the input to LPO. Using a standard tupling function we can encode the sequence into a single natural number . Furthermore, we can arrange that every natural number encodes such a tuple.

Given a natural number which encodes the results of the LPO-tests along a finite path, we can check if the choices are infeasible. The number is rejected in three cases:

  1. If the path does not end in a leaf.

  2. If there exists such that but the input to the LPO-test is non-zero.

  3. If but the input to the LPO-test starts with more than zeroes.

We can effectively enumerate all numbers that are rejected. This amounts to being able to compute the set of numbers that are never rejected. We apply to this set to pick a number which is never rejected, which allows us to simulate the computation of the register machine in an otherwise computable fashion.

On a side note, let us consider two more computational models: First, the concept of finitely revising computation presented in [69] by Ziegler: These are Type-2 machines equipped with the additional power to reset their output finitely many times. It is easy to see that being computable by a finitely revising machine is equivalent to being Weihrauch-reducible to . Second, non-deterministic Type-2 computation, also introduced by Ziegler [68] and fleshed out further by Brattka, de Brecht and P. in [8]: Here the machine may guess an element of an advice space, and either proceed to successfully compute a solution, or reject the guess at a finite stage (and there must be a chance of the former). As shown in [8], being computable by a non-deterministic machine with advice space is equivalent to being Weihrauch reducible to . We thus arrive at the following:

Theorem 11.

The following computational models are equivalent in the sense that they yield the same class of computable functions:

  1. Generalized register machines with computable functions and LPO as test.

  2. Finitely revising machines.

  3. Non-deterministic machines with advice space .

We could equivalently have used generalized register machines over , with partial computable functions over and as test. As BSS-machines are a restricted case of these, it is clear that simulating a BSS-machine is no harder than solving .

3.2 BSS-machines over the reals

So far we have only obtained an upper bound for the power of BSS-machines in the Weihrauch lattice. For a lower bound, we require some further representatives of the Weihrauch degree of . Let denote the set of non-negative rational numbers understood as a subspace of the represented space , i.e. represented by the appropriate post-restriction of . In contrast, let be the discrete space of non-negative rational numbers, represented by . Some of the following have already been shown in [47, 49].

Proposition 12.

The following are Weihrauch equivalent:

  1. .

  2. .

  3. .

  4. , where iff and .

  5. , where iff and .(444This map is multivalued, as any positive integer is a valid output on input . Restricting the map to positive inputs does not change the Weihrauch degree.)

Proof.

Lemma 3.

W.l.o.g., assume that the input to is monotone and that . We proceed to compute a non-negative real number which will happen to be rational (i.e. we compute as an element of ). Our initial approximation to is . If , then . If , then we search for some such that – which are guaranteed to exist. Then we set . As the range of is finite, this sequence will stabilize eventually, and by construction, converges quickly to its rational limit.

Applying to will give us some . By design of , we can extract from this value.

Very similar to the reduction . On monotone input with , we start with the approximation . If , then . Otherwise, we search for such that , and set for these values. As the range of is finite, this sequence will stabilize eventually, and by construction, converges quickly to its rational limit .

Applying to will give us some . By design of , we can extract from this value.

Trivial.

Trivial.

Given a non-negative real number , we can compute the closed set . If this set is non-empty, so we can use to extract an element, which allows us to obtain .

Proposition 13.

is computable by a machine over .

Proof.

Let be the input. We can test if , in which case we know that . If this is not the case we compute for all pairs with , the numbers and by repeated addition and test them for equality. If they are equal, then we have found a valid output in the pair , if not, we consider the next pair. ∎

Corollary 14.

For every algebraic computation model over every structure expanding not exceeding the computable functions and as tests, we find that:

  • Every partial function computable in that model is Weihrauch reducible to .

  • There is a (partial) function computable in that model that is Weihrauch equivalent to .

Thus, the computational power of algebraic computation models is, from the perspective of topological computation models, characterized by the Weihrauch degree of .

3.3 BSS-machines which compute total functions

It should be pointed out though that the characterisation in Corollary 14 relies crucially on considering partial functions, too. For total functions, we obtain instead a family of upper bounds as follows:

Definition 15 ([17]).

Let be a well-founded partial order. We define as follows: A sequence where and is in the domain of , if and . As is well-founded, these conditions imply that the sequence stabilizes eventually, and returns the corresponding limit .

Theorem 16 (Computable Hausdorff-Kuratowski theorem [53]).

For a total function the following are equivalent:

  1. .

  2. There exists some computable such that .

Let and be two well-founded partial orders such that there exists an order-preserving map from to , i.e.  some such that if , then . It follows that . Conversely, results from [37, 17] show that this implication indeed reverses. Consider well-founded partial orders up to the equivalence notion induced by the existence of order-preserving maps in both directions is one construction of the countable ordinals – and as shown in [53], in can indeed be seen as a canonical one. Thus, for any countable ordinal we can associate a continuous Weihrauch degree as the degree of for any/every well-founded partial order with rank .

Proposition 17 ([17]).

For countable ordinals we have .

Corollary 18.

Let be a total BSS-computable function. Then there is some countable ordinal with .

Proposition 19.

For each countable successor ordinal there is some BSS-computable total function (using constants) with .

Proof.

We proceed by induction over . The claim for is witnessed by LPO. It suffices to show that if the claim is true (uniformly) for with , then it is true for .

We define piecewise. If for some , then . Otherwise, . If the are either uniformly (in ) BSS-computable, or, alternatively, coded into a real parameter, this clearly yields a BSS-computable function.

Claim:

We start writing a name for while reading the input to . If the first parameter ever changes, then it will move to some such that the lower cone of has some height . In particular, there must be some with . The suitable pairs can be coded into a single real parameter. There will be some such that is still within the scope of the current approximation to .

The tail of the input to at the current moment is now also a valid input to . Thus, we can continue to use the reduction , with scaled down into the interval .

To interpret the output of , the only difference is whether it is of the form or . In the former case, the input sequence to is constant, and we just read off the answer. In the latter case, there is at least one change – so we can search for it, and then split to see whether there is a further change, and so on.

3.4 BSS-machines without order tests

If we consider total functions, and drop the order test from the signature, the maximum Weihrauch degree reachable is even lower. This is caused by two properties of algebraic sets that are not shared with semi-algebraic sets: every descending chain of algebraic sets eventually stabilises and every proper algebraic subset of an irreducible variety is nowhere dense. These properties will cause any computation tree of an algorithm which computes a total function to be finite.

Proposition 20.

If is BSS-computable over , then . There is a function that is BSS-computable over and satisfies .

Proof.

Let be BSS-computable over . Fix some BSS-machine computing . For a fixed input dimension , consider the computation tree of that machine. We claim that the tree is finite. It then follows that , for we can bound the number of equality tests we need to simulate the machine in terms of the size of the input tuple alone.

If the computation tree is infinite it has an infinite path by Kőnig’s lemma. Each node on the path corresponds to an algebraic set, and the outgoing edge from each node is labelled “” or “”, depending on whether we branch on the condition that the input is in the algebraic set or outside of it. Since the Zariski topology on is Noetherian, there are only finitely many edges labelled with “” in a non-trivial way. By this we mean the following: if we number the nodes on the path with numbers then there exists a number such that for any node on the path which is labelled with a number greater than and whose outgoing edge on the path is labelled with “”, the computation on any input will branch to “” if it reaches this node. Let be the algebraic set which is defined by the nodes with number smaller than whose outgoing edge on the path is labelled with “”. Let be the sequence of algebraic sets which correspond to the nodes whose outgoing edge is labelled with “”. Our goal is to show that there exists with and for all . This means that passes all tests on the infinite branch (since all tests which do not correspond to or one of the ’s are passed automatically), which means that the machine runs forever on input , contradicting the totality of . The set is a finite union of irreducible algebraic sets, at least one of which is not contained in any of the ’s. We can hence assume without loss of generality that is itself an irreducible algebraic variety. The sets are (potentially empty) proper algebraic subsets of and thus have dense open complement in the Euclidean topology on . By the Baire category theorem, their countable union has dense open complement in . In particular, this complement contains a point. This finishes the proof.

For the example , consider the function mapping an input tuple to the set . This function is obviously BSS-computable over , and easily seen to be Weihrauch-equivalent to . ∎

4 On the BSS-Halting problems

Very much in analogy to the (classical) Halting problem and the investigation of the Turing degrees below it (Post’s problem), the BSS-Halting problems are easily seen to be undecidable by the corresponding BSS-machines, and there are rich hierarchies to be found below them [46, 29]. Very much unlike the classical setting, there is a natural undecidable set strictly below the Halting problem, namely .

Let be the Halting problem for BSS-machines having access to , , and potentially additional computable operations and/or as test555Of course, changing the signature changes the set , but as the proof of Theorem 21 is independent of these details, they do not change the Weihrauch degree of .. This means that iff is a Gödel-number for a BSS-machine that on input will eventually halt.

Let be the characteristic function of (into the discrete space ), and be the characteristic function of . Finally, let be defined via iff .

Theorem 21.

The following are Weihrauch-equivalent:

Proof.

Note that , where denotes the set of non-negative rational numbers. Now, is easily established: we just combine the original input with the program for from Proposition 13. This will halt iff the input is rational.

Given the Gödel number of a BSS-machine and a standard name of a point , we construct a sequence of Type-2 algorithms as follows: The algorithm simulates the machine on input until it reaches an equality- or order-test. It then tries to show that the result of the test is “false” with precision parameter (cf. the proof of Proposition 10). Otherwise it assumes that the result of the test is “true” and continues to simulate in this manner. If , we say that refutes within steps if and take different branches on the equality- or order-tests within steps of computation. This defines a relation between the numbers , , and which in general depends on (and not just on ). Note that this relation is decidable relative to .

Now consider the following Type-2 algorithm: Assign a variable . For all pairs do the following: Run the machine for steps. If it doesn’t halt within those steps, write a on the output tape. Test if refutes within steps. If so, put and write a on the output tape. Finally, write a on the output tape, and continue looping.

We claim that the sequence this algorithm produces contains finitely many s if and only if halts on input . Assume that the sequence contains finitely many s. Then there exists such that halts within a finite number of steps and no refutes in any finite number of steps. But this means that correctly simulates on input , for if it erroneously decides a test to be “true”, it will eventually be refuted. Hence, halts on input within a finite number of steps. Conversely, if halts on input , then it makes only finitely many equality- or order-tests before halting. Hence for sufficiently large the algorithm correctly simulates on input , and thus is never refuted and halts after finitely many steps. It follows that our algorithm only writes finitely many s on the output tape.

Hence we can decide if halts on input by applying isInfinite to the output of the algorithm.

Compute the real number with the decimal expansion

where is the th bit of the input. This number is rational, i.e. has a periodic decimal expansion, if and only if the are eventually .

This shows that the role of (local) cardinality for BSS-reducibility demonstrated in [21] depends on the set of operations available in the reduction. Further, note that is easily seen: While is -measurable (cf. e.g. [55]), isInfinite is the characteristic function of a -complete set, thus not even -measurable. By [7], levels of Borel measurability are preserved under Weihrauch reductions. Thus, the inability of BSS-machines to decide their Halting problem already holds for topological reasons (in particular, adding more continuous operations never allows a machine to solve a more restricted Halting problem).

As a side note, we shall point out that isInfinite also is the degree of deciding whether a Type-2 computable function is well-defined on some particular input:

Proposition 22.

Let be defined via iff the -th Type-2 machine produces some on input . Then:

Proof.

Let be an index for the Type-2 machine that copies each from the input to the output, and skips all s. Then .

For the other direction, note that we can simulate the -th Type-2 machine while writing s. Whenever the machine outputs something, we write a . Applying isInfinite to the output produces an answer for isDefined. ∎

5 The Weihrauch degree of sorting and other problems

In this section we will investigate some Weihrauch degrees, in particular the degree of sorting some by order. This degree will turn out to be crucial in characterizing the power of strongly analytic machines later.

Let be a computable, infinite, repetition-free and dense sequence in the complete computable metric space . Let be defined via and if .

Let be defined via iff contains exactly times the bit , and iff contains infinitely many s.

Theorem 23.

for any .

Proof.

Let be the input to . Start testing if . While this is possible, write ’s on the input to Sort. If is ever proven, write a single and proceed to test if instead, while again writing ’s. Repeat indefinitely. The outer reduction witness is given by computable with and .

As long as we find only ’s in the input to Sort, start writing as the input to . If a is read (at time ), we have specified by fixing . As the are dense, we can compute an injective function such that ranges over all in (and we may assume that ). We proceed to write approximations to while we read ’s on the input to Sort. If the next is read, we again compute a suitable subsequence and switch our approximations to the next element, and so on.

Given the output of , we can start by deciding whether it is or not. If it is , the output of Sort must be . If not, then the input to Sort must contain some , and we can search until we find the first one at position . Knowing means we can recover the computable function constructed in the inner reduction witness. Then we test whether the output of is . If so, the output of Sort is . If not, there is a second somewhere in the input at time , etc. ∎

Let be defined via iff contains finitely many s. Let be defined via iff contains infinitely many s. Let be the total continuation of , i.e.  iff .

Proposition 24.
Proof.
[Claim:

] We show instead and appeal to Lemma 3. Given some set , we start writing ’s. In addition, we make sure that we write exactly as many s as the largest number encountered in so far. If is guaranteed to be finite, then the resulting sequence contains only finitely many ’s, and after it was sorted, we can read off how many there are – which returns .

[Claim:

] Given some , let if contains at least s, and otherwise. Then .

[Claim:

] From with .

[Claim:

] From and (see [8, Example 3.10]).

[Claim:

] Sort maps every input to some computable output. maps some computable inputs to non-computable outputs.

[Claim:

] Given , we can compute the set

Apply to obtain some . Now read while writing s. If ever the -st in is found, then the input to must have been the empty set, i.e.  must contain infinitely many s. Switching the output to writing s from then on causes the output to be correct.

That the reduction is strict follows from the fact that (by definition), whereas has a codomain with just elements.

[Claim:

] Let be the map that swaps s and s. Then .

As above, that the reduction is strict follows from the fact that as shown above, whereas has a codomain with just elements.

[Claim:

] As , we find that Sort is -measurable, and so is every function reducible to it (cf. [7]). But is a -complete set.

[Claim:

] Assume that via some witnesses , . By composing with and , we obtain computable