On the computation of geometric features of spectra of linear operators on Hilbert spaces

Computing spectra is a central problem in computational mathematics with an abundance of applications throughout the sciences. However, in many applications gaining an approximation of the spectrum is not enough. Often it is vital to determine geometric features of spectra such as Lebesgue measure, capacity or fractal dimensions, different types of spectral radii and numerical ranges, or to detect essential spectral gaps and the corresponding failure of the finite section method. Despite new results on computing spectra and the substantial interest in these geometric problems, there remain no general methods able to compute such geometric features of spectra of infinite-dimensional operators. We provide the first algorithms for the computation of many of these longstanding problems (including the above). As demonstrated with computational examples, the new algorithms yield a library of new methods. Recent progress in computational spectral problems in infinite dimensions has led to the Solvability Complexity Index (SCI) hierarchy, which classifies the difficulty of computational problems. These results reveal that infinite-dimensional spectral problems yield an intricate infinite classification theory determining which spectral problems can be solved and with which type of algorithm. This is very much related to S. Smale's comprehensive program on the foundations of computational mathematics initiated in the 1980s. We classify the computation of geometric features of spectra in the SCI hierarchy, allowing us to precisely determine the boundaries of what computers can achieve (in any model of computation) and prove that our algorithms are optimal. We also provide a new universal technique for establishing lower bounds in the SCI hierarchy, which both greatly simplifies previous SCI arguments and allows new, formerly unattainable, classifications.


INTRODUCTION
This paper resolves open computational spectral problems related to geometric features of spectra of operators. In other words, we consider the following problem: Are there algorithms that given a bounded 1 operator A ∈ B(l 2 (N)), approximate key geometric features (e.g., spectral gaps, notions of sizes and capacity, measures, topological features such as fractal dimensions, etc.) of the set Sp(A) from a matrix representation of A?
To answer this question, we use the newly established Solvability Complexity Index (SCI) hierarchy [18,51,91], a classification tool that determines the boundaries of what is computationally possible. Classifying spectral problems and providing a library of optimal algorithms 2 remains largely uncharted territory in the foundations of computational mathematics. In exploring this territory, there will, necessarily, have to be many different types of algorithms, as different structures on the various classes of operators and different spectral properties require different techniques.
A famous example of the above question is the almost Mathieu operator on l 2 (Z) (see §4.4): (H α x) n = x n−1 + x n+1 + 2λ cos(2πnα)x n , which induces the Hofstadter butterfly [92]. The almost Mathieu operator plays an important role in physics [104], arising in the study of the quantum Hall effect [160], and has become a laboratory for exploring the spectral properties of ergodic Schrödinger operators [95]. When α is irrational, the Lebesgue measure of the spectrum is 4 |1 − |λ||. This formula was conjectured based on the numerical work of S. Aubry & G. André [8] and became one of B. Simon's problems for the 21st century [146]. It was later proven by A. Avila & R. Krikorian [11]. Similarly, M. Kac's "Ten Martini Problem", that the spectrum is a Cantor set for all irrational α and λ > 0, was conjectured by M. Azbel [13] and also became one of B. Simon's problems. This problem attracted a host of numerical and analytical work (see the summary in [104]), before being proven by A. Avila & S. Jitomirskaya [9]. In both of these examples, we see a crucial interplay between computation, conjecture, and mathematical proof. The above geometric features of spectra play an important role in the physics of the underlying quantum system [90,99,100,147]. The almost Mathieu operator is by no means unique in this regard and there is a growing literature on computational studies of geometric features of spectra in diverse areas of physics [14,68,83,94,103,106,110,120,125,133,138,139,156,161]. However, there is a current lack of rigorous computational theory and convergence analysis, and no known algorithms can tackle general cases. Moreover, the foundations of computation (i.e., what is and what is not computationally possible) for computing geometric features of spectra are almost entirely unexplored.
We solve these open problems and others by providing algorithms that compute geometric features of spectra and by classifying the computational problems in the SCI hierarchy.
The SCI hierarchy: The SCI hierarchy has recently been used to resolve the problem of computing spectra of general bounded operators in infinite dimensions [18,91], and is now being used to explore the foundations of computation in many diverse areas of mathematics [2, 15, 16, 19-23, 30, 52, 53, 55, 57, 59, 60, 64, 140, 141, 166]. 3 Whilst for some classes of operators one can compute spectra with error control [54,60,64], a potentially surprising consequence is that, for general operators, one needs several successive limits to compute the spectrum. Since traditional approaches are dominated by techniques based on one limit, this explains why many computational spectral problems remain unsolved and opens the door to an infinite classification theory. Moreover, this phenomenon is not just restricted to spectral problems but is shared by other areas of computational mathematics. An example is S. Smale's problem of root-finding of polynomials with rational maps [149], which also requires several successive limits as established by C. McMullen [115,116] and P. Doyle & C. McMullen [70]. These results can be expressed in terms of the SCI hierarchy [18], which generalises S. Smale's seminal work [148,150] with L. Blum, F. Cucker, M. Shub [28,29,66], and his program on the foundations of scientific computing and the existence of algorithms. Many other problems in the foundations of computations, such as the work by S. Weinberger [167], can also be viewed in the context of the SCI hierarchy.
The SCI hierarchy is further motivated by computer-assisted proofs. Computer-assisted proofs are rapidly becoming an essential part of modern mathematics [86] and, perhaps surprisingly, non-computable problems can be used in computer-assisted proofs. Examples include the recent proof of Kepler's conjecture (Hilbert's 18th problem) [87,88] on optimal packings of 3-spheres, led by T. Hales, and the Dirac-Schwinger conjecture on the asymptotic behaviour of ground states of certain Schrödinger operators, proven in a series of papers by C. Fefferman and L. Seco [72][73][74][75][76][77][78][79][80]. Both of these proofs rely on computing non-computable problems. This apparent paradox can be explained by the SCI hierarchy (the Σ A 1 and Π A 1 classes described below become available for computer-assisted proofs); Hales, Fefferman and Seco implicitly prove Σ A 1 classifications in the SCI hierarchy in their papers. Some of the problems we consider also lie in Σ A 1 ∪ Π A 1 , meaning that they can be used for computer-assisted proofs.
The problems addressed in this paper: The algorithms we provide are sharp in the SCI hierarchy, meaning that they realise the boundaries of what computers can achieve. Table 1 provides a summary of the main SCI classifications of this paper. The main theorems are contained in §3, including further motivations and classifications for different classes of operators. We provide resolutions to the following problems: (i) Computing spectral radii, essential spectral radii, polynomial operator norms and capacity of spectra.
The spectral radius is perhaps the most basic geometric property of spectra and arises in stability analysis. We show that computing the spectral radius is high up in the SCI hierarchy for non-normal operators. In fact, it has the same classification in the SCI hierarchy for general bounded operators as that of computing the spectrum itself. Classifications are given for different types of operators (e.g., known column decay, control on resolvent norms) and also for the essential spectral radius. In many cases, the problem of computing polynomial operator norms is easier in the sense of SCI hierarchy. We also consider the problem of computing the logarithmic capacity of the spectrum, following the work of P. Halmos [89], which has applications in orthogonal polynomials, approximation theory and when studying the convergence of Krylov methods (see, for example, the work of O. Nevanlinna [121][122][123] and U. Miekkala & O. Nevanlinna [117]). (ii) Computing essential numerical ranges, gaps in essential spectra, and determining whether spectral pollution occurs on sets. We provide classification results for the essential numerical range, which also hold in the case of unbounded operators. In connection with computing spectra, there has been a substantial effort in studying the finite section method and locating gaps in essential spectra of operators (see the discussion in §3.4). When using the finite section method to approximate spectra of self-adjoint operators, spurious eigenvalues, known as spectral pollution, can occur anywhere within these gaps. Paradoxically, we show that determining if spectral pollution occurs on a given set is strictly harder in the sense of the SCI hierarchy than computing the spectrum itself. Hence, computing a failure flag for the finite section method is, in a certain sense, strictly harder than solving the original problem for which it was designed. Moreover, we establish the SCI of detecting gaps in essential spectra of self-adjoint operators, a problem that arises in areas such as perturbation theory and defect models. (iii) Computing Lebesgue measure of spectra and pseudospectra, and determining if the spectrum is Lebesgue null. An important property of the spectrum is its Lebesgue measure, with recent progress in the field of Schrödinger operators with random or almost periodic potentials [9,11,12,17,135]. If the spectrum of an operator is Lebesgue null, then this implies the absence of absolutely continuous spectra 4 , which is related to transport properties if the operator represents a Hamiltonian. Whilst results are known for specific onedimensional examples such as the almost Mathieu operator [11] or the Fibonacci Hamiltonian [154], very little is known in the general case or higher dimensions. This is reflected by the difficulty of performing rigorous numerical studies, despite many examples studied in the physics literature (see the references in [10,24,147]). We provide the first algorithms for computing the Lebesgue measure of spectra and pseudospectra, and determining if the spectrum is Lebesgue null, for many different classes of operators. (iv) Computing fractal dimensions of spectra. Fractal dimensions of spectra are important in many applications. For example, in quantum mechanics, they lead to upper bounds on the spreading of wavepackets and are related to time-dependent quantities associated with wave functions [90,99,100]. Fractal spectra appear in a wide variety of contexts, such as exciting new results in multilayer materials (e.g., bilayer graphene) [68,83,94,133], strained materials [120,139] or quasicrystals [14,103,106,156]. Another well-studied area where fractal spectral properties appear is optics [125,138], following the analytical and numerical work of M. Berry and coauthors [25][26][27]. Despite the physical importance of fractal dimensions, analytical results are known only for a limited number of specific models. Moreover, there are currently no algorithms for computing fractal dimensions of spectra for general operators, or even tridiagonal self-adjoint operators. We provide the first algorithms for computing the box-counting and Hausdorff dimensions of spectra for many different classes of operators.
Contributions to the SCI hierarchy itself: Our final contribution is a new tool to prove lower bounds (impossibility results) in the SCI hierarchy. This is crucial for some of the classifications of the above problems, and holds regardless of the model of computation. We show that for a certain special class of combinatorial problems, the SCI hierarchy is equivalent to the Baire hierarchy from descriptive set theory (this equivalence does not hold in general). By embedding these combinatorial problems into spectral problems 5 , we provide the first technique for dealing with problems that have SCI greater than three, and also greatly simplify the proofs of results lower down in the SCI hierarchy. However, it should be stressed that this is not a paper on descriptive set theory or mathematical logic. Our discussion is entirely self-contained and written for a wide audience from a primarily computational background.
Outline of paper: In §2, we provide a brief summary of the SCI hierarchy and define the classes of operators for the interpretation of Table 1 and the main results. A detailed discussion of the SCI hierarchy is delayed until §5.1. In §3, we summarise our main results on the classification of computational spectral problems. Computational examples are then given in §4. For example, we provide numerical evidence that a portion of the spectrum of the graphical Laplacian on an infinite Penrose tile is Lebesgue null and fractal, with a fractal dimension of approximately 0.8, and that the whole spectrum has a logarithmic capacity of approximately 2.26. Mathematical preliminaries, including definitions of the SCI hierarchy and the new tool to provide lower bounds in the SCI hierarchy, are presented in §5. Proofs of our results are given in §6- §9. To make the paper self-contained, we include a short appendix on the results/algorithms of [64], which are used in some of our proofs. Pseudocode for many of the new algorithms is provided in Appendix B. We use to denote the end of a proof and to denote the end of a remark.

ESSENTIALS OF THE SCI HIERARCHY AND PRELIMINARY DEFINITIONS
2.1. A brief introduction to the SCI Hierarchy. 4 For algorithms that compute spectral measures and decompositions, see [53,61,63] and their recent physical applications in [62,97]. 5 This technique is not restricted to spectral problems -it can be adapted to other scenarios.  Table 3 for the operator classes).
2.1.1. Description of the SCI Hierarchy. First, we define a computational problem. The basic objects of a computational problem are: • Ω, called the domain, • Λ, a set of complex-valued functions on Ω, called the evaluation set, • (M, d), a metric space, • Ξ : Ω → M the problem function.
The set Ω is the set of objects that give rise to our computational problems, the goal being to compute the problem function Ξ : Ω → M. The set Λ is the collection of functions that provide us with the information we are allowed to read as input to the algorithm. This leads to the following definition: The definition of a computational problem is deliberately general. The SCI of a computational problem is the smallest number of successive limits needed to compute the solution to the problem. We call a corresponding suitably indexed family of algorithms a 'tower of algorithms'. In addition, we will use finer notions of error control. For example, consider the case that (M, d) is the space of non-empty compact subsets of C, equipped with the Hausdorff metric. Then, the SCI hierarchy [18,51] can be described as follows.
The SCI hierarchy: Given a collection C of computational problems, is the set of problems that can be computed in finite time (the SCI = 0). In other words, there exists an algorithm Γ such that Γ(A) = Ξ(A) for all A ∈ Ω.
Remark 2.2 (Computability, not complexity). It is important to note that (despite its name) the SCI hierarchy is a hierarchy for classifying computability, not complexity. Most computational spectral problems of interest are / ∈ ∆ 1 in the SCI hierarchy, and complexity theory only makes sense for problems in ∆ 1 . Hence, it is impossible to build a complexity theory for most infinite-dimensional spectral problems. The scientific community computes with non-computable problems ( / ∈ ∆ 1 ) on a daily basis (e.g., in quantum mechanics). This also happens in high-profile computer-assisted proofs (see below). FIGURE 1. Meaning of Σ 1 and Π 1 convergence for problem function Ξ computed in the Hausdorff metric. The red areas represent Ξ(A), whereas the green areas represent the output of the algorithm Γ n (A). Σ 1 convergence means convergence as n → ∞ but each output point in Γ n (A) is at most distance 2 −n from Ξ(A). Similarly, in the case of Π 1 , we have convergence as n → ∞ but any point in Ξ(A) is at most distance 2 −n from Γ n (A).

2.1.2.
The model of computation α. The α in the superscript indicates the model of computation, which is described in §5.1. For α = G, the underlying algorithm is general (see Definition 5.1) and can use any tools at its disposal. The reader may think of a Blum-Shub-Smale (BSS) machine or a Turing machine with access to any oracle, although a general algorithm is even more powerful. However, for α = A this means that only arithmetic operations and comparisons are allowed. In particular, if rational inputs are considered, the algorithm is a Turing machine, and in the case of real inputs, a BSS machine. Hence, a result of the form Indeed, a / ∈ ∆ G k result is universal and holds for any model of computation. Moreover, and similarly for the Π k and Σ k classes. In this paper we prove lower bounds for α = G and upper bounds for α = A, thus obtaining the strongest results. Remark 5.12 discusses further how the model of computation is of less importance in infinite dimensions.

