1 Introduction

Machine models formalize computation: they specify means of input, operations, and output of elements from some fixed set \(\varGamma \); as well as measures of cost and of input/output ‘size’; such that Complexity Theory can investigate the dependence of the former on the latter. Problems over spaces X other than \(\varGamma \) are treated by encoding its elements/instances over \(\varGamma \).

Example 1

  1. a)

    Recall the Turing machine model operating on the set \(\varGamma \) of finite (e.g. decimal or binary) sequences, and consider the space X of graphs: encoded for example as adjacency matrices’ binary entries. Operations amount to local transformations of, and in local dependence of, the tape contents. Size here is an integer: n commonly denotes the number of nodes of the graph, or the binary length of the encoded matrix, both polynomially related to each other.

  2. b)

    Consider the space \(X=\mathbb {N}\) of natural numbers, either encoded in binary or in unary: their lengths are computably but not polynomially related, and induce computably equivalent but significantly different notions of computational complexity.

  3. c)

    Recall the type-2 machine model [Wei00, §2.1] operating on the Cantor space \(\mathcal {C}:=\{\texttt {0} ,\texttt {1} \}^\mathbb {N}\) of infinite binary sequences; and the real unit interval \(X=[0;1]\), equipped with various so-called representations [Wei00, §4.1]: surjective partial mappings from \(\mathcal {C}\) onto X that formalize (sequences of) approximations up to any given absolute error bound \(1/2^n\), \(n\in \mathbb {N}\). Different representations of X may induce non-/equivalent notions of computability [Wei00, §4.2].

  4. d)

    Computational cost of a type-2 computation is commonly gauged in dependence of the index position n within the binary input/output sequence, that is, the length of the finite initial segment read/written so far [Wei00, §7.1]. For \(X=[0;1]\) and for some of the representations, this notion of ‘size’ is polynomially (and for some even linearly) related to n occurring in the error bound \(1/2^n\) [Wei00, §7.1]; for other computably equivalent representations it is not [Wei00, Examples 7.2.1+7.2.3].

  5. e)

    Recall the Turing machine model with ‘variable’ oracles [KC12, §3], operating on a certain subset \(\mathcal {B}\) of string functions

    $$ \{\texttt {0} ,\texttt {1} \}^{**} \;:=\; \big \{\varphi :\{\texttt {0} ,\texttt {1} \}^*\rightarrow \{\texttt {0} ,\texttt {1} \}^* \big \} . $$

    The ‘size’ of \(\varphi \in \mathcal {B}\) here is captured by an integer function \(\ell :\mathbb {N}\ni n\mapsto \max \big \{|\varphi (\overrightarrow{x})|:|\overrightarrow{x}|\le n\big \}\in \mathbb {N}\) [KC96]; and polynomial complexity means bounded by a second-order polynomial in \(\ell \in \mathbb {N}^\mathbb {N}\) and in \(n\in \mathbb {N}\) [Meh76].

  6. f)

    Equip the space \(X=\mathcal {C}[0;1]\) of continuous functions \(f:[0;1]\rightarrow \mathbb {R}\) with the surjective partial mapping \(\delta _{\square }:\subseteq \mathcal {B}\twoheadrightarrow X\) from [KC12, §4.3]. Then, up to a second-order polynomial, the ‘size’ \(\ell =\ell (\varphi )\) from (e) is related to a modulus of continuity (cmp. Subsect. 3.1 below) of \(f=\delta _{\square }(\varphi )\in \mathcal {C}[0;1]\) and to the computational complexity of the application operator \((f,r)\mapsto f(r)\) [KS17, KS20, NS20].

  7. g)

    Spaces X of continuum cardinality beyond real numbers are also commonly encoded over Cantor space [Wei00, §3], or over ‘Baire’ space \(\{\texttt {0} ,\texttt {1} \}^{**}\) [KC12, §3]. Matthias Schröder has recommended the Hilbert Cube as domain for partial surjections onto suitable X. Also equilogical spaces serve as such domains [BBS04].

To summarize, computation on various spaces is commonly formalized by various models of computation (Turing machine, type-2 machine, oracle machine) using encodings over various domains (Cantor space, ‘Baire’ space, Hilbert Cube, etc.) with various notions of ‘size’ and of polynomial time.

Question 2

Fix two mathematical structures X and Y, expansions over topological spaces. What machine models, what encodings, what notions of size and polynomial time, are suitable to formalize computation of (multi)functions f from X to Y?

In the sequel we will focus on the part of the question concerned with encoding continuous data. Section 2 recalls classical criteria and notions: qualitative admissibility of computably ‘reasonable’ representations for the Kreitz-Weihrauch Main Theorem (Subsect. 2.1), and complexity parameters for a quantitative Main Theorem in the real case (Subsect. 2.2). Section 4 combines both towards generic quantitative admissibility and an intrinsic complexity-theoretic Main Theorem. The key is to consider metric properties of the inverse of a representation, which is inherently multivalued a ‘function’. To this end Sect. 3 adopts from [PZ13] a notion of quantitative (uniform) continuity multifunctions (Subsect. 3.1) and establishes important properties (Subsect. 3.2), including closure under a generalized conception of restriction. We close with applications to higher-type complexity.

2 Coding Theory of Continuous Data

Common models of computation naturally operate on some particular domain \(\varGamma \) (e.g., in/finite binary sequences, string functions, etc.); processing data from another domain X (graphs, real numbers, continuous functions) requires agreeing on some way of encoding (the elements x of) X over \(\varGamma \).

Formally, a representation is a surjective partial mapping \(\xi :\subseteq \varGamma \twoheadrightarrow X\); any \(\gamma \in {\text {dom}}(\xi )\) is called a name of \(x=\xi (\gamma )\in X\); and for another representation \(\upsilon \) of Y, computing a total function \(f:X\rightarrow Y\) means to compute some \((\xi ,\upsilon )\)-realizer: a transformation \(F:{\text {dom}}(\xi )\rightarrow {\text {dom}}(\upsilon )\) on names such that \(f\circ \xi =\upsilon \circ F\).

Some representations are computably ‘unsuitable’ [Tur37], including the binary expansion \(\varGamma =\{\mathtt{0,1}\}^\mathbb {N}\ni \bar{b}\mapsto \sum _{n=0}^\infty b_n2^{-n-1}\in [0;1]\); cmp. [Wei00, Exercise 7.2.7]. Others are suitable for computability investigations [Wei00, Theorem 4.3.2], but not for complexity purposes [Wei00, Examples 7.2.1+7.2.3].

Example 3

The signed digit representation of [0; 1] is the partial map

Already for the case \(X=[0;1]\) of real numbers, it thus takes particular care to arrive at a complexity-theoretically ‘reasonable’ representation [Wei00, Theorem 7.3.1]; and even more so for continuous real functions [KC12], not to mention for more involved spaces [Ste17].

2.1 Qualitative Admissibility and Computability

Regarding computability on a large class of topological spaces X, an important criterion for a representation is admissibility [KW85, Sch02]:

Definition 4

Call \(\xi :\subseteq \varGamma \twoheadrightarrow X\) admissible  iff  it is (i) continuous and satisfies (ii):

(ii) To every continuous \(\zeta :\subseteq \varGamma \twoheadrightarrow X\) there exists a continuous mapping \(G:{\text {dom}}(\zeta )\rightarrow {\text {dom}}(\xi )\) with \(\zeta =\xi \circ G\); see [Wei00, Theorem 3.2.9.2].

Admissible representations exist (at least) for T\(_0\) spaces; they are Cartesian closed; and yield the Kreitz-Weihrauch (aka Main) Theorem [Wei00, Theorem 3.2.11]:

Fact 5

Let \(\xi :\subseteq \varGamma \twoheadrightarrow X\) and \(\upsilon :\subseteq \varGamma \twoheadrightarrow Y\) be admissible. Then \(f:X\rightarrow Y\) is continuous iff it admits a continuous \((\xi ,\upsilon )\)-realizer \(F:{\text {dom}}(\xi )\rightarrow {\text {dom}}(\upsilon )\).