2.1.3.
Computer-assisted proofs. The class of problems ∆ A 1 are precisely those that are computable according to Turing's definition of computability (i.e., there exists an algorithm such that for any > 0 the algorithm can produce an -accurate output). However, most infinite-dimensional spectral problems are / ∈ ∆ A 1 . The simplest example is the problem of computing spectra of infinite diagonal matrices. Very few interesting infinite-dimensional spectral problems are actually in ∆ A 1 , and most of the literature on spectral computations provides algorithms that yield ∆ A 2 classification results. Such algorithms converge, but may not provide error control. In many cases, error control is impossible.
Problems not in ∆ A 1 are a daily occurrence in the sciences due to suggestive numerical simulations or evidence based on experiments. However, in the field of computer-assisted proofs, this is not possible, since only 100% rigour is accepted. Nevertheless, there are many examples of famous conjectures that have been proven using computational problems that do not lie in ∆ A 1 . For example, the proof of Kepler's conjecture (Hilbert's 18th problem) [87,88] relies on decision problems that are not in ∆ A 1 [15]. Another example is C. Fefferman and L. Seco's proof of the Dirac-Schwinger conjecture on the asymptotics of ground states of certain Schrödinger operators [72][73][74][75][76][77][78][79][80]. The reason for this apparent paradox is that the Σ A 1 and Π A 1 classes are larger than ∆ A 1 , but can still be used in computer-assisted proofs. Both of the above examples implicitly prove Σ A 1 classifications. For example, suppose we have a computational spectral problem that lies in Σ A 1 . This means that there is an algorithm that will converge and never provide incorrect output, up to a userspecified error bound. Thus, conjectures about operators never having spectra in a certain area (a common Evaluation set Information available to algorithm Meaning problem in many problems of stability analysis, for example) could be disproved by a computer-assisted proof. Recent results using computer-assisted proofs in spectral theory include [33,111].

2.2.
Evaluation sets and domains. Throughout this paper, unless otherwise specified, A will be a bounded operator acting on the canonical Hilbert space l 2 (N) (we define Ω B := B(l 2 (N))), and realised as a matrix with respect to the canonical basis. However, the results of this paper extend to general separable Hilbert spaces H through a choice of orthonormal basis e 1 , e 2 , . . . if one can compute the matrix values of the operators with respect to this basis (see the discussion of the evaluation sets below). For example, we can treat operators naturally defined on lattices such as Z d , or more generally on graphs. Such operators are abundant in mathematical physics. Below we give the evaluation sets and classes of operators treated in this paper. For convenience, this information is summarised in Tables 2 and 3. Evaluation sets: We consider two natural sets of information that our algorithms can read. The first, Λ 1 , provides the entries of the matrix representation of A with respect to the canonical basis {e i } i∈N : The second, Λ 2 , appends Λ 1 with the entries of the matrix representations of A * A and AA * with respect to the canonical basis {e i } i∈N : We include Λ 2 since it is natural for problems posed in variational form, and can often be evaluated through numerical integration. When considering classes with functions f (and {c n }) and g as in (2.2) and (2.3) below, we will add these to the relevant evaluation set (evaluating g at rational points) and with an abuse of notation still use the notation Λ i . A small selection of the problems also require additional information, such as when testing if a set intersects a spectral set, but any changes to Λ i will be pointed out where appropriate.

Classes of operators:
Let Ω N denote the class of normal operators in Ω B , Ω SA denote the class of selfadjoint operators in Ω N , and Ω D denote the class of self-adjoint diagonal operators in Ω SA . For f : N → N, f (n) ≥ n + 1 define where P m is the orthogonal projection onto span{e 1 , . . . , e m }. Given such an f , we assume access to an estimate D f,n (A) ≤ c n (A) ∈ Q ≥0 , where c n → 0 as n → ∞. We let Ω f denote the class of bounded operators with known function f and {c n }. 6 As a special case, if we know our matrix is sparse with finitely many non-zero entries in each column and row (and we know the positions of the non-zero entries) then we know an f with c n = 0. Let g : R + → R + be a strictly increasing, continuous function that vanishes only at 0 with lim x→∞ g(x) = ∞. Let Ω g be the class of bounded operators with A simple compactness argument shows that such a g always exists for any given A ∈ Ω B . However, the classification of spectral problems in the SCI hierarchy generally depends on whether one knows an estimate for g or not. For example, in the self-adjoint and normal cases, g(x) = x is the trivial choice of g. Operators with g(x) = x are known as G 1 and include the well studied class of hyponormal operators (operators with A * A − AA * ≥ 0) [136]. A common assumption is that for some constant C, which is equivalent to A ∈ Ω g with g(x) = x/C. For example, if A is similar to a normal operator with a similarity transformation S that has bounded condition number κ(S), we can take C = κ(S). Other examples with non-linear g include perturbations of self-adjoint operators [84, e.g., Theorem 7.7.1]. More generally, one can view the function g as a measure of stability of the spectrum of A through the formula where Sp (A) denotes the ( -)pseudospectrum of A [162]. The function g is held fixed for a given class Ω g and a smaller g leads to a larger class of operators Ω g .

MAIN RESULTS: THE FOUNDATIONS OF COMPUTING GEOMETRIC FEATURES OF SPECTRA
Our results classify computing geometric features of spectra in the SCI hierarchy. In other words, we are concerned with the foundations of computation for geometric features of spectra. There are two aspects of this classification: proving impossibility results (lower bounds), where we make use of the tools developed in §5 and Theorem 5.19, and proving upper bounds through the construction of algorithms. This ensures that our algorithms realise the boundary of what computers can achieve in spectral computations. We have included routines for some of the main algorithms in Appendix B and computational examples in §4.
where σ inf denotes the smallest singular value or injection modulus: The functions γ n converge to the resolvent norm R(z, A) −1 uniformly on compact subsets of C from above as n → ∞. This idea was crucial in [60,64] to compute spectra with Σ A 1 error control for a large class 6 Sometimes the sequence {cn} is not needed and we will explicitly mention when this is the case. of operators. A theme of some of our proofs, especially those concerning Lebesgue measure and fractal dimensions, is the extension of these ideas to compute geometric properties of the spectrum.
3.1. Spectral radii. We begin with a very simple geometric feature of the spectrum. The spectral radius, r(A), of a bounded operator A is the supremum of the absolute values of members of the spectrum, which is attained. Spectral radii commonly appear in applications involving stability analysis. We set Ξ r (A) := r(A) and make the following initial observations: (i) One can easily show that the computational problem of the operator norm of any A ∈ Ω B lies in Σ A 1 . Hence, since r(A) ≤ A , we can easily get an upper bound for Ξ r (A) in one limit. Of course, if A is not normal, this upper bound may not agree with Ξ r (A).
(ii) If an operator lies in Ω g with g(x) = x, then the convex hull of the spectrum is equal to the closure of the numerical range (recall that the numerical range is { Ax, x : x = 1}) [131]. Such operators are known as convexoid and the problem of computing Ξ r (A) for such operators lies in Σ A 1 . (iii) In light of Gelfand's famous formula Ξ r (A) = lim n→∞ A n 1 n , one might expect that the computation of Ξ r (A) is strictly easier in the sense of the SCI hierarchy than that of the spectrum.
The following shows that the intuition in (iii) is misguided in general, and only occurs if an operator is convexoid as in (ii). Computing Ξ r (A) is just as hard as computing the spectrum for the class Ω B . Controlling the resolvent via a function g as in (2.3) makes the problem easier in the sense of SCI hierarchy than the general class Ω B , but is not sufficient to reduce the SCI of the problem to 1. Theorem 3.3. Let g : R + → R + be a strictly increasing, continuous function that vanishes only at 0 with lim x→∞ g(x) = ∞. In addition, suppose that g(x) ≤ (1 − δ)x for some δ ∈ (0, 1). Then: When considering the evaluation set Λ 2 , the only changes are the following classifications: Remark 3.4. The Π A 2 algorithm for {Ξ r , Ω f } does not need a null sequence {c n } bounding the dispersion, D f,n (A) ≤ c n , to be sharp in the SCI hierarchy since this is absorbed in the first limit.
Remark 3.5. The proofs of the lower bounds in Theorem 3.3 for Ω g require g with the stated additional property and δ > 0. In particular, the lower bound does not cover the smaller class of G 1 operators.
3.2. Essential spectral radii. Next, we consider the essential spectral radius. Define the essential spectrum of A ∈ Ω B as where Ω K denotes the class of compact operators. The essential spectral radius, Ξ er (A), is simply the supremum of the absolute values over Sp ess (A).
Theorem 3.6. We have the following classifications for i = 1, 2: Whereas, for general operators, 3.3. Capacity and polynomial operator norms. Given a polynomial p of degree at least two 7 , we consider the problem of computing Ξ r,p = p(A) and the capacity of the spectrum defined by A theorem of Halmos shows that this definition of capacity agrees with the usual potential-theoretic definition of capacity of the set Sp(A) [89]. Roughly speaking, the capacity measures the ability of Sp(A) to hold electrical charge. We will also see some other measures of size in §3.5 and §3.6. The capacity of the spectrum is of particular interest in Krylov methods where, for instance, it is related to the speed of convergence 8 [117,119,[121][122][123]. The capacity is also an important object in local spectral theory [1,105,119], and related work [48,124] includes methods for computing the polynomially convex hull of an operator. The following theorem provides the relevant SCI classifications.
Theorem 3.7. We have the following classifications for i = 1, 2 andΩ = Ω D or Ω f : The proof shows these problems have the same classifications for Ω SA as Ω N . Somewhat surprising is the result that the computation of p(A) requires two successive limits for self-adjoint operators. The proof shows that one reason for this is spectral pollution associated with finite section methods.
3.4. Essential numerical range, gaps in essential spectra and detecting failure of finite section. We now consider geometric features of spectra that are related to the finite section method, the most intensely studied computational method of approximating spectra [35,36,40,41]. 9 The basic form of the finite section method approximates the spectrum of A by Sp(P n A| PnH ), where {P m } is a sequence of finite-dimensional projections converging strongly to the identity as m → ∞. The computation is often done with finite element, finite difference or spectral methods by discretising the operator on a suitable finite-dimensional space [31,32,47,50,102,108,137,168]. Even when A is self-adjoint, spurious eigenvalues, that have nothing to do with Sp(A), can accumulate anywhere within gaps of the essential spectrum as n → ∞. 10 This is known as spectral pollution. More precisely, the essential numerical range of A ∈ Ω B is defined as where W (A) = { Ax, x : x = 1} is the usual numerical range. 11 We recall the following two theorems.
Theorem 3.8 (Pokrzywa [132]). Let A ∈ B(H) and let {P n } be a sequence of finite-dimensional projections converging strongly to the identity. Suppose that S ⊂ W e (A). Then there exists a sequence {Q n } of finitedimensional projections such that P n < Q n (so Q n → I strongly) and d H (Sp(P n A| PnH ) ∪ S, Sp(Q n A| QnH )) → 0, as n → ∞, 7 We fix the polynomial p for the strongest possible negative results. However, the existence of the towers of algorithms also holds when considering the polynomial p itself as an input. 8 This is an idealisation since the capacity studies operator norms while true Krylov processes look at p(A)x with one or several vectors x. However, from local spectral theory (e.g., [118]) it follows that, generically, the asymptotic speeds are the same. 9 W. Arveson [3][4][5][6][7] and N. Brown [42][43][44] pioneered spectral computations from the point of view of C * -algebras, both for the general spectral computation problem as well as for Schrödinger operators. This combination can be traced back to the work of A. Böttcher & B. Silberman [39]. Arveson also considered spectral computation in terms of densities, which is related to Szegö's work [155] on finite section approximations. 10 Even when the finite section method converges, it typically only yields ∆ A 2 classifications in the SCI hierarchy [37,38,45,46]. 11 If A is hyponormal, then We(A) is the convex hull of the essential spectrum [142].
where d H denotes the Hausdorff distance. Theorem 3.9 (Pokrzywa [132]). Let A ∈ B(H) and let {P n } be a sequence of finite-dimensional projections converging strongly to the identity. If λ / ∈ W e (A) then λ ∈ Sp(A) if and only if dist(λ, Sp(P n A| PnH )) → 0, as n → ∞.
Theorems 3.8 and 3.9 show that spectral pollution is confined to the essential numerical range and can be arbitrarily bad in W e (A)\Sp(A). 12 For self-adjoint operators, the gaps in the essential spectrum correspond exactly to W e (A)\Sp(A). As a result, there has been considerable attention towards methods that detect gaps in essential spectra and eigenvalues within these gaps [31,49,108,144], as well as studying the precise nature of spectral pollution [107,112,113,137].
A consequence of the main result of this section, Theorem 3.10, is that detecting these gaps is strictly harder in the sense of the SCI hierarchy than computing the spectrum for self-adjoint operators (which was classified in [18,60,64]). We define the problem function Ξ we (A) = W e (A). For a given non-empty open set U in F (with F being C or R), let Ξ F poll be the decision problem Ξ F poll decides whether spectral pollution can occur on the closed set U . For the self-adjoint case and F = R, this is equivalent to asking whether there exists a point in the open set U that also lies in a gap of the essential spectrum. To incorporate U into Λ i , we allow access to a countable number of open balls {U m } m∈N whose union is U .
Furthermore, for i = 1, 2 the following classifications hold, valid also if we restrict to the case U = U 1 or to U = U 1 = F: Remark 3.11 (Computing spectra is easier than algorithmically determining if spectral pollution can occur on a set). One can show that {Sp(·), Ω SA , Λ 1 } ∈ Σ A 2 and {Sp(·), Ω SA , Λ 2 } ∈ Σ A 1 . Hence determining Ξ R poll is strictly harder than the spectral computational problem and requires two additional successive limits if Λ = Λ 2 . Even in the general case, {Sp(·), Ω B , Λ 2 } ∈ Π A 2 and hence the spectral problem is strictly easier in the sense of SCI hierarchy. The proofs also make clear that we get the same classification of Ξ F poll for other classes such as Ω N , Ω g etc. Remark 3.12 (Unbounded operators). In §7.1, we show that computing the essential numerical range for closed unbounded operators T on l 2 (N) (under the condition that the linear span of the canonical basis forms a core of T ) also lies in Π A 2 . The definition of the essential numerical range for such operators was recently given in [34]. This paper showed that W e (T ) consists precisely of the essential spectrum of T together with all possible spectral pollution that may arise by applying projection methods to approximate the spectrum of T , thus generalising Theorems 3.8 and 3.9. A computational example is given in §4.2. 12 In the non-normal case it is possible for finite sections to not capture all of the spectrum -parts of the spectrum may be unattainable. This is distinct from spectral pollution. Theorem 3.8 says that, up to a different choice of projections, this can be avoided on We(A).

3.5.
Lebesgue measure of spectra. A basic property of the set Sp(A), also connected to physical applications, is its Lebesgue measure. Well-studied operators such as the almost Mathieu operator at critical coupling [11] or the Fibonacci Hamiltonian [154] have spectra with Lebesgue measure zero. Following [8], there have been many further numerical studies [157][158][159]. For further examples of operators with numerical approximations of the Lebesgue measure, see the references in [10,24,147]. Numerical studies typically look at periodic approximates [134], and computing the Lebesgue measure of periodic approximates of tridiagonal operators lies in ∆ A 1 . The tools we develop are more general and do not assume such structure. Verification of our algorithms for the almost Mathieu operator is presented in §4.4.
The Lebesgue measure on C will be denoted by Leb. When considering classes of self-adjoint operators, we use the Lebesgue measure on R denoted by Leb R . We also define (1) Given A ∈ Ω, can we compute Leb(Sp(A))?
For the first two questions, we consider the metric space ([0, ∞), d) with the Euclidean metric. For question three we consider the discrete metric on {0, 1}, where 1 is interpreted as "Yes", and 0 as "No". We denote the above problem functions by Ξ L 1 , Ξ L 2 and Ξ L 3 , respectively. In analogy to computing spectra and pseudospectra, Ξ L 2 is the easiest to compute and can be done in one limit for a large class of operators. It also follows from the dominated convergence theorem that Theorem 3.13 (Lebesgue measure of spectra). Given the above set-up, we have the following classifications and for Ω = Ω B , Ω SA , Ω N or Ω g , The algorithm constructed in the proof of Theorem 3.13 is local, and can be adapted to find the Lebesgue measure of Sp(A) intersected with any compact interval or cube in one or two dimensions, respectively. Moreover, when considering Ω f , we do not need the sequence {c n }, and the algorithm can be restricted to R, where it converges to Leb R (Sp(A) ∩ R). Our results also hold when considering bounded diagonal operators (dropping the restriction of self-adjointness) and using Leb instead of Leb R .
We now turn to the SCI classification of Leb( Sp (A)), which is useful since it provides a route to computing Leb(Sp(A)) for any A ∈ Ω B via (3.3). This is a similar state of affairs to the computation of the spectrum itself -one can approximate the spectrum via pseudospectra.
Theorem 3.14 (Lebesgue measure of pseudospectra). Given the above set-up, we have the following classi- 13 We consider the computation of Leb( Sp (A)) instead of Leb(Sp (A)) since it is not clear that the level sets and for Ω = Ω B , Ω SA , Ω N or Ω g , Why is Ξ L 2 easier to compute than Ξ L 1 ? Heuristically, the pseudospectrum is less refined than the spectrum, making the measure easier to approximate. Another viewpoint is the continuity points of the maps Ξ L 1 and Ξ L 2 . For simplicity, consider these maps restricted to Ω D and equip these diagonal operators with the operator norm topology. The following shows that Ξ L 2 is more stable than Ξ L 1 , explaining why it is easier to approximate. Again, this is the same state of affairs as comparing Sp(A) and Sp (A) as sets.
Proposition 3.15. In the above set-up, the following hold: Finally, when computing Ξ L 3 , we let (M, d) be the set {0, 1} endowed with the discrete topology and consider the problem function It is straightforward to build a family of algorithms that converge in three successive limits for this problem using the algorithm constructed in Theorem 3.13 and its monotonicity. The next theorem shows that this is optimal, even for the set of diagonal self-adjoint bounded operators. This demonstrates how hard it is to solve decision problems about the spectrum with finite amounts of information, particularly when the problems involve an object that ignores countable sets, such as the Lebesgue measure.
Theorem 3.16 (Is the spectrum Lebesgue null?). Given the above set-up, we have the following classifications Remark 3.17. These are the first examples of computational spectral problems that require four successive limits to compute in the SCI hierarchy. To prove this, we need some tools from descriptive set theory in §5. Note that we prove the lower bounds for general algorithms, so regardless of the model of computation.
3.6. Fractal dimensions of spectra. When considering operators from physical models, such as Schrödinger operators in quantum mechanics, fractal dimensions of spectra are related to important physical phenomena, such as the spreading of an initially localised wavepacket [101]. Further applications and numerical studies have already been discussed in §1. However, estimating the fractal dimension is extremely difficult. This can be explained by the SCI hierarchy -the SCI > 1, even for computing the box-counting dimension, the most basic definition of fractal dimension. The Hausdorff dimension is even worse and has SCI ≥ 3. In this section, we exclusively treat self-adjoint operators and hence seek fractal dimensions of Sp(A) ⊂ R. 14 Box-Counting Dimension: Let F be a bounded set in R and let N δ (F ) be the number of closed intervals of length δ > 0 required to cover F . We define the upper and lower box-counting dimensions as 14 The proofs for general self-adjoint operators can be adapted with an additional successive limit and the use of two-dimensional covering boxes to treat the class of general bounded operators. Some care is needed to deal with the boundaries of covering boxes for the Hausdorff dimension, but we omit the details.
When dim B (F ) = dim B (F ), we can replace the lim inf and lim sup by lim, and the common value is the box-counting dimension dim B (F ), an example of a fractal dimension. A possible drawback of the boxcounting dimension is its lack of countable stability. For example, dim B ({0, 1, 1/2, 1/3, . . .}) = 1/2.
Let Ω BD f be the class of self-adjoint operators in Ω f (see (2.2)) whose upper and lower box-counting dimensions of the spectrum agree. Let Ω BD SA be the class of self-adjoint operators whose upper and lower box-counting dimensions of the spectrum agree, and denote by Ω BD D the class of diagonal operators in Ω BD SA . Hausdorff Dimension: A more complicated, yet robust notion of fractal dimension is related to the Hausdorff measure [71,114]. Let F ⊂ R n be a bounded Borel set and let C δ (F ) denote the class of (countable) δ-covers 15 of F . One first defines the quantities (for d ≥ 0) There is a unique With these definitions in hand, we can now present the main theorem of this section.
Remark 3.19 (When dim B (Sp(A)) = dim B (Sp(A))). The algorithms for Ξ B also converge without the assumption that the upper and lower box-counting dimensions of Sp(A) agree, to a quantity Γ(A) with One of the properties that makes the Hausdorff dimension harder to compute than the box-counting dimension is its countable stability, meaning that if F is countable then dim H (F ) = 0.
Remark 3.20. Some of our results have interpretations for real bounded sequences. Given such a sequence {a i } i∈N ⊂ R, we can ask the same questions about {a 1 , a 2 , . . .} as we have asked about the spectrum. We can embed these problems as spectral problems for the class Ω D of bounded self-adjoint diagonal operators by simply considering diagonal operators with entries {a 1 , a 2 , . . .}. Theorems 3.13, 3.16 and 3.18 immediately then give the classifications. With regards to fractal dimensions, the key problem is to try and relate the amount of data that has been seen to the resolution obtained from the data (as highlighted in the computational example below). Once we have the framework of the SCI, we can immediately see why the problem is so difficult -the computational problem requires three successive limits for the Hausdorff dimension.
Finally, the following lemma is used in the construction of the tower of algorithms for computing the Hausdorff dimension but is interesting in its own right so is listed here.

a finite open interval and let
A ∈ Ω f ∩ Ω SA . Then determining whether Sp(A) ∩ (a, b) = ∅ using Λ i is a problem with SCI A = 1. Furthermore, we can design an algorithm that halts if and only the answer is "Yes", that is, the problem lies in Σ A 1 . Similarly the problem lies in Σ A 2 when considering Ω SA with Λ 1 (or Σ A 1 when we allow access to Λ 2 ).

COMPUTATIONAL EXAMPLES
In this section, we demonstrate that the SCI-sharp algorithms constructed in this paper can be efficiently implemented for large-scale computations. Moreover, the algorithms have desirable convergence properties, converging monotonically or being eventually constant, as captured by the Σ/Π classification. Generically, this monotonicity holds in all of the successive limits, and not just the final limit; many of the towers of algorithms undergo oscillation phenomena where each subsequent limit is monotone but in the opposite sense/direction than the limit beforehand. We can take advantage of this when analysing the algorithms numerically. The algorithms also highlight suitable information that lowers the SCI classification to Σ 1 /Π 1 . Other advantages of the algorithms based on approximating the resolvent norm include locality, numerical stability and speed/parallelisation. In the examples that follow, we remind the reader what each parameter n k intuitively does in the relevant algorithm and simplified routines for many of the algorithms can be found in Appendix B. Finally, we point the reader to Remark 5.12 -all of the algorithms can be implemented rigorously using arithmetic operations over the rationals or with methods such as interval arithmetic.

Spectral radius.
We begin with the spectral radius and consider the upper-triangular non-normal operator on l 2 (Z) defined by its action on the canonical basis via In this case, the operator norm of A is 2 and the approximation of the spectrum by finite section is {0}. Hence, to compute the spectral radius, one must resort to the techniques used in our algorithms based on rectangular truncations. Recall that the SCI classification for computing the spectral radius of such operators (where the dispersion is known) is Π A 2 (see Theorem 3.3 for further classifications). The first parameter, n 1 , controls the size of the rectangular truncation 16 (as well as the grid resolution), whereas the second, n 2 , controls the resolvent norm cut-off ( = 1/n 2 ). Figure 2 (left) shows the output of Γ n2,n1 (A) for computing the spectral radius. We see the expected monotonicity; Γ n2,n1 (A) is increasing in n 1 but decreasing in n 2 . It appears that lim n1→∞ Γ 10 2 ,n1 (A) ≈ lim n1→∞ Γ 10 3 ,n1 (A) ≈ 1.4149. The fact that these two values for different n 2 are similar suggests that we have reached convergence. Though, of course, the proof that the problem does not lie in ∆ G 2 shows that we can never apply a choice of subsequences to gain convergence in one limit over the whole class Ω f . Nevertheless, the approximate value of 1.4149 is confirmed in Figure 2 (right) where we have shown pseudospectra, computed using the algorithm in [64].

Essential numerical range.
To demonstrate the algorithm for computing the essential numerical range, we first consider the Laurent operator A 0 acting on l 2 (Z) with the symbol In this case, Sp(A 0 ) = Sp ess (A 0 ) = {a(z) : |z| = 1}. We consider the operator A = A 0 + E where the compact perturbation E is given by 16 For this example and other operators on l 2 (Z) below, we reorder the basis so that the operator A acts on l 2 (N).  We have also shown the essential spectrum of A (whose convex hull, in this example, corresponds to W e (A)) and the output of finite section for a 200 × 200 truncation. Right: Pseudospectrum computed using the method of [64] (the colour scale corresponds to the resolvent norm (A−zI) −1 ) which provides error control. This confirms that eigenvalues, computed using finite section, outside ∂Γ 2×10 4 ,500 (A) are accurate and, in this example, indicates that the other eigenvalues correspond to spectral pollution.
Recall that the SCI classification for computing the essential numerical range is Π A 2 (see Theorem 3.10). The first parameter, n 1 , controls the size of the truncation, whereas the second, n 2 , controls how far along the matrix the truncations (I − P n2 )P n1+n2 A| Pn 1 +n 2 (I−Pn 2 )H are taken with respect to the canonical basis. Figure 3 (left) shows the output of the algorithm Γ n2,n1 (A) to compute the essential numerical range for n 2 = 20000 and n 1 = 500. We show the boundary ∂Γ n2,n1 (A) since the essential numerical range is convex. In this example, W e (A) is the convex hull of Sp ess (A 0 ), which allows us to verify the output of the algorithm. We also show 200 eigenvalues of finite section (computed using extended precision to avoid numerical instabilities associated with non-normal truncations), the majority of which are due to truncation and provide an example of spectral pollution. This is confirmed when we compare to the pseudospectrum, also shown in Figure 3 (right), computed using the algorithm in [64]. However, eigenvalues outside W e (A) correspond to true eigenvalues of A (see Theorem 3.9).   The algorithm can also be extended to unbounded operators, as outlined in §7.1. For example, we consider the complex Schrödinger operator By using a Gabor basis, we can represent T as a closed operator on l 2 (N) such that the linear span of the canonical basis (corresponding to the Gabor basis) forms a core. This allows us to use Corollary 7.5, where we can compute the matrix elements (corresponding to inner products with the basis functions) with error control using quadrature. Figure 4 shows the output for n 2 = 10 4 and various n 1 . We see the expected monotonicity as n 1 increases and the output for n 1 = 2000 has converged to visible accuracy in the plot.

4.3.
Capacity. We now consider a transport Hamiltonian on a Penrose tile for which few analytical results are known. Quasicrystals were discovered in 1982 by Shechtman [145] who was awarded the Nobel prize in 2011 for his discovery. Over the past 30 years, there has been considerable interest in their often exotic properties [67,151]. The Penrose tile is the standard two-dimensional model [69,165], and a finite portion of the tiling is shown in Figure 5 (left). However, unlike one-dimensional models, very little is known about the as ↓ 0). These were computed using n 1 = 10 4 and n 2 = 7. Right: Estimates for where H is the Laplacian on a Penrose tiling in (4.2), obtained by letting n 1 = 10 5 and selecting different n 2 . The estimate above −3 appears to be well resolved, suggesting a region of Lebesgue measure 0.
spectral properties of two-dimensional quasicrystals. Let G be the graph consisting of the vertices, V (G), of the Penrose tiling and E(G) the set of edges. If there is an edge connecting two vertices x and y, we write By choosing a suitable ordering of the vertices, we can represent H as an operator acting on Recall that the SCI classification for computing the capacity of the spectrum of such operators is Π A 2 (see Theorem 3.7 for further classifications). The first parameter, n 1 , controls the size of the truncation used to test if intervals intersect the spectrum via Lemma 3.21, whereas the second, n 2 , controls the spacings of the interval coverings (which have width 2 −n2 ). In this example, we used the conformal mapping method of [109] to accurately and rapidly compute the capacity of finite unions of intervals in R (see also Remark 6.4). Figure 5 (right) shows the output of Γ n2,n1 (H) and we see the expected monotonicity; the output is increasing in n 1 but decreasing in n 2 . By comparing the outputs for n 1 = 10 4 and n 1 = 10 5 , it appears we have convergence up to around n 2 = 8. This suggests an upper bound (since the output is non-increasing in n 2 ) of approximately 2.26 for the capacity of Sp(H) (Sp(H) is shown in Figure 6).

4.4.
Lebesgue measure. First, we consider the almost Mathieu operator, which is related to a wealth of mathematical and physical problems such as the Ten Martini Problem [9]. The operator acts on l 2 (Z) via The choice of λ = 1 was studied in Hofstadter's classic paper [92], giving rise to the famous Hofstadter butterfly. In this case, the Hamiltonian represents a crystal electron in a uniform magnetic field and the spectrum can be interpreted as the allowed energies of the system. For irrational α, we have [11] (4.4) Leb R (Sp(H α )) = 4 |1 − |λ|| We found a scaling region with estimated box-counting dimension ≈ 0.80. Note that for large n 2 5000, scalings are not resolved byΓ 10 5 (we can predict when this happens using the Σ A 1 property of Γ n ). We have also shown the approximation using finite sections (square 10 5 × 10 5 matrix truncations), as a dashed line, which overestimate the size of coverings, cannot detect the fractal structure, and break down for smaller n 2 . and we consider the case α = ( Recall that the SCI classification for computing the Lebesgue measure of the spectrum of such operators (where the dispersion is known) is Π A 2 , whereas the SCI classification of computing the Lebesgue measure of the pseudospectrum is Σ A 1 (see Theorems 3.13, 3.14 and 3.16 for the further classifications). For computing the Lebesgue measure of the spectrum, the first parameter, n 1 , controls the size of the truncation used to compute the approximation of the resolvent norm, whereas the second, n 2 , controls the grid refinement (the spacings are 2 −n2 ). For the pseudospectrum, n 1 controls the size of the truncations and the grid spacings. Figure 6 (left) shows the output of the algorithms computing Leb R (Sp(H α )) (LebSpec) and also Leb R (Sp (H α )) (LebPseudoSpec) for a range of values of . We chose values of n 1 = 10 4 and a grid spacing of 1/128 (n 2 = 7). One can clearly see that the estimates for Leb R (Sp (H α )) are decreasing to the true value of Leb R (Sp(H α )), which is well approximated by LebSpec.
Next, we consider the operator H in (4.2), for which the Lebesgue measure of Sp(H) is unknown. We set n 1 = 10 5 and look at the average estimated error of the output via DistSpec (see Appendix A). This was of the order 10 −3 , so we consider grid refinements of spacing 1/32, 1/64, . . . , 1/1024 corresponding to n 2 = 5, 6, . . . , 10. Figure 6 (right) shows the output as a cumulative Lebesgue measure, that is, an estimate of Leb R (Sp(A) ∩ (−∞, x]) for a given x, along with the computed spectrum (for a grid spacing of 10 −5 ). The figure provides strong evidence that the part of the spectrum closest to 0 is resolved by the algorithm and has Lebesgue measure zero. We shall see more evidence for this in §4.5.