In particular discontinuous functions are incomputable.

2.2 Real Quantitative Admissibility

The search for quantitative versions of admissibility and the Main Theorem is guided by above notion of qualitative admissibility. It revolves around quantitative metric versions of qualitative topological properties, such as continuity and compactness, obtained via Skolemization. Further guidance comes from reviewing the real case.

Recall that a modulus of continuity of a function \(f:X\rightarrow Y\) between compact metric spaces (Xd) and (Ye) is a strictly increasing mapping \(\mu :\mathbb {N}\rightarrow \mathbb {N}\) such that

$$\begin{aligned} d(x,x')\le 2^{-\mu (n)} \quad \Rightarrow \quad e\big (f(x),f(x')\big )\le 2^{-n} . \end{aligned}$$
(1)

In this case one says that f is \(\mu \)-continuous. Actually we shall occasionally slightly weaken this notion and require Condition (1) only for all sufficiently large n.

Example 6

The signed digit representation \(\sigma :\subseteq \mathcal {C}\twoheadrightarrow [0;1]\) from Example 3 has modulus of continuity \(\kappa (n)=2n\).

Proposition 11d) below provides a converse. Together with Theorem 13 and Lemma 10 below, they yield the following quantitative strengthening of Fact 5 aka qualitative Main Theorem, where \(\mathcal {O}()\) of refers to the asymptotic Landau symbol:

Theorem 7

Fix strictly increasing \(\mu :\mathbb {N}\rightarrow \mathbb {N}\). A function \(f:[0;1]\rightarrow [0;1]\) has modulus of continuity \(\mathcal {O}\Big (\mu \big (\mathcal {O}(n)\big )\Big )\)  iff  it has a \((\sigma ,\sigma )\)-realizer with modulus of continuity \(\mathcal {O}\Big (\mu \big (\mathcal {O}(n)\big )\Big )\).

In particular functions f with (only) ‘large’ modulus of continuity are inherently ‘hard’ to compute; cmp. [Ko91, Theorem 2.19]. This suggests gauging the efficiency of some actual computation of f relative to it modulus of continuity, rather than absolutely [KC12, KS17, KS20, NS20]:

Definition 8

Function \(f:[0;1]\rightarrow [0;1]\) is polynomial-time computable  iff  it can be computed in time bounded by a (first or second order) polynomial in the output precision parameter n and in f’s modulus of continuity.

In the sequel we consider continuous total (multi)functions whose domains are compact: The latter condition ensures them to have a modulus of (uniform) continuity. Moreover computable functions with compact domains admit complexity bounds depending only on the output precision parameter n; cmp. [Ko91, Theorem 2.19] or [Wei00, Theorems 7.1.5+7.2.7] or [Sch03].

3 Multifunctions

Multifunctions are unavoidable in real computation [Luc77]. Their introduction simplifies several considerations; for example, every function \(f:X\rightarrow Y\) has a (possibly multivalued) inverse \(f^{-1}:Y\rightrightarrows X\).

Formally, a partial multivalued function (multifunction) F between sets XY is a relation \(F\subseteq X\times Y\) that models a computational search problem: Given (any name of) \(x\in X\), return some (name of some) \(y\in Y\) with \((x,y)\in F\). One may identify the relation f with the single-valued total function \(F:X\ni x\mapsto \{y\in Y \mid (x,y)\in F\}\) from X to the powerset \(2^Y\); but we prefer the notation \(f\mathpunct {\,:\subseteq }X\rightrightarrows Y\) to emphasize that not every \(y\in F(x)\) needs to occur as output. Letting the answer y depend on the code of x means dropping the requirement for ordinary functions to be extensional; hence, in spite of the oxymoron, such F is also called a non-extensional function. Note that no output is feasible in case \(F(x)=\emptyset \).

Definition 9

Abbreviate with \({\text {dom}}(F) :=\{x \mid F(x)\ne \emptyset \}\) for the domain of F; and \({\text {range}}(F):=\{y\mid \exists x: (x,y)\in F\}\). F is total in case \({\text {dom}}(F)=X\); surjective in case \({\text {range}}(F)=Y\). The composition of multifunctions \(F:\subseteq X\rightrightarrows Y\) and \(G:\subseteq Y\rightrightarrows Z\) is \(G\circ F=\)

$$ \big \{(x,z) \;\big |\; x\in X, z\in Z, F(x)\subseteq {\text {dom}}(G), \;\exists y\in Y: (x,y)\in F\wedge (y,z)\in G \} $$

Call F pointwise compact if \(F(x)\subseteq Y\) is compact for every \(x\in {\text {dom}}(F)\).

Note that every (single-valued) function is pointwise compact. A computational problem, considered as total single-valued function \(f:X\rightarrow Y\), becomes ‘easier’ when restricting arguments to \(x\in X'\subseteq X\), that is, when proceeding to \(f'=f|_{X'}\) for some \(X'\subseteq X\). A search problem, considered as total multifunction \(F:X\rightrightarrows Y\), additionally becomes ‘easier’ when proceeding to any \(F'\subseteq X\rightrightarrows Y\) satisfying the following: \(F'(x)\supseteq F(x)\) for every \(x\in {\text {dom}}(F')\). We call such \(F'\) also a restriction of F, and write \(F'\sqsubseteq F\). A single-valued function \(f:{\text {dom}}(F)\rightarrow Y\) is a selection of \(F:\subseteq X\rightrightarrows Y\) if F is a restriction of f.

Lemma 10

Fix partial multifunctions \(F:\subseteq X\rightrightarrows Y\) and \(G:\subseteq Y\rightrightarrows Z\).

  1. a)

    If both F and G are pointwise compact, then so is their composition \(G\circ F\).

  2. b)

    The composition of restrictions \(F'\sqsubseteq F\) and \(G'\sqsubseteq G\), is again a restriction \(G'\circ F'\sqsubseteq G\circ F\).

  3. c)

    It holds \(F^{-1}\circ F\sqsubseteq {\text {id}}_X:X\rightarrow X\). Single-valued surjective partial \(g:\subseteq X\twoheadrightarrow Y\) furthermore satisfy \(g\circ g^{-1}={\text {id}}_Y\).

  4. d)

    For representations \(\xi \) of X and \(\upsilon \) of Y, the following are equivalent: (i) \(f\circ \xi \) is a restriction of \(\upsilon \circ F\) (ii) f is a restriction of \(\upsilon \circ F\circ \xi ^{-1}\) (iii) \(\upsilon ^{-1}\circ f\circ \xi \) is a restriction of F.

3.1 Quantitative Continuity for Multifunctions

Every restriction \(f'\) of a single-valued continuous function f is again continuous. This is not true for multifunctions with respect to hemicontinuity. Instead Definition 12 below adapts, and quantitatively refines, a notion of continuity for multifunctions from [PZ13] such as to satisfy the following properties:

Proposition 11

  1. a)

    A single-valued function is \(\mu \)-continuous iff it is \(\mu \)-continuous when considered as a multifunction.

  2. b)

    Suppose that \(F:\subseteq X\rightrightarrows Y\) is \(\mu \)-continuous. Then every restriction \(F'\sqsubseteq F\) is again \(\mu \)-continuous.

  3. c)

    If additionally \(G:\subseteq Y\rightrightarrows Z\) is \(\nu \)-continuous, then \(G\circ F\) is \(\nu \circ \mu \)-continuous

  4. d)

    The multivalued inverse of the signed digit representation \(\sigma ^{-1}\) is \(\mathcal {O}(n)\)-continuous.

  5. e)

    For every \(\varepsilon >0\), the soft Heaviside ‘function’ \(h_\varepsilon \) is \({\text {id}}\)-continuous, but not for \(\varepsilon =0\):

    $$ h_\varepsilon (t) \;:=\; \left\{ \begin{array}{rl} 0 &{}: t\le \varepsilon \\ 1&{}: t\ge -\varepsilon \end{array} \right. $$

Our notion of quantitative (uniform) continuity is inspired by [BH94] and [PZ13, §4+§6]:

Definition 12

Fix metric spaces (Xd) and (Ye) and strictly increasing \(\mu :\mathbb {N}\rightarrow \mathbb {N}\). A total multifunction \(F:X\rightrightarrows Y\) is called \(\mu \)-continuous if there exists some \(n_0\in \mathbb {N}\), and to every \(x_0\in X\) there exists some \(y_0\in F(x_0)\), such that the following holds for every \(k\in \mathbb {N}\):

The parameter \(n_0\) is introduced for the purpose of Proposition 11d+e). Recall that also in the single-valued case we sometimes understand Eq. (1) to hold only for all \(n\ge n_0\).