4.5.
Fractal dimension. For this example, we again consider the operator H in (4.2), for which the fractal dimension of Sp(H) is unknown. In Figure 7, we plot N 1/n2 (Γ 10 5 (H) ∩ [−3, ∞)) against n 2 (recall that N δ (F) is the number of closed intervals of length δ > 0 required to cover F ). This corresponds to a rectangular truncation with n 1 = 10 5 columns. Recall thatΓ n denotes the algorithm that converges to the spectrum with error control, in particular avoiding spectral pollution (see Appendix A). We also show a linear fit of slope 0.8. The error control provided by the algorithmΓ n allows us to deduce the region where the fit holds, corresponding to a reliable resolution of the spectrum (this is at least as large as the region shown in the plot). In other words, we can ensure that n 2 is not too large so that the spacings of the coverings are not smaller than the numerically resolved spectrum. As expected, when n 2 is too large we see the effect of the grid spacing and the unresolved spectrum (by choosing larger n 1 , we can take n 2 larger). The figure suggests that the spectrum above −3 is fractal with box-counting dimension ≈ 0.8 and hence has Lebesgue measure zero, in agreement with the findings in Figure 6. Figure 7 also shows what happens when one performs the same experiment but with a finite section replacingΓ n (now using a square 10 5 × 10 5 truncation). There are two noticeable features. First, for small n 2 , using a finite section produces an overestimate of the size of the covering and the corresponding slope of the graph due to spectral pollution. In other words, finite section prevents us from detecting the fractal spectrum. Second, the covering estimate via finite section breaks down at smaller n 2 and it is impossible to predict suitable values of n 2 so that the spacings of the coverings do not go beyond the resolution of the computed spectrum. Together, these issues highlight why the finite section method is unsuitable in general 17 for approximating fractal dimensions and why the new algorithms in this paper (which are proven to converge) are needed.

MATHEMATICAL PRELIMINARIES AND COMBINATORIAL PROBLEMS IN THE SCI HIERARCHY
In this section, we begin by providing formal definitions of the SCI hierarchy. We then link the SCI hierarchy, in a certain specific case, to the Baire hierarchy on a suitable topological space. As well as being interesting in its own right, this provides a useful method of providing canonical problems high up in the SCI hierarchy. In particular, the results we prove hold for towers of general algorithms (see Definition 5.1) without the restrictions of arithmetic operations or notions of recursivity etc. This will be used extensively in the proofs of lower bounds for spectral problems that have SCI > 2, where we typically reduce the problems discussed here to the given spectral problem. It should be stressed that such links to existing hierarchies only exist in special cases when Ω and M are particularly well-behaved. Even when such a link does exist, the induced topology on Ω is often too complicated, unnatural or strong to be useful from a computational viewpoint. We also take the view that, for problems of scientific interest, the mappings Λ and metric space M are often given to us apriori from the corresponding applications and are typically not compatible with topological viewpoints of computation.
5.1. The SCI hierarchy. We begin by defining the Solvability Complexity Index (SCI) hierarchy, allowing us to show that our algorithms realise the boundary of what computers can achieve. We have already presented the definition of a computational problem {Ξ, Ω, M, Λ} in §2.1. Recall that the goal is to find algorithms that approximate the function Ξ. More generally, the main pillar of our framework is the concept of a tower of algorithms, which is needed to describe problems that need several successive limits in the computation. However, first one needs the definition of a general algorithm.
The definition of a general algorithm is more general than the definition of a Turing machine [164] or a BSS machine [28]. A general algorithm has no restrictions on the operations allowed. The only restriction is that it can only take a finite amount of information, though it is allowed to adaptively choose the finite amount of information it reads depending on the input. Condition (iii) ensures that the algorithm consistently reads the information. With a definition of a general algorithm, we can define the concept of towers of algorithms. where n k , . . . , n 1 ∈ N and the functions Γ n k ,...,n1 at the lowest level of the tower are general algorithms in the sense of Definition 5.1. Moreover, for every A ∈ Ω, In addition to a general tower of algorithms, we focus on arithmetic towers. Remark 5.4. By recursive we mean the following.
can be executed by a Turing machine [164], that takes (n k , . . . , n 1 ) as input, and that has an oracle tape consisting of can be executed by a BSS machine [28] that takes (n k , . . . , n 1 ), as input, and that has an oracle that can access any A f for f ∈ Λ.
Given the definitions above we can now define the key concept, namely, the Solvability Complexity Index: with respect to a tower of algorithms of type α, if k is the smallest integer for which there exists a tower of algorithms of type α of height k. If no such tower exists then SCI(Ξ, Ω, M, Λ) α = ∞. If there exists a tower {Γ n } n∈N of type α and height one such that Ξ = Γ n1 for some n 1 < ∞, then we define SCI(Ξ, Ω, M, Λ) α = 0. The type α may be General, or Arithmetic, denoted respectively G and A. We may sometimes write SCI(Ξ, Ω) α to simplify notation when M and Λ are obvious.
We will let SCI(Ξ, Ω) A and SCI(Ξ, Ω) G denote the SCI with respect to an arithmetic tower and a general tower, respectively. Note that a general tower means just a tower of algorithms as in Definition 5.2, where there are no restrictions on the mathematical operations. Thus, clearly SCI(Ξ, Ω) A ≥ SCI(Ξ, Ω) G . The definition of the SCI immediately induces the SCI hierarchy: Definition 5.6 (The Solvability Complexity Index Hierarchy). Consider a collection C of computational problems and let T be the collection of all towers of algorithms of type α for the computational problems in C. Define as well as When there is additional structure on the metric space, such as in the spectral case when one considers the Attouch-Wets or the Hausdorff metric, one can extend the SCI hierarchy. For non-empty closed sets, we consider the Attouch-Wets metric defined by where Cl(C) denotes the set of closed non-empty subsets of C. This generalises the familiar Hausdorff metric to unbounded closed sets and corresponds to local uniform converge on compact subsets of C.
where ⊂ M means inclusion in the metric space M , and {X n (A)} is a sequence where X n (A) ∈ M depends on A. Moreover, where d can be either d H or d AW .
Note that to build a Σ 1 algorithm, it is enough (by taking subsequences of n) to construct Γ n (A) such that Γ n (A) ⊂ N En(A) (Ξ(A)) with some computable E n (A) that converges to zero. The same idea can be applied to the real line with the usual metric, or {0, 1} with the discrete metric (we interpret 1 as "Yes").
Definition 5.8 (The SCI Hierarchy (totally ordered set)). Given the set-up in Definition 5.6 and suppose in addition that M is a totally ordered set. Define where and denotes convergence from below and above respectively, as well as, for m ∈ N, . Note that the inclusions are strict. For example, if Ω K consists of the set of compact infinite matrices acting on l 2 (N) and Ξ(A) = Sp(A) (the spectrum of A) then {Ξ, Ω K } ∈ ∆ α 2 but not in Σ α 1 ∪ Π α 1 for α representing either towers of arithmetical or general type (see [18] for a proof). Moreover, as was demonstrated in [64], ifΩ is the set of discrete Schrödinger operators on l 2 (Z), then {Ξ,Ω} ∈ Σ α 1 but not in ∆ α 1 .
Suppose we are given a computational problem {Ξ, Ω, M, Λ}, and that Λ = {f j } j∈β , where β is some index set that can be finite or infinite. Obtaining f j may be a computational task on its own, which is exactly the problem in most areas of computational mathematics. In particular, for A ∈ Ω, f j (A) could be the number e π j i for example. Hence, we cannot access f j (A), but rather f j,n (A) where f j,n (A) → f j (A) as n → ∞. Or, just as for problems that are high up in the SCI hierarchy, it could be that we need several successive limits, in particular one may need mappings f j,nm,...,n1 : Ω → D + iD, where D denotes the dyadic rational numbers, such that In particular, we may view the problem of obtaining f j (A) as a problem in the SCI hierarchy, where ∆ 1 classification would correspond to the existence of mappings f j,n : Ω → D + iD such that This idea is formalised in the following definition.
Definition 5.10 (∆ m -information). Let {Ξ, Ω, M, Λ} be a computational problem. For m ∈ N we say that Λ has ∆ m+1 -information if each f j ∈ Λ is not available, however, there are mappings f j,nm,...,n1 : Ω → D + iD such that (5.2) holds. Similarly, for m = 0 there are mappings f j,n : Ω → D + iD such that (5.3) holds. Finally, if k ∈ N andΛ is a collection of such functions described above such that Λ has ∆ k -information, we say thatΛ provides ∆ k -information for Λ. Moreover, we denote the family of all sucĥ Λ by L k (Λ).
We want algorithms that can handle all computational problems {Ξ, Ω, M,Λ} whenΛ ∈ L m (Λ). To formalise this, we define a computational problem with ∆ m -information. The SCI and the SCI hierarchy, given ∆ m -information, are then defined in the standard obvious way.
Remark 5.12 (Classifications in this paper). For the problems considered in this paper, the SCI classifications do not change if we consider arithmetic towers with ∆ 1 -information. This is easy to see through Church's thesis and an analysis of the stability of our algorithms. For example, when the input is rational we have been careful to restrict all relevant operations to Q rather than R, and errors incurred from ∆ 1 -information can be removed in the first limit. Explicitly, for the algorithms based on DistSpec (see Appendix A) it is possible to carry out an error analysis. We can also bound numerical errors (e.g., using interval arithmetic [163]) and incorporate this uncertainty for the estimation of R(z, A) −1 to gain the same classification of our problems. Similarly, for other algorithms based on similar functions. In other words, for the results of this paper, it does not matter which model of computation one uses for a definition of 'algorithm'. From a classification point of view, they are equivalent for these spectral problems. This leads to rigorous Σ α k or Π α k type error control suitable for verifiable numerics. In particular, for Σ α 1 or Π α 1 towers of algorithms, this could be useful for computer-assisted proofs.

5.2.
Recalling some results from descriptive set theory. We briefly recall the definition of the Borel hierarchy as well as some well-known theorems from descriptive set theory. It is beyond the scope of this paper to provide an extensive discussion of descriptive set theory, but we refer the reader to [98,Chapter 2] for an excellent introduction that covers the main ideas.
Let X be a metric space and define where for a class U, ∼U denotes the class of complements (in X) of elements of U. Inductively define The full Borel hierarchy extends to all ξ < ω 1 (ω 1 being the first uncountable ordinal) by transfinite induction but we do not need this here.
Definition 5.13. Given a class of subsets, U, of a metric space X and given another metric space Y , we say that the function f : Given metric spaces X and Y , the Baire hierarchy is defined as follows. A function f : X → Y is of Baire class 1, written f ∈ B 1 , if it is Σ 0 2 (X)-measurable. For 1 < ξ < ω 1 , a function f : X → Y is of Baire class ξ, written f ∈ B ξ , if it is the pointwise limit of a sequence of functions f n in B ξn with ξ n < ξ. The following Theorem is well-known [98, Section 24] and provides a useful link between the Borel and Baire hierarchies.
Theorem 5.14 (Lebesgue, Hausdorff, Banach). Let X, Y be metric spaces with Y separable and 1 ≤ ξ < ω 1 . Then f ∈ B ξ if and only if it is Σ 0 ξ+1 (X) measurable. Furthermore, if X is zero-dimensional (Hausdorff with a basis of clopen sets) and f ∈ B 1 , then f is the pointwise limit of a sequence of continuous functions.
The assumption that X is zero-dimensional in the last statement is important. Without any assumptions, the final statement of the theorem is false, as is easily seen by considering X = R. Examples of zerodimensional spaces include products of the discrete space {0, 1} or the Cantor space. Any such space is necessarily totally disconnected, meaning that the connected components in the space are the one-point sets (the converse is true for locally compact Hausdorff spaces). Our primary interest will be when Y is equal to {0, 1} or [0, 1], both with their natural topologies.
) are open. This implies that there is an index set J , natural numbers {n i,j } j∈J , a family {Γ i,j,l } i∈I,j∈J ,l≤ni,j (in A) and a family of basic open sets {U i,j,l } i∈I,j∈J ,l≤ni,j with the property that It follows that i∈I,j∈J l≤ni,j Γ −1 i,j,l (U i,j,l ) = Ω.
Since A is closed under search, there exists f n ∈ A such that for every x ∈ Ω there exists some i ∈ I and j ∈ J with f n (x) = c i and for all l ≤ n i,j , x ∈ Γ −1 i,j,l (U i,j,l ). But this implies that d(f n (x), f (x)) < 2 −n . Since n was arbitrary, we have f ∈ ∆ A 1 .
The generated topology can be very perverse and not every class of algorithms is closed under search. However, we do have the following useful theorem when Ω (and Λ) is a particularly simple discrete space.
In other words, the SCI corresponds to the Baire hierarchy index.
Remark 5.18. The proof shows that we can replace Ω by {0, 1} N×N or any other such product space (induced by a discrete topology) of the form A B with A, B countable, with Λ the corresponding component-wise evaluations, as long as M has at least |A| jointly separated points and is separable.
Proof. First we show that general algorithms are closed under search and that the topology T in Proposition 5.16 is equal to the product topologyT . Without loss of generality we can assume that I is well-ordered by ≺. Given x ∈ Ω, let k ∈ N be minimal such that there exists i ∈ I with x ∈ ∩ l≤ni Γ −1 i,l (U i,l ) and Λ Γ i,l (x) ⊂ {λ j : j ≤ k} for l ≤ n i . Let i 0 be the ≺-least witness for k and then define Γ(x) = c i0 . The well-ordering of I implies that Γ is a general algorithm and it clearly satisfies the requirements in the definition of closed under search. Note that this part of the proof only uses countability of Λ.
To equate the topologies, suppose that Γ ∈ ∆ G 0 is a general algorithm. For each a ∈ Ω, Λ Γ (a) is finite and we can assume without loss of generality that it is equal to {λ j : j ≤ I(a)} for some finite I(a). where ∀ ∞ means "for all but a finite number of". In words, P decides whether the corresponding matrix has a column with infinitely many 1's, whereas Q decides whether the matrix has only finitely many columns with only finitely many 1's. For R = P or Q consider the problem function for a ∈ Ω k In other words, we can solve the problem via a height k + 1 arithmetic tower, but it is impossible to do so with a height k general tower.
Remark 5.20. Note that we allow both discrete and continuous spaces M, which will be important for our reduction arguments when proving lower bounds for classifications of spectral problems for non-discrete M.
The lower bound is a strong result in the sense that it holds regardless of the model of computation. In other words, it is the intrinsic combinatorial complexity of the problems that make the problems hard.
Proof. We deal with the case of R = P since the case of R = Q is completely analogous. It is easy to see that {Ξ k,P , Ω k , M, Λ k } ∈ ∆ A k+2 . First consider the case k = 2 and set where χ C denotes the indicator function of a set C. This is the decision problem that decides whether there exists a column with index at most n 3 such that there are at least n 2 1's in the first n 1 rows. This is clearly an arithmetic tower and it is straightforward to show that this converges to Ξ 2,P in M (in either of the {0, 1} and [0, 1] cases). For k > 2 we simply alternate taking products (which corresponds to minima in this case) and maxima. Explicitly, we set Again, this is an arithmetic tower and it is straightforward to show that this converges to Ξ k,P in M. It also holds that {Ξ k,P , Ω k , M, Λ k } ∈ Σ A k+1 if k is even and {Ξ k,P , Ω k , M, Λ k } ∈ Π A k+1 if k is odd (not to be confused with the notation for the Borel hierarchy).
Recall the topology T on Ω k form Theorem 5.17. For the lower bound we note that P is Σ 0 3 complete (in the literature it is known as the problem "S 3 ", see for example [98,Section 23]). Since (Ω k , T ) is zero-dimensional, a theorem of Wadge implies that this means that P is the indicator function of a set, also denoted by P , which lies in Σ 0 3 (Ω k ) but not Π 0 3 (Ω k ). It also follows that Ξ k,P is Σ 0 k+1 (Ω k ) complete if k is even and Π 0 k+1 (Ω k ) complete otherwise. Now suppose for a contradiction that {Ξ k,P , Ω k , M, Λ k } ∈ ∆ G k+1 . But then Theorem 5.17 implies that Ξ k,P ∈ B k (Ω k , M) and hence by Theorem 5.14, Ξ k,P is Σ 0 k+1 (Ω k ) measurable. Ξ k,P is the indicator function of a set, which we denote by Ξ k,P with an abuse of notation, which is either Σ 0 k+1 (Ω k ) or Π 0 k+1 (Ω k ) complete depending on the parity of k. But 0 and 1 are separated in M and hence since Ξ k,P is Σ 0 k+1 (Ω k ) measurable, Ξ k,P and its complement both lie in Σ 0 k+1 (Ω k ). It follows that Ξ k,P ∈ Σ 0 k+1 (Ω k ) ∩ Π 0 k+1 (Ω k ), contradicting the stated completeness.
For our applications to spectral problems, we will useΩ to denote Ω k and consider (5.6) Theorem 5.19 holds for a much wider class of decision problems, but these four are the only ones we shall use in the sequel. The decision problemsΞ 1 andΞ 2 were shown to have SCI G = 3 in [18], but only with regards to the discrete space M = {0, 1} and the proof used a somewhat complicated Baire category argument. Theorem 5.19 is much more general, can be extended to arbitrarily large SCI, and has a much slicker proof, making clear a beautiful connection with the Baire hierarchy for well-behaved Ω.