A continuous multifunction on Cantor space, unlike one for example on the reals [PZ13, Fig. 5], does admit a continuous selection, and even a bound on the modulus:

Theorem 13

Suppose (Ye) is compact of diameter \({\text {diam}}(Y)\le 1\) and satisfies the strong triangle inequality

$$\begin{aligned} e(x,z) \;\le \; \max \big \{e(x,y),e(y,z)\big \} \quad \le \; e(x,y)\,+\,e(y,z). \end{aligned}$$
(2)

If \(G:\subseteq \mathcal {C}\rightrightarrows Y\) is \(\mu \)-continuous and pointwise compact with compact domain \({\text {dom}}(G)\subseteq \mathcal {C}\), then G admits a \(\mu \big (n+\mathcal {O}(1)\big )\)-continuous selection.

3.2 Generic Quantitative Main Theorem

Generalizing both Fact 5 and Theorem 7, Lemma 10 and Proposition 11 and Theorem 13 together in fact yields the following quantitative counterpart to the qualitative Main Theorem for generic compact metric spaces:

Theorem 14

Fix compact metric spaces (Xd) and (Ye) of \({\text {diam}}(X), {\text {diam}}(Y)\le 1\). Consider representations \(\xi :\subseteq \mathcal {C}\twoheadrightarrow X\) and \(\upsilon :\subseteq \mathcal {C}\twoheadrightarrow Y\).