PROOFS CONCERNING SPECTRAL RADII, ESSENTIAL SPECTRAL RADII, CAPACITY AND OPERATOR NORMS
Here we prove the theorems found in §3.1 -3.3. First, we briefly recall Σ A 1 algorithms for spectral problems presented in [64], that are sharp in the SCI hierarchy. The algorithms constructed in [64] are shown as pseudocode in Appendix A, where we also refer the reader to a more detailed account. The following was proven in [64] and was generalised in [60] to unbounded operators: Theorem 6.1. For each Ω f and Ω f ∩ Ω g , consider the family Λ consisting of Λ 1 , together with pointwise evaluation of f, {c n } (and evaluation of g at rational points if considering Ω f ∩ Ω g ). The algorithms presented in Appendix A achieve Σ A 1 error control. In particular the following classification holds: We now turn to the proof of Theorem 3.3, dealing first with the evaluation set Λ 1 . Suppose that {Γ n k ,...,n1 } is a Π A k tower of algorithms to compute the spectrum of a class of operators, where the output is a finite set for each n 1 , . . . , n k . It is then clear that |z| + 1 2 n k provides a Π A k tower of algorithms for the spectral radius. Strictly speaking, the above may not be an arithmetic tower owing to the absolute value. But it can be approximated to arbitrary precision (from above say), the error of which can be absorbed in the first limit. In what follows, we always assume this is done without further comment. Similarly if {Γ n k ,...,n1 } provides a Σ A k tower of algorithms for the spectrum (and outputs a finite set for each n 1 , . . . , n k ), |z| − 1 2 n k provides a Σ A k tower of algorithms for the spectral radius. If we only have a height k tower with no Σ k or Π k type error control for the spectrum, then taking the supremum of absolute values shows that we get a height k tower for the spectral radius.
The fact that {Ξ r , 3 hence follow from Theorems 6.1 and the results of [18]. It is clear that {Ξ r , Ω D } / ∈ ∆ G 1 and this also shows that {Ξ r , Ω N } / ∈ ∆ G 1 and {Ξ r , Ω f ∩ Ω g } / ∈ ∆ G 1 . Hence, we must show the positive result that {Ξ r , Ω N } ∈ Σ A 1 and prove the lower bounds {Ξ r , Proof of Theorem 3.3 for Λ 1 . Throughout this proof we use the evaluation set Λ 1 , which we drop from the notation for convenience.
Step 1: {Ξ r , Ω N } ∈ Σ A 1 . Recall that the spectral radius of a normal operator A ∈ Ω B is equal to its operator norm. Consider the finite section matrices P n AP n ∈ C n×n . It is straightforward to show that P n AP n ↑ A as n → ∞.
The norm P n AP n is the square root of the largest eigenvalue of the semi-positive definite self-adjoint matrix (P n AP n ) * (P n AP n ). This can be estimated from below to an accuracy of 1/n using Corollary 6.9 of [60], which then yields a Σ A 1 algorithm for {Ξ r , Ω N }.
Recall that we assumed the existence of a δ ∈ (0, 1) such that g(x) ≤ (1 − δ)x. Let > 0, then it is easy to see that the matrices have norm bounded by 1+ + 2 and are clearly inverse of each other. Choose small such that (1+ + 2 ) 2 ≤ 1/(1 − δ). If B ∈ C 2×2 is normal, it follows thatB := S + ( )BS − ( ) lies in Ω g and has the same spectrum as B. We chooseB The crucial property ofB is that the first entry 1 + 2 is strictly greater in magnitude than the two eigenvalues (1 ± √ 1 + 4 2 )/2. Now suppose for a contradiction that a height one tower, {Γ n }, solves the problem. We will gain a contradiction by showing that Γ n (A) does not converge for an operator of the form, where we only consider l k ≥ 3. Each A m is unitarily equivalent to the matrixB ⊕ 0 ∈ C m×m and has spectrum equal to {0, (1 ± √ 1 + 4 2 )/2}. Any A of the above form is unitarily equivalent to a direct sum of an infinite number ofB's and the zero operator and hence lies in Ω g . Now suppose that l 1 , . . . , l k have been chosen and consider the operator The spectrum of B k is {0, (1 ± √ 1 + 4 2 )/2, 1 + 2 } and hence there exists η > 0 and n(k) ≥ k such that Γ n(k) (B k ) > (1 + √ 1 + 4 2 )/2 + η. But Γ n(k) (B k ) can only depend on the evaluations of the matrix entries {B k } ij = B k e j , e i with i, j ≤ N (B k , n(k)) (as well as evaluations of the function g) into account. If we choose l k+1 > N (B k , n(k)) then by the assumptions in Definition 5.1, Γ n(k) (A) = Γ n(k) (B k ) > (1 + √ 1 + 4 2 )/2 + η. But Γ n (A) must converge to (1 + √ 1 + 4 2 )/2, a contradiction.
Step 3: {Ξ r , Ω f } / ∈ ∆ G 2 . Suppose for a contradiction that a height one tower, {Γ n }, solves the problem. We will gain a contradiction by showing that Γ n (A) does not converge for an operator of the form where we assume that l r ≥ r to ensure that the spectrum of A is equal to the unit disc B 1 (0). Note that the function f (n) = n + 1 will do for the bounded dispersion with c n = 0. Now suppose that l 1 , . . . , l k have been chosen and consider the operator The spectrum of B k is {0} and hence there exist n(k) ≥ k such that Γ n(k) (B k ) < 1/4. But Γ n(k) (B k ) can only depend on the evaluations of the matrix entries {B k } ij = B k e j , e i with i, j ≤ N (B k , n(k)) (as well as evaluations of the function f ) into account. If we choose l k+1 > N (B k , n(k)) then by the assumptions in Definition 5.1, Γ n(k) (A) = Γ n(k) (B k ) < 1/4. But Γ n (A) must converge to 1, a contradiction.
Step 4: {Ξ r , Ω B } / ∈ ∆ G 3 . Suppose for a contradiction that {Γ n2,n1 } is a height two (general) tower and without loss of generality, assume it to be non-negative. We use the results of §5. Let (M, d) be the space [0, 1] with the usual metric (note in particular this is not discrete so we use Remark 5.20), letΩ denote the collection of all infinite matrices {a i,j } i,j∈N with entries a i,j ∈ {0, 1} and recall the problem functioñ Ξ 1 ({a i,j }) : Does {a i,j } have a column containing infinitely many non-zero entries? Theorem 5.19 in §5 shows that SCI(Ξ 1 ,Ω) G = 3. We will gain a contradiction by using the supposed height two tower to solve {Ξ 1 ,Ω}.
Without loss of generality, identify Ω B with B(X) where X = ∞ j=1 X j in the l 2 -sense with X j = l 2 (N). Now let {a i,j } ∈Ω and define B j ∈ B(X j ) with the matrix representation 1, if k = i and a k,j = 0 1, if k < i and a l,j = 0 for k < l < i 0, otherwise 0 ≤ n ≤ 1.
Let I j be the index set of all i where a i,j = 1. B j acts as a unilateral shift on span{e k : k ∈ I j } and the identity on its orthogonal complement. It follows that if I j is finite and non-empty where I j denotes the identity operator on C j×j , then Sp(A) = ∪ ∞ j=1 Sp(B j ) − 1 2 . Hence we see that We then setΓ n2,n1 ({a i,j }) = min{max{Γ n2,n1 (A) − 1/2, 0}, 1}. It is clear that this defines a generalised algorithm mapping into [0, 1]. In particular, given N we can evaluate {A k,l : k, l ≤ N } using only finitely many evaluations of {a i,j }, where we can use a bijection between canonical bases of l 2 (N) and ∞ j=1 X j to view A as acting on l 2 (N). But then {Γ n2,n1 } provides a height two tower for {Ξ 1 ,Ω}, a contradiction.
Remark 6.2. The algorithm in step 1 of the above proof works for any operator whose operator norm is equal to the spectral radius. If, instead, the operator is spectraloid, meaning the spectral radius is equal to the numerical radius w(A) := sup{| Ax, x | : x = 1}, then a similar argument will hold by estimating w(P n AP n ). To do this, we need a way of computing w(A) to a given accuracy using finitely many arithmetic operations and comparisons (e.g., Lemma 7.1 below).
Proof of Theorem 3.3 for Λ 2 . Here we prove the changes for Ξ r when we consider the evaluation set Λ 2 . It is clear that the classifications in Σ A 1 do not change. It is also easy to use the algorithm in Theorem 6.1 (now using Λ 2 to collapse the first limit and approximate γ n -see Appendix A) to prove {Ξ r , Ω g , Λ 2 } ∈ Σ A 1 . Similarly we can use the algorithm for the spectrum of operators in Ω f for Ω B using Λ 2 to collapse the first limit and hence {Ξ r , Since Ω f ⊂ Ω B , it follows that we only need to prove {Ξ r , Ω f , Λ 2 } ∈ ∆ G 2 . This can be proven using exactly the same example and a similar argument to step 3 of the proof of Theorem 3.3 (hence omitted).
Proof of Theorem 3.6. We begin by proving the results for Λ 1 . For the lower bounds, it is enough to For the upper bounds, we must show that The lower bounds for Λ 2 follow from {Ξ er , Ω D , Λ 1 } ∈ ∆ G 2 and for the upper bounds it is enough to prove {Ξ er , 2 . This is the same argument as in step 3 of the proof of Theorem 3.3, however now we replace A m by A m = diag{1, 1, . . . , 1} ∈ C m×m and use the fact that Ξ er (B k ) = 0. It follows that given the proposed height one tower {Γ n } and the constructed A, Ξ er (A) = 1 but Γ n(k) (A) < 1/4, the required contradiction.
follows immediately from the existence of a Π A 2 tower of algorithms for the essential spectrum of operators in Ω f proven in [18]. The output of this tower is a finite collection of rectangles with complex rational vertices, hence we can gain an approximation of the maximum absolute value over this output to any given precision. This can be used to construct a Π A 2 tower for {Ξ er , follows from the Π A 3 tower of algorithms for {Sp ess , Ω B , Λ 1 } constructed in [18]. Finally, we can use Λ 2 to collapse the first limit of the algorithm for the essential spectrum in [18], giving a Π A 2 algorithm and this can be used to show {Ξ er , Ω B , Λ 2 } ∈ Π A 2 .
Step 4: tower is constructed in the proof of Theorem 3.10 for the essential numerical range, W e (A), of normal operators (using Λ 1 ) and this outputs a finite collection of points. For normal operators A, W e (A) is the convex hull of the essential spectrum and hence sup z∈We(A) |z| is equal to Ξ er (A). Hence a Π A 2 tower for {Ξ er , Ω N , Λ 1 } follows by taking the maximum absolute value over the tower for W e (A).
Proof of Theorem 3.7. Note that given a height k arithmetical tower { Γ n k ,...,n1 (·, p)} for Ξ r,p and a class Ω , we can build a Π A k+1 tower for {Ξ cap , Ω } as follows. Let p 1 , p 2 , . . . be an enumeration of the monic polynomials with rational coefficients andΓ n k ,...,n1 (·, p) be an approximation to | Γ n k ,...,n1 (·, p)| 1/deg(p) to accuracy 1/n 1 using finitely many arithmetic operations and comparisons. Define The fact that this is a convergent Π A k+1 tower is clear. This, together with inclusions of the considered classes of operators, means that to prove the positive results we only need to prove {Ξ r,p , Ω f , Likewise, for the negative results we only need to prove {Ξ cap , Ω D , We shall prove these results with Ω N replaced by the class of self-adjoint bounded operators denoted by Ω SA .
Step 1: The function f and sequence {c n } allows us to compute the matrix elements of p(A) for any A ∈ Ω f and polynomial p to arbitrary accuracy. We can then use the same argument as step 1 of the proof of Theorem 3.3, approximating P n p(A)P n instead of P n AP n .
Step 2: For the first result, we note that lim m→∞ P n p(P m AP m )P n = P n p(A)P n and let Γ n,m (A, p) be an approximation of P n p(P m AP m )P n to accuracy 1/m, which can be computed in finitely many arithmetic operations and comparisons. To prove {Ξ r,p , Ω B , Λ 2 } ∈ Σ A 1 , for any given A ∈ Ω B we can use Λ 2 to compute a function f A and sequence {c n (A)} bounding the dispersion such that A ∈ Ω f A and use step 1.
Step 3: Suppose for a contradiction that {Γ n2,n1 } is a height two (general) tower for the problem and without loss of generality, assume it to be non-negative. Our strategy will be as in the proof of Recall that it was shown in §5 that SCI(Ξ 2 ,Ω) G = 3. We will gain a contradiction by using the supposed height two tower to solve {Ξ 2 ,Ω}. Without loss of generality, identify Ω SA with self adjoint operators in B(X) where X = ∞ j=1 X j in the l 2 -sense with X j = l 2 (N). To proceed, we need the following elementary lemma, which will be useful in constructing examples of spectral pollution.
Proof. By a change of basis, the above matrix is equivalent to a block diagonal matrix with blocks z j a j a j −z j .
Now choose a sequence of rational numbers {z j } j∈N ∈ [−1, 1] that is also dense in [−1, 1] and let B j = B(z 1 , . . . , z j ). For each column of a given {a i,j } ∈Ω, let the infinite matrix C (j) be defined as follows. If k, l < j + 1 then C (j) kl = z k δ k,l . Let r(i) denote the row of the ith one of the column {a i,j } i∈N (with r(i) = ∞ if m a m,j < i and r(0) = 0). If r(i) < ∞ then for k ≤ l define kl below the diagonal to a symmetric matrix. The key property of this matrix is that if the column {a i,j } i∈N has infinitely many 1s, then its is unitarily equivalent to an infinite direct sum of infinitely many B j together with the zero operator acting on some subspace (whose dimension is equal to the number of zeros in the column). In this case Sp(C (j) ) = {−1, 1, 0} or {−1, 1}. On the other hand, if {a i,j } i∈N has finitely many 1s, then C (j) is unitarily equivalent the direct sum of a finite number of B j , the diagonal operator diag{z 1 , . . . , z k } and the zero operator acting on some subspace. In this case {z 1 , . . . , z j } ⊂ Sp(C (j) ). Let A = then Ξ cap (A) = 1/2 (this can be proven easily using the minimal l ∞ norm property of monic Chebyshev polynomials). We then defineΓ n2,n1 ({a i,j }) = min{max{1 − 2Γ n2,n1 (A), 0}, 1}. It is clear that this defines a generalised algorithm. In particular, given N we can evaluate {A k,l : k, l ≤ N } using only finitely many evaluations of {a i,j }, where we can use a bijection between canonical bases of l 2 (N) and ∞ j=1 X j to view A as acting on l 2 (N). We also have the convergence lim n2→∞ lim n1→∞Γn2,n1 ({a i,j }) =Ξ 2 ({a i,j }), a contradiction.
Step 4: {Ξ cap , Ω D , Λ 2 } ∈ ∆ G 2 . This is the same argument as in step 3 of the proof of Theorem 3.3. However, we now replace A m by A m = diag{d 1 , d 2 , . . . , d m } ∈ C m×m , where {d m } is a dense subsequence of [−1, 1], and use the fact that Ξ cap (B k ) = 0. It follows that given the proposed height one tower {Γ n } and the constructed A, Ξ cap (A) = 1/2 but Γ n(k) (A) < 1/4, the required contradiction.
Step 5: {Ξ r,p , Ω SA , Λ 2 } ∈ ∆ G 2 . Recall that we are given some polynomial p of degree at least two. We assume without loss of generality that the zeros of p are ±1 and |p(0)| > 1 (the more general case is similar). The argument is similar to step 3 of the proof of Theorem 3.3, but we spell it out since it uses Lemma 6.3. Suppose for a contradiction that a height one tower, {Γ n }, solves the problem. We will gain a contradiction by showing that Γ n (A) does not converge for an operator of the form, . . . , z lr ), We assume that l r ≥ r to ensure that the spectrum of A is equal to {−1, 1} and hence Ξ r,p (A) = 0. Now suppose that l 1 , . . . , l k have been chosen and consider the operator The spectrum of B k is [−1, 1] so that Ξ r,p (B k ) > 1 and hence there exists n(k) ≥ k such that Γ n(k) (B k ) > 1/4. But Γ n(k) (B k ) can only depend on the evaluations of the matrix entries {B k } ij = B k e j , e i with i, j ≤ N (B k , n(k)) (as well as evaluations of the function f ) into account. If we choose l k+1 > N (B k , n(k)) then by the assumptions in Definition 5.1, Γ n(k) (A) = Γ n(k) (B k ) > 1/4. But Γ n (A) must converge to 0, a contradiction.
Remark 6.4 (Efficiently computing the capacity). Listing the monic polynomials with rational coefficients in the above proof is very inefficient. In practice, it is much better to split the domain of interest into intervals (or squares if in the complex plane, but we stick to the self-adjoint case in the following discussion). Suppose that each interval has dyadic endpoints and a diameter of 2 −n2 and that our operator is self-adjoint with known bounded dispersion. One can then apply Lemma 3.21 (denoting the index of that tower by n 1 ) to obtain an interval covering of the spectrum which will converge as n 1 → ∞, modulo the possibility of isolated points of the spectrum located at the endpoints of the intervals. Since the capacity of a compact set is unaltered by adding finitely many points, we do not have to worry about the endpoints -the limit of the capacity of this covering as n 1 → ∞ will be the capacity of a covering of the spectrum. As n 2 → ∞, we can use the fact that capacity is right-continuous as a set function (for compact sets E n , E with E n ↓ E, one has cap(E n ) ↓ cap(E)) to obtain a Π A 2 algorithm. The point of this is that it reduces the computation of the resulting tower {Γ n2,n1 } to computing the capacity of finite unions of disjoint closed intervals in R. In our computational examples, we made use of the method in [109], which uses conformal mappings and can deal with thousands of intervals.

PROOFS CONCERNING ESSENTIAL NUMERICAL RANGES, ESSENTIAL SPECTRA AND SPECTRAL POLLUTION
Proof of Theorem 3.10 for Ξ we . For the lower bounds, it is enough to note that {Ξ we , Ω D , Λ 2 } ∈ ∆ G 2 by the same argument as step 1 of the proof of Theorem 3.6. The construction is exactly the same but yields Hence the proposed height one tower cannot converge. To construct a Π A 2 tower for general operators, we need the following Lemma: Lemma 7.1. Let B ∈ C n×n and > 0. Then using finitely many arithmetic operations and comparisons, we can compute points z 1 , . . . , z k ∈ Q + iQ such that We then let each z j ∈ Q + iQ be a /4 approximation of Bx j , x j , which can be computed in finitely many arithmetic operations and comparisons.
Remark 7.2 (Efficient computation). In practice, there are much more efficient methods of computation. For example, the method of Johnson [96], reduces the computation of W (A) for A ∈ C n×n to a series of n × n Hermitian eigenvalue problems.
Proof of Theorem 3.10 for Ξ F poll . We will prove that {Ξ R poll , Ω D , Λ i } ∈ ∆ G 3 and {Ξ C poll , Ω B , Λ 1 } ∈ Σ A 3 . The construction of towers for Ξ R poll are similar, as are the arguments for lower bounds.
and that this can be approximated to any given accuracy in finitely many arithmetic operations and comparisons (see also Appendix A). We assume that we approximate from below to an accuracy of 1/n 1 and call this approximationγ n2,n1 . The function γ n2,n1 (z; A) is Lipschitz continuous with Lipschitz constant bounded by 1. Define the set where U m are the approximations to the open set U . By taking squares of distances to ball centres, we can decide whether a point z ∈ Q + iQ has dist(z, V n1 ) < η for any given η ∈ Q + . Let Υ n2,n1 (A, U ) be the finite collection of all z ∈Γ n2,n1 (A) with dist(z, The above remarks show that this can be computed using finitely many arithmetic operations and comparisons. Let W n2 = W ((I − P n2 )A| (I−Pn 2 )H ) and W n2,n1 = W ((I − P n2 )P n1+n2+1 A| Pn 1 +n 2 +1(I −Pn 2 )H ). We claim that the set Υ n2,n1 (A, U ) converges to as n 1 → ∞, meaning also if Υ n2 (A, U ) is empty then Υ n2,n1 (A, U ) is empty for large n 1 . If z ∈ Υ n2,n1 (A, U ), then there existsẑ ∈ W n2,n1 ⊂ W n2 with |z −ẑ| ≤ 1/n 1 . Since it follows that dist(ẑ, U ) < 1/n 2 and hence Υ n2 (A, U ) is non-empty. So to prove convergence, we only need to deal with the case Υ n2 (A, U ) = ∅. The above argument also shows that any limit point of a subsequence z m(j) ∈ Υ n2,m(j) (A, U ) must lie in Υ n2 (A, U ). Hence to prove the claim, we need to only prove that for any z ∈ Υ n2 (A, U ), there exists z n1 that are contained in Υ n2,n1 (A, U ) for large n 1 and converge to z. Let z ∈ W n2 with dist(z, U ) < 1/n 2 , then there exists > 0 and j > 0 such that dist(z, U j ) < 1/n 2 − . There also exists z n1 ∈Γ n2,n1 (A) with z n1 → z. It must hold for n 1 > j that This last quantity is smaller than 1/n 2 − 1/n 1 for large n 1 and hence z n1 ∈ Υ n2,n1 (A, U ) for large n 1 . It follows for any z ∈ Υ n2 (A, U ), there exists z n1 that are contained in Υ n2,n1 (A, U ) for large n 1 and converge to z. Define where we recall that γ n2 (z; A) = min{σ inf ((A − zI)| Pn 2 H ), σ inf ((A * −zI)| Pn 2 H )}. If z ∈ Υ n2,n1 (A, U ), then the above shows that there existsẑ ∈ Υ n2 (A, U ) with |z −ẑ| ≤ 1/n 1 . It follows that where we have used the bound on the Lipschitz constant and the fact that γ n2,n1 converge up to γ n2 (and uniformly on compact subsets of C). It follows that Q n2,n1 (A, U ) ≤ Q n2 (A, U ) and this also covers the case that Υ n2 (A, U ) = ∅ if we define the supremum over the empty set to be 0. The set convergence proven above and uniform convergence ofγ n2,n1 implies that Q n2,n1 (A, U ) converges to Q n2 (A, U ). It is also clear that the Υ n2 (A, U ) are nested and converge down to W e (A) ∩ U since W n2 converges down to W e (A). The functions γ n2 also converge down to uniformly on compact subsets of C and hence Q n2 (A, U ) converges down to The above show that Since χ [0,1/n3] has right limits and Q n2 (A, U ) are non-increasing, where ± denotes one of the right or left limits (it is possible to have either). Now if Ξ C poll (A, U ) = 0, then Γ n3 (A, U ) = 0 for all n 3 . But if Ξ C poll (A, U ) = 1, then for large n 3 , Γ n3 (A, U ) = 1. Moreover, in this latter case, Γ n3 (A, U ) = 1 signifies the existence of z ∈ W e (A) ∩ U with γ(z; A) > 0 and hence z ∈ Sp(A). Hence {Γ n3,n2,n1 } provides a Σ A 3 tower.
Step 2: {Ξ R poll , Ω D , Λ 2 } ∈ ∆ G 3 . We will argue for the case that U = U 1 = R and the restricted case is similar. Assume for a contradiction that this is false and that { Γ n2,n1 } is a general height two tower for {Ξ R poll , Ω D , Λ 2 }. We follow the same strategy as the proof of Theorem 3.3 step 4 (recall also the results of §5). Let (M, d) be discrete space {0, 1} andΩ denote the collection of all infinite matrices {a i,j } i,j∈N with entries a i,j ∈ {0, 1} and consider the problem functioñ Ξ 1 ({a i,j }) : Does {a i,j } have a column containing infinitely many non-zero entries?
For j ∈ N, let {b i,j } i∈N be a dense subset of I j : Now consider any bijection φ : N → N 2 and define the diagonal operator The algorithm Γ n2,n1 thus translates to an algorithm Γ n2,n1 for {Ξ 1 ,Ω}. Namely, set Γ n2,n1 ({a i,j } i∈N ) = Γ n2,n1 (A). The fact that φ is a bijection shows that the lowest level Γ n2,n1 are generalised algorithms (and are consistent). In particular, given N , we can find {A i,j : i, j ≤ N } using finitely many evaluations of the matrix values {c k,l } (the same is true for A * A and AA * since the operator is diagonal). But for any given c k,l we can evaluate this entry using only finitely many evaluations of the matrix values {a m,n } by the construction of r. Finally, note that where Q lies in the discrete spectrum. The intervals I j are also separated. It follows that there is a gap in the essential spectrum if and only if there exists a column {a i,j } i∈N with infinitely many 1s. Otherwise the essential spectrum is {1}. It follows thatΞ({a i,j }) = Ξ R poll (A, R), and hence we get a contradiction.
7.1. Essential numerical range for unbounded operators. The essential numerical range (see (3.1)) was first introduced for a bounded operator A in [152], as the closure of the numerical range of the image of A in the Calkin algebra: Other equivalent characterisations were then given in [82]. The unbounded case is significantly different from the bounded case, and definitions that are equivalent in the bounded case may yield very different sets in the unbounded case. The definition for unbounded operators appeared in [34], and required the development of several new ideas and tools. In this section, we let Ω C denote the set of closed operators T with domain D(T ) ⊂ l 2 (N) such that the linear span of the canonical basis forms a core of T . This latter condition ensures that we can use the usual matrix representation of the operator T and hence the evaluation functions Λ 1 . We follow [34] and define In [34], it was shown that for any T ∈ Ω C , W e (T ) consists precisely of the essential spectrum of T together with all possible spectral pollution that may arise by applying projection methods to find the spectrum of T numerically. This result therefore generalises Theorems 3.8 and 3.9. The set W e (T ) is closed and convex, but, unlike the case when T is bounded, W e (T ) may be empty. We first need two simple lemmas.
Proof. It is clear that and that the sets W (P n T | PnH ) are increasing with n. Now let λ ∈ W (T ) be arbitrary. It is enough to show that there exists λ n ∈ W (P n T | PnH ) such that λ n → λ as n → ∞. By assumption, there exists x n ∈ D(T ) such that x n = 1 and lim n→∞ T x n , x n = λ. Since the linear span of the canonical basis forms a core of T , we can assume without loss of generality that each x n has finite support with respect to the canonical basis. By taking subsequences if necessary, we may assume that P n x n = x n and hence T x n , x n ∈ W (P n T | PnH ). The result now follows. Proof. We clearly have that W ((I − P n )T | (I−Pn)H ) are non-empty and decreasing in n. It is enough to show the following two results: (1) If λ ∈ W e (T ), then λ ∈ W ((I − P n )T | (I−Pn)H ) for all n.
We first prove (1), so assume that λ ∈ W e (T ). Then, since the linear span of the canonical basis functions form a core of T , we can assume that there exists x n with x n = 1 such that each x n has finite support with respect to the canonical basis, x n w − → 0 and lim n→∞ T x n , x n = λ. It follows that for any fixed m, lim n→∞ P m x n = 0 and hence λ ∈ W ((I − P m )T | (I−Pm)H ).
Finally, to see (2), suppose that this were false for some λ / ∈ W e (T ). We may then choose λ n ∈ W ((I − P n )T | (I−Pn)H ) such that lim inf n→∞ |λ − λ n | = 0. By taking subsequences if necessary, we may assume that λ n → λ and that there exists x n with x n = 1, P n x n = 0 and | T x n , x n − λ n | → 0. But this implies that x n w − → 0 and lim n→∞ T x n , x n = λ. Therefore λ ∈ W e (T ), the required contradiction.
We have the following corollary, which shows that the SCI classification of computing W e (T ) for T ∈ Ω C remains Π A 2 (one can make this precise by adding the empty set to the Attouch-Wets topology, but we omit the details).
Corollary 7.5. There exists a height two tower of arithmetic algorithms {Γ n2,n1 }, using Λ 1 (the matrix values with respect to the canonical basis) and ∆ 1 −information (see Definition 5.11), such that for any T ∈ Ω C , the following hold with respect to the Attouch-Wets topology: If W e (T ) = ∅, then for any compact set K, K ∩ Γ n2 (T ) = ∅ for large n 2 .
Proof. We simply let Γ n2,n1 (T ) be an approximation of that can be computed in finitely many arithmetic operations and comparisons, even when using inexact input (see Definition 5.11 and Remark 5.12), using the arguments in §7. The results now follow from Lemmas 7.3 and 7.4.

PROOFS CONCERNING LEBESGUE MEASURE
We use the function DistSpec in Appendix A. For ease of notation, we suppress the dispersion function f in calling DistSpec, but assume that we know {c n } with D f,n (A) ≤ c n and c n → 0 as n → ∞. However, the proof of convergence also works when using c n = 0 (which does not necessarily bound D f,n (A)). The key observation is the following: Observation: If A ∈ Ω f , then the function F n (z) := DistSpec(A, n, z, f (n))+c n converges uniformly to R(z, A) −1 from above on compact subsets of C. By taking successive minima, we can assume without loss of generality that F n is non-increasing in n.
The other ingredient needed is the following proposition Proposition 8.1. Given a finite union of disks in the complex plane, the Lebesgue measure of their intersection with the interior of a rectangle can be computed within arbitrary precision, using finitely many arithmetical operations and comparisons on the centres and radii of the discs, as well as the position of the rectangle.
Proof. Without loss of generality, we assume that the rectangle is {x + iy : x, y ∈ [0, 1]}. Consider dividing the rectangle into n 2 subrectangles using the division of [0, 1] into n equal intervals. Given such a subrectangle, we can easily test via a finite number of arithmetic operations and comparisons whether the centre is in the union of the circles. Let r(n) denote the number of subrectangles whose centre lies in the union. Then, since the boundary of the union of the circles has measure zero, it is easy to see that r(n)/n 2 converges to the desired Lebesgue measure. Moreover, we can bound the number of subrectangles that intersect the boundary of any of the circles, and this can be used to obtain any desired precision.
Proof of Theorem 3.13.
Step 1: It is enough to consider Λ 1 . We will estimate Leb(Sp(A)) by estimating the Lebesgue measure of the resolvent set on the closed square [−C, C] 2 , where A ≤ C. We do not assume C is known. For n 1 , n 2 ∈ N, let Grid(n 1 , n 2 ) = 1 2 n2 Z + Letting B(x, r) and D(x, r) denote the closed and open balls of radius r around x, respectively 18 , in C (or R where appropriate), we define Note that Leb(U (n 1 , n 2 , A)) can be computed up to arbitrary predetermined precision using only arithmetic operations and comparisons by Proposition 8.1. Using this we can define where, without loss of generality, we assume that we have computed the exact value of the Lebesgue measure (since we can absorb this error in the first limit). Γ n2,n1 are arithmetical algorithms using the fact that DistSpec is and the above proposition. The only non-trivial part is convergence. The algorithm is summarised in the routine LebSpec in §B. 3. We now show that the algorithm LebSpec converges and realises the Π A 2 classification. There exists a compact set K such that R(z, A) −1 > 1 on K c and without loss of generality we can make C larger, As n 1 → ∞, [−C, C] 2 ∩ (∪ z∈Grid(n1,n2) B(z, F n1 (z))) converges to the closed set This proves the convergence and also shows that Γ n2 (A) ↓ Ξ L 1 (A), thus yielding the Π A 2 classification. The same argument works in the one-dimensional case when considering self-adjoint operators Ω D and Leb R . We simply restrict everything to the real line and consider the interval [−C, C] rather than a square.
Step 2: It is enough to consider Λ 2 . We will only show that SCI(Ξ L 1 , Ω D , Λ 2 ) G ≥ 2 for which we use Leb R and the two-dimensional case is similar. Suppose for a contradiction that there exists a height one tower {Γ n }, then Λ Γn (A) is finite for each A ∈ Ω D . Hence, for every A and n there exists a finite number N (A, n) ∈ N such that the evaluations from Λ Γn (A) only take the matrix entries A ij = Ae j , e i with i, j ≤ N (A, n) into account.
Pick any sequence a 1 , a 2 , . . . that is dense in the unit interval [0, 1]. Consider the matrix operators A m = diag{a 1 , a 2 , . . . , a m } ∈ C m×m , B m = diag{0, 0, . . . , 0} ∈ C m×m and C = diag{0, 0, . . .}. Set A = ∞ m=1 (B km ⊕ A km ), where we choose an increasing sequence k m inductively as follows. Set k 1 = 1 and suppose that k 1 , . . . , k m have been chosen. Sp(B k1 ⊕ A k1 ⊕ · · · ⊕ B km ⊕ A km ⊕ C) = {0, a 1 , a 2 , . . . , a km } and hence Leb(Sp(B k1 ⊕ A k1 ⊕ · · · ⊕ B km ⊕ A km ⊕ C)) = 0 so there exists some n m ≥ m such that if n ≥ n m then Any evaluation function f i,j ∈ Λ is simply the (i, j) th matrix entry and hence by construction Step 3: for Ω = Ω B , Ω SA , Ω N or Ω g . We will deal with the case of Ω B . The cases of Ω N and Ω g then follow via Ω N ⊂ Ω g ⊂ Ω B and the one-dimensional Lebesgue measure case for Ω SA is similar. A careful analysis of the proof in step 1 yields that • Γ n2,n1 (A) converges to Γ n2 (A) from below as n 1 → ∞. • Γ n2 (A) converges to Leb(Sp(A)) monotonically from above as n 2 → ∞.
We can ensure that the first limit converges from below by always slightly overestimating the Lebesgue measure of U (n 1 , n 2 ) (with error converging to zero) and using Proposition 8.1. These observations will be used later to answer question 3. We do not need to know c n for the above proof to work, but we will need it for the first of the above facts. A slight alteration of the proof/algorithm by inserting an additional successive limit deals with the general case.
Define the function where σ inf denotes the injection modulus/smallest singular value (see also Appendix A). One can show that γ n,m converges uniformly on compact subsets to as m → ∞ and that this converges uniformly down to R(z, A) −1 on compact subsets as n → ∞ [91].
The stated uniform convergence means that the argument in step 1 carries through and we have a height three tower, realising the Π A 3 classification.
for Ω = Ω B , Ω N , or Ω g . Since Ω N ⊂ Ω g ⊂ Ω B , we only need to deal with Ω N . We can use a similar argument as in step 4, but now replacing each C (j) by where h 1 , h 2 , . . . is a dense sequence in [0, 1] and this operators acts on X j = j k=1 l 2 (N). This ensures that the spectrum of the operator yields a positive two-dimensional Lebesgue measure if and only ifΞ 2 ({a i,j }) = 0. The rest of the argument is entirely analogous.
Step 6: for Ω = Ω B , Ω SA , Ω N or Ω g . The impossibility result follows by considering diagonal operators. For the existence of Π A 2 algorithms, we can use the construction in step 3, but the knowledge of matrix values of A * A allows us to skip the first limit and approximate γ n directly.
Proof of Theorem 3.14. Using the convergence lim ↓0 Leb( Sp (A)) = Leb(Sp(A)), the lower bounds in Theorem 3.13 immediately imply the lower bounds in Theorem 3.14. Hence we only need to construct the appropriate algorithms.
Step 1: Clearly, we can compute E n with finitely many arithmetic operations and comparisons and we set Γ n (A) = Leb (∪ z∈En D(z, max{0, − F n (z)})) .
Proposition 8.1 shows that, without loss of generality, we can assume Γ n (A) can be computed exactly using finitely many arithmetic operations and comparisons. The algorithm is presented in the LebPseudoSpec routine in §B.3 and the following shows that this algorithm is sharp in the SCI hierarchy. Suppose that F n (z) < and that |w| < − F n (z). If z ∈ Sp(A) then clearly and this holds trivially if z + w ∈ Sp(A). So assume that neither of z, z + w are in the spectrum. The resolvent identity yields It follows that ∪ z∈En D(z, max{0, − F n (z)}) is in Sp (A) and hence that Γ n (A) ≤ Ξ L 2 (A). Without loss of generality by taking successive maxima we can assume that Γ n (A) is increasing. Together, these will yield the Σ A 1 classification once convergence is shown. Using the uniform convergence of F n and density of 1/n(Z + iZ) ∩ [−n, n] 2 , we see that pointwise convergence holds: where χ E denotes the indicator function of a set E. It follows by the dominated convergence theorem that Γ n (A) → Leb( Sp (A)). The proof for Ω D is similar by restricting everything to the real line.
Step 3: {Ξ L 2 , Ω, Λ 2 } ∈ Σ A 1 for Ω = Ω B , Ω SA , Ω N or Ω g . The knowledge of matrix values of A * A allows us to skip the first limit in the construction of step 2 and approximate γ n directly.
Proof of Proposition 3.15. We begin with the proof of 1. Suppose A ∈ Ω D has Leb R (Sp(A)) = 0 and let A n ∈ Ω D be such that A − A n → 0 as n → ∞. This implies that Sp(A n ) → Sp(A) since all our operators are normal. To prove that Leb R (Sp(A n )) → 0, it is enough to prove that where F n = Sp(A) ∪ (∪ m≥n Sp(A m )). But F n decreases to Sp(A) and is bounded in measure, so (8.1) holds. For the converse, let Leb R (Sp(A)) > 0. Without loss of generality, assume that all of A's entries lie in [0, 1]. Let D n denote the set {j/2 n } n j=1 and let us consider the map φ n : x → 2 −n x2 n on [0, 1]. Let A n be the diagonal operator obtained by applying φ n to each of A's entries. We clearly have that A − A n → 0 as n → ∞ but note that Sp(A n ) is finite so has Lebesgue measure 0. Hence Ξ L 1 is discontinuous at A. To prove 2, note that for A ∈ Ω D , Leb R (S (A)) = 0. Let A n ∈ Ω D have A − A n → 0. Then given some 0 < δ < it holds for large n that Sp −δ (A) ⊂ Sp (A n ) ⊂ Sp +δ (A) and hence that Now let δ ↓ 0 and use the fact that Ξ L 2 is continuous in .
Finally, we deal with the question of determining if the Lebesgue measure is zero. Recall that for this problem, (M, d) denotes the set {0, 1} endowed with the discrete topology and we consider the problem function Proof of Theorem 3.16. We will show that follow from similar arguments. The lower bound argument can also be used when considering Λ 2 and Ω = Ω B , Ω SA , Ω N or Ω g . We will also prove the lower bound {Ξ L 3 , Ω SA , Λ 1 } / ∈ ∆ G 4 . The remaining lower bounds for Λ 1 follow from a similar argument and construction as in step 5 of the proof of Theorem 3.13 to ensure we are dealing with two-dimensional Lebesgue measure. Finally, we prove that {Ξ L 3 , Ω B , Λ 1 } ∈ Π A 4 . The upper bounds for Ω = Ω SA , Ω N or Ω g and Λ 1 follow an almost identical argument. When considering Λ 2 , we can collapse the first limit in the same manner as we did for solving Ξ L 1 .
Step 1: First we use the algorithm used to compute Ξ L 1 in Theorem 3.13, which we shall denote by Γ, to build a height 3 tower for {Ξ L 3 , Ω f }. As above, Ω f denotes the set of bounded operators with the usual assumption of bounded dispersion (now with known bounds c n ). Recall that we observed • Γ n2,n1 (A) converges to Γ n2 (A) from below as n 1 → ∞. • Γ n2 (A) converges to Leb(Sp(A)) monotonically from above as n 2 → ∞.
We can alter our algorithms, by taking maxima, so that we can assume without loss of generality that Γ n2,n1 (A) converges to Γ n2 (A) monotonically from below as n 1 → ∞. Now let Γ n3,n2,n1 (A) = χ [0,1/n3] ( Γ n2,n1 (A)). where ± denotes one of the right or left limits (it is possible to have either). It is then easy to see that It is also clear that the answer to the question is "No" if Γ n3 (A) = 0, which yields the Π A 3 classification. The algorithm Γ n2,n1 thus translates to an algorithm Γ n2,n1 for {Ξ 1 ,Ω}. Namely, set Γ n2,n1 ({a i,j } i∈N ) = Γ n2,n1 (A). The fact that φ is a bijection shows that the lowest level Γ n2,n1 are generalised algorithms (and are consistent). In particular, given N , we can find {A i,j : i, j ≤ N } using finitely many evaluations of the matrix values {c k,l }. But for any given c k,l , we can evaluate this entry using only finitely many evaluations of the matrix values {a m,n } by the construction of r. Finally note that where Q is at most countable. Hence Recall that it was shown in §5 that SCI(Ξ 4 ,Ω) G = 4. We will gain a contradiction by using the supposed height three tower to solve {Ξ 4 ,Ω}.
The construction follows step 3 of the proof of Theorem 3.7 closely. For fixed m, recall the construction of the operator A m := A({a m,i,j } i,j ) from that proof, the key property being that if {a m,i,j } i,j has (only) finitely many columns with (only) finitely many 1's then Sp(A m ) is a finite subset of [−1, 1], otherwise it is the whole interval [−1, 1]. Now consider the intervals I m = [1 − 2 m−1 , 1 − 2 m ] and affine maps, α m , that act as a bijection from [−1, 1] to I m . Without loss of generality, identify Ω SA with self adjoint operators in ∞ j=1 X i,j in the l 2 -sense with X i,j = l 2 (N). We then consider the operator The same arguments in the proof of Theorem 3.7 show that the map Γ n3,n2,n1 ({a m,i,j } m,i,j ) = Γ n3,n2,n1 (T ({a m,i,j } m,i,j )) defines a general tower using the relevant pointwise evaluation functions of the array {a m,i,j } m,i,j . If it holds thatΞ 4 ({a m,i,j }) = 1, then Sp(T ({a m,i,j } m,i,j )) is countable and hence Ξ L 3 (T ({a m,i,j } m,i,j )) = 1. On the other hand, ifΞ 4 ({a m,i,j }) = 0, then there exists m with Sp(A m ) = [−1, 1] and hence I m ⊂ Sp(T ({a m,i,j } m,i,j )) so that Ξ L 3 (T ({a m,i,j } m,i,j )) = 0. It follows that {Γ n3,n2,n1 } provides a height three tower for {Ξ 4 ,Ω}, a contradiction.
Step 4: Recall the tower of algorithms to solve {Ξ L 1 , Ω B , Λ 1 }, and denote it by Γ. Our strategy will be the same as in step 1 but with an additional successive limit. It is easy to show that • Γ n3,n2,n1 (A) converges to Γ n3,n2 (A) from above as n 1 → ∞. • Γ n3,n2 (A) converges to Γ n3 (A) from below as n 2 → ∞.
Note that χ [0,1/n4] is left continuous on [0, ∞) with right limits. Hence by the assumed monotonicity and arguments as in step 1, it is easy to see that It is also clear that the answer to the question is "No" if Γ n4 (A) = 0, which yields the Π A 4 classification.

PROOFS CONCERNING FRACTAL DIMENSIONS
We begin with the box-counting dimension. For the construction of towers of algorithms, it is useful to use a slightly different but equivalent [71] definition of the upper and lower box-counting dimensions. Let F ⊂ R be bounded and N δ (F ) denote the number of δ-mesh intervals that intersect F . A δ-mesh interval is an interval of the form [mδ, (m + 1)δ] for m ∈ Z. Then Proof of Theorem 3.18 for box-counting dimension. Since Recall the existence of a height one tower, {Γ n }, using Λ 1 for Sp(A), A ∈ Ω BD f from Appendix A. Furthermore,Γ n (A) outputs a finite collection {z 1,n , . . . , z kn,n } ⊂ Q such that dist(z j,n , Sp(A)) ≤ 2 −n . Define the intervals and let I m denote the collection of all 2 −m -mesh intervals. Let Υ m,n (A) be any union of finitely many such mesh intervals with minimal length |Υ m,n (A)| ("length" being the number of intervals ∈ I m that make up Υ m,n (A)) such that Υ m,n (A) ∩ I j,l = ∅, for 1 ≤ l ≤ n, 1 ≤ j ≤ k l .
There may be more than one such collection, so we can gain a deterministic algorithm by enumerating each I m and choosing the first such collection in this enumeration. It is then clear that |Υ m,n (A)| is increasing in n. Furthermore, to determine Υ m,n (A), there are only finitely many intervals in I m to consider, namely those that have non-empty intersection with at least one I j,l with 1 ≤ l ≤ n, 1 ≤ j ≤ k l . It follows that Υ m,n (A) and hence |Υ m,n (A)| can be computed in finitely may arithmetic operations and comparisons using Λ 1 .
Suppose that I = [a, b] ∈ I m has (a, b) ∩ Sp(A) = ∅. Then for large n there exists z j,n ∈ I such that I j,n ⊂ I and hence I ⊂ Υ m,n (A) for large n. If z ∈ Sp(A) ∩ 2 −m Z, then a similar argument shows that z ⊂ Υ m,n (A) for large n. Since Sp(A) is bounded and Sp(A) ∩ 2 −m Z finite, it follows that Sp(A) ⊂ Υ m,n (A) for large n and hence Let W m (A) be the union of all intervals in I m that intersect Sp(A). It is clear that W m (A) ∩ I j,l = ∅ for 1 ≤ l ≤ n, 1 ≤ j ≤ k l and hence |Υ m,n (A)| ≤ N 2 −m (Sp(A)). It follows that lim n→∞ |Υ m,n (A)| = δ m (A) exists with For n 2 > n 1 set Γ n2,n1 (A) = 0, otherwise set The above monotone convergence and (9.1) shows that Hence, by the assumption that the box-counting dimension exists, we have constructed a Π A 2 tower.
The first of these is exactly as in step 1, using Λ 2 to construct the relevant Σ A 1 tower for the spectrum. The proof that {Ξ B , Ω BD SA , Λ 1 } ∈ Π A 3 uses a height two tower, {Γ n2,n1 }, using Λ 1 for Sp(A), A ∈ Ω BD SA (or any self-adjoint A) constructed in [18]. This tower has the property that eachΓ n2,n1 (A) is a finite subset of Q and, for fixed n 2 , is constant for large n 1 . Moreover, if z ∈ lim n1→∞Γn2,n1 (A), then dist(z, Sp(A)) ≤ 2 −n2 . It follows that we can use the same construction as step 1 with an additional limit at the start to reach the finite set lim n1→∞Γn2,n1 (A).
Step 3: {Ξ B , Ω BD D , Λ 2 } ∈ ∆ A 2 . This is exactly the same argument as step 2 of the proof of Theorem 3.13 with Lebesgue measure replaced by box-counting dimension.
Step 4: {Ξ B , Ω BD SA , Λ 1 } ∈ ∆ A 3 . This is exactly the same argument as step 4 of the proof of Theorem 3.13 with Lebesgue measure replaced by box-counting dimension.
We now turn to the Hausdorff dimension. Recall Lemma 3.21 on the problem of determining whether Sp(A) ∩ (a, b) = ∅.
Proof of Lemma 3.21. We start with the class Ω f ∩Ω SA . We can interpret this problem as a decision problem and the following algorithm as one that halts on output "Yes". Let c = (a + b)/2 and δ = (b − a)/2, then the idea is to simply test whether DistSpec(A, n, c, f (n)) + c n < δ. If the answer is yes, then we output "Yes", otherwise we output "No" and increase n by one. Note that Sp(A) ∩ (a, b) = ∅ if and only if R(c, A) −1 < δ and hence as DistSpec(A, n, c, f (n)) + c n converges down to R(c, A) −1 we see that this provides a convergent algorithm. For Ω SA we require an additional successive limit by replacing DistSpec(A, n, c, f (n)) + c n with the function γ n2,n1 (z; A). If we have access to Λ 2 , then this can be avoided in the usual way.
To build our algorithm for the Hausdorff dimension, we use an alternative, equivalent definition for compact sets. We consider the case of subsets of R. Let ρ k denote the set of all closed binary intervals of the form [2 −k m, 2 −k (m + 1)], m ∈ Z. Set The following can be found in [81] (Theorem 3.13): Denoting the dyadic rationals by D, we shall compute dim H (Sp(A)) via approximating the above applied to F = Sp(A) ∩ D c and using the lemma 3.21.
Proof of Theorem 3.18 for Hausdorff dimension. It is enough to prove the lower bounds {Ξ H , Ω D , and construct the towers of algorithms for the inclusions However, now we consider the above mapping to [0, 1] with the usual metric. We consider the same operator where Q is at most countable. We use the fact that the Hausdorff dimension satisfies and that dim H (Q) = 0 for any countable Q to note that Ξ H (A) =Ξ 1 ({a i,j }). We setΓ n2,n1 ({a i,j } i,j ) = Γ n2,n1 (A) to provide a height two tower forΞ 1 . But this contradicts Theorem 5.19.
Step Recall that it was shown in §5 that SCI(Ξ 4 ,Ω) G = 4. We will gain a contradiction by using the supposed height three tower to solve {Ξ 4 ,Ω}. We use the same construction as in step 3 of the proof of Step 3: To construct a height three tower for A ∈ Ω f ∩ Ω SA , if n 2 < n 3 set Γ n3,n2,n1 (A) = 0. Otherwise, consider the set is the union of all S ∈ ρ n2 with S ⊂ [−n 1 , n 1 ] and such that the algorithm discussed in Lemma 3.21 outputs "Yes" for the interior of S and input parameter n 1 . We then define If S n1,n2 (A) is empty then we interpret the infinum as 0. There are only finitely many sets to check and hence the infinum is a minimisation problem over finitely many coverings (see §B.4 for a discussion of efficient implementation). It follows that h n3,n2,n1 (A, d) defines a general algorithm computable in finitely many arithmetic operations and comparisons. Furthermore, it is easy to see that from below (since we are covering larger sets as n 1 increases). Here and D k := 1/2 k ·Z denotes the dyadic rationals of resolution k. We now use the property that A k (F ) consists of collections of finite coverings. As n 2 → ∞, h n3,n2 (A, d) is non-increasing (since we take infinum over a larger class of coverings and the sets Sp(A) ∩ D c n2 decrease) and hence converges to some number. Clearly lim For large enough n 2 , {U i } ∈ C n3,n2 (A) and hence since > 0 was arbitrary, The fact that h n3 is non-decreasing in n 3 , the set {1/2 n3 , 2/2 n3 , . . . , 1} refines itself, and the stated monotonicity collectively show that convergence is monotonic from below, and hence we get the Σ A 3 classification.
Step 4: {Ξ H , Ω SA , Λ 1 } ∈ Σ A 4 and {Ξ H , Ω SA , Λ 2 } ∈ Σ A 3 . The first of these can be proven as in step 3 by replacing (n 1 , n 2 , n 3 ) by (n 2 , n 3 , n 4 ) and the set S n2,n1 (A) by the set S n3,n2,n1 (A) given by the union of all S ∈ ρ n3 with S ⊂ [−n 2 , n 2 ] and such that the Σ A 2 tower of algorithms discussed in Lemma 3.21 outputs "Yes" for the interior of S and input parameters (n 2 , n 1 ). To prove {Ξ H , Ω SA , Λ 2 } ∈ Σ A 3 , we use exactly the same construction as in step 3 now using the Σ A 1 algorithm (which uses Λ 2 ) given by Lemma 3.21.

APPENDIX A. ROUTINES FOR COMPUTING SPECTRA
We describe the SCI-sharp Σ A 1 algorithms in [64] and [60], that are used in some of our proofs. In this section, we consider the problem functions Ξ 1 (A) = Sp(A) and Ξ 2 (A) = Sp (A), taking values in the space of non-empty compact subsets of C equipped with Hausdorff metric. The definitions of the classes Ω g and Ω f can be found in §2. As written, the outputs of the algorithms below may be empty for small n (and hence not lie in the correct metric space). This does not affect the classifications and can be avoided by computing successive Γ n (A) and outputting Γ m(n) (A) where m(n) ≥ n is minimal with Γ m(n) (A) = ∅.
The methods in [64] and [60] use the function f to approximate the function where P m denotes the orthogonal projection onto the linear span of the first m basis vectors and σ inf denotes the injection modulus. As n → ∞, the functions γ n converge uniformly on compact subsets down to the continuous function γ(z; A) = R(z, A) −1 , which we interpret as zero if the resolvent R(z, A) = (A − zI) −1 does not exist as a bounded operator. The function f and sequence {c n } allow us to approximate γ n to any given precision. To use this to compute the spectrum, we need some control on how the resolvent norm diverges near the spectrum and this is provided by the function g satisfying (2.3). At various points in this paper, we have also made use of the related functions (A.2) γ n,m (z; A) = min{σ inf (P m (A − zI)| PnH ), σ inf (P m (A * −zI)| PnH )}.
These can be computed from the rectangular matrices P m (A − zI)P n , P m (A − zI) * P n and converge uniformly on compact subsets of C to γ n as m → ∞.
Algorithm 1: The subroutine IsPosDef checks whether a matrix is positive definite and is a standard routine that can be implemented in a myriad of ways. In practice, the while loop in DistSpec is replaced by a much more efficient interval bisection method. An alternative method for sparse matrices (which, however, does not rigorously guarantee an error bound on the smallest singular values) is to compute the smallest singular values of the rectangular matrices using iterative methods. See the supplementary material of [64] for further discussion on efficient numerical computation. Note also that when evaluating DistSpec for different z, the computation can be done in parallel.
Function DistSpec(A,n,z,f (n)) Input : n ∈ N, f (n) ∈ N, matrix A, z ∈ C Output: y ∈ R + , an approximation to the function z → R(z, A) Throughout, we use that DistSpec requires only finitely many arithmetic operations and comparisons, as proven in [60] (one can perform the IsPosDef routine using incomplete Cholesky decompositions). Furthermore, as outlined in Remark 5.12, we can make all of the algorithms in this paper and those in this appendix work using ∆ 1 -information and restricting to arithmetical operations over the rationals.

Algorithm 2:
The routine CompSpec computes spectra of bounded operators (see [60] for extensions to unbounded operators) on l 2 (N) (or, more generally, graphs) using the subroutines CompInvg and DistSpec described above, and provides Σ A 1 error control (without loss of generality by taking subsequences until the computed error is below a user specified tolerance).
Function CompInvg(n,y,g) Input : n ∈ N, y ∈ R + , g : R + → R + Output: m ∈ R + , an approximation to g −1 (y) m = min{k/n : k ∈ N, g(k/n) > y} end Function CompSpec(A,n,g,f (n),c n ) Input : n ∈ N, f (n) ∈ N, c n ∈ R + (bound on dispersion), g : R + → R + , A ∈ Ω f ∩ Ω g Output: Γ n (A) ⊂ C, an approximation to Sp(A), E n (A) ∈ R + , the error estimate We provide short and simplified routines for some of the algorithms in this paper. For example, we have ignored issues like the rigorous approximation of the function γ n,m in (A.2) using arithmetical operations. For brevity, we stick to one domain Ω and the evaluation set Λ 1 (matrix values) for each problem function Ξ. In each case, we have chosen the non-trivial Ω with the simplest algorithm. For the different algorithms for different classes of operators, see the proofs. In general, different classes of operators and evaluation sets have different SCI classifications and different algorithms for the same problem function.
B.1. Spectral radii, capacity and operator norms. For the problem functions in §3.1 -3.3, we consider Ω f (see (2.2)) and Ω f ∩ Ω SA for computing the capacity of the spectrum.
Algorithm 4: SpecRad computes the spectral radius of operators in Ω f using the algorithm for computing pseudospectra, PseudoSpec, which is parallelisable and provides Σ A 1 error control.
Function PolyNorm(p, n, f (n), c n , A) Input : polynomial p, n, f (n) ∈ N, c n ∈ R + , A ∈ Ω f Output: Γ n (A), a Σ A 1 approximation of p(A) ComputeB n ≈ B n = P n p(A)P n ∈ C n×n using f to compute matrix entries of powers of A.
Compute an upper bound δ n of B n − B n . (Do the above so that δ n is bounded by a null sequence.) Γ n (A) = B n − δ n end Algorithm 7: CapSpec computes cap(Sp(A)) for operators A ∈ Ω f ∩ Ω SA . The capacity of a finite union of intervals can be computed using conformal mappings. The computation of I n1,n2 requires applications of DistSpec which can be performed in parallel.
Algorithm 8: EssNumRange computes the essential numerical range for operators A ∈ Ω B (see §7.1 for unbounded operators). The numerical range of a finite square matrix can be approximated to arbitrary accuracy using finitely many arithmetic operations and comparisons. In practice, one can use the method of Johnson [96], which reduces the computation of ∂W (B) for B ∈ C n×n to a series of n × n Hermitian (extremal) eigenvalue problems.