Let \(\mu ,\mu ',\nu ,\nu ',\kappa ,K:\mathbb {N}\rightarrow \mathbb {N}\) be strictly increasing such that \(\xi \) is \(\mu \)-continuous with compact domain and \(\mu '\)-continuous multivalued inverse \(\xi ^{-1}:X\rightrightarrows \mathcal {C}\); \(\upsilon \) is \(\nu \)-continuous with compact domain and \(\nu '\)-continuous multivalued inverse \(\upsilon ^{-1}:Y\rightrightarrows \mathcal {C}\).

  1. a)

    If total multifunction \(g:X\rightrightarrows Y\) has a K-continuous \((\xi ,\upsilon )\)-realizer G, then g is \((\nu \circ K\circ \mu ')\)-continuous.

  2. b)

    If total multifunction \(g:X\rightrightarrows Y\) is \(\kappa \)-continuous and pointwise compact, then it has a \(\nu '\circ \kappa \circ \mu \big (n+\mathcal {O}(1)\big )\)-continuous \((\xi ,\upsilon )\)-realizer G.

Following up on Definition 8, this suggests gauging the efficiency of some actual computation of g relative to both it modulus of continuity and moduli of continuity of the representations (and their multivalued inverses) involved.

4 Generic Quantitative Admissibility

According to Theorem 14, quantitative continuity of a (multi)function g is connected to that of a (single-valued) realizer G, subject to properties of the representations \(\xi ,\upsilon \) under consideration.

A ‘true’ quantitative Main Theorem should replace these extrinsic parameters with ones intrinsic to the co/domains XY: by imposing suitable conditions on the representations as quantitative variant of qualitative admissibility [Lim19].

Definition 15

The entropy of a compact metric space (Xd) is the mapping \(\eta =\eta _X:\mathbb {N}\rightarrow \mathbb {N}\) such that X can be covered by \(2^{\eta (n)}\) closed balls \(\overline{{\text {B}}}_n(x)\) of radius \(2^{-n}\), but not by \(2^{\eta (n)-1}\).

Introduced by Kolmogorov [KT59], \(\eta \) thus quantitatively captures total boundedness [Koh08, Definition 18.52]. Its connections to computational complexity are well-known [Wei03, KSZ16].

Example 16

  1. a)

    The d-dimensional real unit cube \(X=[0;1]^d\) has linear entropy \(\eta (n)=\varTheta (dn)\). Cantor space \(\mathcal {C}=\{\texttt {0} ,\texttt {1} \}^\mathbb {N}\), equipped with the metric \(d(\bar{x},\bar{y})=2^{-\min \{n:x_n\ne y_n\}}\), has linear entropy \(\eta (n)=\varTheta (n)\).

  2. b)

    The space \([0;1]'\) of non-expansive (aka 1-Lipschitz) functions \(f:[0;1]\rightarrow [0;1]\) is compact when equipped with the supremum norm and has entropy \(\eta (n)=\varTheta (2^n)\).

  3. c)

    More generally fix a connected compact metric space (Xd) of diameter \({\text {diam}}(X):=\sup \{(d(x,x'):x,x'\in X\}\) with entropy \(\eta \). Then the space \(X'\) of non-expansive functionals \(\varLambda :X\rightarrow [0;1]\) is compact when equipped with the supremum norm and has entropy \(\eta '(n)=2^{\eta (n\pm \mathcal {O}(1))}\).

Items (b) and (c) are relevant for higher-type complexity theory.

Since computational efficiency is connected to quantitative continuity (Subsect. 2.2), in Theorem 14 one prefers \(\xi \) and \(\xi ^{-1}\) with ‘small’ moduli; similarly for \(\upsilon \) and \(\upsilon ^{-1}\). A simple but important constraint has been identified in [Ste16, Lemma 3.1.13]—originally for single-valued functions, but its proof immediately extends to multifunctions.

Lemma 17

If surjective (multi)function \(g:X\rightrightarrows Y\) is \(\mu \)-continuous, then it holds \(\eta _{Y}(n)\le \eta _X\circ \mu (n)\) (for all sufficiently large n).

This suggests the following tentative definition:

Definition 18

Fix some compact metric space \(\varGamma \), and recall Example 1g).

  1. a)

    A representation of compact metric space (Xd) is a continuous partial surjective (single-valued) mapping \(\xi :\subseteq \varGamma \twoheadrightarrow X\).

  2. b)

    Fix another compact metric space \(\Delta \) and representation \(\upsilon :\subseteq \Delta \twoheadrightarrow Y\). A \((\xi ,\upsilon )\)-realizer of a total (multi)function \(f:X\rightrightarrows Y\) is a (single-valued) function \(F:{\text {dom}}(\xi )\rightarrow {\text {dom}}(\upsilon )\) satisfying any/all conditions of Lemma 10d).

  3. c)

    Representation \(\xi :\subseteq \varGamma \twoheadrightarrow X\) is polynomially admissible if (i) It has a modulus of continuity \(\mu \) such that \(\eta _\varGamma \circ \mu \) is bounded by a (first or second order) polynomial in the precision parameter n and in the entropy \(\eta \) of X. (ii) Its multivalued inverse \(\xi ^{-1}\) has polynomial modulus of continuity \(\mu '\).

  4. d)

    Call total (multi)function \(f:X\rightrightarrows Y\) polynomial-time computable  iff  it can be computed in time bounded by a (first or second order) polynomial in the output precision parameter n and in the entropy \(\eta \) of X.

In view of Lemma 10c+d) we deliberately consider only single-valued representations [Wei05]. Item d) includes Definition 8 as well as higher types, such as Example 16b) and c). Note that Item (c i) indeed quantitatively strengthens Definition 4i). And Item (c ii) quantitatively strengthens Definition 4ii): For \(\nu \)-continuous \(\zeta \), Theorem 13 yields a \(\nu \circ \mu '\)-continuous selection G of \(\xi ^{-1}\circ \zeta \), that is, with \(\zeta =\xi \circ G\) according to Lemma 10.